diff --git a/llvm/bin/llvm-tblgen b/llvm/bin/llvm-tblgen deleted file mode 100755 index aedf7b05..00000000 Binary files a/llvm/bin/llvm-tblgen and /dev/null differ diff --git a/llvm/include/llvm-c/Analysis.h b/llvm/include/llvm-c/Analysis.h deleted file mode 100644 index 36dcb89e..00000000 --- a/llvm/include/llvm-c/Analysis.h +++ /dev/null @@ -1,65 +0,0 @@ -/*===-- llvm-c/Analysis.h - Analysis Library C Interface --------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMAnalysis.a, which *| -|* implements various analyses of the LLVM IR. *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_ANALYSIS_H -#define LLVM_C_ANALYSIS_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCAnalysis Analysis - * @ingroup LLVMC - * - * @{ - */ - -typedef enum { - LLVMAbortProcessAction, /* verifier will print to stderr and abort() */ - LLVMPrintMessageAction, /* verifier will print to stderr and return 1 */ - LLVMReturnStatusAction /* verifier will just return 1 */ -} LLVMVerifierFailureAction; - - -/* Verifies that a module is valid, taking the specified action if not. - Optionally returns a human-readable description of any invalid constructs. - OutMessage must be disposed with LLVMDisposeMessage. */ -LLVMBool LLVMVerifyModule(LLVMModuleRef M, LLVMVerifierFailureAction Action, - char **OutMessage); - -/* Verifies that a single function is valid, taking the specified action. Useful - for debugging. */ -LLVMBool LLVMVerifyFunction(LLVMValueRef Fn, LLVMVerifierFailureAction Action); - -/* Open up a ghostview window that displays the CFG of the current function. - Useful for debugging. */ -void LLVMViewFunctionCFG(LLVMValueRef Fn); -void LLVMViewFunctionCFGOnly(LLVMValueRef Fn); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/BitReader.h b/llvm/include/llvm-c/BitReader.h deleted file mode 100644 index d1fc3027..00000000 --- a/llvm/include/llvm-c/BitReader.h +++ /dev/null @@ -1,85 +0,0 @@ -/*===-- llvm-c/BitReader.h - BitReader Library C Interface ------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMBitReader.a, which *| -|* implements input of the LLVM bitcode format. *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_BITREADER_H -#define LLVM_C_BITREADER_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCBitReader Bit Reader - * @ingroup LLVMC - * - * @{ - */ - -/* Builds a module from the bitcode in the specified memory buffer, returning a - reference to the module via the OutModule parameter. Returns 0 on success. - Optionally returns a human-readable error message via OutMessage. - - This is deprecated. Use LLVMParseBitcode2. */ -LLVMBool LLVMParseBitcode(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutModule, - char **OutMessage); - -/* Builds a module from the bitcode in the specified memory buffer, returning a - reference to the module via the OutModule parameter. Returns 0 on success. */ -LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, - LLVMModuleRef *OutModule); - -/* This is deprecated. Use LLVMParseBitcodeInContext2. */ -LLVMBool LLVMParseBitcodeInContext(LLVMContextRef ContextRef, - LLVMMemoryBufferRef MemBuf, - LLVMModuleRef *OutModule, char **OutMessage); - -LLVMBool LLVMParseBitcodeInContext2(LLVMContextRef ContextRef, - LLVMMemoryBufferRef MemBuf, - LLVMModuleRef *OutModule); - -/** Reads a module from the specified path, returning via the OutMP parameter - a module provider which performs lazy deserialization. Returns 0 on success. - Optionally returns a human-readable error message via OutMessage. - This is deprecated. Use LLVMGetBitcodeModuleInContext2. */ -LLVMBool LLVMGetBitcodeModuleInContext(LLVMContextRef ContextRef, - LLVMMemoryBufferRef MemBuf, - LLVMModuleRef *OutM, char **OutMessage); - -/** Reads a module from the specified path, returning via the OutMP parameter a - * module provider which performs lazy deserialization. Returns 0 on success. */ -LLVMBool LLVMGetBitcodeModuleInContext2(LLVMContextRef ContextRef, - LLVMMemoryBufferRef MemBuf, - LLVMModuleRef *OutM); - -/* This is deprecated. Use LLVMGetBitcodeModule2. */ -LLVMBool LLVMGetBitcodeModule(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, - char **OutMessage); - -LLVMBool LLVMGetBitcodeModule2(LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/BitWriter.h b/llvm/include/llvm-c/BitWriter.h deleted file mode 100644 index 797d0317..00000000 --- a/llvm/include/llvm-c/BitWriter.h +++ /dev/null @@ -1,59 +0,0 @@ -/*===-- llvm-c/BitWriter.h - BitWriter Library C Interface ------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMBitWriter.a, which *| -|* implements output of the LLVM bitcode format. *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_BITWRITER_H -#define LLVM_C_BITWRITER_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCBitWriter Bit Writer - * @ingroup LLVMC - * - * @{ - */ - -/*===-- Operations on modules ---------------------------------------------===*/ - -/** Writes a module to the specified path. Returns 0 on success. */ -int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path); - -/** Writes a module to an open file descriptor. Returns 0 on success. */ -int LLVMWriteBitcodeToFD(LLVMModuleRef M, int FD, int ShouldClose, - int Unbuffered); - -/** Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file - descriptor. Returns 0 on success. Closes the Handle. */ -int LLVMWriteBitcodeToFileHandle(LLVMModuleRef M, int Handle); - -/** Writes a module to a new memory buffer and returns it. */ -LLVMMemoryBufferRef LLVMWriteBitcodeToMemoryBuffer(LLVMModuleRef M); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h deleted file mode 100644 index 76f8b315..00000000 --- a/llvm/include/llvm-c/Core.h +++ /dev/null @@ -1,3284 +0,0 @@ -/*===-- llvm-c/Core.h - Core Library C Interface ------------------*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMCore.a, which implements *| -|* the LLVM intermediate representation. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_CORE_H -#define LLVM_C_CORE_H - -#include "llvm-c/ErrorHandling.h" -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMC LLVM-C: C interface to LLVM - * - * This module exposes parts of the LLVM library as a C API. - * - * @{ - */ - -/** - * @defgroup LLVMCTransforms Transforms - */ - -/** - * @defgroup LLVMCCore Core - * - * This modules provide an interface to libLLVMCore, which implements - * the LLVM intermediate representation as well as other related types - * and utilities. - * - * Many exotic languages can interoperate with C code but have a harder time - * with C++ due to name mangling. So in addition to C, this interface enables - * tools written in such languages. - * - * @{ - */ - -/** - * @defgroup LLVMCCoreTypes Types and Enumerations - * - * @{ - */ - -typedef enum { - LLVMZExtAttribute = 1<<0, - LLVMSExtAttribute = 1<<1, - LLVMNoReturnAttribute = 1<<2, - LLVMInRegAttribute = 1<<3, - LLVMStructRetAttribute = 1<<4, - LLVMNoUnwindAttribute = 1<<5, - LLVMNoAliasAttribute = 1<<6, - LLVMByValAttribute = 1<<7, - LLVMNestAttribute = 1<<8, - LLVMReadNoneAttribute = 1<<9, - LLVMReadOnlyAttribute = 1<<10, - LLVMNoInlineAttribute = 1<<11, - LLVMAlwaysInlineAttribute = 1<<12, - LLVMOptimizeForSizeAttribute = 1<<13, - LLVMStackProtectAttribute = 1<<14, - LLVMStackProtectReqAttribute = 1<<15, - LLVMAlignment = 31<<16, - LLVMNoCaptureAttribute = 1<<21, - LLVMNoRedZoneAttribute = 1<<22, - LLVMNoImplicitFloatAttribute = 1<<23, - LLVMNakedAttribute = 1<<24, - LLVMInlineHintAttribute = 1<<25, - LLVMStackAlignment = 7<<26, - LLVMReturnsTwice = 1 << 29, - LLVMUWTable = 1 << 30, - LLVMNonLazyBind = 1 << 31 - - /* FIXME: These attributes are currently not included in the C API as - a temporary measure until the API/ABI impact to the C API is understood - and the path forward agreed upon. - LLVMSanitizeAddressAttribute = 1ULL << 32, - LLVMStackProtectStrongAttribute = 1ULL<<35, - LLVMColdAttribute = 1ULL << 40, - LLVMOptimizeNoneAttribute = 1ULL << 42, - LLVMInAllocaAttribute = 1ULL << 43, - LLVMNonNullAttribute = 1ULL << 44, - LLVMJumpTableAttribute = 1ULL << 45, - LLVMConvergentAttribute = 1ULL << 46, - LLVMSafeStackAttribute = 1ULL << 47, - LLVMSwiftSelfAttribute = 1ULL << 48, - LLVMSwiftErrorAttribute = 1ULL << 49, - */ -} LLVMAttribute; - -typedef enum { - /* Terminator Instructions */ - LLVMRet = 1, - LLVMBr = 2, - LLVMSwitch = 3, - LLVMIndirectBr = 4, - LLVMInvoke = 5, - /* removed 6 due to API changes */ - LLVMUnreachable = 7, - - /* Standard Binary Operators */ - LLVMAdd = 8, - LLVMFAdd = 9, - LLVMSub = 10, - LLVMFSub = 11, - LLVMMul = 12, - LLVMFMul = 13, - LLVMUDiv = 14, - LLVMSDiv = 15, - LLVMFDiv = 16, - LLVMURem = 17, - LLVMSRem = 18, - LLVMFRem = 19, - - /* Logical Operators */ - LLVMShl = 20, - LLVMLShr = 21, - LLVMAShr = 22, - LLVMAnd = 23, - LLVMOr = 24, - LLVMXor = 25, - - /* Memory Operators */ - LLVMAlloca = 26, - LLVMLoad = 27, - LLVMStore = 28, - LLVMGetElementPtr = 29, - - /* Cast Operators */ - LLVMTrunc = 30, - LLVMZExt = 31, - LLVMSExt = 32, - LLVMFPToUI = 33, - LLVMFPToSI = 34, - LLVMUIToFP = 35, - LLVMSIToFP = 36, - LLVMFPTrunc = 37, - LLVMFPExt = 38, - LLVMPtrToInt = 39, - LLVMIntToPtr = 40, - LLVMBitCast = 41, - LLVMAddrSpaceCast = 60, - - /* Other Operators */ - LLVMICmp = 42, - LLVMFCmp = 43, - LLVMPHI = 44, - LLVMCall = 45, - LLVMSelect = 46, - LLVMUserOp1 = 47, - LLVMUserOp2 = 48, - LLVMVAArg = 49, - LLVMExtractElement = 50, - LLVMInsertElement = 51, - LLVMShuffleVector = 52, - LLVMExtractValue = 53, - LLVMInsertValue = 54, - - /* Atomic operators */ - LLVMFence = 55, - LLVMAtomicCmpXchg = 56, - LLVMAtomicRMW = 57, - - /* Exception Handling Operators */ - LLVMResume = 58, - LLVMLandingPad = 59, - LLVMCleanupRet = 61, - LLVMCatchRet = 62, - LLVMCatchPad = 63, - LLVMCleanupPad = 64, - LLVMCatchSwitch = 65 -} LLVMOpcode; - -typedef enum { - LLVMVoidTypeKind, /**< type with no size */ - LLVMHalfTypeKind, /**< 16 bit floating point type */ - LLVMFloatTypeKind, /**< 32 bit floating point type */ - LLVMDoubleTypeKind, /**< 64 bit floating point type */ - LLVMX86_FP80TypeKind, /**< 80 bit floating point type (X87) */ - LLVMFP128TypeKind, /**< 128 bit floating point type (112-bit mantissa)*/ - LLVMPPC_FP128TypeKind, /**< 128 bit floating point type (two 64-bits) */ - LLVMLabelTypeKind, /**< Labels */ - LLVMIntegerTypeKind, /**< Arbitrary bit width integers */ - LLVMFunctionTypeKind, /**< Functions */ - LLVMStructTypeKind, /**< Structures */ - LLVMArrayTypeKind, /**< Arrays */ - LLVMPointerTypeKind, /**< Pointers */ - LLVMVectorTypeKind, /**< SIMD 'packed' format, or other vector type */ - LLVMMetadataTypeKind, /**< Metadata */ - LLVMX86_MMXTypeKind, /**< X86 MMX */ - LLVMTokenTypeKind /**< Tokens */ -} LLVMTypeKind; - -typedef enum { - LLVMExternalLinkage, /**< Externally visible function */ - LLVMAvailableExternallyLinkage, - LLVMLinkOnceAnyLinkage, /**< Keep one copy of function when linking (inline)*/ - LLVMLinkOnceODRLinkage, /**< Same, but only replaced by something - equivalent. */ - LLVMLinkOnceODRAutoHideLinkage, /**< Obsolete */ - LLVMWeakAnyLinkage, /**< Keep one copy of function when linking (weak) */ - LLVMWeakODRLinkage, /**< Same, but only replaced by something - equivalent. */ - LLVMAppendingLinkage, /**< Special purpose, only applies to global arrays */ - LLVMInternalLinkage, /**< Rename collisions when linking (static - functions) */ - LLVMPrivateLinkage, /**< Like Internal, but omit from symbol table */ - LLVMDLLImportLinkage, /**< Obsolete */ - LLVMDLLExportLinkage, /**< Obsolete */ - LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */ - LLVMGhostLinkage, /**< Obsolete */ - LLVMCommonLinkage, /**< Tentative definitions */ - LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */ - LLVMLinkerPrivateWeakLinkage /**< Like LinkerPrivate, but is weak. */ -} LLVMLinkage; - -typedef enum { - LLVMDefaultVisibility, /**< The GV is visible */ - LLVMHiddenVisibility, /**< The GV is hidden */ - LLVMProtectedVisibility /**< The GV is protected */ -} LLVMVisibility; - -typedef enum { - LLVMDefaultStorageClass = 0, - LLVMDLLImportStorageClass = 1, /**< Function to be imported from DLL. */ - LLVMDLLExportStorageClass = 2 /**< Function to be accessible from DLL. */ -} LLVMDLLStorageClass; - -typedef enum { - LLVMCCallConv = 0, - LLVMFastCallConv = 8, - LLVMColdCallConv = 9, - LLVMWebKitJSCallConv = 12, - LLVMAnyRegCallConv = 13, - LLVMX86StdcallCallConv = 64, - LLVMX86FastcallCallConv = 65 -} LLVMCallConv; - -typedef enum { - LLVMArgumentValueKind, - LLVMBasicBlockValueKind, - LLVMMemoryUseValueKind, - LLVMMemoryDefValueKind, - LLVMMemoryPhiValueKind, - - LLVMFunctionValueKind, - LLVMGlobalAliasValueKind, - LLVMGlobalIFuncValueKind, - LLVMGlobalVariableValueKind, - LLVMBlockAddressValueKind, - LLVMConstantExprValueKind, - LLVMConstantArrayValueKind, - LLVMConstantStructValueKind, - LLVMConstantVectorValueKind, - - LLVMUndefValueValueKind, - LLVMConstantAggregateZeroValueKind, - LLVMConstantDataArrayValueKind, - LLVMConstantDataVectorValueKind, - LLVMConstantIntValueKind, - LLVMConstantFPValueKind, - LLVMConstantPointerNullValueKind, - LLVMConstantTokenNoneValueKind, - - LLVMMetadataAsValueValueKind, - LLVMInlineAsmValueKind, - - LLVMInstructionValueKind, -} LLVMValueKind; - -typedef enum { - LLVMIntEQ = 32, /**< equal */ - LLVMIntNE, /**< not equal */ - LLVMIntUGT, /**< unsigned greater than */ - LLVMIntUGE, /**< unsigned greater or equal */ - LLVMIntULT, /**< unsigned less than */ - LLVMIntULE, /**< unsigned less or equal */ - LLVMIntSGT, /**< signed greater than */ - LLVMIntSGE, /**< signed greater or equal */ - LLVMIntSLT, /**< signed less than */ - LLVMIntSLE /**< signed less or equal */ -} LLVMIntPredicate; - -typedef enum { - LLVMRealPredicateFalse, /**< Always false (always folded) */ - LLVMRealOEQ, /**< True if ordered and equal */ - LLVMRealOGT, /**< True if ordered and greater than */ - LLVMRealOGE, /**< True if ordered and greater than or equal */ - LLVMRealOLT, /**< True if ordered and less than */ - LLVMRealOLE, /**< True if ordered and less than or equal */ - LLVMRealONE, /**< True if ordered and operands are unequal */ - LLVMRealORD, /**< True if ordered (no nans) */ - LLVMRealUNO, /**< True if unordered: isnan(X) | isnan(Y) */ - LLVMRealUEQ, /**< True if unordered or equal */ - LLVMRealUGT, /**< True if unordered or greater than */ - LLVMRealUGE, /**< True if unordered, greater than, or equal */ - LLVMRealULT, /**< True if unordered or less than */ - LLVMRealULE, /**< True if unordered, less than, or equal */ - LLVMRealUNE, /**< True if unordered or not equal */ - LLVMRealPredicateTrue /**< Always true (always folded) */ -} LLVMRealPredicate; - -typedef enum { - LLVMLandingPadCatch, /**< A catch clause */ - LLVMLandingPadFilter /**< A filter clause */ -} LLVMLandingPadClauseTy; - -typedef enum { - LLVMNotThreadLocal = 0, - LLVMGeneralDynamicTLSModel, - LLVMLocalDynamicTLSModel, - LLVMInitialExecTLSModel, - LLVMLocalExecTLSModel -} LLVMThreadLocalMode; - -typedef enum { - LLVMAtomicOrderingNotAtomic = 0, /**< A load or store which is not atomic */ - LLVMAtomicOrderingUnordered = 1, /**< Lowest level of atomicity, guarantees - somewhat sane results, lock free. */ - LLVMAtomicOrderingMonotonic = 2, /**< guarantees that if you take all the - operations affecting a specific address, - a consistent ordering exists */ - LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort - necessary to acquire a lock to access other - memory with normal loads and stores. */ - LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with - a barrier of the sort necessary to release - a lock. */ - LLVMAtomicOrderingAcquireRelease = 6, /**< provides both an Acquire and a - Release barrier (for fences and - operations which both read and write - memory). */ - LLVMAtomicOrderingSequentiallyConsistent = 7 /**< provides Acquire semantics - for loads and Release - semantics for stores. - Additionally, it guarantees - that a total ordering exists - between all - SequentiallyConsistent - operations. */ -} LLVMAtomicOrdering; - -typedef enum { - LLVMAtomicRMWBinOpXchg, /**< Set the new value and return the one old */ - LLVMAtomicRMWBinOpAdd, /**< Add a value and return the old one */ - LLVMAtomicRMWBinOpSub, /**< Subtract a value and return the old one */ - LLVMAtomicRMWBinOpAnd, /**< And a value and return the old one */ - LLVMAtomicRMWBinOpNand, /**< Not-And a value and return the old one */ - LLVMAtomicRMWBinOpOr, /**< OR a value and return the old one */ - LLVMAtomicRMWBinOpXor, /**< Xor a value and return the old one */ - LLVMAtomicRMWBinOpMax, /**< Sets the value if it's greater than the - original using a signed comparison and return - the old one */ - LLVMAtomicRMWBinOpMin, /**< Sets the value if it's Smaller than the - original using a signed comparison and return - the old one */ - LLVMAtomicRMWBinOpUMax, /**< Sets the value if it's greater than the - original using an unsigned comparison and return - the old one */ - LLVMAtomicRMWBinOpUMin /**< Sets the value if it's greater than the - original using an unsigned comparison and return - the old one */ -} LLVMAtomicRMWBinOp; - -typedef enum { - LLVMDSError, - LLVMDSWarning, - LLVMDSRemark, - LLVMDSNote -} LLVMDiagnosticSeverity; - -/** - * Attribute index are either LLVMAttributeReturnIndex, - * LLVMAttributeFunctionIndex or a parameter number from 1 to N. - */ -enum { - LLVMAttributeReturnIndex = 0U, - // ISO C restricts enumerator values to range of 'int' - // (4294967295 is too large) - // LLVMAttributeFunctionIndex = ~0U, - LLVMAttributeFunctionIndex = -1, -}; - -typedef unsigned LLVMAttributeIndex; - -/** - * @} - */ - -void LLVMInitializeCore(LLVMPassRegistryRef R); - -/** Deallocate and destroy all ManagedStatic variables. - @see llvm::llvm_shutdown - @see ManagedStatic */ -void LLVMShutdown(void); - -/*===-- Error handling ----------------------------------------------------===*/ - -char *LLVMCreateMessage(const char *Message); -void LLVMDisposeMessage(char *Message); - -/** - * @defgroup LLVMCCoreContext Contexts - * - * Contexts are execution states for the core LLVM IR system. - * - * Most types are tied to a context instance. Multiple contexts can - * exist simultaneously. A single context is not thread safe. However, - * different contexts can execute on different threads simultaneously. - * - * @{ - */ - -typedef void (*LLVMDiagnosticHandler)(LLVMDiagnosticInfoRef, void *); -typedef void (*LLVMYieldCallback)(LLVMContextRef, void *); - -/** - * Create a new context. - * - * Every call to this function should be paired with a call to - * LLVMContextDispose() or the context will leak memory. - */ -LLVMContextRef LLVMContextCreate(void); - -/** - * Obtain the global context instance. - */ -LLVMContextRef LLVMGetGlobalContext(void); - -/** - * Set the diagnostic handler for this context. - */ -void LLVMContextSetDiagnosticHandler(LLVMContextRef C, - LLVMDiagnosticHandler Handler, - void *DiagnosticContext); - -/** - * Get the diagnostic handler of this context. - */ -LLVMDiagnosticHandler LLVMContextGetDiagnosticHandler(LLVMContextRef C); - -/** - * Get the diagnostic context of this context. - */ -void *LLVMContextGetDiagnosticContext(LLVMContextRef C); - -/** - * Set the yield callback function for this context. - * - * @see LLVMContext::setYieldCallback() - */ -void LLVMContextSetYieldCallback(LLVMContextRef C, LLVMYieldCallback Callback, - void *OpaqueHandle); - -/** - * Destroy a context instance. - * - * This should be called for every call to LLVMContextCreate() or memory - * will be leaked. - */ -void LLVMContextDispose(LLVMContextRef C); - -/** - * Return a string representation of the DiagnosticInfo. Use - * LLVMDisposeMessage to free the string. - * - * @see DiagnosticInfo::print() - */ -char *LLVMGetDiagInfoDescription(LLVMDiagnosticInfoRef DI); - -/** - * Return an enum LLVMDiagnosticSeverity. - * - * @see DiagnosticInfo::getSeverity() - */ -LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity(LLVMDiagnosticInfoRef DI); - -unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char *Name, - unsigned SLen); -unsigned LLVMGetMDKindID(const char *Name, unsigned SLen); - -/** - * Return an unique id given the name of a enum attribute, - * or 0 if no attribute by that name exists. - * - * See http://llvm.org/docs/LangRef.html#parameter-attributes - * and http://llvm.org/docs/LangRef.html#function-attributes - * for the list of available attributes. - * - * NB: Attribute names and/or id are subject to change without - * going through the C API deprecation cycle. - */ -unsigned LLVMGetEnumAttributeKindForName(const char *Name, size_t SLen); -unsigned LLVMGetLastEnumAttributeKind(void); - -/** - * Create an enum attribute. - */ -LLVMAttributeRef LLVMCreateEnumAttribute(LLVMContextRef C, unsigned KindID, - uint64_t Val); - -/** - * Get the unique id corresponding to the enum attribute - * passed as argument. - */ -unsigned LLVMGetEnumAttributeKind(LLVMAttributeRef A); - -/** - * Get the enum attribute's value. 0 is returned if none exists. - */ -uint64_t LLVMGetEnumAttributeValue(LLVMAttributeRef A); - -/** - * Create a string attribute. - */ -LLVMAttributeRef LLVMCreateStringAttribute(LLVMContextRef C, - const char *K, unsigned KLength, - const char *V, unsigned VLength); - -/** - * Get the string attribute's kind. - */ -const char *LLVMGetStringAttributeKind(LLVMAttributeRef A, unsigned *Length); - -/** - * Get the string attribute's value. - */ -const char *LLVMGetStringAttributeValue(LLVMAttributeRef A, unsigned *Length); - -/** - * Check for the different types of attributes. - */ -LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A); -LLVMBool LLVMIsStringAttribute(LLVMAttributeRef A); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreModule Modules - * - * Modules represent the top-level structure in an LLVM program. An LLVM - * module is effectively a translation unit or a collection of - * translation units merged together. - * - * @{ - */ - -/** - * Create a new, empty module in the global context. - * - * This is equivalent to calling LLVMModuleCreateWithNameInContext with - * LLVMGetGlobalContext() as the context parameter. - * - * Every invocation should be paired with LLVMDisposeModule() or memory - * will be leaked. - */ -LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID); - -/** - * Create a new, empty module in a specific context. - * - * Every invocation should be paired with LLVMDisposeModule() or memory - * will be leaked. - */ -LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID, - LLVMContextRef C); -/** - * Return an exact copy of the specified module. - */ -LLVMModuleRef LLVMCloneModule(LLVMModuleRef M); - -/** - * Destroy a module instance. - * - * This must be called for every created module or memory will be - * leaked. - */ -void LLVMDisposeModule(LLVMModuleRef M); - -/** - * Obtain the identifier of a module. - * - * @param M Module to obtain identifier of - * @param Len Out parameter which holds the length of the returned string. - * @return The identifier of M. - * @see Module::getModuleIdentifier() - */ -const char *LLVMGetModuleIdentifier(LLVMModuleRef M, size_t *Len); - -/** - * Set the identifier of a module to a string Ident with length Len. - * - * @param M The module to set identifier - * @param Ident The string to set M's identifier to - * @param Len Length of Ident - * @see Module::setModuleIdentifier() - */ -void LLVMSetModuleIdentifier(LLVMModuleRef M, const char *Ident, size_t Len); - -/** - * Obtain the data layout for a module. - * - * @see Module::getDataLayoutStr() - * - * LLVMGetDataLayout is DEPRECATED, as the name is not only incorrect, - * but match the name of another method on the module. Prefer the use - * of LLVMGetDataLayoutStr, which is not ambiguous. - */ -const char *LLVMGetDataLayoutStr(LLVMModuleRef M); -const char *LLVMGetDataLayout(LLVMModuleRef M); - -/** - * Set the data layout for a module. - * - * @see Module::setDataLayout() - */ -void LLVMSetDataLayout(LLVMModuleRef M, const char *DataLayoutStr); - -/** - * Obtain the target triple for a module. - * - * @see Module::getTargetTriple() - */ -const char *LLVMGetTarget(LLVMModuleRef M); - -/** - * Set the target triple for a module. - * - * @see Module::setTargetTriple() - */ -void LLVMSetTarget(LLVMModuleRef M, const char *Triple); - -/** - * Dump a representation of a module to stderr. - * - * @see Module::dump() - */ -void LLVMDumpModule(LLVMModuleRef M); - -/** - * Print a representation of a module to a file. The ErrorMessage needs to be - * disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise. - * - * @see Module::print() - */ -LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename, - char **ErrorMessage); - -/** - * Return a string representation of the module. Use - * LLVMDisposeMessage to free the string. - * - * @see Module::print() - */ -char *LLVMPrintModuleToString(LLVMModuleRef M); - -/** - * Set inline assembly for a module. - * - * @see Module::setModuleInlineAsm() - */ -void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm); - -/** - * Obtain the context to which this module is associated. - * - * @see Module::getContext() - */ -LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M); - -/** - * Obtain a Type from a module by its registered name. - */ -LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name); - -/** - * Obtain the number of operands for named metadata in a module. - * - * @see llvm::Module::getNamedMetadata() - */ -unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char *Name); - -/** - * Obtain the named metadata operands for a module. - * - * The passed LLVMValueRef pointer should refer to an array of - * LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This - * array will be populated with the LLVMValueRef instances. Each - * instance corresponds to a llvm::MDNode. - * - * @see llvm::Module::getNamedMetadata() - * @see llvm::MDNode::getOperand() - */ -void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name, - LLVMValueRef *Dest); - -/** - * Add an operand to named metadata. - * - * @see llvm::Module::getNamedMetadata() - * @see llvm::MDNode::addOperand() - */ -void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name, - LLVMValueRef Val); - -/** - * Add a function to a module under a specified name. - * - * @see llvm::Function::Create() - */ -LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name, - LLVMTypeRef FunctionTy); - -/** - * Obtain a Function value from a Module by its name. - * - * The returned value corresponds to a llvm::Function value. - * - * @see llvm::Module::getFunction() - */ -LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name); - -/** - * Obtain an iterator to the first Function in a Module. - * - * @see llvm::Module::begin() - */ -LLVMValueRef LLVMGetFirstFunction(LLVMModuleRef M); - -/** - * Obtain an iterator to the last Function in a Module. - * - * @see llvm::Module::end() - */ -LLVMValueRef LLVMGetLastFunction(LLVMModuleRef M); - -/** - * Advance a Function iterator to the next Function. - * - * Returns NULL if the iterator was already at the end and there are no more - * functions. - */ -LLVMValueRef LLVMGetNextFunction(LLVMValueRef Fn); - -/** - * Decrement a Function iterator to the previous Function. - * - * Returns NULL if the iterator was already at the beginning and there are - * no previous functions. - */ -LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreType Types - * - * Types represent the type of a value. - * - * Types are associated with a context instance. The context internally - * deduplicates types so there is only 1 instance of a specific type - * alive at a time. In other words, a unique type is shared among all - * consumers within a context. - * - * A Type in the C API corresponds to llvm::Type. - * - * Types have the following hierarchy: - * - * types: - * integer type - * real type - * function type - * sequence types: - * array type - * pointer type - * vector type - * void type - * label type - * opaque type - * - * @{ - */ - -/** - * Obtain the enumerated type of a Type instance. - * - * @see llvm::Type:getTypeID() - */ -LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty); - -/** - * Whether the type has a known size. - * - * Things that don't have a size are abstract types, labels, and void.a - * - * @see llvm::Type::isSized() - */ -LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty); - -/** - * Obtain the context to which this type instance is associated. - * - * @see llvm::Type::getContext() - */ -LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty); - -/** - * Dump a representation of a type to stderr. - * - * @see llvm::Type::dump() - */ -void LLVMDumpType(LLVMTypeRef Val); - -/** - * Return a string representation of the type. Use - * LLVMDisposeMessage to free the string. - * - * @see llvm::Type::print() - */ -char *LLVMPrintTypeToString(LLVMTypeRef Val); - -/** - * @defgroup LLVMCCoreTypeInt Integer Types - * - * Functions in this section operate on integer types. - * - * @{ - */ - -/** - * Obtain an integer type from a context with specified bit width. - */ -LLVMTypeRef LLVMInt1TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt8TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt16TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt32TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt64TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMInt128TypeInContext(LLVMContextRef C); -LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits); - -/** - * Obtain an integer type from the global context with a specified bit - * width. - */ -LLVMTypeRef LLVMInt1Type(void); -LLVMTypeRef LLVMInt8Type(void); -LLVMTypeRef LLVMInt16Type(void); -LLVMTypeRef LLVMInt32Type(void); -LLVMTypeRef LLVMInt64Type(void); -LLVMTypeRef LLVMInt128Type(void); -LLVMTypeRef LLVMIntType(unsigned NumBits); -unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreTypeFloat Floating Point Types - * - * @{ - */ - -/** - * Obtain a 16-bit floating point type from a context. - */ -LLVMTypeRef LLVMHalfTypeInContext(LLVMContextRef C); - -/** - * Obtain a 32-bit floating point type from a context. - */ -LLVMTypeRef LLVMFloatTypeInContext(LLVMContextRef C); - -/** - * Obtain a 64-bit floating point type from a context. - */ -LLVMTypeRef LLVMDoubleTypeInContext(LLVMContextRef C); - -/** - * Obtain a 80-bit floating point type (X87) from a context. - */ -LLVMTypeRef LLVMX86FP80TypeInContext(LLVMContextRef C); - -/** - * Obtain a 128-bit floating point type (112-bit mantissa) from a - * context. - */ -LLVMTypeRef LLVMFP128TypeInContext(LLVMContextRef C); - -/** - * Obtain a 128-bit floating point type (two 64-bits) from a context. - */ -LLVMTypeRef LLVMPPCFP128TypeInContext(LLVMContextRef C); - -/** - * Obtain a floating point type from the global context. - * - * These map to the functions in this group of the same name. - */ -LLVMTypeRef LLVMHalfType(void); -LLVMTypeRef LLVMFloatType(void); -LLVMTypeRef LLVMDoubleType(void); -LLVMTypeRef LLVMX86FP80Type(void); -LLVMTypeRef LLVMFP128Type(void); -LLVMTypeRef LLVMPPCFP128Type(void); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreTypeFunction Function Types - * - * @{ - */ - -/** - * Obtain a function type consisting of a specified signature. - * - * The function is defined as a tuple of a return Type, a list of - * parameter types, and whether the function is variadic. - */ -LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, - LLVMTypeRef *ParamTypes, unsigned ParamCount, - LLVMBool IsVarArg); - -/** - * Returns whether a function type is variadic. - */ -LLVMBool LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy); - -/** - * Obtain the Type this function Type returns. - */ -LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy); - -/** - * Obtain the number of parameters this function accepts. - */ -unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy); - -/** - * Obtain the types of a function's parameters. - * - * The Dest parameter should point to a pre-allocated array of - * LLVMTypeRef at least LLVMCountParamTypes() large. On return, the - * first LLVMCountParamTypes() entries in the array will be populated - * with LLVMTypeRef instances. - * - * @param FunctionTy The function type to operate on. - * @param Dest Memory address of an array to be filled with result. - */ -void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreTypeStruct Structure Types - * - * These functions relate to LLVMTypeRef instances. - * - * @see llvm::StructType - * - * @{ - */ - -/** - * Create a new structure type in a context. - * - * A structure is specified by a list of inner elements/types and - * whether these can be packed together. - * - * @see llvm::StructType::create() - */ -LLVMTypeRef LLVMStructTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes, - unsigned ElementCount, LLVMBool Packed); - -/** - * Create a new structure type in the global context. - * - * @see llvm::StructType::create() - */ -LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, - LLVMBool Packed); - -/** - * Create an empty structure in a context having a specified name. - * - * @see llvm::StructType::create() - */ -LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name); - -/** - * Obtain the name of a structure. - * - * @see llvm::StructType::getName() - */ -const char *LLVMGetStructName(LLVMTypeRef Ty); - -/** - * Set the contents of a structure type. - * - * @see llvm::StructType::setBody() - */ -void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, - unsigned ElementCount, LLVMBool Packed); - -/** - * Get the number of elements defined inside the structure. - * - * @see llvm::StructType::getNumElements() - */ -unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy); - -/** - * Get the elements within a structure. - * - * The function is passed the address of a pre-allocated array of - * LLVMTypeRef at least LLVMCountStructElementTypes() long. After - * invocation, this array will be populated with the structure's - * elements. The objects in the destination array will have a lifetime - * of the structure type itself, which is the lifetime of the context it - * is contained in. - */ -void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest); - -/** - * Get the type of the element at a given index in the structure. - * - * @see llvm::StructType::getTypeAtIndex() - */ -LLVMTypeRef LLVMStructGetTypeAtIndex(LLVMTypeRef StructTy, unsigned i); - -/** - * Determine whether a structure is packed. - * - * @see llvm::StructType::isPacked() - */ -LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy); - -/** - * Determine whether a structure is opaque. - * - * @see llvm::StructType::isOpaque() - */ -LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreTypeSequential Sequential Types - * - * Sequential types represents "arrays" of types. This is a super class - * for array, vector, and pointer types. - * - * @{ - */ - -/** - * Obtain the type of elements within a sequential type. - * - * This works on array, vector, and pointer types. - * - * @see llvm::SequentialType::getElementType() - */ -LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty); - -/** - * Create a fixed size array type that refers to a specific type. - * - * The created type will exist in the context that its element type - * exists in. - * - * @see llvm::ArrayType::get() - */ -LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount); - -/** - * Obtain the length of an array type. - * - * This only works on types that represent arrays. - * - * @see llvm::ArrayType::getNumElements() - */ -unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy); - -/** - * Create a pointer type that points to a defined type. - * - * The created type will exist in the context that its pointee type - * exists in. - * - * @see llvm::PointerType::get() - */ -LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned AddressSpace); - -/** - * Obtain the address space of a pointer type. - * - * This only works on types that represent pointers. - * - * @see llvm::PointerType::getAddressSpace() - */ -unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy); - -/** - * Create a vector type that contains a defined type and has a specific - * number of elements. - * - * The created type will exist in the context thats its element type - * exists in. - * - * @see llvm::VectorType::get() - */ -LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount); - -/** - * Obtain the number of elements in a vector type. - * - * This only works on types that represent vectors. - * - * @see llvm::VectorType::getNumElements() - */ -unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreTypeOther Other Types - * - * @{ - */ - -/** - * Create a void type in a context. - */ -LLVMTypeRef LLVMVoidTypeInContext(LLVMContextRef C); - -/** - * Create a label type in a context. - */ -LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C); - -/** - * Create a X86 MMX type in a context. - */ -LLVMTypeRef LLVMX86MMXTypeInContext(LLVMContextRef C); - -/** - * These are similar to the above functions except they operate on the - * global context. - */ -LLVMTypeRef LLVMVoidType(void); -LLVMTypeRef LLVMLabelType(void); -LLVMTypeRef LLVMX86MMXType(void); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValues Values - * - * The bulk of LLVM's object model consists of values, which comprise a very - * rich type hierarchy. - * - * LLVMValueRef essentially represents llvm::Value. There is a rich - * hierarchy of classes within this type. Depending on the instance - * obtained, not all APIs are available. - * - * Callers can determine the type of an LLVMValueRef by calling the - * LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These - * functions are defined by a macro, so it isn't obvious which are - * available by looking at the Doxygen source code. Instead, look at the - * source definition of LLVM_FOR_EACH_VALUE_SUBCLASS and note the list - * of value names given. These value names also correspond to classes in - * the llvm::Value hierarchy. - * - * @{ - */ - -#define LLVM_FOR_EACH_VALUE_SUBCLASS(macro) \ - macro(Argument) \ - macro(BasicBlock) \ - macro(InlineAsm) \ - macro(User) \ - macro(Constant) \ - macro(BlockAddress) \ - macro(ConstantAggregateZero) \ - macro(ConstantArray) \ - macro(ConstantDataSequential) \ - macro(ConstantDataArray) \ - macro(ConstantDataVector) \ - macro(ConstantExpr) \ - macro(ConstantFP) \ - macro(ConstantInt) \ - macro(ConstantPointerNull) \ - macro(ConstantStruct) \ - macro(ConstantTokenNone) \ - macro(ConstantVector) \ - macro(GlobalValue) \ - macro(GlobalAlias) \ - macro(GlobalObject) \ - macro(Function) \ - macro(GlobalVariable) \ - macro(UndefValue) \ - macro(Instruction) \ - macro(BinaryOperator) \ - macro(CallInst) \ - macro(IntrinsicInst) \ - macro(DbgInfoIntrinsic) \ - macro(DbgDeclareInst) \ - macro(MemIntrinsic) \ - macro(MemCpyInst) \ - macro(MemMoveInst) \ - macro(MemSetInst) \ - macro(CmpInst) \ - macro(FCmpInst) \ - macro(ICmpInst) \ - macro(ExtractElementInst) \ - macro(GetElementPtrInst) \ - macro(InsertElementInst) \ - macro(InsertValueInst) \ - macro(LandingPadInst) \ - macro(PHINode) \ - macro(SelectInst) \ - macro(ShuffleVectorInst) \ - macro(StoreInst) \ - macro(TerminatorInst) \ - macro(BranchInst) \ - macro(IndirectBrInst) \ - macro(InvokeInst) \ - macro(ReturnInst) \ - macro(SwitchInst) \ - macro(UnreachableInst) \ - macro(ResumeInst) \ - macro(CleanupReturnInst) \ - macro(CatchReturnInst) \ - macro(FuncletPadInst) \ - macro(CatchPadInst) \ - macro(CleanupPadInst) \ - macro(UnaryInstruction) \ - macro(AllocaInst) \ - macro(CastInst) \ - macro(AddrSpaceCastInst) \ - macro(BitCastInst) \ - macro(FPExtInst) \ - macro(FPToSIInst) \ - macro(FPToUIInst) \ - macro(FPTruncInst) \ - macro(IntToPtrInst) \ - macro(PtrToIntInst) \ - macro(SExtInst) \ - macro(SIToFPInst) \ - macro(TruncInst) \ - macro(UIToFPInst) \ - macro(ZExtInst) \ - macro(ExtractValueInst) \ - macro(LoadInst) \ - macro(VAArgInst) - -/** - * @defgroup LLVMCCoreValueGeneral General APIs - * - * Functions in this section work on all LLVMValueRef instances, - * regardless of their sub-type. They correspond to functions available - * on llvm::Value. - * - * @{ - */ - -/** - * Obtain the type of a value. - * - * @see llvm::Value::getType() - */ -LLVMTypeRef LLVMTypeOf(LLVMValueRef Val); - -/** - * Obtain the enumerated type of a Value instance. - * - * @see llvm::Value::getValueID() - */ -LLVMValueKind LLVMGetValueKind(LLVMValueRef Val); - -/** - * Obtain the string name of a value. - * - * @see llvm::Value::getName() - */ -const char *LLVMGetValueName(LLVMValueRef Val); - -/** - * Set the string name of a value. - * - * @see llvm::Value::setName() - */ -void LLVMSetValueName(LLVMValueRef Val, const char *Name); - -/** - * Dump a representation of a value to stderr. - * - * @see llvm::Value::dump() - */ -void LLVMDumpValue(LLVMValueRef Val); - -/** - * Return a string representation of the value. Use - * LLVMDisposeMessage to free the string. - * - * @see llvm::Value::print() - */ -char *LLVMPrintValueToString(LLVMValueRef Val); - -/** - * Replace all uses of a value with another one. - * - * @see llvm::Value::replaceAllUsesWith() - */ -void LLVMReplaceAllUsesWith(LLVMValueRef OldVal, LLVMValueRef NewVal); - -/** - * Determine whether the specified value instance is constant. - */ -LLVMBool LLVMIsConstant(LLVMValueRef Val); - -/** - * Determine whether a value instance is undefined. - */ -LLVMBool LLVMIsUndef(LLVMValueRef Val); - -/** - * Convert value instances between types. - * - * Internally, an LLVMValueRef is "pinned" to a specific type. This - * series of functions allows you to cast an instance to a specific - * type. - * - * If the cast is not valid for the specified type, NULL is returned. - * - * @see llvm::dyn_cast_or_null<> - */ -#define LLVM_DECLARE_VALUE_CAST(name) \ - LLVMValueRef LLVMIsA##name(LLVMValueRef Val); -LLVM_FOR_EACH_VALUE_SUBCLASS(LLVM_DECLARE_VALUE_CAST) - -LLVMValueRef LLVMIsAMDNode(LLVMValueRef Val); -LLVMValueRef LLVMIsAMDString(LLVMValueRef Val); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueUses Usage - * - * This module defines functions that allow you to inspect the uses of a - * LLVMValueRef. - * - * It is possible to obtain an LLVMUseRef for any LLVMValueRef instance. - * Each LLVMUseRef (which corresponds to a llvm::Use instance) holds a - * llvm::User and llvm::Value. - * - * @{ - */ - -/** - * Obtain the first use of a value. - * - * Uses are obtained in an iterator fashion. First, call this function - * to obtain a reference to the first use. Then, call LLVMGetNextUse() - * on that instance and all subsequently obtained instances until - * LLVMGetNextUse() returns NULL. - * - * @see llvm::Value::use_begin() - */ -LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val); - -/** - * Obtain the next use of a value. - * - * This effectively advances the iterator. It returns NULL if you are on - * the final use and no more are available. - */ -LLVMUseRef LLVMGetNextUse(LLVMUseRef U); - -/** - * Obtain the user value for a user. - * - * The returned value corresponds to a llvm::User type. - * - * @see llvm::Use::getUser() - */ -LLVMValueRef LLVMGetUser(LLVMUseRef U); - -/** - * Obtain the value this use corresponds to. - * - * @see llvm::Use::get(). - */ -LLVMValueRef LLVMGetUsedValue(LLVMUseRef U); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueUser User value - * - * Function in this group pertain to LLVMValueRef instances that descent - * from llvm::User. This includes constants, instructions, and - * operators. - * - * @{ - */ - -/** - * Obtain an operand at a specific index in a llvm::User value. - * - * @see llvm::User::getOperand() - */ -LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index); - -/** - * Obtain the use of an operand at a specific index in a llvm::User value. - * - * @see llvm::User::getOperandUse() - */ -LLVMUseRef LLVMGetOperandUse(LLVMValueRef Val, unsigned Index); - -/** - * Set an operand at a specific index in a llvm::User value. - * - * @see llvm::User::setOperand() - */ -void LLVMSetOperand(LLVMValueRef User, unsigned Index, LLVMValueRef Val); - -/** - * Obtain the number of operands in a llvm::User value. - * - * @see llvm::User::getNumOperands() - */ -int LLVMGetNumOperands(LLVMValueRef Val); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueConstant Constants - * - * This section contains APIs for interacting with LLVMValueRef that - * correspond to llvm::Constant instances. - * - * These functions will work for any LLVMValueRef in the llvm::Constant - * class hierarchy. - * - * @{ - */ - -/** - * Obtain a constant value referring to the null instance of a type. - * - * @see llvm::Constant::getNullValue() - */ -LLVMValueRef LLVMConstNull(LLVMTypeRef Ty); /* all zeroes */ - -/** - * Obtain a constant value referring to the instance of a type - * consisting of all ones. - * - * This is only valid for integer types. - * - * @see llvm::Constant::getAllOnesValue() - */ -LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty); - -/** - * Obtain a constant value referring to an undefined value of a type. - * - * @see llvm::UndefValue::get() - */ -LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty); - -/** - * Determine whether a value instance is null. - * - * @see llvm::Constant::isNullValue() - */ -LLVMBool LLVMIsNull(LLVMValueRef Val); - -/** - * Obtain a constant that is a constant pointer pointing to NULL for a - * specified type. - */ -LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty); - -/** - * @defgroup LLVMCCoreValueConstantScalar Scalar constants - * - * Functions in this group model LLVMValueRef instances that correspond - * to constants referring to scalar types. - * - * For integer types, the LLVMTypeRef parameter should correspond to a - * llvm::IntegerType instance and the returned LLVMValueRef will - * correspond to a llvm::ConstantInt. - * - * For floating point types, the LLVMTypeRef returned corresponds to a - * llvm::ConstantFP. - * - * @{ - */ - -/** - * Obtain a constant value for an integer type. - * - * The returned value corresponds to a llvm::ConstantInt. - * - * @see llvm::ConstantInt::get() - * - * @param IntTy Integer type to obtain value of. - * @param N The value the returned instance should refer to. - * @param SignExtend Whether to sign extend the produced value. - */ -LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N, - LLVMBool SignExtend); - -/** - * Obtain a constant value for an integer of arbitrary precision. - * - * @see llvm::ConstantInt::get() - */ -LLVMValueRef LLVMConstIntOfArbitraryPrecision(LLVMTypeRef IntTy, - unsigned NumWords, - const uint64_t Words[]); - -/** - * Obtain a constant value for an integer parsed from a string. - * - * A similar API, LLVMConstIntOfStringAndSize is also available. If the - * string's length is available, it is preferred to call that function - * instead. - * - * @see llvm::ConstantInt::get() - */ -LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char *Text, - uint8_t Radix); - -/** - * Obtain a constant value for an integer parsed from a string with - * specified length. - * - * @see llvm::ConstantInt::get() - */ -LLVMValueRef LLVMConstIntOfStringAndSize(LLVMTypeRef IntTy, const char *Text, - unsigned SLen, uint8_t Radix); - -/** - * Obtain a constant value referring to a double floating point value. - */ -LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N); - -/** - * Obtain a constant for a floating point value parsed from a string. - * - * A similar API, LLVMConstRealOfStringAndSize is also available. It - * should be used if the input string's length is known. - */ -LLVMValueRef LLVMConstRealOfString(LLVMTypeRef RealTy, const char *Text); - -/** - * Obtain a constant for a floating point value parsed from a string. - */ -LLVMValueRef LLVMConstRealOfStringAndSize(LLVMTypeRef RealTy, const char *Text, - unsigned SLen); - -/** - * Obtain the zero extended value for an integer constant value. - * - * @see llvm::ConstantInt::getZExtValue() - */ -unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal); - -/** - * Obtain the sign extended value for an integer constant value. - * - * @see llvm::ConstantInt::getSExtValue() - */ -long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal); - -/** - * Obtain the double value for an floating point constant value. - * losesInfo indicates if some precision was lost in the conversion. - * - * @see llvm::ConstantFP::getDoubleValue - */ -double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueConstantComposite Composite Constants - * - * Functions in this group operate on composite constants. - * - * @{ - */ - -/** - * Create a ConstantDataSequential and initialize it with a string. - * - * @see llvm::ConstantDataArray::getString() - */ -LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str, - unsigned Length, LLVMBool DontNullTerminate); - -/** - * Create a ConstantDataSequential with string content in the global context. - * - * This is the same as LLVMConstStringInContext except it operates on the - * global context. - * - * @see LLVMConstStringInContext() - * @see llvm::ConstantDataArray::getString() - */ -LLVMValueRef LLVMConstString(const char *Str, unsigned Length, - LLVMBool DontNullTerminate); - -/** - * Returns true if the specified constant is an array of i8. - * - * @see ConstantDataSequential::getAsString() - */ -LLVMBool LLVMIsConstantString(LLVMValueRef c); - -/** - * Get the given constant data sequential as a string. - * - * @see ConstantDataSequential::getAsString() - */ -const char *LLVMGetAsString(LLVMValueRef c, size_t *Length); - -/** - * Create an anonymous ConstantStruct with the specified values. - * - * @see llvm::ConstantStruct::getAnon() - */ -LLVMValueRef LLVMConstStructInContext(LLVMContextRef C, - LLVMValueRef *ConstantVals, - unsigned Count, LLVMBool Packed); - -/** - * Create a ConstantStruct in the global Context. - * - * This is the same as LLVMConstStructInContext except it operates on the - * global Context. - * - * @see LLVMConstStructInContext() - */ -LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, - LLVMBool Packed); - -/** - * Create a ConstantArray from values. - * - * @see llvm::ConstantArray::get() - */ -LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, - LLVMValueRef *ConstantVals, unsigned Length); - -/** - * Create a non-anonymous ConstantStruct from values. - * - * @see llvm::ConstantStruct::get() - */ -LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy, - LLVMValueRef *ConstantVals, - unsigned Count); - -/** - * Get an element at specified index as a constant. - * - * @see ConstantDataSequential::getElementAsConstant() - */ -LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx); - -/** - * Create a ConstantVector from values. - * - * @see llvm::ConstantVector::get() - */ -LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueConstantExpressions Constant Expressions - * - * Functions in this group correspond to APIs on llvm::ConstantExpr. - * - * @see llvm::ConstantExpr. - * - * @{ - */ -LLVMOpcode LLVMGetConstOpcode(LLVMValueRef ConstantVal); -LLVMValueRef LLVMAlignOf(LLVMTypeRef Ty); -LLVMValueRef LLVMSizeOf(LLVMTypeRef Ty); -LLVMValueRef LLVMConstNeg(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstNSWNeg(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstNUWNeg(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstFNeg(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstNot(LLVMValueRef ConstantVal); -LLVMValueRef LLVMConstAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNSWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNSWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNUWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNSWMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstNUWMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFMul(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstUDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstExactSDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFDiv(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstURem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstSRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFRem(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstAnd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstOr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstXor(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstICmp(LLVMIntPredicate Predicate, - LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstFCmp(LLVMRealPredicate Predicate, - LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstShl(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstLShr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstAShr(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant); -LLVMValueRef LLVMConstGEP(LLVMValueRef ConstantVal, - LLVMValueRef *ConstantIndices, unsigned NumIndices); -LLVMValueRef LLVMConstInBoundsGEP(LLVMValueRef ConstantVal, - LLVMValueRef *ConstantIndices, - unsigned NumIndices); -LLVMValueRef LLVMConstTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstSExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstZExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstFPTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstFPExt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstUIToFP(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstSIToFP(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstFPToUI(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstFPToSI(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstZExtOrBitCast(LLVMValueRef ConstantVal, - LLVMTypeRef ToType); -LLVMValueRef LLVMConstSExtOrBitCast(LLVMValueRef ConstantVal, - LLVMTypeRef ToType); -LLVMValueRef LLVMConstTruncOrBitCast(LLVMValueRef ConstantVal, - LLVMTypeRef ToType); -LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal, - LLVMTypeRef ToType); -LLVMValueRef LLVMConstIntCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType, - LLVMBool isSigned); -LLVMValueRef LLVMConstFPCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType); -LLVMValueRef LLVMConstSelect(LLVMValueRef ConstantCondition, - LLVMValueRef ConstantIfTrue, - LLVMValueRef ConstantIfFalse); -LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant, - LLVMValueRef IndexConstant); -LLVMValueRef LLVMConstInsertElement(LLVMValueRef VectorConstant, - LLVMValueRef ElementValueConstant, - LLVMValueRef IndexConstant); -LLVMValueRef LLVMConstShuffleVector(LLVMValueRef VectorAConstant, - LLVMValueRef VectorBConstant, - LLVMValueRef MaskConstant); -LLVMValueRef LLVMConstExtractValue(LLVMValueRef AggConstant, unsigned *IdxList, - unsigned NumIdx); -LLVMValueRef LLVMConstInsertValue(LLVMValueRef AggConstant, - LLVMValueRef ElementValueConstant, - unsigned *IdxList, unsigned NumIdx); -LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, - const char *AsmString, const char *Constraints, - LLVMBool HasSideEffects, LLVMBool IsAlignStack); -LLVMValueRef LLVMBlockAddress(LLVMValueRef F, LLVMBasicBlockRef BB); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueConstantGlobals Global Values - * - * This group contains functions that operate on global values. Functions in - * this group relate to functions in the llvm::GlobalValue class tree. - * - * @see llvm::GlobalValue - * - * @{ - */ - -LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global); -LLVMBool LLVMIsDeclaration(LLVMValueRef Global); -LLVMLinkage LLVMGetLinkage(LLVMValueRef Global); -void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage); -const char *LLVMGetSection(LLVMValueRef Global); -void LLVMSetSection(LLVMValueRef Global, const char *Section); -LLVMVisibility LLVMGetVisibility(LLVMValueRef Global); -void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz); -LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global); -void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class); -LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global); -void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr); - -/** - * @defgroup LLVMCCoreValueWithAlignment Values with alignment - * - * Functions in this group only apply to values with alignment, i.e. - * global variables, load and store instructions. - */ - -/** - * Obtain the preferred alignment of the value. - * @see llvm::AllocaInst::getAlignment() - * @see llvm::LoadInst::getAlignment() - * @see llvm::StoreInst::getAlignment() - * @see llvm::GlobalValue::getAlignment() - */ -unsigned LLVMGetAlignment(LLVMValueRef V); - -/** - * Set the preferred alignment of the value. - * @see llvm::AllocaInst::setAlignment() - * @see llvm::LoadInst::setAlignment() - * @see llvm::StoreInst::setAlignment() - * @see llvm::GlobalValue::setAlignment() - */ -void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes); - -/** - * @} - */ - -/** - * @defgroup LLVMCoreValueConstantGlobalVariable Global Variables - * - * This group contains functions that operate on global variable values. - * - * @see llvm::GlobalVariable - * - * @{ - */ -LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name); -LLVMValueRef LLVMAddGlobalInAddressSpace(LLVMModuleRef M, LLVMTypeRef Ty, - const char *Name, - unsigned AddressSpace); -LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name); -LLVMValueRef LLVMGetFirstGlobal(LLVMModuleRef M); -LLVMValueRef LLVMGetLastGlobal(LLVMModuleRef M); -LLVMValueRef LLVMGetNextGlobal(LLVMValueRef GlobalVar); -LLVMValueRef LLVMGetPreviousGlobal(LLVMValueRef GlobalVar); -void LLVMDeleteGlobal(LLVMValueRef GlobalVar); -LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar); -void LLVMSetInitializer(LLVMValueRef GlobalVar, LLVMValueRef ConstantVal); -LLVMBool LLVMIsThreadLocal(LLVMValueRef GlobalVar); -void LLVMSetThreadLocal(LLVMValueRef GlobalVar, LLVMBool IsThreadLocal); -LLVMBool LLVMIsGlobalConstant(LLVMValueRef GlobalVar); -void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, LLVMBool IsConstant); -LLVMThreadLocalMode LLVMGetThreadLocalMode(LLVMValueRef GlobalVar); -void LLVMSetThreadLocalMode(LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode); -LLVMBool LLVMIsExternallyInitialized(LLVMValueRef GlobalVar); -void LLVMSetExternallyInitialized(LLVMValueRef GlobalVar, LLVMBool IsExtInit); - -/** - * @} - */ - -/** - * @defgroup LLVMCoreValueConstantGlobalAlias Global Aliases - * - * This group contains function that operate on global alias values. - * - * @see llvm::GlobalAlias - * - * @{ - */ -LLVMValueRef LLVMAddAlias(LLVMModuleRef M, LLVMTypeRef Ty, LLVMValueRef Aliasee, - const char *Name); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueFunction Function values - * - * Functions in this group operate on LLVMValueRef instances that - * correspond to llvm::Function instances. - * - * @see llvm::Function - * - * @{ - */ - -/** - * Remove a function from its containing module and deletes it. - * - * @see llvm::Function::eraseFromParent() - */ -void LLVMDeleteFunction(LLVMValueRef Fn); - -/** - * Check whether the given function has a personality function. - * - * @see llvm::Function::hasPersonalityFn() - */ -LLVMBool LLVMHasPersonalityFn(LLVMValueRef Fn); - -/** - * Obtain the personality function attached to the function. - * - * @see llvm::Function::getPersonalityFn() - */ -LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn); - -/** - * Set the personality function attached to the function. - * - * @see llvm::Function::setPersonalityFn() - */ -void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn); - -/** - * Obtain the ID number from a function instance. - * - * @see llvm::Function::getIntrinsicID() - */ -unsigned LLVMGetIntrinsicID(LLVMValueRef Fn); - -/** - * Obtain the calling function of a function. - * - * The returned value corresponds to the LLVMCallConv enumeration. - * - * @see llvm::Function::getCallingConv() - */ -unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn); - -/** - * Set the calling convention of a function. - * - * @see llvm::Function::setCallingConv() - * - * @param Fn Function to operate on - * @param CC LLVMCallConv to set calling convention to - */ -void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC); - -/** - * Obtain the name of the garbage collector to use during code - * generation. - * - * @see llvm::Function::getGC() - */ -const char *LLVMGetGC(LLVMValueRef Fn); - -/** - * Define the garbage collector to use during code generation. - * - * @see llvm::Function::setGC() - */ -void LLVMSetGC(LLVMValueRef Fn, const char *Name); - -/** - * Add an attribute to a function. - * - * @see llvm::Function::addAttribute() - */ -void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA); - -void LLVMAddAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, - LLVMAttributeRef A); -unsigned LLVMGetAttributeCountAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx); -void LLVMGetAttributesAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, - LLVMAttributeRef *Attrs); -LLVMAttributeRef LLVMGetEnumAttributeAtIndex(LLVMValueRef F, - LLVMAttributeIndex Idx, - unsigned KindID); -LLVMAttributeRef LLVMGetStringAttributeAtIndex(LLVMValueRef F, - LLVMAttributeIndex Idx, - const char *K, unsigned KLen); -void LLVMRemoveEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, - unsigned KindID); -void LLVMRemoveStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, - const char *K, unsigned KLen); - -/** - * Add a target-dependent attribute to a function - * @see llvm::AttrBuilder::addAttribute() - */ -void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A, - const char *V); - -/** - * Obtain an attribute from a function. - * - * @see llvm::Function::getAttributes() - */ -LLVMAttribute LLVMGetFunctionAttr(LLVMValueRef Fn); - -/** - * Remove an attribute from a function. - */ -void LLVMRemoveFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA); - -/** - * @defgroup LLVMCCoreValueFunctionParameters Function Parameters - * - * Functions in this group relate to arguments/parameters on functions. - * - * Functions in this group expect LLVMValueRef instances that correspond - * to llvm::Function instances. - * - * @{ - */ - -/** - * Obtain the number of parameters in a function. - * - * @see llvm::Function::arg_size() - */ -unsigned LLVMCountParams(LLVMValueRef Fn); - -/** - * Obtain the parameters in a function. - * - * The takes a pointer to a pre-allocated array of LLVMValueRef that is - * at least LLVMCountParams() long. This array will be filled with - * LLVMValueRef instances which correspond to the parameters the - * function receives. Each LLVMValueRef corresponds to a llvm::Argument - * instance. - * - * @see llvm::Function::arg_begin() - */ -void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params); - -/** - * Obtain the parameter at the specified index. - * - * Parameters are indexed from 0. - * - * @see llvm::Function::arg_begin() - */ -LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index); - -/** - * Obtain the function to which this argument belongs. - * - * Unlike other functions in this group, this one takes an LLVMValueRef - * that corresponds to a llvm::Attribute. - * - * The returned LLVMValueRef is the llvm::Function to which this - * argument belongs. - */ -LLVMValueRef LLVMGetParamParent(LLVMValueRef Inst); - -/** - * Obtain the first parameter to a function. - * - * @see llvm::Function::arg_begin() - */ -LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn); - -/** - * Obtain the last parameter to a function. - * - * @see llvm::Function::arg_end() - */ -LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn); - -/** - * Obtain the next parameter to a function. - * - * This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is - * actually a wrapped iterator) and obtains the next parameter from the - * underlying iterator. - */ -LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg); - -/** - * Obtain the previous parameter to a function. - * - * This is the opposite of LLVMGetNextParam(). - */ -LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg); - -/** - * Add an attribute to a function argument. - * - * @see llvm::Argument::addAttr() - */ -void LLVMAddAttribute(LLVMValueRef Arg, LLVMAttribute PA); - -/** - * Remove an attribute from a function argument. - * - * @see llvm::Argument::removeAttr() - */ -void LLVMRemoveAttribute(LLVMValueRef Arg, LLVMAttribute PA); - -/** - * Get an attribute from a function argument. - */ -LLVMAttribute LLVMGetAttribute(LLVMValueRef Arg); - -/** - * Set the alignment for a function parameter. - * - * @see llvm::Argument::addAttr() - * @see llvm::AttrBuilder::addAlignmentAttr() - */ -void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueMetadata Metadata - * - * @{ - */ - -/** - * Obtain a MDString value from a context. - * - * The returned instance corresponds to the llvm::MDString class. - * - * The instance is specified by string data of a specified length. The - * string content is copied, so the backing memory can be freed after - * this function returns. - */ -LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str, - unsigned SLen); - -/** - * Obtain a MDString value from the global context. - */ -LLVMValueRef LLVMMDString(const char *Str, unsigned SLen); - -/** - * Obtain a MDNode value from a context. - * - * The returned value corresponds to the llvm::MDNode class. - */ -LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, - unsigned Count); - -/** - * Obtain a MDNode value from the global context. - */ -LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count); - -/** - * Obtain the underlying string from a MDString value. - * - * @param V Instance to obtain string from. - * @param Length Memory address which will hold length of returned string. - * @return String data in MDString. - */ -const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length); - -/** - * Obtain the number of operands from an MDNode value. - * - * @param V MDNode to get number of operands from. - * @return Number of operands of the MDNode. - */ -unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V); - -/** - * Obtain the given MDNode's operands. - * - * The passed LLVMValueRef pointer should point to enough memory to hold all of - * the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as - * LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the - * MDNode's operands. - * - * @param V MDNode to get the operands from. - * @param Dest Destination array for operands. - */ -void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueBasicBlock Basic Block - * - * A basic block represents a single entry single exit section of code. - * Basic blocks contain a list of instructions which form the body of - * the block. - * - * Basic blocks belong to functions. They have the type of label. - * - * Basic blocks are themselves values. However, the C API models them as - * LLVMBasicBlockRef. - * - * @see llvm::BasicBlock - * - * @{ - */ - -/** - * Convert a basic block instance to a value type. - */ -LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB); - -/** - * Determine whether an LLVMValueRef is itself a basic block. - */ -LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val); - -/** - * Convert an LLVMValueRef to an LLVMBasicBlockRef instance. - */ -LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val); - -/** - * Obtain the string name of a basic block. - */ -const char *LLVMGetBasicBlockName(LLVMBasicBlockRef BB); - -/** - * Obtain the function to which a basic block belongs. - * - * @see llvm::BasicBlock::getParent() - */ -LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB); - -/** - * Obtain the terminator instruction for a basic block. - * - * If the basic block does not have a terminator (it is not well-formed - * if it doesn't), then NULL is returned. - * - * The returned LLVMValueRef corresponds to a llvm::TerminatorInst. - * - * @see llvm::BasicBlock::getTerminator() - */ -LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB); - -/** - * Obtain the number of basic blocks in a function. - * - * @param Fn Function value to operate on. - */ -unsigned LLVMCountBasicBlocks(LLVMValueRef Fn); - -/** - * Obtain all of the basic blocks in a function. - * - * This operates on a function value. The BasicBlocks parameter is a - * pointer to a pre-allocated array of LLVMBasicBlockRef of at least - * LLVMCountBasicBlocks() in length. This array is populated with - * LLVMBasicBlockRef instances. - */ -void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks); - -/** - * Obtain the first basic block in a function. - * - * The returned basic block can be used as an iterator. You will likely - * eventually call into LLVMGetNextBasicBlock() with it. - * - * @see llvm::Function::begin() - */ -LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn); - -/** - * Obtain the last basic block in a function. - * - * @see llvm::Function::end() - */ -LLVMBasicBlockRef LLVMGetLastBasicBlock(LLVMValueRef Fn); - -/** - * Advance a basic block iterator. - */ -LLVMBasicBlockRef LLVMGetNextBasicBlock(LLVMBasicBlockRef BB); - -/** - * Go backwards in a basic block iterator. - */ -LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB); - -/** - * Obtain the basic block that corresponds to the entry point of a - * function. - * - * @see llvm::Function::getEntryBlock() - */ -LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn); - -/** - * Append a basic block to the end of a function. - * - * @see llvm::BasicBlock::Create() - */ -LLVMBasicBlockRef LLVMAppendBasicBlockInContext(LLVMContextRef C, - LLVMValueRef Fn, - const char *Name); - -/** - * Append a basic block to the end of a function using the global - * context. - * - * @see llvm::BasicBlock::Create() - */ -LLVMBasicBlockRef LLVMAppendBasicBlock(LLVMValueRef Fn, const char *Name); - -/** - * Insert a basic block in a function before another basic block. - * - * The function to add to is determined by the function of the - * passed basic block. - * - * @see llvm::BasicBlock::Create() - */ -LLVMBasicBlockRef LLVMInsertBasicBlockInContext(LLVMContextRef C, - LLVMBasicBlockRef BB, - const char *Name); - -/** - * Insert a basic block in a function using the global context. - * - * @see llvm::BasicBlock::Create() - */ -LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef InsertBeforeBB, - const char *Name); - -/** - * Remove a basic block from a function and delete it. - * - * This deletes the basic block from its containing function and deletes - * the basic block itself. - * - * @see llvm::BasicBlock::eraseFromParent() - */ -void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB); - -/** - * Remove a basic block from a function. - * - * This deletes the basic block from its containing function but keep - * the basic block alive. - * - * @see llvm::BasicBlock::removeFromParent() - */ -void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BB); - -/** - * Move a basic block to before another one. - * - * @see llvm::BasicBlock::moveBefore() - */ -void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos); - -/** - * Move a basic block to after another one. - * - * @see llvm::BasicBlock::moveAfter() - */ -void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos); - -/** - * Obtain the first instruction in a basic block. - * - * The returned LLVMValueRef corresponds to a llvm::Instruction - * instance. - */ -LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB); - -/** - * Obtain the last instruction in a basic block. - * - * The returned LLVMValueRef corresponds to an LLVM:Instruction. - */ -LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueInstruction Instructions - * - * Functions in this group relate to the inspection and manipulation of - * individual instructions. - * - * In the C++ API, an instruction is modeled by llvm::Instruction. This - * class has a large number of descendents. llvm::Instruction is a - * llvm::Value and in the C API, instructions are modeled by - * LLVMValueRef. - * - * This group also contains sub-groups which operate on specific - * llvm::Instruction types, e.g. llvm::CallInst. - * - * @{ - */ - -/** - * Determine whether an instruction has any metadata attached. - */ -int LLVMHasMetadata(LLVMValueRef Val); - -/** - * Return metadata associated with an instruction value. - */ -LLVMValueRef LLVMGetMetadata(LLVMValueRef Val, unsigned KindID); - -/** - * Set metadata associated with an instruction value. - */ -void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID, LLVMValueRef Node); - -/** - * Obtain the basic block to which an instruction belongs. - * - * @see llvm::Instruction::getParent() - */ -LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst); - -/** - * Obtain the instruction that occurs after the one specified. - * - * The next instruction will be from the same basic block. - * - * If this is the last instruction in a basic block, NULL will be - * returned. - */ -LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst); - -/** - * Obtain the instruction that occurred before this one. - * - * If the instruction is the first instruction in a basic block, NULL - * will be returned. - */ -LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst); - -/** - * Remove and delete an instruction. - * - * The instruction specified is removed from its containing building - * block but is kept alive. - * - * @see llvm::Instruction::removeFromParent() - */ -void LLVMInstructionRemoveFromParent(LLVMValueRef Inst); - -/** - * Remove and delete an instruction. - * - * The instruction specified is removed from its containing building - * block and then deleted. - * - * @see llvm::Instruction::eraseFromParent() - */ -void LLVMInstructionEraseFromParent(LLVMValueRef Inst); - -/** - * Obtain the code opcode for an individual instruction. - * - * @see llvm::Instruction::getOpCode() - */ -LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst); - -/** - * Obtain the predicate of an instruction. - * - * This is only valid for instructions that correspond to llvm::ICmpInst - * or llvm::ConstantExpr whose opcode is llvm::Instruction::ICmp. - * - * @see llvm::ICmpInst::getPredicate() - */ -LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst); - -/** - * Obtain the float predicate of an instruction. - * - * This is only valid for instructions that correspond to llvm::FCmpInst - * or llvm::ConstantExpr whose opcode is llvm::Instruction::FCmp. - * - * @see llvm::FCmpInst::getPredicate() - */ -LLVMRealPredicate LLVMGetFCmpPredicate(LLVMValueRef Inst); - -/** - * Create a copy of 'this' instruction that is identical in all ways - * except the following: - * * The instruction has no parent - * * The instruction has no name - * - * @see llvm::Instruction::clone() - */ -LLVMValueRef LLVMInstructionClone(LLVMValueRef Inst); - -/** - * @defgroup LLVMCCoreValueInstructionCall Call Sites and Invocations - * - * Functions in this group apply to instructions that refer to call - * sites and invocations. These correspond to C++ types in the - * llvm::CallInst class tree. - * - * @{ - */ - -/** - * Obtain the argument count for a call instruction. - * - * This expects an LLVMValueRef that corresponds to a llvm::CallInst or - * llvm::InvokeInst. - * - * @see llvm::CallInst::getNumArgOperands() - * @see llvm::InvokeInst::getNumArgOperands() - */ -unsigned LLVMGetNumArgOperands(LLVMValueRef Instr); - -/** - * Set the calling convention for a call instruction. - * - * This expects an LLVMValueRef that corresponds to a llvm::CallInst or - * llvm::InvokeInst. - * - * @see llvm::CallInst::setCallingConv() - * @see llvm::InvokeInst::setCallingConv() - */ -void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC); - -/** - * Obtain the calling convention for a call instruction. - * - * This is the opposite of LLVMSetInstructionCallConv(). Reads its - * usage. - * - * @see LLVMSetInstructionCallConv() - */ -unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr); - -void LLVMAddInstrAttribute(LLVMValueRef Instr, unsigned index, LLVMAttribute); -void LLVMRemoveInstrAttribute(LLVMValueRef Instr, unsigned index, - LLVMAttribute); -void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index, - unsigned Align); - -void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, - LLVMAttributeRef A); -unsigned LLVMGetCallSiteAttributeCount(LLVMValueRef C, LLVMAttributeIndex Idx); -void LLVMGetCallSiteAttributes(LLVMValueRef C, LLVMAttributeIndex Idx, - LLVMAttributeRef *Attrs); -LLVMAttributeRef LLVMGetCallSiteEnumAttribute(LLVMValueRef C, - LLVMAttributeIndex Idx, - unsigned KindID); -LLVMAttributeRef LLVMGetCallSiteStringAttribute(LLVMValueRef C, - LLVMAttributeIndex Idx, - const char *K, unsigned KLen); -void LLVMRemoveCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, - unsigned KindID); -void LLVMRemoveCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, - const char *K, unsigned KLen); - -/** - * Obtain the pointer to the function invoked by this instruction. - * - * This expects an LLVMValueRef that corresponds to a llvm::CallInst or - * llvm::InvokeInst. - * - * @see llvm::CallInst::getCalledValue() - * @see llvm::InvokeInst::getCalledValue() - */ -LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr); - -/** - * Obtain whether a call instruction is a tail call. - * - * This only works on llvm::CallInst instructions. - * - * @see llvm::CallInst::isTailCall() - */ -LLVMBool LLVMIsTailCall(LLVMValueRef CallInst); - -/** - * Set whether a call instruction is a tail call. - * - * This only works on llvm::CallInst instructions. - * - * @see llvm::CallInst::setTailCall() - */ -void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall); - -/** - * Return the normal destination basic block. - * - * This only works on llvm::InvokeInst instructions. - * - * @see llvm::InvokeInst::getNormalDest() - */ -LLVMBasicBlockRef LLVMGetNormalDest(LLVMValueRef InvokeInst); - -/** - * Return the unwind destination basic block. - * - * This only works on llvm::InvokeInst instructions. - * - * @see llvm::InvokeInst::getUnwindDest() - */ -LLVMBasicBlockRef LLVMGetUnwindDest(LLVMValueRef InvokeInst); - -/** - * Set the normal destination basic block. - * - * This only works on llvm::InvokeInst instructions. - * - * @see llvm::InvokeInst::setNormalDest() - */ -void LLVMSetNormalDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B); - -/** - * Set the unwind destination basic block. - * - * This only works on llvm::InvokeInst instructions. - * - * @see llvm::InvokeInst::setUnwindDest() - */ -void LLVMSetUnwindDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueInstructionTerminator Terminators - * - * Functions in this group only apply to instructions that map to - * llvm::TerminatorInst instances. - * - * @{ - */ - -/** - * Return the number of successors that this terminator has. - * - * @see llvm::TerminatorInst::getNumSuccessors - */ -unsigned LLVMGetNumSuccessors(LLVMValueRef Term); - -/** - * Return the specified successor. - * - * @see llvm::TerminatorInst::getSuccessor - */ -LLVMBasicBlockRef LLVMGetSuccessor(LLVMValueRef Term, unsigned i); - -/** - * Update the specified successor to point at the provided block. - * - * @see llvm::TerminatorInst::setSuccessor - */ -void LLVMSetSuccessor(LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block); - -/** - * Return if a branch is conditional. - * - * This only works on llvm::BranchInst instructions. - * - * @see llvm::BranchInst::isConditional - */ -LLVMBool LLVMIsConditional(LLVMValueRef Branch); - -/** - * Return the condition of a branch instruction. - * - * This only works on llvm::BranchInst instructions. - * - * @see llvm::BranchInst::getCondition - */ -LLVMValueRef LLVMGetCondition(LLVMValueRef Branch); - -/** - * Set the condition of a branch instruction. - * - * This only works on llvm::BranchInst instructions. - * - * @see llvm::BranchInst::setCondition - */ -void LLVMSetCondition(LLVMValueRef Branch, LLVMValueRef Cond); - -/** - * Obtain the default destination basic block of a switch instruction. - * - * This only works on llvm::SwitchInst instructions. - * - * @see llvm::SwitchInst::getDefaultDest() - */ -LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef SwitchInstr); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueInstructionAlloca Allocas - * - * Functions in this group only apply to instructions that map to - * llvm::AllocaInst instances. - * - * @{ - */ - -/** - * Obtain the type that is being allocated by the alloca instruction. - */ -LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueInstructionGetElementPointer GEPs - * - * Functions in this group only apply to instructions that map to - * llvm::GetElementPtrInst instances. - * - * @{ - */ - -/** - * Check whether the given GEP instruction is inbounds. - */ -LLVMBool LLVMIsInBounds(LLVMValueRef GEP); - -/** - * Set the given GEP instruction to be inbounds or not. - */ -void LLVMSetIsInBounds(LLVMValueRef GEP, LLVMBool InBounds); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueInstructionPHINode PHI Nodes - * - * Functions in this group only apply to instructions that map to - * llvm::PHINode instances. - * - * @{ - */ - -/** - * Add an incoming value to the end of a PHI list. - */ -void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, - LLVMBasicBlockRef *IncomingBlocks, unsigned Count); - -/** - * Obtain the number of incoming basic blocks to a PHI node. - */ -unsigned LLVMCountIncoming(LLVMValueRef PhiNode); - -/** - * Obtain an incoming value to a PHI node as an LLVMValueRef. - */ -LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index); - -/** - * Obtain an incoming value to a PHI node as an LLVMBasicBlockRef. - */ -LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreValueInstructionExtractValue ExtractValue - * @defgroup LLVMCCoreValueInstructionInsertValue InsertValue - * - * Functions in this group only apply to instructions that map to - * llvm::ExtractValue and llvm::InsertValue instances. - * - * @{ - */ - -/** - * Obtain the number of indices. - * NB: This also works on GEP. - */ -unsigned LLVMGetNumIndices(LLVMValueRef Inst); - -/** - * Obtain the indices as an array. - */ -const unsigned *LLVMGetIndices(LLVMValueRef Inst); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreInstructionBuilder Instruction Builders - * - * An instruction builder represents a point within a basic block and is - * the exclusive means of building instructions using the C interface. - * - * @{ - */ - -LLVMBuilderRef LLVMCreateBuilderInContext(LLVMContextRef C); -LLVMBuilderRef LLVMCreateBuilder(void); -void LLVMPositionBuilder(LLVMBuilderRef Builder, LLVMBasicBlockRef Block, - LLVMValueRef Instr); -void LLVMPositionBuilderBefore(LLVMBuilderRef Builder, LLVMValueRef Instr); -void LLVMPositionBuilderAtEnd(LLVMBuilderRef Builder, LLVMBasicBlockRef Block); -LLVMBasicBlockRef LLVMGetInsertBlock(LLVMBuilderRef Builder); -void LLVMClearInsertionPosition(LLVMBuilderRef Builder); -void LLVMInsertIntoBuilder(LLVMBuilderRef Builder, LLVMValueRef Instr); -void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr, - const char *Name); -void LLVMDisposeBuilder(LLVMBuilderRef Builder); - -/* Metadata */ -void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L); -LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder); -void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst); - -/* Terminators */ -LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef); -LLVMValueRef LLVMBuildRet(LLVMBuilderRef, LLVMValueRef V); -LLVMValueRef LLVMBuildAggregateRet(LLVMBuilderRef, LLVMValueRef *RetVals, - unsigned N); -LLVMValueRef LLVMBuildBr(LLVMBuilderRef, LLVMBasicBlockRef Dest); -LLVMValueRef LLVMBuildCondBr(LLVMBuilderRef, LLVMValueRef If, - LLVMBasicBlockRef Then, LLVMBasicBlockRef Else); -LLVMValueRef LLVMBuildSwitch(LLVMBuilderRef, LLVMValueRef V, - LLVMBasicBlockRef Else, unsigned NumCases); -LLVMValueRef LLVMBuildIndirectBr(LLVMBuilderRef B, LLVMValueRef Addr, - unsigned NumDests); -LLVMValueRef LLVMBuildInvoke(LLVMBuilderRef, LLVMValueRef Fn, - LLVMValueRef *Args, unsigned NumArgs, - LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, - const char *Name); -LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty, - LLVMValueRef PersFn, unsigned NumClauses, - const char *Name); -LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn); -LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef); - -/* Add a case to the switch instruction */ -void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal, - LLVMBasicBlockRef Dest); - -/* Add a destination to the indirectbr instruction */ -void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest); - -/* Get the number of clauses on the landingpad instruction */ -unsigned LLVMGetNumClauses(LLVMValueRef LandingPad); - -/* Get the value of the clause at idnex Idx on the landingpad instruction */ -LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx); - -/* Add a catch or filter clause to the landingpad instruction */ -void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal); - -/* Get the 'cleanup' flag in the landingpad instruction */ -LLVMBool LLVMIsCleanup(LLVMValueRef LandingPad); - -/* Set the 'cleanup' flag in the landingpad instruction */ -void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val); - -/* Arithmetic */ -LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNSWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNUWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNSWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNUWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNSWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNUWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildURem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildSRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildShl(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildLShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildAShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildAnd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildOr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildXor(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op, - LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name); -LLVMValueRef LLVMBuildNSWNeg(LLVMBuilderRef B, LLVMValueRef V, - const char *Name); -LLVMValueRef LLVMBuildNUWNeg(LLVMBuilderRef B, LLVMValueRef V, - const char *Name); -LLVMValueRef LLVMBuildFNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name); -LLVMValueRef LLVMBuildNot(LLVMBuilderRef, LLVMValueRef V, const char *Name); - -/* Memory */ -LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name); -LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef, LLVMTypeRef Ty, - LLVMValueRef Val, const char *Name); -LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name); -LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef, LLVMTypeRef Ty, - LLVMValueRef Val, const char *Name); -LLVMValueRef LLVMBuildFree(LLVMBuilderRef, LLVMValueRef PointerVal); -LLVMValueRef LLVMBuildLoad(LLVMBuilderRef, LLVMValueRef PointerVal, - const char *Name); -LLVMValueRef LLVMBuildStore(LLVMBuilderRef, LLVMValueRef Val, LLVMValueRef Ptr); -LLVMValueRef LLVMBuildGEP(LLVMBuilderRef B, LLVMValueRef Pointer, - LLVMValueRef *Indices, unsigned NumIndices, - const char *Name); -LLVMValueRef LLVMBuildInBoundsGEP(LLVMBuilderRef B, LLVMValueRef Pointer, - LLVMValueRef *Indices, unsigned NumIndices, - const char *Name); -LLVMValueRef LLVMBuildStructGEP(LLVMBuilderRef B, LLVMValueRef Pointer, - unsigned Idx, const char *Name); -LLVMValueRef LLVMBuildGlobalString(LLVMBuilderRef B, const char *Str, - const char *Name); -LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str, - const char *Name); -LLVMBool LLVMGetVolatile(LLVMValueRef MemoryAccessInst); -void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile); -LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemoryAccessInst); -void LLVMSetOrdering(LLVMValueRef MemoryAccessInst, LLVMAtomicOrdering Ordering); - -/* Casts */ -LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildZExt(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildSExt(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPToUI(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPToSI(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildUIToFP(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildSIToFP(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPTrunc(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPExt(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildPtrToInt(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildIntToPtr(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildBitCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildAddrSpaceCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildSExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildTruncOrBitCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildCast(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef, LLVMValueRef Val, /*Signed cast!*/ - LLVMTypeRef DestTy, const char *Name); -LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef, LLVMValueRef Val, - LLVMTypeRef DestTy, const char *Name); - -/* Comparisons */ -LLVMValueRef LLVMBuildICmp(LLVMBuilderRef, LLVMIntPredicate Op, - LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); -LLVMValueRef LLVMBuildFCmp(LLVMBuilderRef, LLVMRealPredicate Op, - LLVMValueRef LHS, LLVMValueRef RHS, - const char *Name); - -/* Miscellaneous instructions */ -LLVMValueRef LLVMBuildPhi(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name); -LLVMValueRef LLVMBuildCall(LLVMBuilderRef, LLVMValueRef Fn, - LLVMValueRef *Args, unsigned NumArgs, - const char *Name); -LLVMValueRef LLVMBuildSelect(LLVMBuilderRef, LLVMValueRef If, - LLVMValueRef Then, LLVMValueRef Else, - const char *Name); -LLVMValueRef LLVMBuildVAArg(LLVMBuilderRef, LLVMValueRef List, LLVMTypeRef Ty, - const char *Name); -LLVMValueRef LLVMBuildExtractElement(LLVMBuilderRef, LLVMValueRef VecVal, - LLVMValueRef Index, const char *Name); -LLVMValueRef LLVMBuildInsertElement(LLVMBuilderRef, LLVMValueRef VecVal, - LLVMValueRef EltVal, LLVMValueRef Index, - const char *Name); -LLVMValueRef LLVMBuildShuffleVector(LLVMBuilderRef, LLVMValueRef V1, - LLVMValueRef V2, LLVMValueRef Mask, - const char *Name); -LLVMValueRef LLVMBuildExtractValue(LLVMBuilderRef, LLVMValueRef AggVal, - unsigned Index, const char *Name); -LLVMValueRef LLVMBuildInsertValue(LLVMBuilderRef, LLVMValueRef AggVal, - LLVMValueRef EltVal, unsigned Index, - const char *Name); - -LLVMValueRef LLVMBuildIsNull(LLVMBuilderRef, LLVMValueRef Val, - const char *Name); -LLVMValueRef LLVMBuildIsNotNull(LLVMBuilderRef, LLVMValueRef Val, - const char *Name); -LLVMValueRef LLVMBuildPtrDiff(LLVMBuilderRef, LLVMValueRef LHS, - LLVMValueRef RHS, const char *Name); -LLVMValueRef LLVMBuildFence(LLVMBuilderRef B, LLVMAtomicOrdering ordering, - LLVMBool singleThread, const char *Name); -LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B, LLVMAtomicRMWBinOp op, - LLVMValueRef PTR, LLVMValueRef Val, - LLVMAtomicOrdering ordering, - LLVMBool singleThread); -LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr, - LLVMValueRef Cmp, LLVMValueRef New, - LLVMAtomicOrdering SuccessOrdering, - LLVMAtomicOrdering FailureOrdering, - LLVMBool SingleThread); - -LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst); -void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread); - -LLVMAtomicOrdering LLVMGetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst); -void LLVMSetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst, - LLVMAtomicOrdering Ordering); -LLVMAtomicOrdering LLVMGetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst); -void LLVMSetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst, - LLVMAtomicOrdering Ordering); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreModuleProvider Module Providers - * - * @{ - */ - -/** - * Changes the type of M so it can be passed to FunctionPassManagers and the - * JIT. They take ModuleProviders for historical reasons. - */ -LLVMModuleProviderRef -LLVMCreateModuleProviderForExistingModule(LLVMModuleRef M); - -/** - * Destroys the module M. - */ -void LLVMDisposeModuleProvider(LLVMModuleProviderRef M); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreMemoryBuffers Memory Buffers - * - * @{ - */ - -LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(const char *Path, - LLVMMemoryBufferRef *OutMemBuf, - char **OutMessage); -LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, - char **OutMessage); -LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(const char *InputData, - size_t InputDataLength, - const char *BufferName, - LLVMBool RequiresNullTerminator); -LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputData, - size_t InputDataLength, - const char *BufferName); -const char *LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf); -size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf); -void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf); - -/** - * @} - */ - -/** - * @defgroup LLVMCCorePassRegistry Pass Registry - * - * @{ - */ - -/** Return the global pass registry, for use with initialization functions. - @see llvm::PassRegistry::getPassRegistry */ -LLVMPassRegistryRef LLVMGetGlobalPassRegistry(void); - -/** - * @} - */ - -/** - * @defgroup LLVMCCorePassManagers Pass Managers - * - * @{ - */ - -/** Constructs a new whole-module pass pipeline. This type of pipeline is - suitable for link-time optimization and whole-module transformations. - @see llvm::PassManager::PassManager */ -LLVMPassManagerRef LLVMCreatePassManager(void); - -/** Constructs a new function-by-function pass pipeline over the module - provider. It does not take ownership of the module provider. This type of - pipeline is suitable for code generation and JIT compilation tasks. - @see llvm::FunctionPassManager::FunctionPassManager */ -LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M); - -/** Deprecated: Use LLVMCreateFunctionPassManagerForModule instead. */ -LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef MP); - -/** Initializes, executes on the provided module, and finalizes all of the - passes scheduled in the pass manager. Returns 1 if any of the passes - modified the module, 0 otherwise. - @see llvm::PassManager::run(Module&) */ -LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M); - -/** Initializes all of the function passes scheduled in the function pass - manager. Returns 1 if any of the passes modified the module, 0 otherwise. - @see llvm::FunctionPassManager::doInitialization */ -LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM); - -/** Executes all of the function passes scheduled in the function pass manager - on the provided function. Returns 1 if any of the passes modified the - function, false otherwise. - @see llvm::FunctionPassManager::run(Function&) */ -LLVMBool LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F); - -/** Finalizes all of the function passes scheduled in in the function pass - manager. Returns 1 if any of the passes modified the module, 0 otherwise. - @see llvm::FunctionPassManager::doFinalization */ -LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM); - -/** Frees the memory of a pass pipeline. For function pipelines, does not free - the module provider. - @see llvm::PassManagerBase::~PassManagerBase. */ -void LLVMDisposePassManager(LLVMPassManagerRef PM); - -/** - * @} - */ - -/** - * @defgroup LLVMCCoreThreading Threading - * - * Handle the structures needed to make LLVM safe for multithreading. - * - * @{ - */ - -/** Deprecated: Multi-threading can only be enabled/disabled with the compile - time define LLVM_ENABLE_THREADS. This function always returns - LLVMIsMultithreaded(). */ -LLVMBool LLVMStartMultithreaded(void); - -/** Deprecated: Multi-threading can only be enabled/disabled with the compile - time define LLVM_ENABLE_THREADS. */ -void LLVMStopMultithreaded(void); - -/** Check whether LLVM is executing in thread-safe mode or not. - @see llvm::llvm_is_multithreaded */ -LLVMBool LLVMIsMultithreaded(void); - -/** - * @} - */ - -/** - * @} - */ - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* LLVM_C_CORE_H */ diff --git a/llvm/include/llvm-c/Disassembler.h b/llvm/include/llvm-c/Disassembler.h deleted file mode 100644 index d6f92e50..00000000 --- a/llvm/include/llvm-c/Disassembler.h +++ /dev/null @@ -1,258 +0,0 @@ -/*===-- llvm-c/Disassembler.h - Disassembler Public C Interface ---*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header provides a public interface to a disassembler library. *| -|* LLVM provides an implementation of this interface. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_DISASSEMBLER_H -#define LLVM_C_DISASSEMBLER_H - -#include "llvm/Support/DataTypes.h" -#ifdef __cplusplus -#include -#else -#include -#endif - -/** - * @defgroup LLVMCDisassembler Disassembler - * @ingroup LLVMC - * - * @{ - */ - -/** - * An opaque reference to a disassembler context. - */ -typedef void *LLVMDisasmContextRef; - -/** - * The type for the operand information call back function. This is called to - * get the symbolic information for an operand of an instruction. Typically - * this is from the relocation information, symbol table, etc. That block of - * information is saved when the disassembler context is created and passed to - * the call back in the DisInfo parameter. The instruction containing operand - * is at the PC parameter. For some instruction sets, there can be more than - * one operand with symbolic information. To determine the symbolic operand - * information for each operand, the bytes for the specific operand in the - * instruction are specified by the Offset parameter and its byte widith is the - * size parameter. For instructions sets with fixed widths and one symbolic - * operand per instruction, the Offset parameter will be zero and Size parameter - * will be the instruction width. The information is returned in TagBuf and is - * Triple specific with its specific information defined by the value of - * TagType for that Triple. If symbolic information is returned the function - * returns 1, otherwise it returns 0. - */ -typedef int (*LLVMOpInfoCallback)(void *DisInfo, uint64_t PC, - uint64_t Offset, uint64_t Size, - int TagType, void *TagBuf); - -/** - * The initial support in LLVM MC for the most general form of a relocatable - * expression is "AddSymbol - SubtractSymbol + Offset". For some Darwin targets - * this full form is encoded in the relocation information so that AddSymbol and - * SubtractSymbol can be link edited independent of each other. Many other - * platforms only allow a relocatable expression of the form AddSymbol + Offset - * to be encoded. - * - * The LLVMOpInfoCallback() for the TagType value of 1 uses the struct - * LLVMOpInfo1. The value of the relocatable expression for the operand, - * including any PC adjustment, is passed in to the call back in the Value - * field. The symbolic information about the operand is returned using all - * the fields of the structure with the Offset of the relocatable expression - * returned in the Value field. It is possible that some symbols in the - * relocatable expression were assembly temporary symbols, for example - * "Ldata - LpicBase + constant", and only the Values of the symbols without - * symbol names are present in the relocation information. The VariantKind - * type is one of the Target specific #defines below and is used to print - * operands like "_foo@GOT", ":lower16:_foo", etc. - */ -struct LLVMOpInfoSymbol1 { - uint64_t Present; /* 1 if this symbol is present */ - const char *Name; /* symbol name if not NULL */ - uint64_t Value; /* symbol value if name is NULL */ -}; - -struct LLVMOpInfo1 { - struct LLVMOpInfoSymbol1 AddSymbol; - struct LLVMOpInfoSymbol1 SubtractSymbol; - uint64_t Value; - uint64_t VariantKind; -}; - -/** - * The operand VariantKinds for symbolic disassembly. - */ -#define LLVMDisassembler_VariantKind_None 0 /* all targets */ - -/** - * The ARM target VariantKinds. - */ -#define LLVMDisassembler_VariantKind_ARM_HI16 1 /* :upper16: */ -#define LLVMDisassembler_VariantKind_ARM_LO16 2 /* :lower16: */ - -/** - * The ARM64 target VariantKinds. - */ -#define LLVMDisassembler_VariantKind_ARM64_PAGE 1 /* @page */ -#define LLVMDisassembler_VariantKind_ARM64_PAGEOFF 2 /* @pageoff */ -#define LLVMDisassembler_VariantKind_ARM64_GOTPAGE 3 /* @gotpage */ -#define LLVMDisassembler_VariantKind_ARM64_GOTPAGEOFF 4 /* @gotpageoff */ -#define LLVMDisassembler_VariantKind_ARM64_TLVP 5 /* @tvlppage */ -#define LLVMDisassembler_VariantKind_ARM64_TLVOFF 6 /* @tvlppageoff */ - -/** - * The type for the symbol lookup function. This may be called by the - * disassembler for things like adding a comment for a PC plus a constant - * offset load instruction to use a symbol name instead of a load address value. - * It is passed the block information is saved when the disassembler context is - * created and the ReferenceValue to look up as a symbol. If no symbol is found - * for the ReferenceValue NULL is returned. The ReferenceType of the - * instruction is passed indirectly as is the PC of the instruction in - * ReferencePC. If the output reference can be determined its type is returned - * indirectly in ReferenceType along with ReferenceName if any, or that is set - * to NULL. - */ -typedef const char *(*LLVMSymbolLookupCallback)(void *DisInfo, - uint64_t ReferenceValue, - uint64_t *ReferenceType, - uint64_t ReferencePC, - const char **ReferenceName); -/** - * The reference types on input and output. - */ -/* No input reference type or no output reference type. */ -#define LLVMDisassembler_ReferenceType_InOut_None 0 - -/* The input reference is from a branch instruction. */ -#define LLVMDisassembler_ReferenceType_In_Branch 1 -/* The input reference is from a PC relative load instruction. */ -#define LLVMDisassembler_ReferenceType_In_PCrel_Load 2 - -/* The input reference is from an ARM64::ADRP instruction. */ -#define LLVMDisassembler_ReferenceType_In_ARM64_ADRP 0x100000001 -/* The input reference is from an ARM64::ADDXri instruction. */ -#define LLVMDisassembler_ReferenceType_In_ARM64_ADDXri 0x100000002 -/* The input reference is from an ARM64::LDRXui instruction. */ -#define LLVMDisassembler_ReferenceType_In_ARM64_LDRXui 0x100000003 -/* The input reference is from an ARM64::LDRXl instruction. */ -#define LLVMDisassembler_ReferenceType_In_ARM64_LDRXl 0x100000004 -/* The input reference is from an ARM64::ADR instruction. */ -#define LLVMDisassembler_ReferenceType_In_ARM64_ADR 0x100000005 - -/* The output reference is to as symbol stub. */ -#define LLVMDisassembler_ReferenceType_Out_SymbolStub 1 -/* The output reference is to a symbol address in a literal pool. */ -#define LLVMDisassembler_ReferenceType_Out_LitPool_SymAddr 2 -/* The output reference is to a cstring address in a literal pool. */ -#define LLVMDisassembler_ReferenceType_Out_LitPool_CstrAddr 3 - -/* The output reference is to a Objective-C CoreFoundation string. */ -#define LLVMDisassembler_ReferenceType_Out_Objc_CFString_Ref 4 -/* The output reference is to a Objective-C message. */ -#define LLVMDisassembler_ReferenceType_Out_Objc_Message 5 -/* The output reference is to a Objective-C message ref. */ -#define LLVMDisassembler_ReferenceType_Out_Objc_Message_Ref 6 -/* The output reference is to a Objective-C selector ref. */ -#define LLVMDisassembler_ReferenceType_Out_Objc_Selector_Ref 7 -/* The output reference is to a Objective-C class ref. */ -#define LLVMDisassembler_ReferenceType_Out_Objc_Class_Ref 8 - -/* The output reference is to a C++ symbol name. */ -#define LLVMDisassembler_ReferenceType_DeMangled_Name 9 - -#ifdef __cplusplus -extern "C" { -#endif /* !defined(__cplusplus) */ - -/** - * Create a disassembler for the TripleName. Symbolic disassembly is supported - * by passing a block of information in the DisInfo parameter and specifying the - * TagType and callback functions as described above. These can all be passed - * as NULL. If successful, this returns a disassembler context. If not, it - * returns NULL. This function is equivalent to calling - * LLVMCreateDisasmCPUFeatures() with an empty CPU name and feature set. - */ -LLVMDisasmContextRef LLVMCreateDisasm(const char *TripleName, void *DisInfo, - int TagType, LLVMOpInfoCallback GetOpInfo, - LLVMSymbolLookupCallback SymbolLookUp); - -/** - * Create a disassembler for the TripleName and a specific CPU. Symbolic - * disassembly is supported by passing a block of information in the DisInfo - * parameter and specifying the TagType and callback functions as described - * above. These can all be passed * as NULL. If successful, this returns a - * disassembler context. If not, it returns NULL. This function is equivalent - * to calling LLVMCreateDisasmCPUFeatures() with an empty feature set. - */ -LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU, - void *DisInfo, int TagType, - LLVMOpInfoCallback GetOpInfo, - LLVMSymbolLookupCallback SymbolLookUp); - -/** - * Create a disassembler for the TripleName, a specific CPU and specific feature - * string. Symbolic disassembly is supported by passing a block of information - * in the DisInfo parameter and specifying the TagType and callback functions as - * described above. These can all be passed * as NULL. If successful, this - * returns a disassembler context. If not, it returns NULL. - */ -LLVMDisasmContextRef -LLVMCreateDisasmCPUFeatures(const char *Triple, const char *CPU, - const char *Features, void *DisInfo, int TagType, - LLVMOpInfoCallback GetOpInfo, - LLVMSymbolLookupCallback SymbolLookUp); - -/** - * Set the disassembler's options. Returns 1 if it can set the Options and 0 - * otherwise. - */ -int LLVMSetDisasmOptions(LLVMDisasmContextRef DC, uint64_t Options); - -/* The option to produce marked up assembly. */ -#define LLVMDisassembler_Option_UseMarkup 1 -/* The option to print immediates as hex. */ -#define LLVMDisassembler_Option_PrintImmHex 2 -/* The option use the other assembler printer variant */ -#define LLVMDisassembler_Option_AsmPrinterVariant 4 -/* The option to set comment on instructions */ -#define LLVMDisassembler_Option_SetInstrComments 8 - /* The option to print latency information alongside instructions */ -#define LLVMDisassembler_Option_PrintLatency 16 - -/** - * Dispose of a disassembler context. - */ -void LLVMDisasmDispose(LLVMDisasmContextRef DC); - -/** - * Disassemble a single instruction using the disassembler context specified in - * the parameter DC. The bytes of the instruction are specified in the - * parameter Bytes, and contains at least BytesSize number of bytes. The - * instruction is at the address specified by the PC parameter. If a valid - * instruction can be disassembled, its string is returned indirectly in - * OutString whose size is specified in the parameter OutStringSize. This - * function returns the number of bytes in the instruction or zero if there was - * no valid instruction. - */ -size_t LLVMDisasmInstruction(LLVMDisasmContextRef DC, uint8_t *Bytes, - uint64_t BytesSize, uint64_t PC, - char *OutString, size_t OutStringSize); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif /* !defined(__cplusplus) */ - -#endif /* LLVM_C_DISASSEMBLER_H */ diff --git a/llvm/include/llvm-c/ErrorHandling.h b/llvm/include/llvm-c/ErrorHandling.h deleted file mode 100644 index 2059b3ae..00000000 --- a/llvm/include/llvm-c/ErrorHandling.h +++ /dev/null @@ -1,49 +0,0 @@ -/*===-- llvm-c/ErrorHandling.h - Error Handling C Interface -------*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file defines the C interface to LLVM's error handling mechanism. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_ERROR_HANDLING_H -#define LLVM_C_ERROR_HANDLING_H - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void (*LLVMFatalErrorHandler)(const char *Reason); - -/** - * Install a fatal error handler. By default, if LLVM detects a fatal error, it - * will call exit(1). This may not be appropriate in many contexts. For example, - * doing exit(1) will bypass many crash reporting/tracing system tools. This - * function allows you to install a callback that will be invoked prior to the - * call to exit(1). - */ -void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler); - -/** - * Reset the fatal error handler. This resets LLVM's fatal error handling - * behavior to the default. - */ -void LLVMResetFatalErrorHandler(void); - -/** - * Enable LLVM's built-in stack trace code. This intercepts the OS's crash - * signals and prints which component of LLVM you were in at the time if the - * crash. - */ -void LLVMEnablePrettyStackTrace(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/ExecutionEngine.h b/llvm/include/llvm-c/ExecutionEngine.h deleted file mode 100644 index b72a91a8..00000000 --- a/llvm/include/llvm-c/ExecutionEngine.h +++ /dev/null @@ -1,193 +0,0 @@ -/*===-- llvm-c/ExecutionEngine.h - ExecutionEngine Lib C Iface --*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMExecutionEngine.o, which *| -|* implements various analyses of the LLVM IR. *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_EXECUTIONENGINE_H -#define LLVM_C_EXECUTIONENGINE_H - -#include "llvm-c/Types.h" -#include "llvm-c/Target.h" -#include "llvm-c/TargetMachine.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCExecutionEngine Execution Engine - * @ingroup LLVMC - * - * @{ - */ - -void LLVMLinkInMCJIT(void); -void LLVMLinkInInterpreter(void); - -typedef struct LLVMOpaqueGenericValue *LLVMGenericValueRef; -typedef struct LLVMOpaqueExecutionEngine *LLVMExecutionEngineRef; -typedef struct LLVMOpaqueMCJITMemoryManager *LLVMMCJITMemoryManagerRef; - -struct LLVMMCJITCompilerOptions { - unsigned OptLevel; - LLVMCodeModel CodeModel; - LLVMBool NoFramePointerElim; - LLVMBool EnableFastISel; - LLVMMCJITMemoryManagerRef MCJMM; -}; - -/*===-- Operations on generic values --------------------------------------===*/ - -LLVMGenericValueRef LLVMCreateGenericValueOfInt(LLVMTypeRef Ty, - unsigned long long N, - LLVMBool IsSigned); - -LLVMGenericValueRef LLVMCreateGenericValueOfPointer(void *P); - -LLVMGenericValueRef LLVMCreateGenericValueOfFloat(LLVMTypeRef Ty, double N); - -unsigned LLVMGenericValueIntWidth(LLVMGenericValueRef GenValRef); - -unsigned long long LLVMGenericValueToInt(LLVMGenericValueRef GenVal, - LLVMBool IsSigned); - -void *LLVMGenericValueToPointer(LLVMGenericValueRef GenVal); - -double LLVMGenericValueToFloat(LLVMTypeRef TyRef, LLVMGenericValueRef GenVal); - -void LLVMDisposeGenericValue(LLVMGenericValueRef GenVal); - -/*===-- Operations on execution engines -----------------------------------===*/ - -LLVMBool LLVMCreateExecutionEngineForModule(LLVMExecutionEngineRef *OutEE, - LLVMModuleRef M, - char **OutError); - -LLVMBool LLVMCreateInterpreterForModule(LLVMExecutionEngineRef *OutInterp, - LLVMModuleRef M, - char **OutError); - -LLVMBool LLVMCreateJITCompilerForModule(LLVMExecutionEngineRef *OutJIT, - LLVMModuleRef M, - unsigned OptLevel, - char **OutError); - -void LLVMInitializeMCJITCompilerOptions( - struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions); - -/** - * Create an MCJIT execution engine for a module, with the given options. It is - * the responsibility of the caller to ensure that all fields in Options up to - * the given SizeOfOptions are initialized. It is correct to pass a smaller - * value of SizeOfOptions that omits some fields. The canonical way of using - * this is: - * - * LLVMMCJITCompilerOptions options; - * LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); - * ... fill in those options you care about - * LLVMCreateMCJITCompilerForModule(&jit, mod, &options, sizeof(options), - * &error); - * - * Note that this is also correct, though possibly suboptimal: - * - * LLVMCreateMCJITCompilerForModule(&jit, mod, 0, 0, &error); - */ -LLVMBool LLVMCreateMCJITCompilerForModule( - LLVMExecutionEngineRef *OutJIT, LLVMModuleRef M, - struct LLVMMCJITCompilerOptions *Options, size_t SizeOfOptions, - char **OutError); - -void LLVMDisposeExecutionEngine(LLVMExecutionEngineRef EE); - -void LLVMRunStaticConstructors(LLVMExecutionEngineRef EE); - -void LLVMRunStaticDestructors(LLVMExecutionEngineRef EE); - -int LLVMRunFunctionAsMain(LLVMExecutionEngineRef EE, LLVMValueRef F, - unsigned ArgC, const char * const *ArgV, - const char * const *EnvP); - -LLVMGenericValueRef LLVMRunFunction(LLVMExecutionEngineRef EE, LLVMValueRef F, - unsigned NumArgs, - LLVMGenericValueRef *Args); - -void LLVMFreeMachineCodeForFunction(LLVMExecutionEngineRef EE, LLVMValueRef F); - -void LLVMAddModule(LLVMExecutionEngineRef EE, LLVMModuleRef M); - -LLVMBool LLVMRemoveModule(LLVMExecutionEngineRef EE, LLVMModuleRef M, - LLVMModuleRef *OutMod, char **OutError); - -LLVMBool LLVMFindFunction(LLVMExecutionEngineRef EE, const char *Name, - LLVMValueRef *OutFn); - -void *LLVMRecompileAndRelinkFunction(LLVMExecutionEngineRef EE, - LLVMValueRef Fn); - -LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE); -LLVMTargetMachineRef -LLVMGetExecutionEngineTargetMachine(LLVMExecutionEngineRef EE); - -void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global, - void* Addr); - -void *LLVMGetPointerToGlobal(LLVMExecutionEngineRef EE, LLVMValueRef Global); - -uint64_t LLVMGetGlobalValueAddress(LLVMExecutionEngineRef EE, const char *Name); - -uint64_t LLVMGetFunctionAddress(LLVMExecutionEngineRef EE, const char *Name); - -/*===-- Operations on memory managers -------------------------------------===*/ - -typedef uint8_t *(*LLVMMemoryManagerAllocateCodeSectionCallback)( - void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, - const char *SectionName); -typedef uint8_t *(*LLVMMemoryManagerAllocateDataSectionCallback)( - void *Opaque, uintptr_t Size, unsigned Alignment, unsigned SectionID, - const char *SectionName, LLVMBool IsReadOnly); -typedef LLVMBool (*LLVMMemoryManagerFinalizeMemoryCallback)( - void *Opaque, char **ErrMsg); -typedef void (*LLVMMemoryManagerDestroyCallback)(void *Opaque); - -/** - * Create a simple custom MCJIT memory manager. This memory manager can - * intercept allocations in a module-oblivious way. This will return NULL - * if any of the passed functions are NULL. - * - * @param Opaque An opaque client object to pass back to the callbacks. - * @param AllocateCodeSection Allocate a block of memory for executable code. - * @param AllocateDataSection Allocate a block of memory for data. - * @param FinalizeMemory Set page permissions and flush cache. Return 0 on - * success, 1 on error. - */ -LLVMMCJITMemoryManagerRef LLVMCreateSimpleMCJITMemoryManager( - void *Opaque, - LLVMMemoryManagerAllocateCodeSectionCallback AllocateCodeSection, - LLVMMemoryManagerAllocateDataSectionCallback AllocateDataSection, - LLVMMemoryManagerFinalizeMemoryCallback FinalizeMemory, - LLVMMemoryManagerDestroyCallback Destroy); - -void LLVMDisposeMCJITMemoryManager(LLVMMCJITMemoryManagerRef MM); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif /* defined(__cplusplus) */ - -#endif diff --git a/llvm/include/llvm-c/IRReader.h b/llvm/include/llvm-c/IRReader.h deleted file mode 100644 index 5b58d992..00000000 --- a/llvm/include/llvm-c/IRReader.h +++ /dev/null @@ -1,40 +0,0 @@ -/*===-- llvm-c/IRReader.h - IR Reader C Interface -----------------*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file defines the C interface to the IR Reader. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_IRREADER_H -#define LLVM_C_IRREADER_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Read LLVM IR from a memory buffer and convert it into an in-memory Module - * object. Returns 0 on success. - * Optionally returns a human-readable description of any errors that - * occurred during parsing IR. OutMessage must be disposed with - * LLVMDisposeMessage. - * - * @see llvm::ParseIR() - */ -LLVMBool LLVMParseIRInContext(LLVMContextRef ContextRef, - LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, - char **OutMessage); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/Initialization.h b/llvm/include/llvm-c/Initialization.h deleted file mode 100644 index 90c8396f..00000000 --- a/llvm/include/llvm-c/Initialization.h +++ /dev/null @@ -1,55 +0,0 @@ -/*===-- llvm-c/Initialization.h - Initialization C Interface ------*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to LLVM initialization routines, *| -|* which must be called before you can use the functionality provided by *| -|* the corresponding LLVM library. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_INITIALIZATION_H -#define LLVM_C_INITIALIZATION_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCInitialization Initialization Routines - * @ingroup LLVMC - * - * This module contains routines used to initialize the LLVM system. - * - * @{ - */ - -void LLVMInitializeCore(LLVMPassRegistryRef R); -void LLVMInitializeTransformUtils(LLVMPassRegistryRef R); -void LLVMInitializeScalarOpts(LLVMPassRegistryRef R); -void LLVMInitializeObjCARCOpts(LLVMPassRegistryRef R); -void LLVMInitializeVectorization(LLVMPassRegistryRef R); -void LLVMInitializeInstCombine(LLVMPassRegistryRef R); -void LLVMInitializeIPO(LLVMPassRegistryRef R); -void LLVMInitializeInstrumentation(LLVMPassRegistryRef R); -void LLVMInitializeAnalysis(LLVMPassRegistryRef R); -void LLVMInitializeIPA(LLVMPassRegistryRef R); -void LLVMInitializeCodeGen(LLVMPassRegistryRef R); -void LLVMInitializeTarget(LLVMPassRegistryRef R); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/LinkTimeOptimizer.h b/llvm/include/llvm-c/LinkTimeOptimizer.h deleted file mode 100644 index 8bcf5996..00000000 --- a/llvm/include/llvm-c/LinkTimeOptimizer.h +++ /dev/null @@ -1,69 +0,0 @@ -//===-- llvm/LinkTimeOptimizer.h - LTO Public C Interface -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header provides a C API to use the LLVM link time optimization -// library. This is intended to be used by linkers which are C-only in -// their implementation for performing LTO. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_C_LINKTIMEOPTIMIZER_H -#define LLVM_C_LINKTIMEOPTIMIZER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCLinkTimeOptimizer Link Time Optimization - * @ingroup LLVMC - * - * @{ - */ - - /// This provides a dummy type for pointers to the LTO object. - typedef void* llvm_lto_t; - - /// This provides a C-visible enumerator to manage status codes. - /// This should map exactly onto the C++ enumerator LTOStatus. - typedef enum llvm_lto_status { - LLVM_LTO_UNKNOWN, - LLVM_LTO_OPT_SUCCESS, - LLVM_LTO_READ_SUCCESS, - LLVM_LTO_READ_FAILURE, - LLVM_LTO_WRITE_FAILURE, - LLVM_LTO_NO_TARGET, - LLVM_LTO_NO_WORK, - LLVM_LTO_MODULE_MERGE_FAILURE, - LLVM_LTO_ASM_FAILURE, - - // Added C-specific error codes - LLVM_LTO_NULL_OBJECT - } llvm_lto_status_t; - - /// This provides C interface to initialize link time optimizer. This allows - /// linker to use dlopen() interface to dynamically load LinkTimeOptimizer. - /// extern "C" helps, because dlopen() interface uses name to find the symbol. - extern llvm_lto_t llvm_create_optimizer(void); - extern void llvm_destroy_optimizer(llvm_lto_t lto); - - extern llvm_lto_status_t llvm_read_object_file - (llvm_lto_t lto, const char* input_filename); - extern llvm_lto_status_t llvm_optimize_modules - (llvm_lto_t lto, const char* output_filename); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/Linker.h b/llvm/include/llvm-c/Linker.h deleted file mode 100644 index d02c37f9..00000000 --- a/llvm/include/llvm-c/Linker.h +++ /dev/null @@ -1,41 +0,0 @@ -/*===-- llvm-c/Linker.h - Module Linker C Interface -------------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file defines the C interface to the module/file/archive linker. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_LINKER_H -#define LLVM_C_LINKER_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* This enum is provided for backwards-compatibility only. It has no effect. */ -typedef enum { - LLVMLinkerDestroySource = 0, /* This is the default behavior. */ - LLVMLinkerPreserveSource_Removed = 1 /* This option has been deprecated and - should not be used. */ -} LLVMLinkerMode; - -/* Links the source module into the destination module. The source module is - * destroyed. - * The return value is true if an error occurred, false otherwise. - * Use the diagnostic handler to get any diagnostic message. -*/ -LLVMBool LLVMLinkModules2(LLVMModuleRef Dest, LLVMModuleRef Src); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/Object.h b/llvm/include/llvm-c/Object.h deleted file mode 100644 index a2980e89..00000000 --- a/llvm/include/llvm-c/Object.h +++ /dev/null @@ -1,100 +0,0 @@ -/*===-- llvm-c/Object.h - Object Lib C Iface --------------------*- C++ -*-===*/ -/* */ -/* The LLVM Compiler Infrastructure */ -/* */ -/* This file is distributed under the University of Illinois Open Source */ -/* License. See LICENSE.TXT for details. */ -/* */ -/*===----------------------------------------------------------------------===*/ -/* */ -/* This header declares the C interface to libLLVMObject.a, which */ -/* implements object file reading and writing. */ -/* */ -/* Many exotic languages can interoperate with C code but have a harder time */ -/* with C++ due to name mangling. So in addition to C, this interface enables */ -/* tools written in such languages. */ -/* */ -/*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_OBJECT_H -#define LLVM_C_OBJECT_H - -#include "llvm-c/Types.h" -#include "llvm/Config/llvm-config.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCObject Object file reading and writing - * @ingroup LLVMC - * - * @{ - */ - -// Opaque type wrappers -typedef struct LLVMOpaqueObjectFile *LLVMObjectFileRef; -typedef struct LLVMOpaqueSectionIterator *LLVMSectionIteratorRef; -typedef struct LLVMOpaqueSymbolIterator *LLVMSymbolIteratorRef; -typedef struct LLVMOpaqueRelocationIterator *LLVMRelocationIteratorRef; - -// ObjectFile creation -LLVMObjectFileRef LLVMCreateObjectFile(LLVMMemoryBufferRef MemBuf); -void LLVMDisposeObjectFile(LLVMObjectFileRef ObjectFile); - -// ObjectFile Section iterators -LLVMSectionIteratorRef LLVMGetSections(LLVMObjectFileRef ObjectFile); -void LLVMDisposeSectionIterator(LLVMSectionIteratorRef SI); -LLVMBool LLVMIsSectionIteratorAtEnd(LLVMObjectFileRef ObjectFile, - LLVMSectionIteratorRef SI); -void LLVMMoveToNextSection(LLVMSectionIteratorRef SI); -void LLVMMoveToContainingSection(LLVMSectionIteratorRef Sect, - LLVMSymbolIteratorRef Sym); - -// ObjectFile Symbol iterators -LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile); -void LLVMDisposeSymbolIterator(LLVMSymbolIteratorRef SI); -LLVMBool LLVMIsSymbolIteratorAtEnd(LLVMObjectFileRef ObjectFile, - LLVMSymbolIteratorRef SI); -void LLVMMoveToNextSymbol(LLVMSymbolIteratorRef SI); - -// SectionRef accessors -const char *LLVMGetSectionName(LLVMSectionIteratorRef SI); -uint64_t LLVMGetSectionSize(LLVMSectionIteratorRef SI); -const char *LLVMGetSectionContents(LLVMSectionIteratorRef SI); -uint64_t LLVMGetSectionAddress(LLVMSectionIteratorRef SI); -LLVMBool LLVMGetSectionContainsSymbol(LLVMSectionIteratorRef SI, - LLVMSymbolIteratorRef Sym); - -// Section Relocation iterators -LLVMRelocationIteratorRef LLVMGetRelocations(LLVMSectionIteratorRef Section); -void LLVMDisposeRelocationIterator(LLVMRelocationIteratorRef RI); -LLVMBool LLVMIsRelocationIteratorAtEnd(LLVMSectionIteratorRef Section, - LLVMRelocationIteratorRef RI); -void LLVMMoveToNextRelocation(LLVMRelocationIteratorRef RI); - - -// SymbolRef accessors -const char *LLVMGetSymbolName(LLVMSymbolIteratorRef SI); -uint64_t LLVMGetSymbolAddress(LLVMSymbolIteratorRef SI); -uint64_t LLVMGetSymbolSize(LLVMSymbolIteratorRef SI); - -// RelocationRef accessors -uint64_t LLVMGetRelocationOffset(LLVMRelocationIteratorRef RI); -LLVMSymbolIteratorRef LLVMGetRelocationSymbol(LLVMRelocationIteratorRef RI); -uint64_t LLVMGetRelocationType(LLVMRelocationIteratorRef RI); -// NOTE: Caller takes ownership of returned string of the two -// following functions. -const char *LLVMGetRelocationTypeName(LLVMRelocationIteratorRef RI); -const char *LLVMGetRelocationValueString(LLVMRelocationIteratorRef RI); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif /* defined(__cplusplus) */ - -#endif diff --git a/llvm/include/llvm-c/OrcBindings.h b/llvm/include/llvm-c/OrcBindings.h deleted file mode 100644 index de2969ab..00000000 --- a/llvm/include/llvm-c/OrcBindings.h +++ /dev/null @@ -1,141 +0,0 @@ -/*===----------- llvm-c/OrcBindings.h - Orc Lib C Iface ---------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMOrcJIT.a, which implements *| -|* JIT compilation of LLVM IR. *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -|* Note: This interface is experimental. It is *NOT* stable, and may be *| -|* changed without warning. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_ORCBINDINGS_H -#define LLVM_C_ORCBINDINGS_H - -#include "llvm-c/Object.h" -#include "llvm-c/TargetMachine.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct LLVMOrcOpaqueJITStack *LLVMOrcJITStackRef; -typedef uint32_t LLVMOrcModuleHandle; -typedef uint64_t LLVMOrcTargetAddress; -typedef uint64_t (*LLVMOrcSymbolResolverFn)(const char *Name, void *LookupCtx); -typedef uint64_t (*LLVMOrcLazyCompileCallbackFn)(LLVMOrcJITStackRef JITStack, - void *CallbackCtx); - -typedef enum { LLVMOrcErrSuccess = 0, LLVMOrcErrGeneric } LLVMOrcErrorCode; - -/** - * Create an ORC JIT stack. - * - * The client owns the resulting stack, and must call OrcDisposeInstance(...) - * to destroy it and free its memory. The JIT stack will take ownership of the - * TargetMachine, which will be destroyed when the stack is destroyed. The - * client should not attempt to dispose of the Target Machine, or it will result - * in a double-free. - */ -LLVMOrcJITStackRef LLVMOrcCreateInstance(LLVMTargetMachineRef TM); - -/** - * Get the error message for the most recent error (if any). - * - * This message is owned by the ORC JIT Stack and will be freed when the stack - * is disposed of by LLVMOrcDisposeInstance. - */ -const char *LLVMOrcGetErrorMsg(LLVMOrcJITStackRef JITStack); - -/** - * Mangle the given symbol. - * Memory will be allocated for MangledSymbol to hold the result. The client - */ -void LLVMOrcGetMangledSymbol(LLVMOrcJITStackRef JITStack, char **MangledSymbol, - const char *Symbol); - -/** - * Dispose of a mangled symbol. - */ -void LLVMOrcDisposeMangledSymbol(char *MangledSymbol); - -/** - * Create a lazy compile callback. - */ -LLVMOrcTargetAddress -LLVMOrcCreateLazyCompileCallback(LLVMOrcJITStackRef JITStack, - LLVMOrcLazyCompileCallbackFn Callback, - void *CallbackCtx); - -/** - * Create a named indirect call stub. - */ -LLVMOrcErrorCode LLVMOrcCreateIndirectStub(LLVMOrcJITStackRef JITStack, - const char *StubName, - LLVMOrcTargetAddress InitAddr); - -/** - * Set the pointer for the given indirect stub. - */ -LLVMOrcErrorCode LLVMOrcSetIndirectStubPointer(LLVMOrcJITStackRef JITStack, - const char *StubName, - LLVMOrcTargetAddress NewAddr); - -/** - * Add module to be eagerly compiled. - */ -LLVMOrcModuleHandle -LLVMOrcAddEagerlyCompiledIR(LLVMOrcJITStackRef JITStack, LLVMModuleRef Mod, - LLVMOrcSymbolResolverFn SymbolResolver, - void *SymbolResolverCtx); - -/** - * Add module to be lazily compiled one function at a time. - */ -LLVMOrcModuleHandle -LLVMOrcAddLazilyCompiledIR(LLVMOrcJITStackRef JITStack, LLVMModuleRef Mod, - LLVMOrcSymbolResolverFn SymbolResolver, - void *SymbolResolverCtx); - -/** - * Add an object file. - */ -LLVMOrcModuleHandle LLVMOrcAddObjectFile(LLVMOrcJITStackRef JITStack, - LLVMObjectFileRef Obj, - LLVMOrcSymbolResolverFn SymbolResolver, - void *SymbolResolverCtx); - -/** - * Remove a module set from the JIT. - * - * This works for all modules that can be added via OrcAdd*, including object - * files. - */ -void LLVMOrcRemoveModule(LLVMOrcJITStackRef JITStack, LLVMOrcModuleHandle H); - -/** - * Get symbol address from JIT instance. - */ -LLVMOrcTargetAddress LLVMOrcGetSymbolAddress(LLVMOrcJITStackRef JITStack, - const char *SymbolName); - -/** - * Dispose of an ORC JIT stack. - */ -void LLVMOrcDisposeInstance(LLVMOrcJITStackRef JITStack); - -#ifdef __cplusplus -} -#endif /* extern "C" */ - -#endif /* LLVM_C_ORCBINDINGS_H */ diff --git a/llvm/include/llvm-c/Support.h b/llvm/include/llvm-c/Support.h deleted file mode 100644 index 735d1fbc..00000000 --- a/llvm/include/llvm-c/Support.h +++ /dev/null @@ -1,65 +0,0 @@ -/*===-- llvm-c/Support.h - Support C Interface --------------------*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file defines the C interface to the LLVM support library. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_SUPPORT_H -#define LLVM_C_SUPPORT_H - -#include "llvm/Support/DataTypes.h" -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * This function permanently loads the dynamic library at the given path. - * It is safe to call this function multiple times for the same library. - * - * @see sys::DynamicLibrary::LoadLibraryPermanently() - */ -LLVMBool LLVMLoadLibraryPermanently(const char* Filename); - -/** - * This function parses the given arguments using the LLVM command line parser. - * Note that the only stable thing about this function is its signature; you - * cannot rely on any particular set of command line arguments being interpreted - * the same way across LLVM versions. - * - * @see llvm::cl::ParseCommandLineOptions() - */ -void LLVMParseCommandLineOptions(int argc, const char *const *argv, - const char *Overview); - -/** - * This function will search through all previously loaded dynamic - * libraries for the symbol \p symbolName. If it is found, the address of - * that symbol is returned. If not, null is returned. - * - * @see sys::DynamicLibrary::SearchForAddressOfSymbol() - */ -void *LLVMSearchForAddressOfSymbol(const char *symbolName); - -/** - * This functions permanently adds the symbol \p symbolName with the - * value \p symbolValue. These symbols are searched before any - * libraries. - * - * @see sys::DynamicLibrary::AddSymbol() - */ -void LLVMAddSymbol(const char *symbolName, void *symbolValue); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/Target.h b/llvm/include/llvm-c/Target.h deleted file mode 100644 index 03004ba5..00000000 --- a/llvm/include/llvm-c/Target.h +++ /dev/null @@ -1,299 +0,0 @@ -/*===-- llvm-c/Target.h - Target Lib C Iface --------------------*- C++ -*-===*/ -/* */ -/* The LLVM Compiler Infrastructure */ -/* */ -/* This file is distributed under the University of Illinois Open Source */ -/* License. See LICENSE.TXT for details. */ -/* */ -/*===----------------------------------------------------------------------===*/ -/* */ -/* This header declares the C interface to libLLVMTarget.a, which */ -/* implements target information. */ -/* */ -/* Many exotic languages can interoperate with C code but have a harder time */ -/* with C++ due to name mangling. So in addition to C, this interface enables */ -/* tools written in such languages. */ -/* */ -/*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_TARGET_H -#define LLVM_C_TARGET_H - -#include "llvm-c/Types.h" -#include "llvm/Config/llvm-config.h" - -#if defined(_MSC_VER) && !defined(inline) -#define inline __inline -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCTarget Target information - * @ingroup LLVMC - * - * @{ - */ - -enum LLVMByteOrdering { LLVMBigEndian, LLVMLittleEndian }; - -typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef; -typedef struct LLVMOpaqueTargetLibraryInfotData *LLVMTargetLibraryInfoRef; - -/* Declare all of the target-initialization functions that are available. */ -#define LLVM_TARGET(TargetName) \ - void LLVMInitialize##TargetName##TargetInfo(void); -#include "llvm/Config/Targets.def" -#undef LLVM_TARGET /* Explicit undef to make SWIG happier */ - -#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target(void); -#include "llvm/Config/Targets.def" -#undef LLVM_TARGET /* Explicit undef to make SWIG happier */ - -#define LLVM_TARGET(TargetName) \ - void LLVMInitialize##TargetName##TargetMC(void); -#include "llvm/Config/Targets.def" -#undef LLVM_TARGET /* Explicit undef to make SWIG happier */ - -/* Declare all of the available assembly printer initialization functions. */ -#define LLVM_ASM_PRINTER(TargetName) \ - void LLVMInitialize##TargetName##AsmPrinter(void); -#include "llvm/Config/AsmPrinters.def" -#undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */ - -/* Declare all of the available assembly parser initialization functions. */ -#define LLVM_ASM_PARSER(TargetName) \ - void LLVMInitialize##TargetName##AsmParser(void); -#include "llvm/Config/AsmParsers.def" -#undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */ - -/* Declare all of the available disassembler initialization functions. */ -#define LLVM_DISASSEMBLER(TargetName) \ - void LLVMInitialize##TargetName##Disassembler(void); -#include "llvm/Config/Disassemblers.def" -#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ - -/** LLVMInitializeAllTargetInfos - The main program should call this function if - it wants access to all available targets that LLVM is configured to - support. */ -static inline void LLVMInitializeAllTargetInfos(void) { -#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo(); -#include "llvm/Config/Targets.def" -#undef LLVM_TARGET /* Explicit undef to make SWIG happier */ -} - -/** LLVMInitializeAllTargets - The main program should call this function if it - wants to link in all available targets that LLVM is configured to - support. */ -static inline void LLVMInitializeAllTargets(void) { -#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target(); -#include "llvm/Config/Targets.def" -#undef LLVM_TARGET /* Explicit undef to make SWIG happier */ -} - -/** LLVMInitializeAllTargetMCs - The main program should call this function if - it wants access to all available target MC that LLVM is configured to - support. */ -static inline void LLVMInitializeAllTargetMCs(void) { -#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetMC(); -#include "llvm/Config/Targets.def" -#undef LLVM_TARGET /* Explicit undef to make SWIG happier */ -} - -/** LLVMInitializeAllAsmPrinters - The main program should call this function if - it wants all asm printers that LLVM is configured to support, to make them - available via the TargetRegistry. */ -static inline void LLVMInitializeAllAsmPrinters(void) { -#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter(); -#include "llvm/Config/AsmPrinters.def" -#undef LLVM_ASM_PRINTER /* Explicit undef to make SWIG happier */ -} - -/** LLVMInitializeAllAsmParsers - The main program should call this function if - it wants all asm parsers that LLVM is configured to support, to make them - available via the TargetRegistry. */ -static inline void LLVMInitializeAllAsmParsers(void) { -#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser(); -#include "llvm/Config/AsmParsers.def" -#undef LLVM_ASM_PARSER /* Explicit undef to make SWIG happier */ -} - -/** LLVMInitializeAllDisassemblers - The main program should call this function - if it wants all disassemblers that LLVM is configured to support, to make - them available via the TargetRegistry. */ -static inline void LLVMInitializeAllDisassemblers(void) { -#define LLVM_DISASSEMBLER(TargetName) \ - LLVMInitialize##TargetName##Disassembler(); -#include "llvm/Config/Disassemblers.def" -#undef LLVM_DISASSEMBLER /* Explicit undef to make SWIG happier */ -} - -/** LLVMInitializeNativeTarget - The main program should call this function to - initialize the native target corresponding to the host. This is useful - for JIT applications to ensure that the target gets linked in correctly. */ -static inline LLVMBool LLVMInitializeNativeTarget(void) { - /* If we have a native target, initialize it to ensure it is linked in. */ -#ifdef LLVM_NATIVE_TARGET - LLVM_NATIVE_TARGETINFO(); - LLVM_NATIVE_TARGET(); - LLVM_NATIVE_TARGETMC(); - return 0; -#else - return 1; -#endif -} - -/** LLVMInitializeNativeTargetAsmParser - The main program should call this - function to initialize the parser for the native target corresponding to the - host. */ -static inline LLVMBool LLVMInitializeNativeAsmParser(void) { -#ifdef LLVM_NATIVE_ASMPARSER - LLVM_NATIVE_ASMPARSER(); - return 0; -#else - return 1; -#endif -} - -/** LLVMInitializeNativeTargetAsmPrinter - The main program should call this - function to initialize the printer for the native target corresponding to - the host. */ -static inline LLVMBool LLVMInitializeNativeAsmPrinter(void) { -#ifdef LLVM_NATIVE_ASMPRINTER - LLVM_NATIVE_ASMPRINTER(); - return 0; -#else - return 1; -#endif -} - -/** LLVMInitializeNativeTargetDisassembler - The main program should call this - function to initialize the disassembler for the native target corresponding - to the host. */ -static inline LLVMBool LLVMInitializeNativeDisassembler(void) { -#ifdef LLVM_NATIVE_DISASSEMBLER - LLVM_NATIVE_DISASSEMBLER(); - return 0; -#else - return 1; -#endif -} - -/*===-- Target Data -------------------------------------------------------===*/ - -/** - * Obtain the data layout for a module. - * - * @see Module::getDataLayout() - */ -LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M); - -/** - * Set the data layout for a module. - * - * @see Module::setDataLayout() - */ -void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL); - -/** Creates target data from a target layout string. - See the constructor llvm::DataLayout::DataLayout. */ -LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep); - -/** Deallocates a TargetData. - See the destructor llvm::DataLayout::~DataLayout. */ -void LLVMDisposeTargetData(LLVMTargetDataRef TD); - -/** Adds target library information to a pass manager. This does not take - ownership of the target library info. - See the method llvm::PassManagerBase::add. */ -void LLVMAddTargetLibraryInfo(LLVMTargetLibraryInfoRef TLI, - LLVMPassManagerRef PM); - -/** Converts target data to a target layout string. The string must be disposed - with LLVMDisposeMessage. - See the constructor llvm::DataLayout::DataLayout. */ -char *LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD); - -/** Returns the byte order of a target, either LLVMBigEndian or - LLVMLittleEndian. - See the method llvm::DataLayout::isLittleEndian. */ -enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD); - -/** Returns the pointer size in bytes for a target. - See the method llvm::DataLayout::getPointerSize. */ -unsigned LLVMPointerSize(LLVMTargetDataRef TD); - -/** Returns the pointer size in bytes for a target for a specified - address space. - See the method llvm::DataLayout::getPointerSize. */ -unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS); - -/** Returns the integer type that is the same size as a pointer on a target. - See the method llvm::DataLayout::getIntPtrType. */ -LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD); - -/** Returns the integer type that is the same size as a pointer on a target. - This version allows the address space to be specified. - See the method llvm::DataLayout::getIntPtrType. */ -LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS); - -/** Returns the integer type that is the same size as a pointer on a target. - See the method llvm::DataLayout::getIntPtrType. */ -LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD); - -/** Returns the integer type that is the same size as a pointer on a target. - This version allows the address space to be specified. - See the method llvm::DataLayout::getIntPtrType. */ -LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, - unsigned AS); - -/** Computes the size of a type in bytes for a target. - See the method llvm::DataLayout::getTypeSizeInBits. */ -unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty); - -/** Computes the storage size of a type in bytes for a target. - See the method llvm::DataLayout::getTypeStoreSize. */ -unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); - -/** Computes the ABI size of a type in bytes for a target. - See the method llvm::DataLayout::getTypeAllocSize. */ -unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); - -/** Computes the ABI alignment of a type in bytes for a target. - See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); - -/** Computes the call frame alignment of a type in bytes for a target. - See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); - -/** Computes the preferred alignment of a type in bytes for a target. - See the method llvm::DataLayout::getTypeABISize. */ -unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty); - -/** Computes the preferred alignment of a global variable in bytes for a target. - See the method llvm::DataLayout::getPreferredAlignment. */ -unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, - LLVMValueRef GlobalVar); - -/** Computes the structure element that contains the byte offset for a target. - See the method llvm::StructLayout::getElementContainingOffset. */ -unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, - unsigned long long Offset); - -/** Computes the byte offset of the indexed struct element for a target. - See the method llvm::StructLayout::getElementContainingOffset. */ -unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, - LLVMTypeRef StructTy, unsigned Element); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif /* defined(__cplusplus) */ - -#endif diff --git a/llvm/include/llvm-c/TargetMachine.h b/llvm/include/llvm-c/TargetMachine.h deleted file mode 100644 index 1d1f61f1..00000000 --- a/llvm/include/llvm-c/TargetMachine.h +++ /dev/null @@ -1,147 +0,0 @@ -/*===-- llvm-c/TargetMachine.h - Target Machine Library C Interface - C++ -*-=*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to the Target and TargetMachine *| -|* classes, which can be used to generate assembly or object files. *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_TARGETMACHINE_H -#define LLVM_C_TARGETMACHINE_H - -#include "llvm-c/Types.h" -#include "llvm-c/Target.h" - -#ifdef __cplusplus -extern "C" { -#endif -typedef struct LLVMOpaqueTargetMachine *LLVMTargetMachineRef; -typedef struct LLVMTarget *LLVMTargetRef; - -typedef enum { - LLVMCodeGenLevelNone, - LLVMCodeGenLevelLess, - LLVMCodeGenLevelDefault, - LLVMCodeGenLevelAggressive -} LLVMCodeGenOptLevel; - -typedef enum { - LLVMRelocDefault, - LLVMRelocStatic, - LLVMRelocPIC, - LLVMRelocDynamicNoPic -} LLVMRelocMode; - -typedef enum { - LLVMCodeModelDefault, - LLVMCodeModelJITDefault, - LLVMCodeModelSmall, - LLVMCodeModelKernel, - LLVMCodeModelMedium, - LLVMCodeModelLarge -} LLVMCodeModel; - -typedef enum { - LLVMAssemblyFile, - LLVMObjectFile -} LLVMCodeGenFileType; - -/** Returns the first llvm::Target in the registered targets list. */ -LLVMTargetRef LLVMGetFirstTarget(void); -/** Returns the next llvm::Target given a previous one (or null if there's none) */ -LLVMTargetRef LLVMGetNextTarget(LLVMTargetRef T); - -/*===-- Target ------------------------------------------------------------===*/ -/** Finds the target corresponding to the given name and stores it in \p T. - Returns 0 on success. */ -LLVMTargetRef LLVMGetTargetFromName(const char *Name); - -/** Finds the target corresponding to the given triple and stores it in \p T. - Returns 0 on success. Optionally returns any error in ErrorMessage. - Use LLVMDisposeMessage to dispose the message. */ -LLVMBool LLVMGetTargetFromTriple(const char* Triple, LLVMTargetRef *T, - char **ErrorMessage); - -/** Returns the name of a target. See llvm::Target::getName */ -const char *LLVMGetTargetName(LLVMTargetRef T); - -/** Returns the description of a target. See llvm::Target::getDescription */ -const char *LLVMGetTargetDescription(LLVMTargetRef T); - -/** Returns if the target has a JIT */ -LLVMBool LLVMTargetHasJIT(LLVMTargetRef T); - -/** Returns if the target has a TargetMachine associated */ -LLVMBool LLVMTargetHasTargetMachine(LLVMTargetRef T); - -/** Returns if the target as an ASM backend (required for emitting output) */ -LLVMBool LLVMTargetHasAsmBackend(LLVMTargetRef T); - -/*===-- Target Machine ----------------------------------------------------===*/ -/** Creates a new llvm::TargetMachine. See llvm::Target::createTargetMachine */ -LLVMTargetMachineRef LLVMCreateTargetMachine(LLVMTargetRef T, - const char *Triple, const char *CPU, const char *Features, - LLVMCodeGenOptLevel Level, LLVMRelocMode Reloc, LLVMCodeModel CodeModel); - -/** Dispose the LLVMTargetMachineRef instance generated by - LLVMCreateTargetMachine. */ -void LLVMDisposeTargetMachine(LLVMTargetMachineRef T); - -/** Returns the Target used in a TargetMachine */ -LLVMTargetRef LLVMGetTargetMachineTarget(LLVMTargetMachineRef T); - -/** Returns the triple used creating this target machine. See - llvm::TargetMachine::getTriple. The result needs to be disposed with - LLVMDisposeMessage. */ -char *LLVMGetTargetMachineTriple(LLVMTargetMachineRef T); - -/** Returns the cpu used creating this target machine. See - llvm::TargetMachine::getCPU. The result needs to be disposed with - LLVMDisposeMessage. */ -char *LLVMGetTargetMachineCPU(LLVMTargetMachineRef T); - -/** Returns the feature string used creating this target machine. See - llvm::TargetMachine::getFeatureString. The result needs to be disposed with - LLVMDisposeMessage. */ -char *LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T); - -/** Create a DataLayout based on the targetMachine. */ -LLVMTargetDataRef LLVMCreateTargetDataLayout(LLVMTargetMachineRef T); - -/** Set the target machine's ASM verbosity. */ -void LLVMSetTargetMachineAsmVerbosity(LLVMTargetMachineRef T, - LLVMBool VerboseAsm); - -/** Emits an asm or object file for the given module to the filename. This - wraps several c++ only classes (among them a file stream). Returns any - error in ErrorMessage. Use LLVMDisposeMessage to dispose the message. */ -LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M, - char *Filename, LLVMCodeGenFileType codegen, char **ErrorMessage); - -/** Compile the LLVM IR stored in \p M and store the result in \p OutMemBuf. */ -LLVMBool LLVMTargetMachineEmitToMemoryBuffer(LLVMTargetMachineRef T, LLVMModuleRef M, - LLVMCodeGenFileType codegen, char** ErrorMessage, LLVMMemoryBufferRef *OutMemBuf); - -/*===-- Triple ------------------------------------------------------------===*/ -/** Get a triple for the host machine as a string. The result needs to be - disposed with LLVMDisposeMessage. */ -char* LLVMGetDefaultTargetTriple(void); - -/** Adds the target-specific analysis passes to the pass manager. */ -void LLVMAddAnalysisPasses(LLVMTargetMachineRef T, LLVMPassManagerRef PM); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/Transforms/IPO.h b/llvm/include/llvm-c/Transforms/IPO.h deleted file mode 100644 index 3af7425d..00000000 --- a/llvm/include/llvm-c/Transforms/IPO.h +++ /dev/null @@ -1,81 +0,0 @@ -/*===-- IPO.h - Interprocedural Transformations C Interface -----*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMIPO.a, which implements *| -|* various interprocedural transformations of the LLVM IR. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_TRANSFORMS_IPO_H -#define LLVM_C_TRANSFORMS_IPO_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCTransformsIPO Interprocedural transformations - * @ingroup LLVMCTransforms - * - * @{ - */ - -/** See llvm::createArgumentPromotionPass function. */ -void LLVMAddArgumentPromotionPass(LLVMPassManagerRef PM); - -/** See llvm::createConstantMergePass function. */ -void LLVMAddConstantMergePass(LLVMPassManagerRef PM); - -/** See llvm::createDeadArgEliminationPass function. */ -void LLVMAddDeadArgEliminationPass(LLVMPassManagerRef PM); - -/** See llvm::createFunctionAttrsPass function. */ -void LLVMAddFunctionAttrsPass(LLVMPassManagerRef PM); - -/** See llvm::createFunctionInliningPass function. */ -void LLVMAddFunctionInliningPass(LLVMPassManagerRef PM); - -/** See llvm::createAlwaysInlinerPass function. */ -void LLVMAddAlwaysInlinerPass(LLVMPassManagerRef PM); - -/** See llvm::createGlobalDCEPass function. */ -void LLVMAddGlobalDCEPass(LLVMPassManagerRef PM); - -/** See llvm::createGlobalOptimizerPass function. */ -void LLVMAddGlobalOptimizerPass(LLVMPassManagerRef PM); - -/** See llvm::createIPConstantPropagationPass function. */ -void LLVMAddIPConstantPropagationPass(LLVMPassManagerRef PM); - -/** See llvm::createPruneEHPass function. */ -void LLVMAddPruneEHPass(LLVMPassManagerRef PM); - -/** See llvm::createIPSCCPPass function. */ -void LLVMAddIPSCCPPass(LLVMPassManagerRef PM); - -/** See llvm::createInternalizePass function. */ -void LLVMAddInternalizePass(LLVMPassManagerRef, unsigned AllButMain); - -/** See llvm::createStripDeadPrototypesPass function. */ -void LLVMAddStripDeadPrototypesPass(LLVMPassManagerRef PM); - -/** See llvm::createStripSymbolsPass function. */ -void LLVMAddStripSymbolsPass(LLVMPassManagerRef PM); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif /* defined(__cplusplus) */ - -#endif diff --git a/llvm/include/llvm-c/Transforms/PassManagerBuilder.h b/llvm/include/llvm-c/Transforms/PassManagerBuilder.h deleted file mode 100644 index 69786b34..00000000 --- a/llvm/include/llvm-c/Transforms/PassManagerBuilder.h +++ /dev/null @@ -1,90 +0,0 @@ -/*===-- llvm-c/Transform/PassManagerBuilder.h - PMB C Interface ---*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to the PassManagerBuilder class. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H -#define LLVM_C_TRANSFORMS_PASSMANAGERBUILDER_H - -#include "llvm-c/Types.h" - -typedef struct LLVMOpaquePassManagerBuilder *LLVMPassManagerBuilderRef; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCTransformsPassManagerBuilder Pass manager builder - * @ingroup LLVMCTransforms - * - * @{ - */ - -/** See llvm::PassManagerBuilder. */ -LLVMPassManagerBuilderRef LLVMPassManagerBuilderCreate(void); -void LLVMPassManagerBuilderDispose(LLVMPassManagerBuilderRef PMB); - -/** See llvm::PassManagerBuilder::OptLevel. */ -void -LLVMPassManagerBuilderSetOptLevel(LLVMPassManagerBuilderRef PMB, - unsigned OptLevel); - -/** See llvm::PassManagerBuilder::SizeLevel. */ -void -LLVMPassManagerBuilderSetSizeLevel(LLVMPassManagerBuilderRef PMB, - unsigned SizeLevel); - -/** See llvm::PassManagerBuilder::DisableUnitAtATime. */ -void -LLVMPassManagerBuilderSetDisableUnitAtATime(LLVMPassManagerBuilderRef PMB, - LLVMBool Value); - -/** See llvm::PassManagerBuilder::DisableUnrollLoops. */ -void -LLVMPassManagerBuilderSetDisableUnrollLoops(LLVMPassManagerBuilderRef PMB, - LLVMBool Value); - -/** See llvm::PassManagerBuilder::DisableSimplifyLibCalls */ -void -LLVMPassManagerBuilderSetDisableSimplifyLibCalls(LLVMPassManagerBuilderRef PMB, - LLVMBool Value); - -/** See llvm::PassManagerBuilder::Inliner. */ -void -LLVMPassManagerBuilderUseInlinerWithThreshold(LLVMPassManagerBuilderRef PMB, - unsigned Threshold); - -/** See llvm::PassManagerBuilder::populateFunctionPassManager. */ -void -LLVMPassManagerBuilderPopulateFunctionPassManager(LLVMPassManagerBuilderRef PMB, - LLVMPassManagerRef PM); - -/** See llvm::PassManagerBuilder::populateModulePassManager. */ -void -LLVMPassManagerBuilderPopulateModulePassManager(LLVMPassManagerBuilderRef PMB, - LLVMPassManagerRef PM); - -/** See llvm::PassManagerBuilder::populateLTOPassManager. */ -void LLVMPassManagerBuilderPopulateLTOPassManager(LLVMPassManagerBuilderRef PMB, - LLVMPassManagerRef PM, - LLVMBool Internalize, - LLVMBool RunInliner); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/Transforms/Scalar.h b/llvm/include/llvm-c/Transforms/Scalar.h deleted file mode 100644 index b8a09984..00000000 --- a/llvm/include/llvm-c/Transforms/Scalar.h +++ /dev/null @@ -1,158 +0,0 @@ -/*===-- Scalar.h - Scalar Transformation Library C Interface ----*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMScalarOpts.a, which *| -|* implements various scalar transformations of the LLVM IR. *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_TRANSFORMS_SCALAR_H -#define LLVM_C_TRANSFORMS_SCALAR_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCTransformsScalar Scalar transformations - * @ingroup LLVMCTransforms - * - * @{ - */ - -/** See llvm::createAggressiveDCEPass function. */ -void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM); - -/** See llvm::createBitTrackingDCEPass function. */ -void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM); - -/** See llvm::createAlignmentFromAssumptionsPass function. */ -void LLVMAddAlignmentFromAssumptionsPass(LLVMPassManagerRef PM); - -/** See llvm::createCFGSimplificationPass function. */ -void LLVMAddCFGSimplificationPass(LLVMPassManagerRef PM); - -/** See llvm::createDeadStoreEliminationPass function. */ -void LLVMAddDeadStoreEliminationPass(LLVMPassManagerRef PM); - -/** See llvm::createScalarizerPass function. */ -void LLVMAddScalarizerPass(LLVMPassManagerRef PM); - -/** See llvm::createMergedLoadStoreMotionPass function. */ -void LLVMAddMergedLoadStoreMotionPass(LLVMPassManagerRef PM); - -/** See llvm::createGVNPass function. */ -void LLVMAddGVNPass(LLVMPassManagerRef PM); - -/** See llvm::createIndVarSimplifyPass function. */ -void LLVMAddIndVarSimplifyPass(LLVMPassManagerRef PM); - -/** See llvm::createInstructionCombiningPass function. */ -void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM); - -/** See llvm::createJumpThreadingPass function. */ -void LLVMAddJumpThreadingPass(LLVMPassManagerRef PM); - -/** See llvm::createLICMPass function. */ -void LLVMAddLICMPass(LLVMPassManagerRef PM); - -/** See llvm::createLoopDeletionPass function. */ -void LLVMAddLoopDeletionPass(LLVMPassManagerRef PM); - -/** See llvm::createLoopIdiomPass function */ -void LLVMAddLoopIdiomPass(LLVMPassManagerRef PM); - -/** See llvm::createLoopRotatePass function. */ -void LLVMAddLoopRotatePass(LLVMPassManagerRef PM); - -/** See llvm::createLoopRerollPass function. */ -void LLVMAddLoopRerollPass(LLVMPassManagerRef PM); - -/** See llvm::createLoopUnrollPass function. */ -void LLVMAddLoopUnrollPass(LLVMPassManagerRef PM); - -/** See llvm::createLoopUnswitchPass function. */ -void LLVMAddLoopUnswitchPass(LLVMPassManagerRef PM); - -/** See llvm::createMemCpyOptPass function. */ -void LLVMAddMemCpyOptPass(LLVMPassManagerRef PM); - -/** See llvm::createPartiallyInlineLibCallsPass function. */ -void LLVMAddPartiallyInlineLibCallsPass(LLVMPassManagerRef PM); - -/** See llvm::createLowerSwitchPass function. */ -void LLVMAddLowerSwitchPass(LLVMPassManagerRef PM); - -/** See llvm::createPromoteMemoryToRegisterPass function. */ -void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM); - -/** See llvm::createReassociatePass function. */ -void LLVMAddReassociatePass(LLVMPassManagerRef PM); - -/** See llvm::createSCCPPass function. */ -void LLVMAddSCCPPass(LLVMPassManagerRef PM); - -/** See llvm::createSROAPass function. */ -void LLVMAddScalarReplAggregatesPass(LLVMPassManagerRef PM); - -/** See llvm::createSROAPass function. */ -void LLVMAddScalarReplAggregatesPassSSA(LLVMPassManagerRef PM); - -/** See llvm::createSROAPass function. */ -void LLVMAddScalarReplAggregatesPassWithThreshold(LLVMPassManagerRef PM, - int Threshold); - -/** See llvm::createSimplifyLibCallsPass function. */ -void LLVMAddSimplifyLibCallsPass(LLVMPassManagerRef PM); - -/** See llvm::createTailCallEliminationPass function. */ -void LLVMAddTailCallEliminationPass(LLVMPassManagerRef PM); - -/** See llvm::createConstantPropagationPass function. */ -void LLVMAddConstantPropagationPass(LLVMPassManagerRef PM); - -/** See llvm::demotePromoteMemoryToRegisterPass function. */ -void LLVMAddDemoteMemoryToRegisterPass(LLVMPassManagerRef PM); - -/** See llvm::createVerifierPass function. */ -void LLVMAddVerifierPass(LLVMPassManagerRef PM); - -/** See llvm::createCorrelatedValuePropagationPass function */ -void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM); - -/** See llvm::createEarlyCSEPass function */ -void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM); - -/** See llvm::createLowerExpectIntrinsicPass function */ -void LLVMAddLowerExpectIntrinsicPass(LLVMPassManagerRef PM); - -/** See llvm::createTypeBasedAliasAnalysisPass function */ -void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM); - -/** See llvm::createScopedNoAliasAAPass function */ -void LLVMAddScopedNoAliasAAPass(LLVMPassManagerRef PM); - -/** See llvm::createBasicAliasAnalysisPass function */ -void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif /* defined(__cplusplus) */ - -#endif diff --git a/llvm/include/llvm-c/Transforms/Vectorize.h b/llvm/include/llvm-c/Transforms/Vectorize.h deleted file mode 100644 index a82ef49c..00000000 --- a/llvm/include/llvm-c/Transforms/Vectorize.h +++ /dev/null @@ -1,53 +0,0 @@ -/*===---------------------------Vectorize.h --------------------- -*- C -*-===*\ -|*===----------- Vectorization Transformation Library C Interface ---------===*| -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header declares the C interface to libLLVMVectorize.a, which *| -|* implements various vectorization transformations of the LLVM IR. *| -|* *| -|* Many exotic languages can interoperate with C code but have a harder time *| -|* with C++ due to name mangling. So in addition to C, this interface enables *| -|* tools written in such languages. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_TRANSFORMS_VECTORIZE_H -#define LLVM_C_TRANSFORMS_VECTORIZE_H - -#include "llvm-c/Types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCTransformsVectorize Vectorization transformations - * @ingroup LLVMCTransforms - * - * @{ - */ - -/** See llvm::createBBVectorizePass function. */ -void LLVMAddBBVectorizePass(LLVMPassManagerRef PM); - -/** See llvm::createLoopVectorizePass function. */ -void LLVMAddLoopVectorizePass(LLVMPassManagerRef PM); - -/** See llvm::createSLPVectorizerPass function. */ -void LLVMAddSLPVectorizePass(LLVMPassManagerRef PM); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif /* defined(__cplusplus) */ - -#endif diff --git a/llvm/include/llvm-c/Types.h b/llvm/include/llvm-c/Types.h deleted file mode 100644 index 3d472a6b..00000000 --- a/llvm/include/llvm-c/Types.h +++ /dev/null @@ -1,131 +0,0 @@ -/*===-- llvm-c/Support.h - C Interface Types declarations ---------*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file defines types used by the the C interface to LLVM. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_TYPES_H -#define LLVM_C_TYPES_H - -#include "llvm/Support/DataTypes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @defgroup LLVMCSupportTypes Types and Enumerations - * - * @{ - */ - -typedef int LLVMBool; - -/* Opaque types. */ - -/** - * LLVM uses a polymorphic type hierarchy which C cannot represent, therefore - * parameters must be passed as base types. Despite the declared types, most - * of the functions provided operate only on branches of the type hierarchy. - * The declared parameter names are descriptive and specify which type is - * required. Additionally, each type hierarchy is documented along with the - * functions that operate upon it. For more detail, refer to LLVM's C++ code. - * If in doubt, refer to Core.cpp, which performs parameter downcasts in the - * form unwrap(Param). - */ - -/** - * Used to pass regions of memory through LLVM interfaces. - * - * @see llvm::MemoryBuffer - */ -typedef struct LLVMOpaqueMemoryBuffer *LLVMMemoryBufferRef; - -/** - * The top-level container for all LLVM global data. See the LLVMContext class. - */ -typedef struct LLVMOpaqueContext *LLVMContextRef; - -/** - * The top-level container for all other LLVM Intermediate Representation (IR) - * objects. - * - * @see llvm::Module - */ -typedef struct LLVMOpaqueModule *LLVMModuleRef; - -/** - * Each value in the LLVM IR has a type, an LLVMTypeRef. - * - * @see llvm::Type - */ -typedef struct LLVMOpaqueType *LLVMTypeRef; - -/** - * Represents an individual value in LLVM IR. - * - * This models llvm::Value. - */ -typedef struct LLVMOpaqueValue *LLVMValueRef; - -/** - * Represents a basic block of instructions in LLVM IR. - * - * This models llvm::BasicBlock. - */ -typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef; - -/** - * Represents an LLVM basic block builder. - * - * This models llvm::IRBuilder. - */ -typedef struct LLVMOpaqueBuilder *LLVMBuilderRef; - -/** - * Interface used to provide a module to JIT or interpreter. - * This is now just a synonym for llvm::Module, but we have to keep using the - * different type to keep binary compatibility. - */ -typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef; - -/** @see llvm::PassManagerBase */ -typedef struct LLVMOpaquePassManager *LLVMPassManagerRef; - -/** @see llvm::PassRegistry */ -typedef struct LLVMOpaquePassRegistry *LLVMPassRegistryRef; - -/** - * Used to get the users and usees of a Value. - * - * @see llvm::Use */ -typedef struct LLVMOpaqueUse *LLVMUseRef; - -/** - * Used to represent an attributes. - * - * @see llvm::Attribute - */ -typedef struct LLVMOpaqueAttributeRef *LLVMAttributeRef; - -/** - * @see llvm::DiagnosticInfo - */ -typedef struct LLVMOpaqueDiagnosticInfo *LLVMDiagnosticInfoRef; - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h deleted file mode 100644 index b1f5a45d..00000000 --- a/llvm/include/llvm-c/lto.h +++ /dev/null @@ -1,797 +0,0 @@ -/*===-- llvm-c/lto.h - LTO Public C Interface ---------------------*- C -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This header provides public interface to an abstract link time optimization*| -|* library. LLVM provides an implementation of this interface for use with *| -|* llvm bitcode files. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_C_LTO_H -#define LLVM_C_LTO_H - -#ifdef __cplusplus -#include -#else -#include -#endif -#include - -#ifndef __cplusplus -#if !defined(_MSC_VER) -#include -typedef bool lto_bool_t; -#else -/* MSVC in particular does not have anything like _Bool or bool in C, but we can - at least make sure the type is the same size. The implementation side will - use C++ bool. */ -typedef unsigned char lto_bool_t; -#endif -#else -typedef bool lto_bool_t; -#endif - -/** - * @defgroup LLVMCLTO LTO - * @ingroup LLVMC - * - * @{ - */ - -#define LTO_API_VERSION 20 - -/** - * \since prior to LTO_API_VERSION=3 - */ -typedef enum { - LTO_SYMBOL_ALIGNMENT_MASK = 0x0000001F, /* log2 of alignment */ - LTO_SYMBOL_PERMISSIONS_MASK = 0x000000E0, - LTO_SYMBOL_PERMISSIONS_CODE = 0x000000A0, - LTO_SYMBOL_PERMISSIONS_DATA = 0x000000C0, - LTO_SYMBOL_PERMISSIONS_RODATA = 0x00000080, - LTO_SYMBOL_DEFINITION_MASK = 0x00000700, - LTO_SYMBOL_DEFINITION_REGULAR = 0x00000100, - LTO_SYMBOL_DEFINITION_TENTATIVE = 0x00000200, - LTO_SYMBOL_DEFINITION_WEAK = 0x00000300, - LTO_SYMBOL_DEFINITION_UNDEFINED = 0x00000400, - LTO_SYMBOL_DEFINITION_WEAKUNDEF = 0x00000500, - LTO_SYMBOL_SCOPE_MASK = 0x00003800, - LTO_SYMBOL_SCOPE_INTERNAL = 0x00000800, - LTO_SYMBOL_SCOPE_HIDDEN = 0x00001000, - LTO_SYMBOL_SCOPE_PROTECTED = 0x00002000, - LTO_SYMBOL_SCOPE_DEFAULT = 0x00001800, - LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN = 0x00002800, - LTO_SYMBOL_COMDAT = 0x00004000, - LTO_SYMBOL_ALIAS = 0x00008000 -} lto_symbol_attributes; - -/** - * \since prior to LTO_API_VERSION=3 - */ -typedef enum { - LTO_DEBUG_MODEL_NONE = 0, - LTO_DEBUG_MODEL_DWARF = 1 -} lto_debug_model; - -/** - * \since prior to LTO_API_VERSION=3 - */ -typedef enum { - LTO_CODEGEN_PIC_MODEL_STATIC = 0, - LTO_CODEGEN_PIC_MODEL_DYNAMIC = 1, - LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC = 2, - LTO_CODEGEN_PIC_MODEL_DEFAULT = 3 -} lto_codegen_model; - -/** opaque reference to a loaded object module */ -typedef struct LLVMOpaqueLTOModule *lto_module_t; - -/** opaque reference to a code generator */ -typedef struct LLVMOpaqueLTOCodeGenerator *lto_code_gen_t; - -/** opaque reference to a thin code generator */ -typedef struct LLVMOpaqueThinLTOCodeGenerator *thinlto_code_gen_t; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Returns a printable string. - * - * \since prior to LTO_API_VERSION=3 - */ -extern const char* -lto_get_version(void); - -/** - * Returns the last error string or NULL if last operation was successful. - * - * \since prior to LTO_API_VERSION=3 - */ -extern const char* -lto_get_error_message(void); - -/** - * Checks if a file is a loadable object file. - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_bool_t -lto_module_is_object_file(const char* path); - -/** - * Checks if a file is a loadable object compiled for requested target. - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_bool_t -lto_module_is_object_file_for_target(const char* path, - const char* target_triple_prefix); - -/** - * Return true if \p Buffer contains a bitcode file with ObjC code (category - * or class) in it. - * - * \since LTO_API_VERSION=20 - */ -extern lto_bool_t -lto_module_has_objc_category(const void *mem, size_t length); - -/** -* Checks if a buffer is a loadable object file. -* -* \since prior to LTO_API_VERSION=3 -*/ -extern lto_bool_t lto_module_is_object_file_in_memory(const void *mem, - size_t length); - -/** - * Checks if a buffer is a loadable object compiled for requested target. - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_bool_t -lto_module_is_object_file_in_memory_for_target(const void* mem, size_t length, - const char* target_triple_prefix); - -/** - * Loads an object file from disk. - * Returns NULL on error (check lto_get_error_message() for details). - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_module_t -lto_module_create(const char* path); - -/** - * Loads an object file from memory. - * Returns NULL on error (check lto_get_error_message() for details). - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_module_t -lto_module_create_from_memory(const void* mem, size_t length); - -/** - * Loads an object file from memory with an extra path argument. - * Returns NULL on error (check lto_get_error_message() for details). - * - * \since LTO_API_VERSION=9 - */ -extern lto_module_t -lto_module_create_from_memory_with_path(const void* mem, size_t length, - const char *path); - -/** - * \brief Loads an object file in its own context. - * - * Loads an object file in its own LLVMContext. This function call is - * thread-safe. However, modules created this way should not be merged into an - * lto_code_gen_t using \a lto_codegen_add_module(). - * - * Returns NULL on error (check lto_get_error_message() for details). - * - * \since LTO_API_VERSION=11 - */ -extern lto_module_t -lto_module_create_in_local_context(const void *mem, size_t length, - const char *path); - -/** - * \brief Loads an object file in the codegen context. - * - * Loads an object file into the same context as \c cg. The module is safe to - * add using \a lto_codegen_add_module(). - * - * Returns NULL on error (check lto_get_error_message() for details). - * - * \since LTO_API_VERSION=11 - */ -extern lto_module_t -lto_module_create_in_codegen_context(const void *mem, size_t length, - const char *path, lto_code_gen_t cg); - -/** - * Loads an object file from disk. The seek point of fd is not preserved. - * Returns NULL on error (check lto_get_error_message() for details). - * - * \since LTO_API_VERSION=5 - */ -extern lto_module_t -lto_module_create_from_fd(int fd, const char *path, size_t file_size); - -/** - * Loads an object file from disk. The seek point of fd is not preserved. - * Returns NULL on error (check lto_get_error_message() for details). - * - * \since LTO_API_VERSION=5 - */ -extern lto_module_t -lto_module_create_from_fd_at_offset(int fd, const char *path, size_t file_size, - size_t map_size, off_t offset); - -/** - * Frees all memory internally allocated by the module. - * Upon return the lto_module_t is no longer valid. - * - * \since prior to LTO_API_VERSION=3 - */ -extern void -lto_module_dispose(lto_module_t mod); - -/** - * Returns triple string which the object module was compiled under. - * - * \since prior to LTO_API_VERSION=3 - */ -extern const char* -lto_module_get_target_triple(lto_module_t mod); - -/** - * Sets triple string with which the object will be codegened. - * - * \since LTO_API_VERSION=4 - */ -extern void -lto_module_set_target_triple(lto_module_t mod, const char *triple); - -/** - * Returns the number of symbols in the object module. - * - * \since prior to LTO_API_VERSION=3 - */ -extern unsigned int -lto_module_get_num_symbols(lto_module_t mod); - -/** - * Returns the name of the ith symbol in the object module. - * - * \since prior to LTO_API_VERSION=3 - */ -extern const char* -lto_module_get_symbol_name(lto_module_t mod, unsigned int index); - -/** - * Returns the attributes of the ith symbol in the object module. - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_symbol_attributes -lto_module_get_symbol_attribute(lto_module_t mod, unsigned int index); - -/** - * Returns the module's linker options. - * - * The linker options may consist of multiple flags. It is the linker's - * responsibility to split the flags using a platform-specific mechanism. - * - * \since LTO_API_VERSION=16 - */ -extern const char* -lto_module_get_linkeropts(lto_module_t mod); - -/** - * Diagnostic severity. - * - * \since LTO_API_VERSION=7 - */ -typedef enum { - LTO_DS_ERROR = 0, - LTO_DS_WARNING = 1, - LTO_DS_REMARK = 3, // Added in LTO_API_VERSION=10. - LTO_DS_NOTE = 2 -} lto_codegen_diagnostic_severity_t; - -/** - * Diagnostic handler type. - * \p severity defines the severity. - * \p diag is the actual diagnostic. - * The diagnostic is not prefixed by any of severity keyword, e.g., 'error: '. - * \p ctxt is used to pass the context set with the diagnostic handler. - * - * \since LTO_API_VERSION=7 - */ -typedef void (*lto_diagnostic_handler_t)( - lto_codegen_diagnostic_severity_t severity, const char *diag, void *ctxt); - -/** - * Set a diagnostic handler and the related context (void *). - * This is more general than lto_get_error_message, as the diagnostic handler - * can be called at anytime within lto. - * - * \since LTO_API_VERSION=7 - */ -extern void lto_codegen_set_diagnostic_handler(lto_code_gen_t, - lto_diagnostic_handler_t, - void *); - -/** - * Instantiates a code generator. - * Returns NULL on error (check lto_get_error_message() for details). - * - * All modules added using \a lto_codegen_add_module() must have been created - * in the same context as the codegen. - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_code_gen_t -lto_codegen_create(void); - -/** - * \brief Instantiate a code generator in its own context. - * - * Instantiates a code generator in its own context. Modules added via \a - * lto_codegen_add_module() must have all been created in the same context, - * using \a lto_module_create_in_codegen_context(). - * - * \since LTO_API_VERSION=11 - */ -extern lto_code_gen_t -lto_codegen_create_in_local_context(void); - -/** - * Frees all code generator and all memory it internally allocated. - * Upon return the lto_code_gen_t is no longer valid. - * - * \since prior to LTO_API_VERSION=3 - */ -extern void -lto_codegen_dispose(lto_code_gen_t); - -/** - * Add an object module to the set of modules for which code will be generated. - * Returns true on error (check lto_get_error_message() for details). - * - * \c cg and \c mod must both be in the same context. See \a - * lto_codegen_create_in_local_context() and \a - * lto_module_create_in_codegen_context(). - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_bool_t -lto_codegen_add_module(lto_code_gen_t cg, lto_module_t mod); - -/** - * Sets the object module for code generation. This will transfer the ownership - * of the module to the code generator. - * - * \c cg and \c mod must both be in the same context. - * - * \since LTO_API_VERSION=13 - */ -extern void -lto_codegen_set_module(lto_code_gen_t cg, lto_module_t mod); - -/** - * Sets if debug info should be generated. - * Returns true on error (check lto_get_error_message() for details). - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_bool_t -lto_codegen_set_debug_model(lto_code_gen_t cg, lto_debug_model); - -/** - * Sets which PIC code model to generated. - * Returns true on error (check lto_get_error_message() for details). - * - * \since prior to LTO_API_VERSION=3 - */ -extern lto_bool_t -lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model); - -/** - * Sets the cpu to generate code for. - * - * \since LTO_API_VERSION=4 - */ -extern void -lto_codegen_set_cpu(lto_code_gen_t cg, const char *cpu); - -/** - * Sets the location of the assembler tool to run. If not set, libLTO - * will use gcc to invoke the assembler. - * - * \since LTO_API_VERSION=3 - */ -extern void -lto_codegen_set_assembler_path(lto_code_gen_t cg, const char* path); - -/** - * Sets extra arguments that libLTO should pass to the assembler. - * - * \since LTO_API_VERSION=4 - */ -extern void -lto_codegen_set_assembler_args(lto_code_gen_t cg, const char **args, - int nargs); - -/** - * Adds to a list of all global symbols that must exist in the final generated - * code. If a function is not listed there, it might be inlined into every usage - * and optimized away. - * - * \since prior to LTO_API_VERSION=3 - */ -extern void -lto_codegen_add_must_preserve_symbol(lto_code_gen_t cg, const char* symbol); - -/** - * Writes a new object file at the specified path that contains the - * merged contents of all modules added so far. - * Returns true on error (check lto_get_error_message() for details). - * - * \since LTO_API_VERSION=5 - */ -extern lto_bool_t -lto_codegen_write_merged_modules(lto_code_gen_t cg, const char* path); - -/** - * Generates code for all added modules into one native object file. - * This calls lto_codegen_optimize then lto_codegen_compile_optimized. - * - * On success returns a pointer to a generated mach-o/ELF buffer and - * length set to the buffer size. The buffer is owned by the - * lto_code_gen_t and will be freed when lto_codegen_dispose() - * is called, or lto_codegen_compile() is called again. - * On failure, returns NULL (check lto_get_error_message() for details). - * - * \since prior to LTO_API_VERSION=3 - */ -extern const void* -lto_codegen_compile(lto_code_gen_t cg, size_t* length); - -/** - * Generates code for all added modules into one native object file. - * This calls lto_codegen_optimize then lto_codegen_compile_optimized (instead - * of returning a generated mach-o/ELF buffer, it writes to a file). - * - * The name of the file is written to name. Returns true on error. - * - * \since LTO_API_VERSION=5 - */ -extern lto_bool_t -lto_codegen_compile_to_file(lto_code_gen_t cg, const char** name); - -/** - * Runs optimization for the merged module. Returns true on error. - * - * \since LTO_API_VERSION=12 - */ -extern lto_bool_t -lto_codegen_optimize(lto_code_gen_t cg); - -/** - * Generates code for the optimized merged module into one native object file. - * It will not run any IR optimizations on the merged module. - * - * On success returns a pointer to a generated mach-o/ELF buffer and length set - * to the buffer size. The buffer is owned by the lto_code_gen_t and will be - * freed when lto_codegen_dispose() is called, or - * lto_codegen_compile_optimized() is called again. On failure, returns NULL - * (check lto_get_error_message() for details). - * - * \since LTO_API_VERSION=12 - */ -extern const void* -lto_codegen_compile_optimized(lto_code_gen_t cg, size_t* length); - -/** - * Returns the runtime API version. - * - * \since LTO_API_VERSION=12 - */ -extern unsigned int -lto_api_version(void); - -/** - * Sets options to help debug codegen bugs. - * - * \since prior to LTO_API_VERSION=3 - */ -extern void -lto_codegen_debug_options(lto_code_gen_t cg, const char *); - -/** - * Initializes LLVM disassemblers. - * FIXME: This doesn't really belong here. - * - * \since LTO_API_VERSION=5 - */ -extern void -lto_initialize_disassembler(void); - -/** - * Sets if we should run internalize pass during optimization and code - * generation. - * - * \since LTO_API_VERSION=14 - */ -extern void -lto_codegen_set_should_internalize(lto_code_gen_t cg, - lto_bool_t ShouldInternalize); - -/** - * \brief Set whether to embed uselists in bitcode. - * - * Sets whether \a lto_codegen_write_merged_modules() should embed uselists in - * output bitcode. This should be turned on for all -save-temps output. - * - * \since LTO_API_VERSION=15 - */ -extern void -lto_codegen_set_should_embed_uselists(lto_code_gen_t cg, - lto_bool_t ShouldEmbedUselists); - -/** - * @} - * @defgroup LLVMCTLTO ThinLTO - * @ingroup LLVMC - * - * @{ - */ - -/** - * Type to wrap a single object returned by ThinLTO. - * - * \since LTO_API_VERSION=18 - */ -typedef struct { - const char *Buffer; - size_t Size; -} LTOObjectBuffer; - -/** - * Instantiates a ThinLTO code generator. - * Returns NULL on error (check lto_get_error_message() for details). - * - * - * The ThinLTOCodeGenerator is not intended to be reuse for multiple - * compilation: the model is that the client adds modules to the generator and - * ask to perform the ThinLTO optimizations / codegen, and finally destroys the - * codegenerator. - * - * \since LTO_API_VERSION=18 - */ -extern thinlto_code_gen_t thinlto_create_codegen(void); - -/** - * Frees the generator and all memory it internally allocated. - * Upon return the thinlto_code_gen_t is no longer valid. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_dispose(thinlto_code_gen_t cg); - -/** - * Add a module to a ThinLTO code generator. Identifier has to be unique among - * all the modules in a code generator. The data buffer stays owned by the - * client, and is expected to be available for the entire lifetime of the - * thinlto_code_gen_t it is added to. - * - * On failure, returns NULL (check lto_get_error_message() for details). - * - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_add_module(thinlto_code_gen_t cg, - const char *identifier, const char *data, - int length); - -/** - * Optimize and codegen all the modules added to the codegenerator using - * ThinLTO. Resulting objects are accessible using thinlto_module_get_object(). - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_process(thinlto_code_gen_t cg); - -/** - * Returns the number of object files produced by the ThinLTO CodeGenerator. - * - * It usually matches the number of input files, but this is not a guarantee of - * the API and may change in future implementation, so the client should not - * assume it. - * - * \since LTO_API_VERSION=18 - */ -extern unsigned int thinlto_module_get_num_objects(thinlto_code_gen_t cg); - -/** - * Returns a reference to the ith object file produced by the ThinLTO - * CodeGenerator. - * - * Client should use \p thinlto_module_get_num_objects() to get the number of - * available objects. - * - * \since LTO_API_VERSION=18 - */ -extern LTOObjectBuffer thinlto_module_get_object(thinlto_code_gen_t cg, - unsigned int index); - -/** - * Sets which PIC code model to generate. - * Returns true on error (check lto_get_error_message() for details). - * - * \since LTO_API_VERSION=18 - */ -extern lto_bool_t thinlto_codegen_set_pic_model(thinlto_code_gen_t cg, - lto_codegen_model); - -/** - * @} - * @defgroup LLVMCTLTO_CACHING ThinLTO Cache Control - * @ingroup LLVMCTLTO - * - * These entry points control the ThinLTO cache. The cache is intended to - * support incremental build, and thus needs to be persistent accross build. - * The client enabled the cache by supplying a path to an existing directory. - * The code generator will use this to store objects files that may be reused - * during a subsequent build. - * To avoid filling the disk space, a few knobs are provided: - * - The pruning interval limit the frequency at which the garbage collector - * will try to scan the cache directory to prune it from expired entries. - * Setting to -1 disable the pruning (default). - * - The pruning expiration time indicates to the garbage collector how old an - * entry needs to be to be removed. - * - Finally, the garbage collector can be instructed to prune the cache till - * the occupied space goes below a threshold. - * @{ - */ - -/** - * Sets the path to a directory to use as a cache storage for incremental build. - * Setting this activates caching. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_set_cache_dir(thinlto_code_gen_t cg, - const char *cache_dir); - -/** - * Sets the cache pruning interval (in seconds). A negative value disable the - * pruning. An unspecified default value will be applied, and a value of 0 will - * be ignored. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_set_cache_pruning_interval(thinlto_code_gen_t cg, - int interval); - -/** - * Sets the maximum cache size that can be persistent across build, in terms of - * percentage of the available space on the the disk. Set to 100 to indicate - * no limit, 50 to indicate that the cache size will not be left over half the - * available space. A value over 100 will be reduced to 100, a value of 0 will - * be ignored. An unspecified default value will be applied. - * - * The formula looks like: - * AvailableSpace = FreeSpace + ExistingCacheSize - * NewCacheSize = AvailableSpace * P/100 - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_set_final_cache_size_relative_to_available_space( - thinlto_code_gen_t cg, unsigned percentage); - -/** - * Sets the expiration (in seconds) for an entry in the cache. An unspecified - * default value will be applied. A value of 0 will be ignored. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_set_cache_entry_expiration(thinlto_code_gen_t cg, - unsigned expiration); - -/** - * @} - */ - -/** - * Sets the path to a directory to use as a storage for temporary bitcode files. - * The intention is to make the bitcode files available for debugging at various - * stage of the pipeline. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_set_savetemps_dir(thinlto_code_gen_t cg, - const char *save_temps_dir); - -/** - * Sets the cpu to generate code for. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_set_cpu(thinlto_code_gen_t cg, const char *cpu); - -/** - * Disable CodeGen, only run the stages till codegen and stop. The output will - * be bitcode. - * - * \since LTO_API_VERSION=19 - */ -extern void thinlto_codegen_disable_codegen(thinlto_code_gen_t cg, - lto_bool_t disable); - -/** - * Perform CodeGen only: disable all other stages. - * - * \since LTO_API_VERSION=19 - */ -extern void thinlto_codegen_set_codegen_only(thinlto_code_gen_t cg, - lto_bool_t codegen_only); - -/** - * Parse -mllvm style debug options. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_debug_options(const char *const *options, int number); - -/** - * Test if a module has support for ThinLTO linking. - * - * \since LTO_API_VERSION=18 - */ -extern lto_bool_t lto_module_is_thinlto(lto_module_t mod); - -/** - * Adds a symbol to the list of global symbols that must exist in the final - * generated code. If a function is not listed there, it might be inlined into - * every usage and optimized away. For every single module, the functions - * referenced from code outside of the ThinLTO modules need to be added here. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_add_must_preserve_symbol(thinlto_code_gen_t cg, - const char *name, - int length); - -/** - * Adds a symbol to the list of global symbols that are cross-referenced between - * ThinLTO files. If the ThinLTO CodeGenerator can ensure that every - * references from a ThinLTO module to this symbol is optimized away, then - * the symbol can be discarded. - * - * \since LTO_API_VERSION=18 - */ -extern void thinlto_codegen_add_cross_referenced_symbol(thinlto_code_gen_t cg, - const char *name, - int length); - -#ifdef __cplusplus -} -#endif - -/** - * @} - */ - -#endif /* LLVM_C_LTO_H */ diff --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h deleted file mode 100644 index 3f6bd00a..00000000 --- a/llvm/include/llvm/ADT/APFloat.h +++ /dev/null @@ -1,689 +0,0 @@ -//===- llvm/ADT/APFloat.h - Arbitrary Precision Floating Point ---*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// \brief -/// This file declares a class to represent arbitrary precision floating point -/// values and provide a variety of arithmetic operations on them. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_APFLOAT_H -#define LLVM_ADT_APFLOAT_H - -#include "llvm/ADT/APInt.h" - -namespace llvm { - -struct fltSemantics; -class APSInt; -class StringRef; - -template class SmallVectorImpl; - -/// Enum that represents what fraction of the LSB truncated bits of an fp number -/// represent. -/// -/// This essentially combines the roles of guard and sticky bits. -enum lostFraction { // Example of truncated bits: - lfExactlyZero, // 000000 - lfLessThanHalf, // 0xxxxx x's not all zero - lfExactlyHalf, // 100000 - lfMoreThanHalf // 1xxxxx x's not all zero -}; - -/// \brief A self-contained host- and target-independent arbitrary-precision -/// floating-point software implementation. -/// -/// APFloat uses bignum integer arithmetic as provided by static functions in -/// the APInt class. The library will work with bignum integers whose parts are -/// any unsigned type at least 16 bits wide, but 64 bits is recommended. -/// -/// Written for clarity rather than speed, in particular with a view to use in -/// the front-end of a cross compiler so that target arithmetic can be correctly -/// performed on the host. Performance should nonetheless be reasonable, -/// particularly for its intended use. It may be useful as a base -/// implementation for a run-time library during development of a faster -/// target-specific one. -/// -/// All 5 rounding modes in the IEEE-754R draft are handled correctly for all -/// implemented operations. Currently implemented operations are add, subtract, -/// multiply, divide, fused-multiply-add, conversion-to-float, -/// conversion-to-integer and conversion-from-integer. New rounding modes -/// (e.g. away from zero) can be added with three or four lines of code. -/// -/// Four formats are built-in: IEEE single precision, double precision, -/// quadruple precision, and x87 80-bit extended double (when operating with -/// full extended precision). Adding a new format that obeys IEEE semantics -/// only requires adding two lines of code: a declaration and definition of the -/// format. -/// -/// All operations return the status of that operation as an exception bit-mask, -/// so multiple operations can be done consecutively with their results or-ed -/// together. The returned status can be useful for compiler diagnostics; e.g., -/// inexact, underflow and overflow can be easily diagnosed on constant folding, -/// and compiler optimizers can determine what exceptions would be raised by -/// folding operations and optimize, or perhaps not optimize, accordingly. -/// -/// At present, underflow tininess is detected after rounding; it should be -/// straight forward to add support for the before-rounding case too. -/// -/// The library reads hexadecimal floating point numbers as per C99, and -/// correctly rounds if necessary according to the specified rounding mode. -/// Syntax is required to have been validated by the caller. It also converts -/// floating point numbers to hexadecimal text as per the C99 %a and %A -/// conversions. The output precision (or alternatively the natural minimal -/// precision) can be specified; if the requested precision is less than the -/// natural precision the output is correctly rounded for the specified rounding -/// mode. -/// -/// It also reads decimal floating point numbers and correctly rounds according -/// to the specified rounding mode. -/// -/// Conversion to decimal text is not currently implemented. -/// -/// Non-zero finite numbers are represented internally as a sign bit, a 16-bit -/// signed exponent, and the significand as an array of integer parts. After -/// normalization of a number of precision P the exponent is within the range of -/// the format, and if the number is not denormal the P-th bit of the -/// significand is set as an explicit integer bit. For denormals the most -/// significant bit is shifted right so that the exponent is maintained at the -/// format's minimum, so that the smallest denormal has just the least -/// significant bit of the significand set. The sign of zeroes and infinities -/// is significant; the exponent and significand of such numbers is not stored, -/// but has a known implicit (deterministic) value: 0 for the significands, 0 -/// for zero exponent, all 1 bits for infinity exponent. For NaNs the sign and -/// significand are deterministic, although not really meaningful, and preserved -/// in non-conversion operations. The exponent is implicitly all 1 bits. -/// -/// APFloat does not provide any exception handling beyond default exception -/// handling. We represent Signaling NaNs via IEEE-754R 2008 6.2.1 should clause -/// by encoding Signaling NaNs with the first bit of its trailing significand as -/// 0. -/// -/// TODO -/// ==== -/// -/// Some features that may or may not be worth adding: -/// -/// Binary to decimal conversion (hard). -/// -/// Optional ability to detect underflow tininess before rounding. -/// -/// New formats: x87 in single and double precision mode (IEEE apart from -/// extended exponent range) (hard). -/// -/// New operations: sqrt, IEEE remainder, C90 fmod, nexttoward. -/// -class APFloat { -public: - - /// A signed type to represent a floating point numbers unbiased exponent. - typedef signed short ExponentType; - - /// \name Floating Point Semantics. - /// @{ - - static const fltSemantics IEEEhalf; - static const fltSemantics IEEEsingle; - static const fltSemantics IEEEdouble; - static const fltSemantics IEEEquad; - static const fltSemantics PPCDoubleDouble; - static const fltSemantics x87DoubleExtended; - - /// A Pseudo fltsemantic used to construct APFloats that cannot conflict with - /// anything real. - static const fltSemantics Bogus; - - /// @} - - static unsigned int semanticsPrecision(const fltSemantics &); - static ExponentType semanticsMinExponent(const fltSemantics &); - static ExponentType semanticsMaxExponent(const fltSemantics &); - static unsigned int semanticsSizeInBits(const fltSemantics &); - - /// IEEE-754R 5.11: Floating Point Comparison Relations. - enum cmpResult { - cmpLessThan, - cmpEqual, - cmpGreaterThan, - cmpUnordered - }; - - /// IEEE-754R 4.3: Rounding-direction attributes. - enum roundingMode { - rmNearestTiesToEven, - rmTowardPositive, - rmTowardNegative, - rmTowardZero, - rmNearestTiesToAway - }; - - /// IEEE-754R 7: Default exception handling. - /// - /// opUnderflow or opOverflow are always returned or-ed with opInexact. - enum opStatus { - opOK = 0x00, - opInvalidOp = 0x01, - opDivByZero = 0x02, - opOverflow = 0x04, - opUnderflow = 0x08, - opInexact = 0x10 - }; - - /// Category of internally-represented number. - enum fltCategory { - fcInfinity, - fcNaN, - fcNormal, - fcZero - }; - - /// Convenience enum used to construct an uninitialized APFloat. - enum uninitializedTag { - uninitialized - }; - - /// \name Constructors - /// @{ - - APFloat(const fltSemantics &); // Default construct to 0.0 - APFloat(const fltSemantics &, StringRef); - APFloat(const fltSemantics &, integerPart); - APFloat(const fltSemantics &, uninitializedTag); - APFloat(const fltSemantics &, const APInt &); - explicit APFloat(double d); - explicit APFloat(float f); - APFloat(const APFloat &); - APFloat(APFloat &&); - ~APFloat(); - - /// @} - - /// \brief Returns whether this instance allocated memory. - bool needsCleanup() const { return partCount() > 1; } - - /// \name Convenience "constructors" - /// @{ - - /// Factory for Positive and Negative Zero. - /// - /// \param Negative True iff the number should be negative. - static APFloat getZero(const fltSemantics &Sem, bool Negative = false) { - APFloat Val(Sem, uninitialized); - Val.makeZero(Negative); - return Val; - } - - /// Factory for Positive and Negative Infinity. - /// - /// \param Negative True iff the number should be negative. - static APFloat getInf(const fltSemantics &Sem, bool Negative = false) { - APFloat Val(Sem, uninitialized); - Val.makeInf(Negative); - return Val; - } - - /// Factory for QNaN values. - /// - /// \param Negative - True iff the NaN generated should be negative. - /// \param type - The unspecified fill bits for creating the NaN, 0 by - /// default. The value is truncated as necessary. - static APFloat getNaN(const fltSemantics &Sem, bool Negative = false, - unsigned type = 0) { - if (type) { - APInt fill(64, type); - return getQNaN(Sem, Negative, &fill); - } else { - return getQNaN(Sem, Negative, nullptr); - } - } - - /// Factory for QNaN values. - static APFloat getQNaN(const fltSemantics &Sem, bool Negative = false, - const APInt *payload = nullptr) { - return makeNaN(Sem, false, Negative, payload); - } - - /// Factory for SNaN values. - static APFloat getSNaN(const fltSemantics &Sem, bool Negative = false, - const APInt *payload = nullptr) { - return makeNaN(Sem, true, Negative, payload); - } - - /// Returns the largest finite number in the given semantics. - /// - /// \param Negative - True iff the number should be negative - static APFloat getLargest(const fltSemantics &Sem, bool Negative = false); - - /// Returns the smallest (by magnitude) finite number in the given semantics. - /// Might be denormalized, which implies a relative loss of precision. - /// - /// \param Negative - True iff the number should be negative - static APFloat getSmallest(const fltSemantics &Sem, bool Negative = false); - - /// Returns the smallest (by magnitude) normalized finite number in the given - /// semantics. - /// - /// \param Negative - True iff the number should be negative - static APFloat getSmallestNormalized(const fltSemantics &Sem, - bool Negative = false); - - /// Returns a float which is bitcasted from an all one value int. - /// - /// \param BitWidth - Select float type - /// \param isIEEE - If 128 bit number, select between PPC and IEEE - static APFloat getAllOnesValue(unsigned BitWidth, bool isIEEE = false); - - /// Returns the size of the floating point number (in bits) in the given - /// semantics. - static unsigned getSizeInBits(const fltSemantics &Sem); - - /// @} - - /// Used to insert APFloat objects, or objects that contain APFloat objects, - /// into FoldingSets. - void Profile(FoldingSetNodeID &NID) const; - - /// \name Arithmetic - /// @{ - - opStatus add(const APFloat &, roundingMode); - opStatus subtract(const APFloat &, roundingMode); - opStatus multiply(const APFloat &, roundingMode); - opStatus divide(const APFloat &, roundingMode); - /// IEEE remainder. - opStatus remainder(const APFloat &); - /// C fmod, or llvm frem. - opStatus mod(const APFloat &); - opStatus fusedMultiplyAdd(const APFloat &, const APFloat &, roundingMode); - opStatus roundToIntegral(roundingMode); - /// IEEE-754R 5.3.1: nextUp/nextDown. - opStatus next(bool nextDown); - - /// \brief Operator+ overload which provides the default - /// \c nmNearestTiesToEven rounding mode and *no* error checking. - APFloat operator+(const APFloat &RHS) const { - APFloat Result = *this; - Result.add(RHS, rmNearestTiesToEven); - return Result; - } - - /// \brief Operator- overload which provides the default - /// \c nmNearestTiesToEven rounding mode and *no* error checking. - APFloat operator-(const APFloat &RHS) const { - APFloat Result = *this; - Result.subtract(RHS, rmNearestTiesToEven); - return Result; - } - - /// \brief Operator* overload which provides the default - /// \c nmNearestTiesToEven rounding mode and *no* error checking. - APFloat operator*(const APFloat &RHS) const { - APFloat Result = *this; - Result.multiply(RHS, rmNearestTiesToEven); - return Result; - } - - /// \brief Operator/ overload which provides the default - /// \c nmNearestTiesToEven rounding mode and *no* error checking. - APFloat operator/(const APFloat &RHS) const { - APFloat Result = *this; - Result.divide(RHS, rmNearestTiesToEven); - return Result; - } - - /// @} - - /// \name Sign operations. - /// @{ - - void changeSign(); - void clearSign(); - void copySign(const APFloat &); - - /// \brief A static helper to produce a copy of an APFloat value with its sign - /// copied from some other APFloat. - static APFloat copySign(APFloat Value, const APFloat &Sign) { - Value.copySign(Sign); - return Value; - } - - /// @} - - /// \name Conversions - /// @{ - - opStatus convert(const fltSemantics &, roundingMode, bool *); - opStatus convertToInteger(integerPart *, unsigned int, bool, roundingMode, - bool *) const; - opStatus convertToInteger(APSInt &, roundingMode, bool *) const; - opStatus convertFromAPInt(const APInt &, bool, roundingMode); - opStatus convertFromSignExtendedInteger(const integerPart *, unsigned int, - bool, roundingMode); - opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, - bool, roundingMode); - opStatus convertFromString(StringRef, roundingMode); - APInt bitcastToAPInt() const; - double convertToDouble() const; - float convertToFloat() const; - - /// @} - - /// The definition of equality is not straightforward for floating point, so - /// we won't use operator==. Use one of the following, or write whatever it - /// is you really mean. - bool operator==(const APFloat &) const = delete; - - /// IEEE comparison with another floating point number (NaNs compare - /// unordered, 0==-0). - cmpResult compare(const APFloat &) const; - - /// Bitwise comparison for equality (QNaNs compare equal, 0!=-0). - bool bitwiseIsEqual(const APFloat &) const; - - /// Write out a hexadecimal representation of the floating point value to DST, - /// which must be of sufficient size, in the C99 form [-]0xh.hhhhp[+-]d. - /// Return the number of characters written, excluding the terminating NUL. - unsigned int convertToHexString(char *dst, unsigned int hexDigits, - bool upperCase, roundingMode) const; - - /// \name IEEE-754R 5.7.2 General operations. - /// @{ - - /// IEEE-754R isSignMinus: Returns true if and only if the current value is - /// negative. - /// - /// This applies to zeros and NaNs as well. - bool isNegative() const { return sign; } - - /// IEEE-754R isNormal: Returns true if and only if the current value is normal. - /// - /// This implies that the current value of the float is not zero, subnormal, - /// infinite, or NaN following the definition of normality from IEEE-754R. - bool isNormal() const { return !isDenormal() && isFiniteNonZero(); } - - /// Returns true if and only if the current value is zero, subnormal, or - /// normal. - /// - /// This means that the value is not infinite or NaN. - bool isFinite() const { return !isNaN() && !isInfinity(); } - - /// Returns true if and only if the float is plus or minus zero. - bool isZero() const { return category == fcZero; } - - /// IEEE-754R isSubnormal(): Returns true if and only if the float is a - /// denormal. - bool isDenormal() const; - - /// IEEE-754R isInfinite(): Returns true if and only if the float is infinity. - bool isInfinity() const { return category == fcInfinity; } - - /// Returns true if and only if the float is a quiet or signaling NaN. - bool isNaN() const { return category == fcNaN; } - - /// Returns true if and only if the float is a signaling NaN. - bool isSignaling() const; - - /// @} - - /// \name Simple Queries - /// @{ - - fltCategory getCategory() const { return category; } - const fltSemantics &getSemantics() const { return *semantics; } - bool isNonZero() const { return category != fcZero; } - bool isFiniteNonZero() const { return isFinite() && !isZero(); } - bool isPosZero() const { return isZero() && !isNegative(); } - bool isNegZero() const { return isZero() && isNegative(); } - - /// Returns true if and only if the number has the smallest possible non-zero - /// magnitude in the current semantics. - bool isSmallest() const; - - /// Returns true if and only if the number has the largest possible finite - /// magnitude in the current semantics. - bool isLargest() const; - - /// Returns true if and only if the number is an exact integer. - bool isInteger() const; - - /// @} - - APFloat &operator=(const APFloat &); - APFloat &operator=(APFloat &&); - - /// \brief Overload to compute a hash code for an APFloat value. - /// - /// Note that the use of hash codes for floating point values is in general - /// frought with peril. Equality is hard to define for these values. For - /// example, should negative and positive zero hash to different codes? Are - /// they equal or not? This hash value implementation specifically - /// emphasizes producing different codes for different inputs in order to - /// be used in canonicalization and memoization. As such, equality is - /// bitwiseIsEqual, and 0 != -0. - friend hash_code hash_value(const APFloat &Arg); - - /// Converts this value into a decimal string. - /// - /// \param FormatPrecision The maximum number of digits of - /// precision to output. If there are fewer digits available, - /// zero padding will not be used unless the value is - /// integral and small enough to be expressed in - /// FormatPrecision digits. 0 means to use the natural - /// precision of the number. - /// \param FormatMaxPadding The maximum number of zeros to - /// consider inserting before falling back to scientific - /// notation. 0 means to always use scientific notation. - /// - /// Number Precision MaxPadding Result - /// ------ --------- ---------- ------ - /// 1.01E+4 5 2 10100 - /// 1.01E+4 4 2 1.01E+4 - /// 1.01E+4 5 1 1.01E+4 - /// 1.01E-2 5 2 0.0101 - /// 1.01E-2 4 2 0.0101 - /// 1.01E-2 4 1 1.01E-2 - void toString(SmallVectorImpl &Str, unsigned FormatPrecision = 0, - unsigned FormatMaxPadding = 3) const; - - /// If this value has an exact multiplicative inverse, store it in inv and - /// return true. - bool getExactInverse(APFloat *inv) const; - - /// \brief Enumeration of \c ilogb error results. - enum IlogbErrorKinds { - IEK_Zero = INT_MIN+1, - IEK_NaN = INT_MIN, - IEK_Inf = INT_MAX - }; - - /// \brief Returns the exponent of the internal representation of the APFloat. - /// - /// Because the radix of APFloat is 2, this is equivalent to floor(log2(x)). - /// For special APFloat values, this returns special error codes: - /// - /// NaN -> \c IEK_NaN - /// 0 -> \c IEK_Zero - /// Inf -> \c IEK_Inf - /// - friend int ilogb(const APFloat &Arg); - - /// \brief Returns: X * 2^Exp for integral exponents. - friend APFloat scalbn(APFloat X, int Exp, roundingMode); - - friend APFloat frexp(const APFloat &X, int &Exp, roundingMode); - -private: - - /// \name Simple Queries - /// @{ - - integerPart *significandParts(); - const integerPart *significandParts() const; - unsigned int partCount() const; - - /// @} - - /// \name Significand operations. - /// @{ - - integerPart addSignificand(const APFloat &); - integerPart subtractSignificand(const APFloat &, integerPart); - lostFraction addOrSubtractSignificand(const APFloat &, bool subtract); - lostFraction multiplySignificand(const APFloat &, const APFloat *); - lostFraction divideSignificand(const APFloat &); - void incrementSignificand(); - void initialize(const fltSemantics *); - void shiftSignificandLeft(unsigned int); - lostFraction shiftSignificandRight(unsigned int); - unsigned int significandLSB() const; - unsigned int significandMSB() const; - void zeroSignificand(); - /// Return true if the significand excluding the integral bit is all ones. - bool isSignificandAllOnes() const; - /// Return true if the significand excluding the integral bit is all zeros. - bool isSignificandAllZeros() const; - - /// @} - - /// \name Arithmetic on special values. - /// @{ - - opStatus addOrSubtractSpecials(const APFloat &, bool subtract); - opStatus divideSpecials(const APFloat &); - opStatus multiplySpecials(const APFloat &); - opStatus modSpecials(const APFloat &); - - /// @} - - /// \name Special value setters. - /// @{ - - void makeLargest(bool Neg = false); - void makeSmallest(bool Neg = false); - void makeNaN(bool SNaN = false, bool Neg = false, - const APInt *fill = nullptr); - static APFloat makeNaN(const fltSemantics &Sem, bool SNaN, bool Negative, - const APInt *fill); - void makeInf(bool Neg = false); - void makeZero(bool Neg = false); - void makeQuiet(); - - /// @} - - /// \name Miscellany - /// @{ - - bool convertFromStringSpecials(StringRef str); - opStatus normalize(roundingMode, lostFraction); - opStatus addOrSubtract(const APFloat &, roundingMode, bool subtract); - cmpResult compareAbsoluteValue(const APFloat &) const; - opStatus handleOverflow(roundingMode); - bool roundAwayFromZero(roundingMode, lostFraction, unsigned int) const; - opStatus convertToSignExtendedInteger(integerPart *, unsigned int, bool, - roundingMode, bool *) const; - opStatus convertFromUnsignedParts(const integerPart *, unsigned int, - roundingMode); - opStatus convertFromHexadecimalString(StringRef, roundingMode); - opStatus convertFromDecimalString(StringRef, roundingMode); - char *convertNormalToHexString(char *, unsigned int, bool, - roundingMode) const; - opStatus roundSignificandWithExponent(const integerPart *, unsigned int, int, - roundingMode); - - /// @} - - APInt convertHalfAPFloatToAPInt() const; - APInt convertFloatAPFloatToAPInt() const; - APInt convertDoubleAPFloatToAPInt() const; - APInt convertQuadrupleAPFloatToAPInt() const; - APInt convertF80LongDoubleAPFloatToAPInt() const; - APInt convertPPCDoubleDoubleAPFloatToAPInt() const; - void initFromAPInt(const fltSemantics *Sem, const APInt &api); - void initFromHalfAPInt(const APInt &api); - void initFromFloatAPInt(const APInt &api); - void initFromDoubleAPInt(const APInt &api); - void initFromQuadrupleAPInt(const APInt &api); - void initFromF80LongDoubleAPInt(const APInt &api); - void initFromPPCDoubleDoubleAPInt(const APInt &api); - - void assign(const APFloat &); - void copySignificand(const APFloat &); - void freeSignificand(); - - /// The semantics that this value obeys. - const fltSemantics *semantics; - - /// A binary fraction with an explicit integer bit. - /// - /// The significand must be at least one bit wider than the target precision. - union Significand { - integerPart part; - integerPart *parts; - } significand; - - /// The signed unbiased exponent of the value. - ExponentType exponent; - - /// What kind of floating point number this is. - /// - /// Only 2 bits are required, but VisualStudio incorrectly sign extends it. - /// Using the extra bit keeps it from failing under VisualStudio. - fltCategory category : 3; - - /// Sign bit of the number. - unsigned int sign : 1; -}; - -/// See friend declarations above. -/// -/// These additional declarations are required in order to compile LLVM with IBM -/// xlC compiler. -hash_code hash_value(const APFloat &Arg); -int ilogb(const APFloat &Arg); -APFloat scalbn(APFloat X, int Exp, APFloat::roundingMode); - -/// \brief Equivalent of C standard library function. -/// -/// While the C standard says Exp is an unspecified value for infinity and nan, -/// this returns INT_MAX for infinities, and INT_MIN for NaNs. -APFloat frexp(const APFloat &Val, int &Exp, APFloat::roundingMode RM); - -/// \brief Returns the absolute value of the argument. -inline APFloat abs(APFloat X) { - X.clearSign(); - return X; -} - -/// Implements IEEE minNum semantics. Returns the smaller of the 2 arguments if -/// both are not NaN. If either argument is a NaN, returns the other argument. -LLVM_READONLY -inline APFloat minnum(const APFloat &A, const APFloat &B) { - if (A.isNaN()) - return B; - if (B.isNaN()) - return A; - return (B.compare(A) == APFloat::cmpLessThan) ? B : A; -} - -/// Implements IEEE maxNum semantics. Returns the larger of the 2 arguments if -/// both are not NaN. If either argument is a NaN, returns the other argument. -LLVM_READONLY -inline APFloat maxnum(const APFloat &A, const APFloat &B) { - if (A.isNaN()) - return B; - if (B.isNaN()) - return A; - return (A.compare(B) == APFloat::cmpLessThan) ? B : A; -} - -} // namespace llvm - -#endif // LLVM_ADT_APFLOAT_H diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h deleted file mode 100644 index d77d1c7c..00000000 --- a/llvm/include/llvm/ADT/APInt.h +++ /dev/null @@ -1,1939 +0,0 @@ -//===-- llvm/ADT/APInt.h - For Arbitrary Precision Integer -----*- C++ -*--===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// \brief This file implements a class to represent arbitrary precision -/// integral constant values and operations on them. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_APINT_H -#define LLVM_ADT_APINT_H - -#include "llvm/Support/Compiler.h" -#include "llvm/Support/MathExtras.h" -#include -#include -#include -#include - -namespace llvm { -class FoldingSetNodeID; -class StringRef; -class hash_code; -class raw_ostream; - -template class SmallVectorImpl; -template class ArrayRef; - -// An unsigned host type used as a single part of a multi-part -// bignum. -typedef uint64_t integerPart; - -const unsigned int host_char_bit = 8; -const unsigned int integerPartWidth = - host_char_bit * static_cast(sizeof(integerPart)); - -//===----------------------------------------------------------------------===// -// APInt Class -//===----------------------------------------------------------------------===// - -/// \brief Class for arbitrary precision integers. -/// -/// APInt is a functional replacement for common case unsigned integer type like -/// "unsigned", "unsigned long" or "uint64_t", but also allows non-byte-width -/// integer sizes and large integer value types such as 3-bits, 15-bits, or more -/// than 64-bits of precision. APInt provides a variety of arithmetic operators -/// and methods to manipulate integer values of any bit-width. It supports both -/// the typical integer arithmetic and comparison operations as well as bitwise -/// manipulation. -/// -/// The class has several invariants worth noting: -/// * All bit, byte, and word positions are zero-based. -/// * Once the bit width is set, it doesn't change except by the Truncate, -/// SignExtend, or ZeroExtend operations. -/// * All binary operators must be on APInt instances of the same bit width. -/// Attempting to use these operators on instances with different bit -/// widths will yield an assertion. -/// * The value is stored canonically as an unsigned value. For operations -/// where it makes a difference, there are both signed and unsigned variants -/// of the operation. For example, sdiv and udiv. However, because the bit -/// widths must be the same, operations such as Mul and Add produce the same -/// results regardless of whether the values are interpreted as signed or -/// not. -/// * In general, the class tries to follow the style of computation that LLVM -/// uses in its IR. This simplifies its use for LLVM. -/// -class APInt { - unsigned BitWidth; ///< The number of bits in this APInt. - - /// This union is used to store the integer value. When the - /// integer bit-width <= 64, it uses VAL, otherwise it uses pVal. - union { - uint64_t VAL; ///< Used to store the <= 64 bits integer value. - uint64_t *pVal; ///< Used to store the >64 bits integer value. - }; - - /// This enum is used to hold the constants we needed for APInt. - enum { - /// Bits in a word - APINT_BITS_PER_WORD = - static_cast(sizeof(uint64_t)) * CHAR_BIT, - /// Byte size of a word - APINT_WORD_SIZE = static_cast(sizeof(uint64_t)) - }; - - friend struct DenseMapAPIntKeyInfo; - - /// \brief Fast internal constructor - /// - /// This constructor is used only internally for speed of construction of - /// temporaries. It is unsafe for general use so it is not public. - APInt(uint64_t *val, unsigned bits) : BitWidth(bits), pVal(val) {} - - /// \brief Determine if this APInt just has one word to store value. - /// - /// \returns true if the number of bits <= 64, false otherwise. - bool isSingleWord() const { return BitWidth <= APINT_BITS_PER_WORD; } - - /// \brief Determine which word a bit is in. - /// - /// \returns the word position for the specified bit position. - static unsigned whichWord(unsigned bitPosition) { - return bitPosition / APINT_BITS_PER_WORD; - } - - /// \brief Determine which bit in a word a bit is in. - /// - /// \returns the bit position in a word for the specified bit position - /// in the APInt. - static unsigned whichBit(unsigned bitPosition) { - return bitPosition % APINT_BITS_PER_WORD; - } - - /// \brief Get a single bit mask. - /// - /// \returns a uint64_t with only bit at "whichBit(bitPosition)" set - /// This method generates and returns a uint64_t (word) mask for a single - /// bit at a specific bit position. This is used to mask the bit in the - /// corresponding word. - static uint64_t maskBit(unsigned bitPosition) { - return 1ULL << whichBit(bitPosition); - } - - /// \brief Clear unused high order bits - /// - /// This method is used internally to clear the top "N" bits in the high order - /// word that are not used by the APInt. This is needed after the most - /// significant word is assigned a value to ensure that those bits are - /// zero'd out. - APInt &clearUnusedBits() { - // Compute how many bits are used in the final word - unsigned wordBits = BitWidth % APINT_BITS_PER_WORD; - if (wordBits == 0) - // If all bits are used, we want to leave the value alone. This also - // avoids the undefined behavior of >> when the shift is the same size as - // the word size (64). - return *this; - - // Mask out the high bits. - uint64_t mask = ~uint64_t(0ULL) >> (APINT_BITS_PER_WORD - wordBits); - if (isSingleWord()) - VAL &= mask; - else - pVal[getNumWords() - 1] &= mask; - return *this; - } - - /// \brief Get the word corresponding to a bit position - /// \returns the corresponding word for the specified bit position. - uint64_t getWord(unsigned bitPosition) const { - return isSingleWord() ? VAL : pVal[whichWord(bitPosition)]; - } - - /// \brief Convert a char array into an APInt - /// - /// \param radix 2, 8, 10, 16, or 36 - /// Converts a string into a number. The string must be non-empty - /// and well-formed as a number of the given base. The bit-width - /// must be sufficient to hold the result. - /// - /// This is used by the constructors that take string arguments. - /// - /// StringRef::getAsInteger is superficially similar but (1) does - /// not assume that the string is well-formed and (2) grows the - /// result to hold the input. - void fromString(unsigned numBits, StringRef str, uint8_t radix); - - /// \brief An internal division function for dividing APInts. - /// - /// This is used by the toString method to divide by the radix. It simply - /// provides a more convenient form of divide for internal use since KnuthDiv - /// has specific constraints on its inputs. If those constraints are not met - /// then it provides a simpler form of divide. - static void divide(const APInt &LHS, unsigned lhsWords, const APInt &RHS, - unsigned rhsWords, APInt *Quotient, APInt *Remainder); - - /// out-of-line slow case for inline constructor - void initSlowCase(uint64_t val, bool isSigned); - - /// shared code between two array constructors - void initFromArray(ArrayRef array); - - /// out-of-line slow case for inline copy constructor - void initSlowCase(const APInt &that); - - /// out-of-line slow case for shl - APInt shlSlowCase(unsigned shiftAmt) const; - - /// out-of-line slow case for operator& - APInt AndSlowCase(const APInt &RHS) const; - - /// out-of-line slow case for operator| - APInt OrSlowCase(const APInt &RHS) const; - - /// out-of-line slow case for operator^ - APInt XorSlowCase(const APInt &RHS) const; - - /// out-of-line slow case for operator= - APInt &AssignSlowCase(const APInt &RHS); - - /// out-of-line slow case for operator== - bool EqualSlowCase(const APInt &RHS) const; - - /// out-of-line slow case for operator== - bool EqualSlowCase(uint64_t Val) const; - - /// out-of-line slow case for countLeadingZeros - unsigned countLeadingZerosSlowCase() const; - - /// out-of-line slow case for countTrailingOnes - unsigned countTrailingOnesSlowCase() const; - - /// out-of-line slow case for countPopulation - unsigned countPopulationSlowCase() const; - -public: - /// \name Constructors - /// @{ - - /// \brief Create a new APInt of numBits width, initialized as val. - /// - /// If isSigned is true then val is treated as if it were a signed value - /// (i.e. as an int64_t) and the appropriate sign extension to the bit width - /// will be done. Otherwise, no sign extension occurs (high order bits beyond - /// the range of val are zero filled). - /// - /// \param numBits the bit width of the constructed APInt - /// \param val the initial value of the APInt - /// \param isSigned how to treat signedness of val - APInt(unsigned numBits, uint64_t val, bool isSigned = false) - : BitWidth(numBits), VAL(0) { - assert(BitWidth && "bitwidth too small"); - if (isSingleWord()) - VAL = val; - else - initSlowCase(val, isSigned); - clearUnusedBits(); - } - - /// \brief Construct an APInt of numBits width, initialized as bigVal[]. - /// - /// Note that bigVal.size() can be smaller or larger than the corresponding - /// bit width but any extraneous bits will be dropped. - /// - /// \param numBits the bit width of the constructed APInt - /// \param bigVal a sequence of words to form the initial value of the APInt - APInt(unsigned numBits, ArrayRef bigVal); - - /// Equivalent to APInt(numBits, ArrayRef(bigVal, numWords)), but - /// deprecated because this constructor is prone to ambiguity with the - /// APInt(unsigned, uint64_t, bool) constructor. - /// - /// If this overload is ever deleted, care should be taken to prevent calls - /// from being incorrectly captured by the APInt(unsigned, uint64_t, bool) - /// constructor. - APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); - - /// \brief Construct an APInt from a string representation. - /// - /// This constructor interprets the string \p str in the given radix. The - /// interpretation stops when the first character that is not suitable for the - /// radix is encountered, or the end of the string. Acceptable radix values - /// are 2, 8, 10, 16, and 36. It is an error for the value implied by the - /// string to require more bits than numBits. - /// - /// \param numBits the bit width of the constructed APInt - /// \param str the string to be interpreted - /// \param radix the radix to use for the conversion - APInt(unsigned numBits, StringRef str, uint8_t radix); - - /// Simply makes *this a copy of that. - /// @brief Copy Constructor. - APInt(const APInt &that) : BitWidth(that.BitWidth), VAL(0) { - if (isSingleWord()) - VAL = that.VAL; - else - initSlowCase(that); - } - - /// \brief Move Constructor. - APInt(APInt &&that) : BitWidth(that.BitWidth), VAL(that.VAL) { - that.BitWidth = 0; - } - - /// \brief Destructor. - ~APInt() { - if (needsCleanup()) - delete[] pVal; - } - - /// \brief Default constructor that creates an uninteresting APInt - /// representing a 1-bit zero value. - /// - /// This is useful for object deserialization (pair this with the static - /// method Read). - explicit APInt() : BitWidth(1), VAL(0) {} - - /// \brief Returns whether this instance allocated memory. - bool needsCleanup() const { return !isSingleWord(); } - - /// Used to insert APInt objects, or objects that contain APInt objects, into - /// FoldingSets. - void Profile(FoldingSetNodeID &id) const; - - /// @} - /// \name Value Tests - /// @{ - - /// \brief Determine sign of this APInt. - /// - /// This tests the high bit of this APInt to determine if it is set. - /// - /// \returns true if this APInt is negative, false otherwise - bool isNegative() const { return (*this)[BitWidth - 1]; } - - /// \brief Determine if this APInt Value is non-negative (>= 0) - /// - /// This tests the high bit of the APInt to determine if it is unset. - bool isNonNegative() const { return !isNegative(); } - - /// \brief Determine if this APInt Value is positive. - /// - /// This tests if the value of this APInt is positive (> 0). Note - /// that 0 is not a positive value. - /// - /// \returns true if this APInt is positive. - bool isStrictlyPositive() const { return isNonNegative() && !!*this; } - - /// \brief Determine if all bits are set - /// - /// This checks to see if the value has all bits of the APInt are set or not. - bool isAllOnesValue() const { - if (isSingleWord()) - return VAL == ~integerPart(0) >> (APINT_BITS_PER_WORD - BitWidth); - return countPopulationSlowCase() == BitWidth; - } - - /// \brief Determine if this is the largest unsigned value. - /// - /// This checks to see if the value of this APInt is the maximum unsigned - /// value for the APInt's bit width. - bool isMaxValue() const { return isAllOnesValue(); } - - /// \brief Determine if this is the largest signed value. - /// - /// This checks to see if the value of this APInt is the maximum signed - /// value for the APInt's bit width. - bool isMaxSignedValue() const { - return !isNegative() && countPopulation() == BitWidth - 1; - } - - /// \brief Determine if this is the smallest unsigned value. - /// - /// This checks to see if the value of this APInt is the minimum unsigned - /// value for the APInt's bit width. - bool isMinValue() const { return !*this; } - - /// \brief Determine if this is the smallest signed value. - /// - /// This checks to see if the value of this APInt is the minimum signed - /// value for the APInt's bit width. - bool isMinSignedValue() const { - return isNegative() && isPowerOf2(); - } - - /// \brief Check if this APInt has an N-bits unsigned integer value. - bool isIntN(unsigned N) const { - assert(N && "N == 0 ???"); - return getActiveBits() <= N; - } - - /// \brief Check if this APInt has an N-bits signed integer value. - bool isSignedIntN(unsigned N) const { - assert(N && "N == 0 ???"); - return getMinSignedBits() <= N; - } - - /// \brief Check if this APInt's value is a power of two greater than zero. - /// - /// \returns true if the argument APInt value is a power of two > 0. - bool isPowerOf2() const { - if (isSingleWord()) - return isPowerOf2_64(VAL); - return countPopulationSlowCase() == 1; - } - - /// \brief Check if the APInt's value is returned by getSignBit. - /// - /// \returns true if this is the value returned by getSignBit. - bool isSignBit() const { return isMinSignedValue(); } - - /// \brief Convert APInt to a boolean value. - /// - /// This converts the APInt to a boolean value as a test against zero. - bool getBoolValue() const { return !!*this; } - - /// If this value is smaller than the specified limit, return it, otherwise - /// return the limit value. This causes the value to saturate to the limit. - uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const { - return (getActiveBits() > 64 || getZExtValue() > Limit) ? Limit - : getZExtValue(); - } - - /// \brief Check if the APInt consists of a repeated bit pattern. - /// - /// e.g. 0x01010101 satisfies isSplat(8). - /// \param SplatSizeInBits The size of the pattern in bits. Must divide bit - /// width without remainder. - bool isSplat(unsigned SplatSizeInBits) const; - - /// @} - /// \name Value Generators - /// @{ - - /// \brief Gets maximum unsigned value of APInt for specific bit width. - static APInt getMaxValue(unsigned numBits) { - return getAllOnesValue(numBits); - } - - /// \brief Gets maximum signed value of APInt for a specific bit width. - static APInt getSignedMaxValue(unsigned numBits) { - APInt API = getAllOnesValue(numBits); - API.clearBit(numBits - 1); - return API; - } - - /// \brief Gets minimum unsigned value of APInt for a specific bit width. - static APInt getMinValue(unsigned numBits) { return APInt(numBits, 0); } - - /// \brief Gets minimum signed value of APInt for a specific bit width. - static APInt getSignedMinValue(unsigned numBits) { - APInt API(numBits, 0); - API.setBit(numBits - 1); - return API; - } - - /// \brief Get the SignBit for a specific bit width. - /// - /// This is just a wrapper function of getSignedMinValue(), and it helps code - /// readability when we want to get a SignBit. - static APInt getSignBit(unsigned BitWidth) { - return getSignedMinValue(BitWidth); - } - - /// \brief Get the all-ones value. - /// - /// \returns the all-ones value for an APInt of the specified bit-width. - static APInt getAllOnesValue(unsigned numBits) { - return APInt(numBits, UINT64_MAX, true); - } - - /// \brief Get the '0' value. - /// - /// \returns the '0' value for an APInt of the specified bit-width. - static APInt getNullValue(unsigned numBits) { return APInt(numBits, 0); } - - /// \brief Compute an APInt containing numBits highbits from this APInt. - /// - /// Get an APInt with the same BitWidth as this APInt, just zero mask - /// the low bits and right shift to the least significant bit. - /// - /// \returns the high "numBits" bits of this APInt. - APInt getHiBits(unsigned numBits) const; - - /// \brief Compute an APInt containing numBits lowbits from this APInt. - /// - /// Get an APInt with the same BitWidth as this APInt, just zero mask - /// the high bits. - /// - /// \returns the low "numBits" bits of this APInt. - APInt getLoBits(unsigned numBits) const; - - /// \brief Return an APInt with exactly one bit set in the result. - static APInt getOneBitSet(unsigned numBits, unsigned BitNo) { - APInt Res(numBits, 0); - Res.setBit(BitNo); - return Res; - } - - /// \brief Get a value with a block of bits set. - /// - /// Constructs an APInt value that has a contiguous range of bits set. The - /// bits from loBit (inclusive) to hiBit (exclusive) will be set. All other - /// bits will be zero. For example, with parameters(32, 0, 16) you would get - /// 0x0000FFFF. If hiBit is less than loBit then the set bits "wrap". For - /// example, with parameters (32, 28, 4), you would get 0xF000000F. - /// - /// \param numBits the intended bit width of the result - /// \param loBit the index of the lowest bit set. - /// \param hiBit the index of the highest bit set. - /// - /// \returns An APInt value with the requested bits set. - static APInt getBitsSet(unsigned numBits, unsigned loBit, unsigned hiBit) { - assert(hiBit <= numBits && "hiBit out of range"); - assert(loBit < numBits && "loBit out of range"); - if (hiBit < loBit) - return getLowBitsSet(numBits, hiBit) | - getHighBitsSet(numBits, numBits - loBit); - return getLowBitsSet(numBits, hiBit - loBit).shl(loBit); - } - - /// \brief Get a value with high bits set - /// - /// Constructs an APInt value that has the top hiBitsSet bits set. - /// - /// \param numBits the bitwidth of the result - /// \param hiBitsSet the number of high-order bits set in the result. - static APInt getHighBitsSet(unsigned numBits, unsigned hiBitsSet) { - assert(hiBitsSet <= numBits && "Too many bits to set!"); - // Handle a degenerate case, to avoid shifting by word size - if (hiBitsSet == 0) - return APInt(numBits, 0); - unsigned shiftAmt = numBits - hiBitsSet; - // For small values, return quickly - if (numBits <= APINT_BITS_PER_WORD) - return APInt(numBits, ~0ULL << shiftAmt); - return getAllOnesValue(numBits).shl(shiftAmt); - } - - /// \brief Get a value with low bits set - /// - /// Constructs an APInt value that has the bottom loBitsSet bits set. - /// - /// \param numBits the bitwidth of the result - /// \param loBitsSet the number of low-order bits set in the result. - static APInt getLowBitsSet(unsigned numBits, unsigned loBitsSet) { - assert(loBitsSet <= numBits && "Too many bits to set!"); - // Handle a degenerate case, to avoid shifting by word size - if (loBitsSet == 0) - return APInt(numBits, 0); - if (loBitsSet == APINT_BITS_PER_WORD) - return APInt(numBits, UINT64_MAX); - // For small values, return quickly. - if (loBitsSet <= APINT_BITS_PER_WORD) - return APInt(numBits, UINT64_MAX >> (APINT_BITS_PER_WORD - loBitsSet)); - return getAllOnesValue(numBits).lshr(numBits - loBitsSet); - } - - /// \brief Return a value containing V broadcasted over NewLen bits. - static APInt getSplat(unsigned NewLen, const APInt &V) { - assert(NewLen >= V.getBitWidth() && "Can't splat to smaller bit width!"); - - APInt Val = V.zextOrSelf(NewLen); - for (unsigned I = V.getBitWidth(); I < NewLen; I <<= 1) - Val |= Val << I; - - return Val; - } - - /// \brief Determine if two APInts have the same value, after zero-extending - /// one of them (if needed!) to ensure that the bit-widths match. - static bool isSameValue(const APInt &I1, const APInt &I2) { - if (I1.getBitWidth() == I2.getBitWidth()) - return I1 == I2; - - if (I1.getBitWidth() > I2.getBitWidth()) - return I1 == I2.zext(I1.getBitWidth()); - - return I1.zext(I2.getBitWidth()) == I2; - } - - /// \brief Overload to compute a hash_code for an APInt value. - friend hash_code hash_value(const APInt &Arg); - - /// This function returns a pointer to the internal storage of the APInt. - /// This is useful for writing out the APInt in binary form without any - /// conversions. - const uint64_t *getRawData() const { - if (isSingleWord()) - return &VAL; - return &pVal[0]; - } - - /// @} - /// \name Unary Operators - /// @{ - - /// \brief Postfix increment operator. - /// - /// \returns a new APInt value representing *this incremented by one - const APInt operator++(int) { - APInt API(*this); - ++(*this); - return API; - } - - /// \brief Prefix increment operator. - /// - /// \returns *this incremented by one - APInt &operator++(); - - /// \brief Postfix decrement operator. - /// - /// \returns a new APInt representing *this decremented by one. - const APInt operator--(int) { - APInt API(*this); - --(*this); - return API; - } - - /// \brief Prefix decrement operator. - /// - /// \returns *this decremented by one. - APInt &operator--(); - - /// \brief Unary bitwise complement operator. - /// - /// Performs a bitwise complement operation on this APInt. - /// - /// \returns an APInt that is the bitwise complement of *this - APInt operator~() const { - APInt Result(*this); - Result.flipAllBits(); - return Result; - } - - /// \brief Unary negation operator - /// - /// Negates *this using two's complement logic. - /// - /// \returns An APInt value representing the negation of *this. - APInt operator-() const { - APInt Result(*this); - Result.flipAllBits(); - ++Result; - return Result; - } - - /// \brief Logical negation operator. - /// - /// Performs logical negation operation on this APInt. - /// - /// \returns true if *this is zero, false otherwise. - bool operator!() const { - if (isSingleWord()) - return !VAL; - - for (unsigned i = 0; i != getNumWords(); ++i) - if (pVal[i]) - return false; - return true; - } - - /// @} - /// \name Assignment Operators - /// @{ - - /// \brief Copy assignment operator. - /// - /// \returns *this after assignment of RHS. - APInt &operator=(const APInt &RHS) { - // If the bitwidths are the same, we can avoid mucking with memory - if (isSingleWord() && RHS.isSingleWord()) { - VAL = RHS.VAL; - BitWidth = RHS.BitWidth; - return clearUnusedBits(); - } - - return AssignSlowCase(RHS); - } - - /// @brief Move assignment operator. - APInt &operator=(APInt &&that) { - if (!isSingleWord()) { - // The MSVC STL shipped in 2013 requires that self move assignment be a - // no-op. Otherwise algorithms like stable_sort will produce answers - // where half of the output is left in a moved-from state. - if (this == &that) - return *this; - delete[] pVal; - } - - // Use memcpy so that type based alias analysis sees both VAL and pVal - // as modified. - memcpy(&VAL, &that.VAL, sizeof(uint64_t)); - - // If 'this == &that', avoid zeroing our own bitwidth by storing to 'that' - // first. - unsigned ThatBitWidth = that.BitWidth; - that.BitWidth = 0; - BitWidth = ThatBitWidth; - - return *this; - } - - /// \brief Assignment operator. - /// - /// The RHS value is assigned to *this. If the significant bits in RHS exceed - /// the bit width, the excess bits are truncated. If the bit width is larger - /// than 64, the value is zero filled in the unspecified high order bits. - /// - /// \returns *this after assignment of RHS value. - APInt &operator=(uint64_t RHS); - - /// \brief Bitwise AND assignment operator. - /// - /// Performs a bitwise AND operation on this APInt and RHS. The result is - /// assigned to *this. - /// - /// \returns *this after ANDing with RHS. - APInt &operator&=(const APInt &RHS); - - /// \brief Bitwise OR assignment operator. - /// - /// Performs a bitwise OR operation on this APInt and RHS. The result is - /// assigned *this; - /// - /// \returns *this after ORing with RHS. - APInt &operator|=(const APInt &RHS); - - /// \brief Bitwise OR assignment operator. - /// - /// Performs a bitwise OR operation on this APInt and RHS. RHS is - /// logically zero-extended or truncated to match the bit-width of - /// the LHS. - APInt &operator|=(uint64_t RHS) { - if (isSingleWord()) { - VAL |= RHS; - clearUnusedBits(); - } else { - pVal[0] |= RHS; - } - return *this; - } - - /// \brief Bitwise XOR assignment operator. - /// - /// Performs a bitwise XOR operation on this APInt and RHS. The result is - /// assigned to *this. - /// - /// \returns *this after XORing with RHS. - APInt &operator^=(const APInt &RHS); - - /// \brief Multiplication assignment operator. - /// - /// Multiplies this APInt by RHS and assigns the result to *this. - /// - /// \returns *this - APInt &operator*=(const APInt &RHS); - - /// \brief Addition assignment operator. - /// - /// Adds RHS to *this and assigns the result to *this. - /// - /// \returns *this - APInt &operator+=(const APInt &RHS); - - /// \brief Subtraction assignment operator. - /// - /// Subtracts RHS from *this and assigns the result to *this. - /// - /// \returns *this - APInt &operator-=(const APInt &RHS); - - /// \brief Left-shift assignment function. - /// - /// Shifts *this left by shiftAmt and assigns the result to *this. - /// - /// \returns *this after shifting left by shiftAmt - APInt &operator<<=(unsigned shiftAmt) { - *this = shl(shiftAmt); - return *this; - } - - /// @} - /// \name Binary Operators - /// @{ - - /// \brief Bitwise AND operator. - /// - /// Performs a bitwise AND operation on *this and RHS. - /// - /// \returns An APInt value representing the bitwise AND of *this and RHS. - APInt operator&(const APInt &RHS) const { - assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); - if (isSingleWord()) - return APInt(getBitWidth(), VAL & RHS.VAL); - return AndSlowCase(RHS); - } - APInt LLVM_ATTRIBUTE_UNUSED_RESULT And(const APInt &RHS) const { - return this->operator&(RHS); - } - - /// \brief Bitwise OR operator. - /// - /// Performs a bitwise OR operation on *this and RHS. - /// - /// \returns An APInt value representing the bitwise OR of *this and RHS. - APInt operator|(const APInt &RHS) const { - assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); - if (isSingleWord()) - return APInt(getBitWidth(), VAL | RHS.VAL); - return OrSlowCase(RHS); - } - - /// \brief Bitwise OR function. - /// - /// Performs a bitwise or on *this and RHS. This is implemented by simply - /// calling operator|. - /// - /// \returns An APInt value representing the bitwise OR of *this and RHS. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT Or(const APInt &RHS) const { - return this->operator|(RHS); - } - - /// \brief Bitwise XOR operator. - /// - /// Performs a bitwise XOR operation on *this and RHS. - /// - /// \returns An APInt value representing the bitwise XOR of *this and RHS. - APInt operator^(const APInt &RHS) const { - assert(BitWidth == RHS.BitWidth && "Bit widths must be the same"); - if (isSingleWord()) - return APInt(BitWidth, VAL ^ RHS.VAL); - return XorSlowCase(RHS); - } - - /// \brief Bitwise XOR function. - /// - /// Performs a bitwise XOR operation on *this and RHS. This is implemented - /// through the usage of operator^. - /// - /// \returns An APInt value representing the bitwise XOR of *this and RHS. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT Xor(const APInt &RHS) const { - return this->operator^(RHS); - } - - /// \brief Multiplication operator. - /// - /// Multiplies this APInt by RHS and returns the result. - APInt operator*(const APInt &RHS) const; - - /// \brief Addition operator. - /// - /// Adds RHS to this APInt and returns the result. - APInt operator+(const APInt &RHS) const; - APInt operator+(uint64_t RHS) const; - - /// \brief Subtraction operator. - /// - /// Subtracts RHS from this APInt and returns the result. - APInt operator-(const APInt &RHS) const; - APInt operator-(uint64_t RHS) const; - - /// \brief Left logical shift operator. - /// - /// Shifts this APInt left by \p Bits and returns the result. - APInt operator<<(unsigned Bits) const { return shl(Bits); } - - /// \brief Left logical shift operator. - /// - /// Shifts this APInt left by \p Bits and returns the result. - APInt operator<<(const APInt &Bits) const { return shl(Bits); } - - /// \brief Arithmetic right-shift function. - /// - /// Arithmetic right-shift this APInt by shiftAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT ashr(unsigned shiftAmt) const; - - /// \brief Logical right-shift function. - /// - /// Logical right-shift this APInt by shiftAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT lshr(unsigned shiftAmt) const; - - /// \brief Left-shift function. - /// - /// Left-shift this APInt by shiftAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT shl(unsigned shiftAmt) const { - assert(shiftAmt <= BitWidth && "Invalid shift amount"); - if (isSingleWord()) { - if (shiftAmt >= BitWidth) - return APInt(BitWidth, 0); // avoid undefined shift results - return APInt(BitWidth, VAL << shiftAmt); - } - return shlSlowCase(shiftAmt); - } - - /// \brief Rotate left by rotateAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT rotl(unsigned rotateAmt) const; - - /// \brief Rotate right by rotateAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT rotr(unsigned rotateAmt) const; - - /// \brief Arithmetic right-shift function. - /// - /// Arithmetic right-shift this APInt by shiftAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT ashr(const APInt &shiftAmt) const; - - /// \brief Logical right-shift function. - /// - /// Logical right-shift this APInt by shiftAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT lshr(const APInt &shiftAmt) const; - - /// \brief Left-shift function. - /// - /// Left-shift this APInt by shiftAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT shl(const APInt &shiftAmt) const; - - /// \brief Rotate left by rotateAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT rotl(const APInt &rotateAmt) const; - - /// \brief Rotate right by rotateAmt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT rotr(const APInt &rotateAmt) const; - - /// \brief Unsigned division operation. - /// - /// Perform an unsigned divide operation on this APInt by RHS. Both this and - /// RHS are treated as unsigned quantities for purposes of this division. - /// - /// \returns a new APInt value containing the division result - APInt LLVM_ATTRIBUTE_UNUSED_RESULT udiv(const APInt &RHS) const; - - /// \brief Signed division function for APInt. - /// - /// Signed divide this APInt by APInt RHS. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT sdiv(const APInt &RHS) const; - - /// \brief Unsigned remainder operation. - /// - /// Perform an unsigned remainder operation on this APInt with RHS being the - /// divisor. Both this and RHS are treated as unsigned quantities for purposes - /// of this operation. Note that this is a true remainder operation and not a - /// modulo operation because the sign follows the sign of the dividend which - /// is *this. - /// - /// \returns a new APInt value containing the remainder result - APInt LLVM_ATTRIBUTE_UNUSED_RESULT urem(const APInt &RHS) const; - - /// \brief Function for signed remainder operation. - /// - /// Signed remainder operation on APInt. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT srem(const APInt &RHS) const; - - /// \brief Dual division/remainder interface. - /// - /// Sometimes it is convenient to divide two APInt values and obtain both the - /// quotient and remainder. This function does both operations in the same - /// computation making it a little more efficient. The pair of input arguments - /// may overlap with the pair of output arguments. It is safe to call - /// udivrem(X, Y, X, Y), for example. - static void udivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, - APInt &Remainder); - - static void sdivrem(const APInt &LHS, const APInt &RHS, APInt &Quotient, - APInt &Remainder); - - // Operations that return overflow indicators. - APInt sadd_ov(const APInt &RHS, bool &Overflow) const; - APInt uadd_ov(const APInt &RHS, bool &Overflow) const; - APInt ssub_ov(const APInt &RHS, bool &Overflow) const; - APInt usub_ov(const APInt &RHS, bool &Overflow) const; - APInt sdiv_ov(const APInt &RHS, bool &Overflow) const; - APInt smul_ov(const APInt &RHS, bool &Overflow) const; - APInt umul_ov(const APInt &RHS, bool &Overflow) const; - APInt sshl_ov(const APInt &Amt, bool &Overflow) const; - APInt ushl_ov(const APInt &Amt, bool &Overflow) const; - - /// \brief Array-indexing support. - /// - /// \returns the bit value at bitPosition - bool operator[](unsigned bitPosition) const { - assert(bitPosition < getBitWidth() && "Bit position out of bounds!"); - return (maskBit(bitPosition) & - (isSingleWord() ? VAL : pVal[whichWord(bitPosition)])) != - 0; - } - - /// @} - /// \name Comparison Operators - /// @{ - - /// \brief Equality operator. - /// - /// Compares this APInt with RHS for the validity of the equality - /// relationship. - bool operator==(const APInt &RHS) const { - assert(BitWidth == RHS.BitWidth && "Comparison requires equal bit widths"); - if (isSingleWord()) - return VAL == RHS.VAL; - return EqualSlowCase(RHS); - } - - /// \brief Equality operator. - /// - /// Compares this APInt with a uint64_t for the validity of the equality - /// relationship. - /// - /// \returns true if *this == Val - bool operator==(uint64_t Val) const { - if (isSingleWord()) - return VAL == Val; - return EqualSlowCase(Val); - } - - /// \brief Equality comparison. - /// - /// Compares this APInt with RHS for the validity of the equality - /// relationship. - /// - /// \returns true if *this == Val - bool eq(const APInt &RHS) const { return (*this) == RHS; } - - /// \brief Inequality operator. - /// - /// Compares this APInt with RHS for the validity of the inequality - /// relationship. - /// - /// \returns true if *this != Val - bool operator!=(const APInt &RHS) const { return !((*this) == RHS); } - - /// \brief Inequality operator. - /// - /// Compares this APInt with a uint64_t for the validity of the inequality - /// relationship. - /// - /// \returns true if *this != Val - bool operator!=(uint64_t Val) const { return !((*this) == Val); } - - /// \brief Inequality comparison - /// - /// Compares this APInt with RHS for the validity of the inequality - /// relationship. - /// - /// \returns true if *this != Val - bool ne(const APInt &RHS) const { return !((*this) == RHS); } - - /// \brief Unsigned less than comparison - /// - /// Regards both *this and RHS as unsigned quantities and compares them for - /// the validity of the less-than relationship. - /// - /// \returns true if *this < RHS when both are considered unsigned. - bool ult(const APInt &RHS) const; - - /// \brief Unsigned less than comparison - /// - /// Regards both *this as an unsigned quantity and compares it with RHS for - /// the validity of the less-than relationship. - /// - /// \returns true if *this < RHS when considered unsigned. - bool ult(uint64_t RHS) const { - return getActiveBits() > 64 ? false : getZExtValue() < RHS; - } - - /// \brief Signed less than comparison - /// - /// Regards both *this and RHS as signed quantities and compares them for - /// validity of the less-than relationship. - /// - /// \returns true if *this < RHS when both are considered signed. - bool slt(const APInt &RHS) const; - - /// \brief Signed less than comparison - /// - /// Regards both *this as a signed quantity and compares it with RHS for - /// the validity of the less-than relationship. - /// - /// \returns true if *this < RHS when considered signed. - bool slt(int64_t RHS) const { - return getMinSignedBits() > 64 ? isNegative() : getSExtValue() < RHS; - } - - /// \brief Unsigned less or equal comparison - /// - /// Regards both *this and RHS as unsigned quantities and compares them for - /// validity of the less-or-equal relationship. - /// - /// \returns true if *this <= RHS when both are considered unsigned. - bool ule(const APInt &RHS) const { return ult(RHS) || eq(RHS); } - - /// \brief Unsigned less or equal comparison - /// - /// Regards both *this as an unsigned quantity and compares it with RHS for - /// the validity of the less-or-equal relationship. - /// - /// \returns true if *this <= RHS when considered unsigned. - bool ule(uint64_t RHS) const { return !ugt(RHS); } - - /// \brief Signed less or equal comparison - /// - /// Regards both *this and RHS as signed quantities and compares them for - /// validity of the less-or-equal relationship. - /// - /// \returns true if *this <= RHS when both are considered signed. - bool sle(const APInt &RHS) const { return slt(RHS) || eq(RHS); } - - /// \brief Signed less or equal comparison - /// - /// Regards both *this as a signed quantity and compares it with RHS for the - /// validity of the less-or-equal relationship. - /// - /// \returns true if *this <= RHS when considered signed. - bool sle(uint64_t RHS) const { return !sgt(RHS); } - - /// \brief Unsigned greather than comparison - /// - /// Regards both *this and RHS as unsigned quantities and compares them for - /// the validity of the greater-than relationship. - /// - /// \returns true if *this > RHS when both are considered unsigned. - bool ugt(const APInt &RHS) const { return !ult(RHS) && !eq(RHS); } - - /// \brief Unsigned greater than comparison - /// - /// Regards both *this as an unsigned quantity and compares it with RHS for - /// the validity of the greater-than relationship. - /// - /// \returns true if *this > RHS when considered unsigned. - bool ugt(uint64_t RHS) const { - return getActiveBits() > 64 ? true : getZExtValue() > RHS; - } - - /// \brief Signed greather than comparison - /// - /// Regards both *this and RHS as signed quantities and compares them for the - /// validity of the greater-than relationship. - /// - /// \returns true if *this > RHS when both are considered signed. - bool sgt(const APInt &RHS) const { return !slt(RHS) && !eq(RHS); } - - /// \brief Signed greater than comparison - /// - /// Regards both *this as a signed quantity and compares it with RHS for - /// the validity of the greater-than relationship. - /// - /// \returns true if *this > RHS when considered signed. - bool sgt(int64_t RHS) const { - return getMinSignedBits() > 64 ? !isNegative() : getSExtValue() > RHS; - } - - /// \brief Unsigned greater or equal comparison - /// - /// Regards both *this and RHS as unsigned quantities and compares them for - /// validity of the greater-or-equal relationship. - /// - /// \returns true if *this >= RHS when both are considered unsigned. - bool uge(const APInt &RHS) const { return !ult(RHS); } - - /// \brief Unsigned greater or equal comparison - /// - /// Regards both *this as an unsigned quantity and compares it with RHS for - /// the validity of the greater-or-equal relationship. - /// - /// \returns true if *this >= RHS when considered unsigned. - bool uge(uint64_t RHS) const { return !ult(RHS); } - - /// \brief Signed greather or equal comparison - /// - /// Regards both *this and RHS as signed quantities and compares them for - /// validity of the greater-or-equal relationship. - /// - /// \returns true if *this >= RHS when both are considered signed. - bool sge(const APInt &RHS) const { return !slt(RHS); } - - /// \brief Signed greater or equal comparison - /// - /// Regards both *this as a signed quantity and compares it with RHS for - /// the validity of the greater-or-equal relationship. - /// - /// \returns true if *this >= RHS when considered signed. - bool sge(int64_t RHS) const { return !slt(RHS); } - - /// This operation tests if there are any pairs of corresponding bits - /// between this APInt and RHS that are both set. - bool intersects(const APInt &RHS) const { return (*this & RHS) != 0; } - - /// @} - /// \name Resizing Operators - /// @{ - - /// \brief Truncate to new width. - /// - /// Truncate the APInt to a specified width. It is an error to specify a width - /// that is greater than or equal to the current width. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT trunc(unsigned width) const; - - /// \brief Sign extend to a new width. - /// - /// This operation sign extends the APInt to a new width. If the high order - /// bit is set, the fill on the left will be done with 1 bits, otherwise zero. - /// It is an error to specify a width that is less than or equal to the - /// current width. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT sext(unsigned width) const; - - /// \brief Zero extend to a new width. - /// - /// This operation zero extends the APInt to a new width. The high order bits - /// are filled with 0 bits. It is an error to specify a width that is less - /// than or equal to the current width. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT zext(unsigned width) const; - - /// \brief Sign extend or truncate to width - /// - /// Make this APInt have the bit width given by \p width. The value is sign - /// extended, truncated, or left alone to make it that width. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT sextOrTrunc(unsigned width) const; - - /// \brief Zero extend or truncate to width - /// - /// Make this APInt have the bit width given by \p width. The value is zero - /// extended, truncated, or left alone to make it that width. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT zextOrTrunc(unsigned width) const; - - /// \brief Sign extend or truncate to width - /// - /// Make this APInt have the bit width given by \p width. The value is sign - /// extended, or left alone to make it that width. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT sextOrSelf(unsigned width) const; - - /// \brief Zero extend or truncate to width - /// - /// Make this APInt have the bit width given by \p width. The value is zero - /// extended, or left alone to make it that width. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT zextOrSelf(unsigned width) const; - - /// @} - /// \name Bit Manipulation Operators - /// @{ - - /// \brief Set every bit to 1. - void setAllBits() { - if (isSingleWord()) - VAL = UINT64_MAX; - else { - // Set all the bits in all the words. - for (unsigned i = 0; i < getNumWords(); ++i) - pVal[i] = UINT64_MAX; - } - // Clear the unused ones - clearUnusedBits(); - } - - /// \brief Set a given bit to 1. - /// - /// Set the given bit to 1 whose position is given as "bitPosition". - void setBit(unsigned bitPosition); - - /// \brief Set every bit to 0. - void clearAllBits() { - if (isSingleWord()) - VAL = 0; - else - memset(pVal, 0, getNumWords() * APINT_WORD_SIZE); - } - - /// \brief Set a given bit to 0. - /// - /// Set the given bit to 0 whose position is given as "bitPosition". - void clearBit(unsigned bitPosition); - - /// \brief Toggle every bit to its opposite value. - void flipAllBits() { - if (isSingleWord()) - VAL ^= UINT64_MAX; - else { - for (unsigned i = 0; i < getNumWords(); ++i) - pVal[i] ^= UINT64_MAX; - } - clearUnusedBits(); - } - - /// \brief Toggles a given bit to its opposite value. - /// - /// Toggle a given bit to its opposite value whose position is given - /// as "bitPosition". - void flipBit(unsigned bitPosition); - - /// @} - /// \name Value Characterization Functions - /// @{ - - /// \brief Return the number of bits in the APInt. - unsigned getBitWidth() const { return BitWidth; } - - /// \brief Get the number of words. - /// - /// Here one word's bitwidth equals to that of uint64_t. - /// - /// \returns the number of words to hold the integer value of this APInt. - unsigned getNumWords() const { return getNumWords(BitWidth); } - - /// \brief Get the number of words. - /// - /// *NOTE* Here one word's bitwidth equals to that of uint64_t. - /// - /// \returns the number of words to hold the integer value with a given bit - /// width. - static unsigned getNumWords(unsigned BitWidth) { - return ((uint64_t)BitWidth + APINT_BITS_PER_WORD - 1) / APINT_BITS_PER_WORD; - } - - /// \brief Compute the number of active bits in the value - /// - /// This function returns the number of active bits which is defined as the - /// bit width minus the number of leading zeros. This is used in several - /// computations to see how "wide" the value is. - unsigned getActiveBits() const { return BitWidth - countLeadingZeros(); } - - /// \brief Compute the number of active words in the value of this APInt. - /// - /// This is used in conjunction with getActiveData to extract the raw value of - /// the APInt. - unsigned getActiveWords() const { - unsigned numActiveBits = getActiveBits(); - return numActiveBits ? whichWord(numActiveBits - 1) + 1 : 1; - } - - /// \brief Get the minimum bit size for this signed APInt - /// - /// Computes the minimum bit width for this APInt while considering it to be a - /// signed (and probably negative) value. If the value is not negative, this - /// function returns the same value as getActiveBits()+1. Otherwise, it - /// returns the smallest bit width that will retain the negative value. For - /// example, -1 can be written as 0b1 or 0xFFFFFFFFFF. 0b1 is shorter and so - /// for -1, this function will always return 1. - unsigned getMinSignedBits() const { - if (isNegative()) - return BitWidth - countLeadingOnes() + 1; - return getActiveBits() + 1; - } - - /// \brief Get zero extended value - /// - /// This method attempts to return the value of this APInt as a zero extended - /// uint64_t. The bitwidth must be <= 64 or the value must fit within a - /// uint64_t. Otherwise an assertion will result. - uint64_t getZExtValue() const { - if (isSingleWord()) - return VAL; - assert(getActiveBits() <= 64 && "Too many bits for uint64_t"); - return pVal[0]; - } - - /// \brief Get sign extended value - /// - /// This method attempts to return the value of this APInt as a sign extended - /// int64_t. The bit width must be <= 64 or the value must fit within an - /// int64_t. Otherwise an assertion will result. - int64_t getSExtValue() const { - if (isSingleWord()) - return int64_t(VAL << (APINT_BITS_PER_WORD - BitWidth)) >> - (APINT_BITS_PER_WORD - BitWidth); - assert(getMinSignedBits() <= 64 && "Too many bits for int64_t"); - return int64_t(pVal[0]); - } - - /// \brief Get bits required for string value. - /// - /// This method determines how many bits are required to hold the APInt - /// equivalent of the string given by \p str. - static unsigned getBitsNeeded(StringRef str, uint8_t radix); - - /// \brief The APInt version of the countLeadingZeros functions in - /// MathExtras.h. - /// - /// It counts the number of zeros from the most significant bit to the first - /// one bit. - /// - /// \returns BitWidth if the value is zero, otherwise returns the number of - /// zeros from the most significant bit to the first one bits. - unsigned countLeadingZeros() const { - if (isSingleWord()) { - unsigned unusedBits = APINT_BITS_PER_WORD - BitWidth; - return llvm::countLeadingZeros(VAL) - unusedBits; - } - return countLeadingZerosSlowCase(); - } - - /// \brief Count the number of leading one bits. - /// - /// This function is an APInt version of the countLeadingOnes - /// functions in MathExtras.h. It counts the number of ones from the most - /// significant bit to the first zero bit. - /// - /// \returns 0 if the high order bit is not set, otherwise returns the number - /// of 1 bits from the most significant to the least - unsigned countLeadingOnes() const; - - /// Computes the number of leading bits of this APInt that are equal to its - /// sign bit. - unsigned getNumSignBits() const { - return isNegative() ? countLeadingOnes() : countLeadingZeros(); - } - - /// \brief Count the number of trailing zero bits. - /// - /// This function is an APInt version of the countTrailingZeros - /// functions in MathExtras.h. It counts the number of zeros from the least - /// significant bit to the first set bit. - /// - /// \returns BitWidth if the value is zero, otherwise returns the number of - /// zeros from the least significant bit to the first one bit. - unsigned countTrailingZeros() const; - - /// \brief Count the number of trailing one bits. - /// - /// This function is an APInt version of the countTrailingOnes - /// functions in MathExtras.h. It counts the number of ones from the least - /// significant bit to the first zero bit. - /// - /// \returns BitWidth if the value is all ones, otherwise returns the number - /// of ones from the least significant bit to the first zero bit. - unsigned countTrailingOnes() const { - if (isSingleWord()) - return llvm::countTrailingOnes(VAL); - return countTrailingOnesSlowCase(); - } - - /// \brief Count the number of bits set. - /// - /// This function is an APInt version of the countPopulation functions - /// in MathExtras.h. It counts the number of 1 bits in the APInt value. - /// - /// \returns 0 if the value is zero, otherwise returns the number of set bits. - unsigned countPopulation() const { - if (isSingleWord()) - return llvm::countPopulation(VAL); - return countPopulationSlowCase(); - } - - /// @} - /// \name Conversion Functions - /// @{ - void print(raw_ostream &OS, bool isSigned) const; - - /// Converts an APInt to a string and append it to Str. Str is commonly a - /// SmallString. - void toString(SmallVectorImpl &Str, unsigned Radix, bool Signed, - bool formatAsCLiteral = false) const; - - /// Considers the APInt to be unsigned and converts it into a string in the - /// radix given. The radix can be 2, 8, 10 16, or 36. - void toStringUnsigned(SmallVectorImpl &Str, unsigned Radix = 10) const { - toString(Str, Radix, false, false); - } - - /// Considers the APInt to be signed and converts it into a string in the - /// radix given. The radix can be 2, 8, 10, 16, or 36. - void toStringSigned(SmallVectorImpl &Str, unsigned Radix = 10) const { - toString(Str, Radix, true, false); - } - - /// \brief Return the APInt as a std::string. - /// - /// Note that this is an inefficient method. It is better to pass in a - /// SmallVector/SmallString to the methods above to avoid thrashing the heap - /// for the string. - std::string toString(unsigned Radix, bool Signed) const; - - /// \returns a byte-swapped representation of this APInt Value. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT byteSwap() const; - - /// \returns the value with the bit representation reversed of this APInt - /// Value. - APInt LLVM_ATTRIBUTE_UNUSED_RESULT reverseBits() const; - - /// \brief Converts this APInt to a double value. - double roundToDouble(bool isSigned) const; - - /// \brief Converts this unsigned APInt to a double value. - double roundToDouble() const { return roundToDouble(false); } - - /// \brief Converts this signed APInt to a double value. - double signedRoundToDouble() const { return roundToDouble(true); } - - /// \brief Converts APInt bits to a double - /// - /// The conversion does not do a translation from integer to double, it just - /// re-interprets the bits as a double. Note that it is valid to do this on - /// any bit width. Exactly 64 bits will be translated. - double bitsToDouble() const { - union { - uint64_t I; - double D; - } T; - T.I = (isSingleWord() ? VAL : pVal[0]); - return T.D; - } - - /// \brief Converts APInt bits to a double - /// - /// The conversion does not do a translation from integer to float, it just - /// re-interprets the bits as a float. Note that it is valid to do this on - /// any bit width. Exactly 32 bits will be translated. - float bitsToFloat() const { - union { - unsigned I; - float F; - } T; - T.I = unsigned((isSingleWord() ? VAL : pVal[0])); - return T.F; - } - - /// \brief Converts a double to APInt bits. - /// - /// The conversion does not do a translation from double to integer, it just - /// re-interprets the bits of the double. - static APInt LLVM_ATTRIBUTE_UNUSED_RESULT doubleToBits(double V) { - union { - uint64_t I; - double D; - } T; - T.D = V; - return APInt(sizeof T * CHAR_BIT, T.I); - } - - /// \brief Converts a float to APInt bits. - /// - /// The conversion does not do a translation from float to integer, it just - /// re-interprets the bits of the float. - static APInt LLVM_ATTRIBUTE_UNUSED_RESULT floatToBits(float V) { - union { - unsigned I; - float F; - } T; - T.F = V; - return APInt(sizeof T * CHAR_BIT, T.I); - } - - /// @} - /// \name Mathematics Operations - /// @{ - - /// \returns the floor log base 2 of this APInt. - unsigned logBase2() const { return BitWidth - 1 - countLeadingZeros(); } - - /// \returns the ceil log base 2 of this APInt. - unsigned ceilLogBase2() const { - return BitWidth - (*this - 1).countLeadingZeros(); - } - - /// \returns the nearest log base 2 of this APInt. Ties round up. - /// - /// NOTE: When we have a BitWidth of 1, we define: - /// - /// log2(0) = UINT32_MAX - /// log2(1) = 0 - /// - /// to get around any mathematical concerns resulting from - /// referencing 2 in a space where 2 does no exist. - unsigned nearestLogBase2() const { - // Special case when we have a bitwidth of 1. If VAL is 1, then we - // get 0. If VAL is 0, we get UINT64_MAX which gets truncated to - // UINT32_MAX. - if (BitWidth == 1) - return VAL - 1; - - // Handle the zero case. - if (!getBoolValue()) - return UINT32_MAX; - - // The non-zero case is handled by computing: - // - // nearestLogBase2(x) = logBase2(x) + x[logBase2(x)-1]. - // - // where x[i] is referring to the value of the ith bit of x. - unsigned lg = logBase2(); - return lg + unsigned((*this)[lg - 1]); - } - - /// \returns the log base 2 of this APInt if its an exact power of two, -1 - /// otherwise - int32_t exactLogBase2() const { - if (!isPowerOf2()) - return -1; - return logBase2(); - } - - /// \brief Compute the square root - APInt LLVM_ATTRIBUTE_UNUSED_RESULT sqrt() const; - - /// \brief Get the absolute value; - /// - /// If *this is < 0 then return -(*this), otherwise *this; - APInt LLVM_ATTRIBUTE_UNUSED_RESULT abs() const { - if (isNegative()) - return -(*this); - return *this; - } - - /// \returns the multiplicative inverse for a given modulo. - APInt multiplicativeInverse(const APInt &modulo) const; - - /// @} - /// \name Support for division by constant - /// @{ - - /// Calculate the magic number for signed division by a constant. - struct ms; - ms magic() const; - - /// Calculate the magic number for unsigned division by a constant. - struct mu; - mu magicu(unsigned LeadingZeros = 0) const; - - /// @} - /// \name Building-block Operations for APInt and APFloat - /// @{ - - // These building block operations operate on a representation of arbitrary - // precision, two's-complement, bignum integer values. They should be - // sufficient to implement APInt and APFloat bignum requirements. Inputs are - // generally a pointer to the base of an array of integer parts, representing - // an unsigned bignum, and a count of how many parts there are. - - /// Sets the least significant part of a bignum to the input value, and zeroes - /// out higher parts. - static void tcSet(integerPart *, integerPart, unsigned int); - - /// Assign one bignum to another. - static void tcAssign(integerPart *, const integerPart *, unsigned int); - - /// Returns true if a bignum is zero, false otherwise. - static bool tcIsZero(const integerPart *, unsigned int); - - /// Extract the given bit of a bignum; returns 0 or 1. Zero-based. - static int tcExtractBit(const integerPart *, unsigned int bit); - - /// Copy the bit vector of width srcBITS from SRC, starting at bit srcLSB, to - /// DST, of dstCOUNT parts, such that the bit srcLSB becomes the least - /// significant bit of DST. All high bits above srcBITS in DST are - /// zero-filled. - static void tcExtract(integerPart *, unsigned int dstCount, - const integerPart *, unsigned int srcBits, - unsigned int srcLSB); - - /// Set the given bit of a bignum. Zero-based. - static void tcSetBit(integerPart *, unsigned int bit); - - /// Clear the given bit of a bignum. Zero-based. - static void tcClearBit(integerPart *, unsigned int bit); - - /// Returns the bit number of the least or most significant set bit of a - /// number. If the input number has no bits set -1U is returned. - static unsigned int tcLSB(const integerPart *, unsigned int); - static unsigned int tcMSB(const integerPart *parts, unsigned int n); - - /// Negate a bignum in-place. - static void tcNegate(integerPart *, unsigned int); - - /// DST += RHS + CARRY where CARRY is zero or one. Returns the carry flag. - static integerPart tcAdd(integerPart *, const integerPart *, - integerPart carry, unsigned); - - /// DST -= RHS + CARRY where CARRY is zero or one. Returns the carry flag. - static integerPart tcSubtract(integerPart *, const integerPart *, - integerPart carry, unsigned); - - /// DST += SRC * MULTIPLIER + PART if add is true - /// DST = SRC * MULTIPLIER + PART if add is false - /// - /// Requires 0 <= DSTPARTS <= SRCPARTS + 1. If DST overlaps SRC they must - /// start at the same point, i.e. DST == SRC. - /// - /// If DSTPARTS == SRC_PARTS + 1 no overflow occurs and zero is returned. - /// Otherwise DST is filled with the least significant DSTPARTS parts of the - /// result, and if all of the omitted higher parts were zero return zero, - /// otherwise overflow occurred and return one. - static int tcMultiplyPart(integerPart *dst, const integerPart *src, - integerPart multiplier, integerPart carry, - unsigned int srcParts, unsigned int dstParts, - bool add); - - /// DST = LHS * RHS, where DST has the same width as the operands and is - /// filled with the least significant parts of the result. Returns one if - /// overflow occurred, otherwise zero. DST must be disjoint from both - /// operands. - static int tcMultiply(integerPart *, const integerPart *, const integerPart *, - unsigned); - - /// DST = LHS * RHS, where DST has width the sum of the widths of the - /// operands. No overflow occurs. DST must be disjoint from both - /// operands. Returns the number of parts required to hold the result. - static unsigned int tcFullMultiply(integerPart *, const integerPart *, - const integerPart *, unsigned, unsigned); - - /// If RHS is zero LHS and REMAINDER are left unchanged, return one. - /// Otherwise set LHS to LHS / RHS with the fractional part discarded, set - /// REMAINDER to the remainder, return zero. i.e. - /// - /// OLD_LHS = RHS * LHS + REMAINDER - /// - /// SCRATCH is a bignum of the same size as the operands and result for use by - /// the routine; its contents need not be initialized and are destroyed. LHS, - /// REMAINDER and SCRATCH must be distinct. - static int tcDivide(integerPart *lhs, const integerPart *rhs, - integerPart *remainder, integerPart *scratch, - unsigned int parts); - - /// Shift a bignum left COUNT bits. Shifted in bits are zero. There are no - /// restrictions on COUNT. - static void tcShiftLeft(integerPart *, unsigned int parts, - unsigned int count); - - /// Shift a bignum right COUNT bits. Shifted in bits are zero. There are no - /// restrictions on COUNT. - static void tcShiftRight(integerPart *, unsigned int parts, - unsigned int count); - - /// The obvious AND, OR and XOR and complement operations. - static void tcAnd(integerPart *, const integerPart *, unsigned int); - static void tcOr(integerPart *, const integerPart *, unsigned int); - static void tcXor(integerPart *, const integerPart *, unsigned int); - static void tcComplement(integerPart *, unsigned int); - - /// Comparison (unsigned) of two bignums. - static int tcCompare(const integerPart *, const integerPart *, unsigned int); - - /// Increment a bignum in-place. Return the carry flag. - static integerPart tcIncrement(integerPart *, unsigned int); - - /// Decrement a bignum in-place. Return the borrow flag. - static integerPart tcDecrement(integerPart *, unsigned int); - - /// Set the least significant BITS and clear the rest. - static void tcSetLeastSignificantBits(integerPart *, unsigned int, - unsigned int bits); - - /// \brief debug method - void dump() const; - - /// @} -}; - -/// Magic data for optimising signed division by a constant. -struct APInt::ms { - APInt m; ///< magic number - unsigned s; ///< shift amount -}; - -/// Magic data for optimising unsigned division by a constant. -struct APInt::mu { - APInt m; ///< magic number - bool a; ///< add indicator - unsigned s; ///< shift amount -}; - -inline bool operator==(uint64_t V1, const APInt &V2) { return V2 == V1; } - -inline bool operator!=(uint64_t V1, const APInt &V2) { return V2 != V1; } - -inline raw_ostream &operator<<(raw_ostream &OS, const APInt &I) { - I.print(OS, true); - return OS; -} - -namespace APIntOps { - -/// \brief Determine the smaller of two APInts considered to be signed. -inline const APInt &smin(const APInt &A, const APInt &B) { - return A.slt(B) ? A : B; -} - -/// \brief Determine the larger of two APInts considered to be signed. -inline const APInt &smax(const APInt &A, const APInt &B) { - return A.sgt(B) ? A : B; -} - -/// \brief Determine the smaller of two APInts considered to be signed. -inline const APInt &umin(const APInt &A, const APInt &B) { - return A.ult(B) ? A : B; -} - -/// \brief Determine the larger of two APInts considered to be unsigned. -inline const APInt &umax(const APInt &A, const APInt &B) { - return A.ugt(B) ? A : B; -} - -/// \brief Check if the specified APInt has a N-bits unsigned integer value. -inline bool isIntN(unsigned N, const APInt &APIVal) { return APIVal.isIntN(N); } - -/// \brief Check if the specified APInt has a N-bits signed integer value. -inline bool isSignedIntN(unsigned N, const APInt &APIVal) { - return APIVal.isSignedIntN(N); -} - -/// \returns true if the argument APInt value is a sequence of ones starting at -/// the least significant bit with the remainder zero. -inline bool isMask(unsigned numBits, const APInt &APIVal) { - return numBits <= APIVal.getBitWidth() && - APIVal == APInt::getLowBitsSet(APIVal.getBitWidth(), numBits); -} - -/// \returns true if the argument is a non-empty sequence of ones starting at -/// the least significant bit with the remainder zero (32 bit version). -/// Ex. isMask(0x0000FFFFU) == true. -inline bool isMask(const APInt &Value) { - return (Value != 0) && ((Value + 1) & Value) == 0; -} - -/// \brief Return true if the argument APInt value contains a sequence of ones -/// with the remainder zero. -inline bool isShiftedMask(unsigned numBits, const APInt &APIVal) { - return isMask(numBits, (APIVal - APInt(numBits, 1)) | APIVal); -} - -/// \brief Returns a byte-swapped representation of the specified APInt Value. -inline APInt byteSwap(const APInt &APIVal) { return APIVal.byteSwap(); } - -/// \brief Returns the floor log base 2 of the specified APInt value. -inline unsigned logBase2(const APInt &APIVal) { return APIVal.logBase2(); } - -/// \brief Compute GCD of two APInt values. -/// -/// This function returns the greatest common divisor of the two APInt values -/// using Euclid's algorithm. -/// -/// \returns the greatest common divisor of Val1 and Val2 -APInt GreatestCommonDivisor(const APInt &Val1, const APInt &Val2); - -/// \brief Converts the given APInt to a double value. -/// -/// Treats the APInt as an unsigned value for conversion purposes. -inline double RoundAPIntToDouble(const APInt &APIVal) { - return APIVal.roundToDouble(); -} - -/// \brief Converts the given APInt to a double value. -/// -/// Treats the APInt as a signed value for conversion purposes. -inline double RoundSignedAPIntToDouble(const APInt &APIVal) { - return APIVal.signedRoundToDouble(); -} - -/// \brief Converts the given APInt to a float vlalue. -inline float RoundAPIntToFloat(const APInt &APIVal) { - return float(RoundAPIntToDouble(APIVal)); -} - -/// \brief Converts the given APInt to a float value. -/// -/// Treast the APInt as a signed value for conversion purposes. -inline float RoundSignedAPIntToFloat(const APInt &APIVal) { - return float(APIVal.signedRoundToDouble()); -} - -/// \brief Converts the given double value into a APInt. -/// -/// This function convert a double value to an APInt value. -APInt RoundDoubleToAPInt(double Double, unsigned width); - -/// \brief Converts a float value into a APInt. -/// -/// Converts a float value into an APInt value. -inline APInt RoundFloatToAPInt(float Float, unsigned width) { - return RoundDoubleToAPInt(double(Float), width); -} - -/// \brief Arithmetic right-shift function. -/// -/// Arithmetic right-shift the APInt by shiftAmt. -inline APInt ashr(const APInt &LHS, unsigned shiftAmt) { - return LHS.ashr(shiftAmt); -} - -/// \brief Logical right-shift function. -/// -/// Logical right-shift the APInt by shiftAmt. -inline APInt lshr(const APInt &LHS, unsigned shiftAmt) { - return LHS.lshr(shiftAmt); -} - -/// \brief Left-shift function. -/// -/// Left-shift the APInt by shiftAmt. -inline APInt shl(const APInt &LHS, unsigned shiftAmt) { - return LHS.shl(shiftAmt); -} - -/// \brief Signed division function for APInt. -/// -/// Signed divide APInt LHS by APInt RHS. -inline APInt sdiv(const APInt &LHS, const APInt &RHS) { return LHS.sdiv(RHS); } - -/// \brief Unsigned division function for APInt. -/// -/// Unsigned divide APInt LHS by APInt RHS. -inline APInt udiv(const APInt &LHS, const APInt &RHS) { return LHS.udiv(RHS); } - -/// \brief Function for signed remainder operation. -/// -/// Signed remainder operation on APInt. -inline APInt srem(const APInt &LHS, const APInt &RHS) { return LHS.srem(RHS); } - -/// \brief Function for unsigned remainder operation. -/// -/// Unsigned remainder operation on APInt. -inline APInt urem(const APInt &LHS, const APInt &RHS) { return LHS.urem(RHS); } - -/// \brief Function for multiplication operation. -/// -/// Performs multiplication on APInt values. -inline APInt mul(const APInt &LHS, const APInt &RHS) { return LHS * RHS; } - -/// \brief Function for addition operation. -/// -/// Performs addition on APInt values. -inline APInt add(const APInt &LHS, const APInt &RHS) { return LHS + RHS; } - -/// \brief Function for subtraction operation. -/// -/// Performs subtraction on APInt values. -inline APInt sub(const APInt &LHS, const APInt &RHS) { return LHS - RHS; } - -/// \brief Bitwise AND function for APInt. -/// -/// Performs bitwise AND operation on APInt LHS and -/// APInt RHS. -inline APInt And(const APInt &LHS, const APInt &RHS) { return LHS & RHS; } - -/// \brief Bitwise OR function for APInt. -/// -/// Performs bitwise OR operation on APInt LHS and APInt RHS. -inline APInt Or(const APInt &LHS, const APInt &RHS) { return LHS | RHS; } - -/// \brief Bitwise XOR function for APInt. -/// -/// Performs bitwise XOR operation on APInt. -inline APInt Xor(const APInt &LHS, const APInt &RHS) { return LHS ^ RHS; } - -/// \brief Bitwise complement function. -/// -/// Performs a bitwise complement operation on APInt. -inline APInt Not(const APInt &APIVal) { return ~APIVal; } - -} // End of APIntOps namespace - -// See friend declaration above. This additional declaration is required in -// order to compile LLVM with IBM xlC compiler. -hash_code hash_value(const APInt &Arg); -} // End of llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/APSInt.h b/llvm/include/llvm/ADT/APSInt.h deleted file mode 100644 index a6552d0a..00000000 --- a/llvm/include/llvm/ADT/APSInt.h +++ /dev/null @@ -1,342 +0,0 @@ -//===-- llvm/ADT/APSInt.h - Arbitrary Precision Signed Int -----*- C++ -*--===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the APSInt class, which is a simple class that -// represents an arbitrary sized integer that knows its signedness. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_APSINT_H -#define LLVM_ADT_APSINT_H - -#include "llvm/ADT/APInt.h" - -namespace llvm { - -class APSInt : public APInt { - bool IsUnsigned; - -public: - /// Default constructor that creates an uninitialized APInt. - explicit APSInt() : IsUnsigned(false) {} - - /// APSInt ctor - Create an APSInt with the specified width, default to - /// unsigned. - explicit APSInt(uint32_t BitWidth, bool isUnsigned = true) - : APInt(BitWidth, 0), IsUnsigned(isUnsigned) {} - - explicit APSInt(APInt I, bool isUnsigned = true) - : APInt(std::move(I)), IsUnsigned(isUnsigned) {} - - /// Construct an APSInt from a string representation. - /// - /// This constructor interprets the string \p Str using the radix of 10. - /// The interpretation stops at the end of the string. The bit width of the - /// constructed APSInt is determined automatically. - /// - /// \param Str the string to be interpreted. - explicit APSInt(StringRef Str); - - APSInt &operator=(APInt RHS) { - // Retain our current sign. - APInt::operator=(std::move(RHS)); - return *this; - } - - APSInt &operator=(uint64_t RHS) { - // Retain our current sign. - APInt::operator=(RHS); - return *this; - } - - // Query sign information. - bool isSigned() const { return !IsUnsigned; } - bool isUnsigned() const { return IsUnsigned; } - void setIsUnsigned(bool Val) { IsUnsigned = Val; } - void setIsSigned(bool Val) { IsUnsigned = !Val; } - - /// toString - Append this APSInt to the specified SmallString. - void toString(SmallVectorImpl &Str, unsigned Radix = 10) const { - APInt::toString(Str, Radix, isSigned()); - } - /// toString - Converts an APInt to a std::string. This is an inefficient - /// method; you should prefer passing in a SmallString instead. - std::string toString(unsigned Radix) const { - return APInt::toString(Radix, isSigned()); - } - using APInt::toString; - - /// \brief Get the correctly-extended \c int64_t value. - int64_t getExtValue() const { - assert(getMinSignedBits() <= 64 && "Too many bits for int64_t"); - return isSigned() ? getSExtValue() : getZExtValue(); - } - - APSInt LLVM_ATTRIBUTE_UNUSED_RESULT trunc(uint32_t width) const { - return APSInt(APInt::trunc(width), IsUnsigned); - } - - APSInt LLVM_ATTRIBUTE_UNUSED_RESULT extend(uint32_t width) const { - if (IsUnsigned) - return APSInt(zext(width), IsUnsigned); - else - return APSInt(sext(width), IsUnsigned); - } - - APSInt LLVM_ATTRIBUTE_UNUSED_RESULT extOrTrunc(uint32_t width) const { - if (IsUnsigned) - return APSInt(zextOrTrunc(width), IsUnsigned); - else - return APSInt(sextOrTrunc(width), IsUnsigned); - } - - const APSInt &operator%=(const APSInt &RHS) { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - if (IsUnsigned) - *this = urem(RHS); - else - *this = srem(RHS); - return *this; - } - const APSInt &operator/=(const APSInt &RHS) { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - if (IsUnsigned) - *this = udiv(RHS); - else - *this = sdiv(RHS); - return *this; - } - APSInt operator%(const APSInt &RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return IsUnsigned ? APSInt(urem(RHS), true) : APSInt(srem(RHS), false); - } - APSInt operator/(const APSInt &RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return IsUnsigned ? APSInt(udiv(RHS), true) : APSInt(sdiv(RHS), false); - } - - APSInt operator>>(unsigned Amt) const { - return IsUnsigned ? APSInt(lshr(Amt), true) : APSInt(ashr(Amt), false); - } - APSInt& operator>>=(unsigned Amt) { - *this = *this >> Amt; - return *this; - } - - inline bool operator<(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return IsUnsigned ? ult(RHS) : slt(RHS); - } - inline bool operator>(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return IsUnsigned ? ugt(RHS) : sgt(RHS); - } - inline bool operator<=(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return IsUnsigned ? ule(RHS) : sle(RHS); - } - inline bool operator>=(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return IsUnsigned ? uge(RHS) : sge(RHS); - } - inline bool operator==(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return eq(RHS); - } - inline bool operator!=(const APSInt& RHS) const { - return !((*this) == RHS); - } - - bool operator==(int64_t RHS) const { - return compareValues(*this, get(RHS)) == 0; - } - bool operator!=(int64_t RHS) const { - return compareValues(*this, get(RHS)) != 0; - } - bool operator<=(int64_t RHS) const { - return compareValues(*this, get(RHS)) <= 0; - } - bool operator>=(int64_t RHS) const { - return compareValues(*this, get(RHS)) >= 0; - } - bool operator<(int64_t RHS) const { - return compareValues(*this, get(RHS)) < 0; - } - bool operator>(int64_t RHS) const { - return compareValues(*this, get(RHS)) > 0; - } - - // The remaining operators just wrap the logic of APInt, but retain the - // signedness information. - - APSInt operator<<(unsigned Bits) const { - return APSInt(static_cast(*this) << Bits, IsUnsigned); - } - APSInt& operator<<=(unsigned Amt) { - *this = *this << Amt; - return *this; - } - - APSInt& operator++() { - ++(static_cast(*this)); - return *this; - } - APSInt& operator--() { - --(static_cast(*this)); - return *this; - } - APSInt operator++(int) { - return APSInt(++static_cast(*this), IsUnsigned); - } - APSInt operator--(int) { - return APSInt(--static_cast(*this), IsUnsigned); - } - APSInt operator-() const { - return APSInt(-static_cast(*this), IsUnsigned); - } - APSInt& operator+=(const APSInt& RHS) { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - static_cast(*this) += RHS; - return *this; - } - APSInt& operator-=(const APSInt& RHS) { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - static_cast(*this) -= RHS; - return *this; - } - APSInt& operator*=(const APSInt& RHS) { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - static_cast(*this) *= RHS; - return *this; - } - APSInt& operator&=(const APSInt& RHS) { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - static_cast(*this) &= RHS; - return *this; - } - APSInt& operator|=(const APSInt& RHS) { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - static_cast(*this) |= RHS; - return *this; - } - APSInt& operator^=(const APSInt& RHS) { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - static_cast(*this) ^= RHS; - return *this; - } - - APSInt operator&(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return APSInt(static_cast(*this) & RHS, IsUnsigned); - } - APSInt LLVM_ATTRIBUTE_UNUSED_RESULT And(const APSInt& RHS) const { - return this->operator&(RHS); - } - - APSInt operator|(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return APSInt(static_cast(*this) | RHS, IsUnsigned); - } - APSInt LLVM_ATTRIBUTE_UNUSED_RESULT Or(const APSInt& RHS) const { - return this->operator|(RHS); - } - - APSInt operator^(const APSInt &RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return APSInt(static_cast(*this) ^ RHS, IsUnsigned); - } - APSInt LLVM_ATTRIBUTE_UNUSED_RESULT Xor(const APSInt& RHS) const { - return this->operator^(RHS); - } - - APSInt operator*(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return APSInt(static_cast(*this) * RHS, IsUnsigned); - } - APSInt operator+(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return APSInt(static_cast(*this) + RHS, IsUnsigned); - } - APSInt operator-(const APSInt& RHS) const { - assert(IsUnsigned == RHS.IsUnsigned && "Signedness mismatch!"); - return APSInt(static_cast(*this) - RHS, IsUnsigned); - } - APSInt operator~() const { - return APSInt(~static_cast(*this), IsUnsigned); - } - - /// getMaxValue - Return the APSInt representing the maximum integer value - /// with the given bit width and signedness. - static APSInt getMaxValue(uint32_t numBits, bool Unsigned) { - return APSInt(Unsigned ? APInt::getMaxValue(numBits) - : APInt::getSignedMaxValue(numBits), Unsigned); - } - - /// getMinValue - Return the APSInt representing the minimum integer value - /// with the given bit width and signedness. - static APSInt getMinValue(uint32_t numBits, bool Unsigned) { - return APSInt(Unsigned ? APInt::getMinValue(numBits) - : APInt::getSignedMinValue(numBits), Unsigned); - } - - /// \brief Determine if two APSInts have the same value, zero- or - /// sign-extending as needed. - static bool isSameValue(const APSInt &I1, const APSInt &I2) { - return !compareValues(I1, I2); - } - - /// \brief Compare underlying values of two numbers. - static int compareValues(const APSInt &I1, const APSInt &I2) { - if (I1.getBitWidth() == I2.getBitWidth() && I1.isSigned() == I2.isSigned()) - return I1 == I2 ? 0 : I1 > I2 ? 1 : -1; - - // Check for a bit-width mismatch. - if (I1.getBitWidth() > I2.getBitWidth()) - return compareValues(I1, I2.extend(I1.getBitWidth())); - else if (I2.getBitWidth() > I1.getBitWidth()) - return compareValues(I1.extend(I2.getBitWidth()), I2); - - // We have a signedness mismatch. Check for negative values and do an - // unsigned compare if both are positive. - if (I1.isSigned()) { - assert(!I2.isSigned() && "Expected signed mismatch"); - if (I1.isNegative()) - return -1; - } else { - assert(I2.isSigned() && "Expected signed mismatch"); - if (I2.isNegative()) - return 1; - } - - return I1.eq(I2) ? 0 : I1.ugt(I2) ? 1 : -1; - } - - static APSInt get(int64_t X) { return APSInt(APInt(64, X), false); } - static APSInt getUnsigned(uint64_t X) { return APSInt(APInt(64, X), true); } - - /// Profile - Used to insert APSInt objects, or objects that contain APSInt - /// objects, into FoldingSets. - void Profile(FoldingSetNodeID& ID) const; -}; - -inline bool operator==(int64_t V1, const APSInt &V2) { return V2 == V1; } -inline bool operator!=(int64_t V1, const APSInt &V2) { return V2 != V1; } -inline bool operator<=(int64_t V1, const APSInt &V2) { return V2 >= V1; } -inline bool operator>=(int64_t V1, const APSInt &V2) { return V2 <= V1; } -inline bool operator<(int64_t V1, const APSInt &V2) { return V2 > V1; } -inline bool operator>(int64_t V1, const APSInt &V2) { return V2 < V1; } - -inline raw_ostream &operator<<(raw_ostream &OS, const APSInt &I) { - I.print(OS, I.isSigned()); - return OS; -} - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/ArrayRef.h b/llvm/include/llvm/ADT/ArrayRef.h deleted file mode 100644 index 95a1e62e..00000000 --- a/llvm/include/llvm/ADT/ArrayRef.h +++ /dev/null @@ -1,396 +0,0 @@ -//===--- ArrayRef.h - Array Reference Wrapper -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_ARRAYREF_H -#define LLVM_ADT_ARRAYREF_H - -#include "llvm/ADT/Hashing.h" -#include "llvm/ADT/None.h" -#include "llvm/ADT/SmallVector.h" -#include - -namespace llvm { - /// ArrayRef - Represent a constant reference to an array (0 or more elements - /// consecutively in memory), i.e. a start pointer and a length. It allows - /// various APIs to take consecutive elements easily and conveniently. - /// - /// This class does not own the underlying data, it is expected to be used in - /// situations where the data resides in some other buffer, whose lifetime - /// extends past that of the ArrayRef. For this reason, it is not in general - /// safe to store an ArrayRef. - /// - /// This is intended to be trivially copyable, so it should be passed by - /// value. - template - class ArrayRef { - public: - typedef const T *iterator; - typedef const T *const_iterator; - typedef size_t size_type; - - typedef std::reverse_iterator reverse_iterator; - - private: - /// The start of the array, in an external buffer. - const T *Data; - - /// The number of elements. - size_type Length; - - public: - /// @name Constructors - /// @{ - - /// Construct an empty ArrayRef. - /*implicit*/ ArrayRef() : Data(nullptr), Length(0) {} - - /// Construct an empty ArrayRef from None. - /*implicit*/ ArrayRef(NoneType) : Data(nullptr), Length(0) {} - - /// Construct an ArrayRef from a single element. - /*implicit*/ ArrayRef(const T &OneElt) - : Data(&OneElt), Length(1) {} - - /// Construct an ArrayRef from a pointer and length. - /*implicit*/ ArrayRef(const T *data, size_t length) - : Data(data), Length(length) {} - - /// Construct an ArrayRef from a range. - ArrayRef(const T *begin, const T *end) - : Data(begin), Length(end - begin) {} - - /// Construct an ArrayRef from a SmallVector. This is templated in order to - /// avoid instantiating SmallVectorTemplateCommon whenever we - /// copy-construct an ArrayRef. - template - /*implicit*/ ArrayRef(const SmallVectorTemplateCommon &Vec) - : Data(Vec.data()), Length(Vec.size()) { - } - - /// Construct an ArrayRef from a std::vector. - template - /*implicit*/ ArrayRef(const std::vector &Vec) - : Data(Vec.data()), Length(Vec.size()) {} - - /// Construct an ArrayRef from a C array. - template - /*implicit*/ LLVM_CONSTEXPR ArrayRef(const T (&Arr)[N]) - : Data(Arr), Length(N) {} - - /// Construct an ArrayRef from a std::initializer_list. - /*implicit*/ ArrayRef(const std::initializer_list &Vec) - : Data(Vec.begin() == Vec.end() ? (T*)nullptr : Vec.begin()), - Length(Vec.size()) {} - - /// Construct an ArrayRef from ArrayRef. This uses SFINAE to - /// ensure that only ArrayRefs of pointers can be converted. - template - ArrayRef( - const ArrayRef &A, - typename std::enable_if< - std::is_convertible::value>::type * = nullptr) - : Data(A.data()), Length(A.size()) {} - - /// Construct an ArrayRef from a SmallVector. This is - /// templated in order to avoid instantiating SmallVectorTemplateCommon - /// whenever we copy-construct an ArrayRef. - template - /*implicit*/ ArrayRef( - const SmallVectorTemplateCommon &Vec, - typename std::enable_if< - std::is_convertible::value>::type * = nullptr) - : Data(Vec.data()), Length(Vec.size()) { - } - - /// Construct an ArrayRef from std::vector. This uses SFINAE - /// to ensure that only vectors of pointers can be converted. - template - ArrayRef(const std::vector &Vec, - typename std::enable_if< - std::is_convertible::value>::type* = 0) - : Data(Vec.data()), Length(Vec.size()) {} - - /// @} - /// @name Simple Operations - /// @{ - - iterator begin() const { return Data; } - iterator end() const { return Data + Length; } - - reverse_iterator rbegin() const { return reverse_iterator(end()); } - reverse_iterator rend() const { return reverse_iterator(begin()); } - - /// empty - Check if the array is empty. - bool empty() const { return Length == 0; } - - const T *data() const { return Data; } - - /// size - Get the array size. - size_t size() const { return Length; } - - /// front - Get the first element. - const T &front() const { - assert(!empty()); - return Data[0]; - } - - /// back - Get the last element. - const T &back() const { - assert(!empty()); - return Data[Length-1]; - } - - // copy - Allocate copy in Allocator and return ArrayRef to it. - template ArrayRef copy(Allocator &A) { - T *Buff = A.template Allocate(Length); - std::uninitialized_copy(begin(), end(), Buff); - return ArrayRef(Buff, Length); - } - - /// equals - Check for element-wise equality. - bool equals(ArrayRef RHS) const { - if (Length != RHS.Length) - return false; - return std::equal(begin(), end(), RHS.begin()); - } - - /// slice(n) - Chop off the first N elements of the array. - ArrayRef slice(size_t N) const { - assert(N <= size() && "Invalid specifier"); - return ArrayRef(data()+N, size()-N); - } - - /// slice(n, m) - Chop off the first N elements of the array, and keep M - /// elements in the array. - ArrayRef slice(size_t N, size_t M) const { - assert(N+M <= size() && "Invalid specifier"); - return ArrayRef(data()+N, M); - } - - /// \brief Drop the first \p N elements of the array. - ArrayRef drop_front(size_t N = 1) const { - assert(size() >= N && "Dropping more elements than exist"); - return slice(N, size() - N); - } - - /// \brief Drop the last \p N elements of the array. - ArrayRef drop_back(size_t N = 1) const { - assert(size() >= N && "Dropping more elements than exist"); - return slice(0, size() - N); - } - - /// @} - /// @name Operator Overloads - /// @{ - const T &operator[](size_t Index) const { - assert(Index < Length && "Invalid index!"); - return Data[Index]; - } - - /// @} - /// @name Expensive Operations - /// @{ - std::vector vec() const { - return std::vector(Data, Data+Length); - } - - /// @} - /// @name Conversion operators - /// @{ - operator std::vector() const { - return std::vector(Data, Data+Length); - } - - /// @} - }; - - /// MutableArrayRef - Represent a mutable reference to an array (0 or more - /// elements consecutively in memory), i.e. a start pointer and a length. It - /// allows various APIs to take and modify consecutive elements easily and - /// conveniently. - /// - /// This class does not own the underlying data, it is expected to be used in - /// situations where the data resides in some other buffer, whose lifetime - /// extends past that of the MutableArrayRef. For this reason, it is not in - /// general safe to store a MutableArrayRef. - /// - /// This is intended to be trivially copyable, so it should be passed by - /// value. - template - class MutableArrayRef : public ArrayRef { - public: - typedef T *iterator; - - typedef std::reverse_iterator reverse_iterator; - - /// Construct an empty MutableArrayRef. - /*implicit*/ MutableArrayRef() : ArrayRef() {} - - /// Construct an empty MutableArrayRef from None. - /*implicit*/ MutableArrayRef(NoneType) : ArrayRef() {} - - /// Construct an MutableArrayRef from a single element. - /*implicit*/ MutableArrayRef(T &OneElt) : ArrayRef(OneElt) {} - - /// Construct an MutableArrayRef from a pointer and length. - /*implicit*/ MutableArrayRef(T *data, size_t length) - : ArrayRef(data, length) {} - - /// Construct an MutableArrayRef from a range. - MutableArrayRef(T *begin, T *end) : ArrayRef(begin, end) {} - - /// Construct an MutableArrayRef from a SmallVector. - /*implicit*/ MutableArrayRef(SmallVectorImpl &Vec) - : ArrayRef(Vec) {} - - /// Construct a MutableArrayRef from a std::vector. - /*implicit*/ MutableArrayRef(std::vector &Vec) - : ArrayRef(Vec) {} - - /// Construct an MutableArrayRef from a C array. - template - /*implicit*/ LLVM_CONSTEXPR MutableArrayRef(T (&Arr)[N]) - : ArrayRef(Arr) {} - - T *data() const { return const_cast(ArrayRef::data()); } - - iterator begin() const { return data(); } - iterator end() const { return data() + this->size(); } - - reverse_iterator rbegin() const { return reverse_iterator(end()); } - reverse_iterator rend() const { return reverse_iterator(begin()); } - - /// front - Get the first element. - T &front() const { - assert(!this->empty()); - return data()[0]; - } - - /// back - Get the last element. - T &back() const { - assert(!this->empty()); - return data()[this->size()-1]; - } - - /// slice(n) - Chop off the first N elements of the array. - MutableArrayRef slice(size_t N) const { - assert(N <= this->size() && "Invalid specifier"); - return MutableArrayRef(data()+N, this->size()-N); - } - - /// slice(n, m) - Chop off the first N elements of the array, and keep M - /// elements in the array. - MutableArrayRef slice(size_t N, size_t M) const { - assert(N+M <= this->size() && "Invalid specifier"); - return MutableArrayRef(data()+N, M); - } - - /// \brief Drop the first \p N elements of the array. - MutableArrayRef drop_front(size_t N = 1) const { - assert(this->size() >= N && "Dropping more elements than exist"); - return slice(N, this->size() - N); - } - - MutableArrayRef drop_back(size_t N = 1) const { - assert(this->size() >= N && "Dropping more elements than exist"); - return slice(0, this->size() - N); - } - - /// @} - /// @name Operator Overloads - /// @{ - T &operator[](size_t Index) const { - assert(Index < this->size() && "Invalid index!"); - return data()[Index]; - } - }; - - /// @name ArrayRef Convenience constructors - /// @{ - - /// Construct an ArrayRef from a single element. - template - ArrayRef makeArrayRef(const T &OneElt) { - return OneElt; - } - - /// Construct an ArrayRef from a pointer and length. - template - ArrayRef makeArrayRef(const T *data, size_t length) { - return ArrayRef(data, length); - } - - /// Construct an ArrayRef from a range. - template - ArrayRef makeArrayRef(const T *begin, const T *end) { - return ArrayRef(begin, end); - } - - /// Construct an ArrayRef from a SmallVector. - template - ArrayRef makeArrayRef(const SmallVectorImpl &Vec) { - return Vec; - } - - /// Construct an ArrayRef from a SmallVector. - template - ArrayRef makeArrayRef(const SmallVector &Vec) { - return Vec; - } - - /// Construct an ArrayRef from a std::vector. - template - ArrayRef makeArrayRef(const std::vector &Vec) { - return Vec; - } - - /// Construct an ArrayRef from an ArrayRef (no-op) (const) - template ArrayRef makeArrayRef(const ArrayRef &Vec) { - return Vec; - } - - /// Construct an ArrayRef from an ArrayRef (no-op) - template ArrayRef &makeArrayRef(ArrayRef &Vec) { - return Vec; - } - - /// Construct an ArrayRef from a C array. - template - ArrayRef makeArrayRef(const T (&Arr)[N]) { - return ArrayRef(Arr); - } - - /// @} - /// @name ArrayRef Comparison Operators - /// @{ - - template - inline bool operator==(ArrayRef LHS, ArrayRef RHS) { - return LHS.equals(RHS); - } - - template - inline bool operator!=(ArrayRef LHS, ArrayRef RHS) { - return !(LHS == RHS); - } - - /// @} - - // ArrayRefs can be treated like a POD type. - template struct isPodLike; - template struct isPodLike > { - static const bool value = true; - }; - - template hash_code hash_value(ArrayRef S) { - return hash_combine_range(S.begin(), S.end()); - } -} // end namespace llvm - -#endif // LLVM_ADT_ARRAYREF_H diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h deleted file mode 100644 index 66143712..00000000 --- a/llvm/include/llvm/ADT/BitVector.h +++ /dev/null @@ -1,591 +0,0 @@ -//===- llvm/ADT/BitVector.h - Bit vectors -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the BitVector class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_BITVECTOR_H -#define LLVM_ADT_BITVECTOR_H - -#include "llvm/Support/MathExtras.h" -#include -#include -#include -#include -#include -#include - -namespace llvm { - -class BitVector { - typedef unsigned long BitWord; - - enum { BITWORD_SIZE = (unsigned)sizeof(BitWord) * CHAR_BIT }; - - static_assert(BITWORD_SIZE == 64 || BITWORD_SIZE == 32, - "Unsupported word size"); - - BitWord *Bits; // Actual bits. - unsigned Size; // Size of bitvector in bits. - unsigned Capacity; // Number of BitWords allocated in the Bits array. - -public: - typedef unsigned size_type; - // Encapsulation of a single bit. - class reference { - friend class BitVector; - - BitWord *WordRef; - unsigned BitPos; - - reference(); // Undefined - - public: - reference(BitVector &b, unsigned Idx) { - WordRef = &b.Bits[Idx / BITWORD_SIZE]; - BitPos = Idx % BITWORD_SIZE; - } - - reference(const reference&) = default; - - reference &operator=(reference t) { - *this = bool(t); - return *this; - } - - reference& operator=(bool t) { - if (t) - *WordRef |= BitWord(1) << BitPos; - else - *WordRef &= ~(BitWord(1) << BitPos); - return *this; - } - - operator bool() const { - return ((*WordRef) & (BitWord(1) << BitPos)) != 0; - } - }; - - - /// BitVector default ctor - Creates an empty bitvector. - BitVector() : Size(0), Capacity(0) { - Bits = nullptr; - } - - /// BitVector ctor - Creates a bitvector of specified number of bits. All - /// bits are initialized to the specified value. - explicit BitVector(unsigned s, bool t = false) : Size(s) { - Capacity = NumBitWords(s); - Bits = (BitWord *)std::malloc(Capacity * sizeof(BitWord)); - init_words(Bits, Capacity, t); - if (t) - clear_unused_bits(); - } - - /// BitVector copy ctor. - BitVector(const BitVector &RHS) : Size(RHS.size()) { - if (Size == 0) { - Bits = nullptr; - Capacity = 0; - return; - } - - Capacity = NumBitWords(RHS.size()); - Bits = (BitWord *)std::malloc(Capacity * sizeof(BitWord)); - std::memcpy(Bits, RHS.Bits, Capacity * sizeof(BitWord)); - } - - BitVector(BitVector &&RHS) - : Bits(RHS.Bits), Size(RHS.Size), Capacity(RHS.Capacity) { - RHS.Bits = nullptr; - RHS.Size = RHS.Capacity = 0; - } - - ~BitVector() { - std::free(Bits); - } - - /// empty - Tests whether there are no bits in this bitvector. - bool empty() const { return Size == 0; } - - /// size - Returns the number of bits in this bitvector. - size_type size() const { return Size; } - - /// count - Returns the number of bits which are set. - size_type count() const { - unsigned NumBits = 0; - for (unsigned i = 0; i < NumBitWords(size()); ++i) - NumBits += countPopulation(Bits[i]); - return NumBits; - } - - /// any - Returns true if any bit is set. - bool any() const { - for (unsigned i = 0; i < NumBitWords(size()); ++i) - if (Bits[i] != 0) - return true; - return false; - } - - /// all - Returns true if all bits are set. - bool all() const { - for (unsigned i = 0; i < Size / BITWORD_SIZE; ++i) - if (Bits[i] != ~0UL) - return false; - - // If bits remain check that they are ones. The unused bits are always zero. - if (unsigned Remainder = Size % BITWORD_SIZE) - return Bits[Size / BITWORD_SIZE] == (1UL << Remainder) - 1; - - return true; - } - - /// none - Returns true if none of the bits are set. - bool none() const { - return !any(); - } - - /// find_first - Returns the index of the first set bit, -1 if none - /// of the bits are set. - int find_first() const { - for (unsigned i = 0; i < NumBitWords(size()); ++i) - if (Bits[i] != 0) - return i * BITWORD_SIZE + countTrailingZeros(Bits[i]); - return -1; - } - - /// find_next - Returns the index of the next set bit following the - /// "Prev" bit. Returns -1 if the next set bit is not found. - int find_next(unsigned Prev) const { - ++Prev; - if (Prev >= Size) - return -1; - - unsigned WordPos = Prev / BITWORD_SIZE; - unsigned BitPos = Prev % BITWORD_SIZE; - BitWord Copy = Bits[WordPos]; - // Mask off previous bits. - Copy &= ~0UL << BitPos; - - if (Copy != 0) - return WordPos * BITWORD_SIZE + countTrailingZeros(Copy); - - // Check subsequent words. - for (unsigned i = WordPos+1; i < NumBitWords(size()); ++i) - if (Bits[i] != 0) - return i * BITWORD_SIZE + countTrailingZeros(Bits[i]); - return -1; - } - - /// clear - Clear all bits. - void clear() { - Size = 0; - } - - /// resize - Grow or shrink the bitvector. - void resize(unsigned N, bool t = false) { - if (N > Capacity * BITWORD_SIZE) { - unsigned OldCapacity = Capacity; - grow(N); - init_words(&Bits[OldCapacity], (Capacity-OldCapacity), t); - } - - // Set any old unused bits that are now included in the BitVector. This - // may set bits that are not included in the new vector, but we will clear - // them back out below. - if (N > Size) - set_unused_bits(t); - - // Update the size, and clear out any bits that are now unused - unsigned OldSize = Size; - Size = N; - if (t || N < OldSize) - clear_unused_bits(); - } - - void reserve(unsigned N) { - if (N > Capacity * BITWORD_SIZE) - grow(N); - } - - // Set, reset, flip - BitVector &set() { - init_words(Bits, Capacity, true); - clear_unused_bits(); - return *this; - } - - BitVector &set(unsigned Idx) { - assert(Bits && "Bits never allocated"); - Bits[Idx / BITWORD_SIZE] |= BitWord(1) << (Idx % BITWORD_SIZE); - return *this; - } - - /// set - Efficiently set a range of bits in [I, E) - BitVector &set(unsigned I, unsigned E) { - assert(I <= E && "Attempted to set backwards range!"); - assert(E <= size() && "Attempted to set out-of-bounds range!"); - - if (I == E) return *this; - - if (I / BITWORD_SIZE == E / BITWORD_SIZE) { - BitWord EMask = 1UL << (E % BITWORD_SIZE); - BitWord IMask = 1UL << (I % BITWORD_SIZE); - BitWord Mask = EMask - IMask; - Bits[I / BITWORD_SIZE] |= Mask; - return *this; - } - - BitWord PrefixMask = ~0UL << (I % BITWORD_SIZE); - Bits[I / BITWORD_SIZE] |= PrefixMask; - I = alignTo(I, BITWORD_SIZE); - - for (; I + BITWORD_SIZE <= E; I += BITWORD_SIZE) - Bits[I / BITWORD_SIZE] = ~0UL; - - BitWord PostfixMask = (1UL << (E % BITWORD_SIZE)) - 1; - if (I < E) - Bits[I / BITWORD_SIZE] |= PostfixMask; - - return *this; - } - - BitVector &reset() { - init_words(Bits, Capacity, false); - return *this; - } - - BitVector &reset(unsigned Idx) { - Bits[Idx / BITWORD_SIZE] &= ~(BitWord(1) << (Idx % BITWORD_SIZE)); - return *this; - } - - /// reset - Efficiently reset a range of bits in [I, E) - BitVector &reset(unsigned I, unsigned E) { - assert(I <= E && "Attempted to reset backwards range!"); - assert(E <= size() && "Attempted to reset out-of-bounds range!"); - - if (I == E) return *this; - - if (I / BITWORD_SIZE == E / BITWORD_SIZE) { - BitWord EMask = 1UL << (E % BITWORD_SIZE); - BitWord IMask = 1UL << (I % BITWORD_SIZE); - BitWord Mask = EMask - IMask; - Bits[I / BITWORD_SIZE] &= ~Mask; - return *this; - } - - BitWord PrefixMask = ~0UL << (I % BITWORD_SIZE); - Bits[I / BITWORD_SIZE] &= ~PrefixMask; - I = alignTo(I, BITWORD_SIZE); - - for (; I + BITWORD_SIZE <= E; I += BITWORD_SIZE) - Bits[I / BITWORD_SIZE] = 0UL; - - BitWord PostfixMask = (1UL << (E % BITWORD_SIZE)) - 1; - if (I < E) - Bits[I / BITWORD_SIZE] &= ~PostfixMask; - - return *this; - } - - BitVector &flip() { - for (unsigned i = 0; i < NumBitWords(size()); ++i) - Bits[i] = ~Bits[i]; - clear_unused_bits(); - return *this; - } - - BitVector &flip(unsigned Idx) { - Bits[Idx / BITWORD_SIZE] ^= BitWord(1) << (Idx % BITWORD_SIZE); - return *this; - } - - // Indexing. - reference operator[](unsigned Idx) { - assert (Idx < Size && "Out-of-bounds Bit access."); - return reference(*this, Idx); - } - - bool operator[](unsigned Idx) const { - assert (Idx < Size && "Out-of-bounds Bit access."); - BitWord Mask = BitWord(1) << (Idx % BITWORD_SIZE); - return (Bits[Idx / BITWORD_SIZE] & Mask) != 0; - } - - bool test(unsigned Idx) const { - return (*this)[Idx]; - } - - /// Test if any common bits are set. - bool anyCommon(const BitVector &RHS) const { - unsigned ThisWords = NumBitWords(size()); - unsigned RHSWords = NumBitWords(RHS.size()); - for (unsigned i = 0, e = std::min(ThisWords, RHSWords); i != e; ++i) - if (Bits[i] & RHS.Bits[i]) - return true; - return false; - } - - // Comparison operators. - bool operator==(const BitVector &RHS) const { - unsigned ThisWords = NumBitWords(size()); - unsigned RHSWords = NumBitWords(RHS.size()); - unsigned i; - for (i = 0; i != std::min(ThisWords, RHSWords); ++i) - if (Bits[i] != RHS.Bits[i]) - return false; - - // Verify that any extra words are all zeros. - if (i != ThisWords) { - for (; i != ThisWords; ++i) - if (Bits[i]) - return false; - } else if (i != RHSWords) { - for (; i != RHSWords; ++i) - if (RHS.Bits[i]) - return false; - } - return true; - } - - bool operator!=(const BitVector &RHS) const { - return !(*this == RHS); - } - - /// Intersection, union, disjoint union. - BitVector &operator&=(const BitVector &RHS) { - unsigned ThisWords = NumBitWords(size()); - unsigned RHSWords = NumBitWords(RHS.size()); - unsigned i; - for (i = 0; i != std::min(ThisWords, RHSWords); ++i) - Bits[i] &= RHS.Bits[i]; - - // Any bits that are just in this bitvector become zero, because they aren't - // in the RHS bit vector. Any words only in RHS are ignored because they - // are already zero in the LHS. - for (; i != ThisWords; ++i) - Bits[i] = 0; - - return *this; - } - - /// reset - Reset bits that are set in RHS. Same as *this &= ~RHS. - BitVector &reset(const BitVector &RHS) { - unsigned ThisWords = NumBitWords(size()); - unsigned RHSWords = NumBitWords(RHS.size()); - unsigned i; - for (i = 0; i != std::min(ThisWords, RHSWords); ++i) - Bits[i] &= ~RHS.Bits[i]; - return *this; - } - - /// test - Check if (This - RHS) is zero. - /// This is the same as reset(RHS) and any(). - bool test(const BitVector &RHS) const { - unsigned ThisWords = NumBitWords(size()); - unsigned RHSWords = NumBitWords(RHS.size()); - unsigned i; - for (i = 0; i != std::min(ThisWords, RHSWords); ++i) - if ((Bits[i] & ~RHS.Bits[i]) != 0) - return true; - - for (; i != ThisWords ; ++i) - if (Bits[i] != 0) - return true; - - return false; - } - - BitVector &operator|=(const BitVector &RHS) { - if (size() < RHS.size()) - resize(RHS.size()); - for (size_t i = 0, e = NumBitWords(RHS.size()); i != e; ++i) - Bits[i] |= RHS.Bits[i]; - return *this; - } - - BitVector &operator^=(const BitVector &RHS) { - if (size() < RHS.size()) - resize(RHS.size()); - for (size_t i = 0, e = NumBitWords(RHS.size()); i != e; ++i) - Bits[i] ^= RHS.Bits[i]; - return *this; - } - - // Assignment operator. - const BitVector &operator=(const BitVector &RHS) { - if (this == &RHS) return *this; - - Size = RHS.size(); - unsigned RHSWords = NumBitWords(Size); - if (Size <= Capacity * BITWORD_SIZE) { - if (Size) - std::memcpy(Bits, RHS.Bits, RHSWords * sizeof(BitWord)); - clear_unused_bits(); - return *this; - } - - // Grow the bitvector to have enough elements. - Capacity = RHSWords; - assert(Capacity > 0 && "negative capacity?"); - BitWord *NewBits = (BitWord *)std::malloc(Capacity * sizeof(BitWord)); - std::memcpy(NewBits, RHS.Bits, Capacity * sizeof(BitWord)); - - // Destroy the old bits. - std::free(Bits); - Bits = NewBits; - - return *this; - } - - const BitVector &operator=(BitVector &&RHS) { - if (this == &RHS) return *this; - - std::free(Bits); - Bits = RHS.Bits; - Size = RHS.Size; - Capacity = RHS.Capacity; - - RHS.Bits = nullptr; - RHS.Size = RHS.Capacity = 0; - - return *this; - } - - void swap(BitVector &RHS) { - std::swap(Bits, RHS.Bits); - std::swap(Size, RHS.Size); - std::swap(Capacity, RHS.Capacity); - } - - //===--------------------------------------------------------------------===// - // Portable bit mask operations. - //===--------------------------------------------------------------------===// - // - // These methods all operate on arrays of uint32_t, each holding 32 bits. The - // fixed word size makes it easier to work with literal bit vector constants - // in portable code. - // - // The LSB in each word is the lowest numbered bit. The size of a portable - // bit mask is always a whole multiple of 32 bits. If no bit mask size is - // given, the bit mask is assumed to cover the entire BitVector. - - /// setBitsInMask - Add '1' bits from Mask to this vector. Don't resize. - /// This computes "*this |= Mask". - void setBitsInMask(const uint32_t *Mask, unsigned MaskWords = ~0u) { - applyMask(Mask, MaskWords); - } - - /// clearBitsInMask - Clear any bits in this vector that are set in Mask. - /// Don't resize. This computes "*this &= ~Mask". - void clearBitsInMask(const uint32_t *Mask, unsigned MaskWords = ~0u) { - applyMask(Mask, MaskWords); - } - - /// setBitsNotInMask - Add a bit to this vector for every '0' bit in Mask. - /// Don't resize. This computes "*this |= ~Mask". - void setBitsNotInMask(const uint32_t *Mask, unsigned MaskWords = ~0u) { - applyMask(Mask, MaskWords); - } - - /// clearBitsNotInMask - Clear a bit in this vector for every '0' bit in Mask. - /// Don't resize. This computes "*this &= Mask". - void clearBitsNotInMask(const uint32_t *Mask, unsigned MaskWords = ~0u) { - applyMask(Mask, MaskWords); - } - -private: - unsigned NumBitWords(unsigned S) const { - return (S + BITWORD_SIZE-1) / BITWORD_SIZE; - } - - // Set the unused bits in the high words. - void set_unused_bits(bool t = true) { - // Set high words first. - unsigned UsedWords = NumBitWords(Size); - if (Capacity > UsedWords) - init_words(&Bits[UsedWords], (Capacity-UsedWords), t); - - // Then set any stray high bits of the last used word. - unsigned ExtraBits = Size % BITWORD_SIZE; - if (ExtraBits) { - BitWord ExtraBitMask = ~0UL << ExtraBits; - if (t) - Bits[UsedWords-1] |= ExtraBitMask; - else - Bits[UsedWords-1] &= ~ExtraBitMask; - } - } - - // Clear the unused bits in the high words. - void clear_unused_bits() { - set_unused_bits(false); - } - - void grow(unsigned NewSize) { - Capacity = std::max(NumBitWords(NewSize), Capacity * 2); - assert(Capacity > 0 && "realloc-ing zero space"); - Bits = (BitWord *)std::realloc(Bits, Capacity * sizeof(BitWord)); - - clear_unused_bits(); - } - - void init_words(BitWord *B, unsigned NumWords, bool t) { - memset(B, 0 - (int)t, NumWords*sizeof(BitWord)); - } - - template - void applyMask(const uint32_t *Mask, unsigned MaskWords) { - static_assert(BITWORD_SIZE % 32 == 0, "Unsupported BitWord size."); - MaskWords = std::min(MaskWords, (size() + 31) / 32); - const unsigned Scale = BITWORD_SIZE / 32; - unsigned i; - for (i = 0; MaskWords >= Scale; ++i, MaskWords -= Scale) { - BitWord BW = Bits[i]; - // This inner loop should unroll completely when BITWORD_SIZE > 32. - for (unsigned b = 0; b != BITWORD_SIZE; b += 32) { - uint32_t M = *Mask++; - if (InvertMask) M = ~M; - if (AddBits) BW |= BitWord(M) << b; - else BW &= ~(BitWord(M) << b); - } - Bits[i] = BW; - } - for (unsigned b = 0; MaskWords; b += 32, --MaskWords) { - uint32_t M = *Mask++; - if (InvertMask) M = ~M; - if (AddBits) Bits[i] |= BitWord(M) << b; - else Bits[i] &= ~(BitWord(M) << b); - } - if (AddBits) - clear_unused_bits(); - } - -public: - /// Return the size (in bytes) of the bit vector. - size_t getMemorySize() const { return Capacity * sizeof(BitWord); } -}; - -static inline size_t capacity_in_bytes(const BitVector &X) { - return X.getMemorySize(); -} - -} // end namespace llvm - -namespace std { - /// Implement std::swap in terms of BitVector swap. - inline void - swap(llvm::BitVector &LHS, llvm::BitVector &RHS) { - LHS.swap(RHS); - } -} // end namespace std - -#endif // LLVM_ADT_BITVECTOR_H diff --git a/llvm/include/llvm/ADT/BitmaskEnum.h b/llvm/include/llvm/ADT/BitmaskEnum.h deleted file mode 100644 index 18c6ba5a..00000000 --- a/llvm/include/llvm/ADT/BitmaskEnum.h +++ /dev/null @@ -1,153 +0,0 @@ -//===-- llvm/ADT/BitmaskEnum.h ----------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_BITMASKENUM_H -#define LLVM_ADT_BITMASKENUM_H - -#include -#include -#include - -#include "llvm/Support/MathExtras.h" - -/// LLVM_MARK_AS_BITMASK_ENUM lets you opt in an individual enum type so you can -/// perform bitwise operations on it without putting static_cast everywhere. -/// -/// \code -/// enum MyEnum { -/// E1 = 1, E2 = 2, E3 = 4, E4 = 8, -/// LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ E4) -/// }; -/// -/// void Foo() { -/// MyEnum A = (E1 | E2) & E3 ^ ~E4; // Look, ma: No static_cast! -/// } -/// \endcode -/// -/// Normally when you do a bitwise operation on an enum value, you get back an -/// instance of the underlying type (e.g. int). But using this macro, bitwise -/// ops on your enum will return you back instances of the enum. This is -/// particularly useful for enums which represent a combination of flags. -/// -/// The parameter to LLVM_MARK_AS_BITMASK_ENUM should be the largest individual -/// value in your enum. -/// -/// All of the enum's values must be non-negative. -#define LLVM_MARK_AS_BITMASK_ENUM(LargestValue) \ - LLVM_BITMASK_LARGEST_ENUMERATOR = LargestValue - -/// LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE() pulls the operator overloads used -/// by LLVM_MARK_AS_BITMASK_ENUM into the current namespace. -/// -/// Suppose you have an enum foo::bar::MyEnum. Before using -/// LLVM_MARK_AS_BITMASK_ENUM on MyEnum, you must put -/// LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE() somewhere inside namespace foo or -/// namespace foo::bar. This allows the relevant operator overloads to be found -/// by ADL. -/// -/// You don't need to use this macro in namespace llvm; it's done at the bottom -/// of this file. -#define LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE() \ - using ::llvm::BitmaskEnumDetail::operator~; \ - using ::llvm::BitmaskEnumDetail::operator|; \ - using ::llvm::BitmaskEnumDetail::operator&; \ - using ::llvm::BitmaskEnumDetail::operator^; \ - using ::llvm::BitmaskEnumDetail::operator|=; \ - using ::llvm::BitmaskEnumDetail::operator&=; \ - /* Force a semicolon at the end of this macro. */ \ - using ::llvm::BitmaskEnumDetail::operator^= - -namespace llvm { - -/// Traits class to determine whether an enum has a -/// LLVM_BITMASK_LARGEST_ENUMERATOR enumerator. -template -struct is_bitmask_enum : std::false_type {}; - -template -struct is_bitmask_enum< - E, typename std::enable_if= - 0>::type> : std::true_type {}; -namespace BitmaskEnumDetail { - -/// Get a bitmask with 1s in all places up to the high-order bit of E's largest -/// value. -template typename std::underlying_type::type Mask() { - // On overflow, NextPowerOf2 returns zero with the type uint64_t, so - // subtracting 1 gives us the mask with all bits set, like we want. - return NextPowerOf2(static_cast::type>( - E::LLVM_BITMASK_LARGEST_ENUMERATOR)) - - 1; -} - -/// Check that Val is in range for E, and return Val cast to E's underlying -/// type. -template typename std::underlying_type::type Underlying(E Val) { - auto U = static_cast::type>(Val); - assert(U >= 0 && "Negative enum values are not allowed."); - assert(U <= Mask() && "Enum value too large (or largest val too small?)"); - return U; -} - -template ::value>::type> -E operator~(E Val) { - return static_cast(~Underlying(Val) & Mask()); -} - -template ::value>::type> -E operator|(E LHS, E RHS) { - return static_cast(Underlying(LHS) | Underlying(RHS)); -} - -template ::value>::type> -E operator&(E LHS, E RHS) { - return static_cast(Underlying(LHS) & Underlying(RHS)); -} - -template ::value>::type> -E operator^(E LHS, E RHS) { - return static_cast(Underlying(LHS) ^ Underlying(RHS)); -} - -// |=, &=, and ^= return a reference to LHS, to match the behavior of the -// operators on builtin types. - -template ::value>::type> -E &operator|=(E &LHS, E RHS) { - LHS = LHS | RHS; - return LHS; -} - -template ::value>::type> -E &operator&=(E &LHS, E RHS) { - LHS = LHS & RHS; - return LHS; -} - -template ::value>::type> -E &operator^=(E &LHS, E RHS) { - LHS = LHS ^ RHS; - return LHS; -} - -} // namespace BitmaskEnumDetail - -// Enable bitmask enums in namespace ::llvm and all nested namespaces. -LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h b/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h deleted file mode 100644 index 3dd862c8..00000000 --- a/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h +++ /dev/null @@ -1,77 +0,0 @@ -//===--- DAGDeltaAlgorithm.h - A DAG Minimization Algorithm ----*- C++ -*--===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_DAGDELTAALGORITHM_H -#define LLVM_ADT_DAGDELTAALGORITHM_H - -#include -#include - -namespace llvm { - -/// DAGDeltaAlgorithm - Implements a "delta debugging" algorithm for minimizing -/// directed acyclic graphs using a predicate function. -/// -/// The result of the algorithm is a subset of the input change set which is -/// guaranteed to satisfy the predicate, assuming that the input set did. For -/// well formed predicates, the result set is guaranteed to be such that -/// removing any single element not required by the dependencies on the other -/// elements would falsify the predicate. -/// -/// The DAG should be used to represent dependencies in the changes which are -/// likely to hold across the predicate function. That is, for a particular -/// changeset S and predicate P: -/// -/// P(S) => P(S union pred(S)) -/// -/// The minization algorithm uses this dependency information to attempt to -/// eagerly prune large subsets of changes. As with \see DeltaAlgorithm, the DAG -/// is not required to satisfy this property, but the algorithm will run -/// substantially fewer tests with appropriate dependencies. \see DeltaAlgorithm -/// for more information on the properties which the predicate function itself -/// should satisfy. -class DAGDeltaAlgorithm { - virtual void anchor(); -public: - typedef unsigned change_ty; - typedef std::pair edge_ty; - - // FIXME: Use a decent data structure. - typedef std::set changeset_ty; - typedef std::vector changesetlist_ty; - -public: - virtual ~DAGDeltaAlgorithm() {} - - /// Run - Minimize the DAG formed by the \p Changes vertices and the - /// \p Dependencies edges by executing \see ExecuteOneTest() on subsets of - /// changes and returning the smallest set which still satisfies the test - /// predicate and the input \p Dependencies. - /// - /// \param Changes The list of changes. - /// - /// \param Dependencies The list of dependencies amongst changes. For each - /// (x,y) in \p Dependencies, both x and y must be in \p Changes. The - /// minimization algorithm guarantees that for each tested changed set S, - /// \f$ x \in S \f$ implies \f$ y \in S \f$. It is an error to have cyclic - /// dependencies. - changeset_ty Run(const changeset_ty &Changes, - const std::vector &Dependencies); - - /// UpdatedSearchState - Callback used when the search state changes. - virtual void UpdatedSearchState(const changeset_ty &Changes, - const changesetlist_ty &Sets, - const changeset_ty &Required) {} - - /// ExecuteOneTest - Execute a single test predicate on the change set \p S. - virtual bool ExecuteOneTest(const changeset_ty &S) = 0; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/DeltaAlgorithm.h b/llvm/include/llvm/ADT/DeltaAlgorithm.h deleted file mode 100644 index a26f37df..00000000 --- a/llvm/include/llvm/ADT/DeltaAlgorithm.h +++ /dev/null @@ -1,93 +0,0 @@ -//===--- DeltaAlgorithm.h - A Set Minimization Algorithm -------*- C++ -*--===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_DELTAALGORITHM_H -#define LLVM_ADT_DELTAALGORITHM_H - -#include -#include - -namespace llvm { - -/// DeltaAlgorithm - Implements the delta debugging algorithm (A. Zeller '99) -/// for minimizing arbitrary sets using a predicate function. -/// -/// The result of the algorithm is a subset of the input change set which is -/// guaranteed to satisfy the predicate, assuming that the input set did. For -/// well formed predicates, the result set is guaranteed to be such that -/// removing any single element would falsify the predicate. -/// -/// For best results the predicate function *should* (but need not) satisfy -/// certain properties, in particular: -/// (1) The predicate should return false on an empty set and true on the full -/// set. -/// (2) If the predicate returns true for a set of changes, it should return -/// true for all supersets of that set. -/// -/// It is not an error to provide a predicate that does not satisfy these -/// requirements, and the algorithm will generally produce reasonable -/// results. However, it may run substantially more tests than with a good -/// predicate. -class DeltaAlgorithm { -public: - typedef unsigned change_ty; - // FIXME: Use a decent data structure. - typedef std::set changeset_ty; - typedef std::vector changesetlist_ty; - -private: - /// Cache of failed test results. Successful test results are never cached - /// since we always reduce following a success. - std::set FailedTestsCache; - - /// GetTestResult - Get the test result for the \p Changes from the - /// cache, executing the test if necessary. - /// - /// \param Changes - The change set to test. - /// \return - The test result. - bool GetTestResult(const changeset_ty &Changes); - - /// Split - Partition a set of changes \p S into one or two subsets. - void Split(const changeset_ty &S, changesetlist_ty &Res); - - /// Delta - Minimize a set of \p Changes which has been partioned into - /// smaller sets, by attempting to remove individual subsets. - changeset_ty Delta(const changeset_ty &Changes, - const changesetlist_ty &Sets); - - /// Search - Search for a subset (or subsets) in \p Sets which can be - /// removed from \p Changes while still satisfying the predicate. - /// - /// \param Res - On success, a subset of Changes which satisfies the - /// predicate. - /// \return - True on success. - bool Search(const changeset_ty &Changes, const changesetlist_ty &Sets, - changeset_ty &Res); - -protected: - /// UpdatedSearchState - Callback used when the search state changes. - virtual void UpdatedSearchState(const changeset_ty &Changes, - const changesetlist_ty &Sets) {} - - /// ExecuteOneTest - Execute a single test predicate on the change set \p S. - virtual bool ExecuteOneTest(const changeset_ty &S) = 0; - - DeltaAlgorithm& operator=(const DeltaAlgorithm&) = default; - -public: - virtual ~DeltaAlgorithm(); - - /// Run - Minimize the set \p Changes by executing \see ExecuteOneTest() on - /// subsets of changes and returning the smallest set which still satisfies - /// the test predicate. - changeset_ty Run(const changeset_ty &Changes); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h deleted file mode 100644 index 917c086b..00000000 --- a/llvm/include/llvm/ADT/DenseMap.h +++ /dev/null @@ -1,1120 +0,0 @@ -//===- llvm/ADT/DenseMap.h - Dense probed hash table ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the DenseMap class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_DENSEMAP_H -#define LLVM_ADT_DENSEMAP_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/ADT/EpochTracker.h" -#include "llvm/Support/AlignOf.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include "llvm/Support/type_traits.h" -#include -#include -#include -#include -#include -#include -#include -#include - -namespace llvm { - -namespace detail { -// We extend a pair to allow users to override the bucket type with their own -// implementation without requiring two members. -template -struct DenseMapPair : public std::pair { - KeyT &getFirst() { return std::pair::first; } - const KeyT &getFirst() const { return std::pair::first; } - ValueT &getSecond() { return std::pair::second; } - const ValueT &getSecond() const { return std::pair::second; } -}; -} - -template < - typename KeyT, typename ValueT, typename KeyInfoT = DenseMapInfo, - typename Bucket = detail::DenseMapPair, bool IsConst = false> -class DenseMapIterator; - -template -class DenseMapBase : public DebugEpochBase { -public: - typedef unsigned size_type; - typedef KeyT key_type; - typedef ValueT mapped_type; - typedef BucketT value_type; - - typedef DenseMapIterator iterator; - typedef DenseMapIterator - const_iterator; - inline iterator begin() { - // When the map is empty, avoid the overhead of AdvancePastEmptyBuckets(). - return empty() ? end() : iterator(getBuckets(), getBucketsEnd(), *this); - } - inline iterator end() { - return iterator(getBucketsEnd(), getBucketsEnd(), *this, true); - } - inline const_iterator begin() const { - return empty() ? end() - : const_iterator(getBuckets(), getBucketsEnd(), *this); - } - inline const_iterator end() const { - return const_iterator(getBucketsEnd(), getBucketsEnd(), *this, true); - } - - bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { - return getNumEntries() == 0; - } - unsigned size() const { return getNumEntries(); } - - /// Grow the densemap so that it can contain at least \p NumEntries items - /// before resizing again. - void reserve(size_type NumEntries) { - auto NumBuckets = getMinBucketToReserveForEntries(NumEntries); - incrementEpoch(); - if (NumBuckets > getNumBuckets()) - grow(NumBuckets); - } - - void clear() { - incrementEpoch(); - if (getNumEntries() == 0 && getNumTombstones() == 0) return; - - // If the capacity of the array is huge, and the # elements used is small, - // shrink the array. - if (getNumEntries() * 4 < getNumBuckets() && getNumBuckets() > 64) { - shrink_and_clear(); - return; - } - - const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); - unsigned NumEntries = getNumEntries(); - for (BucketT *P = getBuckets(), *E = getBucketsEnd(); P != E; ++P) { - if (!KeyInfoT::isEqual(P->getFirst(), EmptyKey)) { - if (!KeyInfoT::isEqual(P->getFirst(), TombstoneKey)) { - P->getSecond().~ValueT(); - --NumEntries; - } - P->getFirst() = EmptyKey; - } - } - assert(NumEntries == 0 && "Node count imbalance!"); - setNumEntries(0); - setNumTombstones(0); - } - - /// Return 1 if the specified key is in the map, 0 otherwise. - size_type count(const KeyT &Val) const { - const BucketT *TheBucket; - return LookupBucketFor(Val, TheBucket) ? 1 : 0; - } - - iterator find(const KeyT &Val) { - BucketT *TheBucket; - if (LookupBucketFor(Val, TheBucket)) - return iterator(TheBucket, getBucketsEnd(), *this, true); - return end(); - } - const_iterator find(const KeyT &Val) const { - const BucketT *TheBucket; - if (LookupBucketFor(Val, TheBucket)) - return const_iterator(TheBucket, getBucketsEnd(), *this, true); - return end(); - } - - /// Alternate version of find() which allows a different, and possibly - /// less expensive, key type. - /// The DenseMapInfo is responsible for supplying methods - /// getHashValue(LookupKeyT) and isEqual(LookupKeyT, KeyT) for each key - /// type used. - template - iterator find_as(const LookupKeyT &Val) { - BucketT *TheBucket; - if (LookupBucketFor(Val, TheBucket)) - return iterator(TheBucket, getBucketsEnd(), *this, true); - return end(); - } - template - const_iterator find_as(const LookupKeyT &Val) const { - const BucketT *TheBucket; - if (LookupBucketFor(Val, TheBucket)) - return const_iterator(TheBucket, getBucketsEnd(), *this, true); - return end(); - } - - /// lookup - Return the entry for the specified key, or a default - /// constructed value if no such entry exists. - ValueT lookup(const KeyT &Val) const { - const BucketT *TheBucket; - if (LookupBucketFor(Val, TheBucket)) - return TheBucket->getSecond(); - return ValueT(); - } - - // Inserts key,value pair into the map if the key isn't already in the map. - // If the key is already in the map, it returns false and doesn't update the - // value. - std::pair insert(const std::pair &KV) { - BucketT *TheBucket; - if (LookupBucketFor(KV.first, TheBucket)) - return std::make_pair(iterator(TheBucket, getBucketsEnd(), *this, true), - false); // Already in map. - - // Otherwise, insert the new element. - TheBucket = InsertIntoBucket(KV.first, KV.second, TheBucket); - return std::make_pair(iterator(TheBucket, getBucketsEnd(), *this, true), - true); - } - - // Inserts key,value pair into the map if the key isn't already in the map. - // If the key is already in the map, it returns false and doesn't update the - // value. - std::pair insert(std::pair &&KV) { - BucketT *TheBucket; - if (LookupBucketFor(KV.first, TheBucket)) - return std::make_pair(iterator(TheBucket, getBucketsEnd(), *this, true), - false); // Already in map. - - // Otherwise, insert the new element. - TheBucket = InsertIntoBucket(std::move(KV.first), - std::move(KV.second), - TheBucket); - return std::make_pair(iterator(TheBucket, getBucketsEnd(), *this, true), - true); - } - - /// Alternate version of insert() which allows a different, and possibly - /// less expensive, key type. - /// The DenseMapInfo is responsible for supplying methods - /// getHashValue(LookupKeyT) and isEqual(LookupKeyT, KeyT) for each key - /// type used. - template - std::pair insert_as(std::pair &&KV, - const LookupKeyT &Val) { - BucketT *TheBucket; - if (LookupBucketFor(Val, TheBucket)) - return std::make_pair(iterator(TheBucket, getBucketsEnd(), *this, true), - false); // Already in map. - - // Otherwise, insert the new element. - TheBucket = InsertIntoBucket(std::move(KV.first), std::move(KV.second), Val, - TheBucket); - return std::make_pair(iterator(TheBucket, getBucketsEnd(), *this, true), - true); - } - - /// insert - Range insertion of pairs. - template - void insert(InputIt I, InputIt E) { - for (; I != E; ++I) - insert(*I); - } - - - bool erase(const KeyT &Val) { - BucketT *TheBucket; - if (!LookupBucketFor(Val, TheBucket)) - return false; // not in map. - - TheBucket->getSecond().~ValueT(); - TheBucket->getFirst() = getTombstoneKey(); - decrementNumEntries(); - incrementNumTombstones(); - return true; - } - void erase(iterator I) { - BucketT *TheBucket = &*I; - TheBucket->getSecond().~ValueT(); - TheBucket->getFirst() = getTombstoneKey(); - decrementNumEntries(); - incrementNumTombstones(); - } - - value_type& FindAndConstruct(const KeyT &Key) { - BucketT *TheBucket; - if (LookupBucketFor(Key, TheBucket)) - return *TheBucket; - - return *InsertIntoBucket(Key, ValueT(), TheBucket); - } - - ValueT &operator[](const KeyT &Key) { - return FindAndConstruct(Key).second; - } - - value_type& FindAndConstruct(KeyT &&Key) { - BucketT *TheBucket; - if (LookupBucketFor(Key, TheBucket)) - return *TheBucket; - - return *InsertIntoBucket(std::move(Key), ValueT(), TheBucket); - } - - ValueT &operator[](KeyT &&Key) { - return FindAndConstruct(std::move(Key)).second; - } - - /// isPointerIntoBucketsArray - Return true if the specified pointer points - /// somewhere into the DenseMap's array of buckets (i.e. either to a key or - /// value in the DenseMap). - bool isPointerIntoBucketsArray(const void *Ptr) const { - return Ptr >= getBuckets() && Ptr < getBucketsEnd(); - } - - /// getPointerIntoBucketsArray() - Return an opaque pointer into the buckets - /// array. In conjunction with the previous method, this can be used to - /// determine whether an insertion caused the DenseMap to reallocate. - const void *getPointerIntoBucketsArray() const { return getBuckets(); } - -protected: - DenseMapBase() = default; - - void destroyAll() { - if (getNumBuckets() == 0) // Nothing to do. - return; - - const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); - for (BucketT *P = getBuckets(), *E = getBucketsEnd(); P != E; ++P) { - if (!KeyInfoT::isEqual(P->getFirst(), EmptyKey) && - !KeyInfoT::isEqual(P->getFirst(), TombstoneKey)) - P->getSecond().~ValueT(); - P->getFirst().~KeyT(); - } - } - - void initEmpty() { - setNumEntries(0); - setNumTombstones(0); - - assert((getNumBuckets() & (getNumBuckets()-1)) == 0 && - "# initial buckets must be a power of two!"); - const KeyT EmptyKey = getEmptyKey(); - for (BucketT *B = getBuckets(), *E = getBucketsEnd(); B != E; ++B) - ::new (&B->getFirst()) KeyT(EmptyKey); - } - - /// Returns the number of buckets to allocate to ensure that the DenseMap can - /// accommodate \p NumEntries without need to grow(). - unsigned getMinBucketToReserveForEntries(unsigned NumEntries) { - // Ensure that "NumEntries * 4 < NumBuckets * 3" - if (NumEntries == 0) - return 0; - // +1 is required because of the strict equality. - // For example if NumEntries is 48, we need to return 401. - return NextPowerOf2(NumEntries * 4 / 3 + 1); - } - - void moveFromOldBuckets(BucketT *OldBucketsBegin, BucketT *OldBucketsEnd) { - initEmpty(); - - // Insert all the old elements. - const KeyT EmptyKey = getEmptyKey(); - const KeyT TombstoneKey = getTombstoneKey(); - for (BucketT *B = OldBucketsBegin, *E = OldBucketsEnd; B != E; ++B) { - if (!KeyInfoT::isEqual(B->getFirst(), EmptyKey) && - !KeyInfoT::isEqual(B->getFirst(), TombstoneKey)) { - // Insert the key/value into the new table. - BucketT *DestBucket; - bool FoundVal = LookupBucketFor(B->getFirst(), DestBucket); - (void)FoundVal; // silence warning. - assert(!FoundVal && "Key already in new map?"); - DestBucket->getFirst() = std::move(B->getFirst()); - ::new (&DestBucket->getSecond()) ValueT(std::move(B->getSecond())); - incrementNumEntries(); - - // Free the value. - B->getSecond().~ValueT(); - } - B->getFirst().~KeyT(); - } - } - - template - void copyFrom( - const DenseMapBase &other) { - assert(&other != this); - assert(getNumBuckets() == other.getNumBuckets()); - - setNumEntries(other.getNumEntries()); - setNumTombstones(other.getNumTombstones()); - - if (isPodLike::value && isPodLike::value) - memcpy(getBuckets(), other.getBuckets(), - getNumBuckets() * sizeof(BucketT)); - else - for (size_t i = 0; i < getNumBuckets(); ++i) { - ::new (&getBuckets()[i].getFirst()) - KeyT(other.getBuckets()[i].getFirst()); - if (!KeyInfoT::isEqual(getBuckets()[i].getFirst(), getEmptyKey()) && - !KeyInfoT::isEqual(getBuckets()[i].getFirst(), getTombstoneKey())) - ::new (&getBuckets()[i].getSecond()) - ValueT(other.getBuckets()[i].getSecond()); - } - } - - static unsigned getHashValue(const KeyT &Val) { - return KeyInfoT::getHashValue(Val); - } - template - static unsigned getHashValue(const LookupKeyT &Val) { - return KeyInfoT::getHashValue(Val); - } - static const KeyT getEmptyKey() { - return KeyInfoT::getEmptyKey(); - } - static const KeyT getTombstoneKey() { - return KeyInfoT::getTombstoneKey(); - } - -private: - unsigned getNumEntries() const { - return static_cast(this)->getNumEntries(); - } - void setNumEntries(unsigned Num) { - static_cast(this)->setNumEntries(Num); - } - void incrementNumEntries() { - setNumEntries(getNumEntries() + 1); - } - void decrementNumEntries() { - setNumEntries(getNumEntries() - 1); - } - unsigned getNumTombstones() const { - return static_cast(this)->getNumTombstones(); - } - void setNumTombstones(unsigned Num) { - static_cast(this)->setNumTombstones(Num); - } - void incrementNumTombstones() { - setNumTombstones(getNumTombstones() + 1); - } - void decrementNumTombstones() { - setNumTombstones(getNumTombstones() - 1); - } - const BucketT *getBuckets() const { - return static_cast(this)->getBuckets(); - } - BucketT *getBuckets() { - return static_cast(this)->getBuckets(); - } - unsigned getNumBuckets() const { - return static_cast(this)->getNumBuckets(); - } - BucketT *getBucketsEnd() { - return getBuckets() + getNumBuckets(); - } - const BucketT *getBucketsEnd() const { - return getBuckets() + getNumBuckets(); - } - - void grow(unsigned AtLeast) { - static_cast(this)->grow(AtLeast); - } - - void shrink_and_clear() { - static_cast(this)->shrink_and_clear(); - } - - - BucketT *InsertIntoBucket(const KeyT &Key, const ValueT &Value, - BucketT *TheBucket) { - TheBucket = InsertIntoBucketImpl(Key, Key, TheBucket); - - TheBucket->getFirst() = Key; - ::new (&TheBucket->getSecond()) ValueT(Value); - return TheBucket; - } - - BucketT *InsertIntoBucket(const KeyT &Key, ValueT &&Value, - BucketT *TheBucket) { - TheBucket = InsertIntoBucketImpl(Key, Key, TheBucket); - - TheBucket->getFirst() = Key; - ::new (&TheBucket->getSecond()) ValueT(std::move(Value)); - return TheBucket; - } - - BucketT *InsertIntoBucket(KeyT &&Key, ValueT &&Value, BucketT *TheBucket) { - TheBucket = InsertIntoBucketImpl(Key, Key, TheBucket); - - TheBucket->getFirst() = std::move(Key); - ::new (&TheBucket->getSecond()) ValueT(std::move(Value)); - return TheBucket; - } - - template - BucketT *InsertIntoBucket(KeyT &&Key, ValueT &&Value, LookupKeyT &Lookup, - BucketT *TheBucket) { - TheBucket = InsertIntoBucketImpl(Key, Lookup, TheBucket); - - TheBucket->getFirst() = std::move(Key); - ::new (&TheBucket->getSecond()) ValueT(std::move(Value)); - return TheBucket; - } - - template - BucketT *InsertIntoBucketImpl(const KeyT &Key, const LookupKeyT &Lookup, - BucketT *TheBucket) { - incrementEpoch(); - - // If the load of the hash table is more than 3/4, or if fewer than 1/8 of - // the buckets are empty (meaning that many are filled with tombstones), - // grow the table. - // - // The later case is tricky. For example, if we had one empty bucket with - // tons of tombstones, failing lookups (e.g. for insertion) would have to - // probe almost the entire table until it found the empty bucket. If the - // table completely filled with tombstones, no lookup would ever succeed, - // causing infinite loops in lookup. - unsigned NewNumEntries = getNumEntries() + 1; - unsigned NumBuckets = getNumBuckets(); - if (LLVM_UNLIKELY(NewNumEntries * 4 >= NumBuckets * 3)) { - this->grow(NumBuckets * 2); - LookupBucketFor(Lookup, TheBucket); - NumBuckets = getNumBuckets(); - } else if (LLVM_UNLIKELY(NumBuckets-(NewNumEntries+getNumTombstones()) <= - NumBuckets/8)) { - this->grow(NumBuckets); - LookupBucketFor(Lookup, TheBucket); - } - assert(TheBucket); - - // Only update the state after we've grown our bucket space appropriately - // so that when growing buckets we have self-consistent entry count. - incrementNumEntries(); - - // If we are writing over a tombstone, remember this. - const KeyT EmptyKey = getEmptyKey(); - if (!KeyInfoT::isEqual(TheBucket->getFirst(), EmptyKey)) - decrementNumTombstones(); - - return TheBucket; - } - - /// LookupBucketFor - Lookup the appropriate bucket for Val, returning it in - /// FoundBucket. If the bucket contains the key and a value, this returns - /// true, otherwise it returns a bucket with an empty marker or tombstone and - /// returns false. - template - bool LookupBucketFor(const LookupKeyT &Val, - const BucketT *&FoundBucket) const { - const BucketT *BucketsPtr = getBuckets(); - const unsigned NumBuckets = getNumBuckets(); - - if (NumBuckets == 0) { - FoundBucket = nullptr; - return false; - } - - // FoundTombstone - Keep track of whether we find a tombstone while probing. - const BucketT *FoundTombstone = nullptr; - const KeyT EmptyKey = getEmptyKey(); - const KeyT TombstoneKey = getTombstoneKey(); - assert(!KeyInfoT::isEqual(Val, EmptyKey) && - !KeyInfoT::isEqual(Val, TombstoneKey) && - "Empty/Tombstone value shouldn't be inserted into map!"); - - unsigned BucketNo = getHashValue(Val) & (NumBuckets-1); - unsigned ProbeAmt = 1; - while (1) { - const BucketT *ThisBucket = BucketsPtr + BucketNo; - // Found Val's bucket? If so, return it. - if (LLVM_LIKELY(KeyInfoT::isEqual(Val, ThisBucket->getFirst()))) { - FoundBucket = ThisBucket; - return true; - } - - // If we found an empty bucket, the key doesn't exist in the set. - // Insert it and return the default value. - if (LLVM_LIKELY(KeyInfoT::isEqual(ThisBucket->getFirst(), EmptyKey))) { - // If we've already seen a tombstone while probing, fill it in instead - // of the empty bucket we eventually probed to. - FoundBucket = FoundTombstone ? FoundTombstone : ThisBucket; - return false; - } - - // If this is a tombstone, remember it. If Val ends up not in the map, we - // prefer to return it than something that would require more probing. - if (KeyInfoT::isEqual(ThisBucket->getFirst(), TombstoneKey) && - !FoundTombstone) - FoundTombstone = ThisBucket; // Remember the first tombstone found. - - // Otherwise, it's a hash collision or a tombstone, continue quadratic - // probing. - BucketNo += ProbeAmt++; - BucketNo &= (NumBuckets-1); - } - } - - template - bool LookupBucketFor(const LookupKeyT &Val, BucketT *&FoundBucket) { - const BucketT *ConstFoundBucket; - bool Result = const_cast(this) - ->LookupBucketFor(Val, ConstFoundBucket); - FoundBucket = const_cast(ConstFoundBucket); - return Result; - } - -public: - /// Return the approximate size (in bytes) of the actual map. - /// This is just the raw memory used by DenseMap. - /// If entries are pointers to objects, the size of the referenced objects - /// are not included. - size_t getMemorySize() const { - return getNumBuckets() * sizeof(BucketT); - } -}; - -template , - typename BucketT = detail::DenseMapPair> -class DenseMap : public DenseMapBase, - KeyT, ValueT, KeyInfoT, BucketT> { - // Lift some types from the dependent base class into this class for - // simplicity of referring to them. - typedef DenseMapBase BaseT; - friend class DenseMapBase; - - BucketT *Buckets; - unsigned NumEntries; - unsigned NumTombstones; - unsigned NumBuckets; - -public: - /// Create a DenseMap wth an optional \p InitialReserve that guarantee that - /// this number of elements can be inserted in the map without grow() - explicit DenseMap(unsigned InitialReserve = 0) { init(InitialReserve); } - - DenseMap(const DenseMap &other) : BaseT() { - init(0); - copyFrom(other); - } - - DenseMap(DenseMap &&other) : BaseT() { - init(0); - swap(other); - } - - template - DenseMap(const InputIt &I, const InputIt &E) { - init(std::distance(I, E)); - this->insert(I, E); - } - - ~DenseMap() { - this->destroyAll(); - operator delete(Buckets); - } - - void swap(DenseMap& RHS) { - this->incrementEpoch(); - RHS.incrementEpoch(); - std::swap(Buckets, RHS.Buckets); - std::swap(NumEntries, RHS.NumEntries); - std::swap(NumTombstones, RHS.NumTombstones); - std::swap(NumBuckets, RHS.NumBuckets); - } - - DenseMap& operator=(const DenseMap& other) { - if (&other != this) - copyFrom(other); - return *this; - } - - DenseMap& operator=(DenseMap &&other) { - this->destroyAll(); - operator delete(Buckets); - init(0); - swap(other); - return *this; - } - - void copyFrom(const DenseMap& other) { - this->destroyAll(); - operator delete(Buckets); - if (allocateBuckets(other.NumBuckets)) { - this->BaseT::copyFrom(other); - } else { - NumEntries = 0; - NumTombstones = 0; - } - } - - void init(unsigned InitNumEntries) { - auto InitBuckets = BaseT::getMinBucketToReserveForEntries(InitNumEntries); - if (allocateBuckets(InitBuckets)) { - this->BaseT::initEmpty(); - } else { - NumEntries = 0; - NumTombstones = 0; - } - } - - void grow(unsigned AtLeast) { - unsigned OldNumBuckets = NumBuckets; - BucketT *OldBuckets = Buckets; - - allocateBuckets(std::max(64, static_cast(NextPowerOf2(AtLeast-1)))); - assert(Buckets); - if (!OldBuckets) { - this->BaseT::initEmpty(); - return; - } - - this->moveFromOldBuckets(OldBuckets, OldBuckets+OldNumBuckets); - - // Free the old table. - operator delete(OldBuckets); - } - - void shrink_and_clear() { - unsigned OldNumEntries = NumEntries; - this->destroyAll(); - - // Reduce the number of buckets. - unsigned NewNumBuckets = 0; - if (OldNumEntries) - NewNumBuckets = std::max(64, 1 << (Log2_32_Ceil(OldNumEntries) + 1)); - if (NewNumBuckets == NumBuckets) { - this->BaseT::initEmpty(); - return; - } - - operator delete(Buckets); - init(NewNumBuckets); - } - -private: - unsigned getNumEntries() const { - return NumEntries; - } - void setNumEntries(unsigned Num) { - NumEntries = Num; - } - - unsigned getNumTombstones() const { - return NumTombstones; - } - void setNumTombstones(unsigned Num) { - NumTombstones = Num; - } - - BucketT *getBuckets() const { - return Buckets; - } - - unsigned getNumBuckets() const { - return NumBuckets; - } - - bool allocateBuckets(unsigned Num) { - NumBuckets = Num; - if (NumBuckets == 0) { - Buckets = nullptr; - return false; - } - - Buckets = static_cast(operator new(sizeof(BucketT) * NumBuckets)); - return true; - } -}; - -template , - typename BucketT = detail::DenseMapPair> -class SmallDenseMap - : public DenseMapBase< - SmallDenseMap, KeyT, - ValueT, KeyInfoT, BucketT> { - // Lift some types from the dependent base class into this class for - // simplicity of referring to them. - typedef DenseMapBase BaseT; - friend class DenseMapBase; - - unsigned Small : 1; - unsigned NumEntries : 31; - unsigned NumTombstones; - - struct LargeRep { - BucketT *Buckets; - unsigned NumBuckets; - }; - - /// A "union" of an inline bucket array and the struct representing - /// a large bucket. This union will be discriminated by the 'Small' bit. - AlignedCharArrayUnion storage; - -public: - explicit SmallDenseMap(unsigned NumInitBuckets = 0) { - init(NumInitBuckets); - } - - SmallDenseMap(const SmallDenseMap &other) : BaseT() { - init(0); - copyFrom(other); - } - - SmallDenseMap(SmallDenseMap &&other) : BaseT() { - init(0); - swap(other); - } - - template - SmallDenseMap(const InputIt &I, const InputIt &E) { - init(NextPowerOf2(std::distance(I, E))); - this->insert(I, E); - } - - ~SmallDenseMap() { - this->destroyAll(); - deallocateBuckets(); - } - - void swap(SmallDenseMap& RHS) { - unsigned TmpNumEntries = RHS.NumEntries; - RHS.NumEntries = NumEntries; - NumEntries = TmpNumEntries; - std::swap(NumTombstones, RHS.NumTombstones); - - const KeyT EmptyKey = this->getEmptyKey(); - const KeyT TombstoneKey = this->getTombstoneKey(); - if (Small && RHS.Small) { - // If we're swapping inline bucket arrays, we have to cope with some of - // the tricky bits of DenseMap's storage system: the buckets are not - // fully initialized. Thus we swap every key, but we may have - // a one-directional move of the value. - for (unsigned i = 0, e = InlineBuckets; i != e; ++i) { - BucketT *LHSB = &getInlineBuckets()[i], - *RHSB = &RHS.getInlineBuckets()[i]; - bool hasLHSValue = (!KeyInfoT::isEqual(LHSB->getFirst(), EmptyKey) && - !KeyInfoT::isEqual(LHSB->getFirst(), TombstoneKey)); - bool hasRHSValue = (!KeyInfoT::isEqual(RHSB->getFirst(), EmptyKey) && - !KeyInfoT::isEqual(RHSB->getFirst(), TombstoneKey)); - if (hasLHSValue && hasRHSValue) { - // Swap together if we can... - std::swap(*LHSB, *RHSB); - continue; - } - // Swap separately and handle any assymetry. - std::swap(LHSB->getFirst(), RHSB->getFirst()); - if (hasLHSValue) { - ::new (&RHSB->getSecond()) ValueT(std::move(LHSB->getSecond())); - LHSB->getSecond().~ValueT(); - } else if (hasRHSValue) { - ::new (&LHSB->getSecond()) ValueT(std::move(RHSB->getSecond())); - RHSB->getSecond().~ValueT(); - } - } - return; - } - if (!Small && !RHS.Small) { - std::swap(getLargeRep()->Buckets, RHS.getLargeRep()->Buckets); - std::swap(getLargeRep()->NumBuckets, RHS.getLargeRep()->NumBuckets); - return; - } - - SmallDenseMap &SmallSide = Small ? *this : RHS; - SmallDenseMap &LargeSide = Small ? RHS : *this; - - // First stash the large side's rep and move the small side across. - LargeRep TmpRep = std::move(*LargeSide.getLargeRep()); - LargeSide.getLargeRep()->~LargeRep(); - LargeSide.Small = true; - // This is similar to the standard move-from-old-buckets, but the bucket - // count hasn't actually rotated in this case. So we have to carefully - // move construct the keys and values into their new locations, but there - // is no need to re-hash things. - for (unsigned i = 0, e = InlineBuckets; i != e; ++i) { - BucketT *NewB = &LargeSide.getInlineBuckets()[i], - *OldB = &SmallSide.getInlineBuckets()[i]; - ::new (&NewB->getFirst()) KeyT(std::move(OldB->getFirst())); - OldB->getFirst().~KeyT(); - if (!KeyInfoT::isEqual(NewB->getFirst(), EmptyKey) && - !KeyInfoT::isEqual(NewB->getFirst(), TombstoneKey)) { - ::new (&NewB->getSecond()) ValueT(std::move(OldB->getSecond())); - OldB->getSecond().~ValueT(); - } - } - - // The hard part of moving the small buckets across is done, just move - // the TmpRep into its new home. - SmallSide.Small = false; - new (SmallSide.getLargeRep()) LargeRep(std::move(TmpRep)); - } - - SmallDenseMap& operator=(const SmallDenseMap& other) { - if (&other != this) - copyFrom(other); - return *this; - } - - SmallDenseMap& operator=(SmallDenseMap &&other) { - this->destroyAll(); - deallocateBuckets(); - init(0); - swap(other); - return *this; - } - - void copyFrom(const SmallDenseMap& other) { - this->destroyAll(); - deallocateBuckets(); - Small = true; - if (other.getNumBuckets() > InlineBuckets) { - Small = false; - new (getLargeRep()) LargeRep(allocateBuckets(other.getNumBuckets())); - } - this->BaseT::copyFrom(other); - } - - void init(unsigned InitBuckets) { - Small = true; - if (InitBuckets > InlineBuckets) { - Small = false; - new (getLargeRep()) LargeRep(allocateBuckets(InitBuckets)); - } - this->BaseT::initEmpty(); - } - - void grow(unsigned AtLeast) { - if (AtLeast >= InlineBuckets) - AtLeast = std::max(64, NextPowerOf2(AtLeast-1)); - - if (Small) { - if (AtLeast < InlineBuckets) - return; // Nothing to do. - - // First move the inline buckets into a temporary storage. - AlignedCharArrayUnion TmpStorage; - BucketT *TmpBegin = reinterpret_cast(TmpStorage.buffer); - BucketT *TmpEnd = TmpBegin; - - // Loop over the buckets, moving non-empty, non-tombstones into the - // temporary storage. Have the loop move the TmpEnd forward as it goes. - const KeyT EmptyKey = this->getEmptyKey(); - const KeyT TombstoneKey = this->getTombstoneKey(); - for (BucketT *P = getBuckets(), *E = P + InlineBuckets; P != E; ++P) { - if (!KeyInfoT::isEqual(P->getFirst(), EmptyKey) && - !KeyInfoT::isEqual(P->getFirst(), TombstoneKey)) { - assert(size_t(TmpEnd - TmpBegin) < InlineBuckets && - "Too many inline buckets!"); - ::new (&TmpEnd->getFirst()) KeyT(std::move(P->getFirst())); - ::new (&TmpEnd->getSecond()) ValueT(std::move(P->getSecond())); - ++TmpEnd; - P->getSecond().~ValueT(); - } - P->getFirst().~KeyT(); - } - - // Now make this map use the large rep, and move all the entries back - // into it. - Small = false; - new (getLargeRep()) LargeRep(allocateBuckets(AtLeast)); - this->moveFromOldBuckets(TmpBegin, TmpEnd); - return; - } - - LargeRep OldRep = std::move(*getLargeRep()); - getLargeRep()->~LargeRep(); - if (AtLeast <= InlineBuckets) { - Small = true; - } else { - new (getLargeRep()) LargeRep(allocateBuckets(AtLeast)); - } - - this->moveFromOldBuckets(OldRep.Buckets, OldRep.Buckets+OldRep.NumBuckets); - - // Free the old table. - operator delete(OldRep.Buckets); - } - - void shrink_and_clear() { - unsigned OldSize = this->size(); - this->destroyAll(); - - // Reduce the number of buckets. - unsigned NewNumBuckets = 0; - if (OldSize) { - NewNumBuckets = 1 << (Log2_32_Ceil(OldSize) + 1); - if (NewNumBuckets > InlineBuckets && NewNumBuckets < 64u) - NewNumBuckets = 64; - } - if ((Small && NewNumBuckets <= InlineBuckets) || - (!Small && NewNumBuckets == getLargeRep()->NumBuckets)) { - this->BaseT::initEmpty(); - return; - } - - deallocateBuckets(); - init(NewNumBuckets); - } - -private: - unsigned getNumEntries() const { - return NumEntries; - } - void setNumEntries(unsigned Num) { - assert(Num < INT_MAX && "Cannot support more than INT_MAX entries"); - NumEntries = Num; - } - - unsigned getNumTombstones() const { - return NumTombstones; - } - void setNumTombstones(unsigned Num) { - NumTombstones = Num; - } - - const BucketT *getInlineBuckets() const { - assert(Small); - // Note that this cast does not violate aliasing rules as we assert that - // the memory's dynamic type is the small, inline bucket buffer, and the - // 'storage.buffer' static type is 'char *'. - return reinterpret_cast(storage.buffer); - } - BucketT *getInlineBuckets() { - return const_cast( - const_cast(this)->getInlineBuckets()); - } - const LargeRep *getLargeRep() const { - assert(!Small); - // Note, same rule about aliasing as with getInlineBuckets. - return reinterpret_cast(storage.buffer); - } - LargeRep *getLargeRep() { - return const_cast( - const_cast(this)->getLargeRep()); - } - - const BucketT *getBuckets() const { - return Small ? getInlineBuckets() : getLargeRep()->Buckets; - } - BucketT *getBuckets() { - return const_cast( - const_cast(this)->getBuckets()); - } - unsigned getNumBuckets() const { - return Small ? InlineBuckets : getLargeRep()->NumBuckets; - } - - void deallocateBuckets() { - if (Small) - return; - - operator delete(getLargeRep()->Buckets); - getLargeRep()->~LargeRep(); - } - - LargeRep allocateBuckets(unsigned Num) { - assert(Num > InlineBuckets && "Must allocate more buckets than are inline"); - LargeRep Rep = { - static_cast(operator new(sizeof(BucketT) * Num)), Num - }; - return Rep; - } -}; - -template -class DenseMapIterator : DebugEpochBase::HandleBase { - typedef DenseMapIterator ConstIterator; - friend class DenseMapIterator; - friend class DenseMapIterator; - -public: - typedef ptrdiff_t difference_type; - typedef typename std::conditional::type - value_type; - typedef value_type *pointer; - typedef value_type &reference; - typedef std::forward_iterator_tag iterator_category; -private: - pointer Ptr, End; -public: - DenseMapIterator() : Ptr(nullptr), End(nullptr) {} - - DenseMapIterator(pointer Pos, pointer E, const DebugEpochBase &Epoch, - bool NoAdvance = false) - : DebugEpochBase::HandleBase(&Epoch), Ptr(Pos), End(E) { - assert(isHandleInSync() && "invalid construction!"); - if (!NoAdvance) AdvancePastEmptyBuckets(); - } - - // Converting ctor from non-const iterators to const iterators. SFINAE'd out - // for const iterator destinations so it doesn't end up as a user defined copy - // constructor. - template ::type> - DenseMapIterator( - const DenseMapIterator &I) - : DebugEpochBase::HandleBase(I), Ptr(I.Ptr), End(I.End) {} - - reference operator*() const { - assert(isHandleInSync() && "invalid iterator access!"); - return *Ptr; - } - pointer operator->() const { - assert(isHandleInSync() && "invalid iterator access!"); - return Ptr; - } - - bool operator==(const ConstIterator &RHS) const { - assert((!Ptr || isHandleInSync()) && "handle not in sync!"); - assert((!RHS.Ptr || RHS.isHandleInSync()) && "handle not in sync!"); - assert(getEpochAddress() == RHS.getEpochAddress() && - "comparing incomparable iterators!"); - return Ptr == RHS.Ptr; - } - bool operator!=(const ConstIterator &RHS) const { - assert((!Ptr || isHandleInSync()) && "handle not in sync!"); - assert((!RHS.Ptr || RHS.isHandleInSync()) && "handle not in sync!"); - assert(getEpochAddress() == RHS.getEpochAddress() && - "comparing incomparable iterators!"); - return Ptr != RHS.Ptr; - } - - inline DenseMapIterator& operator++() { // Preincrement - assert(isHandleInSync() && "invalid iterator access!"); - ++Ptr; - AdvancePastEmptyBuckets(); - return *this; - } - DenseMapIterator operator++(int) { // Postincrement - assert(isHandleInSync() && "invalid iterator access!"); - DenseMapIterator tmp = *this; ++*this; return tmp; - } - -private: - void AdvancePastEmptyBuckets() { - const KeyT Empty = KeyInfoT::getEmptyKey(); - const KeyT Tombstone = KeyInfoT::getTombstoneKey(); - - while (Ptr != End && (KeyInfoT::isEqual(Ptr->getFirst(), Empty) || - KeyInfoT::isEqual(Ptr->getFirst(), Tombstone))) - ++Ptr; - } -}; - -template -static inline size_t -capacity_in_bytes(const DenseMap &X) { - return X.getMemorySize(); -} - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/DenseMapInfo.h b/llvm/include/llvm/ADT/DenseMapInfo.h deleted file mode 100644 index 18c692e0..00000000 --- a/llvm/include/llvm/ADT/DenseMapInfo.h +++ /dev/null @@ -1,251 +0,0 @@ -//===- llvm/ADT/DenseMapInfo.h - Type traits for DenseMap -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines DenseMapInfo traits for DenseMap. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_DENSEMAPINFO_H -#define LLVM_ADT_DENSEMAPINFO_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/Hashing.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include "llvm/Support/type_traits.h" - -namespace llvm { - -template -struct DenseMapInfo { - //static inline T getEmptyKey(); - //static inline T getTombstoneKey(); - //static unsigned getHashValue(const T &Val); - //static bool isEqual(const T &LHS, const T &RHS); -}; - -template struct CachedHash { - CachedHash(T Val) : Val(std::move(Val)) { - Hash = DenseMapInfo::getHashValue(Val); - } - CachedHash(T Val, unsigned Hash) : Val(std::move(Val)), Hash(Hash) {} - T Val; - unsigned Hash; -}; - -// Provide DenseMapInfo for all CachedHash. -template struct DenseMapInfo> { - static CachedHash getEmptyKey() { - T N = DenseMapInfo::getEmptyKey(); - return {N, 0}; - } - static CachedHash getTombstoneKey() { - T N = DenseMapInfo::getTombstoneKey(); - return {N, 0}; - } - static unsigned getHashValue(CachedHash Val) { - assert(!isEqual(Val, getEmptyKey()) && "Cannot hash the empty key!"); - assert(!isEqual(Val, getTombstoneKey()) && - "Cannot hash the tombstone key!"); - return Val.Hash; - } - static bool isEqual(CachedHash A, CachedHash B) { - return DenseMapInfo::isEqual(A.Val, B.Val); - } -}; - -// Provide DenseMapInfo for all pointers. -template -struct DenseMapInfo { - static inline T* getEmptyKey() { - uintptr_t Val = static_cast(-1); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; - return reinterpret_cast(Val); - } - static inline T* getTombstoneKey() { - uintptr_t Val = static_cast(-2); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; - return reinterpret_cast(Val); - } - static unsigned getHashValue(const T *PtrVal) { - return (unsigned((uintptr_t)PtrVal) >> 4) ^ - (unsigned((uintptr_t)PtrVal) >> 9); - } - static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; } -}; - -// Provide DenseMapInfo for chars. -template<> struct DenseMapInfo { - static inline char getEmptyKey() { return ~0; } - static inline char getTombstoneKey() { return ~0 - 1; } - static unsigned getHashValue(const char& Val) { return Val * 37U; } - static bool isEqual(const char &LHS, const char &RHS) { - return LHS == RHS; - } -}; - -// Provide DenseMapInfo for unsigned ints. -template<> struct DenseMapInfo { - static inline unsigned getEmptyKey() { return ~0U; } - static inline unsigned getTombstoneKey() { return ~0U - 1; } - static unsigned getHashValue(const unsigned& Val) { return Val * 37U; } - static bool isEqual(const unsigned& LHS, const unsigned& RHS) { - return LHS == RHS; - } -}; - -// Provide DenseMapInfo for unsigned longs. -template<> struct DenseMapInfo { - static inline unsigned long getEmptyKey() { return ~0UL; } - static inline unsigned long getTombstoneKey() { return ~0UL - 1L; } - static unsigned getHashValue(const unsigned long& Val) { - return (unsigned)(Val * 37UL); - } - static bool isEqual(const unsigned long& LHS, const unsigned long& RHS) { - return LHS == RHS; - } -}; - -// Provide DenseMapInfo for unsigned long longs. -template<> struct DenseMapInfo { - static inline unsigned long long getEmptyKey() { return ~0ULL; } - static inline unsigned long long getTombstoneKey() { return ~0ULL - 1ULL; } - static unsigned getHashValue(const unsigned long long& Val) { - return (unsigned)(Val * 37ULL); - } - static bool isEqual(const unsigned long long& LHS, - const unsigned long long& RHS) { - return LHS == RHS; - } -}; - -// Provide DenseMapInfo for ints. -template<> struct DenseMapInfo { - static inline int getEmptyKey() { return 0x7fffffff; } - static inline int getTombstoneKey() { return -0x7fffffff - 1; } - static unsigned getHashValue(const int& Val) { return (unsigned)(Val * 37U); } - static bool isEqual(const int& LHS, const int& RHS) { - return LHS == RHS; - } -}; - -// Provide DenseMapInfo for longs. -template<> struct DenseMapInfo { - static inline long getEmptyKey() { - return (1UL << (sizeof(long) * 8 - 1)) - 1UL; - } - static inline long getTombstoneKey() { return getEmptyKey() - 1L; } - static unsigned getHashValue(const long& Val) { - return (unsigned)(Val * 37UL); - } - static bool isEqual(const long& LHS, const long& RHS) { - return LHS == RHS; - } -}; - -// Provide DenseMapInfo for long longs. -template<> struct DenseMapInfo { - static inline long long getEmptyKey() { return 0x7fffffffffffffffLL; } - static inline long long getTombstoneKey() { return -0x7fffffffffffffffLL-1; } - static unsigned getHashValue(const long long& Val) { - return (unsigned)(Val * 37ULL); - } - static bool isEqual(const long long& LHS, - const long long& RHS) { - return LHS == RHS; - } -}; - -// Provide DenseMapInfo for all pairs whose members have info. -template -struct DenseMapInfo > { - typedef std::pair Pair; - typedef DenseMapInfo FirstInfo; - typedef DenseMapInfo SecondInfo; - - static inline Pair getEmptyKey() { - return std::make_pair(FirstInfo::getEmptyKey(), - SecondInfo::getEmptyKey()); - } - static inline Pair getTombstoneKey() { - return std::make_pair(FirstInfo::getTombstoneKey(), - SecondInfo::getTombstoneKey()); - } - static unsigned getHashValue(const Pair& PairVal) { - uint64_t key = (uint64_t)FirstInfo::getHashValue(PairVal.first) << 32 - | (uint64_t)SecondInfo::getHashValue(PairVal.second); - key += ~(key << 32); - key ^= (key >> 22); - key += ~(key << 13); - key ^= (key >> 8); - key += (key << 3); - key ^= (key >> 15); - key += ~(key << 27); - key ^= (key >> 31); - return (unsigned)key; - } - static bool isEqual(const Pair &LHS, const Pair &RHS) { - return FirstInfo::isEqual(LHS.first, RHS.first) && - SecondInfo::isEqual(LHS.second, RHS.second); - } -}; - -// Provide DenseMapInfo for StringRefs. -template <> struct DenseMapInfo { - static inline StringRef getEmptyKey() { - return StringRef(reinterpret_cast(~static_cast(0)), - 0); - } - static inline StringRef getTombstoneKey() { - return StringRef(reinterpret_cast(~static_cast(1)), - 0); - } - static unsigned getHashValue(StringRef Val) { - assert(Val.data() != getEmptyKey().data() && "Cannot hash the empty key!"); - assert(Val.data() != getTombstoneKey().data() && - "Cannot hash the tombstone key!"); - return (unsigned)(hash_value(Val)); - } - static bool isEqual(StringRef LHS, StringRef RHS) { - if (RHS.data() == getEmptyKey().data()) - return LHS.data() == getEmptyKey().data(); - if (RHS.data() == getTombstoneKey().data()) - return LHS.data() == getTombstoneKey().data(); - return LHS == RHS; - } -}; - -// Provide DenseMapInfo for ArrayRefs. -template struct DenseMapInfo> { - static inline ArrayRef getEmptyKey() { - return ArrayRef(reinterpret_cast(~static_cast(0)), - size_t(0)); - } - static inline ArrayRef getTombstoneKey() { - return ArrayRef(reinterpret_cast(~static_cast(1)), - size_t(0)); - } - static unsigned getHashValue(ArrayRef Val) { - assert(Val.data() != getEmptyKey().data() && "Cannot hash the empty key!"); - assert(Val.data() != getTombstoneKey().data() && - "Cannot hash the tombstone key!"); - return (unsigned)(hash_value(Val)); - } - static bool isEqual(ArrayRef LHS, ArrayRef RHS) { - if (RHS.data() == getEmptyKey().data()) - return LHS.data() == getEmptyKey().data(); - if (RHS.data() == getTombstoneKey().data()) - return LHS.data() == getTombstoneKey().data(); - return LHS == RHS; - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/DenseSet.h b/llvm/include/llvm/ADT/DenseSet.h deleted file mode 100644 index 3724a096..00000000 --- a/llvm/include/llvm/ADT/DenseSet.h +++ /dev/null @@ -1,180 +0,0 @@ -//===- llvm/ADT/DenseSet.h - Dense probed hash table ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the DenseSet class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_DENSESET_H -#define LLVM_ADT_DENSESET_H - -#include "llvm/ADT/DenseMap.h" - -namespace llvm { - -namespace detail { -struct DenseSetEmpty {}; - -// Use the empty base class trick so we can create a DenseMap where the buckets -// contain only a single item. -template class DenseSetPair : public DenseSetEmpty { - KeyT key; - -public: - KeyT &getFirst() { return key; } - const KeyT &getFirst() const { return key; } - DenseSetEmpty &getSecond() { return *this; } - const DenseSetEmpty &getSecond() const { return *this; } -}; -} - -/// DenseSet - This implements a dense probed hash-table based set. -template > -class DenseSet { - typedef DenseMap> MapTy; - static_assert(sizeof(typename MapTy::value_type) == sizeof(ValueT), - "DenseMap buckets unexpectedly large!"); - MapTy TheMap; - -public: - typedef ValueT key_type; - typedef ValueT value_type; - typedef unsigned size_type; - - explicit DenseSet(unsigned NumInitBuckets = 0) : TheMap(NumInitBuckets) {} - - bool empty() const { return TheMap.empty(); } - size_type size() const { return TheMap.size(); } - size_t getMemorySize() const { return TheMap.getMemorySize(); } - - /// Grow the DenseSet so that it has at least Size buckets. Will not shrink - /// the Size of the set. - void resize(size_t Size) { TheMap.resize(Size); } - - void clear() { - TheMap.clear(); - } - - /// Return 1 if the specified key is in the set, 0 otherwise. - size_type count(const ValueT &V) const { - return TheMap.count(V); - } - - bool erase(const ValueT &V) { - return TheMap.erase(V); - } - - void swap(DenseSet& RHS) { - TheMap.swap(RHS.TheMap); - } - - // Iterators. - - class Iterator { - typename MapTy::iterator I; - friend class DenseSet; - - public: - typedef typename MapTy::iterator::difference_type difference_type; - typedef ValueT value_type; - typedef value_type *pointer; - typedef value_type &reference; - typedef std::forward_iterator_tag iterator_category; - - Iterator(const typename MapTy::iterator &i) : I(i) {} - - ValueT &operator*() { return I->getFirst(); } - ValueT *operator->() { return &I->getFirst(); } - - Iterator& operator++() { ++I; return *this; } - Iterator operator++(int) { auto T = *this; ++I; return T; } - bool operator==(const Iterator& X) const { return I == X.I; } - bool operator!=(const Iterator& X) const { return I != X.I; } - }; - - class ConstIterator { - typename MapTy::const_iterator I; - friend class DenseSet; - - public: - typedef typename MapTy::const_iterator::difference_type difference_type; - typedef ValueT value_type; - typedef value_type *pointer; - typedef value_type &reference; - typedef std::forward_iterator_tag iterator_category; - - ConstIterator(const typename MapTy::const_iterator &i) : I(i) {} - - const ValueT &operator*() { return I->getFirst(); } - const ValueT *operator->() { return &I->getFirst(); } - - ConstIterator& operator++() { ++I; return *this; } - ConstIterator operator++(int) { auto T = *this; ++I; return T; } - bool operator==(const ConstIterator& X) const { return I == X.I; } - bool operator!=(const ConstIterator& X) const { return I != X.I; } - }; - - typedef Iterator iterator; - typedef ConstIterator const_iterator; - - iterator begin() { return Iterator(TheMap.begin()); } - iterator end() { return Iterator(TheMap.end()); } - - const_iterator begin() const { return ConstIterator(TheMap.begin()); } - const_iterator end() const { return ConstIterator(TheMap.end()); } - - iterator find(const ValueT &V) { return Iterator(TheMap.find(V)); } - - /// Alternative version of find() which allows a different, and possibly less - /// expensive, key type. - /// The DenseMapInfo is responsible for supplying methods - /// getHashValue(LookupKeyT) and isEqual(LookupKeyT, KeyT) for each key type - /// used. - template - iterator find_as(const LookupKeyT &Val) { - return Iterator(TheMap.find_as(Val)); - } - template - const_iterator find_as(const LookupKeyT &Val) const { - return ConstIterator(TheMap.find_as(Val)); - } - - void erase(Iterator I) { return TheMap.erase(I.I); } - void erase(ConstIterator CI) { return TheMap.erase(CI.I); } - - std::pair insert(const ValueT &V) { - detail::DenseSetEmpty Empty; - return TheMap.insert(std::make_pair(V, Empty)); - } - - /// Alternative version of insert that uses a different (and possibly less - /// expensive) key type. - template - std::pair insert_as(const ValueT &V, - const LookupKeyT &LookupKey) { - return insert_as(ValueT(V), LookupKey); - } - template - std::pair insert_as(ValueT &&V, const LookupKeyT &LookupKey) { - detail::DenseSetEmpty Empty; - return TheMap.insert_as(std::make_pair(std::move(V), Empty), LookupKey); - } - - // Range insertion of values. - template - void insert(InputIt I, InputIt E) { - for (; I != E; ++I) - insert(*I); - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/DepthFirstIterator.h b/llvm/include/llvm/ADT/DepthFirstIterator.h deleted file mode 100644 index c9317b85..00000000 --- a/llvm/include/llvm/ADT/DepthFirstIterator.h +++ /dev/null @@ -1,291 +0,0 @@ -//===- llvm/ADT/DepthFirstIterator.h - Depth First iterator -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file builds on the ADT/GraphTraits.h file to build generic depth -// first graph iterator. This file exposes the following functions/types: -// -// df_begin/df_end/df_iterator -// * Normal depth-first iteration - visit a node and then all of its children. -// -// idf_begin/idf_end/idf_iterator -// * Depth-first iteration on the 'inverse' graph. -// -// df_ext_begin/df_ext_end/df_ext_iterator -// * Normal depth-first iteration - visit a node and then all of its children. -// This iterator stores the 'visited' set in an external set, which allows -// it to be more efficient, and allows external clients to use the set for -// other purposes. -// -// idf_ext_begin/idf_ext_end/idf_ext_iterator -// * Depth-first iteration on the 'inverse' graph. -// This iterator stores the 'visited' set in an external set, which allows -// it to be more efficient, and allows external clients to use the set for -// other purposes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_DEPTHFIRSTITERATOR_H -#define LLVM_ADT_DEPTHFIRSTITERATOR_H - -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/iterator_range.h" -#include -#include - -namespace llvm { - -// df_iterator_storage - A private class which is used to figure out where to -// store the visited set. -template // Non-external set -class df_iterator_storage { -public: - SetType Visited; -}; - -template -class df_iterator_storage { -public: - df_iterator_storage(SetType &VSet) : Visited(VSet) {} - df_iterator_storage(const df_iterator_storage &S) : Visited(S.Visited) {} - SetType &Visited; -}; - -// Generic Depth First Iterator -template::NodeType*, 8>, - bool ExtStorage = false, class GT = GraphTraits > -class df_iterator : public std::iterator, - public df_iterator_storage { - typedef std::iterator super; - - typedef typename GT::NodeType NodeType; - typedef typename GT::ChildIteratorType ChildItTy; - typedef PointerIntPair PointerIntTy; - - // VisitStack - Used to maintain the ordering. Top = current block - // First element is node pointer, second is the 'next child' to visit - // if the int in PointerIntTy is 0, the 'next child' to visit is invalid - std::vector> VisitStack; - -private: - inline df_iterator(NodeType *Node) { - this->Visited.insert(Node); - VisitStack.push_back( - std::make_pair(PointerIntTy(Node, 0), GT::child_begin(Node))); - } - inline df_iterator() { - // End is when stack is empty - } - inline df_iterator(NodeType *Node, SetType &S) - : df_iterator_storage(S) { - if (!S.count(Node)) { - VisitStack.push_back( - std::make_pair(PointerIntTy(Node, 0), GT::child_begin(Node))); - this->Visited.insert(Node); - } - } - inline df_iterator(SetType &S) - : df_iterator_storage(S) { - // End is when stack is empty - } - - inline void toNext() { - do { - std::pair &Top = VisitStack.back(); - NodeType *Node = Top.first.getPointer(); - ChildItTy &It = Top.second; - if (!Top.first.getInt()) { - // now retrieve the real begin of the children before we dive in - It = GT::child_begin(Node); - Top.first.setInt(1); - } - - while (It != GT::child_end(Node)) { - NodeType *Next = *It++; - // Has our next sibling been visited? - if (Next && this->Visited.insert(Next).second) { - // No, do it now. - VisitStack.push_back( - std::make_pair(PointerIntTy(Next, 0), GT::child_begin(Next))); - return; - } - } - - // Oops, ran out of successors... go up a level on the stack. - VisitStack.pop_back(); - } while (!VisitStack.empty()); - } - -public: - typedef typename super::pointer pointer; - - // Provide static begin and end methods as our public "constructors" - static df_iterator begin(const GraphT &G) { - return df_iterator(GT::getEntryNode(G)); - } - static df_iterator end(const GraphT &G) { return df_iterator(); } - - // Static begin and end methods as our public ctors for external iterators - static df_iterator begin(const GraphT &G, SetType &S) { - return df_iterator(GT::getEntryNode(G), S); - } - static df_iterator end(const GraphT &G, SetType &S) { return df_iterator(S); } - - bool operator==(const df_iterator &x) const { - return VisitStack == x.VisitStack; - } - bool operator!=(const df_iterator &x) const { return !(*this == x); } - - pointer operator*() const { return VisitStack.back().first.getPointer(); } - - // This is a nonstandard operator-> that dereferences the pointer an extra - // time... so that you can actually call methods ON the Node, because - // the contained type is a pointer. This allows BBIt->getTerminator() f.e. - // - NodeType *operator->() const { return **this; } - - df_iterator &operator++() { // Preincrement - toNext(); - return *this; - } - - /// \brief Skips all children of the current node and traverses to next node - /// - /// Note: This function takes care of incrementing the iterator. If you - /// always increment and call this function, you risk walking off the end. - df_iterator &skipChildren() { - VisitStack.pop_back(); - if (!VisitStack.empty()) - toNext(); - return *this; - } - - df_iterator operator++(int) { // Postincrement - df_iterator tmp = *this; - ++*this; - return tmp; - } - - // nodeVisited - return true if this iterator has already visited the - // specified node. This is public, and will probably be used to iterate over - // nodes that a depth first iteration did not find: ie unreachable nodes. - // - bool nodeVisited(NodeType *Node) const { - return this->Visited.count(Node) != 0; - } - - /// getPathLength - Return the length of the path from the entry node to the - /// current node, counting both nodes. - unsigned getPathLength() const { return VisitStack.size(); } - - /// getPath - Return the n'th node in the path from the entry node to the - /// current node. - NodeType *getPath(unsigned n) const { - return VisitStack[n].first.getPointer(); - } -}; - -// Provide global constructors that automatically figure out correct types... -// -template -df_iterator df_begin(const T& G) { - return df_iterator::begin(G); -} - -template -df_iterator df_end(const T& G) { - return df_iterator::end(G); -} - -// Provide an accessor method to use them in range-based patterns. -template -iterator_range> depth_first(const T& G) { - return make_range(df_begin(G), df_end(G)); -} - -// Provide global definitions of external depth first iterators... -template ::NodeType*> > -struct df_ext_iterator : public df_iterator { - df_ext_iterator(const df_iterator &V) - : df_iterator(V) {} -}; - -template -df_ext_iterator df_ext_begin(const T& G, SetTy &S) { - return df_ext_iterator::begin(G, S); -} - -template -df_ext_iterator df_ext_end(const T& G, SetTy &S) { - return df_ext_iterator::end(G, S); -} - -template -iterator_range> depth_first_ext(const T& G, - SetTy &S) { - return make_range(df_ext_begin(G, S), df_ext_end(G, S)); -} - -// Provide global definitions of inverse depth first iterators... -template ::NodeType*, 8>, - bool External = false> -struct idf_iterator : public df_iterator, SetTy, External> { - idf_iterator(const df_iterator, SetTy, External> &V) - : df_iterator, SetTy, External>(V) {} -}; - -template -idf_iterator idf_begin(const T& G) { - return idf_iterator::begin(Inverse(G)); -} - -template -idf_iterator idf_end(const T& G){ - return idf_iterator::end(Inverse(G)); -} - -// Provide an accessor method to use them in range-based patterns. -template -iterator_range> inverse_depth_first(const T& G) { - return make_range(idf_begin(G), idf_end(G)); -} - -// Provide global definitions of external inverse depth first iterators... -template ::NodeType*> > -struct idf_ext_iterator : public idf_iterator { - idf_ext_iterator(const idf_iterator &V) - : idf_iterator(V) {} - idf_ext_iterator(const df_iterator, SetTy, true> &V) - : idf_iterator(V) {} -}; - -template -idf_ext_iterator idf_ext_begin(const T& G, SetTy &S) { - return idf_ext_iterator::begin(Inverse(G), S); -} - -template -idf_ext_iterator idf_ext_end(const T& G, SetTy &S) { - return idf_ext_iterator::end(Inverse(G), S); -} - -template -iterator_range> inverse_depth_first_ext(const T& G, - SetTy &S) { - return make_range(idf_ext_begin(G, S), idf_ext_end(G, S)); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/EpochTracker.h b/llvm/include/llvm/ADT/EpochTracker.h deleted file mode 100644 index 582d5817..00000000 --- a/llvm/include/llvm/ADT/EpochTracker.h +++ /dev/null @@ -1,99 +0,0 @@ -//===- llvm/ADT/EpochTracker.h - ADT epoch tracking --------------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the DebugEpochBase and DebugEpochBase::HandleBase classes. -// These can be used to write iterators that are fail-fast when LLVM is built -// with asserts enabled. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_EPOCH_TRACKER_H -#define LLVM_ADT_EPOCH_TRACKER_H - -#include "llvm/Config/llvm-config.h" - -#include - -namespace llvm { - -#ifndef LLVM_ENABLE_ABI_BREAKING_CHECKS - -class DebugEpochBase { -public: - void incrementEpoch() {} - - class HandleBase { - public: - HandleBase() = default; - explicit HandleBase(const DebugEpochBase *) {} - bool isHandleInSync() const { return true; } - const void *getEpochAddress() const { return nullptr; } - }; -}; - -#else - -/// \brief A base class for data structure classes wishing to make iterators -/// ("handles") pointing into themselves fail-fast. When building without -/// asserts, this class is empty and does nothing. -/// -/// DebugEpochBase does not by itself track handles pointing into itself. The -/// expectation is that routines touching the handles will poll on -/// isHandleInSync at appropriate points to assert that the handle they're using -/// is still valid. -/// -class DebugEpochBase { - uint64_t Epoch; - -public: - DebugEpochBase() : Epoch(0) {} - - /// \brief Calling incrementEpoch invalidates all handles pointing into the - /// calling instance. - void incrementEpoch() { ++Epoch; } - - /// \brief The destructor calls incrementEpoch to make use-after-free bugs - /// more likely to crash deterministically. - ~DebugEpochBase() { incrementEpoch(); } - - /// \brief A base class for iterator classes ("handles") that wish to poll for - /// iterator invalidating modifications in the underlying data structure. - /// When LLVM is built without asserts, this class is empty and does nothing. - /// - /// HandleBase does not track the parent data structure by itself. It expects - /// the routines modifying the data structure to call incrementEpoch when they - /// make an iterator-invalidating modification. - /// - class HandleBase { - const uint64_t *EpochAddress; - uint64_t EpochAtCreation; - - public: - HandleBase() : EpochAddress(nullptr), EpochAtCreation(UINT64_MAX) {} - - explicit HandleBase(const DebugEpochBase *Parent) - : EpochAddress(&Parent->Epoch), EpochAtCreation(Parent->Epoch) {} - - /// \brief Returns true if the DebugEpochBase this Handle is linked to has - /// not called incrementEpoch on itself since the creation of this - /// HandleBase instance. - bool isHandleInSync() const { return *EpochAddress == EpochAtCreation; } - - /// \brief Returns a pointer to the epoch word stored in the data structure - /// this handle points into. Can be used to check if two iterators point - /// into the same data structure. - const void *getEpochAddress() const { return EpochAddress; } - }; -}; - -#endif // LLVM_ENABLE_ABI_BREAKING_CHECKS - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/EquivalenceClasses.h b/llvm/include/llvm/ADT/EquivalenceClasses.h deleted file mode 100644 index d6a26f88..00000000 --- a/llvm/include/llvm/ADT/EquivalenceClasses.h +++ /dev/null @@ -1,283 +0,0 @@ -//===-- llvm/ADT/EquivalenceClasses.h - Generic Equiv. Classes --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Generic implementation of equivalence classes through the use Tarjan's -// efficient union-find algorithm. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_EQUIVALENCECLASSES_H -#define LLVM_ADT_EQUIVALENCECLASSES_H - -#include "llvm/Support/DataTypes.h" -#include -#include -#include - -namespace llvm { - -/// EquivalenceClasses - This represents a collection of equivalence classes and -/// supports three efficient operations: insert an element into a class of its -/// own, union two classes, and find the class for a given element. In -/// addition to these modification methods, it is possible to iterate over all -/// of the equivalence classes and all of the elements in a class. -/// -/// This implementation is an efficient implementation that only stores one copy -/// of the element being indexed per entry in the set, and allows any arbitrary -/// type to be indexed (as long as it can be ordered with operator<). -/// -/// Here is a simple example using integers: -/// -/// \code -/// EquivalenceClasses EC; -/// EC.unionSets(1, 2); // insert 1, 2 into the same set -/// EC.insert(4); EC.insert(5); // insert 4, 5 into own sets -/// EC.unionSets(5, 1); // merge the set for 1 with 5's set. -/// -/// for (EquivalenceClasses::iterator I = EC.begin(), E = EC.end(); -/// I != E; ++I) { // Iterate over all of the equivalence sets. -/// if (!I->isLeader()) continue; // Ignore non-leader sets. -/// for (EquivalenceClasses::member_iterator MI = EC.member_begin(I); -/// MI != EC.member_end(); ++MI) // Loop over members in this set. -/// cerr << *MI << " "; // Print member. -/// cerr << "\n"; // Finish set. -/// } -/// \endcode -/// -/// This example prints: -/// 4 -/// 5 1 2 -/// -template -class EquivalenceClasses { - /// ECValue - The EquivalenceClasses data structure is just a set of these. - /// Each of these represents a relation for a value. First it stores the - /// value itself, which provides the ordering that the set queries. Next, it - /// provides a "next pointer", which is used to enumerate all of the elements - /// in the unioned set. Finally, it defines either a "end of list pointer" or - /// "leader pointer" depending on whether the value itself is a leader. A - /// "leader pointer" points to the node that is the leader for this element, - /// if the node is not a leader. A "end of list pointer" points to the last - /// node in the list of members of this list. Whether or not a node is a - /// leader is determined by a bit stolen from one of the pointers. - class ECValue { - friend class EquivalenceClasses; - mutable const ECValue *Leader, *Next; - ElemTy Data; - // ECValue ctor - Start out with EndOfList pointing to this node, Next is - // Null, isLeader = true. - ECValue(const ElemTy &Elt) - : Leader(this), Next((ECValue*)(intptr_t)1), Data(Elt) {} - - const ECValue *getLeader() const { - if (isLeader()) return this; - if (Leader->isLeader()) return Leader; - // Path compression. - return Leader = Leader->getLeader(); - } - const ECValue *getEndOfList() const { - assert(isLeader() && "Cannot get the end of a list for a non-leader!"); - return Leader; - } - - void setNext(const ECValue *NewNext) const { - assert(getNext() == nullptr && "Already has a next pointer!"); - Next = (const ECValue*)((intptr_t)NewNext | (intptr_t)isLeader()); - } - public: - ECValue(const ECValue &RHS) : Leader(this), Next((ECValue*)(intptr_t)1), - Data(RHS.Data) { - // Only support copying of singleton nodes. - assert(RHS.isLeader() && RHS.getNext() == nullptr && "Not a singleton!"); - } - - bool operator<(const ECValue &UFN) const { return Data < UFN.Data; } - - bool isLeader() const { return (intptr_t)Next & 1; } - const ElemTy &getData() const { return Data; } - - const ECValue *getNext() const { - return (ECValue*)((intptr_t)Next & ~(intptr_t)1); - } - - template - bool operator<(const T &Val) const { return Data < Val; } - }; - - /// TheMapping - This implicitly provides a mapping from ElemTy values to the - /// ECValues, it just keeps the key as part of the value. - std::set TheMapping; - -public: - EquivalenceClasses() {} - EquivalenceClasses(const EquivalenceClasses &RHS) { - operator=(RHS); - } - - const EquivalenceClasses &operator=(const EquivalenceClasses &RHS) { - TheMapping.clear(); - for (iterator I = RHS.begin(), E = RHS.end(); I != E; ++I) - if (I->isLeader()) { - member_iterator MI = RHS.member_begin(I); - member_iterator LeaderIt = member_begin(insert(*MI)); - for (++MI; MI != member_end(); ++MI) - unionSets(LeaderIt, member_begin(insert(*MI))); - } - return *this; - } - - //===--------------------------------------------------------------------===// - // Inspection methods - // - - /// iterator* - Provides a way to iterate over all values in the set. - typedef typename std::set::const_iterator iterator; - iterator begin() const { return TheMapping.begin(); } - iterator end() const { return TheMapping.end(); } - - bool empty() const { return TheMapping.empty(); } - - /// member_* Iterate over the members of an equivalence class. - /// - class member_iterator; - member_iterator member_begin(iterator I) const { - // Only leaders provide anything to iterate over. - return member_iterator(I->isLeader() ? &*I : nullptr); - } - member_iterator member_end() const { - return member_iterator(nullptr); - } - - /// findValue - Return an iterator to the specified value. If it does not - /// exist, end() is returned. - iterator findValue(const ElemTy &V) const { - return TheMapping.find(V); - } - - /// getLeaderValue - Return the leader for the specified value that is in the - /// set. It is an error to call this method for a value that is not yet in - /// the set. For that, call getOrInsertLeaderValue(V). - const ElemTy &getLeaderValue(const ElemTy &V) const { - member_iterator MI = findLeader(V); - assert(MI != member_end() && "Value is not in the set!"); - return *MI; - } - - /// getOrInsertLeaderValue - Return the leader for the specified value that is - /// in the set. If the member is not in the set, it is inserted, then - /// returned. - const ElemTy &getOrInsertLeaderValue(const ElemTy &V) { - member_iterator MI = findLeader(insert(V)); - assert(MI != member_end() && "Value is not in the set!"); - return *MI; - } - - /// getNumClasses - Return the number of equivalence classes in this set. - /// Note that this is a linear time operation. - unsigned getNumClasses() const { - unsigned NC = 0; - for (iterator I = begin(), E = end(); I != E; ++I) - if (I->isLeader()) ++NC; - return NC; - } - - - //===--------------------------------------------------------------------===// - // Mutation methods - - /// insert - Insert a new value into the union/find set, ignoring the request - /// if the value already exists. - iterator insert(const ElemTy &Data) { - return TheMapping.insert(ECValue(Data)).first; - } - - /// findLeader - Given a value in the set, return a member iterator for the - /// equivalence class it is in. This does the path-compression part that - /// makes union-find "union findy". This returns an end iterator if the value - /// is not in the equivalence class. - /// - member_iterator findLeader(iterator I) const { - if (I == TheMapping.end()) return member_end(); - return member_iterator(I->getLeader()); - } - member_iterator findLeader(const ElemTy &V) const { - return findLeader(TheMapping.find(V)); - } - - - /// union - Merge the two equivalence sets for the specified values, inserting - /// them if they do not already exist in the equivalence set. - member_iterator unionSets(const ElemTy &V1, const ElemTy &V2) { - iterator V1I = insert(V1), V2I = insert(V2); - return unionSets(findLeader(V1I), findLeader(V2I)); - } - member_iterator unionSets(member_iterator L1, member_iterator L2) { - assert(L1 != member_end() && L2 != member_end() && "Illegal inputs!"); - if (L1 == L2) return L1; // Unifying the same two sets, noop. - - // Otherwise, this is a real union operation. Set the end of the L1 list to - // point to the L2 leader node. - const ECValue &L1LV = *L1.Node, &L2LV = *L2.Node; - L1LV.getEndOfList()->setNext(&L2LV); - - // Update L1LV's end of list pointer. - L1LV.Leader = L2LV.getEndOfList(); - - // Clear L2's leader flag: - L2LV.Next = L2LV.getNext(); - - // L2's leader is now L1. - L2LV.Leader = &L1LV; - return L1; - } - - class member_iterator : public std::iterator { - typedef std::iterator super; - const ECValue *Node; - friend class EquivalenceClasses; - public: - typedef size_t size_type; - typedef typename super::pointer pointer; - typedef typename super::reference reference; - - explicit member_iterator() {} - explicit member_iterator(const ECValue *N) : Node(N) {} - - reference operator*() const { - assert(Node != nullptr && "Dereferencing end()!"); - return Node->getData(); - } - pointer operator->() const { return &operator*(); } - - member_iterator &operator++() { - assert(Node != nullptr && "++'d off the end of the list!"); - Node = Node->getNext(); - return *this; - } - - member_iterator operator++(int) { // postincrement operators. - member_iterator tmp = *this; - ++*this; - return tmp; - } - - bool operator==(const member_iterator &RHS) const { - return Node == RHS.Node; - } - bool operator!=(const member_iterator &RHS) const { - return Node != RHS.Node; - } - }; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/FoldingSet.h b/llvm/include/llvm/ADT/FoldingSet.h deleted file mode 100644 index f16258af..00000000 --- a/llvm/include/llvm/ADT/FoldingSet.h +++ /dev/null @@ -1,764 +0,0 @@ -//===-- llvm/ADT/FoldingSet.h - Uniquing Hash Set ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a hash set that can be used to remove duplication of nodes -// in a graph. This code was originally created by Chris Lattner for use with -// SelectionDAGCSEMap, but was isolated to provide use across the llvm code set. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_FOLDINGSET_H -#define LLVM_ADT_FOLDINGSET_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/iterator.h" -#include "llvm/Support/Allocator.h" - -namespace llvm { -/// This folding set used for two purposes: -/// 1. Given information about a node we want to create, look up the unique -/// instance of the node in the set. If the node already exists, return -/// it, otherwise return the bucket it should be inserted into. -/// 2. Given a node that has already been created, remove it from the set. -/// -/// This class is implemented as a single-link chained hash table, where the -/// "buckets" are actually the nodes themselves (the next pointer is in the -/// node). The last node points back to the bucket to simplify node removal. -/// -/// Any node that is to be included in the folding set must be a subclass of -/// FoldingSetNode. The node class must also define a Profile method used to -/// establish the unique bits of data for the node. The Profile method is -/// passed a FoldingSetNodeID object which is used to gather the bits. Just -/// call one of the Add* functions defined in the FoldingSetImpl::NodeID class. -/// NOTE: That the folding set does not own the nodes and it is the -/// responsibility of the user to dispose of the nodes. -/// -/// Eg. -/// class MyNode : public FoldingSetNode { -/// private: -/// std::string Name; -/// unsigned Value; -/// public: -/// MyNode(const char *N, unsigned V) : Name(N), Value(V) {} -/// ... -/// void Profile(FoldingSetNodeID &ID) const { -/// ID.AddString(Name); -/// ID.AddInteger(Value); -/// } -/// ... -/// }; -/// -/// To define the folding set itself use the FoldingSet template; -/// -/// Eg. -/// FoldingSet MyFoldingSet; -/// -/// Four public methods are available to manipulate the folding set; -/// -/// 1) If you have an existing node that you want add to the set but unsure -/// that the node might already exist then call; -/// -/// MyNode *M = MyFoldingSet.GetOrInsertNode(N); -/// -/// If The result is equal to the input then the node has been inserted. -/// Otherwise, the result is the node existing in the folding set, and the -/// input can be discarded (use the result instead.) -/// -/// 2) If you are ready to construct a node but want to check if it already -/// exists, then call FindNodeOrInsertPos with a FoldingSetNodeID of the bits to -/// check; -/// -/// FoldingSetNodeID ID; -/// ID.AddString(Name); -/// ID.AddInteger(Value); -/// void *InsertPoint; -/// -/// MyNode *M = MyFoldingSet.FindNodeOrInsertPos(ID, InsertPoint); -/// -/// If found then M with be non-NULL, else InsertPoint will point to where it -/// should be inserted using InsertNode. -/// -/// 3) If you get a NULL result from FindNodeOrInsertPos then you can as a new -/// node with FindNodeOrInsertPos; -/// -/// InsertNode(N, InsertPoint); -/// -/// 4) Finally, if you want to remove a node from the folding set call; -/// -/// bool WasRemoved = RemoveNode(N); -/// -/// The result indicates whether the node existed in the folding set. - -class FoldingSetNodeID; -class StringRef; - -//===----------------------------------------------------------------------===// -/// FoldingSetImpl - Implements the folding set functionality. The main -/// structure is an array of buckets. Each bucket is indexed by the hash of -/// the nodes it contains. The bucket itself points to the nodes contained -/// in the bucket via a singly linked list. The last node in the list points -/// back to the bucket to facilitate node removal. -/// -class FoldingSetImpl { - virtual void anchor(); // Out of line virtual method. - -protected: - /// Buckets - Array of bucket chains. - /// - void **Buckets; - - /// NumBuckets - Length of the Buckets array. Always a power of 2. - /// - unsigned NumBuckets; - - /// NumNodes - Number of nodes in the folding set. Growth occurs when NumNodes - /// is greater than twice the number of buckets. - unsigned NumNodes; - - explicit FoldingSetImpl(unsigned Log2InitSize = 6); - FoldingSetImpl(FoldingSetImpl &&Arg); - FoldingSetImpl &operator=(FoldingSetImpl &&RHS); - ~FoldingSetImpl(); - -public: - //===--------------------------------------------------------------------===// - /// Node - This class is used to maintain the singly linked bucket list in - /// a folding set. - /// - class Node { - private: - // NextInFoldingSetBucket - next link in the bucket list. - void *NextInFoldingSetBucket; - - public: - Node() : NextInFoldingSetBucket(nullptr) {} - - // Accessors - void *getNextInBucket() const { return NextInFoldingSetBucket; } - void SetNextInBucket(void *N) { NextInFoldingSetBucket = N; } - }; - - /// clear - Remove all nodes from the folding set. - void clear(); - - /// RemoveNode - Remove a node from the folding set, returning true if one - /// was removed or false if the node was not in the folding set. - bool RemoveNode(Node *N); - - /// GetOrInsertNode - If there is an existing simple Node exactly - /// equal to the specified node, return it. Otherwise, insert 'N' and return - /// it instead. - Node *GetOrInsertNode(Node *N); - - /// FindNodeOrInsertPos - Look up the node specified by ID. If it exists, - /// return it. If not, return the insertion token that will make insertion - /// faster. - Node *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos); - - /// InsertNode - Insert the specified node into the folding set, knowing that - /// it is not already in the folding set. InsertPos must be obtained from - /// FindNodeOrInsertPos. - void InsertNode(Node *N, void *InsertPos); - - /// InsertNode - Insert the specified node into the folding set, knowing that - /// it is not already in the folding set. - void InsertNode(Node *N) { - Node *Inserted = GetOrInsertNode(N); - (void)Inserted; - assert(Inserted == N && "Node already inserted!"); - } - - /// size - Returns the number of nodes in the folding set. - unsigned size() const { return NumNodes; } - - /// empty - Returns true if there are no nodes in the folding set. - bool empty() const { return NumNodes == 0; } - - /// reserve - Increase the number of buckets such that adding the - /// EltCount-th node won't cause a rebucket operation. reserve is permitted - /// to allocate more space than requested by EltCount. - void reserve(unsigned EltCount); - /// capacity - Returns the number of nodes permitted in the folding set - /// before a rebucket operation is performed. - unsigned capacity() { - // We allow a load factor of up to 2.0, - // so that means our capacity is NumBuckets * 2 - return NumBuckets * 2; - } - -private: - /// GrowHashTable - Double the size of the hash table and rehash everything. - void GrowHashTable(); - - /// GrowBucketCount - resize the hash table and rehash everything. - /// NewBucketCount must be a power of two, and must be greater than the old - /// bucket count. - void GrowBucketCount(unsigned NewBucketCount); -protected: - /// GetNodeProfile - Instantiations of the FoldingSet template implement - /// this function to gather data bits for the given node. - virtual void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const = 0; - /// NodeEquals - Instantiations of the FoldingSet template implement - /// this function to compare the given node with the given ID. - virtual bool NodeEquals(Node *N, const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID) const=0; - /// ComputeNodeHash - Instantiations of the FoldingSet template implement - /// this function to compute a hash value for the given node. - virtual unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const = 0; -}; - -//===----------------------------------------------------------------------===// - -template struct FoldingSetTrait; - -/// DefaultFoldingSetTrait - This class provides default implementations -/// for FoldingSetTrait implementations. -/// -template struct DefaultFoldingSetTrait { - static void Profile(const T &X, FoldingSetNodeID &ID) { - X.Profile(ID); - } - static void Profile(T &X, FoldingSetNodeID &ID) { - X.Profile(ID); - } - - // Equals - Test if the profile for X would match ID, using TempID - // to compute a temporary ID if necessary. The default implementation - // just calls Profile and does a regular comparison. Implementations - // can override this to provide more efficient implementations. - static inline bool Equals(T &X, const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID); - - // ComputeHash - Compute a hash value for X, using TempID to - // compute a temporary ID if necessary. The default implementation - // just calls Profile and does a regular hash computation. - // Implementations can override this to provide more efficient - // implementations. - static inline unsigned ComputeHash(T &X, FoldingSetNodeID &TempID); -}; - -/// FoldingSetTrait - This trait class is used to define behavior of how -/// to "profile" (in the FoldingSet parlance) an object of a given type. -/// The default behavior is to invoke a 'Profile' method on an object, but -/// through template specialization the behavior can be tailored for specific -/// types. Combined with the FoldingSetNodeWrapper class, one can add objects -/// to FoldingSets that were not originally designed to have that behavior. -template struct FoldingSetTrait - : public DefaultFoldingSetTrait {}; - -template struct ContextualFoldingSetTrait; - -/// DefaultContextualFoldingSetTrait - Like DefaultFoldingSetTrait, but -/// for ContextualFoldingSets. -template -struct DefaultContextualFoldingSetTrait { - static void Profile(T &X, FoldingSetNodeID &ID, Ctx Context) { - X.Profile(ID, Context); - } - static inline bool Equals(T &X, const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID, Ctx Context); - static inline unsigned ComputeHash(T &X, FoldingSetNodeID &TempID, - Ctx Context); -}; - -/// ContextualFoldingSetTrait - Like FoldingSetTrait, but for -/// ContextualFoldingSets. -template struct ContextualFoldingSetTrait - : public DefaultContextualFoldingSetTrait {}; - -//===--------------------------------------------------------------------===// -/// FoldingSetNodeIDRef - This class describes a reference to an interned -/// FoldingSetNodeID, which can be a useful to store node id data rather -/// than using plain FoldingSetNodeIDs, since the 32-element SmallVector -/// is often much larger than necessary, and the possibility of heap -/// allocation means it requires a non-trivial destructor call. -class FoldingSetNodeIDRef { - const unsigned *Data; - size_t Size; - -public: - FoldingSetNodeIDRef() : Data(nullptr), Size(0) {} - FoldingSetNodeIDRef(const unsigned *D, size_t S) : Data(D), Size(S) {} - - /// ComputeHash - Compute a strong hash value for this FoldingSetNodeIDRef, - /// used to lookup the node in the FoldingSetImpl. - unsigned ComputeHash() const; - - bool operator==(FoldingSetNodeIDRef) const; - - bool operator!=(FoldingSetNodeIDRef RHS) const { return !(*this == RHS); } - - /// Used to compare the "ordering" of two nodes as defined by the - /// profiled bits and their ordering defined by memcmp(). - bool operator<(FoldingSetNodeIDRef) const; - - const unsigned *getData() const { return Data; } - size_t getSize() const { return Size; } -}; - -//===--------------------------------------------------------------------===// -/// FoldingSetNodeID - This class is used to gather all the unique data bits of -/// a node. When all the bits are gathered this class is used to produce a -/// hash value for the node. -/// -class FoldingSetNodeID { - /// Bits - Vector of all the data bits that make the node unique. - /// Use a SmallVector to avoid a heap allocation in the common case. - SmallVector Bits; - -public: - FoldingSetNodeID() {} - - FoldingSetNodeID(FoldingSetNodeIDRef Ref) - : Bits(Ref.getData(), Ref.getData() + Ref.getSize()) {} - - /// Add* - Add various data types to Bit data. - /// - void AddPointer(const void *Ptr); - void AddInteger(signed I); - void AddInteger(unsigned I); - void AddInteger(long I); - void AddInteger(unsigned long I); - void AddInteger(long long I); - void AddInteger(unsigned long long I); - void AddBoolean(bool B) { AddInteger(B ? 1U : 0U); } - void AddString(StringRef String); - void AddNodeID(const FoldingSetNodeID &ID); - - template - inline void Add(const T &x) { FoldingSetTrait::Profile(x, *this); } - - /// clear - Clear the accumulated profile, allowing this FoldingSetNodeID - /// object to be used to compute a new profile. - inline void clear() { Bits.clear(); } - - /// ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used - /// to lookup the node in the FoldingSetImpl. - unsigned ComputeHash() const; - - /// operator== - Used to compare two nodes to each other. - /// - bool operator==(const FoldingSetNodeID &RHS) const; - bool operator==(const FoldingSetNodeIDRef RHS) const; - - bool operator!=(const FoldingSetNodeID &RHS) const { return !(*this == RHS); } - bool operator!=(const FoldingSetNodeIDRef RHS) const { return !(*this ==RHS);} - - /// Used to compare the "ordering" of two nodes as defined by the - /// profiled bits and their ordering defined by memcmp(). - bool operator<(const FoldingSetNodeID &RHS) const; - bool operator<(const FoldingSetNodeIDRef RHS) const; - - /// Intern - Copy this node's data to a memory region allocated from the - /// given allocator and return a FoldingSetNodeIDRef describing the - /// interned data. - FoldingSetNodeIDRef Intern(BumpPtrAllocator &Allocator) const; -}; - -// Convenience type to hide the implementation of the folding set. -typedef FoldingSetImpl::Node FoldingSetNode; -template class FoldingSetIterator; -template class FoldingSetBucketIterator; - -// Definitions of FoldingSetTrait and ContextualFoldingSetTrait functions, which -// require the definition of FoldingSetNodeID. -template -inline bool -DefaultFoldingSetTrait::Equals(T &X, const FoldingSetNodeID &ID, - unsigned /*IDHash*/, - FoldingSetNodeID &TempID) { - FoldingSetTrait::Profile(X, TempID); - return TempID == ID; -} -template -inline unsigned -DefaultFoldingSetTrait::ComputeHash(T &X, FoldingSetNodeID &TempID) { - FoldingSetTrait::Profile(X, TempID); - return TempID.ComputeHash(); -} -template -inline bool -DefaultContextualFoldingSetTrait::Equals(T &X, - const FoldingSetNodeID &ID, - unsigned /*IDHash*/, - FoldingSetNodeID &TempID, - Ctx Context) { - ContextualFoldingSetTrait::Profile(X, TempID, Context); - return TempID == ID; -} -template -inline unsigned -DefaultContextualFoldingSetTrait::ComputeHash(T &X, - FoldingSetNodeID &TempID, - Ctx Context) { - ContextualFoldingSetTrait::Profile(X, TempID, Context); - return TempID.ComputeHash(); -} - -//===----------------------------------------------------------------------===// -/// FoldingSet - This template class is used to instantiate a specialized -/// implementation of the folding set to the node class T. T must be a -/// subclass of FoldingSetNode and implement a Profile function. -/// -/// Note that this set type is movable and move-assignable. However, its -/// moved-from state is not a valid state for anything other than -/// move-assigning and destroying. This is primarily to enable movable APIs -/// that incorporate these objects. -template class FoldingSet final : public FoldingSetImpl { -private: - /// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a - /// way to convert nodes into a unique specifier. - void GetNodeProfile(Node *N, FoldingSetNodeID &ID) const override { - T *TN = static_cast(N); - FoldingSetTrait::Profile(*TN, ID); - } - /// NodeEquals - Instantiations may optionally provide a way to compare a - /// node with a specified ID. - bool NodeEquals(Node *N, const FoldingSetNodeID &ID, unsigned IDHash, - FoldingSetNodeID &TempID) const override { - T *TN = static_cast(N); - return FoldingSetTrait::Equals(*TN, ID, IDHash, TempID); - } - /// ComputeNodeHash - Instantiations may optionally provide a way to compute a - /// hash value directly from a node. - unsigned ComputeNodeHash(Node *N, FoldingSetNodeID &TempID) const override { - T *TN = static_cast(N); - return FoldingSetTrait::ComputeHash(*TN, TempID); - } - -public: - explicit FoldingSet(unsigned Log2InitSize = 6) - : FoldingSetImpl(Log2InitSize) {} - - FoldingSet(FoldingSet &&Arg) : FoldingSetImpl(std::move(Arg)) {} - FoldingSet &operator=(FoldingSet &&RHS) { - (void)FoldingSetImpl::operator=(std::move(RHS)); - return *this; - } - - typedef FoldingSetIterator iterator; - iterator begin() { return iterator(Buckets); } - iterator end() { return iterator(Buckets+NumBuckets); } - - typedef FoldingSetIterator const_iterator; - const_iterator begin() const { return const_iterator(Buckets); } - const_iterator end() const { return const_iterator(Buckets+NumBuckets); } - - typedef FoldingSetBucketIterator bucket_iterator; - - bucket_iterator bucket_begin(unsigned hash) { - return bucket_iterator(Buckets + (hash & (NumBuckets-1))); - } - - bucket_iterator bucket_end(unsigned hash) { - return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); - } - - /// GetOrInsertNode - If there is an existing simple Node exactly - /// equal to the specified node, return it. Otherwise, insert 'N' and - /// return it instead. - T *GetOrInsertNode(Node *N) { - return static_cast(FoldingSetImpl::GetOrInsertNode(N)); - } - - /// FindNodeOrInsertPos - Look up the node specified by ID. If it exists, - /// return it. If not, return the insertion token that will make insertion - /// faster. - T *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos) { - return static_cast(FoldingSetImpl::FindNodeOrInsertPos(ID, InsertPos)); - } -}; - -//===----------------------------------------------------------------------===// -/// ContextualFoldingSet - This template class is a further refinement -/// of FoldingSet which provides a context argument when calling -/// Profile on its nodes. Currently, that argument is fixed at -/// initialization time. -/// -/// T must be a subclass of FoldingSetNode and implement a Profile -/// function with signature -/// void Profile(llvm::FoldingSetNodeID &, Ctx); -template -class ContextualFoldingSet final : public FoldingSetImpl { - // Unfortunately, this can't derive from FoldingSet because the - // construction vtable for FoldingSet requires - // FoldingSet::GetNodeProfile to be instantiated, which in turn - // requires a single-argument T::Profile(). - -private: - Ctx Context; - - /// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a - /// way to convert nodes into a unique specifier. - void GetNodeProfile(FoldingSetImpl::Node *N, - FoldingSetNodeID &ID) const override { - T *TN = static_cast(N); - ContextualFoldingSetTrait::Profile(*TN, ID, Context); - } - bool NodeEquals(FoldingSetImpl::Node *N, const FoldingSetNodeID &ID, - unsigned IDHash, FoldingSetNodeID &TempID) const override { - T *TN = static_cast(N); - return ContextualFoldingSetTrait::Equals(*TN, ID, IDHash, TempID, - Context); - } - unsigned ComputeNodeHash(FoldingSetImpl::Node *N, - FoldingSetNodeID &TempID) const override { - T *TN = static_cast(N); - return ContextualFoldingSetTrait::ComputeHash(*TN, TempID, Context); - } - -public: - explicit ContextualFoldingSet(Ctx Context, unsigned Log2InitSize = 6) - : FoldingSetImpl(Log2InitSize), Context(Context) - {} - - Ctx getContext() const { return Context; } - - typedef FoldingSetIterator iterator; - iterator begin() { return iterator(Buckets); } - iterator end() { return iterator(Buckets+NumBuckets); } - - typedef FoldingSetIterator const_iterator; - const_iterator begin() const { return const_iterator(Buckets); } - const_iterator end() const { return const_iterator(Buckets+NumBuckets); } - - typedef FoldingSetBucketIterator bucket_iterator; - - bucket_iterator bucket_begin(unsigned hash) { - return bucket_iterator(Buckets + (hash & (NumBuckets-1))); - } - - bucket_iterator bucket_end(unsigned hash) { - return bucket_iterator(Buckets + (hash & (NumBuckets-1)), true); - } - - /// GetOrInsertNode - If there is an existing simple Node exactly - /// equal to the specified node, return it. Otherwise, insert 'N' - /// and return it instead. - T *GetOrInsertNode(Node *N) { - return static_cast(FoldingSetImpl::GetOrInsertNode(N)); - } - - /// FindNodeOrInsertPos - Look up the node specified by ID. If it - /// exists, return it. If not, return the insertion token that will - /// make insertion faster. - T *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos) { - return static_cast(FoldingSetImpl::FindNodeOrInsertPos(ID, InsertPos)); - } -}; - -//===----------------------------------------------------------------------===// -/// FoldingSetVector - This template class combines a FoldingSet and a vector -/// to provide the interface of FoldingSet but with deterministic iteration -/// order based on the insertion order. T must be a subclass of FoldingSetNode -/// and implement a Profile function. -template > -class FoldingSetVector { - FoldingSet Set; - VectorT Vector; - -public: - explicit FoldingSetVector(unsigned Log2InitSize = 6) - : Set(Log2InitSize) { - } - - typedef pointee_iterator iterator; - iterator begin() { return Vector.begin(); } - iterator end() { return Vector.end(); } - - typedef pointee_iterator const_iterator; - const_iterator begin() const { return Vector.begin(); } - const_iterator end() const { return Vector.end(); } - - /// clear - Remove all nodes from the folding set. - void clear() { Set.clear(); Vector.clear(); } - - /// FindNodeOrInsertPos - Look up the node specified by ID. If it exists, - /// return it. If not, return the insertion token that will make insertion - /// faster. - T *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos) { - return Set.FindNodeOrInsertPos(ID, InsertPos); - } - - /// GetOrInsertNode - If there is an existing simple Node exactly - /// equal to the specified node, return it. Otherwise, insert 'N' and - /// return it instead. - T *GetOrInsertNode(T *N) { - T *Result = Set.GetOrInsertNode(N); - if (Result == N) Vector.push_back(N); - return Result; - } - - /// InsertNode - Insert the specified node into the folding set, knowing that - /// it is not already in the folding set. InsertPos must be obtained from - /// FindNodeOrInsertPos. - void InsertNode(T *N, void *InsertPos) { - Set.InsertNode(N, InsertPos); - Vector.push_back(N); - } - - /// InsertNode - Insert the specified node into the folding set, knowing that - /// it is not already in the folding set. - void InsertNode(T *N) { - Set.InsertNode(N); - Vector.push_back(N); - } - - /// size - Returns the number of nodes in the folding set. - unsigned size() const { return Set.size(); } - - /// empty - Returns true if there are no nodes in the folding set. - bool empty() const { return Set.empty(); } -}; - -//===----------------------------------------------------------------------===// -/// FoldingSetIteratorImpl - This is the common iterator support shared by all -/// folding sets, which knows how to walk the folding set hash table. -class FoldingSetIteratorImpl { -protected: - FoldingSetNode *NodePtr; - FoldingSetIteratorImpl(void **Bucket); - void advance(); - -public: - bool operator==(const FoldingSetIteratorImpl &RHS) const { - return NodePtr == RHS.NodePtr; - } - bool operator!=(const FoldingSetIteratorImpl &RHS) const { - return NodePtr != RHS.NodePtr; - } -}; - -template class FoldingSetIterator : public FoldingSetIteratorImpl { -public: - explicit FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {} - - T &operator*() const { - return *static_cast(NodePtr); - } - - T *operator->() const { - return static_cast(NodePtr); - } - - inline FoldingSetIterator &operator++() { // Preincrement - advance(); - return *this; - } - FoldingSetIterator operator++(int) { // Postincrement - FoldingSetIterator tmp = *this; ++*this; return tmp; - } -}; - -//===----------------------------------------------------------------------===// -/// FoldingSetBucketIteratorImpl - This is the common bucket iterator support -/// shared by all folding sets, which knows how to walk a particular bucket -/// of a folding set hash table. - -class FoldingSetBucketIteratorImpl { -protected: - void *Ptr; - - explicit FoldingSetBucketIteratorImpl(void **Bucket); - - FoldingSetBucketIteratorImpl(void **Bucket, bool) - : Ptr(Bucket) {} - - void advance() { - void *Probe = static_cast(Ptr)->getNextInBucket(); - uintptr_t x = reinterpret_cast(Probe) & ~0x1; - Ptr = reinterpret_cast(x); - } - -public: - bool operator==(const FoldingSetBucketIteratorImpl &RHS) const { - return Ptr == RHS.Ptr; - } - bool operator!=(const FoldingSetBucketIteratorImpl &RHS) const { - return Ptr != RHS.Ptr; - } -}; - -template -class FoldingSetBucketIterator : public FoldingSetBucketIteratorImpl { -public: - explicit FoldingSetBucketIterator(void **Bucket) : - FoldingSetBucketIteratorImpl(Bucket) {} - - FoldingSetBucketIterator(void **Bucket, bool) : - FoldingSetBucketIteratorImpl(Bucket, true) {} - - T &operator*() const { return *static_cast(Ptr); } - T *operator->() const { return static_cast(Ptr); } - - inline FoldingSetBucketIterator &operator++() { // Preincrement - advance(); - return *this; - } - FoldingSetBucketIterator operator++(int) { // Postincrement - FoldingSetBucketIterator tmp = *this; ++*this; return tmp; - } -}; - -//===----------------------------------------------------------------------===// -/// FoldingSetNodeWrapper - This template class is used to "wrap" arbitrary -/// types in an enclosing object so that they can be inserted into FoldingSets. -template -class FoldingSetNodeWrapper : public FoldingSetNode { - T data; - -public: - template - explicit FoldingSetNodeWrapper(Ts &&... Args) - : data(std::forward(Args)...) {} - - void Profile(FoldingSetNodeID &ID) { FoldingSetTrait::Profile(data, ID); } - - T &getValue() { return data; } - const T &getValue() const { return data; } - - operator T&() { return data; } - operator const T&() const { return data; } -}; - -//===----------------------------------------------------------------------===// -/// FastFoldingSetNode - This is a subclass of FoldingSetNode which stores -/// a FoldingSetNodeID value rather than requiring the node to recompute it -/// each time it is needed. This trades space for speed (which can be -/// significant if the ID is long), and it also permits nodes to drop -/// information that would otherwise only be required for recomputing an ID. -class FastFoldingSetNode : public FoldingSetNode { - FoldingSetNodeID FastID; - -protected: - explicit FastFoldingSetNode(const FoldingSetNodeID &ID) : FastID(ID) {} - -public: - void Profile(FoldingSetNodeID &ID) const { ID.AddNodeID(FastID); } -}; - -//===----------------------------------------------------------------------===// -// Partial specializations of FoldingSetTrait. - -template struct FoldingSetTrait { - static inline void Profile(T *X, FoldingSetNodeID &ID) { - ID.AddPointer(X); - } -}; -template -struct FoldingSetTrait> { - static inline void Profile(const std::pair &P, - llvm::FoldingSetNodeID &ID) { - ID.Add(P.first); - ID.Add(P.second); - } -}; -} // End of namespace llvm. - -#endif diff --git a/llvm/include/llvm/ADT/GraphTraits.h b/llvm/include/llvm/ADT/GraphTraits.h deleted file mode 100644 index eb67b7c8..00000000 --- a/llvm/include/llvm/ADT/GraphTraits.h +++ /dev/null @@ -1,111 +0,0 @@ -//===-- llvm/ADT/GraphTraits.h - Graph traits template ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the little GraphTraits template class that should be -// specialized by classes that want to be iteratable by generic graph iterators. -// -// This file also defines the marker class Inverse that is used to iterate over -// graphs in a graph defined, inverse ordering... -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_GRAPHTRAITS_H -#define LLVM_ADT_GRAPHTRAITS_H - -namespace llvm { - -// GraphTraits - This class should be specialized by different graph types... -// which is why the default version is empty. -// -template -struct GraphTraits { - // Elements to provide: - - // NOTICE: We are in a transition from migration interfaces that require - // NodeType *, to NodeRef. NodeRef is required to be cheap to copy, but does - // not have to be a raw pointer. In the transition, user should define - // NodeType, and NodeRef = NodeType *. - // - // typedef NodeType - Type of Node in the graph - // typedef NodeRef - NodeType * - // typedef ChildIteratorType - Type used to iterate over children in graph - - // static NodeRef getEntryNode(const GraphType &) - // Return the entry node of the graph - - // static ChildIteratorType child_begin(NodeRef) - // static ChildIteratorType child_end (NodeRef) - // Return iterators that point to the beginning and ending of the child - // node list for the specified node. - // - - // typedef ...iterator nodes_iterator; - // static nodes_iterator nodes_begin(GraphType *G) - // static nodes_iterator nodes_end (GraphType *G) - // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - - // static unsigned size (GraphType *G) - // Return total number of nodes in the graph - // - - - // If anyone tries to use this class without having an appropriate - // specialization, make an error. If you get this error, it's because you - // need to include the appropriate specialization of GraphTraits<> for your - // graph, or you need to define it for a new graph type. Either that or - // your argument to XXX_begin(...) is unknown or needs to have the proper .h - // file #include'd. - // - typedef typename GraphType::UnknownGraphTypeError NodeRef; -}; - - -// Inverse - This class is used as a little marker class to tell the graph -// iterator to iterate over the graph in a graph defined "Inverse" ordering. -// Not all graphs define an inverse ordering, and if they do, it depends on -// the graph exactly what that is. Here's an example of usage with the -// df_iterator: -// -// idf_iterator I = idf_begin(M), E = idf_end(M); -// for (; I != E; ++I) { ... } -// -// Which is equivalent to: -// df_iterator > I = idf_begin(M), E = idf_end(M); -// for (; I != E; ++I) { ... } -// -template -struct Inverse { - const GraphType &Graph; - - inline Inverse(const GraphType &G) : Graph(G) {} -}; - -// Provide a partial specialization of GraphTraits so that the inverse of an -// inverse falls back to the original graph. -template -struct GraphTraits > > { - typedef typename GraphTraits::NodeType NodeType; - typedef typename GraphTraits::ChildIteratorType ChildIteratorType; - - static NodeType *getEntryNode(Inverse > *G) { - return GraphTraits::getEntryNode(G->Graph.Graph); - } - - static ChildIteratorType child_begin(NodeType* N) { - return GraphTraits::child_begin(N); - } - - static ChildIteratorType child_end(NodeType* N) { - return GraphTraits::child_end(N); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/Hashing.h b/llvm/include/llvm/ADT/Hashing.h deleted file mode 100644 index c3b57410..00000000 --- a/llvm/include/llvm/ADT/Hashing.h +++ /dev/null @@ -1,661 +0,0 @@ -//===-- llvm/ADT/Hashing.h - Utilities for hashing --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the newly proposed standard C++ interfaces for hashing -// arbitrary data and building hash functions for user-defined types. This -// interface was originally proposed in N3333[1] and is currently under review -// for inclusion in a future TR and/or standard. -// -// The primary interfaces provide are comprised of one type and three functions: -// -// -- 'hash_code' class is an opaque type representing the hash code for some -// data. It is the intended product of hashing, and can be used to implement -// hash tables, checksumming, and other common uses of hashes. It is not an -// integer type (although it can be converted to one) because it is risky -// to assume much about the internals of a hash_code. In particular, each -// execution of the program has a high probability of producing a different -// hash_code for a given input. Thus their values are not stable to save or -// persist, and should only be used during the execution for the -// construction of hashing datastructures. -// -// -- 'hash_value' is a function designed to be overloaded for each -// user-defined type which wishes to be used within a hashing context. It -// should be overloaded within the user-defined type's namespace and found -// via ADL. Overloads for primitive types are provided by this library. -// -// -- 'hash_combine' and 'hash_combine_range' are functions designed to aid -// programmers in easily and intuitively combining a set of data into -// a single hash_code for their object. They should only logically be used -// within the implementation of a 'hash_value' routine or similar context. -// -// Note that 'hash_combine_range' contains very special logic for hashing -// a contiguous array of integers or pointers. This logic is *extremely* fast, -// on a modern Intel "Gainestown" Xeon (Nehalem uarch) @2.2 GHz, these were -// benchmarked at over 6.5 GiB/s for large keys, and <20 cycles/hash for keys -// under 32-bytes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_HASHING_H -#define LLVM_ADT_HASHING_H - -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/Host.h" -#include "llvm/Support/SwapByteOrder.h" -#include "llvm/Support/type_traits.h" -#include -#include -#include -#include -#include - -namespace llvm { - -/// \brief An opaque object representing a hash code. -/// -/// This object represents the result of hashing some entity. It is intended to -/// be used to implement hashtables or other hashing-based data structures. -/// While it wraps and exposes a numeric value, this value should not be -/// trusted to be stable or predictable across processes or executions. -/// -/// In order to obtain the hash_code for an object 'x': -/// \code -/// using llvm::hash_value; -/// llvm::hash_code code = hash_value(x); -/// \endcode -class hash_code { - size_t value; - -public: - /// \brief Default construct a hash_code. - /// Note that this leaves the value uninitialized. - hash_code() = default; - - /// \brief Form a hash code directly from a numerical value. - hash_code(size_t value) : value(value) {} - - /// \brief Convert the hash code to its numerical value for use. - /*explicit*/ operator size_t() const { return value; } - - friend bool operator==(const hash_code &lhs, const hash_code &rhs) { - return lhs.value == rhs.value; - } - friend bool operator!=(const hash_code &lhs, const hash_code &rhs) { - return lhs.value != rhs.value; - } - - /// \brief Allow a hash_code to be directly run through hash_value. - friend size_t hash_value(const hash_code &code) { return code.value; } -}; - -/// \brief Compute a hash_code for any integer value. -/// -/// Note that this function is intended to compute the same hash_code for -/// a particular value without regard to the pre-promotion type. This is in -/// contrast to hash_combine which may produce different hash_codes for -/// differing argument types even if they would implicit promote to a common -/// type without changing the value. -template -typename std::enable_if::value, hash_code>::type -hash_value(T value); - -/// \brief Compute a hash_code for a pointer's address. -/// -/// N.B.: This hashes the *address*. Not the value and not the type. -template hash_code hash_value(const T *ptr); - -/// \brief Compute a hash_code for a pair of objects. -template -hash_code hash_value(const std::pair &arg); - -/// \brief Compute a hash_code for a standard string. -template -hash_code hash_value(const std::basic_string &arg); - - -/// \brief Override the execution seed with a fixed value. -/// -/// This hashing library uses a per-execution seed designed to change on each -/// run with high probability in order to ensure that the hash codes are not -/// attackable and to ensure that output which is intended to be stable does -/// not rely on the particulars of the hash codes produced. -/// -/// That said, there are use cases where it is important to be able to -/// reproduce *exactly* a specific behavior. To that end, we provide a function -/// which will forcibly set the seed to a fixed value. This must be done at the -/// start of the program, before any hashes are computed. Also, it cannot be -/// undone. This makes it thread-hostile and very hard to use outside of -/// immediately on start of a simple program designed for reproducible -/// behavior. -void set_fixed_execution_hash_seed(size_t fixed_value); - - -// All of the implementation details of actually computing the various hash -// code values are held within this namespace. These routines are included in -// the header file mainly to allow inlining and constant propagation. -namespace hashing { -namespace detail { - -inline uint64_t fetch64(const char *p) { - uint64_t result; - memcpy(&result, p, sizeof(result)); - if (sys::IsBigEndianHost) - sys::swapByteOrder(result); - return result; -} - -inline uint32_t fetch32(const char *p) { - uint32_t result; - memcpy(&result, p, sizeof(result)); - if (sys::IsBigEndianHost) - sys::swapByteOrder(result); - return result; -} - -/// Some primes between 2^63 and 2^64 for various uses. -static const uint64_t k0 = 0xc3a5c85c97cb3127ULL; -static const uint64_t k1 = 0xb492b66fbe98f273ULL; -static const uint64_t k2 = 0x9ae16a3b2f90404fULL; -static const uint64_t k3 = 0xc949d7c7509e6557ULL; - -/// \brief Bitwise right rotate. -/// Normally this will compile to a single instruction, especially if the -/// shift is a manifest constant. -inline uint64_t rotate(uint64_t val, size_t shift) { - // Avoid shifting by 64: doing so yields an undefined result. - return shift == 0 ? val : ((val >> shift) | (val << (64 - shift))); -} - -inline uint64_t shift_mix(uint64_t val) { - return val ^ (val >> 47); -} - -inline uint64_t hash_16_bytes(uint64_t low, uint64_t high) { - // Murmur-inspired hashing. - const uint64_t kMul = 0x9ddfea08eb382d69ULL; - uint64_t a = (low ^ high) * kMul; - a ^= (a >> 47); - uint64_t b = (high ^ a) * kMul; - b ^= (b >> 47); - b *= kMul; - return b; -} - -inline uint64_t hash_1to3_bytes(const char *s, size_t len, uint64_t seed) { - uint8_t a = s[0]; - uint8_t b = s[len >> 1]; - uint8_t c = s[len - 1]; - uint32_t y = static_cast(a) + (static_cast(b) << 8); - uint32_t z = len + (static_cast(c) << 2); - return shift_mix(y * k2 ^ z * k3 ^ seed) * k2; -} - -inline uint64_t hash_4to8_bytes(const char *s, size_t len, uint64_t seed) { - uint64_t a = fetch32(s); - return hash_16_bytes(len + (a << 3), seed ^ fetch32(s + len - 4)); -} - -inline uint64_t hash_9to16_bytes(const char *s, size_t len, uint64_t seed) { - uint64_t a = fetch64(s); - uint64_t b = fetch64(s + len - 8); - return hash_16_bytes(seed ^ a, rotate(b + len, len)) ^ b; -} - -inline uint64_t hash_17to32_bytes(const char *s, size_t len, uint64_t seed) { - uint64_t a = fetch64(s) * k1; - uint64_t b = fetch64(s + 8); - uint64_t c = fetch64(s + len - 8) * k2; - uint64_t d = fetch64(s + len - 16) * k0; - return hash_16_bytes(rotate(a - b, 43) + rotate(c ^ seed, 30) + d, - a + rotate(b ^ k3, 20) - c + len + seed); -} - -inline uint64_t hash_33to64_bytes(const char *s, size_t len, uint64_t seed) { - uint64_t z = fetch64(s + 24); - uint64_t a = fetch64(s) + (len + fetch64(s + len - 16)) * k0; - uint64_t b = rotate(a + z, 52); - uint64_t c = rotate(a, 37); - a += fetch64(s + 8); - c += rotate(a, 7); - a += fetch64(s + 16); - uint64_t vf = a + z; - uint64_t vs = b + rotate(a, 31) + c; - a = fetch64(s + 16) + fetch64(s + len - 32); - z = fetch64(s + len - 8); - b = rotate(a + z, 52); - c = rotate(a, 37); - a += fetch64(s + len - 24); - c += rotate(a, 7); - a += fetch64(s + len - 16); - uint64_t wf = a + z; - uint64_t ws = b + rotate(a, 31) + c; - uint64_t r = shift_mix((vf + ws) * k2 + (wf + vs) * k0); - return shift_mix((seed ^ (r * k0)) + vs) * k2; -} - -inline uint64_t hash_short(const char *s, size_t length, uint64_t seed) { - if (length >= 4 && length <= 8) - return hash_4to8_bytes(s, length, seed); - if (length > 8 && length <= 16) - return hash_9to16_bytes(s, length, seed); - if (length > 16 && length <= 32) - return hash_17to32_bytes(s, length, seed); - if (length > 32) - return hash_33to64_bytes(s, length, seed); - if (length != 0) - return hash_1to3_bytes(s, length, seed); - - return k2 ^ seed; -} - -/// \brief The intermediate state used during hashing. -/// Currently, the algorithm for computing hash codes is based on CityHash and -/// keeps 56 bytes of arbitrary state. -struct hash_state { - uint64_t h0, h1, h2, h3, h4, h5, h6; - - /// \brief Create a new hash_state structure and initialize it based on the - /// seed and the first 64-byte chunk. - /// This effectively performs the initial mix. - static hash_state create(const char *s, uint64_t seed) { - hash_state state = { - 0, seed, hash_16_bytes(seed, k1), rotate(seed ^ k1, 49), - seed * k1, shift_mix(seed), 0 }; - state.h6 = hash_16_bytes(state.h4, state.h5); - state.mix(s); - return state; - } - - /// \brief Mix 32-bytes from the input sequence into the 16-bytes of 'a' - /// and 'b', including whatever is already in 'a' and 'b'. - static void mix_32_bytes(const char *s, uint64_t &a, uint64_t &b) { - a += fetch64(s); - uint64_t c = fetch64(s + 24); - b = rotate(b + a + c, 21); - uint64_t d = a; - a += fetch64(s + 8) + fetch64(s + 16); - b += rotate(a, 44) + d; - a += c; - } - - /// \brief Mix in a 64-byte buffer of data. - /// We mix all 64 bytes even when the chunk length is smaller, but we - /// record the actual length. - void mix(const char *s) { - h0 = rotate(h0 + h1 + h3 + fetch64(s + 8), 37) * k1; - h1 = rotate(h1 + h4 + fetch64(s + 48), 42) * k1; - h0 ^= h6; - h1 += h3 + fetch64(s + 40); - h2 = rotate(h2 + h5, 33) * k1; - h3 = h4 * k1; - h4 = h0 + h5; - mix_32_bytes(s, h3, h4); - h5 = h2 + h6; - h6 = h1 + fetch64(s + 16); - mix_32_bytes(s + 32, h5, h6); - std::swap(h2, h0); - } - - /// \brief Compute the final 64-bit hash code value based on the current - /// state and the length of bytes hashed. - uint64_t finalize(size_t length) { - return hash_16_bytes(hash_16_bytes(h3, h5) + shift_mix(h1) * k1 + h2, - hash_16_bytes(h4, h6) + shift_mix(length) * k1 + h0); - } -}; - - -/// \brief A global, fixed seed-override variable. -/// -/// This variable can be set using the \see llvm::set_fixed_execution_seed -/// function. See that function for details. Do not, under any circumstances, -/// set or read this variable. -extern size_t fixed_seed_override; - -inline size_t get_execution_seed() { - // FIXME: This needs to be a per-execution seed. This is just a placeholder - // implementation. Switching to a per-execution seed is likely to flush out - // instability bugs and so will happen as its own commit. - // - // However, if there is a fixed seed override set the first time this is - // called, return that instead of the per-execution seed. - const uint64_t seed_prime = 0xff51afd7ed558ccdULL; - static size_t seed = fixed_seed_override ? fixed_seed_override - : (size_t)seed_prime; - return seed; -} - - -/// \brief Trait to indicate whether a type's bits can be hashed directly. -/// -/// A type trait which is true if we want to combine values for hashing by -/// reading the underlying data. It is false if values of this type must -/// first be passed to hash_value, and the resulting hash_codes combined. -// -// FIXME: We want to replace is_integral_or_enum and is_pointer here with -// a predicate which asserts that comparing the underlying storage of two -// values of the type for equality is equivalent to comparing the two values -// for equality. For all the platforms we care about, this holds for integers -// and pointers, but there are platforms where it doesn't and we would like to -// support user-defined types which happen to satisfy this property. -template struct is_hashable_data - : std::integral_constant::value || - std::is_pointer::value) && - 64 % sizeof(T) == 0)> {}; - -// Special case std::pair to detect when both types are viable and when there -// is no alignment-derived padding in the pair. This is a bit of a lie because -// std::pair isn't truly POD, but it's close enough in all reasonable -// implementations for our use case of hashing the underlying data. -template struct is_hashable_data > - : std::integral_constant::value && - is_hashable_data::value && - (sizeof(T) + sizeof(U)) == - sizeof(std::pair))> {}; - -/// \brief Helper to get the hashable data representation for a type. -/// This variant is enabled when the type itself can be used. -template -typename std::enable_if::value, T>::type -get_hashable_data(const T &value) { - return value; -} -/// \brief Helper to get the hashable data representation for a type. -/// This variant is enabled when we must first call hash_value and use the -/// result as our data. -template -typename std::enable_if::value, size_t>::type -get_hashable_data(const T &value) { - using ::llvm::hash_value; - return hash_value(value); -} - -/// \brief Helper to store data from a value into a buffer and advance the -/// pointer into that buffer. -/// -/// This routine first checks whether there is enough space in the provided -/// buffer, and if not immediately returns false. If there is space, it -/// copies the underlying bytes of value into the buffer, advances the -/// buffer_ptr past the copied bytes, and returns true. -template -bool store_and_advance(char *&buffer_ptr, char *buffer_end, const T& value, - size_t offset = 0) { - size_t store_size = sizeof(value) - offset; - if (buffer_ptr + store_size > buffer_end) - return false; - const char *value_data = reinterpret_cast(&value); - memcpy(buffer_ptr, value_data + offset, store_size); - buffer_ptr += store_size; - return true; -} - -/// \brief Implement the combining of integral values into a hash_code. -/// -/// This overload is selected when the value type of the iterator is -/// integral. Rather than computing a hash_code for each object and then -/// combining them, this (as an optimization) directly combines the integers. -template -hash_code hash_combine_range_impl(InputIteratorT first, InputIteratorT last) { - const size_t seed = get_execution_seed(); - char buffer[64], *buffer_ptr = buffer; - char *const buffer_end = std::end(buffer); - while (first != last && store_and_advance(buffer_ptr, buffer_end, - get_hashable_data(*first))) - ++first; - if (first == last) - return hash_short(buffer, buffer_ptr - buffer, seed); - assert(buffer_ptr == buffer_end); - - hash_state state = state.create(buffer, seed); - size_t length = 64; - while (first != last) { - // Fill up the buffer. We don't clear it, which re-mixes the last round - // when only a partial 64-byte chunk is left. - buffer_ptr = buffer; - while (first != last && store_and_advance(buffer_ptr, buffer_end, - get_hashable_data(*first))) - ++first; - - // Rotate the buffer if we did a partial fill in order to simulate doing - // a mix of the last 64-bytes. That is how the algorithm works when we - // have a contiguous byte sequence, and we want to emulate that here. - std::rotate(buffer, buffer_ptr, buffer_end); - - // Mix this chunk into the current state. - state.mix(buffer); - length += buffer_ptr - buffer; - }; - - return state.finalize(length); -} - -/// \brief Implement the combining of integral values into a hash_code. -/// -/// This overload is selected when the value type of the iterator is integral -/// and when the input iterator is actually a pointer. Rather than computing -/// a hash_code for each object and then combining them, this (as an -/// optimization) directly combines the integers. Also, because the integers -/// are stored in contiguous memory, this routine avoids copying each value -/// and directly reads from the underlying memory. -template -typename std::enable_if::value, hash_code>::type -hash_combine_range_impl(ValueT *first, ValueT *last) { - const size_t seed = get_execution_seed(); - const char *s_begin = reinterpret_cast(first); - const char *s_end = reinterpret_cast(last); - const size_t length = std::distance(s_begin, s_end); - if (length <= 64) - return hash_short(s_begin, length, seed); - - const char *s_aligned_end = s_begin + (length & ~63); - hash_state state = state.create(s_begin, seed); - s_begin += 64; - while (s_begin != s_aligned_end) { - state.mix(s_begin); - s_begin += 64; - } - if (length & 63) - state.mix(s_end - 64); - - return state.finalize(length); -} - -} // namespace detail -} // namespace hashing - - -/// \brief Compute a hash_code for a sequence of values. -/// -/// This hashes a sequence of values. It produces the same hash_code as -/// 'hash_combine(a, b, c, ...)', but can run over arbitrary sized sequences -/// and is significantly faster given pointers and types which can be hashed as -/// a sequence of bytes. -template -hash_code hash_combine_range(InputIteratorT first, InputIteratorT last) { - return ::llvm::hashing::detail::hash_combine_range_impl(first, last); -} - - -// Implementation details for hash_combine. -namespace hashing { -namespace detail { - -/// \brief Helper class to manage the recursive combining of hash_combine -/// arguments. -/// -/// This class exists to manage the state and various calls involved in the -/// recursive combining of arguments used in hash_combine. It is particularly -/// useful at minimizing the code in the recursive calls to ease the pain -/// caused by a lack of variadic functions. -struct hash_combine_recursive_helper { - char buffer[64]; - hash_state state; - const size_t seed; - -public: - /// \brief Construct a recursive hash combining helper. - /// - /// This sets up the state for a recursive hash combine, including getting - /// the seed and buffer setup. - hash_combine_recursive_helper() - : seed(get_execution_seed()) {} - - /// \brief Combine one chunk of data into the current in-flight hash. - /// - /// This merges one chunk of data into the hash. First it tries to buffer - /// the data. If the buffer is full, it hashes the buffer into its - /// hash_state, empties it, and then merges the new chunk in. This also - /// handles cases where the data straddles the end of the buffer. - template - char *combine_data(size_t &length, char *buffer_ptr, char *buffer_end, T data) { - if (!store_and_advance(buffer_ptr, buffer_end, data)) { - // Check for skew which prevents the buffer from being packed, and do - // a partial store into the buffer to fill it. This is only a concern - // with the variadic combine because that formation can have varying - // argument types. - size_t partial_store_size = buffer_end - buffer_ptr; - memcpy(buffer_ptr, &data, partial_store_size); - - // If the store fails, our buffer is full and ready to hash. We have to - // either initialize the hash state (on the first full buffer) or mix - // this buffer into the existing hash state. Length tracks the *hashed* - // length, not the buffered length. - if (length == 0) { - state = state.create(buffer, seed); - length = 64; - } else { - // Mix this chunk into the current state and bump length up by 64. - state.mix(buffer); - length += 64; - } - // Reset the buffer_ptr to the head of the buffer for the next chunk of - // data. - buffer_ptr = buffer; - - // Try again to store into the buffer -- this cannot fail as we only - // store types smaller than the buffer. - if (!store_and_advance(buffer_ptr, buffer_end, data, - partial_store_size)) - abort(); - } - return buffer_ptr; - } - - /// \brief Recursive, variadic combining method. - /// - /// This function recurses through each argument, combining that argument - /// into a single hash. - template - hash_code combine(size_t length, char *buffer_ptr, char *buffer_end, - const T &arg, const Ts &...args) { - buffer_ptr = combine_data(length, buffer_ptr, buffer_end, get_hashable_data(arg)); - - // Recurse to the next argument. - return combine(length, buffer_ptr, buffer_end, args...); - } - - /// \brief Base case for recursive, variadic combining. - /// - /// The base case when combining arguments recursively is reached when all - /// arguments have been handled. It flushes the remaining buffer and - /// constructs a hash_code. - hash_code combine(size_t length, char *buffer_ptr, char *buffer_end) { - // Check whether the entire set of values fit in the buffer. If so, we'll - // use the optimized short hashing routine and skip state entirely. - if (length == 0) - return hash_short(buffer, buffer_ptr - buffer, seed); - - // Mix the final buffer, rotating it if we did a partial fill in order to - // simulate doing a mix of the last 64-bytes. That is how the algorithm - // works when we have a contiguous byte sequence, and we want to emulate - // that here. - std::rotate(buffer, buffer_ptr, buffer_end); - - // Mix this chunk into the current state. - state.mix(buffer); - length += buffer_ptr - buffer; - - return state.finalize(length); - } -}; - -} // namespace detail -} // namespace hashing - -/// \brief Combine values into a single hash_code. -/// -/// This routine accepts a varying number of arguments of any type. It will -/// attempt to combine them into a single hash_code. For user-defined types it -/// attempts to call a \see hash_value overload (via ADL) for the type. For -/// integer and pointer types it directly combines their data into the -/// resulting hash_code. -/// -/// The result is suitable for returning from a user's hash_value -/// *implementation* for their user-defined type. Consumers of a type should -/// *not* call this routine, they should instead call 'hash_value'. -template hash_code hash_combine(const Ts &...args) { - // Recursively hash each argument using a helper class. - ::llvm::hashing::detail::hash_combine_recursive_helper helper; - return helper.combine(0, helper.buffer, helper.buffer + 64, args...); -} - -// Implementation details for implementations of hash_value overloads provided -// here. -namespace hashing { -namespace detail { - -/// \brief Helper to hash the value of a single integer. -/// -/// Overloads for smaller integer types are not provided to ensure consistent -/// behavior in the presence of integral promotions. Essentially, -/// "hash_value('4')" and "hash_value('0' + 4)" should be the same. -inline hash_code hash_integer_value(uint64_t value) { - // Similar to hash_4to8_bytes but using a seed instead of length. - const uint64_t seed = get_execution_seed(); - const char *s = reinterpret_cast(&value); - const uint64_t a = fetch32(s); - return hash_16_bytes(seed + (a << 3), fetch32(s + 4)); -} - -} // namespace detail -} // namespace hashing - -// Declared and documented above, but defined here so that any of the hashing -// infrastructure is available. -template -typename std::enable_if::value, hash_code>::type -hash_value(T value) { - return ::llvm::hashing::detail::hash_integer_value( - static_cast(value)); -} - -// Declared and documented above, but defined here so that any of the hashing -// infrastructure is available. -template hash_code hash_value(const T *ptr) { - return ::llvm::hashing::detail::hash_integer_value( - reinterpret_cast(ptr)); -} - -// Declared and documented above, but defined here so that any of the hashing -// infrastructure is available. -template -hash_code hash_value(const std::pair &arg) { - return hash_combine(arg.first, arg.second); -} - -// Declared and documented above, but defined here so that any of the hashing -// infrastructure is available. -template -hash_code hash_value(const std::basic_string &arg) { - return hash_combine_range(arg.begin(), arg.end()); -} - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/ImmutableList.h b/llvm/include/llvm/ADT/ImmutableList.h deleted file mode 100644 index a1d26bd9..00000000 --- a/llvm/include/llvm/ADT/ImmutableList.h +++ /dev/null @@ -1,229 +0,0 @@ -//==--- ImmutableList.h - Immutable (functional) list interface --*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the ImmutableList class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_IMMUTABLELIST_H -#define LLVM_ADT_IMMUTABLELIST_H - -#include "llvm/ADT/FoldingSet.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -template class ImmutableListFactory; - -template -class ImmutableListImpl : public FoldingSetNode { - T Head; - const ImmutableListImpl* Tail; - - ImmutableListImpl(const T& head, const ImmutableListImpl* tail = nullptr) - : Head(head), Tail(tail) {} - - friend class ImmutableListFactory; - - void operator=(const ImmutableListImpl&) = delete; - ImmutableListImpl(const ImmutableListImpl&) = delete; - -public: - const T& getHead() const { return Head; } - const ImmutableListImpl* getTail() const { return Tail; } - - static inline void Profile(FoldingSetNodeID& ID, const T& H, - const ImmutableListImpl* L){ - ID.AddPointer(L); - ID.Add(H); - } - - void Profile(FoldingSetNodeID& ID) { - Profile(ID, Head, Tail); - } -}; - -/// ImmutableList - This class represents an immutable (functional) list. -/// It is implemented as a smart pointer (wraps ImmutableListImpl), so it -/// it is intended to always be copied by value as if it were a pointer. -/// This interface matches ImmutableSet and ImmutableMap. ImmutableList -/// objects should almost never be created directly, and instead should -/// be created by ImmutableListFactory objects that manage the lifetime -/// of a group of lists. When the factory object is reclaimed, all lists -/// created by that factory are released as well. -template -class ImmutableList { -public: - typedef T value_type; - typedef ImmutableListFactory Factory; - -private: - const ImmutableListImpl* X; - -public: - // This constructor should normally only be called by ImmutableListFactory. - // There may be cases, however, when one needs to extract the internal pointer - // and reconstruct a list object from that pointer. - ImmutableList(const ImmutableListImpl* x = nullptr) : X(x) {} - - const ImmutableListImpl* getInternalPointer() const { - return X; - } - - class iterator { - const ImmutableListImpl* L; - public: - iterator() : L(nullptr) {} - iterator(ImmutableList l) : L(l.getInternalPointer()) {} - - iterator& operator++() { L = L->getTail(); return *this; } - bool operator==(const iterator& I) const { return L == I.L; } - bool operator!=(const iterator& I) const { return L != I.L; } - const value_type& operator*() const { return L->getHead(); } - ImmutableList getList() const { return L; } - }; - - /// begin - Returns an iterator referring to the head of the list, or - /// an iterator denoting the end of the list if the list is empty. - iterator begin() const { return iterator(X); } - - /// end - Returns an iterator denoting the end of the list. This iterator - /// does not refer to a valid list element. - iterator end() const { return iterator(); } - - /// isEmpty - Returns true if the list is empty. - bool isEmpty() const { return !X; } - - bool contains(const T& V) const { - for (iterator I = begin(), E = end(); I != E; ++I) { - if (*I == V) - return true; - } - return false; - } - - /// isEqual - Returns true if two lists are equal. Because all lists created - /// from the same ImmutableListFactory are uniqued, this has O(1) complexity - /// because it the contents of the list do not need to be compared. Note - /// that you should only compare two lists created from the same - /// ImmutableListFactory. - bool isEqual(const ImmutableList& L) const { return X == L.X; } - - bool operator==(const ImmutableList& L) const { return isEqual(L); } - - /// getHead - Returns the head of the list. - const T& getHead() { - assert (!isEmpty() && "Cannot get the head of an empty list."); - return X->getHead(); - } - - /// getTail - Returns the tail of the list, which is another (possibly empty) - /// ImmutableList. - ImmutableList getTail() { - return X ? X->getTail() : nullptr; - } - - void Profile(FoldingSetNodeID& ID) const { - ID.AddPointer(X); - } -}; - -template -class ImmutableListFactory { - typedef ImmutableListImpl ListTy; - typedef FoldingSet CacheTy; - - CacheTy Cache; - uintptr_t Allocator; - - bool ownsAllocator() const { - return Allocator & 0x1 ? false : true; - } - - BumpPtrAllocator& getAllocator() const { - return *reinterpret_cast(Allocator & ~0x1); - } - -public: - ImmutableListFactory() - : Allocator(reinterpret_cast(new BumpPtrAllocator())) {} - - ImmutableListFactory(BumpPtrAllocator& Alloc) - : Allocator(reinterpret_cast(&Alloc) | 0x1) {} - - ~ImmutableListFactory() { - if (ownsAllocator()) delete &getAllocator(); - } - - ImmutableList concat(const T& Head, ImmutableList Tail) { - // Profile the new list to see if it already exists in our cache. - FoldingSetNodeID ID; - void* InsertPos; - - const ListTy* TailImpl = Tail.getInternalPointer(); - ListTy::Profile(ID, Head, TailImpl); - ListTy* L = Cache.FindNodeOrInsertPos(ID, InsertPos); - - if (!L) { - // The list does not exist in our cache. Create it. - BumpPtrAllocator& A = getAllocator(); - L = (ListTy*) A.Allocate(); - new (L) ListTy(Head, TailImpl); - - // Insert the new list into the cache. - Cache.InsertNode(L, InsertPos); - } - - return L; - } - - ImmutableList add(const T& D, ImmutableList L) { - return concat(D, L); - } - - ImmutableList getEmptyList() const { - return ImmutableList(nullptr); - } - - ImmutableList create(const T& X) { - return Concat(X, getEmptyList()); - } -}; - -//===----------------------------------------------------------------------===// -// Partially-specialized Traits. -//===----------------------------------------------------------------------===// - -template struct DenseMapInfo; -template struct DenseMapInfo > { - static inline ImmutableList getEmptyKey() { - return reinterpret_cast*>(-1); - } - static inline ImmutableList getTombstoneKey() { - return reinterpret_cast*>(-2); - } - static unsigned getHashValue(ImmutableList X) { - uintptr_t PtrVal = reinterpret_cast(X.getInternalPointer()); - return (unsigned((uintptr_t)PtrVal) >> 4) ^ - (unsigned((uintptr_t)PtrVal) >> 9); - } - static bool isEqual(ImmutableList X1, ImmutableList X2) { - return X1 == X2; - } -}; - -template struct isPodLike; -template -struct isPodLike > { static const bool value = true; }; - -} // end llvm namespace - -#endif // LLVM_ADT_IMMUTABLELIST_H diff --git a/llvm/include/llvm/ADT/ImmutableMap.h b/llvm/include/llvm/ADT/ImmutableMap.h deleted file mode 100644 index 7480cd73..00000000 --- a/llvm/include/llvm/ADT/ImmutableMap.h +++ /dev/null @@ -1,408 +0,0 @@ -//===--- ImmutableMap.h - Immutable (functional) map interface --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the ImmutableMap class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_IMMUTABLEMAP_H -#define LLVM_ADT_IMMUTABLEMAP_H - -#include "llvm/ADT/ImmutableSet.h" - -namespace llvm { - -/// ImutKeyValueInfo -Traits class used by ImmutableMap. While both the first -/// and second elements in a pair are used to generate profile information, -/// only the first element (the key) is used by isEqual and isLess. -template -struct ImutKeyValueInfo { - typedef const std::pair value_type; - typedef const value_type& value_type_ref; - typedef const T key_type; - typedef const T& key_type_ref; - typedef const S data_type; - typedef const S& data_type_ref; - - static inline key_type_ref KeyOfValue(value_type_ref V) { - return V.first; - } - - static inline data_type_ref DataOfValue(value_type_ref V) { - return V.second; - } - - static inline bool isEqual(key_type_ref L, key_type_ref R) { - return ImutContainerInfo::isEqual(L,R); - } - static inline bool isLess(key_type_ref L, key_type_ref R) { - return ImutContainerInfo::isLess(L,R); - } - - static inline bool isDataEqual(data_type_ref L, data_type_ref R) { - return ImutContainerInfo::isEqual(L,R); - } - - static inline void Profile(FoldingSetNodeID& ID, value_type_ref V) { - ImutContainerInfo::Profile(ID, V.first); - ImutContainerInfo::Profile(ID, V.second); - } -}; - -template > -class ImmutableMap { -public: - typedef typename ValInfo::value_type value_type; - typedef typename ValInfo::value_type_ref value_type_ref; - typedef typename ValInfo::key_type key_type; - typedef typename ValInfo::key_type_ref key_type_ref; - typedef typename ValInfo::data_type data_type; - typedef typename ValInfo::data_type_ref data_type_ref; - typedef ImutAVLTree TreeTy; - -protected: - TreeTy* Root; - -public: - /// Constructs a map from a pointer to a tree root. In general one - /// should use a Factory object to create maps instead of directly - /// invoking the constructor, but there are cases where make this - /// constructor public is useful. - explicit ImmutableMap(const TreeTy* R) : Root(const_cast(R)) { - if (Root) { Root->retain(); } - } - - ImmutableMap(const ImmutableMap &X) : Root(X.Root) { - if (Root) { Root->retain(); } - } - - ImmutableMap &operator=(const ImmutableMap &X) { - if (Root != X.Root) { - if (X.Root) { X.Root->retain(); } - if (Root) { Root->release(); } - Root = X.Root; - } - return *this; - } - - ~ImmutableMap() { - if (Root) { Root->release(); } - } - - class Factory { - typename TreeTy::Factory F; - const bool Canonicalize; - - public: - Factory(bool canonicalize = true) : Canonicalize(canonicalize) {} - - Factory(BumpPtrAllocator &Alloc, bool canonicalize = true) - : F(Alloc), Canonicalize(canonicalize) {} - - ImmutableMap getEmptyMap() { return ImmutableMap(F.getEmptyTree()); } - - ImmutableMap add(ImmutableMap Old, key_type_ref K, data_type_ref D) { - TreeTy *T = F.add(Old.Root, std::pair(K,D)); - return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T); - } - - ImmutableMap remove(ImmutableMap Old, key_type_ref K) { - TreeTy *T = F.remove(Old.Root,K); - return ImmutableMap(Canonicalize ? F.getCanonicalTree(T): T); - } - - typename TreeTy::Factory *getTreeFactory() const { - return const_cast(&F); - } - - private: - Factory(const Factory& RHS) = delete; - void operator=(const Factory& RHS) = delete; - }; - - bool contains(key_type_ref K) const { - return Root ? Root->contains(K) : false; - } - - bool operator==(const ImmutableMap &RHS) const { - return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; - } - - bool operator!=(const ImmutableMap &RHS) const { - return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; - } - - TreeTy *getRoot() const { - if (Root) { Root->retain(); } - return Root; - } - - TreeTy *getRootWithoutRetain() const { return Root; } - - void manualRetain() { - if (Root) Root->retain(); - } - - void manualRelease() { - if (Root) Root->release(); - } - - bool isEmpty() const { return !Root; } - - //===--------------------------------------------------===// - // Foreach - A limited form of map iteration. - //===--------------------------------------------------===// - -private: - template - struct CBWrapper { - Callback C; - void operator()(value_type_ref V) { C(V.first,V.second); } - }; - - template - struct CBWrapperRef { - Callback &C; - CBWrapperRef(Callback& c) : C(c) {} - - void operator()(value_type_ref V) { C(V.first,V.second); } - }; - -public: - template - void foreach(Callback& C) { - if (Root) { - CBWrapperRef CB(C); - Root->foreach(CB); - } - } - - template - void foreach() { - if (Root) { - CBWrapper CB; - Root->foreach(CB); - } - } - - //===--------------------------------------------------===// - // For testing. - //===--------------------------------------------------===// - - void verify() const { if (Root) Root->verify(); } - - //===--------------------------------------------------===// - // Iterators. - //===--------------------------------------------------===// - - class iterator : public ImutAVLValueIterator { - iterator() = default; - explicit iterator(TreeTy *Tree) : iterator::ImutAVLValueIterator(Tree) {} - friend class ImmutableMap; - - public: - key_type_ref getKey() const { return (*this)->first; } - data_type_ref getData() const { return (*this)->second; } - }; - - iterator begin() const { return iterator(Root); } - iterator end() const { return iterator(); } - - data_type* lookup(key_type_ref K) const { - if (Root) { - TreeTy* T = Root->find(K); - if (T) return &T->getValue().second; - } - - return nullptr; - } - - /// getMaxElement - Returns the pair in the ImmutableMap for - /// which key is the highest in the ordering of keys in the map. This - /// method returns NULL if the map is empty. - value_type* getMaxElement() const { - return Root ? &(Root->getMaxElement()->getValue()) : nullptr; - } - - //===--------------------------------------------------===// - // Utility methods. - //===--------------------------------------------------===// - - unsigned getHeight() const { return Root ? Root->getHeight() : 0; } - - static inline void Profile(FoldingSetNodeID& ID, const ImmutableMap& M) { - ID.AddPointer(M.Root); - } - - inline void Profile(FoldingSetNodeID& ID) const { - return Profile(ID,*this); - } -}; - -// NOTE: This will possibly become the new implementation of ImmutableMap some day. -template > -class ImmutableMapRef { -public: - typedef typename ValInfo::value_type value_type; - typedef typename ValInfo::value_type_ref value_type_ref; - typedef typename ValInfo::key_type key_type; - typedef typename ValInfo::key_type_ref key_type_ref; - typedef typename ValInfo::data_type data_type; - typedef typename ValInfo::data_type_ref data_type_ref; - typedef ImutAVLTree TreeTy; - typedef typename TreeTy::Factory FactoryTy; - -protected: - TreeTy *Root; - FactoryTy *Factory; - -public: - /// Constructs a map from a pointer to a tree root. In general one - /// should use a Factory object to create maps instead of directly - /// invoking the constructor, but there are cases where make this - /// constructor public is useful. - explicit ImmutableMapRef(const TreeTy *R, FactoryTy *F) - : Root(const_cast(R)), Factory(F) { - if (Root) { - Root->retain(); - } - } - - explicit ImmutableMapRef(const ImmutableMap &X, - typename ImmutableMap::Factory &F) - : Root(X.getRootWithoutRetain()), - Factory(F.getTreeFactory()) { - if (Root) { Root->retain(); } - } - - ImmutableMapRef(const ImmutableMapRef &X) : Root(X.Root), Factory(X.Factory) { - if (Root) { - Root->retain(); - } - } - - ImmutableMapRef &operator=(const ImmutableMapRef &X) { - if (Root != X.Root) { - if (X.Root) - X.Root->retain(); - - if (Root) - Root->release(); - - Root = X.Root; - Factory = X.Factory; - } - return *this; - } - - ~ImmutableMapRef() { - if (Root) - Root->release(); - } - - static inline ImmutableMapRef getEmptyMap(FactoryTy *F) { - return ImmutableMapRef(0, F); - } - - void manualRetain() { - if (Root) Root->retain(); - } - - void manualRelease() { - if (Root) Root->release(); - } - - ImmutableMapRef add(key_type_ref K, data_type_ref D) const { - TreeTy *NewT = Factory->add(Root, std::pair(K, D)); - return ImmutableMapRef(NewT, Factory); - } - - ImmutableMapRef remove(key_type_ref K) const { - TreeTy *NewT = Factory->remove(Root, K); - return ImmutableMapRef(NewT, Factory); - } - - bool contains(key_type_ref K) const { - return Root ? Root->contains(K) : false; - } - - ImmutableMap asImmutableMap() const { - return ImmutableMap(Factory->getCanonicalTree(Root)); - } - - bool operator==(const ImmutableMapRef &RHS) const { - return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; - } - - bool operator!=(const ImmutableMapRef &RHS) const { - return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; - } - - bool isEmpty() const { return !Root; } - - //===--------------------------------------------------===// - // For testing. - //===--------------------------------------------------===// - - void verify() const { - if (Root) - Root->verify(); - } - - //===--------------------------------------------------===// - // Iterators. - //===--------------------------------------------------===// - - class iterator : public ImutAVLValueIterator { - iterator() = default; - explicit iterator(TreeTy *Tree) : iterator::ImutAVLValueIterator(Tree) {} - friend class ImmutableMapRef; - - public: - key_type_ref getKey() const { return (*this)->first; } - data_type_ref getData() const { return (*this)->second; } - }; - - iterator begin() const { return iterator(Root); } - iterator end() const { return iterator(); } - - data_type *lookup(key_type_ref K) const { - if (Root) { - TreeTy* T = Root->find(K); - if (T) return &T->getValue().second; - } - - return nullptr; - } - - /// getMaxElement - Returns the pair in the ImmutableMap for - /// which key is the highest in the ordering of keys in the map. This - /// method returns NULL if the map is empty. - value_type* getMaxElement() const { - return Root ? &(Root->getMaxElement()->getValue()) : 0; - } - - //===--------------------------------------------------===// - // Utility methods. - //===--------------------------------------------------===// - - unsigned getHeight() const { return Root ? Root->getHeight() : 0; } - - static inline void Profile(FoldingSetNodeID &ID, const ImmutableMapRef &M) { - ID.AddPointer(M.Root); - } - - inline void Profile(FoldingSetNodeID &ID) const { return Profile(ID, *this); } -}; - -} // end namespace llvm - -#endif // LLVM_ADT_IMMUTABLEMAP_H diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h deleted file mode 100644 index 87026f01..00000000 --- a/llvm/include/llvm/ADT/ImmutableSet.h +++ /dev/null @@ -1,1218 +0,0 @@ -//===--- ImmutableSet.h - Immutable (functional) set interface --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the ImutAVLTree and ImmutableSet classes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_IMMUTABLESET_H -#define LLVM_ADT_IMMUTABLESET_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/FoldingSet.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" -#include -#include -#include - -namespace llvm { - -//===----------------------------------------------------------------------===// -// Immutable AVL-Tree Definition. -//===----------------------------------------------------------------------===// - -template class ImutAVLFactory; -template class ImutIntervalAVLFactory; -template class ImutAVLTreeInOrderIterator; -template class ImutAVLTreeGenericIterator; - -template -class ImutAVLTree { -public: - typedef typename ImutInfo::key_type_ref key_type_ref; - typedef typename ImutInfo::value_type value_type; - typedef typename ImutInfo::value_type_ref value_type_ref; - - typedef ImutAVLFactory Factory; - friend class ImutAVLFactory; - friend class ImutIntervalAVLFactory; - - friend class ImutAVLTreeGenericIterator; - - typedef ImutAVLTreeInOrderIterator iterator; - - //===----------------------------------------------------===// - // Public Interface. - //===----------------------------------------------------===// - - /// Return a pointer to the left subtree. This value - /// is NULL if there is no left subtree. - ImutAVLTree *getLeft() const { return left; } - - /// Return a pointer to the right subtree. This value is - /// NULL if there is no right subtree. - ImutAVLTree *getRight() const { return right; } - - /// getHeight - Returns the height of the tree. A tree with no subtrees - /// has a height of 1. - unsigned getHeight() const { return height; } - - /// getValue - Returns the data value associated with the tree node. - const value_type& getValue() const { return value; } - - /// find - Finds the subtree associated with the specified key value. - /// This method returns NULL if no matching subtree is found. - ImutAVLTree* find(key_type_ref K) { - ImutAVLTree *T = this; - while (T) { - key_type_ref CurrentKey = ImutInfo::KeyOfValue(T->getValue()); - if (ImutInfo::isEqual(K,CurrentKey)) - return T; - else if (ImutInfo::isLess(K,CurrentKey)) - T = T->getLeft(); - else - T = T->getRight(); - } - return nullptr; - } - - /// getMaxElement - Find the subtree associated with the highest ranged - /// key value. - ImutAVLTree* getMaxElement() { - ImutAVLTree *T = this; - ImutAVLTree *Right = T->getRight(); - while (Right) { T = Right; Right = T->getRight(); } - return T; - } - - /// size - Returns the number of nodes in the tree, which includes - /// both leaves and non-leaf nodes. - unsigned size() const { - unsigned n = 1; - if (const ImutAVLTree* L = getLeft()) - n += L->size(); - if (const ImutAVLTree* R = getRight()) - n += R->size(); - return n; - } - - /// begin - Returns an iterator that iterates over the nodes of the tree - /// in an inorder traversal. The returned iterator thus refers to the - /// the tree node with the minimum data element. - iterator begin() const { return iterator(this); } - - /// end - Returns an iterator for the tree that denotes the end of an - /// inorder traversal. - iterator end() const { return iterator(); } - - bool isElementEqual(value_type_ref V) const { - // Compare the keys. - if (!ImutInfo::isEqual(ImutInfo::KeyOfValue(getValue()), - ImutInfo::KeyOfValue(V))) - return false; - - // Also compare the data values. - if (!ImutInfo::isDataEqual(ImutInfo::DataOfValue(getValue()), - ImutInfo::DataOfValue(V))) - return false; - - return true; - } - - bool isElementEqual(const ImutAVLTree* RHS) const { - return isElementEqual(RHS->getValue()); - } - - /// isEqual - Compares two trees for structural equality and returns true - /// if they are equal. This worst case performance of this operation is - // linear in the sizes of the trees. - bool isEqual(const ImutAVLTree& RHS) const { - if (&RHS == this) - return true; - - iterator LItr = begin(), LEnd = end(); - iterator RItr = RHS.begin(), REnd = RHS.end(); - - while (LItr != LEnd && RItr != REnd) { - if (&*LItr == &*RItr) { - LItr.skipSubTree(); - RItr.skipSubTree(); - continue; - } - - if (!LItr->isElementEqual(&*RItr)) - return false; - - ++LItr; - ++RItr; - } - - return LItr == LEnd && RItr == REnd; - } - - /// isNotEqual - Compares two trees for structural inequality. Performance - /// is the same is isEqual. - bool isNotEqual(const ImutAVLTree& RHS) const { return !isEqual(RHS); } - - /// contains - Returns true if this tree contains a subtree (node) that - /// has an data element that matches the specified key. Complexity - /// is logarithmic in the size of the tree. - bool contains(key_type_ref K) { return (bool) find(K); } - - /// foreach - A member template the accepts invokes operator() on a functor - /// object (specifed by Callback) for every node/subtree in the tree. - /// Nodes are visited using an inorder traversal. - template - void foreach(Callback& C) { - if (ImutAVLTree* L = getLeft()) - L->foreach(C); - - C(value); - - if (ImutAVLTree* R = getRight()) - R->foreach(C); - } - - /// validateTree - A utility method that checks that the balancing and - /// ordering invariants of the tree are satisifed. It is a recursive - /// method that returns the height of the tree, which is then consumed - /// by the enclosing validateTree call. External callers should ignore the - /// return value. An invalid tree will cause an assertion to fire in - /// a debug build. - unsigned validateTree() const { - unsigned HL = getLeft() ? getLeft()->validateTree() : 0; - unsigned HR = getRight() ? getRight()->validateTree() : 0; - (void) HL; - (void) HR; - - assert(getHeight() == ( HL > HR ? HL : HR ) + 1 - && "Height calculation wrong"); - - assert((HL > HR ? HL-HR : HR-HL) <= 2 - && "Balancing invariant violated"); - - assert((!getLeft() || - ImutInfo::isLess(ImutInfo::KeyOfValue(getLeft()->getValue()), - ImutInfo::KeyOfValue(getValue()))) && - "Value in left child is not less that current value"); - - - assert(!(getRight() || - ImutInfo::isLess(ImutInfo::KeyOfValue(getValue()), - ImutInfo::KeyOfValue(getRight()->getValue()))) && - "Current value is not less that value of right child"); - - return getHeight(); - } - - //===----------------------------------------------------===// - // Internal values. - //===----------------------------------------------------===// - -private: - Factory *factory; - ImutAVLTree *left; - ImutAVLTree *right; - ImutAVLTree *prev; - ImutAVLTree *next; - - unsigned height : 28; - unsigned IsMutable : 1; - unsigned IsDigestCached : 1; - unsigned IsCanonicalized : 1; - - value_type value; - uint32_t digest; - uint32_t refCount; - - //===----------------------------------------------------===// - // Internal methods (node manipulation; used by Factory). - //===----------------------------------------------------===// - -private: - /// ImutAVLTree - Internal constructor that is only called by - /// ImutAVLFactory. - ImutAVLTree(Factory *f, ImutAVLTree* l, ImutAVLTree* r, value_type_ref v, - unsigned height) - : factory(f), left(l), right(r), prev(nullptr), next(nullptr), - height(height), IsMutable(true), IsDigestCached(false), - IsCanonicalized(0), value(v), digest(0), refCount(0) - { - if (left) left->retain(); - if (right) right->retain(); - } - - /// isMutable - Returns true if the left and right subtree references - /// (as well as height) can be changed. If this method returns false, - /// the tree is truly immutable. Trees returned from an ImutAVLFactory - /// object should always have this method return true. Further, if this - /// method returns false for an instance of ImutAVLTree, all subtrees - /// will also have this method return false. The converse is not true. - bool isMutable() const { return IsMutable; } - - /// hasCachedDigest - Returns true if the digest for this tree is cached. - /// This can only be true if the tree is immutable. - bool hasCachedDigest() const { return IsDigestCached; } - - //===----------------------------------------------------===// - // Mutating operations. A tree root can be manipulated as - // long as its reference has not "escaped" from internal - // methods of a factory object (see below). When a tree - // pointer is externally viewable by client code, the - // internal "mutable bit" is cleared to mark the tree - // immutable. Note that a tree that still has its mutable - // bit set may have children (subtrees) that are themselves - // immutable. - //===----------------------------------------------------===// - - /// markImmutable - Clears the mutable flag for a tree. After this happens, - /// it is an error to call setLeft(), setRight(), and setHeight(). - void markImmutable() { - assert(isMutable() && "Mutable flag already removed."); - IsMutable = false; - } - - /// markedCachedDigest - Clears the NoCachedDigest flag for a tree. - void markedCachedDigest() { - assert(!hasCachedDigest() && "NoCachedDigest flag already removed."); - IsDigestCached = true; - } - - /// setHeight - Changes the height of the tree. Used internally by - /// ImutAVLFactory. - void setHeight(unsigned h) { - assert(isMutable() && "Only a mutable tree can have its height changed."); - height = h; - } - - static uint32_t computeDigest(ImutAVLTree *L, ImutAVLTree *R, - value_type_ref V) { - uint32_t digest = 0; - - if (L) - digest += L->computeDigest(); - - // Compute digest of stored data. - FoldingSetNodeID ID; - ImutInfo::Profile(ID,V); - digest += ID.ComputeHash(); - - if (R) - digest += R->computeDigest(); - - return digest; - } - - uint32_t computeDigest() { - // Check the lowest bit to determine if digest has actually been - // pre-computed. - if (hasCachedDigest()) - return digest; - - uint32_t X = computeDigest(getLeft(), getRight(), getValue()); - digest = X; - markedCachedDigest(); - return X; - } - - //===----------------------------------------------------===// - // Reference count operations. - //===----------------------------------------------------===// - -public: - void retain() { ++refCount; } - void release() { - assert(refCount > 0); - if (--refCount == 0) - destroy(); - } - void destroy() { - if (left) - left->release(); - if (right) - right->release(); - if (IsCanonicalized) { - if (next) - next->prev = prev; - - if (prev) - prev->next = next; - else - factory->Cache[factory->maskCacheIndex(computeDigest())] = next; - } - - // We need to clear the mutability bit in case we are - // destroying the node as part of a sweep in ImutAVLFactory::recoverNodes(). - IsMutable = false; - factory->freeNodes.push_back(this); - } -}; - -//===----------------------------------------------------------------------===// -// Immutable AVL-Tree Factory class. -//===----------------------------------------------------------------------===// - -template -class ImutAVLFactory { - friend class ImutAVLTree; - typedef ImutAVLTree TreeTy; - typedef typename TreeTy::value_type_ref value_type_ref; - typedef typename TreeTy::key_type_ref key_type_ref; - - typedef DenseMap CacheTy; - - CacheTy Cache; - uintptr_t Allocator; - std::vector createdNodes; - std::vector freeNodes; - - bool ownsAllocator() const { - return Allocator & 0x1 ? false : true; - } - - BumpPtrAllocator& getAllocator() const { - return *reinterpret_cast(Allocator & ~0x1); - } - - //===--------------------------------------------------===// - // Public interface. - //===--------------------------------------------------===// - -public: - ImutAVLFactory() - : Allocator(reinterpret_cast(new BumpPtrAllocator())) {} - - ImutAVLFactory(BumpPtrAllocator& Alloc) - : Allocator(reinterpret_cast(&Alloc) | 0x1) {} - - ~ImutAVLFactory() { - if (ownsAllocator()) delete &getAllocator(); - } - - TreeTy* add(TreeTy* T, value_type_ref V) { - T = add_internal(V,T); - markImmutable(T); - recoverNodes(); - return T; - } - - TreeTy* remove(TreeTy* T, key_type_ref V) { - T = remove_internal(V,T); - markImmutable(T); - recoverNodes(); - return T; - } - - TreeTy* getEmptyTree() const { return nullptr; } - -protected: - - //===--------------------------------------------------===// - // A bunch of quick helper functions used for reasoning - // about the properties of trees and their children. - // These have succinct names so that the balancing code - // is as terse (and readable) as possible. - //===--------------------------------------------------===// - - bool isEmpty(TreeTy* T) const { return !T; } - unsigned getHeight(TreeTy* T) const { return T ? T->getHeight() : 0; } - TreeTy* getLeft(TreeTy* T) const { return T->getLeft(); } - TreeTy* getRight(TreeTy* T) const { return T->getRight(); } - value_type_ref getValue(TreeTy* T) const { return T->value; } - - // Make sure the index is not the Tombstone or Entry key of the DenseMap. - static unsigned maskCacheIndex(unsigned I) { return (I & ~0x02); } - - unsigned incrementHeight(TreeTy* L, TreeTy* R) const { - unsigned hl = getHeight(L); - unsigned hr = getHeight(R); - return (hl > hr ? hl : hr) + 1; - } - - static bool compareTreeWithSection(TreeTy* T, - typename TreeTy::iterator& TI, - typename TreeTy::iterator& TE) { - typename TreeTy::iterator I = T->begin(), E = T->end(); - for ( ; I!=E ; ++I, ++TI) { - if (TI == TE || !I->isElementEqual(&*TI)) - return false; - } - return true; - } - - //===--------------------------------------------------===// - // "createNode" is used to generate new tree roots that link - // to other trees. The functon may also simply move links - // in an existing root if that root is still marked mutable. - // This is necessary because otherwise our balancing code - // would leak memory as it would create nodes that are - // then discarded later before the finished tree is - // returned to the caller. - //===--------------------------------------------------===// - - TreeTy* createNode(TreeTy* L, value_type_ref V, TreeTy* R) { - BumpPtrAllocator& A = getAllocator(); - TreeTy* T; - if (!freeNodes.empty()) { - T = freeNodes.back(); - freeNodes.pop_back(); - assert(T != L); - assert(T != R); - } else { - T = (TreeTy*) A.Allocate(); - } - new (T) TreeTy(this, L, R, V, incrementHeight(L,R)); - createdNodes.push_back(T); - return T; - } - - TreeTy* createNode(TreeTy* newLeft, TreeTy* oldTree, TreeTy* newRight) { - return createNode(newLeft, getValue(oldTree), newRight); - } - - void recoverNodes() { - for (unsigned i = 0, n = createdNodes.size(); i < n; ++i) { - TreeTy *N = createdNodes[i]; - if (N->isMutable() && N->refCount == 0) - N->destroy(); - } - createdNodes.clear(); - } - - /// balanceTree - Used by add_internal and remove_internal to - /// balance a newly created tree. - TreeTy* balanceTree(TreeTy* L, value_type_ref V, TreeTy* R) { - unsigned hl = getHeight(L); - unsigned hr = getHeight(R); - - if (hl > hr + 2) { - assert(!isEmpty(L) && "Left tree cannot be empty to have a height >= 2"); - - TreeTy *LL = getLeft(L); - TreeTy *LR = getRight(L); - - if (getHeight(LL) >= getHeight(LR)) - return createNode(LL, L, createNode(LR,V,R)); - - assert(!isEmpty(LR) && "LR cannot be empty because it has a height >= 1"); - - TreeTy *LRL = getLeft(LR); - TreeTy *LRR = getRight(LR); - - return createNode(createNode(LL,L,LRL), LR, createNode(LRR,V,R)); - } - - if (hr > hl + 2) { - assert(!isEmpty(R) && "Right tree cannot be empty to have a height >= 2"); - - TreeTy *RL = getLeft(R); - TreeTy *RR = getRight(R); - - if (getHeight(RR) >= getHeight(RL)) - return createNode(createNode(L,V,RL), R, RR); - - assert(!isEmpty(RL) && "RL cannot be empty because it has a height >= 1"); - - TreeTy *RLL = getLeft(RL); - TreeTy *RLR = getRight(RL); - - return createNode(createNode(L,V,RLL), RL, createNode(RLR,R,RR)); - } - - return createNode(L,V,R); - } - - /// add_internal - Creates a new tree that includes the specified - /// data and the data from the original tree. If the original tree - /// already contained the data item, the original tree is returned. - TreeTy* add_internal(value_type_ref V, TreeTy* T) { - if (isEmpty(T)) - return createNode(T, V, T); - assert(!T->isMutable()); - - key_type_ref K = ImutInfo::KeyOfValue(V); - key_type_ref KCurrent = ImutInfo::KeyOfValue(getValue(T)); - - if (ImutInfo::isEqual(K,KCurrent)) - return createNode(getLeft(T), V, getRight(T)); - else if (ImutInfo::isLess(K,KCurrent)) - return balanceTree(add_internal(V, getLeft(T)), getValue(T), getRight(T)); - else - return balanceTree(getLeft(T), getValue(T), add_internal(V, getRight(T))); - } - - /// remove_internal - Creates a new tree that includes all the data - /// from the original tree except the specified data. If the - /// specified data did not exist in the original tree, the original - /// tree is returned. - TreeTy* remove_internal(key_type_ref K, TreeTy* T) { - if (isEmpty(T)) - return T; - - assert(!T->isMutable()); - - key_type_ref KCurrent = ImutInfo::KeyOfValue(getValue(T)); - - if (ImutInfo::isEqual(K,KCurrent)) { - return combineTrees(getLeft(T), getRight(T)); - } else if (ImutInfo::isLess(K,KCurrent)) { - return balanceTree(remove_internal(K, getLeft(T)), - getValue(T), getRight(T)); - } else { - return balanceTree(getLeft(T), getValue(T), - remove_internal(K, getRight(T))); - } - } - - TreeTy* combineTrees(TreeTy* L, TreeTy* R) { - if (isEmpty(L)) - return R; - if (isEmpty(R)) - return L; - TreeTy* OldNode; - TreeTy* newRight = removeMinBinding(R,OldNode); - return balanceTree(L, getValue(OldNode), newRight); - } - - TreeTy* removeMinBinding(TreeTy* T, TreeTy*& Noderemoved) { - assert(!isEmpty(T)); - if (isEmpty(getLeft(T))) { - Noderemoved = T; - return getRight(T); - } - return balanceTree(removeMinBinding(getLeft(T), Noderemoved), - getValue(T), getRight(T)); - } - - /// markImmutable - Clears the mutable bits of a root and all of its - /// descendants. - void markImmutable(TreeTy* T) { - if (!T || !T->isMutable()) - return; - T->markImmutable(); - markImmutable(getLeft(T)); - markImmutable(getRight(T)); - } - -public: - TreeTy *getCanonicalTree(TreeTy *TNew) { - if (!TNew) - return nullptr; - - if (TNew->IsCanonicalized) - return TNew; - - // Search the hashtable for another tree with the same digest, and - // if find a collision compare those trees by their contents. - unsigned digest = TNew->computeDigest(); - TreeTy *&entry = Cache[maskCacheIndex(digest)]; - do { - if (!entry) - break; - for (TreeTy *T = entry ; T != nullptr; T = T->next) { - // Compare the Contents('T') with Contents('TNew') - typename TreeTy::iterator TI = T->begin(), TE = T->end(); - if (!compareTreeWithSection(TNew, TI, TE)) - continue; - if (TI != TE) - continue; // T has more contents than TNew. - // Trees did match! Return 'T'. - if (TNew->refCount == 0) - TNew->destroy(); - return T; - } - entry->prev = TNew; - TNew->next = entry; - } - while (false); - - entry = TNew; - TNew->IsCanonicalized = true; - return TNew; - } -}; - -//===----------------------------------------------------------------------===// -// Immutable AVL-Tree Iterators. -//===----------------------------------------------------------------------===// - -template -class ImutAVLTreeGenericIterator - : public std::iterator> { - SmallVector stack; -public: - enum VisitFlag { VisitedNone=0x0, VisitedLeft=0x1, VisitedRight=0x3, - Flags=0x3 }; - - typedef ImutAVLTree TreeTy; - - ImutAVLTreeGenericIterator() {} - ImutAVLTreeGenericIterator(const TreeTy *Root) { - if (Root) stack.push_back(reinterpret_cast(Root)); - } - - TreeTy &operator*() const { - assert(!stack.empty()); - return *reinterpret_cast(stack.back() & ~Flags); - } - TreeTy *operator->() const { return &*this; } - - uintptr_t getVisitState() const { - assert(!stack.empty()); - return stack.back() & Flags; - } - - - bool atEnd() const { return stack.empty(); } - - bool atBeginning() const { - return stack.size() == 1 && getVisitState() == VisitedNone; - } - - void skipToParent() { - assert(!stack.empty()); - stack.pop_back(); - if (stack.empty()) - return; - switch (getVisitState()) { - case VisitedNone: - stack.back() |= VisitedLeft; - break; - case VisitedLeft: - stack.back() |= VisitedRight; - break; - default: - llvm_unreachable("Unreachable."); - } - } - - bool operator==(const ImutAVLTreeGenericIterator &x) const { - return stack == x.stack; - } - - bool operator!=(const ImutAVLTreeGenericIterator &x) const { - return !(*this == x); - } - - ImutAVLTreeGenericIterator &operator++() { - assert(!stack.empty()); - TreeTy* Current = reinterpret_cast(stack.back() & ~Flags); - assert(Current); - switch (getVisitState()) { - case VisitedNone: - if (TreeTy* L = Current->getLeft()) - stack.push_back(reinterpret_cast(L)); - else - stack.back() |= VisitedLeft; - break; - case VisitedLeft: - if (TreeTy* R = Current->getRight()) - stack.push_back(reinterpret_cast(R)); - else - stack.back() |= VisitedRight; - break; - case VisitedRight: - skipToParent(); - break; - default: - llvm_unreachable("Unreachable."); - } - return *this; - } - - ImutAVLTreeGenericIterator &operator--() { - assert(!stack.empty()); - TreeTy* Current = reinterpret_cast(stack.back() & ~Flags); - assert(Current); - switch (getVisitState()) { - case VisitedNone: - stack.pop_back(); - break; - case VisitedLeft: - stack.back() &= ~Flags; // Set state to "VisitedNone." - if (TreeTy* L = Current->getLeft()) - stack.push_back(reinterpret_cast(L) | VisitedRight); - break; - case VisitedRight: - stack.back() &= ~Flags; - stack.back() |= VisitedLeft; - if (TreeTy* R = Current->getRight()) - stack.push_back(reinterpret_cast(R) | VisitedRight); - break; - default: - llvm_unreachable("Unreachable."); - } - return *this; - } -}; - -template -class ImutAVLTreeInOrderIterator - : public std::iterator> { - typedef ImutAVLTreeGenericIterator InternalIteratorTy; - InternalIteratorTy InternalItr; - -public: - typedef ImutAVLTree TreeTy; - - ImutAVLTreeInOrderIterator(const TreeTy* Root) : InternalItr(Root) { - if (Root) - ++*this; // Advance to first element. - } - - ImutAVLTreeInOrderIterator() : InternalItr() {} - - bool operator==(const ImutAVLTreeInOrderIterator &x) const { - return InternalItr == x.InternalItr; - } - - bool operator!=(const ImutAVLTreeInOrderIterator &x) const { - return !(*this == x); - } - - TreeTy &operator*() const { return *InternalItr; } - TreeTy *operator->() const { return &*InternalItr; } - - ImutAVLTreeInOrderIterator &operator++() { - do ++InternalItr; - while (!InternalItr.atEnd() && - InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft); - - return *this; - } - - ImutAVLTreeInOrderIterator &operator--() { - do --InternalItr; - while (!InternalItr.atBeginning() && - InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft); - - return *this; - } - - void skipSubTree() { - InternalItr.skipToParent(); - - while (!InternalItr.atEnd() && - InternalItr.getVisitState() != InternalIteratorTy::VisitedLeft) - ++InternalItr; - } -}; - -/// Generic iterator that wraps a T::TreeTy::iterator and exposes -/// iterator::getValue() on dereference. -template -struct ImutAVLValueIterator - : iterator_adaptor_base< - ImutAVLValueIterator, typename T::TreeTy::iterator, - typename std::iterator_traits< - typename T::TreeTy::iterator>::iterator_category, - const typename T::value_type> { - ImutAVLValueIterator() = default; - explicit ImutAVLValueIterator(typename T::TreeTy *Tree) - : ImutAVLValueIterator::iterator_adaptor_base(Tree) {} - - typename ImutAVLValueIterator::reference operator*() const { - return this->I->getValue(); - } -}; - -//===----------------------------------------------------------------------===// -// Trait classes for Profile information. -//===----------------------------------------------------------------------===// - -/// Generic profile template. The default behavior is to invoke the -/// profile method of an object. Specializations for primitive integers -/// and generic handling of pointers is done below. -template -struct ImutProfileInfo { - typedef const T value_type; - typedef const T& value_type_ref; - - static void Profile(FoldingSetNodeID &ID, value_type_ref X) { - FoldingSetTrait::Profile(X,ID); - } -}; - -/// Profile traits for integers. -template -struct ImutProfileInteger { - typedef const T value_type; - typedef const T& value_type_ref; - - static void Profile(FoldingSetNodeID &ID, value_type_ref X) { - ID.AddInteger(X); - } -}; - -#define PROFILE_INTEGER_INFO(X)\ -template<> struct ImutProfileInfo : ImutProfileInteger {}; - -PROFILE_INTEGER_INFO(char) -PROFILE_INTEGER_INFO(unsigned char) -PROFILE_INTEGER_INFO(short) -PROFILE_INTEGER_INFO(unsigned short) -PROFILE_INTEGER_INFO(unsigned) -PROFILE_INTEGER_INFO(signed) -PROFILE_INTEGER_INFO(long) -PROFILE_INTEGER_INFO(unsigned long) -PROFILE_INTEGER_INFO(long long) -PROFILE_INTEGER_INFO(unsigned long long) - -#undef PROFILE_INTEGER_INFO - -/// Profile traits for booleans. -template <> -struct ImutProfileInfo { - typedef const bool value_type; - typedef const bool& value_type_ref; - - static void Profile(FoldingSetNodeID &ID, value_type_ref X) { - ID.AddBoolean(X); - } -}; - - -/// Generic profile trait for pointer types. We treat pointers as -/// references to unique objects. -template -struct ImutProfileInfo { - typedef const T* value_type; - typedef value_type value_type_ref; - - static void Profile(FoldingSetNodeID &ID, value_type_ref X) { - ID.AddPointer(X); - } -}; - -//===----------------------------------------------------------------------===// -// Trait classes that contain element comparison operators and type -// definitions used by ImutAVLTree, ImmutableSet, and ImmutableMap. These -// inherit from the profile traits (ImutProfileInfo) to include operations -// for element profiling. -//===----------------------------------------------------------------------===// - - -/// ImutContainerInfo - Generic definition of comparison operations for -/// elements of immutable containers that defaults to using -/// std::equal_to<> and std::less<> to perform comparison of elements. -template -struct ImutContainerInfo : public ImutProfileInfo { - typedef typename ImutProfileInfo::value_type value_type; - typedef typename ImutProfileInfo::value_type_ref value_type_ref; - typedef value_type key_type; - typedef value_type_ref key_type_ref; - typedef bool data_type; - typedef bool data_type_ref; - - static key_type_ref KeyOfValue(value_type_ref D) { return D; } - static data_type_ref DataOfValue(value_type_ref) { return true; } - - static bool isEqual(key_type_ref LHS, key_type_ref RHS) { - return std::equal_to()(LHS,RHS); - } - - static bool isLess(key_type_ref LHS, key_type_ref RHS) { - return std::less()(LHS,RHS); - } - - static bool isDataEqual(data_type_ref, data_type_ref) { return true; } -}; - -/// ImutContainerInfo - Specialization for pointer values to treat pointers -/// as references to unique objects. Pointers are thus compared by -/// their addresses. -template -struct ImutContainerInfo : public ImutProfileInfo { - typedef typename ImutProfileInfo::value_type value_type; - typedef typename ImutProfileInfo::value_type_ref value_type_ref; - typedef value_type key_type; - typedef value_type_ref key_type_ref; - typedef bool data_type; - typedef bool data_type_ref; - - static key_type_ref KeyOfValue(value_type_ref D) { return D; } - static data_type_ref DataOfValue(value_type_ref) { return true; } - - static bool isEqual(key_type_ref LHS, key_type_ref RHS) { return LHS == RHS; } - - static bool isLess(key_type_ref LHS, key_type_ref RHS) { return LHS < RHS; } - - static bool isDataEqual(data_type_ref, data_type_ref) { return true; } -}; - -//===----------------------------------------------------------------------===// -// Immutable Set -//===----------------------------------------------------------------------===// - -template > -class ImmutableSet { -public: - typedef typename ValInfo::value_type value_type; - typedef typename ValInfo::value_type_ref value_type_ref; - typedef ImutAVLTree TreeTy; - -private: - TreeTy *Root; - -public: - /// Constructs a set from a pointer to a tree root. In general one - /// should use a Factory object to create sets instead of directly - /// invoking the constructor, but there are cases where make this - /// constructor public is useful. - explicit ImmutableSet(TreeTy* R) : Root(R) { - if (Root) { Root->retain(); } - } - ImmutableSet(const ImmutableSet &X) : Root(X.Root) { - if (Root) { Root->retain(); } - } - ImmutableSet &operator=(const ImmutableSet &X) { - if (Root != X.Root) { - if (X.Root) { X.Root->retain(); } - if (Root) { Root->release(); } - Root = X.Root; - } - return *this; - } - ~ImmutableSet() { - if (Root) { Root->release(); } - } - - class Factory { - typename TreeTy::Factory F; - const bool Canonicalize; - - public: - Factory(bool canonicalize = true) - : Canonicalize(canonicalize) {} - - Factory(BumpPtrAllocator& Alloc, bool canonicalize = true) - : F(Alloc), Canonicalize(canonicalize) {} - - /// getEmptySet - Returns an immutable set that contains no elements. - ImmutableSet getEmptySet() { - return ImmutableSet(F.getEmptyTree()); - } - - /// add - Creates a new immutable set that contains all of the values - /// of the original set with the addition of the specified value. If - /// the original set already included the value, then the original set is - /// returned and no memory is allocated. The time and space complexity - /// of this operation is logarithmic in the size of the original set. - /// The memory allocated to represent the set is released when the - /// factory object that created the set is destroyed. - ImmutableSet add(ImmutableSet Old, value_type_ref V) { - TreeTy *NewT = F.add(Old.Root, V); - return ImmutableSet(Canonicalize ? F.getCanonicalTree(NewT) : NewT); - } - - /// remove - Creates a new immutable set that contains all of the values - /// of the original set with the exception of the specified value. If - /// the original set did not contain the value, the original set is - /// returned and no memory is allocated. The time and space complexity - /// of this operation is logarithmic in the size of the original set. - /// The memory allocated to represent the set is released when the - /// factory object that created the set is destroyed. - ImmutableSet remove(ImmutableSet Old, value_type_ref V) { - TreeTy *NewT = F.remove(Old.Root, V); - return ImmutableSet(Canonicalize ? F.getCanonicalTree(NewT) : NewT); - } - - BumpPtrAllocator& getAllocator() { return F.getAllocator(); } - - typename TreeTy::Factory *getTreeFactory() const { - return const_cast(&F); - } - - private: - Factory(const Factory& RHS) = delete; - void operator=(const Factory& RHS) = delete; - }; - - friend class Factory; - - /// Returns true if the set contains the specified value. - bool contains(value_type_ref V) const { - return Root ? Root->contains(V) : false; - } - - bool operator==(const ImmutableSet &RHS) const { - return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; - } - - bool operator!=(const ImmutableSet &RHS) const { - return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; - } - - TreeTy *getRoot() { - if (Root) { Root->retain(); } - return Root; - } - - TreeTy *getRootWithoutRetain() const { - return Root; - } - - /// isEmpty - Return true if the set contains no elements. - bool isEmpty() const { return !Root; } - - /// isSingleton - Return true if the set contains exactly one element. - /// This method runs in constant time. - bool isSingleton() const { return getHeight() == 1; } - - template - void foreach(Callback& C) { if (Root) Root->foreach(C); } - - template - void foreach() { if (Root) { Callback C; Root->foreach(C); } } - - //===--------------------------------------------------===// - // Iterators. - //===--------------------------------------------------===// - - typedef ImutAVLValueIterator iterator; - - iterator begin() const { return iterator(Root); } - iterator end() const { return iterator(); } - - //===--------------------------------------------------===// - // Utility methods. - //===--------------------------------------------------===// - - unsigned getHeight() const { return Root ? Root->getHeight() : 0; } - - static void Profile(FoldingSetNodeID &ID, const ImmutableSet &S) { - ID.AddPointer(S.Root); - } - - void Profile(FoldingSetNodeID &ID) const { return Profile(ID, *this); } - - //===--------------------------------------------------===// - // For testing. - //===--------------------------------------------------===// - - void validateTree() const { if (Root) Root->validateTree(); } -}; - -// NOTE: This may some day replace the current ImmutableSet. -template > -class ImmutableSetRef { -public: - typedef typename ValInfo::value_type value_type; - typedef typename ValInfo::value_type_ref value_type_ref; - typedef ImutAVLTree TreeTy; - typedef typename TreeTy::Factory FactoryTy; - -private: - TreeTy *Root; - FactoryTy *Factory; - -public: - /// Constructs a set from a pointer to a tree root. In general one - /// should use a Factory object to create sets instead of directly - /// invoking the constructor, but there are cases where make this - /// constructor public is useful. - explicit ImmutableSetRef(TreeTy* R, FactoryTy *F) - : Root(R), - Factory(F) { - if (Root) { Root->retain(); } - } - ImmutableSetRef(const ImmutableSetRef &X) - : Root(X.Root), - Factory(X.Factory) { - if (Root) { Root->retain(); } - } - ImmutableSetRef &operator=(const ImmutableSetRef &X) { - if (Root != X.Root) { - if (X.Root) { X.Root->retain(); } - if (Root) { Root->release(); } - Root = X.Root; - Factory = X.Factory; - } - return *this; - } - ~ImmutableSetRef() { - if (Root) { Root->release(); } - } - - static ImmutableSetRef getEmptySet(FactoryTy *F) { - return ImmutableSetRef(0, F); - } - - ImmutableSetRef add(value_type_ref V) { - return ImmutableSetRef(Factory->add(Root, V), Factory); - } - - ImmutableSetRef remove(value_type_ref V) { - return ImmutableSetRef(Factory->remove(Root, V), Factory); - } - - /// Returns true if the set contains the specified value. - bool contains(value_type_ref V) const { - return Root ? Root->contains(V) : false; - } - - ImmutableSet asImmutableSet(bool canonicalize = true) const { - return ImmutableSet(canonicalize ? - Factory->getCanonicalTree(Root) : Root); - } - - TreeTy *getRootWithoutRetain() const { - return Root; - } - - bool operator==(const ImmutableSetRef &RHS) const { - return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root; - } - - bool operator!=(const ImmutableSetRef &RHS) const { - return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root; - } - - /// isEmpty - Return true if the set contains no elements. - bool isEmpty() const { return !Root; } - - /// isSingleton - Return true if the set contains exactly one element. - /// This method runs in constant time. - bool isSingleton() const { return getHeight() == 1; } - - //===--------------------------------------------------===// - // Iterators. - //===--------------------------------------------------===// - - typedef ImutAVLValueIterator iterator; - - iterator begin() const { return iterator(Root); } - iterator end() const { return iterator(); } - - //===--------------------------------------------------===// - // Utility methods. - //===--------------------------------------------------===// - - unsigned getHeight() const { return Root ? Root->getHeight() : 0; } - - static void Profile(FoldingSetNodeID &ID, const ImmutableSetRef &S) { - ID.AddPointer(S.Root); - } - - void Profile(FoldingSetNodeID &ID) const { return Profile(ID, *this); } - - //===--------------------------------------------------===// - // For testing. - //===--------------------------------------------------===// - - void validateTree() const { if (Root) Root->validateTree(); } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/IndexedMap.h b/llvm/include/llvm/ADT/IndexedMap.h deleted file mode 100644 index 5ba85c02..00000000 --- a/llvm/include/llvm/ADT/IndexedMap.h +++ /dev/null @@ -1,85 +0,0 @@ -//===- llvm/ADT/IndexedMap.h - An index map implementation ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements an indexed map. The index map template takes two -// types. The first is the mapped type and the second is a functor -// that maps its argument to a size_t. On instantiation a "null" value -// can be provided to be used as a "does not exist" indicator in the -// map. A member function grow() is provided that given the value of -// the maximally indexed key (the argument of the functor) makes sure -// the map has enough space for it. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_INDEXEDMAP_H -#define LLVM_ADT_INDEXEDMAP_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallVector.h" -#include -#include - -namespace llvm { - -template > - class IndexedMap { - typedef typename ToIndexT::argument_type IndexT; - // Prefer SmallVector with zero inline storage over std::vector. IndexedMaps - // can grow very large and SmallVector grows more efficiently as long as T - // is trivially copyable. - typedef SmallVector StorageT; - StorageT storage_; - T nullVal_; - ToIndexT toIndex_; - - public: - IndexedMap() : nullVal_(T()) { } - - explicit IndexedMap(const T& val) : nullVal_(val) { } - - typename StorageT::reference operator[](IndexT n) { - assert(toIndex_(n) < storage_.size() && "index out of bounds!"); - return storage_[toIndex_(n)]; - } - - typename StorageT::const_reference operator[](IndexT n) const { - assert(toIndex_(n) < storage_.size() && "index out of bounds!"); - return storage_[toIndex_(n)]; - } - - void reserve(typename StorageT::size_type s) { - storage_.reserve(s); - } - - void resize(typename StorageT::size_type s) { - storage_.resize(s, nullVal_); - } - - void clear() { - storage_.clear(); - } - - void grow(IndexT n) { - unsigned NewSize = toIndex_(n) + 1; - if (NewSize > storage_.size()) - resize(NewSize); - } - - bool inBounds(IndexT n) const { - return toIndex_(n) < storage_.size(); - } - - typename StorageT::size_type size() const { - return storage_.size(); - } - }; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/IntEqClasses.h b/llvm/include/llvm/ADT/IntEqClasses.h deleted file mode 100644 index 0baee2f1..00000000 --- a/llvm/include/llvm/ADT/IntEqClasses.h +++ /dev/null @@ -1,88 +0,0 @@ -//===-- llvm/ADT/IntEqClasses.h - Equiv. Classes of Integers ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Equivalence classes for small integers. This is a mapping of the integers -// 0 .. N-1 into M equivalence classes numbered 0 .. M-1. -// -// Initially each integer has its own equivalence class. Classes are joined by -// passing a representative member of each class to join(). -// -// Once the classes are built, compress() will number them 0 .. M-1 and prevent -// further changes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_INTEQCLASSES_H -#define LLVM_ADT_INTEQCLASSES_H - -#include "llvm/ADT/SmallVector.h" - -namespace llvm { - -class IntEqClasses { - /// EC - When uncompressed, map each integer to a smaller member of its - /// equivalence class. The class leader is the smallest member and maps to - /// itself. - /// - /// When compressed, EC[i] is the equivalence class of i. - SmallVector EC; - - /// NumClasses - The number of equivalence classes when compressed, or 0 when - /// uncompressed. - unsigned NumClasses; - -public: - /// IntEqClasses - Create an equivalence class mapping for 0 .. N-1. - IntEqClasses(unsigned N = 0) : NumClasses(0) { grow(N); } - - /// grow - Increase capacity to hold 0 .. N-1, putting new integers in unique - /// equivalence classes. - /// This requires an uncompressed map. - void grow(unsigned N); - - /// clear - Clear all classes so that grow() will assign a unique class to - /// every integer. - void clear() { - EC.clear(); - NumClasses = 0; - } - - /// Join the equivalence classes of a and b. After joining classes, - /// findLeader(a) == findLeader(b). This requires an uncompressed map. - /// Returns the new leader. - unsigned join(unsigned a, unsigned b); - - /// findLeader - Compute the leader of a's equivalence class. This is the - /// smallest member of the class. - /// This requires an uncompressed map. - unsigned findLeader(unsigned a) const; - - /// compress - Compress equivalence classes by numbering them 0 .. M. - /// This makes the equivalence class map immutable. - void compress(); - - /// getNumClasses - Return the number of equivalence classes after compress() - /// was called. - unsigned getNumClasses() const { return NumClasses; } - - /// operator[] - Return a's equivalence class number, 0 .. getNumClasses()-1. - /// This requires a compressed map. - unsigned operator[](unsigned a) const { - assert(NumClasses && "operator[] called before compress()"); - return EC[a]; - } - - /// uncompress - Change back to the uncompressed representation that allows - /// editing. - void uncompress(); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h deleted file mode 100644 index f8843b2a..00000000 --- a/llvm/include/llvm/ADT/IntervalMap.h +++ /dev/null @@ -1,2156 +0,0 @@ -//===- llvm/ADT/IntervalMap.h - A sorted interval map -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements a coalescing interval map for small objects. -// -// KeyT objects are mapped to ValT objects. Intervals of keys that map to the -// same value are represented in a compressed form. -// -// Iterators provide ordered access to the compressed intervals rather than the -// individual keys, and insert and erase operations use key intervals as well. -// -// Like SmallVector, IntervalMap will store the first N intervals in the map -// object itself without any allocations. When space is exhausted it switches to -// a B+-tree representation with very small overhead for small key and value -// objects. -// -// A Traits class specifies how keys are compared. It also allows IntervalMap to -// work with both closed and half-open intervals. -// -// Keys and values are not stored next to each other in a std::pair, so we don't -// provide such a value_type. Dereferencing iterators only returns the mapped -// value. The interval bounds are accessible through the start() and stop() -// iterator methods. -// -// IntervalMap is optimized for small key and value objects, 4 or 8 bytes each -// is the optimal size. For large objects use std::map instead. -// -//===----------------------------------------------------------------------===// -// -// Synopsis: -// -// template -// class IntervalMap { -// public: -// typedef KeyT key_type; -// typedef ValT mapped_type; -// typedef RecyclingAllocator<...> Allocator; -// class iterator; -// class const_iterator; -// -// explicit IntervalMap(Allocator&); -// ~IntervalMap(): -// -// bool empty() const; -// KeyT start() const; -// KeyT stop() const; -// ValT lookup(KeyT x, Value NotFound = Value()) const; -// -// const_iterator begin() const; -// const_iterator end() const; -// iterator begin(); -// iterator end(); -// const_iterator find(KeyT x) const; -// iterator find(KeyT x); -// -// void insert(KeyT a, KeyT b, ValT y); -// void clear(); -// }; -// -// template -// class IntervalMap::const_iterator : -// public std::iterator { -// public: -// bool operator==(const const_iterator &) const; -// bool operator!=(const const_iterator &) const; -// bool valid() const; -// -// const KeyT &start() const; -// const KeyT &stop() const; -// const ValT &value() const; -// const ValT &operator*() const; -// const ValT *operator->() const; -// -// const_iterator &operator++(); -// const_iterator &operator++(int); -// const_iterator &operator--(); -// const_iterator &operator--(int); -// void goToBegin(); -// void goToEnd(); -// void find(KeyT x); -// void advanceTo(KeyT x); -// }; -// -// template -// class IntervalMap::iterator : public const_iterator { -// public: -// void insert(KeyT a, KeyT b, Value y); -// void erase(); -// }; -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_INTERVALMAP_H -#define LLVM_ADT_INTERVALMAP_H - -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/AlignOf.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/RecyclingAllocator.h" -#include - -namespace llvm { - - -//===----------------------------------------------------------------------===// -//--- Key traits ---// -//===----------------------------------------------------------------------===// -// -// The IntervalMap works with closed or half-open intervals. -// Adjacent intervals that map to the same value are coalesced. -// -// The IntervalMapInfo traits class is used to determine if a key is contained -// in an interval, and if two intervals are adjacent so they can be coalesced. -// The provided implementation works for closed integer intervals, other keys -// probably need a specialized version. -// -// The point x is contained in [a;b] when !startLess(x, a) && !stopLess(b, x). -// -// It is assumed that (a;b] half-open intervals are not used, only [a;b) is -// allowed. This is so that stopLess(a, b) can be used to determine if two -// intervals overlap. -// -//===----------------------------------------------------------------------===// - -template -struct IntervalMapInfo { - - /// startLess - Return true if x is not in [a;b]. - /// This is x < a both for closed intervals and for [a;b) half-open intervals. - static inline bool startLess(const T &x, const T &a) { - return x < a; - } - - /// stopLess - Return true if x is not in [a;b]. - /// This is b < x for a closed interval, b <= x for [a;b) half-open intervals. - static inline bool stopLess(const T &b, const T &x) { - return b < x; - } - - /// adjacent - Return true when the intervals [x;a] and [b;y] can coalesce. - /// This is a+1 == b for closed intervals, a == b for half-open intervals. - static inline bool adjacent(const T &a, const T &b) { - return a+1 == b; - } - -}; - -template -struct IntervalMapHalfOpenInfo { - - /// startLess - Return true if x is not in [a;b). - static inline bool startLess(const T &x, const T &a) { - return x < a; - } - - /// stopLess - Return true if x is not in [a;b). - static inline bool stopLess(const T &b, const T &x) { - return b <= x; - } - - /// adjacent - Return true when the intervals [x;a) and [b;y) can coalesce. - static inline bool adjacent(const T &a, const T &b) { - return a == b; - } - -}; - -/// IntervalMapImpl - Namespace used for IntervalMap implementation details. -/// It should be considered private to the implementation. -namespace IntervalMapImpl { - -// Forward declarations. -template class LeafNode; -template class BranchNode; - -typedef std::pair IdxPair; - - -//===----------------------------------------------------------------------===// -//--- IntervalMapImpl::NodeBase ---// -//===----------------------------------------------------------------------===// -// -// Both leaf and branch nodes store vectors of pairs. -// Leaves store ((KeyT, KeyT), ValT) pairs, branches use (NodeRef, KeyT). -// -// Keys and values are stored in separate arrays to avoid padding caused by -// different object alignments. This also helps improve locality of reference -// when searching the keys. -// -// The nodes don't know how many elements they contain - that information is -// stored elsewhere. Omitting the size field prevents padding and allows a node -// to fill the allocated cache lines completely. -// -// These are typical key and value sizes, the node branching factor (N), and -// wasted space when nodes are sized to fit in three cache lines (192 bytes): -// -// T1 T2 N Waste Used by -// 4 4 24 0 Branch<4> (32-bit pointers) -// 8 4 16 0 Leaf<4,4>, Branch<4> -// 8 8 12 0 Leaf<4,8>, Branch<8> -// 16 4 9 12 Leaf<8,4> -// 16 8 8 0 Leaf<8,8> -// -//===----------------------------------------------------------------------===// - -template -class NodeBase { -public: - enum { Capacity = N }; - - T1 first[N]; - T2 second[N]; - - /// copy - Copy elements from another node. - /// @param Other Node elements are copied from. - /// @param i Beginning of the source range in other. - /// @param j Beginning of the destination range in this. - /// @param Count Number of elements to copy. - template - void copy(const NodeBase &Other, unsigned i, - unsigned j, unsigned Count) { - assert(i + Count <= M && "Invalid source range"); - assert(j + Count <= N && "Invalid dest range"); - for (unsigned e = i + Count; i != e; ++i, ++j) { - first[j] = Other.first[i]; - second[j] = Other.second[i]; - } - } - - /// moveLeft - Move elements to the left. - /// @param i Beginning of the source range. - /// @param j Beginning of the destination range. - /// @param Count Number of elements to copy. - void moveLeft(unsigned i, unsigned j, unsigned Count) { - assert(j <= i && "Use moveRight shift elements right"); - copy(*this, i, j, Count); - } - - /// moveRight - Move elements to the right. - /// @param i Beginning of the source range. - /// @param j Beginning of the destination range. - /// @param Count Number of elements to copy. - void moveRight(unsigned i, unsigned j, unsigned Count) { - assert(i <= j && "Use moveLeft shift elements left"); - assert(j + Count <= N && "Invalid range"); - while (Count--) { - first[j + Count] = first[i + Count]; - second[j + Count] = second[i + Count]; - } - } - - /// erase - Erase elements [i;j). - /// @param i Beginning of the range to erase. - /// @param j End of the range. (Exclusive). - /// @param Size Number of elements in node. - void erase(unsigned i, unsigned j, unsigned Size) { - moveLeft(j, i, Size - j); - } - - /// erase - Erase element at i. - /// @param i Index of element to erase. - /// @param Size Number of elements in node. - void erase(unsigned i, unsigned Size) { - erase(i, i+1, Size); - } - - /// shift - Shift elements [i;size) 1 position to the right. - /// @param i Beginning of the range to move. - /// @param Size Number of elements in node. - void shift(unsigned i, unsigned Size) { - moveRight(i, i + 1, Size - i); - } - - /// transferToLeftSib - Transfer elements to a left sibling node. - /// @param Size Number of elements in this. - /// @param Sib Left sibling node. - /// @param SSize Number of elements in sib. - /// @param Count Number of elements to transfer. - void transferToLeftSib(unsigned Size, NodeBase &Sib, unsigned SSize, - unsigned Count) { - Sib.copy(*this, 0, SSize, Count); - erase(0, Count, Size); - } - - /// transferToRightSib - Transfer elements to a right sibling node. - /// @param Size Number of elements in this. - /// @param Sib Right sibling node. - /// @param SSize Number of elements in sib. - /// @param Count Number of elements to transfer. - void transferToRightSib(unsigned Size, NodeBase &Sib, unsigned SSize, - unsigned Count) { - Sib.moveRight(0, Count, SSize); - Sib.copy(*this, Size-Count, 0, Count); - } - - /// adjustFromLeftSib - Adjust the number if elements in this node by moving - /// elements to or from a left sibling node. - /// @param Size Number of elements in this. - /// @param Sib Right sibling node. - /// @param SSize Number of elements in sib. - /// @param Add The number of elements to add to this node, possibly < 0. - /// @return Number of elements added to this node, possibly negative. - int adjustFromLeftSib(unsigned Size, NodeBase &Sib, unsigned SSize, int Add) { - if (Add > 0) { - // We want to grow, copy from sib. - unsigned Count = std::min(std::min(unsigned(Add), SSize), N - Size); - Sib.transferToRightSib(SSize, *this, Size, Count); - return Count; - } else { - // We want to shrink, copy to sib. - unsigned Count = std::min(std::min(unsigned(-Add), Size), N - SSize); - transferToLeftSib(Size, Sib, SSize, Count); - return -Count; - } - } -}; - -/// IntervalMapImpl::adjustSiblingSizes - Move elements between sibling nodes. -/// @param Node Array of pointers to sibling nodes. -/// @param Nodes Number of nodes. -/// @param CurSize Array of current node sizes, will be overwritten. -/// @param NewSize Array of desired node sizes. -template -void adjustSiblingSizes(NodeT *Node[], unsigned Nodes, - unsigned CurSize[], const unsigned NewSize[]) { - // Move elements right. - for (int n = Nodes - 1; n; --n) { - if (CurSize[n] == NewSize[n]) - continue; - for (int m = n - 1; m != -1; --m) { - int d = Node[n]->adjustFromLeftSib(CurSize[n], *Node[m], CurSize[m], - NewSize[n] - CurSize[n]); - CurSize[m] -= d; - CurSize[n] += d; - // Keep going if the current node was exhausted. - if (CurSize[n] >= NewSize[n]) - break; - } - } - - if (Nodes == 0) - return; - - // Move elements left. - for (unsigned n = 0; n != Nodes - 1; ++n) { - if (CurSize[n] == NewSize[n]) - continue; - for (unsigned m = n + 1; m != Nodes; ++m) { - int d = Node[m]->adjustFromLeftSib(CurSize[m], *Node[n], CurSize[n], - CurSize[n] - NewSize[n]); - CurSize[m] += d; - CurSize[n] -= d; - // Keep going if the current node was exhausted. - if (CurSize[n] >= NewSize[n]) - break; - } - } - -#ifndef NDEBUG - for (unsigned n = 0; n != Nodes; n++) - assert(CurSize[n] == NewSize[n] && "Insufficient element shuffle"); -#endif -} - -/// IntervalMapImpl::distribute - Compute a new distribution of node elements -/// after an overflow or underflow. Reserve space for a new element at Position, -/// and compute the node that will hold Position after redistributing node -/// elements. -/// -/// It is required that -/// -/// Elements == sum(CurSize), and -/// Elements + Grow <= Nodes * Capacity. -/// -/// NewSize[] will be filled in such that: -/// -/// sum(NewSize) == Elements, and -/// NewSize[i] <= Capacity. -/// -/// The returned index is the node where Position will go, so: -/// -/// sum(NewSize[0..idx-1]) <= Position -/// sum(NewSize[0..idx]) >= Position -/// -/// The last equality, sum(NewSize[0..idx]) == Position, can only happen when -/// Grow is set and NewSize[idx] == Capacity-1. The index points to the node -/// before the one holding the Position'th element where there is room for an -/// insertion. -/// -/// @param Nodes The number of nodes. -/// @param Elements Total elements in all nodes. -/// @param Capacity The capacity of each node. -/// @param CurSize Array[Nodes] of current node sizes, or NULL. -/// @param NewSize Array[Nodes] to receive the new node sizes. -/// @param Position Insert position. -/// @param Grow Reserve space for a new element at Position. -/// @return (node, offset) for Position. -IdxPair distribute(unsigned Nodes, unsigned Elements, unsigned Capacity, - const unsigned *CurSize, unsigned NewSize[], - unsigned Position, bool Grow); - - -//===----------------------------------------------------------------------===// -//--- IntervalMapImpl::NodeSizer ---// -//===----------------------------------------------------------------------===// -// -// Compute node sizes from key and value types. -// -// The branching factors are chosen to make nodes fit in three cache lines. -// This may not be possible if keys or values are very large. Such large objects -// are handled correctly, but a std::map would probably give better performance. -// -//===----------------------------------------------------------------------===// - -enum { - // Cache line size. Most architectures have 32 or 64 byte cache lines. - // We use 64 bytes here because it provides good branching factors. - Log2CacheLine = 6, - CacheLineBytes = 1 << Log2CacheLine, - DesiredNodeBytes = 3 * CacheLineBytes -}; - -template -struct NodeSizer { - enum { - // Compute the leaf node branching factor that makes a node fit in three - // cache lines. The branching factor must be at least 3, or some B+-tree - // balancing algorithms won't work. - // LeafSize can't be larger than CacheLineBytes. This is required by the - // PointerIntPair used by NodeRef. - DesiredLeafSize = DesiredNodeBytes / - static_cast(2*sizeof(KeyT)+sizeof(ValT)), - MinLeafSize = 3, - LeafSize = DesiredLeafSize > MinLeafSize ? DesiredLeafSize : MinLeafSize - }; - - typedef NodeBase, ValT, LeafSize> LeafBase; - - enum { - // Now that we have the leaf branching factor, compute the actual allocation - // unit size by rounding up to a whole number of cache lines. - AllocBytes = (sizeof(LeafBase) + CacheLineBytes-1) & ~(CacheLineBytes-1), - - // Determine the branching factor for branch nodes. - BranchSize = AllocBytes / - static_cast(sizeof(KeyT) + sizeof(void*)) - }; - - /// Allocator - The recycling allocator used for both branch and leaf nodes. - /// This typedef is very likely to be identical for all IntervalMaps with - /// reasonably sized entries, so the same allocator can be shared among - /// different kinds of maps. - typedef RecyclingAllocator Allocator; - -}; - - -//===----------------------------------------------------------------------===// -//--- IntervalMapImpl::NodeRef ---// -//===----------------------------------------------------------------------===// -// -// B+-tree nodes can be leaves or branches, so we need a polymorphic node -// pointer that can point to both kinds. -// -// All nodes are cache line aligned and the low 6 bits of a node pointer are -// always 0. These bits are used to store the number of elements in the -// referenced node. Besides saving space, placing node sizes in the parents -// allow tree balancing algorithms to run without faulting cache lines for nodes -// that may not need to be modified. -// -// A NodeRef doesn't know whether it references a leaf node or a branch node. -// It is the responsibility of the caller to use the correct types. -// -// Nodes are never supposed to be empty, and it is invalid to store a node size -// of 0 in a NodeRef. The valid range of sizes is 1-64. -// -//===----------------------------------------------------------------------===// - -class NodeRef { - struct CacheAlignedPointerTraits { - static inline void *getAsVoidPointer(void *P) { return P; } - static inline void *getFromVoidPointer(void *P) { return P; } - enum { NumLowBitsAvailable = Log2CacheLine }; - }; - PointerIntPair pip; - -public: - /// NodeRef - Create a null ref. - NodeRef() {} - - /// operator bool - Detect a null ref. - explicit operator bool() const { return pip.getOpaqueValue(); } - - /// NodeRef - Create a reference to the node p with n elements. - template - NodeRef(NodeT *p, unsigned n) : pip(p, n - 1) { - assert(n <= NodeT::Capacity && "Size too big for node"); - } - - /// size - Return the number of elements in the referenced node. - unsigned size() const { return pip.getInt() + 1; } - - /// setSize - Update the node size. - void setSize(unsigned n) { pip.setInt(n - 1); } - - /// subtree - Access the i'th subtree reference in a branch node. - /// This depends on branch nodes storing the NodeRef array as their first - /// member. - NodeRef &subtree(unsigned i) const { - return reinterpret_cast(pip.getPointer())[i]; - } - - /// get - Dereference as a NodeT reference. - template - NodeT &get() const { - return *reinterpret_cast(pip.getPointer()); - } - - bool operator==(const NodeRef &RHS) const { - if (pip == RHS.pip) - return true; - assert(pip.getPointer() != RHS.pip.getPointer() && "Inconsistent NodeRefs"); - return false; - } - - bool operator!=(const NodeRef &RHS) const { - return !operator==(RHS); - } -}; - -//===----------------------------------------------------------------------===// -//--- IntervalMapImpl::LeafNode ---// -//===----------------------------------------------------------------------===// -// -// Leaf nodes store up to N disjoint intervals with corresponding values. -// -// The intervals are kept sorted and fully coalesced so there are no adjacent -// intervals mapping to the same value. -// -// These constraints are always satisfied: -// -// - Traits::stopLess(start(i), stop(i)) - Non-empty, sane intervals. -// -// - Traits::stopLess(stop(i), start(i + 1) - Sorted. -// -// - value(i) != value(i + 1) || !Traits::adjacent(stop(i), start(i + 1)) -// - Fully coalesced. -// -//===----------------------------------------------------------------------===// - -template -class LeafNode : public NodeBase, ValT, N> { -public: - const KeyT &start(unsigned i) const { return this->first[i].first; } - const KeyT &stop(unsigned i) const { return this->first[i].second; } - const ValT &value(unsigned i) const { return this->second[i]; } - - KeyT &start(unsigned i) { return this->first[i].first; } - KeyT &stop(unsigned i) { return this->first[i].second; } - ValT &value(unsigned i) { return this->second[i]; } - - /// findFrom - Find the first interval after i that may contain x. - /// @param i Starting index for the search. - /// @param Size Number of elements in node. - /// @param x Key to search for. - /// @return First index with !stopLess(key[i].stop, x), or size. - /// This is the first interval that can possibly contain x. - unsigned findFrom(unsigned i, unsigned Size, KeyT x) const { - assert(i <= Size && Size <= N && "Bad indices"); - assert((i == 0 || Traits::stopLess(stop(i - 1), x)) && - "Index is past the needed point"); - while (i != Size && Traits::stopLess(stop(i), x)) ++i; - return i; - } - - /// safeFind - Find an interval that is known to exist. This is the same as - /// findFrom except is it assumed that x is at least within range of the last - /// interval. - /// @param i Starting index for the search. - /// @param x Key to search for. - /// @return First index with !stopLess(key[i].stop, x), never size. - /// This is the first interval that can possibly contain x. - unsigned safeFind(unsigned i, KeyT x) const { - assert(i < N && "Bad index"); - assert((i == 0 || Traits::stopLess(stop(i - 1), x)) && - "Index is past the needed point"); - while (Traits::stopLess(stop(i), x)) ++i; - assert(i < N && "Unsafe intervals"); - return i; - } - - /// safeLookup - Lookup mapped value for a safe key. - /// It is assumed that x is within range of the last entry. - /// @param x Key to search for. - /// @param NotFound Value to return if x is not in any interval. - /// @return The mapped value at x or NotFound. - ValT safeLookup(KeyT x, ValT NotFound) const { - unsigned i = safeFind(0, x); - return Traits::startLess(x, start(i)) ? NotFound : value(i); - } - - unsigned insertFrom(unsigned &Pos, unsigned Size, KeyT a, KeyT b, ValT y); -}; - -/// insertFrom - Add mapping of [a;b] to y if possible, coalescing as much as -/// possible. This may cause the node to grow by 1, or it may cause the node -/// to shrink because of coalescing. -/// @param Pos Starting index = insertFrom(0, size, a) -/// @param Size Number of elements in node. -/// @param a Interval start. -/// @param b Interval stop. -/// @param y Value be mapped. -/// @return (insert position, new size), or (i, Capacity+1) on overflow. -template -unsigned LeafNode:: -insertFrom(unsigned &Pos, unsigned Size, KeyT a, KeyT b, ValT y) { - unsigned i = Pos; - assert(i <= Size && Size <= N && "Invalid index"); - assert(!Traits::stopLess(b, a) && "Invalid interval"); - - // Verify the findFrom invariant. - assert((i == 0 || Traits::stopLess(stop(i - 1), a))); - assert((i == Size || !Traits::stopLess(stop(i), a))); - assert((i == Size || Traits::stopLess(b, start(i))) && "Overlapping insert"); - - // Coalesce with previous interval. - if (i && value(i - 1) == y && Traits::adjacent(stop(i - 1), a)) { - Pos = i - 1; - // Also coalesce with next interval? - if (i != Size && value(i) == y && Traits::adjacent(b, start(i))) { - stop(i - 1) = stop(i); - this->erase(i, Size); - return Size - 1; - } - stop(i - 1) = b; - return Size; - } - - // Detect overflow. - if (i == N) - return N + 1; - - // Add new interval at end. - if (i == Size) { - start(i) = a; - stop(i) = b; - value(i) = y; - return Size + 1; - } - - // Try to coalesce with following interval. - if (value(i) == y && Traits::adjacent(b, start(i))) { - start(i) = a; - return Size; - } - - // We must insert before i. Detect overflow. - if (Size == N) - return N + 1; - - // Insert before i. - this->shift(i, Size); - start(i) = a; - stop(i) = b; - value(i) = y; - return Size + 1; -} - - -//===----------------------------------------------------------------------===// -//--- IntervalMapImpl::BranchNode ---// -//===----------------------------------------------------------------------===// -// -// A branch node stores references to 1--N subtrees all of the same height. -// -// The key array in a branch node holds the rightmost stop key of each subtree. -// It is redundant to store the last stop key since it can be found in the -// parent node, but doing so makes tree balancing a lot simpler. -// -// It is unusual for a branch node to only have one subtree, but it can happen -// in the root node if it is smaller than the normal nodes. -// -// When all of the leaf nodes from all the subtrees are concatenated, they must -// satisfy the same constraints as a single leaf node. They must be sorted, -// sane, and fully coalesced. -// -//===----------------------------------------------------------------------===// - -template -class BranchNode : public NodeBase { -public: - const KeyT &stop(unsigned i) const { return this->second[i]; } - const NodeRef &subtree(unsigned i) const { return this->first[i]; } - - KeyT &stop(unsigned i) { return this->second[i]; } - NodeRef &subtree(unsigned i) { return this->first[i]; } - - /// findFrom - Find the first subtree after i that may contain x. - /// @param i Starting index for the search. - /// @param Size Number of elements in node. - /// @param x Key to search for. - /// @return First index with !stopLess(key[i], x), or size. - /// This is the first subtree that can possibly contain x. - unsigned findFrom(unsigned i, unsigned Size, KeyT x) const { - assert(i <= Size && Size <= N && "Bad indices"); - assert((i == 0 || Traits::stopLess(stop(i - 1), x)) && - "Index to findFrom is past the needed point"); - while (i != Size && Traits::stopLess(stop(i), x)) ++i; - return i; - } - - /// safeFind - Find a subtree that is known to exist. This is the same as - /// findFrom except is it assumed that x is in range. - /// @param i Starting index for the search. - /// @param x Key to search for. - /// @return First index with !stopLess(key[i], x), never size. - /// This is the first subtree that can possibly contain x. - unsigned safeFind(unsigned i, KeyT x) const { - assert(i < N && "Bad index"); - assert((i == 0 || Traits::stopLess(stop(i - 1), x)) && - "Index is past the needed point"); - while (Traits::stopLess(stop(i), x)) ++i; - assert(i < N && "Unsafe intervals"); - return i; - } - - /// safeLookup - Get the subtree containing x, Assuming that x is in range. - /// @param x Key to search for. - /// @return Subtree containing x - NodeRef safeLookup(KeyT x) const { - return subtree(safeFind(0, x)); - } - - /// insert - Insert a new (subtree, stop) pair. - /// @param i Insert position, following entries will be shifted. - /// @param Size Number of elements in node. - /// @param Node Subtree to insert. - /// @param Stop Last key in subtree. - void insert(unsigned i, unsigned Size, NodeRef Node, KeyT Stop) { - assert(Size < N && "branch node overflow"); - assert(i <= Size && "Bad insert position"); - this->shift(i, Size); - subtree(i) = Node; - stop(i) = Stop; - } -}; - -//===----------------------------------------------------------------------===// -//--- IntervalMapImpl::Path ---// -//===----------------------------------------------------------------------===// -// -// A Path is used by iterators to represent a position in a B+-tree, and the -// path to get there from the root. -// -// The Path class also contains the tree navigation code that doesn't have to -// be templatized. -// -//===----------------------------------------------------------------------===// - -class Path { - /// Entry - Each step in the path is a node pointer and an offset into that - /// node. - struct Entry { - void *node; - unsigned size; - unsigned offset; - - Entry(void *Node, unsigned Size, unsigned Offset) - : node(Node), size(Size), offset(Offset) {} - - Entry(NodeRef Node, unsigned Offset) - : node(&Node.subtree(0)), size(Node.size()), offset(Offset) {} - - NodeRef &subtree(unsigned i) const { - return reinterpret_cast(node)[i]; - } - }; - - /// path - The path entries, path[0] is the root node, path.back() is a leaf. - SmallVector path; - -public: - // Node accessors. - template NodeT &node(unsigned Level) const { - return *reinterpret_cast(path[Level].node); - } - unsigned size(unsigned Level) const { return path[Level].size; } - unsigned offset(unsigned Level) const { return path[Level].offset; } - unsigned &offset(unsigned Level) { return path[Level].offset; } - - // Leaf accessors. - template NodeT &leaf() const { - return *reinterpret_cast(path.back().node); - } - unsigned leafSize() const { return path.back().size; } - unsigned leafOffset() const { return path.back().offset; } - unsigned &leafOffset() { return path.back().offset; } - - /// valid - Return true if path is at a valid node, not at end(). - bool valid() const { - return !path.empty() && path.front().offset < path.front().size; - } - - /// height - Return the height of the tree corresponding to this path. - /// This matches map->height in a full path. - unsigned height() const { return path.size() - 1; } - - /// subtree - Get the subtree referenced from Level. When the path is - /// consistent, node(Level + 1) == subtree(Level). - /// @param Level 0..height-1. The leaves have no subtrees. - NodeRef &subtree(unsigned Level) const { - return path[Level].subtree(path[Level].offset); - } - - /// reset - Reset cached information about node(Level) from subtree(Level -1). - /// @param Level 1..height. THe node to update after parent node changed. - void reset(unsigned Level) { - path[Level] = Entry(subtree(Level - 1), offset(Level)); - } - - /// push - Add entry to path. - /// @param Node Node to add, should be subtree(path.size()-1). - /// @param Offset Offset into Node. - void push(NodeRef Node, unsigned Offset) { - path.push_back(Entry(Node, Offset)); - } - - /// pop - Remove the last path entry. - void pop() { - path.pop_back(); - } - - /// setSize - Set the size of a node both in the path and in the tree. - /// @param Level 0..height. Note that setting the root size won't change - /// map->rootSize. - /// @param Size New node size. - void setSize(unsigned Level, unsigned Size) { - path[Level].size = Size; - if (Level) - subtree(Level - 1).setSize(Size); - } - - /// setRoot - Clear the path and set a new root node. - /// @param Node New root node. - /// @param Size New root size. - /// @param Offset Offset into root node. - void setRoot(void *Node, unsigned Size, unsigned Offset) { - path.clear(); - path.push_back(Entry(Node, Size, Offset)); - } - - /// replaceRoot - Replace the current root node with two new entries after the - /// tree height has increased. - /// @param Root The new root node. - /// @param Size Number of entries in the new root. - /// @param Offsets Offsets into the root and first branch nodes. - void replaceRoot(void *Root, unsigned Size, IdxPair Offsets); - - /// getLeftSibling - Get the left sibling node at Level, or a null NodeRef. - /// @param Level Get the sibling to node(Level). - /// @return Left sibling, or NodeRef(). - NodeRef getLeftSibling(unsigned Level) const; - - /// moveLeft - Move path to the left sibling at Level. Leave nodes below Level - /// unaltered. - /// @param Level Move node(Level). - void moveLeft(unsigned Level); - - /// fillLeft - Grow path to Height by taking leftmost branches. - /// @param Height The target height. - void fillLeft(unsigned Height) { - while (height() < Height) - push(subtree(height()), 0); - } - - /// getLeftSibling - Get the left sibling node at Level, or a null NodeRef. - /// @param Level Get the sinbling to node(Level). - /// @return Left sibling, or NodeRef(). - NodeRef getRightSibling(unsigned Level) const; - - /// moveRight - Move path to the left sibling at Level. Leave nodes below - /// Level unaltered. - /// @param Level Move node(Level). - void moveRight(unsigned Level); - - /// atBegin - Return true if path is at begin(). - bool atBegin() const { - for (unsigned i = 0, e = path.size(); i != e; ++i) - if (path[i].offset != 0) - return false; - return true; - } - - /// atLastEntry - Return true if the path is at the last entry of the node at - /// Level. - /// @param Level Node to examine. - bool atLastEntry(unsigned Level) const { - return path[Level].offset == path[Level].size - 1; - } - - /// legalizeForInsert - Prepare the path for an insertion at Level. When the - /// path is at end(), node(Level) may not be a legal node. legalizeForInsert - /// ensures that node(Level) is real by moving back to the last node at Level, - /// and setting offset(Level) to size(Level) if required. - /// @param Level The level where an insertion is about to take place. - void legalizeForInsert(unsigned Level) { - if (valid()) - return; - moveLeft(Level); - ++path[Level].offset; - } -}; - -} // namespace IntervalMapImpl - - -//===----------------------------------------------------------------------===// -//--- IntervalMap ----// -//===----------------------------------------------------------------------===// - -template ::LeafSize, - typename Traits = IntervalMapInfo > -class IntervalMap { - typedef IntervalMapImpl::NodeSizer Sizer; - typedef IntervalMapImpl::LeafNode Leaf; - typedef IntervalMapImpl::BranchNode - Branch; - typedef IntervalMapImpl::LeafNode RootLeaf; - typedef IntervalMapImpl::IdxPair IdxPair; - - // The RootLeaf capacity is given as a template parameter. We must compute the - // corresponding RootBranch capacity. - enum { - DesiredRootBranchCap = (sizeof(RootLeaf) - sizeof(KeyT)) / - (sizeof(KeyT) + sizeof(IntervalMapImpl::NodeRef)), - RootBranchCap = DesiredRootBranchCap ? DesiredRootBranchCap : 1 - }; - - typedef IntervalMapImpl::BranchNode - RootBranch; - - // When branched, we store a global start key as well as the branch node. - struct RootBranchData { - KeyT start; - RootBranch node; - }; - -public: - typedef typename Sizer::Allocator Allocator; - typedef KeyT KeyType; - typedef ValT ValueType; - typedef Traits KeyTraits; - -private: - // The root data is either a RootLeaf or a RootBranchData instance. - AlignedCharArrayUnion data; - - // Tree height. - // 0: Leaves in root. - // 1: Root points to leaf. - // 2: root->branch->leaf ... - unsigned height; - - // Number of entries in the root node. - unsigned rootSize; - - // Allocator used for creating external nodes. - Allocator &allocator; - - /// dataAs - Represent data as a node type without breaking aliasing rules. - template - T &dataAs() const { - union { - const char *d; - T *t; - } u; - u.d = data.buffer; - return *u.t; - } - - const RootLeaf &rootLeaf() const { - assert(!branched() && "Cannot acces leaf data in branched root"); - return dataAs(); - } - RootLeaf &rootLeaf() { - assert(!branched() && "Cannot acces leaf data in branched root"); - return dataAs(); - } - RootBranchData &rootBranchData() const { - assert(branched() && "Cannot access branch data in non-branched root"); - return dataAs(); - } - RootBranchData &rootBranchData() { - assert(branched() && "Cannot access branch data in non-branched root"); - return dataAs(); - } - const RootBranch &rootBranch() const { return rootBranchData().node; } - RootBranch &rootBranch() { return rootBranchData().node; } - KeyT rootBranchStart() const { return rootBranchData().start; } - KeyT &rootBranchStart() { return rootBranchData().start; } - - template NodeT *newNode() { - return new(allocator.template Allocate()) NodeT(); - } - - template void deleteNode(NodeT *P) { - P->~NodeT(); - allocator.Deallocate(P); - } - - IdxPair branchRoot(unsigned Position); - IdxPair splitRoot(unsigned Position); - - void switchRootToBranch() { - rootLeaf().~RootLeaf(); - height = 1; - new (&rootBranchData()) RootBranchData(); - } - - void switchRootToLeaf() { - rootBranchData().~RootBranchData(); - height = 0; - new(&rootLeaf()) RootLeaf(); - } - - bool branched() const { return height > 0; } - - ValT treeSafeLookup(KeyT x, ValT NotFound) const; - void visitNodes(void (IntervalMap::*f)(IntervalMapImpl::NodeRef, - unsigned Level)); - void deleteNode(IntervalMapImpl::NodeRef Node, unsigned Level); - -public: - explicit IntervalMap(Allocator &a) : height(0), rootSize(0), allocator(a) { - assert((uintptr_t(data.buffer) & (alignOf() - 1)) == 0 && - "Insufficient alignment"); - new(&rootLeaf()) RootLeaf(); - } - - ~IntervalMap() { - clear(); - rootLeaf().~RootLeaf(); - } - - /// empty - Return true when no intervals are mapped. - bool empty() const { - return rootSize == 0; - } - - /// start - Return the smallest mapped key in a non-empty map. - KeyT start() const { - assert(!empty() && "Empty IntervalMap has no start"); - return !branched() ? rootLeaf().start(0) : rootBranchStart(); - } - - /// stop - Return the largest mapped key in a non-empty map. - KeyT stop() const { - assert(!empty() && "Empty IntervalMap has no stop"); - return !branched() ? rootLeaf().stop(rootSize - 1) : - rootBranch().stop(rootSize - 1); - } - - /// lookup - Return the mapped value at x or NotFound. - ValT lookup(KeyT x, ValT NotFound = ValT()) const { - if (empty() || Traits::startLess(x, start()) || Traits::stopLess(stop(), x)) - return NotFound; - return branched() ? treeSafeLookup(x, NotFound) : - rootLeaf().safeLookup(x, NotFound); - } - - /// insert - Add a mapping of [a;b] to y, coalesce with adjacent intervals. - /// It is assumed that no key in the interval is mapped to another value, but - /// overlapping intervals already mapped to y will be coalesced. - void insert(KeyT a, KeyT b, ValT y) { - if (branched() || rootSize == RootLeaf::Capacity) - return find(a).insert(a, b, y); - - // Easy insert into root leaf. - unsigned p = rootLeaf().findFrom(0, rootSize, a); - rootSize = rootLeaf().insertFrom(p, rootSize, a, b, y); - } - - /// clear - Remove all entries. - void clear(); - - class const_iterator; - class iterator; - friend class const_iterator; - friend class iterator; - - const_iterator begin() const { - const_iterator I(*this); - I.goToBegin(); - return I; - } - - iterator begin() { - iterator I(*this); - I.goToBegin(); - return I; - } - - const_iterator end() const { - const_iterator I(*this); - I.goToEnd(); - return I; - } - - iterator end() { - iterator I(*this); - I.goToEnd(); - return I; - } - - /// find - Return an iterator pointing to the first interval ending at or - /// after x, or end(). - const_iterator find(KeyT x) const { - const_iterator I(*this); - I.find(x); - return I; - } - - iterator find(KeyT x) { - iterator I(*this); - I.find(x); - return I; - } -}; - -/// treeSafeLookup - Return the mapped value at x or NotFound, assuming a -/// branched root. -template -ValT IntervalMap:: -treeSafeLookup(KeyT x, ValT NotFound) const { - assert(branched() && "treeLookup assumes a branched root"); - - IntervalMapImpl::NodeRef NR = rootBranch().safeLookup(x); - for (unsigned h = height-1; h; --h) - NR = NR.get().safeLookup(x); - return NR.get().safeLookup(x, NotFound); -} - - -// branchRoot - Switch from a leaf root to a branched root. -// Return the new (root offset, node offset) corresponding to Position. -template -IntervalMapImpl::IdxPair IntervalMap:: -branchRoot(unsigned Position) { - using namespace IntervalMapImpl; - // How many external leaf nodes to hold RootLeaf+1? - const unsigned Nodes = RootLeaf::Capacity / Leaf::Capacity + 1; - - // Compute element distribution among new nodes. - unsigned size[Nodes]; - IdxPair NewOffset(0, Position); - - // Is is very common for the root node to be smaller than external nodes. - if (Nodes == 1) - size[0] = rootSize; - else - NewOffset = distribute(Nodes, rootSize, Leaf::Capacity, nullptr, size, - Position, true); - - // Allocate new nodes. - unsigned pos = 0; - NodeRef node[Nodes]; - for (unsigned n = 0; n != Nodes; ++n) { - Leaf *L = newNode(); - L->copy(rootLeaf(), pos, 0, size[n]); - node[n] = NodeRef(L, size[n]); - pos += size[n]; - } - - // Destroy the old leaf node, construct branch node instead. - switchRootToBranch(); - for (unsigned n = 0; n != Nodes; ++n) { - rootBranch().stop(n) = node[n].template get().stop(size[n]-1); - rootBranch().subtree(n) = node[n]; - } - rootBranchStart() = node[0].template get().start(0); - rootSize = Nodes; - return NewOffset; -} - -// splitRoot - Split the current BranchRoot into multiple Branch nodes. -// Return the new (root offset, node offset) corresponding to Position. -template -IntervalMapImpl::IdxPair IntervalMap:: -splitRoot(unsigned Position) { - using namespace IntervalMapImpl; - // How many external leaf nodes to hold RootBranch+1? - const unsigned Nodes = RootBranch::Capacity / Branch::Capacity + 1; - - // Compute element distribution among new nodes. - unsigned Size[Nodes]; - IdxPair NewOffset(0, Position); - - // Is is very common for the root node to be smaller than external nodes. - if (Nodes == 1) - Size[0] = rootSize; - else - NewOffset = distribute(Nodes, rootSize, Leaf::Capacity, nullptr, Size, - Position, true); - - // Allocate new nodes. - unsigned Pos = 0; - NodeRef Node[Nodes]; - for (unsigned n = 0; n != Nodes; ++n) { - Branch *B = newNode(); - B->copy(rootBranch(), Pos, 0, Size[n]); - Node[n] = NodeRef(B, Size[n]); - Pos += Size[n]; - } - - for (unsigned n = 0; n != Nodes; ++n) { - rootBranch().stop(n) = Node[n].template get().stop(Size[n]-1); - rootBranch().subtree(n) = Node[n]; - } - rootSize = Nodes; - ++height; - return NewOffset; -} - -/// visitNodes - Visit each external node. -template -void IntervalMap:: -visitNodes(void (IntervalMap::*f)(IntervalMapImpl::NodeRef, unsigned Height)) { - if (!branched()) - return; - SmallVector Refs, NextRefs; - - // Collect level 0 nodes from the root. - for (unsigned i = 0; i != rootSize; ++i) - Refs.push_back(rootBranch().subtree(i)); - - // Visit all branch nodes. - for (unsigned h = height - 1; h; --h) { - for (unsigned i = 0, e = Refs.size(); i != e; ++i) { - for (unsigned j = 0, s = Refs[i].size(); j != s; ++j) - NextRefs.push_back(Refs[i].subtree(j)); - (this->*f)(Refs[i], h); - } - Refs.clear(); - Refs.swap(NextRefs); - } - - // Visit all leaf nodes. - for (unsigned i = 0, e = Refs.size(); i != e; ++i) - (this->*f)(Refs[i], 0); -} - -template -void IntervalMap:: -deleteNode(IntervalMapImpl::NodeRef Node, unsigned Level) { - if (Level) - deleteNode(&Node.get()); - else - deleteNode(&Node.get()); -} - -template -void IntervalMap:: -clear() { - if (branched()) { - visitNodes(&IntervalMap::deleteNode); - switchRootToLeaf(); - } - rootSize = 0; -} - -//===----------------------------------------------------------------------===// -//--- IntervalMap::const_iterator ----// -//===----------------------------------------------------------------------===// - -template -class IntervalMap::const_iterator : - public std::iterator { -protected: - friend class IntervalMap; - - // The map referred to. - IntervalMap *map; - - // We store a full path from the root to the current position. - // The path may be partially filled, but never between iterator calls. - IntervalMapImpl::Path path; - - explicit const_iterator(const IntervalMap &map) : - map(const_cast(&map)) {} - - bool branched() const { - assert(map && "Invalid iterator"); - return map->branched(); - } - - void setRoot(unsigned Offset) { - if (branched()) - path.setRoot(&map->rootBranch(), map->rootSize, Offset); - else - path.setRoot(&map->rootLeaf(), map->rootSize, Offset); - } - - void pathFillFind(KeyT x); - void treeFind(KeyT x); - void treeAdvanceTo(KeyT x); - - /// unsafeStart - Writable access to start() for iterator. - KeyT &unsafeStart() const { - assert(valid() && "Cannot access invalid iterator"); - return branched() ? path.leaf().start(path.leafOffset()) : - path.leaf().start(path.leafOffset()); - } - - /// unsafeStop - Writable access to stop() for iterator. - KeyT &unsafeStop() const { - assert(valid() && "Cannot access invalid iterator"); - return branched() ? path.leaf().stop(path.leafOffset()) : - path.leaf().stop(path.leafOffset()); - } - - /// unsafeValue - Writable access to value() for iterator. - ValT &unsafeValue() const { - assert(valid() && "Cannot access invalid iterator"); - return branched() ? path.leaf().value(path.leafOffset()) : - path.leaf().value(path.leafOffset()); - } - -public: - /// const_iterator - Create an iterator that isn't pointing anywhere. - const_iterator() : map(nullptr) {} - - /// setMap - Change the map iterated over. This call must be followed by a - /// call to goToBegin(), goToEnd(), or find() - void setMap(const IntervalMap &m) { map = const_cast(&m); } - - /// valid - Return true if the current position is valid, false for end(). - bool valid() const { return path.valid(); } - - /// atBegin - Return true if the current position is the first map entry. - bool atBegin() const { return path.atBegin(); } - - /// start - Return the beginning of the current interval. - const KeyT &start() const { return unsafeStart(); } - - /// stop - Return the end of the current interval. - const KeyT &stop() const { return unsafeStop(); } - - /// value - Return the mapped value at the current interval. - const ValT &value() const { return unsafeValue(); } - - const ValT &operator*() const { return value(); } - - bool operator==(const const_iterator &RHS) const { - assert(map == RHS.map && "Cannot compare iterators from different maps"); - if (!valid()) - return !RHS.valid(); - if (path.leafOffset() != RHS.path.leafOffset()) - return false; - return &path.template leaf() == &RHS.path.template leaf(); - } - - bool operator!=(const const_iterator &RHS) const { - return !operator==(RHS); - } - - /// goToBegin - Move to the first interval in map. - void goToBegin() { - setRoot(0); - if (branched()) - path.fillLeft(map->height); - } - - /// goToEnd - Move beyond the last interval in map. - void goToEnd() { - setRoot(map->rootSize); - } - - /// preincrement - move to the next interval. - const_iterator &operator++() { - assert(valid() && "Cannot increment end()"); - if (++path.leafOffset() == path.leafSize() && branched()) - path.moveRight(map->height); - return *this; - } - - /// postincrement - Dont do that! - const_iterator operator++(int) { - const_iterator tmp = *this; - operator++(); - return tmp; - } - - /// predecrement - move to the previous interval. - const_iterator &operator--() { - if (path.leafOffset() && (valid() || !branched())) - --path.leafOffset(); - else - path.moveLeft(map->height); - return *this; - } - - /// postdecrement - Dont do that! - const_iterator operator--(int) { - const_iterator tmp = *this; - operator--(); - return tmp; - } - - /// find - Move to the first interval with stop >= x, or end(). - /// This is a full search from the root, the current position is ignored. - void find(KeyT x) { - if (branched()) - treeFind(x); - else - setRoot(map->rootLeaf().findFrom(0, map->rootSize, x)); - } - - /// advanceTo - Move to the first interval with stop >= x, or end(). - /// The search is started from the current position, and no earlier positions - /// can be found. This is much faster than find() for small moves. - void advanceTo(KeyT x) { - if (!valid()) - return; - if (branched()) - treeAdvanceTo(x); - else - path.leafOffset() = - map->rootLeaf().findFrom(path.leafOffset(), map->rootSize, x); - } - -}; - -/// pathFillFind - Complete path by searching for x. -/// @param x Key to search for. -template -void IntervalMap:: -const_iterator::pathFillFind(KeyT x) { - IntervalMapImpl::NodeRef NR = path.subtree(path.height()); - for (unsigned i = map->height - path.height() - 1; i; --i) { - unsigned p = NR.get().safeFind(0, x); - path.push(NR, p); - NR = NR.subtree(p); - } - path.push(NR, NR.get().safeFind(0, x)); -} - -/// treeFind - Find in a branched tree. -/// @param x Key to search for. -template -void IntervalMap:: -const_iterator::treeFind(KeyT x) { - setRoot(map->rootBranch().findFrom(0, map->rootSize, x)); - if (valid()) - pathFillFind(x); -} - -/// treeAdvanceTo - Find position after the current one. -/// @param x Key to search for. -template -void IntervalMap:: -const_iterator::treeAdvanceTo(KeyT x) { - // Can we stay on the same leaf node? - if (!Traits::stopLess(path.leaf().stop(path.leafSize() - 1), x)) { - path.leafOffset() = path.leaf().safeFind(path.leafOffset(), x); - return; - } - - // Drop the current leaf. - path.pop(); - - // Search towards the root for a usable subtree. - if (path.height()) { - for (unsigned l = path.height() - 1; l; --l) { - if (!Traits::stopLess(path.node(l).stop(path.offset(l)), x)) { - // The branch node at l+1 is usable - path.offset(l + 1) = - path.node(l + 1).safeFind(path.offset(l + 1), x); - return pathFillFind(x); - } - path.pop(); - } - // Is the level-1 Branch usable? - if (!Traits::stopLess(map->rootBranch().stop(path.offset(0)), x)) { - path.offset(1) = path.node(1).safeFind(path.offset(1), x); - return pathFillFind(x); - } - } - - // We reached the root. - setRoot(map->rootBranch().findFrom(path.offset(0), map->rootSize, x)); - if (valid()) - pathFillFind(x); -} - -//===----------------------------------------------------------------------===// -//--- IntervalMap::iterator ----// -//===----------------------------------------------------------------------===// - -template -class IntervalMap::iterator : public const_iterator { - friend class IntervalMap; - typedef IntervalMapImpl::IdxPair IdxPair; - - explicit iterator(IntervalMap &map) : const_iterator(map) {} - - void setNodeStop(unsigned Level, KeyT Stop); - bool insertNode(unsigned Level, IntervalMapImpl::NodeRef Node, KeyT Stop); - template bool overflow(unsigned Level); - void treeInsert(KeyT a, KeyT b, ValT y); - void eraseNode(unsigned Level); - void treeErase(bool UpdateRoot = true); - bool canCoalesceLeft(KeyT Start, ValT x); - bool canCoalesceRight(KeyT Stop, ValT x); - -public: - /// iterator - Create null iterator. - iterator() {} - - /// setStart - Move the start of the current interval. - /// This may cause coalescing with the previous interval. - /// @param a New start key, must not overlap the previous interval. - void setStart(KeyT a); - - /// setStop - Move the end of the current interval. - /// This may cause coalescing with the following interval. - /// @param b New stop key, must not overlap the following interval. - void setStop(KeyT b); - - /// setValue - Change the mapped value of the current interval. - /// This may cause coalescing with the previous and following intervals. - /// @param x New value. - void setValue(ValT x); - - /// setStartUnchecked - Move the start of the current interval without - /// checking for coalescing or overlaps. - /// This should only be used when it is known that coalescing is not required. - /// @param a New start key. - void setStartUnchecked(KeyT a) { this->unsafeStart() = a; } - - /// setStopUnchecked - Move the end of the current interval without checking - /// for coalescing or overlaps. - /// This should only be used when it is known that coalescing is not required. - /// @param b New stop key. - void setStopUnchecked(KeyT b) { - this->unsafeStop() = b; - // Update keys in branch nodes as well. - if (this->path.atLastEntry(this->path.height())) - setNodeStop(this->path.height(), b); - } - - /// setValueUnchecked - Change the mapped value of the current interval - /// without checking for coalescing. - /// @param x New value. - void setValueUnchecked(ValT x) { this->unsafeValue() = x; } - - /// insert - Insert mapping [a;b] -> y before the current position. - void insert(KeyT a, KeyT b, ValT y); - - /// erase - Erase the current interval. - void erase(); - - iterator &operator++() { - const_iterator::operator++(); - return *this; - } - - iterator operator++(int) { - iterator tmp = *this; - operator++(); - return tmp; - } - - iterator &operator--() { - const_iterator::operator--(); - return *this; - } - - iterator operator--(int) { - iterator tmp = *this; - operator--(); - return tmp; - } - -}; - -/// canCoalesceLeft - Can the current interval coalesce to the left after -/// changing start or value? -/// @param Start New start of current interval. -/// @param Value New value for current interval. -/// @return True when updating the current interval would enable coalescing. -template -bool IntervalMap:: -iterator::canCoalesceLeft(KeyT Start, ValT Value) { - using namespace IntervalMapImpl; - Path &P = this->path; - if (!this->branched()) { - unsigned i = P.leafOffset(); - RootLeaf &Node = P.leaf(); - return i && Node.value(i-1) == Value && - Traits::adjacent(Node.stop(i-1), Start); - } - // Branched. - if (unsigned i = P.leafOffset()) { - Leaf &Node = P.leaf(); - return Node.value(i-1) == Value && Traits::adjacent(Node.stop(i-1), Start); - } else if (NodeRef NR = P.getLeftSibling(P.height())) { - unsigned i = NR.size() - 1; - Leaf &Node = NR.get(); - return Node.value(i) == Value && Traits::adjacent(Node.stop(i), Start); - } - return false; -} - -/// canCoalesceRight - Can the current interval coalesce to the right after -/// changing stop or value? -/// @param Stop New stop of current interval. -/// @param Value New value for current interval. -/// @return True when updating the current interval would enable coalescing. -template -bool IntervalMap:: -iterator::canCoalesceRight(KeyT Stop, ValT Value) { - using namespace IntervalMapImpl; - Path &P = this->path; - unsigned i = P.leafOffset() + 1; - if (!this->branched()) { - if (i >= P.leafSize()) - return false; - RootLeaf &Node = P.leaf(); - return Node.value(i) == Value && Traits::adjacent(Stop, Node.start(i)); - } - // Branched. - if (i < P.leafSize()) { - Leaf &Node = P.leaf(); - return Node.value(i) == Value && Traits::adjacent(Stop, Node.start(i)); - } else if (NodeRef NR = P.getRightSibling(P.height())) { - Leaf &Node = NR.get(); - return Node.value(0) == Value && Traits::adjacent(Stop, Node.start(0)); - } - return false; -} - -/// setNodeStop - Update the stop key of the current node at level and above. -template -void IntervalMap:: -iterator::setNodeStop(unsigned Level, KeyT Stop) { - // There are no references to the root node, so nothing to update. - if (!Level) - return; - IntervalMapImpl::Path &P = this->path; - // Update nodes pointing to the current node. - while (--Level) { - P.node(Level).stop(P.offset(Level)) = Stop; - if (!P.atLastEntry(Level)) - return; - } - // Update root separately since it has a different layout. - P.node(Level).stop(P.offset(Level)) = Stop; -} - -template -void IntervalMap:: -iterator::setStart(KeyT a) { - assert(Traits::stopLess(a, this->stop()) && "Cannot move start beyond stop"); - KeyT &CurStart = this->unsafeStart(); - if (!Traits::startLess(a, CurStart) || !canCoalesceLeft(a, this->value())) { - CurStart = a; - return; - } - // Coalesce with the interval to the left. - --*this; - a = this->start(); - erase(); - setStartUnchecked(a); -} - -template -void IntervalMap:: -iterator::setStop(KeyT b) { - assert(Traits::stopLess(this->start(), b) && "Cannot move stop beyond start"); - if (Traits::startLess(b, this->stop()) || - !canCoalesceRight(b, this->value())) { - setStopUnchecked(b); - return; - } - // Coalesce with interval to the right. - KeyT a = this->start(); - erase(); - setStartUnchecked(a); -} - -template -void IntervalMap:: -iterator::setValue(ValT x) { - setValueUnchecked(x); - if (canCoalesceRight(this->stop(), x)) { - KeyT a = this->start(); - erase(); - setStartUnchecked(a); - } - if (canCoalesceLeft(this->start(), x)) { - --*this; - KeyT a = this->start(); - erase(); - setStartUnchecked(a); - } -} - -/// insertNode - insert a node before the current path at level. -/// Leave the current path pointing at the new node. -/// @param Level path index of the node to be inserted. -/// @param Node The node to be inserted. -/// @param Stop The last index in the new node. -/// @return True if the tree height was increased. -template -bool IntervalMap:: -iterator::insertNode(unsigned Level, IntervalMapImpl::NodeRef Node, KeyT Stop) { - assert(Level && "Cannot insert next to the root"); - bool SplitRoot = false; - IntervalMap &IM = *this->map; - IntervalMapImpl::Path &P = this->path; - - if (Level == 1) { - // Insert into the root branch node. - if (IM.rootSize < RootBranch::Capacity) { - IM.rootBranch().insert(P.offset(0), IM.rootSize, Node, Stop); - P.setSize(0, ++IM.rootSize); - P.reset(Level); - return SplitRoot; - } - - // We need to split the root while keeping our position. - SplitRoot = true; - IdxPair Offset = IM.splitRoot(P.offset(0)); - P.replaceRoot(&IM.rootBranch(), IM.rootSize, Offset); - - // Fall through to insert at the new higher level. - ++Level; - } - - // When inserting before end(), make sure we have a valid path. - P.legalizeForInsert(--Level); - - // Insert into the branch node at Level-1. - if (P.size(Level) == Branch::Capacity) { - // Branch node is full, handle handle the overflow. - assert(!SplitRoot && "Cannot overflow after splitting the root"); - SplitRoot = overflow(Level); - Level += SplitRoot; - } - P.node(Level).insert(P.offset(Level), P.size(Level), Node, Stop); - P.setSize(Level, P.size(Level) + 1); - if (P.atLastEntry(Level)) - setNodeStop(Level, Stop); - P.reset(Level + 1); - return SplitRoot; -} - -// insert -template -void IntervalMap:: -iterator::insert(KeyT a, KeyT b, ValT y) { - if (this->branched()) - return treeInsert(a, b, y); - IntervalMap &IM = *this->map; - IntervalMapImpl::Path &P = this->path; - - // Try simple root leaf insert. - unsigned Size = IM.rootLeaf().insertFrom(P.leafOffset(), IM.rootSize, a, b, y); - - // Was the root node insert successful? - if (Size <= RootLeaf::Capacity) { - P.setSize(0, IM.rootSize = Size); - return; - } - - // Root leaf node is full, we must branch. - IdxPair Offset = IM.branchRoot(P.leafOffset()); - P.replaceRoot(&IM.rootBranch(), IM.rootSize, Offset); - - // Now it fits in the new leaf. - treeInsert(a, b, y); -} - - -template -void IntervalMap:: -iterator::treeInsert(KeyT a, KeyT b, ValT y) { - using namespace IntervalMapImpl; - Path &P = this->path; - - if (!P.valid()) - P.legalizeForInsert(this->map->height); - - // Check if this insertion will extend the node to the left. - if (P.leafOffset() == 0 && Traits::startLess(a, P.leaf().start(0))) { - // Node is growing to the left, will it affect a left sibling node? - if (NodeRef Sib = P.getLeftSibling(P.height())) { - Leaf &SibLeaf = Sib.get(); - unsigned SibOfs = Sib.size() - 1; - if (SibLeaf.value(SibOfs) == y && - Traits::adjacent(SibLeaf.stop(SibOfs), a)) { - // This insertion will coalesce with the last entry in SibLeaf. We can - // handle it in two ways: - // 1. Extend SibLeaf.stop to b and be done, or - // 2. Extend a to SibLeaf, erase the SibLeaf entry and continue. - // We prefer 1., but need 2 when coalescing to the right as well. - Leaf &CurLeaf = P.leaf(); - P.moveLeft(P.height()); - if (Traits::stopLess(b, CurLeaf.start(0)) && - (y != CurLeaf.value(0) || !Traits::adjacent(b, CurLeaf.start(0)))) { - // Easy, just extend SibLeaf and we're done. - setNodeStop(P.height(), SibLeaf.stop(SibOfs) = b); - return; - } else { - // We have both left and right coalescing. Erase the old SibLeaf entry - // and continue inserting the larger interval. - a = SibLeaf.start(SibOfs); - treeErase(/* UpdateRoot= */false); - } - } - } else { - // No left sibling means we are at begin(). Update cached bound. - this->map->rootBranchStart() = a; - } - } - - // When we are inserting at the end of a leaf node, we must update stops. - unsigned Size = P.leafSize(); - bool Grow = P.leafOffset() == Size; - Size = P.leaf().insertFrom(P.leafOffset(), Size, a, b, y); - - // Leaf insertion unsuccessful? Overflow and try again. - if (Size > Leaf::Capacity) { - overflow(P.height()); - Grow = P.leafOffset() == P.leafSize(); - Size = P.leaf().insertFrom(P.leafOffset(), P.leafSize(), a, b, y); - assert(Size <= Leaf::Capacity && "overflow() didn't make room"); - } - - // Inserted, update offset and leaf size. - P.setSize(P.height(), Size); - - // Insert was the last node entry, update stops. - if (Grow) - setNodeStop(P.height(), b); -} - -/// erase - erase the current interval and move to the next position. -template -void IntervalMap:: -iterator::erase() { - IntervalMap &IM = *this->map; - IntervalMapImpl::Path &P = this->path; - assert(P.valid() && "Cannot erase end()"); - if (this->branched()) - return treeErase(); - IM.rootLeaf().erase(P.leafOffset(), IM.rootSize); - P.setSize(0, --IM.rootSize); -} - -/// treeErase - erase() for a branched tree. -template -void IntervalMap:: -iterator::treeErase(bool UpdateRoot) { - IntervalMap &IM = *this->map; - IntervalMapImpl::Path &P = this->path; - Leaf &Node = P.leaf(); - - // Nodes are not allowed to become empty. - if (P.leafSize() == 1) { - IM.deleteNode(&Node); - eraseNode(IM.height); - // Update rootBranchStart if we erased begin(). - if (UpdateRoot && IM.branched() && P.valid() && P.atBegin()) - IM.rootBranchStart() = P.leaf().start(0); - return; - } - - // Erase current entry. - Node.erase(P.leafOffset(), P.leafSize()); - unsigned NewSize = P.leafSize() - 1; - P.setSize(IM.height, NewSize); - // When we erase the last entry, update stop and move to a legal position. - if (P.leafOffset() == NewSize) { - setNodeStop(IM.height, Node.stop(NewSize - 1)); - P.moveRight(IM.height); - } else if (UpdateRoot && P.atBegin()) - IM.rootBranchStart() = P.leaf().start(0); -} - -/// eraseNode - Erase the current node at Level from its parent and move path to -/// the first entry of the next sibling node. -/// The node must be deallocated by the caller. -/// @param Level 1..height, the root node cannot be erased. -template -void IntervalMap:: -iterator::eraseNode(unsigned Level) { - assert(Level && "Cannot erase root node"); - IntervalMap &IM = *this->map; - IntervalMapImpl::Path &P = this->path; - - if (--Level == 0) { - IM.rootBranch().erase(P.offset(0), IM.rootSize); - P.setSize(0, --IM.rootSize); - // If this cleared the root, switch to height=0. - if (IM.empty()) { - IM.switchRootToLeaf(); - this->setRoot(0); - return; - } - } else { - // Remove node ref from branch node at Level. - Branch &Parent = P.node(Level); - if (P.size(Level) == 1) { - // Branch node became empty, remove it recursively. - IM.deleteNode(&Parent); - eraseNode(Level); - } else { - // Branch node won't become empty. - Parent.erase(P.offset(Level), P.size(Level)); - unsigned NewSize = P.size(Level) - 1; - P.setSize(Level, NewSize); - // If we removed the last branch, update stop and move to a legal pos. - if (P.offset(Level) == NewSize) { - setNodeStop(Level, Parent.stop(NewSize - 1)); - P.moveRight(Level); - } - } - } - // Update path cache for the new right sibling position. - if (P.valid()) { - P.reset(Level + 1); - P.offset(Level + 1) = 0; - } -} - -/// overflow - Distribute entries of the current node evenly among -/// its siblings and ensure that the current node is not full. -/// This may require allocating a new node. -/// @tparam NodeT The type of node at Level (Leaf or Branch). -/// @param Level path index of the overflowing node. -/// @return True when the tree height was changed. -template -template -bool IntervalMap:: -iterator::overflow(unsigned Level) { - using namespace IntervalMapImpl; - Path &P = this->path; - unsigned CurSize[4]; - NodeT *Node[4]; - unsigned Nodes = 0; - unsigned Elements = 0; - unsigned Offset = P.offset(Level); - - // Do we have a left sibling? - NodeRef LeftSib = P.getLeftSibling(Level); - if (LeftSib) { - Offset += Elements = CurSize[Nodes] = LeftSib.size(); - Node[Nodes++] = &LeftSib.get(); - } - - // Current node. - Elements += CurSize[Nodes] = P.size(Level); - Node[Nodes++] = &P.node(Level); - - // Do we have a right sibling? - NodeRef RightSib = P.getRightSibling(Level); - if (RightSib) { - Elements += CurSize[Nodes] = RightSib.size(); - Node[Nodes++] = &RightSib.get(); - } - - // Do we need to allocate a new node? - unsigned NewNode = 0; - if (Elements + 1 > Nodes * NodeT::Capacity) { - // Insert NewNode at the penultimate position, or after a single node. - NewNode = Nodes == 1 ? 1 : Nodes - 1; - CurSize[Nodes] = CurSize[NewNode]; - Node[Nodes] = Node[NewNode]; - CurSize[NewNode] = 0; - Node[NewNode] = this->map->template newNode(); - ++Nodes; - } - - // Compute the new element distribution. - unsigned NewSize[4]; - IdxPair NewOffset = distribute(Nodes, Elements, NodeT::Capacity, - CurSize, NewSize, Offset, true); - adjustSiblingSizes(Node, Nodes, CurSize, NewSize); - - // Move current location to the leftmost node. - if (LeftSib) - P.moveLeft(Level); - - // Elements have been rearranged, now update node sizes and stops. - bool SplitRoot = false; - unsigned Pos = 0; - for (;;) { - KeyT Stop = Node[Pos]->stop(NewSize[Pos]-1); - if (NewNode && Pos == NewNode) { - SplitRoot = insertNode(Level, NodeRef(Node[Pos], NewSize[Pos]), Stop); - Level += SplitRoot; - } else { - P.setSize(Level, NewSize[Pos]); - setNodeStop(Level, Stop); - } - if (Pos + 1 == Nodes) - break; - P.moveRight(Level); - ++Pos; - } - - // Where was I? Find NewOffset. - while(Pos != NewOffset.first) { - P.moveLeft(Level); - --Pos; - } - P.offset(Level) = NewOffset.second; - return SplitRoot; -} - -//===----------------------------------------------------------------------===// -//--- IntervalMapOverlaps ----// -//===----------------------------------------------------------------------===// - -/// IntervalMapOverlaps - Iterate over the overlaps of mapped intervals in two -/// IntervalMaps. The maps may be different, but the KeyT and Traits types -/// should be the same. -/// -/// Typical uses: -/// -/// 1. Test for overlap: -/// bool overlap = IntervalMapOverlaps(a, b).valid(); -/// -/// 2. Enumerate overlaps: -/// for (IntervalMapOverlaps I(a, b); I.valid() ; ++I) { ... } -/// -template -class IntervalMapOverlaps { - typedef typename MapA::KeyType KeyType; - typedef typename MapA::KeyTraits Traits; - typename MapA::const_iterator posA; - typename MapB::const_iterator posB; - - /// advance - Move posA and posB forward until reaching an overlap, or until - /// either meets end. - /// Don't move the iterators if they are already overlapping. - void advance() { - if (!valid()) - return; - - if (Traits::stopLess(posA.stop(), posB.start())) { - // A ends before B begins. Catch up. - posA.advanceTo(posB.start()); - if (!posA.valid() || !Traits::stopLess(posB.stop(), posA.start())) - return; - } else if (Traits::stopLess(posB.stop(), posA.start())) { - // B ends before A begins. Catch up. - posB.advanceTo(posA.start()); - if (!posB.valid() || !Traits::stopLess(posA.stop(), posB.start())) - return; - } else - // Already overlapping. - return; - - for (;;) { - // Make a.end > b.start. - posA.advanceTo(posB.start()); - if (!posA.valid() || !Traits::stopLess(posB.stop(), posA.start())) - return; - // Make b.end > a.start. - posB.advanceTo(posA.start()); - if (!posB.valid() || !Traits::stopLess(posA.stop(), posB.start())) - return; - } - } - -public: - /// IntervalMapOverlaps - Create an iterator for the overlaps of a and b. - IntervalMapOverlaps(const MapA &a, const MapB &b) - : posA(b.empty() ? a.end() : a.find(b.start())), - posB(posA.valid() ? b.find(posA.start()) : b.end()) { advance(); } - - /// valid - Return true if iterator is at an overlap. - bool valid() const { - return posA.valid() && posB.valid(); - } - - /// a - access the left hand side in the overlap. - const typename MapA::const_iterator &a() const { return posA; } - - /// b - access the right hand side in the overlap. - const typename MapB::const_iterator &b() const { return posB; } - - /// start - Beginning of the overlapping interval. - KeyType start() const { - KeyType ak = a().start(); - KeyType bk = b().start(); - return Traits::startLess(ak, bk) ? bk : ak; - } - - /// stop - End of the overlapping interval. - KeyType stop() const { - KeyType ak = a().stop(); - KeyType bk = b().stop(); - return Traits::startLess(ak, bk) ? ak : bk; - } - - /// skipA - Move to the next overlap that doesn't involve a(). - void skipA() { - ++posA; - advance(); - } - - /// skipB - Move to the next overlap that doesn't involve b(). - void skipB() { - ++posB; - advance(); - } - - /// Preincrement - Move to the next overlap. - IntervalMapOverlaps &operator++() { - // Bump the iterator that ends first. The other one may have more overlaps. - if (Traits::startLess(posB.stop(), posA.stop())) - skipB(); - else - skipA(); - return *this; - } - - /// advanceTo - Move to the first overlapping interval with - /// stopLess(x, stop()). - void advanceTo(KeyType x) { - if (!valid()) - return; - // Make sure advanceTo sees monotonic keys. - if (Traits::stopLess(posA.stop(), x)) - posA.advanceTo(x); - if (Traits::stopLess(posB.stop(), x)) - posB.advanceTo(x); - advance(); - } -}; - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h b/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h deleted file mode 100644 index 8057ec10..00000000 --- a/llvm/include/llvm/ADT/IntrusiveRefCntPtr.h +++ /dev/null @@ -1,288 +0,0 @@ -//== llvm/ADT/IntrusiveRefCntPtr.h - Smart Refcounting Pointer ---*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines IntrusiveRefCntPtr, a template class that -// implements a "smart" pointer for objects that maintain their own -// internal reference count, and RefCountedBase/RefCountedBaseVPTR, two -// generic base classes for objects that wish to have their lifetimes -// managed using reference counting. -// -// IntrusiveRefCntPtr is similar to Boost's intrusive_ptr with added -// LLVM-style casting. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_INTRUSIVEREFCNTPTR_H -#define LLVM_ADT_INTRUSIVEREFCNTPTR_H - -#include -#include -#include - -namespace llvm { - - template - class IntrusiveRefCntPtr; - -//===----------------------------------------------------------------------===// -/// RefCountedBase - A generic base class for objects that wish to -/// have their lifetimes managed using reference counts. Classes -/// subclass RefCountedBase to obtain such functionality, and are -/// typically handled with IntrusiveRefCntPtr "smart pointers" (see below) -/// which automatically handle the management of reference counts. -/// Objects that subclass RefCountedBase should not be allocated on -/// the stack, as invoking "delete" (which is called when the -/// reference count hits 0) on such objects is an error. -//===----------------------------------------------------------------------===// - template - class RefCountedBase { - mutable unsigned ref_cnt; - - public: - RefCountedBase() : ref_cnt(0) {} - RefCountedBase(const RefCountedBase &) : ref_cnt(0) {} - - void Retain() const { ++ref_cnt; } - void Release() const { - assert (ref_cnt > 0 && "Reference count is already zero."); - if (--ref_cnt == 0) delete static_cast(this); - } - }; - -//===----------------------------------------------------------------------===// -/// RefCountedBaseVPTR - A class that has the same function as -/// RefCountedBase, but with a virtual destructor. Should be used -/// instead of RefCountedBase for classes that already have virtual -/// methods to enforce dynamic allocation via 'new'. Classes that -/// inherit from RefCountedBaseVPTR can't be allocated on stack - -/// attempting to do this will produce a compile error. -//===----------------------------------------------------------------------===// - class RefCountedBaseVPTR { - mutable unsigned ref_cnt; - virtual void anchor(); - - protected: - RefCountedBaseVPTR() : ref_cnt(0) {} - RefCountedBaseVPTR(const RefCountedBaseVPTR &) : ref_cnt(0) {} - - virtual ~RefCountedBaseVPTR() {} - - void Retain() const { ++ref_cnt; } - void Release() const { - assert (ref_cnt > 0 && "Reference count is already zero."); - if (--ref_cnt == 0) delete this; - } - - template - friend struct IntrusiveRefCntPtrInfo; - }; - - - template struct IntrusiveRefCntPtrInfo { - static void retain(T *obj) { obj->Retain(); } - static void release(T *obj) { obj->Release(); } - }; - -/// \brief A thread-safe version of \c llvm::RefCountedBase. -/// -/// A generic base class for objects that wish to have their lifetimes managed -/// using reference counts. Classes subclass \c ThreadSafeRefCountedBase to -/// obtain such functionality, and are typically handled with -/// \c IntrusiveRefCntPtr "smart pointers" which automatically handle the -/// management of reference counts. -template -class ThreadSafeRefCountedBase { - mutable std::atomic RefCount; - -protected: - ThreadSafeRefCountedBase() : RefCount(0) {} - -public: - void Retain() const { ++RefCount; } - - void Release() const { - int NewRefCount = --RefCount; - assert(NewRefCount >= 0 && "Reference count was already zero."); - if (NewRefCount == 0) - delete static_cast(this); - } -}; - -//===----------------------------------------------------------------------===// -/// IntrusiveRefCntPtr - A template class that implements a "smart pointer" -/// that assumes the wrapped object has a reference count associated -/// with it that can be managed via calls to -/// IntrusivePtrAddRef/IntrusivePtrRelease. The smart pointers -/// manage reference counts via the RAII idiom: upon creation of -/// smart pointer the reference count of the wrapped object is -/// incremented and upon destruction of the smart pointer the -/// reference count is decremented. This class also safely handles -/// wrapping NULL pointers. -/// -/// Reference counting is implemented via calls to -/// Obj->Retain()/Obj->Release(). Release() is required to destroy -/// the object when the reference count reaches zero. Inheriting from -/// RefCountedBase/RefCountedBaseVPTR takes care of this -/// automatically. -//===----------------------------------------------------------------------===// - template - class IntrusiveRefCntPtr { - T* Obj; - - public: - typedef T element_type; - - explicit IntrusiveRefCntPtr() : Obj(nullptr) {} - - IntrusiveRefCntPtr(T* obj) : Obj(obj) { - retain(); - } - - IntrusiveRefCntPtr(const IntrusiveRefCntPtr& S) : Obj(S.Obj) { - retain(); - } - - IntrusiveRefCntPtr(IntrusiveRefCntPtr&& S) : Obj(S.Obj) { - S.Obj = nullptr; - } - - template - IntrusiveRefCntPtr(IntrusiveRefCntPtr&& S) : Obj(S.get()) { - S.Obj = nullptr; - } - - template - IntrusiveRefCntPtr(const IntrusiveRefCntPtr& S) - : Obj(S.get()) { - retain(); - } - - IntrusiveRefCntPtr& operator=(IntrusiveRefCntPtr S) { - swap(S); - return *this; - } - - ~IntrusiveRefCntPtr() { release(); } - - T& operator*() const { return *Obj; } - - T* operator->() const { return Obj; } - - T* get() const { return Obj; } - - explicit operator bool() const { return Obj; } - - void swap(IntrusiveRefCntPtr& other) { - T* tmp = other.Obj; - other.Obj = Obj; - Obj = tmp; - } - - void reset() { - release(); - Obj = nullptr; - } - - void resetWithoutRelease() { - Obj = nullptr; - } - - private: - void retain() { if (Obj) IntrusiveRefCntPtrInfo::retain(Obj); } - void release() { if (Obj) IntrusiveRefCntPtrInfo::release(Obj); } - - template - friend class IntrusiveRefCntPtr; - }; - - template - inline bool operator==(const IntrusiveRefCntPtr& A, - const IntrusiveRefCntPtr& B) - { - return A.get() == B.get(); - } - - template - inline bool operator!=(const IntrusiveRefCntPtr& A, - const IntrusiveRefCntPtr& B) - { - return A.get() != B.get(); - } - - template - inline bool operator==(const IntrusiveRefCntPtr& A, - U* B) - { - return A.get() == B; - } - - template - inline bool operator!=(const IntrusiveRefCntPtr& A, - U* B) - { - return A.get() != B; - } - - template - inline bool operator==(T* A, - const IntrusiveRefCntPtr& B) - { - return A == B.get(); - } - - template - inline bool operator!=(T* A, - const IntrusiveRefCntPtr& B) - { - return A != B.get(); - } - - template - bool operator==(std::nullptr_t A, const IntrusiveRefCntPtr &B) { - return !B; - } - - template - bool operator==(const IntrusiveRefCntPtr &A, std::nullptr_t B) { - return B == A; - } - - template - bool operator!=(std::nullptr_t A, const IntrusiveRefCntPtr &B) { - return !(A == B); - } - - template - bool operator!=(const IntrusiveRefCntPtr &A, std::nullptr_t B) { - return !(A == B); - } - -//===----------------------------------------------------------------------===// -// LLVM-style downcasting support for IntrusiveRefCntPtr objects -//===----------------------------------------------------------------------===// - - template struct simplify_type; - - template struct simplify_type > { - typedef T* SimpleType; - static SimpleType getSimplifiedValue(IntrusiveRefCntPtr& Val) { - return Val.get(); - } - }; - - template struct simplify_type > { - typedef /*const*/ T* SimpleType; - static SimpleType getSimplifiedValue(const IntrusiveRefCntPtr& Val) { - return Val.get(); - } - }; - -} // end namespace llvm - -#endif // LLVM_ADT_INTRUSIVEREFCNTPTR_H diff --git a/llvm/include/llvm/ADT/MapVector.h b/llvm/include/llvm/ADT/MapVector.h deleted file mode 100644 index f19a50b7..00000000 --- a/llvm/include/llvm/ADT/MapVector.h +++ /dev/null @@ -1,200 +0,0 @@ -//===- llvm/ADT/MapVector.h - Map w/ deterministic value order --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements a map that provides insertion order iteration. The -// interface is purposefully minimal. The key is assumed to be cheap to copy -// and 2 copies are kept, one for indexing in a DenseMap, one for iteration in -// a std::vector. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_MAPVECTOR_H -#define LLVM_ADT_MAPVECTOR_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" -#include - -namespace llvm { - -/// This class implements a map that also provides access to all stored values -/// in a deterministic order. The values are kept in a std::vector and the -/// mapping is done with DenseMap from Keys to indexes in that vector. -template, - typename VectorType = std::vector > > -class MapVector { - typedef typename VectorType::size_type size_type; - - MapType Map; - VectorType Vector; - -public: - typedef typename VectorType::iterator iterator; - typedef typename VectorType::const_iterator const_iterator; - typedef typename VectorType::reverse_iterator reverse_iterator; - typedef typename VectorType::const_reverse_iterator const_reverse_iterator; - - size_type size() const { return Vector.size(); } - - iterator begin() { return Vector.begin(); } - const_iterator begin() const { return Vector.begin(); } - iterator end() { return Vector.end(); } - const_iterator end() const { return Vector.end(); } - - reverse_iterator rbegin() { return Vector.rbegin(); } - const_reverse_iterator rbegin() const { return Vector.rbegin(); } - reverse_iterator rend() { return Vector.rend(); } - const_reverse_iterator rend() const { return Vector.rend(); } - - bool empty() const { - return Vector.empty(); - } - - std::pair &front() { return Vector.front(); } - const std::pair &front() const { return Vector.front(); } - std::pair &back() { return Vector.back(); } - const std::pair &back() const { return Vector.back(); } - - void clear() { - Map.clear(); - Vector.clear(); - } - - void swap(MapVector &RHS) { - std::swap(Map, RHS.Map); - std::swap(Vector, RHS.Vector); - } - - ValueT &operator[](const KeyT &Key) { - std::pair Pair = std::make_pair(Key, 0); - std::pair Result = Map.insert(Pair); - unsigned &I = Result.first->second; - if (Result.second) { - Vector.push_back(std::make_pair(Key, ValueT())); - I = Vector.size() - 1; - } - return Vector[I].second; - } - - ValueT lookup(const KeyT &Key) const { - typename MapType::const_iterator Pos = Map.find(Key); - return Pos == Map.end()? ValueT() : Vector[Pos->second].second; - } - - std::pair insert(const std::pair &KV) { - std::pair Pair = std::make_pair(KV.first, 0); - std::pair Result = Map.insert(Pair); - unsigned &I = Result.first->second; - if (Result.second) { - Vector.push_back(std::make_pair(KV.first, KV.second)); - I = Vector.size() - 1; - return std::make_pair(std::prev(end()), true); - } - return std::make_pair(begin() + I, false); - } - - size_type count(const KeyT &Key) const { - typename MapType::const_iterator Pos = Map.find(Key); - return Pos == Map.end()? 0 : 1; - } - - iterator find(const KeyT &Key) { - typename MapType::const_iterator Pos = Map.find(Key); - return Pos == Map.end()? Vector.end() : - (Vector.begin() + Pos->second); - } - - const_iterator find(const KeyT &Key) const { - typename MapType::const_iterator Pos = Map.find(Key); - return Pos == Map.end()? Vector.end() : - (Vector.begin() + Pos->second); - } - - /// \brief Remove the last element from the vector. - void pop_back() { - typename MapType::iterator Pos = Map.find(Vector.back().first); - Map.erase(Pos); - Vector.pop_back(); - } - - /// \brief Remove the element given by Iterator. - /// - /// Returns an iterator to the element following the one which was removed, - /// which may be end(). - /// - /// \note This is a deceivingly expensive operation (linear time). It's - /// usually better to use \a remove_if() if possible. - typename VectorType::iterator erase(typename VectorType::iterator Iterator) { - Map.erase(Iterator->first); - auto Next = Vector.erase(Iterator); - if (Next == Vector.end()) - return Next; - - // Update indices in the map. - size_t Index = Next - Vector.begin(); - for (auto &I : Map) { - assert(I.second != Index && "Index was already erased!"); - if (I.second > Index) - --I.second; - } - return Next; - } - - /// \brief Remove all elements with the key value Key. - /// - /// Returns the number of elements removed. - size_type erase(const KeyT &Key) { - auto Iterator = find(Key); - if (Iterator == end()) - return 0; - erase(Iterator); - return 1; - } - - /// \brief Remove the elements that match the predicate. - /// - /// Erase all elements that match \c Pred in a single pass. Takes linear - /// time. - template void remove_if(Predicate Pred); -}; - -template -template -void MapVector::remove_if(Function Pred) { - auto O = Vector.begin(); - for (auto I = O, E = Vector.end(); I != E; ++I) { - if (Pred(*I)) { - // Erase from the map. - Map.erase(I->first); - continue; - } - - if (I != O) { - // Move the value and update the index in the map. - *O = std::move(*I); - Map[O->first] = O - Vector.begin(); - } - ++O; - } - // Erase trailing entries in the vector. - Vector.erase(O, Vector.end()); -} - -/// \brief A MapVector that performs no allocations if smaller than a certain -/// size. -template -struct SmallMapVector - : MapVector, - SmallVector, N>> { -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/None.h b/llvm/include/llvm/ADT/None.h deleted file mode 100644 index d69ec17c..00000000 --- a/llvm/include/llvm/ADT/None.h +++ /dev/null @@ -1,26 +0,0 @@ -//===-- None.h - Simple null value for implicit construction ------*- C++ -*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides None, an enumerator for use in implicit constructors -// of various (usually templated) types to make such construction more -// terse. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_NONE_H -#define LLVM_ADT_NONE_H - -namespace llvm { -/// \brief A simple null object to allow implicit construction of Optional -/// and similar types without having to spell out the specialization's name. -enum class NoneType { None }; -const NoneType None = None; -} - -#endif diff --git a/llvm/include/llvm/ADT/Optional.h b/llvm/include/llvm/ADT/Optional.h deleted file mode 100644 index d9acaf6d..00000000 --- a/llvm/include/llvm/ADT/Optional.h +++ /dev/null @@ -1,228 +0,0 @@ -//===-- Optional.h - Simple variant for passing optional values ---*- C++ -*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides Optional, a template class modeled in the spirit of -// OCaml's 'opt' variant. The idea is to strongly type whether or not -// a value can be optional. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_OPTIONAL_H -#define LLVM_ADT_OPTIONAL_H - -#include "llvm/ADT/None.h" -#include "llvm/Support/AlignOf.h" -#include "llvm/Support/Compiler.h" -#include -#include -#include - -namespace llvm { - -template -class Optional { - AlignedCharArrayUnion storage; - bool hasVal; -public: - typedef T value_type; - - Optional(NoneType) : hasVal(false) {} - explicit Optional() : hasVal(false) {} - Optional(const T &y) : hasVal(true) { - new (storage.buffer) T(y); - } - Optional(const Optional &O) : hasVal(O.hasVal) { - if (hasVal) - new (storage.buffer) T(*O); - } - - Optional(T &&y) : hasVal(true) { - new (storage.buffer) T(std::forward(y)); - } - Optional(Optional &&O) : hasVal(O) { - if (O) { - new (storage.buffer) T(std::move(*O)); - O.reset(); - } - } - Optional &operator=(T &&y) { - if (hasVal) - **this = std::move(y); - else { - new (storage.buffer) T(std::move(y)); - hasVal = true; - } - return *this; - } - Optional &operator=(Optional &&O) { - if (!O) - reset(); - else { - *this = std::move(*O); - O.reset(); - } - return *this; - } - - /// Create a new object by constructing it in place with the given arguments. - template - void emplace(ArgTypes &&...Args) { - reset(); - hasVal = true; - new (storage.buffer) T(std::forward(Args)...); - } - - static inline Optional create(const T* y) { - return y ? Optional(*y) : Optional(); - } - - // FIXME: these assignments (& the equivalent const T&/const Optional& ctors) - // could be made more efficient by passing by value, possibly unifying them - // with the rvalue versions above - but this could place a different set of - // requirements (notably: the existence of a default ctor) when implemented - // in that way. Careful SFINAE to avoid such pitfalls would be required. - Optional &operator=(const T &y) { - if (hasVal) - **this = y; - else { - new (storage.buffer) T(y); - hasVal = true; - } - return *this; - } - - Optional &operator=(const Optional &O) { - if (!O) - reset(); - else - *this = *O; - return *this; - } - - void reset() { - if (hasVal) { - (**this).~T(); - hasVal = false; - } - } - - ~Optional() { - reset(); - } - - const T* getPointer() const { assert(hasVal); return reinterpret_cast(storage.buffer); } - T* getPointer() { assert(hasVal); return reinterpret_cast(storage.buffer); } - const T& getValue() const LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); } - T& getValue() LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); } - - explicit operator bool() const { return hasVal; } - bool hasValue() const { return hasVal; } - const T* operator->() const { return getPointer(); } - T* operator->() { return getPointer(); } - const T& operator*() const LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); } - T& operator*() LLVM_LVALUE_FUNCTION { assert(hasVal); return *getPointer(); } - - template - LLVM_CONSTEXPR T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION { - return hasValue() ? getValue() : std::forward(value); - } - -#if LLVM_HAS_RVALUE_REFERENCE_THIS - T&& getValue() && { assert(hasVal); return std::move(*getPointer()); } - T&& operator*() && { assert(hasVal); return std::move(*getPointer()); } - - template - T getValueOr(U &&value) && { - return hasValue() ? std::move(getValue()) : std::forward(value); - } -#endif -}; - -template struct isPodLike; -template struct isPodLike > { - // An Optional is pod-like if T is. - static const bool value = isPodLike::value; -}; - -/// \brief Poison comparison between two \c Optional objects. Clients needs to -/// explicitly compare the underlying values and account for empty \c Optional -/// objects. -/// -/// This routine will never be defined. It returns \c void to help diagnose -/// errors at compile time. -template -void operator==(const Optional &X, const Optional &Y); - -template -bool operator==(const Optional &X, NoneType) { - return !X.hasValue(); -} - -template -bool operator==(NoneType, const Optional &X) { - return X == None; -} - -template -bool operator!=(const Optional &X, NoneType) { - return !(X == None); -} - -template -bool operator!=(NoneType, const Optional &X) { - return X != None; -} -/// \brief Poison comparison between two \c Optional objects. Clients needs to -/// explicitly compare the underlying values and account for empty \c Optional -/// objects. -/// -/// This routine will never be defined. It returns \c void to help diagnose -/// errors at compile time. -template -void operator!=(const Optional &X, const Optional &Y); - -/// \brief Poison comparison between two \c Optional objects. Clients needs to -/// explicitly compare the underlying values and account for empty \c Optional -/// objects. -/// -/// This routine will never be defined. It returns \c void to help diagnose -/// errors at compile time. -template -void operator<(const Optional &X, const Optional &Y); - -/// \brief Poison comparison between two \c Optional objects. Clients needs to -/// explicitly compare the underlying values and account for empty \c Optional -/// objects. -/// -/// This routine will never be defined. It returns \c void to help diagnose -/// errors at compile time. -template -void operator<=(const Optional &X, const Optional &Y); - -/// \brief Poison comparison between two \c Optional objects. Clients needs to -/// explicitly compare the underlying values and account for empty \c Optional -/// objects. -/// -/// This routine will never be defined. It returns \c void to help diagnose -/// errors at compile time. -template -void operator>=(const Optional &X, const Optional &Y); - -/// \brief Poison comparison between two \c Optional objects. Clients needs to -/// explicitly compare the underlying values and account for empty \c Optional -/// objects. -/// -/// This routine will never be defined. It returns \c void to help diagnose -/// errors at compile time. -template -void operator>(const Optional &X, const Optional &Y); - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/PackedVector.h b/llvm/include/llvm/ADT/PackedVector.h deleted file mode 100644 index 09267173..00000000 --- a/llvm/include/llvm/ADT/PackedVector.h +++ /dev/null @@ -1,149 +0,0 @@ -//===- llvm/ADT/PackedVector.h - Packed values vector -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the PackedVector class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_PACKEDVECTOR_H -#define LLVM_ADT_PACKEDVECTOR_H - -#include "llvm/ADT/BitVector.h" -#include - -namespace llvm { - -template -class PackedVectorBase; - -// This won't be necessary if we can specialize members without specializing -// the parent template. -template -class PackedVectorBase { -protected: - static T getValue(const BitVectorTy &Bits, unsigned Idx) { - T val = T(); - for (unsigned i = 0; i != BitNum; ++i) - val = T(val | ((Bits[(Idx << (BitNum-1)) + i] ? 1UL : 0UL) << i)); - return val; - } - - static void setValue(BitVectorTy &Bits, unsigned Idx, T val) { - assert((val >> BitNum) == 0 && "value is too big"); - for (unsigned i = 0; i != BitNum; ++i) - Bits[(Idx << (BitNum-1)) + i] = val & (T(1) << i); - } -}; - -template -class PackedVectorBase { -protected: - static T getValue(const BitVectorTy &Bits, unsigned Idx) { - T val = T(); - for (unsigned i = 0; i != BitNum-1; ++i) - val = T(val | ((Bits[(Idx << (BitNum-1)) + i] ? 1UL : 0UL) << i)); - if (Bits[(Idx << (BitNum-1)) + BitNum-1]) - val = ~val; - return val; - } - - static void setValue(BitVectorTy &Bits, unsigned Idx, T val) { - if (val < 0) { - val = ~val; - Bits.set((Idx << (BitNum-1)) + BitNum-1); - } - assert((val >> (BitNum-1)) == 0 && "value is too big"); - for (unsigned i = 0; i != BitNum-1; ++i) - Bits[(Idx << (BitNum-1)) + i] = val & (T(1) << i); - } -}; - -/// \brief Store a vector of values using a specific number of bits for each -/// value. Both signed and unsigned types can be used, e.g -/// @code -/// PackedVector vec; -/// @endcode -/// will create a vector accepting values -2, -1, 0, 1. Any other value will hit -/// an assertion. -template -class PackedVector : public PackedVectorBase::is_signed> { - BitVectorTy Bits; - typedef PackedVectorBase::is_signed> base; - -public: - class reference { - PackedVector &Vec; - const unsigned Idx; - - reference(); // Undefined - public: - reference(PackedVector &vec, unsigned idx) : Vec(vec), Idx(idx) {} - - reference &operator=(T val) { - Vec.setValue(Vec.Bits, Idx, val); - return *this; - } - operator T() const { - return Vec.getValue(Vec.Bits, Idx); - } - }; - - PackedVector() = default; - explicit PackedVector(unsigned size) : Bits(size << (BitNum-1)) { } - - bool empty() const { return Bits.empty(); } - - unsigned size() const { return Bits.size() >> (BitNum - 1); } - - void clear() { Bits.clear(); } - - void resize(unsigned N) { Bits.resize(N << (BitNum - 1)); } - - void reserve(unsigned N) { Bits.reserve(N << (BitNum-1)); } - - PackedVector &reset() { - Bits.reset(); - return *this; - } - - void push_back(T val) { - resize(size()+1); - (*this)[size()-1] = val; - } - - reference operator[](unsigned Idx) { - return reference(*this, Idx); - } - - T operator[](unsigned Idx) const { - return base::getValue(Bits, Idx); - } - - bool operator==(const PackedVector &RHS) const { - return Bits == RHS.Bits; - } - - bool operator!=(const PackedVector &RHS) const { - return Bits != RHS.Bits; - } - - PackedVector &operator|=(const PackedVector &RHS) { - Bits |= RHS.Bits; - return *this; - } -}; - -// Leave BitNum=0 undefined. -template class PackedVector; - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/PointerEmbeddedInt.h b/llvm/include/llvm/ADT/PointerEmbeddedInt.h deleted file mode 100644 index 2279d434..00000000 --- a/llvm/include/llvm/ADT/PointerEmbeddedInt.h +++ /dev/null @@ -1,117 +0,0 @@ -//===- llvm/ADT/PointerEmbeddedInt.h ----------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_POINTEREMBEDDEDINT_H -#define LLVM_ADT_POINTEREMBEDDEDINT_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include - -namespace llvm { - -/// Utility to embed an integer into a pointer-like type. This is specifically -/// intended to allow embedding integers where fewer bits are required than -/// exist in a pointer, and the integer can participate in abstractions along -/// side other pointer-like types. For example it can be placed into a \c -/// PointerSumType or \c PointerUnion. -/// -/// Note that much like pointers, an integer value of zero has special utility -/// due to boolean conversions. For example, a non-null value can be tested for -/// in the above abstractions without testing the particular active member. -/// Also, the default constructed value zero initializes the integer. -template -class PointerEmbeddedInt { - uintptr_t Value; - - // Note: This '<' is correct; using '<=' would result in some shifts - // overflowing their storage types. - static_assert(Bits < sizeof(uintptr_t) * CHAR_BIT, - "Cannot embed more bits than we have in a pointer!"); - - enum : uintptr_t { - // We shift as many zeros into the value as we can while preserving the - // number of bits desired for the integer. - Shift = sizeof(uintptr_t) * CHAR_BIT - Bits, - - // We also want to be able to mask out the preserved bits for asserts. - Mask = static_cast(-1) << Bits - }; - - struct RawValueTag { - explicit RawValueTag() = default; - }; - - friend class PointerLikeTypeTraits; - - explicit PointerEmbeddedInt(uintptr_t Value, RawValueTag) : Value(Value) {} - -public: - PointerEmbeddedInt() : Value(0) {} - - PointerEmbeddedInt(IntT I) { - *this = I; - } - - PointerEmbeddedInt &operator=(IntT I) { - assert((std::is_signed::value ? llvm::isInt(I) - : llvm::isUInt(I)) && - "Integer has bits outside those preserved!"); - Value = static_cast(I) << Shift; - return *this; - } - - // Note that this implicit conversion additionally allows all of the basic - // comparison operators to work transparently, etc. - operator IntT() const { - if (std::is_signed::value) - return static_cast(static_cast(Value) >> Shift); - return static_cast(Value >> Shift); - } -}; - -// Provide pointer like traits to support use with pointer unions and sum -// types. -template -class PointerLikeTypeTraits> { - typedef PointerEmbeddedInt T; - -public: - static inline void *getAsVoidPointer(const T &P) { - return reinterpret_cast(P.Value); - } - static inline T getFromVoidPointer(void *P) { - return T(reinterpret_cast(P), typename T::RawValueTag()); - } - static inline T getFromVoidPointer(const void *P) { - return T(reinterpret_cast(P), typename T::RawValueTag()); - } - - enum { NumLowBitsAvailable = T::Shift }; -}; - -// Teach DenseMap how to use PointerEmbeddedInt objects as keys if the Int type -// itself can be a key. -template -struct DenseMapInfo> { - typedef PointerEmbeddedInt T; - - typedef DenseMapInfo IntInfo; - - static inline T getEmptyKey() { return IntInfo::getEmptyKey(); } - static inline T getTombstoneKey() { return IntInfo::getTombstoneKey(); } - static unsigned getHashValue(const T &Arg) { - return IntInfo::getHashValue(Arg); - } - static bool isEqual(const T &LHS, const T &RHS) { return LHS == RHS; } -}; -} - -#endif diff --git a/llvm/include/llvm/ADT/PointerIntPair.h b/llvm/include/llvm/ADT/PointerIntPair.h deleted file mode 100644 index 83fbf127..00000000 --- a/llvm/include/llvm/ADT/PointerIntPair.h +++ /dev/null @@ -1,223 +0,0 @@ -//===- llvm/ADT/PointerIntPair.h - Pair for pointer and int -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the PointerIntPair class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_POINTERINTPAIR_H -#define LLVM_ADT_POINTERINTPAIR_H - -#include "llvm/Support/Compiler.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include -#include - -namespace llvm { - -template struct DenseMapInfo; - -template -struct PointerIntPairInfo; - -/// PointerIntPair - This class implements a pair of a pointer and small -/// integer. It is designed to represent this in the space required by one -/// pointer by bitmangling the integer into the low part of the pointer. This -/// can only be done for small integers: typically up to 3 bits, but it depends -/// on the number of bits available according to PointerLikeTypeTraits for the -/// type. -/// -/// Note that PointerIntPair always puts the IntVal part in the highest bits -/// possible. For example, PointerIntPair will put the bit for -/// the bool into bit #2, not bit #0, which allows the low two bits to be used -/// for something else. For example, this allows: -/// PointerIntPair, 1, bool> -/// ... and the two bools will land in different bits. -/// -template , - typename Info = PointerIntPairInfo> -class PointerIntPair { - intptr_t Value; - -public: - PointerIntPair() : Value(0) {} - PointerIntPair(PointerTy PtrVal, IntType IntVal) { - setPointerAndInt(PtrVal, IntVal); - } - explicit PointerIntPair(PointerTy PtrVal) { initWithPointer(PtrVal); } - - PointerTy getPointer() const { return Info::getPointer(Value); } - - IntType getInt() const { - return (IntType)Info::getInt(Value); - } - - void setPointer(PointerTy PtrVal) { - Value = Info::updatePointer(Value, PtrVal); - } - - void setInt(IntType IntVal) { - Value = Info::updateInt(Value, static_cast(IntVal)); - } - - void initWithPointer(PointerTy PtrVal) { - Value = Info::updatePointer(0, PtrVal); - } - - void setPointerAndInt(PointerTy PtrVal, IntType IntVal) { - Value = Info::updateInt(Info::updatePointer(0, PtrVal), - static_cast(IntVal)); - } - - PointerTy const *getAddrOfPointer() const { - return const_cast(this)->getAddrOfPointer(); - } - - PointerTy *getAddrOfPointer() { - assert(Value == reinterpret_cast(getPointer()) && - "Can only return the address if IntBits is cleared and " - "PtrTraits doesn't change the pointer"); - return reinterpret_cast(&Value); - } - - void *getOpaqueValue() const { return reinterpret_cast(Value); } - void setFromOpaqueValue(void *Val) { - Value = reinterpret_cast(Val); - } - - static PointerIntPair getFromOpaqueValue(void *V) { - PointerIntPair P; - P.setFromOpaqueValue(V); - return P; - } - - // Allow PointerIntPairs to be created from const void * if and only if the - // pointer type could be created from a const void *. - static PointerIntPair getFromOpaqueValue(const void *V) { - (void)PtrTraits::getFromVoidPointer(V); - return getFromOpaqueValue(const_cast(V)); - } - - bool operator==(const PointerIntPair &RHS) const { - return Value == RHS.Value; - } - bool operator!=(const PointerIntPair &RHS) const { - return Value != RHS.Value; - } - bool operator<(const PointerIntPair &RHS) const { return Value < RHS.Value; } - bool operator>(const PointerIntPair &RHS) const { return Value > RHS.Value; } - bool operator<=(const PointerIntPair &RHS) const { - return Value <= RHS.Value; - } - bool operator>=(const PointerIntPair &RHS) const { - return Value >= RHS.Value; - } -}; - -template -struct PointerIntPairInfo { - static_assert(PtrTraits::NumLowBitsAvailable < - std::numeric_limits::digits, - "cannot use a pointer type that has all bits free"); - static_assert(IntBits <= PtrTraits::NumLowBitsAvailable, - "PointerIntPair with integer size too large for pointer"); - enum : uintptr_t { - /// PointerBitMask - The bits that come from the pointer. - PointerBitMask = - ~(uintptr_t)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable) - 1), - - /// IntShift - The number of low bits that we reserve for other uses, and - /// keep zero. - IntShift = (uintptr_t)PtrTraits::NumLowBitsAvailable - IntBits, - - /// IntMask - This is the unshifted mask for valid bits of the int type. - IntMask = (uintptr_t)(((intptr_t)1 << IntBits) - 1), - - // ShiftedIntMask - This is the bits for the integer shifted in place. - ShiftedIntMask = (uintptr_t)(IntMask << IntShift) - }; - - static PointerT getPointer(intptr_t Value) { - return PtrTraits::getFromVoidPointer( - reinterpret_cast(Value & PointerBitMask)); - } - - static intptr_t getInt(intptr_t Value) { - return (Value >> IntShift) & IntMask; - } - - static intptr_t updatePointer(intptr_t OrigValue, PointerT Ptr) { - intptr_t PtrWord = - reinterpret_cast(PtrTraits::getAsVoidPointer(Ptr)); - assert((PtrWord & ~PointerBitMask) == 0 && - "Pointer is not sufficiently aligned"); - // Preserve all low bits, just update the pointer. - return PtrWord | (OrigValue & ~PointerBitMask); - } - - static intptr_t updateInt(intptr_t OrigValue, intptr_t Int) { - intptr_t IntWord = static_cast(Int); - assert((IntWord & ~IntMask) == 0 && "Integer too large for field"); - - // Preserve all bits other than the ones we are updating. - return (OrigValue & ~ShiftedIntMask) | IntWord << IntShift; - } -}; - -template struct isPodLike; -template -struct isPodLike> { - static const bool value = true; -}; - -// Provide specialization of DenseMapInfo for PointerIntPair. -template -struct DenseMapInfo> { - typedef PointerIntPair Ty; - static Ty getEmptyKey() { - uintptr_t Val = static_cast(-1); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; - return Ty::getFromOpaqueValue(reinterpret_cast(Val)); - } - static Ty getTombstoneKey() { - uintptr_t Val = static_cast(-2); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; - return Ty::getFromOpaqueValue(reinterpret_cast(Val)); - } - static unsigned getHashValue(Ty V) { - uintptr_t IV = reinterpret_cast(V.getOpaqueValue()); - return unsigned(IV) ^ unsigned(IV >> 9); - } - static bool isEqual(const Ty &LHS, const Ty &RHS) { return LHS == RHS; } -}; - -// Teach SmallPtrSet that PointerIntPair is "basically a pointer". -template -class PointerLikeTypeTraits< - PointerIntPair> { -public: - static inline void * - getAsVoidPointer(const PointerIntPair &P) { - return P.getOpaqueValue(); - } - static inline PointerIntPair - getFromVoidPointer(void *P) { - return PointerIntPair::getFromOpaqueValue(P); - } - static inline PointerIntPair - getFromVoidPointer(const void *P) { - return PointerIntPair::getFromOpaqueValue(P); - } - enum { NumLowBitsAvailable = PtrTraits::NumLowBitsAvailable - IntBits }; -}; - -} // end namespace llvm -#endif diff --git a/llvm/include/llvm/ADT/PointerSumType.h b/llvm/include/llvm/ADT/PointerSumType.h deleted file mode 100644 index 6b8618fc..00000000 --- a/llvm/include/llvm/ADT/PointerSumType.h +++ /dev/null @@ -1,205 +0,0 @@ -//===- llvm/ADT/PointerSumType.h --------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_POINTERSUMTYPE_H -#define LLVM_ADT_POINTERSUMTYPE_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/PointerLikeTypeTraits.h" - -namespace llvm { - -/// A compile time pair of an integer tag and the pointer-like type which it -/// indexes within a sum type. Also allows the user to specify a particular -/// traits class for pointer types with custom behavior such as over-aligned -/// allocation. -template > -struct PointerSumTypeMember { - enum { Tag = N }; - typedef PointerArgT PointerT; - typedef TraitsArgT TraitsT; -}; - -namespace detail { - -template -struct PointerSumTypeHelper; - -} - -/// A sum type over pointer-like types. -/// -/// This is a normal tagged union across pointer-like types that uses the low -/// bits of the pointers to store the tag. -/// -/// Each member of the sum type is specified by passing a \c -/// PointerSumTypeMember specialization in the variadic member argument list. -/// This allows the user to control the particular tag value associated with -/// a particular type, use the same type for multiple different tags, and -/// customize the pointer-like traits used for a particular member. Note that -/// these *must* be specializations of \c PointerSumTypeMember, no other type -/// will suffice, even if it provides a compatible interface. -/// -/// This type implements all of the comparison operators and even hash table -/// support by comparing the underlying storage of the pointer values. It -/// doesn't support delegating to particular members for comparisons. -/// -/// It also default constructs to a zero tag with a null pointer, whatever that -/// would be. This means that the zero value for the tag type is significant -/// and may be desireable to set to a state that is particularly desirable to -/// default construct. -/// -/// There is no support for constructing or accessing with a dynamic tag as -/// that would fundamentally violate the type safety provided by the sum type. -template class PointerSumType { - uintptr_t Value; - - typedef detail::PointerSumTypeHelper HelperT; - -public: - PointerSumType() : Value(0) {} - - /// A typed constructor for a specific tagged member of the sum type. - template - static PointerSumType - create(typename HelperT::template Lookup::PointerT Pointer) { - PointerSumType Result; - void *V = HelperT::template Lookup::TraitsT::getAsVoidPointer(Pointer); - assert((reinterpret_cast(V) & HelperT::TagMask) == 0 && - "Pointer is insufficiently aligned to store the discriminant!"); - Result.Value = reinterpret_cast(V) | N; - return Result; - } - - TagT getTag() const { return static_cast(Value & HelperT::TagMask); } - - template bool is() const { return N == getTag(); } - - template typename HelperT::template Lookup::PointerT get() const { - void *P = is() ? getImpl() : nullptr; - return HelperT::template Lookup::TraitsT::getFromVoidPointer(P); - } - - template - typename HelperT::template Lookup::PointerT cast() const { - assert(is() && "This instance has a different active member."); - return HelperT::template Lookup::TraitsT::getFromVoidPointer(getImpl()); - } - - operator bool() const { return Value & HelperT::PointerMask; } - bool operator==(const PointerSumType &R) const { return Value == R.Value; } - bool operator!=(const PointerSumType &R) const { return Value != R.Value; } - bool operator<(const PointerSumType &R) const { return Value < R.Value; } - bool operator>(const PointerSumType &R) const { return Value > R.Value; } - bool operator<=(const PointerSumType &R) const { return Value <= R.Value; } - bool operator>=(const PointerSumType &R) const { return Value >= R.Value; } - - uintptr_t getOpaqueValue() const { return Value; } - -protected: - void *getImpl() const { - return reinterpret_cast(Value & HelperT::PointerMask); - } -}; - -namespace detail { - -/// A helper template for implementing \c PointerSumType. It provides fast -/// compile-time lookup of the member from a particular tag value, along with -/// useful constants and compile time checking infrastructure.. -template -struct PointerSumTypeHelper : MemberTs... { - // First we use a trick to allow quickly looking up information about - // a particular member of the sum type. This works because we arranged to - // have this type derive from all of the member type templates. We can select - // the matching member for a tag using type deduction during overload - // resolution. - template - static PointerSumTypeMember - LookupOverload(PointerSumTypeMember *); - template static void LookupOverload(...); - template struct Lookup { - // Compute a particular member type by resolving the lookup helper ovorload. - typedef decltype(LookupOverload( - static_cast(nullptr))) MemberT; - - /// The Nth member's pointer type. - typedef typename MemberT::PointerT PointerT; - - /// The Nth member's traits type. - typedef typename MemberT::TraitsT TraitsT; - }; - - // Next we need to compute the number of bits available for the discriminant - // by taking the min of the bits available for each member. Much of this - // would be amazingly easier with good constexpr support. - template - struct Min : std::integral_constant< - uintptr_t, (V < Min::value ? V : Min::value)> { - }; - template - struct Min : std::integral_constant {}; - enum { NumTagBits = Min::value }; - - // Also compute the smallest discriminant and various masks for convenience. - enum : uint64_t { - MinTag = Min::value, - PointerMask = static_cast(-1) << NumTagBits, - TagMask = ~PointerMask - }; - - // Finally we need a recursive template to do static checks of each - // member. - template - struct Checker : Checker { - static_assert(MemberT::Tag < (1 << NumTagBits), - "This discriminant value requires too many bits!"); - }; - template struct Checker : std::true_type { - static_assert(MemberT::Tag < (1 << NumTagBits), - "This discriminant value requires too many bits!"); - }; - static_assert(Checker::value, - "Each member must pass the checker."); -}; - -} - -// Teach DenseMap how to use PointerSumTypes as keys. -template -struct DenseMapInfo> { - typedef PointerSumType SumType; - - typedef detail::PointerSumTypeHelper HelperT; - enum { SomeTag = HelperT::MinTag }; - typedef typename HelperT::template Lookup::PointerT - SomePointerT; - typedef DenseMapInfo SomePointerInfo; - - static inline SumType getEmptyKey() { - return SumType::create(SomePointerInfo::getEmptyKey()); - } - static inline SumType getTombstoneKey() { - return SumType::create( - SomePointerInfo::getTombstoneKey()); - } - static unsigned getHashValue(const SumType &Arg) { - uintptr_t OpaqueValue = Arg.getOpaqueValue(); - return DenseMapInfo::getHashValue(OpaqueValue); - } - static bool isEqual(const SumType &LHS, const SumType &RHS) { - return LHS == RHS; - } -}; - -} - -#endif diff --git a/llvm/include/llvm/ADT/PointerUnion.h b/llvm/include/llvm/ADT/PointerUnion.h deleted file mode 100644 index 6b3fe574..00000000 --- a/llvm/include/llvm/ADT/PointerUnion.h +++ /dev/null @@ -1,474 +0,0 @@ -//===- llvm/ADT/PointerUnion.h - Discriminated Union of 2 Ptrs --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the PointerUnion class, which is a discriminated union of -// pointer types. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_POINTERUNION_H -#define LLVM_ADT_POINTERUNION_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { - -template struct PointerUnionTypeSelectorReturn { - typedef T Return; -}; - -/// Get a type based on whether two types are the same or not. -/// -/// For: -/// -/// \code -/// typedef typename PointerUnionTypeSelector::Return Ret; -/// \endcode -/// -/// Ret will be EQ type if T1 is same as T2 or NE type otherwise. -template -struct PointerUnionTypeSelector { - typedef typename PointerUnionTypeSelectorReturn::Return Return; -}; - -template -struct PointerUnionTypeSelector { - typedef typename PointerUnionTypeSelectorReturn::Return Return; -}; - -template -struct PointerUnionTypeSelectorReturn< - PointerUnionTypeSelector> { - typedef - typename PointerUnionTypeSelector::Return Return; -}; - -/// Provide PointerLikeTypeTraits for void* that is used by PointerUnion -/// for the two template arguments. -template class PointerUnionUIntTraits { -public: - static inline void *getAsVoidPointer(void *P) { return P; } - static inline void *getFromVoidPointer(void *P) { return P; } - enum { - PT1BitsAv = (int)(PointerLikeTypeTraits::NumLowBitsAvailable), - PT2BitsAv = (int)(PointerLikeTypeTraits::NumLowBitsAvailable), - NumLowBitsAvailable = PT1BitsAv < PT2BitsAv ? PT1BitsAv : PT2BitsAv - }; -}; - -/// A discriminated union of two pointer types, with the discriminator in the -/// low bit of the pointer. -/// -/// This implementation is extremely efficient in space due to leveraging the -/// low bits of the pointer, while exposing a natural and type-safe API. -/// -/// Common use patterns would be something like this: -/// PointerUnion P; -/// P = (int*)0; -/// printf("%d %d", P.is(), P.is()); // prints "1 0" -/// X = P.get(); // ok. -/// Y = P.get(); // runtime assertion failure. -/// Z = P.get(); // compile time failure. -/// P = (float*)0; -/// Y = P.get(); // ok. -/// X = P.get(); // runtime assertion failure. -template class PointerUnion { -public: - typedef PointerIntPair> - ValTy; - -private: - ValTy Val; - - struct IsPT1 { - static const int Num = 0; - }; - struct IsPT2 { - static const int Num = 1; - }; - template struct UNION_DOESNT_CONTAIN_TYPE {}; - -public: - PointerUnion() {} - - PointerUnion(PT1 V) - : Val(const_cast( - PointerLikeTypeTraits::getAsVoidPointer(V))) {} - PointerUnion(PT2 V) - : Val(const_cast(PointerLikeTypeTraits::getAsVoidPointer(V)), - 1) {} - - /// Test if the pointer held in the union is null, regardless of - /// which type it is. - bool isNull() const { - // Convert from the void* to one of the pointer types, to make sure that - // we recursively strip off low bits if we have a nested PointerUnion. - return !PointerLikeTypeTraits::getFromVoidPointer(Val.getPointer()); - } - explicit operator bool() const { return !isNull(); } - - /// Test if the Union currently holds the type matching T. - template int is() const { - typedef typename ::llvm::PointerUnionTypeSelector< - PT1, T, IsPT1, ::llvm::PointerUnionTypeSelector< - PT2, T, IsPT2, UNION_DOESNT_CONTAIN_TYPE>>::Return - Ty; - int TyNo = Ty::Num; - return static_cast(Val.getInt()) == TyNo; - } - - /// Returns the value of the specified pointer type. - /// - /// If the specified pointer type is incorrect, assert. - template T get() const { - assert(is() && "Invalid accessor called"); - return PointerLikeTypeTraits::getFromVoidPointer(Val.getPointer()); - } - - /// Returns the current pointer if it is of the specified pointer type, - /// otherwises returns null. - template T dyn_cast() const { - if (is()) - return get(); - return T(); - } - - /// If the union is set to the first pointer type get an address pointing to - /// it. - PT1 const *getAddrOfPtr1() const { - return const_cast(this)->getAddrOfPtr1(); - } - - /// If the union is set to the first pointer type get an address pointing to - /// it. - PT1 *getAddrOfPtr1() { - assert(is() && "Val is not the first pointer"); - assert( - get() == Val.getPointer() && - "Can't get the address because PointerLikeTypeTraits changes the ptr"); - return (PT1 *)Val.getAddrOfPointer(); - } - - /// Assignment from nullptr which just clears the union. - const PointerUnion &operator=(std::nullptr_t) { - Val.initWithPointer(nullptr); - return *this; - } - - /// Assignment operators - Allow assigning into this union from either - /// pointer type, setting the discriminator to remember what it came from. - const PointerUnion &operator=(const PT1 &RHS) { - Val.initWithPointer( - const_cast(PointerLikeTypeTraits::getAsVoidPointer(RHS))); - return *this; - } - const PointerUnion &operator=(const PT2 &RHS) { - Val.setPointerAndInt( - const_cast(PointerLikeTypeTraits::getAsVoidPointer(RHS)), - 1); - return *this; - } - - void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static inline PointerUnion getFromOpaqueValue(void *VP) { - PointerUnion V; - V.Val = ValTy::getFromOpaqueValue(VP); - return V; - } -}; - -template -static bool operator==(PointerUnion lhs, PointerUnion rhs) { - return lhs.getOpaqueValue() == rhs.getOpaqueValue(); -} - -template -static bool operator!=(PointerUnion lhs, PointerUnion rhs) { - return lhs.getOpaqueValue() != rhs.getOpaqueValue(); -} - -template -static bool operator<(PointerUnion lhs, PointerUnion rhs) { - return lhs.getOpaqueValue() < rhs.getOpaqueValue(); -} - -// Teach SmallPtrSet that PointerUnion is "basically a pointer", that has -// # low bits available = min(PT1bits,PT2bits)-1. -template -class PointerLikeTypeTraits> { -public: - static inline void *getAsVoidPointer(const PointerUnion &P) { - return P.getOpaqueValue(); - } - static inline PointerUnion getFromVoidPointer(void *P) { - return PointerUnion::getFromOpaqueValue(P); - } - - // The number of bits available are the min of the two pointer types. - enum { - NumLowBitsAvailable = PointerLikeTypeTraits< - typename PointerUnion::ValTy>::NumLowBitsAvailable - }; -}; - -/// A pointer union of three pointer types. See documentation for PointerUnion -/// for usage. -template class PointerUnion3 { -public: - typedef PointerUnion InnerUnion; - typedef PointerUnion ValTy; - -private: - ValTy Val; - - struct IsInnerUnion { - ValTy Val; - IsInnerUnion(ValTy val) : Val(val) {} - template int is() const { - return Val.template is() && - Val.template get().template is(); - } - template T get() const { - return Val.template get().template get(); - } - }; - - struct IsPT3 { - ValTy Val; - IsPT3(ValTy val) : Val(val) {} - template int is() const { return Val.template is(); } - template T get() const { return Val.template get(); } - }; - -public: - PointerUnion3() {} - - PointerUnion3(PT1 V) { Val = InnerUnion(V); } - PointerUnion3(PT2 V) { Val = InnerUnion(V); } - PointerUnion3(PT3 V) { Val = V; } - - /// Test if the pointer held in the union is null, regardless of - /// which type it is. - bool isNull() const { return Val.isNull(); } - explicit operator bool() const { return !isNull(); } - - /// Test if the Union currently holds the type matching T. - template int is() const { - // If T is PT1/PT2 choose IsInnerUnion otherwise choose IsPT3. - typedef typename ::llvm::PointerUnionTypeSelector< - PT1, T, IsInnerUnion, - ::llvm::PointerUnionTypeSelector>::Return - Ty; - return Ty(Val).template is(); - } - - /// Returns the value of the specified pointer type. - /// - /// If the specified pointer type is incorrect, assert. - template T get() const { - assert(is() && "Invalid accessor called"); - // If T is PT1/PT2 choose IsInnerUnion otherwise choose IsPT3. - typedef typename ::llvm::PointerUnionTypeSelector< - PT1, T, IsInnerUnion, - ::llvm::PointerUnionTypeSelector>::Return - Ty; - return Ty(Val).template get(); - } - - /// Returns the current pointer if it is of the specified pointer type, - /// otherwises returns null. - template T dyn_cast() const { - if (is()) - return get(); - return T(); - } - - /// Assignment from nullptr which just clears the union. - const PointerUnion3 &operator=(std::nullptr_t) { - Val = nullptr; - return *this; - } - - /// Assignment operators - Allow assigning into this union from either - /// pointer type, setting the discriminator to remember what it came from. - const PointerUnion3 &operator=(const PT1 &RHS) { - Val = InnerUnion(RHS); - return *this; - } - const PointerUnion3 &operator=(const PT2 &RHS) { - Val = InnerUnion(RHS); - return *this; - } - const PointerUnion3 &operator=(const PT3 &RHS) { - Val = RHS; - return *this; - } - - void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static inline PointerUnion3 getFromOpaqueValue(void *VP) { - PointerUnion3 V; - V.Val = ValTy::getFromOpaqueValue(VP); - return V; - } -}; - -// Teach SmallPtrSet that PointerUnion3 is "basically a pointer", that has -// # low bits available = min(PT1bits,PT2bits,PT2bits)-2. -template -class PointerLikeTypeTraits> { -public: - static inline void *getAsVoidPointer(const PointerUnion3 &P) { - return P.getOpaqueValue(); - } - static inline PointerUnion3 getFromVoidPointer(void *P) { - return PointerUnion3::getFromOpaqueValue(P); - } - - // The number of bits available are the min of the two pointer types. - enum { - NumLowBitsAvailable = PointerLikeTypeTraits< - typename PointerUnion3::ValTy>::NumLowBitsAvailable - }; -}; - -/// A pointer union of four pointer types. See documentation for PointerUnion -/// for usage. -template -class PointerUnion4 { -public: - typedef PointerUnion InnerUnion1; - typedef PointerUnion InnerUnion2; - typedef PointerUnion ValTy; - -private: - ValTy Val; - -public: - PointerUnion4() {} - - PointerUnion4(PT1 V) { Val = InnerUnion1(V); } - PointerUnion4(PT2 V) { Val = InnerUnion1(V); } - PointerUnion4(PT3 V) { Val = InnerUnion2(V); } - PointerUnion4(PT4 V) { Val = InnerUnion2(V); } - - /// Test if the pointer held in the union is null, regardless of - /// which type it is. - bool isNull() const { return Val.isNull(); } - explicit operator bool() const { return !isNull(); } - - /// Test if the Union currently holds the type matching T. - template int is() const { - // If T is PT1/PT2 choose InnerUnion1 otherwise choose InnerUnion2. - typedef typename ::llvm::PointerUnionTypeSelector< - PT1, T, InnerUnion1, ::llvm::PointerUnionTypeSelector< - PT2, T, InnerUnion1, InnerUnion2>>::Return Ty; - return Val.template is() && Val.template get().template is(); - } - - /// Returns the value of the specified pointer type. - /// - /// If the specified pointer type is incorrect, assert. - template T get() const { - assert(is() && "Invalid accessor called"); - // If T is PT1/PT2 choose InnerUnion1 otherwise choose InnerUnion2. - typedef typename ::llvm::PointerUnionTypeSelector< - PT1, T, InnerUnion1, ::llvm::PointerUnionTypeSelector< - PT2, T, InnerUnion1, InnerUnion2>>::Return Ty; - return Val.template get().template get(); - } - - /// Returns the current pointer if it is of the specified pointer type, - /// otherwises returns null. - template T dyn_cast() const { - if (is()) - return get(); - return T(); - } - - /// Assignment from nullptr which just clears the union. - const PointerUnion4 &operator=(std::nullptr_t) { - Val = nullptr; - return *this; - } - - /// Assignment operators - Allow assigning into this union from either - /// pointer type, setting the discriminator to remember what it came from. - const PointerUnion4 &operator=(const PT1 &RHS) { - Val = InnerUnion1(RHS); - return *this; - } - const PointerUnion4 &operator=(const PT2 &RHS) { - Val = InnerUnion1(RHS); - return *this; - } - const PointerUnion4 &operator=(const PT3 &RHS) { - Val = InnerUnion2(RHS); - return *this; - } - const PointerUnion4 &operator=(const PT4 &RHS) { - Val = InnerUnion2(RHS); - return *this; - } - - void *getOpaqueValue() const { return Val.getOpaqueValue(); } - static inline PointerUnion4 getFromOpaqueValue(void *VP) { - PointerUnion4 V; - V.Val = ValTy::getFromOpaqueValue(VP); - return V; - } -}; - -// Teach SmallPtrSet that PointerUnion4 is "basically a pointer", that has -// # low bits available = min(PT1bits,PT2bits,PT2bits)-2. -template -class PointerLikeTypeTraits> { -public: - static inline void * - getAsVoidPointer(const PointerUnion4 &P) { - return P.getOpaqueValue(); - } - static inline PointerUnion4 getFromVoidPointer(void *P) { - return PointerUnion4::getFromOpaqueValue(P); - } - - // The number of bits available are the min of the two pointer types. - enum { - NumLowBitsAvailable = PointerLikeTypeTraits< - typename PointerUnion4::ValTy>::NumLowBitsAvailable - }; -}; - -// Teach DenseMap how to use PointerUnions as keys. -template struct DenseMapInfo> { - typedef PointerUnion Pair; - typedef DenseMapInfo FirstInfo; - typedef DenseMapInfo SecondInfo; - - static inline Pair getEmptyKey() { return Pair(FirstInfo::getEmptyKey()); } - static inline Pair getTombstoneKey() { - return Pair(FirstInfo::getTombstoneKey()); - } - static unsigned getHashValue(const Pair &PairVal) { - intptr_t key = (intptr_t)PairVal.getOpaqueValue(); - return DenseMapInfo::getHashValue(key); - } - static bool isEqual(const Pair &LHS, const Pair &RHS) { - return LHS.template is() == RHS.template is() && - (LHS.template is() ? FirstInfo::isEqual(LHS.template get(), - RHS.template get()) - : SecondInfo::isEqual(LHS.template get(), - RHS.template get())); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/ADT/PostOrderIterator.h b/llvm/include/llvm/ADT/PostOrderIterator.h deleted file mode 100644 index 0cc504b5..00000000 --- a/llvm/include/llvm/ADT/PostOrderIterator.h +++ /dev/null @@ -1,300 +0,0 @@ -//===- llvm/ADT/PostOrderIterator.h - PostOrder iterator --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file builds on the ADT/GraphTraits.h file to build a generic graph -// post order iterator. This should work over any graph type that has a -// GraphTraits specialization. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_POSTORDERITERATOR_H -#define LLVM_ADT_POSTORDERITERATOR_H - -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/iterator_range.h" -#include -#include - -namespace llvm { - -// The po_iterator_storage template provides access to the set of already -// visited nodes during the po_iterator's depth-first traversal. -// -// The default implementation simply contains a set of visited nodes, while -// the External=true version uses a reference to an external set. -// -// It is possible to prune the depth-first traversal in several ways: -// -// - When providing an external set that already contains some graph nodes, -// those nodes won't be visited again. This is useful for restarting a -// post-order traversal on a graph with nodes that aren't dominated by a -// single node. -// -// - By providing a custom SetType class, unwanted graph nodes can be excluded -// by having the insert() function return false. This could for example -// confine a CFG traversal to blocks in a specific loop. -// -// - Finally, by specializing the po_iterator_storage template itself, graph -// edges can be pruned by returning false in the insertEdge() function. This -// could be used to remove loop back-edges from the CFG seen by po_iterator. -// -// A specialized po_iterator_storage class can observe both the pre-order and -// the post-order. The insertEdge() function is called in a pre-order, while -// the finishPostorder() function is called just before the po_iterator moves -// on to the next node. - -/// Default po_iterator_storage implementation with an internal set object. -template -class po_iterator_storage { - SetType Visited; -public: - // Return true if edge destination should be visited. - template - bool insertEdge(NodeType *From, NodeType *To) { - return Visited.insert(To).second; - } - - // Called after all children of BB have been visited. - template - void finishPostorder(NodeType *BB) {} -}; - -/// Specialization of po_iterator_storage that references an external set. -template -class po_iterator_storage { - SetType &Visited; -public: - po_iterator_storage(SetType &VSet) : Visited(VSet) {} - po_iterator_storage(const po_iterator_storage &S) : Visited(S.Visited) {} - - // Return true if edge destination should be visited, called with From = 0 for - // the root node. - // Graph edges can be pruned by specializing this function. - template bool insertEdge(NodeType *From, NodeType *To) { - return Visited.insert(To).second; - } - - // Called after all children of BB have been visited. - template - void finishPostorder(NodeType *BB) {} -}; - -template::NodeType*, 8>, - bool ExtStorage = false, - class GT = GraphTraits > -class po_iterator : public std::iterator, - public po_iterator_storage { - typedef std::iterator super; - typedef typename GT::NodeType NodeType; - typedef typename GT::ChildIteratorType ChildItTy; - - // VisitStack - Used to maintain the ordering. Top = current block - // First element is basic block pointer, second is the 'next child' to visit - std::vector > VisitStack; - - void traverseChild() { - while (VisitStack.back().second != GT::child_end(VisitStack.back().first)) { - NodeType *BB = *VisitStack.back().second++; - if (this->insertEdge(VisitStack.back().first, BB)) { - // If the block is not visited... - VisitStack.push_back(std::make_pair(BB, GT::child_begin(BB))); - } - } - } - - po_iterator(NodeType *BB) { - this->insertEdge((NodeType*)nullptr, BB); - VisitStack.push_back(std::make_pair(BB, GT::child_begin(BB))); - traverseChild(); - } - po_iterator() {} // End is when stack is empty. - - po_iterator(NodeType *BB, SetType &S) - : po_iterator_storage(S) { - if (this->insertEdge((NodeType*)nullptr, BB)) { - VisitStack.push_back(std::make_pair(BB, GT::child_begin(BB))); - traverseChild(); - } - } - - po_iterator(SetType &S) - : po_iterator_storage(S) { - } // End is when stack is empty. -public: - typedef typename super::pointer pointer; - - // Provide static "constructors"... - static po_iterator begin(GraphT G) { - return po_iterator(GT::getEntryNode(G)); - } - static po_iterator end(GraphT G) { return po_iterator(); } - - static po_iterator begin(GraphT G, SetType &S) { - return po_iterator(GT::getEntryNode(G), S); - } - static po_iterator end(GraphT G, SetType &S) { return po_iterator(S); } - - bool operator==(const po_iterator &x) const { - return VisitStack == x.VisitStack; - } - bool operator!=(const po_iterator &x) const { return !(*this == x); } - - pointer operator*() const { return VisitStack.back().first; } - - // This is a nonstandard operator-> that dereferences the pointer an extra - // time... so that you can actually call methods ON the BasicBlock, because - // the contained type is a pointer. This allows BBIt->getTerminator() f.e. - // - NodeType *operator->() const { return **this; } - - po_iterator &operator++() { // Preincrement - this->finishPostorder(VisitStack.back().first); - VisitStack.pop_back(); - if (!VisitStack.empty()) - traverseChild(); - return *this; - } - - po_iterator operator++(int) { // Postincrement - po_iterator tmp = *this; - ++*this; - return tmp; - } -}; - -// Provide global constructors that automatically figure out correct types... -// -template -po_iterator po_begin(const T &G) { return po_iterator::begin(G); } -template -po_iterator po_end (const T &G) { return po_iterator::end(G); } - -template iterator_range> post_order(const T &G) { - return make_range(po_begin(G), po_end(G)); -} - -// Provide global definitions of external postorder iterators... -template::NodeType*> > -struct po_ext_iterator : public po_iterator { - po_ext_iterator(const po_iterator &V) : - po_iterator(V) {} -}; - -template -po_ext_iterator po_ext_begin(T G, SetType &S) { - return po_ext_iterator::begin(G, S); -} - -template -po_ext_iterator po_ext_end(T G, SetType &S) { - return po_ext_iterator::end(G, S); -} - -template -iterator_range> post_order_ext(const T &G, SetType &S) { - return make_range(po_ext_begin(G, S), po_ext_end(G, S)); -} - -// Provide global definitions of inverse post order iterators... -template ::NodeType*>, - bool External = false> -struct ipo_iterator : public po_iterator, SetType, External > { - ipo_iterator(const po_iterator, SetType, External> &V) : - po_iterator, SetType, External> (V) {} -}; - -template -ipo_iterator ipo_begin(const T &G) { - return ipo_iterator::begin(G); -} - -template -ipo_iterator ipo_end(const T &G){ - return ipo_iterator::end(G); -} - -template -iterator_range> inverse_post_order(const T &G) { - return make_range(ipo_begin(G), ipo_end(G)); -} - -// Provide global definitions of external inverse postorder iterators... -template ::NodeType*> > -struct ipo_ext_iterator : public ipo_iterator { - ipo_ext_iterator(const ipo_iterator &V) : - ipo_iterator(V) {} - ipo_ext_iterator(const po_iterator, SetType, true> &V) : - ipo_iterator(V) {} -}; - -template -ipo_ext_iterator ipo_ext_begin(const T &G, SetType &S) { - return ipo_ext_iterator::begin(G, S); -} - -template -ipo_ext_iterator ipo_ext_end(const T &G, SetType &S) { - return ipo_ext_iterator::end(G, S); -} - -template -iterator_range> -inverse_post_order_ext(const T &G, SetType &S) { - return make_range(ipo_ext_begin(G, S), ipo_ext_end(G, S)); -} - -//===--------------------------------------------------------------------===// -// Reverse Post Order CFG iterator code -//===--------------------------------------------------------------------===// -// -// This is used to visit basic blocks in a method in reverse post order. This -// class is awkward to use because I don't know a good incremental algorithm to -// computer RPO from a graph. Because of this, the construction of the -// ReversePostOrderTraversal object is expensive (it must walk the entire graph -// with a postorder iterator to build the data structures). The moral of this -// story is: Don't create more ReversePostOrderTraversal classes than necessary. -// -// This class should be used like this: -// { -// ReversePostOrderTraversal RPOT(FuncPtr); // Expensive to create -// for (rpo_iterator I = RPOT.begin(); I != RPOT.end(); ++I) { -// ... -// } -// for (rpo_iterator I = RPOT.begin(); I != RPOT.end(); ++I) { -// ... -// } -// } -// - -template > -class ReversePostOrderTraversal { - typedef typename GT::NodeType NodeType; - std::vector Blocks; // Block list in normal PO order - void Initialize(NodeType *BB) { - std::copy(po_begin(BB), po_end(BB), std::back_inserter(Blocks)); - } -public: - typedef typename std::vector::reverse_iterator rpo_iterator; - - ReversePostOrderTraversal(GraphT G) { Initialize(GT::getEntryNode(G)); } - - // Because we want a reverse post order, use reverse iterators from the vector - rpo_iterator begin() { return Blocks.rbegin(); } - rpo_iterator end() { return Blocks.rend(); } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/PriorityQueue.h b/llvm/include/llvm/ADT/PriorityQueue.h deleted file mode 100644 index 827d0b34..00000000 --- a/llvm/include/llvm/ADT/PriorityQueue.h +++ /dev/null @@ -1,84 +0,0 @@ -//===- llvm/ADT/PriorityQueue.h - Priority queues ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the PriorityQueue class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_PRIORITYQUEUE_H -#define LLVM_ADT_PRIORITYQUEUE_H - -#include -#include - -namespace llvm { - -/// PriorityQueue - This class behaves like std::priority_queue and -/// provides a few additional convenience functions. -/// -template, - class Compare = std::less > -class PriorityQueue : public std::priority_queue { -public: - explicit PriorityQueue(const Compare &compare = Compare(), - const Sequence &sequence = Sequence()) - : std::priority_queue(compare, sequence) - {} - - template - PriorityQueue(Iterator begin, Iterator end, - const Compare &compare = Compare(), - const Sequence &sequence = Sequence()) - : std::priority_queue(begin, end, compare, sequence) - {} - - /// erase_one - Erase one element from the queue, regardless of its - /// position. This operation performs a linear search to find an element - /// equal to t, but then uses all logarithmic-time algorithms to do - /// the erase operation. - /// - void erase_one(const T &t) { - // Linear-search to find the element. - typename Sequence::size_type i = - std::find(this->c.begin(), this->c.end(), t) - this->c.begin(); - - // Logarithmic-time heap bubble-up. - while (i != 0) { - typename Sequence::size_type parent = (i - 1) / 2; - this->c[i] = this->c[parent]; - i = parent; - } - - // The element we want to remove is now at the root, so we can use - // priority_queue's plain pop to remove it. - this->pop(); - } - - /// reheapify - If an element in the queue has changed in a way that - /// affects its standing in the comparison function, the queue's - /// internal state becomes invalid. Calling reheapify() resets the - /// queue's state, making it valid again. This operation has time - /// complexity proportional to the number of elements in the queue, - /// so don't plan to use it a lot. - /// - void reheapify() { - std::make_heap(this->c.begin(), this->c.end(), this->comp); - } - - /// clear - Erase all elements from the queue. - /// - void clear() { - this->c.clear(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/PriorityWorklist.h b/llvm/include/llvm/ADT/PriorityWorklist.h deleted file mode 100644 index 00549b88..00000000 --- a/llvm/include/llvm/ADT/PriorityWorklist.h +++ /dev/null @@ -1,224 +0,0 @@ -//===- PriorityWorklist.h - Worklist with insertion priority ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// -/// This file provides a priority worklist. See the class comments for details. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_PRIORITYWORKLIST_H -#define LLVM_ADT_PRIORITYWORKLIST_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" -#include -#include -#include -#include - -namespace llvm { - -/// A FILO worklist that prioritizes on re-insertion without duplication. -/// -/// This is very similar to a \c SetVector with the primary difference that -/// while re-insertion does not create a duplicate, it does adjust the -/// visitation order to respect the last insertion point. This can be useful -/// when the visit order needs to be prioritized based on insertion point -/// without actually having duplicate visits. -/// -/// Note that this doesn't prevent re-insertion of elements which have been -/// visited -- if you need to break cycles, a set will still be necessary. -/// -/// The type \c T must be default constructable to a null value that will be -/// ignored. It is an error to insert such a value, and popping elements will -/// never produce such a value. It is expected to be used with common nullable -/// types like pointers or optionals. -/// -/// Internally this uses a vector to store the worklist and a map to identify -/// existing elements in the worklist. Both of these may be customized, but the -/// map must support the basic DenseMap API for mapping from a T to an integer -/// index into the vector. -/// -/// A partial specialization is provided to automatically select a SmallVector -/// and a SmallDenseMap if custom data structures are not provided. -template , - typename MapT = DenseMap> -class PriorityWorklist { -public: - typedef T value_type; - typedef T key_type; - typedef T& reference; - typedef const T& const_reference; - typedef typename MapT::size_type size_type; - - /// Construct an empty PriorityWorklist - PriorityWorklist() {} - - /// Determine if the PriorityWorklist is empty or not. - bool empty() const { - return V.empty(); - } - - /// Returns the number of elements in the worklist. - size_type size() const { - return M.size(); - } - - /// Count the number of elements of a given key in the PriorityWorklist. - /// \returns 0 if the element is not in the PriorityWorklist, 1 if it is. - size_type count(const key_type &key) const { - return M.count(key); - } - - /// Return the last element of the PriorityWorklist. - const T &back() const { - assert(!empty() && "Cannot call back() on empty PriorityWorklist!"); - return V.back(); - } - - /// Insert a new element into the PriorityWorklist. - /// \returns true if the element was inserted into the PriorityWorklist. - bool insert(const T &X) { - assert(X != T() && "Cannot insert a null (default constructed) value!"); - auto InsertResult = M.insert({X, V.size()}); - if (InsertResult.second) { - // Fresh value, just append it to the vector. - V.push_back(X); - return true; - } - - auto &Index = InsertResult.first->second; - assert(V[Index] == X && "Value not actually at index in map!"); - if (Index != (ptrdiff_t)(V.size() - 1)) { - // If the element isn't at the back, null it out and append a fresh one. - V[Index] = T(); - Index = (ptrdiff_t)V.size(); - V.push_back(X); - } - return false; - } - - /// Remove the last element of the PriorityWorklist. - void pop_back() { - assert(!empty() && "Cannot remove an element when empty!"); - assert(back() != T() && "Cannot have a null element at the back!"); - M.erase(back()); - do { - V.pop_back(); - } while (!V.empty() && V.back() == T()); - } - - T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() { - T Ret = back(); - pop_back(); - return Ret; - } - - /// Erase an item from the worklist. - /// - /// Note that this is constant time due to the nature of the worklist implementation. - bool erase(const T& X) { - auto I = M.find(X); - if (I == M.end()) - return false; - - assert(V[I->second] == X && "Value not actually at index in map!"); - if (I->second == (ptrdiff_t)(V.size() - 1)) { - do { - V.pop_back(); - } while (!V.empty() && V.back() == T()); - } else { - V[I->second] = T(); - } - M.erase(I); - return true; - } - - /// Erase items from the set vector based on a predicate function. - /// - /// This is intended to be equivalent to the following code, if we could - /// write it: - /// - /// \code - /// V.erase(std::remove_if(V.begin(), V.end(), P), V.end()); - /// \endcode - /// - /// However, PriorityWorklist doesn't expose non-const iterators, making any - /// algorithm like remove_if impossible to use. - /// - /// \returns true if any element is removed. - template - bool erase_if(UnaryPredicate P) { - typename VectorT::iterator E = std::remove_if( - V.begin(), V.end(), TestAndEraseFromMap(P, M)); - if (E == V.end()) - return false; - for (auto I = V.begin(); I != E; ++I) - if (*I != T()) - M[*I] = I - V.begin(); - V.erase(E, V.end()); - return true; - } - - /// Completely clear the PriorityWorklist - void clear() { - M.clear(); - V.clear(); - } - -private: - /// A wrapper predicate designed for use with std::remove_if. - /// - /// This predicate wraps a predicate suitable for use with std::remove_if to - /// call M.erase(x) on each element which is slated for removal. This just - /// allows the predicate to be move only which we can't do with lambdas - /// today. - template - class TestAndEraseFromMap { - UnaryPredicateT P; - MapT &M; - - public: - TestAndEraseFromMap(UnaryPredicateT P, MapT &M) - : P(std::move(P)), M(M) {} - - bool operator()(const T &Arg) { - if (Arg == T()) - // Skip null values in the PriorityWorklist. - return false; - - if (P(Arg)) { - M.erase(Arg); - return true; - } - return false; - } - }; - - /// The map from value to index in the vector. - MapT M; - - /// The vector of elements in insertion order. - VectorT V; -}; - -/// A version of \c PriorityWorklist that selects small size optimized data -/// structures for the vector and map. -template -class SmallPriorityWorklist - : public PriorityWorklist, - SmallDenseMap> { -public: - SmallPriorityWorklist() {} -}; - -} - -#endif diff --git a/llvm/include/llvm/ADT/SCCIterator.h b/llvm/include/llvm/ADT/SCCIterator.h deleted file mode 100644 index e89345c0..00000000 --- a/llvm/include/llvm/ADT/SCCIterator.h +++ /dev/null @@ -1,244 +0,0 @@ -//===---- ADT/SCCIterator.h - Strongly Connected Comp. Iter. ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This builds on the llvm/ADT/GraphTraits.h file to find the strongly -/// connected components (SCCs) of a graph in O(N+E) time using Tarjan's DFS -/// algorithm. -/// -/// The SCC iterator has the important property that if a node in SCC S1 has an -/// edge to a node in SCC S2, then it visits S1 *after* S2. -/// -/// To visit S1 *before* S2, use the scc_iterator on the Inverse graph. (NOTE: -/// This requires some simple wrappers and is not supported yet.) -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SCCITERATOR_H -#define LLVM_ADT_SCCITERATOR_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/iterator.h" -#include - -namespace llvm { - -/// \brief Enumerate the SCCs of a directed graph in reverse topological order -/// of the SCC DAG. -/// -/// This is implemented using Tarjan's DFS algorithm using an internal stack to -/// build up a vector of nodes in a particular SCC. Note that it is a forward -/// iterator and thus you cannot backtrack or re-visit nodes. -template > -class scc_iterator : public iterator_facade_base< - scc_iterator, std::forward_iterator_tag, - const std::vector, ptrdiff_t> { - typedef typename GT::NodeRef NodeRef; - typedef typename GT::ChildIteratorType ChildItTy; - typedef std::vector SccTy; - typedef typename scc_iterator::reference reference; - - /// Element of VisitStack during DFS. - struct StackElement { - NodeRef Node; ///< The current node pointer. - ChildItTy NextChild; ///< The next child, modified inplace during DFS. - unsigned MinVisited; ///< Minimum uplink value of all children of Node. - - StackElement(NodeRef Node, const ChildItTy &Child, unsigned Min) - : Node(Node), NextChild(Child), MinVisited(Min) {} - - bool operator==(const StackElement &Other) const { - return Node == Other.Node && - NextChild == Other.NextChild && - MinVisited == Other.MinVisited; - } - }; - - /// The visit counters used to detect when a complete SCC is on the stack. - /// visitNum is the global counter. - /// - /// nodeVisitNumbers are per-node visit numbers, also used as DFS flags. - unsigned visitNum; - DenseMap nodeVisitNumbers; - - /// Stack holding nodes of the SCC. - std::vector SCCNodeStack; - - /// The current SCC, retrieved using operator*(). - SccTy CurrentSCC; - - /// DFS stack, Used to maintain the ordering. The top contains the current - /// node, the next child to visit, and the minimum uplink value of all child - std::vector VisitStack; - - /// A single "visit" within the non-recursive DFS traversal. - void DFSVisitOne(NodeRef N); - - /// The stack-based DFS traversal; defined below. - void DFSVisitChildren(); - - /// Compute the next SCC using the DFS traversal. - void GetNextSCC(); - - scc_iterator(NodeRef entryN) : visitNum(0) { - DFSVisitOne(entryN); - GetNextSCC(); - } - - /// End is when the DFS stack is empty. - scc_iterator() {} - -public: - static scc_iterator begin(const GraphT &G) { - return scc_iterator(GT::getEntryNode(G)); - } - static scc_iterator end(const GraphT &) { return scc_iterator(); } - - /// \brief Direct loop termination test which is more efficient than - /// comparison with \c end(). - bool isAtEnd() const { - assert(!CurrentSCC.empty() || VisitStack.empty()); - return CurrentSCC.empty(); - } - - bool operator==(const scc_iterator &x) const { - return VisitStack == x.VisitStack && CurrentSCC == x.CurrentSCC; - } - - scc_iterator &operator++() { - GetNextSCC(); - return *this; - } - - reference operator*() const { - assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); - return CurrentSCC; - } - - /// \brief Test if the current SCC has a loop. - /// - /// If the SCC has more than one node, this is trivially true. If not, it may - /// still contain a loop if the node has an edge back to itself. - bool hasLoop() const; - - /// This informs the \c scc_iterator that the specified \c Old node - /// has been deleted, and \c New is to be used in its place. - void ReplaceNode(NodeRef Old, NodeRef New) { - assert(nodeVisitNumbers.count(Old) && "Old not in scc_iterator?"); - nodeVisitNumbers[New] = nodeVisitNumbers[Old]; - nodeVisitNumbers.erase(Old); - } -}; - -template -void scc_iterator::DFSVisitOne(NodeRef N) { - ++visitNum; - nodeVisitNumbers[N] = visitNum; - SCCNodeStack.push_back(N); - VisitStack.push_back(StackElement(N, GT::child_begin(N), visitNum)); -#if 0 // Enable if needed when debugging. - dbgs() << "TarjanSCC: Node " << N << - " : visitNum = " << visitNum << "\n"; -#endif -} - -template -void scc_iterator::DFSVisitChildren() { - assert(!VisitStack.empty()); - while (VisitStack.back().NextChild != GT::child_end(VisitStack.back().Node)) { - // TOS has at least one more child so continue DFS - NodeRef childN = *VisitStack.back().NextChild++; - typename DenseMap::iterator Visited = - nodeVisitNumbers.find(childN); - if (Visited == nodeVisitNumbers.end()) { - // this node has never been seen. - DFSVisitOne(childN); - continue; - } - - unsigned childNum = Visited->second; - if (VisitStack.back().MinVisited > childNum) - VisitStack.back().MinVisited = childNum; - } -} - -template void scc_iterator::GetNextSCC() { - CurrentSCC.clear(); // Prepare to compute the next SCC - while (!VisitStack.empty()) { - DFSVisitChildren(); - - // Pop the leaf on top of the VisitStack. - NodeRef visitingN = VisitStack.back().Node; - unsigned minVisitNum = VisitStack.back().MinVisited; - assert(VisitStack.back().NextChild == GT::child_end(visitingN)); - VisitStack.pop_back(); - - // Propagate MinVisitNum to parent so we can detect the SCC starting node. - if (!VisitStack.empty() && VisitStack.back().MinVisited > minVisitNum) - VisitStack.back().MinVisited = minVisitNum; - -#if 0 // Enable if needed when debugging. - dbgs() << "TarjanSCC: Popped node " << visitingN << - " : minVisitNum = " << minVisitNum << "; Node visit num = " << - nodeVisitNumbers[visitingN] << "\n"; -#endif - - if (minVisitNum != nodeVisitNumbers[visitingN]) - continue; - - // A full SCC is on the SCCNodeStack! It includes all nodes below - // visitingN on the stack. Copy those nodes to CurrentSCC, - // reset their minVisit values, and return (this suspends - // the DFS traversal till the next ++). - do { - CurrentSCC.push_back(SCCNodeStack.back()); - SCCNodeStack.pop_back(); - nodeVisitNumbers[CurrentSCC.back()] = ~0U; - } while (CurrentSCC.back() != visitingN); - return; - } -} - -template -bool scc_iterator::hasLoop() const { - assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); - if (CurrentSCC.size() > 1) - return true; - NodeRef N = CurrentSCC.front(); - for (ChildItTy CI = GT::child_begin(N), CE = GT::child_end(N); CI != CE; - ++CI) - if (*CI == N) - return true; - return false; - } - -/// \brief Construct the begin iterator for a deduced graph type T. -template scc_iterator scc_begin(const T &G) { - return scc_iterator::begin(G); -} - -/// \brief Construct the end iterator for a deduced graph type T. -template scc_iterator scc_end(const T &G) { - return scc_iterator::end(G); -} - -/// \brief Construct the begin iterator for a deduced graph type T's Inverse. -template scc_iterator > scc_begin(const Inverse &G) { - return scc_iterator >::begin(G); -} - -/// \brief Construct the end iterator for a deduced graph type T's Inverse. -template scc_iterator > scc_end(const Inverse &G) { - return scc_iterator >::end(G); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/STLExtras.h b/llvm/include/llvm/ADT/STLExtras.h deleted file mode 100644 index 00b796f6..00000000 --- a/llvm/include/llvm/ADT/STLExtras.h +++ /dev/null @@ -1,613 +0,0 @@ -//===- llvm/ADT/STLExtras.h - Useful STL related functions ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains some templates that are useful if you are working with the -// STL at all. -// -// No library is required when using these functions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_STLEXTRAS_H -#define LLVM_ADT_STLEXTRAS_H - -#include // for std::all_of -#include -#include // for std::size_t -#include // for qsort -#include -#include -#include -#include // for std::pair - -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/iterator.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { -namespace detail { - -template -using IterOfRange = decltype(std::begin(std::declval())); - -} // End detail namespace - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -template -struct identity : public std::unary_function { - Ty &operator()(Ty &self) const { - return self; - } - const Ty &operator()(const Ty &self) const { - return self; - } -}; - -template -struct less_ptr : public std::binary_function { - bool operator()(const Ty* left, const Ty* right) const { - return *left < *right; - } -}; - -template -struct greater_ptr : public std::binary_function { - bool operator()(const Ty* left, const Ty* right) const { - return *right < *left; - } -}; - -/// An efficient, type-erasing, non-owning reference to a callable. This is -/// intended for use as the type of a function parameter that is not used -/// after the function in question returns. -/// -/// This class does not own the callable, so it is not in general safe to store -/// a function_ref. -template class function_ref; - -template -class function_ref { - Ret (*callback)(intptr_t callable, Params ...params); - intptr_t callable; - - template - static Ret callback_fn(intptr_t callable, Params ...params) { - return (*reinterpret_cast(callable))( - std::forward(params)...); - } - -public: - template - function_ref(Callable &&callable, - typename std::enable_if< - !std::is_same::type, - function_ref>::value>::type * = nullptr) - : callback(callback_fn::type>), - callable(reinterpret_cast(&callable)) {} - Ret operator()(Params ...params) const { - return callback(callable, std::forward(params)...); - } -}; - -// deleter - Very very very simple method that is used to invoke operator -// delete on something. It is used like this: -// -// for_each(V.begin(), B.end(), deleter); -// -template -inline void deleter(T *Ptr) { - delete Ptr; -} - - - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -// mapped_iterator - This is a simple iterator adapter that causes a function to -// be dereferenced whenever operator* is invoked on the iterator. -// -template -class mapped_iterator { - RootIt current; - UnaryFunc Fn; -public: - typedef typename std::iterator_traits::iterator_category - iterator_category; - typedef typename std::iterator_traits::difference_type - difference_type; - typedef typename std::result_of< - UnaryFunc(decltype(*std::declval()))> - ::type value_type; - - typedef void pointer; - //typedef typename UnaryFunc::result_type *pointer; - typedef void reference; // Can't modify value returned by fn - - typedef RootIt iterator_type; - - inline const RootIt &getCurrent() const { return current; } - inline const UnaryFunc &getFunc() const { return Fn; } - - inline explicit mapped_iterator(const RootIt &I, UnaryFunc F) - : current(I), Fn(F) {} - - inline value_type operator*() const { // All this work to do this - return Fn(*current); // little change - } - - mapped_iterator &operator++() { - ++current; - return *this; - } - mapped_iterator &operator--() { - --current; - return *this; - } - mapped_iterator operator++(int) { - mapped_iterator __tmp = *this; - ++current; - return __tmp; - } - mapped_iterator operator--(int) { - mapped_iterator __tmp = *this; - --current; - return __tmp; - } - mapped_iterator operator+(difference_type n) const { - return mapped_iterator(current + n, Fn); - } - mapped_iterator &operator+=(difference_type n) { - current += n; - return *this; - } - mapped_iterator operator-(difference_type n) const { - return mapped_iterator(current - n, Fn); - } - mapped_iterator &operator-=(difference_type n) { - current -= n; - return *this; - } - reference operator[](difference_type n) const { return *(*this + n); } - - bool operator!=(const mapped_iterator &X) const { return !operator==(X); } - bool operator==(const mapped_iterator &X) const { - return current == X.current; - } - bool operator<(const mapped_iterator &X) const { return current < X.current; } - - difference_type operator-(const mapped_iterator &X) const { - return current - X.current; - } -}; - -template -inline mapped_iterator -operator+(typename mapped_iterator::difference_type N, - const mapped_iterator &X) { - return mapped_iterator(X.getCurrent() - N, X.getFunc()); -} - - -// map_iterator - Provide a convenient way to create mapped_iterators, just like -// make_pair is useful for creating pairs... -// -template -inline mapped_iterator map_iterator(const ItTy &I, FuncTy F) { - return mapped_iterator(I, F); -} - -/// \brief Metafunction to determine if type T has a member called rbegin(). -template struct has_rbegin { - template static char(&f(const U &, decltype(&U::rbegin)))[1]; - static char(&f(...))[2]; - const static bool value = sizeof(f(std::declval(), nullptr)) == 1; -}; - -// Returns an iterator_range over the given container which iterates in reverse. -// Note that the container must have rbegin()/rend() methods for this to work. -template -auto reverse(ContainerTy &&C, - typename std::enable_if::value>::type * = - nullptr) -> decltype(make_range(C.rbegin(), C.rend())) { - return make_range(C.rbegin(), C.rend()); -} - -// Returns a std::reverse_iterator wrapped around the given iterator. -template -std::reverse_iterator make_reverse_iterator(IteratorTy It) { - return std::reverse_iterator(It); -} - -// Returns an iterator_range over the given container which iterates in reverse. -// Note that the container must have begin()/end() methods which return -// bidirectional iterators for this to work. -template -auto reverse( - ContainerTy &&C, - typename std::enable_if::value>::type * = nullptr) - -> decltype(make_range(llvm::make_reverse_iterator(std::end(C)), - llvm::make_reverse_iterator(std::begin(C)))) { - return make_range(llvm::make_reverse_iterator(std::end(C)), - llvm::make_reverse_iterator(std::begin(C))); -} - -/// An iterator adaptor that filters the elements of given inner iterators. -/// -/// The predicate parameter should be a callable object that accepts the wrapped -/// iterator's reference type and returns a bool. When incrementing or -/// decrementing the iterator, it will call the predicate on each element and -/// skip any where it returns false. -/// -/// \code -/// int A[] = { 1, 2, 3, 4 }; -/// auto R = make_filter_range(A, [](int N) { return N % 2 == 1; }); -/// // R contains { 1, 3 }. -/// \endcode -template -class filter_iterator - : public iterator_adaptor_base< - filter_iterator, WrappedIteratorT, - typename std::common_type< - std::forward_iterator_tag, - typename std::iterator_traits< - WrappedIteratorT>::iterator_category>::type> { - using BaseT = iterator_adaptor_base< - filter_iterator, WrappedIteratorT, - typename std::common_type< - std::forward_iterator_tag, - typename std::iterator_traits::iterator_category>:: - type>; - - struct PayloadType { - WrappedIteratorT End; - PredicateT Pred; - }; - - Optional Payload; - - void findNextValid() { - assert(Payload && "Payload should be engaged when findNextValid is called"); - while (this->I != Payload->End && !Payload->Pred(*this->I)) - BaseT::operator++(); - } - - // Construct the begin iterator. The begin iterator requires to know where end - // is, so that it can properly stop when it hits end. - filter_iterator(WrappedIteratorT Begin, WrappedIteratorT End, PredicateT Pred) - : BaseT(std::move(Begin)), - Payload(PayloadType{std::move(End), std::move(Pred)}) { - findNextValid(); - } - - // Construct the end iterator. It's not incrementable, so Payload doesn't - // have to be engaged. - filter_iterator(WrappedIteratorT End) : BaseT(End) {} - -public: - using BaseT::operator++; - - filter_iterator &operator++() { - BaseT::operator++(); - findNextValid(); - return *this; - } - - template - friend iterator_range, PT>> - make_filter_range(RT &&, PT); -}; - -/// Convenience function that takes a range of elements and a predicate, -/// and return a new filter_iterator range. -/// -/// FIXME: Currently if RangeT && is a rvalue reference to a temporary, the -/// lifetime of that temporary is not kept by the returned range object, and the -/// temporary is going to be dropped on the floor after the make_iterator_range -/// full expression that contains this function call. -template -iterator_range, PredicateT>> -make_filter_range(RangeT &&Range, PredicateT Pred) { - using FilterIteratorT = - filter_iterator, PredicateT>; - return make_range(FilterIteratorT(std::begin(std::forward(Range)), - std::end(std::forward(Range)), - std::move(Pred)), - FilterIteratorT(std::end(std::forward(Range)))); -} - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -/// \brief Function object to check whether the first component of a std::pair -/// compares less than the first component of another std::pair. -struct less_first { - template bool operator()(const T &lhs, const T &rhs) const { - return lhs.first < rhs.first; - } -}; - -/// \brief Function object to check whether the second component of a std::pair -/// compares less than the second component of another std::pair. -struct less_second { - template bool operator()(const T &lhs, const T &rhs) const { - return lhs.second < rhs.second; - } -}; - -// A subset of N3658. More stuff can be added as-needed. - -/// \brief Represents a compile-time sequence of integers. -template struct integer_sequence { - typedef T value_type; - - static LLVM_CONSTEXPR size_t size() { return sizeof...(I); } -}; - -/// \brief Alias for the common case of a sequence of size_ts. -template -struct index_sequence : integer_sequence {}; - -template -struct build_index_impl : build_index_impl {}; -template -struct build_index_impl<0, I...> : index_sequence {}; - -/// \brief Creates a compile-time integer sequence for a parameter pack. -template -struct index_sequence_for : build_index_impl {}; - -//===----------------------------------------------------------------------===// -// Extra additions for arrays -//===----------------------------------------------------------------------===// - -/// Find the length of an array. -template -LLVM_CONSTEXPR inline size_t array_lengthof(T (&)[N]) { - return N; -} - -/// Adapt std::less for array_pod_sort. -template -inline int array_pod_sort_comparator(const void *P1, const void *P2) { - if (std::less()(*reinterpret_cast(P1), - *reinterpret_cast(P2))) - return -1; - if (std::less()(*reinterpret_cast(P2), - *reinterpret_cast(P1))) - return 1; - return 0; -} - -/// get_array_pod_sort_comparator - This is an internal helper function used to -/// get type deduction of T right. -template -inline int (*get_array_pod_sort_comparator(const T &)) - (const void*, const void*) { - return array_pod_sort_comparator; -} - - -/// array_pod_sort - This sorts an array with the specified start and end -/// extent. This is just like std::sort, except that it calls qsort instead of -/// using an inlined template. qsort is slightly slower than std::sort, but -/// most sorts are not performance critical in LLVM and std::sort has to be -/// template instantiated for each type, leading to significant measured code -/// bloat. This function should generally be used instead of std::sort where -/// possible. -/// -/// This function assumes that you have simple POD-like types that can be -/// compared with std::less and can be moved with memcpy. If this isn't true, -/// you should use std::sort. -/// -/// NOTE: If qsort_r were portable, we could allow a custom comparator and -/// default to std::less. -template -inline void array_pod_sort(IteratorTy Start, IteratorTy End) { - // Don't inefficiently call qsort with one element or trigger undefined - // behavior with an empty sequence. - auto NElts = End - Start; - if (NElts <= 1) return; - qsort(&*Start, NElts, sizeof(*Start), get_array_pod_sort_comparator(*Start)); -} - -template -inline void array_pod_sort( - IteratorTy Start, IteratorTy End, - int (*Compare)( - const typename std::iterator_traits::value_type *, - const typename std::iterator_traits::value_type *)) { - // Don't inefficiently call qsort with one element or trigger undefined - // behavior with an empty sequence. - auto NElts = End - Start; - if (NElts <= 1) return; - qsort(&*Start, NElts, sizeof(*Start), - reinterpret_cast(Compare)); -} - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -/// For a container of pointers, deletes the pointers and then clears the -/// container. -template -void DeleteContainerPointers(Container &C) { - for (typename Container::iterator I = C.begin(), E = C.end(); I != E; ++I) - delete *I; - C.clear(); -} - -/// In a container of pairs (usually a map) whose second element is a pointer, -/// deletes the second elements and then clears the container. -template -void DeleteContainerSeconds(Container &C) { - for (typename Container::iterator I = C.begin(), E = C.end(); I != E; ++I) - delete I->second; - C.clear(); -} - -/// Provide wrappers to std::all_of which take ranges instead of having to pass -/// begin/end explicitly. -template -bool all_of(R &&Range, UnaryPredicate &&P) { - return std::all_of(Range.begin(), Range.end(), - std::forward(P)); -} - -/// Provide wrappers to std::any_of which take ranges instead of having to pass -/// begin/end explicitly. -template -bool any_of(R &&Range, UnaryPredicate &&P) { - return std::any_of(Range.begin(), Range.end(), - std::forward(P)); -} - -/// Provide wrappers to std::none_of which take ranges instead of having to pass -/// begin/end explicitly. -template -bool none_of(R &&Range, UnaryPredicate &&P) { - return std::none_of(Range.begin(), Range.end(), - std::forward(P)); -} - -/// Provide wrappers to std::find which take ranges instead of having to pass -/// begin/end explicitly. -template -auto find(R &&Range, const T &val) -> decltype(Range.begin()) { - return std::find(Range.begin(), Range.end(), val); -} - -/// Provide wrappers to std::find_if which take ranges instead of having to pass -/// begin/end explicitly. -template -auto find_if(R &&Range, const T &Pred) -> decltype(Range.begin()) { - return std::find_if(Range.begin(), Range.end(), Pred); -} - -/// Provide wrappers to std::remove_if which take ranges instead of having to -/// pass begin/end explicitly. -template -auto remove_if(R &&Range, UnaryPredicate &&P) -> decltype(Range.begin()) { - return std::remove_if(Range.begin(), Range.end(), P); -} - -/// Wrapper function around std::find to detect if an element exists -/// in a container. -template -bool is_contained(R &&Range, const E &Element) { - return std::find(Range.begin(), Range.end(), Element) != Range.end(); -} - -/// Wrapper function around std::count_if to count the number of times an -/// element satisfying a given predicate occurs in a range. -template -auto count_if(R &&Range, UnaryPredicate &&P) - -> typename std::iterator_traits::difference_type { - return std::count_if(Range.begin(), Range.end(), P); -} - -/// Wrapper function around std::transform to apply a function to a range and -/// store the result elsewhere. -template -OutputIt transform(R &&Range, OutputIt d_first, UnaryPredicate &&P) { - return std::transform(Range.begin(), Range.end(), d_first, - std::forward(P)); -} - -//===----------------------------------------------------------------------===// -// Extra additions to -//===----------------------------------------------------------------------===// - -// Implement make_unique according to N3656. - -/// \brief Constructs a `new T()` with the given args and returns a -/// `unique_ptr` which owns the object. -/// -/// Example: -/// -/// auto p = make_unique(); -/// auto p = make_unique>(0, 1); -template -typename std::enable_if::value, std::unique_ptr>::type -make_unique(Args &&... args) { - return std::unique_ptr(new T(std::forward(args)...)); -} - -/// \brief Constructs a `new T[n]` with the given args and returns a -/// `unique_ptr` which owns the object. -/// -/// \param n size of the new array. -/// -/// Example: -/// -/// auto p = make_unique(2); // value-initializes the array with 0's. -template -typename std::enable_if::value && std::extent::value == 0, - std::unique_ptr>::type -make_unique(size_t n) { - return std::unique_ptr(new typename std::remove_extent::type[n]()); -} - -/// This function isn't used and is only here to provide better compile errors. -template -typename std::enable_if::value != 0>::type -make_unique(Args &&...) = delete; - -struct FreeDeleter { - void operator()(void* v) { - ::free(v); - } -}; - -template -struct pair_hash { - size_t operator()(const std::pair &P) const { - return std::hash()(P.first) * 31 + std::hash()(P.second); - } -}; - -/// A functor like C++14's std::less in its absence. -struct less { - template bool operator()(A &&a, B &&b) const { - return std::forward(a) < std::forward(b); - } -}; - -/// A functor like C++14's std::equal in its absence. -struct equal { - template bool operator()(A &&a, B &&b) const { - return std::forward(a) == std::forward(b); - } -}; - -/// Binary functor that adapts to any other binary functor after dereferencing -/// operands. -template struct deref { - T func; - // Could be further improved to cope with non-derivable functors and - // non-binary functors (should be a variadic template member function - // operator()). - template - auto operator()(A &lhs, B &rhs) const -> decltype(func(*lhs, *rhs)) { - assert(lhs); - assert(rhs); - return func(*lhs, *rhs); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/ScopedHashTable.h b/llvm/include/llvm/ADT/ScopedHashTable.h deleted file mode 100644 index 4af3d6d3..00000000 --- a/llvm/include/llvm/ADT/ScopedHashTable.h +++ /dev/null @@ -1,256 +0,0 @@ -//===- ScopedHashTable.h - A simple scoped hash table -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements an efficient scoped hash table, which is useful for -// things like dominator-based optimizations. This allows clients to do things -// like this: -// -// ScopedHashTable HT; -// { -// ScopedHashTableScope Scope1(HT); -// HT.insert(0, 0); -// HT.insert(1, 1); -// { -// ScopedHashTableScope Scope2(HT); -// HT.insert(0, 42); -// } -// } -// -// Looking up the value for "0" in the Scope2 block will return 42. Looking -// up the value for 0 before 42 is inserted or after Scope2 is popped will -// return 0. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SCOPEDHASHTABLE_H -#define LLVM_ADT_SCOPEDHASHTABLE_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/Support/Allocator.h" - -namespace llvm { - -template , - typename AllocatorTy = MallocAllocator> -class ScopedHashTable; - -template -class ScopedHashTableVal { - ScopedHashTableVal *NextInScope; - ScopedHashTableVal *NextForKey; - K Key; - V Val; - ScopedHashTableVal(const K &key, const V &val) : Key(key), Val(val) {} - -public: - const K &getKey() const { return Key; } - const V &getValue() const { return Val; } - V &getValue() { return Val; } - - ScopedHashTableVal *getNextForKey() { return NextForKey; } - const ScopedHashTableVal *getNextForKey() const { return NextForKey; } - ScopedHashTableVal *getNextInScope() { return NextInScope; } - - template - static ScopedHashTableVal *Create(ScopedHashTableVal *nextInScope, - ScopedHashTableVal *nextForKey, - const K &key, const V &val, - AllocatorTy &Allocator) { - ScopedHashTableVal *New = Allocator.template Allocate(); - // Set up the value. - new (New) ScopedHashTableVal(key, val); - New->NextInScope = nextInScope; - New->NextForKey = nextForKey; - return New; - } - - template void Destroy(AllocatorTy &Allocator) { - // Free memory referenced by the item. - this->~ScopedHashTableVal(); - Allocator.Deallocate(this); - } -}; - -template , - typename AllocatorTy = MallocAllocator> -class ScopedHashTableScope { - /// HT - The hashtable that we are active for. - ScopedHashTable &HT; - - /// PrevScope - This is the scope that we are shadowing in HT. - ScopedHashTableScope *PrevScope; - - /// LastValInScope - This is the last value that was inserted for this scope - /// or null if none have been inserted yet. - ScopedHashTableVal *LastValInScope; - void operator=(ScopedHashTableScope &) = delete; - ScopedHashTableScope(ScopedHashTableScope &) = delete; - -public: - ScopedHashTableScope(ScopedHashTable &HT); - ~ScopedHashTableScope(); - - ScopedHashTableScope *getParentScope() { return PrevScope; } - const ScopedHashTableScope *getParentScope() const { return PrevScope; } - -private: - friend class ScopedHashTable; - ScopedHashTableVal *getLastValInScope() { - return LastValInScope; - } - void setLastValInScope(ScopedHashTableVal *Val) { - LastValInScope = Val; - } -}; - -template > -class ScopedHashTableIterator { - ScopedHashTableVal *Node; - -public: - ScopedHashTableIterator(ScopedHashTableVal *node) : Node(node) {} - - V &operator*() const { - assert(Node && "Dereference end()"); - return Node->getValue(); - } - V *operator->() const { - return &Node->getValue(); - } - - bool operator==(const ScopedHashTableIterator &RHS) const { - return Node == RHS.Node; - } - bool operator!=(const ScopedHashTableIterator &RHS) const { - return Node != RHS.Node; - } - - inline ScopedHashTableIterator& operator++() { // Preincrement - assert(Node && "incrementing past end()"); - Node = Node->getNextForKey(); - return *this; - } - ScopedHashTableIterator operator++(int) { // Postincrement - ScopedHashTableIterator tmp = *this; ++*this; return tmp; - } -}; - -template -class ScopedHashTable { -public: - /// ScopeTy - This is a helpful typedef that allows clients to get easy access - /// to the name of the scope for this hash table. - typedef ScopedHashTableScope ScopeTy; - typedef unsigned size_type; - -private: - typedef ScopedHashTableVal ValTy; - DenseMap TopLevelMap; - ScopeTy *CurScope; - - AllocatorTy Allocator; - - ScopedHashTable(const ScopedHashTable &); // NOT YET IMPLEMENTED - void operator=(const ScopedHashTable &); // NOT YET IMPLEMENTED - friend class ScopedHashTableScope; - -public: - ScopedHashTable() : CurScope(nullptr) {} - ScopedHashTable(AllocatorTy A) : CurScope(0), Allocator(A) {} - ~ScopedHashTable() { - assert(!CurScope && TopLevelMap.empty() && "Scope imbalance!"); - } - - /// Access to the allocator. - AllocatorTy &getAllocator() { return Allocator; } - const AllocatorTy &getAllocator() const { return Allocator; } - - /// Return 1 if the specified key is in the table, 0 otherwise. - size_type count(const K &Key) const { - return TopLevelMap.count(Key); - } - - V lookup(const K &Key) { - typename DenseMap::iterator I = TopLevelMap.find(Key); - if (I != TopLevelMap.end()) - return I->second->getValue(); - - return V(); - } - - void insert(const K &Key, const V &Val) { - insertIntoScope(CurScope, Key, Val); - } - - typedef ScopedHashTableIterator iterator; - - iterator end() { return iterator(0); } - - iterator begin(const K &Key) { - typename DenseMap::iterator I = - TopLevelMap.find(Key); - if (I == TopLevelMap.end()) return end(); - return iterator(I->second); - } - - ScopeTy *getCurScope() { return CurScope; } - const ScopeTy *getCurScope() const { return CurScope; } - - /// insertIntoScope - This inserts the specified key/value at the specified - /// (possibly not the current) scope. While it is ok to insert into a scope - /// that isn't the current one, it isn't ok to insert *underneath* an existing - /// value of the specified key. - void insertIntoScope(ScopeTy *S, const K &Key, const V &Val) { - assert(S && "No scope active!"); - ScopedHashTableVal *&KeyEntry = TopLevelMap[Key]; - KeyEntry = ValTy::Create(S->getLastValInScope(), KeyEntry, Key, Val, - Allocator); - S->setLastValInScope(KeyEntry); - } -}; - -/// ScopedHashTableScope ctor - Install this as the current scope for the hash -/// table. -template -ScopedHashTableScope:: - ScopedHashTableScope(ScopedHashTable &ht) : HT(ht) { - PrevScope = HT.CurScope; - HT.CurScope = this; - LastValInScope = nullptr; -} - -template -ScopedHashTableScope::~ScopedHashTableScope() { - assert(HT.CurScope == this && "Scope imbalance!"); - HT.CurScope = PrevScope; - - // Pop and delete all values corresponding to this scope. - while (ScopedHashTableVal *ThisEntry = LastValInScope) { - // Pop this value out of the TopLevelMap. - if (!ThisEntry->getNextForKey()) { - assert(HT.TopLevelMap[ThisEntry->getKey()] == ThisEntry && - "Scope imbalance!"); - HT.TopLevelMap.erase(ThisEntry->getKey()); - } else { - ScopedHashTableVal *&KeyEntry = HT.TopLevelMap[ThisEntry->getKey()]; - assert(KeyEntry == ThisEntry && "Scope imbalance!"); - KeyEntry = ThisEntry->getNextForKey(); - } - - // Pop this value out of the scope. - LastValInScope = ThisEntry->getNextInScope(); - - // Delete this entry. - ThisEntry->Destroy(HT.getAllocator()); - } -} - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/Sequence.h b/llvm/include/llvm/ADT/Sequence.h deleted file mode 100644 index 5d36831c..00000000 --- a/llvm/include/llvm/ADT/Sequence.h +++ /dev/null @@ -1,79 +0,0 @@ -//===- Sequence.h - Utility for producing sequences of values ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This routine provides some synthesis utilities to produce sequences of -/// values. The names are intentionally kept very short as they tend to occur -/// in common and widely used contexts. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SEQ_H -#define LLVM_ADT_SEQ_H - -#include "llvm/ADT/iterator.h" -#include "llvm/ADT/iterator_range.h" - -namespace llvm { - -namespace detail { -template -class value_sequence_iterator - : public iterator_facade_base, - std::random_access_iterator_tag, - const ValueT> { - typedef typename value_sequence_iterator::iterator_facade_base BaseT; - - ValueT Value; - -public: - typedef typename BaseT::difference_type difference_type; - typedef typename BaseT::reference reference; - - value_sequence_iterator() = default; - value_sequence_iterator(const value_sequence_iterator &) = default; - value_sequence_iterator(value_sequence_iterator &&Arg) - : Value(std::move(Arg.Value)) {} - - template ()))> - value_sequence_iterator(U &&Value) : Value(std::forward(Value)) {} - - value_sequence_iterator &operator+=(difference_type N) { - Value += N; - return *this; - } - value_sequence_iterator &operator-=(difference_type N) { - Value -= N; - return *this; - } - using BaseT::operator-; - difference_type operator-(const value_sequence_iterator &RHS) const { - return Value - RHS.Value; - } - - bool operator==(const value_sequence_iterator &RHS) const { - return Value == RHS.Value; - } - bool operator<(const value_sequence_iterator &RHS) const { - return Value < RHS.Value; - } - - reference operator*() const { return Value; } -}; -} // End detail namespace. - -template -iterator_range> seq(ValueT Begin, - ValueT End) { - return make_range(detail::value_sequence_iterator(Begin), - detail::value_sequence_iterator(End)); -} - -} - -#endif diff --git a/llvm/include/llvm/ADT/SetOperations.h b/llvm/include/llvm/ADT/SetOperations.h deleted file mode 100644 index 7c9f2fbe..00000000 --- a/llvm/include/llvm/ADT/SetOperations.h +++ /dev/null @@ -1,71 +0,0 @@ -//===-- llvm/ADT/SetOperations.h - Generic Set Operations -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines generic set operations that may be used on set's of -// different types, and different element types. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SETOPERATIONS_H -#define LLVM_ADT_SETOPERATIONS_H - -namespace llvm { - -/// set_union(A, B) - Compute A := A u B, return whether A changed. -/// -template -bool set_union(S1Ty &S1, const S2Ty &S2) { - bool Changed = false; - - for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); - SI != SE; ++SI) - if (S1.insert(*SI).second) - Changed = true; - - return Changed; -} - -/// set_intersect(A, B) - Compute A := A ^ B -/// Identical to set_intersection, except that it works on set<>'s and -/// is nicer to use. Functionally, this iterates through S1, removing -/// elements that are not contained in S2. -/// -template -void set_intersect(S1Ty &S1, const S2Ty &S2) { - for (typename S1Ty::iterator I = S1.begin(); I != S1.end();) { - const auto &E = *I; - ++I; - if (!S2.count(E)) S1.erase(E); // Erase element if not in S2 - } -} - -/// set_difference(A, B) - Return A - B -/// -template -S1Ty set_difference(const S1Ty &S1, const S2Ty &S2) { - S1Ty Result; - for (typename S1Ty::const_iterator SI = S1.begin(), SE = S1.end(); - SI != SE; ++SI) - if (!S2.count(*SI)) // if the element is not in set2 - Result.insert(*SI); - return Result; -} - -/// set_subtract(A, B) - Compute A := A - B -/// -template -void set_subtract(S1Ty &S1, const S2Ty &S2) { - for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); - SI != SE; ++SI) - S1.erase(*SI); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/SetVector.h b/llvm/include/llvm/ADT/SetVector.h deleted file mode 100644 index 2bb0fdbd..00000000 --- a/llvm/include/llvm/ADT/SetVector.h +++ /dev/null @@ -1,300 +0,0 @@ -//===- llvm/ADT/SetVector.h - Set with insert order iteration ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements a set that has insertion order iteration -// characteristics. This is useful for keeping a set of things that need to be -// visited later but in a deterministic order (insertion order). The interface -// is purposefully minimal. -// -// This file defines SetVector and SmallSetVector, which performs no allocations -// if the SetVector has less than a certain number of elements. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SETVECTOR_H -#define LLVM_ADT_SETVECTOR_H - -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/SmallSet.h" -#include -#include -#include -#include - -namespace llvm { - -/// \brief A vector that has set insertion semantics. -/// -/// This adapter class provides a way to keep a set of things that also has the -/// property of a deterministic iteration order. The order of iteration is the -/// order of insertion. -template , - typename Set = DenseSet> -class SetVector { -public: - typedef T value_type; - typedef T key_type; - typedef T& reference; - typedef const T& const_reference; - typedef Set set_type; - typedef Vector vector_type; - typedef typename vector_type::const_iterator iterator; - typedef typename vector_type::const_iterator const_iterator; - typedef typename vector_type::const_reverse_iterator reverse_iterator; - typedef typename vector_type::const_reverse_iterator const_reverse_iterator; - typedef typename vector_type::size_type size_type; - - /// \brief Construct an empty SetVector - SetVector() {} - - /// \brief Initialize a SetVector with a range of elements - template - SetVector(It Start, It End) { - insert(Start, End); - } - - ArrayRef getArrayRef() const { return vector_; } - - /// \brief Determine if the SetVector is empty or not. - bool empty() const { - return vector_.empty(); - } - - /// \brief Determine the number of elements in the SetVector. - size_type size() const { - return vector_.size(); - } - - /// \brief Get an iterator to the beginning of the SetVector. - iterator begin() { - return vector_.begin(); - } - - /// \brief Get a const_iterator to the beginning of the SetVector. - const_iterator begin() const { - return vector_.begin(); - } - - /// \brief Get an iterator to the end of the SetVector. - iterator end() { - return vector_.end(); - } - - /// \brief Get a const_iterator to the end of the SetVector. - const_iterator end() const { - return vector_.end(); - } - - /// \brief Get an reverse_iterator to the end of the SetVector. - reverse_iterator rbegin() { - return vector_.rbegin(); - } - - /// \brief Get a const_reverse_iterator to the end of the SetVector. - const_reverse_iterator rbegin() const { - return vector_.rbegin(); - } - - /// \brief Get a reverse_iterator to the beginning of the SetVector. - reverse_iterator rend() { - return vector_.rend(); - } - - /// \brief Get a const_reverse_iterator to the beginning of the SetVector. - const_reverse_iterator rend() const { - return vector_.rend(); - } - - /// \brief Return the last element of the SetVector. - const T &back() const { - assert(!empty() && "Cannot call back() on empty SetVector!"); - return vector_.back(); - } - - /// \brief Index into the SetVector. - const_reference operator[](size_type n) const { - assert(n < vector_.size() && "SetVector access out of range!"); - return vector_[n]; - } - - /// \brief Insert a new element into the SetVector. - /// \returns true if the element was inserted into the SetVector. - bool insert(const value_type &X) { - bool result = set_.insert(X).second; - if (result) - vector_.push_back(X); - return result; - } - - /// \brief Insert a range of elements into the SetVector. - template - void insert(It Start, It End) { - for (; Start != End; ++Start) - if (set_.insert(*Start).second) - vector_.push_back(*Start); - } - - /// \brief Remove an item from the set vector. - bool remove(const value_type& X) { - if (set_.erase(X)) { - typename vector_type::iterator I = - std::find(vector_.begin(), vector_.end(), X); - assert(I != vector_.end() && "Corrupted SetVector instances!"); - vector_.erase(I); - return true; - } - return false; - } - - /// Erase a single element from the set vector. - /// \returns an iterator pointing to the next element that followed the - /// element erased. This is the end of the SetVector if the last element is - /// erased. - iterator erase(iterator I) { - const key_type &V = *I; - assert(set_.count(V) && "Corrupted SetVector instances!"); - set_.erase(V); - - // FIXME: No need to use the non-const iterator when built with - // std:vector.erase(const_iterator) as defined in C++11. This is for - // compatibility with non-standard libstdc++ up to 4.8 (fixed in 4.9). - auto NI = vector_.begin(); - std::advance(NI, std::distance(NI, I)); - - return vector_.erase(NI); - } - - /// \brief Remove items from the set vector based on a predicate function. - /// - /// This is intended to be equivalent to the following code, if we could - /// write it: - /// - /// \code - /// V.erase(std::remove_if(V.begin(), V.end(), P), V.end()); - /// \endcode - /// - /// However, SetVector doesn't expose non-const iterators, making any - /// algorithm like remove_if impossible to use. - /// - /// \returns true if any element is removed. - template - bool remove_if(UnaryPredicate P) { - typename vector_type::iterator I - = std::remove_if(vector_.begin(), vector_.end(), - TestAndEraseFromSet(P, set_)); - if (I == vector_.end()) - return false; - vector_.erase(I, vector_.end()); - return true; - } - - /// \brief Count the number of elements of a given key in the SetVector. - /// \returns 0 if the element is not in the SetVector, 1 if it is. - size_type count(const key_type &key) const { - return set_.count(key); - } - - /// \brief Completely clear the SetVector - void clear() { - set_.clear(); - vector_.clear(); - } - - /// \brief Remove the last element of the SetVector. - void pop_back() { - assert(!empty() && "Cannot remove an element from an empty SetVector!"); - set_.erase(back()); - vector_.pop_back(); - } - - T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() { - T Ret = back(); - pop_back(); - return Ret; - } - - bool operator==(const SetVector &that) const { - return vector_ == that.vector_; - } - - bool operator!=(const SetVector &that) const { - return vector_ != that.vector_; - } - - /// \brief Compute This := This u S, return whether 'This' changed. - /// TODO: We should be able to use set_union from SetOperations.h, but - /// SetVector interface is inconsistent with DenseSet. - template - bool set_union(const STy &S) { - bool Changed = false; - - for (typename STy::const_iterator SI = S.begin(), SE = S.end(); SI != SE; - ++SI) - if (insert(*SI)) - Changed = true; - - return Changed; - } - - /// \brief Compute This := This - B - /// TODO: We should be able to use set_subtract from SetOperations.h, but - /// SetVector interface is inconsistent with DenseSet. - template - void set_subtract(const STy &S) { - for (typename STy::const_iterator SI = S.begin(), SE = S.end(); SI != SE; - ++SI) - remove(*SI); - } - -private: - /// \brief A wrapper predicate designed for use with std::remove_if. - /// - /// This predicate wraps a predicate suitable for use with std::remove_if to - /// call set_.erase(x) on each element which is slated for removal. - template - class TestAndEraseFromSet { - UnaryPredicate P; - set_type &set_; - - public: - TestAndEraseFromSet(UnaryPredicate P, set_type &set_) - : P(std::move(P)), set_(set_) {} - - template - bool operator()(const ArgumentT &Arg) { - if (P(Arg)) { - set_.erase(Arg); - return true; - } - return false; - } - }; - - set_type set_; ///< The set. - vector_type vector_; ///< The vector. -}; - -/// \brief A SetVector that performs no allocations if smaller than -/// a certain size. -template -class SmallSetVector : public SetVector, SmallSet > { -public: - SmallSetVector() {} - - /// \brief Initialize a SmallSetVector with a range of elements - template - SmallSetVector(It Start, It End) { - this->insert(Start, End); - } -}; - -} // End llvm namespace - -// vim: sw=2 ai -#endif diff --git a/llvm/include/llvm/ADT/SmallBitVector.h b/llvm/include/llvm/ADT/SmallBitVector.h deleted file mode 100644 index bb99e0cf..00000000 --- a/llvm/include/llvm/ADT/SmallBitVector.h +++ /dev/null @@ -1,595 +0,0 @@ -//===- llvm/ADT/SmallBitVector.h - 'Normally small' bit vectors -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the SmallBitVector class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SMALLBITVECTOR_H -#define LLVM_ADT_SMALLBITVECTOR_H - -#include "llvm/ADT/BitVector.h" -#include "llvm/Support/MathExtras.h" -#include - -namespace llvm { - -/// This is a 'bitvector' (really, a variable-sized bit array), optimized for -/// the case when the array is small. It contains one pointer-sized field, which -/// is directly used as a plain collection of bits when possible, or as a -/// pointer to a larger heap-allocated array when necessary. This allows normal -/// "small" cases to be fast without losing generality for large inputs. -class SmallBitVector { - // TODO: In "large" mode, a pointer to a BitVector is used, leading to an - // unnecessary level of indirection. It would be more efficient to use a - // pointer to memory containing size, allocation size, and the array of bits. - uintptr_t X; - - enum { - // The number of bits in this class. - NumBaseBits = sizeof(uintptr_t) * CHAR_BIT, - - // One bit is used to discriminate between small and large mode. The - // remaining bits are used for the small-mode representation. - SmallNumRawBits = NumBaseBits - 1, - - // A few more bits are used to store the size of the bit set in small mode. - // Theoretically this is a ceil-log2. These bits are encoded in the most - // significant bits of the raw bits. - SmallNumSizeBits = (NumBaseBits == 32 ? 5 : - NumBaseBits == 64 ? 6 : - SmallNumRawBits), - - // The remaining bits are used to store the actual set in small mode. - SmallNumDataBits = SmallNumRawBits - SmallNumSizeBits - }; - - static_assert(NumBaseBits == 64 || NumBaseBits == 32, - "Unsupported word size"); - -public: - typedef unsigned size_type; - // Encapsulation of a single bit. - class reference { - SmallBitVector &TheVector; - unsigned BitPos; - - public: - reference(SmallBitVector &b, unsigned Idx) : TheVector(b), BitPos(Idx) {} - - reference(const reference&) = default; - - reference& operator=(reference t) { - *this = bool(t); - return *this; - } - - reference& operator=(bool t) { - if (t) - TheVector.set(BitPos); - else - TheVector.reset(BitPos); - return *this; - } - - operator bool() const { - return const_cast(TheVector).operator[](BitPos); - } - }; - -private: - bool isSmall() const { - return X & uintptr_t(1); - } - - BitVector *getPointer() const { - assert(!isSmall()); - return reinterpret_cast(X); - } - - void switchToSmall(uintptr_t NewSmallBits, size_t NewSize) { - X = 1; - setSmallSize(NewSize); - setSmallBits(NewSmallBits); - } - - void switchToLarge(BitVector *BV) { - X = reinterpret_cast(BV); - assert(!isSmall() && "Tried to use an unaligned pointer"); - } - - // Return all the bits used for the "small" representation; this includes - // bits for the size as well as the element bits. - uintptr_t getSmallRawBits() const { - assert(isSmall()); - return X >> 1; - } - - void setSmallRawBits(uintptr_t NewRawBits) { - assert(isSmall()); - X = (NewRawBits << 1) | uintptr_t(1); - } - - // Return the size. - size_t getSmallSize() const { - return getSmallRawBits() >> SmallNumDataBits; - } - - void setSmallSize(size_t Size) { - setSmallRawBits(getSmallBits() | (Size << SmallNumDataBits)); - } - - // Return the element bits. - uintptr_t getSmallBits() const { - return getSmallRawBits() & ~(~uintptr_t(0) << getSmallSize()); - } - - void setSmallBits(uintptr_t NewBits) { - setSmallRawBits((NewBits & ~(~uintptr_t(0) << getSmallSize())) | - (getSmallSize() << SmallNumDataBits)); - } - -public: - /// Creates an empty bitvector. - SmallBitVector() : X(1) {} - - /// Creates a bitvector of specified number of bits. All bits are initialized - /// to the specified value. - explicit SmallBitVector(unsigned s, bool t = false) { - if (s <= SmallNumDataBits) - switchToSmall(t ? ~uintptr_t(0) : 0, s); - else - switchToLarge(new BitVector(s, t)); - } - - /// SmallBitVector copy ctor. - SmallBitVector(const SmallBitVector &RHS) { - if (RHS.isSmall()) - X = RHS.X; - else - switchToLarge(new BitVector(*RHS.getPointer())); - } - - SmallBitVector(SmallBitVector &&RHS) : X(RHS.X) { - RHS.X = 1; - } - - ~SmallBitVector() { - if (!isSmall()) - delete getPointer(); - } - - /// Tests whether there are no bits in this bitvector. - bool empty() const { - return isSmall() ? getSmallSize() == 0 : getPointer()->empty(); - } - - /// Returns the number of bits in this bitvector. - size_t size() const { - return isSmall() ? getSmallSize() : getPointer()->size(); - } - - /// Returns the number of bits which are set. - size_type count() const { - if (isSmall()) { - uintptr_t Bits = getSmallBits(); - return countPopulation(Bits); - } - return getPointer()->count(); - } - - /// Returns true if any bit is set. - bool any() const { - if (isSmall()) - return getSmallBits() != 0; - return getPointer()->any(); - } - - /// Returns true if all bits are set. - bool all() const { - if (isSmall()) - return getSmallBits() == (uintptr_t(1) << getSmallSize()) - 1; - return getPointer()->all(); - } - - /// Returns true if none of the bits are set. - bool none() const { - if (isSmall()) - return getSmallBits() == 0; - return getPointer()->none(); - } - - /// Returns the index of the first set bit, -1 if none of the bits are set. - int find_first() const { - if (isSmall()) { - uintptr_t Bits = getSmallBits(); - if (Bits == 0) - return -1; - return countTrailingZeros(Bits); - } - return getPointer()->find_first(); - } - - /// Returns the index of the next set bit following the "Prev" bit. - /// Returns -1 if the next set bit is not found. - int find_next(unsigned Prev) const { - if (isSmall()) { - uintptr_t Bits = getSmallBits(); - // Mask off previous bits. - Bits &= ~uintptr_t(0) << (Prev + 1); - if (Bits == 0 || Prev + 1 >= getSmallSize()) - return -1; - return countTrailingZeros(Bits); - } - return getPointer()->find_next(Prev); - } - - /// Clear all bits. - void clear() { - if (!isSmall()) - delete getPointer(); - switchToSmall(0, 0); - } - - /// Grow or shrink the bitvector. - void resize(unsigned N, bool t = false) { - if (!isSmall()) { - getPointer()->resize(N, t); - } else if (SmallNumDataBits >= N) { - uintptr_t NewBits = t ? ~uintptr_t(0) << getSmallSize() : 0; - setSmallSize(N); - setSmallBits(NewBits | getSmallBits()); - } else { - BitVector *BV = new BitVector(N, t); - uintptr_t OldBits = getSmallBits(); - for (size_t i = 0, e = getSmallSize(); i != e; ++i) - (*BV)[i] = (OldBits >> i) & 1; - switchToLarge(BV); - } - } - - void reserve(unsigned N) { - if (isSmall()) { - if (N > SmallNumDataBits) { - uintptr_t OldBits = getSmallRawBits(); - size_t SmallSize = getSmallSize(); - BitVector *BV = new BitVector(SmallSize); - for (size_t i = 0; i < SmallSize; ++i) - if ((OldBits >> i) & 1) - BV->set(i); - BV->reserve(N); - switchToLarge(BV); - } - } else { - getPointer()->reserve(N); - } - } - - // Set, reset, flip - SmallBitVector &set() { - if (isSmall()) - setSmallBits(~uintptr_t(0)); - else - getPointer()->set(); - return *this; - } - - SmallBitVector &set(unsigned Idx) { - if (isSmall()) { - assert(Idx <= static_cast( - std::numeric_limits::digits) && - "undefined behavior"); - setSmallBits(getSmallBits() | (uintptr_t(1) << Idx)); - } - else - getPointer()->set(Idx); - return *this; - } - - /// Efficiently set a range of bits in [I, E) - SmallBitVector &set(unsigned I, unsigned E) { - assert(I <= E && "Attempted to set backwards range!"); - assert(E <= size() && "Attempted to set out-of-bounds range!"); - if (I == E) return *this; - if (isSmall()) { - uintptr_t EMask = ((uintptr_t)1) << E; - uintptr_t IMask = ((uintptr_t)1) << I; - uintptr_t Mask = EMask - IMask; - setSmallBits(getSmallBits() | Mask); - } else - getPointer()->set(I, E); - return *this; - } - - SmallBitVector &reset() { - if (isSmall()) - setSmallBits(0); - else - getPointer()->reset(); - return *this; - } - - SmallBitVector &reset(unsigned Idx) { - if (isSmall()) - setSmallBits(getSmallBits() & ~(uintptr_t(1) << Idx)); - else - getPointer()->reset(Idx); - return *this; - } - - /// Efficiently reset a range of bits in [I, E) - SmallBitVector &reset(unsigned I, unsigned E) { - assert(I <= E && "Attempted to reset backwards range!"); - assert(E <= size() && "Attempted to reset out-of-bounds range!"); - if (I == E) return *this; - if (isSmall()) { - uintptr_t EMask = ((uintptr_t)1) << E; - uintptr_t IMask = ((uintptr_t)1) << I; - uintptr_t Mask = EMask - IMask; - setSmallBits(getSmallBits() & ~Mask); - } else - getPointer()->reset(I, E); - return *this; - } - - SmallBitVector &flip() { - if (isSmall()) - setSmallBits(~getSmallBits()); - else - getPointer()->flip(); - return *this; - } - - SmallBitVector &flip(unsigned Idx) { - if (isSmall()) - setSmallBits(getSmallBits() ^ (uintptr_t(1) << Idx)); - else - getPointer()->flip(Idx); - return *this; - } - - // No argument flip. - SmallBitVector operator~() const { - return SmallBitVector(*this).flip(); - } - - // Indexing. - reference operator[](unsigned Idx) { - assert(Idx < size() && "Out-of-bounds Bit access."); - return reference(*this, Idx); - } - - bool operator[](unsigned Idx) const { - assert(Idx < size() && "Out-of-bounds Bit access."); - if (isSmall()) - return ((getSmallBits() >> Idx) & 1) != 0; - return getPointer()->operator[](Idx); - } - - bool test(unsigned Idx) const { - return (*this)[Idx]; - } - - /// Test if any common bits are set. - bool anyCommon(const SmallBitVector &RHS) const { - if (isSmall() && RHS.isSmall()) - return (getSmallBits() & RHS.getSmallBits()) != 0; - if (!isSmall() && !RHS.isSmall()) - return getPointer()->anyCommon(*RHS.getPointer()); - - for (unsigned i = 0, e = std::min(size(), RHS.size()); i != e; ++i) - if (test(i) && RHS.test(i)) - return true; - return false; - } - - // Comparison operators. - bool operator==(const SmallBitVector &RHS) const { - if (size() != RHS.size()) - return false; - if (isSmall()) - return getSmallBits() == RHS.getSmallBits(); - else - return *getPointer() == *RHS.getPointer(); - } - - bool operator!=(const SmallBitVector &RHS) const { - return !(*this == RHS); - } - - // Intersection, union, disjoint union. - SmallBitVector &operator&=(const SmallBitVector &RHS) { - resize(std::max(size(), RHS.size())); - if (isSmall()) - setSmallBits(getSmallBits() & RHS.getSmallBits()); - else if (!RHS.isSmall()) - getPointer()->operator&=(*RHS.getPointer()); - else { - SmallBitVector Copy = RHS; - Copy.resize(size()); - getPointer()->operator&=(*Copy.getPointer()); - } - return *this; - } - - /// Reset bits that are set in RHS. Same as *this &= ~RHS. - SmallBitVector &reset(const SmallBitVector &RHS) { - if (isSmall() && RHS.isSmall()) - setSmallBits(getSmallBits() & ~RHS.getSmallBits()); - else if (!isSmall() && !RHS.isSmall()) - getPointer()->reset(*RHS.getPointer()); - else - for (unsigned i = 0, e = std::min(size(), RHS.size()); i != e; ++i) - if (RHS.test(i)) - reset(i); - - return *this; - } - - /// Check if (This - RHS) is zero. This is the same as reset(RHS) and any(). - bool test(const SmallBitVector &RHS) const { - if (isSmall() && RHS.isSmall()) - return (getSmallBits() & ~RHS.getSmallBits()) != 0; - if (!isSmall() && !RHS.isSmall()) - return getPointer()->test(*RHS.getPointer()); - - unsigned i, e; - for (i = 0, e = std::min(size(), RHS.size()); i != e; ++i) - if (test(i) && !RHS.test(i)) - return true; - - for (e = size(); i != e; ++i) - if (test(i)) - return true; - - return false; - } - - SmallBitVector &operator|=(const SmallBitVector &RHS) { - resize(std::max(size(), RHS.size())); - if (isSmall()) - setSmallBits(getSmallBits() | RHS.getSmallBits()); - else if (!RHS.isSmall()) - getPointer()->operator|=(*RHS.getPointer()); - else { - SmallBitVector Copy = RHS; - Copy.resize(size()); - getPointer()->operator|=(*Copy.getPointer()); - } - return *this; - } - - SmallBitVector &operator^=(const SmallBitVector &RHS) { - resize(std::max(size(), RHS.size())); - if (isSmall()) - setSmallBits(getSmallBits() ^ RHS.getSmallBits()); - else if (!RHS.isSmall()) - getPointer()->operator^=(*RHS.getPointer()); - else { - SmallBitVector Copy = RHS; - Copy.resize(size()); - getPointer()->operator^=(*Copy.getPointer()); - } - return *this; - } - - // Assignment operator. - const SmallBitVector &operator=(const SmallBitVector &RHS) { - if (isSmall()) { - if (RHS.isSmall()) - X = RHS.X; - else - switchToLarge(new BitVector(*RHS.getPointer())); - } else { - if (!RHS.isSmall()) - *getPointer() = *RHS.getPointer(); - else { - delete getPointer(); - X = RHS.X; - } - } - return *this; - } - - const SmallBitVector &operator=(SmallBitVector &&RHS) { - if (this != &RHS) { - clear(); - swap(RHS); - } - return *this; - } - - void swap(SmallBitVector &RHS) { - std::swap(X, RHS.X); - } - - /// Add '1' bits from Mask to this vector. Don't resize. - /// This computes "*this |= Mask". - void setBitsInMask(const uint32_t *Mask, unsigned MaskWords = ~0u) { - if (isSmall()) - applyMask(Mask, MaskWords); - else - getPointer()->setBitsInMask(Mask, MaskWords); - } - - /// Clear any bits in this vector that are set in Mask. Don't resize. - /// This computes "*this &= ~Mask". - void clearBitsInMask(const uint32_t *Mask, unsigned MaskWords = ~0u) { - if (isSmall()) - applyMask(Mask, MaskWords); - else - getPointer()->clearBitsInMask(Mask, MaskWords); - } - - /// Add a bit to this vector for every '0' bit in Mask. Don't resize. - /// This computes "*this |= ~Mask". - void setBitsNotInMask(const uint32_t *Mask, unsigned MaskWords = ~0u) { - if (isSmall()) - applyMask(Mask, MaskWords); - else - getPointer()->setBitsNotInMask(Mask, MaskWords); - } - - /// Clear a bit in this vector for every '0' bit in Mask. Don't resize. - /// This computes "*this &= Mask". - void clearBitsNotInMask(const uint32_t *Mask, unsigned MaskWords = ~0u) { - if (isSmall()) - applyMask(Mask, MaskWords); - else - getPointer()->clearBitsNotInMask(Mask, MaskWords); - } - -private: - template - void applyMask(const uint32_t *Mask, unsigned MaskWords) { - assert(MaskWords <= sizeof(uintptr_t) && "Mask is larger than base!"); - uintptr_t M = Mask[0]; - if (NumBaseBits == 64) - M |= uint64_t(Mask[1]) << 32; - if (InvertMask) - M = ~M; - if (AddBits) - setSmallBits(getSmallBits() | M); - else - setSmallBits(getSmallBits() & ~M); - } -}; - -inline SmallBitVector -operator&(const SmallBitVector &LHS, const SmallBitVector &RHS) { - SmallBitVector Result(LHS); - Result &= RHS; - return Result; -} - -inline SmallBitVector -operator|(const SmallBitVector &LHS, const SmallBitVector &RHS) { - SmallBitVector Result(LHS); - Result |= RHS; - return Result; -} - -inline SmallBitVector -operator^(const SmallBitVector &LHS, const SmallBitVector &RHS) { - SmallBitVector Result(LHS); - Result ^= RHS; - return Result; -} - -} // End llvm namespace - -namespace std { - /// Implement std::swap in terms of BitVector swap. - inline void - swap(llvm::SmallBitVector &LHS, llvm::SmallBitVector &RHS) { - LHS.swap(RHS); - } -} - -#endif diff --git a/llvm/include/llvm/ADT/SmallPtrSet.h b/llvm/include/llvm/ADT/SmallPtrSet.h deleted file mode 100644 index eaed6aa0..00000000 --- a/llvm/include/llvm/ADT/SmallPtrSet.h +++ /dev/null @@ -1,406 +0,0 @@ -//===- llvm/ADT/SmallPtrSet.h - 'Normally small' pointer set ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the SmallPtrSet class. See the doxygen comment for -// SmallPtrSetImplBase for more details on the algorithm used. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SMALLPTRSET_H -#define LLVM_ADT_SMALLPTRSET_H - -#include "llvm/Support/Compiler.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include -#include -#include -#include -#include -#include - -namespace llvm { - -class SmallPtrSetIteratorImpl; - -/// SmallPtrSetImplBase - This is the common code shared among all the -/// SmallPtrSet<>'s, which is almost everything. SmallPtrSet has two modes, one -/// for small and one for large sets. -/// -/// Small sets use an array of pointers allocated in the SmallPtrSet object, -/// which is treated as a simple array of pointers. When a pointer is added to -/// the set, the array is scanned to see if the element already exists, if not -/// the element is 'pushed back' onto the array. If we run out of space in the -/// array, we grow into the 'large set' case. SmallSet should be used when the -/// sets are often small. In this case, no memory allocation is used, and only -/// light-weight and cache-efficient scanning is used. -/// -/// Large sets use a classic exponentially-probed hash table. Empty buckets are -/// represented with an illegal pointer value (-1) to allow null pointers to be -/// inserted. Tombstones are represented with another illegal pointer value -/// (-2), to allow deletion. The hash table is resized when the table is 3/4 or -/// more. When this happens, the table is doubled in size. -/// -class SmallPtrSetImplBase { - friend class SmallPtrSetIteratorImpl; - -protected: - /// SmallArray - Points to a fixed size set of buckets, used in 'small mode'. - const void **SmallArray; - /// CurArray - This is the current set of buckets. If equal to SmallArray, - /// then the set is in 'small mode'. - const void **CurArray; - /// CurArraySize - The allocated size of CurArray, always a power of two. - unsigned CurArraySize; - - /// Number of elements in CurArray that contain a value or are a tombstone. - /// If small, all these elements are at the beginning of CurArray and the rest - /// is uninitialized. - unsigned NumNonEmpty; - /// Number of tombstones in CurArray. - unsigned NumTombstones; - - // Helpers to copy and move construct a SmallPtrSet. - SmallPtrSetImplBase(const void **SmallStorage, - const SmallPtrSetImplBase &that); - SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize, - SmallPtrSetImplBase &&that); - explicit SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize) - : SmallArray(SmallStorage), CurArray(SmallStorage), - CurArraySize(SmallSize), NumNonEmpty(0), NumTombstones(0) { - assert(SmallSize && (SmallSize & (SmallSize-1)) == 0 && - "Initial size must be a power of two!"); - } - ~SmallPtrSetImplBase() { - if (!isSmall()) - free(CurArray); - } - -public: - typedef unsigned size_type; - bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { return size() == 0; } - size_type size() const { return NumNonEmpty - NumTombstones; } - - void clear() { - // If the capacity of the array is huge, and the # elements used is small, - // shrink the array. - if (!isSmall()) { - if (size() * 4 < CurArraySize && CurArraySize > 32) - return shrink_and_clear(); - // Fill the array with empty markers. - memset(CurArray, -1, CurArraySize * sizeof(void *)); - } - - NumNonEmpty = 0; - NumTombstones = 0; - } - -protected: - static void *getTombstoneMarker() { return reinterpret_cast(-2); } - static void *getEmptyMarker() { - // Note that -1 is chosen to make clear() efficiently implementable with - // memset and because it's not a valid pointer value. - return reinterpret_cast(-1); - } - - const void **EndPointer() const { - return isSmall() ? CurArray + NumNonEmpty : CurArray + CurArraySize; - } - - /// insert_imp - This returns true if the pointer was new to the set, false if - /// it was already in the set. This is hidden from the client so that the - /// derived class can check that the right type of pointer is passed in. - std::pair insert_imp(const void *Ptr) { - if (isSmall()) { - // Check to see if it is already in the set. - const void **LastTombstone = nullptr; - for (const void **APtr = SmallArray, **E = SmallArray + NumNonEmpty; - APtr != E; ++APtr) { - const void *Value = *APtr; - if (Value == Ptr) - return std::make_pair(APtr, false); - if (Value == getTombstoneMarker()) - LastTombstone = APtr; - } - - // Did we find any tombstone marker? - if (LastTombstone != nullptr) { - *LastTombstone = Ptr; - --NumTombstones; - return std::make_pair(LastTombstone, true); - } - - // Nope, there isn't. If we stay small, just 'pushback' now. - if (NumNonEmpty < CurArraySize) { - SmallArray[NumNonEmpty++] = Ptr; - return std::make_pair(SmallArray + (NumNonEmpty - 1), true); - } - // Otherwise, hit the big set case, which will call grow. - } - return insert_imp_big(Ptr); - } - - /// erase_imp - If the set contains the specified pointer, remove it and - /// return true, otherwise return false. This is hidden from the client so - /// that the derived class can check that the right type of pointer is passed - /// in. - bool erase_imp(const void * Ptr); - - bool count_imp(const void * Ptr) const { - if (isSmall()) { - // Linear search for the item. - for (const void *const *APtr = SmallArray, - *const *E = SmallArray + NumNonEmpty; APtr != E; ++APtr) - if (*APtr == Ptr) - return true; - return false; - } - - // Big set case. - return *FindBucketFor(Ptr) == Ptr; - } - -private: - bool isSmall() const { return CurArray == SmallArray; } - - std::pair insert_imp_big(const void *Ptr); - - const void * const *FindBucketFor(const void *Ptr) const; - void shrink_and_clear(); - - /// Grow - Allocate a larger backing store for the buckets and move it over. - void Grow(unsigned NewSize); - - void operator=(const SmallPtrSetImplBase &RHS) = delete; - -protected: - /// swap - Swaps the elements of two sets. - /// Note: This method assumes that both sets have the same small size. - void swap(SmallPtrSetImplBase &RHS); - - void CopyFrom(const SmallPtrSetImplBase &RHS); - void MoveFrom(unsigned SmallSize, SmallPtrSetImplBase &&RHS); - -private: - /// Code shared by MoveFrom() and move constructor. - void MoveHelper(unsigned SmallSize, SmallPtrSetImplBase &&RHS); - /// Code shared by CopyFrom() and copy constructor. - void CopyHelper(const SmallPtrSetImplBase &RHS); -}; - -/// SmallPtrSetIteratorImpl - This is the common base class shared between all -/// instances of SmallPtrSetIterator. -class SmallPtrSetIteratorImpl { -protected: - const void *const *Bucket; - const void *const *End; - -public: - explicit SmallPtrSetIteratorImpl(const void *const *BP, const void*const *E) - : Bucket(BP), End(E) { - AdvanceIfNotValid(); - } - - bool operator==(const SmallPtrSetIteratorImpl &RHS) const { - return Bucket == RHS.Bucket; - } - bool operator!=(const SmallPtrSetIteratorImpl &RHS) const { - return Bucket != RHS.Bucket; - } - -protected: - /// AdvanceIfNotValid - If the current bucket isn't valid, advance to a bucket - /// that is. This is guaranteed to stop because the end() bucket is marked - /// valid. - void AdvanceIfNotValid() { - assert(Bucket <= End); - while (Bucket != End && - (*Bucket == SmallPtrSetImplBase::getEmptyMarker() || - *Bucket == SmallPtrSetImplBase::getTombstoneMarker())) - ++Bucket; - } -}; - -/// SmallPtrSetIterator - This implements a const_iterator for SmallPtrSet. -template -class SmallPtrSetIterator : public SmallPtrSetIteratorImpl { - typedef PointerLikeTypeTraits PtrTraits; - -public: - typedef PtrTy value_type; - typedef PtrTy reference; - typedef PtrTy pointer; - typedef std::ptrdiff_t difference_type; - typedef std::forward_iterator_tag iterator_category; - - explicit SmallPtrSetIterator(const void *const *BP, const void *const *E) - : SmallPtrSetIteratorImpl(BP, E) {} - - // Most methods provided by baseclass. - - const PtrTy operator*() const { - assert(Bucket < End); - return PtrTraits::getFromVoidPointer(const_cast(*Bucket)); - } - - inline SmallPtrSetIterator& operator++() { // Preincrement - ++Bucket; - AdvanceIfNotValid(); - return *this; - } - - SmallPtrSetIterator operator++(int) { // Postincrement - SmallPtrSetIterator tmp = *this; ++*this; return tmp; - } -}; - -/// RoundUpToPowerOfTwo - This is a helper template that rounds N up to the next -/// power of two (which means N itself if N is already a power of two). -template -struct RoundUpToPowerOfTwo; - -/// RoundUpToPowerOfTwoH - If N is not a power of two, increase it. This is a -/// helper template used to implement RoundUpToPowerOfTwo. -template -struct RoundUpToPowerOfTwoH { - enum { Val = N }; -}; -template -struct RoundUpToPowerOfTwoH { - enum { - // We could just use NextVal = N+1, but this converges faster. N|(N-1) sets - // the right-most zero bits to one all at once, e.g. 0b0011000 -> 0b0011111. - Val = RoundUpToPowerOfTwo<(N|(N-1)) + 1>::Val - }; -}; - -template -struct RoundUpToPowerOfTwo { - enum { Val = RoundUpToPowerOfTwoH::Val }; -}; - -/// \brief A templated base class for \c SmallPtrSet which provides the -/// typesafe interface that is common across all small sizes. -/// -/// This is particularly useful for passing around between interface boundaries -/// to avoid encoding a particular small size in the interface boundary. -template -class SmallPtrSetImpl : public SmallPtrSetImplBase { - typedef PointerLikeTypeTraits PtrTraits; - - SmallPtrSetImpl(const SmallPtrSetImpl &) = delete; - -protected: - // Constructors that forward to the base. - SmallPtrSetImpl(const void **SmallStorage, const SmallPtrSetImpl &that) - : SmallPtrSetImplBase(SmallStorage, that) {} - SmallPtrSetImpl(const void **SmallStorage, unsigned SmallSize, - SmallPtrSetImpl &&that) - : SmallPtrSetImplBase(SmallStorage, SmallSize, std::move(that)) {} - explicit SmallPtrSetImpl(const void **SmallStorage, unsigned SmallSize) - : SmallPtrSetImplBase(SmallStorage, SmallSize) {} - -public: - typedef SmallPtrSetIterator iterator; - typedef SmallPtrSetIterator const_iterator; - - /// Inserts Ptr if and only if there is no element in the container equal to - /// Ptr. The bool component of the returned pair is true if and only if the - /// insertion takes place, and the iterator component of the pair points to - /// the element equal to Ptr. - std::pair insert(PtrType Ptr) { - auto p = insert_imp(PtrTraits::getAsVoidPointer(Ptr)); - return std::make_pair(iterator(p.first, EndPointer()), p.second); - } - - /// erase - If the set contains the specified pointer, remove it and return - /// true, otherwise return false. - bool erase(PtrType Ptr) { - return erase_imp(PtrTraits::getAsVoidPointer(Ptr)); - } - - /// count - Return 1 if the specified pointer is in the set, 0 otherwise. - size_type count(PtrType Ptr) const { - return count_imp(PtrTraits::getAsVoidPointer(Ptr)) ? 1 : 0; - } - - template - void insert(IterT I, IterT E) { - for (; I != E; ++I) - insert(*I); - } - - inline iterator begin() const { - return iterator(CurArray, EndPointer()); - } - inline iterator end() const { - const void *const *End = EndPointer(); - return iterator(End, End); - } -}; - -/// SmallPtrSet - This class implements a set which is optimized for holding -/// SmallSize or less elements. This internally rounds up SmallSize to the next -/// power of two if it is not already a power of two. See the comments above -/// SmallPtrSetImplBase for details of the algorithm. -template -class SmallPtrSet : public SmallPtrSetImpl { - // In small mode SmallPtrSet uses linear search for the elements, so it is - // not a good idea to choose this value too high. You may consider using a - // DenseSet<> instead if you expect many elements in the set. - static_assert(SmallSize <= 32, "SmallSize should be small"); - - typedef SmallPtrSetImpl BaseT; - - // Make sure that SmallSize is a power of two, round up if not. - enum { SmallSizePowTwo = RoundUpToPowerOfTwo::Val }; - /// SmallStorage - Fixed size storage used in 'small mode'. - const void *SmallStorage[SmallSizePowTwo]; - -public: - SmallPtrSet() : BaseT(SmallStorage, SmallSizePowTwo) {} - SmallPtrSet(const SmallPtrSet &that) : BaseT(SmallStorage, that) {} - SmallPtrSet(SmallPtrSet &&that) - : BaseT(SmallStorage, SmallSizePowTwo, std::move(that)) {} - - template - SmallPtrSet(It I, It E) : BaseT(SmallStorage, SmallSizePowTwo) { - this->insert(I, E); - } - - SmallPtrSet & - operator=(const SmallPtrSet &RHS) { - if (&RHS != this) - this->CopyFrom(RHS); - return *this; - } - - SmallPtrSet& - operator=(SmallPtrSet &&RHS) { - if (&RHS != this) - this->MoveFrom(SmallSizePowTwo, std::move(RHS)); - return *this; - } - - /// swap - Swaps the elements of two sets. - void swap(SmallPtrSet &RHS) { - SmallPtrSetImplBase::swap(RHS); - } -}; -} - -namespace std { - /// Implement std::swap in terms of SmallPtrSet swap. - template - inline void swap(llvm::SmallPtrSet &LHS, llvm::SmallPtrSet &RHS) { - LHS.swap(RHS); - } -} - -#endif diff --git a/llvm/include/llvm/ADT/SmallSet.h b/llvm/include/llvm/ADT/SmallSet.h deleted file mode 100644 index aaa5ff0a..00000000 --- a/llvm/include/llvm/ADT/SmallSet.h +++ /dev/null @@ -1,136 +0,0 @@ -//===- llvm/ADT/SmallSet.h - 'Normally small' sets --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the SmallSet class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SMALLSET_H -#define LLVM_ADT_SMALLSET_H - -#include "llvm/ADT/None.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include - -namespace llvm { - -/// SmallSet - This maintains a set of unique values, optimizing for the case -/// when the set is small (less than N). In this case, the set can be -/// maintained with no mallocs. If the set gets large, we expand to using an -/// std::set to maintain reasonable lookup times. -/// -/// Note that this set does not provide a way to iterate over members in the -/// set. -template > -class SmallSet { - /// Use a SmallVector to hold the elements here (even though it will never - /// reach its 'large' stage) to avoid calling the default ctors of elements - /// we will never use. - SmallVector Vector; - std::set Set; - typedef typename SmallVector::const_iterator VIterator; - typedef typename SmallVector::iterator mutable_iterator; - - // In small mode SmallPtrSet uses linear search for the elements, so it is - // not a good idea to choose this value too high. You may consider using a - // DenseSet<> instead if you expect many elements in the set. - static_assert(N <= 32, "N should be small"); - -public: - typedef size_t size_type; - SmallSet() {} - - bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { - return Vector.empty() && Set.empty(); - } - - size_type size() const { - return isSmall() ? Vector.size() : Set.size(); - } - - /// count - Return 1 if the element is in the set, 0 otherwise. - size_type count(const T &V) const { - if (isSmall()) { - // Since the collection is small, just do a linear search. - return vfind(V) == Vector.end() ? 0 : 1; - } else { - return Set.count(V); - } - } - - /// insert - Insert an element into the set if it isn't already there. - /// Returns true if the element is inserted (it was not in the set before). - /// The first value of the returned pair is unused and provided for - /// partial compatibility with the standard library self-associative container - /// concept. - // FIXME: Add iterators that abstract over the small and large form, and then - // return those here. - std::pair insert(const T &V) { - if (!isSmall()) - return std::make_pair(None, Set.insert(V).second); - - VIterator I = vfind(V); - if (I != Vector.end()) // Don't reinsert if it already exists. - return std::make_pair(None, false); - if (Vector.size() < N) { - Vector.push_back(V); - return std::make_pair(None, true); - } - - // Otherwise, grow from vector to set. - while (!Vector.empty()) { - Set.insert(Vector.back()); - Vector.pop_back(); - } - Set.insert(V); - return std::make_pair(None, true); - } - - template - void insert(IterT I, IterT E) { - for (; I != E; ++I) - insert(*I); - } - - bool erase(const T &V) { - if (!isSmall()) - return Set.erase(V); - for (mutable_iterator I = Vector.begin(), E = Vector.end(); I != E; ++I) - if (*I == V) { - Vector.erase(I); - return true; - } - return false; - } - - void clear() { - Vector.clear(); - Set.clear(); - } - -private: - bool isSmall() const { return Set.empty(); } - - VIterator vfind(const T &V) const { - for (VIterator I = Vector.begin(), E = Vector.end(); I != E; ++I) - if (*I == V) - return I; - return Vector.end(); - } -}; - -/// If this set is of pointer values, transparently switch over to using -/// SmallPtrSet for performance. -template -class SmallSet : public SmallPtrSet {}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/SmallString.h b/llvm/include/llvm/ADT/SmallString.h deleted file mode 100644 index e569f544..00000000 --- a/llvm/include/llvm/ADT/SmallString.h +++ /dev/null @@ -1,297 +0,0 @@ -//===- llvm/ADT/SmallString.h - 'Normally small' strings --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the SmallString class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SMALLSTRING_H -#define LLVM_ADT_SMALLSTRING_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" - -namespace llvm { - -/// SmallString - A SmallString is just a SmallVector with methods and accessors -/// that make it work better as a string (e.g. operator+ etc). -template -class SmallString : public SmallVector { -public: - /// Default ctor - Initialize to empty. - SmallString() {} - - /// Initialize from a StringRef. - SmallString(StringRef S) : SmallVector(S.begin(), S.end()) {} - - /// Initialize with a range. - template - SmallString(ItTy S, ItTy E) : SmallVector(S, E) {} - - // Note that in order to add new overloads for append & assign, we have to - // duplicate the inherited versions so as not to inadvertently hide them. - - /// @} - /// @name String Assignment - /// @{ - - /// Assign from a repeated element. - void assign(size_t NumElts, char Elt) { - this->SmallVectorImpl::assign(NumElts, Elt); - } - - /// Assign from an iterator pair. - template - void assign(in_iter S, in_iter E) { - this->clear(); - SmallVectorImpl::append(S, E); - } - - /// Assign from a StringRef. - void assign(StringRef RHS) { - this->clear(); - SmallVectorImpl::append(RHS.begin(), RHS.end()); - } - - /// Assign from a SmallVector. - void assign(const SmallVectorImpl &RHS) { - this->clear(); - SmallVectorImpl::append(RHS.begin(), RHS.end()); - } - - /// @} - /// @name String Concatenation - /// @{ - - /// Append from an iterator pair. - template - void append(in_iter S, in_iter E) { - SmallVectorImpl::append(S, E); - } - - void append(size_t NumInputs, char Elt) { - SmallVectorImpl::append(NumInputs, Elt); - } - - - /// Append from a StringRef. - void append(StringRef RHS) { - SmallVectorImpl::append(RHS.begin(), RHS.end()); - } - - /// Append from a SmallVector. - void append(const SmallVectorImpl &RHS) { - SmallVectorImpl::append(RHS.begin(), RHS.end()); - } - - /// @} - /// @name String Comparison - /// @{ - - /// Check for string equality. This is more efficient than compare() when - /// the relative ordering of inequal strings isn't needed. - bool equals(StringRef RHS) const { - return str().equals(RHS); - } - - /// Check for string equality, ignoring case. - bool equals_lower(StringRef RHS) const { - return str().equals_lower(RHS); - } - - /// Compare two strings; the result is -1, 0, or 1 if this string is - /// lexicographically less than, equal to, or greater than the \p RHS. - int compare(StringRef RHS) const { - return str().compare(RHS); - } - - /// compare_lower - Compare two strings, ignoring case. - int compare_lower(StringRef RHS) const { - return str().compare_lower(RHS); - } - - /// compare_numeric - Compare two strings, treating sequences of digits as - /// numbers. - int compare_numeric(StringRef RHS) const { - return str().compare_numeric(RHS); - } - - /// @} - /// @name String Predicates - /// @{ - - /// startswith - Check if this string starts with the given \p Prefix. - bool startswith(StringRef Prefix) const { - return str().startswith(Prefix); - } - - /// endswith - Check if this string ends with the given \p Suffix. - bool endswith(StringRef Suffix) const { - return str().endswith(Suffix); - } - - /// @} - /// @name String Searching - /// @{ - - /// find - Search for the first character \p C in the string. - /// - /// \return - The index of the first occurrence of \p C, or npos if not - /// found. - size_t find(char C, size_t From = 0) const { - return str().find(C, From); - } - - /// Search for the first string \p Str in the string. - /// - /// \returns The index of the first occurrence of \p Str, or npos if not - /// found. - size_t find(StringRef Str, size_t From = 0) const { - return str().find(Str, From); - } - - /// Search for the last character \p C in the string. - /// - /// \returns The index of the last occurrence of \p C, or npos if not - /// found. - size_t rfind(char C, size_t From = StringRef::npos) const { - return str().rfind(C, From); - } - - /// Search for the last string \p Str in the string. - /// - /// \returns The index of the last occurrence of \p Str, or npos if not - /// found. - size_t rfind(StringRef Str) const { - return str().rfind(Str); - } - - /// Find the first character in the string that is \p C, or npos if not - /// found. Same as find. - size_t find_first_of(char C, size_t From = 0) const { - return str().find_first_of(C, From); - } - - /// Find the first character in the string that is in \p Chars, or npos if - /// not found. - /// - /// Complexity: O(size() + Chars.size()) - size_t find_first_of(StringRef Chars, size_t From = 0) const { - return str().find_first_of(Chars, From); - } - - /// Find the first character in the string that is not \p C or npos if not - /// found. - size_t find_first_not_of(char C, size_t From = 0) const { - return str().find_first_not_of(C, From); - } - - /// Find the first character in the string that is not in the string - /// \p Chars, or npos if not found. - /// - /// Complexity: O(size() + Chars.size()) - size_t find_first_not_of(StringRef Chars, size_t From = 0) const { - return str().find_first_not_of(Chars, From); - } - - /// Find the last character in the string that is \p C, or npos if not - /// found. - size_t find_last_of(char C, size_t From = StringRef::npos) const { - return str().find_last_of(C, From); - } - - /// Find the last character in the string that is in \p C, or npos if not - /// found. - /// - /// Complexity: O(size() + Chars.size()) - size_t find_last_of( - StringRef Chars, size_t From = StringRef::npos) const { - return str().find_last_of(Chars, From); - } - - /// @} - /// @name Helpful Algorithms - /// @{ - - /// Return the number of occurrences of \p C in the string. - size_t count(char C) const { - return str().count(C); - } - - /// Return the number of non-overlapped occurrences of \p Str in the - /// string. - size_t count(StringRef Str) const { - return str().count(Str); - } - - /// @} - /// @name Substring Operations - /// @{ - - /// Return a reference to the substring from [Start, Start + N). - /// - /// \param Start The index of the starting character in the substring; if - /// the index is npos or greater than the length of the string then the - /// empty substring will be returned. - /// - /// \param N The number of characters to included in the substring. If \p N - /// exceeds the number of characters remaining in the string, the string - /// suffix (starting with \p Start) will be returned. - StringRef substr(size_t Start, size_t N = StringRef::npos) const { - return str().substr(Start, N); - } - - /// Return a reference to the substring from [Start, End). - /// - /// \param Start The index of the starting character in the substring; if - /// the index is npos or greater than the length of the string then the - /// empty substring will be returned. - /// - /// \param End The index following the last character to include in the - /// substring. If this is npos, or less than \p Start, or exceeds the - /// number of characters remaining in the string, the string suffix - /// (starting with \p Start) will be returned. - StringRef slice(size_t Start, size_t End) const { - return str().slice(Start, End); - } - - // Extra methods. - - /// Explicit conversion to StringRef. - StringRef str() const { return StringRef(this->begin(), this->size()); } - - // TODO: Make this const, if it's safe... - const char* c_str() { - this->push_back(0); - this->pop_back(); - return this->data(); - } - - /// Implicit conversion to StringRef. - operator StringRef() const { return str(); } - - // Extra operators. - const SmallString &operator=(StringRef RHS) { - this->clear(); - return *this += RHS; - } - - SmallString &operator+=(StringRef RHS) { - this->append(RHS.begin(), RHS.end()); - return *this; - } - SmallString &operator+=(char C) { - this->push_back(C); - return *this; - } -}; - -} - -#endif diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h deleted file mode 100644 index 42eedc63..00000000 --- a/llvm/include/llvm/ADT/SmallVector.h +++ /dev/null @@ -1,927 +0,0 @@ -//===- llvm/ADT/SmallVector.h - 'Normally small' vectors --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the SmallVector class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SMALLVECTOR_H -#define LLVM_ADT_SMALLVECTOR_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/Support/AlignOf.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/type_traits.h" -#include -#include -#include -#include -#include -#include -#include -#include - -namespace llvm { - -/// This is all the non-templated stuff common to all SmallVectors. -class SmallVectorBase { -protected: - void *BeginX, *EndX, *CapacityX; - -protected: - SmallVectorBase(void *FirstEl, size_t Size) - : BeginX(FirstEl), EndX(FirstEl), CapacityX((char*)FirstEl+Size) {} - - /// This is an implementation of the grow() method which only works - /// on POD-like data types and is out of line to reduce code duplication. - void grow_pod(void *FirstEl, size_t MinSizeInBytes, size_t TSize); - -public: - /// This returns size()*sizeof(T). - size_t size_in_bytes() const { - return size_t((char*)EndX - (char*)BeginX); - } - - /// capacity_in_bytes - This returns capacity()*sizeof(T). - size_t capacity_in_bytes() const { - return size_t((char*)CapacityX - (char*)BeginX); - } - - bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { return BeginX == EndX; } -}; - -template struct SmallVectorStorage; - -/// This is the part of SmallVectorTemplateBase which does not depend on whether -/// the type T is a POD. The extra dummy template argument is used by ArrayRef -/// to avoid unnecessarily requiring T to be complete. -template -class SmallVectorTemplateCommon : public SmallVectorBase { -private: - template friend struct SmallVectorStorage; - - // Allocate raw space for N elements of type T. If T has a ctor or dtor, we - // don't want it to be automatically run, so we need to represent the space as - // something else. Use an array of char of sufficient alignment. - typedef llvm::AlignedCharArrayUnion U; - U FirstEl; - // Space after 'FirstEl' is clobbered, do not add any instance vars after it. - -protected: - SmallVectorTemplateCommon(size_t Size) : SmallVectorBase(&FirstEl, Size) {} - - void grow_pod(size_t MinSizeInBytes, size_t TSize) { - SmallVectorBase::grow_pod(&FirstEl, MinSizeInBytes, TSize); - } - - /// Return true if this is a smallvector which has not had dynamic - /// memory allocated for it. - bool isSmall() const { - return BeginX == static_cast(&FirstEl); - } - - /// Put this vector in a state of being small. - void resetToSmall() { - BeginX = EndX = CapacityX = &FirstEl; - } - - void setEnd(T *P) { this->EndX = P; } -public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef T value_type; - typedef T *iterator; - typedef const T *const_iterator; - - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - - typedef T &reference; - typedef const T &const_reference; - typedef T *pointer; - typedef const T *const_pointer; - - // forward iterator creation methods. - LLVM_ATTRIBUTE_ALWAYS_INLINE - iterator begin() { return (iterator)this->BeginX; } - LLVM_ATTRIBUTE_ALWAYS_INLINE - const_iterator begin() const { return (const_iterator)this->BeginX; } - LLVM_ATTRIBUTE_ALWAYS_INLINE - iterator end() { return (iterator)this->EndX; } - LLVM_ATTRIBUTE_ALWAYS_INLINE - const_iterator end() const { return (const_iterator)this->EndX; } -protected: - iterator capacity_ptr() { return (iterator)this->CapacityX; } - const_iterator capacity_ptr() const { return (const_iterator)this->CapacityX;} -public: - - // reverse iterator creation methods. - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { return const_reverse_iterator(begin());} - - LLVM_ATTRIBUTE_ALWAYS_INLINE - size_type size() const { return end()-begin(); } - size_type max_size() const { return size_type(-1) / sizeof(T); } - - /// Return the total number of elements in the currently allocated buffer. - size_t capacity() const { return capacity_ptr() - begin(); } - - /// Return a pointer to the vector's buffer, even if empty(). - pointer data() { return pointer(begin()); } - /// Return a pointer to the vector's buffer, even if empty(). - const_pointer data() const { return const_pointer(begin()); } - - LLVM_ATTRIBUTE_ALWAYS_INLINE - reference operator[](size_type idx) { - assert(idx < size()); - return begin()[idx]; - } - LLVM_ATTRIBUTE_ALWAYS_INLINE - const_reference operator[](size_type idx) const { - assert(idx < size()); - return begin()[idx]; - } - - reference front() { - assert(!empty()); - return begin()[0]; - } - const_reference front() const { - assert(!empty()); - return begin()[0]; - } - - reference back() { - assert(!empty()); - return end()[-1]; - } - const_reference back() const { - assert(!empty()); - return end()[-1]; - } -}; - -/// SmallVectorTemplateBase - This is where we put method -/// implementations that are designed to work with non-POD-like T's. -template -class SmallVectorTemplateBase : public SmallVectorTemplateCommon { -protected: - SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon(Size) {} - - static void destroy_range(T *S, T *E) { - while (S != E) { - --E; - E->~T(); - } - } - - /// Move the range [I, E) into the uninitialized memory starting with "Dest", - /// constructing elements as needed. - template - static void uninitialized_move(It1 I, It1 E, It2 Dest) { - std::uninitialized_copy(std::make_move_iterator(I), - std::make_move_iterator(E), Dest); - } - - /// Copy the range [I, E) onto the uninitialized memory starting with "Dest", - /// constructing elements as needed. - template - static void uninitialized_copy(It1 I, It1 E, It2 Dest) { - std::uninitialized_copy(I, E, Dest); - } - - /// Grow the allocated memory (without initializing new elements), doubling - /// the size of the allocated memory. Guarantees space for at least one more - /// element, or MinSize more elements if specified. - void grow(size_t MinSize = 0); - -public: - void push_back(const T &Elt) { - if (LLVM_UNLIKELY(this->EndX >= this->CapacityX)) - this->grow(); - ::new ((void*) this->end()) T(Elt); - this->setEnd(this->end()+1); - } - - void push_back(T &&Elt) { - if (LLVM_UNLIKELY(this->EndX >= this->CapacityX)) - this->grow(); - ::new ((void*) this->end()) T(::std::move(Elt)); - this->setEnd(this->end()+1); - } - - void pop_back() { - this->setEnd(this->end()-1); - this->end()->~T(); - } -}; - -// Define this out-of-line to dissuade the C++ compiler from inlining it. -template -void SmallVectorTemplateBase::grow(size_t MinSize) { - size_t CurCapacity = this->capacity(); - size_t CurSize = this->size(); - // Always grow, even from zero. - size_t NewCapacity = size_t(NextPowerOf2(CurCapacity+2)); - if (NewCapacity < MinSize) - NewCapacity = MinSize; - T *NewElts = static_cast(malloc(NewCapacity*sizeof(T))); - - // Move the elements over. - this->uninitialized_move(this->begin(), this->end(), NewElts); - - // Destroy the original elements. - destroy_range(this->begin(), this->end()); - - // If this wasn't grown from the inline copy, deallocate the old space. - if (!this->isSmall()) - free(this->begin()); - - this->setEnd(NewElts+CurSize); - this->BeginX = NewElts; - this->CapacityX = this->begin()+NewCapacity; -} - - -/// SmallVectorTemplateBase - This is where we put method -/// implementations that are designed to work with POD-like T's. -template -class SmallVectorTemplateBase : public SmallVectorTemplateCommon { -protected: - SmallVectorTemplateBase(size_t Size) : SmallVectorTemplateCommon(Size) {} - - // No need to do a destroy loop for POD's. - static void destroy_range(T *, T *) {} - - /// Move the range [I, E) onto the uninitialized memory - /// starting with "Dest", constructing elements into it as needed. - template - static void uninitialized_move(It1 I, It1 E, It2 Dest) { - // Just do a copy. - uninitialized_copy(I, E, Dest); - } - - /// Copy the range [I, E) onto the uninitialized memory - /// starting with "Dest", constructing elements into it as needed. - template - static void uninitialized_copy(It1 I, It1 E, It2 Dest) { - // Arbitrary iterator types; just use the basic implementation. - std::uninitialized_copy(I, E, Dest); - } - - /// Copy the range [I, E) onto the uninitialized memory - /// starting with "Dest", constructing elements into it as needed. - template - static void uninitialized_copy( - T1 *I, T1 *E, T2 *Dest, - typename std::enable_if::type, - T2>::value>::type * = nullptr) { - // Use memcpy for PODs iterated by pointers (which includes SmallVector - // iterators): std::uninitialized_copy optimizes to memmove, but we can - // use memcpy here. Note that I and E are iterators and thus might be - // invalid for memcpy if they are equal. - if (I != E) - memcpy(Dest, I, (E - I) * sizeof(T)); - } - - /// Double the size of the allocated memory, guaranteeing space for at - /// least one more element or MinSize if specified. - void grow(size_t MinSize = 0) { - this->grow_pod(MinSize*sizeof(T), sizeof(T)); - } -public: - void push_back(const T &Elt) { - if (LLVM_UNLIKELY(this->EndX >= this->CapacityX)) - this->grow(); - memcpy(this->end(), &Elt, sizeof(T)); - this->setEnd(this->end()+1); - } - - void pop_back() { - this->setEnd(this->end()-1); - } -}; - - -/// This class consists of common code factored out of the SmallVector class to -/// reduce code duplication based on the SmallVector 'N' template parameter. -template -class SmallVectorImpl : public SmallVectorTemplateBase::value> { - typedef SmallVectorTemplateBase::value > SuperClass; - - SmallVectorImpl(const SmallVectorImpl&) = delete; -public: - typedef typename SuperClass::iterator iterator; - typedef typename SuperClass::const_iterator const_iterator; - typedef typename SuperClass::size_type size_type; - -protected: - // Default ctor - Initialize to empty. - explicit SmallVectorImpl(unsigned N) - : SmallVectorTemplateBase::value>(N*sizeof(T)) { - } - -public: - ~SmallVectorImpl() { - // Destroy the constructed elements in the vector. - this->destroy_range(this->begin(), this->end()); - - // If this wasn't grown from the inline copy, deallocate the old space. - if (!this->isSmall()) - free(this->begin()); - } - - - void clear() { - this->destroy_range(this->begin(), this->end()); - this->EndX = this->BeginX; - } - - void resize(size_type N) { - if (N < this->size()) { - this->destroy_range(this->begin()+N, this->end()); - this->setEnd(this->begin()+N); - } else if (N > this->size()) { - if (this->capacity() < N) - this->grow(N); - for (auto I = this->end(), E = this->begin() + N; I != E; ++I) - new (&*I) T(); - this->setEnd(this->begin()+N); - } - } - - void resize(size_type N, const T &NV) { - if (N < this->size()) { - this->destroy_range(this->begin()+N, this->end()); - this->setEnd(this->begin()+N); - } else if (N > this->size()) { - if (this->capacity() < N) - this->grow(N); - std::uninitialized_fill(this->end(), this->begin()+N, NV); - this->setEnd(this->begin()+N); - } - } - - void reserve(size_type N) { - if (this->capacity() < N) - this->grow(N); - } - - T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() { - T Result = ::std::move(this->back()); - this->pop_back(); - return Result; - } - - void swap(SmallVectorImpl &RHS); - - /// Add the specified range to the end of the SmallVector. - template - void append(in_iter in_start, in_iter in_end) { - size_type NumInputs = std::distance(in_start, in_end); - // Grow allocated space if needed. - if (NumInputs > size_type(this->capacity_ptr()-this->end())) - this->grow(this->size()+NumInputs); - - // Copy the new elements over. - this->uninitialized_copy(in_start, in_end, this->end()); - this->setEnd(this->end() + NumInputs); - } - - /// Add the specified range to the end of the SmallVector. - void append(size_type NumInputs, const T &Elt) { - // Grow allocated space if needed. - if (NumInputs > size_type(this->capacity_ptr()-this->end())) - this->grow(this->size()+NumInputs); - - // Copy the new elements over. - std::uninitialized_fill_n(this->end(), NumInputs, Elt); - this->setEnd(this->end() + NumInputs); - } - - void append(std::initializer_list IL) { - append(IL.begin(), IL.end()); - } - - void assign(size_type NumElts, const T &Elt) { - clear(); - if (this->capacity() < NumElts) - this->grow(NumElts); - this->setEnd(this->begin()+NumElts); - std::uninitialized_fill(this->begin(), this->end(), Elt); - } - - void assign(std::initializer_list IL) { - clear(); - append(IL); - } - - iterator erase(const_iterator CI) { - // Just cast away constness because this is a non-const member function. - iterator I = const_cast(CI); - - assert(I >= this->begin() && "Iterator to erase is out of bounds."); - assert(I < this->end() && "Erasing at past-the-end iterator."); - - iterator N = I; - // Shift all elts down one. - std::move(I+1, this->end(), I); - // Drop the last elt. - this->pop_back(); - return(N); - } - - iterator erase(const_iterator CS, const_iterator CE) { - // Just cast away constness because this is a non-const member function. - iterator S = const_cast(CS); - iterator E = const_cast(CE); - - assert(S >= this->begin() && "Range to erase is out of bounds."); - assert(S <= E && "Trying to erase invalid range."); - assert(E <= this->end() && "Trying to erase past the end."); - - iterator N = S; - // Shift all elts down. - iterator I = std::move(E, this->end(), S); - // Drop the last elts. - this->destroy_range(I, this->end()); - this->setEnd(I); - return(N); - } - - iterator insert(iterator I, T &&Elt) { - if (I == this->end()) { // Important special case for empty vector. - this->push_back(::std::move(Elt)); - return this->end()-1; - } - - assert(I >= this->begin() && "Insertion iterator is out of bounds."); - assert(I <= this->end() && "Inserting past the end of the vector."); - - if (this->EndX >= this->CapacityX) { - size_t EltNo = I-this->begin(); - this->grow(); - I = this->begin()+EltNo; - } - - ::new ((void*) this->end()) T(::std::move(this->back())); - // Push everything else over. - std::move_backward(I, this->end()-1, this->end()); - this->setEnd(this->end()+1); - - // If we just moved the element we're inserting, be sure to update - // the reference. - T *EltPtr = &Elt; - if (I <= EltPtr && EltPtr < this->EndX) - ++EltPtr; - - *I = ::std::move(*EltPtr); - return I; - } - - iterator insert(iterator I, const T &Elt) { - if (I == this->end()) { // Important special case for empty vector. - this->push_back(Elt); - return this->end()-1; - } - - assert(I >= this->begin() && "Insertion iterator is out of bounds."); - assert(I <= this->end() && "Inserting past the end of the vector."); - - if (this->EndX >= this->CapacityX) { - size_t EltNo = I-this->begin(); - this->grow(); - I = this->begin()+EltNo; - } - ::new ((void*) this->end()) T(std::move(this->back())); - // Push everything else over. - std::move_backward(I, this->end()-1, this->end()); - this->setEnd(this->end()+1); - - // If we just moved the element we're inserting, be sure to update - // the reference. - const T *EltPtr = &Elt; - if (I <= EltPtr && EltPtr < this->EndX) - ++EltPtr; - - *I = *EltPtr; - return I; - } - - iterator insert(iterator I, size_type NumToInsert, const T &Elt) { - // Convert iterator to elt# to avoid invalidating iterator when we reserve() - size_t InsertElt = I - this->begin(); - - if (I == this->end()) { // Important special case for empty vector. - append(NumToInsert, Elt); - return this->begin()+InsertElt; - } - - assert(I >= this->begin() && "Insertion iterator is out of bounds."); - assert(I <= this->end() && "Inserting past the end of the vector."); - - // Ensure there is enough space. - reserve(this->size() + NumToInsert); - - // Uninvalidate the iterator. - I = this->begin()+InsertElt; - - // If there are more elements between the insertion point and the end of the - // range than there are being inserted, we can use a simple approach to - // insertion. Since we already reserved space, we know that this won't - // reallocate the vector. - if (size_t(this->end()-I) >= NumToInsert) { - T *OldEnd = this->end(); - append(std::move_iterator(this->end() - NumToInsert), - std::move_iterator(this->end())); - - // Copy the existing elements that get replaced. - std::move_backward(I, OldEnd-NumToInsert, OldEnd); - - std::fill_n(I, NumToInsert, Elt); - return I; - } - - // Otherwise, we're inserting more elements than exist already, and we're - // not inserting at the end. - - // Move over the elements that we're about to overwrite. - T *OldEnd = this->end(); - this->setEnd(this->end() + NumToInsert); - size_t NumOverwritten = OldEnd-I; - this->uninitialized_move(I, OldEnd, this->end()-NumOverwritten); - - // Replace the overwritten part. - std::fill_n(I, NumOverwritten, Elt); - - // Insert the non-overwritten middle part. - std::uninitialized_fill_n(OldEnd, NumToInsert-NumOverwritten, Elt); - return I; - } - - template - iterator insert(iterator I, ItTy From, ItTy To) { - // Convert iterator to elt# to avoid invalidating iterator when we reserve() - size_t InsertElt = I - this->begin(); - - if (I == this->end()) { // Important special case for empty vector. - append(From, To); - return this->begin()+InsertElt; - } - - assert(I >= this->begin() && "Insertion iterator is out of bounds."); - assert(I <= this->end() && "Inserting past the end of the vector."); - - size_t NumToInsert = std::distance(From, To); - - // Ensure there is enough space. - reserve(this->size() + NumToInsert); - - // Uninvalidate the iterator. - I = this->begin()+InsertElt; - - // If there are more elements between the insertion point and the end of the - // range than there are being inserted, we can use a simple approach to - // insertion. Since we already reserved space, we know that this won't - // reallocate the vector. - if (size_t(this->end()-I) >= NumToInsert) { - T *OldEnd = this->end(); - append(std::move_iterator(this->end() - NumToInsert), - std::move_iterator(this->end())); - - // Copy the existing elements that get replaced. - std::move_backward(I, OldEnd-NumToInsert, OldEnd); - - std::copy(From, To, I); - return I; - } - - // Otherwise, we're inserting more elements than exist already, and we're - // not inserting at the end. - - // Move over the elements that we're about to overwrite. - T *OldEnd = this->end(); - this->setEnd(this->end() + NumToInsert); - size_t NumOverwritten = OldEnd-I; - this->uninitialized_move(I, OldEnd, this->end()-NumOverwritten); - - // Replace the overwritten part. - for (T *J = I; NumOverwritten > 0; --NumOverwritten) { - *J = *From; - ++J; ++From; - } - - // Insert the non-overwritten middle part. - this->uninitialized_copy(From, To, OldEnd); - return I; - } - - void insert(iterator I, std::initializer_list IL) { - insert(I, IL.begin(), IL.end()); - } - - template void emplace_back(ArgTypes &&... Args) { - if (LLVM_UNLIKELY(this->EndX >= this->CapacityX)) - this->grow(); - ::new ((void *)this->end()) T(std::forward(Args)...); - this->setEnd(this->end() + 1); - } - - SmallVectorImpl &operator=(const SmallVectorImpl &RHS); - - SmallVectorImpl &operator=(SmallVectorImpl &&RHS); - - bool operator==(const SmallVectorImpl &RHS) const { - if (this->size() != RHS.size()) return false; - return std::equal(this->begin(), this->end(), RHS.begin()); - } - bool operator!=(const SmallVectorImpl &RHS) const { - return !(*this == RHS); - } - - bool operator<(const SmallVectorImpl &RHS) const { - return std::lexicographical_compare(this->begin(), this->end(), - RHS.begin(), RHS.end()); - } - - /// Set the array size to \p N, which the current array must have enough - /// capacity for. - /// - /// This does not construct or destroy any elements in the vector. - /// - /// Clients can use this in conjunction with capacity() to write past the end - /// of the buffer when they know that more elements are available, and only - /// update the size later. This avoids the cost of value initializing elements - /// which will only be overwritten. - void set_size(size_type N) { - assert(N <= this->capacity()); - this->setEnd(this->begin() + N); - } -}; - - -template -void SmallVectorImpl::swap(SmallVectorImpl &RHS) { - if (this == &RHS) return; - - // We can only avoid copying elements if neither vector is small. - if (!this->isSmall() && !RHS.isSmall()) { - std::swap(this->BeginX, RHS.BeginX); - std::swap(this->EndX, RHS.EndX); - std::swap(this->CapacityX, RHS.CapacityX); - return; - } - if (RHS.size() > this->capacity()) - this->grow(RHS.size()); - if (this->size() > RHS.capacity()) - RHS.grow(this->size()); - - // Swap the shared elements. - size_t NumShared = this->size(); - if (NumShared > RHS.size()) NumShared = RHS.size(); - for (size_type i = 0; i != NumShared; ++i) - std::swap((*this)[i], RHS[i]); - - // Copy over the extra elts. - if (this->size() > RHS.size()) { - size_t EltDiff = this->size() - RHS.size(); - this->uninitialized_copy(this->begin()+NumShared, this->end(), RHS.end()); - RHS.setEnd(RHS.end()+EltDiff); - this->destroy_range(this->begin()+NumShared, this->end()); - this->setEnd(this->begin()+NumShared); - } else if (RHS.size() > this->size()) { - size_t EltDiff = RHS.size() - this->size(); - this->uninitialized_copy(RHS.begin()+NumShared, RHS.end(), this->end()); - this->setEnd(this->end() + EltDiff); - this->destroy_range(RHS.begin()+NumShared, RHS.end()); - RHS.setEnd(RHS.begin()+NumShared); - } -} - -template -SmallVectorImpl &SmallVectorImpl:: - operator=(const SmallVectorImpl &RHS) { - // Avoid self-assignment. - if (this == &RHS) return *this; - - // If we already have sufficient space, assign the common elements, then - // destroy any excess. - size_t RHSSize = RHS.size(); - size_t CurSize = this->size(); - if (CurSize >= RHSSize) { - // Assign common elements. - iterator NewEnd; - if (RHSSize) - NewEnd = std::copy(RHS.begin(), RHS.begin()+RHSSize, this->begin()); - else - NewEnd = this->begin(); - - // Destroy excess elements. - this->destroy_range(NewEnd, this->end()); - - // Trim. - this->setEnd(NewEnd); - return *this; - } - - // If we have to grow to have enough elements, destroy the current elements. - // This allows us to avoid copying them during the grow. - // FIXME: don't do this if they're efficiently moveable. - if (this->capacity() < RHSSize) { - // Destroy current elements. - this->destroy_range(this->begin(), this->end()); - this->setEnd(this->begin()); - CurSize = 0; - this->grow(RHSSize); - } else if (CurSize) { - // Otherwise, use assignment for the already-constructed elements. - std::copy(RHS.begin(), RHS.begin()+CurSize, this->begin()); - } - - // Copy construct the new elements in place. - this->uninitialized_copy(RHS.begin()+CurSize, RHS.end(), - this->begin()+CurSize); - - // Set end. - this->setEnd(this->begin()+RHSSize); - return *this; -} - -template -SmallVectorImpl &SmallVectorImpl::operator=(SmallVectorImpl &&RHS) { - // Avoid self-assignment. - if (this == &RHS) return *this; - - // If the RHS isn't small, clear this vector and then steal its buffer. - if (!RHS.isSmall()) { - this->destroy_range(this->begin(), this->end()); - if (!this->isSmall()) free(this->begin()); - this->BeginX = RHS.BeginX; - this->EndX = RHS.EndX; - this->CapacityX = RHS.CapacityX; - RHS.resetToSmall(); - return *this; - } - - // If we already have sufficient space, assign the common elements, then - // destroy any excess. - size_t RHSSize = RHS.size(); - size_t CurSize = this->size(); - if (CurSize >= RHSSize) { - // Assign common elements. - iterator NewEnd = this->begin(); - if (RHSSize) - NewEnd = std::move(RHS.begin(), RHS.end(), NewEnd); - - // Destroy excess elements and trim the bounds. - this->destroy_range(NewEnd, this->end()); - this->setEnd(NewEnd); - - // Clear the RHS. - RHS.clear(); - - return *this; - } - - // If we have to grow to have enough elements, destroy the current elements. - // This allows us to avoid copying them during the grow. - // FIXME: this may not actually make any sense if we can efficiently move - // elements. - if (this->capacity() < RHSSize) { - // Destroy current elements. - this->destroy_range(this->begin(), this->end()); - this->setEnd(this->begin()); - CurSize = 0; - this->grow(RHSSize); - } else if (CurSize) { - // Otherwise, use assignment for the already-constructed elements. - std::move(RHS.begin(), RHS.begin()+CurSize, this->begin()); - } - - // Move-construct the new elements in place. - this->uninitialized_move(RHS.begin()+CurSize, RHS.end(), - this->begin()+CurSize); - - // Set end. - this->setEnd(this->begin()+RHSSize); - - RHS.clear(); - return *this; -} - -/// Storage for the SmallVector elements which aren't contained in -/// SmallVectorTemplateCommon. There are 'N-1' elements here. The remaining '1' -/// element is in the base class. This is specialized for the N=1 and N=0 cases -/// to avoid allocating unnecessary storage. -template -struct SmallVectorStorage { - typename SmallVectorTemplateCommon::U InlineElts[N - 1]; -}; -template struct SmallVectorStorage {}; -template struct SmallVectorStorage {}; - -/// This is a 'vector' (really, a variable-sized array), optimized -/// for the case when the array is small. It contains some number of elements -/// in-place, which allows it to avoid heap allocation when the actual number of -/// elements is below that threshold. This allows normal "small" cases to be -/// fast without losing generality for large inputs. -/// -/// Note that this does not attempt to be exception safe. -/// -template -class SmallVector : public SmallVectorImpl { - /// Inline space for elements which aren't stored in the base class. - SmallVectorStorage Storage; -public: - SmallVector() : SmallVectorImpl(N) { - } - - explicit SmallVector(size_t Size, const T &Value = T()) - : SmallVectorImpl(N) { - this->assign(Size, Value); - } - - template - SmallVector(ItTy S, ItTy E) : SmallVectorImpl(N) { - this->append(S, E); - } - - template - explicit SmallVector(const llvm::iterator_range R) - : SmallVectorImpl(N) { - this->append(R.begin(), R.end()); - } - - SmallVector(std::initializer_list IL) : SmallVectorImpl(N) { - this->assign(IL); - } - - SmallVector(const SmallVector &RHS) : SmallVectorImpl(N) { - if (!RHS.empty()) - SmallVectorImpl::operator=(RHS); - } - - const SmallVector &operator=(const SmallVector &RHS) { - SmallVectorImpl::operator=(RHS); - return *this; - } - - SmallVector(SmallVector &&RHS) : SmallVectorImpl(N) { - if (!RHS.empty()) - SmallVectorImpl::operator=(::std::move(RHS)); - } - - const SmallVector &operator=(SmallVector &&RHS) { - SmallVectorImpl::operator=(::std::move(RHS)); - return *this; - } - - SmallVector(SmallVectorImpl &&RHS) : SmallVectorImpl(N) { - if (!RHS.empty()) - SmallVectorImpl::operator=(::std::move(RHS)); - } - - const SmallVector &operator=(SmallVectorImpl &&RHS) { - SmallVectorImpl::operator=(::std::move(RHS)); - return *this; - } - - const SmallVector &operator=(std::initializer_list IL) { - this->assign(IL); - return *this; - } -}; - -template -static inline size_t capacity_in_bytes(const SmallVector &X) { - return X.capacity_in_bytes(); -} - -} // End llvm namespace - -namespace std { - /// Implement std::swap in terms of SmallVector swap. - template - inline void - swap(llvm::SmallVectorImpl &LHS, llvm::SmallVectorImpl &RHS) { - LHS.swap(RHS); - } - - /// Implement std::swap in terms of SmallVector swap. - template - inline void - swap(llvm::SmallVector &LHS, llvm::SmallVector &RHS) { - LHS.swap(RHS); - } -} - -#endif diff --git a/llvm/include/llvm/ADT/SparseBitVector.h b/llvm/include/llvm/ADT/SparseBitVector.h deleted file mode 100644 index e6e72413..00000000 --- a/llvm/include/llvm/ADT/SparseBitVector.h +++ /dev/null @@ -1,904 +0,0 @@ -//===- llvm/ADT/SparseBitVector.h - Efficient Sparse BitVector -*- C++ -*- ===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the SparseBitVector class. See the doxygen comment for -// SparseBitVector for more details on the algorithm used. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SPARSEBITVECTOR_H -#define LLVM_ADT_SPARSEBITVECTOR_H - -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/raw_ostream.h" -#include -#include - -namespace llvm { - -/// SparseBitVector is an implementation of a bitvector that is sparse by only -/// storing the elements that have non-zero bits set. In order to make this -/// fast for the most common cases, SparseBitVector is implemented as a linked -/// list of SparseBitVectorElements. We maintain a pointer to the last -/// SparseBitVectorElement accessed (in the form of a list iterator), in order -/// to make multiple in-order test/set constant time after the first one is -/// executed. Note that using vectors to store SparseBitVectorElement's does -/// not work out very well because it causes insertion in the middle to take -/// enormous amounts of time with a large amount of bits. Other structures that -/// have better worst cases for insertion in the middle (various balanced trees, -/// etc) do not perform as well in practice as a linked list with this iterator -/// kept up to date. They are also significantly more memory intensive. - -template -struct SparseBitVectorElement - : public ilist_node > { -public: - typedef unsigned long BitWord; - typedef unsigned size_type; - enum { - BITWORD_SIZE = sizeof(BitWord) * CHAR_BIT, - BITWORDS_PER_ELEMENT = (ElementSize + BITWORD_SIZE - 1) / BITWORD_SIZE, - BITS_PER_ELEMENT = ElementSize - }; - -private: - // Index of Element in terms of where first bit starts. - unsigned ElementIndex; - BitWord Bits[BITWORDS_PER_ELEMENT]; - // Needed for sentinels - friend struct ilist_sentinel_traits; - SparseBitVectorElement() { - ElementIndex = ~0U; - memset(&Bits[0], 0, sizeof (BitWord) * BITWORDS_PER_ELEMENT); - } - -public: - explicit SparseBitVectorElement(unsigned Idx) { - ElementIndex = Idx; - memset(&Bits[0], 0, sizeof (BitWord) * BITWORDS_PER_ELEMENT); - } - - // Comparison. - bool operator==(const SparseBitVectorElement &RHS) const { - if (ElementIndex != RHS.ElementIndex) - return false; - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) - if (Bits[i] != RHS.Bits[i]) - return false; - return true; - } - - bool operator!=(const SparseBitVectorElement &RHS) const { - return !(*this == RHS); - } - - // Return the bits that make up word Idx in our element. - BitWord word(unsigned Idx) const { - assert (Idx < BITWORDS_PER_ELEMENT); - return Bits[Idx]; - } - - unsigned index() const { - return ElementIndex; - } - - bool empty() const { - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) - if (Bits[i]) - return false; - return true; - } - - void set(unsigned Idx) { - Bits[Idx / BITWORD_SIZE] |= 1L << (Idx % BITWORD_SIZE); - } - - bool test_and_set (unsigned Idx) { - bool old = test(Idx); - if (!old) { - set(Idx); - return true; - } - return false; - } - - void reset(unsigned Idx) { - Bits[Idx / BITWORD_SIZE] &= ~(1L << (Idx % BITWORD_SIZE)); - } - - bool test(unsigned Idx) const { - return Bits[Idx / BITWORD_SIZE] & (1L << (Idx % BITWORD_SIZE)); - } - - size_type count() const { - unsigned NumBits = 0; - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) - NumBits += countPopulation(Bits[i]); - return NumBits; - } - - /// find_first - Returns the index of the first set bit. - int find_first() const { - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) - if (Bits[i] != 0) - return i * BITWORD_SIZE + countTrailingZeros(Bits[i]); - llvm_unreachable("Illegal empty element"); - } - - /// find_next - Returns the index of the next set bit starting from the - /// "Curr" bit. Returns -1 if the next set bit is not found. - int find_next(unsigned Curr) const { - if (Curr >= BITS_PER_ELEMENT) - return -1; - - unsigned WordPos = Curr / BITWORD_SIZE; - unsigned BitPos = Curr % BITWORD_SIZE; - BitWord Copy = Bits[WordPos]; - assert (WordPos <= BITWORDS_PER_ELEMENT - && "Word Position outside of element"); - - // Mask off previous bits. - Copy &= ~0UL << BitPos; - - if (Copy != 0) - return WordPos * BITWORD_SIZE + countTrailingZeros(Copy); - - // Check subsequent words. - for (unsigned i = WordPos+1; i < BITWORDS_PER_ELEMENT; ++i) - if (Bits[i] != 0) - return i * BITWORD_SIZE + countTrailingZeros(Bits[i]); - return -1; - } - - // Union this element with RHS and return true if this one changed. - bool unionWith(const SparseBitVectorElement &RHS) { - bool changed = false; - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) { - BitWord old = changed ? 0 : Bits[i]; - - Bits[i] |= RHS.Bits[i]; - if (!changed && old != Bits[i]) - changed = true; - } - return changed; - } - - // Return true if we have any bits in common with RHS - bool intersects(const SparseBitVectorElement &RHS) const { - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) { - if (RHS.Bits[i] & Bits[i]) - return true; - } - return false; - } - - // Intersect this Element with RHS and return true if this one changed. - // BecameZero is set to true if this element became all-zero bits. - bool intersectWith(const SparseBitVectorElement &RHS, - bool &BecameZero) { - bool changed = false; - bool allzero = true; - - BecameZero = false; - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) { - BitWord old = changed ? 0 : Bits[i]; - - Bits[i] &= RHS.Bits[i]; - if (Bits[i] != 0) - allzero = false; - - if (!changed && old != Bits[i]) - changed = true; - } - BecameZero = allzero; - return changed; - } - - // Intersect this Element with the complement of RHS and return true if this - // one changed. BecameZero is set to true if this element became all-zero - // bits. - bool intersectWithComplement(const SparseBitVectorElement &RHS, - bool &BecameZero) { - bool changed = false; - bool allzero = true; - - BecameZero = false; - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) { - BitWord old = changed ? 0 : Bits[i]; - - Bits[i] &= ~RHS.Bits[i]; - if (Bits[i] != 0) - allzero = false; - - if (!changed && old != Bits[i]) - changed = true; - } - BecameZero = allzero; - return changed; - } - - // Three argument version of intersectWithComplement that intersects - // RHS1 & ~RHS2 into this element - void intersectWithComplement(const SparseBitVectorElement &RHS1, - const SparseBitVectorElement &RHS2, - bool &BecameZero) { - bool allzero = true; - - BecameZero = false; - for (unsigned i = 0; i < BITWORDS_PER_ELEMENT; ++i) { - Bits[i] = RHS1.Bits[i] & ~RHS2.Bits[i]; - if (Bits[i] != 0) - allzero = false; - } - BecameZero = allzero; - } -}; - -template -struct ilist_traits > - : public ilist_default_traits > { - typedef SparseBitVectorElement Element; - - Element *createSentinel() const { return static_cast(&Sentinel); } - static void destroySentinel(Element *) {} - - Element *provideInitialHead() const { return createSentinel(); } - Element *ensureHead(Element *) const { return createSentinel(); } - static void noteHead(Element *, Element *) {} - -private: - mutable ilist_half_node Sentinel; -}; - -template -class SparseBitVector { - typedef ilist > ElementList; - typedef typename ElementList::iterator ElementListIter; - typedef typename ElementList::const_iterator ElementListConstIter; - enum { - BITWORD_SIZE = SparseBitVectorElement::BITWORD_SIZE - }; - - // Pointer to our current Element. - ElementListIter CurrElementIter; - ElementList Elements; - - // This is like std::lower_bound, except we do linear searching from the - // current position. - ElementListIter FindLowerBound(unsigned ElementIndex) { - - if (Elements.empty()) { - CurrElementIter = Elements.begin(); - return Elements.begin(); - } - - // Make sure our current iterator is valid. - if (CurrElementIter == Elements.end()) - --CurrElementIter; - - // Search from our current iterator, either backwards or forwards, - // depending on what element we are looking for. - ElementListIter ElementIter = CurrElementIter; - if (CurrElementIter->index() == ElementIndex) { - return ElementIter; - } else if (CurrElementIter->index() > ElementIndex) { - while (ElementIter != Elements.begin() - && ElementIter->index() > ElementIndex) - --ElementIter; - } else { - while (ElementIter != Elements.end() && - ElementIter->index() < ElementIndex) - ++ElementIter; - } - CurrElementIter = ElementIter; - return ElementIter; - } - - // Iterator to walk set bits in the bitmap. This iterator is a lot uglier - // than it would be, in order to be efficient. - class SparseBitVectorIterator { - private: - bool AtEnd; - - const SparseBitVector *BitVector; - - // Current element inside of bitmap. - ElementListConstIter Iter; - - // Current bit number inside of our bitmap. - unsigned BitNumber; - - // Current word number inside of our element. - unsigned WordNumber; - - // Current bits from the element. - typename SparseBitVectorElement::BitWord Bits; - - // Move our iterator to the first non-zero bit in the bitmap. - void AdvanceToFirstNonZero() { - if (AtEnd) - return; - if (BitVector->Elements.empty()) { - AtEnd = true; - return; - } - Iter = BitVector->Elements.begin(); - BitNumber = Iter->index() * ElementSize; - unsigned BitPos = Iter->find_first(); - BitNumber += BitPos; - WordNumber = (BitNumber % ElementSize) / BITWORD_SIZE; - Bits = Iter->word(WordNumber); - Bits >>= BitPos % BITWORD_SIZE; - } - - // Move our iterator to the next non-zero bit. - void AdvanceToNextNonZero() { - if (AtEnd) - return; - - while (Bits && !(Bits & 1)) { - Bits >>= 1; - BitNumber += 1; - } - - // See if we ran out of Bits in this word. - if (!Bits) { - int NextSetBitNumber = Iter->find_next(BitNumber % ElementSize) ; - // If we ran out of set bits in this element, move to next element. - if (NextSetBitNumber == -1 || (BitNumber % ElementSize == 0)) { - ++Iter; - WordNumber = 0; - - // We may run out of elements in the bitmap. - if (Iter == BitVector->Elements.end()) { - AtEnd = true; - return; - } - // Set up for next non-zero word in bitmap. - BitNumber = Iter->index() * ElementSize; - NextSetBitNumber = Iter->find_first(); - BitNumber += NextSetBitNumber; - WordNumber = (BitNumber % ElementSize) / BITWORD_SIZE; - Bits = Iter->word(WordNumber); - Bits >>= NextSetBitNumber % BITWORD_SIZE; - } else { - WordNumber = (NextSetBitNumber % ElementSize) / BITWORD_SIZE; - Bits = Iter->word(WordNumber); - Bits >>= NextSetBitNumber % BITWORD_SIZE; - BitNumber = Iter->index() * ElementSize; - BitNumber += NextSetBitNumber; - } - } - } - public: - // Preincrement. - inline SparseBitVectorIterator& operator++() { - ++BitNumber; - Bits >>= 1; - AdvanceToNextNonZero(); - return *this; - } - - // Postincrement. - inline SparseBitVectorIterator operator++(int) { - SparseBitVectorIterator tmp = *this; - ++*this; - return tmp; - } - - // Return the current set bit number. - unsigned operator*() const { - return BitNumber; - } - - bool operator==(const SparseBitVectorIterator &RHS) const { - // If they are both at the end, ignore the rest of the fields. - if (AtEnd && RHS.AtEnd) - return true; - // Otherwise they are the same if they have the same bit number and - // bitmap. - return AtEnd == RHS.AtEnd && RHS.BitNumber == BitNumber; - } - - bool operator!=(const SparseBitVectorIterator &RHS) const { - return !(*this == RHS); - } - - SparseBitVectorIterator(): BitVector(nullptr) { - } - - SparseBitVectorIterator(const SparseBitVector *RHS, - bool end = false):BitVector(RHS) { - Iter = BitVector->Elements.begin(); - BitNumber = 0; - Bits = 0; - WordNumber = ~0; - AtEnd = end; - AdvanceToFirstNonZero(); - } - }; -public: - typedef SparseBitVectorIterator iterator; - - SparseBitVector () { - CurrElementIter = Elements.begin (); - } - - ~SparseBitVector() { - } - - // SparseBitVector copy ctor. - SparseBitVector(const SparseBitVector &RHS) { - ElementListConstIter ElementIter = RHS.Elements.begin(); - while (ElementIter != RHS.Elements.end()) { - Elements.push_back(SparseBitVectorElement(*ElementIter)); - ++ElementIter; - } - - CurrElementIter = Elements.begin (); - } - - // Clear. - void clear() { - Elements.clear(); - } - - // Assignment - SparseBitVector& operator=(const SparseBitVector& RHS) { - if (this == &RHS) - return *this; - - Elements.clear(); - - ElementListConstIter ElementIter = RHS.Elements.begin(); - while (ElementIter != RHS.Elements.end()) { - Elements.push_back(SparseBitVectorElement(*ElementIter)); - ++ElementIter; - } - - CurrElementIter = Elements.begin (); - - return *this; - } - - // Test, Reset, and Set a bit in the bitmap. - bool test(unsigned Idx) { - if (Elements.empty()) - return false; - - unsigned ElementIndex = Idx / ElementSize; - ElementListIter ElementIter = FindLowerBound(ElementIndex); - - // If we can't find an element that is supposed to contain this bit, there - // is nothing more to do. - if (ElementIter == Elements.end() || - ElementIter->index() != ElementIndex) - return false; - return ElementIter->test(Idx % ElementSize); - } - - void reset(unsigned Idx) { - if (Elements.empty()) - return; - - unsigned ElementIndex = Idx / ElementSize; - ElementListIter ElementIter = FindLowerBound(ElementIndex); - - // If we can't find an element that is supposed to contain this bit, there - // is nothing more to do. - if (ElementIter == Elements.end() || - ElementIter->index() != ElementIndex) - return; - ElementIter->reset(Idx % ElementSize); - - // When the element is zeroed out, delete it. - if (ElementIter->empty()) { - ++CurrElementIter; - Elements.erase(ElementIter); - } - } - - void set(unsigned Idx) { - unsigned ElementIndex = Idx / ElementSize; - SparseBitVectorElement *Element; - ElementListIter ElementIter; - if (Elements.empty()) { - Element = new SparseBitVectorElement(ElementIndex); - ElementIter = Elements.insert(Elements.end(), Element); - - } else { - ElementIter = FindLowerBound(ElementIndex); - - if (ElementIter == Elements.end() || - ElementIter->index() != ElementIndex) { - Element = new SparseBitVectorElement(ElementIndex); - // We may have hit the beginning of our SparseBitVector, in which case, - // we may need to insert right after this element, which requires moving - // the current iterator forward one, because insert does insert before. - if (ElementIter != Elements.end() && - ElementIter->index() < ElementIndex) - ElementIter = Elements.insert(++ElementIter, Element); - else - ElementIter = Elements.insert(ElementIter, Element); - } - } - CurrElementIter = ElementIter; - - ElementIter->set(Idx % ElementSize); - } - - bool test_and_set (unsigned Idx) { - bool old = test(Idx); - if (!old) { - set(Idx); - return true; - } - return false; - } - - bool operator!=(const SparseBitVector &RHS) const { - return !(*this == RHS); - } - - bool operator==(const SparseBitVector &RHS) const { - ElementListConstIter Iter1 = Elements.begin(); - ElementListConstIter Iter2 = RHS.Elements.begin(); - - for (; Iter1 != Elements.end() && Iter2 != RHS.Elements.end(); - ++Iter1, ++Iter2) { - if (*Iter1 != *Iter2) - return false; - } - return Iter1 == Elements.end() && Iter2 == RHS.Elements.end(); - } - - // Union our bitmap with the RHS and return true if we changed. - bool operator|=(const SparseBitVector &RHS) { - if (this == &RHS) - return false; - - bool changed = false; - ElementListIter Iter1 = Elements.begin(); - ElementListConstIter Iter2 = RHS.Elements.begin(); - - // If RHS is empty, we are done - if (RHS.Elements.empty()) - return false; - - while (Iter2 != RHS.Elements.end()) { - if (Iter1 == Elements.end() || Iter1->index() > Iter2->index()) { - Elements.insert(Iter1, - new SparseBitVectorElement(*Iter2)); - ++Iter2; - changed = true; - } else if (Iter1->index() == Iter2->index()) { - changed |= Iter1->unionWith(*Iter2); - ++Iter1; - ++Iter2; - } else { - ++Iter1; - } - } - CurrElementIter = Elements.begin(); - return changed; - } - - // Intersect our bitmap with the RHS and return true if ours changed. - bool operator&=(const SparseBitVector &RHS) { - if (this == &RHS) - return false; - - bool changed = false; - ElementListIter Iter1 = Elements.begin(); - ElementListConstIter Iter2 = RHS.Elements.begin(); - - // Check if both bitmaps are empty. - if (Elements.empty() && RHS.Elements.empty()) - return false; - - // Loop through, intersecting as we go, erasing elements when necessary. - while (Iter2 != RHS.Elements.end()) { - if (Iter1 == Elements.end()) { - CurrElementIter = Elements.begin(); - return changed; - } - - if (Iter1->index() > Iter2->index()) { - ++Iter2; - } else if (Iter1->index() == Iter2->index()) { - bool BecameZero; - changed |= Iter1->intersectWith(*Iter2, BecameZero); - if (BecameZero) { - ElementListIter IterTmp = Iter1; - ++Iter1; - Elements.erase(IterTmp); - } else { - ++Iter1; - } - ++Iter2; - } else { - ElementListIter IterTmp = Iter1; - ++Iter1; - Elements.erase(IterTmp); - changed = true; - } - } - if (Iter1 != Elements.end()) { - Elements.erase(Iter1, Elements.end()); - changed = true; - } - CurrElementIter = Elements.begin(); - return changed; - } - - // Intersect our bitmap with the complement of the RHS and return true - // if ours changed. - bool intersectWithComplement(const SparseBitVector &RHS) { - if (this == &RHS) { - if (!empty()) { - clear(); - return true; - } - return false; - } - - bool changed = false; - ElementListIter Iter1 = Elements.begin(); - ElementListConstIter Iter2 = RHS.Elements.begin(); - - // If either our bitmap or RHS is empty, we are done - if (Elements.empty() || RHS.Elements.empty()) - return false; - - // Loop through, intersecting as we go, erasing elements when necessary. - while (Iter2 != RHS.Elements.end()) { - if (Iter1 == Elements.end()) { - CurrElementIter = Elements.begin(); - return changed; - } - - if (Iter1->index() > Iter2->index()) { - ++Iter2; - } else if (Iter1->index() == Iter2->index()) { - bool BecameZero; - changed |= Iter1->intersectWithComplement(*Iter2, BecameZero); - if (BecameZero) { - ElementListIter IterTmp = Iter1; - ++Iter1; - Elements.erase(IterTmp); - } else { - ++Iter1; - } - ++Iter2; - } else { - ++Iter1; - } - } - CurrElementIter = Elements.begin(); - return changed; - } - - bool intersectWithComplement(const SparseBitVector *RHS) const { - return intersectWithComplement(*RHS); - } - - // Three argument version of intersectWithComplement. - // Result of RHS1 & ~RHS2 is stored into this bitmap. - void intersectWithComplement(const SparseBitVector &RHS1, - const SparseBitVector &RHS2) - { - if (this == &RHS1) { - intersectWithComplement(RHS2); - return; - } else if (this == &RHS2) { - SparseBitVector RHS2Copy(RHS2); - intersectWithComplement(RHS1, RHS2Copy); - return; - } - - Elements.clear(); - CurrElementIter = Elements.begin(); - ElementListConstIter Iter1 = RHS1.Elements.begin(); - ElementListConstIter Iter2 = RHS2.Elements.begin(); - - // If RHS1 is empty, we are done - // If RHS2 is empty, we still have to copy RHS1 - if (RHS1.Elements.empty()) - return; - - // Loop through, intersecting as we go, erasing elements when necessary. - while (Iter2 != RHS2.Elements.end()) { - if (Iter1 == RHS1.Elements.end()) - return; - - if (Iter1->index() > Iter2->index()) { - ++Iter2; - } else if (Iter1->index() == Iter2->index()) { - bool BecameZero = false; - SparseBitVectorElement *NewElement = - new SparseBitVectorElement(Iter1->index()); - NewElement->intersectWithComplement(*Iter1, *Iter2, BecameZero); - if (!BecameZero) { - Elements.push_back(NewElement); - } - else - delete NewElement; - ++Iter1; - ++Iter2; - } else { - SparseBitVectorElement *NewElement = - new SparseBitVectorElement(*Iter1); - Elements.push_back(NewElement); - ++Iter1; - } - } - - // copy the remaining elements - while (Iter1 != RHS1.Elements.end()) { - SparseBitVectorElement *NewElement = - new SparseBitVectorElement(*Iter1); - Elements.push_back(NewElement); - ++Iter1; - } - } - - void intersectWithComplement(const SparseBitVector *RHS1, - const SparseBitVector *RHS2) { - intersectWithComplement(*RHS1, *RHS2); - } - - bool intersects(const SparseBitVector *RHS) const { - return intersects(*RHS); - } - - // Return true if we share any bits in common with RHS - bool intersects(const SparseBitVector &RHS) const { - ElementListConstIter Iter1 = Elements.begin(); - ElementListConstIter Iter2 = RHS.Elements.begin(); - - // Check if both bitmaps are empty. - if (Elements.empty() && RHS.Elements.empty()) - return false; - - // Loop through, intersecting stopping when we hit bits in common. - while (Iter2 != RHS.Elements.end()) { - if (Iter1 == Elements.end()) - return false; - - if (Iter1->index() > Iter2->index()) { - ++Iter2; - } else if (Iter1->index() == Iter2->index()) { - if (Iter1->intersects(*Iter2)) - return true; - ++Iter1; - ++Iter2; - } else { - ++Iter1; - } - } - return false; - } - - // Return true iff all bits set in this SparseBitVector are - // also set in RHS. - bool contains(const SparseBitVector &RHS) const { - SparseBitVector Result(*this); - Result &= RHS; - return (Result == RHS); - } - - // Return the first set bit in the bitmap. Return -1 if no bits are set. - int find_first() const { - if (Elements.empty()) - return -1; - const SparseBitVectorElement &First = *(Elements.begin()); - return (First.index() * ElementSize) + First.find_first(); - } - - // Return true if the SparseBitVector is empty - bool empty() const { - return Elements.empty(); - } - - unsigned count() const { - unsigned BitCount = 0; - for (ElementListConstIter Iter = Elements.begin(); - Iter != Elements.end(); - ++Iter) - BitCount += Iter->count(); - - return BitCount; - } - iterator begin() const { - return iterator(this); - } - - iterator end() const { - return iterator(this, true); - } -}; - -// Convenience functions to allow Or and And without dereferencing in the user -// code. - -template -inline bool operator |=(SparseBitVector &LHS, - const SparseBitVector *RHS) { - return LHS |= *RHS; -} - -template -inline bool operator |=(SparseBitVector *LHS, - const SparseBitVector &RHS) { - return LHS->operator|=(RHS); -} - -template -inline bool operator &=(SparseBitVector *LHS, - const SparseBitVector &RHS) { - return LHS->operator&=(RHS); -} - -template -inline bool operator &=(SparseBitVector &LHS, - const SparseBitVector *RHS) { - return LHS &= *RHS; -} - -// Convenience functions for infix union, intersection, difference operators. - -template -inline SparseBitVector -operator|(const SparseBitVector &LHS, - const SparseBitVector &RHS) { - SparseBitVector Result(LHS); - Result |= RHS; - return Result; -} - -template -inline SparseBitVector -operator&(const SparseBitVector &LHS, - const SparseBitVector &RHS) { - SparseBitVector Result(LHS); - Result &= RHS; - return Result; -} - -template -inline SparseBitVector -operator-(const SparseBitVector &LHS, - const SparseBitVector &RHS) { - SparseBitVector Result; - Result.intersectWithComplement(LHS, RHS); - return Result; -} - -// Dump a SparseBitVector to a stream -template -void dump(const SparseBitVector &LHS, raw_ostream &out) { - out << "["; - - typename SparseBitVector::iterator bi = LHS.begin(), - be = LHS.end(); - if (bi != be) { - out << *bi; - for (++bi; bi != be; ++bi) { - out << " " << *bi; - } - } - out << "]\n"; -} -} // end namespace llvm - -#endif // LLVM_ADT_SPARSEBITVECTOR_H diff --git a/llvm/include/llvm/ADT/SparseMultiSet.h b/llvm/include/llvm/ADT/SparseMultiSet.h deleted file mode 100644 index e3aa2589..00000000 --- a/llvm/include/llvm/ADT/SparseMultiSet.h +++ /dev/null @@ -1,518 +0,0 @@ -//===--- llvm/ADT/SparseMultiSet.h - Sparse multiset ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the SparseMultiSet class, which adds multiset behavior to -// the SparseSet. -// -// A sparse multiset holds a small number of objects identified by integer keys -// from a moderately sized universe. The sparse multiset uses more memory than -// other containers in order to provide faster operations. Any key can map to -// multiple values. A SparseMultiSetNode class is provided, which serves as a -// convenient base class for the contents of a SparseMultiSet. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SPARSEMULTISET_H -#define LLVM_ADT_SPARSEMULTISET_H - -#include "llvm/ADT/SparseSet.h" - -namespace llvm { - -/// Fast multiset implementation for objects that can be identified by small -/// unsigned keys. -/// -/// SparseMultiSet allocates memory proportional to the size of the key -/// universe, so it is not recommended for building composite data structures. -/// It is useful for algorithms that require a single set with fast operations. -/// -/// Compared to DenseSet and DenseMap, SparseMultiSet provides constant-time -/// fast clear() as fast as a vector. The find(), insert(), and erase() -/// operations are all constant time, and typically faster than a hash table. -/// The iteration order doesn't depend on numerical key values, it only depends -/// on the order of insert() and erase() operations. Iteration order is the -/// insertion order. Iteration is only provided over elements of equivalent -/// keys, but iterators are bidirectional. -/// -/// Compared to BitVector, SparseMultiSet uses 8x-40x more memory, but -/// offers constant-time clear() and size() operations as well as fast iteration -/// independent on the size of the universe. -/// -/// SparseMultiSet contains a dense vector holding all the objects and a sparse -/// array holding indexes into the dense vector. Most of the memory is used by -/// the sparse array which is the size of the key universe. The SparseT template -/// parameter provides a space/speed tradeoff for sets holding many elements. -/// -/// When SparseT is uint32_t, find() only touches up to 3 cache lines, but the -/// sparse array uses 4 x Universe bytes. -/// -/// When SparseT is uint8_t (the default), find() touches up to 3+[N/256] cache -/// lines, but the sparse array is 4x smaller. N is the number of elements in -/// the set. -/// -/// For sets that may grow to thousands of elements, SparseT should be set to -/// uint16_t or uint32_t. -/// -/// Multiset behavior is provided by providing doubly linked lists for values -/// that are inlined in the dense vector. SparseMultiSet is a good choice when -/// one desires a growable number of entries per key, as it will retain the -/// SparseSet algorithmic properties despite being growable. Thus, it is often a -/// better choice than a SparseSet of growable containers or a vector of -/// vectors. SparseMultiSet also keeps iterators valid after erasure (provided -/// the iterators don't point to the element erased), allowing for more -/// intuitive and fast removal. -/// -/// @tparam ValueT The type of objects in the set. -/// @tparam KeyFunctorT A functor that computes an unsigned index from KeyT. -/// @tparam SparseT An unsigned integer type. See above. -/// -template, - typename SparseT = uint8_t> -class SparseMultiSet { - static_assert(std::numeric_limits::is_integer && - !std::numeric_limits::is_signed, - "SparseT must be an unsigned integer type"); - - /// The actual data that's stored, as a doubly-linked list implemented via - /// indices into the DenseVector. The doubly linked list is implemented - /// circular in Prev indices, and INVALID-terminated in Next indices. This - /// provides efficient access to list tails. These nodes can also be - /// tombstones, in which case they are actually nodes in a single-linked - /// freelist of recyclable slots. - struct SMSNode { - static const unsigned INVALID = ~0U; - - ValueT Data; - unsigned Prev; - unsigned Next; - - SMSNode(ValueT D, unsigned P, unsigned N) : Data(D), Prev(P), Next(N) { } - - /// List tails have invalid Nexts. - bool isTail() const { - return Next == INVALID; - } - - /// Whether this node is a tombstone node, and thus is in our freelist. - bool isTombstone() const { - return Prev == INVALID; - } - - /// Since the list is circular in Prev, all non-tombstone nodes have a valid - /// Prev. - bool isValid() const { return Prev != INVALID; } - }; - - typedef typename KeyFunctorT::argument_type KeyT; - typedef SmallVector DenseT; - DenseT Dense; - SparseT *Sparse; - unsigned Universe; - KeyFunctorT KeyIndexOf; - SparseSetValFunctor ValIndexOf; - - /// We have a built-in recycler for reusing tombstone slots. This recycler - /// puts a singly-linked free list into tombstone slots, allowing us quick - /// erasure, iterator preservation, and dense size. - unsigned FreelistIdx; - unsigned NumFree; - - unsigned sparseIndex(const ValueT &Val) const { - assert(ValIndexOf(Val) < Universe && - "Invalid key in set. Did object mutate?"); - return ValIndexOf(Val); - } - unsigned sparseIndex(const SMSNode &N) const { return sparseIndex(N.Data); } - - // Disable copy construction and assignment. - // This data structure is not meant to be used that way. - SparseMultiSet(const SparseMultiSet&) = delete; - SparseMultiSet &operator=(const SparseMultiSet&) = delete; - - /// Whether the given entry is the head of the list. List heads's previous - /// pointers are to the tail of the list, allowing for efficient access to the - /// list tail. D must be a valid entry node. - bool isHead(const SMSNode &D) const { - assert(D.isValid() && "Invalid node for head"); - return Dense[D.Prev].isTail(); - } - - /// Whether the given entry is a singleton entry, i.e. the only entry with - /// that key. - bool isSingleton(const SMSNode &N) const { - assert(N.isValid() && "Invalid node for singleton"); - // Is N its own predecessor? - return &Dense[N.Prev] == &N; - } - - /// Add in the given SMSNode. Uses a free entry in our freelist if - /// available. Returns the index of the added node. - unsigned addValue(const ValueT& V, unsigned Prev, unsigned Next) { - if (NumFree == 0) { - Dense.push_back(SMSNode(V, Prev, Next)); - return Dense.size() - 1; - } - - // Peel off a free slot - unsigned Idx = FreelistIdx; - unsigned NextFree = Dense[Idx].Next; - assert(Dense[Idx].isTombstone() && "Non-tombstone free?"); - - Dense[Idx] = SMSNode(V, Prev, Next); - FreelistIdx = NextFree; - --NumFree; - return Idx; - } - - /// Make the current index a new tombstone. Pushes it onto the freelist. - void makeTombstone(unsigned Idx) { - Dense[Idx].Prev = SMSNode::INVALID; - Dense[Idx].Next = FreelistIdx; - FreelistIdx = Idx; - ++NumFree; - } - -public: - typedef ValueT value_type; - typedef ValueT &reference; - typedef const ValueT &const_reference; - typedef ValueT *pointer; - typedef const ValueT *const_pointer; - typedef unsigned size_type; - - SparseMultiSet() - : Sparse(nullptr), Universe(0), FreelistIdx(SMSNode::INVALID), NumFree(0) {} - - ~SparseMultiSet() { free(Sparse); } - - /// Set the universe size which determines the largest key the set can hold. - /// The universe must be sized before any elements can be added. - /// - /// @param U Universe size. All object keys must be less than U. - /// - void setUniverse(unsigned U) { - // It's not hard to resize the universe on a non-empty set, but it doesn't - // seem like a likely use case, so we can add that code when we need it. - assert(empty() && "Can only resize universe on an empty map"); - // Hysteresis prevents needless reallocations. - if (U >= Universe/4 && U <= Universe) - return; - free(Sparse); - // The Sparse array doesn't actually need to be initialized, so malloc - // would be enough here, but that will cause tools like valgrind to - // complain about branching on uninitialized data. - Sparse = reinterpret_cast(calloc(U, sizeof(SparseT))); - Universe = U; - } - - /// Our iterators are iterators over the collection of objects that share a - /// key. - template - class iterator_base : public std::iterator { - friend class SparseMultiSet; - SMSPtrTy SMS; - unsigned Idx; - unsigned SparseIdx; - - iterator_base(SMSPtrTy P, unsigned I, unsigned SI) - : SMS(P), Idx(I), SparseIdx(SI) { } - - /// Whether our iterator has fallen outside our dense vector. - bool isEnd() const { - if (Idx == SMSNode::INVALID) - return true; - - assert(Idx < SMS->Dense.size() && "Out of range, non-INVALID Idx?"); - return false; - } - - /// Whether our iterator is properly keyed, i.e. the SparseIdx is valid - bool isKeyed() const { return SparseIdx < SMS->Universe; } - - unsigned Prev() const { return SMS->Dense[Idx].Prev; } - unsigned Next() const { return SMS->Dense[Idx].Next; } - - void setPrev(unsigned P) { SMS->Dense[Idx].Prev = P; } - void setNext(unsigned N) { SMS->Dense[Idx].Next = N; } - - public: - typedef std::iterator super; - typedef typename super::value_type value_type; - typedef typename super::difference_type difference_type; - typedef typename super::pointer pointer; - typedef typename super::reference reference; - - reference operator*() const { - assert(isKeyed() && SMS->sparseIndex(SMS->Dense[Idx].Data) == SparseIdx && - "Dereferencing iterator of invalid key or index"); - - return SMS->Dense[Idx].Data; - } - pointer operator->() const { return &operator*(); } - - /// Comparison operators - bool operator==(const iterator_base &RHS) const { - // end compares equal - if (SMS == RHS.SMS && Idx == RHS.Idx) { - assert((isEnd() || SparseIdx == RHS.SparseIdx) && - "Same dense entry, but different keys?"); - return true; - } - - return false; - } - - bool operator!=(const iterator_base &RHS) const { - return !operator==(RHS); - } - - /// Increment and decrement operators - iterator_base &operator--() { // predecrement - Back up - assert(isKeyed() && "Decrementing an invalid iterator"); - assert((isEnd() || !SMS->isHead(SMS->Dense[Idx])) && - "Decrementing head of list"); - - // If we're at the end, then issue a new find() - if (isEnd()) - Idx = SMS->findIndex(SparseIdx).Prev(); - else - Idx = Prev(); - - return *this; - } - iterator_base &operator++() { // preincrement - Advance - assert(!isEnd() && isKeyed() && "Incrementing an invalid/end iterator"); - Idx = Next(); - return *this; - } - iterator_base operator--(int) { // postdecrement - iterator_base I(*this); - --*this; - return I; - } - iterator_base operator++(int) { // postincrement - iterator_base I(*this); - ++*this; - return I; - } - }; - typedef iterator_base iterator; - typedef iterator_base const_iterator; - - // Convenience types - typedef std::pair RangePair; - - /// Returns an iterator past this container. Note that such an iterator cannot - /// be decremented, but will compare equal to other end iterators. - iterator end() { return iterator(this, SMSNode::INVALID, SMSNode::INVALID); } - const_iterator end() const { - return const_iterator(this, SMSNode::INVALID, SMSNode::INVALID); - } - - /// Returns true if the set is empty. - /// - /// This is not the same as BitVector::empty(). - /// - bool empty() const { return size() == 0; } - - /// Returns the number of elements in the set. - /// - /// This is not the same as BitVector::size() which returns the size of the - /// universe. - /// - size_type size() const { - assert(NumFree <= Dense.size() && "Out-of-bounds free entries"); - return Dense.size() - NumFree; - } - - /// Clears the set. This is a very fast constant time operation. - /// - void clear() { - // Sparse does not need to be cleared, see find(). - Dense.clear(); - NumFree = 0; - FreelistIdx = SMSNode::INVALID; - } - - /// Find an element by its index. - /// - /// @param Idx A valid index to find. - /// @returns An iterator to the element identified by key, or end(). - /// - iterator findIndex(unsigned Idx) { - assert(Idx < Universe && "Key out of range"); - const unsigned Stride = std::numeric_limits::max() + 1u; - for (unsigned i = Sparse[Idx], e = Dense.size(); i < e; i += Stride) { - const unsigned FoundIdx = sparseIndex(Dense[i]); - // Check that we're pointing at the correct entry and that it is the head - // of a valid list. - if (Idx == FoundIdx && Dense[i].isValid() && isHead(Dense[i])) - return iterator(this, i, Idx); - // Stride is 0 when SparseT >= unsigned. We don't need to loop. - if (!Stride) - break; - } - return end(); - } - - /// Find an element by its key. - /// - /// @param Key A valid key to find. - /// @returns An iterator to the element identified by key, or end(). - /// - iterator find(const KeyT &Key) { - return findIndex(KeyIndexOf(Key)); - } - - const_iterator find(const KeyT &Key) const { - iterator I = const_cast(this)->findIndex(KeyIndexOf(Key)); - return const_iterator(I.SMS, I.Idx, KeyIndexOf(Key)); - } - - /// Returns the number of elements identified by Key. This will be linear in - /// the number of elements of that key. - size_type count(const KeyT &Key) const { - unsigned Ret = 0; - for (const_iterator It = find(Key); It != end(); ++It) - ++Ret; - - return Ret; - } - - /// Returns true if this set contains an element identified by Key. - bool contains(const KeyT &Key) const { - return find(Key) != end(); - } - - /// Return the head and tail of the subset's list, otherwise returns end(). - iterator getHead(const KeyT &Key) { return find(Key); } - iterator getTail(const KeyT &Key) { - iterator I = find(Key); - if (I != end()) - I = iterator(this, I.Prev(), KeyIndexOf(Key)); - return I; - } - - /// The bounds of the range of items sharing Key K. First member is the head - /// of the list, and the second member is a decrementable end iterator for - /// that key. - RangePair equal_range(const KeyT &K) { - iterator B = find(K); - iterator E = iterator(this, SMSNode::INVALID, B.SparseIdx); - return make_pair(B, E); - } - - /// Insert a new element at the tail of the subset list. Returns an iterator - /// to the newly added entry. - iterator insert(const ValueT &Val) { - unsigned Idx = sparseIndex(Val); - iterator I = findIndex(Idx); - - unsigned NodeIdx = addValue(Val, SMSNode::INVALID, SMSNode::INVALID); - - if (I == end()) { - // Make a singleton list - Sparse[Idx] = NodeIdx; - Dense[NodeIdx].Prev = NodeIdx; - return iterator(this, NodeIdx, Idx); - } - - // Stick it at the end. - unsigned HeadIdx = I.Idx; - unsigned TailIdx = I.Prev(); - Dense[TailIdx].Next = NodeIdx; - Dense[HeadIdx].Prev = NodeIdx; - Dense[NodeIdx].Prev = TailIdx; - - return iterator(this, NodeIdx, Idx); - } - - /// Erases an existing element identified by a valid iterator. - /// - /// This invalidates iterators pointing at the same entry, but erase() returns - /// an iterator pointing to the next element in the subset's list. This makes - /// it possible to erase selected elements while iterating over the subset: - /// - /// tie(I, E) = Set.equal_range(Key); - /// while (I != E) - /// if (test(*I)) - /// I = Set.erase(I); - /// else - /// ++I; - /// - /// Note that if the last element in the subset list is erased, this will - /// return an end iterator which can be decremented to get the new tail (if it - /// exists): - /// - /// tie(B, I) = Set.equal_range(Key); - /// for (bool isBegin = B == I; !isBegin; /* empty */) { - /// isBegin = (--I) == B; - /// if (test(I)) - /// break; - /// I = erase(I); - /// } - iterator erase(iterator I) { - assert(I.isKeyed() && !I.isEnd() && !Dense[I.Idx].isTombstone() && - "erasing invalid/end/tombstone iterator"); - - // First, unlink the node from its list. Then swap the node out with the - // dense vector's last entry - iterator NextI = unlink(Dense[I.Idx]); - - // Put in a tombstone. - makeTombstone(I.Idx); - - return NextI; - } - - /// Erase all elements with the given key. This invalidates all - /// iterators of that key. - void eraseAll(const KeyT &K) { - for (iterator I = find(K); I != end(); /* empty */) - I = erase(I); - } - -private: - /// Unlink the node from its list. Returns the next node in the list. - iterator unlink(const SMSNode &N) { - if (isSingleton(N)) { - // Singleton is already unlinked - assert(N.Next == SMSNode::INVALID && "Singleton has next?"); - return iterator(this, SMSNode::INVALID, ValIndexOf(N.Data)); - } - - if (isHead(N)) { - // If we're the head, then update the sparse array and our next. - Sparse[sparseIndex(N)] = N.Next; - Dense[N.Next].Prev = N.Prev; - return iterator(this, N.Next, ValIndexOf(N.Data)); - } - - if (N.isTail()) { - // If we're the tail, then update our head and our previous. - findIndex(sparseIndex(N)).setPrev(N.Prev); - Dense[N.Prev].Next = N.Next; - - // Give back an end iterator that can be decremented - iterator I(this, N.Prev, ValIndexOf(N.Data)); - return ++I; - } - - // Otherwise, just drop us - Dense[N.Next].Prev = N.Prev; - Dense[N.Prev].Next = N.Next; - return iterator(this, N.Next, ValIndexOf(N.Data)); - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/SparseSet.h b/llvm/include/llvm/ADT/SparseSet.h deleted file mode 100644 index 5b6494d1..00000000 --- a/llvm/include/llvm/ADT/SparseSet.h +++ /dev/null @@ -1,316 +0,0 @@ -//===--- llvm/ADT/SparseSet.h - Sparse set ----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the SparseSet class derived from the version described in -// Briggs, Torczon, "An efficient representation for sparse sets", ACM Letters -// on Programming Languages and Systems, Volume 2 Issue 1-4, March-Dec. 1993. -// -// A sparse set holds a small number of objects identified by integer keys from -// a moderately sized universe. The sparse set uses more memory than other -// containers in order to provide faster operations. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_SPARSESET_H -#define LLVM_ADT_SPARSESET_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -/// SparseSetValTraits - Objects in a SparseSet are identified by keys that can -/// be uniquely converted to a small integer less than the set's universe. This -/// class allows the set to hold values that differ from the set's key type as -/// long as an index can still be derived from the value. SparseSet never -/// directly compares ValueT, only their indices, so it can map keys to -/// arbitrary values. SparseSetValTraits computes the index from the value -/// object. To compute the index from a key, SparseSet uses a separate -/// KeyFunctorT template argument. -/// -/// A simple type declaration, SparseSet, handles these cases: -/// - unsigned key, identity index, identity value -/// - unsigned key, identity index, fat value providing getSparseSetIndex() -/// -/// The type declaration SparseSet handles: -/// - unsigned key, remapped index, identity value (virtual registers) -/// - pointer key, pointer-derived index, identity value (node+ID) -/// - pointer key, pointer-derived index, fat value with getSparseSetIndex() -/// -/// Only other, unexpected cases require specializing SparseSetValTraits. -/// -/// For best results, ValueT should not require a destructor. -/// -template -struct SparseSetValTraits { - static unsigned getValIndex(const ValueT &Val) { - return Val.getSparseSetIndex(); - } -}; - -/// SparseSetValFunctor - Helper class for selecting SparseSetValTraits. The -/// generic implementation handles ValueT classes which either provide -/// getSparseSetIndex() or specialize SparseSetValTraits<>. -/// -template -struct SparseSetValFunctor { - unsigned operator()(const ValueT &Val) const { - return SparseSetValTraits::getValIndex(Val); - } -}; - -/// SparseSetValFunctor - Helper class for the common case of -/// identity key/value sets. -template -struct SparseSetValFunctor { - unsigned operator()(const KeyT &Key) const { - return KeyFunctorT()(Key); - } -}; - -/// SparseSet - Fast set implmentation for objects that can be identified by -/// small unsigned keys. -/// -/// SparseSet allocates memory proportional to the size of the key universe, so -/// it is not recommended for building composite data structures. It is useful -/// for algorithms that require a single set with fast operations. -/// -/// Compared to DenseSet and DenseMap, SparseSet provides constant-time fast -/// clear() and iteration as fast as a vector. The find(), insert(), and -/// erase() operations are all constant time, and typically faster than a hash -/// table. The iteration order doesn't depend on numerical key values, it only -/// depends on the order of insert() and erase() operations. When no elements -/// have been erased, the iteration order is the insertion order. -/// -/// Compared to BitVector, SparseSet uses 8x-40x more memory, but -/// offers constant-time clear() and size() operations as well as fast -/// iteration independent on the size of the universe. -/// -/// SparseSet contains a dense vector holding all the objects and a sparse -/// array holding indexes into the dense vector. Most of the memory is used by -/// the sparse array which is the size of the key universe. The SparseT -/// template parameter provides a space/speed tradeoff for sets holding many -/// elements. -/// -/// When SparseT is uint32_t, find() only touches 2 cache lines, but the sparse -/// array uses 4 x Universe bytes. -/// -/// When SparseT is uint8_t (the default), find() touches up to 2+[N/256] cache -/// lines, but the sparse array is 4x smaller. N is the number of elements in -/// the set. -/// -/// For sets that may grow to thousands of elements, SparseT should be set to -/// uint16_t or uint32_t. -/// -/// @tparam ValueT The type of objects in the set. -/// @tparam KeyFunctorT A functor that computes an unsigned index from KeyT. -/// @tparam SparseT An unsigned integer type. See above. -/// -template, - typename SparseT = uint8_t> -class SparseSet { - static_assert(std::numeric_limits::is_integer && - !std::numeric_limits::is_signed, - "SparseT must be an unsigned integer type"); - - typedef typename KeyFunctorT::argument_type KeyT; - typedef SmallVector DenseT; - typedef unsigned size_type; - DenseT Dense; - SparseT *Sparse; - unsigned Universe; - KeyFunctorT KeyIndexOf; - SparseSetValFunctor ValIndexOf; - - // Disable copy construction and assignment. - // This data structure is not meant to be used that way. - SparseSet(const SparseSet&) = delete; - SparseSet &operator=(const SparseSet&) = delete; - -public: - typedef ValueT value_type; - typedef ValueT &reference; - typedef const ValueT &const_reference; - typedef ValueT *pointer; - typedef const ValueT *const_pointer; - - SparseSet() : Sparse(nullptr), Universe(0) {} - ~SparseSet() { free(Sparse); } - - /// setUniverse - Set the universe size which determines the largest key the - /// set can hold. The universe must be sized before any elements can be - /// added. - /// - /// @param U Universe size. All object keys must be less than U. - /// - void setUniverse(unsigned U) { - // It's not hard to resize the universe on a non-empty set, but it doesn't - // seem like a likely use case, so we can add that code when we need it. - assert(empty() && "Can only resize universe on an empty map"); - // Hysteresis prevents needless reallocations. - if (U >= Universe/4 && U <= Universe) - return; - free(Sparse); - // The Sparse array doesn't actually need to be initialized, so malloc - // would be enough here, but that will cause tools like valgrind to - // complain about branching on uninitialized data. - Sparse = reinterpret_cast(calloc(U, sizeof(SparseT))); - Universe = U; - } - - // Import trivial vector stuff from DenseT. - typedef typename DenseT::iterator iterator; - typedef typename DenseT::const_iterator const_iterator; - - const_iterator begin() const { return Dense.begin(); } - const_iterator end() const { return Dense.end(); } - iterator begin() { return Dense.begin(); } - iterator end() { return Dense.end(); } - - /// empty - Returns true if the set is empty. - /// - /// This is not the same as BitVector::empty(). - /// - bool empty() const { return Dense.empty(); } - - /// size - Returns the number of elements in the set. - /// - /// This is not the same as BitVector::size() which returns the size of the - /// universe. - /// - size_type size() const { return Dense.size(); } - - /// clear - Clears the set. This is a very fast constant time operation. - /// - void clear() { - // Sparse does not need to be cleared, see find(). - Dense.clear(); - } - - /// findIndex - Find an element by its index. - /// - /// @param Idx A valid index to find. - /// @returns An iterator to the element identified by key, or end(). - /// - iterator findIndex(unsigned Idx) { - assert(Idx < Universe && "Key out of range"); - const unsigned Stride = std::numeric_limits::max() + 1u; - for (unsigned i = Sparse[Idx], e = size(); i < e; i += Stride) { - const unsigned FoundIdx = ValIndexOf(Dense[i]); - assert(FoundIdx < Universe && "Invalid key in set. Did object mutate?"); - if (Idx == FoundIdx) - return begin() + i; - // Stride is 0 when SparseT >= unsigned. We don't need to loop. - if (!Stride) - break; - } - return end(); - } - - /// find - Find an element by its key. - /// - /// @param Key A valid key to find. - /// @returns An iterator to the element identified by key, or end(). - /// - iterator find(const KeyT &Key) { - return findIndex(KeyIndexOf(Key)); - } - - const_iterator find(const KeyT &Key) const { - return const_cast(this)->findIndex(KeyIndexOf(Key)); - } - - /// count - Returns 1 if this set contains an element identified by Key, - /// 0 otherwise. - /// - size_type count(const KeyT &Key) const { - return find(Key) == end() ? 0 : 1; - } - - /// insert - Attempts to insert a new element. - /// - /// If Val is successfully inserted, return (I, true), where I is an iterator - /// pointing to the newly inserted element. - /// - /// If the set already contains an element with the same key as Val, return - /// (I, false), where I is an iterator pointing to the existing element. - /// - /// Insertion invalidates all iterators. - /// - std::pair insert(const ValueT &Val) { - unsigned Idx = ValIndexOf(Val); - iterator I = findIndex(Idx); - if (I != end()) - return std::make_pair(I, false); - Sparse[Idx] = size(); - Dense.push_back(Val); - return std::make_pair(end() - 1, true); - } - - /// array subscript - If an element already exists with this key, return it. - /// Otherwise, automatically construct a new value from Key, insert it, - /// and return the newly inserted element. - ValueT &operator[](const KeyT &Key) { - return *insert(ValueT(Key)).first; - } - - ValueT pop_back_val() { - // Sparse does not need to be cleared, see find(). - return Dense.pop_back_val(); - } - - /// erase - Erases an existing element identified by a valid iterator. - /// - /// This invalidates all iterators, but erase() returns an iterator pointing - /// to the next element. This makes it possible to erase selected elements - /// while iterating over the set: - /// - /// for (SparseSet::iterator I = Set.begin(); I != Set.end();) - /// if (test(*I)) - /// I = Set.erase(I); - /// else - /// ++I; - /// - /// Note that end() changes when elements are erased, unlike std::list. - /// - iterator erase(iterator I) { - assert(unsigned(I - begin()) < size() && "Invalid iterator"); - if (I != end() - 1) { - *I = Dense.back(); - unsigned BackIdx = ValIndexOf(Dense.back()); - assert(BackIdx < Universe && "Invalid key in set. Did object mutate?"); - Sparse[BackIdx] = I - begin(); - } - // This depends on SmallVector::pop_back() not invalidating iterators. - // std::vector::pop_back() doesn't give that guarantee. - Dense.pop_back(); - return I; - } - - /// erase - Erases an element identified by Key, if it exists. - /// - /// @param Key The key identifying the element to erase. - /// @returns True when an element was erased, false if no element was found. - /// - bool erase(const KeyT &Key) { - iterator I = find(Key); - if (I == end()) - return false; - erase(I); - return true; - } - -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/Statistic.h b/llvm/include/llvm/ADT/Statistic.h deleted file mode 100644 index 32175fdc..00000000 --- a/llvm/include/llvm/ADT/Statistic.h +++ /dev/null @@ -1,171 +0,0 @@ -//===-- llvm/ADT/Statistic.h - Easy way to expose stats ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the 'Statistic' class, which is designed to be an easy way -// to expose various metrics from passes. These statistics are printed at the -// end of a run (from llvm_shutdown), when the -stats command line option is -// passed on the command line. -// -// This is useful for reporting information like the number of instructions -// simplified, optimized or removed by various transformations, like this: -// -// static Statistic NumInstsKilled("gcse", "Number of instructions killed"); -// -// Later, in the code: ++NumInstsKilled; -// -// NOTE: Statistics *must* be declared as global variables. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_STATISTIC_H -#define LLVM_ADT_STATISTIC_H - -#include "llvm/Support/Atomic.h" -#include "llvm/Support/Compiler.h" -#include -#include - -namespace llvm { -class raw_ostream; -class raw_fd_ostream; - -class Statistic { -public: - const char *DebugType; - const char *Name; - const char *Desc; - std::atomic Value; - bool Initialized; - - unsigned getValue() const { return Value.load(std::memory_order_relaxed); } - const char *getDebugType() const { return DebugType; } - const char *getName() const { return Name; } - const char *getDesc() const { return Desc; } - - /// construct - This should only be called for non-global statistics. - void construct(const char *debugtype, const char *name, const char *desc) { - DebugType = debugtype; - Name = name; - Desc = desc; - Value = 0; - Initialized = false; - } - - // Allow use of this class as the value itself. - operator unsigned() const { return getValue(); } - -#if !defined(NDEBUG) || defined(LLVM_ENABLE_STATS) - const Statistic &operator=(unsigned Val) { - Value.store(Val, std::memory_order_relaxed); - return init(); - } - - const Statistic &operator++() { - Value.fetch_add(1, std::memory_order_relaxed); - return init(); - } - - unsigned operator++(int) { - init(); - return Value.fetch_add(1, std::memory_order_relaxed); - } - - const Statistic &operator--() { - Value.fetch_sub(1, std::memory_order_relaxed); - return init(); - } - - unsigned operator--(int) { - init(); - return Value.fetch_sub(1, std::memory_order_relaxed); - } - - const Statistic &operator+=(unsigned V) { - if (V == 0) - return *this; - Value.fetch_add(V, std::memory_order_relaxed); - return init(); - } - - const Statistic &operator-=(unsigned V) { - if (V == 0) - return *this; - Value.fetch_sub(V, std::memory_order_relaxed); - return init(); - } - -#else // Statistics are disabled in release builds. - - const Statistic &operator=(unsigned Val) { - return *this; - } - - const Statistic &operator++() { - return *this; - } - - unsigned operator++(int) { - return 0; - } - - const Statistic &operator--() { - return *this; - } - - unsigned operator--(int) { - return 0; - } - - const Statistic &operator+=(const unsigned &V) { - return *this; - } - - const Statistic &operator-=(const unsigned &V) { - return *this; - } - -#endif // !defined(NDEBUG) || defined(LLVM_ENABLE_STATS) - -protected: - Statistic &init() { - bool tmp = Initialized; - sys::MemoryFence(); - if (!tmp) RegisterStatistic(); - TsanHappensAfter(this); - return *this; - } - void RegisterStatistic(); -}; - -// STATISTIC - A macro to make definition of statistics really simple. This -// automatically passes the DEBUG_TYPE of the file into the statistic. -#define STATISTIC(VARNAME, DESC) \ - static llvm::Statistic VARNAME = {DEBUG_TYPE, #VARNAME, DESC, {0}, 0} - -/// \brief Enable the collection and printing of statistics. -void EnableStatistics(); - -/// \brief Check if statistics are enabled. -bool AreStatisticsEnabled(); - -/// \brief Return a file stream to print our output on. -std::unique_ptr CreateInfoOutputFile(); - -/// \brief Print statistics to the file returned by CreateInfoOutputFile(). -void PrintStatistics(); - -/// \brief Print statistics to the given output stream. -void PrintStatistics(raw_ostream &OS); - -/// Print statistics in JSON format. -void PrintStatisticsJSON(raw_ostream &OS); - -} // end llvm namespace - -#endif // LLVM_ADT_STATISTIC_H diff --git a/llvm/include/llvm/ADT/StringExtras.h b/llvm/include/llvm/ADT/StringExtras.h deleted file mode 100644 index bdbb4d3f..00000000 --- a/llvm/include/llvm/ADT/StringExtras.h +++ /dev/null @@ -1,197 +0,0 @@ -//===-- llvm/ADT/StringExtras.h - Useful string functions -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains some functions that are useful when dealing with strings. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_STRINGEXTRAS_H -#define LLVM_ADT_STRINGEXTRAS_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { -template class SmallVectorImpl; - -/// hexdigit - Return the hexadecimal character for the -/// given number \p X (which should be less than 16). -static inline char hexdigit(unsigned X, bool LowerCase = false) { - const char HexChar = LowerCase ? 'a' : 'A'; - return X < 10 ? '0' + X : HexChar + X - 10; -} - -/// Construct a string ref from a boolean. -static inline StringRef toStringRef(bool B) { - return StringRef(B ? "true" : "false"); -} - -/// Interpret the given character \p C as a hexadecimal digit and return its -/// value. -/// -/// If \p C is not a valid hex digit, -1U is returned. -static inline unsigned hexDigitValue(char C) { - if (C >= '0' && C <= '9') return C-'0'; - if (C >= 'a' && C <= 'f') return C-'a'+10U; - if (C >= 'A' && C <= 'F') return C-'A'+10U; - return -1U; -} - -static inline std::string utohexstr(uint64_t X, bool LowerCase = false) { - char Buffer[17]; - char *BufPtr = std::end(Buffer); - - if (X == 0) *--BufPtr = '0'; - - while (X) { - unsigned char Mod = static_cast(X) & 15; - *--BufPtr = hexdigit(Mod, LowerCase); - X >>= 4; - } - - return std::string(BufPtr, std::end(Buffer)); -} - -/// Convert buffer \p Input to its hexadecimal representation. -/// The returned string is double the size of \p Input. -static inline std::string toHex(StringRef Input) { - static const char *const LUT = "0123456789ABCDEF"; - size_t Length = Input.size(); - - std::string Output; - Output.reserve(2 * Length); - for (size_t i = 0; i < Length; ++i) { - const unsigned char c = Input[i]; - Output.push_back(LUT[c >> 4]); - Output.push_back(LUT[c & 15]); - } - return Output; -} - -static inline std::string utostr(uint64_t X, bool isNeg = false) { - char Buffer[21]; - char *BufPtr = std::end(Buffer); - - if (X == 0) *--BufPtr = '0'; // Handle special case... - - while (X) { - *--BufPtr = '0' + char(X % 10); - X /= 10; - } - - if (isNeg) *--BufPtr = '-'; // Add negative sign... - return std::string(BufPtr, std::end(Buffer)); -} - - -static inline std::string itostr(int64_t X) { - if (X < 0) - return utostr(static_cast(-X), true); - else - return utostr(static_cast(X)); -} - -/// StrInStrNoCase - Portable version of strcasestr. Locates the first -/// occurrence of string 's1' in string 's2', ignoring case. Returns -/// the offset of s2 in s1 or npos if s2 cannot be found. -StringRef::size_type StrInStrNoCase(StringRef s1, StringRef s2); - -/// getToken - This function extracts one token from source, ignoring any -/// leading characters that appear in the Delimiters string, and ending the -/// token at any of the characters that appear in the Delimiters string. If -/// there are no tokens in the source string, an empty string is returned. -/// The function returns a pair containing the extracted token and the -/// remaining tail string. -std::pair getToken(StringRef Source, - StringRef Delimiters = " \t\n\v\f\r"); - -/// SplitString - Split up the specified string according to the specified -/// delimiters, appending the result fragments to the output list. -void SplitString(StringRef Source, - SmallVectorImpl &OutFragments, - StringRef Delimiters = " \t\n\v\f\r"); - -/// HashString - Hash function for strings. -/// -/// This is the Bernstein hash function. -// -// FIXME: Investigate whether a modified bernstein hash function performs -// better: http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx -// X*33+c -> X*33^c -static inline unsigned HashString(StringRef Str, unsigned Result = 0) { - for (StringRef::size_type i = 0, e = Str.size(); i != e; ++i) - Result = Result * 33 + (unsigned char)Str[i]; - return Result; -} - -/// Returns the English suffix for an ordinal integer (-st, -nd, -rd, -th). -static inline StringRef getOrdinalSuffix(unsigned Val) { - // It is critically important that we do this perfectly for - // user-written sequences with over 100 elements. - switch (Val % 100) { - case 11: - case 12: - case 13: - return "th"; - default: - switch (Val % 10) { - case 1: return "st"; - case 2: return "nd"; - case 3: return "rd"; - default: return "th"; - } - } -} - -template -inline std::string join_impl(IteratorT Begin, IteratorT End, - StringRef Separator, std::input_iterator_tag) { - std::string S; - if (Begin == End) - return S; - - S += (*Begin); - while (++Begin != End) { - S += Separator; - S += (*Begin); - } - return S; -} - -template -inline std::string join_impl(IteratorT Begin, IteratorT End, - StringRef Separator, std::forward_iterator_tag) { - std::string S; - if (Begin == End) - return S; - - size_t Len = (std::distance(Begin, End) - 1) * Separator.size(); - for (IteratorT I = Begin; I != End; ++I) - Len += (*Begin).size(); - S.reserve(Len); - S += (*Begin); - while (++Begin != End) { - S += Separator; - S += (*Begin); - } - return S; -} - -/// Joins the strings in the range [Begin, End), adding Separator between -/// the elements. -template -inline std::string join(IteratorT Begin, IteratorT End, StringRef Separator) { - typedef typename std::iterator_traits::iterator_category tag; - return join_impl(Begin, End, Separator, tag()); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/StringMap.h b/llvm/include/llvm/ADT/StringMap.h deleted file mode 100644 index 26027529..00000000 --- a/llvm/include/llvm/ADT/StringMap.h +++ /dev/null @@ -1,505 +0,0 @@ -//===--- StringMap.h - String Hash table map interface ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the StringMap class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_STRINGMAP_H -#define LLVM_ADT_STRINGMAP_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include -#include - -namespace llvm { - template - class StringMapConstIterator; - template - class StringMapIterator; - template - class StringMapEntry; - -/// StringMapEntryBase - Shared base class of StringMapEntry instances. -class StringMapEntryBase { - unsigned StrLen; - -public: - explicit StringMapEntryBase(unsigned Len) : StrLen(Len) {} - - unsigned getKeyLength() const { return StrLen; } -}; - -/// StringMapImpl - This is the base class of StringMap that is shared among -/// all of its instantiations. -class StringMapImpl { -protected: - // Array of NumBuckets pointers to entries, null pointers are holes. - // TheTable[NumBuckets] contains a sentinel value for easy iteration. Followed - // by an array of the actual hash values as unsigned integers. - StringMapEntryBase **TheTable; - unsigned NumBuckets; - unsigned NumItems; - unsigned NumTombstones; - unsigned ItemSize; - -protected: - explicit StringMapImpl(unsigned itemSize) - : TheTable(nullptr), - // Initialize the map with zero buckets to allocation. - NumBuckets(0), NumItems(0), NumTombstones(0), ItemSize(itemSize) {} - StringMapImpl(StringMapImpl &&RHS) - : TheTable(RHS.TheTable), NumBuckets(RHS.NumBuckets), - NumItems(RHS.NumItems), NumTombstones(RHS.NumTombstones), - ItemSize(RHS.ItemSize) { - RHS.TheTable = nullptr; - RHS.NumBuckets = 0; - RHS.NumItems = 0; - RHS.NumTombstones = 0; - } - - StringMapImpl(unsigned InitSize, unsigned ItemSize); - unsigned RehashTable(unsigned BucketNo = 0); - - /// LookupBucketFor - Look up the bucket that the specified string should end - /// up in. If it already exists as a key in the map, the Item pointer for the - /// specified bucket will be non-null. Otherwise, it will be null. In either - /// case, the FullHashValue field of the bucket will be set to the hash value - /// of the string. - unsigned LookupBucketFor(StringRef Key); - - /// FindKey - Look up the bucket that contains the specified key. If it exists - /// in the map, return the bucket number of the key. Otherwise return -1. - /// This does not modify the map. - int FindKey(StringRef Key) const; - - /// RemoveKey - Remove the specified StringMapEntry from the table, but do not - /// delete it. This aborts if the value isn't in the table. - void RemoveKey(StringMapEntryBase *V); - - /// RemoveKey - Remove the StringMapEntry for the specified key from the - /// table, returning it. If the key is not in the table, this returns null. - StringMapEntryBase *RemoveKey(StringRef Key); - - /// Allocate the table with the specified number of buckets and otherwise - /// setup the map as empty. - void init(unsigned Size); - -public: - static StringMapEntryBase *getTombstoneVal() { - uintptr_t Val = static_cast(-1); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; - return reinterpret_cast(Val); - } - - unsigned getNumBuckets() const { return NumBuckets; } - unsigned getNumItems() const { return NumItems; } - - bool empty() const { return NumItems == 0; } - unsigned size() const { return NumItems; } - - void swap(StringMapImpl &Other) { - std::swap(TheTable, Other.TheTable); - std::swap(NumBuckets, Other.NumBuckets); - std::swap(NumItems, Other.NumItems); - std::swap(NumTombstones, Other.NumTombstones); - } -}; - -/// StringMapEntry - This is used to represent one value that is inserted into -/// a StringMap. It contains the Value itself and the key: the string length -/// and data. -template -class StringMapEntry : public StringMapEntryBase { - StringMapEntry(StringMapEntry &E) = delete; - -public: - ValueTy second; - - explicit StringMapEntry(unsigned strLen) - : StringMapEntryBase(strLen), second() {} - template - StringMapEntry(unsigned strLen, InitTy &&... InitVals) - : StringMapEntryBase(strLen), second(std::forward(InitVals)...) {} - - StringRef getKey() const { - return StringRef(getKeyData(), getKeyLength()); - } - - const ValueTy &getValue() const { return second; } - ValueTy &getValue() { return second; } - - void setValue(const ValueTy &V) { second = V; } - - /// getKeyData - Return the start of the string data that is the key for this - /// value. The string data is always stored immediately after the - /// StringMapEntry object. - const char *getKeyData() const {return reinterpret_cast(this+1);} - - StringRef first() const { return StringRef(getKeyData(), getKeyLength()); } - - /// Create a StringMapEntry for the specified key construct the value using - /// \p InitiVals. - template - static StringMapEntry *Create(StringRef Key, AllocatorTy &Allocator, - InitTy &&... InitVals) { - unsigned KeyLength = Key.size(); - - // Allocate a new item with space for the string at the end and a null - // terminator. - unsigned AllocSize = static_cast(sizeof(StringMapEntry))+ - KeyLength+1; - unsigned Alignment = alignOf(); - - StringMapEntry *NewItem = - static_cast(Allocator.Allocate(AllocSize,Alignment)); - - // Construct the value. - new (NewItem) StringMapEntry(KeyLength, std::forward(InitVals)...); - - // Copy the string information. - char *StrBuffer = const_cast(NewItem->getKeyData()); - if (KeyLength > 0) - memcpy(StrBuffer, Key.data(), KeyLength); - StrBuffer[KeyLength] = 0; // Null terminate for convenience of clients. - return NewItem; - } - - /// Create - Create a StringMapEntry with normal malloc/free. - template - static StringMapEntry *Create(StringRef Key, InitType &&... InitVal) { - MallocAllocator A; - return Create(Key, A, std::forward(InitVal)...); - } - - static StringMapEntry *Create(StringRef Key) { - return Create(Key, ValueTy()); - } - - /// GetStringMapEntryFromKeyData - Given key data that is known to be embedded - /// into a StringMapEntry, return the StringMapEntry itself. - static StringMapEntry &GetStringMapEntryFromKeyData(const char *KeyData) { - char *Ptr = const_cast(KeyData) - sizeof(StringMapEntry); - return *reinterpret_cast(Ptr); - } - - /// Destroy - Destroy this StringMapEntry, releasing memory back to the - /// specified allocator. - template - void Destroy(AllocatorTy &Allocator) { - // Free memory referenced by the item. - unsigned AllocSize = - static_cast(sizeof(StringMapEntry)) + getKeyLength() + 1; - this->~StringMapEntry(); - Allocator.Deallocate(static_cast(this), AllocSize); - } - - /// Destroy this object, releasing memory back to the malloc allocator. - void Destroy() { - MallocAllocator A; - Destroy(A); - } -}; - -/// StringMap - This is an unconventional map that is specialized for handling -/// keys that are "strings", which are basically ranges of bytes. This does some -/// funky memory allocation and hashing things to make it extremely efficient, -/// storing the string data *after* the value in the map. -template -class StringMap : public StringMapImpl { - AllocatorTy Allocator; - -public: - typedef StringMapEntry MapEntryTy; - - StringMap() : StringMapImpl(static_cast(sizeof(MapEntryTy))) {} - explicit StringMap(unsigned InitialSize) - : StringMapImpl(InitialSize, static_cast(sizeof(MapEntryTy))) {} - - explicit StringMap(AllocatorTy A) - : StringMapImpl(static_cast(sizeof(MapEntryTy))), Allocator(A) {} - - StringMap(unsigned InitialSize, AllocatorTy A) - : StringMapImpl(InitialSize, static_cast(sizeof(MapEntryTy))), - Allocator(A) {} - - StringMap(std::initializer_list> List) - : StringMapImpl(List.size(), static_cast(sizeof(MapEntryTy))) { - for (const auto &P : List) { - insert(P); - } - } - - StringMap(StringMap &&RHS) - : StringMapImpl(std::move(RHS)), Allocator(std::move(RHS.Allocator)) {} - - StringMap &operator=(StringMap RHS) { - StringMapImpl::swap(RHS); - std::swap(Allocator, RHS.Allocator); - return *this; - } - - StringMap(const StringMap &RHS) : - StringMapImpl(static_cast(sizeof(MapEntryTy))), - Allocator(RHS.Allocator) { - if (RHS.empty()) - return; - - // Allocate TheTable of the same size as RHS's TheTable, and set the - // sentinel appropriately (and NumBuckets). - init(RHS.NumBuckets); - unsigned *HashTable = (unsigned *)(TheTable + NumBuckets + 1), - *RHSHashTable = (unsigned *)(RHS.TheTable + NumBuckets + 1); - - NumItems = RHS.NumItems; - NumTombstones = RHS.NumTombstones; - for (unsigned I = 0, E = NumBuckets; I != E; ++I) { - StringMapEntryBase *Bucket = RHS.TheTable[I]; - if (!Bucket || Bucket == getTombstoneVal()) { - TheTable[I] = Bucket; - continue; - } - - TheTable[I] = MapEntryTy::Create( - static_cast(Bucket)->getKey(), Allocator, - static_cast(Bucket)->getValue()); - HashTable[I] = RHSHashTable[I]; - } - - // Note that here we've copied everything from the RHS into this object, - // tombstones included. We could, instead, have re-probed for each key to - // instantiate this new object without any tombstone buckets. The - // assumption here is that items are rarely deleted from most StringMaps, - // and so tombstones are rare, so the cost of re-probing for all inputs is - // not worthwhile. - } - - AllocatorTy &getAllocator() { return Allocator; } - const AllocatorTy &getAllocator() const { return Allocator; } - - typedef const char* key_type; - typedef ValueTy mapped_type; - typedef StringMapEntry value_type; - typedef size_t size_type; - - typedef StringMapConstIterator const_iterator; - typedef StringMapIterator iterator; - - iterator begin() { - return iterator(TheTable, NumBuckets == 0); - } - iterator end() { - return iterator(TheTable+NumBuckets, true); - } - const_iterator begin() const { - return const_iterator(TheTable, NumBuckets == 0); - } - const_iterator end() const { - return const_iterator(TheTable+NumBuckets, true); - } - - iterator find(StringRef Key) { - int Bucket = FindKey(Key); - if (Bucket == -1) return end(); - return iterator(TheTable+Bucket, true); - } - - const_iterator find(StringRef Key) const { - int Bucket = FindKey(Key); - if (Bucket == -1) return end(); - return const_iterator(TheTable+Bucket, true); - } - - /// lookup - Return the entry for the specified key, or a default - /// constructed value if no such entry exists. - ValueTy lookup(StringRef Key) const { - const_iterator it = find(Key); - if (it != end()) - return it->second; - return ValueTy(); - } - - /// Lookup the ValueTy for the \p Key, or create a default constructed value - /// if the key is not in the map. - ValueTy &operator[](StringRef Key) { - return emplace_second(Key).first->second; - } - - /// count - Return 1 if the element is in the map, 0 otherwise. - size_type count(StringRef Key) const { - return find(Key) == end() ? 0 : 1; - } - - /// insert - Insert the specified key/value pair into the map. If the key - /// already exists in the map, return false and ignore the request, otherwise - /// insert it and return true. - bool insert(MapEntryTy *KeyValue) { - unsigned BucketNo = LookupBucketFor(KeyValue->getKey()); - StringMapEntryBase *&Bucket = TheTable[BucketNo]; - if (Bucket && Bucket != getTombstoneVal()) - return false; // Already exists in map. - - if (Bucket == getTombstoneVal()) - --NumTombstones; - Bucket = KeyValue; - ++NumItems; - assert(NumItems + NumTombstones <= NumBuckets); - - RehashTable(); - return true; - } - - /// insert - Inserts the specified key/value pair into the map if the key - /// isn't already in the map. The bool component of the returned pair is true - /// if and only if the insertion takes place, and the iterator component of - /// the pair points to the element with key equivalent to the key of the pair. - std::pair insert(std::pair KV) { - return emplace_second(KV.first, std::move(KV.second)); - } - - /// Emplace a new element for the specified key into the map if the key isn't - /// already in the map. The bool component of the returned pair is true - /// if and only if the insertion takes place, and the iterator component of - /// the pair points to the element with key equivalent to the key of the pair. - template - std::pair emplace_second(StringRef Key, ArgsTy &&... Args) { - unsigned BucketNo = LookupBucketFor(Key); - StringMapEntryBase *&Bucket = TheTable[BucketNo]; - if (Bucket && Bucket != getTombstoneVal()) - return std::make_pair(iterator(TheTable + BucketNo, false), - false); // Already exists in map. - - if (Bucket == getTombstoneVal()) - --NumTombstones; - Bucket = MapEntryTy::Create(Key, Allocator, std::forward(Args)...); - ++NumItems; - assert(NumItems + NumTombstones <= NumBuckets); - - BucketNo = RehashTable(BucketNo); - return std::make_pair(iterator(TheTable + BucketNo, false), true); - } - - // clear - Empties out the StringMap - void clear() { - if (empty()) return; - - // Zap all values, resetting the keys back to non-present (not tombstone), - // which is safe because we're removing all elements. - for (unsigned I = 0, E = NumBuckets; I != E; ++I) { - StringMapEntryBase *&Bucket = TheTable[I]; - if (Bucket && Bucket != getTombstoneVal()) { - static_cast(Bucket)->Destroy(Allocator); - } - Bucket = nullptr; - } - - NumItems = 0; - NumTombstones = 0; - } - - /// remove - Remove the specified key/value pair from the map, but do not - /// erase it. This aborts if the key is not in the map. - void remove(MapEntryTy *KeyValue) { - RemoveKey(KeyValue); - } - - void erase(iterator I) { - MapEntryTy &V = *I; - remove(&V); - V.Destroy(Allocator); - } - - bool erase(StringRef Key) { - iterator I = find(Key); - if (I == end()) return false; - erase(I); - return true; - } - - ~StringMap() { - // Delete all the elements in the map, but don't reset the elements - // to default values. This is a copy of clear(), but avoids unnecessary - // work not required in the destructor. - if (!empty()) { - for (unsigned I = 0, E = NumBuckets; I != E; ++I) { - StringMapEntryBase *Bucket = TheTable[I]; - if (Bucket && Bucket != getTombstoneVal()) { - static_cast(Bucket)->Destroy(Allocator); - } - } - } - free(TheTable); - } -}; - -template class StringMapConstIterator { -protected: - StringMapEntryBase **Ptr; - -public: - typedef StringMapEntry value_type; - - StringMapConstIterator() : Ptr(nullptr) { } - - explicit StringMapConstIterator(StringMapEntryBase **Bucket, - bool NoAdvance = false) - : Ptr(Bucket) { - if (!NoAdvance) AdvancePastEmptyBuckets(); - } - - const value_type &operator*() const { - return *static_cast*>(*Ptr); - } - const value_type *operator->() const { - return static_cast*>(*Ptr); - } - - bool operator==(const StringMapConstIterator &RHS) const { - return Ptr == RHS.Ptr; - } - bool operator!=(const StringMapConstIterator &RHS) const { - return Ptr != RHS.Ptr; - } - - inline StringMapConstIterator& operator++() { // Preincrement - ++Ptr; - AdvancePastEmptyBuckets(); - return *this; - } - StringMapConstIterator operator++(int) { // Postincrement - StringMapConstIterator tmp = *this; ++*this; return tmp; - } - -private: - void AdvancePastEmptyBuckets() { - while (*Ptr == nullptr || *Ptr == StringMapImpl::getTombstoneVal()) - ++Ptr; - } -}; - -template -class StringMapIterator : public StringMapConstIterator { -public: - StringMapIterator() {} - explicit StringMapIterator(StringMapEntryBase **Bucket, - bool NoAdvance = false) - : StringMapConstIterator(Bucket, NoAdvance) { - } - StringMapEntry &operator*() const { - return *static_cast*>(*this->Ptr); - } - StringMapEntry *operator->() const { - return static_cast*>(*this->Ptr); - } -}; -} - -#endif diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h deleted file mode 100644 index 398ca692..00000000 --- a/llvm/include/llvm/ADT/StringRef.h +++ /dev/null @@ -1,632 +0,0 @@ -//===--- StringRef.h - Constant String Reference Wrapper --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_STRINGREF_H -#define LLVM_ADT_STRINGREF_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/Support/Compiler.h" -#include -#include -#include -#include -#include -#include - -namespace llvm { - template - class SmallVectorImpl; - class APInt; - class hash_code; - class StringRef; - - /// Helper functions for StringRef::getAsInteger. - bool getAsUnsignedInteger(StringRef Str, unsigned Radix, - unsigned long long &Result); - - bool getAsSignedInteger(StringRef Str, unsigned Radix, long long &Result); - - /// StringRef - Represent a constant reference to a string, i.e. a character - /// array and a length, which need not be null terminated. - /// - /// This class does not own the string data, it is expected to be used in - /// situations where the character data resides in some other buffer, whose - /// lifetime extends past that of the StringRef. For this reason, it is not in - /// general safe to store a StringRef. - class StringRef { - public: - typedef const char *iterator; - typedef const char *const_iterator; - static const size_t npos = ~size_t(0); - typedef size_t size_type; - - private: - /// The start of the string, in an external buffer. - const char *Data; - - /// The length of the string. - size_t Length; - - // Workaround memcmp issue with null pointers (undefined behavior) - // by providing a specialized version - LLVM_ATTRIBUTE_ALWAYS_INLINE - static int compareMemory(const char *Lhs, const char *Rhs, size_t Length) { - if (Length == 0) { return 0; } - return ::memcmp(Lhs,Rhs,Length); - } - - public: - /// @name Constructors - /// @{ - - /// Construct an empty string ref. - /*implicit*/ StringRef() : Data(nullptr), Length(0) {} - - /// Construct a string ref from a cstring. - /*implicit*/ StringRef(const char *Str) - : Data(Str) { - assert(Str && "StringRef cannot be built from a NULL argument"); - Length = ::strlen(Str); // invoking strlen(NULL) is undefined behavior - } - - /// Construct a string ref from a pointer and length. - LLVM_ATTRIBUTE_ALWAYS_INLINE - /*implicit*/ StringRef(const char *data, size_t length) - : Data(data), Length(length) { - assert((data || length == 0) && - "StringRef cannot be built from a NULL argument with non-null length"); - } - - /// Construct a string ref from an std::string. - LLVM_ATTRIBUTE_ALWAYS_INLINE - /*implicit*/ StringRef(const std::string &Str) - : Data(Str.data()), Length(Str.length()) {} - - /// @} - /// @name Iterators - /// @{ - - iterator begin() const { return Data; } - - iterator end() const { return Data + Length; } - - const unsigned char *bytes_begin() const { - return reinterpret_cast(begin()); - } - const unsigned char *bytes_end() const { - return reinterpret_cast(end()); - } - iterator_range bytes() const { - return make_range(bytes_begin(), bytes_end()); - } - - /// @} - /// @name String Operations - /// @{ - - /// data - Get a pointer to the start of the string (which may not be null - /// terminated). - LLVM_ATTRIBUTE_ALWAYS_INLINE - const char *data() const { return Data; } - - /// empty - Check if the string is empty. - LLVM_ATTRIBUTE_ALWAYS_INLINE - bool empty() const { return Length == 0; } - - /// size - Get the string size. - LLVM_ATTRIBUTE_ALWAYS_INLINE - size_t size() const { return Length; } - - /// front - Get the first character in the string. - char front() const { - assert(!empty()); - return Data[0]; - } - - /// back - Get the last character in the string. - char back() const { - assert(!empty()); - return Data[Length-1]; - } - - // copy - Allocate copy in Allocator and return StringRef to it. - template StringRef copy(Allocator &A) const { - // Don't request a length 0 copy from the allocator. - if (empty()) - return StringRef(); - char *S = A.template Allocate(Length); - std::copy(begin(), end(), S); - return StringRef(S, Length); - } - - /// equals - Check for string equality, this is more efficient than - /// compare() when the relative ordering of inequal strings isn't needed. - LLVM_ATTRIBUTE_ALWAYS_INLINE - bool equals(StringRef RHS) const { - return (Length == RHS.Length && - compareMemory(Data, RHS.Data, RHS.Length) == 0); - } - - /// equals_lower - Check for string equality, ignoring case. - bool equals_lower(StringRef RHS) const { - return Length == RHS.Length && compare_lower(RHS) == 0; - } - - /// compare - Compare two strings; the result is -1, 0, or 1 if this string - /// is lexicographically less than, equal to, or greater than the \p RHS. - LLVM_ATTRIBUTE_ALWAYS_INLINE - int compare(StringRef RHS) const { - // Check the prefix for a mismatch. - if (int Res = compareMemory(Data, RHS.Data, std::min(Length, RHS.Length))) - return Res < 0 ? -1 : 1; - - // Otherwise the prefixes match, so we only need to check the lengths. - if (Length == RHS.Length) - return 0; - return Length < RHS.Length ? -1 : 1; - } - - /// compare_lower - Compare two strings, ignoring case. - int compare_lower(StringRef RHS) const; - - /// compare_numeric - Compare two strings, treating sequences of digits as - /// numbers. - int compare_numeric(StringRef RHS) const; - - /// \brief Determine the edit distance between this string and another - /// string. - /// - /// \param Other the string to compare this string against. - /// - /// \param AllowReplacements whether to allow character - /// replacements (change one character into another) as a single - /// operation, rather than as two operations (an insertion and a - /// removal). - /// - /// \param MaxEditDistance If non-zero, the maximum edit distance that - /// this routine is allowed to compute. If the edit distance will exceed - /// that maximum, returns \c MaxEditDistance+1. - /// - /// \returns the minimum number of character insertions, removals, - /// or (if \p AllowReplacements is \c true) replacements needed to - /// transform one of the given strings into the other. If zero, - /// the strings are identical. - unsigned edit_distance(StringRef Other, bool AllowReplacements = true, - unsigned MaxEditDistance = 0) const; - - /// str - Get the contents as an std::string. - std::string str() const { - if (!Data) return std::string(); - return std::string(Data, Length); - } - - /// @} - /// @name Operator Overloads - /// @{ - - char operator[](size_t Index) const { - assert(Index < Length && "Invalid index!"); - return Data[Index]; - } - - /// @} - /// @name Type Conversions - /// @{ - - operator std::string() const { - return str(); - } - - /// @} - /// @name String Predicates - /// @{ - - /// Check if this string starts with the given \p Prefix. - LLVM_ATTRIBUTE_ALWAYS_INLINE - bool startswith(StringRef Prefix) const { - return Length >= Prefix.Length && - compareMemory(Data, Prefix.Data, Prefix.Length) == 0; - } - - /// Check if this string starts with the given \p Prefix, ignoring case. - bool startswith_lower(StringRef Prefix) const; - - /// Check if this string ends with the given \p Suffix. - LLVM_ATTRIBUTE_ALWAYS_INLINE - bool endswith(StringRef Suffix) const { - return Length >= Suffix.Length && - compareMemory(end() - Suffix.Length, Suffix.Data, Suffix.Length) == 0; - } - - /// Check if this string ends with the given \p Suffix, ignoring case. - bool endswith_lower(StringRef Suffix) const; - - /// @} - /// @name String Searching - /// @{ - - /// Search for the first character \p C in the string. - /// - /// \returns The index of the first occurrence of \p C, or npos if not - /// found. - LLVM_ATTRIBUTE_ALWAYS_INLINE - size_t find(char C, size_t From = 0) const { - size_t FindBegin = std::min(From, Length); - if (FindBegin < Length) { // Avoid calling memchr with nullptr. - // Just forward to memchr, which is faster than a hand-rolled loop. - if (const void *P = ::memchr(Data + FindBegin, C, Length - FindBegin)) - return static_cast(P) - Data; - } - return npos; - } - - /// Search for the first string \p Str in the string. - /// - /// \returns The index of the first occurrence of \p Str, or npos if not - /// found. - size_t find(StringRef Str, size_t From = 0) const; - - /// Search for the last character \p C in the string. - /// - /// \returns The index of the last occurrence of \p C, or npos if not - /// found. - size_t rfind(char C, size_t From = npos) const { - From = std::min(From, Length); - size_t i = From; - while (i != 0) { - --i; - if (Data[i] == C) - return i; - } - return npos; - } - - /// Search for the last string \p Str in the string. - /// - /// \returns The index of the last occurrence of \p Str, or npos if not - /// found. - size_t rfind(StringRef Str) const; - - /// Find the first character in the string that is \p C, or npos if not - /// found. Same as find. - size_t find_first_of(char C, size_t From = 0) const { - return find(C, From); - } - - /// Find the first character in the string that is in \p Chars, or npos if - /// not found. - /// - /// Complexity: O(size() + Chars.size()) - size_t find_first_of(StringRef Chars, size_t From = 0) const; - - /// Find the first character in the string that is not \p C or npos if not - /// found. - size_t find_first_not_of(char C, size_t From = 0) const; - - /// Find the first character in the string that is not in the string - /// \p Chars, or npos if not found. - /// - /// Complexity: O(size() + Chars.size()) - size_t find_first_not_of(StringRef Chars, size_t From = 0) const; - - /// Find the last character in the string that is \p C, or npos if not - /// found. - size_t find_last_of(char C, size_t From = npos) const { - return rfind(C, From); - } - - /// Find the last character in the string that is in \p C, or npos if not - /// found. - /// - /// Complexity: O(size() + Chars.size()) - size_t find_last_of(StringRef Chars, size_t From = npos) const; - - /// Find the last character in the string that is not \p C, or npos if not - /// found. - size_t find_last_not_of(char C, size_t From = npos) const; - - /// Find the last character in the string that is not in \p Chars, or - /// npos if not found. - /// - /// Complexity: O(size() + Chars.size()) - size_t find_last_not_of(StringRef Chars, size_t From = npos) const; - - /// @} - /// @name Helpful Algorithms - /// @{ - - /// Return the number of occurrences of \p C in the string. - size_t count(char C) const { - size_t Count = 0; - for (size_t i = 0, e = Length; i != e; ++i) - if (Data[i] == C) - ++Count; - return Count; - } - - /// Return the number of non-overlapped occurrences of \p Str in - /// the string. - size_t count(StringRef Str) const; - - /// Parse the current string as an integer of the specified radix. If - /// \p Radix is specified as zero, this does radix autosensing using - /// extended C rules: 0 is octal, 0x is hex, 0b is binary. - /// - /// If the string is invalid or if only a subset of the string is valid, - /// this returns true to signify the error. The string is considered - /// erroneous if empty or if it overflows T. - template - typename std::enable_if::is_signed, bool>::type - getAsInteger(unsigned Radix, T &Result) const { - long long LLVal; - if (getAsSignedInteger(*this, Radix, LLVal) || - static_cast(LLVal) != LLVal) - return true; - Result = LLVal; - return false; - } - - template - typename std::enable_if::is_signed, bool>::type - getAsInteger(unsigned Radix, T &Result) const { - unsigned long long ULLVal; - // The additional cast to unsigned long long is required to avoid the - // Visual C++ warning C4805: '!=' : unsafe mix of type 'bool' and type - // 'unsigned __int64' when instantiating getAsInteger with T = bool. - if (getAsUnsignedInteger(*this, Radix, ULLVal) || - static_cast(static_cast(ULLVal)) != ULLVal) - return true; - Result = ULLVal; - return false; - } - - /// Parse the current string as an integer of the specified \p Radix, or of - /// an autosensed radix if the \p Radix given is 0. The current value in - /// \p Result is discarded, and the storage is changed to be wide enough to - /// store the parsed integer. - /// - /// \returns true if the string does not solely consist of a valid - /// non-empty number in the appropriate base. - /// - /// APInt::fromString is superficially similar but assumes the - /// string is well-formed in the given radix. - bool getAsInteger(unsigned Radix, APInt &Result) const; - - /// @} - /// @name String Operations - /// @{ - - // Convert the given ASCII string to lowercase. - std::string lower() const; - - /// Convert the given ASCII string to uppercase. - std::string upper() const; - - /// @} - /// @name Substring Operations - /// @{ - - /// Return a reference to the substring from [Start, Start + N). - /// - /// \param Start The index of the starting character in the substring; if - /// the index is npos or greater than the length of the string then the - /// empty substring will be returned. - /// - /// \param N The number of characters to included in the substring. If N - /// exceeds the number of characters remaining in the string, the string - /// suffix (starting with \p Start) will be returned. - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringRef substr(size_t Start, size_t N = npos) const { - Start = std::min(Start, Length); - return StringRef(Data + Start, std::min(N, Length - Start)); - } - - /// Return a StringRef equal to 'this' but with the first \p N elements - /// dropped. - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringRef drop_front(size_t N = 1) const { - assert(size() >= N && "Dropping more elements than exist"); - return substr(N); - } - - /// Return a StringRef equal to 'this' but with the last \p N elements - /// dropped. - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringRef drop_back(size_t N = 1) const { - assert(size() >= N && "Dropping more elements than exist"); - return substr(0, size()-N); - } - - /// Return a reference to the substring from [Start, End). - /// - /// \param Start The index of the starting character in the substring; if - /// the index is npos or greater than the length of the string then the - /// empty substring will be returned. - /// - /// \param End The index following the last character to include in the - /// substring. If this is npos or exceeds the number of characters - /// remaining in the string, the string suffix (starting with \p Start) - /// will be returned. If this is less than \p Start, an empty string will - /// be returned. - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringRef slice(size_t Start, size_t End) const { - Start = std::min(Start, Length); - End = std::min(std::max(Start, End), Length); - return StringRef(Data + Start, End - Start); - } - - /// Split into two substrings around the first occurrence of a separator - /// character. - /// - /// If \p Separator is in the string, then the result is a pair (LHS, RHS) - /// such that (*this == LHS + Separator + RHS) is true and RHS is - /// maximal. If \p Separator is not in the string, then the result is a - /// pair (LHS, RHS) where (*this == LHS) and (RHS == ""). - /// - /// \param Separator The character to split on. - /// \returns The split substrings. - std::pair split(char Separator) const { - size_t Idx = find(Separator); - if (Idx == npos) - return std::make_pair(*this, StringRef()); - return std::make_pair(slice(0, Idx), slice(Idx+1, npos)); - } - - /// Split into two substrings around the first occurrence of a separator - /// string. - /// - /// If \p Separator is in the string, then the result is a pair (LHS, RHS) - /// such that (*this == LHS + Separator + RHS) is true and RHS is - /// maximal. If \p Separator is not in the string, then the result is a - /// pair (LHS, RHS) where (*this == LHS) and (RHS == ""). - /// - /// \param Separator - The string to split on. - /// \return - The split substrings. - std::pair split(StringRef Separator) const { - size_t Idx = find(Separator); - if (Idx == npos) - return std::make_pair(*this, StringRef()); - return std::make_pair(slice(0, Idx), slice(Idx + Separator.size(), npos)); - } - - /// Split into substrings around the occurrences of a separator string. - /// - /// Each substring is stored in \p A. If \p MaxSplit is >= 0, at most - /// \p MaxSplit splits are done and consequently <= \p MaxSplit + 1 - /// elements are added to A. - /// If \p KeepEmpty is false, empty strings are not added to \p A. They - /// still count when considering \p MaxSplit - /// An useful invariant is that - /// Separator.join(A) == *this if MaxSplit == -1 and KeepEmpty == true - /// - /// \param A - Where to put the substrings. - /// \param Separator - The string to split on. - /// \param MaxSplit - The maximum number of times the string is split. - /// \param KeepEmpty - True if empty substring should be added. - void split(SmallVectorImpl &A, - StringRef Separator, int MaxSplit = -1, - bool KeepEmpty = true) const; - - /// Split into substrings around the occurrences of a separator character. - /// - /// Each substring is stored in \p A. If \p MaxSplit is >= 0, at most - /// \p MaxSplit splits are done and consequently <= \p MaxSplit + 1 - /// elements are added to A. - /// If \p KeepEmpty is false, empty strings are not added to \p A. They - /// still count when considering \p MaxSplit - /// An useful invariant is that - /// Separator.join(A) == *this if MaxSplit == -1 and KeepEmpty == true - /// - /// \param A - Where to put the substrings. - /// \param Separator - The string to split on. - /// \param MaxSplit - The maximum number of times the string is split. - /// \param KeepEmpty - True if empty substring should be added. - void split(SmallVectorImpl &A, char Separator, int MaxSplit = -1, - bool KeepEmpty = true) const; - - /// Split into two substrings around the last occurrence of a separator - /// character. - /// - /// If \p Separator is in the string, then the result is a pair (LHS, RHS) - /// such that (*this == LHS + Separator + RHS) is true and RHS is - /// minimal. If \p Separator is not in the string, then the result is a - /// pair (LHS, RHS) where (*this == LHS) and (RHS == ""). - /// - /// \param Separator - The character to split on. - /// \return - The split substrings. - std::pair rsplit(char Separator) const { - size_t Idx = rfind(Separator); - if (Idx == npos) - return std::make_pair(*this, StringRef()); - return std::make_pair(slice(0, Idx), slice(Idx+1, npos)); - } - - /// Return string with consecutive \p Char characters starting from the - /// the left removed. - StringRef ltrim(char Char) const { - return drop_front(std::min(Length, find_first_not_of(Char))); - } - - /// Return string with consecutive characters in \p Chars starting from - /// the left removed. - StringRef ltrim(StringRef Chars = " \t\n\v\f\r") const { - return drop_front(std::min(Length, find_first_not_of(Chars))); - } - - /// Return string with consecutive \p Char characters starting from the - /// right removed. - StringRef rtrim(char Char) const { - return drop_back(Length - std::min(Length, find_last_not_of(Char) + 1)); - } - - /// Return string with consecutive characters in \p Chars starting from - /// the right removed. - StringRef rtrim(StringRef Chars = " \t\n\v\f\r") const { - return drop_back(Length - std::min(Length, find_last_not_of(Chars) + 1)); - } - - /// Return string with consecutive \p Char characters starting from the - /// left and right removed. - StringRef trim(char Char) const { - return ltrim(Char).rtrim(Char); - } - - /// Return string with consecutive characters in \p Chars starting from - /// the left and right removed. - StringRef trim(StringRef Chars = " \t\n\v\f\r") const { - return ltrim(Chars).rtrim(Chars); - } - - /// @} - }; - - /// @name StringRef Comparison Operators - /// @{ - - LLVM_ATTRIBUTE_ALWAYS_INLINE - inline bool operator==(StringRef LHS, StringRef RHS) { - return LHS.equals(RHS); - } - - LLVM_ATTRIBUTE_ALWAYS_INLINE - inline bool operator!=(StringRef LHS, StringRef RHS) { - return !(LHS == RHS); - } - - inline bool operator<(StringRef LHS, StringRef RHS) { - return LHS.compare(RHS) == -1; - } - - inline bool operator<=(StringRef LHS, StringRef RHS) { - return LHS.compare(RHS) != 1; - } - - inline bool operator>(StringRef LHS, StringRef RHS) { - return LHS.compare(RHS) == 1; - } - - inline bool operator>=(StringRef LHS, StringRef RHS) { - return LHS.compare(RHS) != -1; - } - - inline std::string &operator+=(std::string &buffer, StringRef string) { - return buffer.append(string.data(), string.size()); - } - - /// @} - - /// \brief Compute a hash_code for a StringRef. - hash_code hash_value(StringRef S); - - // StringRefs can be treated like a POD type. - template struct isPodLike; - template <> struct isPodLike { static const bool value = true; }; -} - -#endif diff --git a/llvm/include/llvm/ADT/StringSet.h b/llvm/include/llvm/ADT/StringSet.h deleted file mode 100644 index c32c2a49..00000000 --- a/llvm/include/llvm/ADT/StringSet.h +++ /dev/null @@ -1,45 +0,0 @@ -//===--- StringSet.h - The LLVM Compiler Driver -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open -// Source License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// StringSet - A set-like wrapper for the StringMap. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_STRINGSET_H -#define LLVM_ADT_STRINGSET_H - -#include "llvm/ADT/StringMap.h" - -namespace llvm { - - /// StringSet - A wrapper for StringMap that provides set-like functionality. - template - class StringSet : public llvm::StringMap { - typedef llvm::StringMap base; - public: - StringSet() = default; - StringSet(std::initializer_list S) { - for (StringRef X : S) - insert(X); - } - - std::pair insert(StringRef Key) { - assert(!Key.empty()); - return base::insert(std::make_pair(Key, '\0')); - } - - template - void insert(const InputIt &Begin, const InputIt &End) { - for (auto It = Begin; It != End; ++It) - base::insert(std::make_pair(*It, '\0')); - } - }; -} - -#endif // LLVM_ADT_STRINGSET_H diff --git a/llvm/include/llvm/ADT/StringSwitch.h b/llvm/include/llvm/ADT/StringSwitch.h deleted file mode 100644 index 42b0fc4b..00000000 --- a/llvm/include/llvm/ADT/StringSwitch.h +++ /dev/null @@ -1,166 +0,0 @@ -//===--- StringSwitch.h - Switch-on-literal-string Construct --------------===/ -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -//===----------------------------------------------------------------------===/ -// -// This file implements the StringSwitch template, which mimics a switch() -// statement whose cases are string literals. -// -//===----------------------------------------------------------------------===/ -#ifndef LLVM_ADT_STRINGSWITCH_H -#define LLVM_ADT_STRINGSWITCH_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Compiler.h" -#include -#include - -namespace llvm { - -/// \brief A switch()-like statement whose cases are string literals. -/// -/// The StringSwitch class is a simple form of a switch() statement that -/// determines whether the given string matches one of the given string -/// literals. The template type parameter \p T is the type of the value that -/// will be returned from the string-switch expression. For example, -/// the following code switches on the name of a color in \c argv[i]: -/// -/// \code -/// Color color = StringSwitch(argv[i]) -/// .Case("red", Red) -/// .Case("orange", Orange) -/// .Case("yellow", Yellow) -/// .Case("green", Green) -/// .Case("blue", Blue) -/// .Case("indigo", Indigo) -/// .Cases("violet", "purple", Violet) -/// .Default(UnknownColor); -/// \endcode -template -class StringSwitch { - /// \brief The string we are matching. - StringRef Str; - - /// \brief The pointer to the result of this switch statement, once known, - /// null before that. - const T *Result; - -public: - LLVM_ATTRIBUTE_ALWAYS_INLINE - explicit StringSwitch(StringRef S) - : Str(S), Result(nullptr) { } - - template - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringSwitch& Case(const char (&S)[N], const T& Value) { - if (!Result && N-1 == Str.size() && - (std::memcmp(S, Str.data(), N-1) == 0)) { - Result = &Value; - } - - return *this; - } - - template - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringSwitch& EndsWith(const char (&S)[N], const T &Value) { - if (!Result && Str.size() >= N-1 && - std::memcmp(S, Str.data() + Str.size() + 1 - N, N-1) == 0) { - Result = &Value; - } - - return *this; - } - - template - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringSwitch& StartsWith(const char (&S)[N], const T &Value) { - if (!Result && Str.size() >= N-1 && - std::memcmp(S, Str.data(), N-1) == 0) { - Result = &Value; - } - - return *this; - } - - template - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringSwitch& Cases(const char (&S0)[N0], const char (&S1)[N1], - const T& Value) { - if (!Result && ( - (N0-1 == Str.size() && std::memcmp(S0, Str.data(), N0-1) == 0) || - (N1-1 == Str.size() && std::memcmp(S1, Str.data(), N1-1) == 0))) { - Result = &Value; - } - - return *this; - } - - template - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringSwitch& Cases(const char (&S0)[N0], const char (&S1)[N1], - const char (&S2)[N2], const T& Value) { - if (!Result && ( - (N0-1 == Str.size() && std::memcmp(S0, Str.data(), N0-1) == 0) || - (N1-1 == Str.size() && std::memcmp(S1, Str.data(), N1-1) == 0) || - (N2-1 == Str.size() && std::memcmp(S2, Str.data(), N2-1) == 0))) { - Result = &Value; - } - - return *this; - } - - template - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringSwitch& Cases(const char (&S0)[N0], const char (&S1)[N1], - const char (&S2)[N2], const char (&S3)[N3], - const T& Value) { - if (!Result && ( - (N0-1 == Str.size() && std::memcmp(S0, Str.data(), N0-1) == 0) || - (N1-1 == Str.size() && std::memcmp(S1, Str.data(), N1-1) == 0) || - (N2-1 == Str.size() && std::memcmp(S2, Str.data(), N2-1) == 0) || - (N3-1 == Str.size() && std::memcmp(S3, Str.data(), N3-1) == 0))) { - Result = &Value; - } - - return *this; - } - - template - LLVM_ATTRIBUTE_ALWAYS_INLINE - StringSwitch& Cases(const char (&S0)[N0], const char (&S1)[N1], - const char (&S2)[N2], const char (&S3)[N3], - const char (&S4)[N4], const T& Value) { - if (!Result && ( - (N0-1 == Str.size() && std::memcmp(S0, Str.data(), N0-1) == 0) || - (N1-1 == Str.size() && std::memcmp(S1, Str.data(), N1-1) == 0) || - (N2-1 == Str.size() && std::memcmp(S2, Str.data(), N2-1) == 0) || - (N3-1 == Str.size() && std::memcmp(S3, Str.data(), N3-1) == 0) || - (N4-1 == Str.size() && std::memcmp(S4, Str.data(), N4-1) == 0))) { - Result = &Value; - } - - return *this; - } - - LLVM_ATTRIBUTE_ALWAYS_INLINE - R Default(const T& Value) const { - if (Result) - return *Result; - - return Value; - } - - LLVM_ATTRIBUTE_ALWAYS_INLINE - operator R() const { - assert(Result && "Fell off the end of a string-switch"); - return *Result; - } -}; - -} // end namespace llvm - -#endif // LLVM_ADT_STRINGSWITCH_H diff --git a/llvm/include/llvm/ADT/TinyPtrVector.h b/llvm/include/llvm/ADT/TinyPtrVector.h deleted file mode 100644 index 605f0e70..00000000 --- a/llvm/include/llvm/ADT/TinyPtrVector.h +++ /dev/null @@ -1,334 +0,0 @@ -//===- llvm/ADT/TinyPtrVector.h - 'Normally tiny' vectors -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_TINYPTRVECTOR_H -#define LLVM_ADT_TINYPTRVECTOR_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/PointerUnion.h" -#include "llvm/ADT/SmallVector.h" - -namespace llvm { - -/// TinyPtrVector - This class is specialized for cases where there are -/// normally 0 or 1 element in a vector, but is general enough to go beyond that -/// when required. -/// -/// NOTE: This container doesn't allow you to store a null pointer into it. -/// -template -class TinyPtrVector { -public: - typedef llvm::SmallVector VecTy; - typedef typename VecTy::value_type value_type; - typedef llvm::PointerUnion PtrUnion; - -private: - PtrUnion Val; - -public: - TinyPtrVector() {} - ~TinyPtrVector() { - if (VecTy *V = Val.template dyn_cast()) - delete V; - } - - TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) { - if (VecTy *V = Val.template dyn_cast()) - Val = new VecTy(*V); - } - TinyPtrVector &operator=(const TinyPtrVector &RHS) { - if (this == &RHS) - return *this; - if (RHS.empty()) { - this->clear(); - return *this; - } - - // Try to squeeze into the single slot. If it won't fit, allocate a copied - // vector. - if (Val.template is()) { - if (RHS.size() == 1) - Val = RHS.front(); - else - Val = new VecTy(*RHS.Val.template get()); - return *this; - } - - // If we have a full vector allocated, try to re-use it. - if (RHS.Val.template is()) { - Val.template get()->clear(); - Val.template get()->push_back(RHS.front()); - } else { - *Val.template get() = *RHS.Val.template get(); - } - return *this; - } - - TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) { - RHS.Val = (EltTy)nullptr; - } - TinyPtrVector &operator=(TinyPtrVector &&RHS) { - if (this == &RHS) - return *this; - if (RHS.empty()) { - this->clear(); - return *this; - } - - // If this vector has been allocated on the heap, re-use it if cheap. If it - // would require more copying, just delete it and we'll steal the other - // side. - if (VecTy *V = Val.template dyn_cast()) { - if (RHS.Val.template is()) { - V->clear(); - V->push_back(RHS.front()); - return *this; - } - delete V; - } - - Val = RHS.Val; - RHS.Val = (EltTy)nullptr; - return *this; - } - - /// Constructor from an ArrayRef. - /// - /// This also is a constructor for individual array elements due to the single - /// element constructor for ArrayRef. - explicit TinyPtrVector(ArrayRef Elts) - : Val(Elts.empty() - ? PtrUnion() - : Elts.size() == 1 - ? PtrUnion(Elts[0]) - : PtrUnion(new VecTy(Elts.begin(), Elts.end()))) {} - - TinyPtrVector(size_t Count, EltTy Value) - : Val(Count == 0 ? PtrUnion() - : Count == 1 ? PtrUnion(Value) - : PtrUnion(new VecTy(Count, Value))) {} - - // implicit conversion operator to ArrayRef. - operator ArrayRef() const { - if (Val.isNull()) - return None; - if (Val.template is()) - return *Val.getAddrOfPtr1(); - return *Val.template get(); - } - - // implicit conversion operator to MutableArrayRef. - operator MutableArrayRef() { - if (Val.isNull()) - return None; - if (Val.template is()) - return *Val.getAddrOfPtr1(); - return *Val.template get(); - } - - // Implicit conversion to ArrayRef if EltTy* implicitly converts to U*. - template, ArrayRef>::value, - bool>::type = false> - operator ArrayRef() const { - return operator ArrayRef(); - } - - bool empty() const { - // This vector can be empty if it contains no element, or if it - // contains a pointer to an empty vector. - if (Val.isNull()) return true; - if (VecTy *Vec = Val.template dyn_cast()) - return Vec->empty(); - return false; - } - - unsigned size() const { - if (empty()) - return 0; - if (Val.template is()) - return 1; - return Val.template get()->size(); - } - - typedef EltTy *iterator; - typedef const EltTy *const_iterator; - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; - - iterator begin() { - if (Val.template is()) - return Val.getAddrOfPtr1(); - - return Val.template get()->begin(); - } - iterator end() { - if (Val.template is()) - return begin() + (Val.isNull() ? 0 : 1); - - return Val.template get()->end(); - } - - const_iterator begin() const { - return (const_iterator)const_cast(this)->begin(); - } - - const_iterator end() const { - return (const_iterator)const_cast(this)->end(); - } - - reverse_iterator rbegin() { return reverse_iterator(end()); } - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - - EltTy operator[](unsigned i) const { - assert(!Val.isNull() && "can't index into an empty vector"); - if (EltTy V = Val.template dyn_cast()) { - assert(i == 0 && "tinyvector index out of range"); - return V; - } - - assert(i < Val.template get()->size() && - "tinyvector index out of range"); - return (*Val.template get())[i]; - } - - EltTy front() const { - assert(!empty() && "vector empty"); - if (EltTy V = Val.template dyn_cast()) - return V; - return Val.template get()->front(); - } - - EltTy back() const { - assert(!empty() && "vector empty"); - if (EltTy V = Val.template dyn_cast()) - return V; - return Val.template get()->back(); - } - - void push_back(EltTy NewVal) { - assert(NewVal && "Can't add a null value"); - - // If we have nothing, add something. - if (Val.isNull()) { - Val = NewVal; - return; - } - - // If we have a single value, convert to a vector. - if (EltTy V = Val.template dyn_cast()) { - Val = new VecTy(); - Val.template get()->push_back(V); - } - - // Add the new value, we know we have a vector. - Val.template get()->push_back(NewVal); - } - - void pop_back() { - // If we have a single value, convert to empty. - if (Val.template is()) - Val = (EltTy)nullptr; - else if (VecTy *Vec = Val.template get()) - Vec->pop_back(); - } - - void clear() { - // If we have a single value, convert to empty. - if (Val.template is()) { - Val = (EltTy)nullptr; - } else if (VecTy *Vec = Val.template dyn_cast()) { - // If we have a vector form, just clear it. - Vec->clear(); - } - // Otherwise, we're already empty. - } - - iterator erase(iterator I) { - assert(I >= begin() && "Iterator to erase is out of bounds."); - assert(I < end() && "Erasing at past-the-end iterator."); - - // If we have a single value, convert to empty. - if (Val.template is()) { - if (I == begin()) - Val = (EltTy)nullptr; - } else if (VecTy *Vec = Val.template dyn_cast()) { - // multiple items in a vector; just do the erase, there is no - // benefit to collapsing back to a pointer - return Vec->erase(I); - } - return end(); - } - - iterator erase(iterator S, iterator E) { - assert(S >= begin() && "Range to erase is out of bounds."); - assert(S <= E && "Trying to erase invalid range."); - assert(E <= end() && "Trying to erase past the end."); - - if (Val.template is()) { - if (S == begin() && S != E) - Val = (EltTy)nullptr; - } else if (VecTy *Vec = Val.template dyn_cast()) { - return Vec->erase(S, E); - } - return end(); - } - - iterator insert(iterator I, const EltTy &Elt) { - assert(I >= this->begin() && "Insertion iterator is out of bounds."); - assert(I <= this->end() && "Inserting past the end of the vector."); - if (I == end()) { - push_back(Elt); - return std::prev(end()); - } - assert(!Val.isNull() && "Null value with non-end insert iterator."); - if (EltTy V = Val.template dyn_cast()) { - assert(I == begin()); - Val = Elt; - push_back(V); - return begin(); - } - - return Val.template get()->insert(I, Elt); - } - - template - iterator insert(iterator I, ItTy From, ItTy To) { - assert(I >= this->begin() && "Insertion iterator is out of bounds."); - assert(I <= this->end() && "Inserting past the end of the vector."); - if (From == To) - return I; - - // If we have a single value, convert to a vector. - ptrdiff_t Offset = I - begin(); - if (Val.isNull()) { - if (std::next(From) == To) { - Val = *From; - return begin(); - } - - Val = new VecTy(); - } else if (EltTy V = Val.template dyn_cast()) { - Val = new VecTy(); - Val.template get()->push_back(V); - } - return Val.template get()->insert(begin() + Offset, From, To); - } -}; -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ADT/Triple.h b/llvm/include/llvm/ADT/Triple.h deleted file mode 100644 index b98f8407..00000000 --- a/llvm/include/llvm/ADT/Triple.h +++ /dev/null @@ -1,727 +0,0 @@ -//===-- llvm/ADT/Triple.h - Target triple helper class ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_TRIPLE_H -#define LLVM_ADT_TRIPLE_H - -#include "llvm/ADT/Twine.h" - -// Some system headers or GCC predefined macros conflict with identifiers in -// this file. Undefine them here. -#undef NetBSD -#undef mips -#undef sparc - -namespace llvm { - -/// Triple - Helper class for working with autoconf configuration names. For -/// historical reasons, we also call these 'triples' (they used to contain -/// exactly three fields). -/// -/// Configuration names are strings in the canonical form: -/// ARCHITECTURE-VENDOR-OPERATING_SYSTEM -/// or -/// ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT -/// -/// This class is used for clients which want to support arbitrary -/// configuration names, but also want to implement certain special -/// behavior for particular configurations. This class isolates the mapping -/// from the components of the configuration name to well known IDs. -/// -/// At its core the Triple class is designed to be a wrapper for a triple -/// string; the constructor does not change or normalize the triple string. -/// Clients that need to handle the non-canonical triples that users often -/// specify should use the normalize method. -/// -/// See autoconf/config.guess for a glimpse into what configuration names -/// look like in practice. -class Triple { -public: - enum ArchType { - UnknownArch, - - arm, // ARM (little endian): arm, armv.*, xscale - armeb, // ARM (big endian): armeb - aarch64, // AArch64 (little endian): aarch64 - aarch64_be, // AArch64 (big endian): aarch64_be - avr, // AVR: Atmel AVR microcontroller - bpfel, // eBPF or extended BPF or 64-bit BPF (little endian) - bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian) - hexagon, // Hexagon: hexagon - mips, // MIPS: mips, mipsallegrex - mipsel, // MIPSEL: mipsel, mipsallegrexel - mips64, // MIPS64: mips64 - mips64el, // MIPS64EL: mips64el - msp430, // MSP430: msp430 - ppc, // PPC: powerpc - ppc64, // PPC64: powerpc64, ppu - ppc64le, // PPC64LE: powerpc64le - r600, // R600: AMD GPUs HD2XXX - HD6XXX - amdgcn, // AMDGCN: AMD GCN GPUs - sparc, // Sparc: sparc - sparcv9, // Sparcv9: Sparcv9 - sparcel, // Sparc: (endianness = little). NB: 'Sparcle' is a CPU variant - systemz, // SystemZ: s390x - tce, // TCE (http://tce.cs.tut.fi/): tce - thumb, // Thumb (little endian): thumb, thumbv.* - thumbeb, // Thumb (big endian): thumbeb - x86, // X86: i[3-9]86 - x86_64, // X86-64: amd64, x86_64 - xcore, // XCore: xcore - nvptx, // NVPTX: 32-bit - nvptx64, // NVPTX: 64-bit - le32, // le32: generic little-endian 32-bit CPU (PNaCl) - le64, // le64: generic little-endian 64-bit CPU (PNaCl) - amdil, // AMDIL - amdil64, // AMDIL with 64-bit pointers - hsail, // AMD HSAIL - hsail64, // AMD HSAIL with 64-bit pointers - spir, // SPIR: standard portable IR for OpenCL 32-bit version - spir64, // SPIR: standard portable IR for OpenCL 64-bit version - kalimba, // Kalimba: generic kalimba - shave, // SHAVE: Movidius vector VLIW processors - lanai, // Lanai: Lanai 32-bit - wasm32, // WebAssembly with 32-bit pointers - wasm64, // WebAssembly with 64-bit pointers - renderscript32, // 32-bit RenderScript - renderscript64, // 64-bit RenderScript - LastArchType = renderscript64 - }; - enum SubArchType { - NoSubArch, - - ARMSubArch_v8_2a, - ARMSubArch_v8_1a, - ARMSubArch_v8, - ARMSubArch_v8m_baseline, - ARMSubArch_v8m_mainline, - ARMSubArch_v7, - ARMSubArch_v7em, - ARMSubArch_v7m, - ARMSubArch_v7s, - ARMSubArch_v7k, - ARMSubArch_v6, - ARMSubArch_v6m, - ARMSubArch_v6k, - ARMSubArch_v6t2, - ARMSubArch_v5, - ARMSubArch_v5te, - ARMSubArch_v4t, - - KalimbaSubArch_v3, - KalimbaSubArch_v4, - KalimbaSubArch_v5 - }; - enum VendorType { - UnknownVendor, - - Apple, - PC, - SCEI, - BGP, - BGQ, - Freescale, - IBM, - ImaginationTechnologies, - MipsTechnologies, - NVIDIA, - CSR, - Myriad, - AMD, - Mesa, - LastVendorType = Mesa - }; - enum OSType { - UnknownOS, - - CloudABI, - Darwin, - DragonFly, - FreeBSD, - IOS, - KFreeBSD, - Linux, - Lv2, // PS3 - MacOSX, - NetBSD, - OpenBSD, - Solaris, - Win32, - Haiku, - Minix, - RTEMS, - NaCl, // Native Client - CNK, // BG/P Compute-Node Kernel - Bitrig, - AIX, - CUDA, // NVIDIA CUDA - NVCL, // NVIDIA OpenCL - AMDHSA, // AMD HSA Runtime - PS4, - ELFIAMCU, - TvOS, // Apple tvOS - WatchOS, // Apple watchOS - Mesa3D, - LastOSType = Mesa3D - }; - enum EnvironmentType { - UnknownEnvironment, - - GNU, - GNUABI64, - GNUEABI, - GNUEABIHF, - GNUX32, - CODE16, - EABI, - EABIHF, - Android, - Musl, - MuslEABI, - MuslEABIHF, - - MSVC, - Itanium, - Cygnus, - AMDOpenCL, - CoreCLR, - LastEnvironmentType = CoreCLR - }; - enum ObjectFormatType { - UnknownObjectFormat, - - COFF, - ELF, - MachO, - }; - -private: - std::string Data; - - /// The parsed arch type. - ArchType Arch; - - /// The parsed subarchitecture type. - SubArchType SubArch; - - /// The parsed vendor type. - VendorType Vendor; - - /// The parsed OS type. - OSType OS; - - /// The parsed Environment type. - EnvironmentType Environment; - - /// The object format type. - ObjectFormatType ObjectFormat; - -public: - /// @name Constructors - /// @{ - - /// Default constructor is the same as an empty string and leaves all - /// triple fields unknown. - Triple() : Data(), Arch(), Vendor(), OS(), Environment(), ObjectFormat() {} - - explicit Triple(const Twine &Str); - Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr); - Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr, - const Twine &EnvironmentStr); - - bool operator==(const Triple &Other) const { - return Arch == Other.Arch && SubArch == Other.SubArch && - Vendor == Other.Vendor && OS == Other.OS && - Environment == Other.Environment && - ObjectFormat == Other.ObjectFormat; - } - - /// @} - /// @name Normalization - /// @{ - - /// normalize - Turn an arbitrary machine specification into the canonical - /// triple form (or something sensible that the Triple class understands if - /// nothing better can reasonably be done). In particular, it handles the - /// common case in which otherwise valid components are in the wrong order. - static std::string normalize(StringRef Str); - - /// Return the normalized form of this triple's string. - std::string normalize() const { return normalize(Data); } - - /// @} - /// @name Typed Component Access - /// @{ - - /// getArch - Get the parsed architecture type of this triple. - ArchType getArch() const { return Arch; } - - /// getSubArch - get the parsed subarchitecture type for this triple. - SubArchType getSubArch() const { return SubArch; } - - /// getVendor - Get the parsed vendor type of this triple. - VendorType getVendor() const { return Vendor; } - - /// getOS - Get the parsed operating system type of this triple. - OSType getOS() const { return OS; } - - /// hasEnvironment - Does this triple have the optional environment - /// (fourth) component? - bool hasEnvironment() const { - return getEnvironmentName() != ""; - } - - /// getEnvironment - Get the parsed environment type of this triple. - EnvironmentType getEnvironment() const { return Environment; } - - /// Parse the version number from the OS name component of the - /// triple, if present. - /// - /// For example, "fooos1.2.3" would return (1, 2, 3). - /// - /// If an entry is not defined, it will be returned as 0. - void getEnvironmentVersion(unsigned &Major, unsigned &Minor, - unsigned &Micro) const; - - /// getFormat - Get the object format for this triple. - ObjectFormatType getObjectFormat() const { return ObjectFormat; } - - /// getOSVersion - Parse the version number from the OS name component of the - /// triple, if present. - /// - /// For example, "fooos1.2.3" would return (1, 2, 3). - /// - /// If an entry is not defined, it will be returned as 0. - void getOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const; - - /// getOSMajorVersion - Return just the major version number, this is - /// specialized because it is a common query. - unsigned getOSMajorVersion() const { - unsigned Maj, Min, Micro; - getOSVersion(Maj, Min, Micro); - return Maj; - } - - /// getMacOSXVersion - Parse the version number as with getOSVersion and then - /// translate generic "darwin" versions to the corresponding OS X versions. - /// This may also be called with IOS triples but the OS X version number is - /// just set to a constant 10.4.0 in that case. Returns true if successful. - bool getMacOSXVersion(unsigned &Major, unsigned &Minor, - unsigned &Micro) const; - - /// getiOSVersion - Parse the version number as with getOSVersion. This should - /// only be called with IOS or generic triples. - void getiOSVersion(unsigned &Major, unsigned &Minor, - unsigned &Micro) const; - - /// getWatchOSVersion - Parse the version number as with getOSVersion. This - /// should only be called with WatchOS or generic triples. - void getWatchOSVersion(unsigned &Major, unsigned &Minor, - unsigned &Micro) const; - - /// @} - /// @name Direct Component Access - /// @{ - - const std::string &str() const { return Data; } - - const std::string &getTriple() const { return Data; } - - /// getArchName - Get the architecture (first) component of the - /// triple. - StringRef getArchName() const; - - /// getVendorName - Get the vendor (second) component of the triple. - StringRef getVendorName() const; - - /// getOSName - Get the operating system (third) component of the - /// triple. - StringRef getOSName() const; - - /// getEnvironmentName - Get the optional environment (fourth) - /// component of the triple, or "" if empty. - StringRef getEnvironmentName() const; - - /// getOSAndEnvironmentName - Get the operating system and optional - /// environment components as a single string (separated by a '-' - /// if the environment component is present). - StringRef getOSAndEnvironmentName() const; - - /// @} - /// @name Convenience Predicates - /// @{ - - /// Test whether the architecture is 64-bit - /// - /// Note that this tests for 64-bit pointer width, and nothing else. Note - /// that we intentionally expose only three predicates, 64-bit, 32-bit, and - /// 16-bit. The inner details of pointer width for particular architectures - /// is not summed up in the triple, and so only a coarse grained predicate - /// system is provided. - bool isArch64Bit() const; - - /// Test whether the architecture is 32-bit - /// - /// Note that this tests for 32-bit pointer width, and nothing else. - bool isArch32Bit() const; - - /// Test whether the architecture is 16-bit - /// - /// Note that this tests for 16-bit pointer width, and nothing else. - bool isArch16Bit() const; - - /// isOSVersionLT - Helper function for doing comparisons against version - /// numbers included in the target triple. - bool isOSVersionLT(unsigned Major, unsigned Minor = 0, - unsigned Micro = 0) const { - unsigned LHS[3]; - getOSVersion(LHS[0], LHS[1], LHS[2]); - - if (LHS[0] != Major) - return LHS[0] < Major; - if (LHS[1] != Minor) - return LHS[1] < Minor; - if (LHS[2] != Micro) - return LHS[1] < Micro; - - return false; - } - - bool isOSVersionLT(const Triple &Other) const { - unsigned RHS[3]; - Other.getOSVersion(RHS[0], RHS[1], RHS[2]); - return isOSVersionLT(RHS[0], RHS[1], RHS[2]); - } - - /// isMacOSXVersionLT - Comparison function for checking OS X version - /// compatibility, which handles supporting skewed version numbering schemes - /// used by the "darwin" triples. - bool isMacOSXVersionLT(unsigned Major, unsigned Minor = 0, - unsigned Micro = 0) const { - assert(isMacOSX() && "Not an OS X triple!"); - - // If this is OS X, expect a sane version number. - if (getOS() == Triple::MacOSX) - return isOSVersionLT(Major, Minor, Micro); - - // Otherwise, compare to the "Darwin" number. - assert(Major == 10 && "Unexpected major version"); - return isOSVersionLT(Minor + 4, Micro, 0); - } - - /// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both - /// "darwin" and "osx" as OS X triples. - bool isMacOSX() const { - return getOS() == Triple::Darwin || getOS() == Triple::MacOSX; - } - - /// Is this an iOS triple. - /// Note: This identifies tvOS as a variant of iOS. If that ever - /// changes, i.e., if the two operating systems diverge or their version - /// numbers get out of sync, that will need to be changed. - /// watchOS has completely different version numbers so it is not included. - bool isiOS() const { - return getOS() == Triple::IOS || isTvOS(); - } - - /// Is this an Apple tvOS triple. - bool isTvOS() const { - return getOS() == Triple::TvOS; - } - - /// Is this an Apple watchOS triple. - bool isWatchOS() const { - return getOS() == Triple::WatchOS; - } - - bool isWatchABI() const { - return getSubArch() == Triple::ARMSubArch_v7k; - } - - /// isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS). - bool isOSDarwin() const { - return isMacOSX() || isiOS() || isWatchOS(); - } - - bool isOSNetBSD() const { - return getOS() == Triple::NetBSD; - } - - bool isOSOpenBSD() const { - return getOS() == Triple::OpenBSD; - } - - bool isOSFreeBSD() const { - return getOS() == Triple::FreeBSD; - } - - bool isOSDragonFly() const { return getOS() == Triple::DragonFly; } - - bool isOSSolaris() const { - return getOS() == Triple::Solaris; - } - - bool isOSBitrig() const { - return getOS() == Triple::Bitrig; - } - - bool isOSIAMCU() const { - return getOS() == Triple::ELFIAMCU; - } - - bool isGNUEnvironment() const { - EnvironmentType Env = getEnvironment(); - return Env == Triple::GNU || Env == Triple::GNUABI64 || - Env == Triple::GNUEABI || Env == Triple::GNUEABIHF || - Env == Triple::GNUX32; - } - - /// Checks if the environment could be MSVC. - bool isWindowsMSVCEnvironment() const { - return getOS() == Triple::Win32 && - (getEnvironment() == Triple::UnknownEnvironment || - getEnvironment() == Triple::MSVC); - } - - /// Checks if the environment is MSVC. - bool isKnownWindowsMSVCEnvironment() const { - return getOS() == Triple::Win32 && getEnvironment() == Triple::MSVC; - } - - bool isWindowsCoreCLREnvironment() const { - return getOS() == Triple::Win32 && getEnvironment() == Triple::CoreCLR; - } - - bool isWindowsItaniumEnvironment() const { - return getOS() == Triple::Win32 && getEnvironment() == Triple::Itanium; - } - - bool isWindowsCygwinEnvironment() const { - return getOS() == Triple::Win32 && getEnvironment() == Triple::Cygnus; - } - - bool isWindowsGNUEnvironment() const { - return getOS() == Triple::Win32 && getEnvironment() == Triple::GNU; - } - - /// Tests for either Cygwin or MinGW OS - bool isOSCygMing() const { - return isWindowsCygwinEnvironment() || isWindowsGNUEnvironment(); - } - - /// Is this a "Windows" OS targeting a "MSVCRT.dll" environment. - bool isOSMSVCRT() const { - return isWindowsMSVCEnvironment() || isWindowsGNUEnvironment() || - isWindowsItaniumEnvironment(); - } - - /// Tests whether the OS is Windows. - bool isOSWindows() const { - return getOS() == Triple::Win32; - } - - /// Tests whether the OS is NaCl (Native Client) - bool isOSNaCl() const { - return getOS() == Triple::NaCl; - } - - /// Tests whether the OS is Linux. - bool isOSLinux() const { - return getOS() == Triple::Linux; - } - - /// Tests whether the OS is kFreeBSD. - bool isOSKFreeBSD() const { - return getOS() == Triple::KFreeBSD; - } - - /// Tests whether the OS uses glibc. - bool isOSGlibc() const { - return getOS() == Triple::Linux || getOS() == Triple::KFreeBSD; - } - - /// Tests whether the OS uses the ELF binary format. - bool isOSBinFormatELF() const { - return getObjectFormat() == Triple::ELF; - } - - /// Tests whether the OS uses the COFF binary format. - bool isOSBinFormatCOFF() const { - return getObjectFormat() == Triple::COFF; - } - - /// Tests whether the environment is MachO. - bool isOSBinFormatMachO() const { - return getObjectFormat() == Triple::MachO; - } - - /// Tests whether the target is the PS4 CPU - bool isPS4CPU() const { - return getArch() == Triple::x86_64 && - getVendor() == Triple::SCEI && - getOS() == Triple::PS4; - } - - /// Tests whether the target is the PS4 platform - bool isPS4() const { - return getVendor() == Triple::SCEI && - getOS() == Triple::PS4; - } - - /// Tests whether the target is Android - bool isAndroid() const { return getEnvironment() == Triple::Android; } - - /// Tests whether the environment is musl-libc - bool isMusl() const { - return getEnvironment() == Triple::Musl || - getEnvironment() == Triple::MuslEABI || - getEnvironment() == Triple::MuslEABIHF; - } - - /// Tests whether the target is NVPTX (32- or 64-bit). - bool isNVPTX() const { - return getArch() == Triple::nvptx || getArch() == Triple::nvptx64; - } - - /// Tests wether the target supports comdat - bool supportsCOMDAT() const { return !isOSBinFormatMachO(); } - - /// @} - /// @name Mutators - /// @{ - - /// setArch - Set the architecture (first) component of the triple - /// to a known type. - void setArch(ArchType Kind); - - /// setVendor - Set the vendor (second) component of the triple to a - /// known type. - void setVendor(VendorType Kind); - - /// setOS - Set the operating system (third) component of the triple - /// to a known type. - void setOS(OSType Kind); - - /// setEnvironment - Set the environment (fourth) component of the triple - /// to a known type. - void setEnvironment(EnvironmentType Kind); - - /// setObjectFormat - Set the object file format - void setObjectFormat(ObjectFormatType Kind); - - /// setTriple - Set all components to the new triple \p Str. - void setTriple(const Twine &Str); - - /// setArchName - Set the architecture (first) component of the - /// triple by name. - void setArchName(StringRef Str); - - /// setVendorName - Set the vendor (second) component of the triple - /// by name. - void setVendorName(StringRef Str); - - /// setOSName - Set the operating system (third) component of the - /// triple by name. - void setOSName(StringRef Str); - - /// setEnvironmentName - Set the optional environment (fourth) - /// component of the triple by name. - void setEnvironmentName(StringRef Str); - - /// setOSAndEnvironmentName - Set the operating system and optional - /// environment components with a single string. - void setOSAndEnvironmentName(StringRef Str); - - /// @} - /// @name Helpers to build variants of a particular triple. - /// @{ - - /// Form a triple with a 32-bit variant of the current architecture. - /// - /// This can be used to move across "families" of architectures where useful. - /// - /// \returns A new triple with a 32-bit architecture or an unknown - /// architecture if no such variant can be found. - llvm::Triple get32BitArchVariant() const; - - /// Form a triple with a 64-bit variant of the current architecture. - /// - /// This can be used to move across "families" of architectures where useful. - /// - /// \returns A new triple with a 64-bit architecture or an unknown - /// architecture if no such variant can be found. - llvm::Triple get64BitArchVariant() const; - - /// Form a triple with a big endian variant of the current architecture. - /// - /// This can be used to move across "families" of architectures where useful. - /// - /// \returns A new triple with a big endian architecture or an unknown - /// architecture if no such variant can be found. - llvm::Triple getBigEndianArchVariant() const; - - /// Form a triple with a little endian variant of the current architecture. - /// - /// This can be used to move across "families" of architectures where useful. - /// - /// \returns A new triple with a little endian architecture or an unknown - /// architecture if no such variant can be found. - llvm::Triple getLittleEndianArchVariant() const; - - /// Get the (LLVM) name of the minimum ARM CPU for the arch we are targeting. - /// - /// \param Arch the architecture name (e.g., "armv7s"). If it is an empty - /// string then the triple's arch name is used. - StringRef getARMCPUForArch(StringRef Arch = StringRef()) const; - - /// Tests whether the target triple is little endian. - /// - /// \returns true if the triple is little endian, false otherwise. - bool isLittleEndian() const; - - /// @} - /// @name Static helpers for IDs. - /// @{ - - /// getArchTypeName - Get the canonical name for the \p Kind architecture. - static const char *getArchTypeName(ArchType Kind); - - /// getArchTypePrefix - Get the "prefix" canonical name for the \p Kind - /// architecture. This is the prefix used by the architecture specific - /// builtins, and is suitable for passing to \see - /// Intrinsic::getIntrinsicForGCCBuiltin(). - /// - /// \return - The architecture prefix, or 0 if none is defined. - static const char *getArchTypePrefix(ArchType Kind); - - /// getVendorTypeName - Get the canonical name for the \p Kind vendor. - static const char *getVendorTypeName(VendorType Kind); - - /// getOSTypeName - Get the canonical name for the \p Kind operating system. - static const char *getOSTypeName(OSType Kind); - - /// getEnvironmentTypeName - Get the canonical name for the \p Kind - /// environment. - static const char *getEnvironmentTypeName(EnvironmentType Kind); - - /// @} - /// @name Static helpers for converting alternate architecture names. - /// @{ - - /// getArchTypeForLLVMName - The canonical type for the given LLVM - /// architecture name (e.g., "x86"). - static ArchType getArchTypeForLLVMName(StringRef Str); - - /// @} -}; - -} // End llvm namespace - - -#endif diff --git a/llvm/include/llvm/ADT/Twine.h b/llvm/include/llvm/ADT/Twine.h deleted file mode 100644 index 81b1a6d9..00000000 --- a/llvm/include/llvm/ADT/Twine.h +++ /dev/null @@ -1,540 +0,0 @@ -//===-- Twine.h - Fast Temporary String Concatenation -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_TWINE_H -#define LLVM_ADT_TWINE_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" -#include -#include - -namespace llvm { - class raw_ostream; - - /// Twine - A lightweight data structure for efficiently representing the - /// concatenation of temporary values as strings. - /// - /// A Twine is a kind of rope, it represents a concatenated string using a - /// binary-tree, where the string is the preorder of the nodes. Since the - /// Twine can be efficiently rendered into a buffer when its result is used, - /// it avoids the cost of generating temporary values for intermediate string - /// results -- particularly in cases when the Twine result is never - /// required. By explicitly tracking the type of leaf nodes, we can also avoid - /// the creation of temporary strings for conversions operations (such as - /// appending an integer to a string). - /// - /// A Twine is not intended for use directly and should not be stored, its - /// implementation relies on the ability to store pointers to temporary stack - /// objects which may be deallocated at the end of a statement. Twines should - /// only be used accepted as const references in arguments, when an API wishes - /// to accept possibly-concatenated strings. - /// - /// Twines support a special 'null' value, which always concatenates to form - /// itself, and renders as an empty string. This can be returned from APIs to - /// effectively nullify any concatenations performed on the result. - /// - /// \b Implementation - /// - /// Given the nature of a Twine, it is not possible for the Twine's - /// concatenation method to construct interior nodes; the result must be - /// represented inside the returned value. For this reason a Twine object - /// actually holds two values, the left- and right-hand sides of a - /// concatenation. We also have nullary Twine objects, which are effectively - /// sentinel values that represent empty strings. - /// - /// Thus, a Twine can effectively have zero, one, or two children. The \see - /// isNullary(), \see isUnary(), and \see isBinary() predicates exist for - /// testing the number of children. - /// - /// We maintain a number of invariants on Twine objects (FIXME: Why): - /// - Nullary twines are always represented with their Kind on the left-hand - /// side, and the Empty kind on the right-hand side. - /// - Unary twines are always represented with the value on the left-hand - /// side, and the Empty kind on the right-hand side. - /// - If a Twine has another Twine as a child, that child should always be - /// binary (otherwise it could have been folded into the parent). - /// - /// These invariants are check by \see isValid(). - /// - /// \b Efficiency Considerations - /// - /// The Twine is designed to yield efficient and small code for common - /// situations. For this reason, the concat() method is inlined so that - /// concatenations of leaf nodes can be optimized into stores directly into a - /// single stack allocated object. - /// - /// In practice, not all compilers can be trusted to optimize concat() fully, - /// so we provide two additional methods (and accompanying operator+ - /// overloads) to guarantee that particularly important cases (cstring plus - /// StringRef) codegen as desired. - class Twine { - /// NodeKind - Represent the type of an argument. - enum NodeKind : unsigned char { - /// An empty string; the result of concatenating anything with it is also - /// empty. - NullKind, - - /// The empty string. - EmptyKind, - - /// A pointer to a Twine instance. - TwineKind, - - /// A pointer to a C string instance. - CStringKind, - - /// A pointer to an std::string instance. - StdStringKind, - - /// A pointer to a StringRef instance. - StringRefKind, - - /// A pointer to a SmallString instance. - SmallStringKind, - - /// A char value, to render as a character. - CharKind, - - /// An unsigned int value, to render as an unsigned decimal integer. - DecUIKind, - - /// An int value, to render as a signed decimal integer. - DecIKind, - - /// A pointer to an unsigned long value, to render as an unsigned decimal - /// integer. - DecULKind, - - /// A pointer to a long value, to render as a signed decimal integer. - DecLKind, - - /// A pointer to an unsigned long long value, to render as an unsigned - /// decimal integer. - DecULLKind, - - /// A pointer to a long long value, to render as a signed decimal integer. - DecLLKind, - - /// A pointer to a uint64_t value, to render as an unsigned hexadecimal - /// integer. - UHexKind - }; - - union Child - { - const Twine *twine; - const char *cString; - const std::string *stdString; - const StringRef *stringRef; - const SmallVectorImpl *smallString; - char character; - unsigned int decUI; - int decI; - const unsigned long *decUL; - const long *decL; - const unsigned long long *decULL; - const long long *decLL; - const uint64_t *uHex; - }; - - private: - /// LHS - The prefix in the concatenation, which may be uninitialized for - /// Null or Empty kinds. - Child LHS; - /// RHS - The suffix in the concatenation, which may be uninitialized for - /// Null or Empty kinds. - Child RHS; - /// LHSKind - The NodeKind of the left hand side, \see getLHSKind(). - NodeKind LHSKind; - /// RHSKind - The NodeKind of the right hand side, \see getRHSKind(). - NodeKind RHSKind; - - private: - /// Construct a nullary twine; the kind must be NullKind or EmptyKind. - explicit Twine(NodeKind Kind) - : LHSKind(Kind), RHSKind(EmptyKind) { - assert(isNullary() && "Invalid kind!"); - } - - /// Construct a binary twine. - explicit Twine(const Twine &LHS, const Twine &RHS) - : LHSKind(TwineKind), RHSKind(TwineKind) { - this->LHS.twine = &LHS; - this->RHS.twine = &RHS; - assert(isValid() && "Invalid twine!"); - } - - /// Construct a twine from explicit values. - explicit Twine(Child LHS, NodeKind LHSKind, Child RHS, NodeKind RHSKind) - : LHS(LHS), RHS(RHS), LHSKind(LHSKind), RHSKind(RHSKind) { - assert(isValid() && "Invalid twine!"); - } - - /// Since the intended use of twines is as temporary objects, assignments - /// when concatenating might cause undefined behavior or stack corruptions - Twine &operator=(const Twine &Other) = delete; - - /// Check for the null twine. - bool isNull() const { - return getLHSKind() == NullKind; - } - - /// Check for the empty twine. - bool isEmpty() const { - return getLHSKind() == EmptyKind; - } - - /// Check if this is a nullary twine (null or empty). - bool isNullary() const { - return isNull() || isEmpty(); - } - - /// Check if this is a unary twine. - bool isUnary() const { - return getRHSKind() == EmptyKind && !isNullary(); - } - - /// Check if this is a binary twine. - bool isBinary() const { - return getLHSKind() != NullKind && getRHSKind() != EmptyKind; - } - - /// Check if this is a valid twine (satisfying the invariants on - /// order and number of arguments). - bool isValid() const { - // Nullary twines always have Empty on the RHS. - if (isNullary() && getRHSKind() != EmptyKind) - return false; - - // Null should never appear on the RHS. - if (getRHSKind() == NullKind) - return false; - - // The RHS cannot be non-empty if the LHS is empty. - if (getRHSKind() != EmptyKind && getLHSKind() == EmptyKind) - return false; - - // A twine child should always be binary. - if (getLHSKind() == TwineKind && - !LHS.twine->isBinary()) - return false; - if (getRHSKind() == TwineKind && - !RHS.twine->isBinary()) - return false; - - return true; - } - - /// Get the NodeKind of the left-hand side. - NodeKind getLHSKind() const { return LHSKind; } - - /// Get the NodeKind of the right-hand side. - NodeKind getRHSKind() const { return RHSKind; } - - /// Print one child from a twine. - void printOneChild(raw_ostream &OS, Child Ptr, NodeKind Kind) const; - - /// Print the representation of one child from a twine. - void printOneChildRepr(raw_ostream &OS, Child Ptr, - NodeKind Kind) const; - - public: - /// @name Constructors - /// @{ - - /// Construct from an empty string. - /*implicit*/ Twine() : LHSKind(EmptyKind), RHSKind(EmptyKind) { - assert(isValid() && "Invalid twine!"); - } - - Twine(const Twine &) = default; - - /// Construct from a C string. - /// - /// We take care here to optimize "" into the empty twine -- this will be - /// optimized out for string constants. This allows Twine arguments have - /// default "" values, without introducing unnecessary string constants. - /*implicit*/ Twine(const char *Str) - : RHSKind(EmptyKind) { - if (Str[0] != '\0') { - LHS.cString = Str; - LHSKind = CStringKind; - } else - LHSKind = EmptyKind; - - assert(isValid() && "Invalid twine!"); - } - - /// Construct from an std::string. - /*implicit*/ Twine(const std::string &Str) - : LHSKind(StdStringKind), RHSKind(EmptyKind) { - LHS.stdString = &Str; - assert(isValid() && "Invalid twine!"); - } - - /// Construct from a StringRef. - /*implicit*/ Twine(const StringRef &Str) - : LHSKind(StringRefKind), RHSKind(EmptyKind) { - LHS.stringRef = &Str; - assert(isValid() && "Invalid twine!"); - } - - /// Construct from a SmallString. - /*implicit*/ Twine(const SmallVectorImpl &Str) - : LHSKind(SmallStringKind), RHSKind(EmptyKind) { - LHS.smallString = &Str; - assert(isValid() && "Invalid twine!"); - } - - /// Construct from a char. - explicit Twine(char Val) - : LHSKind(CharKind), RHSKind(EmptyKind) { - LHS.character = Val; - } - - /// Construct from a signed char. - explicit Twine(signed char Val) - : LHSKind(CharKind), RHSKind(EmptyKind) { - LHS.character = static_cast(Val); - } - - /// Construct from an unsigned char. - explicit Twine(unsigned char Val) - : LHSKind(CharKind), RHSKind(EmptyKind) { - LHS.character = static_cast(Val); - } - - /// Construct a twine to print \p Val as an unsigned decimal integer. - explicit Twine(unsigned Val) - : LHSKind(DecUIKind), RHSKind(EmptyKind) { - LHS.decUI = Val; - } - - /// Construct a twine to print \p Val as a signed decimal integer. - explicit Twine(int Val) - : LHSKind(DecIKind), RHSKind(EmptyKind) { - LHS.decI = Val; - } - - /// Construct a twine to print \p Val as an unsigned decimal integer. - explicit Twine(const unsigned long &Val) - : LHSKind(DecULKind), RHSKind(EmptyKind) { - LHS.decUL = &Val; - } - - /// Construct a twine to print \p Val as a signed decimal integer. - explicit Twine(const long &Val) - : LHSKind(DecLKind), RHSKind(EmptyKind) { - LHS.decL = &Val; - } - - /// Construct a twine to print \p Val as an unsigned decimal integer. - explicit Twine(const unsigned long long &Val) - : LHSKind(DecULLKind), RHSKind(EmptyKind) { - LHS.decULL = &Val; - } - - /// Construct a twine to print \p Val as a signed decimal integer. - explicit Twine(const long long &Val) - : LHSKind(DecLLKind), RHSKind(EmptyKind) { - LHS.decLL = &Val; - } - - // FIXME: Unfortunately, to make sure this is as efficient as possible we - // need extra binary constructors from particular types. We can't rely on - // the compiler to be smart enough to fold operator+()/concat() down to the - // right thing. Yet. - - /// Construct as the concatenation of a C string and a StringRef. - /*implicit*/ Twine(const char *LHS, const StringRef &RHS) - : LHSKind(CStringKind), RHSKind(StringRefKind) { - this->LHS.cString = LHS; - this->RHS.stringRef = &RHS; - assert(isValid() && "Invalid twine!"); - } - - /// Construct as the concatenation of a StringRef and a C string. - /*implicit*/ Twine(const StringRef &LHS, const char *RHS) - : LHSKind(StringRefKind), RHSKind(CStringKind) { - this->LHS.stringRef = &LHS; - this->RHS.cString = RHS; - assert(isValid() && "Invalid twine!"); - } - - /// Create a 'null' string, which is an empty string that always - /// concatenates to form another empty string. - static Twine createNull() { - return Twine(NullKind); - } - - /// @} - /// @name Numeric Conversions - /// @{ - - // Construct a twine to print \p Val as an unsigned hexadecimal integer. - static Twine utohexstr(const uint64_t &Val) { - Child LHS, RHS; - LHS.uHex = &Val; - RHS.twine = nullptr; - return Twine(LHS, UHexKind, RHS, EmptyKind); - } - - /// @} - /// @name Predicate Operations - /// @{ - - /// Check if this twine is trivially empty; a false return value does not - /// necessarily mean the twine is empty. - bool isTriviallyEmpty() const { - return isNullary(); - } - - /// Return true if this twine can be dynamically accessed as a single - /// StringRef value with getSingleStringRef(). - bool isSingleStringRef() const { - if (getRHSKind() != EmptyKind) return false; - - switch (getLHSKind()) { - case EmptyKind: - case CStringKind: - case StdStringKind: - case StringRefKind: - case SmallStringKind: - return true; - default: - return false; - } - } - - /// @} - /// @name String Operations - /// @{ - - Twine concat(const Twine &Suffix) const; - - /// @} - /// @name Output & Conversion. - /// @{ - - /// Return the twine contents as a std::string. - std::string str() const; - - /// Append the concatenated string into the given SmallString or SmallVector. - void toVector(SmallVectorImpl &Out) const; - - /// This returns the twine as a single StringRef. This method is only valid - /// if isSingleStringRef() is true. - StringRef getSingleStringRef() const { - assert(isSingleStringRef() &&"This cannot be had as a single stringref!"); - switch (getLHSKind()) { - default: llvm_unreachable("Out of sync with isSingleStringRef"); - case EmptyKind: return StringRef(); - case CStringKind: return StringRef(LHS.cString); - case StdStringKind: return StringRef(*LHS.stdString); - case StringRefKind: return *LHS.stringRef; - case SmallStringKind: - return StringRef(LHS.smallString->data(), LHS.smallString->size()); - } - } - - /// This returns the twine as a single StringRef if it can be - /// represented as such. Otherwise the twine is written into the given - /// SmallVector and a StringRef to the SmallVector's data is returned. - StringRef toStringRef(SmallVectorImpl &Out) const { - if (isSingleStringRef()) - return getSingleStringRef(); - toVector(Out); - return StringRef(Out.data(), Out.size()); - } - - /// This returns the twine as a single null terminated StringRef if it - /// can be represented as such. Otherwise the twine is written into the - /// given SmallVector and a StringRef to the SmallVector's data is returned. - /// - /// The returned StringRef's size does not include the null terminator. - StringRef toNullTerminatedStringRef(SmallVectorImpl &Out) const; - - /// Write the concatenated string represented by this twine to the - /// stream \p OS. - void print(raw_ostream &OS) const; - - /// Dump the concatenated string represented by this twine to stderr. - void dump() const; - - /// Write the representation of this twine to the stream \p OS. - void printRepr(raw_ostream &OS) const; - - /// Dump the representation of this twine to stderr. - void dumpRepr() const; - - /// @} - }; - - /// @name Twine Inline Implementations - /// @{ - - inline Twine Twine::concat(const Twine &Suffix) const { - // Concatenation with null is null. - if (isNull() || Suffix.isNull()) - return Twine(NullKind); - - // Concatenation with empty yields the other side. - if (isEmpty()) - return Suffix; - if (Suffix.isEmpty()) - return *this; - - // Otherwise we need to create a new node, taking care to fold in unary - // twines. - Child NewLHS, NewRHS; - NewLHS.twine = this; - NewRHS.twine = &Suffix; - NodeKind NewLHSKind = TwineKind, NewRHSKind = TwineKind; - if (isUnary()) { - NewLHS = LHS; - NewLHSKind = getLHSKind(); - } - if (Suffix.isUnary()) { - NewRHS = Suffix.LHS; - NewRHSKind = Suffix.getLHSKind(); - } - - return Twine(NewLHS, NewLHSKind, NewRHS, NewRHSKind); - } - - inline Twine operator+(const Twine &LHS, const Twine &RHS) { - return LHS.concat(RHS); - } - - /// Additional overload to guarantee simplified codegen; this is equivalent to - /// concat(). - - inline Twine operator+(const char *LHS, const StringRef &RHS) { - return Twine(LHS, RHS); - } - - /// Additional overload to guarantee simplified codegen; this is equivalent to - /// concat(). - - inline Twine operator+(const StringRef &LHS, const char *RHS) { - return Twine(LHS, RHS); - } - - inline raw_ostream &operator<<(raw_ostream &OS, const Twine &RHS) { - RHS.print(OS); - return OS; - } - - /// @} -} - -#endif diff --git a/llvm/include/llvm/ADT/UniqueVector.h b/llvm/include/llvm/ADT/UniqueVector.h deleted file mode 100644 index e1ab4b56..00000000 --- a/llvm/include/llvm/ADT/UniqueVector.h +++ /dev/null @@ -1,107 +0,0 @@ -//===-- llvm/ADT/UniqueVector.h ---------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_UNIQUEVECTOR_H -#define LLVM_ADT_UNIQUEVECTOR_H - -#include -#include -#include -#include - -namespace llvm { - -//===----------------------------------------------------------------------===// -/// UniqueVector - This class produces a sequential ID number (base 1) for each -/// unique entry that is added. T is the type of entries in the vector. This -/// class should have an implementation of operator== and of operator<. -/// Entries can be fetched using operator[] with the entry ID. -template class UniqueVector { -public: - typedef typename std::vector VectorType; - typedef typename VectorType::iterator iterator; - typedef typename VectorType::const_iterator const_iterator; - -private: - // Map - Used to handle the correspondence of entry to ID. - std::map Map; - - // Vector - ID ordered vector of entries. Entries can be indexed by ID - 1. - // - VectorType Vector; - -public: - /// insert - Append entry to the vector if it doesn't already exist. Returns - /// the entry's index + 1 to be used as a unique ID. - unsigned insert(const T &Entry) { - // Check if the entry is already in the map. - unsigned &Val = Map[Entry]; - - // See if entry exists, if so return prior ID. - if (Val) return Val; - - // Compute ID for entry. - Val = static_cast(Vector.size()) + 1; - - // Insert in vector. - Vector.push_back(Entry); - return Val; - } - - /// idFor - return the ID for an existing entry. Returns 0 if the entry is - /// not found. - unsigned idFor(const T &Entry) const { - // Search for entry in the map. - typename std::map::const_iterator MI = Map.find(Entry); - - // See if entry exists, if so return ID. - if (MI != Map.end()) return MI->second; - - // No luck. - return 0; - } - - /// operator[] - Returns a reference to the entry with the specified ID. - /// - const T &operator[](unsigned ID) const { - assert(ID-1 < size() && "ID is 0 or out of range!"); - return Vector[ID - 1]; - } - - /// \brief Return an iterator to the start of the vector. - iterator begin() { return Vector.begin(); } - - /// \brief Return an iterator to the start of the vector. - const_iterator begin() const { return Vector.begin(); } - - /// \brief Return an iterator to the end of the vector. - iterator end() { return Vector.end(); } - - /// \brief Return an iterator to the end of the vector. - const_iterator end() const { return Vector.end(); } - - /// size - Returns the number of entries in the vector. - /// - size_t size() const { return Vector.size(); } - - /// empty - Returns true if the vector is empty. - /// - bool empty() const { return Vector.empty(); } - - /// reset - Clears all the entries. - /// - void reset() { - Map.clear(); - Vector.resize(0, 0); - } -}; - -} // End of namespace llvm - -#endif // LLVM_ADT_UNIQUEVECTOR_H diff --git a/llvm/include/llvm/ADT/VariadicFunction.h b/llvm/include/llvm/ADT/VariadicFunction.h deleted file mode 100644 index 403130c6..00000000 --- a/llvm/include/llvm/ADT/VariadicFunction.h +++ /dev/null @@ -1,331 +0,0 @@ -//===--- VariadicFunctions.h - Variadic Functions ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements compile-time type-safe variadic functions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_VARIADICFUNCTION_H -#define LLVM_ADT_VARIADICFUNCTION_H - -#include "llvm/ADT/ArrayRef.h" - -namespace llvm { - -// Define macros to aid in expanding a comma separated series with the index of -// the series pasted onto the last token. -#define LLVM_COMMA_JOIN1(x) x ## 0 -#define LLVM_COMMA_JOIN2(x) LLVM_COMMA_JOIN1(x), x ## 1 -#define LLVM_COMMA_JOIN3(x) LLVM_COMMA_JOIN2(x), x ## 2 -#define LLVM_COMMA_JOIN4(x) LLVM_COMMA_JOIN3(x), x ## 3 -#define LLVM_COMMA_JOIN5(x) LLVM_COMMA_JOIN4(x), x ## 4 -#define LLVM_COMMA_JOIN6(x) LLVM_COMMA_JOIN5(x), x ## 5 -#define LLVM_COMMA_JOIN7(x) LLVM_COMMA_JOIN6(x), x ## 6 -#define LLVM_COMMA_JOIN8(x) LLVM_COMMA_JOIN7(x), x ## 7 -#define LLVM_COMMA_JOIN9(x) LLVM_COMMA_JOIN8(x), x ## 8 -#define LLVM_COMMA_JOIN10(x) LLVM_COMMA_JOIN9(x), x ## 9 -#define LLVM_COMMA_JOIN11(x) LLVM_COMMA_JOIN10(x), x ## 10 -#define LLVM_COMMA_JOIN12(x) LLVM_COMMA_JOIN11(x), x ## 11 -#define LLVM_COMMA_JOIN13(x) LLVM_COMMA_JOIN12(x), x ## 12 -#define LLVM_COMMA_JOIN14(x) LLVM_COMMA_JOIN13(x), x ## 13 -#define LLVM_COMMA_JOIN15(x) LLVM_COMMA_JOIN14(x), x ## 14 -#define LLVM_COMMA_JOIN16(x) LLVM_COMMA_JOIN15(x), x ## 15 -#define LLVM_COMMA_JOIN17(x) LLVM_COMMA_JOIN16(x), x ## 16 -#define LLVM_COMMA_JOIN18(x) LLVM_COMMA_JOIN17(x), x ## 17 -#define LLVM_COMMA_JOIN19(x) LLVM_COMMA_JOIN18(x), x ## 18 -#define LLVM_COMMA_JOIN20(x) LLVM_COMMA_JOIN19(x), x ## 19 -#define LLVM_COMMA_JOIN21(x) LLVM_COMMA_JOIN20(x), x ## 20 -#define LLVM_COMMA_JOIN22(x) LLVM_COMMA_JOIN21(x), x ## 21 -#define LLVM_COMMA_JOIN23(x) LLVM_COMMA_JOIN22(x), x ## 22 -#define LLVM_COMMA_JOIN24(x) LLVM_COMMA_JOIN23(x), x ## 23 -#define LLVM_COMMA_JOIN25(x) LLVM_COMMA_JOIN24(x), x ## 24 -#define LLVM_COMMA_JOIN26(x) LLVM_COMMA_JOIN25(x), x ## 25 -#define LLVM_COMMA_JOIN27(x) LLVM_COMMA_JOIN26(x), x ## 26 -#define LLVM_COMMA_JOIN28(x) LLVM_COMMA_JOIN27(x), x ## 27 -#define LLVM_COMMA_JOIN29(x) LLVM_COMMA_JOIN28(x), x ## 28 -#define LLVM_COMMA_JOIN30(x) LLVM_COMMA_JOIN29(x), x ## 29 -#define LLVM_COMMA_JOIN31(x) LLVM_COMMA_JOIN30(x), x ## 30 -#define LLVM_COMMA_JOIN32(x) LLVM_COMMA_JOIN31(x), x ## 31 - -/// \brief Class which can simulate a type-safe variadic function. -/// -/// The VariadicFunction class template makes it easy to define -/// type-safe variadic functions where all arguments have the same -/// type. -/// -/// Suppose we need a variadic function like this: -/// -/// ResultT Foo(const ArgT &A_0, const ArgT &A_1, ..., const ArgT &A_N); -/// -/// Instead of many overloads of Foo(), we only need to define a helper -/// function that takes an array of arguments: -/// -/// ResultT FooImpl(ArrayRef Args) { -/// // 'Args[i]' is a pointer to the i-th argument passed to Foo(). -/// ... -/// } -/// -/// and then define Foo() like this: -/// -/// const VariadicFunction Foo; -/// -/// VariadicFunction takes care of defining the overloads of Foo(). -/// -/// Actually, Foo is a function object (i.e. functor) instead of a plain -/// function. This object is stateless and its constructor/destructor -/// does nothing, so it's safe to create global objects and call Foo(...) at -/// any time. -/// -/// Sometimes we need a variadic function to have some fixed leading -/// arguments whose types may be different from that of the optional -/// arguments. For example: -/// -/// bool FullMatch(const StringRef &S, const RE &Regex, -/// const ArgT &A_0, ..., const ArgT &A_N); -/// -/// VariadicFunctionN is for such cases, where N is the number of fixed -/// arguments. It is like VariadicFunction, except that it takes N more -/// template arguments for the types of the fixed arguments: -/// -/// bool FullMatchImpl(const StringRef &S, const RE &Regex, -/// ArrayRef Args) { ... } -/// const VariadicFunction2 -/// FullMatch; -/// -/// Currently VariadicFunction and friends support up-to 3 -/// fixed leading arguments and up-to 32 optional arguments. -template )> -struct VariadicFunction { - ResultT operator()() const { - return Func(None); - } - -#define LLVM_DEFINE_OVERLOAD(N) \ - ResultT operator()(LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \ - const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \ - return Func(makeArrayRef(Args)); \ - } - LLVM_DEFINE_OVERLOAD(1) - LLVM_DEFINE_OVERLOAD(2) - LLVM_DEFINE_OVERLOAD(3) - LLVM_DEFINE_OVERLOAD(4) - LLVM_DEFINE_OVERLOAD(5) - LLVM_DEFINE_OVERLOAD(6) - LLVM_DEFINE_OVERLOAD(7) - LLVM_DEFINE_OVERLOAD(8) - LLVM_DEFINE_OVERLOAD(9) - LLVM_DEFINE_OVERLOAD(10) - LLVM_DEFINE_OVERLOAD(11) - LLVM_DEFINE_OVERLOAD(12) - LLVM_DEFINE_OVERLOAD(13) - LLVM_DEFINE_OVERLOAD(14) - LLVM_DEFINE_OVERLOAD(15) - LLVM_DEFINE_OVERLOAD(16) - LLVM_DEFINE_OVERLOAD(17) - LLVM_DEFINE_OVERLOAD(18) - LLVM_DEFINE_OVERLOAD(19) - LLVM_DEFINE_OVERLOAD(20) - LLVM_DEFINE_OVERLOAD(21) - LLVM_DEFINE_OVERLOAD(22) - LLVM_DEFINE_OVERLOAD(23) - LLVM_DEFINE_OVERLOAD(24) - LLVM_DEFINE_OVERLOAD(25) - LLVM_DEFINE_OVERLOAD(26) - LLVM_DEFINE_OVERLOAD(27) - LLVM_DEFINE_OVERLOAD(28) - LLVM_DEFINE_OVERLOAD(29) - LLVM_DEFINE_OVERLOAD(30) - LLVM_DEFINE_OVERLOAD(31) - LLVM_DEFINE_OVERLOAD(32) -#undef LLVM_DEFINE_OVERLOAD -}; - -template )> -struct VariadicFunction1 { - ResultT operator()(Param0T P0) const { - return Func(P0, None); - } - -#define LLVM_DEFINE_OVERLOAD(N) \ - ResultT operator()(Param0T P0, LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \ - const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \ - return Func(P0, makeArrayRef(Args)); \ - } - LLVM_DEFINE_OVERLOAD(1) - LLVM_DEFINE_OVERLOAD(2) - LLVM_DEFINE_OVERLOAD(3) - LLVM_DEFINE_OVERLOAD(4) - LLVM_DEFINE_OVERLOAD(5) - LLVM_DEFINE_OVERLOAD(6) - LLVM_DEFINE_OVERLOAD(7) - LLVM_DEFINE_OVERLOAD(8) - LLVM_DEFINE_OVERLOAD(9) - LLVM_DEFINE_OVERLOAD(10) - LLVM_DEFINE_OVERLOAD(11) - LLVM_DEFINE_OVERLOAD(12) - LLVM_DEFINE_OVERLOAD(13) - LLVM_DEFINE_OVERLOAD(14) - LLVM_DEFINE_OVERLOAD(15) - LLVM_DEFINE_OVERLOAD(16) - LLVM_DEFINE_OVERLOAD(17) - LLVM_DEFINE_OVERLOAD(18) - LLVM_DEFINE_OVERLOAD(19) - LLVM_DEFINE_OVERLOAD(20) - LLVM_DEFINE_OVERLOAD(21) - LLVM_DEFINE_OVERLOAD(22) - LLVM_DEFINE_OVERLOAD(23) - LLVM_DEFINE_OVERLOAD(24) - LLVM_DEFINE_OVERLOAD(25) - LLVM_DEFINE_OVERLOAD(26) - LLVM_DEFINE_OVERLOAD(27) - LLVM_DEFINE_OVERLOAD(28) - LLVM_DEFINE_OVERLOAD(29) - LLVM_DEFINE_OVERLOAD(30) - LLVM_DEFINE_OVERLOAD(31) - LLVM_DEFINE_OVERLOAD(32) -#undef LLVM_DEFINE_OVERLOAD -}; - -template )> -struct VariadicFunction2 { - ResultT operator()(Param0T P0, Param1T P1) const { - return Func(P0, P1, None); - } - -#define LLVM_DEFINE_OVERLOAD(N) \ - ResultT operator()(Param0T P0, Param1T P1, \ - LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \ - const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \ - return Func(P0, P1, makeArrayRef(Args)); \ - } - LLVM_DEFINE_OVERLOAD(1) - LLVM_DEFINE_OVERLOAD(2) - LLVM_DEFINE_OVERLOAD(3) - LLVM_DEFINE_OVERLOAD(4) - LLVM_DEFINE_OVERLOAD(5) - LLVM_DEFINE_OVERLOAD(6) - LLVM_DEFINE_OVERLOAD(7) - LLVM_DEFINE_OVERLOAD(8) - LLVM_DEFINE_OVERLOAD(9) - LLVM_DEFINE_OVERLOAD(10) - LLVM_DEFINE_OVERLOAD(11) - LLVM_DEFINE_OVERLOAD(12) - LLVM_DEFINE_OVERLOAD(13) - LLVM_DEFINE_OVERLOAD(14) - LLVM_DEFINE_OVERLOAD(15) - LLVM_DEFINE_OVERLOAD(16) - LLVM_DEFINE_OVERLOAD(17) - LLVM_DEFINE_OVERLOAD(18) - LLVM_DEFINE_OVERLOAD(19) - LLVM_DEFINE_OVERLOAD(20) - LLVM_DEFINE_OVERLOAD(21) - LLVM_DEFINE_OVERLOAD(22) - LLVM_DEFINE_OVERLOAD(23) - LLVM_DEFINE_OVERLOAD(24) - LLVM_DEFINE_OVERLOAD(25) - LLVM_DEFINE_OVERLOAD(26) - LLVM_DEFINE_OVERLOAD(27) - LLVM_DEFINE_OVERLOAD(28) - LLVM_DEFINE_OVERLOAD(29) - LLVM_DEFINE_OVERLOAD(30) - LLVM_DEFINE_OVERLOAD(31) - LLVM_DEFINE_OVERLOAD(32) -#undef LLVM_DEFINE_OVERLOAD -}; - -template )> -struct VariadicFunction3 { - ResultT operator()(Param0T P0, Param1T P1, Param2T P2) const { - return Func(P0, P1, P2, None); - } - -#define LLVM_DEFINE_OVERLOAD(N) \ - ResultT operator()(Param0T P0, Param1T P1, Param2T P2, \ - LLVM_COMMA_JOIN ## N(const ArgT &A)) const { \ - const ArgT *const Args[] = { LLVM_COMMA_JOIN ## N(&A) }; \ - return Func(P0, P1, P2, makeArrayRef(Args)); \ - } - LLVM_DEFINE_OVERLOAD(1) - LLVM_DEFINE_OVERLOAD(2) - LLVM_DEFINE_OVERLOAD(3) - LLVM_DEFINE_OVERLOAD(4) - LLVM_DEFINE_OVERLOAD(5) - LLVM_DEFINE_OVERLOAD(6) - LLVM_DEFINE_OVERLOAD(7) - LLVM_DEFINE_OVERLOAD(8) - LLVM_DEFINE_OVERLOAD(9) - LLVM_DEFINE_OVERLOAD(10) - LLVM_DEFINE_OVERLOAD(11) - LLVM_DEFINE_OVERLOAD(12) - LLVM_DEFINE_OVERLOAD(13) - LLVM_DEFINE_OVERLOAD(14) - LLVM_DEFINE_OVERLOAD(15) - LLVM_DEFINE_OVERLOAD(16) - LLVM_DEFINE_OVERLOAD(17) - LLVM_DEFINE_OVERLOAD(18) - LLVM_DEFINE_OVERLOAD(19) - LLVM_DEFINE_OVERLOAD(20) - LLVM_DEFINE_OVERLOAD(21) - LLVM_DEFINE_OVERLOAD(22) - LLVM_DEFINE_OVERLOAD(23) - LLVM_DEFINE_OVERLOAD(24) - LLVM_DEFINE_OVERLOAD(25) - LLVM_DEFINE_OVERLOAD(26) - LLVM_DEFINE_OVERLOAD(27) - LLVM_DEFINE_OVERLOAD(28) - LLVM_DEFINE_OVERLOAD(29) - LLVM_DEFINE_OVERLOAD(30) - LLVM_DEFINE_OVERLOAD(31) - LLVM_DEFINE_OVERLOAD(32) -#undef LLVM_DEFINE_OVERLOAD -}; - -// Cleanup the macro namespace. -#undef LLVM_COMMA_JOIN1 -#undef LLVM_COMMA_JOIN2 -#undef LLVM_COMMA_JOIN3 -#undef LLVM_COMMA_JOIN4 -#undef LLVM_COMMA_JOIN5 -#undef LLVM_COMMA_JOIN6 -#undef LLVM_COMMA_JOIN7 -#undef LLVM_COMMA_JOIN8 -#undef LLVM_COMMA_JOIN9 -#undef LLVM_COMMA_JOIN10 -#undef LLVM_COMMA_JOIN11 -#undef LLVM_COMMA_JOIN12 -#undef LLVM_COMMA_JOIN13 -#undef LLVM_COMMA_JOIN14 -#undef LLVM_COMMA_JOIN15 -#undef LLVM_COMMA_JOIN16 -#undef LLVM_COMMA_JOIN17 -#undef LLVM_COMMA_JOIN18 -#undef LLVM_COMMA_JOIN19 -#undef LLVM_COMMA_JOIN20 -#undef LLVM_COMMA_JOIN21 -#undef LLVM_COMMA_JOIN22 -#undef LLVM_COMMA_JOIN23 -#undef LLVM_COMMA_JOIN24 -#undef LLVM_COMMA_JOIN25 -#undef LLVM_COMMA_JOIN26 -#undef LLVM_COMMA_JOIN27 -#undef LLVM_COMMA_JOIN28 -#undef LLVM_COMMA_JOIN29 -#undef LLVM_COMMA_JOIN30 -#undef LLVM_COMMA_JOIN31 -#undef LLVM_COMMA_JOIN32 - -} // end namespace llvm - -#endif // LLVM_ADT_VARIADICFUNCTION_H diff --git a/llvm/include/llvm/ADT/edit_distance.h b/llvm/include/llvm/ADT/edit_distance.h deleted file mode 100644 index 06a01b18..00000000 --- a/llvm/include/llvm/ADT/edit_distance.h +++ /dev/null @@ -1,103 +0,0 @@ -//===-- llvm/ADT/edit_distance.h - Array edit distance function --- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a Levenshtein distance function that works for any two -// sequences, with each element of each sequence being analogous to a character -// in a string. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_EDIT_DISTANCE_H -#define LLVM_ADT_EDIT_DISTANCE_H - -#include "llvm/ADT/ArrayRef.h" -#include -#include - -namespace llvm { - -/// \brief Determine the edit distance between two sequences. -/// -/// \param FromArray the first sequence to compare. -/// -/// \param ToArray the second sequence to compare. -/// -/// \param AllowReplacements whether to allow element replacements (change one -/// element into another) as a single operation, rather than as two operations -/// (an insertion and a removal). -/// -/// \param MaxEditDistance If non-zero, the maximum edit distance that this -/// routine is allowed to compute. If the edit distance will exceed that -/// maximum, returns \c MaxEditDistance+1. -/// -/// \returns the minimum number of element insertions, removals, or (if -/// \p AllowReplacements is \c true) replacements needed to transform one of -/// the given sequences into the other. If zero, the sequences are identical. -template -unsigned ComputeEditDistance(ArrayRef FromArray, ArrayRef ToArray, - bool AllowReplacements = true, - unsigned MaxEditDistance = 0) { - // The algorithm implemented below is the "classic" - // dynamic-programming algorithm for computing the Levenshtein - // distance, which is described here: - // - // http://en.wikipedia.org/wiki/Levenshtein_distance - // - // Although the algorithm is typically described using an m x n - // array, only one row plus one element are used at a time, so this - // implementation just keeps one vector for the row. To update one entry, - // only the entries to the left, top, and top-left are needed. The left - // entry is in Row[x-1], the top entry is what's in Row[x] from the last - // iteration, and the top-left entry is stored in Previous. - typename ArrayRef::size_type m = FromArray.size(); - typename ArrayRef::size_type n = ToArray.size(); - - const unsigned SmallBufferSize = 64; - unsigned SmallBuffer[SmallBufferSize]; - std::unique_ptr Allocated; - unsigned *Row = SmallBuffer; - if (n + 1 > SmallBufferSize) { - Row = new unsigned[n + 1]; - Allocated.reset(Row); - } - - for (unsigned i = 1; i <= n; ++i) - Row[i] = i; - - for (typename ArrayRef::size_type y = 1; y <= m; ++y) { - Row[0] = y; - unsigned BestThisRow = Row[0]; - - unsigned Previous = y - 1; - for (typename ArrayRef::size_type x = 1; x <= n; ++x) { - int OldRow = Row[x]; - if (AllowReplacements) { - Row[x] = std::min( - Previous + (FromArray[y-1] == ToArray[x-1] ? 0u : 1u), - std::min(Row[x-1], Row[x])+1); - } - else { - if (FromArray[y-1] == ToArray[x-1]) Row[x] = Previous; - else Row[x] = std::min(Row[x-1], Row[x]) + 1; - } - Previous = OldRow; - BestThisRow = std::min(BestThisRow, Row[x]); - } - - if (MaxEditDistance && BestThisRow > MaxEditDistance) - return MaxEditDistance + 1; - } - - unsigned Result = Row[n]; - return Result; -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/ilist.h b/llvm/include/llvm/ADT/ilist.h deleted file mode 100644 index 8e4d45df..00000000 --- a/llvm/include/llvm/ADT/ilist.h +++ /dev/null @@ -1,752 +0,0 @@ -//==-- llvm/ADT/ilist.h - Intrusive Linked List Template ---------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines classes to implement an intrusive doubly linked list class -// (i.e. each node of the list must contain a next and previous field for the -// list. -// -// The ilist_traits trait class is used to gain access to the next and previous -// fields of the node type that the list is instantiated with. If it is not -// specialized, the list defaults to using the getPrev(), getNext() method calls -// to get the next and previous pointers. -// -// The ilist class itself, should be a plug in replacement for list, assuming -// that the nodes contain next/prev pointers. This list replacement does not -// provide a constant time size() method, so be careful to use empty() when you -// really want to know if it's empty. -// -// The ilist class is implemented by allocating a 'tail' node when the list is -// created (using ilist_traits<>::createSentinel()). This tail node is -// absolutely required because the user must be able to compute end()-1. Because -// of this, users of the direct next/prev links will see an extra link on the -// end of the list, which should be ignored. -// -// Requirements for a user of this list: -// -// 1. The user must provide {g|s}et{Next|Prev} methods, or specialize -// ilist_traits to provide an alternate way of getting and setting next and -// prev links. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_ILIST_H -#define LLVM_ADT_ILIST_H - -#include "llvm/Support/Compiler.h" -#include -#include -#include -#include - -namespace llvm { - -template class iplist; -template class ilist_iterator; - -/// ilist_nextprev_traits - A fragment for template traits for intrusive list -/// that provides default next/prev implementations for common operations. -/// -template -struct ilist_nextprev_traits { - static NodeTy *getPrev(NodeTy *N) { return N->getPrev(); } - static NodeTy *getNext(NodeTy *N) { return N->getNext(); } - static const NodeTy *getPrev(const NodeTy *N) { return N->getPrev(); } - static const NodeTy *getNext(const NodeTy *N) { return N->getNext(); } - - static void setPrev(NodeTy *N, NodeTy *Prev) { N->setPrev(Prev); } - static void setNext(NodeTy *N, NodeTy *Next) { N->setNext(Next); } -}; - -template -struct ilist_traits; - -/// ilist_sentinel_traits - A fragment for template traits for intrusive list -/// that provides default sentinel implementations for common operations. -/// -/// ilist_sentinel_traits implements a lazy dynamic sentinel allocation -/// strategy. The sentinel is stored in the prev field of ilist's Head. -/// -template -struct ilist_sentinel_traits { - /// createSentinel - create the dynamic sentinel - static NodeTy *createSentinel() { return new NodeTy(); } - - /// destroySentinel - deallocate the dynamic sentinel - static void destroySentinel(NodeTy *N) { delete N; } - - /// provideInitialHead - when constructing an ilist, provide a starting - /// value for its Head - /// @return null node to indicate that it needs to be allocated later - static NodeTy *provideInitialHead() { return nullptr; } - - /// ensureHead - make sure that Head is either already - /// initialized or assigned a fresh sentinel - /// @return the sentinel - static NodeTy *ensureHead(NodeTy *&Head) { - if (!Head) { - Head = ilist_traits::createSentinel(); - ilist_traits::noteHead(Head, Head); - ilist_traits::setNext(Head, nullptr); - return Head; - } - return ilist_traits::getPrev(Head); - } - - /// noteHead - stash the sentinel into its default location - static void noteHead(NodeTy *NewHead, NodeTy *Sentinel) { - ilist_traits::setPrev(NewHead, Sentinel); - } -}; - -template class ilist_half_node; -template class ilist_node; - -/// Traits with an embedded ilist_node as a sentinel. -/// -/// FIXME: The downcast in createSentinel() is UB. -template struct ilist_embedded_sentinel_traits { - /// Get hold of the node that marks the end of the list. - NodeTy *createSentinel() const { - // Since i(p)lists always publicly derive from their corresponding traits, - // placing a data member in this class will augment the i(p)list. But since - // the NodeTy is expected to be publicly derive from ilist_node, - // there is a legal viable downcast from it to NodeTy. We use this trick to - // superimpose an i(p)list with a "ghostly" NodeTy, which becomes the - // sentinel. Dereferencing the sentinel is forbidden (save the - // ilist_node), so no one will ever notice the superposition. - return static_cast(&Sentinel); - } - static void destroySentinel(NodeTy *) {} - - NodeTy *provideInitialHead() const { return createSentinel(); } - NodeTy *ensureHead(NodeTy *) const { return createSentinel(); } - static void noteHead(NodeTy *, NodeTy *) {} - -private: - mutable ilist_node Sentinel; -}; - -/// Trait with an embedded ilist_half_node as a sentinel. -/// -/// FIXME: The downcast in createSentinel() is UB. -template struct ilist_half_embedded_sentinel_traits { - /// Get hold of the node that marks the end of the list. - NodeTy *createSentinel() const { - // See comment in ilist_embedded_sentinel_traits::createSentinel(). - return static_cast(&Sentinel); - } - static void destroySentinel(NodeTy *) {} - - NodeTy *provideInitialHead() const { return createSentinel(); } - NodeTy *ensureHead(NodeTy *) const { return createSentinel(); } - static void noteHead(NodeTy *, NodeTy *) {} - -private: - mutable ilist_half_node Sentinel; -}; - -/// ilist_node_traits - A fragment for template traits for intrusive list -/// that provides default node related operations. -/// -template -struct ilist_node_traits { - static NodeTy *createNode(const NodeTy &V) { return new NodeTy(V); } - static void deleteNode(NodeTy *V) { delete V; } - - void addNodeToList(NodeTy *) {} - void removeNodeFromList(NodeTy *) {} - void transferNodesFromList(ilist_node_traits & /*SrcTraits*/, - ilist_iterator /*first*/, - ilist_iterator /*last*/) {} -}; - -/// ilist_default_traits - Default template traits for intrusive list. -/// By inheriting from this, you can easily use default implementations -/// for all common operations. -/// -template -struct ilist_default_traits : public ilist_nextprev_traits, - public ilist_sentinel_traits, - public ilist_node_traits { -}; - -// Template traits for intrusive list. By specializing this template class, you -// can change what next/prev fields are used to store the links... -template -struct ilist_traits : public ilist_default_traits {}; - -// Const traits are the same as nonconst traits... -template -struct ilist_traits : public ilist_traits {}; - -//===----------------------------------------------------------------------===// -// Iterator for intrusive list. -// -template -class ilist_iterator - : public std::iterator { -public: - typedef ilist_traits Traits; - typedef std::iterator - super; - - typedef typename super::value_type value_type; - typedef typename super::difference_type difference_type; - typedef typename super::pointer pointer; - typedef typename super::reference reference; - -private: - pointer NodePtr; - -public: - explicit ilist_iterator(pointer NP) : NodePtr(NP) {} - explicit ilist_iterator(reference NR) : NodePtr(&NR) {} - ilist_iterator() : NodePtr(nullptr) {} - - // This is templated so that we can allow constructing a const iterator from - // a nonconst iterator... - template - ilist_iterator(const ilist_iterator &RHS) - : NodePtr(RHS.getNodePtrUnchecked()) {} - - // This is templated so that we can allow assigning to a const iterator from - // a nonconst iterator... - template - const ilist_iterator &operator=(const ilist_iterator &RHS) { - NodePtr = RHS.getNodePtrUnchecked(); - return *this; - } - - void reset(pointer NP) { NodePtr = NP; } - - // Accessors... - explicit operator pointer() const { return NodePtr; } - reference operator*() const { return *NodePtr; } - pointer operator->() const { return &operator*(); } - - // Comparison operators - template bool operator==(const ilist_iterator &RHS) const { - return NodePtr == RHS.getNodePtrUnchecked(); - } - template bool operator!=(const ilist_iterator &RHS) const { - return NodePtr != RHS.getNodePtrUnchecked(); - } - - // Increment and decrement operators... - ilist_iterator &operator--() { - NodePtr = Traits::getPrev(NodePtr); - assert(NodePtr && "--'d off the beginning of an ilist!"); - return *this; - } - ilist_iterator &operator++() { - NodePtr = Traits::getNext(NodePtr); - return *this; - } - ilist_iterator operator--(int) { - ilist_iterator tmp = *this; - --*this; - return tmp; - } - ilist_iterator operator++(int) { - ilist_iterator tmp = *this; - ++*this; - return tmp; - } - - // Internal interface, do not use... - pointer getNodePtrUnchecked() const { return NodePtr; } -}; - -// Allow ilist_iterators to convert into pointers to a node automatically when -// used by the dyn_cast, cast, isa mechanisms... - -template struct simplify_type; - -template struct simplify_type > { - typedef NodeTy* SimpleType; - - static SimpleType getSimplifiedValue(ilist_iterator &Node) { - return &*Node; - } -}; -template struct simplify_type > { - typedef /*const*/ NodeTy* SimpleType; - - static SimpleType getSimplifiedValue(const ilist_iterator &Node) { - return &*Node; - } -}; - - -//===----------------------------------------------------------------------===// -// -/// iplist - The subset of list functionality that can safely be used on nodes -/// of polymorphic types, i.e. a heterogeneous list with a common base class that -/// holds the next/prev pointers. The only state of the list itself is a single -/// pointer to the head of the list. -/// -/// This list can be in one of three interesting states: -/// 1. The list may be completely unconstructed. In this case, the head -/// pointer is null. When in this form, any query for an iterator (e.g. -/// begin() or end()) causes the list to transparently change to state #2. -/// 2. The list may be empty, but contain a sentinel for the end iterator. This -/// sentinel is created by the Traits::createSentinel method and is a link -/// in the list. When the list is empty, the pointer in the iplist points -/// to the sentinel. Once the sentinel is constructed, it -/// is not destroyed until the list is. -/// 3. The list may contain actual objects in it, which are stored as a doubly -/// linked list of nodes. One invariant of the list is that the predecessor -/// of the first node in the list always points to the last node in the list, -/// and the successor pointer for the sentinel (which always stays at the -/// end of the list) is always null. -/// -template > -class iplist : public Traits { - mutable NodeTy *Head; - - // Use the prev node pointer of 'head' as the tail pointer. This is really a - // circularly linked list where we snip the 'next' link from the sentinel node - // back to the first node in the list (to preserve assertions about going off - // the end of the list). - NodeTy *getTail() { return this->ensureHead(Head); } - const NodeTy *getTail() const { return this->ensureHead(Head); } - void setTail(NodeTy *N) const { this->noteHead(Head, N); } - - /// CreateLazySentinel - This method verifies whether the sentinel for the - /// list has been created and lazily makes it if not. - void CreateLazySentinel() const { - this->ensureHead(Head); - } - - static bool op_less(NodeTy &L, NodeTy &R) { return L < R; } - static bool op_equal(NodeTy &L, NodeTy &R) { return L == R; } - - // No fundamental reason why iplist can't be copyable, but the default - // copy/copy-assign won't do. - iplist(const iplist &) = delete; - void operator=(const iplist &) = delete; - -public: - typedef NodeTy *pointer; - typedef const NodeTy *const_pointer; - typedef NodeTy &reference; - typedef const NodeTy &const_reference; - typedef NodeTy value_type; - typedef ilist_iterator iterator; - typedef ilist_iterator const_iterator; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - - iplist() : Head(this->provideInitialHead()) {} - ~iplist() { - if (!Head) return; - clear(); - Traits::destroySentinel(getTail()); - } - - // Iterator creation methods. - iterator begin() { - CreateLazySentinel(); - return iterator(Head); - } - const_iterator begin() const { - CreateLazySentinel(); - return const_iterator(Head); - } - iterator end() { - CreateLazySentinel(); - return iterator(getTail()); - } - const_iterator end() const { - CreateLazySentinel(); - return const_iterator(getTail()); - } - - // reverse iterator creation methods. - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { return const_reverse_iterator(begin());} - - - // Miscellaneous inspection routines. - size_type max_size() const { return size_type(-1); } - bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { - return !Head || Head == getTail(); - } - - // Front and back accessor functions... - reference front() { - assert(!empty() && "Called front() on empty list!"); - return *Head; - } - const_reference front() const { - assert(!empty() && "Called front() on empty list!"); - return *Head; - } - reference back() { - assert(!empty() && "Called back() on empty list!"); - return *this->getPrev(getTail()); - } - const_reference back() const { - assert(!empty() && "Called back() on empty list!"); - return *this->getPrev(getTail()); - } - - void swap(iplist &RHS) { - assert(0 && "Swap does not use list traits callback correctly yet!"); - std::swap(Head, RHS.Head); - } - - iterator insert(iterator where, NodeTy *New) { - NodeTy *CurNode = where.getNodePtrUnchecked(); - NodeTy *PrevNode = this->getPrev(CurNode); - this->setNext(New, CurNode); - this->setPrev(New, PrevNode); - - if (CurNode != Head) // Is PrevNode off the beginning of the list? - this->setNext(PrevNode, New); - else - Head = New; - this->setPrev(CurNode, New); - - this->addNodeToList(New); // Notify traits that we added a node... - return iterator(New); - } - - iterator insert(iterator where, const NodeTy &New) { - return this->insert(where, new NodeTy(New)); - } - - iterator insertAfter(iterator where, NodeTy *New) { - if (empty()) - return insert(begin(), New); - else - return insert(++where, New); - } - - NodeTy *remove(iterator &IT) { - assert(IT != end() && "Cannot remove end of list!"); - NodeTy *Node = &*IT; - NodeTy *NextNode = this->getNext(Node); - NodeTy *PrevNode = this->getPrev(Node); - - if (Node != Head) // Is PrevNode off the beginning of the list? - this->setNext(PrevNode, NextNode); - else - Head = NextNode; - this->setPrev(NextNode, PrevNode); - IT.reset(NextNode); - this->removeNodeFromList(Node); // Notify traits that we removed a node... - - // Set the next/prev pointers of the current node to null. This isn't - // strictly required, but this catches errors where a node is removed from - // an ilist (and potentially deleted) with iterators still pointing at it. - // When those iterators are incremented or decremented, they will assert on - // the null next/prev pointer instead of "usually working". - this->setNext(Node, nullptr); - this->setPrev(Node, nullptr); - return Node; - } - - NodeTy *remove(const iterator &IT) { - iterator MutIt = IT; - return remove(MutIt); - } - - NodeTy *remove(NodeTy *IT) { return remove(iterator(IT)); } - NodeTy *remove(NodeTy &IT) { return remove(iterator(IT)); } - - // erase - remove a node from the controlled sequence... and delete it. - iterator erase(iterator where) { - this->deleteNode(remove(where)); - return where; - } - - iterator erase(NodeTy *IT) { return erase(iterator(IT)); } - iterator erase(NodeTy &IT) { return erase(iterator(IT)); } - - /// Remove all nodes from the list like clear(), but do not call - /// removeNodeFromList() or deleteNode(). - /// - /// This should only be used immediately before freeing nodes in bulk to - /// avoid traversing the list and bringing all the nodes into cache. - void clearAndLeakNodesUnsafely() { - if (Head) { - Head = getTail(); - this->setPrev(Head, Head); - } - } - -private: - // transfer - The heart of the splice function. Move linked list nodes from - // [first, last) into position. - // - void transfer(iterator position, iplist &L2, iterator first, iterator last) { - assert(first != last && "Should be checked by callers"); - // Position cannot be contained in the range to be transferred. - // Check for the most common mistake. - assert(position != first && - "Insertion point can't be one of the transferred nodes"); - - if (position != last) { - // Note: we have to be careful about the case when we move the first node - // in the list. This node is the list sentinel node and we can't move it. - NodeTy *ThisSentinel = getTail(); - setTail(nullptr); - NodeTy *L2Sentinel = L2.getTail(); - L2.setTail(nullptr); - - // Remove [first, last) from its old position. - NodeTy *First = &*first, *Prev = this->getPrev(First); - NodeTy *Next = last.getNodePtrUnchecked(), *Last = this->getPrev(Next); - if (Prev) - this->setNext(Prev, Next); - else - L2.Head = Next; - this->setPrev(Next, Prev); - - // Splice [first, last) into its new position. - NodeTy *PosNext = position.getNodePtrUnchecked(); - NodeTy *PosPrev = this->getPrev(PosNext); - - // Fix head of list... - if (PosPrev) - this->setNext(PosPrev, First); - else - Head = First; - this->setPrev(First, PosPrev); - - // Fix end of list... - this->setNext(Last, PosNext); - this->setPrev(PosNext, Last); - - this->transferNodesFromList(L2, iterator(First), iterator(PosNext)); - - // Now that everything is set, restore the pointers to the list sentinels. - L2.setTail(L2Sentinel); - setTail(ThisSentinel); - } - } - -public: - - //===----------------------------------------------------------------------=== - // Functionality derived from other functions defined above... - // - - size_type LLVM_ATTRIBUTE_UNUSED_RESULT size() const { - if (!Head) return 0; // Don't require construction of sentinel if empty. - return std::distance(begin(), end()); - } - - iterator erase(iterator first, iterator last) { - while (first != last) - first = erase(first); - return last; - } - - void clear() { if (Head) erase(begin(), end()); } - - // Front and back inserters... - void push_front(NodeTy *val) { insert(begin(), val); } - void push_back(NodeTy *val) { insert(end(), val); } - void pop_front() { - assert(!empty() && "pop_front() on empty list!"); - erase(begin()); - } - void pop_back() { - assert(!empty() && "pop_back() on empty list!"); - iterator t = end(); erase(--t); - } - - // Special forms of insert... - template void insert(iterator where, InIt first, InIt last) { - for (; first != last; ++first) insert(where, *first); - } - - // Splice members - defined in terms of transfer... - void splice(iterator where, iplist &L2) { - if (!L2.empty()) - transfer(where, L2, L2.begin(), L2.end()); - } - void splice(iterator where, iplist &L2, iterator first) { - iterator last = first; ++last; - if (where == first || where == last) return; // No change - transfer(where, L2, first, last); - } - void splice(iterator where, iplist &L2, iterator first, iterator last) { - if (first != last) transfer(where, L2, first, last); - } - void splice(iterator where, iplist &L2, NodeTy &N) { - splice(where, L2, iterator(N)); - } - void splice(iterator where, iplist &L2, NodeTy *N) { - splice(where, L2, iterator(N)); - } - - template - void merge(iplist &Right, Compare comp) { - if (this == &Right) - return; - iterator First1 = begin(), Last1 = end(); - iterator First2 = Right.begin(), Last2 = Right.end(); - while (First1 != Last1 && First2 != Last2) { - if (comp(*First2, *First1)) { - iterator Next = First2; - transfer(First1, Right, First2, ++Next); - First2 = Next; - } else { - ++First1; - } - } - if (First2 != Last2) - transfer(Last1, Right, First2, Last2); - } - void merge(iplist &Right) { return merge(Right, op_less); } - - template - void sort(Compare comp) { - // The list is empty, vacuously sorted. - if (empty()) - return; - // The list has a single element, vacuously sorted. - if (std::next(begin()) == end()) - return; - // Find the split point for the list. - iterator Center = begin(), End = begin(); - while (End != end() && std::next(End) != end()) { - Center = std::next(Center); - End = std::next(std::next(End)); - } - // Split the list into two. - iplist RightHalf; - RightHalf.splice(RightHalf.begin(), *this, Center, end()); - - // Sort the two sublists. - sort(comp); - RightHalf.sort(comp); - - // Merge the two sublists back together. - merge(RightHalf, comp); - } - void sort() { sort(op_less); } - - /// \brief Get the previous node, or \c nullptr for the list head. - NodeTy *getPrevNode(NodeTy &N) const { - auto I = N.getIterator(); - if (I == begin()) - return nullptr; - return &*std::prev(I); - } - /// \brief Get the previous node, or \c nullptr for the list head. - const NodeTy *getPrevNode(const NodeTy &N) const { - return getPrevNode(const_cast(N)); - } - - /// \brief Get the next node, or \c nullptr for the list tail. - NodeTy *getNextNode(NodeTy &N) const { - auto Next = std::next(N.getIterator()); - if (Next == end()) - return nullptr; - return &*Next; - } - /// \brief Get the next node, or \c nullptr for the list tail. - const NodeTy *getNextNode(const NodeTy &N) const { - return getNextNode(const_cast(N)); - } -}; - - -template -struct ilist : public iplist { - typedef typename iplist::size_type size_type; - typedef typename iplist::iterator iterator; - - ilist() {} - ilist(const ilist &right) : iplist() { - insert(this->begin(), right.begin(), right.end()); - } - explicit ilist(size_type count) { - insert(this->begin(), count, NodeTy()); - } - ilist(size_type count, const NodeTy &val) { - insert(this->begin(), count, val); - } - template ilist(InIt first, InIt last) { - insert(this->begin(), first, last); - } - - // bring hidden functions into scope - using iplist::insert; - using iplist::push_front; - using iplist::push_back; - - // Main implementation here - Insert for a node passed by value... - iterator insert(iterator where, const NodeTy &val) { - return insert(where, this->createNode(val)); - } - - - // Front and back inserters... - void push_front(const NodeTy &val) { insert(this->begin(), val); } - void push_back(const NodeTy &val) { insert(this->end(), val); } - - void insert(iterator where, size_type count, const NodeTy &val) { - for (; count != 0; --count) insert(where, val); - } - - // Assign special forms... - void assign(size_type count, const NodeTy &val) { - iterator I = this->begin(); - for (; I != this->end() && count != 0; ++I, --count) - *I = val; - if (count != 0) - insert(this->end(), val, val); - else - erase(I, this->end()); - } - template void assign(InIt first1, InIt last1) { - iterator first2 = this->begin(), last2 = this->end(); - for ( ; first1 != last1 && first2 != last2; ++first1, ++first2) - *first1 = *first2; - if (first2 == last2) - erase(first1, last1); - else - insert(last1, first2, last2); - } - - - // Resize members... - void resize(size_type newsize, NodeTy val) { - iterator i = this->begin(); - size_type len = 0; - for ( ; i != this->end() && len < newsize; ++i, ++len) /* empty*/ ; - - if (len == newsize) - erase(i, this->end()); - else // i == end() - insert(this->end(), newsize - len, val); - } - void resize(size_type newsize) { resize(newsize, NodeTy()); } -}; - -} // End llvm namespace - -namespace std { - // Ensure that swap uses the fast list swap... - template - void swap(llvm::iplist &Left, llvm::iplist &Right) { - Left.swap(Right); - } -} // End 'std' extensions... - -#endif // LLVM_ADT_ILIST_H diff --git a/llvm/include/llvm/ADT/ilist_node.h b/llvm/include/llvm/ADT/ilist_node.h deleted file mode 100644 index 7e5a0e0e..00000000 --- a/llvm/include/llvm/ADT/ilist_node.h +++ /dev/null @@ -1,123 +0,0 @@ -//==-- llvm/ADT/ilist_node.h - Intrusive Linked List Helper ------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the ilist_node class template, which is a convenient -// base class for creating classes that can be used with ilists. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_ILIST_NODE_H -#define LLVM_ADT_ILIST_NODE_H - -namespace llvm { - -template -struct ilist_traits; -template struct ilist_embedded_sentinel_traits; -template struct ilist_half_embedded_sentinel_traits; - -/// ilist_half_node - Base class that provides prev services for sentinels. -/// -template -class ilist_half_node { - friend struct ilist_traits; - friend struct ilist_half_embedded_sentinel_traits; - NodeTy *Prev; -protected: - NodeTy *getPrev() { return Prev; } - const NodeTy *getPrev() const { return Prev; } - void setPrev(NodeTy *P) { Prev = P; } - ilist_half_node() : Prev(nullptr) {} -}; - -template -struct ilist_nextprev_traits; - -template class ilist_iterator; - -/// ilist_node - Base class that provides next/prev services for nodes -/// that use ilist_nextprev_traits or ilist_default_traits. -/// -template -class ilist_node : private ilist_half_node { - friend struct ilist_nextprev_traits; - friend struct ilist_traits; - friend struct ilist_half_embedded_sentinel_traits; - friend struct ilist_embedded_sentinel_traits; - NodeTy *Next; - NodeTy *getNext() { return Next; } - const NodeTy *getNext() const { return Next; } - void setNext(NodeTy *N) { Next = N; } -protected: - ilist_node() : Next(nullptr) {} - -public: - ilist_iterator getIterator() { - // FIXME: Stop downcasting to create the iterator (potential UB). - return ilist_iterator(static_cast(this)); - } - ilist_iterator getIterator() const { - // FIXME: Stop downcasting to create the iterator (potential UB). - return ilist_iterator(static_cast(this)); - } -}; - -/// An ilist node that can access its parent list. -/// -/// Requires \c NodeTy to have \a getParent() to find the parent node, and the -/// \c ParentTy to have \a getSublistAccess() to get a reference to the list. -template -class ilist_node_with_parent : public ilist_node { -protected: - ilist_node_with_parent() = default; - -private: - /// Forward to NodeTy::getParent(). - /// - /// Note: do not use the name "getParent()". We want a compile error - /// (instead of recursion) when the subclass fails to implement \a - /// getParent(). - const ParentTy *getNodeParent() const { - return static_cast(this)->getParent(); - } - -public: - /// @name Adjacent Node Accessors - /// @{ - /// \brief Get the previous node, or \c nullptr for the list head. - NodeTy *getPrevNode() { - // Should be separated to a reused function, but then we couldn't use auto - // (and would need the type of the list). - const auto &List = - getNodeParent()->*(ParentTy::getSublistAccess((NodeTy *)nullptr)); - return List.getPrevNode(*static_cast(this)); - } - /// \brief Get the previous node, or \c nullptr for the list head. - const NodeTy *getPrevNode() const { - return const_cast(this)->getPrevNode(); - } - - /// \brief Get the next node, or \c nullptr for the list tail. - NodeTy *getNextNode() { - // Should be separated to a reused function, but then we couldn't use auto - // (and would need the type of the list). - const auto &List = - getNodeParent()->*(ParentTy::getSublistAccess((NodeTy *)nullptr)); - return List.getNextNode(*static_cast(this)); - } - /// \brief Get the next node, or \c nullptr for the list tail. - const NodeTy *getNextNode() const { - return const_cast(this)->getNextNode(); - } - /// @} -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ADT/iterator.h b/llvm/include/llvm/ADT/iterator.h deleted file mode 100644 index 0bd28d5c..00000000 --- a/llvm/include/llvm/ADT/iterator.h +++ /dev/null @@ -1,261 +0,0 @@ -//===- iterator.h - Utilities for using and defining iterators --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_ITERATOR_H -#define LLVM_ADT_ITERATOR_H - -#include -#include - -namespace llvm { - -/// \brief CRTP base class which implements the entire standard iterator facade -/// in terms of a minimal subset of the interface. -/// -/// Use this when it is reasonable to implement most of the iterator -/// functionality in terms of a core subset. If you need special behavior or -/// there are performance implications for this, you may want to override the -/// relevant members instead. -/// -/// Note, one abstraction that this does *not* provide is implementing -/// subtraction in terms of addition by negating the difference. Negation isn't -/// always information preserving, and I can see very reasonable iterator -/// designs where this doesn't work well. It doesn't really force much added -/// boilerplate anyways. -/// -/// Another abstraction that this doesn't provide is implementing increment in -/// terms of addition of one. These aren't equivalent for all iterator -/// categories, and respecting that adds a lot of complexity for little gain. -template -class iterator_facade_base - : public std::iterator { -protected: - enum { - IsRandomAccess = - std::is_base_of::value, - IsBidirectional = - std::is_base_of::value, - }; - - /// A proxy object for computing a reference via indirecting a copy of an - /// iterator. This is used in APIs which need to produce a reference via - /// indirection but for which the iterator object might be a temporary. The - /// proxy preserves the iterator internally and exposes the indirected - /// reference via a conversion operator. - class ReferenceProxy { - friend iterator_facade_base; - - DerivedT I; - - ReferenceProxy(DerivedT I) : I(std::move(I)) {} - - public: - operator ReferenceT() const { return *I; } - }; - -public: - DerivedT operator+(DifferenceTypeT n) const { - static_assert( - IsRandomAccess, - "The '+' operator is only defined for random access iterators."); - DerivedT tmp = *static_cast(this); - tmp += n; - return tmp; - } - friend DerivedT operator+(DifferenceTypeT n, const DerivedT &i) { - static_assert( - IsRandomAccess, - "The '+' operator is only defined for random access iterators."); - return i + n; - } - DerivedT operator-(DifferenceTypeT n) const { - static_assert( - IsRandomAccess, - "The '-' operator is only defined for random access iterators."); - DerivedT tmp = *static_cast(this); - tmp -= n; - return tmp; - } - - DerivedT &operator++() { - return static_cast(this)->operator+=(1); - } - DerivedT operator++(int) { - DerivedT tmp = *static_cast(this); - ++*static_cast(this); - return tmp; - } - DerivedT &operator--() { - static_assert( - IsBidirectional, - "The decrement operator is only defined for bidirectional iterators."); - return static_cast(this)->operator-=(1); - } - DerivedT operator--(int) { - static_assert( - IsBidirectional, - "The decrement operator is only defined for bidirectional iterators."); - DerivedT tmp = *static_cast(this); - --*static_cast(this); - return tmp; - } - - bool operator!=(const DerivedT &RHS) const { - return !static_cast(this)->operator==(RHS); - } - - bool operator>(const DerivedT &RHS) const { - static_assert( - IsRandomAccess, - "Relational operators are only defined for random access iterators."); - return !static_cast(this)->operator<(RHS) && - !static_cast(this)->operator==(RHS); - } - bool operator<=(const DerivedT &RHS) const { - static_assert( - IsRandomAccess, - "Relational operators are only defined for random access iterators."); - return !static_cast(this)->operator>(RHS); - } - bool operator>=(const DerivedT &RHS) const { - static_assert( - IsRandomAccess, - "Relational operators are only defined for random access iterators."); - return !static_cast(this)->operator<(RHS); - } - - PointerT operator->() const { - return &static_cast(this)->operator*(); - } - ReferenceProxy operator[](DifferenceTypeT n) const { - static_assert(IsRandomAccess, - "Subscripting is only defined for random access iterators."); - return ReferenceProxy(static_cast(this)->operator+(n)); - } -}; - -/// \brief CRTP base class for adapting an iterator to a different type. -/// -/// This class can be used through CRTP to adapt one iterator into another. -/// Typically this is done through providing in the derived class a custom \c -/// operator* implementation. Other methods can be overridden as well. -template < - typename DerivedT, typename WrappedIteratorT, - typename IteratorCategoryT = - typename std::iterator_traits::iterator_category, - typename T = typename std::iterator_traits::value_type, - typename DifferenceTypeT = - typename std::iterator_traits::difference_type, - typename PointerT = typename std::conditional< - std::is_same::value_type>::value, - typename std::iterator_traits::pointer, T *>::type, - typename ReferenceT = typename std::conditional< - std::is_same::value_type>::value, - typename std::iterator_traits::reference, T &>::type, - // Don't provide these, they are mostly to act as aliases below. - typename WrappedTraitsT = std::iterator_traits> -class iterator_adaptor_base - : public iterator_facade_base { - typedef typename iterator_adaptor_base::iterator_facade_base BaseT; - -protected: - WrappedIteratorT I; - - iterator_adaptor_base() = default; - - explicit iterator_adaptor_base(WrappedIteratorT u) : I(std::move(u)) {} - - const WrappedIteratorT &wrapped() const { return I; } - -public: - typedef DifferenceTypeT difference_type; - - DerivedT &operator+=(difference_type n) { - static_assert( - BaseT::IsRandomAccess, - "The '+=' operator is only defined for random access iterators."); - I += n; - return *static_cast(this); - } - DerivedT &operator-=(difference_type n) { - static_assert( - BaseT::IsRandomAccess, - "The '-=' operator is only defined for random access iterators."); - I -= n; - return *static_cast(this); - } - using BaseT::operator-; - difference_type operator-(const DerivedT &RHS) const { - static_assert( - BaseT::IsRandomAccess, - "The '-' operator is only defined for random access iterators."); - return I - RHS.I; - } - - // We have to explicitly provide ++ and -- rather than letting the facade - // forward to += because WrappedIteratorT might not support +=. - using BaseT::operator++; - DerivedT &operator++() { - ++I; - return *static_cast(this); - } - using BaseT::operator--; - DerivedT &operator--() { - static_assert( - BaseT::IsBidirectional, - "The decrement operator is only defined for bidirectional iterators."); - --I; - return *static_cast(this); - } - - bool operator==(const DerivedT &RHS) const { return I == RHS.I; } - bool operator<(const DerivedT &RHS) const { - static_assert( - BaseT::IsRandomAccess, - "Relational operators are only defined for random access iterators."); - return I < RHS.I; - } - - ReferenceT operator*() const { return *I; } -}; - -/// \brief An iterator type that allows iterating over the pointees via some -/// other iterator. -/// -/// The typical usage of this is to expose a type that iterates over Ts, but -/// which is implemented with some iterator over T*s: -/// -/// \code -/// typedef pointee_iterator::iterator> iterator; -/// \endcode -template ())>::type> -struct pointee_iterator - : iterator_adaptor_base< - pointee_iterator, WrappedIteratorT, - typename std::iterator_traits::iterator_category, - T> { - pointee_iterator() = default; - template - pointee_iterator(U &&u) - : pointee_iterator::iterator_adaptor_base(std::forward(u)) {} - - T &operator*() const { return **this->I; } -}; - -} - -#endif diff --git a/llvm/include/llvm/ADT/iterator_range.h b/llvm/include/llvm/ADT/iterator_range.h deleted file mode 100644 index 3dd679bd..00000000 --- a/llvm/include/llvm/ADT/iterator_range.h +++ /dev/null @@ -1,68 +0,0 @@ -//===- iterator_range.h - A range adaptor for iterators ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This provides a very simple, boring adaptor for a begin and end iterator -/// into a range type. This should be used to build range views that work well -/// with range based for loops and range based constructors. -/// -/// Note that code here follows more standards-based coding conventions as it -/// is mirroring proposed interfaces for standardization. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ADT_ITERATOR_RANGE_H -#define LLVM_ADT_ITERATOR_RANGE_H - -#include -#include - -namespace llvm { - -/// \brief A range adaptor for a pair of iterators. -/// -/// This just wraps two iterators into a range-compatible interface. Nothing -/// fancy at all. -template -class iterator_range { - IteratorT begin_iterator, end_iterator; - -public: - //TODO: Add SFINAE to test that the Container's iterators match the range's - // iterators. - template - iterator_range(Container &&c) - //TODO: Consider ADL/non-member begin/end calls. - : begin_iterator(c.begin()), end_iterator(c.end()) {} - iterator_range(IteratorT begin_iterator, IteratorT end_iterator) - : begin_iterator(std::move(begin_iterator)), - end_iterator(std::move(end_iterator)) {} - - IteratorT begin() const { return begin_iterator; } - IteratorT end() const { return end_iterator; } -}; - -/// \brief Convenience function for iterating over sub-ranges. -/// -/// This provides a bit of syntactic sugar to make using sub-ranges -/// in for loops a bit easier. Analogous to std::make_pair(). -template iterator_range make_range(T x, T y) { - return iterator_range(std::move(x), std::move(y)); -} - -template iterator_range make_range(std::pair p) { - return iterator_range(std::move(p.first), std::move(p.second)); -} - -template -iterator_range()))> drop_begin(T &&t, int n) { - return make_range(std::next(begin(t), n), end(t)); -} -} - -#endif diff --git a/llvm/include/llvm/Analysis/AliasAnalysis.h b/llvm/include/llvm/Analysis/AliasAnalysis.h deleted file mode 100644 index d6308b70..00000000 --- a/llvm/include/llvm/Analysis/AliasAnalysis.h +++ /dev/null @@ -1,958 +0,0 @@ -//===- llvm/Analysis/AliasAnalysis.h - Alias Analysis Interface -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the generic AliasAnalysis interface, which is used as the -// common interface used by all clients of alias analysis information, and -// implemented by all alias analysis implementations. Mod/Ref information is -// also captured by this interface. -// -// Implementations of this interface must implement the various virtual methods, -// which automatically provides functionality for the entire suite of client -// APIs. -// -// This API identifies memory regions with the MemoryLocation class. The pointer -// component specifies the base memory address of the region. The Size specifies -// the maximum size (in address units) of the memory region, or -// MemoryLocation::UnknownSize if the size is not known. The TBAA tag -// identifies the "type" of the memory reference; see the -// TypeBasedAliasAnalysis class for details. -// -// Some non-obvious details include: -// - Pointers that point to two completely different objects in memory never -// alias, regardless of the value of the Size component. -// - NoAlias doesn't imply inequal pointers. The most obvious example of this -// is two pointers to constant memory. Even if they are equal, constant -// memory is never stored to, so there will never be any dependencies. -// In this and other situations, the pointers may be both NoAlias and -// MustAlias at the same time. The current API can only return one result, -// though this is rarely a problem in practice. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_ALIASANALYSIS_H -#define LLVM_ANALYSIS_ALIASANALYSIS_H - -#include "llvm/IR/CallSite.h" -#include "llvm/IR/Metadata.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Analysis/MemoryLocation.h" -#include "llvm/Analysis/TargetLibraryInfo.h" - -namespace llvm { -class BasicAAResult; -class LoadInst; -class StoreInst; -class VAArgInst; -class DataLayout; -class Pass; -class AnalysisUsage; -class MemTransferInst; -class MemIntrinsic; -class DominatorTree; -class OrderedBasicBlock; - -/// The possible results of an alias query. -/// -/// These results are always computed between two MemoryLocation objects as -/// a query to some alias analysis. -/// -/// Note that these are unscoped enumerations because we would like to support -/// implicitly testing a result for the existence of any possible aliasing with -/// a conversion to bool, but an "enum class" doesn't support this. The -/// canonical names from the literature are suffixed and unique anyways, and so -/// they serve as global constants in LLVM for these results. -/// -/// See docs/AliasAnalysis.html for more information on the specific meanings -/// of these values. -enum AliasResult { - /// The two locations do not alias at all. - /// - /// This value is arranged to convert to false, while all other values - /// convert to true. This allows a boolean context to convert the result to - /// a binary flag indicating whether there is the possibility of aliasing. - NoAlias = 0, - /// The two locations may or may not alias. This is the least precise result. - MayAlias, - /// The two locations alias, but only due to a partial overlap. - PartialAlias, - /// The two locations precisely alias each other. - MustAlias, -}; - -/// Flags indicating whether a memory access modifies or references memory. -/// -/// This is no access at all, a modification, a reference, or both -/// a modification and a reference. These are specifically structured such that -/// they form a two bit matrix and bit-tests for 'mod' or 'ref' work with any -/// of the possible values. -enum ModRefInfo { - /// The access neither references nor modifies the value stored in memory. - MRI_NoModRef = 0, - /// The access references the value stored in memory. - MRI_Ref = 1, - /// The access modifies the value stored in memory. - MRI_Mod = 2, - /// The access both references and modifies the value stored in memory. - MRI_ModRef = MRI_Ref | MRI_Mod -}; - -/// The locations at which a function might access memory. -/// -/// These are primarily used in conjunction with the \c AccessKind bits to -/// describe both the nature of access and the locations of access for a -/// function call. -enum FunctionModRefLocation { - /// Base case is no access to memory. - FMRL_Nowhere = 0, - /// Access to memory via argument pointers. - FMRL_ArgumentPointees = 4, - /// Access to any memory. - FMRL_Anywhere = 8 | FMRL_ArgumentPointees -}; - -/// Summary of how a function affects memory in the program. -/// -/// Loads from constant globals are not considered memory accesses for this -/// interface. Also, functions may freely modify stack space local to their -/// invocation without having to report it through these interfaces. -enum FunctionModRefBehavior { - /// This function does not perform any non-local loads or stores to memory. - /// - /// This property corresponds to the GCC 'const' attribute. - /// This property corresponds to the LLVM IR 'readnone' attribute. - /// This property corresponds to the IntrNoMem LLVM intrinsic flag. - FMRB_DoesNotAccessMemory = FMRL_Nowhere | MRI_NoModRef, - - /// The only memory references in this function (if it has any) are - /// non-volatile loads from objects pointed to by its pointer-typed - /// arguments, with arbitrary offsets. - /// - /// This property corresponds to the IntrReadArgMem LLVM intrinsic flag. - FMRB_OnlyReadsArgumentPointees = FMRL_ArgumentPointees | MRI_Ref, - - /// The only memory references in this function (if it has any) are - /// non-volatile loads and stores from objects pointed to by its - /// pointer-typed arguments, with arbitrary offsets. - /// - /// This property corresponds to the IntrArgMemOnly LLVM intrinsic flag. - FMRB_OnlyAccessesArgumentPointees = FMRL_ArgumentPointees | MRI_ModRef, - - /// This function does not perform any non-local stores or volatile loads, - /// but may read from any memory location. - /// - /// This property corresponds to the GCC 'pure' attribute. - /// This property corresponds to the LLVM IR 'readonly' attribute. - /// This property corresponds to the IntrReadMem LLVM intrinsic flag. - FMRB_OnlyReadsMemory = FMRL_Anywhere | MRI_Ref, - - // This function does not read from memory anywhere, but may write to any - // memory location. - // - // This property corresponds to the LLVM IR 'writeonly' attribute. - // This property corresponds to the IntrWriteMem LLVM intrinsic flag. - FMRB_DoesNotReadMemory = FMRL_Anywhere | MRI_Mod, - - /// This indicates that the function could not be classified into one of the - /// behaviors above. - FMRB_UnknownModRefBehavior = FMRL_Anywhere | MRI_ModRef -}; - -class AAResults { -public: - // Make these results default constructable and movable. We have to spell - // these out because MSVC won't synthesize them. - AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {} - AAResults(AAResults &&Arg); - ~AAResults(); - - /// Register a specific AA result. - template void addAAResult(AAResultT &AAResult) { - // FIXME: We should use a much lighter weight system than the usual - // polymorphic pattern because we don't own AAResult. It should - // ideally involve two pointers and no separate allocation. - AAs.emplace_back(new Model(AAResult, *this)); - } - - //===--------------------------------------------------------------------===// - /// \name Alias Queries - /// @{ - - /// The main low level interface to the alias analysis implementation. - /// Returns an AliasResult indicating whether the two pointers are aliased to - /// each other. This is the interface that must be implemented by specific - /// alias analysis implementations. - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB); - - /// A convenience wrapper around the primary \c alias interface. - AliasResult alias(const Value *V1, uint64_t V1Size, const Value *V2, - uint64_t V2Size) { - return alias(MemoryLocation(V1, V1Size), MemoryLocation(V2, V2Size)); - } - - /// A convenience wrapper around the primary \c alias interface. - AliasResult alias(const Value *V1, const Value *V2) { - return alias(V1, MemoryLocation::UnknownSize, V2, - MemoryLocation::UnknownSize); - } - - /// A trivial helper function to check to see if the specified pointers are - /// no-alias. - bool isNoAlias(const MemoryLocation &LocA, const MemoryLocation &LocB) { - return alias(LocA, LocB) == NoAlias; - } - - /// A convenience wrapper around the \c isNoAlias helper interface. - bool isNoAlias(const Value *V1, uint64_t V1Size, const Value *V2, - uint64_t V2Size) { - return isNoAlias(MemoryLocation(V1, V1Size), MemoryLocation(V2, V2Size)); - } - - /// A convenience wrapper around the \c isNoAlias helper interface. - bool isNoAlias(const Value *V1, const Value *V2) { - return isNoAlias(MemoryLocation(V1), MemoryLocation(V2)); - } - - /// A trivial helper function to check to see if the specified pointers are - /// must-alias. - bool isMustAlias(const MemoryLocation &LocA, const MemoryLocation &LocB) { - return alias(LocA, LocB) == MustAlias; - } - - /// A convenience wrapper around the \c isMustAlias helper interface. - bool isMustAlias(const Value *V1, const Value *V2) { - return alias(V1, 1, V2, 1) == MustAlias; - } - - /// Checks whether the given location points to constant memory, or if - /// \p OrLocal is true whether it points to a local alloca. - bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal = false); - - /// A convenience wrapper around the primary \c pointsToConstantMemory - /// interface. - bool pointsToConstantMemory(const Value *P, bool OrLocal = false) { - return pointsToConstantMemory(MemoryLocation(P), OrLocal); - } - - /// @} - //===--------------------------------------------------------------------===// - /// \name Simple mod/ref information - /// @{ - - /// Get the ModRef info associated with a pointer argument of a callsite. The - /// result's bits are set to indicate the allowed aliasing ModRef kinds. Note - /// that these bits do not necessarily account for the overall behavior of - /// the function, but rather only provide additional per-argument - /// information. - ModRefInfo getArgModRefInfo(ImmutableCallSite CS, unsigned ArgIdx); - - /// Return the behavior of the given call site. - FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS); - - /// Return the behavior when calling the given function. - FunctionModRefBehavior getModRefBehavior(const Function *F); - - /// Checks if the specified call is known to never read or write memory. - /// - /// Note that if the call only reads from known-constant memory, it is also - /// legal to return true. Also, calls that unwind the stack are legal for - /// this predicate. - /// - /// Many optimizations (such as CSE and LICM) can be performed on such calls - /// without worrying about aliasing properties, and many calls have this - /// property (e.g. calls to 'sin' and 'cos'). - /// - /// This property corresponds to the GCC 'const' attribute. - bool doesNotAccessMemory(ImmutableCallSite CS) { - return getModRefBehavior(CS) == FMRB_DoesNotAccessMemory; - } - - /// Checks if the specified function is known to never read or write memory. - /// - /// Note that if the function only reads from known-constant memory, it is - /// also legal to return true. Also, function that unwind the stack are legal - /// for this predicate. - /// - /// Many optimizations (such as CSE and LICM) can be performed on such calls - /// to such functions without worrying about aliasing properties, and many - /// functions have this property (e.g. 'sin' and 'cos'). - /// - /// This property corresponds to the GCC 'const' attribute. - bool doesNotAccessMemory(const Function *F) { - return getModRefBehavior(F) == FMRB_DoesNotAccessMemory; - } - - /// Checks if the specified call is known to only read from non-volatile - /// memory (or not access memory at all). - /// - /// Calls that unwind the stack are legal for this predicate. - /// - /// This property allows many common optimizations to be performed in the - /// absence of interfering store instructions, such as CSE of strlen calls. - /// - /// This property corresponds to the GCC 'pure' attribute. - bool onlyReadsMemory(ImmutableCallSite CS) { - return onlyReadsMemory(getModRefBehavior(CS)); - } - - /// Checks if the specified function is known to only read from non-volatile - /// memory (or not access memory at all). - /// - /// Functions that unwind the stack are legal for this predicate. - /// - /// This property allows many common optimizations to be performed in the - /// absence of interfering store instructions, such as CSE of strlen calls. - /// - /// This property corresponds to the GCC 'pure' attribute. - bool onlyReadsMemory(const Function *F) { - return onlyReadsMemory(getModRefBehavior(F)); - } - - /// Checks if functions with the specified behavior are known to only read - /// from non-volatile memory (or not access memory at all). - static bool onlyReadsMemory(FunctionModRefBehavior MRB) { - return !(MRB & MRI_Mod); - } - - /// Checks if functions with the specified behavior are known to only write - /// memory (or not access memory at all). - static bool doesNotReadMemory(FunctionModRefBehavior MRB) { - return !(MRB & MRI_Ref); - } - - /// Checks if functions with the specified behavior are known to read and - /// write at most from objects pointed to by their pointer-typed arguments - /// (with arbitrary offsets). - static bool onlyAccessesArgPointees(FunctionModRefBehavior MRB) { - return !(MRB & FMRL_Anywhere & ~FMRL_ArgumentPointees); - } - - /// Checks if functions with the specified behavior are known to potentially - /// read or write from objects pointed to be their pointer-typed arguments - /// (with arbitrary offsets). - static bool doesAccessArgPointees(FunctionModRefBehavior MRB) { - return (MRB & MRI_ModRef) && (MRB & FMRL_ArgumentPointees); - } - - /// getModRefInfo (for call sites) - Return information about whether - /// a particular call site modifies or reads the specified memory location. - ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc); - - /// getModRefInfo (for call sites) - A convenience wrapper. - ModRefInfo getModRefInfo(ImmutableCallSite CS, const Value *P, - uint64_t Size) { - return getModRefInfo(CS, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for calls) - Return information about whether - /// a particular call modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const CallInst *C, const MemoryLocation &Loc) { - return getModRefInfo(ImmutableCallSite(C), Loc); - } - - /// getModRefInfo (for calls) - A convenience wrapper. - ModRefInfo getModRefInfo(const CallInst *C, const Value *P, uint64_t Size) { - return getModRefInfo(C, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for invokes) - Return information about whether - /// a particular invoke modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const InvokeInst *I, const MemoryLocation &Loc) { - return getModRefInfo(ImmutableCallSite(I), Loc); - } - - /// getModRefInfo (for invokes) - A convenience wrapper. - ModRefInfo getModRefInfo(const InvokeInst *I, const Value *P, uint64_t Size) { - return getModRefInfo(I, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for loads) - Return information about whether - /// a particular load modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const LoadInst *L, const MemoryLocation &Loc); - - /// getModRefInfo (for loads) - A convenience wrapper. - ModRefInfo getModRefInfo(const LoadInst *L, const Value *P, uint64_t Size) { - return getModRefInfo(L, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for stores) - Return information about whether - /// a particular store modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const StoreInst *S, const MemoryLocation &Loc); - - /// getModRefInfo (for stores) - A convenience wrapper. - ModRefInfo getModRefInfo(const StoreInst *S, const Value *P, uint64_t Size) { - return getModRefInfo(S, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for fences) - Return information about whether - /// a particular store modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const FenceInst *S, const MemoryLocation &Loc) { - // Conservatively correct. (We could possibly be a bit smarter if - // Loc is a alloca that doesn't escape.) - return MRI_ModRef; - } - - /// getModRefInfo (for fences) - A convenience wrapper. - ModRefInfo getModRefInfo(const FenceInst *S, const Value *P, uint64_t Size) { - return getModRefInfo(S, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for cmpxchges) - Return information about whether - /// a particular cmpxchg modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const AtomicCmpXchgInst *CX, - const MemoryLocation &Loc); - - /// getModRefInfo (for cmpxchges) - A convenience wrapper. - ModRefInfo getModRefInfo(const AtomicCmpXchgInst *CX, const Value *P, - unsigned Size) { - return getModRefInfo(CX, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for atomicrmws) - Return information about whether - /// a particular atomicrmw modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const AtomicRMWInst *RMW, const MemoryLocation &Loc); - - /// getModRefInfo (for atomicrmws) - A convenience wrapper. - ModRefInfo getModRefInfo(const AtomicRMWInst *RMW, const Value *P, - unsigned Size) { - return getModRefInfo(RMW, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for va_args) - Return information about whether - /// a particular va_arg modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const VAArgInst *I, const MemoryLocation &Loc); - - /// getModRefInfo (for va_args) - A convenience wrapper. - ModRefInfo getModRefInfo(const VAArgInst *I, const Value *P, uint64_t Size) { - return getModRefInfo(I, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for catchpads) - Return information about whether - /// a particular catchpad modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const CatchPadInst *I, const MemoryLocation &Loc); - - /// getModRefInfo (for catchpads) - A convenience wrapper. - ModRefInfo getModRefInfo(const CatchPadInst *I, const Value *P, - uint64_t Size) { - return getModRefInfo(I, MemoryLocation(P, Size)); - } - - /// getModRefInfo (for catchrets) - Return information about whether - /// a particular catchret modifies or reads the specified memory location. - ModRefInfo getModRefInfo(const CatchReturnInst *I, const MemoryLocation &Loc); - - /// getModRefInfo (for catchrets) - A convenience wrapper. - ModRefInfo getModRefInfo(const CatchReturnInst *I, const Value *P, - uint64_t Size) { - return getModRefInfo(I, MemoryLocation(P, Size)); - } - - /// Check whether or not an instruction may read or write memory (without - /// regard to a specific location). - /// - /// For function calls, this delegates to the alias-analysis specific - /// call-site mod-ref behavior queries. Otherwise it delegates to the generic - /// mod ref information query without a location. - ModRefInfo getModRefInfo(const Instruction *I) { - if (auto CS = ImmutableCallSite(I)) { - auto MRB = getModRefBehavior(CS); - if ((MRB & MRI_ModRef) == MRI_ModRef) - return MRI_ModRef; - if (MRB & MRI_Ref) - return MRI_Ref; - if (MRB & MRI_Mod) - return MRI_Mod; - return MRI_NoModRef; - } - - return getModRefInfo(I, MemoryLocation()); - } - - /// Check whether or not an instruction may read or write the specified - /// memory location. - /// - /// An instruction that doesn't read or write memory may be trivially LICM'd - /// for example. - /// - /// This primarily delegates to specific helpers above. - ModRefInfo getModRefInfo(const Instruction *I, const MemoryLocation &Loc) { - switch (I->getOpcode()) { - case Instruction::VAArg: return getModRefInfo((const VAArgInst*)I, Loc); - case Instruction::Load: return getModRefInfo((const LoadInst*)I, Loc); - case Instruction::Store: return getModRefInfo((const StoreInst*)I, Loc); - case Instruction::Fence: return getModRefInfo((const FenceInst*)I, Loc); - case Instruction::AtomicCmpXchg: - return getModRefInfo((const AtomicCmpXchgInst*)I, Loc); - case Instruction::AtomicRMW: - return getModRefInfo((const AtomicRMWInst*)I, Loc); - case Instruction::Call: return getModRefInfo((const CallInst*)I, Loc); - case Instruction::Invoke: return getModRefInfo((const InvokeInst*)I,Loc); - case Instruction::CatchPad: - return getModRefInfo((const CatchPadInst *)I, Loc); - case Instruction::CatchRet: - return getModRefInfo((const CatchReturnInst *)I, Loc); - default: - return MRI_NoModRef; - } - } - - /// A convenience wrapper for constructing the memory location. - ModRefInfo getModRefInfo(const Instruction *I, const Value *P, - uint64_t Size) { - return getModRefInfo(I, MemoryLocation(P, Size)); - } - - /// Return information about whether a call and an instruction may refer to - /// the same memory locations. - ModRefInfo getModRefInfo(Instruction *I, ImmutableCallSite Call); - - /// Return information about whether two call sites may refer to the same set - /// of memory locations. See the AA documentation for details: - /// http://llvm.org/docs/AliasAnalysis.html#ModRefInfo - ModRefInfo getModRefInfo(ImmutableCallSite CS1, ImmutableCallSite CS2); - - /// \brief Return information about whether a particular call site modifies - /// or reads the specified memory location \p MemLoc before instruction \p I - /// in a BasicBlock. A ordered basic block \p OBB can be used to speed up - /// instruction ordering queries inside the BasicBlock containing \p I. - ModRefInfo callCapturesBefore(const Instruction *I, - const MemoryLocation &MemLoc, DominatorTree *DT, - OrderedBasicBlock *OBB = nullptr); - - /// \brief A convenience wrapper to synthesize a memory location. - ModRefInfo callCapturesBefore(const Instruction *I, const Value *P, - uint64_t Size, DominatorTree *DT, - OrderedBasicBlock *OBB = nullptr) { - return callCapturesBefore(I, MemoryLocation(P, Size), DT, OBB); - } - - /// @} - //===--------------------------------------------------------------------===// - /// \name Higher level methods for querying mod/ref information. - /// @{ - - /// Check if it is possible for execution of the specified basic block to - /// modify the location Loc. - bool canBasicBlockModify(const BasicBlock &BB, const MemoryLocation &Loc); - - /// A convenience wrapper synthesizing a memory location. - bool canBasicBlockModify(const BasicBlock &BB, const Value *P, - uint64_t Size) { - return canBasicBlockModify(BB, MemoryLocation(P, Size)); - } - - /// Check if it is possible for the execution of the specified instructions - /// to mod\ref (according to the mode) the location Loc. - /// - /// The instructions to consider are all of the instructions in the range of - /// [I1,I2] INCLUSIVE. I1 and I2 must be in the same basic block. - bool canInstructionRangeModRef(const Instruction &I1, const Instruction &I2, - const MemoryLocation &Loc, - const ModRefInfo Mode); - - /// A convenience wrapper synthesizing a memory location. - bool canInstructionRangeModRef(const Instruction &I1, const Instruction &I2, - const Value *Ptr, uint64_t Size, - const ModRefInfo Mode) { - return canInstructionRangeModRef(I1, I2, MemoryLocation(Ptr, Size), Mode); - } - -private: - class Concept; - template class Model; - - template friend class AAResultBase; - - const TargetLibraryInfo &TLI; - - std::vector> AAs; -}; - -/// Temporary typedef for legacy code that uses a generic \c AliasAnalysis -/// pointer or reference. -typedef AAResults AliasAnalysis; - -/// A private abstract base class describing the concept of an individual alias -/// analysis implementation. -/// -/// This interface is implemented by any \c Model instantiation. It is also the -/// interface which a type used to instantiate the model must provide. -/// -/// All of these methods model methods by the same name in the \c -/// AAResults class. Only differences and specifics to how the -/// implementations are called are documented here. -class AAResults::Concept { -public: - virtual ~Concept() = 0; - - /// An update API used internally by the AAResults to provide - /// a handle back to the top level aggregation. - virtual void setAAResults(AAResults *NewAAR) = 0; - - //===--------------------------------------------------------------------===// - /// \name Alias Queries - /// @{ - - /// The main low level interface to the alias analysis implementation. - /// Returns an AliasResult indicating whether the two pointers are aliased to - /// each other. This is the interface that must be implemented by specific - /// alias analysis implementations. - virtual AliasResult alias(const MemoryLocation &LocA, - const MemoryLocation &LocB) = 0; - - /// Checks whether the given location points to constant memory, or if - /// \p OrLocal is true whether it points to a local alloca. - virtual bool pointsToConstantMemory(const MemoryLocation &Loc, - bool OrLocal) = 0; - - /// @} - //===--------------------------------------------------------------------===// - /// \name Simple mod/ref information - /// @{ - - /// Get the ModRef info associated with a pointer argument of a callsite. The - /// result's bits are set to indicate the allowed aliasing ModRef kinds. Note - /// that these bits do not necessarily account for the overall behavior of - /// the function, but rather only provide additional per-argument - /// information. - virtual ModRefInfo getArgModRefInfo(ImmutableCallSite CS, - unsigned ArgIdx) = 0; - - /// Return the behavior of the given call site. - virtual FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS) = 0; - - /// Return the behavior when calling the given function. - virtual FunctionModRefBehavior getModRefBehavior(const Function *F) = 0; - - /// getModRefInfo (for call sites) - Return information about whether - /// a particular call site modifies or reads the specified memory location. - virtual ModRefInfo getModRefInfo(ImmutableCallSite CS, - const MemoryLocation &Loc) = 0; - - /// Return information about whether two call sites may refer to the same set - /// of memory locations. See the AA documentation for details: - /// http://llvm.org/docs/AliasAnalysis.html#ModRefInfo - virtual ModRefInfo getModRefInfo(ImmutableCallSite CS1, - ImmutableCallSite CS2) = 0; - - /// @} -}; - -/// A private class template which derives from \c Concept and wraps some other -/// type. -/// -/// This models the concept by directly forwarding each interface point to the -/// wrapped type which must implement a compatible interface. This provides -/// a type erased binding. -template class AAResults::Model final : public Concept { - AAResultT &Result; - -public: - explicit Model(AAResultT &Result, AAResults &AAR) : Result(Result) { - Result.setAAResults(&AAR); - } - ~Model() override {} - - void setAAResults(AAResults *NewAAR) override { Result.setAAResults(NewAAR); } - - AliasResult alias(const MemoryLocation &LocA, - const MemoryLocation &LocB) override { - return Result.alias(LocA, LocB); - } - - bool pointsToConstantMemory(const MemoryLocation &Loc, - bool OrLocal) override { - return Result.pointsToConstantMemory(Loc, OrLocal); - } - - ModRefInfo getArgModRefInfo(ImmutableCallSite CS, unsigned ArgIdx) override { - return Result.getArgModRefInfo(CS, ArgIdx); - } - - FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS) override { - return Result.getModRefBehavior(CS); - } - - FunctionModRefBehavior getModRefBehavior(const Function *F) override { - return Result.getModRefBehavior(F); - } - - ModRefInfo getModRefInfo(ImmutableCallSite CS, - const MemoryLocation &Loc) override { - return Result.getModRefInfo(CS, Loc); - } - - ModRefInfo getModRefInfo(ImmutableCallSite CS1, - ImmutableCallSite CS2) override { - return Result.getModRefInfo(CS1, CS2); - } -}; - -/// A CRTP-driven "mixin" base class to help implement the function alias -/// analysis results concept. -/// -/// Because of the nature of many alias analysis implementations, they often -/// only implement a subset of the interface. This base class will attempt to -/// implement the remaining portions of the interface in terms of simpler forms -/// of the interface where possible, and otherwise provide conservatively -/// correct fallback implementations. -/// -/// Implementors of an alias analysis should derive from this CRTP, and then -/// override specific methods that they wish to customize. There is no need to -/// use virtual anywhere, the CRTP base class does static dispatch to the -/// derived type passed into it. -template class AAResultBase { - // Expose some parts of the interface only to the AAResults::Model - // for wrapping. Specifically, this allows the model to call our - // setAAResults method without exposing it as a fully public API. - friend class AAResults::Model; - - /// A pointer to the AAResults object that this AAResult is - /// aggregated within. May be null if not aggregated. - AAResults *AAR; - - /// Helper to dispatch calls back through the derived type. - DerivedT &derived() { return static_cast(*this); } - - /// A setter for the AAResults pointer, which is used to satisfy the - /// AAResults::Model contract. - void setAAResults(AAResults *NewAAR) { AAR = NewAAR; } - -protected: - /// This proxy class models a common pattern where we delegate to either the - /// top-level \c AAResults aggregation if one is registered, or to the - /// current result if none are registered. - class AAResultsProxy { - AAResults *AAR; - DerivedT &CurrentResult; - - public: - AAResultsProxy(AAResults *AAR, DerivedT &CurrentResult) - : AAR(AAR), CurrentResult(CurrentResult) {} - - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB) { - return AAR ? AAR->alias(LocA, LocB) : CurrentResult.alias(LocA, LocB); - } - - bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal) { - return AAR ? AAR->pointsToConstantMemory(Loc, OrLocal) - : CurrentResult.pointsToConstantMemory(Loc, OrLocal); - } - - ModRefInfo getArgModRefInfo(ImmutableCallSite CS, unsigned ArgIdx) { - return AAR ? AAR->getArgModRefInfo(CS, ArgIdx) : CurrentResult.getArgModRefInfo(CS, ArgIdx); - } - - FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS) { - return AAR ? AAR->getModRefBehavior(CS) : CurrentResult.getModRefBehavior(CS); - } - - FunctionModRefBehavior getModRefBehavior(const Function *F) { - return AAR ? AAR->getModRefBehavior(F) : CurrentResult.getModRefBehavior(F); - } - - ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc) { - return AAR ? AAR->getModRefInfo(CS, Loc) - : CurrentResult.getModRefInfo(CS, Loc); - } - - ModRefInfo getModRefInfo(ImmutableCallSite CS1, ImmutableCallSite CS2) { - return AAR ? AAR->getModRefInfo(CS1, CS2) : CurrentResult.getModRefInfo(CS1, CS2); - } - }; - - explicit AAResultBase() {} - - // Provide all the copy and move constructors so that derived types aren't - // constrained. - AAResultBase(const AAResultBase &Arg) {} - AAResultBase(AAResultBase &&Arg) {} - - /// Get a proxy for the best AA result set to query at this time. - /// - /// When this result is part of a larger aggregation, this will proxy to that - /// aggregation. When this result is used in isolation, it will just delegate - /// back to the derived class's implementation. - /// - /// Note that callers of this need to take considerable care to not cause - /// performance problems when they use this routine, in the case of a large - /// number of alias analyses being aggregated, it can be expensive to walk - /// back across the chain. - AAResultsProxy getBestAAResults() { return AAResultsProxy(AAR, derived()); } - -public: - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB) { - return MayAlias; - } - - bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal) { - return false; - } - - ModRefInfo getArgModRefInfo(ImmutableCallSite CS, unsigned ArgIdx) { - return MRI_ModRef; - } - - FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS) { - return FMRB_UnknownModRefBehavior; - } - - FunctionModRefBehavior getModRefBehavior(const Function *F) { - return FMRB_UnknownModRefBehavior; - } - - ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc) { - return MRI_ModRef; - } - - ModRefInfo getModRefInfo(ImmutableCallSite CS1, ImmutableCallSite CS2) { - return MRI_ModRef; - } -}; - - -/// Return true if this pointer is returned by a noalias function. -bool isNoAliasCall(const Value *V); - -/// Return true if this is an argument with the noalias attribute. -bool isNoAliasArgument(const Value *V); - -/// Return true if this pointer refers to a distinct and identifiable object. -/// This returns true for: -/// Global Variables and Functions (but not Global Aliases) -/// Allocas -/// ByVal and NoAlias Arguments -/// NoAlias returns (e.g. calls to malloc) -/// -bool isIdentifiedObject(const Value *V); - -/// Return true if V is umabigously identified at the function-level. -/// Different IdentifiedFunctionLocals can't alias. -/// Further, an IdentifiedFunctionLocal can not alias with any function -/// arguments other than itself, which is not necessarily true for -/// IdentifiedObjects. -bool isIdentifiedFunctionLocal(const Value *V); - -/// A manager for alias analyses. -/// -/// This class can have analyses registered with it and when run, it will run -/// all of them and aggregate their results into single AA results interface -/// that dispatches across all of the alias analysis results available. -/// -/// Note that the order in which analyses are registered is very significant. -/// That is the order in which the results will be aggregated and queried. -/// -/// This manager effectively wraps the AnalysisManager for registering alias -/// analyses. When you register your alias analysis with this manager, it will -/// ensure the analysis itself is registered with its AnalysisManager. -class AAManager : public AnalysisInfoMixin { -public: - typedef AAResults Result; - - // This type hase value semantics. We have to spell these out because MSVC - // won't synthesize them. - AAManager() {} - AAManager(AAManager &&Arg) : ResultGetters(std::move(Arg.ResultGetters)) {} - AAManager(const AAManager &Arg) : ResultGetters(Arg.ResultGetters) {} - AAManager &operator=(AAManager &&RHS) { - ResultGetters = std::move(RHS.ResultGetters); - return *this; - } - AAManager &operator=(const AAManager &RHS) { - ResultGetters = RHS.ResultGetters; - return *this; - } - - /// Register a specific AA result. - template void registerFunctionAnalysis() { - ResultGetters.push_back(&getFunctionAAResultImpl); - } - - /// Register a specific AA result. - template void registerModuleAnalysis() { - ResultGetters.push_back(&getModuleAAResultImpl); - } - - Result run(Function &F, AnalysisManager &AM) { - Result R(AM.getResult(F)); - for (auto &Getter : ResultGetters) - (*Getter)(F, AM, R); - return R; - } - -private: - friend AnalysisInfoMixin; - static char PassID; - - SmallVector &AM, - AAResults &AAResults), - 4> ResultGetters; - - template - static void getFunctionAAResultImpl(Function &F, - AnalysisManager &AM, - AAResults &AAResults) { - AAResults.addAAResult(AM.template getResult(F)); - } - - template - static void getModuleAAResultImpl(Function &F, AnalysisManager &AM, - AAResults &AAResults) { - auto &MAM = - AM.getResult(F).getManager(); - if (auto *R = MAM.template getCachedResult(*F.getParent())) - AAResults.addAAResult(*R); - } -}; - -/// A wrapper pass to provide the legacy pass manager access to a suitably -/// prepared AAResults object. -class AAResultsWrapperPass : public FunctionPass { - std::unique_ptr AAR; - -public: - static char ID; - - AAResultsWrapperPass(); - - AAResults &getAAResults() { return *AAR; } - const AAResults &getAAResults() const { return *AAR; } - - bool runOnFunction(Function &F) override; - - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -FunctionPass *createAAResultsWrapperPass(); - -/// A wrapper pass around a callback which can be used to populate the -/// AAResults in the AAResultsWrapperPass from an external AA. -/// -/// The callback provided here will be used each time we prepare an AAResults -/// object, and will receive a reference to the function wrapper pass, the -/// function, and the AAResults object to populate. This should be used when -/// setting up a custom pass pipeline to inject a hook into the AA results. -ImmutablePass *createExternalAAWrapperPass( - std::function Callback); - -/// A helper for the legacy pass manager to create a \c AAResults -/// object populated to the best of our ability for a particular function when -/// inside of a \c ModulePass or a \c CallGraphSCCPass. -/// -/// If a \c ModulePass or a \c CallGraphSCCPass calls \p -/// createLegacyPMAAResults, it also needs to call \p addUsedAAAnalyses in \p -/// getAnalysisUsage. -AAResults createLegacyPMAAResults(Pass &P, Function &F, BasicAAResult &BAR); - -/// A helper for the legacy pass manager to populate \p AU to add uses to make -/// sure the analyses required by \p createLegacyPMAAResults are available. -void getAAResultsAnalysisUsage(AnalysisUsage &AU); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/AliasAnalysisEvaluator.h b/llvm/include/llvm/Analysis/AliasAnalysisEvaluator.h deleted file mode 100644 index 505ed0d9..00000000 --- a/llvm/include/llvm/Analysis/AliasAnalysisEvaluator.h +++ /dev/null @@ -1,70 +0,0 @@ -//===- AliasAnalysisEvaluator.h - Alias Analysis Accuracy Evaluator -------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This file implements a simple N^2 alias analysis accuracy evaluator. The -/// analysis result is a set of statistics of how many times the AA -/// infrastructure provides each kind of alias result and mod/ref result when -/// queried with all pairs of pointers in the function. -/// -/// It can be used to evaluate a change in an alias analysis implementation, -/// algorithm, or the AA pipeline infrastructure itself. It acts like a stable -/// and easily tested consumer of all AA information exposed. -/// -/// This is inspired and adapted from code by: Naveen Neelakantam, Francesco -/// Spadini, and Wojciech Stryjewski. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_ALIASANALYSISEVALUATOR_H -#define LLVM_ANALYSIS_ALIASANALYSISEVALUATOR_H - -#include "llvm/IR/Function.h" -#include "llvm/IR/PassManager.h" - -namespace llvm { -class AAResults; - -class AAEvaluator : public PassInfoMixin { - int64_t FunctionCount; - int64_t NoAliasCount, MayAliasCount, PartialAliasCount, MustAliasCount; - int64_t NoModRefCount, ModCount, RefCount, ModRefCount; - -public: - AAEvaluator() - : FunctionCount(), NoAliasCount(), MayAliasCount(), PartialAliasCount(), - MustAliasCount(), NoModRefCount(), ModCount(), RefCount(), - ModRefCount() {} - AAEvaluator(AAEvaluator &&Arg) - : FunctionCount(Arg.FunctionCount), NoAliasCount(Arg.NoAliasCount), - MayAliasCount(Arg.MayAliasCount), - PartialAliasCount(Arg.PartialAliasCount), - MustAliasCount(Arg.MustAliasCount), NoModRefCount(Arg.NoModRefCount), - ModCount(Arg.ModCount), RefCount(Arg.RefCount), - ModRefCount(Arg.ModRefCount) { - Arg.FunctionCount = 0; - } - ~AAEvaluator(); - - /// \brief Run the pass over the function. - PreservedAnalyses run(Function &F, AnalysisManager &AM); - -private: - // Allow the legacy pass to run this using an internal API. - friend class AAEvalLegacyPass; - - void runInternal(Function &F, AAResults &AA); -}; - -/// Create a wrapper of the above for the legacy pass manager. -FunctionPass *createAAEvalPass(); - -} - -#endif diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h deleted file mode 100644 index cec56889..00000000 --- a/llvm/include/llvm/Analysis/AliasSetTracker.h +++ /dev/null @@ -1,447 +0,0 @@ -//===- llvm/Analysis/AliasSetTracker.h - Build Alias Sets -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines two classes: AliasSetTracker and AliasSet. These interfaces -// are used to classify a collection of pointer references into a maximal number -// of disjoint sets. Each AliasSet object constructed by the AliasSetTracker -// object refers to memory disjoint from the other sets. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_ALIASSETTRACKER_H -#define LLVM_ANALYSIS_ALIASSETTRACKER_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/Metadata.h" -#include "llvm/IR/ValueHandle.h" -#include - -namespace llvm { - -class LoadInst; -class StoreInst; -class VAArgInst; -class MemSetInst; -class AliasSetTracker; -class AliasSet; - -class AliasSet : public ilist_node { - friend class AliasSetTracker; - - class PointerRec { - Value *Val; // The pointer this record corresponds to. - PointerRec **PrevInList, *NextInList; - AliasSet *AS; - uint64_t Size; - AAMDNodes AAInfo; - - public: - PointerRec(Value *V) - : Val(V), PrevInList(nullptr), NextInList(nullptr), AS(nullptr), Size(0), - AAInfo(DenseMapInfo::getEmptyKey()) {} - - Value *getValue() const { return Val; } - - PointerRec *getNext() const { return NextInList; } - bool hasAliasSet() const { return AS != nullptr; } - - PointerRec** setPrevInList(PointerRec **PIL) { - PrevInList = PIL; - return &NextInList; - } - - bool updateSizeAndAAInfo(uint64_t NewSize, const AAMDNodes &NewAAInfo) { - bool SizeChanged = false; - if (NewSize > Size) { - Size = NewSize; - SizeChanged = true; - } - - if (AAInfo == DenseMapInfo::getEmptyKey()) - // We don't have a AAInfo yet. Set it to NewAAInfo. - AAInfo = NewAAInfo; - else if (AAInfo != NewAAInfo) - // NewAAInfo conflicts with AAInfo. - AAInfo = DenseMapInfo::getTombstoneKey(); - - return SizeChanged; - } - - uint64_t getSize() const { return Size; } - - /// Return the AAInfo, or null if there is no information or conflicting - /// information. - AAMDNodes getAAInfo() const { - // If we have missing or conflicting AAInfo, return null. - if (AAInfo == DenseMapInfo::getEmptyKey() || - AAInfo == DenseMapInfo::getTombstoneKey()) - return AAMDNodes(); - return AAInfo; - } - - AliasSet *getAliasSet(AliasSetTracker &AST) { - assert(AS && "No AliasSet yet!"); - if (AS->Forward) { - AliasSet *OldAS = AS; - AS = OldAS->getForwardedTarget(AST); - AS->addRef(); - OldAS->dropRef(AST); - } - return AS; - } - - void setAliasSet(AliasSet *as) { - assert(!AS && "Already have an alias set!"); - AS = as; - } - - void eraseFromList() { - if (NextInList) NextInList->PrevInList = PrevInList; - *PrevInList = NextInList; - if (AS->PtrListEnd == &NextInList) { - AS->PtrListEnd = PrevInList; - assert(*AS->PtrListEnd == nullptr && "List not terminated right!"); - } - delete this; - } - }; - - PointerRec *PtrList, **PtrListEnd; // Doubly linked list of nodes. - AliasSet *Forward; // Forwarding pointer. - - /// All instructions without a specific address in this alias set. - std::vector > UnknownInsts; - - /// Number of nodes pointing to this AliasSet plus the number of AliasSets - /// forwarding to it. - unsigned RefCount : 28; - - /// The kinds of access this alias set models. - /// - /// We keep track of whether this alias set merely refers to the locations of - /// memory (and not any particular access), whether it modifies or references - /// the memory, or whether it does both. The lattice goes from "NoAccess" to - /// either RefAccess or ModAccess, then to ModRefAccess as necessary. - enum AccessLattice { - NoAccess = 0, - RefAccess = 1, - ModAccess = 2, - ModRefAccess = RefAccess | ModAccess - }; - unsigned Access : 2; - - /// The kind of alias relationship between pointers of the set. - /// - /// These represent conservatively correct alias results between any members - /// of the set. We represent these independently of the values of alias - /// results in order to pack it into a single bit. Lattice goes from - /// MustAlias to MayAlias. - enum AliasLattice { - SetMustAlias = 0, SetMayAlias = 1 - }; - unsigned Alias : 1; - - /// True if this alias set contains volatile loads or stores. - unsigned Volatile : 1; - - void addRef() { ++RefCount; } - void dropRef(AliasSetTracker &AST) { - assert(RefCount >= 1 && "Invalid reference count detected!"); - if (--RefCount == 0) - removeFromTracker(AST); - } - - Instruction *getUnknownInst(unsigned i) const { - assert(i < UnknownInsts.size()); - return UnknownInsts[i]; - } - -public: - /// Accessors... - bool isRef() const { return Access & RefAccess; } - bool isMod() const { return Access & ModAccess; } - bool isMustAlias() const { return Alias == SetMustAlias; } - bool isMayAlias() const { return Alias == SetMayAlias; } - - /// Return true if this alias set contains volatile loads or stores. - bool isVolatile() const { return Volatile; } - - /// Return true if this alias set should be ignored as part of the - /// AliasSetTracker object. - bool isForwardingAliasSet() const { return Forward; } - - /// Merge the specified alias set into this alias set. - void mergeSetIn(AliasSet &AS, AliasSetTracker &AST); - - // Alias Set iteration - Allow access to all of the pointers which are part of - // this alias set. - class iterator; - iterator begin() const { return iterator(PtrList); } - iterator end() const { return iterator(); } - bool empty() const { return PtrList == nullptr; } - - void print(raw_ostream &OS) const; - void dump() const; - - /// Define an iterator for alias sets... this is just a forward iterator. - class iterator : public std::iterator { - PointerRec *CurNode; - - public: - explicit iterator(PointerRec *CN = nullptr) : CurNode(CN) {} - - bool operator==(const iterator& x) const { - return CurNode == x.CurNode; - } - bool operator!=(const iterator& x) const { return !operator==(x); } - - value_type &operator*() const { - assert(CurNode && "Dereferencing AliasSet.end()!"); - return *CurNode; - } - value_type *operator->() const { return &operator*(); } - - Value *getPointer() const { return CurNode->getValue(); } - uint64_t getSize() const { return CurNode->getSize(); } - AAMDNodes getAAInfo() const { return CurNode->getAAInfo(); } - - iterator& operator++() { // Preincrement - assert(CurNode && "Advancing past AliasSet.end()!"); - CurNode = CurNode->getNext(); - return *this; - } - iterator operator++(int) { // Postincrement - iterator tmp = *this; ++*this; return tmp; - } - }; - -private: - // Can only be created by AliasSetTracker. Also, ilist creates one - // to serve as a sentinel. - friend struct ilist_sentinel_traits; - AliasSet() - : PtrList(nullptr), PtrListEnd(&PtrList), Forward(nullptr), RefCount(0), - Access(NoAccess), Alias(SetMustAlias), Volatile(false) { - } - - AliasSet(const AliasSet &AS) = delete; - void operator=(const AliasSet &AS) = delete; - - PointerRec *getSomePointer() const { - return PtrList; - } - - /// Return the real alias set this represents. If this has been merged with - /// another set and is forwarding, return the ultimate destination set. This - /// also implements the union-find collapsing as well. - AliasSet *getForwardedTarget(AliasSetTracker &AST) { - if (!Forward) return this; - - AliasSet *Dest = Forward->getForwardedTarget(AST); - if (Dest != Forward) { - Dest->addRef(); - Forward->dropRef(AST); - Forward = Dest; - } - return Dest; - } - - void removeFromTracker(AliasSetTracker &AST); - - void addPointer(AliasSetTracker &AST, PointerRec &Entry, uint64_t Size, - const AAMDNodes &AAInfo, - bool KnownMustAlias = false); - void addUnknownInst(Instruction *I, AliasAnalysis &AA); - void removeUnknownInst(AliasSetTracker &AST, Instruction *I) { - bool WasEmpty = UnknownInsts.empty(); - for (size_t i = 0, e = UnknownInsts.size(); i != e; ++i) - if (UnknownInsts[i] == I) { - UnknownInsts[i] = UnknownInsts.back(); - UnknownInsts.pop_back(); - --i; --e; // Revisit the moved entry. - } - if (!WasEmpty && UnknownInsts.empty()) - dropRef(AST); - } - void setVolatile() { Volatile = true; } - -public: - /// Return true if the specified pointer "may" (or must) alias one of the - /// members in the set. - bool aliasesPointer(const Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo, - AliasAnalysis &AA) const; - bool aliasesUnknownInst(const Instruction *Inst, AliasAnalysis &AA) const; -}; - -inline raw_ostream& operator<<(raw_ostream &OS, const AliasSet &AS) { - AS.print(OS); - return OS; -} - -class AliasSetTracker { - /// A CallbackVH to arrange for AliasSetTracker to be notified whenever a - /// Value is deleted. - class ASTCallbackVH final : public CallbackVH { - AliasSetTracker *AST; - void deleted() override; - void allUsesReplacedWith(Value *) override; - - public: - ASTCallbackVH(Value *V, AliasSetTracker *AST = nullptr); - ASTCallbackVH &operator=(Value *V); - }; - /// Traits to tell DenseMap that tell us how to compare and hash the value - /// handle. - struct ASTCallbackVHDenseMapInfo : public DenseMapInfo {}; - - AliasAnalysis &AA; - ilist AliasSets; - - typedef DenseMap - PointerMapType; - - // Map from pointers to their node - PointerMapType PointerMap; - -public: - /// Create an empty collection of AliasSets, and use the specified alias - /// analysis object to disambiguate load and store addresses. - explicit AliasSetTracker(AliasAnalysis &aa) : AA(aa) {} - ~AliasSetTracker() { clear(); } - - /// These methods are used to add different types of instructions to the alias - /// sets. Adding a new instruction can result in one of three actions - /// happening: - /// - /// 1. If the instruction doesn't alias any other sets, create a new set. - /// 2. If the instruction aliases exactly one set, add it to the set - /// 3. If the instruction aliases multiple sets, merge the sets, and add - /// the instruction to the result. - /// - /// These methods return true if inserting the instruction resulted in the - /// addition of a new alias set (i.e., the pointer did not alias anything). - /// - bool add(Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo); // Add a loc. - bool add(LoadInst *LI); - bool add(StoreInst *SI); - bool add(VAArgInst *VAAI); - bool add(MemSetInst *MSI); - bool add(Instruction *I); // Dispatch to one of the other add methods... - void add(BasicBlock &BB); // Add all instructions in basic block - void add(const AliasSetTracker &AST); // Add alias relations from another AST - bool addUnknown(Instruction *I); - - /// These methods are used to remove all entries that might be aliased by the - /// specified instruction. These methods return true if any alias sets were - /// eliminated. - bool remove(Value *Ptr, uint64_t Size, const AAMDNodes &AAInfo); - bool remove(LoadInst *LI); - bool remove(StoreInst *SI); - bool remove(VAArgInst *VAAI); - bool remove(MemSetInst *MSI); - bool remove(Instruction *I); - void remove(AliasSet &AS); - bool removeUnknown(Instruction *I); - - void clear(); - - /// Return the alias sets that are active. - const ilist &getAliasSets() const { return AliasSets; } - - /// Return the alias set that the specified pointer lives in. If the New - /// argument is non-null, this method sets the value to true if a new alias - /// set is created to contain the pointer (because the pointer didn't alias - /// anything). - AliasSet &getAliasSetForPointer(Value *P, uint64_t Size, - const AAMDNodes &AAInfo, - bool *New = nullptr); - - /// Return the alias set containing the location specified if one exists, - /// otherwise return null. - AliasSet *getAliasSetForPointerIfExists(const Value *P, uint64_t Size, - const AAMDNodes &AAInfo) { - return mergeAliasSetsForPointer(P, Size, AAInfo); - } - - /// Return true if the specified location is represented by this alias set, - /// false otherwise. This does not modify the AST object or alias sets. - bool containsPointer(const Value *P, uint64_t Size, - const AAMDNodes &AAInfo) const; - - /// Return true if the specified instruction "may" (or must) alias one of the - /// members in any of the sets. - bool containsUnknown(const Instruction *I) const; - - /// Return the underlying alias analysis object used by this tracker. - AliasAnalysis &getAliasAnalysis() const { return AA; } - - /// This method is used to remove a pointer value from the AliasSetTracker - /// entirely. It should be used when an instruction is deleted from the - /// program to update the AST. If you don't use this, you would have dangling - /// pointers to deleted instructions. - void deleteValue(Value *PtrVal); - - /// This method should be used whenever a preexisting value in the program is - /// copied or cloned, introducing a new value. Note that it is ok for clients - /// that use this method to introduce the same value multiple times: if the - /// tracker already knows about a value, it will ignore the request. - void copyValue(Value *From, Value *To); - - typedef ilist::iterator iterator; - typedef ilist::const_iterator const_iterator; - - const_iterator begin() const { return AliasSets.begin(); } - const_iterator end() const { return AliasSets.end(); } - - iterator begin() { return AliasSets.begin(); } - iterator end() { return AliasSets.end(); } - - void print(raw_ostream &OS) const; - void dump() const; - -private: - friend class AliasSet; - void removeAliasSet(AliasSet *AS); - - /// Just like operator[] on the map, except that it creates an entry for the - /// pointer if it doesn't already exist. - AliasSet::PointerRec &getEntryFor(Value *V) { - AliasSet::PointerRec *&Entry = PointerMap[ASTCallbackVH(V, this)]; - if (!Entry) - Entry = new AliasSet::PointerRec(V); - return *Entry; - } - - AliasSet &addPointer(Value *P, uint64_t Size, const AAMDNodes &AAInfo, - AliasSet::AccessLattice E, - bool &NewSet) { - NewSet = false; - AliasSet &AS = getAliasSetForPointer(P, Size, AAInfo, &NewSet); - AS.Access |= E; - return AS; - } - AliasSet *mergeAliasSetsForPointer(const Value *Ptr, uint64_t Size, - const AAMDNodes &AAInfo); - - AliasSet *findAliasSetForUnknownInst(Instruction *Inst); -}; - -inline raw_ostream& operator<<(raw_ostream &OS, const AliasSetTracker &AST) { - AST.print(OS); - return OS; -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/AssumptionCache.h b/llvm/include/llvm/Analysis/AssumptionCache.h deleted file mode 100644 index 06f2a117..00000000 --- a/llvm/include/llvm/Analysis/AssumptionCache.h +++ /dev/null @@ -1,174 +0,0 @@ -//===- llvm/Analysis/AssumptionCache.h - Track @llvm.assume ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains a pass that keeps track of @llvm.assume intrinsics in -// the functions of a module (allowing assumptions within any function to be -// found cheaply by other parts of the optimizer). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_ASSUMPTIONCACHE_H -#define LLVM_ANALYSIS_ASSUMPTIONCACHE_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallSet.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -/// \brief A cache of @llvm.assume calls within a function. -/// -/// This cache provides fast lookup of assumptions within a function by caching -/// them and amortizing the cost of scanning for them across all queries. The -/// cache is also conservatively self-updating so that it will never return -/// incorrect results about a function even as the function is being mutated. -/// However, flushing the cache and rebuilding it (or explicitly updating it) -/// may allow it to discover new assumptions. -class AssumptionCache { - /// \brief The function for which this cache is handling assumptions. - /// - /// We track this to lazily populate our assumptions. - Function &F; - - /// \brief Vector of weak value handles to calls of the @llvm.assume - /// intrinsic. - SmallVector AssumeHandles; - - /// \brief Flag tracking whether we have scanned the function yet. - /// - /// We want to be as lazy about this as possible, and so we scan the function - /// at the last moment. - bool Scanned; - - /// \brief Scan the function for assumptions and add them to the cache. - void scanFunction(); - -public: - /// \brief Construct an AssumptionCache from a function by scanning all of - /// its instructions. - AssumptionCache(Function &F) : F(F), Scanned(false) {} - - /// \brief Add an @llvm.assume intrinsic to this function's cache. - /// - /// The call passed in must be an instruction within this function and must - /// not already be in the cache. - void registerAssumption(CallInst *CI); - - /// \brief Clear the cache of @llvm.assume intrinsics for a function. - /// - /// It will be re-scanned the next time it is requested. - void clear() { - AssumeHandles.clear(); - Scanned = false; - } - - /// \brief Access the list of assumption handles currently tracked for this - /// function. - /// - /// Note that these produce weak handles that may be null. The caller must - /// handle that case. - /// FIXME: We should replace this with pointee_iterator> - /// when we can write that to filter out the null values. Then caller code - /// will become simpler. - MutableArrayRef assumptions() { - if (!Scanned) - scanFunction(); - return AssumeHandles; - } -}; - -/// \brief A function analysis which provides an \c AssumptionCache. -/// -/// This analysis is intended for use with the new pass manager and will vend -/// assumption caches for a given function. -class AssumptionAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef AssumptionCache Result; - - AssumptionAnalysis() {} - AssumptionAnalysis(const AssumptionAnalysis &Arg) {} - AssumptionAnalysis(AssumptionAnalysis &&Arg) {} - AssumptionAnalysis &operator=(const AssumptionAnalysis &RHS) { return *this; } - AssumptionAnalysis &operator=(AssumptionAnalysis &&RHS) { return *this; } - - AssumptionCache run(Function &F, FunctionAnalysisManager &) { - return AssumptionCache(F); - } -}; - -/// \brief Printer pass for the \c AssumptionAnalysis results. -class AssumptionPrinterPass : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit AssumptionPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -/// \brief An immutable pass that tracks lazily created \c AssumptionCache -/// objects. -/// -/// This is essentially a workaround for the legacy pass manager's weaknesses -/// which associates each assumption cache with Function and clears it if the -/// function is deleted. The nature of the AssumptionCache is that it is not -/// invalidated by any changes to the function body and so this is sufficient -/// to be conservatively correct. -class AssumptionCacheTracker : public ImmutablePass { - /// A callback value handle applied to function objects, which we use to - /// delete our cache of intrinsics for a function when it is deleted. - class FunctionCallbackVH final : public CallbackVH { - AssumptionCacheTracker *ACT; - void deleted() override; - - public: - typedef DenseMapInfo DMI; - - FunctionCallbackVH(Value *V, AssumptionCacheTracker *ACT = nullptr) - : CallbackVH(V), ACT(ACT) {} - }; - - friend FunctionCallbackVH; - - typedef DenseMap, - FunctionCallbackVH::DMI> FunctionCallsMap; - FunctionCallsMap AssumptionCaches; - -public: - /// \brief Get the cached assumptions for a function. - /// - /// If no assumptions are cached, this will scan the function. Otherwise, the - /// existing cache will be returned. - AssumptionCache &getAssumptionCache(Function &F); - - AssumptionCacheTracker(); - ~AssumptionCacheTracker() override; - - void releaseMemory() override { AssumptionCaches.shrink_and_clear(); } - - void verifyAnalysis() const override; - bool doFinalization(Module &) override { - verifyAnalysis(); - return false; - } - - static char ID; // Pass identification, replacement for typeid -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/BasicAliasAnalysis.h b/llvm/include/llvm/Analysis/BasicAliasAnalysis.h deleted file mode 100644 index a3195d17..00000000 --- a/llvm/include/llvm/Analysis/BasicAliasAnalysis.h +++ /dev/null @@ -1,235 +0,0 @@ -//===- BasicAliasAnalysis.h - Stateless, local Alias Analysis ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This is the interface for LLVM's primary stateless and local alias analysis. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_BASICALIASANALYSIS_H -#define LLVM_ANALYSIS_BASICALIASANALYSIS_H - -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/AssumptionCache.h" -#include "llvm/Analysis/TargetLibraryInfo.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/GetElementPtrTypeIterator.h" -#include "llvm/IR/Instruction.h" -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { -class AssumptionCache; -class DominatorTree; -class LoopInfo; - -/// This is the AA result object for the basic, local, and stateless alias -/// analysis. It implements the AA query interface in an entirely stateless -/// manner. As one consequence, it is never invalidated. While it does retain -/// some storage, that is used as an optimization and not to preserve -/// information from query to query. -class BasicAAResult : public AAResultBase { - friend AAResultBase; - - const DataLayout &DL; - const TargetLibraryInfo &TLI; - AssumptionCache &AC; - DominatorTree *DT; - LoopInfo *LI; - -public: - BasicAAResult(const DataLayout &DL, const TargetLibraryInfo &TLI, - AssumptionCache &AC, DominatorTree *DT = nullptr, - LoopInfo *LI = nullptr) - : AAResultBase(), DL(DL), TLI(TLI), AC(AC), DT(DT), LI(LI) {} - - BasicAAResult(const BasicAAResult &Arg) - : AAResultBase(Arg), DL(Arg.DL), TLI(Arg.TLI), AC(Arg.AC), DT(Arg.DT), - LI(Arg.LI) {} - BasicAAResult(BasicAAResult &&Arg) - : AAResultBase(std::move(Arg)), DL(Arg.DL), TLI(Arg.TLI), AC(Arg.AC), - DT(Arg.DT), LI(Arg.LI) {} - - /// Handle invalidation events from the new pass manager. - /// - /// By definition, this result is stateless and so remains valid. - bool invalidate(Function &, const PreservedAnalyses &) { return false; } - - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB); - - ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc); - - ModRefInfo getModRefInfo(ImmutableCallSite CS1, ImmutableCallSite CS2); - - /// Chases pointers until we find a (constant global) or not. - bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal); - - /// Get the location associated with a pointer argument of a callsite. - ModRefInfo getArgModRefInfo(ImmutableCallSite CS, unsigned ArgIdx); - - /// Returns the behavior when calling the given call site. - FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS); - - /// Returns the behavior when calling the given function. For use when the - /// call site is not known. - FunctionModRefBehavior getModRefBehavior(const Function *F); - -private: - // A linear transformation of a Value; this class represents ZExt(SExt(V, - // SExtBits), ZExtBits) * Scale + Offset. - struct VariableGEPIndex { - - // An opaque Value - we can't decompose this further. - const Value *V; - - // We need to track what extensions we've done as we consider the same Value - // with different extensions as different variables in a GEP's linear - // expression; - // e.g.: if V == -1, then sext(x) != zext(x). - unsigned ZExtBits; - unsigned SExtBits; - - int64_t Scale; - - bool operator==(const VariableGEPIndex &Other) const { - return V == Other.V && ZExtBits == Other.ZExtBits && - SExtBits == Other.SExtBits && Scale == Other.Scale; - } - - bool operator!=(const VariableGEPIndex &Other) const { - return !operator==(Other); - } - }; - - // Represents the internal structure of a GEP, decomposed into a base pointer, - // constant offsets, and variable scaled indices. - struct DecomposedGEP { - // Base pointer of the GEP - const Value *Base; - // Total constant offset w.r.t the base from indexing into structs - int64_t StructOffset; - // Total constant offset w.r.t the base from indexing through - // pointers/arrays/vectors - int64_t OtherOffset; - // Scaled variable (non-constant) indices. - SmallVector VarIndices; - }; - - /// Track alias queries to guard against recursion. - typedef std::pair LocPair; - typedef SmallDenseMap AliasCacheTy; - AliasCacheTy AliasCache; - - /// Tracks phi nodes we have visited. - /// - /// When interpret "Value" pointer equality as value equality we need to make - /// sure that the "Value" is not part of a cycle. Otherwise, two uses could - /// come from different "iterations" of a cycle and see different values for - /// the same "Value" pointer. - /// - /// The following example shows the problem: - /// %p = phi(%alloca1, %addr2) - /// %l = load %ptr - /// %addr1 = gep, %alloca2, 0, %l - /// %addr2 = gep %alloca2, 0, (%l + 1) - /// alias(%p, %addr1) -> MayAlias ! - /// store %l, ... - SmallPtrSet VisitedPhiBBs; - - /// Tracks instructions visited by pointsToConstantMemory. - SmallPtrSet Visited; - - static const Value * - GetLinearExpression(const Value *V, APInt &Scale, APInt &Offset, - unsigned &ZExtBits, unsigned &SExtBits, - const DataLayout &DL, unsigned Depth, AssumptionCache *AC, - DominatorTree *DT, bool &NSW, bool &NUW); - - static bool DecomposeGEPExpression(const Value *V, DecomposedGEP &Decomposed, - const DataLayout &DL, AssumptionCache *AC, DominatorTree *DT); - - static bool isGEPBaseAtNegativeOffset(const GEPOperator *GEPOp, - const DecomposedGEP &DecompGEP, const DecomposedGEP &DecompObject, - uint64_t ObjectAccessSize); - - /// \brief A Heuristic for aliasGEP that searches for a constant offset - /// between the variables. - /// - /// GetLinearExpression has some limitations, as generally zext(%x + 1) - /// != zext(%x) + zext(1) if the arithmetic overflows. GetLinearExpression - /// will therefore conservatively refuse to decompose these expressions. - /// However, we know that, for all %x, zext(%x) != zext(%x + 1), even if - /// the addition overflows. - bool - constantOffsetHeuristic(const SmallVectorImpl &VarIndices, - uint64_t V1Size, uint64_t V2Size, int64_t BaseOffset, - AssumptionCache *AC, DominatorTree *DT); - - bool isValueEqualInPotentialCycles(const Value *V1, const Value *V2); - - void GetIndexDifference(SmallVectorImpl &Dest, - const SmallVectorImpl &Src); - - AliasResult aliasGEP(const GEPOperator *V1, uint64_t V1Size, - const AAMDNodes &V1AAInfo, const Value *V2, - uint64_t V2Size, const AAMDNodes &V2AAInfo, - const Value *UnderlyingV1, const Value *UnderlyingV2); - - AliasResult aliasPHI(const PHINode *PN, uint64_t PNSize, - const AAMDNodes &PNAAInfo, const Value *V2, - uint64_t V2Size, const AAMDNodes &V2AAInfo); - - AliasResult aliasSelect(const SelectInst *SI, uint64_t SISize, - const AAMDNodes &SIAAInfo, const Value *V2, - uint64_t V2Size, const AAMDNodes &V2AAInfo); - - AliasResult aliasCheck(const Value *V1, uint64_t V1Size, AAMDNodes V1AATag, - const Value *V2, uint64_t V2Size, AAMDNodes V2AATag); -}; - -/// Analysis pass providing a never-invalidated alias analysis result. -class BasicAA : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef BasicAAResult Result; - - BasicAAResult run(Function &F, AnalysisManager &AM); -}; - -/// Legacy wrapper pass to provide the BasicAAResult object. -class BasicAAWrapperPass : public FunctionPass { - std::unique_ptr Result; - - virtual void anchor(); - -public: - static char ID; - - BasicAAWrapperPass(); - - BasicAAResult &getResult() { return *Result; } - const BasicAAResult &getResult() const { return *Result; } - - bool runOnFunction(Function &F) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -FunctionPass *createBasicAAWrapperPass(); - -/// A helper for the legacy pass manager to create a \c BasicAAResult object -/// populated to the best of our ability for a particular function when inside -/// of a \c ModulePass or a \c CallGraphSCCPass. -BasicAAResult createLegacyPMBasicAAResult(Pass &P, Function &F); -} - -#endif diff --git a/llvm/include/llvm/Analysis/BlockFrequencyInfo.h b/llvm/include/llvm/Analysis/BlockFrequencyInfo.h deleted file mode 100644 index 7d48dfc9..00000000 --- a/llvm/include/llvm/Analysis/BlockFrequencyInfo.h +++ /dev/null @@ -1,130 +0,0 @@ -//===- BlockFrequencyInfo.h - Block Frequency Analysis ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Loops should be simplified before this analysis. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H -#define LLVM_ANALYSIS_BLOCKFREQUENCYINFO_H - -#include "llvm/ADT/Optional.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" -#include "llvm/Support/BlockFrequency.h" -#include - -namespace llvm { - -class BranchProbabilityInfo; -class LoopInfo; -template class BlockFrequencyInfoImpl; - -/// BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to -/// estimate IR basic block frequencies. -class BlockFrequencyInfo { - typedef BlockFrequencyInfoImpl ImplType; - std::unique_ptr BFI; - - void operator=(const BlockFrequencyInfo &) = delete; - BlockFrequencyInfo(const BlockFrequencyInfo &) = delete; - -public: - BlockFrequencyInfo(); - BlockFrequencyInfo(const Function &F, const BranchProbabilityInfo &BPI, - const LoopInfo &LI); - BlockFrequencyInfo(BlockFrequencyInfo &&Arg); - - BlockFrequencyInfo &operator=(BlockFrequencyInfo &&RHS); - - ~BlockFrequencyInfo(); - - const Function *getFunction() const; - const BranchProbabilityInfo *getBPI() const; - void view() const; - - /// getblockFreq - Return block frequency. Return 0 if we don't have the - /// information. Please note that initial frequency is equal to ENTRY_FREQ. It - /// means that we should not rely on the value itself, but only on the - /// comparison to the other block frequencies. We do this to avoid using of - /// floating points. - BlockFrequency getBlockFreq(const BasicBlock *BB) const; - - /// \brief Returns the estimated profile count of \p BB. - /// This computes the relative block frequency of \p BB and multiplies it by - /// the enclosing function's count (if available) and returns the value. - Optional getBlockProfileCount(const BasicBlock *BB) const; - - // Set the frequency of the given basic block. - void setBlockFreq(const BasicBlock *BB, uint64_t Freq); - - /// calculate - compute block frequency info for the given function. - void calculate(const Function &F, const BranchProbabilityInfo &BPI, - const LoopInfo &LI); - - // Print the block frequency Freq to OS using the current functions entry - // frequency to convert freq into a relative decimal form. - raw_ostream &printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const; - - // Convenience method that attempts to look up the frequency associated with - // BB and print it to OS. - raw_ostream &printBlockFreq(raw_ostream &OS, const BasicBlock *BB) const; - - uint64_t getEntryFreq() const; - void releaseMemory(); - void print(raw_ostream &OS) const; -}; - -/// \brief Analysis pass which computes \c BlockFrequencyInfo. -class BlockFrequencyAnalysis - : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// \brief Provide the result typedef for this analysis pass. - typedef BlockFrequencyInfo Result; - - /// \brief Run the analysis pass over a function and produce BFI. - Result run(Function &F, AnalysisManager &AM); -}; - -/// \brief Printer pass for the \c BlockFrequencyInfo results. -class BlockFrequencyPrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit BlockFrequencyPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -/// \brief Legacy analysis pass which computes \c BlockFrequencyInfo. -class BlockFrequencyInfoWrapperPass : public FunctionPass { - BlockFrequencyInfo BFI; - -public: - static char ID; - - BlockFrequencyInfoWrapperPass(); - ~BlockFrequencyInfoWrapperPass() override; - - BlockFrequencyInfo &getBFI() { return BFI; } - const BlockFrequencyInfo &getBFI() const { return BFI; } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - bool runOnFunction(Function &F) override; - void releaseMemory() override; - void print(raw_ostream &OS, const Module *M) const override; -}; - -} - -#endif diff --git a/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h b/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h deleted file mode 100644 index 7ed06b1b..00000000 --- a/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h +++ /dev/null @@ -1,1350 +0,0 @@ -//==- BlockFrequencyInfoImpl.h - Block Frequency Implementation -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Shared implementation of BlockFrequency for IR and Machine Instructions. -// See the documentation below for BlockFrequencyInfoImpl for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_BLOCKFREQUENCYINFOIMPL_H -#define LLVM_ANALYSIS_BLOCKFREQUENCYINFOIMPL_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/PostOrderIterator.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/Support/BlockFrequency.h" -#include "llvm/Support/BranchProbability.h" -#include "llvm/Support/DOTGraphTraits.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/Format.h" -#include "llvm/Support/ScaledNumber.h" -#include "llvm/Support/raw_ostream.h" -#include -#include -#include -#include - -#define DEBUG_TYPE "block-freq" - -namespace llvm { - -class BasicBlock; -class BranchProbabilityInfo; -class Function; -class Loop; -class LoopInfo; -class MachineBasicBlock; -class MachineBranchProbabilityInfo; -class MachineFunction; -class MachineLoop; -class MachineLoopInfo; - -namespace bfi_detail { - -struct IrreducibleGraph; - -// This is part of a workaround for a GCC 4.7 crash on lambdas. -template struct BlockEdgesAdder; - -/// \brief Mass of a block. -/// -/// This class implements a sort of fixed-point fraction always between 0.0 and -/// 1.0. getMass() == UINT64_MAX indicates a value of 1.0. -/// -/// Masses can be added and subtracted. Simple saturation arithmetic is used, -/// so arithmetic operations never overflow or underflow. -/// -/// Masses can be multiplied. Multiplication treats full mass as 1.0 and uses -/// an inexpensive floating-point algorithm that's off-by-one (almost, but not -/// quite, maximum precision). -/// -/// Masses can be scaled by \a BranchProbability at maximum precision. -class BlockMass { - uint64_t Mass; - -public: - BlockMass() : Mass(0) {} - explicit BlockMass(uint64_t Mass) : Mass(Mass) {} - - static BlockMass getEmpty() { return BlockMass(); } - static BlockMass getFull() { return BlockMass(UINT64_MAX); } - - uint64_t getMass() const { return Mass; } - - bool isFull() const { return Mass == UINT64_MAX; } - bool isEmpty() const { return !Mass; } - - bool operator!() const { return isEmpty(); } - - /// \brief Add another mass. - /// - /// Adds another mass, saturating at \a isFull() rather than overflowing. - BlockMass &operator+=(BlockMass X) { - uint64_t Sum = Mass + X.Mass; - Mass = Sum < Mass ? UINT64_MAX : Sum; - return *this; - } - - /// \brief Subtract another mass. - /// - /// Subtracts another mass, saturating at \a isEmpty() rather than - /// undeflowing. - BlockMass &operator-=(BlockMass X) { - uint64_t Diff = Mass - X.Mass; - Mass = Diff > Mass ? 0 : Diff; - return *this; - } - - BlockMass &operator*=(BranchProbability P) { - Mass = P.scale(Mass); - return *this; - } - - bool operator==(BlockMass X) const { return Mass == X.Mass; } - bool operator!=(BlockMass X) const { return Mass != X.Mass; } - bool operator<=(BlockMass X) const { return Mass <= X.Mass; } - bool operator>=(BlockMass X) const { return Mass >= X.Mass; } - bool operator<(BlockMass X) const { return Mass < X.Mass; } - bool operator>(BlockMass X) const { return Mass > X.Mass; } - - /// \brief Convert to scaled number. - /// - /// Convert to \a ScaledNumber. \a isFull() gives 1.0, while \a isEmpty() - /// gives slightly above 0.0. - ScaledNumber toScaled() const; - - void dump() const; - raw_ostream &print(raw_ostream &OS) const; -}; - -inline BlockMass operator+(BlockMass L, BlockMass R) { - return BlockMass(L) += R; -} -inline BlockMass operator-(BlockMass L, BlockMass R) { - return BlockMass(L) -= R; -} -inline BlockMass operator*(BlockMass L, BranchProbability R) { - return BlockMass(L) *= R; -} -inline BlockMass operator*(BranchProbability L, BlockMass R) { - return BlockMass(R) *= L; -} - -inline raw_ostream &operator<<(raw_ostream &OS, BlockMass X) { - return X.print(OS); -} - -} // end namespace bfi_detail - -template <> struct isPodLike { - static const bool value = true; -}; - -/// \brief Base class for BlockFrequencyInfoImpl -/// -/// BlockFrequencyInfoImplBase has supporting data structures and some -/// algorithms for BlockFrequencyInfoImplBase. Only algorithms that depend on -/// the block type (or that call such algorithms) are skipped here. -/// -/// Nevertheless, the majority of the overall algorithm documention lives with -/// BlockFrequencyInfoImpl. See there for details. -class BlockFrequencyInfoImplBase { -public: - typedef ScaledNumber Scaled64; - typedef bfi_detail::BlockMass BlockMass; - - /// \brief Representative of a block. - /// - /// This is a simple wrapper around an index into the reverse-post-order - /// traversal of the blocks. - /// - /// Unlike a block pointer, its order has meaning (location in the - /// topological sort) and it's class is the same regardless of block type. - struct BlockNode { - typedef uint32_t IndexType; - IndexType Index; - - bool operator==(const BlockNode &X) const { return Index == X.Index; } - bool operator!=(const BlockNode &X) const { return Index != X.Index; } - bool operator<=(const BlockNode &X) const { return Index <= X.Index; } - bool operator>=(const BlockNode &X) const { return Index >= X.Index; } - bool operator<(const BlockNode &X) const { return Index < X.Index; } - bool operator>(const BlockNode &X) const { return Index > X.Index; } - - BlockNode() : Index(UINT32_MAX) {} - BlockNode(IndexType Index) : Index(Index) {} - - bool isValid() const { return Index <= getMaxIndex(); } - static size_t getMaxIndex() { return UINT32_MAX - 1; } - }; - - /// \brief Stats about a block itself. - struct FrequencyData { - Scaled64 Scaled; - uint64_t Integer; - }; - - /// \brief Data about a loop. - /// - /// Contains the data necessary to represent a loop as a pseudo-node once it's - /// packaged. - struct LoopData { - typedef SmallVector, 4> ExitMap; - typedef SmallVector NodeList; - typedef SmallVector HeaderMassList; - LoopData *Parent; ///< The parent loop. - bool IsPackaged; ///< Whether this has been packaged. - uint32_t NumHeaders; ///< Number of headers. - ExitMap Exits; ///< Successor edges (and weights). - NodeList Nodes; ///< Header and the members of the loop. - HeaderMassList BackedgeMass; ///< Mass returned to each loop header. - BlockMass Mass; - Scaled64 Scale; - - LoopData(LoopData *Parent, const BlockNode &Header) - : Parent(Parent), IsPackaged(false), NumHeaders(1), Nodes(1, Header), - BackedgeMass(1) {} - template - LoopData(LoopData *Parent, It1 FirstHeader, It1 LastHeader, It2 FirstOther, - It2 LastOther) - : Parent(Parent), IsPackaged(false), Nodes(FirstHeader, LastHeader) { - NumHeaders = Nodes.size(); - Nodes.insert(Nodes.end(), FirstOther, LastOther); - BackedgeMass.resize(NumHeaders); - } - bool isHeader(const BlockNode &Node) const { - if (isIrreducible()) - return std::binary_search(Nodes.begin(), Nodes.begin() + NumHeaders, - Node); - return Node == Nodes[0]; - } - BlockNode getHeader() const { return Nodes[0]; } - bool isIrreducible() const { return NumHeaders > 1; } - - HeaderMassList::difference_type getHeaderIndex(const BlockNode &B) { - assert(isHeader(B) && "this is only valid on loop header blocks"); - if (isIrreducible()) - return std::lower_bound(Nodes.begin(), Nodes.begin() + NumHeaders, B) - - Nodes.begin(); - return 0; - } - - NodeList::const_iterator members_begin() const { - return Nodes.begin() + NumHeaders; - } - NodeList::const_iterator members_end() const { return Nodes.end(); } - iterator_range members() const { - return make_range(members_begin(), members_end()); - } - }; - - /// \brief Index of loop information. - struct WorkingData { - BlockNode Node; ///< This node. - LoopData *Loop; ///< The loop this block is inside. - BlockMass Mass; ///< Mass distribution from the entry block. - - WorkingData(const BlockNode &Node) : Node(Node), Loop(nullptr) {} - - bool isLoopHeader() const { return Loop && Loop->isHeader(Node); } - bool isDoubleLoopHeader() const { - return isLoopHeader() && Loop->Parent && Loop->Parent->isIrreducible() && - Loop->Parent->isHeader(Node); - } - - LoopData *getContainingLoop() const { - if (!isLoopHeader()) - return Loop; - if (!isDoubleLoopHeader()) - return Loop->Parent; - return Loop->Parent->Parent; - } - - /// \brief Resolve a node to its representative. - /// - /// Get the node currently representing Node, which could be a containing - /// loop. - /// - /// This function should only be called when distributing mass. As long as - /// there are no irreducible edges to Node, then it will have complexity - /// O(1) in this context. - /// - /// In general, the complexity is O(L), where L is the number of loop - /// headers Node has been packaged into. Since this method is called in - /// the context of distributing mass, L will be the number of loop headers - /// an early exit edge jumps out of. - BlockNode getResolvedNode() const { - auto L = getPackagedLoop(); - return L ? L->getHeader() : Node; - } - LoopData *getPackagedLoop() const { - if (!Loop || !Loop->IsPackaged) - return nullptr; - auto L = Loop; - while (L->Parent && L->Parent->IsPackaged) - L = L->Parent; - return L; - } - - /// \brief Get the appropriate mass for a node. - /// - /// Get appropriate mass for Node. If Node is a loop-header (whose loop - /// has been packaged), returns the mass of its pseudo-node. If it's a - /// node inside a packaged loop, it returns the loop's mass. - BlockMass &getMass() { - if (!isAPackage()) - return Mass; - if (!isADoublePackage()) - return Loop->Mass; - return Loop->Parent->Mass; - } - - /// \brief Has ContainingLoop been packaged up? - bool isPackaged() const { return getResolvedNode() != Node; } - /// \brief Has Loop been packaged up? - bool isAPackage() const { return isLoopHeader() && Loop->IsPackaged; } - /// \brief Has Loop been packaged up twice? - bool isADoublePackage() const { - return isDoubleLoopHeader() && Loop->Parent->IsPackaged; - } - }; - - /// \brief Unscaled probability weight. - /// - /// Probability weight for an edge in the graph (including the - /// successor/target node). - /// - /// All edges in the original function are 32-bit. However, exit edges from - /// loop packages are taken from 64-bit exit masses, so we need 64-bits of - /// space in general. - /// - /// In addition to the raw weight amount, Weight stores the type of the edge - /// in the current context (i.e., the context of the loop being processed). - /// Is this a local edge within the loop, an exit from the loop, or a - /// backedge to the loop header? - struct Weight { - enum DistType { Local, Exit, Backedge }; - DistType Type; - BlockNode TargetNode; - uint64_t Amount; - Weight() : Type(Local), Amount(0) {} - Weight(DistType Type, BlockNode TargetNode, uint64_t Amount) - : Type(Type), TargetNode(TargetNode), Amount(Amount) {} - }; - - /// \brief Distribution of unscaled probability weight. - /// - /// Distribution of unscaled probability weight to a set of successors. - /// - /// This class collates the successor edge weights for later processing. - /// - /// \a DidOverflow indicates whether \a Total did overflow while adding to - /// the distribution. It should never overflow twice. - struct Distribution { - typedef SmallVector WeightList; - WeightList Weights; ///< Individual successor weights. - uint64_t Total; ///< Sum of all weights. - bool DidOverflow; ///< Whether \a Total did overflow. - - Distribution() : Total(0), DidOverflow(false) {} - void addLocal(const BlockNode &Node, uint64_t Amount) { - add(Node, Amount, Weight::Local); - } - void addExit(const BlockNode &Node, uint64_t Amount) { - add(Node, Amount, Weight::Exit); - } - void addBackedge(const BlockNode &Node, uint64_t Amount) { - add(Node, Amount, Weight::Backedge); - } - - /// \brief Normalize the distribution. - /// - /// Combines multiple edges to the same \a Weight::TargetNode and scales - /// down so that \a Total fits into 32-bits. - /// - /// This is linear in the size of \a Weights. For the vast majority of - /// cases, adjacent edge weights are combined by sorting WeightList and - /// combining adjacent weights. However, for very large edge lists an - /// auxiliary hash table is used. - void normalize(); - - private: - void add(const BlockNode &Node, uint64_t Amount, Weight::DistType Type); - }; - - /// \brief Data about each block. This is used downstream. - std::vector Freqs; - - /// \brief Loop data: see initializeLoops(). - std::vector Working; - - /// \brief Indexed information about loops. - std::list Loops; - - /// \brief Add all edges out of a packaged loop to the distribution. - /// - /// Adds all edges from LocalLoopHead to Dist. Calls addToDist() to add each - /// successor edge. - /// - /// \return \c true unless there's an irreducible backedge. - bool addLoopSuccessorsToDist(const LoopData *OuterLoop, LoopData &Loop, - Distribution &Dist); - - /// \brief Add an edge to the distribution. - /// - /// Adds an edge to Succ to Dist. If \c LoopHead.isValid(), then whether the - /// edge is local/exit/backedge is in the context of LoopHead. Otherwise, - /// every edge should be a local edge (since all the loops are packaged up). - /// - /// \return \c true unless aborted due to an irreducible backedge. - bool addToDist(Distribution &Dist, const LoopData *OuterLoop, - const BlockNode &Pred, const BlockNode &Succ, uint64_t Weight); - - LoopData &getLoopPackage(const BlockNode &Head) { - assert(Head.Index < Working.size()); - assert(Working[Head.Index].isLoopHeader()); - return *Working[Head.Index].Loop; - } - - /// \brief Analyze irreducible SCCs. - /// - /// Separate irreducible SCCs from \c G, which is an explict graph of \c - /// OuterLoop (or the top-level function, if \c OuterLoop is \c nullptr). - /// Insert them into \a Loops before \c Insert. - /// - /// \return the \c LoopData nodes representing the irreducible SCCs. - iterator_range::iterator> - analyzeIrreducible(const bfi_detail::IrreducibleGraph &G, LoopData *OuterLoop, - std::list::iterator Insert); - - /// \brief Update a loop after packaging irreducible SCCs inside of it. - /// - /// Update \c OuterLoop. Before finding irreducible control flow, it was - /// partway through \a computeMassInLoop(), so \a LoopData::Exits and \a - /// LoopData::BackedgeMass need to be reset. Also, nodes that were packaged - /// up need to be removed from \a OuterLoop::Nodes. - void updateLoopWithIrreducible(LoopData &OuterLoop); - - /// \brief Distribute mass according to a distribution. - /// - /// Distributes the mass in Source according to Dist. If LoopHead.isValid(), - /// backedges and exits are stored in its entry in Loops. - /// - /// Mass is distributed in parallel from two copies of the source mass. - void distributeMass(const BlockNode &Source, LoopData *OuterLoop, - Distribution &Dist); - - /// \brief Compute the loop scale for a loop. - void computeLoopScale(LoopData &Loop); - - /// Adjust the mass of all headers in an irreducible loop. - /// - /// Initially, irreducible loops are assumed to distribute their mass - /// equally among its headers. This can lead to wrong frequency estimates - /// since some headers may be executed more frequently than others. - /// - /// This adjusts header mass distribution so it matches the weights of - /// the backedges going into each of the loop headers. - void adjustLoopHeaderMass(LoopData &Loop); - - /// \brief Package up a loop. - void packageLoop(LoopData &Loop); - - /// \brief Unwrap loops. - void unwrapLoops(); - - /// \brief Finalize frequency metrics. - /// - /// Calculates final frequencies and cleans up no-longer-needed data - /// structures. - void finalizeMetrics(); - - /// \brief Clear all memory. - void clear(); - - virtual std::string getBlockName(const BlockNode &Node) const; - std::string getLoopName(const LoopData &Loop) const; - - virtual raw_ostream &print(raw_ostream &OS) const { return OS; } - void dump() const { print(dbgs()); } - - Scaled64 getFloatingBlockFreq(const BlockNode &Node) const; - - BlockFrequency getBlockFreq(const BlockNode &Node) const; - Optional getBlockProfileCount(const Function &F, - const BlockNode &Node) const; - - void setBlockFreq(const BlockNode &Node, uint64_t Freq); - - raw_ostream &printBlockFreq(raw_ostream &OS, const BlockNode &Node) const; - raw_ostream &printBlockFreq(raw_ostream &OS, - const BlockFrequency &Freq) const; - - uint64_t getEntryFreq() const { - assert(!Freqs.empty()); - return Freqs[0].Integer; - } - /// \brief Virtual destructor. - /// - /// Need a virtual destructor to mask the compiler warning about - /// getBlockName(). - virtual ~BlockFrequencyInfoImplBase() {} -}; - -namespace bfi_detail { -template struct TypeMap {}; -template <> struct TypeMap { - typedef BasicBlock BlockT; - typedef Function FunctionT; - typedef BranchProbabilityInfo BranchProbabilityInfoT; - typedef Loop LoopT; - typedef LoopInfo LoopInfoT; -}; -template <> struct TypeMap { - typedef MachineBasicBlock BlockT; - typedef MachineFunction FunctionT; - typedef MachineBranchProbabilityInfo BranchProbabilityInfoT; - typedef MachineLoop LoopT; - typedef MachineLoopInfo LoopInfoT; -}; - -/// \brief Get the name of a MachineBasicBlock. -/// -/// Get the name of a MachineBasicBlock. It's templated so that including from -/// CodeGen is unnecessary (that would be a layering issue). -/// -/// This is used mainly for debug output. The name is similar to -/// MachineBasicBlock::getFullName(), but skips the name of the function. -template std::string getBlockName(const BlockT *BB) { - assert(BB && "Unexpected nullptr"); - auto MachineName = "BB" + Twine(BB->getNumber()); - if (BB->getBasicBlock()) - return (MachineName + "[" + BB->getName() + "]").str(); - return MachineName.str(); -} -/// \brief Get the name of a BasicBlock. -template <> inline std::string getBlockName(const BasicBlock *BB) { - assert(BB && "Unexpected nullptr"); - return BB->getName().str(); -} - -/// \brief Graph of irreducible control flow. -/// -/// This graph is used for determining the SCCs in a loop (or top-level -/// function) that has irreducible control flow. -/// -/// During the block frequency algorithm, the local graphs are defined in a -/// light-weight way, deferring to the \a BasicBlock or \a MachineBasicBlock -/// graphs for most edges, but getting others from \a LoopData::ExitMap. The -/// latter only has successor information. -/// -/// \a IrreducibleGraph makes this graph explicit. It's in a form that can use -/// \a GraphTraits (so that \a analyzeIrreducible() can use \a scc_iterator), -/// and it explicitly lists predecessors and successors. The initialization -/// that relies on \c MachineBasicBlock is defined in the header. -struct IrreducibleGraph { - typedef BlockFrequencyInfoImplBase BFIBase; - - BFIBase &BFI; - - typedef BFIBase::BlockNode BlockNode; - struct IrrNode { - BlockNode Node; - unsigned NumIn; - std::deque Edges; - IrrNode(const BlockNode &Node) : Node(Node), NumIn(0) {} - - typedef std::deque::const_iterator iterator; - iterator pred_begin() const { return Edges.begin(); } - iterator succ_begin() const { return Edges.begin() + NumIn; } - iterator pred_end() const { return succ_begin(); } - iterator succ_end() const { return Edges.end(); } - }; - BlockNode Start; - const IrrNode *StartIrr; - std::vector Nodes; - SmallDenseMap Lookup; - - /// \brief Construct an explicit graph containing irreducible control flow. - /// - /// Construct an explicit graph of the control flow in \c OuterLoop (or the - /// top-level function, if \c OuterLoop is \c nullptr). Uses \c - /// addBlockEdges to add block successors that have not been packaged into - /// loops. - /// - /// \a BlockFrequencyInfoImpl::computeIrreducibleMass() is the only expected - /// user of this. - template - IrreducibleGraph(BFIBase &BFI, const BFIBase::LoopData *OuterLoop, - BlockEdgesAdder addBlockEdges) - : BFI(BFI), StartIrr(nullptr) { - initialize(OuterLoop, addBlockEdges); - } - - template - void initialize(const BFIBase::LoopData *OuterLoop, - BlockEdgesAdder addBlockEdges); - void addNodesInLoop(const BFIBase::LoopData &OuterLoop); - void addNodesInFunction(); - void addNode(const BlockNode &Node) { - Nodes.emplace_back(Node); - BFI.Working[Node.Index].getMass() = BlockMass::getEmpty(); - } - void indexNodes(); - template - void addEdges(const BlockNode &Node, const BFIBase::LoopData *OuterLoop, - BlockEdgesAdder addBlockEdges); - void addEdge(IrrNode &Irr, const BlockNode &Succ, - const BFIBase::LoopData *OuterLoop); -}; -template -void IrreducibleGraph::initialize(const BFIBase::LoopData *OuterLoop, - BlockEdgesAdder addBlockEdges) { - if (OuterLoop) { - addNodesInLoop(*OuterLoop); - for (auto N : OuterLoop->Nodes) - addEdges(N, OuterLoop, addBlockEdges); - } else { - addNodesInFunction(); - for (uint32_t Index = 0; Index < BFI.Working.size(); ++Index) - addEdges(Index, OuterLoop, addBlockEdges); - } - StartIrr = Lookup[Start.Index]; -} -template -void IrreducibleGraph::addEdges(const BlockNode &Node, - const BFIBase::LoopData *OuterLoop, - BlockEdgesAdder addBlockEdges) { - auto L = Lookup.find(Node.Index); - if (L == Lookup.end()) - return; - IrrNode &Irr = *L->second; - const auto &Working = BFI.Working[Node.Index]; - - if (Working.isAPackage()) - for (const auto &I : Working.Loop->Exits) - addEdge(Irr, I.first, OuterLoop); - else - addBlockEdges(*this, Irr, OuterLoop); -} -} - -/// \brief Shared implementation for block frequency analysis. -/// -/// This is a shared implementation of BlockFrequencyInfo and -/// MachineBlockFrequencyInfo, and calculates the relative frequencies of -/// blocks. -/// -/// LoopInfo defines a loop as a "non-trivial" SCC dominated by a single block, -/// which is called the header. A given loop, L, can have sub-loops, which are -/// loops within the subgraph of L that exclude its header. (A "trivial" SCC -/// consists of a single block that does not have a self-edge.) -/// -/// In addition to loops, this algorithm has limited support for irreducible -/// SCCs, which are SCCs with multiple entry blocks. Irreducible SCCs are -/// discovered on they fly, and modelled as loops with multiple headers. -/// -/// The headers of irreducible sub-SCCs consist of its entry blocks and all -/// nodes that are targets of a backedge within it (excluding backedges within -/// true sub-loops). Block frequency calculations act as if a block is -/// inserted that intercepts all the edges to the headers. All backedges and -/// entries point to this block. Its successors are the headers, which split -/// the frequency evenly. -/// -/// This algorithm leverages BlockMass and ScaledNumber to maintain precision, -/// separates mass distribution from loop scaling, and dithers to eliminate -/// probability mass loss. -/// -/// The implementation is split between BlockFrequencyInfoImpl, which knows the -/// type of graph being modelled (BasicBlock vs. MachineBasicBlock), and -/// BlockFrequencyInfoImplBase, which doesn't. The base class uses \a -/// BlockNode, a wrapper around a uint32_t. BlockNode is numbered from 0 in -/// reverse-post order. This gives two advantages: it's easy to compare the -/// relative ordering of two nodes, and maps keyed on BlockT can be represented -/// by vectors. -/// -/// This algorithm is O(V+E), unless there is irreducible control flow, in -/// which case it's O(V*E) in the worst case. -/// -/// These are the main stages: -/// -/// 0. Reverse post-order traversal (\a initializeRPOT()). -/// -/// Run a single post-order traversal and save it (in reverse) in RPOT. -/// All other stages make use of this ordering. Save a lookup from BlockT -/// to BlockNode (the index into RPOT) in Nodes. -/// -/// 1. Loop initialization (\a initializeLoops()). -/// -/// Translate LoopInfo/MachineLoopInfo into a form suitable for the rest of -/// the algorithm. In particular, store the immediate members of each loop -/// in reverse post-order. -/// -/// 2. Calculate mass and scale in loops (\a computeMassInLoops()). -/// -/// For each loop (bottom-up), distribute mass through the DAG resulting -/// from ignoring backedges and treating sub-loops as a single pseudo-node. -/// Track the backedge mass distributed to the loop header, and use it to -/// calculate the loop scale (number of loop iterations). Immediate -/// members that represent sub-loops will already have been visited and -/// packaged into a pseudo-node. -/// -/// Distributing mass in a loop is a reverse-post-order traversal through -/// the loop. Start by assigning full mass to the Loop header. For each -/// node in the loop: -/// -/// - Fetch and categorize the weight distribution for its successors. -/// If this is a packaged-subloop, the weight distribution is stored -/// in \a LoopData::Exits. Otherwise, fetch it from -/// BranchProbabilityInfo. -/// -/// - Each successor is categorized as \a Weight::Local, a local edge -/// within the current loop, \a Weight::Backedge, a backedge to the -/// loop header, or \a Weight::Exit, any successor outside the loop. -/// The weight, the successor, and its category are stored in \a -/// Distribution. There can be multiple edges to each successor. -/// -/// - If there's a backedge to a non-header, there's an irreducible SCC. -/// The usual flow is temporarily aborted. \a -/// computeIrreducibleMass() finds the irreducible SCCs within the -/// loop, packages them up, and restarts the flow. -/// -/// - Normalize the distribution: scale weights down so that their sum -/// is 32-bits, and coalesce multiple edges to the same node. -/// -/// - Distribute the mass accordingly, dithering to minimize mass loss, -/// as described in \a distributeMass(). -/// -/// In the case of irreducible loops, instead of a single loop header, -/// there will be several. The computation of backedge masses is similar -/// but instead of having a single backedge mass, there will be one -/// backedge per loop header. In these cases, each backedge will carry -/// a mass proportional to the edge weights along the corresponding -/// path. -/// -/// At the end of propagation, the full mass assigned to the loop will be -/// distributed among the loop headers proportionally according to the -/// mass flowing through their backedges. -/// -/// Finally, calculate the loop scale from the accumulated backedge mass. -/// -/// 3. Distribute mass in the function (\a computeMassInFunction()). -/// -/// Finally, distribute mass through the DAG resulting from packaging all -/// loops in the function. This uses the same algorithm as distributing -/// mass in a loop, except that there are no exit or backedge edges. -/// -/// 4. Unpackage loops (\a unwrapLoops()). -/// -/// Initialize each block's frequency to a floating point representation of -/// its mass. -/// -/// Visit loops top-down, scaling the frequencies of its immediate members -/// by the loop's pseudo-node's frequency. -/// -/// 5. Convert frequencies to a 64-bit range (\a finalizeMetrics()). -/// -/// Using the min and max frequencies as a guide, translate floating point -/// frequencies to an appropriate range in uint64_t. -/// -/// It has some known flaws. -/// -/// - The model of irreducible control flow is a rough approximation. -/// -/// Modelling irreducible control flow exactly involves setting up and -/// solving a group of infinite geometric series. Such precision is -/// unlikely to be worthwhile, since most of our algorithms give up on -/// irreducible control flow anyway. -/// -/// Nevertheless, we might find that we need to get closer. Here's a sort -/// of TODO list for the model with diminishing returns, to be completed as -/// necessary. -/// -/// - The headers for the \a LoopData representing an irreducible SCC -/// include non-entry blocks. When these extra blocks exist, they -/// indicate a self-contained irreducible sub-SCC. We could treat them -/// as sub-loops, rather than arbitrarily shoving the problematic -/// blocks into the headers of the main irreducible SCC. -/// -/// - Entry frequencies are assumed to be evenly split between the -/// headers of a given irreducible SCC, which is the only option if we -/// need to compute mass in the SCC before its parent loop. Instead, -/// we could partially compute mass in the parent loop, and stop when -/// we get to the SCC. Here, we have the correct ratio of entry -/// masses, which we can use to adjust their relative frequencies. -/// Compute mass in the SCC, and then continue propagation in the -/// parent. -/// -/// - We can propagate mass iteratively through the SCC, for some fixed -/// number of iterations. Each iteration starts by assigning the entry -/// blocks their backedge mass from the prior iteration. The final -/// mass for each block (and each exit, and the total backedge mass -/// used for computing loop scale) is the sum of all iterations. -/// (Running this until fixed point would "solve" the geometric -/// series by simulation.) -template class BlockFrequencyInfoImpl : BlockFrequencyInfoImplBase { - typedef typename bfi_detail::TypeMap::BlockT BlockT; - typedef typename bfi_detail::TypeMap::FunctionT FunctionT; - typedef typename bfi_detail::TypeMap::BranchProbabilityInfoT - BranchProbabilityInfoT; - typedef typename bfi_detail::TypeMap::LoopT LoopT; - typedef typename bfi_detail::TypeMap::LoopInfoT LoopInfoT; - - // This is part of a workaround for a GCC 4.7 crash on lambdas. - friend struct bfi_detail::BlockEdgesAdder; - - typedef GraphTraits Successor; - typedef GraphTraits> Predecessor; - - const BranchProbabilityInfoT *BPI; - const LoopInfoT *LI; - const FunctionT *F; - - // All blocks in reverse postorder. - std::vector RPOT; - DenseMap Nodes; - - typedef typename std::vector::const_iterator rpot_iterator; - - rpot_iterator rpot_begin() const { return RPOT.begin(); } - rpot_iterator rpot_end() const { return RPOT.end(); } - - size_t getIndex(const rpot_iterator &I) const { return I - rpot_begin(); } - - BlockNode getNode(const rpot_iterator &I) const { - return BlockNode(getIndex(I)); - } - BlockNode getNode(const BlockT *BB) const { return Nodes.lookup(BB); } - - const BlockT *getBlock(const BlockNode &Node) const { - assert(Node.Index < RPOT.size()); - return RPOT[Node.Index]; - } - - /// \brief Run (and save) a post-order traversal. - /// - /// Saves a reverse post-order traversal of all the nodes in \a F. - void initializeRPOT(); - - /// \brief Initialize loop data. - /// - /// Build up \a Loops using \a LoopInfo. \a LoopInfo gives us a mapping from - /// each block to the deepest loop it's in, but we need the inverse. For each - /// loop, we store in reverse post-order its "immediate" members, defined as - /// the header, the headers of immediate sub-loops, and all other blocks in - /// the loop that are not in sub-loops. - void initializeLoops(); - - /// \brief Propagate to a block's successors. - /// - /// In the context of distributing mass through \c OuterLoop, divide the mass - /// currently assigned to \c Node between its successors. - /// - /// \return \c true unless there's an irreducible backedge. - bool propagateMassToSuccessors(LoopData *OuterLoop, const BlockNode &Node); - - /// \brief Compute mass in a particular loop. - /// - /// Assign mass to \c Loop's header, and then for each block in \c Loop in - /// reverse post-order, distribute mass to its successors. Only visits nodes - /// that have not been packaged into sub-loops. - /// - /// \pre \a computeMassInLoop() has been called for each subloop of \c Loop. - /// \return \c true unless there's an irreducible backedge. - bool computeMassInLoop(LoopData &Loop); - - /// \brief Try to compute mass in the top-level function. - /// - /// Assign mass to the entry block, and then for each block in reverse - /// post-order, distribute mass to its successors. Skips nodes that have - /// been packaged into loops. - /// - /// \pre \a computeMassInLoops() has been called. - /// \return \c true unless there's an irreducible backedge. - bool tryToComputeMassInFunction(); - - /// \brief Compute mass in (and package up) irreducible SCCs. - /// - /// Find the irreducible SCCs in \c OuterLoop, add them to \a Loops (in front - /// of \c Insert), and call \a computeMassInLoop() on each of them. - /// - /// If \c OuterLoop is \c nullptr, it refers to the top-level function. - /// - /// \pre \a computeMassInLoop() has been called for each subloop of \c - /// OuterLoop. - /// \pre \c Insert points at the last loop successfully processed by \a - /// computeMassInLoop(). - /// \pre \c OuterLoop has irreducible SCCs. - void computeIrreducibleMass(LoopData *OuterLoop, - std::list::iterator Insert); - - /// \brief Compute mass in all loops. - /// - /// For each loop bottom-up, call \a computeMassInLoop(). - /// - /// \a computeMassInLoop() aborts (and returns \c false) on loops that - /// contain a irreducible sub-SCCs. Use \a computeIrreducibleMass() and then - /// re-enter \a computeMassInLoop(). - /// - /// \post \a computeMassInLoop() has returned \c true for every loop. - void computeMassInLoops(); - - /// \brief Compute mass in the top-level function. - /// - /// Uses \a tryToComputeMassInFunction() and \a computeIrreducibleMass() to - /// compute mass in the top-level function. - /// - /// \post \a tryToComputeMassInFunction() has returned \c true. - void computeMassInFunction(); - - std::string getBlockName(const BlockNode &Node) const override { - return bfi_detail::getBlockName(getBlock(Node)); - } - -public: - const FunctionT *getFunction() const { return F; } - - void calculate(const FunctionT &F, const BranchProbabilityInfoT &BPI, - const LoopInfoT &LI); - BlockFrequencyInfoImpl() : BPI(nullptr), LI(nullptr), F(nullptr) {} - - using BlockFrequencyInfoImplBase::getEntryFreq; - BlockFrequency getBlockFreq(const BlockT *BB) const { - return BlockFrequencyInfoImplBase::getBlockFreq(getNode(BB)); - } - Optional getBlockProfileCount(const Function &F, - const BlockT *BB) const { - return BlockFrequencyInfoImplBase::getBlockProfileCount(F, getNode(BB)); - } - void setBlockFreq(const BlockT *BB, uint64_t Freq); - Scaled64 getFloatingBlockFreq(const BlockT *BB) const { - return BlockFrequencyInfoImplBase::getFloatingBlockFreq(getNode(BB)); - } - - const BranchProbabilityInfoT &getBPI() const { return *BPI; } - - /// \brief Print the frequencies for the current function. - /// - /// Prints the frequencies for the blocks in the current function. - /// - /// Blocks are printed in the natural iteration order of the function, rather - /// than reverse post-order. This provides two advantages: writing -analyze - /// tests is easier (since blocks come out in source order), and even - /// unreachable blocks are printed. - /// - /// \a BlockFrequencyInfoImplBase::print() only knows reverse post-order, so - /// we need to override it here. - raw_ostream &print(raw_ostream &OS) const override; - using BlockFrequencyInfoImplBase::dump; - - using BlockFrequencyInfoImplBase::printBlockFreq; - raw_ostream &printBlockFreq(raw_ostream &OS, const BlockT *BB) const { - return BlockFrequencyInfoImplBase::printBlockFreq(OS, getNode(BB)); - } -}; - -template -void BlockFrequencyInfoImpl::calculate(const FunctionT &F, - const BranchProbabilityInfoT &BPI, - const LoopInfoT &LI) { - // Save the parameters. - this->BPI = &BPI; - this->LI = &LI; - this->F = &F; - - // Clean up left-over data structures. - BlockFrequencyInfoImplBase::clear(); - RPOT.clear(); - Nodes.clear(); - - // Initialize. - DEBUG(dbgs() << "\nblock-frequency: " << F.getName() << "\n=================" - << std::string(F.getName().size(), '=') << "\n"); - initializeRPOT(); - initializeLoops(); - - // Visit loops in post-order to find the local mass distribution, and then do - // the full function. - computeMassInLoops(); - computeMassInFunction(); - unwrapLoops(); - finalizeMetrics(); -} - -template -void BlockFrequencyInfoImpl::setBlockFreq(const BlockT *BB, uint64_t Freq) { - if (Nodes.count(BB)) - BlockFrequencyInfoImplBase::setBlockFreq(getNode(BB), Freq); - else { - // If BB is a newly added block after BFI is done, we need to create a new - // BlockNode for it assigned with a new index. The index can be determined - // by the size of Freqs. - BlockNode NewNode(Freqs.size()); - Nodes[BB] = NewNode; - Freqs.emplace_back(); - BlockFrequencyInfoImplBase::setBlockFreq(NewNode, Freq); - } -} - -template void BlockFrequencyInfoImpl::initializeRPOT() { - const BlockT *Entry = &F->front(); - RPOT.reserve(F->size()); - std::copy(po_begin(Entry), po_end(Entry), std::back_inserter(RPOT)); - std::reverse(RPOT.begin(), RPOT.end()); - - assert(RPOT.size() - 1 <= BlockNode::getMaxIndex() && - "More nodes in function than Block Frequency Info supports"); - - DEBUG(dbgs() << "reverse-post-order-traversal\n"); - for (rpot_iterator I = rpot_begin(), E = rpot_end(); I != E; ++I) { - BlockNode Node = getNode(I); - DEBUG(dbgs() << " - " << getIndex(I) << ": " << getBlockName(Node) << "\n"); - Nodes[*I] = Node; - } - - Working.reserve(RPOT.size()); - for (size_t Index = 0; Index < RPOT.size(); ++Index) - Working.emplace_back(Index); - Freqs.resize(RPOT.size()); -} - -template void BlockFrequencyInfoImpl::initializeLoops() { - DEBUG(dbgs() << "loop-detection\n"); - if (LI->empty()) - return; - - // Visit loops top down and assign them an index. - std::deque> Q; - for (const LoopT *L : *LI) - Q.emplace_back(L, nullptr); - while (!Q.empty()) { - const LoopT *Loop = Q.front().first; - LoopData *Parent = Q.front().second; - Q.pop_front(); - - BlockNode Header = getNode(Loop->getHeader()); - assert(Header.isValid()); - - Loops.emplace_back(Parent, Header); - Working[Header.Index].Loop = &Loops.back(); - DEBUG(dbgs() << " - loop = " << getBlockName(Header) << "\n"); - - for (const LoopT *L : *Loop) - Q.emplace_back(L, &Loops.back()); - } - - // Visit nodes in reverse post-order and add them to their deepest containing - // loop. - for (size_t Index = 0; Index < RPOT.size(); ++Index) { - // Loop headers have already been mostly mapped. - if (Working[Index].isLoopHeader()) { - LoopData *ContainingLoop = Working[Index].getContainingLoop(); - if (ContainingLoop) - ContainingLoop->Nodes.push_back(Index); - continue; - } - - const LoopT *Loop = LI->getLoopFor(RPOT[Index]); - if (!Loop) - continue; - - // Add this node to its containing loop's member list. - BlockNode Header = getNode(Loop->getHeader()); - assert(Header.isValid()); - const auto &HeaderData = Working[Header.Index]; - assert(HeaderData.isLoopHeader()); - - Working[Index].Loop = HeaderData.Loop; - HeaderData.Loop->Nodes.push_back(Index); - DEBUG(dbgs() << " - loop = " << getBlockName(Header) - << ": member = " << getBlockName(Index) << "\n"); - } -} - -template void BlockFrequencyInfoImpl::computeMassInLoops() { - // Visit loops with the deepest first, and the top-level loops last. - for (auto L = Loops.rbegin(), E = Loops.rend(); L != E; ++L) { - if (computeMassInLoop(*L)) - continue; - auto Next = std::next(L); - computeIrreducibleMass(&*L, L.base()); - L = std::prev(Next); - if (computeMassInLoop(*L)) - continue; - llvm_unreachable("unhandled irreducible control flow"); - } -} - -template -bool BlockFrequencyInfoImpl::computeMassInLoop(LoopData &Loop) { - // Compute mass in loop. - DEBUG(dbgs() << "compute-mass-in-loop: " << getLoopName(Loop) << "\n"); - - if (Loop.isIrreducible()) { - BlockMass Remaining = BlockMass::getFull(); - for (uint32_t H = 0; H < Loop.NumHeaders; ++H) { - auto &Mass = Working[Loop.Nodes[H].Index].getMass(); - Mass = Remaining * BranchProbability(1, Loop.NumHeaders - H); - Remaining -= Mass; - } - for (const BlockNode &M : Loop.Nodes) - if (!propagateMassToSuccessors(&Loop, M)) - llvm_unreachable("unhandled irreducible control flow"); - - adjustLoopHeaderMass(Loop); - } else { - Working[Loop.getHeader().Index].getMass() = BlockMass::getFull(); - if (!propagateMassToSuccessors(&Loop, Loop.getHeader())) - llvm_unreachable("irreducible control flow to loop header!?"); - for (const BlockNode &M : Loop.members()) - if (!propagateMassToSuccessors(&Loop, M)) - // Irreducible backedge. - return false; - } - - computeLoopScale(Loop); - packageLoop(Loop); - return true; -} - -template -bool BlockFrequencyInfoImpl::tryToComputeMassInFunction() { - // Compute mass in function. - DEBUG(dbgs() << "compute-mass-in-function\n"); - assert(!Working.empty() && "no blocks in function"); - assert(!Working[0].isLoopHeader() && "entry block is a loop header"); - - Working[0].getMass() = BlockMass::getFull(); - for (rpot_iterator I = rpot_begin(), IE = rpot_end(); I != IE; ++I) { - // Check for nodes that have been packaged. - BlockNode Node = getNode(I); - if (Working[Node.Index].isPackaged()) - continue; - - if (!propagateMassToSuccessors(nullptr, Node)) - return false; - } - return true; -} - -template void BlockFrequencyInfoImpl::computeMassInFunction() { - if (tryToComputeMassInFunction()) - return; - computeIrreducibleMass(nullptr, Loops.begin()); - if (tryToComputeMassInFunction()) - return; - llvm_unreachable("unhandled irreducible control flow"); -} - -/// \note This should be a lambda, but that crashes GCC 4.7. -namespace bfi_detail { -template struct BlockEdgesAdder { - typedef BT BlockT; - typedef BlockFrequencyInfoImplBase::LoopData LoopData; - typedef GraphTraits Successor; - - const BlockFrequencyInfoImpl &BFI; - explicit BlockEdgesAdder(const BlockFrequencyInfoImpl &BFI) - : BFI(BFI) {} - void operator()(IrreducibleGraph &G, IrreducibleGraph::IrrNode &Irr, - const LoopData *OuterLoop) { - const BlockT *BB = BFI.RPOT[Irr.Node.Index]; - for (auto I = Successor::child_begin(BB), E = Successor::child_end(BB); - I != E; ++I) - G.addEdge(Irr, BFI.getNode(*I), OuterLoop); - } -}; -} -template -void BlockFrequencyInfoImpl::computeIrreducibleMass( - LoopData *OuterLoop, std::list::iterator Insert) { - DEBUG(dbgs() << "analyze-irreducible-in-"; - if (OuterLoop) dbgs() << "loop: " << getLoopName(*OuterLoop) << "\n"; - else dbgs() << "function\n"); - - using namespace bfi_detail; - // Ideally, addBlockEdges() would be declared here as a lambda, but that - // crashes GCC 4.7. - BlockEdgesAdder addBlockEdges(*this); - IrreducibleGraph G(*this, OuterLoop, addBlockEdges); - - for (auto &L : analyzeIrreducible(G, OuterLoop, Insert)) - computeMassInLoop(L); - - if (!OuterLoop) - return; - updateLoopWithIrreducible(*OuterLoop); -} - -// A helper function that converts a branch probability into weight. -inline uint32_t getWeightFromBranchProb(const BranchProbability Prob) { - return Prob.getNumerator(); -} - -template -bool -BlockFrequencyInfoImpl::propagateMassToSuccessors(LoopData *OuterLoop, - const BlockNode &Node) { - DEBUG(dbgs() << " - node: " << getBlockName(Node) << "\n"); - // Calculate probability for successors. - Distribution Dist; - if (auto *Loop = Working[Node.Index].getPackagedLoop()) { - assert(Loop != OuterLoop && "Cannot propagate mass in a packaged loop"); - if (!addLoopSuccessorsToDist(OuterLoop, *Loop, Dist)) - // Irreducible backedge. - return false; - } else { - const BlockT *BB = getBlock(Node); - for (auto SI = Successor::child_begin(BB), SE = Successor::child_end(BB); - SI != SE; ++SI) - if (!addToDist(Dist, OuterLoop, Node, getNode(*SI), - getWeightFromBranchProb(BPI->getEdgeProbability(BB, SI)))) - // Irreducible backedge. - return false; - } - - // Distribute mass to successors, saving exit and backedge data in the - // loop header. - distributeMass(Node, OuterLoop, Dist); - return true; -} - -template -raw_ostream &BlockFrequencyInfoImpl::print(raw_ostream &OS) const { - if (!F) - return OS; - OS << "block-frequency-info: " << F->getName() << "\n"; - for (const BlockT &BB : *F) { - OS << " - " << bfi_detail::getBlockName(&BB) << ": float = "; - getFloatingBlockFreq(&BB).print(OS, 5) - << ", int = " << getBlockFreq(&BB).getFrequency() << "\n"; - } - - // Add an extra newline for readability. - OS << "\n"; - return OS; -} - -// Graph trait base class for block frequency information graph -// viewer. - -enum GVDAGType { GVDT_None, GVDT_Fraction, GVDT_Integer, GVDT_Count }; - -template -struct BFIDOTGraphTraitsBase : public DefaultDOTGraphTraits { - explicit BFIDOTGraphTraitsBase(bool isSimple = false) - : DefaultDOTGraphTraits(isSimple) {} - - typedef GraphTraits GTraits; - typedef typename GTraits::NodeType NodeType; - typedef typename GTraits::ChildIteratorType EdgeIter; - typedef typename GTraits::nodes_iterator NodeIter; - - uint64_t MaxFrequency = 0; - static std::string getGraphName(const BlockFrequencyInfoT *G) { - return G->getFunction()->getName(); - } - - std::string getNodeAttributes(const NodeType *Node, - const BlockFrequencyInfoT *Graph, - unsigned HotPercentThreshold = 0) { - std::string Result; - if (!HotPercentThreshold) - return Result; - - // Compute MaxFrequency on the fly: - if (!MaxFrequency) { - for (NodeIter I = GTraits::nodes_begin(Graph), - E = GTraits::nodes_end(Graph); - I != E; ++I) { - NodeType &N = *I; - MaxFrequency = - std::max(MaxFrequency, Graph->getBlockFreq(&N).getFrequency()); - } - } - BlockFrequency Freq = Graph->getBlockFreq(Node); - BlockFrequency HotFreq = - (BlockFrequency(MaxFrequency) * - BranchProbability::getBranchProbability(HotPercentThreshold, 100)); - - if (Freq < HotFreq) - return Result; - - raw_string_ostream OS(Result); - OS << "color=\"red\""; - OS.flush(); - return Result; - } - - std::string getNodeLabel(const NodeType *Node, - const BlockFrequencyInfoT *Graph, GVDAGType GType) { - std::string Result; - raw_string_ostream OS(Result); - - OS << Node->getName().str() << " : "; - switch (GType) { - case GVDT_Fraction: - Graph->printBlockFreq(OS, Node); - break; - case GVDT_Integer: - OS << Graph->getBlockFreq(Node).getFrequency(); - break; - case GVDT_Count: { - auto Count = Graph->getBlockProfileCount(Node); - if (Count) - OS << Count.getValue(); - else - OS << "Unknown"; - break; - } - case GVDT_None: - llvm_unreachable("If we are not supposed to render a graph we should " - "never reach this point."); - } - return Result; - } - - std::string getEdgeAttributes(const NodeType *Node, EdgeIter EI, - const BlockFrequencyInfoT *BFI, - const BranchProbabilityInfoT *BPI, - unsigned HotPercentThreshold = 0) { - std::string Str; - if (!BPI) - return Str; - - BranchProbability BP = BPI->getEdgeProbability(Node, EI); - uint32_t N = BP.getNumerator(); - uint32_t D = BP.getDenominator(); - double Percent = 100.0 * N / D; - raw_string_ostream OS(Str); - OS << format("label=\"%.1f%%\"", Percent); - - if (HotPercentThreshold) { - BlockFrequency EFreq = BFI->getBlockFreq(Node) * BP; - BlockFrequency HotFreq = BlockFrequency(MaxFrequency) * - BranchProbability(HotPercentThreshold, 100); - - if (EFreq >= HotFreq) { - OS << ",color=\"red\""; - } - } - - OS.flush(); - return Str; - } -}; - -} // end namespace llvm - -#undef DEBUG_TYPE - -#endif diff --git a/llvm/include/llvm/Analysis/BranchProbabilityInfo.h b/llvm/include/llvm/Analysis/BranchProbabilityInfo.h deleted file mode 100644 index 6434ba96..00000000 --- a/llvm/include/llvm/Analysis/BranchProbabilityInfo.h +++ /dev/null @@ -1,224 +0,0 @@ -//===--- BranchProbabilityInfo.h - Branch Probability Analysis --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This pass is used to evaluate branch probabilties. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_BRANCHPROBABILITYINFO_H -#define LLVM_ANALYSIS_BRANCHPROBABILITYINFO_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/IR/CFG.h" -#include "llvm/IR/PassManager.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/InitializePasses.h" -#include "llvm/Pass.h" -#include "llvm/Support/BranchProbability.h" - -namespace llvm { -class LoopInfo; -class raw_ostream; - -/// \brief Analysis providing branch probability information. -/// -/// This is a function analysis which provides information on the relative -/// probabilities of each "edge" in the function's CFG where such an edge is -/// defined by a pair (PredBlock and an index in the successors). The -/// probability of an edge from one block is always relative to the -/// probabilities of other edges from the block. The probabilites of all edges -/// from a block sum to exactly one (100%). -/// We use a pair (PredBlock and an index in the successors) to uniquely -/// identify an edge, since we can have multiple edges from Src to Dst. -/// As an example, we can have a switch which jumps to Dst with value 0 and -/// value 10. -class BranchProbabilityInfo { -public: - BranchProbabilityInfo() {} - BranchProbabilityInfo(const Function &F, const LoopInfo &LI) { - calculate(F, LI); - } - - BranchProbabilityInfo(BranchProbabilityInfo &&Arg) - : Probs(std::move(Arg.Probs)), LastF(Arg.LastF), - PostDominatedByUnreachable(std::move(Arg.PostDominatedByUnreachable)), - PostDominatedByColdCall(std::move(Arg.PostDominatedByColdCall)) {} - - BranchProbabilityInfo &operator=(BranchProbabilityInfo &&RHS) { - releaseMemory(); - Probs = std::move(RHS.Probs); - PostDominatedByColdCall = std::move(RHS.PostDominatedByColdCall); - PostDominatedByUnreachable = std::move(RHS.PostDominatedByUnreachable); - return *this; - } - - void releaseMemory(); - - void print(raw_ostream &OS) const; - - /// \brief Get an edge's probability, relative to other out-edges of the Src. - /// - /// This routine provides access to the fractional probability between zero - /// (0%) and one (100%) of this edge executing, relative to other edges - /// leaving the 'Src' block. The returned probability is never zero, and can - /// only be one if the source block has only one successor. - BranchProbability getEdgeProbability(const BasicBlock *Src, - unsigned IndexInSuccessors) const; - - /// \brief Get the probability of going from Src to Dst. - /// - /// It returns the sum of all probabilities for edges from Src to Dst. - BranchProbability getEdgeProbability(const BasicBlock *Src, - const BasicBlock *Dst) const; - - BranchProbability getEdgeProbability(const BasicBlock *Src, - succ_const_iterator Dst) const; - - /// \brief Test if an edge is hot relative to other out-edges of the Src. - /// - /// Check whether this edge out of the source block is 'hot'. We define hot - /// as having a relative probability >= 80%. - bool isEdgeHot(const BasicBlock *Src, const BasicBlock *Dst) const; - - /// \brief Retrieve the hot successor of a block if one exists. - /// - /// Given a basic block, look through its successors and if one exists for - /// which \see isEdgeHot would return true, return that successor block. - const BasicBlock *getHotSucc(const BasicBlock *BB) const; - - /// \brief Print an edge's probability. - /// - /// Retrieves an edge's probability similarly to \see getEdgeProbability, but - /// then prints that probability to the provided stream. That stream is then - /// returned. - raw_ostream &printEdgeProbability(raw_ostream &OS, const BasicBlock *Src, - const BasicBlock *Dst) const; - - /// \brief Set the raw edge probability for the given edge. - /// - /// This allows a pass to explicitly set the edge probability for an edge. It - /// can be used when updating the CFG to update and preserve the branch - /// probability information. Read the implementation of how these edge - /// probabilities are calculated carefully before using! - void setEdgeProbability(const BasicBlock *Src, unsigned IndexInSuccessors, - BranchProbability Prob); - - static BranchProbability getBranchProbStackProtector(bool IsLikely) { - static const BranchProbability LikelyProb((1u << 20) - 1, 1u << 20); - return IsLikely ? LikelyProb : LikelyProb.getCompl(); - } - - void calculate(const Function &F, const LoopInfo &LI); - - /// Forget analysis results for the given basic block. - void eraseBlock(const BasicBlock *BB); - -private: - void operator=(const BranchProbabilityInfo &) = delete; - BranchProbabilityInfo(const BranchProbabilityInfo &) = delete; - - // We need to store CallbackVH's in order to correctly handle basic block - // removal. - class BasicBlockCallbackVH final : public CallbackVH { - BranchProbabilityInfo *BPI; - void deleted() override { - assert(BPI != nullptr); - BPI->eraseBlock(cast(getValPtr())); - BPI->Handles.erase(*this); - } - - public: - BasicBlockCallbackVH(const Value *V, BranchProbabilityInfo *BPI=nullptr) - : CallbackVH(const_cast(V)), BPI(BPI) {} - }; - DenseSet> Handles; - - // Since we allow duplicate edges from one basic block to another, we use - // a pair (PredBlock and an index in the successors) to specify an edge. - typedef std::pair Edge; - - // Default weight value. Used when we don't have information about the edge. - // TODO: DEFAULT_WEIGHT makes sense during static predication, when none of - // the successors have a weight yet. But it doesn't make sense when providing - // weight to an edge that may have siblings with non-zero weights. This can - // be handled various ways, but it's probably fine for an edge with unknown - // weight to just "inherit" the non-zero weight of an adjacent successor. - static const uint32_t DEFAULT_WEIGHT = 16; - - DenseMap Probs; - - /// \brief Track the last function we run over for printing. - const Function *LastF; - - /// \brief Track the set of blocks directly succeeded by a returning block. - SmallPtrSet PostDominatedByUnreachable; - - /// \brief Track the set of blocks that always lead to a cold call. - SmallPtrSet PostDominatedByColdCall; - - bool calcUnreachableHeuristics(const BasicBlock *BB); - bool calcMetadataWeights(const BasicBlock *BB); - bool calcColdCallHeuristics(const BasicBlock *BB); - bool calcPointerHeuristics(const BasicBlock *BB); - bool calcLoopBranchHeuristics(const BasicBlock *BB, const LoopInfo &LI); - bool calcZeroHeuristics(const BasicBlock *BB); - bool calcFloatingPointHeuristics(const BasicBlock *BB); - bool calcInvokeHeuristics(const BasicBlock *BB); -}; - -/// \brief Analysis pass which computes \c BranchProbabilityInfo. -class BranchProbabilityAnalysis - : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// \brief Provide the result typedef for this analysis pass. - typedef BranchProbabilityInfo Result; - - /// \brief Run the analysis pass over a function and produce BPI. - BranchProbabilityInfo run(Function &F, AnalysisManager &AM); -}; - -/// \brief Printer pass for the \c BranchProbabilityAnalysis results. -class BranchProbabilityPrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit BranchProbabilityPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -/// \brief Legacy analysis pass which computes \c BranchProbabilityInfo. -class BranchProbabilityInfoWrapperPass : public FunctionPass { - BranchProbabilityInfo BPI; - -public: - static char ID; - - BranchProbabilityInfoWrapperPass() : FunctionPass(ID) { - initializeBranchProbabilityInfoWrapperPassPass( - *PassRegistry::getPassRegistry()); - } - - BranchProbabilityInfo &getBPI() { return BPI; } - const BranchProbabilityInfo &getBPI() const { return BPI; } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - bool runOnFunction(Function &F) override; - void releaseMemory() override; - void print(raw_ostream &OS, const Module *M = nullptr) const override; -}; - -} - -#endif diff --git a/llvm/include/llvm/Analysis/CFG.h b/llvm/include/llvm/Analysis/CFG.h deleted file mode 100644 index 35165f40..00000000 --- a/llvm/include/llvm/Analysis/CFG.h +++ /dev/null @@ -1,94 +0,0 @@ -//===-- Analysis/CFG.h - BasicBlock Analyses --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This family of functions performs analyses on basic blocks, and instructions -// contained within basic blocks. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CFG_H -#define LLVM_ANALYSIS_CFG_H - -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/CFG.h" - -namespace llvm { - -class BasicBlock; -class DominatorTree; -class Function; -class Instruction; -class LoopInfo; -class TerminatorInst; - -/// Analyze the specified function to find all of the loop backedges in the -/// function and return them. This is a relatively cheap (compared to -/// computing dominators and loop info) analysis. -/// -/// The output is added to Result, as pairs of edge info. -void FindFunctionBackedges( - const Function &F, - SmallVectorImpl > & - Result); - -/// Search for the specified successor of basic block BB and return its position -/// in the terminator instruction's list of successors. It is an error to call -/// this with a block that is not a successor. -unsigned GetSuccessorNumber(const BasicBlock *BB, const BasicBlock *Succ); - -/// Return true if the specified edge is a critical edge. Critical edges are -/// edges from a block with multiple successors to a block with multiple -/// predecessors. -/// -bool isCriticalEdge(const TerminatorInst *TI, unsigned SuccNum, - bool AllowIdenticalEdges = false); - -/// \brief Determine whether instruction 'To' is reachable from 'From', -/// returning true if uncertain. -/// -/// Determine whether there is a path from From to To within a single function. -/// Returns false only if we can prove that once 'From' has been executed then -/// 'To' can not be executed. Conservatively returns true. -/// -/// This function is linear with respect to the number of blocks in the CFG, -/// walking down successors from From to reach To, with a fixed threshold. -/// Using DT or LI allows us to answer more quickly. LI reduces the cost of -/// an entire loop of any number of blocsk to be the same as the cost of a -/// single block. DT reduces the cost by allowing the search to terminate when -/// we find a block that dominates the block containing 'To'. DT is most useful -/// on branchy code but not loops, and LI is most useful on code with loops but -/// does not help on branchy code outside loops. -bool isPotentiallyReachable(const Instruction *From, const Instruction *To, - const DominatorTree *DT = nullptr, - const LoopInfo *LI = nullptr); - -/// \brief Determine whether block 'To' is reachable from 'From', returning -/// true if uncertain. -/// -/// Determine whether there is a path from From to To within a single function. -/// Returns false only if we can prove that once 'From' has been reached then -/// 'To' can not be executed. Conservatively returns true. -bool isPotentiallyReachable(const BasicBlock *From, const BasicBlock *To, - const DominatorTree *DT = nullptr, - const LoopInfo *LI = nullptr); - -/// \brief Determine whether there is at least one path from a block in -/// 'Worklist' to 'StopBB', returning true if uncertain. -/// -/// Determine whether there is a path from at least one block in Worklist to -/// StopBB within a single function. Returns false only if we can prove that -/// once any block in 'Worklist' has been reached then 'StopBB' can not be -/// executed. Conservatively returns true. -bool isPotentiallyReachableFromMany(SmallVectorImpl &Worklist, - BasicBlock *StopBB, - const DominatorTree *DT = nullptr, - const LoopInfo *LI = nullptr); -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/CFGPrinter.h b/llvm/include/llvm/Analysis/CFGPrinter.h deleted file mode 100644 index 03576483..00000000 --- a/llvm/include/llvm/Analysis/CFGPrinter.h +++ /dev/null @@ -1,130 +0,0 @@ -//===-- CFGPrinter.h - CFG printer external interface -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines external functions that can be called to explicitly -// instantiate the CFG printer. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CFGPRINTER_H -#define LLVM_ANALYSIS_CFGPRINTER_H - -#include "llvm/IR/CFG.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Instructions.h" -#include "llvm/Support/GraphWriter.h" - -namespace llvm { -template<> -struct DOTGraphTraits : public DefaultDOTGraphTraits { - - DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {} - - static std::string getGraphName(const Function *F) { - return "CFG for '" + F->getName().str() + "' function"; - } - - static std::string getSimpleNodeLabel(const BasicBlock *Node, - const Function *) { - if (!Node->getName().empty()) - return Node->getName().str(); - - std::string Str; - raw_string_ostream OS(Str); - - Node->printAsOperand(OS, false); - return OS.str(); - } - - static std::string getCompleteNodeLabel(const BasicBlock *Node, - const Function *) { - enum { MaxColumns = 80 }; - std::string Str; - raw_string_ostream OS(Str); - - if (Node->getName().empty()) { - Node->printAsOperand(OS, false); - OS << ":"; - } - - OS << *Node; - std::string OutStr = OS.str(); - if (OutStr[0] == '\n') OutStr.erase(OutStr.begin()); - - // Process string output to make it nicer... - unsigned ColNum = 0; - unsigned LastSpace = 0; - for (unsigned i = 0; i != OutStr.length(); ++i) { - if (OutStr[i] == '\n') { // Left justify - OutStr[i] = '\\'; - OutStr.insert(OutStr.begin()+i+1, 'l'); - ColNum = 0; - LastSpace = 0; - } else if (OutStr[i] == ';') { // Delete comments! - unsigned Idx = OutStr.find('\n', i+1); // Find end of line - OutStr.erase(OutStr.begin()+i, OutStr.begin()+Idx); - --i; - } else if (ColNum == MaxColumns) { // Wrap lines. - // Wrap very long names even though we can't find a space. - if (!LastSpace) - LastSpace = i; - OutStr.insert(LastSpace, "\\l..."); - ColNum = i - LastSpace; - LastSpace = 0; - i += 3; // The loop will advance 'i' again. - } - else - ++ColNum; - if (OutStr[i] == ' ') - LastSpace = i; - } - return OutStr; - } - - std::string getNodeLabel(const BasicBlock *Node, - const Function *Graph) { - if (isSimple()) - return getSimpleNodeLabel(Node, Graph); - else - return getCompleteNodeLabel(Node, Graph); - } - - static std::string getEdgeSourceLabel(const BasicBlock *Node, - succ_const_iterator I) { - // Label source of conditional branches with "T" or "F" - if (const BranchInst *BI = dyn_cast(Node->getTerminator())) - if (BI->isConditional()) - return (I == succ_begin(Node)) ? "T" : "F"; - - // Label source of switch edges with the associated value. - if (const SwitchInst *SI = dyn_cast(Node->getTerminator())) { - unsigned SuccNo = I.getSuccessorIndex(); - - if (SuccNo == 0) return "def"; - - std::string Str; - raw_string_ostream OS(Str); - SwitchInst::ConstCaseIt Case = - SwitchInst::ConstCaseIt::fromSuccessorIndex(SI, SuccNo); - OS << Case.getCaseValue()->getValue(); - return OS.str(); - } - return ""; - } -}; -} // End llvm namespace - -namespace llvm { - class FunctionPass; - FunctionPass *createCFGPrinterPass (); - FunctionPass *createCFGOnlyPrinterPass (); -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h b/llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h deleted file mode 100644 index 48eca888..00000000 --- a/llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h +++ /dev/null @@ -1,138 +0,0 @@ -//=- CFLAndersAliasAnalysis.h - Unification-based Alias Analysis ---*- C++-*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This is the interface for LLVM's inclusion-based alias analysis -/// implemented with CFL graph reachability. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CFLANDERSALIASANALYSIS_H -#define LLVM_ANALYSIS_CFLANDERSALIASANALYSIS_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -class TargetLibraryInfo; - -namespace cflaa { -struct AliasSummary; -} - -class CFLAndersAAResult : public AAResultBase { - friend AAResultBase; - class FunctionInfo; - -public: - explicit CFLAndersAAResult(const TargetLibraryInfo &); - CFLAndersAAResult(CFLAndersAAResult &&); - ~CFLAndersAAResult(); - - /// Handle invalidation events from the new pass manager. - /// By definition, this result is stateless and so remains valid. - bool invalidate(Function &, const PreservedAnalyses &) { return false; } - /// Evict the given function from cache - void evict(const Function &Fn); - - /// \brief Get the alias summary for the given function - /// Return nullptr if the summary is not found or not available - const cflaa::AliasSummary *getAliasSummary(const Function &); - - AliasResult query(const MemoryLocation &, const MemoryLocation &); - AliasResult alias(const MemoryLocation &, const MemoryLocation &); - -private: - struct FunctionHandle final : public CallbackVH { - FunctionHandle(Function *Fn, CFLAndersAAResult *Result) - : CallbackVH(Fn), Result(Result) { - assert(Fn != nullptr); - assert(Result != nullptr); - } - - void deleted() override { removeSelfFromCache(); } - void allUsesReplacedWith(Value *) override { removeSelfFromCache(); } - - private: - CFLAndersAAResult *Result; - - void removeSelfFromCache() { - assert(Result != nullptr); - auto *Val = getValPtr(); - Result->evict(*cast(Val)); - setValPtr(nullptr); - } - }; - - /// \brief Ensures that the given function is available in the cache. - /// Returns the appropriate entry from the cache. - const Optional &ensureCached(const Function &); - - /// \brief Inserts the given Function into the cache. - void scan(const Function &); - - /// \brief Build summary for a given function - FunctionInfo buildInfoFrom(const Function &); - - const TargetLibraryInfo &TLI; - - /// \brief Cached mapping of Functions to their StratifiedSets. - /// If a function's sets are currently being built, it is marked - /// in the cache as an Optional without a value. This way, if we - /// have any kind of recursion, it is discernable from a function - /// that simply has empty sets. - DenseMap> Cache; - - std::forward_list Handles; -}; - -/// Analysis pass providing a never-invalidated alias analysis result. -/// -/// FIXME: We really should refactor CFL to use the analysis more heavily, and -/// in particular to leverage invalidation to trigger re-computation. -class CFLAndersAA : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef CFLAndersAAResult Result; - - CFLAndersAAResult run(Function &F, AnalysisManager &AM); -}; - -/// Legacy wrapper pass to provide the CFLAndersAAResult object. -class CFLAndersAAWrapperPass : public ImmutablePass { - std::unique_ptr Result; - -public: - static char ID; - - CFLAndersAAWrapperPass(); - - CFLAndersAAResult &getResult() { return *Result; } - const CFLAndersAAResult &getResult() const { return *Result; } - - void initializePass() override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -//===--------------------------------------------------------------------===// -// -// createCFLAndersAAWrapperPass - This pass implements a set-based approach to -// alias analysis. -// -ImmutablePass *createCFLAndersAAWrapperPass(); -} - -#endif diff --git a/llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h b/llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h deleted file mode 100644 index 80a00d02..00000000 --- a/llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h +++ /dev/null @@ -1,167 +0,0 @@ -//=- CFLSteensAliasAnalysis.h - Unification-based Alias Analysis ---*- C++-*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This is the interface for LLVM's unification-based alias analysis -/// implemented with CFL graph reachability. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CFLSTEENSALIASANALYSIS_H -#define LLVM_ANALYSIS_CFLSTEENSALIASANALYSIS_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/None.h" -#include "llvm/ADT/Optional.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -class TargetLibraryInfo; - -namespace cflaa { -struct AliasSummary; -} - -class CFLSteensAAResult : public AAResultBase { - friend AAResultBase; - class FunctionInfo; - -public: - explicit CFLSteensAAResult(const TargetLibraryInfo &); - CFLSteensAAResult(CFLSteensAAResult &&Arg); - ~CFLSteensAAResult(); - - /// Handle invalidation events from the new pass manager. - /// - /// By definition, this result is stateless and so remains valid. - bool invalidate(Function &, const PreservedAnalyses &) { return false; } - - /// \brief Inserts the given Function into the cache. - void scan(Function *Fn); - - void evict(Function *Fn); - - /// \brief Ensures that the given function is available in the cache. - /// Returns the appropriate entry from the cache. - const Optional &ensureCached(Function *Fn); - - /// \brief Get the alias summary for the given function - /// Return nullptr if the summary is not found or not available - const cflaa::AliasSummary *getAliasSummary(Function &Fn); - - AliasResult query(const MemoryLocation &LocA, const MemoryLocation &LocB); - - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB) { - if (LocA.Ptr == LocB.Ptr) - return LocA.Size == LocB.Size ? MustAlias : PartialAlias; - - // Comparisons between global variables and other constants should be - // handled by BasicAA. - // CFLSteensAA may report NoAlias when comparing a GlobalValue and - // ConstantExpr, but every query needs to have at least one Value tied to a - // Function, and neither GlobalValues nor ConstantExprs are. - if (isa(LocA.Ptr) && isa(LocB.Ptr)) - return AAResultBase::alias(LocA, LocB); - - AliasResult QueryResult = query(LocA, LocB); - if (QueryResult == MayAlias) - return AAResultBase::alias(LocA, LocB); - - return QueryResult; - } - - /// Get the location associated with a pointer argument of a callsite. - ModRefInfo getArgModRefInfo(ImmutableCallSite CS, unsigned ArgIdx); - - /// Returns the behavior when calling the given call site. - FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS); - - /// Returns the behavior when calling the given function. For use when the - /// call site is not known. - FunctionModRefBehavior getModRefBehavior(const Function *F); - -private: - struct FunctionHandle final : public CallbackVH { - FunctionHandle(Function *Fn, CFLSteensAAResult *Result) - : CallbackVH(Fn), Result(Result) { - assert(Fn != nullptr); - assert(Result != nullptr); - } - - void deleted() override { removeSelfFromCache(); } - void allUsesReplacedWith(Value *) override { removeSelfFromCache(); } - - private: - CFLSteensAAResult *Result; - - void removeSelfFromCache() { - assert(Result != nullptr); - auto *Val = getValPtr(); - Result->evict(cast(Val)); - setValPtr(nullptr); - } - }; - - const TargetLibraryInfo &TLI; - - /// \brief Cached mapping of Functions to their StratifiedSets. - /// If a function's sets are currently being built, it is marked - /// in the cache as an Optional without a value. This way, if we - /// have any kind of recursion, it is discernable from a function - /// that simply has empty sets. - DenseMap> Cache; - std::forward_list Handles; - - FunctionInfo buildSetsFrom(Function *F); -}; - -/// Analysis pass providing a never-invalidated alias analysis result. -/// -/// FIXME: We really should refactor CFL to use the analysis more heavily, and -/// in particular to leverage invalidation to trigger re-computation of sets. -class CFLSteensAA : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef CFLSteensAAResult Result; - - CFLSteensAAResult run(Function &F, AnalysisManager &AM); -}; - -/// Legacy wrapper pass to provide the CFLSteensAAResult object. -class CFLSteensAAWrapperPass : public ImmutablePass { - std::unique_ptr Result; - -public: - static char ID; - - CFLSteensAAWrapperPass(); - - CFLSteensAAResult &getResult() { return *Result; } - const CFLSteensAAResult &getResult() const { return *Result; } - - void initializePass() override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -//===--------------------------------------------------------------------===// -// -// createCFLSteensAAWrapperPass - This pass implements a set-based approach to -// alias analysis. -// -ImmutablePass *createCFLSteensAAWrapperPass(); -} - -#endif diff --git a/llvm/include/llvm/Analysis/CGSCCPassManager.h b/llvm/include/llvm/Analysis/CGSCCPassManager.h deleted file mode 100644 index 3263ecec..00000000 --- a/llvm/include/llvm/Analysis/CGSCCPassManager.h +++ /dev/null @@ -1,237 +0,0 @@ -//===- CGSCCPassManager.h - Call graph pass management ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This header provides classes for managing passes over SCCs of the call -/// graph. These passes form an important component of LLVM's interprocedural -/// optimizations. Because they operate on the SCCs of the call graph, and they -/// traverse the graph in post order, they can effectively do pair-wise -/// interprocedural optimizations for all call edges in the program. At each -/// call site edge, the callee has already been optimized as much as is -/// possible. This in turn allows very accurate analysis of it for IPO. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CGSCCPASSMANAGER_H -#define LLVM_ANALYSIS_CGSCCPASSMANAGER_H - -#include "llvm/Analysis/LazyCallGraph.h" -#include "llvm/IR/PassManager.h" - -namespace llvm { - -extern template class PassManager; -/// \brief The CGSCC pass manager. -/// -/// See the documentation for the PassManager template for details. It runs -/// a sequency of SCC passes over each SCC that the manager is run over. This -/// typedef serves as a convenient way to refer to this construct. -typedef PassManager CGSCCPassManager; - -extern template class AnalysisManager; -/// \brief The CGSCC analysis manager. -/// -/// See the documentation for the AnalysisManager template for detail -/// documentation. This typedef serves as a convenient way to refer to this -/// construct in the adaptors and proxies used to integrate this into the larger -/// pass manager infrastructure. -typedef AnalysisManager CGSCCAnalysisManager; - -extern template class InnerAnalysisManagerProxy; -/// A proxy from a \c CGSCCAnalysisManager to a \c Module. -typedef InnerAnalysisManagerProxy - CGSCCAnalysisManagerModuleProxy; - -extern template class OuterAnalysisManagerProxy; -/// A proxy from a \c ModuleAnalysisManager to an \c SCC. -typedef OuterAnalysisManagerProxy - ModuleAnalysisManagerCGSCCProxy; - -/// \brief The core module pass which does a post-order walk of the SCCs and -/// runs a CGSCC pass over each one. -/// -/// Designed to allow composition of a CGSCCPass(Manager) and -/// a ModulePassManager. Note that this pass must be run with a module analysis -/// manager as it uses the LazyCallGraph analysis. It will also run the -/// \c CGSCCAnalysisManagerModuleProxy analysis prior to running the CGSCC -/// pass over the module to enable a \c FunctionAnalysisManager to be used -/// within this run safely. -template -class ModuleToPostOrderCGSCCPassAdaptor - : public PassInfoMixin> { -public: - explicit ModuleToPostOrderCGSCCPassAdaptor(CGSCCPassT Pass, bool DebugLogging = false) - : Pass(std::move(Pass)), DebugLogging(DebugLogging) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - ModuleToPostOrderCGSCCPassAdaptor( - const ModuleToPostOrderCGSCCPassAdaptor &Arg) - : Pass(Arg.Pass), DebugLogging(Arg.DebugLogging) {} - ModuleToPostOrderCGSCCPassAdaptor(ModuleToPostOrderCGSCCPassAdaptor &&Arg) - : Pass(std::move(Arg.Pass)), DebugLogging(Arg.DebugLogging) {} - friend void swap(ModuleToPostOrderCGSCCPassAdaptor &LHS, - ModuleToPostOrderCGSCCPassAdaptor &RHS) { - using std::swap; - swap(LHS.Pass, RHS.Pass); - swap(LHS.DebugLogging, RHS.DebugLogging); - } - ModuleToPostOrderCGSCCPassAdaptor & - operator=(ModuleToPostOrderCGSCCPassAdaptor RHS) { - swap(*this, RHS); - return *this; - } - - /// \brief Runs the CGSCC pass across every SCC in the module. - PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM) { - // Setup the CGSCC analysis manager from its proxy. - CGSCCAnalysisManager &CGAM = - AM.getResult(M).getManager(); - - // Get the call graph for this module. - LazyCallGraph &CG = AM.getResult(M); - - PreservedAnalyses PA = PreservedAnalyses::all(); - for (LazyCallGraph::RefSCC &RC : CG.postorder_ref_sccs()) { - if (DebugLogging) - dbgs() << "Running an SCC pass across the RefSCC: " << RC << "\n"; - - for (LazyCallGraph::SCC &C : RC) { - PreservedAnalyses PassPA = Pass.run(C, CGAM); - - // We know that the CGSCC pass couldn't have invalidated any other - // SCC's analyses (that's the contract of a CGSCC pass), so - // directly handle the CGSCC analysis manager's invalidation here. We - // also update the preserved set of analyses to reflect that invalidated - // analyses are now safe to preserve. - // FIXME: This isn't quite correct. We need to handle the case where the - // pass updated the CG, particularly some child of the current SCC, and - // invalidate its analyses. - PassPA = CGAM.invalidate(C, std::move(PassPA)); - - // Then intersect the preserved set so that invalidation of module - // analyses will eventually occur when the module pass completes. - PA.intersect(std::move(PassPA)); - } - } - - // By definition we preserve the proxy. This precludes *any* invalidation - // of CGSCC analyses by the proxy, but that's OK because we've taken - // care to invalidate analyses in the CGSCC analysis manager - // incrementally above. - PA.preserve(); - return PA; - } - -private: - CGSCCPassT Pass; - bool DebugLogging; -}; - -/// \brief A function to deduce a function pass type and wrap it in the -/// templated adaptor. -template -ModuleToPostOrderCGSCCPassAdaptor -createModuleToPostOrderCGSCCPassAdaptor(CGSCCPassT Pass, bool DebugLogging = false) { - return ModuleToPostOrderCGSCCPassAdaptor(std::move(Pass), DebugLogging); -} - -extern template class InnerAnalysisManagerProxy; -/// A proxy from a \c FunctionAnalysisManager to an \c SCC. -typedef InnerAnalysisManagerProxy - FunctionAnalysisManagerCGSCCProxy; - -extern template class OuterAnalysisManagerProxy; -/// A proxy from a \c CGSCCAnalysisManager to a \c Function. -typedef OuterAnalysisManagerProxy - CGSCCAnalysisManagerFunctionProxy; - -/// \brief Adaptor that maps from a SCC to its functions. -/// -/// Designed to allow composition of a FunctionPass(Manager) and -/// a CGSCCPassManager. Note that if this pass is constructed with a pointer -/// to a \c CGSCCAnalysisManager it will run the -/// \c FunctionAnalysisManagerCGSCCProxy analysis prior to running the function -/// pass over the SCC to enable a \c FunctionAnalysisManager to be used -/// within this run safely. -template -class CGSCCToFunctionPassAdaptor - : public PassInfoMixin> { -public: - explicit CGSCCToFunctionPassAdaptor(FunctionPassT Pass, bool DebugLogging = false) - : Pass(std::move(Pass)), DebugLogging(DebugLogging) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - CGSCCToFunctionPassAdaptor(const CGSCCToFunctionPassAdaptor &Arg) - : Pass(Arg.Pass), DebugLogging(Arg.DebugLogging) {} - CGSCCToFunctionPassAdaptor(CGSCCToFunctionPassAdaptor &&Arg) - : Pass(std::move(Arg.Pass)), DebugLogging(Arg.DebugLogging) {} - friend void swap(CGSCCToFunctionPassAdaptor &LHS, - CGSCCToFunctionPassAdaptor &RHS) { - using std::swap; - swap(LHS.Pass, RHS.Pass); - swap(LHS.DebugLogging, RHS.DebugLogging); - } - CGSCCToFunctionPassAdaptor &operator=(CGSCCToFunctionPassAdaptor RHS) { - swap(*this, RHS); - return *this; - } - - /// \brief Runs the function pass across every function in the module. - PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM) { - // Setup the function analysis manager from its proxy. - FunctionAnalysisManager &FAM = - AM.getResult(C).getManager(); - - if (DebugLogging) - dbgs() << "Running function passes across an SCC: " << C << "\n"; - - PreservedAnalyses PA = PreservedAnalyses::all(); - for (LazyCallGraph::Node &N : C) { - PreservedAnalyses PassPA = Pass.run(N.getFunction(), FAM); - - // We know that the function pass couldn't have invalidated any other - // function's analyses (that's the contract of a function pass), so - // directly handle the function analysis manager's invalidation here. - // Also, update the preserved analyses to reflect that once invalidated - // these can again be preserved. - PassPA = FAM.invalidate(N.getFunction(), std::move(PassPA)); - - // Then intersect the preserved set so that invalidation of module - // analyses will eventually occur when the module pass completes. - PA.intersect(std::move(PassPA)); - } - - // By definition we preserve the proxy. This precludes *any* invalidation - // of function analyses by the proxy, but that's OK because we've taken - // care to invalidate analyses in the function analysis manager - // incrementally above. - // FIXME: We need to update the call graph here to account for any deleted - // edges! - PA.preserve(); - return PA; - } - -private: - FunctionPassT Pass; - bool DebugLogging; -}; - -/// \brief A function to deduce a function pass type and wrap it in the -/// templated adaptor. -template -CGSCCToFunctionPassAdaptor -createCGSCCToFunctionPassAdaptor(FunctionPassT Pass, bool DebugLogging = false) { - return CGSCCToFunctionPassAdaptor(std::move(Pass), - DebugLogging); -} -} - -#endif diff --git a/llvm/include/llvm/Analysis/CallGraph.h b/llvm/include/llvm/Analysis/CallGraph.h deleted file mode 100644 index f37e843f..00000000 --- a/llvm/include/llvm/Analysis/CallGraph.h +++ /dev/null @@ -1,505 +0,0 @@ -//===- CallGraph.h - Build a Module's call graph ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This file provides interfaces used to build and manipulate a call graph, -/// which is a very useful tool for interprocedural optimization. -/// -/// Every function in a module is represented as a node in the call graph. The -/// callgraph node keeps track of which functions are called by the function -/// corresponding to the node. -/// -/// A call graph may contain nodes where the function that they correspond to -/// is null. These 'external' nodes are used to represent control flow that is -/// not represented (or analyzable) in the module. In particular, this -/// analysis builds one external node such that: -/// 1. All functions in the module without internal linkage will have edges -/// from this external node, indicating that they could be called by -/// functions outside of the module. -/// 2. All functions whose address is used for something more than a direct -/// call, for example being stored into a memory location will also have -/// an edge from this external node. Since they may be called by an -/// unknown caller later, they must be tracked as such. -/// -/// There is a second external node added for calls that leave this module. -/// Functions have a call edge to the external node iff: -/// 1. The function is external, reflecting the fact that they could call -/// anything without internal linkage or that has its address taken. -/// 2. The function contains an indirect function call. -/// -/// As an extension in the future, there may be multiple nodes with a null -/// function. These will be used when we can prove (through pointer analysis) -/// that an indirect call site can call only a specific set of functions. -/// -/// Because of these properties, the CallGraph captures a conservative superset -/// of all of the caller-callee relationships, which is useful for -/// transformations. -/// -/// The CallGraph class also attempts to figure out what the root of the -/// CallGraph is, which it currently does by looking for a function named -/// 'main'. If no function named 'main' is found, the external node is used as -/// the entry node, reflecting the fact that any function without internal -/// linkage could be called into (which is common for libraries). -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CALLGRAPH_H -#define LLVM_ANALYSIS_CALLGRAPH_H - -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/IR/CallSite.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/IR/PassManager.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -class Function; -class Module; -class CallGraphNode; - -/// \brief The basic data container for the call graph of a \c Module of IR. -/// -/// This class exposes both the interface to the call graph for a module of IR. -/// -/// The core call graph itself can also be updated to reflect changes to the IR. -class CallGraph { - Module &M; - - typedef std::map> - FunctionMapTy; - - /// \brief A map from \c Function* to \c CallGraphNode*. - FunctionMapTy FunctionMap; - - /// \brief Root is root of the call graph, or the external node if a 'main' - /// function couldn't be found. - CallGraphNode *Root; - - /// \brief This node has edges to all external functions and those internal - /// functions that have their address taken. - CallGraphNode *ExternalCallingNode; - - /// \brief This node has edges to it from all functions making indirect calls - /// or calling an external function. - std::unique_ptr CallsExternalNode; - - /// \brief Replace the function represented by this node by another. - /// - /// This does not rescan the body of the function, so it is suitable when - /// splicing the body of one function to another while also updating all - /// callers from the old function to the new. - void spliceFunction(const Function *From, const Function *To); - - /// \brief Add a function to the call graph, and link the node to all of the - /// functions that it calls. - void addToCallGraph(Function *F); - -public: - explicit CallGraph(Module &M); - CallGraph(CallGraph &&Arg); - ~CallGraph(); - - void print(raw_ostream &OS) const; - void dump() const; - - typedef FunctionMapTy::iterator iterator; - typedef FunctionMapTy::const_iterator const_iterator; - - /// \brief Returns the module the call graph corresponds to. - Module &getModule() const { return M; } - - inline iterator begin() { return FunctionMap.begin(); } - inline iterator end() { return FunctionMap.end(); } - inline const_iterator begin() const { return FunctionMap.begin(); } - inline const_iterator end() const { return FunctionMap.end(); } - - /// \brief Returns the call graph node for the provided function. - inline const CallGraphNode *operator[](const Function *F) const { - const_iterator I = FunctionMap.find(F); - assert(I != FunctionMap.end() && "Function not in callgraph!"); - return I->second.get(); - } - - /// \brief Returns the call graph node for the provided function. - inline CallGraphNode *operator[](const Function *F) { - const_iterator I = FunctionMap.find(F); - assert(I != FunctionMap.end() && "Function not in callgraph!"); - return I->second.get(); - } - - /// \brief Returns the \c CallGraphNode which is used to represent - /// undetermined calls into the callgraph. - CallGraphNode *getExternalCallingNode() const { return ExternalCallingNode; } - - CallGraphNode *getCallsExternalNode() const { - return CallsExternalNode.get(); - } - - //===--------------------------------------------------------------------- - // Functions to keep a call graph up to date with a function that has been - // modified. - // - - /// \brief Unlink the function from this module, returning it. - /// - /// Because this removes the function from the module, the call graph node is - /// destroyed. This is only valid if the function does not call any other - /// functions (ie, there are no edges in it's CGN). The easiest way to do - /// this is to dropAllReferences before calling this. - Function *removeFunctionFromModule(CallGraphNode *CGN); - - /// \brief Similar to operator[], but this will insert a new CallGraphNode for - /// \c F if one does not already exist. - CallGraphNode *getOrInsertFunction(const Function *F); -}; - -/// \brief A node in the call graph for a module. -/// -/// Typically represents a function in the call graph. There are also special -/// "null" nodes used to represent theoretical entries in the call graph. -class CallGraphNode { -public: - /// \brief A pair of the calling instruction (a call or invoke) - /// and the call graph node being called. - typedef std::pair CallRecord; - -public: - typedef std::vector CalledFunctionsVector; - - /// \brief Creates a node for the specified function. - inline CallGraphNode(Function *F) : F(F), NumReferences(0) {} - - ~CallGraphNode() { - assert(NumReferences == 0 && "Node deleted while references remain"); - } - - typedef std::vector::iterator iterator; - typedef std::vector::const_iterator const_iterator; - - /// \brief Returns the function that this call graph node represents. - Function *getFunction() const { return F; } - - inline iterator begin() { return CalledFunctions.begin(); } - inline iterator end() { return CalledFunctions.end(); } - inline const_iterator begin() const { return CalledFunctions.begin(); } - inline const_iterator end() const { return CalledFunctions.end(); } - inline bool empty() const { return CalledFunctions.empty(); } - inline unsigned size() const { return (unsigned)CalledFunctions.size(); } - - /// \brief Returns the number of other CallGraphNodes in this CallGraph that - /// reference this node in their callee list. - unsigned getNumReferences() const { return NumReferences; } - - /// \brief Returns the i'th called function. - CallGraphNode *operator[](unsigned i) const { - assert(i < CalledFunctions.size() && "Invalid index"); - return CalledFunctions[i].second; - } - - /// \brief Print out this call graph node. - void dump() const; - void print(raw_ostream &OS) const; - - //===--------------------------------------------------------------------- - // Methods to keep a call graph up to date with a function that has been - // modified - // - - /// \brief Removes all edges from this CallGraphNode to any functions it - /// calls. - void removeAllCalledFunctions() { - while (!CalledFunctions.empty()) { - CalledFunctions.back().second->DropRef(); - CalledFunctions.pop_back(); - } - } - - /// \brief Moves all the callee information from N to this node. - void stealCalledFunctionsFrom(CallGraphNode *N) { - assert(CalledFunctions.empty() && - "Cannot steal callsite information if I already have some"); - std::swap(CalledFunctions, N->CalledFunctions); - } - - /// \brief Adds a function to the list of functions called by this one. - void addCalledFunction(CallSite CS, CallGraphNode *M) { - assert(!CS.getInstruction() || !CS.getCalledFunction() || - !CS.getCalledFunction()->isIntrinsic() || - !Intrinsic::isLeaf(CS.getCalledFunction()->getIntrinsicID())); - CalledFunctions.emplace_back(CS.getInstruction(), M); - M->AddRef(); - } - - void removeCallEdge(iterator I) { - I->second->DropRef(); - *I = CalledFunctions.back(); - CalledFunctions.pop_back(); - } - - /// \brief Removes the edge in the node for the specified call site. - /// - /// Note that this method takes linear time, so it should be used sparingly. - void removeCallEdgeFor(CallSite CS); - - /// \brief Removes all call edges from this node to the specified callee - /// function. - /// - /// This takes more time to execute than removeCallEdgeTo, so it should not - /// be used unless necessary. - void removeAnyCallEdgeTo(CallGraphNode *Callee); - - /// \brief Removes one edge associated with a null callsite from this node to - /// the specified callee function. - void removeOneAbstractEdgeTo(CallGraphNode *Callee); - - /// \brief Replaces the edge in the node for the specified call site with a - /// new one. - /// - /// Note that this method takes linear time, so it should be used sparingly. - void replaceCallEdge(CallSite CS, CallSite NewCS, CallGraphNode *NewNode); - -private: - friend class CallGraph; - - AssertingVH F; - - std::vector CalledFunctions; - - /// \brief The number of times that this CallGraphNode occurs in the - /// CalledFunctions array of this or other CallGraphNodes. - unsigned NumReferences; - - CallGraphNode(const CallGraphNode &) = delete; - void operator=(const CallGraphNode &) = delete; - - void DropRef() { --NumReferences; } - void AddRef() { ++NumReferences; } - - /// \brief A special function that should only be used by the CallGraph class. - void allReferencesDropped() { NumReferences = 0; } -}; - -/// \brief An analysis pass to compute the \c CallGraph for a \c Module. -/// -/// This class implements the concept of an analysis pass used by the \c -/// ModuleAnalysisManager to run an analysis over a module and cache the -/// resulting data. -class CallGraphAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// \brief A formulaic typedef to inform clients of the result type. - typedef CallGraph Result; - - /// \brief Compute the \c CallGraph for the module \c M. - /// - /// The real work here is done in the \c CallGraph constructor. - CallGraph run(Module &M, ModuleAnalysisManager &) { return CallGraph(M); } -}; - -/// \brief Printer pass for the \c CallGraphAnalysis results. -class CallGraphPrinterPass : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit CallGraphPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Module &M, AnalysisManager &AM); -}; - -/// \brief The \c ModulePass which wraps up a \c CallGraph and the logic to -/// build it. -/// -/// This class exposes both the interface to the call graph container and the -/// module pass which runs over a module of IR and produces the call graph. The -/// call graph interface is entirelly a wrapper around a \c CallGraph object -/// which is stored internally for each module. -class CallGraphWrapperPass : public ModulePass { - std::unique_ptr G; - -public: - static char ID; // Class identification, replacement for typeinfo - - CallGraphWrapperPass(); - ~CallGraphWrapperPass() override; - - /// \brief The internal \c CallGraph around which the rest of this interface - /// is wrapped. - const CallGraph &getCallGraph() const { return *G; } - CallGraph &getCallGraph() { return *G; } - - typedef CallGraph::iterator iterator; - typedef CallGraph::const_iterator const_iterator; - - /// \brief Returns the module the call graph corresponds to. - Module &getModule() const { return G->getModule(); } - - inline iterator begin() { return G->begin(); } - inline iterator end() { return G->end(); } - inline const_iterator begin() const { return G->begin(); } - inline const_iterator end() const { return G->end(); } - - /// \brief Returns the call graph node for the provided function. - inline const CallGraphNode *operator[](const Function *F) const { - return (*G)[F]; - } - - /// \brief Returns the call graph node for the provided function. - inline CallGraphNode *operator[](const Function *F) { return (*G)[F]; } - - /// \brief Returns the \c CallGraphNode which is used to represent - /// undetermined calls into the callgraph. - CallGraphNode *getExternalCallingNode() const { - return G->getExternalCallingNode(); - } - - CallGraphNode *getCallsExternalNode() const { - return G->getCallsExternalNode(); - } - - //===--------------------------------------------------------------------- - // Functions to keep a call graph up to date with a function that has been - // modified. - // - - /// \brief Unlink the function from this module, returning it. - /// - /// Because this removes the function from the module, the call graph node is - /// destroyed. This is only valid if the function does not call any other - /// functions (ie, there are no edges in it's CGN). The easiest way to do - /// this is to dropAllReferences before calling this. - Function *removeFunctionFromModule(CallGraphNode *CGN) { - return G->removeFunctionFromModule(CGN); - } - - /// \brief Similar to operator[], but this will insert a new CallGraphNode for - /// \c F if one does not already exist. - CallGraphNode *getOrInsertFunction(const Function *F) { - return G->getOrInsertFunction(F); - } - - //===--------------------------------------------------------------------- - // Implementation of the ModulePass interface needed here. - // - - void getAnalysisUsage(AnalysisUsage &AU) const override; - bool runOnModule(Module &M) override; - void releaseMemory() override; - - void print(raw_ostream &o, const Module *) const override; - void dump() const; -}; - -//===----------------------------------------------------------------------===// -// GraphTraits specializations for call graphs so that they can be treated as -// graphs by the generic graph algorithms. -// - -// Provide graph traits for tranversing call graphs using standard graph -// traversals. -template <> struct GraphTraits { - typedef CallGraphNode NodeType; - typedef CallGraphNode *NodeRef; - - typedef CallGraphNode::CallRecord CGNPairTy; - typedef std::pointer_to_unary_function - CGNDerefFun; - - static NodeType *getEntryNode(CallGraphNode *CGN) { return CGN; } - - typedef mapped_iterator ChildIteratorType; - - static inline ChildIteratorType child_begin(NodeType *N) { - return map_iterator(N->begin(), CGNDerefFun(CGNDeref)); - } - static inline ChildIteratorType child_end(NodeType *N) { - return map_iterator(N->end(), CGNDerefFun(CGNDeref)); - } - - static CallGraphNode *CGNDeref(CGNPairTy P) { return P.second; } -}; - -template <> struct GraphTraits { - typedef const CallGraphNode NodeType; - typedef const CallGraphNode *NodeRef; - - typedef CallGraphNode::CallRecord CGNPairTy; - typedef std::pointer_to_unary_function - CGNDerefFun; - - static NodeType *getEntryNode(const CallGraphNode *CGN) { return CGN; } - - typedef mapped_iterator - ChildIteratorType; - - static inline ChildIteratorType child_begin(NodeType *N) { - return map_iterator(N->begin(), CGNDerefFun(CGNDeref)); - } - static inline ChildIteratorType child_end(NodeType *N) { - return map_iterator(N->end(), CGNDerefFun(CGNDeref)); - } - - static const CallGraphNode *CGNDeref(CGNPairTy P) { return P.second; } -}; - -template <> -struct GraphTraits : public GraphTraits { - static NodeType *getEntryNode(CallGraph *CGN) { - return CGN->getExternalCallingNode(); // Start at the external node! - } - typedef std::pair> - PairTy; - typedef std::pointer_to_unary_function - DerefFun; - - // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - typedef mapped_iterator nodes_iterator; - static nodes_iterator nodes_begin(CallGraph *CG) { - return map_iterator(CG->begin(), DerefFun(CGdereference)); - } - static nodes_iterator nodes_end(CallGraph *CG) { - return map_iterator(CG->end(), DerefFun(CGdereference)); - } - - static CallGraphNode &CGdereference(const PairTy &P) { return *P.second; } -}; - -template <> -struct GraphTraits : public GraphTraits< - const CallGraphNode *> { - static NodeType *getEntryNode(const CallGraph *CGN) { - return CGN->getExternalCallingNode(); // Start at the external node! - } - typedef std::pair> - PairTy; - typedef std::pointer_to_unary_function - DerefFun; - - // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - typedef mapped_iterator nodes_iterator; - static nodes_iterator nodes_begin(const CallGraph *CG) { - return map_iterator(CG->begin(), DerefFun(CGdereference)); - } - static nodes_iterator nodes_end(const CallGraph *CG) { - return map_iterator(CG->end(), DerefFun(CGdereference)); - } - - static const CallGraphNode &CGdereference(const PairTy &P) { - return *P.second; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/CallGraphSCCPass.h b/llvm/include/llvm/Analysis/CallGraphSCCPass.h deleted file mode 100644 index cb35b329..00000000 --- a/llvm/include/llvm/Analysis/CallGraphSCCPass.h +++ /dev/null @@ -1,134 +0,0 @@ -//===- CallGraphSCCPass.h - Pass that operates BU on call graph -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the CallGraphSCCPass class, which is used for passes which -// are implemented as bottom-up traversals on the call graph. Because there may -// be cycles in the call graph, passes of this type operate on the call-graph in -// SCC order: that is, they process function bottom-up, except for recursive -// functions, which they process all at once. -// -// These passes are inherently interprocedural, and are required to keep the -// call graph up-to-date if they do anything which could modify it. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CALLGRAPHSCCPASS_H -#define LLVM_ANALYSIS_CALLGRAPHSCCPASS_H - -#include "llvm/Analysis/CallGraph.h" -#include "llvm/Pass.h" -#include "llvm/PassSupport.h" - -namespace llvm { - -class CallGraphNode; -class CallGraph; -class PMStack; -class CallGraphSCC; - -class CallGraphSCCPass : public Pass { -public: - explicit CallGraphSCCPass(char &pid) : Pass(PT_CallGraphSCC, pid) {} - - /// createPrinterPass - Get a pass that prints the Module - /// corresponding to a CallGraph. - Pass *createPrinterPass(raw_ostream &O, - const std::string &Banner) const override; - - using llvm::Pass::doInitialization; - using llvm::Pass::doFinalization; - - /// doInitialization - This method is called before the SCC's of the program - /// has been processed, allowing the pass to do initialization as necessary. - virtual bool doInitialization(CallGraph &CG) { - return false; - } - - /// runOnSCC - This method should be implemented by the subclass to perform - /// whatever action is necessary for the specified SCC. Note that - /// non-recursive (or only self-recursive) functions will have an SCC size of - /// 1, where recursive portions of the call graph will have SCC size > 1. - /// - /// SCC passes that add or delete functions to the SCC are required to update - /// the SCC list, otherwise stale pointers may be dereferenced. - /// - virtual bool runOnSCC(CallGraphSCC &SCC) = 0; - - /// doFinalization - This method is called after the SCC's of the program has - /// been processed, allowing the pass to do final cleanup as necessary. - virtual bool doFinalization(CallGraph &CG) { - return false; - } - - /// Assign pass manager to manager this pass - void assignPassManager(PMStack &PMS, PassManagerType PMT) override; - - /// Return what kind of Pass Manager can manage this pass. - PassManagerType getPotentialPassManagerType() const override { - return PMT_CallGraphPassManager; - } - - /// getAnalysisUsage - For this class, we declare that we require and preserve - /// the call graph. If the derived class implements this method, it should - /// always explicitly call the implementation here. - void getAnalysisUsage(AnalysisUsage &Info) const override; - -protected: - /// Optional passes call this function to check whether the pass should be - /// skipped. This is the case when optimization bisect is over the limit. - bool skipSCC(CallGraphSCC &SCC) const; -}; - -/// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on. -class CallGraphSCC { - const CallGraph &CG; // The call graph for this SCC. - void *Context; // The CGPassManager object that is vending this. - std::vector Nodes; - -public: - CallGraphSCC(CallGraph &cg, void *context) : CG(cg), Context(context) {} - - void initialize(CallGraphNode *const *I, CallGraphNode *const *E) { - Nodes.assign(I, E); - } - - bool isSingular() const { return Nodes.size() == 1; } - unsigned size() const { return Nodes.size(); } - - /// ReplaceNode - This informs the SCC and the pass manager that the specified - /// Old node has been deleted, and New is to be used in its place. - void ReplaceNode(CallGraphNode *Old, CallGraphNode *New); - - typedef std::vector::const_iterator iterator; - iterator begin() const { return Nodes.begin(); } - iterator end() const { return Nodes.end(); } - - const CallGraph &getCallGraph() { return CG; } -}; - -void initializeDummyCGSCCPassPass(PassRegistry &); - -/// This pass is required by interprocedural register allocation. It forces -/// codegen to follow bottom up order on call graph. -class DummyCGSCCPass : public CallGraphSCCPass { -public: - static char ID; - DummyCGSCCPass() : CallGraphSCCPass(ID) { - PassRegistry &Registry = *PassRegistry::getPassRegistry(); - initializeDummyCGSCCPassPass(Registry); - }; - bool runOnSCC(CallGraphSCC &SCC) override { return false; } - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/CallPrinter.h b/llvm/include/llvm/Analysis/CallPrinter.h deleted file mode 100644 index 8b697d5a..00000000 --- a/llvm/include/llvm/Analysis/CallPrinter.h +++ /dev/null @@ -1,27 +0,0 @@ -//===-- CallPrinter.h - Call graph printer external interface ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines external functions that can be called to explicitly -// instantiate the call graph printer. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CALLPRINTER_H -#define LLVM_ANALYSIS_CALLPRINTER_H - -namespace llvm { - -class ModulePass; - -ModulePass *createCallGraphViewerPass(); -ModulePass *createCallGraphDOTPrinterPass(); - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/CaptureTracking.h b/llvm/include/llvm/Analysis/CaptureTracking.h deleted file mode 100644 index 8d2c095d..00000000 --- a/llvm/include/llvm/Analysis/CaptureTracking.h +++ /dev/null @@ -1,81 +0,0 @@ -//===----- llvm/Analysis/CaptureTracking.h - Pointer capture ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains routines that help determine which pointers are captured. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CAPTURETRACKING_H -#define LLVM_ANALYSIS_CAPTURETRACKING_H - -namespace llvm { - - class Value; - class Use; - class Instruction; - class DominatorTree; - class OrderedBasicBlock; - - /// PointerMayBeCaptured - Return true if this pointer value may be captured - /// by the enclosing function (which is required to exist). This routine can - /// be expensive, so consider caching the results. The boolean ReturnCaptures - /// specifies whether returning the value (or part of it) from the function - /// counts as capturing it or not. The boolean StoreCaptures specified - /// whether storing the value (or part of it) into memory anywhere - /// automatically counts as capturing it or not. - bool PointerMayBeCaptured(const Value *V, - bool ReturnCaptures, - bool StoreCaptures); - - /// PointerMayBeCapturedBefore - Return true if this pointer value may be - /// captured by the enclosing function (which is required to exist). If a - /// DominatorTree is provided, only captures which happen before the given - /// instruction are considered. This routine can be expensive, so consider - /// caching the results. The boolean ReturnCaptures specifies whether - /// returning the value (or part of it) from the function counts as capturing - /// it or not. The boolean StoreCaptures specified whether storing the value - /// (or part of it) into memory anywhere automatically counts as capturing it - /// or not. Captures by the provided instruction are considered if the - /// final parameter is true. An ordered basic block in \p OBB could be used - /// to speed up capture-tracker queries. - bool PointerMayBeCapturedBefore(const Value *V, bool ReturnCaptures, - bool StoreCaptures, const Instruction *I, - DominatorTree *DT, bool IncludeI = false, - OrderedBasicBlock *OBB = nullptr); - - /// This callback is used in conjunction with PointerMayBeCaptured. In - /// addition to the interface here, you'll need to provide your own getters - /// to see whether anything was captured. - struct CaptureTracker { - virtual ~CaptureTracker(); - - /// tooManyUses - The depth of traversal has breached a limit. There may be - /// capturing instructions that will not be passed into captured(). - virtual void tooManyUses() = 0; - - /// shouldExplore - This is the use of a value derived from the pointer. - /// To prune the search (ie., assume that none of its users could possibly - /// capture) return false. To search it, return true. - /// - /// U->getUser() is always an Instruction. - virtual bool shouldExplore(const Use *U); - - /// captured - Information about the pointer was captured by the user of - /// use U. Return true to stop the traversal or false to continue looking - /// for more capturing instructions. - virtual bool captured(const Use *U) = 0; - }; - - /// PointerMayBeCaptured - Visit the value and the values derived from it and - /// find values which appear to be capturing the pointer value. This feeds - /// results into and is controlled by the CaptureTracker object. - void PointerMayBeCaptured(const Value *V, CaptureTracker *Tracker); -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/CodeMetrics.h b/llvm/include/llvm/Analysis/CodeMetrics.h deleted file mode 100644 index f512aca5..00000000 --- a/llvm/include/llvm/Analysis/CodeMetrics.h +++ /dev/null @@ -1,105 +0,0 @@ -//===- CodeMetrics.h - Code cost measurements -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements various weight measurements for code, helping -// the Inliner and other passes decide whether to duplicate its contents. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CODEMETRICS_H -#define LLVM_ANALYSIS_CODEMETRICS_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/IR/CallSite.h" - -namespace llvm { -class AssumptionCache; -class BasicBlock; -class Loop; -class Function; -class Instruction; -class DataLayout; -class TargetTransformInfo; -class Value; - -/// \brief Check whether a call will lower to something small. -/// -/// This tests checks whether this callsite will lower to something -/// significantly cheaper than a traditional call, often a single -/// instruction. Note that if isInstructionFree(CS.getInstruction()) would -/// return true, so will this function. -bool callIsSmall(ImmutableCallSite CS); - -/// \brief Utility to calculate the size and a few similar metrics for a set -/// of basic blocks. -struct CodeMetrics { - /// \brief True if this function contains a call to setjmp or other functions - /// with attribute "returns twice" without having the attribute itself. - bool exposesReturnsTwice = false; - - /// \brief True if this function calls itself. - bool isRecursive = false; - - /// \brief True if this function cannot be duplicated. - /// - /// True if this function contains one or more indirect branches, or it contains - /// one or more 'noduplicate' instructions. - bool notDuplicatable = false; - - /// \brief True if this function contains a call to a convergent function. - bool convergent = false; - - /// \brief True if this function calls alloca (in the C sense). - bool usesDynamicAlloca = false; - - /// \brief Number of instructions in the analyzed blocks. - unsigned NumInsts = false; - - /// \brief Number of analyzed blocks. - unsigned NumBlocks = false; - - /// \brief Keeps track of basic block code size estimates. - DenseMap NumBBInsts; - - /// \brief Keep track of the number of calls to 'big' functions. - unsigned NumCalls = false; - - /// \brief The number of calls to internal functions with a single caller. - /// - /// These are likely targets for future inlining, likely exposed by - /// interleaved devirtualization. - unsigned NumInlineCandidates = 0; - - /// \brief How many instructions produce vector values. - /// - /// The inliner is more aggressive with inlining vector kernels. - unsigned NumVectorInsts = 0; - - /// \brief How many 'ret' instructions the blocks contain. - unsigned NumRets = 0; - - /// \brief Add information about a block to the current state. - void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI, - SmallPtrSetImpl &EphValues); - - /// \brief Collect a loop's ephemeral values (those used only by an assume - /// or similar intrinsics in the loop). - static void collectEphemeralValues(const Loop *L, AssumptionCache *AC, - SmallPtrSetImpl &EphValues); - - /// \brief Collect a functions's ephemeral values (those used only by an - /// assume or similar intrinsics in the function). - static void collectEphemeralValues(const Function *L, AssumptionCache *AC, - SmallPtrSetImpl &EphValues); -}; - -} - -#endif diff --git a/llvm/include/llvm/Analysis/ConstantFolding.h b/llvm/include/llvm/Analysis/ConstantFolding.h deleted file mode 100644 index b1504004..00000000 --- a/llvm/include/llvm/Analysis/ConstantFolding.h +++ /dev/null @@ -1,142 +0,0 @@ -//===-- ConstantFolding.h - Fold instructions into constants ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares routines for folding instructions into constants when all -// operands are constants, for example "sub i32 1, 0" -> "1". -// -// Also, to supplement the basic VMCore ConstantExpr simplifications, -// this file declares some additional folding routines that can make use of -// DataLayout information. These functions cannot go in VMCore due to library -// dependency issues. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_CONSTANTFOLDING_H -#define LLVM_ANALYSIS_CONSTANTFOLDING_H - -namespace llvm { -class APInt; -template class ArrayRef; -class Constant; -class ConstantExpr; -class DataLayout; -class Function; -class GlobalValue; -class Instruction; -class TargetLibraryInfo; -class Type; - -/// If this constant is a constant offset from a global, return the global and -/// the constant. Because of constantexprs, this function is recursive. -bool IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV, APInt &Offset, - const DataLayout &DL); - -/// ConstantFoldInstruction - Try to constant fold the specified instruction. -/// If successful, the constant result is returned, if not, null is returned. -/// Note that this fails if not all of the operands are constant. Otherwise, -/// this function can only fail when attempting to fold instructions like loads -/// and stores, which have no constant expression form. -Constant *ConstantFoldInstruction(Instruction *I, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr); - -/// ConstantFoldConstantExpression - Attempt to fold the constant expression -/// using the specified DataLayout. If successful, the constant result is -/// result is returned, if not, null is returned. -Constant * -ConstantFoldConstantExpression(const ConstantExpr *CE, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr); - -/// ConstantFoldInstOperands - Attempt to constant fold an instruction with the -/// specified operands. If successful, the constant result is returned, if not, -/// null is returned. Note that this function can fail when attempting to -/// fold instructions like loads and stores, which have no constant expression -/// form. -/// -Constant *ConstantFoldInstOperands(Instruction *I, ArrayRef Ops, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr); - -/// ConstantFoldInstOperands - Attempt to constant fold an instruction with the -/// specified operands. If successful, the constant result is returned, if not, -/// null is returned. Note that this function can fail when attempting to -/// fold instructions like loads and stores, which have no constant expression -/// form. -/// -/// This function doesn't work for compares (use ConstantFoldCompareInstOperands -/// for this) and GEPs. -Constant *ConstantFoldInstOperands(unsigned Opcode, Type *DestTy, - ArrayRef Ops, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr); - -/// ConstantFoldCompareInstOperands - Attempt to constant fold a compare -/// instruction (icmp/fcmp) with the specified operands. If it fails, it -/// returns a constant expression of the specified operands. -/// -Constant * -ConstantFoldCompareInstOperands(unsigned Predicate, Constant *LHS, - Constant *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr); - -/// \brief Attempt to constant fold a binary operation with the specified -/// operands. If it fails, it returns a constant expression of the specified -/// operands. -Constant *ConstantFoldBinaryOpOperands(unsigned Opcode, Constant *LHS, - Constant *RHS, const DataLayout &DL); - -/// \brief Attempt to constant fold a cast with the specified operand. If it -/// fails, it returns a constant expression of the specified operand. -Constant *ConstantFoldCastOperand(unsigned Opcode, Constant *C, Type *DestTy, - const DataLayout &DL); - -/// ConstantFoldInsertValueInstruction - Attempt to constant fold an insertvalue -/// instruction with the specified operands and indices. The constant result is -/// returned if successful; if not, null is returned. -Constant *ConstantFoldInsertValueInstruction(Constant *Agg, Constant *Val, - ArrayRef Idxs); - -/// \brief Attempt to constant fold an extractvalue instruction with the -/// specified operands and indices. The constant result is returned if -/// successful; if not, null is returned. -Constant *ConstantFoldExtractValueInstruction(Constant *Agg, - ArrayRef Idxs); - -/// \brief Attempt to constant fold an extractelement instruction with the -/// specified operands and indices. The constant result is returned if -/// successful; if not, null is returned. -Constant *ConstantFoldExtractElementInstruction(Constant *Val, Constant *Idx); - -/// ConstantFoldLoadFromConstPtr - Return the value that a load from C would -/// produce if it is constant and determinable. If this is not determinable, -/// return null. -Constant *ConstantFoldLoadFromConstPtr(Constant *C, Type *Ty, const DataLayout &DL); - -/// ConstantFoldLoadThroughGEPConstantExpr - Given a constant and a -/// getelementptr constantexpr, return the constant value being addressed by the -/// constant expression, or null if something is funny and we can't decide. -Constant *ConstantFoldLoadThroughGEPConstantExpr(Constant *C, ConstantExpr *CE); - -/// ConstantFoldLoadThroughGEPIndices - Given a constant and getelementptr -/// indices (with an *implied* zero pointer index that is not in the list), -/// return the constant value being addressed by a virtual load, or null if -/// something is funny and we can't decide. -Constant *ConstantFoldLoadThroughGEPIndices(Constant *C, - ArrayRef Indices); - -/// canConstantFoldCallTo - Return true if its even possible to fold a call to -/// the specified function. -bool canConstantFoldCallTo(const Function *F); - -/// ConstantFoldCall - Attempt to constant fold a call to the specified function -/// with the specified arguments, returning null if unsuccessful. -Constant *ConstantFoldCall(Function *F, ArrayRef Operands, - const TargetLibraryInfo *TLI = nullptr); -} - -#endif diff --git a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h deleted file mode 100644 index ca50ee2f..00000000 --- a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h +++ /dev/null @@ -1,189 +0,0 @@ -//===-- DOTGraphTraitsPass.h - Print/View dotty graphs-----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Templates to create dotty viewer and printer passes for GraphTraits graphs. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_DOTGRAPHTRAITSPASS_H -#define LLVM_ANALYSIS_DOTGRAPHTRAITSPASS_H - -#include "llvm/Analysis/CFGPrinter.h" -#include "llvm/Pass.h" -#include "llvm/Support/FileSystem.h" - -namespace llvm { - -/// \brief Default traits class for extracting a graph from an analysis pass. -/// -/// This assumes that 'GraphT' is 'AnalysisT *' and so just passes it through. -template -struct DefaultAnalysisGraphTraits { - static GraphT getGraph(AnalysisT *A) { return A; } -}; - -template < - typename AnalysisT, bool IsSimple, typename GraphT = AnalysisT *, - typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits > -class DOTGraphTraitsViewer : public FunctionPass { -public: - DOTGraphTraitsViewer(StringRef GraphName, char &ID) - : FunctionPass(ID), Name(GraphName) {} - - /// @brief Return true if this function should be processed. - /// - /// An implementation of this class my override this function to indicate that - /// only certain functions should be viewed. - /// - /// @param Analysis The current analysis result for this function. - virtual bool processFunction(Function &F, AnalysisT &Analysis) { - return true; - } - - bool runOnFunction(Function &F) override { - auto &Analysis = getAnalysis(); - - if (!processFunction(F, Analysis)) - return false; - - GraphT Graph = AnalysisGraphTraitsT::getGraph(&Analysis); - std::string GraphName = DOTGraphTraits::getGraphName(Graph); - std::string Title = GraphName + " for '" + F.getName().str() + "' function"; - - ViewGraph(Graph, Name, IsSimple, Title); - - return false; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - AU.addRequired(); - } - -private: - std::string Name; -}; - -template < - typename AnalysisT, bool IsSimple, typename GraphT = AnalysisT *, - typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits > -class DOTGraphTraitsPrinter : public FunctionPass { -public: - DOTGraphTraitsPrinter(StringRef GraphName, char &ID) - : FunctionPass(ID), Name(GraphName) {} - - /// @brief Return true if this function should be processed. - /// - /// An implementation of this class my override this function to indicate that - /// only certain functions should be printed. - /// - /// @param Analysis The current analysis result for this function. - virtual bool processFunction(Function &F, AnalysisT &Analysis) { - return true; - } - - bool runOnFunction(Function &F) override { - auto &Analysis = getAnalysis(); - - if (!processFunction(F, Analysis)) - return false; - - GraphT Graph = AnalysisGraphTraitsT::getGraph(&Analysis); - std::string Filename = Name + "." + F.getName().str() + ".dot"; - std::error_code EC; - - errs() << "Writing '" << Filename << "'..."; - - raw_fd_ostream File(Filename, EC, sys::fs::F_Text); - std::string GraphName = DOTGraphTraits::getGraphName(Graph); - std::string Title = GraphName + " for '" + F.getName().str() + "' function"; - - if (!EC) - WriteGraph(File, Graph, IsSimple, Title); - else - errs() << " error opening file for writing!"; - errs() << "\n"; - - return false; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - AU.addRequired(); - } - -private: - std::string Name; -}; - -template < - typename AnalysisT, bool IsSimple, typename GraphT = AnalysisT *, - typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits > -class DOTGraphTraitsModuleViewer : public ModulePass { -public: - DOTGraphTraitsModuleViewer(StringRef GraphName, char &ID) - : ModulePass(ID), Name(GraphName) {} - - bool runOnModule(Module &M) override { - GraphT Graph = AnalysisGraphTraitsT::getGraph(&getAnalysis()); - std::string Title = DOTGraphTraits::getGraphName(Graph); - - ViewGraph(Graph, Name, IsSimple, Title); - - return false; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - AU.addRequired(); - } - -private: - std::string Name; -}; - -template < - typename AnalysisT, bool IsSimple, typename GraphT = AnalysisT *, - typename AnalysisGraphTraitsT = DefaultAnalysisGraphTraits > -class DOTGraphTraitsModulePrinter : public ModulePass { -public: - DOTGraphTraitsModulePrinter(StringRef GraphName, char &ID) - : ModulePass(ID), Name(GraphName) {} - - bool runOnModule(Module &M) override { - GraphT Graph = AnalysisGraphTraitsT::getGraph(&getAnalysis()); - std::string Filename = Name + ".dot"; - std::error_code EC; - - errs() << "Writing '" << Filename << "'..."; - - raw_fd_ostream File(Filename, EC, sys::fs::F_Text); - std::string Title = DOTGraphTraits::getGraphName(Graph); - - if (!EC) - WriteGraph(File, Graph, IsSimple, Title); - else - errs() << " error opening file for writing!"; - errs() << "\n"; - - return false; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - AU.addRequired(); - } - -private: - std::string Name; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/DemandedBits.h b/llvm/include/llvm/Analysis/DemandedBits.h deleted file mode 100644 index fafd5d00..00000000 --- a/llvm/include/llvm/Analysis/DemandedBits.h +++ /dev/null @@ -1,117 +0,0 @@ -//===-- llvm/Analysis/DemandedBits.h - Determine demanded bits --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This pass implements a demanded bits analysis. A demanded bit is one that -// contributes to a result; bits that are not demanded can be either zero or -// one without affecting control or data flow. For example in this sequence: -// -// %1 = add i32 %x, %y -// %2 = trunc i32 %1 to i16 -// -// Only the lowest 16 bits of %1 are demanded; the rest are removed by the -// trunc. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_DEMANDED_BITS_H -#define LLVM_ANALYSIS_DEMANDED_BITS_H - -#include "llvm/Pass.h" -#include "llvm/ADT/APInt.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/IR/PassManager.h" - -namespace llvm { - -class FunctionPass; -class Function; -class Instruction; -class DominatorTree; -class AssumptionCache; - -class DemandedBits { -public: - DemandedBits(Function &F, AssumptionCache &AC, DominatorTree &DT) : - F(F), AC(AC), DT(DT), Analyzed(false) {} - - /// Return the bits demanded from instruction I. - APInt getDemandedBits(Instruction *I); - - /// Return true if, during analysis, I could not be reached. - bool isInstructionDead(Instruction *I); - - void print(raw_ostream &OS); - -private: - Function &F; - AssumptionCache &AC; - DominatorTree &DT; - - void performAnalysis(); - void determineLiveOperandBits(const Instruction *UserI, - const Instruction *I, unsigned OperandNo, - const APInt &AOut, APInt &AB, - APInt &KnownZero, APInt &KnownOne, - APInt &KnownZero2, APInt &KnownOne2); - - bool Analyzed; - - // The set of visited instructions (non-integer-typed only). - SmallPtrSet Visited; - DenseMap AliveBits; -}; - -class DemandedBitsWrapperPass : public FunctionPass { -private: - mutable Optional DB; -public: - static char ID; // Pass identification, replacement for typeid - DemandedBitsWrapperPass(); - - bool runOnFunction(Function &F) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; - - /// Clean up memory in between runs - void releaseMemory() override; - - DemandedBits &getDemandedBits() { return *DB; } - - void print(raw_ostream &OS, const Module *M) const override; -}; - -/// An analysis that produces \c DemandedBits for a function. -class DemandedBitsAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// \brief Provide the result typedef for this analysis pass. - typedef DemandedBits Result; - - /// \brief Run the analysis pass over a function and produce demanded bits - /// information. - DemandedBits run(Function &F, AnalysisManager &AM); -}; - -/// \brief Printer pass for DemandedBits -class DemandedBitsPrinterPass : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit DemandedBitsPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -/// Create a demanded bits analysis pass. -FunctionPass *createDemandedBitsWrapperPass(); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/DependenceAnalysis.h b/llvm/include/llvm/Analysis/DependenceAnalysis.h deleted file mode 100644 index 32dd367a..00000000 --- a/llvm/include/llvm/Analysis/DependenceAnalysis.h +++ /dev/null @@ -1,963 +0,0 @@ -//===-- llvm/Analysis/DependenceAnalysis.h -------------------- -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// DependenceAnalysis is an LLVM pass that analyses dependences between memory -// accesses. Currently, it is an implementation of the approach described in -// -// Practical Dependence Testing -// Goff, Kennedy, Tseng -// PLDI 1991 -// -// There's a single entry point that analyzes the dependence between a pair -// of memory references in a function, returning either NULL, for no dependence, -// or a more-or-less detailed description of the dependence between them. -// -// This pass exists to support the DependenceGraph pass. There are two separate -// passes because there's a useful separation of concerns. A dependence exists -// if two conditions are met: -// -// 1) Two instructions reference the same memory location, and -// 2) There is a flow of control leading from one instruction to the other. -// -// DependenceAnalysis attacks the first condition; DependenceGraph will attack -// the second (it's not yet ready). -// -// Please note that this is work in progress and the interface is subject to -// change. -// -// Plausible changes: -// Return a set of more precise dependences instead of just one dependence -// summarizing all. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_DEPENDENCEANALYSIS_H -#define LLVM_ANALYSIS_DEPENDENCEANALYSIS_H - -#include "llvm/ADT/SmallBitVector.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/Instructions.h" -#include "llvm/Pass.h" - -namespace llvm { -template class ArrayRef; - class Loop; - class LoopInfo; - class ScalarEvolution; - class SCEV; - class SCEVConstant; - class raw_ostream; - - /// Dependence - This class represents a dependence between two memory - /// memory references in a function. It contains minimal information and - /// is used in the very common situation where the compiler is unable to - /// determine anything beyond the existence of a dependence; that is, it - /// represents a confused dependence (see also FullDependence). In most - /// cases (for output, flow, and anti dependences), the dependence implies - /// an ordering, where the source must precede the destination; in contrast, - /// input dependences are unordered. - /// - /// When a dependence graph is built, each Dependence will be a member of - /// the set of predecessor edges for its destination instruction and a set - /// if successor edges for its source instruction. These sets are represented - /// as singly-linked lists, with the "next" fields stored in the dependence - /// itelf. - class Dependence { - protected: - Dependence(const Dependence &) = default; - - // FIXME: When we move to MSVC 2015 as the base compiler for Visual Studio - // support, uncomment this line to allow a defaulted move constructor for - // Dependence. Currently, FullDependence relies on the copy constructor, but - // that is acceptable given the triviality of the class. - // Dependence(Dependence &&) = default; - - public: - Dependence(Instruction *Source, - Instruction *Destination) : - Src(Source), - Dst(Destination), - NextPredecessor(nullptr), - NextSuccessor(nullptr) {} - virtual ~Dependence() {} - - /// Dependence::DVEntry - Each level in the distance/direction vector - /// has a direction (or perhaps a union of several directions), and - /// perhaps a distance. - struct DVEntry { - enum { NONE = 0, - LT = 1, - EQ = 2, - LE = 3, - GT = 4, - NE = 5, - GE = 6, - ALL = 7 }; - unsigned char Direction : 3; // Init to ALL, then refine. - bool Scalar : 1; // Init to true. - bool PeelFirst : 1; // Peeling the first iteration will break dependence. - bool PeelLast : 1; // Peeling the last iteration will break the dependence. - bool Splitable : 1; // Splitting the loop will break dependence. - const SCEV *Distance; // NULL implies no distance available. - DVEntry() : Direction(ALL), Scalar(true), PeelFirst(false), - PeelLast(false), Splitable(false), Distance(nullptr) { } - }; - - /// getSrc - Returns the source instruction for this dependence. - /// - Instruction *getSrc() const { return Src; } - - /// getDst - Returns the destination instruction for this dependence. - /// - Instruction *getDst() const { return Dst; } - - /// isInput - Returns true if this is an input dependence. - /// - bool isInput() const; - - /// isOutput - Returns true if this is an output dependence. - /// - bool isOutput() const; - - /// isFlow - Returns true if this is a flow (aka true) dependence. - /// - bool isFlow() const; - - /// isAnti - Returns true if this is an anti dependence. - /// - bool isAnti() const; - - /// isOrdered - Returns true if dependence is Output, Flow, or Anti - /// - bool isOrdered() const { return isOutput() || isFlow() || isAnti(); } - - /// isUnordered - Returns true if dependence is Input - /// - bool isUnordered() const { return isInput(); } - - /// isLoopIndependent - Returns true if this is a loop-independent - /// dependence. - virtual bool isLoopIndependent() const { return true; } - - /// isConfused - Returns true if this dependence is confused - /// (the compiler understands nothing and makes worst-case - /// assumptions). - virtual bool isConfused() const { return true; } - - /// isConsistent - Returns true if this dependence is consistent - /// (occurs every time the source and destination are executed). - virtual bool isConsistent() const { return false; } - - /// getLevels - Returns the number of common loops surrounding the - /// source and destination of the dependence. - virtual unsigned getLevels() const { return 0; } - - /// getDirection - Returns the direction associated with a particular - /// level. - virtual unsigned getDirection(unsigned Level) const { return DVEntry::ALL; } - - /// getDistance - Returns the distance (or NULL) associated with a - /// particular level. - virtual const SCEV *getDistance(unsigned Level) const { return nullptr; } - - /// isPeelFirst - Returns true if peeling the first iteration from - /// this loop will break this dependence. - virtual bool isPeelFirst(unsigned Level) const { return false; } - - /// isPeelLast - Returns true if peeling the last iteration from - /// this loop will break this dependence. - virtual bool isPeelLast(unsigned Level) const { return false; } - - /// isSplitable - Returns true if splitting this loop will break - /// the dependence. - virtual bool isSplitable(unsigned Level) const { return false; } - - /// isScalar - Returns true if a particular level is scalar; that is, - /// if no subscript in the source or destination mention the induction - /// variable associated with the loop at this level. - virtual bool isScalar(unsigned Level) const; - - /// getNextPredecessor - Returns the value of the NextPredecessor - /// field. - const Dependence *getNextPredecessor() const { return NextPredecessor; } - - /// getNextSuccessor - Returns the value of the NextSuccessor - /// field. - const Dependence *getNextSuccessor() const { return NextSuccessor; } - - /// setNextPredecessor - Sets the value of the NextPredecessor - /// field. - void setNextPredecessor(const Dependence *pred) { NextPredecessor = pred; } - - /// setNextSuccessor - Sets the value of the NextSuccessor - /// field. - void setNextSuccessor(const Dependence *succ) { NextSuccessor = succ; } - - /// dump - For debugging purposes, dumps a dependence to OS. - /// - void dump(raw_ostream &OS) const; - - private: - Instruction *Src, *Dst; - const Dependence *NextPredecessor, *NextSuccessor; - friend class DependenceInfo; - }; - - /// FullDependence - This class represents a dependence between two memory - /// references in a function. It contains detailed information about the - /// dependence (direction vectors, etc.) and is used when the compiler is - /// able to accurately analyze the interaction of the references; that is, - /// it is not a confused dependence (see Dependence). In most cases - /// (for output, flow, and anti dependences), the dependence implies an - /// ordering, where the source must precede the destination; in contrast, - /// input dependences are unordered. - class FullDependence final : public Dependence { - public: - FullDependence(Instruction *Src, Instruction *Dst, bool LoopIndependent, - unsigned Levels); - - FullDependence(FullDependence &&RHS) - : Dependence(std::move(RHS)), Levels(RHS.Levels), - LoopIndependent(RHS.LoopIndependent), Consistent(RHS.Consistent), - DV(std::move(RHS.DV)) {} - - /// isLoopIndependent - Returns true if this is a loop-independent - /// dependence. - bool isLoopIndependent() const override { return LoopIndependent; } - - /// isConfused - Returns true if this dependence is confused - /// (the compiler understands nothing and makes worst-case - /// assumptions). - bool isConfused() const override { return false; } - - /// isConsistent - Returns true if this dependence is consistent - /// (occurs every time the source and destination are executed). - bool isConsistent() const override { return Consistent; } - - /// getLevels - Returns the number of common loops surrounding the - /// source and destination of the dependence. - unsigned getLevels() const override { return Levels; } - - /// getDirection - Returns the direction associated with a particular - /// level. - unsigned getDirection(unsigned Level) const override; - - /// getDistance - Returns the distance (or NULL) associated with a - /// particular level. - const SCEV *getDistance(unsigned Level) const override; - - /// isPeelFirst - Returns true if peeling the first iteration from - /// this loop will break this dependence. - bool isPeelFirst(unsigned Level) const override; - - /// isPeelLast - Returns true if peeling the last iteration from - /// this loop will break this dependence. - bool isPeelLast(unsigned Level) const override; - - /// isSplitable - Returns true if splitting the loop will break - /// the dependence. - bool isSplitable(unsigned Level) const override; - - /// isScalar - Returns true if a particular level is scalar; that is, - /// if no subscript in the source or destination mention the induction - /// variable associated with the loop at this level. - bool isScalar(unsigned Level) const override; - - private: - unsigned short Levels; - bool LoopIndependent; - bool Consistent; // Init to true, then refine. - std::unique_ptr DV; - friend class DependenceInfo; - }; - - /// DependenceInfo - This class is the main dependence-analysis driver. - /// - class DependenceInfo { - public: - DependenceInfo(Function *F, AliasAnalysis *AA, ScalarEvolution *SE, - LoopInfo *LI) - : AA(AA), SE(SE), LI(LI), F(F) {} - - /// depends - Tests for a dependence between the Src and Dst instructions. - /// Returns NULL if no dependence; otherwise, returns a Dependence (or a - /// FullDependence) with as much information as can be gleaned. - /// The flag PossiblyLoopIndependent should be set by the caller - /// if it appears that control flow can reach from Src to Dst - /// without traversing a loop back edge. - std::unique_ptr depends(Instruction *Src, - Instruction *Dst, - bool PossiblyLoopIndependent); - - /// getSplitIteration - Give a dependence that's splittable at some - /// particular level, return the iteration that should be used to split - /// the loop. - /// - /// Generally, the dependence analyzer will be used to build - /// a dependence graph for a function (basically a map from instructions - /// to dependences). Looking for cycles in the graph shows us loops - /// that cannot be trivially vectorized/parallelized. - /// - /// We can try to improve the situation by examining all the dependences - /// that make up the cycle, looking for ones we can break. - /// Sometimes, peeling the first or last iteration of a loop will break - /// dependences, and there are flags for those possibilities. - /// Sometimes, splitting a loop at some other iteration will do the trick, - /// and we've got a flag for that case. Rather than waste the space to - /// record the exact iteration (since we rarely know), we provide - /// a method that calculates the iteration. It's a drag that it must work - /// from scratch, but wonderful in that it's possible. - /// - /// Here's an example: - /// - /// for (i = 0; i < 10; i++) - /// A[i] = ... - /// ... = A[11 - i] - /// - /// There's a loop-carried flow dependence from the store to the load, - /// found by the weak-crossing SIV test. The dependence will have a flag, - /// indicating that the dependence can be broken by splitting the loop. - /// Calling getSplitIteration will return 5. - /// Splitting the loop breaks the dependence, like so: - /// - /// for (i = 0; i <= 5; i++) - /// A[i] = ... - /// ... = A[11 - i] - /// for (i = 6; i < 10; i++) - /// A[i] = ... - /// ... = A[11 - i] - /// - /// breaks the dependence and allows us to vectorize/parallelize - /// both loops. - const SCEV *getSplitIteration(const Dependence &Dep, unsigned Level); - - Function *getFunction() const { return F; } - - private: - AliasAnalysis *AA; - ScalarEvolution *SE; - LoopInfo *LI; - Function *F; - - /// Subscript - This private struct represents a pair of subscripts from - /// a pair of potentially multi-dimensional array references. We use a - /// vector of them to guide subscript partitioning. - struct Subscript { - const SCEV *Src; - const SCEV *Dst; - enum ClassificationKind { ZIV, SIV, RDIV, MIV, NonLinear } Classification; - SmallBitVector Loops; - SmallBitVector GroupLoops; - SmallBitVector Group; - }; - - struct CoefficientInfo { - const SCEV *Coeff; - const SCEV *PosPart; - const SCEV *NegPart; - const SCEV *Iterations; - }; - - struct BoundInfo { - const SCEV *Iterations; - const SCEV *Upper[8]; - const SCEV *Lower[8]; - unsigned char Direction; - unsigned char DirSet; - }; - - /// Constraint - This private class represents a constraint, as defined - /// in the paper - /// - /// Practical Dependence Testing - /// Goff, Kennedy, Tseng - /// PLDI 1991 - /// - /// There are 5 kinds of constraint, in a hierarchy. - /// 1) Any - indicates no constraint, any dependence is possible. - /// 2) Line - A line ax + by = c, where a, b, and c are parameters, - /// representing the dependence equation. - /// 3) Distance - The value d of the dependence distance; - /// 4) Point - A point representing the dependence from - /// iteration x to iteration y. - /// 5) Empty - No dependence is possible. - class Constraint { - private: - enum ConstraintKind { Empty, Point, Distance, Line, Any } Kind; - ScalarEvolution *SE; - const SCEV *A; - const SCEV *B; - const SCEV *C; - const Loop *AssociatedLoop; - - public: - /// isEmpty - Return true if the constraint is of kind Empty. - bool isEmpty() const { return Kind == Empty; } - - /// isPoint - Return true if the constraint is of kind Point. - bool isPoint() const { return Kind == Point; } - - /// isDistance - Return true if the constraint is of kind Distance. - bool isDistance() const { return Kind == Distance; } - - /// isLine - Return true if the constraint is of kind Line. - /// Since Distance's can also be represented as Lines, we also return - /// true if the constraint is of kind Distance. - bool isLine() const { return Kind == Line || Kind == Distance; } - - /// isAny - Return true if the constraint is of kind Any; - bool isAny() const { return Kind == Any; } - - /// getX - If constraint is a point , returns X. - /// Otherwise assert. - const SCEV *getX() const; - - /// getY - If constraint is a point , returns Y. - /// Otherwise assert. - const SCEV *getY() const; - - /// getA - If constraint is a line AX + BY = C, returns A. - /// Otherwise assert. - const SCEV *getA() const; - - /// getB - If constraint is a line AX + BY = C, returns B. - /// Otherwise assert. - const SCEV *getB() const; - - /// getC - If constraint is a line AX + BY = C, returns C. - /// Otherwise assert. - const SCEV *getC() const; - - /// getD - If constraint is a distance, returns D. - /// Otherwise assert. - const SCEV *getD() const; - - /// getAssociatedLoop - Returns the loop associated with this constraint. - const Loop *getAssociatedLoop() const; - - /// setPoint - Change a constraint to Point. - void setPoint(const SCEV *X, const SCEV *Y, const Loop *CurrentLoop); - - /// setLine - Change a constraint to Line. - void setLine(const SCEV *A, const SCEV *B, - const SCEV *C, const Loop *CurrentLoop); - - /// setDistance - Change a constraint to Distance. - void setDistance(const SCEV *D, const Loop *CurrentLoop); - - /// setEmpty - Change a constraint to Empty. - void setEmpty(); - - /// setAny - Change a constraint to Any. - void setAny(ScalarEvolution *SE); - - /// dump - For debugging purposes. Dumps the constraint - /// out to OS. - void dump(raw_ostream &OS) const; - }; - - /// establishNestingLevels - Examines the loop nesting of the Src and Dst - /// instructions and establishes their shared loops. Sets the variables - /// CommonLevels, SrcLevels, and MaxLevels. - /// The source and destination instructions needn't be contained in the same - /// loop. The routine establishNestingLevels finds the level of most deeply - /// nested loop that contains them both, CommonLevels. An instruction that's - /// not contained in a loop is at level = 0. MaxLevels is equal to the level - /// of the source plus the level of the destination, minus CommonLevels. - /// This lets us allocate vectors MaxLevels in length, with room for every - /// distinct loop referenced in both the source and destination subscripts. - /// The variable SrcLevels is the nesting depth of the source instruction. - /// It's used to help calculate distinct loops referenced by the destination. - /// Here's the map from loops to levels: - /// 0 - unused - /// 1 - outermost common loop - /// ... - other common loops - /// CommonLevels - innermost common loop - /// ... - loops containing Src but not Dst - /// SrcLevels - innermost loop containing Src but not Dst - /// ... - loops containing Dst but not Src - /// MaxLevels - innermost loop containing Dst but not Src - /// Consider the follow code fragment: - /// for (a = ...) { - /// for (b = ...) { - /// for (c = ...) { - /// for (d = ...) { - /// A[] = ...; - /// } - /// } - /// for (e = ...) { - /// for (f = ...) { - /// for (g = ...) { - /// ... = A[]; - /// } - /// } - /// } - /// } - /// } - /// If we're looking at the possibility of a dependence between the store - /// to A (the Src) and the load from A (the Dst), we'll note that they - /// have 2 loops in common, so CommonLevels will equal 2 and the direction - /// vector for Result will have 2 entries. SrcLevels = 4 and MaxLevels = 7. - /// A map from loop names to level indices would look like - /// a - 1 - /// b - 2 = CommonLevels - /// c - 3 - /// d - 4 = SrcLevels - /// e - 5 - /// f - 6 - /// g - 7 = MaxLevels - void establishNestingLevels(const Instruction *Src, - const Instruction *Dst); - - unsigned CommonLevels, SrcLevels, MaxLevels; - - /// mapSrcLoop - Given one of the loops containing the source, return - /// its level index in our numbering scheme. - unsigned mapSrcLoop(const Loop *SrcLoop) const; - - /// mapDstLoop - Given one of the loops containing the destination, - /// return its level index in our numbering scheme. - unsigned mapDstLoop(const Loop *DstLoop) const; - - /// isLoopInvariant - Returns true if Expression is loop invariant - /// in LoopNest. - bool isLoopInvariant(const SCEV *Expression, const Loop *LoopNest) const; - - /// Makes sure all subscript pairs share the same integer type by - /// sign-extending as necessary. - /// Sign-extending a subscript is safe because getelementptr assumes the - /// array subscripts are signed. - void unifySubscriptType(ArrayRef Pairs); - - /// removeMatchingExtensions - Examines a subscript pair. - /// If the source and destination are identically sign (or zero) - /// extended, it strips off the extension in an effort to - /// simplify the actual analysis. - void removeMatchingExtensions(Subscript *Pair); - - /// collectCommonLoops - Finds the set of loops from the LoopNest that - /// have a level <= CommonLevels and are referred to by the SCEV Expression. - void collectCommonLoops(const SCEV *Expression, - const Loop *LoopNest, - SmallBitVector &Loops) const; - - /// checkSrcSubscript - Examines the SCEV Src, returning true iff it's - /// linear. Collect the set of loops mentioned by Src. - bool checkSrcSubscript(const SCEV *Src, - const Loop *LoopNest, - SmallBitVector &Loops); - - /// checkDstSubscript - Examines the SCEV Dst, returning true iff it's - /// linear. Collect the set of loops mentioned by Dst. - bool checkDstSubscript(const SCEV *Dst, - const Loop *LoopNest, - SmallBitVector &Loops); - - /// isKnownPredicate - Compare X and Y using the predicate Pred. - /// Basically a wrapper for SCEV::isKnownPredicate, - /// but tries harder, especially in the presence of sign and zero - /// extensions and symbolics. - bool isKnownPredicate(ICmpInst::Predicate Pred, - const SCEV *X, - const SCEV *Y) const; - - /// collectUpperBound - All subscripts are the same type (on my machine, - /// an i64). The loop bound may be a smaller type. collectUpperBound - /// find the bound, if available, and zero extends it to the Type T. - /// (I zero extend since the bound should always be >= 0.) - /// If no upper bound is available, return NULL. - const SCEV *collectUpperBound(const Loop *l, Type *T) const; - - /// collectConstantUpperBound - Calls collectUpperBound(), then - /// attempts to cast it to SCEVConstant. If the cast fails, - /// returns NULL. - const SCEVConstant *collectConstantUpperBound(const Loop *l, Type *T) const; - - /// classifyPair - Examines the subscript pair (the Src and Dst SCEVs) - /// and classifies it as either ZIV, SIV, RDIV, MIV, or Nonlinear. - /// Collects the associated loops in a set. - Subscript::ClassificationKind classifyPair(const SCEV *Src, - const Loop *SrcLoopNest, - const SCEV *Dst, - const Loop *DstLoopNest, - SmallBitVector &Loops); - - /// testZIV - Tests the ZIV subscript pair (Src and Dst) for dependence. - /// Returns true if any possible dependence is disproved. - /// If there might be a dependence, returns false. - /// If the dependence isn't proven to exist, - /// marks the Result as inconsistent. - bool testZIV(const SCEV *Src, - const SCEV *Dst, - FullDependence &Result) const; - - /// testSIV - Tests the SIV subscript pair (Src and Dst) for dependence. - /// Things of the form [c1 + a1*i] and [c2 + a2*j], where - /// i and j are induction variables, c1 and c2 are loop invariant, - /// and a1 and a2 are constant. - /// Returns true if any possible dependence is disproved. - /// If there might be a dependence, returns false. - /// Sets appropriate direction vector entry and, when possible, - /// the distance vector entry. - /// If the dependence isn't proven to exist, - /// marks the Result as inconsistent. - bool testSIV(const SCEV *Src, - const SCEV *Dst, - unsigned &Level, - FullDependence &Result, - Constraint &NewConstraint, - const SCEV *&SplitIter) const; - - /// testRDIV - Tests the RDIV subscript pair (Src and Dst) for dependence. - /// Things of the form [c1 + a1*i] and [c2 + a2*j] - /// where i and j are induction variables, c1 and c2 are loop invariant, - /// and a1 and a2 are constant. - /// With minor algebra, this test can also be used for things like - /// [c1 + a1*i + a2*j][c2]. - /// Returns true if any possible dependence is disproved. - /// If there might be a dependence, returns false. - /// Marks the Result as inconsistent. - bool testRDIV(const SCEV *Src, - const SCEV *Dst, - FullDependence &Result) const; - - /// testMIV - Tests the MIV subscript pair (Src and Dst) for dependence. - /// Returns true if dependence disproved. - /// Can sometimes refine direction vectors. - bool testMIV(const SCEV *Src, - const SCEV *Dst, - const SmallBitVector &Loops, - FullDependence &Result) const; - - /// strongSIVtest - Tests the strong SIV subscript pair (Src and Dst) - /// for dependence. - /// Things of the form [c1 + a*i] and [c2 + a*i], - /// where i is an induction variable, c1 and c2 are loop invariant, - /// and a is a constant - /// Returns true if any possible dependence is disproved. - /// If there might be a dependence, returns false. - /// Sets appropriate direction and distance. - bool strongSIVtest(const SCEV *Coeff, - const SCEV *SrcConst, - const SCEV *DstConst, - const Loop *CurrentLoop, - unsigned Level, - FullDependence &Result, - Constraint &NewConstraint) const; - - /// weakCrossingSIVtest - Tests the weak-crossing SIV subscript pair - /// (Src and Dst) for dependence. - /// Things of the form [c1 + a*i] and [c2 - a*i], - /// where i is an induction variable, c1 and c2 are loop invariant, - /// and a is a constant. - /// Returns true if any possible dependence is disproved. - /// If there might be a dependence, returns false. - /// Sets appropriate direction entry. - /// Set consistent to false. - /// Marks the dependence as splitable. - bool weakCrossingSIVtest(const SCEV *SrcCoeff, - const SCEV *SrcConst, - const SCEV *DstConst, - const Loop *CurrentLoop, - unsigned Level, - FullDependence &Result, - Constraint &NewConstraint, - const SCEV *&SplitIter) const; - - /// ExactSIVtest - Tests the SIV subscript pair - /// (Src and Dst) for dependence. - /// Things of the form [c1 + a1*i] and [c2 + a2*i], - /// where i is an induction variable, c1 and c2 are loop invariant, - /// and a1 and a2 are constant. - /// Returns true if any possible dependence is disproved. - /// If there might be a dependence, returns false. - /// Sets appropriate direction entry. - /// Set consistent to false. - bool exactSIVtest(const SCEV *SrcCoeff, - const SCEV *DstCoeff, - const SCEV *SrcConst, - const SCEV *DstConst, - const Loop *CurrentLoop, - unsigned Level, - FullDependence &Result, - Constraint &NewConstraint) const; - - /// weakZeroSrcSIVtest - Tests the weak-zero SIV subscript pair - /// (Src and Dst) for dependence. - /// Things of the form [c1] and [c2 + a*i], - /// where i is an induction variable, c1 and c2 are loop invariant, - /// and a is a constant. See also weakZeroDstSIVtest. - /// Returns true if any possible dependence is disproved. - /// If there might be a dependence, returns false. - /// Sets appropriate direction entry. - /// Set consistent to false. - /// If loop peeling will break the dependence, mark appropriately. - bool weakZeroSrcSIVtest(const SCEV *DstCoeff, - const SCEV *SrcConst, - const SCEV *DstConst, - const Loop *CurrentLoop, - unsigned Level, - FullDependence &Result, - Constraint &NewConstraint) const; - - /// weakZeroDstSIVtest - Tests the weak-zero SIV subscript pair - /// (Src and Dst) for dependence. - /// Things of the form [c1 + a*i] and [c2], - /// where i is an induction variable, c1 and c2 are loop invariant, - /// and a is a constant. See also weakZeroSrcSIVtest. - /// Returns true if any possible dependence is disproved. - /// If there might be a dependence, returns false. - /// Sets appropriate direction entry. - /// Set consistent to false. - /// If loop peeling will break the dependence, mark appropriately. - bool weakZeroDstSIVtest(const SCEV *SrcCoeff, - const SCEV *SrcConst, - const SCEV *DstConst, - const Loop *CurrentLoop, - unsigned Level, - FullDependence &Result, - Constraint &NewConstraint) const; - - /// exactRDIVtest - Tests the RDIV subscript pair for dependence. - /// Things of the form [c1 + a*i] and [c2 + b*j], - /// where i and j are induction variable, c1 and c2 are loop invariant, - /// and a and b are constants. - /// Returns true if any possible dependence is disproved. - /// Marks the result as inconsistent. - /// Works in some cases that symbolicRDIVtest doesn't, - /// and vice versa. - bool exactRDIVtest(const SCEV *SrcCoeff, - const SCEV *DstCoeff, - const SCEV *SrcConst, - const SCEV *DstConst, - const Loop *SrcLoop, - const Loop *DstLoop, - FullDependence &Result) const; - - /// symbolicRDIVtest - Tests the RDIV subscript pair for dependence. - /// Things of the form [c1 + a*i] and [c2 + b*j], - /// where i and j are induction variable, c1 and c2 are loop invariant, - /// and a and b are constants. - /// Returns true if any possible dependence is disproved. - /// Marks the result as inconsistent. - /// Works in some cases that exactRDIVtest doesn't, - /// and vice versa. Can also be used as a backup for - /// ordinary SIV tests. - bool symbolicRDIVtest(const SCEV *SrcCoeff, - const SCEV *DstCoeff, - const SCEV *SrcConst, - const SCEV *DstConst, - const Loop *SrcLoop, - const Loop *DstLoop) const; - - /// gcdMIVtest - Tests an MIV subscript pair for dependence. - /// Returns true if any possible dependence is disproved. - /// Marks the result as inconsistent. - /// Can sometimes disprove the equal direction for 1 or more loops. - // Can handle some symbolics that even the SIV tests don't get, - /// so we use it as a backup for everything. - bool gcdMIVtest(const SCEV *Src, - const SCEV *Dst, - FullDependence &Result) const; - - /// banerjeeMIVtest - Tests an MIV subscript pair for dependence. - /// Returns true if any possible dependence is disproved. - /// Marks the result as inconsistent. - /// Computes directions. - bool banerjeeMIVtest(const SCEV *Src, - const SCEV *Dst, - const SmallBitVector &Loops, - FullDependence &Result) const; - - /// collectCoefficientInfo - Walks through the subscript, - /// collecting each coefficient, the associated loop bounds, - /// and recording its positive and negative parts for later use. - CoefficientInfo *collectCoeffInfo(const SCEV *Subscript, - bool SrcFlag, - const SCEV *&Constant) const; - - /// getPositivePart - X^+ = max(X, 0). - /// - const SCEV *getPositivePart(const SCEV *X) const; - - /// getNegativePart - X^- = min(X, 0). - /// - const SCEV *getNegativePart(const SCEV *X) const; - - /// getLowerBound - Looks through all the bounds info and - /// computes the lower bound given the current direction settings - /// at each level. - const SCEV *getLowerBound(BoundInfo *Bound) const; - - /// getUpperBound - Looks through all the bounds info and - /// computes the upper bound given the current direction settings - /// at each level. - const SCEV *getUpperBound(BoundInfo *Bound) const; - - /// exploreDirections - Hierarchically expands the direction vector - /// search space, combining the directions of discovered dependences - /// in the DirSet field of Bound. Returns the number of distinct - /// dependences discovered. If the dependence is disproved, - /// it will return 0. - unsigned exploreDirections(unsigned Level, - CoefficientInfo *A, - CoefficientInfo *B, - BoundInfo *Bound, - const SmallBitVector &Loops, - unsigned &DepthExpanded, - const SCEV *Delta) const; - - /// testBounds - Returns true iff the current bounds are plausible. - bool testBounds(unsigned char DirKind, - unsigned Level, - BoundInfo *Bound, - const SCEV *Delta) const; - - /// findBoundsALL - Computes the upper and lower bounds for level K - /// using the * direction. Records them in Bound. - void findBoundsALL(CoefficientInfo *A, - CoefficientInfo *B, - BoundInfo *Bound, - unsigned K) const; - - /// findBoundsLT - Computes the upper and lower bounds for level K - /// using the < direction. Records them in Bound. - void findBoundsLT(CoefficientInfo *A, - CoefficientInfo *B, - BoundInfo *Bound, - unsigned K) const; - - /// findBoundsGT - Computes the upper and lower bounds for level K - /// using the > direction. Records them in Bound. - void findBoundsGT(CoefficientInfo *A, - CoefficientInfo *B, - BoundInfo *Bound, - unsigned K) const; - - /// findBoundsEQ - Computes the upper and lower bounds for level K - /// using the = direction. Records them in Bound. - void findBoundsEQ(CoefficientInfo *A, - CoefficientInfo *B, - BoundInfo *Bound, - unsigned K) const; - - /// intersectConstraints - Updates X with the intersection - /// of the Constraints X and Y. Returns true if X has changed. - bool intersectConstraints(Constraint *X, - const Constraint *Y); - - /// propagate - Review the constraints, looking for opportunities - /// to simplify a subscript pair (Src and Dst). - /// Return true if some simplification occurs. - /// If the simplification isn't exact (that is, if it is conservative - /// in terms of dependence), set consistent to false. - bool propagate(const SCEV *&Src, - const SCEV *&Dst, - SmallBitVector &Loops, - SmallVectorImpl &Constraints, - bool &Consistent); - - /// propagateDistance - Attempt to propagate a distance - /// constraint into a subscript pair (Src and Dst). - /// Return true if some simplification occurs. - /// If the simplification isn't exact (that is, if it is conservative - /// in terms of dependence), set consistent to false. - bool propagateDistance(const SCEV *&Src, - const SCEV *&Dst, - Constraint &CurConstraint, - bool &Consistent); - - /// propagatePoint - Attempt to propagate a point - /// constraint into a subscript pair (Src and Dst). - /// Return true if some simplification occurs. - bool propagatePoint(const SCEV *&Src, - const SCEV *&Dst, - Constraint &CurConstraint); - - /// propagateLine - Attempt to propagate a line - /// constraint into a subscript pair (Src and Dst). - /// Return true if some simplification occurs. - /// If the simplification isn't exact (that is, if it is conservative - /// in terms of dependence), set consistent to false. - bool propagateLine(const SCEV *&Src, - const SCEV *&Dst, - Constraint &CurConstraint, - bool &Consistent); - - /// findCoefficient - Given a linear SCEV, - /// return the coefficient corresponding to specified loop. - /// If there isn't one, return the SCEV constant 0. - /// For example, given a*i + b*j + c*k, returning the coefficient - /// corresponding to the j loop would yield b. - const SCEV *findCoefficient(const SCEV *Expr, - const Loop *TargetLoop) const; - - /// zeroCoefficient - Given a linear SCEV, - /// return the SCEV given by zeroing out the coefficient - /// corresponding to the specified loop. - /// For example, given a*i + b*j + c*k, zeroing the coefficient - /// corresponding to the j loop would yield a*i + c*k. - const SCEV *zeroCoefficient(const SCEV *Expr, - const Loop *TargetLoop) const; - - /// addToCoefficient - Given a linear SCEV Expr, - /// return the SCEV given by adding some Value to the - /// coefficient corresponding to the specified TargetLoop. - /// For example, given a*i + b*j + c*k, adding 1 to the coefficient - /// corresponding to the j loop would yield a*i + (b+1)*j + c*k. - const SCEV *addToCoefficient(const SCEV *Expr, - const Loop *TargetLoop, - const SCEV *Value) const; - - /// updateDirection - Update direction vector entry - /// based on the current constraint. - void updateDirection(Dependence::DVEntry &Level, - const Constraint &CurConstraint) const; - - bool tryDelinearize(Instruction *Src, Instruction *Dst, - SmallVectorImpl &Pair); - }; // class DependenceInfo - - /// \brief AnalysisPass to compute dependence information in a function - class DependenceAnalysis : public AnalysisInfoMixin { - public: - typedef DependenceInfo Result; - Result run(Function &F, FunctionAnalysisManager &FAM); - - private: - static char PassID; - friend struct AnalysisInfoMixin; - }; // class DependenceAnalysis - - /// \brief Legacy pass manager pass to access dependence information - class DependenceAnalysisWrapperPass : public FunctionPass { - public: - static char ID; // Class identification, replacement for typeinfo - DependenceAnalysisWrapperPass() : FunctionPass(ID) { - initializeDependenceAnalysisWrapperPassPass( - *PassRegistry::getPassRegistry()); - } - - bool runOnFunction(Function &F) override; - void releaseMemory() override; - void getAnalysisUsage(AnalysisUsage &) const override; - void print(raw_ostream &, const Module * = nullptr) const override; - DependenceInfo &getDI() const; - - private: - std::unique_ptr info; - }; // class DependenceAnalysisWrapperPass - - /// createDependenceAnalysisPass - This creates an instance of the - /// DependenceAnalysis wrapper pass. - FunctionPass *createDependenceAnalysisWrapperPass(); - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/DivergenceAnalysis.h b/llvm/include/llvm/Analysis/DivergenceAnalysis.h deleted file mode 100644 index aa2de571..00000000 --- a/llvm/include/llvm/Analysis/DivergenceAnalysis.h +++ /dev/null @@ -1,48 +0,0 @@ -//===- llvm/Analysis/DivergenceAnalysis.h - Divergence Analysis -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The divergence analysis is an LLVM pass which can be used to find out -// if a branch instruction in a GPU program is divergent or not. It can help -// branch optimizations such as jump threading and loop unswitching to make -// better decisions. -// -//===----------------------------------------------------------------------===// - -#include "llvm/ADT/DenseSet.h" -#include "llvm/IR/Function.h" -#include "llvm/Pass.h" - -namespace llvm { -class Value; -class DivergenceAnalysis : public FunctionPass { -public: - static char ID; - - DivergenceAnalysis() : FunctionPass(ID) { - initializeDivergenceAnalysisPass(*PassRegistry::getPassRegistry()); - } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - bool runOnFunction(Function &F) override; - - // Print all divergent branches in the function. - void print(raw_ostream &OS, const Module *) const override; - - // Returns true if V is divergent. - bool isDivergent(const Value *V) const { return DivergentValues.count(V); } - - // Returns true if V is uniform/non-divergent. - bool isUniform(const Value *V) const { return !isDivergent(V); } - -private: - // Stores all divergent values. - DenseSet DivergentValues; -}; -} // End llvm namespace diff --git a/llvm/include/llvm/Analysis/DomPrinter.h b/llvm/include/llvm/Analysis/DomPrinter.h deleted file mode 100644 index 0ed28994..00000000 --- a/llvm/include/llvm/Analysis/DomPrinter.h +++ /dev/null @@ -1,30 +0,0 @@ -//===-- DomPrinter.h - Dom printer external interface ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines external functions that can be called to explicitly -// instantiate the dominance tree printer. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_DOMPRINTER_H -#define LLVM_ANALYSIS_DOMPRINTER_H - -namespace llvm { - class FunctionPass; - FunctionPass *createDomPrinterPass(); - FunctionPass *createDomOnlyPrinterPass(); - FunctionPass *createDomViewerPass(); - FunctionPass *createDomOnlyViewerPass(); - FunctionPass *createPostDomPrinterPass(); - FunctionPass *createPostDomOnlyPrinterPass(); - FunctionPass *createPostDomViewerPass(); - FunctionPass *createPostDomOnlyViewerPass(); -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/DominanceFrontier.h b/llvm/include/llvm/Analysis/DominanceFrontier.h deleted file mode 100644 index 79672e4e..00000000 --- a/llvm/include/llvm/Analysis/DominanceFrontier.h +++ /dev/null @@ -1,196 +0,0 @@ -//===- llvm/Analysis/DominanceFrontier.h - Dominator Frontiers --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the DominanceFrontier class, which calculate and holds the -// dominance frontier for a function. -// -// This should be considered deprecated, don't add any more uses of this data -// structure. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_DOMINANCEFRONTIER_H -#define LLVM_ANALYSIS_DOMINANCEFRONTIER_H - -#include "llvm/IR/Dominators.h" -#include "llvm/IR/PassManager.h" -#include -#include - -namespace llvm { - -//===----------------------------------------------------------------------===// -/// DominanceFrontierBase - Common base class for computing forward and inverse -/// dominance frontiers for a function. -/// -template -class DominanceFrontierBase { -public: - typedef std::set DomSetType; // Dom set for a bb - typedef std::map DomSetMapType; // Dom set map - -protected: - typedef GraphTraits BlockTraits; - - DomSetMapType Frontiers; - std::vector Roots; - const bool IsPostDominators; - -public: - DominanceFrontierBase(bool isPostDom) : IsPostDominators(isPostDom) {} - - /// getRoots - Return the root blocks of the current CFG. This may include - /// multiple blocks if we are computing post dominators. For forward - /// dominators, this will always be a single block (the entry node). - /// - inline const std::vector &getRoots() const { - return Roots; - } - - BlockT *getRoot() const { - assert(Roots.size() == 1 && "Should always have entry node!"); - return Roots[0]; - } - - /// isPostDominator - Returns true if analysis based of postdoms - /// - bool isPostDominator() const { - return IsPostDominators; - } - - void releaseMemory() { - Frontiers.clear(); - } - - // Accessor interface: - typedef typename DomSetMapType::iterator iterator; - typedef typename DomSetMapType::const_iterator const_iterator; - iterator begin() { return Frontiers.begin(); } - const_iterator begin() const { return Frontiers.begin(); } - iterator end() { return Frontiers.end(); } - const_iterator end() const { return Frontiers.end(); } - iterator find(BlockT *B) { return Frontiers.find(B); } - const_iterator find(BlockT *B) const { return Frontiers.find(B); } - - iterator addBasicBlock(BlockT *BB, const DomSetType &frontier) { - assert(find(BB) == end() && "Block already in DominanceFrontier!"); - return Frontiers.insert(std::make_pair(BB, frontier)).first; - } - - /// removeBlock - Remove basic block BB's frontier. - void removeBlock(BlockT *BB); - - void addToFrontier(iterator I, BlockT *Node); - - void removeFromFrontier(iterator I, BlockT *Node); - - /// compareDomSet - Return false if two domsets match. Otherwise - /// return true; - bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const; - - /// compare - Return true if the other dominance frontier base matches - /// this dominance frontier base. Otherwise return false. - bool compare(DominanceFrontierBase &Other) const; - - /// print - Convert to human readable form - /// - void print(raw_ostream &OS) const; - - /// dump - Dump the dominance frontier to dbgs(). -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - void dump() const; -#endif -}; - -//===------------------------------------- -/// DominanceFrontier Class - Concrete subclass of DominanceFrontierBase that is -/// used to compute a forward dominator frontiers. -/// -template -class ForwardDominanceFrontierBase : public DominanceFrontierBase { -private: - typedef GraphTraits BlockTraits; - -public: - typedef DominatorTreeBase DomTreeT; - typedef DomTreeNodeBase DomTreeNodeT; - typedef typename DominanceFrontierBase::DomSetType DomSetType; - - ForwardDominanceFrontierBase() : DominanceFrontierBase(false) {} - - void analyze(DomTreeT &DT) { - this->Roots = DT.getRoots(); - assert(this->Roots.size() == 1 && - "Only one entry block for forward domfronts!"); - calculate(DT, DT[this->Roots[0]]); - } - - const DomSetType &calculate(const DomTreeT &DT, const DomTreeNodeT *Node); -}; - -class DominanceFrontier : public ForwardDominanceFrontierBase { -public: - typedef DominatorTreeBase DomTreeT; - typedef DomTreeNodeBase DomTreeNodeT; - typedef DominanceFrontierBase::DomSetType DomSetType; - typedef DominanceFrontierBase::iterator iterator; - typedef DominanceFrontierBase::const_iterator const_iterator; -}; - -class DominanceFrontierWrapperPass : public FunctionPass { - DominanceFrontier DF; -public: - static char ID; // Pass ID, replacement for typeid - - DominanceFrontierWrapperPass(); - - DominanceFrontier &getDominanceFrontier() { return DF; } - const DominanceFrontier &getDominanceFrontier() const { return DF; } - - void releaseMemory() override; - - bool runOnFunction(Function &) override; - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - void print(raw_ostream &OS, const Module * = nullptr) const override; - - void dump() const; -}; - -extern template class DominanceFrontierBase; -extern template class ForwardDominanceFrontierBase; - -/// \brief Analysis pass which computes a \c DominanceFrontier. -class DominanceFrontierAnalysis - : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// \brief Provide the result typedef for this analysis pass. - typedef DominanceFrontier Result; - - /// \brief Run the analysis pass over a function and produce a dominator tree. - DominanceFrontier run(Function &F, AnalysisManager &AM); -}; - -/// \brief Printer pass for the \c DominanceFrontier. -class DominanceFrontierPrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit DominanceFrontierPrinterPass(raw_ostream &OS); - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/DominanceFrontierImpl.h b/llvm/include/llvm/Analysis/DominanceFrontierImpl.h deleted file mode 100644 index 629ae380..00000000 --- a/llvm/include/llvm/Analysis/DominanceFrontierImpl.h +++ /dev/null @@ -1,226 +0,0 @@ -//===- llvm/Analysis/DominanceFrontier.h - Dominator Frontiers --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This is the generic implementation of the DominanceFrontier class, which -// calculate and holds the dominance frontier for a function for. -// -// This should be considered deprecated, don't add any more uses of this data -// structure. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_DOMINANCEFRONTIERIMPL_H -#define LLVM_ANALYSIS_DOMINANCEFRONTIERIMPL_H - -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/Analysis/DominanceFrontier.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/GenericDomTree.h" - -namespace llvm { - -template -class DFCalculateWorkObject { -public: - typedef DomTreeNodeBase DomTreeNodeT; - - DFCalculateWorkObject(BlockT *B, BlockT *P, const DomTreeNodeT *N, - const DomTreeNodeT *PN) - : currentBB(B), parentBB(P), Node(N), parentNode(PN) {} - BlockT *currentBB; - BlockT *parentBB; - const DomTreeNodeT *Node; - const DomTreeNodeT *parentNode; -}; - -template -void DominanceFrontierBase::removeBlock(BlockT *BB) { - assert(find(BB) != end() && "Block is not in DominanceFrontier!"); - for (iterator I = begin(), E = end(); I != E; ++I) - I->second.erase(BB); - Frontiers.erase(BB); -} - -template -void DominanceFrontierBase::addToFrontier(iterator I, - BlockT *Node) { - assert(I != end() && "BB is not in DominanceFrontier!"); - assert(I->second.count(Node) && "Node is not in DominanceFrontier of BB"); - I->second.erase(Node); -} - -template -void DominanceFrontierBase::removeFromFrontier(iterator I, - BlockT *Node) { - assert(I != end() && "BB is not in DominanceFrontier!"); - assert(I->second.count(Node) && "Node is not in DominanceFrontier of BB"); - I->second.erase(Node); -} - -template -bool DominanceFrontierBase::compareDomSet(DomSetType &DS1, - const DomSetType &DS2) const { - std::set tmpSet; - for (BlockT *BB : DS2) - tmpSet.insert(BB); - - for (typename DomSetType::const_iterator I = DS1.begin(), E = DS1.end(); - I != E;) { - BlockT *Node = *I++; - - if (tmpSet.erase(Node) == 0) - // Node is in DS1 but tnot in DS2. - return true; - } - - if (!tmpSet.empty()) { - // There are nodes that are in DS2 but not in DS1. - return true; - } - - // DS1 and DS2 matches. - return false; -} - -template -bool DominanceFrontierBase::compare( - DominanceFrontierBase &Other) const { - DomSetMapType tmpFrontiers; - for (typename DomSetMapType::const_iterator I = Other.begin(), - E = Other.end(); - I != E; ++I) - tmpFrontiers.insert(std::make_pair(I->first, I->second)); - - for (typename DomSetMapType::iterator I = tmpFrontiers.begin(), - E = tmpFrontiers.end(); - I != E;) { - BlockT *Node = I->first; - const_iterator DFI = find(Node); - if (DFI == end()) - return true; - - if (compareDomSet(I->second, DFI->second)) - return true; - - ++I; - tmpFrontiers.erase(Node); - } - - if (!tmpFrontiers.empty()) - return true; - - return false; -} - -template -void DominanceFrontierBase::print(raw_ostream &OS) const { - for (const_iterator I = begin(), E = end(); I != E; ++I) { - OS << " DomFrontier for BB "; - if (I->first) - I->first->printAsOperand(OS, false); - else - OS << " <>"; - OS << " is:\t"; - - const std::set &BBs = I->second; - - for (const BlockT *BB : BBs) { - OS << ' '; - if (BB) - BB->printAsOperand(OS, false); - else - OS << "<>"; - } - OS << '\n'; - } -} - -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) -template -void DominanceFrontierBase::dump() const { - print(dbgs()); -} -#endif - -template -const typename ForwardDominanceFrontierBase::DomSetType & -ForwardDominanceFrontierBase::calculate(const DomTreeT &DT, - const DomTreeNodeT *Node) { - BlockT *BB = Node->getBlock(); - DomSetType *Result = nullptr; - - std::vector> workList; - SmallPtrSet visited; - - workList.push_back(DFCalculateWorkObject(BB, nullptr, Node, nullptr)); - do { - DFCalculateWorkObject *currentW = &workList.back(); - assert(currentW && "Missing work object."); - - BlockT *currentBB = currentW->currentBB; - BlockT *parentBB = currentW->parentBB; - const DomTreeNodeT *currentNode = currentW->Node; - const DomTreeNodeT *parentNode = currentW->parentNode; - assert(currentBB && "Invalid work object. Missing current Basic Block"); - assert(currentNode && "Invalid work object. Missing current Node"); - DomSetType &S = this->Frontiers[currentBB]; - - // Visit each block only once. - if (visited.insert(currentBB).second) { - // Loop over CFG successors to calculate DFlocal[currentNode] - for (auto SI = BlockTraits::child_begin(currentBB), - SE = BlockTraits::child_end(currentBB); - SI != SE; ++SI) { - // Does Node immediately dominate this successor? - if (DT[*SI]->getIDom() != currentNode) - S.insert(*SI); - } - } - - // At this point, S is DFlocal. Now we union in DFup's of our children... - // Loop through and visit the nodes that Node immediately dominates (Node's - // children in the IDomTree) - bool visitChild = false; - for (typename DomTreeNodeT::const_iterator NI = currentNode->begin(), - NE = currentNode->end(); - NI != NE; ++NI) { - DomTreeNodeT *IDominee = *NI; - BlockT *childBB = IDominee->getBlock(); - if (visited.count(childBB) == 0) { - workList.push_back(DFCalculateWorkObject( - childBB, currentBB, IDominee, currentNode)); - visitChild = true; - } - } - - // If all children are visited or there is any child then pop this block - // from the workList. - if (!visitChild) { - if (!parentBB) { - Result = &S; - break; - } - - typename DomSetType::const_iterator CDFI = S.begin(), CDFE = S.end(); - DomSetType &parentSet = this->Frontiers[parentBB]; - for (; CDFI != CDFE; ++CDFI) { - if (!DT.properlyDominates(parentNode, DT[*CDFI])) - parentSet.insert(*CDFI); - } - workList.pop_back(); - } - - } while (!workList.empty()); - - return *Result; -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/EHPersonalities.h b/llvm/include/llvm/Analysis/EHPersonalities.h deleted file mode 100644 index a26c575c..00000000 --- a/llvm/include/llvm/Analysis/EHPersonalities.h +++ /dev/null @@ -1,97 +0,0 @@ -//===- EHPersonalities.h - Compute EH-related information -----------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_EHPERSONALITIES_H -#define LLVM_ANALYSIS_EHPERSONALITIES_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/TinyPtrVector.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { -class BasicBlock; -class Function; -class Value; - -enum class EHPersonality { - Unknown, - GNU_Ada, - GNU_C, - GNU_C_SjLj, - GNU_CXX, - GNU_CXX_SjLj, - GNU_ObjC, - MSVC_X86SEH, - MSVC_Win64SEH, - MSVC_CXX, - CoreCLR, - Rust -}; - -/// \brief See if the given exception handling personality function is one -/// that we understand. If so, return a description of it; otherwise return -/// Unknown. -EHPersonality classifyEHPersonality(const Value *Pers); - -/// \brief Returns true if this personality function catches asynchronous -/// exceptions. -inline bool isAsynchronousEHPersonality(EHPersonality Pers) { - // The two SEH personality functions can catch asynch exceptions. We assume - // unknown personalities don't catch asynch exceptions. - switch (Pers) { - case EHPersonality::MSVC_X86SEH: - case EHPersonality::MSVC_Win64SEH: - return true; - default: - return false; - } - llvm_unreachable("invalid enum"); -} - -/// \brief Returns true if this is a personality function that invokes -/// handler funclets (which must return to it). -inline bool isFuncletEHPersonality(EHPersonality Pers) { - switch (Pers) { - case EHPersonality::MSVC_CXX: - case EHPersonality::MSVC_X86SEH: - case EHPersonality::MSVC_Win64SEH: - case EHPersonality::CoreCLR: - return true; - default: - return false; - } - llvm_unreachable("invalid enum"); -} - -/// \brief Return true if this personality may be safely removed if there -/// are no invoke instructions remaining in the current function. -inline bool isNoOpWithoutInvoke(EHPersonality Pers) { - switch (Pers) { - case EHPersonality::Unknown: - return false; - // All known personalities currently have this behavior - default: - return true; - } - llvm_unreachable("invalid enum"); -} - -bool canSimplifyInvokeNoUnwind(const Function *F); - -typedef TinyPtrVector ColorVector; - -/// \brief If an EH funclet personality is in use (see isFuncletEHPersonality), -/// this will recompute which blocks are in which funclet. It is possible that -/// some blocks are in multiple funclets. Consider this analysis to be -/// expensive. -DenseMap colorEHFunclets(Function &F); - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/GlobalsModRef.h b/llvm/include/llvm/Analysis/GlobalsModRef.h deleted file mode 100644 index 4c0a9894..00000000 --- a/llvm/include/llvm/Analysis/GlobalsModRef.h +++ /dev/null @@ -1,156 +0,0 @@ -//===- GlobalsModRef.h - Simple Mod/Ref AA for Globals ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This is the interface for a simple mod/ref and alias analysis over globals. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_GLOBALSMODREF_H -#define LLVM_ANALYSIS_GLOBALSMODREF_H - -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/CallGraph.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -/// An alias analysis result set for globals. -/// -/// This focuses on handling aliasing properties of globals and interprocedural -/// function call mod/ref information. -class GlobalsAAResult : public AAResultBase { - friend AAResultBase; - - class FunctionInfo; - - const DataLayout &DL; - const TargetLibraryInfo &TLI; - - /// The globals that do not have their addresses taken. - SmallPtrSet NonAddressTakenGlobals; - - /// IndirectGlobals - The memory pointed to by this global is known to be - /// 'owned' by the global. - SmallPtrSet IndirectGlobals; - - /// AllocsForIndirectGlobals - If an instruction allocates memory for an - /// indirect global, this map indicates which one. - DenseMap AllocsForIndirectGlobals; - - /// For each function, keep track of what globals are modified or read. - DenseMap FunctionInfos; - - /// A map of functions to SCC. The SCCs are described by a simple integer - /// ID that is only useful for comparing for equality (are two functions - /// in the same SCC or not?) - DenseMap FunctionToSCCMap; - - /// Handle to clear this analysis on deletion of values. - struct DeletionCallbackHandle final : CallbackVH { - GlobalsAAResult *GAR; - std::list::iterator I; - - DeletionCallbackHandle(GlobalsAAResult &GAR, Value *V) - : CallbackVH(V), GAR(&GAR) {} - - void deleted() override; - }; - - /// List of callbacks for globals being tracked by this analysis. Note that - /// these objects are quite large, but we only anticipate having one per - /// global tracked by this analysis. There are numerous optimizations we - /// could perform to the memory utilization here if this becomes a problem. - std::list Handles; - - explicit GlobalsAAResult(const DataLayout &DL, const TargetLibraryInfo &TLI); - -public: - GlobalsAAResult(GlobalsAAResult &&Arg); - ~GlobalsAAResult(); - - static GlobalsAAResult analyzeModule(Module &M, const TargetLibraryInfo &TLI, - CallGraph &CG); - - //------------------------------------------------ - // Implement the AliasAnalysis API - // - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB); - - using AAResultBase::getModRefInfo; - ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc); - - /// getModRefBehavior - Return the behavior of the specified function if - /// called from the specified call site. The call site may be null in which - /// case the most generic behavior of this function should be returned. - FunctionModRefBehavior getModRefBehavior(const Function *F); - - /// getModRefBehavior - Return the behavior of the specified function if - /// called from the specified call site. The call site may be null in which - /// case the most generic behavior of this function should be returned. - FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS); - -private: - FunctionInfo *getFunctionInfo(const Function *F); - - void AnalyzeGlobals(Module &M); - void AnalyzeCallGraph(CallGraph &CG, Module &M); - bool AnalyzeUsesOfPointer(Value *V, - SmallPtrSetImpl *Readers = nullptr, - SmallPtrSetImpl *Writers = nullptr, - GlobalValue *OkayStoreDest = nullptr); - bool AnalyzeIndirectGlobalMemory(GlobalVariable *GV); - void CollectSCCMembership(CallGraph &CG); - - bool isNonEscapingGlobalNoAlias(const GlobalValue *GV, const Value *V); - ModRefInfo getModRefInfoForArgument(ImmutableCallSite CS, - const GlobalValue *GV); -}; - -/// Analysis pass providing a never-invalidated alias analysis result. -class GlobalsAA : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef GlobalsAAResult Result; - - GlobalsAAResult run(Module &M, AnalysisManager &AM); -}; - -/// Legacy wrapper pass to provide the GlobalsAAResult object. -class GlobalsAAWrapperPass : public ModulePass { - std::unique_ptr Result; - -public: - static char ID; - - GlobalsAAWrapperPass(); - - GlobalsAAResult &getResult() { return *Result; } - const GlobalsAAResult &getResult() const { return *Result; } - - bool runOnModule(Module &M) override; - bool doFinalization(Module &M) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -//===--------------------------------------------------------------------===// -// -// createGlobalsAAWrapperPass - This pass provides alias and mod/ref info for -// global values that do not have their addresses taken. -// -ModulePass *createGlobalsAAWrapperPass(); -} - -#endif diff --git a/llvm/include/llvm/Analysis/IVUsers.h b/llvm/include/llvm/Analysis/IVUsers.h deleted file mode 100644 index e68a7752..00000000 --- a/llvm/include/llvm/Analysis/IVUsers.h +++ /dev/null @@ -1,224 +0,0 @@ -//===- llvm/Analysis/IVUsers.h - Induction Variable Users -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements bookkeeping for "interesting" users of expressions -// computed from induction variables. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_IVUSERS_H -#define LLVM_ANALYSIS_IVUSERS_H - -#include "llvm/Analysis/LoopPass.h" -#include "llvm/Analysis/ScalarEvolutionNormalization.h" -#include "llvm/IR/ValueHandle.h" - -namespace llvm { - -class AssumptionCache; -class DominatorTree; -class Instruction; -class Value; -class ScalarEvolution; -class SCEV; -class IVUsers; -class DataLayout; - -/// IVStrideUse - Keep track of one use of a strided induction variable. -/// The Expr member keeps track of the expression, User is the actual user -/// instruction of the operand, and 'OperandValToReplace' is the operand of -/// the User that is the use. -class IVStrideUse final : public CallbackVH, public ilist_node { - friend class IVUsers; -public: - IVStrideUse(IVUsers *P, Instruction* U, Value *O) - : CallbackVH(U), Parent(P), OperandValToReplace(O) { - } - - /// getUser - Return the user instruction for this use. - Instruction *getUser() const { - return cast(getValPtr()); - } - - /// setUser - Assign a new user instruction for this use. - void setUser(Instruction *NewUser) { - setValPtr(NewUser); - } - - /// getOperandValToReplace - Return the Value of the operand in the user - /// instruction that this IVStrideUse is representing. - Value *getOperandValToReplace() const { - return OperandValToReplace; - } - - /// setOperandValToReplace - Assign a new Value as the operand value - /// to replace. - void setOperandValToReplace(Value *Op) { - OperandValToReplace = Op; - } - - /// getPostIncLoops - Return the set of loops for which the expression has - /// been adjusted to use post-inc mode. - const PostIncLoopSet &getPostIncLoops() const { - return PostIncLoops; - } - - /// transformToPostInc - Transform the expression to post-inc form for the - /// given loop. - void transformToPostInc(const Loop *L); - -private: - /// Parent - a pointer to the IVUsers that owns this IVStrideUse. - IVUsers *Parent; - - /// OperandValToReplace - The Value of the operand in the user instruction - /// that this IVStrideUse is representing. - WeakVH OperandValToReplace; - - /// PostIncLoops - The set of loops for which Expr has been adjusted to - /// use post-inc mode. This corresponds with SCEVExpander's post-inc concept. - PostIncLoopSet PostIncLoops; - - /// Deleted - Implementation of CallbackVH virtual function to - /// receive notification when the User is deleted. - void deleted() override; -}; - -template<> struct ilist_traits - : public ilist_default_traits { - // createSentinel is used to get hold of a node that marks the end of - // the list... - // The sentinel is relative to this instance, so we use a non-static - // method. - IVStrideUse *createSentinel() const { - // since i(p)lists always publicly derive from the corresponding - // traits, placing a data member in this class will augment i(p)list. - // But since the NodeTy is expected to publicly derive from - // ilist_node, there is a legal viable downcast from it - // to NodeTy. We use this trick to superpose i(p)list with a "ghostly" - // NodeTy, which becomes the sentinel. Dereferencing the sentinel is - // forbidden (save the ilist_node) so no one will ever notice - // the superposition. - return static_cast(&Sentinel); - } - static void destroySentinel(IVStrideUse*) {} - - IVStrideUse *provideInitialHead() const { return createSentinel(); } - IVStrideUse *ensureHead(IVStrideUse*) const { return createSentinel(); } - static void noteHead(IVStrideUse*, IVStrideUse*) {} - -private: - mutable ilist_node Sentinel; -}; - -class IVUsers { - friend class IVStrideUse; - Loop *L; - AssumptionCache *AC; - LoopInfo *LI; - DominatorTree *DT; - ScalarEvolution *SE; - SmallPtrSet Processed; - - /// IVUses - A list of all tracked IV uses of induction variable expressions - /// we are interested in. - ilist IVUses; - - // Ephemeral values used by @llvm.assume in this function. - SmallPtrSet EphValues; - -public: - IVUsers(Loop *L, AssumptionCache *AC, LoopInfo *LI, DominatorTree *DT, - ScalarEvolution *SE); - - Loop *getLoop() const { return L; } - - /// AddUsersIfInteresting - Inspect the specified Instruction. If it is a - /// reducible SCEV, recursively add its users to the IVUsesByStride set and - /// return true. Otherwise, return false. - bool AddUsersIfInteresting(Instruction *I); - - IVStrideUse &AddUser(Instruction *User, Value *Operand); - - /// getReplacementExpr - Return a SCEV expression which computes the - /// value of the OperandValToReplace of the given IVStrideUse. - const SCEV *getReplacementExpr(const IVStrideUse &IU) const; - - /// getExpr - Return the expression for the use. - const SCEV *getExpr(const IVStrideUse &IU) const; - - const SCEV *getStride(const IVStrideUse &IU, const Loop *L) const; - - typedef ilist::iterator iterator; - typedef ilist::const_iterator const_iterator; - iterator begin() { return IVUses.begin(); } - iterator end() { return IVUses.end(); } - const_iterator begin() const { return IVUses.begin(); } - const_iterator end() const { return IVUses.end(); } - bool empty() const { return IVUses.empty(); } - - bool isIVUserOrOperand(Instruction *Inst) const { - return Processed.count(Inst); - } - - void releaseMemory(); - - void print(raw_ostream &OS, const Module * = nullptr) const; - - /// dump - This method is used for debugging. - void dump() const; - -protected: - bool AddUsersImpl(Instruction *I, SmallPtrSetImpl &SimpleLoopNests); -}; - -Pass *createIVUsersPass(); - -class IVUsersWrapperPass : public LoopPass { - std::unique_ptr IU; - -public: - static char ID; - - IVUsersWrapperPass(); - - IVUsers &getIU() { return *IU; } - const IVUsers &getIU() const { return *IU; } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - bool runOnLoop(Loop *L, LPPassManager &LPM) override; - - void releaseMemory() override; - - void print(raw_ostream &OS, const Module * = nullptr) const override; -}; - -/// Analysis pass that exposes the \c IVUsers for a loop. -class IVUsersAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef IVUsers Result; - - IVUsers run(Loop &L, AnalysisManager &AM); -}; - -/// Printer pass for the \c IVUsers for a loop. -class IVUsersPrinterPass : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit IVUsersPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Loop &L, AnalysisManager &AM); -}; -} - -#endif diff --git a/llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h b/llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h deleted file mode 100644 index 007e4d86..00000000 --- a/llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h +++ /dev/null @@ -1,67 +0,0 @@ -//===- IndirectCallPromotionAnalysis.h - Indirect call analysis -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// Interface to identify indirect call promotion candidates. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_INDIRECTCALLPROMOTIONANALYSIS_H -#define LLVM_ANALYSIS_INDIRECTCALLPROMOTIONANALYSIS_H - -#include "llvm/ProfileData/InstrProf.h" - -namespace llvm { - -class Instruction; - -// Class for identifying profitable indirect call promotion candidates when -// the indirect-call value profile metadata is available. -class ICallPromotionAnalysis { -private: - // Allocate space to read the profile annotation. - std::unique_ptr ValueDataArray; - - // Count is the call count for the direct-call target and - // TotalCount is the call count for the indirect-call callsite. - // Return true we should promote this indirect-call target. - bool isPromotionProfitable(uint64_t Count, uint64_t TotalCount); - - // Returns the number of profitable candidates to promote for the - // current ValueDataArray and the given \p Inst. - uint32_t getProfitablePromotionCandidates(const Instruction *Inst, - uint32_t NumVals, - uint64_t TotalCount); - - // Noncopyable - ICallPromotionAnalysis(const ICallPromotionAnalysis &other) = delete; - ICallPromotionAnalysis & - operator=(const ICallPromotionAnalysis &other) = delete; - -public: - ICallPromotionAnalysis(); - - /// \brief Returns reference to array of InstrProfValueData for the given - /// instruction \p I. - /// - /// The \p NumVals, \p TotalCount and \p NumCandidates - /// are set to the number of values in the array, the total profile count - /// of the indirect call \p I, and the number of profitable candidates - /// in the given array (which is sorted in reverse order of profitability). - /// - /// The returned array space is owned by this class, and overwritten on - /// subsequent calls. - ArrayRef - getPromotionCandidatesForInstruction(const Instruction *I, uint32_t &NumVals, - uint64_t &TotalCount, - uint32_t &NumCandidates); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/IndirectCallSiteVisitor.h b/llvm/include/llvm/Analysis/IndirectCallSiteVisitor.h deleted file mode 100644 index 71a8cb88..00000000 --- a/llvm/include/llvm/Analysis/IndirectCallSiteVisitor.h +++ /dev/null @@ -1,43 +0,0 @@ -//===-- IndirectCallSiteVisitor.h - indirect call-sites visitor -----------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements defines a visitor class and a helper function that find -// all indirect call-sites in a function. - -#include "llvm/IR/InstVisitor.h" -#include - -namespace llvm { -// Visitor class that finds all indirect call sites. -struct PGOIndirectCallSiteVisitor - : public InstVisitor { - std::vector IndirectCallInsts; - PGOIndirectCallSiteVisitor() {} - - void visitCallSite(CallSite CS) { - if (CS.getCalledFunction() || !CS.getCalledValue()) - return; - Instruction *I = CS.getInstruction(); - if (CallInst *CI = dyn_cast(I)) { - if (CI->isInlineAsm()) - return; - } - if (isa(CS.getCalledValue())) - return; - IndirectCallInsts.push_back(I); - } -}; - -// Helper function that finds all indirect call sites. -static inline std::vector findIndirectCallSites(Function &F) { - PGOIndirectCallSiteVisitor ICV; - ICV.visit(F); - return ICV.IndirectCallInsts; -} -} diff --git a/llvm/include/llvm/Analysis/InlineCost.h b/llvm/include/llvm/Analysis/InlineCost.h deleted file mode 100644 index 2928d2be..00000000 --- a/llvm/include/llvm/Analysis/InlineCost.h +++ /dev/null @@ -1,135 +0,0 @@ -//===- InlineCost.h - Cost analysis for inliner -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements heuristics for inlining decisions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_INLINECOST_H -#define LLVM_ANALYSIS_INLINECOST_H - -#include "llvm/Analysis/CallGraphSCCPass.h" -#include -#include - -namespace llvm { -class AssumptionCacheTracker; -class CallSite; -class DataLayout; -class Function; -class ProfileSummaryInfo; -class TargetTransformInfo; - -namespace InlineConstants { - // Various magic constants used to adjust heuristics. - const int InstrCost = 5; - const int IndirectCallThreshold = 100; - const int CallPenalty = 25; - const int LastCallToStaticBonus = -15000; - const int ColdccPenalty = 2000; - const int NoreturnPenalty = 10000; - /// Do not inline functions which allocate this many bytes on the stack - /// when the caller is recursive. - const unsigned TotalAllocaSizeRecursiveCaller = 1024; -} - -/// \brief Represents the cost of inlining a function. -/// -/// This supports special values for functions which should "always" or -/// "never" be inlined. Otherwise, the cost represents a unitless amount; -/// smaller values increase the likelihood of the function being inlined. -/// -/// Objects of this type also provide the adjusted threshold for inlining -/// based on the information available for a particular callsite. They can be -/// directly tested to determine if inlining should occur given the cost and -/// threshold for this cost metric. -class InlineCost { - enum SentinelValues { - AlwaysInlineCost = INT_MIN, - NeverInlineCost = INT_MAX - }; - - /// \brief The estimated cost of inlining this callsite. - const int Cost; - - /// \brief The adjusted threshold against which this cost was computed. - const int Threshold; - - // Trivial constructor, interesting logic in the factory functions below. - InlineCost(int Cost, int Threshold) : Cost(Cost), Threshold(Threshold) {} - -public: - static InlineCost get(int Cost, int Threshold) { - assert(Cost > AlwaysInlineCost && "Cost crosses sentinel value"); - assert(Cost < NeverInlineCost && "Cost crosses sentinel value"); - return InlineCost(Cost, Threshold); - } - static InlineCost getAlways() { - return InlineCost(AlwaysInlineCost, 0); - } - static InlineCost getNever() { - return InlineCost(NeverInlineCost, 0); - } - - /// \brief Test whether the inline cost is low enough for inlining. - explicit operator bool() const { - return Cost < Threshold; - } - - bool isAlways() const { return Cost == AlwaysInlineCost; } - bool isNever() const { return Cost == NeverInlineCost; } - bool isVariable() const { return !isAlways() && !isNever(); } - - /// \brief Get the inline cost estimate. - /// It is an error to call this on an "always" or "never" InlineCost. - int getCost() const { - assert(isVariable() && "Invalid access of InlineCost"); - return Cost; - } - - /// \brief Get the cost delta from the threshold for inlining. - /// Only valid if the cost is of the variable kind. Returns a negative - /// value if the cost is too high to inline. - int getCostDelta() const { return Threshold - getCost(); } -}; - -/// \brief Get an InlineCost object representing the cost of inlining this -/// callsite. -/// -/// Note that a default threshold is passed into this function. This threshold -/// could be modified based on callsite's properties and only costs below this -/// new threshold are computed with any accuracy. The new threshold can be -/// used to bound the computation necessary to determine whether the cost is -/// sufficiently low to warrant inlining. -/// -/// Also note that calling this function *dynamically* computes the cost of -/// inlining the callsite. It is an expensive, heavyweight call. -InlineCost getInlineCost(CallSite CS, int DefaultThreshold, - TargetTransformInfo &CalleeTTI, - AssumptionCacheTracker *ACT, ProfileSummaryInfo *PSI); - -/// \brief Get an InlineCost with the callee explicitly specified. -/// This allows you to calculate the cost of inlining a function via a -/// pointer. This behaves exactly as the version with no explicit callee -/// parameter in all other respects. -// -InlineCost getInlineCost(CallSite CS, Function *Callee, int DefaultThreshold, - TargetTransformInfo &CalleeTTI, - AssumptionCacheTracker *ACT, ProfileSummaryInfo *PSI); - -int computeThresholdFromOptLevels(unsigned OptLevel, unsigned SizeOptLevel); - -/// \brief Return the default value of -inline-threshold. -int getDefaultInlineThreshold(); - -/// \brief Minimal filter to detect invalid constructs for inlining. -bool isInlineViable(Function &Callee); -} - -#endif diff --git a/llvm/include/llvm/Analysis/InstructionSimplify.h b/llvm/include/llvm/Analysis/InstructionSimplify.h deleted file mode 100644 index 410fa416..00000000 --- a/llvm/include/llvm/Analysis/InstructionSimplify.h +++ /dev/null @@ -1,325 +0,0 @@ -//===-- InstructionSimplify.h - Fold instrs into simpler forms --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares routines for folding instructions into simpler forms -// that do not require creating new instructions. This does constant folding -// ("add i32 1, 1" -> "2") but can also handle non-constant operands, either -// returning a constant ("and i32 %x, 0" -> "0") or an already existing value -// ("and i32 %x, %x" -> "%x"). If the simplification is also an instruction -// then it dominates the original instruction. -// -// These routines implicitly resolve undef uses. The easiest way to be safe when -// using these routines to obtain simplified values for existing instructions is -// to always replace all uses of the instructions with the resulting simplified -// values. This will prevent other code from seeing the same undef uses and -// resolving them to different values. -// -// These routines are designed to tolerate moderately incomplete IR, such as -// instructions that are not connected to basic blocks yet. However, they do -// require that all the IR that they encounter be valid. In particular, they -// require that all non-constant values be defined in the same function, and the -// same call context of that function (and not split between caller and callee -// contexts of a directly recursive call, for example). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H -#define LLVM_ANALYSIS_INSTRUCTIONSIMPLIFY_H - -#include "llvm/IR/User.h" - -namespace llvm { - template - class ArrayRef; - class AssumptionCache; - class DominatorTree; - class Instruction; - class DataLayout; - class FastMathFlags; - class TargetLibraryInfo; - class Type; - class Value; - - /// Given operands for an Add, fold the result or return null. - Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a Sub, fold the result or return null. - Value *SimplifySubInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an FAdd, fold the result or return null. - Value *SimplifyFAddInst(Value *LHS, Value *RHS, FastMathFlags FMF, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an FSub, fold the result or return null. - Value *SimplifyFSubInst(Value *LHS, Value *RHS, FastMathFlags FMF, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an FMul, fold the result or return null. - Value *SimplifyFMulInst(Value *LHS, Value *RHS, FastMathFlags FMF, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a Mul, fold the result or return null. - Value *SimplifyMulInst(Value *LHS, Value *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an SDiv, fold the result or return null. - Value *SimplifySDivInst(Value *LHS, Value *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a UDiv, fold the result or return null. - Value *SimplifyUDivInst(Value *LHS, Value *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an FDiv, fold the result or return null. - Value *SimplifyFDivInst(Value *LHS, Value *RHS, FastMathFlags FMF, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an SRem, fold the result or return null. - Value *SimplifySRemInst(Value *LHS, Value *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a URem, fold the result or return null. - Value *SimplifyURemInst(Value *LHS, Value *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an FRem, fold the result or return null. - Value *SimplifyFRemInst(Value *LHS, Value *RHS, FastMathFlags FMF, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a Shl, fold the result or return null. - Value *SimplifyShlInst(Value *Op0, Value *Op1, bool isNSW, bool isNUW, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a LShr, fold the result or return null. - Value *SimplifyLShrInst(Value *Op0, Value *Op1, bool isExact, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a AShr, fold the result or return nulll. - Value *SimplifyAShrInst(Value *Op0, Value *Op1, bool isExact, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an And, fold the result or return null. - Value *SimplifyAndInst(Value *LHS, Value *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an Or, fold the result or return null. - Value *SimplifyOrInst(Value *LHS, Value *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an Xor, fold the result or return null. - Value *SimplifyXorInst(Value *LHS, Value *RHS, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an ICmpInst, fold the result or return null. - Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an FCmpInst, fold the result or return null. - Value *SimplifyFCmpInst(unsigned Predicate, Value *LHS, Value *RHS, - FastMathFlags FMF, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a SelectInst, fold the result or return null. - Value *SimplifySelectInst(Value *Cond, Value *TrueVal, Value *FalseVal, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a GetElementPtrInst, fold the result or return null. - Value *SimplifyGEPInst(Type *SrcTy, ArrayRef Ops, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an InsertValueInst, fold the result or return null. - Value *SimplifyInsertValueInst(Value *Agg, Value *Val, - ArrayRef Idxs, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an ExtractValueInst, fold the result or return null. - Value *SimplifyExtractValueInst(Value *Agg, ArrayRef Idxs, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an ExtractElementInst, fold the result or return null. - Value *SimplifyExtractElementInst(Value *Vec, Value *Idx, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an TruncInst, fold the result or return null. - Value *SimplifyTruncInst(Value *Op, Type *Ty, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - //=== Helper functions for higher up the class hierarchy. - - - /// Given operands for a CmpInst, fold the result or return null. - Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for a BinaryOperator, fold the result or return null. - Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS, - const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given operands for an FP BinaryOperator, fold the result or return null. - /// In contrast to SimplifyBinOp, try to use FastMathFlag when folding the - /// result. In case we don't need FastMathFlags, simply fall to SimplifyBinOp. - Value *SimplifyFPBinOp(unsigned Opcode, Value *LHS, Value *RHS, - const FastMathFlags &FMF, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given a function and iterators over arguments, fold the result or return - /// null. - Value *SimplifyCall(Value *V, User::op_iterator ArgBegin, - User::op_iterator ArgEnd, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// Given a function and set of arguments, fold the result or return null. - Value *SimplifyCall(Value *V, ArrayRef Args, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr); - - /// See if we can compute a simplified version of this instruction. If not, - /// return null. - Value *SimplifyInstruction(Instruction *I, const DataLayout &DL, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr); - - /// Replace all uses of 'I' with 'SimpleV' and simplify the uses recursively. - /// - /// This first performs a normal RAUW of I with SimpleV. It then recursively - /// attempts to simplify those users updated by the operation. The 'I' - /// instruction must not be equal to the simplified value 'SimpleV'. - /// - /// The function returns true if any simplifications were performed. - bool replaceAndRecursivelySimplify(Instruction *I, Value *SimpleV, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr); - - /// Recursively attempt to simplify an instruction. - /// - /// This routine uses SimplifyInstruction to simplify 'I', and if successful - /// replaces uses of 'I' with the simplified value. It then recurses on each - /// of the users impacted. It returns true if any simplifications were - /// performed. - bool recursivelySimplifyInstruction(Instruction *I, - const TargetLibraryInfo *TLI = nullptr, - const DominatorTree *DT = nullptr, - AssumptionCache *AC = nullptr); -} // end namespace llvm - -#endif - diff --git a/llvm/include/llvm/Analysis/Interval.h b/llvm/include/llvm/Analysis/Interval.h deleted file mode 100644 index a904753a..00000000 --- a/llvm/include/llvm/Analysis/Interval.h +++ /dev/null @@ -1,152 +0,0 @@ -//===- llvm/Analysis/Interval.h - Interval Class Declaration ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the Interval class, which -// represents a set of CFG nodes and is a portion of an interval partition. -// -// Intervals have some interesting and useful properties, including the -// following: -// 1. The header node of an interval dominates all of the elements of the -// interval -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_INTERVAL_H -#define LLVM_ANALYSIS_INTERVAL_H - -#include "llvm/ADT/GraphTraits.h" -#include - -namespace llvm { - -class BasicBlock; -class raw_ostream; - -//===----------------------------------------------------------------------===// -// -/// Interval Class - An Interval is a set of nodes defined such that every node -/// in the interval has all of its predecessors in the interval (except for the -/// header) -/// -class Interval { - /// HeaderNode - The header BasicBlock, which dominates all BasicBlocks in this - /// interval. Also, any loops in this interval must go through the HeaderNode. - /// - BasicBlock *HeaderNode; -public: - typedef std::vector::iterator succ_iterator; - typedef std::vector::iterator pred_iterator; - typedef std::vector::iterator node_iterator; - - inline Interval(BasicBlock *Header) : HeaderNode(Header) { - Nodes.push_back(Header); - } - - inline BasicBlock *getHeaderNode() const { return HeaderNode; } - - /// Nodes - The basic blocks in this interval. - /// - std::vector Nodes; - - /// Successors - List of BasicBlocks that are reachable directly from nodes in - /// this interval, but are not in the interval themselves. - /// These nodes necessarily must be header nodes for other intervals. - /// - std::vector Successors; - - /// Predecessors - List of BasicBlocks that have this Interval's header block - /// as one of their successors. - /// - std::vector Predecessors; - - /// contains - Find out if a basic block is in this interval - inline bool contains(BasicBlock *BB) const { - for (BasicBlock *Node : Nodes) - if (Node == BB) - return true; - return false; - // I don't want the dependency on - //return find(Nodes.begin(), Nodes.end(), BB) != Nodes.end(); - } - - /// isSuccessor - find out if a basic block is a successor of this Interval - inline bool isSuccessor(BasicBlock *BB) const { - for (BasicBlock *Successor : Successors) - if (Successor == BB) - return true; - return false; - // I don't want the dependency on - //return find(Successors.begin(), Successors.end(), BB) != Successors.end(); - } - - /// Equality operator. It is only valid to compare two intervals from the - /// same partition, because of this, all we have to check is the header node - /// for equality. - /// - inline bool operator==(const Interval &I) const { - return HeaderNode == I.HeaderNode; - } - - /// isLoop - Find out if there is a back edge in this interval... - bool isLoop() const; - - /// print - Show contents in human readable format... - void print(raw_ostream &O) const; -}; - -/// succ_begin/succ_end - define methods so that Intervals may be used -/// just like BasicBlocks can with the succ_* functions, and *::succ_iterator. -/// -inline Interval::succ_iterator succ_begin(Interval *I) { - return I->Successors.begin(); -} -inline Interval::succ_iterator succ_end(Interval *I) { - return I->Successors.end(); -} - -/// pred_begin/pred_end - define methods so that Intervals may be used -/// just like BasicBlocks can with the pred_* functions, and *::pred_iterator. -/// -inline Interval::pred_iterator pred_begin(Interval *I) { - return I->Predecessors.begin(); -} -inline Interval::pred_iterator pred_end(Interval *I) { - return I->Predecessors.end(); -} - -template <> struct GraphTraits { - typedef Interval NodeType; - typedef Interval::succ_iterator ChildIteratorType; - - static NodeType *getEntryNode(Interval *I) { return I; } - - /// nodes_iterator/begin/end - Allow iteration over all nodes in the graph - static inline ChildIteratorType child_begin(NodeType *N) { - return succ_begin(N); - } - static inline ChildIteratorType child_end(NodeType *N) { - return succ_end(N); - } -}; - -template <> struct GraphTraits > { - typedef Interval NodeType; - typedef Interval::pred_iterator ChildIteratorType; - static NodeType *getEntryNode(Inverse G) { return G.Graph; } - static inline ChildIteratorType child_begin(NodeType *N) { - return pred_begin(N); - } - static inline ChildIteratorType child_end(NodeType *N) { - return pred_end(N); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/IntervalIterator.h b/llvm/include/llvm/Analysis/IntervalIterator.h deleted file mode 100644 index 655ce2da..00000000 --- a/llvm/include/llvm/Analysis/IntervalIterator.h +++ /dev/null @@ -1,268 +0,0 @@ -//===- IntervalIterator.h - Interval Iterator Declaration -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines an iterator that enumerates the intervals in a control flow -// graph of some sort. This iterator is parametric, allowing iterator over the -// following types of graphs: -// -// 1. A Function* object, composed of BasicBlock nodes. -// 2. An IntervalPartition& object, composed of Interval nodes. -// -// This iterator is defined to walk the control flow graph, returning intervals -// in depth first order. These intervals are completely filled in except for -// the predecessor fields (the successor information is filled in however). -// -// By default, the intervals created by this iterator are deleted after they -// are no longer any use to the iterator. This behavior can be changed by -// passing a false value into the intervals_begin() function. This causes the -// IOwnMem member to be set, and the intervals to not be deleted. -// -// It is only safe to use this if all of the intervals are deleted by the caller -// and all of the intervals are processed. However, the user of the iterator is -// not allowed to modify or delete the intervals until after the iterator has -// been used completely. The IntervalPartition class uses this functionality. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_INTERVALITERATOR_H -#define LLVM_ANALYSIS_INTERVALITERATOR_H - -#include "llvm/Analysis/IntervalPartition.h" -#include "llvm/IR/CFG.h" -#include "llvm/IR/Function.h" -#include -#include -#include - -namespace llvm { - -// getNodeHeader - Given a source graph node and the source graph, return the -// BasicBlock that is the header node. This is the opposite of -// getSourceGraphNode. -// -inline BasicBlock *getNodeHeader(BasicBlock *BB) { return BB; } -inline BasicBlock *getNodeHeader(Interval *I) { return I->getHeaderNode(); } - -// getSourceGraphNode - Given a BasicBlock and the source graph, return the -// source graph node that corresponds to the BasicBlock. This is the opposite -// of getNodeHeader. -// -inline BasicBlock *getSourceGraphNode(Function *, BasicBlock *BB) { - return BB; -} -inline Interval *getSourceGraphNode(IntervalPartition *IP, BasicBlock *BB) { - return IP->getBlockInterval(BB); -} - -// addNodeToInterval - This method exists to assist the generic ProcessNode -// with the task of adding a node to the new interval, depending on the -// type of the source node. In the case of a CFG source graph (BasicBlock -// case), the BasicBlock itself is added to the interval. -// -inline void addNodeToInterval(Interval *Int, BasicBlock *BB) { - Int->Nodes.push_back(BB); -} - -// addNodeToInterval - This method exists to assist the generic ProcessNode -// with the task of adding a node to the new interval, depending on the -// type of the source node. In the case of a CFG source graph (BasicBlock -// case), the BasicBlock itself is added to the interval. In the case of -// an IntervalPartition source graph (Interval case), all of the member -// BasicBlocks are added to the interval. -// -inline void addNodeToInterval(Interval *Int, Interval *I) { - // Add all of the nodes in I as new nodes in Int. - Int->Nodes.insert(Int->Nodes.end(), I->Nodes.begin(), I->Nodes.end()); -} - - - - - -template, - class IGT = GraphTraits > > -class IntervalIterator { - std::vector > IntStack; - std::set Visited; - OrigContainer_t *OrigContainer; - bool IOwnMem; // If True, delete intervals when done with them - // See file header for conditions of use -public: - typedef std::forward_iterator_tag iterator_category; - - IntervalIterator() {} // End iterator, empty stack - IntervalIterator(Function *M, bool OwnMemory) : IOwnMem(OwnMemory) { - OrigContainer = M; - if (!ProcessInterval(&M->front())) { - llvm_unreachable("ProcessInterval should never fail for first interval!"); - } - } - - IntervalIterator(IntervalIterator &&x) - : IntStack(std::move(x.IntStack)), Visited(std::move(x.Visited)), - OrigContainer(x.OrigContainer), IOwnMem(x.IOwnMem) { - x.IOwnMem = false; - } - - IntervalIterator(IntervalPartition &IP, bool OwnMemory) : IOwnMem(OwnMemory) { - OrigContainer = &IP; - if (!ProcessInterval(IP.getRootInterval())) { - llvm_unreachable("ProcessInterval should never fail for first interval!"); - } - } - - ~IntervalIterator() { - if (IOwnMem) - while (!IntStack.empty()) { - delete operator*(); - IntStack.pop_back(); - } - } - - bool operator==(const IntervalIterator &x) const { - return IntStack == x.IntStack; - } - bool operator!=(const IntervalIterator &x) const { return !(*this == x); } - - const Interval *operator*() const { return IntStack.back().first; } - Interval *operator*() { return IntStack.back().first; } - const Interval *operator->() const { return operator*(); } - Interval *operator->() { return operator*(); } - - IntervalIterator &operator++() { // Preincrement - assert(!IntStack.empty() && "Attempting to use interval iterator at end!"); - do { - // All of the intervals on the stack have been visited. Try visiting - // their successors now. - Interval::succ_iterator &SuccIt = IntStack.back().second, - EndIt = succ_end(IntStack.back().first); - while (SuccIt != EndIt) { // Loop over all interval succs - bool Done = ProcessInterval(getSourceGraphNode(OrigContainer, *SuccIt)); - ++SuccIt; // Increment iterator - if (Done) return *this; // Found a new interval! Use it! - } - - // Free interval memory... if necessary - if (IOwnMem) delete IntStack.back().first; - - // We ran out of successors for this interval... pop off the stack - IntStack.pop_back(); - } while (!IntStack.empty()); - - return *this; - } - IntervalIterator operator++(int) { // Postincrement - IntervalIterator tmp = *this; - ++*this; - return tmp; - } - -private: - // ProcessInterval - This method is used during the construction of the - // interval graph. It walks through the source graph, recursively creating - // an interval per invocation until the entire graph is covered. This uses - // the ProcessNode method to add all of the nodes to the interval. - // - // This method is templated because it may operate on two different source - // graphs: a basic block graph, or a preexisting interval graph. - // - bool ProcessInterval(NodeTy *Node) { - BasicBlock *Header = getNodeHeader(Node); - if (!Visited.insert(Header).second) - return false; - - Interval *Int = new Interval(Header); - - // Check all of our successors to see if they are in the interval... - for (typename GT::ChildIteratorType I = GT::child_begin(Node), - E = GT::child_end(Node); I != E; ++I) - ProcessNode(Int, getSourceGraphNode(OrigContainer, *I)); - - IntStack.push_back(std::make_pair(Int, succ_begin(Int))); - return true; - } - - // ProcessNode - This method is called by ProcessInterval to add nodes to the - // interval being constructed, and it is also called recursively as it walks - // the source graph. A node is added to the current interval only if all of - // its predecessors are already in the graph. This also takes care of keeping - // the successor set of an interval up to date. - // - // This method is templated because it may operate on two different source - // graphs: a basic block graph, or a preexisting interval graph. - // - void ProcessNode(Interval *Int, NodeTy *Node) { - assert(Int && "Null interval == bad!"); - assert(Node && "Null Node == bad!"); - - BasicBlock *NodeHeader = getNodeHeader(Node); - - if (Visited.count(NodeHeader)) { // Node already been visited? - if (Int->contains(NodeHeader)) { // Already in this interval... - return; - } else { // In other interval, add as successor - if (!Int->isSuccessor(NodeHeader)) // Add only if not already in set - Int->Successors.push_back(NodeHeader); - } - } else { // Otherwise, not in interval yet - for (typename IGT::ChildIteratorType I = IGT::child_begin(Node), - E = IGT::child_end(Node); I != E; ++I) { - if (!Int->contains(*I)) { // If pred not in interval, we can't be - if (!Int->isSuccessor(NodeHeader)) // Add only if not already in set - Int->Successors.push_back(NodeHeader); - return; // See you later - } - } - - // If we get here, then all of the predecessors of BB are in the interval - // already. In this case, we must add BB to the interval! - addNodeToInterval(Int, Node); - Visited.insert(NodeHeader); // The node has now been visited! - - if (Int->isSuccessor(NodeHeader)) { - // If we were in the successor list from before... remove from succ list - Int->Successors.erase(std::remove(Int->Successors.begin(), - Int->Successors.end(), NodeHeader), - Int->Successors.end()); - } - - // Now that we have discovered that Node is in the interval, perhaps some - // of its successors are as well? - for (typename GT::ChildIteratorType It = GT::child_begin(Node), - End = GT::child_end(Node); It != End; ++It) - ProcessNode(Int, getSourceGraphNode(OrigContainer, *It)); - } - } -}; - -typedef IntervalIterator function_interval_iterator; -typedef IntervalIterator - interval_part_interval_iterator; - - -inline function_interval_iterator intervals_begin(Function *F, - bool DeleteInts = true) { - return function_interval_iterator(F, DeleteInts); -} -inline function_interval_iterator intervals_end(Function *) { - return function_interval_iterator(); -} - -inline interval_part_interval_iterator - intervals_begin(IntervalPartition &IP, bool DeleteIntervals = true) { - return interval_part_interval_iterator(IP, DeleteIntervals); -} - -inline interval_part_interval_iterator intervals_end(IntervalPartition &IP) { - return interval_part_interval_iterator(); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/IntervalPartition.h b/llvm/include/llvm/Analysis/IntervalPartition.h deleted file mode 100644 index 274be2bd..00000000 --- a/llvm/include/llvm/Analysis/IntervalPartition.h +++ /dev/null @@ -1,111 +0,0 @@ -//===- IntervalPartition.h - Interval partition Calculation -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the IntervalPartition class, which -// calculates and represents the interval partition of a function, or a -// preexisting interval partition. -// -// In this way, the interval partition may be used to reduce a flow graph down -// to its degenerate single node interval partition (unless it is irreducible). -// -// TODO: The IntervalPartition class should take a bool parameter that tells -// whether it should add the "tails" of an interval to an interval itself or if -// they should be represented as distinct intervals. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_INTERVALPARTITION_H -#define LLVM_ANALYSIS_INTERVALPARTITION_H - -#include "llvm/Analysis/Interval.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -//===----------------------------------------------------------------------===// -// -// IntervalPartition - This class builds and holds an "interval partition" for -// a function. This partition divides the control flow graph into a set of -// maximal intervals, as defined with the properties above. Intuitively, an -// interval is a (possibly nonexistent) loop with a "tail" of non-looping -// nodes following it. -// -class IntervalPartition : public FunctionPass { - typedef std::map IntervalMapTy; - IntervalMapTy IntervalMap; - - typedef std::vector IntervalListTy; - Interval *RootInterval; - std::vector Intervals; - -public: - static char ID; // Pass identification, replacement for typeid - - IntervalPartition() : FunctionPass(ID), RootInterval(nullptr) { - initializeIntervalPartitionPass(*PassRegistry::getPassRegistry()); - } - - // run - Calculate the interval partition for this function - bool runOnFunction(Function &F) override; - - // IntervalPartition ctor - Build a reduced interval partition from an - // existing interval graph. This takes an additional boolean parameter to - // distinguish it from a copy constructor. Always pass in false for now. - // - IntervalPartition(IntervalPartition &I, bool); - - // print - Show contents in human readable format... - void print(raw_ostream &O, const Module* = nullptr) const override; - - // getRootInterval() - Return the root interval that contains the starting - // block of the function. - inline Interval *getRootInterval() { return RootInterval; } - - // isDegeneratePartition() - Returns true if the interval partition contains - // a single interval, and thus cannot be simplified anymore. - bool isDegeneratePartition() { return Intervals.size() == 1; } - - // TODO: isIrreducible - look for triangle graph. - - // getBlockInterval - Return the interval that a basic block exists in. - inline Interval *getBlockInterval(BasicBlock *BB) { - IntervalMapTy::iterator I = IntervalMap.find(BB); - return I != IntervalMap.end() ? I->second : nullptr; - } - - // getAnalysisUsage - Implement the Pass API - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - } - - // Interface to Intervals vector... - const std::vector &getIntervals() const { return Intervals; } - - // releaseMemory - Reset state back to before function was analyzed - void releaseMemory() override; - -private: - // addIntervalToPartition - Add an interval to the internal list of intervals, - // and then add mappings from all of the basic blocks in the interval to the - // interval itself (in the IntervalMap). - // - void addIntervalToPartition(Interval *I); - - // updatePredecessors - Interval generation only sets the successor fields of - // the interval data structures. After interval generation is complete, - // run through all of the intervals and propagate successor info as - // predecessor info. - // - void updatePredecessors(Interval *Int); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/IteratedDominanceFrontier.h b/llvm/include/llvm/Analysis/IteratedDominanceFrontier.h deleted file mode 100644 index 37da5617..00000000 --- a/llvm/include/llvm/Analysis/IteratedDominanceFrontier.h +++ /dev/null @@ -1,97 +0,0 @@ -//===- IteratedDominanceFrontier.h - Calculate IDF --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// \brief Compute iterated dominance frontiers using a linear time algorithm. -/// -/// The algorithm used here is based on: -/// -/// Sreedhar and Gao. A linear time algorithm for placing phi-nodes. -/// In Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of -/// Programming Languages -/// POPL '95. ACM, New York, NY, 62-73. -/// -/// It has been modified to not explicitly use the DJ graph data structure and -/// to directly compute pruned SSA using per-variable liveness information. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_IDF_H -#define LLVM_ANALYSIS_IDF_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/Dominators.h" - -namespace llvm { - -/// \brief Determine the iterated dominance frontier, given a set of defining -/// blocks, and optionally, a set of live-in blocks. -/// -/// In turn, the results can be used to place phi nodes. -/// -/// This algorithm is a linear time computation of Iterated Dominance Frontiers, -/// pruned using the live-in set. -/// By default, liveness is not used to prune the IDF computation. -/// The template parameters should be either BasicBlock* or Inverse, depending on if you want the forward or reverse IDF. -template -class IDFCalculator { - -public: - IDFCalculator(DominatorTreeBase &DT) : DT(DT), useLiveIn(false) {} - - /// \brief Give the IDF calculator the set of blocks in which the value is - /// defined. This is equivalent to the set of starting blocks it should be - /// calculating the IDF for (though later gets pruned based on liveness). - /// - /// Note: This set *must* live for the entire lifetime of the IDF calculator. - void setDefiningBlocks(const SmallPtrSetImpl &Blocks) { - DefBlocks = &Blocks; - } - - /// \brief Give the IDF calculator the set of blocks in which the value is - /// live on entry to the block. This is used to prune the IDF calculation to - /// not include blocks where any phi insertion would be dead. - /// - /// Note: This set *must* live for the entire lifetime of the IDF calculator. - - void setLiveInBlocks(const SmallPtrSetImpl &Blocks) { - LiveInBlocks = &Blocks; - useLiveIn = true; - } - - /// \brief Reset the live-in block set to be empty, and tell the IDF - /// calculator to not use liveness anymore. - void resetLiveInBlocks() { - LiveInBlocks = nullptr; - useLiveIn = false; - } - - /// \brief Calculate iterated dominance frontiers - /// - /// This uses the linear-time phi algorithm based on DJ-graphs mentioned in - /// the file-level comment. It performs DF->IDF pruning using the live-in - /// set, to avoid computing the IDF for blocks where an inserted PHI node - /// would be dead. - void calculate(SmallVectorImpl &IDFBlocks); - -private: - DominatorTreeBase &DT; - bool useLiveIn; - DenseMap DomLevels; - const SmallPtrSetImpl *LiveInBlocks; - const SmallPtrSetImpl *DefBlocks; - SmallVector PHIBlocks; -}; -typedef IDFCalculator ForwardIDFCalculator; -typedef IDFCalculator> ReverseIDFCalculator; -} -#endif diff --git a/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h b/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h deleted file mode 100644 index a2d24bb9..00000000 --- a/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h +++ /dev/null @@ -1,125 +0,0 @@ -//===- LazyBlockFrequencyInfo.h - Lazy Block Frequency Analysis -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This is an alternative analysis pass to BlockFrequencyInfoWrapperPass. The -// difference is that with this pass the block frequencies are not computed when -// the analysis pass is executed but rather when the BFI results is explicitly -// requested by the analysis client. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LAZYBLOCKFREQUENCYINFO_H -#define LLVM_ANALYSIS_LAZYBLOCKFREQUENCYINFO_H - -#include "llvm/Analysis/BlockFrequencyInfo.h" -#include "llvm/Pass.h" - -namespace llvm { -class AnalysisUsage; -class BranchProbabilityInfo; -class Function; -class LoopInfo; - -/// \brief This is an alternative analysis pass to -/// BlockFrequencyInfoWrapperPass. The difference is that with this pass the -/// block frequencies are not computed when the analysis pass is executed but -/// rather when the BFI results is explicitly requested by the analysis client. -/// -/// There are some additional requirements for any client pass that wants to use -/// the analysis: -/// -/// 1. The pass needs to initialize dependent passes with: -/// -/// INITIALIZE_PASS_DEPENDENCY(LazyBFIPass) -/// -/// 2. Similarly, getAnalysisUsage should call: -/// -/// LazyBlockFrequencyInfoPass::getLazyBFIAnalysisUsage(AU) -/// -/// 3. The computed BFI should be requested with -/// getAnalysis().getBFI() before either LoopInfo -/// or BPI could be invalidated for example by changing the CFG. -/// -/// Note that it is expected that we wouldn't need this functionality for the -/// new PM since with the new PM, analyses are executed on demand. -class LazyBlockFrequencyInfoPass : public FunctionPass { - - /// Wraps a BFI to allow lazy computation of the block frequencies. - /// - /// A pass that only conditionally uses BFI can uncondtionally require the - /// analysis without paying for the overhead if BFI doesn't end up being used. - class LazyBlockFrequencyInfo { - public: - LazyBlockFrequencyInfo() - : Calculated(false), F(nullptr), BPI(nullptr), LI(nullptr) {} - - /// Set up the per-function input. - void setAnalysis(const Function *F, const BranchProbabilityInfo *BPI, - const LoopInfo *LI) { - this->F = F; - this->BPI = BPI; - this->LI = LI; - } - - /// Retrieve the BFI with the block frequencies computed. - BlockFrequencyInfo &getCalculated() { - if (!Calculated) { - assert(F && BPI && LI && "call setAnalysis"); - BFI.calculate(*F, *BPI, *LI); - Calculated = true; - } - return BFI; - } - - const BlockFrequencyInfo &getCalculated() const { - return const_cast(this)->getCalculated(); - } - - void releaseMemory() { - BFI.releaseMemory(); - Calculated = false; - setAnalysis(nullptr, nullptr, nullptr); - } - - private: - BlockFrequencyInfo BFI; - bool Calculated; - const Function *F; - const BranchProbabilityInfo *BPI; - const LoopInfo *LI; - }; - - LazyBlockFrequencyInfo LBFI; - -public: - static char ID; - - LazyBlockFrequencyInfoPass(); - - /// \brief Compute and return the block frequencies. - BlockFrequencyInfo &getBFI() { return LBFI.getCalculated(); } - - /// \brief Compute and return the block frequencies. - const BlockFrequencyInfo &getBFI() const { return LBFI.getCalculated(); } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - /// Helper for client passes to set up the analysis usage on behalf of this - /// pass. - static void getLazyBFIAnalysisUsage(AnalysisUsage &AU); - - bool runOnFunction(Function &F) override; - void releaseMemory() override; - void print(raw_ostream &OS, const Module *M) const override; -}; - -/// \brief Helper for client passes to initialize dependent passes for LBFI. -void initializeLazyBFIPassPass(PassRegistry &Registry); -} -#endif diff --git a/llvm/include/llvm/Analysis/LazyCallGraph.h b/llvm/include/llvm/Analysis/LazyCallGraph.h deleted file mode 100644 index 9f62eaa2..00000000 --- a/llvm/include/llvm/Analysis/LazyCallGraph.h +++ /dev/null @@ -1,1017 +0,0 @@ -//===- LazyCallGraph.h - Analysis of a Module's call graph ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// Implements a lazy call graph analysis and related passes for the new pass -/// manager. -/// -/// NB: This is *not* a traditional call graph! It is a graph which models both -/// the current calls and potential calls. As a consequence there are many -/// edges in this call graph that do not correspond to a 'call' or 'invoke' -/// instruction. -/// -/// The primary use cases of this graph analysis is to facilitate iterating -/// across the functions of a module in ways that ensure all callees are -/// visited prior to a caller (given any SCC constraints), or vice versa. As -/// such is it particularly well suited to organizing CGSCC optimizations such -/// as inlining, outlining, argument promotion, etc. That is its primary use -/// case and motivates the design. It may not be appropriate for other -/// purposes. The use graph of functions or some other conservative analysis of -/// call instructions may be interesting for optimizations and subsequent -/// analyses which don't work in the context of an overly specified -/// potential-call-edge graph. -/// -/// To understand the specific rules and nature of this call graph analysis, -/// see the documentation of the \c LazyCallGraph below. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LAZYCALLGRAPH_H -#define LLVM_ANALYSIS_LAZYCALLGRAPH_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/PointerUnion.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SetVector.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/iterator.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/raw_ostream.h" -#include -#include - -namespace llvm { -class PreservedAnalyses; -class raw_ostream; - -/// A lazily constructed view of the call graph of a module. -/// -/// With the edges of this graph, the motivating constraint that we are -/// attempting to maintain is that function-local optimization, CGSCC-local -/// optimizations, and optimizations transforming a pair of functions connected -/// by an edge in the graph, do not invalidate a bottom-up traversal of the SCC -/// DAG. That is, no optimizations will delete, remove, or add an edge such -/// that functions already visited in a bottom-up order of the SCC DAG are no -/// longer valid to have visited, or such that functions not yet visited in -/// a bottom-up order of the SCC DAG are not required to have already been -/// visited. -/// -/// Within this constraint, the desire is to minimize the merge points of the -/// SCC DAG. The greater the fanout of the SCC DAG and the fewer merge points -/// in the SCC DAG, the more independence there is in optimizing within it. -/// There is a strong desire to enable parallelization of optimizations over -/// the call graph, and both limited fanout and merge points will (artificially -/// in some cases) limit the scaling of such an effort. -/// -/// To this end, graph represents both direct and any potential resolution to -/// an indirect call edge. Another way to think about it is that it represents -/// both the direct call edges and any direct call edges that might be formed -/// through static optimizations. Specifically, it considers taking the address -/// of a function to be an edge in the call graph because this might be -/// forwarded to become a direct call by some subsequent function-local -/// optimization. The result is that the graph closely follows the use-def -/// edges for functions. Walking "up" the graph can be done by looking at all -/// of the uses of a function. -/// -/// The roots of the call graph are the external functions and functions -/// escaped into global variables. Those functions can be called from outside -/// of the module or via unknowable means in the IR -- we may not be able to -/// form even a potential call edge from a function body which may dynamically -/// load the function and call it. -/// -/// This analysis still requires updates to remain valid after optimizations -/// which could potentially change the set of potential callees. The -/// constraints it operates under only make the traversal order remain valid. -/// -/// The entire analysis must be re-computed if full interprocedural -/// optimizations run at any point. For example, globalopt completely -/// invalidates the information in this analysis. -/// -/// FIXME: This class is named LazyCallGraph in a lame attempt to distinguish -/// it from the existing CallGraph. At some point, it is expected that this -/// will be the only call graph and it will be renamed accordingly. -class LazyCallGraph { -public: - class Node; - class SCC; - class RefSCC; - class edge_iterator; - class call_edge_iterator; - - /// A class used to represent edges in the call graph. - /// - /// The lazy call graph models both *call* edges and *reference* edges. Call - /// edges are much what you would expect, and exist when there is a 'call' or - /// 'invoke' instruction of some function. Reference edges are also tracked - /// along side these, and exist whenever any instruction (transitively - /// through its operands) references a function. All call edges are - /// inherently reference edges, and so the reference graph forms a superset - /// of the formal call graph. - /// - /// Furthermore, edges also may point to raw \c Function objects when those - /// functions have not been scanned and incorporated into the graph (yet). - /// This is one of the primary ways in which the graph can be lazy. When - /// functions are scanned and fully incorporated into the graph, all of the - /// edges referencing them are updated to point to the graph \c Node objects - /// instead of to the raw \c Function objects. This class even provides - /// methods to trigger this scan on-demand by attempting to get the target - /// node of the graph and providing a reference back to the graph in order to - /// lazily build it if necessary. - /// - /// All of these forms of edges are fundamentally represented as outgoing - /// edges. The edges are stored in the source node and point at the target - /// node. This allows the edge structure itself to be a very compact data - /// structure: essentially a tagged pointer. - class Edge { - public: - /// The kind of edge in the graph. - enum Kind : bool { Ref = false, Call = true }; - - Edge(); - explicit Edge(Function &F, Kind K); - explicit Edge(Node &N, Kind K); - - /// Test whether the edge is null. - /// - /// This happens when an edge has been deleted. We leave the edge objects - /// around but clear them. - operator bool() const; - - /// Test whether the edge represents a direct call to a function. - /// - /// This requires that the edge is not null. - bool isCall() const; - - /// Get the function referenced by this edge. - /// - /// This requires that the edge is not null, but will succeed whether we - /// have built a graph node for the function yet or not. - Function &getFunction() const; - - /// Get the call graph node referenced by this edge if one exists. - /// - /// This requires that the edge is not null. If we have built a graph node - /// for the function this edge points to, this will return that node, - /// otherwise it will return null. - Node *getNode() const; - - /// Get the call graph node for this edge, building it if necessary. - /// - /// This requires that the edge is not null. If we have not yet built - /// a graph node for the function this edge points to, this will first ask - /// the graph to build that node, inserting it into all the relevant - /// structures. - Node &getNode(LazyCallGraph &G); - - private: - friend class LazyCallGraph::Node; - - PointerIntPair, 1, Kind> Value; - - void setKind(Kind K) { Value.setInt(K); } - }; - - typedef SmallVector EdgeVectorT; - typedef SmallVectorImpl EdgeVectorImplT; - - /// A node in the call graph. - /// - /// This represents a single node. It's primary roles are to cache the list of - /// callees, de-duplicate and provide fast testing of whether a function is - /// a callee, and facilitate iteration of child nodes in the graph. - class Node { - friend class LazyCallGraph; - friend class LazyCallGraph::SCC; - - LazyCallGraph *G; - Function &F; - - // We provide for the DFS numbering and Tarjan walk lowlink numbers to be - // stored directly within the node. These are both '-1' when nodes are part - // of an SCC (or RefSCC), or '0' when not yet reached in a DFS walk. - int DFSNumber; - int LowLink; - - mutable EdgeVectorT Edges; - DenseMap EdgeIndexMap; - - /// Basic constructor implements the scanning of F into Edges and - /// EdgeIndexMap. - Node(LazyCallGraph &G, Function &F); - - /// Internal helper to insert an edge to a function. - void insertEdgeInternal(Function &ChildF, Edge::Kind EK); - - /// Internal helper to insert an edge to a node. - void insertEdgeInternal(Node &ChildN, Edge::Kind EK); - - /// Internal helper to change an edge kind. - void setEdgeKind(Function &ChildF, Edge::Kind EK); - - /// Internal helper to remove the edge to the given function. - void removeEdgeInternal(Function &ChildF); - - /// Print the name of this node's function. - friend raw_ostream &operator<<(raw_ostream &OS, const Node &N) { - return OS << N.F.getName(); - } - - /// Dump the name of this node's function to stderr. - void dump() const; - - public: - LazyCallGraph &getGraph() const { return *G; } - - Function &getFunction() const { return F; } - - edge_iterator begin() const { - return edge_iterator(Edges.begin(), Edges.end()); - } - edge_iterator end() const { return edge_iterator(Edges.end(), Edges.end()); } - - const Edge &operator[](int i) const { return Edges[i]; } - const Edge &operator[](Function &F) const { - assert(EdgeIndexMap.find(&F) != EdgeIndexMap.end() && "No such edge!"); - return Edges[EdgeIndexMap.find(&F)->second]; - } - const Edge &operator[](Node &N) const { return (*this)[N.getFunction()]; } - - call_edge_iterator call_begin() const { - return call_edge_iterator(Edges.begin(), Edges.end()); - } - call_edge_iterator call_end() const { - return call_edge_iterator(Edges.end(), Edges.end()); - } - - iterator_range calls() const { - return make_range(call_begin(), call_end()); - } - - /// Equality is defined as address equality. - bool operator==(const Node &N) const { return this == &N; } - bool operator!=(const Node &N) const { return !operator==(N); } - }; - - /// A lazy iterator used for both the entry nodes and child nodes. - /// - /// When this iterator is dereferenced, if not yet available, a function will - /// be scanned for "calls" or uses of functions and its child information - /// will be constructed. All of these results are accumulated and cached in - /// the graph. - class edge_iterator - : public iterator_adaptor_base { - friend class LazyCallGraph; - friend class LazyCallGraph::Node; - - EdgeVectorImplT::iterator E; - - // Build the iterator for a specific position in the edge list. - edge_iterator(EdgeVectorImplT::iterator BaseI, - EdgeVectorImplT::iterator E) - : iterator_adaptor_base(BaseI), E(E) { - while (I != E && !*I) - ++I; - } - - public: - edge_iterator() {} - - using iterator_adaptor_base::operator++; - edge_iterator &operator++() { - do { - ++I; - } while (I != E && !*I); - return *this; - } - }; - - /// A lazy iterator over specifically call edges. - /// - /// This has the same iteration properties as the \c edge_iterator, but - /// restricts itself to edges which represent actual calls. - class call_edge_iterator - : public iterator_adaptor_base { - friend class LazyCallGraph; - friend class LazyCallGraph::Node; - - EdgeVectorImplT::iterator E; - - /// Advance the iterator to the next valid, call edge. - void advanceToNextEdge() { - while (I != E && (!*I || !I->isCall())) - ++I; - } - - // Build the iterator for a specific position in the edge list. - call_edge_iterator(EdgeVectorImplT::iterator BaseI, - EdgeVectorImplT::iterator E) - : iterator_adaptor_base(BaseI), E(E) { - advanceToNextEdge(); - } - - public: - call_edge_iterator() {} - - using iterator_adaptor_base::operator++; - call_edge_iterator &operator++() { - ++I; - advanceToNextEdge(); - return *this; - } - }; - - /// An SCC of the call graph. - /// - /// This represents a Strongly Connected Component of the direct call graph - /// -- ignoring indirect calls and function references. It stores this as - /// a collection of call graph nodes. While the order of nodes in the SCC is - /// stable, it is not any particular order. - /// - /// The SCCs are nested within a \c RefSCC, see below for details about that - /// outer structure. SCCs do not support mutation of the call graph, that - /// must be done through the containing \c RefSCC in order to fully reason - /// about the ordering and connections of the graph. - class SCC { - friend class LazyCallGraph; - friend class LazyCallGraph::Node; - - RefSCC *OuterRefSCC; - SmallVector Nodes; - - template - SCC(RefSCC &OuterRefSCC, NodeRangeT &&Nodes) - : OuterRefSCC(&OuterRefSCC), Nodes(std::forward(Nodes)) {} - - void clear() { - OuterRefSCC = nullptr; - Nodes.clear(); - } - - /// Print a short descrtiption useful for debugging or logging. - /// - /// We print the function names in the SCC wrapped in '()'s and skipping - /// the middle functions if there are a large number. - // - // Note: this is defined inline to dodge issues with GCC's interpretation - // of enclosing namespaces for friend function declarations. - friend raw_ostream &operator<<(raw_ostream &OS, const SCC &C) { - OS << '('; - int i = 0; - for (LazyCallGraph::Node &N : C) { - if (i > 0) - OS << ", "; - // Elide the inner elements if there are too many. - if (i > 8) { - OS << "..., " << *C.Nodes.back(); - break; - } - OS << N; - ++i; - } - OS << ')'; - return OS; - } - - /// Dump a short description of this SCC to stderr. - void dump() const; - -#ifndef NDEBUG - /// Verify invariants about the SCC. - /// - /// This will attempt to validate all of the basic invariants within an - /// SCC, but not that it is a strongly connected componet per-se. Primarily - /// useful while building and updating the graph to check that basic - /// properties are in place rather than having inexplicable crashes later. - void verify(); -#endif - - public: - typedef pointee_iterator::const_iterator> iterator; - - iterator begin() const { return Nodes.begin(); } - iterator end() const { return Nodes.end(); } - - int size() const { return Nodes.size(); } - - RefSCC &getOuterRefSCC() const { return *OuterRefSCC; } - - /// Provide a short name by printing this SCC to a std::string. - /// - /// This copes with the fact that we don't have a name per-se for an SCC - /// while still making the use of this in debugging and logging useful. - std::string getName() const { - std::string Name; - raw_string_ostream OS(Name); - OS << *this; - OS.flush(); - return Name; - } - }; - - /// A RefSCC of the call graph. - /// - /// This models a Strongly Connected Component of function reference edges in - /// the call graph. As opposed to actual SCCs, these can be used to scope - /// subgraphs of the module which are independent from other subgraphs of the - /// module because they do not reference it in any way. This is also the unit - /// where we do mutation of the graph in order to restrict mutations to those - /// which don't violate this independence. - /// - /// A RefSCC contains a DAG of actual SCCs. All the nodes within the RefSCC - /// are necessarily within some actual SCC that nests within it. Since - /// a direct call *is* a reference, there will always be at least one RefSCC - /// around any SCC. - class RefSCC { - friend class LazyCallGraph; - friend class LazyCallGraph::Node; - - LazyCallGraph *G; - SmallPtrSet Parents; - - /// A postorder list of the inner SCCs. - SmallVector SCCs; - - /// A map from SCC to index in the postorder list. - SmallDenseMap SCCIndices; - - /// Fast-path constructor. RefSCCs should instead be constructed by calling - /// formRefSCCFast on the graph itself. - RefSCC(LazyCallGraph &G); - - /// Print a short description useful for debugging or logging. - /// - /// We print the SCCs wrapped in '[]'s and skipping the middle SCCs if - /// there are a large number. - // - // Note: this is defined inline to dodge issues with GCC's interpretation - // of enclosing namespaces for friend function declarations. - friend raw_ostream &operator<<(raw_ostream &OS, const RefSCC &RC) { - OS << '['; - int i = 0; - for (LazyCallGraph::SCC &C : RC) { - if (i > 0) - OS << ", "; - // Elide the inner elements if there are too many. - if (i > 4) { - OS << "..., " << *RC.SCCs.back(); - break; - } - OS << C; - ++i; - } - OS << ']'; - return OS; - } - - /// Dump a short description of this RefSCC to stderr. - void dump() const; - -#ifndef NDEBUG - /// Verify invariants about the RefSCC and all its SCCs. - /// - /// This will attempt to validate all of the invariants *within* the - /// RefSCC, but not that it is a strongly connected component of the larger - /// graph. This makes it useful even when partially through an update. - /// - /// Invariants checked: - /// - SCCs and their indices match. - /// - The SCCs list is in fact in post-order. - void verify(); -#endif - - public: - typedef pointee_iterator::const_iterator> iterator; - typedef iterator_range range; - typedef pointee_iterator::const_iterator> - parent_iterator; - - iterator begin() const { return SCCs.begin(); } - iterator end() const { return SCCs.end(); } - - ssize_t size() const { return SCCs.size(); } - - SCC &operator[](int Idx) { return *SCCs[Idx]; } - - iterator find(SCC &C) const { - return SCCs.begin() + SCCIndices.find(&C)->second; - } - - parent_iterator parent_begin() const { return Parents.begin(); } - parent_iterator parent_end() const { return Parents.end(); } - - iterator_range parents() const { - return make_range(parent_begin(), parent_end()); - } - - /// Test if this SCC is a parent of \a C. - bool isParentOf(const RefSCC &C) const { return C.isChildOf(*this); } - - /// Test if this RefSCC is an ancestor of \a C. - bool isAncestorOf(const RefSCC &C) const { return C.isDescendantOf(*this); } - - /// Test if this RefSCC is a child of \a C. - bool isChildOf(const RefSCC &C) const { - return Parents.count(const_cast(&C)); - } - - /// Test if this RefSCC is a descendant of \a C. - bool isDescendantOf(const RefSCC &C) const; - - /// Provide a short name by printing this SCC to a std::string. - /// - /// This copes with the fact that we don't have a name per-se for an SCC - /// while still making the use of this in debugging and logging useful. - std::string getName() const { - std::string Name; - raw_string_ostream OS(Name); - OS << *this; - OS.flush(); - return Name; - } - - ///@{ - /// \name Mutation API - /// - /// These methods provide the core API for updating the call graph in the - /// presence of a (potentially still in-flight) DFS-found SCCs. - /// - /// Note that these methods sometimes have complex runtimes, so be careful - /// how you call them. - - /// Make an existing internal ref edge into a call edge. - /// - /// This may form a larger cycle and thus collapse SCCs into TargetN's SCC. - /// If that happens, the deleted SCC pointers are returned. These SCCs are - /// not in a valid state any longer but the pointers will remain valid - /// until destruction of the parent graph instance for the purpose of - /// clearing cached information. - /// - /// After this operation, both SourceN's SCC and TargetN's SCC may move - /// position within this RefSCC's postorder list. Any SCCs merged are - /// merged into the TargetN's SCC in order to preserve reachability analyses - /// which took place on that SCC. - SmallVector switchInternalEdgeToCall(Node &SourceN, - Node &TargetN); - - /// Make an existing internal call edge into a ref edge. - /// - /// If SourceN and TargetN are part of a single SCC, it may be split up due - /// to breaking a cycle in the call edges that formed it. If that happens, - /// then this routine will insert new SCCs into the postorder list *before* - /// the SCC of TargetN (previously the SCC of both). This preserves - /// postorder as the TargetN can reach all of the other nodes by definition - /// of previously being in a single SCC formed by the cycle from SourceN to - /// TargetN. The newly added nodes are added *immediately* and contiguously - /// prior to the TargetN SCC and so they may be iterated starting from - /// there. - void switchInternalEdgeToRef(Node &SourceN, Node &TargetN); - - /// Make an existing outgoing ref edge into a call edge. - /// - /// Note that this is trivial as there are no cyclic impacts and there - /// remains a reference edge. - void switchOutgoingEdgeToCall(Node &SourceN, Node &TargetN); - - /// Make an existing outgoing call edge into a ref edge. - /// - /// This is trivial as there are no cyclic impacts and there remains - /// a reference edge. - void switchOutgoingEdgeToRef(Node &SourceN, Node &TargetN); - - /// Insert a ref edge from one node in this RefSCC to another in this - /// RefSCC. - /// - /// This is always a trivial operation as it doesn't change any part of the - /// graph structure besides connecting the two nodes. - /// - /// Note that we don't support directly inserting internal *call* edges - /// because that could change the graph structure and requires returning - /// information about what became invalid. As a consequence, the pattern - /// should be to first insert the necessary ref edge, and then to switch it - /// to a call edge if needed and handle any invalidation that results. See - /// the \c switchInternalEdgeToCall routine for details. - void insertInternalRefEdge(Node &SourceN, Node &TargetN); - - /// Insert an edge whose parent is in this RefSCC and child is in some - /// child RefSCC. - /// - /// There must be an existing path from the \p SourceN to the \p TargetN. - /// This operation is inexpensive and does not change the set of SCCs and - /// RefSCCs in the graph. - void insertOutgoingEdge(Node &SourceN, Node &TargetN, Edge::Kind EK); - - /// Insert an edge whose source is in a descendant RefSCC and target is in - /// this RefSCC. - /// - /// There must be an existing path from the target to the source in this - /// case. - /// - /// NB! This is has the potential to be a very expensive function. It - /// inherently forms a cycle in the prior RefSCC DAG and we have to merge - /// RefSCCs to resolve that cycle. But finding all of the RefSCCs which - /// participate in the cycle can in the worst case require traversing every - /// RefSCC in the graph. Every attempt is made to avoid that, but passes - /// must still exercise caution calling this routine repeatedly. - /// - /// Also note that this can only insert ref edges. In order to insert - /// a call edge, first insert a ref edge and then switch it to a call edge. - /// These are intentionally kept as separate interfaces because each step - /// of the operation invalidates a different set of data structures. - /// - /// This returns all the RefSCCs which were merged into the this RefSCC - /// (the target's). This allows callers to invalidate any cached - /// information. - /// - /// FIXME: We could possibly optimize this quite a bit for cases where the - /// caller and callee are very nearby in the graph. See comments in the - /// implementation for details, but that use case might impact users. - SmallVector insertIncomingRefEdge(Node &SourceN, - Node &TargetN); - - /// Remove an edge whose source is in this RefSCC and target is *not*. - /// - /// This removes an inter-RefSCC edge. All inter-RefSCC edges originating - /// from this SCC have been fully explored by any in-flight DFS graph - /// formation, so this is always safe to call once you have the source - /// RefSCC. - /// - /// This operation does not change the cyclic structure of the graph and so - /// is very inexpensive. It may change the connectivity graph of the SCCs - /// though, so be careful calling this while iterating over them. - void removeOutgoingEdge(Node &SourceN, Node &TargetN); - - /// Remove a ref edge which is entirely within this RefSCC. - /// - /// Both the \a SourceN and the \a TargetN must be within this RefSCC. - /// Removing such an edge may break cycles that form this RefSCC and thus - /// this operation may change the RefSCC graph significantly. In - /// particular, this operation will re-form new RefSCCs based on the - /// remaining connectivity of the graph. The following invariants are - /// guaranteed to hold after calling this method: - /// - /// 1) This RefSCC is still a RefSCC in the graph. - /// 2) This RefSCC will be the parent of any new RefSCCs. Thus, this RefSCC - /// is preserved as the root of any new RefSCC DAG formed. - /// 3) No RefSCC other than this RefSCC has its member set changed (this is - /// inherent in the definition of removing such an edge). - /// 4) All of the parent links of the RefSCC graph will be updated to - /// reflect the new RefSCC structure. - /// 5) All RefSCCs formed out of this RefSCC, excluding this RefSCC, will - /// be returned in post-order. - /// 6) The order of the RefSCCs in the vector will be a valid postorder - /// traversal of the new RefSCCs. - /// - /// These invariants are very important to ensure that we can build - /// optimization pipelines on top of the CGSCC pass manager which - /// intelligently update the RefSCC graph without invalidating other parts - /// of the RefSCC graph. - /// - /// Note that we provide no routine to remove a *call* edge. Instead, you - /// must first switch it to a ref edge using \c switchInternalEdgeToRef. - /// This split API is intentional as each of these two steps can invalidate - /// a different aspect of the graph structure and needs to have the - /// invalidation handled independently. - /// - /// The runtime complexity of this method is, in the worst case, O(V+E) - /// where V is the number of nodes in this RefSCC and E is the number of - /// edges leaving the nodes in this RefSCC. Note that E includes both edges - /// within this RefSCC and edges from this RefSCC to child RefSCCs. Some - /// effort has been made to minimize the overhead of common cases such as - /// self-edges and edge removals which result in a spanning tree with no - /// more cycles. There are also detailed comments within the implementation - /// on techniques which could substantially improve this routine's - /// efficiency. - SmallVector removeInternalRefEdge(Node &SourceN, - Node &TargetN); - - ///@} - }; - - /// A post-order depth-first SCC iterator over the call graph. - /// - /// This iterator triggers the Tarjan DFS-based formation of the SCC DAG for - /// the call graph, walking it lazily in depth-first post-order. That is, it - /// always visits SCCs for a callee prior to visiting the SCC for a caller - /// (when they are in different SCCs). - class postorder_ref_scc_iterator - : public iterator_facade_base { - friend class LazyCallGraph; - friend class LazyCallGraph::Node; - - /// Nonce type to select the constructor for the end iterator. - struct IsAtEndT {}; - - LazyCallGraph *G; - RefSCC *C; - - // Build the begin iterator for a node. - postorder_ref_scc_iterator(LazyCallGraph &G) : G(&G) { - C = G.getNextRefSCCInPostOrder(); - } - - // Build the end iterator for a node. This is selected purely by overload. - postorder_ref_scc_iterator(LazyCallGraph &G, IsAtEndT /*Nonce*/) - : G(&G), C(nullptr) {} - - public: - bool operator==(const postorder_ref_scc_iterator &Arg) const { - return G == Arg.G && C == Arg.C; - } - - reference operator*() const { return *C; } - - using iterator_facade_base::operator++; - postorder_ref_scc_iterator &operator++() { - C = G->getNextRefSCCInPostOrder(); - return *this; - } - }; - - /// Construct a graph for the given module. - /// - /// This sets up the graph and computes all of the entry points of the graph. - /// No function definitions are scanned until their nodes in the graph are - /// requested during traversal. - LazyCallGraph(Module &M); - - LazyCallGraph(LazyCallGraph &&G); - LazyCallGraph &operator=(LazyCallGraph &&RHS); - - edge_iterator begin() { - return edge_iterator(EntryEdges.begin(), EntryEdges.end()); - } - edge_iterator end() { - return edge_iterator(EntryEdges.end(), EntryEdges.end()); - } - - postorder_ref_scc_iterator postorder_ref_scc_begin() { - return postorder_ref_scc_iterator(*this); - } - postorder_ref_scc_iterator postorder_ref_scc_end() { - return postorder_ref_scc_iterator(*this, - postorder_ref_scc_iterator::IsAtEndT()); - } - - iterator_range postorder_ref_sccs() { - return make_range(postorder_ref_scc_begin(), postorder_ref_scc_end()); - } - - /// Lookup a function in the graph which has already been scanned and added. - Node *lookup(const Function &F) const { return NodeMap.lookup(&F); } - - /// Lookup a function's SCC in the graph. - /// - /// \returns null if the function hasn't been assigned an SCC via the SCC - /// iterator walk. - SCC *lookupSCC(Node &N) const { return SCCMap.lookup(&N); } - - /// Lookup a function's RefSCC in the graph. - /// - /// \returns null if the function hasn't been assigned a RefSCC via the - /// RefSCC iterator walk. - RefSCC *lookupRefSCC(Node &N) const { - if (SCC *C = lookupSCC(N)) - return &C->getOuterRefSCC(); - - return nullptr; - } - - /// Get a graph node for a given function, scanning it to populate the graph - /// data as necessary. - Node &get(Function &F) { - Node *&N = NodeMap[&F]; - if (N) - return *N; - - return insertInto(F, N); - } - - ///@{ - /// \name Pre-SCC Mutation API - /// - /// These methods are only valid to call prior to forming any SCCs for this - /// call graph. They can be used to update the core node-graph during - /// a node-based inorder traversal that precedes any SCC-based traversal. - /// - /// Once you begin manipulating a call graph's SCCs, you must perform all - /// mutation of the graph via the SCC methods. - - /// Update the call graph after inserting a new edge. - void insertEdge(Node &Caller, Function &Callee, Edge::Kind EK); - - /// Update the call graph after inserting a new edge. - void insertEdge(Function &Caller, Function &Callee, Edge::Kind EK) { - return insertEdge(get(Caller), Callee, EK); - } - - /// Update the call graph after deleting an edge. - void removeEdge(Node &Caller, Function &Callee); - - /// Update the call graph after deleting an edge. - void removeEdge(Function &Caller, Function &Callee) { - return removeEdge(get(Caller), Callee); - } - - ///@} - -private: - typedef SmallVectorImpl::reverse_iterator node_stack_iterator; - typedef iterator_range node_stack_range; - - /// Allocator that holds all the call graph nodes. - SpecificBumpPtrAllocator BPA; - - /// Maps function->node for fast lookup. - DenseMap NodeMap; - - /// The entry nodes to the graph. - /// - /// These nodes are reachable through "external" means. Put another way, they - /// escape at the module scope. - EdgeVectorT EntryEdges; - - /// Map of the entry nodes in the graph to their indices in \c EntryEdges. - DenseMap EntryIndexMap; - - /// Allocator that holds all the call graph SCCs. - SpecificBumpPtrAllocator SCCBPA; - - /// Maps Function -> SCC for fast lookup. - DenseMap SCCMap; - - /// Allocator that holds all the call graph RefSCCs. - SpecificBumpPtrAllocator RefSCCBPA; - - /// The leaf RefSCCs of the graph. - /// - /// These are all of the RefSCCs which have no children. - SmallVector LeafRefSCCs; - - /// Stack of nodes in the DFS walk. - SmallVector, 4> DFSStack; - - /// Set of entry nodes not-yet-processed into RefSCCs. - SmallVector RefSCCEntryNodes; - - /// Stack of nodes the DFS has walked but not yet put into a SCC. - SmallVector PendingRefSCCStack; - - /// Counter for the next DFS number to assign. - int NextDFSNumber; - - /// Helper to insert a new function, with an already looked-up entry in - /// the NodeMap. - Node &insertInto(Function &F, Node *&MappedN); - - /// Helper to update pointers back to the graph object during moves. - void updateGraphPtrs(); - - /// Allocates an SCC and constructs it using the graph allocator. - /// - /// The arguments are forwarded to the constructor. - template SCC *createSCC(Ts &&... Args) { - return new (SCCBPA.Allocate()) SCC(std::forward(Args)...); - } - - /// Allocates a RefSCC and constructs it using the graph allocator. - /// - /// The arguments are forwarded to the constructor. - template RefSCC *createRefSCC(Ts &&... Args) { - return new (RefSCCBPA.Allocate()) RefSCC(std::forward(Args)...); - } - - /// Build the SCCs for a RefSCC out of a list of nodes. - void buildSCCs(RefSCC &RC, node_stack_range Nodes); - - /// Connect a RefSCC into the larger graph. - /// - /// This walks the edges to connect the RefSCC to its children's parent set, - /// and updates the root leaf list. - void connectRefSCC(RefSCC &RC); - - /// Retrieve the next node in the post-order RefSCC walk of the call graph. - RefSCC *getNextRefSCCInPostOrder(); -}; - -inline LazyCallGraph::Edge::Edge() : Value() {} -inline LazyCallGraph::Edge::Edge(Function &F, Kind K) : Value(&F, K) {} -inline LazyCallGraph::Edge::Edge(Node &N, Kind K) : Value(&N, K) {} - -inline LazyCallGraph::Edge::operator bool() const { - return !Value.getPointer().isNull(); -} - -inline bool LazyCallGraph::Edge::isCall() const { - assert(*this && "Queried a null edge!"); - return Value.getInt() == Call; -} - -inline Function &LazyCallGraph::Edge::getFunction() const { - assert(*this && "Queried a null edge!"); - auto P = Value.getPointer(); - if (auto *F = P.dyn_cast()) - return *F; - - return P.get()->getFunction(); -} - -inline LazyCallGraph::Node *LazyCallGraph::Edge::getNode() const { - assert(*this && "Queried a null edge!"); - auto P = Value.getPointer(); - if (auto *N = P.dyn_cast()) - return N; - - return nullptr; -} - -inline LazyCallGraph::Node &LazyCallGraph::Edge::getNode(LazyCallGraph &G) { - assert(*this && "Queried a null edge!"); - auto P = Value.getPointer(); - if (auto *N = P.dyn_cast()) - return *N; - - Node &N = G.get(*P.get()); - Value.setPointer(&N); - return N; -} - -// Provide GraphTraits specializations for call graphs. -template <> struct GraphTraits { - typedef LazyCallGraph::Node NodeType; - typedef LazyCallGraph::edge_iterator ChildIteratorType; - - static NodeType *getEntryNode(NodeType *N) { return N; } - static ChildIteratorType child_begin(NodeType *N) { return N->begin(); } - static ChildIteratorType child_end(NodeType *N) { return N->end(); } -}; -template <> struct GraphTraits { - typedef LazyCallGraph::Node NodeType; - typedef LazyCallGraph::edge_iterator ChildIteratorType; - - static NodeType *getEntryNode(NodeType *N) { return N; } - static ChildIteratorType child_begin(NodeType *N) { return N->begin(); } - static ChildIteratorType child_end(NodeType *N) { return N->end(); } -}; - -/// An analysis pass which computes the call graph for a module. -class LazyCallGraphAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// Inform generic clients of the result type. - typedef LazyCallGraph Result; - - /// Compute the \c LazyCallGraph for the module \c M. - /// - /// This just builds the set of entry points to the call graph. The rest is - /// built lazily as it is walked. - LazyCallGraph run(Module &M, ModuleAnalysisManager &) { - return LazyCallGraph(M); - } -}; - -/// A pass which prints the call graph to a \c raw_ostream. -/// -/// This is primarily useful for testing the analysis. -class LazyCallGraphPrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit LazyCallGraphPrinterPass(raw_ostream &OS); - - PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); -}; - -/// A pass which prints the call graph as a DOT file to a \c raw_ostream. -/// -/// This is primarily useful for visualization purposes. -class LazyCallGraphDOTPrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit LazyCallGraphDOTPrinterPass(raw_ostream &OS); - - PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); -}; -} - -#endif diff --git a/llvm/include/llvm/Analysis/LazyValueInfo.h b/llvm/include/llvm/Analysis/LazyValueInfo.h deleted file mode 100644 index c85cf2c5..00000000 --- a/llvm/include/llvm/Analysis/LazyValueInfo.h +++ /dev/null @@ -1,141 +0,0 @@ -//===- LazyValueInfo.h - Value constraint analysis --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the interface for lazy computation of value constraint -// information. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LAZYVALUEINFO_H -#define LLVM_ANALYSIS_LAZYVALUEINFO_H - -#include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" - -namespace llvm { - class AssumptionCache; - class Constant; - class ConstantRange; - class DataLayout; - class DominatorTree; - class Instruction; - class TargetLibraryInfo; - class Value; - -/// This pass computes, caches, and vends lazy value constraint information. -class LazyValueInfo { - friend class LazyValueInfoWrapperPass; - AssumptionCache *AC = nullptr; - class TargetLibraryInfo *TLI = nullptr; - DominatorTree *DT = nullptr; - void *PImpl = nullptr; - LazyValueInfo(const LazyValueInfo&) = delete; - void operator=(const LazyValueInfo&) = delete; -public: - ~LazyValueInfo(); - LazyValueInfo() {} - LazyValueInfo(AssumptionCache *AC_, TargetLibraryInfo *TLI_, - DominatorTree *DT_) - : AC(AC_), TLI(TLI_), DT(DT_) {} - LazyValueInfo(LazyValueInfo &&Arg) - : AC(Arg.AC), TLI(Arg.TLI), DT(Arg.DT), PImpl(Arg.PImpl) { - Arg.PImpl = nullptr; - } - LazyValueInfo &operator=(LazyValueInfo &&Arg) { - releaseMemory(); - AC = Arg.AC; - TLI = Arg.TLI; - DT = Arg.DT; - PImpl = Arg.PImpl; - Arg.PImpl = nullptr; - return *this; - } - - /// This is used to return true/false/dunno results. - enum Tristate { - Unknown = -1, False = 0, True = 1 - }; - - // Public query interface. - - /// Determine whether the specified value comparison with a constant is known - /// to be true or false on the specified CFG edge. - /// Pred is a CmpInst predicate. - Tristate getPredicateOnEdge(unsigned Pred, Value *V, Constant *C, - BasicBlock *FromBB, BasicBlock *ToBB, - Instruction *CxtI = nullptr); - - /// Determine whether the specified value comparison with a constant is known - /// to be true or false at the specified instruction - /// (from an assume intrinsic). Pred is a CmpInst predicate. - Tristate getPredicateAt(unsigned Pred, Value *V, Constant *C, - Instruction *CxtI); - - /// Determine whether the specified value is known to be a - /// constant at the end of the specified block. Return null if not. - Constant *getConstant(Value *V, BasicBlock *BB, Instruction *CxtI = nullptr); - - /// Return the ConstantRange constraint that is known to hold for the - /// specified value at the end of the specified block. This may only be called - /// on integer-typed Values. - ConstantRange getConstantRange(Value *V, BasicBlock *BB, Instruction *CxtI = nullptr); - - /// Determine whether the specified value is known to be a - /// constant on the specified edge. Return null if not. - Constant *getConstantOnEdge(Value *V, BasicBlock *FromBB, BasicBlock *ToBB, - Instruction *CxtI = nullptr); - - /// Inform the analysis cache that we have threaded an edge from - /// PredBB to OldSucc to be from PredBB to NewSucc instead. - void threadEdge(BasicBlock *PredBB, BasicBlock *OldSucc, BasicBlock *NewSucc); - - /// Inform the analysis cache that we have erased a block. - void eraseBlock(BasicBlock *BB); - - // For old PM pass. Delete once LazyValueInfoWrapperPass is gone. - void releaseMemory(); -}; - -/// \brief Analysis to compute lazy value information. -class LazyValueAnalysis : public AnalysisInfoMixin { -public: - typedef LazyValueInfo Result; - Result run(Function &F, FunctionAnalysisManager &FAM); - -private: - static char PassID; - friend struct AnalysisInfoMixin; -}; - -/// Wrapper around LazyValueInfo. -class LazyValueInfoWrapperPass : public FunctionPass { - LazyValueInfoWrapperPass(const LazyValueInfoWrapperPass&) = delete; - void operator=(const LazyValueInfoWrapperPass&) = delete; -public: - static char ID; - LazyValueInfoWrapperPass() : FunctionPass(ID) { - initializeLazyValueInfoWrapperPassPass(*PassRegistry::getPassRegistry()); - } - ~LazyValueInfoWrapperPass() override { - assert(!Info.PImpl && "releaseMemory not called"); - } - - LazyValueInfo &getLVI(); - - void getAnalysisUsage(AnalysisUsage &AU) const override; - void releaseMemory() override; - bool runOnFunction(Function &F) override; -private: - LazyValueInfo Info; -}; - -} // end namespace llvm - -#endif - diff --git a/llvm/include/llvm/Analysis/Lint.h b/llvm/include/llvm/Analysis/Lint.h deleted file mode 100644 index 7c88b137..00000000 --- a/llvm/include/llvm/Analysis/Lint.h +++ /dev/null @@ -1,49 +0,0 @@ -//===-- llvm/Analysis/Lint.h - LLVM IR Lint ---------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines lint interfaces that can be used for some sanity checking -// of input to the system, and for checking that transformations -// haven't done something bad. In contrast to the Verifier, the Lint checker -// checks for undefined behavior or constructions with likely unintended -// behavior. -// -// To see what specifically is checked, look at Lint.cpp -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LINT_H -#define LLVM_ANALYSIS_LINT_H - -namespace llvm { - -class FunctionPass; -class Module; -class Function; - -/// @brief Create a lint pass. -/// -/// Check a module or function. -FunctionPass *createLintPass(); - -/// @brief Check a module. -/// -/// This should only be used for debugging, because it plays games with -/// PassManagers and stuff. -void lintModule( - const Module &M ///< The module to be checked -); - -// lintFunction - Check a function. -void lintFunction( - const Function &F ///< The function to be checked -); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/Loads.h b/llvm/include/llvm/Analysis/Loads.h deleted file mode 100644 index 39f80f48..00000000 --- a/llvm/include/llvm/Analysis/Loads.h +++ /dev/null @@ -1,97 +0,0 @@ -//===- Loads.h - Local load analysis --------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares simple local analyses for load instructions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOADS_H -#define LLVM_ANALYSIS_LOADS_H - -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/Support/CommandLine.h" - -namespace llvm { - -class DataLayout; -class MDNode; - -/// isDereferenceablePointer - Return true if this is always a dereferenceable -/// pointer. If the context instruction is specified perform context-sensitive -/// analysis and return true if the pointer is dereferenceable at the -/// specified instruction. -bool isDereferenceablePointer(const Value *V, const DataLayout &DL, - const Instruction *CtxI = nullptr, - const DominatorTree *DT = nullptr); - -/// Returns true if V is always a dereferenceable pointer with alignment -/// greater or equal than requested. If the context instruction is specified -/// performs context-sensitive analysis and returns true if the pointer is -/// dereferenceable at the specified instruction. -bool isDereferenceableAndAlignedPointer(const Value *V, unsigned Align, - const DataLayout &DL, - const Instruction *CtxI = nullptr, - const DominatorTree *DT = nullptr); - -/// isSafeToLoadUnconditionally - Return true if we know that executing a load -/// from this value cannot trap. -/// -/// If DT and ScanFrom are specified this method performs context-sensitive -/// analysis and returns true if it is safe to load immediately before ScanFrom. -/// -/// If it is not obviously safe to load from the specified pointer, we do a -/// quick local scan of the basic block containing ScanFrom, to determine if -/// the address is already accessed. -bool isSafeToLoadUnconditionally(Value *V, unsigned Align, - const DataLayout &DL, - Instruction *ScanFrom = nullptr, - const DominatorTree *DT = nullptr); - -/// DefMaxInstsToScan - the default number of maximum instructions -/// to scan in the block, used by FindAvailableLoadedValue(). -extern cl::opt DefMaxInstsToScan; - -/// \brief Scan backwards to see if we have the value of the given load -/// available locally within a small number of instructions. -/// -/// You can use this function to scan across multiple blocks: after you call -/// this function, if ScanFrom points at the beginning of the block, it's safe -/// to continue scanning the predecessors. -/// -/// Note that performing load CSE requires special care to make sure the -/// metadata is set appropriately. In particular, aliasing metadata needs -/// to be merged. (This doesn't matter for store-to-load forwarding because -/// the only relevant load gets deleted.) -/// -/// \param Load The load we want to replace. -/// \param ScanBB The basic block to scan. FIXME: This is redundant. -/// \param [in,out] ScanFrom The location to start scanning from. When this -/// function returns, it points at the last instruction scanned. -/// \param MaxInstsToScan The maximum number of instructions to scan. If this -/// is zero, the whole block will be scanned. -/// \param AA Optional pointer to alias analysis, to make the scan more -/// precise. -/// \param [out] AATags The aliasing metadata for the operation which produced -/// the value. FIXME: This is basically useless. -/// \param [out] IsLoadCSE Whether the returned value is a load from the same -/// location in memory, as opposed to the value operand of a store. -/// -/// \returns The found value, or nullptr if no value is found. -Value *FindAvailableLoadedValue(LoadInst *Load, - BasicBlock *ScanBB, - BasicBlock::iterator &ScanFrom, - unsigned MaxInstsToScan = DefMaxInstsToScan, - AliasAnalysis *AA = nullptr, - AAMDNodes *AATags = nullptr, - bool *IsLoadCSE = nullptr); - -} - -#endif diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h deleted file mode 100644 index 619fab28..00000000 --- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h +++ /dev/null @@ -1,806 +0,0 @@ -//===- llvm/Analysis/LoopAccessAnalysis.h -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the interface for the loop memory dependence framework that -// was originally developed for the Loop Vectorizer. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOOPACCESSANALYSIS_H -#define LLVM_ANALYSIS_LOOPACCESSANALYSIS_H - -#include "llvm/ADT/EquivalenceClasses.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/SetVector.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/AliasSetTracker.h" -#include "llvm/Analysis/ScalarEvolutionExpressions.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Pass.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { - -class Value; -class DataLayout; -class ScalarEvolution; -class Loop; -class SCEV; -class SCEVUnionPredicate; -class LoopAccessInfo; - -/// Optimization analysis message produced during vectorization. Messages inform -/// the user why vectorization did not occur. -class LoopAccessReport { - std::string Message; - const Instruction *Instr; - -protected: - LoopAccessReport(const Twine &Message, const Instruction *I) - : Message(Message.str()), Instr(I) {} - -public: - LoopAccessReport(const Instruction *I = nullptr) : Instr(I) {} - - template LoopAccessReport &operator<<(const A &Value) { - raw_string_ostream Out(Message); - Out << Value; - return *this; - } - - const Instruction *getInstr() const { return Instr; } - - std::string &str() { return Message; } - const std::string &str() const { return Message; } - operator Twine() { return Message; } - - /// \brief Emit an analysis note for \p PassName with the debug location from - /// the instruction in \p Message if available. Otherwise use the location of - /// \p TheLoop. - static void emitAnalysis(const LoopAccessReport &Message, - const Function *TheFunction, - const Loop *TheLoop, - const char *PassName); -}; - -/// \brief Collection of parameters shared beetween the Loop Vectorizer and the -/// Loop Access Analysis. -struct VectorizerParams { - /// \brief Maximum SIMD width. - static const unsigned MaxVectorWidth; - - /// \brief VF as overridden by the user. - static unsigned VectorizationFactor; - /// \brief Interleave factor as overridden by the user. - static unsigned VectorizationInterleave; - /// \brief True if force-vector-interleave was specified by the user. - static bool isInterleaveForced(); - - /// \\brief When performing memory disambiguation checks at runtime do not - /// make more than this number of comparisons. - static unsigned RuntimeMemoryCheckThreshold; -}; - -/// \brief Checks memory dependences among accesses to the same underlying -/// object to determine whether there vectorization is legal or not (and at -/// which vectorization factor). -/// -/// Note: This class will compute a conservative dependence for access to -/// different underlying pointers. Clients, such as the loop vectorizer, will -/// sometimes deal these potential dependencies by emitting runtime checks. -/// -/// We use the ScalarEvolution framework to symbolically evalutate access -/// functions pairs. Since we currently don't restructure the loop we can rely -/// on the program order of memory accesses to determine their safety. -/// At the moment we will only deem accesses as safe for: -/// * A negative constant distance assuming program order. -/// -/// Safe: tmp = a[i + 1]; OR a[i + 1] = x; -/// a[i] = tmp; y = a[i]; -/// -/// The latter case is safe because later checks guarantuee that there can't -/// be a cycle through a phi node (that is, we check that "x" and "y" is not -/// the same variable: a header phi can only be an induction or a reduction, a -/// reduction can't have a memory sink, an induction can't have a memory -/// source). This is important and must not be violated (or we have to -/// resort to checking for cycles through memory). -/// -/// * A positive constant distance assuming program order that is bigger -/// than the biggest memory access. -/// -/// tmp = a[i] OR b[i] = x -/// a[i+2] = tmp y = b[i+2]; -/// -/// Safe distance: 2 x sizeof(a[0]), and 2 x sizeof(b[0]), respectively. -/// -/// * Zero distances and all accesses have the same size. -/// -class MemoryDepChecker { -public: - typedef PointerIntPair MemAccessInfo; - typedef SmallPtrSet MemAccessInfoSet; - /// \brief Set of potential dependent memory accesses. - typedef EquivalenceClasses DepCandidates; - - /// \brief Dependece between memory access instructions. - struct Dependence { - /// \brief The type of the dependence. - enum DepType { - // No dependence. - NoDep, - // We couldn't determine the direction or the distance. - Unknown, - // Lexically forward. - // - // FIXME: If we only have loop-independent forward dependences (e.g. a - // read and write of A[i]), LAA will locally deem the dependence "safe" - // without querying the MemoryDepChecker. Therefore we can miss - // enumerating loop-independent forward dependences in - // getDependences. Note that as soon as there are different - // indices used to access the same array, the MemoryDepChecker *is* - // queried and the dependence list is complete. - Forward, - // Forward, but if vectorized, is likely to prevent store-to-load - // forwarding. - ForwardButPreventsForwarding, - // Lexically backward. - Backward, - // Backward, but the distance allows a vectorization factor of - // MaxSafeDepDistBytes. - BackwardVectorizable, - // Same, but may prevent store-to-load forwarding. - BackwardVectorizableButPreventsForwarding - }; - - /// \brief String version of the types. - static const char *DepName[]; - - /// \brief Index of the source of the dependence in the InstMap vector. - unsigned Source; - /// \brief Index of the destination of the dependence in the InstMap vector. - unsigned Destination; - /// \brief The type of the dependence. - DepType Type; - - Dependence(unsigned Source, unsigned Destination, DepType Type) - : Source(Source), Destination(Destination), Type(Type) {} - - /// \brief Return the source instruction of the dependence. - Instruction *getSource(const LoopAccessInfo &LAI) const; - /// \brief Return the destination instruction of the dependence. - Instruction *getDestination(const LoopAccessInfo &LAI) const; - - /// \brief Dependence types that don't prevent vectorization. - static bool isSafeForVectorization(DepType Type); - - /// \brief Lexically forward dependence. - bool isForward() const; - /// \brief Lexically backward dependence. - bool isBackward() const; - - /// \brief May be a lexically backward dependence type (includes Unknown). - bool isPossiblyBackward() const; - - /// \brief Print the dependence. \p Instr is used to map the instruction - /// indices to instructions. - void print(raw_ostream &OS, unsigned Depth, - const SmallVectorImpl &Instrs) const; - }; - - MemoryDepChecker(PredicatedScalarEvolution &PSE, const Loop *L) - : PSE(PSE), InnermostLoop(L), AccessIdx(0), - ShouldRetryWithRuntimeCheck(false), SafeForVectorization(true), - RecordDependences(true) {} - - /// \brief Register the location (instructions are given increasing numbers) - /// of a write access. - void addAccess(StoreInst *SI) { - Value *Ptr = SI->getPointerOperand(); - Accesses[MemAccessInfo(Ptr, true)].push_back(AccessIdx); - InstMap.push_back(SI); - ++AccessIdx; - } - - /// \brief Register the location (instructions are given increasing numbers) - /// of a write access. - void addAccess(LoadInst *LI) { - Value *Ptr = LI->getPointerOperand(); - Accesses[MemAccessInfo(Ptr, false)].push_back(AccessIdx); - InstMap.push_back(LI); - ++AccessIdx; - } - - /// \brief Check whether the dependencies between the accesses are safe. - /// - /// Only checks sets with elements in \p CheckDeps. - bool areDepsSafe(DepCandidates &AccessSets, MemAccessInfoSet &CheckDeps, - const ValueToValueMap &Strides); - - /// \brief No memory dependence was encountered that would inhibit - /// vectorization. - bool isSafeForVectorization() const { return SafeForVectorization; } - - /// \brief The maximum number of bytes of a vector register we can vectorize - /// the accesses safely with. - uint64_t getMaxSafeDepDistBytes() { return MaxSafeDepDistBytes; } - - /// \brief In same cases when the dependency check fails we can still - /// vectorize the loop with a dynamic array access check. - bool shouldRetryWithRuntimeCheck() { return ShouldRetryWithRuntimeCheck; } - - /// \brief Returns the memory dependences. If null is returned we exceeded - /// the MaxDependences threshold and this information is not - /// available. - const SmallVectorImpl *getDependences() const { - return RecordDependences ? &Dependences : nullptr; - } - - void clearDependences() { Dependences.clear(); } - - /// \brief The vector of memory access instructions. The indices are used as - /// instruction identifiers in the Dependence class. - const SmallVectorImpl &getMemoryInstructions() const { - return InstMap; - } - - /// \brief Generate a mapping between the memory instructions and their - /// indices according to program order. - DenseMap generateInstructionOrderMap() const { - DenseMap OrderMap; - - for (unsigned I = 0; I < InstMap.size(); ++I) - OrderMap[InstMap[I]] = I; - - return OrderMap; - } - - /// \brief Find the set of instructions that read or write via \p Ptr. - SmallVector getInstructionsForAccess(Value *Ptr, - bool isWrite) const; - -private: - /// A wrapper around ScalarEvolution, used to add runtime SCEV checks, and - /// applies dynamic knowledge to simplify SCEV expressions and convert them - /// to a more usable form. We need this in case assumptions about SCEV - /// expressions need to be made in order to avoid unknown dependences. For - /// example we might assume a unit stride for a pointer in order to prove - /// that a memory access is strided and doesn't wrap. - PredicatedScalarEvolution &PSE; - const Loop *InnermostLoop; - - /// \brief Maps access locations (ptr, read/write) to program order. - DenseMap > Accesses; - - /// \brief Memory access instructions in program order. - SmallVector InstMap; - - /// \brief The program order index to be used for the next instruction. - unsigned AccessIdx; - - // We can access this many bytes in parallel safely. - uint64_t MaxSafeDepDistBytes; - - /// \brief If we see a non-constant dependence distance we can still try to - /// vectorize this loop with runtime checks. - bool ShouldRetryWithRuntimeCheck; - - /// \brief No memory dependence was encountered that would inhibit - /// vectorization. - bool SafeForVectorization; - - //// \brief True if Dependences reflects the dependences in the - //// loop. If false we exceeded MaxDependences and - //// Dependences is invalid. - bool RecordDependences; - - /// \brief Memory dependences collected during the analysis. Only valid if - /// RecordDependences is true. - SmallVector Dependences; - - /// \brief Check whether there is a plausible dependence between the two - /// accesses. - /// - /// Access \p A must happen before \p B in program order. The two indices - /// identify the index into the program order map. - /// - /// This function checks whether there is a plausible dependence (or the - /// absence of such can't be proved) between the two accesses. If there is a - /// plausible dependence but the dependence distance is bigger than one - /// element access it records this distance in \p MaxSafeDepDistBytes (if this - /// distance is smaller than any other distance encountered so far). - /// Otherwise, this function returns true signaling a possible dependence. - Dependence::DepType isDependent(const MemAccessInfo &A, unsigned AIdx, - const MemAccessInfo &B, unsigned BIdx, - const ValueToValueMap &Strides); - - /// \brief Check whether the data dependence could prevent store-load - /// forwarding. - /// - /// \return false if we shouldn't vectorize at all or avoid larger - /// vectorization factors by limiting MaxSafeDepDistBytes. - bool couldPreventStoreLoadForward(uint64_t Distance, uint64_t TypeByteSize); -}; - -/// \brief Holds information about the memory runtime legality checks to verify -/// that a group of pointers do not overlap. -class RuntimePointerChecking { -public: - struct PointerInfo { - /// Holds the pointer value that we need to check. - TrackingVH PointerValue; - /// Holds the smallest byte address accessed by the pointer throughout all - /// iterations of the loop. - const SCEV *Start; - /// Holds the largest byte address accessed by the pointer throughout all - /// iterations of the loop, plus 1. - const SCEV *End; - /// Holds the information if this pointer is used for writing to memory. - bool IsWritePtr; - /// Holds the id of the set of pointers that could be dependent because of a - /// shared underlying object. - unsigned DependencySetId; - /// Holds the id of the disjoint alias set to which this pointer belongs. - unsigned AliasSetId; - /// SCEV for the access. - const SCEV *Expr; - - PointerInfo(Value *PointerValue, const SCEV *Start, const SCEV *End, - bool IsWritePtr, unsigned DependencySetId, unsigned AliasSetId, - const SCEV *Expr) - : PointerValue(PointerValue), Start(Start), End(End), - IsWritePtr(IsWritePtr), DependencySetId(DependencySetId), - AliasSetId(AliasSetId), Expr(Expr) {} - }; - - RuntimePointerChecking(ScalarEvolution *SE) : Need(false), SE(SE) {} - - /// Reset the state of the pointer runtime information. - void reset() { - Need = false; - Pointers.clear(); - Checks.clear(); - } - - /// Insert a pointer and calculate the start and end SCEVs. - /// We need \p PSE in order to compute the SCEV expression of the pointer - /// according to the assumptions that we've made during the analysis. - /// The method might also version the pointer stride according to \p Strides, - /// and add new predicates to \p PSE. - void insert(Loop *Lp, Value *Ptr, bool WritePtr, unsigned DepSetId, - unsigned ASId, const ValueToValueMap &Strides, - PredicatedScalarEvolution &PSE); - - /// \brief No run-time memory checking is necessary. - bool empty() const { return Pointers.empty(); } - - /// A grouping of pointers. A single memcheck is required between - /// two groups. - struct CheckingPtrGroup { - /// \brief Create a new pointer checking group containing a single - /// pointer, with index \p Index in RtCheck. - CheckingPtrGroup(unsigned Index, RuntimePointerChecking &RtCheck) - : RtCheck(RtCheck), High(RtCheck.Pointers[Index].End), - Low(RtCheck.Pointers[Index].Start) { - Members.push_back(Index); - } - - /// \brief Tries to add the pointer recorded in RtCheck at index - /// \p Index to this pointer checking group. We can only add a pointer - /// to a checking group if we will still be able to get - /// the upper and lower bounds of the check. Returns true in case - /// of success, false otherwise. - bool addPointer(unsigned Index); - - /// Constitutes the context of this pointer checking group. For each - /// pointer that is a member of this group we will retain the index - /// at which it appears in RtCheck. - RuntimePointerChecking &RtCheck; - /// The SCEV expression which represents the upper bound of all the - /// pointers in this group. - const SCEV *High; - /// The SCEV expression which represents the lower bound of all the - /// pointers in this group. - const SCEV *Low; - /// Indices of all the pointers that constitute this grouping. - SmallVector Members; - }; - - /// \brief A memcheck which made up of a pair of grouped pointers. - /// - /// These *have* to be const for now, since checks are generated from - /// CheckingPtrGroups in LAI::addRuntimeChecks which is a const member - /// function. FIXME: once check-generation is moved inside this class (after - /// the PtrPartition hack is removed), we could drop const. - typedef std::pair - PointerCheck; - - /// \brief Generate the checks and store it. This also performs the grouping - /// of pointers to reduce the number of memchecks necessary. - void generateChecks(MemoryDepChecker::DepCandidates &DepCands, - bool UseDependencies); - - /// \brief Returns the checks that generateChecks created. - const SmallVector &getChecks() const { return Checks; } - - /// \brief Decide if we need to add a check between two groups of pointers, - /// according to needsChecking. - bool needsChecking(const CheckingPtrGroup &M, - const CheckingPtrGroup &N) const; - - /// \brief Returns the number of run-time checks required according to - /// needsChecking. - unsigned getNumberOfChecks() const { return Checks.size(); } - - /// \brief Print the list run-time memory checks necessary. - void print(raw_ostream &OS, unsigned Depth = 0) const; - - /// Print \p Checks. - void printChecks(raw_ostream &OS, const SmallVectorImpl &Checks, - unsigned Depth = 0) const; - - /// This flag indicates if we need to add the runtime check. - bool Need; - - /// Information about the pointers that may require checking. - SmallVector Pointers; - - /// Holds a partitioning of pointers into "check groups". - SmallVector CheckingGroups; - - /// \brief Check if pointers are in the same partition - /// - /// \p PtrToPartition contains the partition number for pointers (-1 if the - /// pointer belongs to multiple partitions). - static bool - arePointersInSamePartition(const SmallVectorImpl &PtrToPartition, - unsigned PtrIdx1, unsigned PtrIdx2); - - /// \brief Decide whether we need to issue a run-time check for pointer at - /// index \p I and \p J to prove their independence. - bool needsChecking(unsigned I, unsigned J) const; - - /// \brief Return PointerInfo for pointer at index \p PtrIdx. - const PointerInfo &getPointerInfo(unsigned PtrIdx) const { - return Pointers[PtrIdx]; - } - -private: - /// \brief Groups pointers such that a single memcheck is required - /// between two different groups. This will clear the CheckingGroups vector - /// and re-compute it. We will only group dependecies if \p UseDependencies - /// is true, otherwise we will create a separate group for each pointer. - void groupChecks(MemoryDepChecker::DepCandidates &DepCands, - bool UseDependencies); - - /// Generate the checks and return them. - SmallVector - generateChecks() const; - - /// Holds a pointer to the ScalarEvolution analysis. - ScalarEvolution *SE; - - /// \brief Set of run-time checks required to establish independence of - /// otherwise may-aliasing pointers in the loop. - SmallVector Checks; -}; - -/// \brief Drive the analysis of memory accesses in the loop -/// -/// This class is responsible for analyzing the memory accesses of a loop. It -/// collects the accesses and then its main helper the AccessAnalysis class -/// finds and categorizes the dependences in buildDependenceSets. -/// -/// For memory dependences that can be analyzed at compile time, it determines -/// whether the dependence is part of cycle inhibiting vectorization. This work -/// is delegated to the MemoryDepChecker class. -/// -/// For memory dependences that cannot be determined at compile time, it -/// generates run-time checks to prove independence. This is done by -/// AccessAnalysis::canCheckPtrAtRT and the checks are maintained by the -/// RuntimePointerCheck class. -/// -/// If pointers can wrap or can't be expressed as affine AddRec expressions by -/// ScalarEvolution, we will generate run-time checks by emitting a -/// SCEVUnionPredicate. -/// -/// Checks for both memory dependences and the SCEV predicates contained in the -/// PSE must be emitted in order for the results of this analysis to be valid. -class LoopAccessInfo { -public: - LoopAccessInfo(Loop *L, ScalarEvolution *SE, const TargetLibraryInfo *TLI, - AliasAnalysis *AA, DominatorTree *DT, LoopInfo *LI); - - // FIXME: - // Hack for MSVC 2013 which sems like it can't synthesize this even - // with default keyword: - // LoopAccessInfo(LoopAccessInfo &&LAI) = default; - LoopAccessInfo(LoopAccessInfo &&LAI) - : PSE(std::move(LAI.PSE)), PtrRtChecking(std::move(LAI.PtrRtChecking)), - DepChecker(std::move(LAI.DepChecker)), TheLoop(LAI.TheLoop), - NumLoads(LAI.NumLoads), NumStores(LAI.NumStores), - MaxSafeDepDistBytes(LAI.MaxSafeDepDistBytes), CanVecMem(LAI.CanVecMem), - StoreToLoopInvariantAddress(LAI.StoreToLoopInvariantAddress), - Report(std::move(LAI.Report)), - SymbolicStrides(std::move(LAI.SymbolicStrides)), - StrideSet(std::move(LAI.StrideSet)) {} - // LoopAccessInfo &operator=(LoopAccessInfo &&LAI) = default; - LoopAccessInfo &operator=(LoopAccessInfo &&LAI) { - assert(this != &LAI); - - PSE = std::move(LAI.PSE); - PtrRtChecking = std::move(LAI.PtrRtChecking); - DepChecker = std::move(LAI.DepChecker); - TheLoop = LAI.TheLoop; - NumLoads = LAI.NumLoads; - NumStores = LAI.NumStores; - MaxSafeDepDistBytes = LAI.MaxSafeDepDistBytes; - CanVecMem = LAI.CanVecMem; - StoreToLoopInvariantAddress = LAI.StoreToLoopInvariantAddress; - Report = std::move(LAI.Report); - SymbolicStrides = std::move(LAI.SymbolicStrides); - StrideSet = std::move(LAI.StrideSet); - return *this; - } - - /// Return true we can analyze the memory accesses in the loop and there are - /// no memory dependence cycles. - bool canVectorizeMemory() const { return CanVecMem; } - - const RuntimePointerChecking *getRuntimePointerChecking() const { - return PtrRtChecking.get(); - } - - /// \brief Number of memchecks required to prove independence of otherwise - /// may-alias pointers. - unsigned getNumRuntimePointerChecks() const { - return PtrRtChecking->getNumberOfChecks(); - } - - /// Return true if the block BB needs to be predicated in order for the loop - /// to be vectorized. - static bool blockNeedsPredication(BasicBlock *BB, Loop *TheLoop, - DominatorTree *DT); - - /// Returns true if the value V is uniform within the loop. - bool isUniform(Value *V) const; - - uint64_t getMaxSafeDepDistBytes() const { return MaxSafeDepDistBytes; } - unsigned getNumStores() const { return NumStores; } - unsigned getNumLoads() const { return NumLoads;} - - /// \brief Add code that checks at runtime if the accessed arrays overlap. - /// - /// Returns a pair of instructions where the first element is the first - /// instruction generated in possibly a sequence of instructions and the - /// second value is the final comparator value or NULL if no check is needed. - std::pair - addRuntimeChecks(Instruction *Loc) const; - - /// \brief Generete the instructions for the checks in \p PointerChecks. - /// - /// Returns a pair of instructions where the first element is the first - /// instruction generated in possibly a sequence of instructions and the - /// second value is the final comparator value or NULL if no check is needed. - std::pair - addRuntimeChecks(Instruction *Loc, - const SmallVectorImpl - &PointerChecks) const; - - /// \brief The diagnostics report generated for the analysis. E.g. why we - /// couldn't analyze the loop. - const Optional &getReport() const { return Report; } - - /// \brief the Memory Dependence Checker which can determine the - /// loop-independent and loop-carried dependences between memory accesses. - const MemoryDepChecker &getDepChecker() const { return *DepChecker; } - - /// \brief Return the list of instructions that use \p Ptr to read or write - /// memory. - SmallVector getInstructionsForAccess(Value *Ptr, - bool isWrite) const { - return DepChecker->getInstructionsForAccess(Ptr, isWrite); - } - - /// \brief If an access has a symbolic strides, this maps the pointer value to - /// the stride symbol. - const ValueToValueMap &getSymbolicStrides() const { return SymbolicStrides; } - - /// \brief Pointer has a symbolic stride. - bool hasStride(Value *V) const { return StrideSet.count(V); } - - /// \brief Print the information about the memory accesses in the loop. - void print(raw_ostream &OS, unsigned Depth = 0) const; - - /// \brief Checks existence of store to invariant address inside loop. - /// If the loop has any store to invariant address, then it returns true, - /// else returns false. - bool hasStoreToLoopInvariantAddress() const { - return StoreToLoopInvariantAddress; - } - - /// Used to add runtime SCEV checks. Simplifies SCEV expressions and converts - /// them to a more usable form. All SCEV expressions during the analysis - /// should be re-written (and therefore simplified) according to PSE. - /// A user of LoopAccessAnalysis will need to emit the runtime checks - /// associated with this predicate. - const PredicatedScalarEvolution &getPSE() const { return *PSE; } - -private: - /// \brief Analyze the loop. - void analyzeLoop(AliasAnalysis *AA, LoopInfo *LI, - const TargetLibraryInfo *TLI, DominatorTree *DT); - - /// \brief Check if the structure of the loop allows it to be analyzed by this - /// pass. - bool canAnalyzeLoop(); - - void emitAnalysis(LoopAccessReport &Message); - - /// \brief Collect memory access with loop invariant strides. - /// - /// Looks for accesses like "a[i * StrideA]" where "StrideA" is loop - /// invariant. - void collectStridedAccess(Value *LoadOrStoreInst); - - std::unique_ptr PSE; - - /// We need to check that all of the pointers in this list are disjoint - /// at runtime. Using std::unique_ptr to make using move ctor simpler. - std::unique_ptr PtrRtChecking; - - /// \brief the Memory Dependence Checker which can determine the - /// loop-independent and loop-carried dependences between memory accesses. - std::unique_ptr DepChecker; - - Loop *TheLoop; - - unsigned NumLoads; - unsigned NumStores; - - uint64_t MaxSafeDepDistBytes; - - /// \brief Cache the result of analyzeLoop. - bool CanVecMem; - - /// \brief Indicator for storing to uniform addresses. - /// If a loop has write to a loop invariant address then it should be true. - bool StoreToLoopInvariantAddress; - - /// \brief The diagnostics report generated for the analysis. E.g. why we - /// couldn't analyze the loop. - Optional Report; - - /// \brief If an access has a symbolic strides, this maps the pointer value to - /// the stride symbol. - ValueToValueMap SymbolicStrides; - - /// \brief Set of symbolic strides values. - SmallPtrSet StrideSet; -}; - -Value *stripIntegerCast(Value *V); - -/// \brief Return the SCEV corresponding to a pointer with the symbolic stride -/// replaced with constant one, assuming the SCEV predicate associated with -/// \p PSE is true. -/// -/// If necessary this method will version the stride of the pointer according -/// to \p PtrToStride and therefore add further predicates to \p PSE. -/// -/// If \p OrigPtr is not null, use it to look up the stride value instead of \p -/// Ptr. \p PtrToStride provides the mapping between the pointer value and its -/// stride as collected by LoopVectorizationLegality::collectStridedAccess. -const SCEV *replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE, - const ValueToValueMap &PtrToStride, - Value *Ptr, Value *OrigPtr = nullptr); - -/// \brief If the pointer has a constant stride return it in units of its -/// element size. Otherwise return zero. -/// -/// Ensure that it does not wrap in the address space, assuming the predicate -/// associated with \p PSE is true. -/// -/// If necessary this method will version the stride of the pointer according -/// to \p PtrToStride and therefore add further predicates to \p PSE. -/// The \p Assume parameter indicates if we are allowed to make additional -/// run-time assumptions. -int64_t getPtrStride(PredicatedScalarEvolution &PSE, Value *Ptr, const Loop *Lp, - const ValueToValueMap &StridesMap = ValueToValueMap(), - bool Assume = false); - -/// \brief Returns true if the memory operations \p A and \p B are consecutive. -/// This is a simple API that does not depend on the analysis pass. -bool isConsecutiveAccess(Value *A, Value *B, const DataLayout &DL, - ScalarEvolution &SE, bool CheckType = true); - -/// \brief This analysis provides dependence information for the memory accesses -/// of a loop. -/// -/// It runs the analysis for a loop on demand. This can be initiated by -/// querying the loop access info via LAA::getInfo. getInfo return a -/// LoopAccessInfo object. See this class for the specifics of what information -/// is provided. -class LoopAccessLegacyAnalysis : public FunctionPass { -public: - static char ID; - - LoopAccessLegacyAnalysis() : FunctionPass(ID) { - initializeLoopAccessLegacyAnalysisPass(*PassRegistry::getPassRegistry()); - } - - bool runOnFunction(Function &F) override; - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - /// \brief Query the result of the loop access information for the loop \p L. - /// - /// If there is no cached result available run the analysis. - const LoopAccessInfo &getInfo(Loop *L); - - void releaseMemory() override { - // Invalidate the cache when the pass is freed. - LoopAccessInfoMap.clear(); - } - - /// \brief Print the result of the analysis when invoked with -analyze. - void print(raw_ostream &OS, const Module *M = nullptr) const override; - -private: - /// \brief The cache. - DenseMap> LoopAccessInfoMap; - - // The used analysis passes. - ScalarEvolution *SE; - const TargetLibraryInfo *TLI; - AliasAnalysis *AA; - DominatorTree *DT; - LoopInfo *LI; -}; - -/// \brief This analysis provides dependence information for the memory -/// accesses of a loop. -/// -/// It runs the analysis for a loop on demand. This can be initiated by -/// querying the loop access info via AM.getResult. -/// getResult return a LoopAccessInfo object. See this class for the -/// specifics of what information is provided. -class LoopAccessAnalysis - : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef LoopAccessInfo Result; - Result run(Loop &, AnalysisManager &); - static StringRef name() { return "LoopAccessAnalysis"; } -}; - -/// \brief Printer pass for the \c LoopAccessInfo results. -class LoopAccessInfoPrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit LoopAccessInfoPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Loop &L, AnalysisManager &AM); -}; - -inline Instruction *MemoryDepChecker::Dependence::getSource( - const LoopAccessInfo &LAI) const { - return LAI.getDepChecker().getMemoryInstructions()[Source]; -} - -inline Instruction *MemoryDepChecker::Dependence::getDestination( - const LoopAccessInfo &LAI) const { - return LAI.getDepChecker().getMemoryInstructions()[Destination]; -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h deleted file mode 100644 index 35dc6bcb..00000000 --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ /dev/null @@ -1,834 +0,0 @@ -//===- llvm/Analysis/LoopInfo.h - Natural Loop Calculator -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the LoopInfo class that is used to identify natural loops -// and determine the loop depth of various nodes of the CFG. A natural loop -// has exactly one entry-point, which is called the header. Note that natural -// loops may actually be several loops that share the same header node. -// -// This analysis calculates the nesting structure of loops in a function. For -// each natural loop identified, this analysis identifies natural loops -// contained entirely within the loop and the basic blocks the make up the loop. -// -// It can calculate on the fly various bits of information, for example: -// -// * whether there is a preheader for the loop -// * the number of back edges to the header -// * whether or not a particular block branches out of the loop -// * the successor blocks of the loop -// * the loop depth -// * etc... -// -// Note that this analysis specifically identifies *Loops* not cycles or SCCs -// in the CFG. There can be strongly connected compontents in the CFG which -// this analysis will not recognize and that will not be represented by a Loop -// instance. In particular, a Loop might be inside such a non-loop SCC, or a -// non-loop SCC might contain a sub-SCC which is a Loop. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOOPINFO_H -#define LLVM_ANALYSIS_LOOPINFO_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/CFG.h" -#include "llvm/IR/Instruction.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -class DominatorTree; -class LoopInfo; -class Loop; -class MDNode; -class PHINode; -class raw_ostream; -template class DominatorTreeBase; -template class LoopInfoBase; -template class LoopBase; - -//===----------------------------------------------------------------------===// -/// Instances of this class are used to represent loops that are detected in the -/// flow graph. -/// -template -class LoopBase { - LoopT *ParentLoop; - // Loops contained entirely within this one. - std::vector SubLoops; - - // The list of blocks in this loop. First entry is the header node. - std::vector Blocks; - - SmallPtrSet DenseBlockSet; - - /// Indicator that this loop is no longer a valid loop. - bool IsInvalid = false; - - LoopBase(const LoopBase &) = delete; - const LoopBase& - operator=(const LoopBase &) = delete; -public: - /// This creates an empty loop. - LoopBase() : ParentLoop(nullptr) {} - ~LoopBase() { - for (size_t i = 0, e = SubLoops.size(); i != e; ++i) - delete SubLoops[i]; - } - - /// Return the nesting level of this loop. An outer-most loop has depth 1, - /// for consistency with loop depth values used for basic blocks, where depth - /// 0 is used for blocks not inside any loops. - unsigned getLoopDepth() const { - unsigned D = 1; - for (const LoopT *CurLoop = ParentLoop; CurLoop; - CurLoop = CurLoop->ParentLoop) - ++D; - return D; - } - BlockT *getHeader() const { return Blocks.front(); } - LoopT *getParentLoop() const { return ParentLoop; } - - /// This is a raw interface for bypassing addChildLoop. - void setParentLoop(LoopT *L) { ParentLoop = L; } - - /// Return true if the specified loop is contained within in this loop. - bool contains(const LoopT *L) const { - if (L == this) return true; - if (!L) return false; - return contains(L->getParentLoop()); - } - - /// Return true if the specified basic block is in this loop. - bool contains(const BlockT *BB) const { - return DenseBlockSet.count(BB); - } - - /// Return true if the specified instruction is in this loop. - template - bool contains(const InstT *Inst) const { - return contains(Inst->getParent()); - } - - /// Return the loops contained entirely within this loop. - const std::vector &getSubLoops() const { return SubLoops; } - std::vector &getSubLoopsVector() { return SubLoops; } - typedef typename std::vector::const_iterator iterator; - typedef typename std::vector::const_reverse_iterator - reverse_iterator; - iterator begin() const { return SubLoops.begin(); } - iterator end() const { return SubLoops.end(); } - reverse_iterator rbegin() const { return SubLoops.rbegin(); } - reverse_iterator rend() const { return SubLoops.rend(); } - bool empty() const { return SubLoops.empty(); } - - /// Get a list of the basic blocks which make up this loop. - const std::vector &getBlocks() const { return Blocks; } - typedef typename std::vector::const_iterator block_iterator; - block_iterator block_begin() const { return Blocks.begin(); } - block_iterator block_end() const { return Blocks.end(); } - inline iterator_range blocks() const { - return make_range(block_begin(), block_end()); - } - - /// Get the number of blocks in this loop in constant time. - unsigned getNumBlocks() const { - return Blocks.size(); - } - - /// Invalidate the loop, indicating that it is no longer a loop. - void invalidate() { IsInvalid = true; } - - /// Return true if this loop is no longer valid. - bool isInvalid() { return IsInvalid; } - - /// True if terminator in the block can branch to another block that is - /// outside of the current loop. - bool isLoopExiting(const BlockT *BB) const { - typedef GraphTraits BlockTraits; - for (typename BlockTraits::ChildIteratorType SI = - BlockTraits::child_begin(BB), - SE = BlockTraits::child_end(BB); SI != SE; ++SI) { - if (!contains(*SI)) - return true; - } - return false; - } - - /// Calculate the number of back edges to the loop header. - unsigned getNumBackEdges() const { - unsigned NumBackEdges = 0; - BlockT *H = getHeader(); - - typedef GraphTraits > InvBlockTraits; - for (typename InvBlockTraits::ChildIteratorType I = - InvBlockTraits::child_begin(H), - E = InvBlockTraits::child_end(H); I != E; ++I) - if (contains(*I)) - ++NumBackEdges; - - return NumBackEdges; - } - - //===--------------------------------------------------------------------===// - // APIs for simple analysis of the loop. - // - // Note that all of these methods can fail on general loops (ie, there may not - // be a preheader, etc). For best success, the loop simplification and - // induction variable canonicalization pass should be used to normalize loops - // for easy analysis. These methods assume canonical loops. - - /// Return all blocks inside the loop that have successors outside of the - /// loop. These are the blocks _inside of the current loop_ which branch out. - /// The returned list is always unique. - void getExitingBlocks(SmallVectorImpl &ExitingBlocks) const; - - /// If getExitingBlocks would return exactly one block, return that block. - /// Otherwise return null. - BlockT *getExitingBlock() const; - - /// Return all of the successor blocks of this loop. These are the blocks - /// _outside of the current loop_ which are branched to. - void getExitBlocks(SmallVectorImpl &ExitBlocks) const; - - /// If getExitBlocks would return exactly one block, return that block. - /// Otherwise return null. - BlockT *getExitBlock() const; - - /// Edge type. - typedef std::pair Edge; - - /// Return all pairs of (_inside_block_,_outside_block_). - void getExitEdges(SmallVectorImpl &ExitEdges) const; - - /// If there is a preheader for this loop, return it. A loop has a preheader - /// if there is only one edge to the header of the loop from outside of the - /// loop. If this is the case, the block branching to the header of the loop - /// is the preheader node. - /// - /// This method returns null if there is no preheader for the loop. - BlockT *getLoopPreheader() const; - - /// If the given loop's header has exactly one unique predecessor outside the - /// loop, return it. Otherwise return null. - /// This is less strict that the loop "preheader" concept, which requires - /// the predecessor to have exactly one successor. - BlockT *getLoopPredecessor() const; - - /// If there is a single latch block for this loop, return it. - /// A latch block is a block that contains a branch back to the header. - BlockT *getLoopLatch() const; - - /// Return all loop latch blocks of this loop. A latch block is a block that - /// contains a branch back to the header. - void getLoopLatches(SmallVectorImpl &LoopLatches) const { - BlockT *H = getHeader(); - typedef GraphTraits > InvBlockTraits; - for (typename InvBlockTraits::ChildIteratorType I = - InvBlockTraits::child_begin(H), - E = InvBlockTraits::child_end(H); I != E; ++I) - if (contains(*I)) - LoopLatches.push_back(*I); - } - - //===--------------------------------------------------------------------===// - // APIs for updating loop information after changing the CFG - // - - /// This method is used by other analyses to update loop information. - /// NewBB is set to be a new member of the current loop. - /// Because of this, it is added as a member of all parent loops, and is added - /// to the specified LoopInfo object as being in the current basic block. It - /// is not valid to replace the loop header with this method. - void addBasicBlockToLoop(BlockT *NewBB, LoopInfoBase &LI); - - /// This is used when splitting loops up. It replaces the OldChild entry in - /// our children list with NewChild, and updates the parent pointer of - /// OldChild to be null and the NewChild to be this loop. - /// This updates the loop depth of the new child. - void replaceChildLoopWith(LoopT *OldChild, LoopT *NewChild); - - /// Add the specified loop to be a child of this loop. - /// This updates the loop depth of the new child. - void addChildLoop(LoopT *NewChild) { - assert(!NewChild->ParentLoop && "NewChild already has a parent!"); - NewChild->ParentLoop = static_cast(this); - SubLoops.push_back(NewChild); - } - - /// This removes the specified child from being a subloop of this loop. The - /// loop is not deleted, as it will presumably be inserted into another loop. - LoopT *removeChildLoop(iterator I) { - assert(I != SubLoops.end() && "Cannot remove end iterator!"); - LoopT *Child = *I; - assert(Child->ParentLoop == this && "Child is not a child of this loop!"); - SubLoops.erase(SubLoops.begin()+(I-begin())); - Child->ParentLoop = nullptr; - return Child; - } - - /// This adds a basic block directly to the basic block list. - /// This should only be used by transformations that create new loops. Other - /// transformations should use addBasicBlockToLoop. - void addBlockEntry(BlockT *BB) { - Blocks.push_back(BB); - DenseBlockSet.insert(BB); - } - - /// interface to reverse Blocks[from, end of loop] in this loop - void reverseBlock(unsigned from) { - std::reverse(Blocks.begin() + from, Blocks.end()); - } - - /// interface to do reserve() for Blocks - void reserveBlocks(unsigned size) { - Blocks.reserve(size); - } - - /// This method is used to move BB (which must be part of this loop) to be the - /// loop header of the loop (the block that dominates all others). - void moveToHeader(BlockT *BB) { - if (Blocks[0] == BB) return; - for (unsigned i = 0; ; ++i) { - assert(i != Blocks.size() && "Loop does not contain BB!"); - if (Blocks[i] == BB) { - Blocks[i] = Blocks[0]; - Blocks[0] = BB; - return; - } - } - } - - /// This removes the specified basic block from the current loop, updating the - /// Blocks as appropriate. This does not update the mapping in the LoopInfo - /// class. - void removeBlockFromLoop(BlockT *BB) { - auto I = std::find(Blocks.begin(), Blocks.end(), BB); - assert(I != Blocks.end() && "N is not in this list!"); - Blocks.erase(I); - - DenseBlockSet.erase(BB); - } - - /// Verify loop structure - void verifyLoop() const; - - /// Verify loop structure of this loop and all nested loops. - void verifyLoopNest(DenseSet *Loops) const; - - void print(raw_ostream &OS, unsigned Depth = 0) const; - -protected: - friend class LoopInfoBase; - explicit LoopBase(BlockT *BB) : ParentLoop(nullptr) { - Blocks.push_back(BB); - DenseBlockSet.insert(BB); - } -}; - -template -raw_ostream& operator<<(raw_ostream &OS, const LoopBase &Loop) { - Loop.print(OS); - return OS; -} - -// Implementation in LoopInfoImpl.h -extern template class LoopBase; - - -/// Represents a single loop in the control flow graph. Note that not all SCCs -/// in the CFG are neccessarily loops. -class Loop : public LoopBase { -public: - Loop() {} - - /// Return true if the specified value is loop invariant. - bool isLoopInvariant(const Value *V) const; - - /// Return true if all the operands of the specified instruction are loop - /// invariant. - bool hasLoopInvariantOperands(const Instruction *I) const; - - /// If the given value is an instruction inside of the loop and it can be - /// hoisted, do so to make it trivially loop-invariant. - /// Return true if the value after any hoisting is loop invariant. This - /// function can be used as a slightly more aggressive replacement for - /// isLoopInvariant. - /// - /// If InsertPt is specified, it is the point to hoist instructions to. - /// If null, the terminator of the loop preheader is used. - bool makeLoopInvariant(Value *V, bool &Changed, - Instruction *InsertPt = nullptr) const; - - /// If the given instruction is inside of the loop and it can be hoisted, do - /// so to make it trivially loop-invariant. - /// Return true if the instruction after any hoisting is loop invariant. This - /// function can be used as a slightly more aggressive replacement for - /// isLoopInvariant. - /// - /// If InsertPt is specified, it is the point to hoist instructions to. - /// If null, the terminator of the loop preheader is used. - /// - bool makeLoopInvariant(Instruction *I, bool &Changed, - Instruction *InsertPt = nullptr) const; - - /// Check to see if the loop has a canonical induction variable: an integer - /// recurrence that starts at 0 and increments by one each time through the - /// loop. If so, return the phi node that corresponds to it. - /// - /// The IndVarSimplify pass transforms loops to have a canonical induction - /// variable. - /// - PHINode *getCanonicalInductionVariable() const; - - /// Return true if the Loop is in LCSSA form. - bool isLCSSAForm(DominatorTree &DT) const; - - /// Return true if this Loop and all inner subloops are in LCSSA form. - bool isRecursivelyLCSSAForm(DominatorTree &DT) const; - - /// Return true if the Loop is in the form that the LoopSimplify form - /// transforms loops to, which is sometimes called normal form. - bool isLoopSimplifyForm() const; - - /// Return true if the loop body is safe to clone in practice. - bool isSafeToClone() const; - - /// Returns true if the loop is annotated parallel. - /// - /// A parallel loop can be assumed to not contain any dependencies between - /// iterations by the compiler. That is, any loop-carried dependency checking - /// can be skipped completely when parallelizing the loop on the target - /// machine. Thus, if the parallel loop information originates from the - /// programmer, e.g. via the OpenMP parallel for pragma, it is the - /// programmer's responsibility to ensure there are no loop-carried - /// dependencies. The final execution order of the instructions across - /// iterations is not guaranteed, thus, the end result might or might not - /// implement actual concurrent execution of instructions across multiple - /// iterations. - bool isAnnotatedParallel() const; - - /// Return the llvm.loop loop id metadata node for this loop if it is present. - /// - /// If this loop contains the same llvm.loop metadata on each branch to the - /// header then the node is returned. If any latch instruction does not - /// contain llvm.loop or or if multiple latches contain different nodes then - /// 0 is returned. - MDNode *getLoopID() const; - /// Set the llvm.loop loop id metadata for this loop. - /// - /// The LoopID metadata node will be added to each terminator instruction in - /// the loop that branches to the loop header. - /// - /// The LoopID metadata node should have one or more operands and the first - /// operand should should be the node itself. - void setLoopID(MDNode *LoopID) const; - - /// Return true if no exit block for the loop has a predecessor that is - /// outside the loop. - bool hasDedicatedExits() const; - - /// Return all unique successor blocks of this loop. - /// These are the blocks _outside of the current loop_ which are branched to. - /// This assumes that loop exits are in canonical form. - void getUniqueExitBlocks(SmallVectorImpl &ExitBlocks) const; - - /// If getUniqueExitBlocks would return exactly one block, return that block. - /// Otherwise return null. - BasicBlock *getUniqueExitBlock() const; - - void dump() const; - - /// Return the debug location of the start of this loop. - /// This looks for a BB terminating instruction with a known debug - /// location by looking at the preheader and header blocks. If it - /// cannot find a terminating instruction with location information, - /// it returns an unknown location. - DebugLoc getStartLoc() const; - - StringRef getName() const { - if (BasicBlock *Header = getHeader()) - if (Header->hasName()) - return Header->getName(); - return ""; - } - -private: - friend class LoopInfoBase; - explicit Loop(BasicBlock *BB) : LoopBase(BB) {} -}; - -//===----------------------------------------------------------------------===// -/// This class builds and contains all of the top-level loop -/// structures in the specified function. -/// - -template -class LoopInfoBase { - // BBMap - Mapping of basic blocks to the inner most loop they occur in - DenseMap BBMap; - std::vector TopLevelLoops; - std::vector RemovedLoops; - - friend class LoopBase; - friend class LoopInfo; - - void operator=(const LoopInfoBase &) = delete; - LoopInfoBase(const LoopInfoBase &) = delete; -public: - LoopInfoBase() { } - ~LoopInfoBase() { releaseMemory(); } - - LoopInfoBase(LoopInfoBase &&Arg) - : BBMap(std::move(Arg.BBMap)), - TopLevelLoops(std::move(Arg.TopLevelLoops)) { - // We have to clear the arguments top level loops as we've taken ownership. - Arg.TopLevelLoops.clear(); - } - LoopInfoBase &operator=(LoopInfoBase &&RHS) { - BBMap = std::move(RHS.BBMap); - - for (auto *L : TopLevelLoops) - delete L; - TopLevelLoops = std::move(RHS.TopLevelLoops); - RHS.TopLevelLoops.clear(); - return *this; - } - - void releaseMemory() { - BBMap.clear(); - - for (auto *L : TopLevelLoops) - delete L; - TopLevelLoops.clear(); - for (auto *L : RemovedLoops) - delete L; - RemovedLoops.clear(); - } - - /// iterator/begin/end - The interface to the top-level loops in the current - /// function. - /// - typedef typename std::vector::const_iterator iterator; - typedef typename std::vector::const_reverse_iterator - reverse_iterator; - iterator begin() const { return TopLevelLoops.begin(); } - iterator end() const { return TopLevelLoops.end(); } - reverse_iterator rbegin() const { return TopLevelLoops.rbegin(); } - reverse_iterator rend() const { return TopLevelLoops.rend(); } - bool empty() const { return TopLevelLoops.empty(); } - - /// Return the inner most loop that BB lives in. If a basic block is in no - /// loop (for example the entry node), null is returned. - LoopT *getLoopFor(const BlockT *BB) const { return BBMap.lookup(BB); } - - /// Same as getLoopFor. - const LoopT *operator[](const BlockT *BB) const { - return getLoopFor(BB); - } - - /// Return the loop nesting level of the specified block. A depth of 0 means - /// the block is not inside any loop. - unsigned getLoopDepth(const BlockT *BB) const { - const LoopT *L = getLoopFor(BB); - return L ? L->getLoopDepth() : 0; - } - - // True if the block is a loop header node - bool isLoopHeader(const BlockT *BB) const { - const LoopT *L = getLoopFor(BB); - return L && L->getHeader() == BB; - } - - /// This removes the specified top-level loop from this loop info object. - /// The loop is not deleted, as it will presumably be inserted into - /// another loop. - LoopT *removeLoop(iterator I) { - assert(I != end() && "Cannot remove end iterator!"); - LoopT *L = *I; - assert(!L->getParentLoop() && "Not a top-level loop!"); - TopLevelLoops.erase(TopLevelLoops.begin() + (I-begin())); - return L; - } - - /// Change the top-level loop that contains BB to the specified loop. - /// This should be used by transformations that restructure the loop hierarchy - /// tree. - void changeLoopFor(BlockT *BB, LoopT *L) { - if (!L) { - BBMap.erase(BB); - return; - } - BBMap[BB] = L; - } - - /// Replace the specified loop in the top-level loops list with the indicated - /// loop. - void changeTopLevelLoop(LoopT *OldLoop, - LoopT *NewLoop) { - auto I = std::find(TopLevelLoops.begin(), TopLevelLoops.end(), OldLoop); - assert(I != TopLevelLoops.end() && "Old loop not at top level!"); - *I = NewLoop; - assert(!NewLoop->ParentLoop && !OldLoop->ParentLoop && - "Loops already embedded into a subloop!"); - } - - /// This adds the specified loop to the collection of top-level loops. - void addTopLevelLoop(LoopT *New) { - assert(!New->getParentLoop() && "Loop already in subloop!"); - TopLevelLoops.push_back(New); - } - - /// This method completely removes BB from all data structures, - /// including all of the Loop objects it is nested in and our mapping from - /// BasicBlocks to loops. - void removeBlock(BlockT *BB) { - auto I = BBMap.find(BB); - if (I != BBMap.end()) { - for (LoopT *L = I->second; L; L = L->getParentLoop()) - L->removeBlockFromLoop(BB); - - BBMap.erase(I); - } - } - - // Internals - - static bool isNotAlreadyContainedIn(const LoopT *SubLoop, - const LoopT *ParentLoop) { - if (!SubLoop) return true; - if (SubLoop == ParentLoop) return false; - return isNotAlreadyContainedIn(SubLoop->getParentLoop(), ParentLoop); - } - - /// Create the loop forest using a stable algorithm. - void analyze(const DominatorTreeBase &DomTree); - - // Debugging - void print(raw_ostream &OS) const; - - void verify() const; -}; - -// Implementation in LoopInfoImpl.h -extern template class LoopInfoBase; - -class LoopInfo : public LoopInfoBase { - typedef LoopInfoBase BaseT; - - friend class LoopBase; - - void operator=(const LoopInfo &) = delete; - LoopInfo(const LoopInfo &) = delete; -public: - LoopInfo() {} - explicit LoopInfo(const DominatorTreeBase &DomTree); - - LoopInfo(LoopInfo &&Arg) : BaseT(std::move(static_cast(Arg))) {} - LoopInfo &operator=(LoopInfo &&RHS) { - BaseT::operator=(std::move(static_cast(RHS))); - return *this; - } - - // Most of the public interface is provided via LoopInfoBase. - - /// Update LoopInfo after removing the last backedge from a loop. This updates - /// the loop forest and parent loops for each block so that \c L is no longer - /// referenced, but does not actually delete \c L immediately. The pointer - /// will remain valid until this LoopInfo's memory is released. - void markAsRemoved(Loop *L); - - /// Returns true if replacing From with To everywhere is guaranteed to - /// preserve LCSSA form. - bool replacementPreservesLCSSAForm(Instruction *From, Value *To) { - // Preserving LCSSA form is only problematic if the replacing value is an - // instruction. - Instruction *I = dyn_cast(To); - if (!I) return true; - // If both instructions are defined in the same basic block then replacement - // cannot break LCSSA form. - if (I->getParent() == From->getParent()) - return true; - // If the instruction is not defined in a loop then it can safely replace - // anything. - Loop *ToLoop = getLoopFor(I->getParent()); - if (!ToLoop) return true; - // If the replacing instruction is defined in the same loop as the original - // instruction, or in a loop that contains it as an inner loop, then using - // it as a replacement will not break LCSSA form. - return ToLoop->contains(getLoopFor(From->getParent())); - } - - /// Checks if moving a specific instruction can break LCSSA in any loop. - /// - /// Return true if moving \p Inst to before \p NewLoc will break LCSSA, - /// assuming that the function containing \p Inst and \p NewLoc is currently - /// in LCSSA form. - bool movementPreservesLCSSAForm(Instruction *Inst, Instruction *NewLoc) { - assert(Inst->getFunction() == NewLoc->getFunction() && - "Can't reason about IPO!"); - - auto *OldBB = Inst->getParent(); - auto *NewBB = NewLoc->getParent(); - - // Movement within the same loop does not break LCSSA (the equality check is - // to avoid doing a hashtable lookup in case of intra-block movement). - if (OldBB == NewBB) - return true; - - auto *OldLoop = getLoopFor(OldBB); - auto *NewLoop = getLoopFor(NewBB); - - if (OldLoop == NewLoop) - return true; - - // Check if Outer contains Inner; with the null loop counting as the - // "outermost" loop. - auto Contains = [](const Loop *Outer, const Loop *Inner) { - return !Outer || Outer->contains(Inner); - }; - - // To check that the movement of Inst to before NewLoc does not break LCSSA, - // we need to check two sets of uses for possible LCSSA violations at - // NewLoc: the users of NewInst, and the operands of NewInst. - - // If we know we're hoisting Inst out of an inner loop to an outer loop, - // then the uses *of* Inst don't need to be checked. - - if (!Contains(NewLoop, OldLoop)) { - for (Use &U : Inst->uses()) { - auto *UI = cast(U.getUser()); - auto *UBB = isa(UI) ? cast(UI)->getIncomingBlock(U) - : UI->getParent(); - if (UBB != NewBB && getLoopFor(UBB) != NewLoop) - return false; - } - } - - // If we know we're sinking Inst from an outer loop into an inner loop, then - // the *operands* of Inst don't need to be checked. - - if (!Contains(OldLoop, NewLoop)) { - // See below on why we can't handle phi nodes here. - if (isa(Inst)) - return false; - - for (Use &U : Inst->operands()) { - auto *DefI = dyn_cast(U.get()); - if (!DefI) - return false; - - // This would need adjustment if we allow Inst to be a phi node -- the - // new use block won't simply be NewBB. - - auto *DefBlock = DefI->getParent(); - if (DefBlock != NewBB && getLoopFor(DefBlock) != NewLoop) - return false; - } - } - - return true; - } -}; - -// Allow clients to walk the list of nested loops... -template <> struct GraphTraits { - typedef const Loop NodeType; - typedef LoopInfo::iterator ChildIteratorType; - - static NodeType *getEntryNode(const Loop *L) { return L; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->end(); - } -}; - -template <> struct GraphTraits { - typedef Loop NodeType; - typedef LoopInfo::iterator ChildIteratorType; - - static NodeType *getEntryNode(Loop *L) { return L; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->end(); - } -}; - -/// \brief Analysis pass that exposes the \c LoopInfo for a function. -class LoopAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef LoopInfo Result; - - LoopInfo run(Function &F, AnalysisManager &AM); -}; - -/// \brief Printer pass for the \c LoopAnalysis results. -class LoopPrinterPass : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit LoopPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -/// \brief The legacy pass manager's analysis pass to compute loop information. -class LoopInfoWrapperPass : public FunctionPass { - LoopInfo LI; - -public: - static char ID; // Pass identification, replacement for typeid - - LoopInfoWrapperPass() : FunctionPass(ID) { - initializeLoopInfoWrapperPassPass(*PassRegistry::getPassRegistry()); - } - - LoopInfo &getLoopInfo() { return LI; } - const LoopInfo &getLoopInfo() const { return LI; } - - /// \brief Calculate the natural loop information for a given function. - bool runOnFunction(Function &F) override; - - void verifyAnalysis() const override; - - void releaseMemory() override { LI.releaseMemory(); } - - void print(raw_ostream &O, const Module *M = nullptr) const override; - - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -/// \brief Pass for printing a loop's contents as LLVM's text IR assembly. -class PrintLoopPass : public PassInfoMixin { - raw_ostream &OS; - std::string Banner; - -public: - PrintLoopPass(); - PrintLoopPass(raw_ostream &OS, const std::string &Banner = ""); - - PreservedAnalyses run(Loop &L, AnalysisManager &); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/LoopInfoImpl.h b/llvm/include/llvm/Analysis/LoopInfoImpl.h deleted file mode 100644 index 816a1545..00000000 --- a/llvm/include/llvm/Analysis/LoopInfoImpl.h +++ /dev/null @@ -1,540 +0,0 @@ -//===- llvm/Analysis/LoopInfoImpl.h - Natural Loop Calculator ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This is the generic implementation of LoopInfo used for both Loops and -// MachineLoops. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOOPINFOIMPL_H -#define LLVM_ANALYSIS_LOOPINFOIMPL_H - -#include "llvm/ADT/DepthFirstIterator.h" -#include "llvm/ADT/PostOrderIterator.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/IR/Dominators.h" - -namespace llvm { - -//===----------------------------------------------------------------------===// -// APIs for simple analysis of the loop. See header notes. - -/// getExitingBlocks - Return all blocks inside the loop that have successors -/// outside of the loop. These are the blocks _inside of the current loop_ -/// which branch out. The returned list is always unique. -/// -template -void LoopBase:: -getExitingBlocks(SmallVectorImpl &ExitingBlocks) const { - typedef GraphTraits BlockTraits; - for (block_iterator BI = block_begin(), BE = block_end(); BI != BE; ++BI) - for (typename BlockTraits::ChildIteratorType I = - BlockTraits::child_begin(*BI), E = BlockTraits::child_end(*BI); - I != E; ++I) - if (!contains(*I)) { - // Not in current loop? It must be an exit block. - ExitingBlocks.push_back(*BI); - break; - } -} - -/// getExitingBlock - If getExitingBlocks would return exactly one block, -/// return that block. Otherwise return null. -template -BlockT *LoopBase::getExitingBlock() const { - SmallVector ExitingBlocks; - getExitingBlocks(ExitingBlocks); - if (ExitingBlocks.size() == 1) - return ExitingBlocks[0]; - return nullptr; -} - -/// getExitBlocks - Return all of the successor blocks of this loop. These -/// are the blocks _outside of the current loop_ which are branched to. -/// -template -void LoopBase:: -getExitBlocks(SmallVectorImpl &ExitBlocks) const { - typedef GraphTraits BlockTraits; - for (block_iterator BI = block_begin(), BE = block_end(); BI != BE; ++BI) - for (typename BlockTraits::ChildIteratorType I = - BlockTraits::child_begin(*BI), E = BlockTraits::child_end(*BI); - I != E; ++I) - if (!contains(*I)) - // Not in current loop? It must be an exit block. - ExitBlocks.push_back(*I); -} - -/// getExitBlock - If getExitBlocks would return exactly one block, -/// return that block. Otherwise return null. -template -BlockT *LoopBase::getExitBlock() const { - SmallVector ExitBlocks; - getExitBlocks(ExitBlocks); - if (ExitBlocks.size() == 1) - return ExitBlocks[0]; - return nullptr; -} - -/// getExitEdges - Return all pairs of (_inside_block_,_outside_block_). -template -void LoopBase:: -getExitEdges(SmallVectorImpl &ExitEdges) const { - typedef GraphTraits BlockTraits; - for (block_iterator BI = block_begin(), BE = block_end(); BI != BE; ++BI) - for (typename BlockTraits::ChildIteratorType I = - BlockTraits::child_begin(*BI), E = BlockTraits::child_end(*BI); - I != E; ++I) - if (!contains(*I)) - // Not in current loop? It must be an exit block. - ExitEdges.push_back(Edge(*BI, *I)); -} - -/// getLoopPreheader - If there is a preheader for this loop, return it. A -/// loop has a preheader if there is only one edge to the header of the loop -/// from outside of the loop. If this is the case, the block branching to the -/// header of the loop is the preheader node. -/// -/// This method returns null if there is no preheader for the loop. -/// -template -BlockT *LoopBase::getLoopPreheader() const { - // Keep track of nodes outside the loop branching to the header... - BlockT *Out = getLoopPredecessor(); - if (!Out) return nullptr; - - // Make sure there is only one exit out of the preheader. - typedef GraphTraits BlockTraits; - typename BlockTraits::ChildIteratorType SI = BlockTraits::child_begin(Out); - ++SI; - if (SI != BlockTraits::child_end(Out)) - return nullptr; // Multiple exits from the block, must not be a preheader. - - // The predecessor has exactly one successor, so it is a preheader. - return Out; -} - -/// getLoopPredecessor - If the given loop's header has exactly one unique -/// predecessor outside the loop, return it. Otherwise return null. -/// This is less strict that the loop "preheader" concept, which requires -/// the predecessor to have exactly one successor. -/// -template -BlockT *LoopBase::getLoopPredecessor() const { - // Keep track of nodes outside the loop branching to the header... - BlockT *Out = nullptr; - - // Loop over the predecessors of the header node... - BlockT *Header = getHeader(); - typedef GraphTraits > InvBlockTraits; - for (typename InvBlockTraits::ChildIteratorType PI = - InvBlockTraits::child_begin(Header), - PE = InvBlockTraits::child_end(Header); PI != PE; ++PI) { - typename InvBlockTraits::NodeType *N = *PI; - if (!contains(N)) { // If the block is not in the loop... - if (Out && Out != N) - return nullptr; // Multiple predecessors outside the loop - Out = N; - } - } - - // Make sure there is only one exit out of the preheader. - assert(Out && "Header of loop has no predecessors from outside loop?"); - return Out; -} - -/// getLoopLatch - If there is a single latch block for this loop, return it. -/// A latch block is a block that contains a branch back to the header. -template -BlockT *LoopBase::getLoopLatch() const { - BlockT *Header = getHeader(); - typedef GraphTraits > InvBlockTraits; - typename InvBlockTraits::ChildIteratorType PI = - InvBlockTraits::child_begin(Header); - typename InvBlockTraits::ChildIteratorType PE = - InvBlockTraits::child_end(Header); - BlockT *Latch = nullptr; - for (; PI != PE; ++PI) { - typename InvBlockTraits::NodeType *N = *PI; - if (contains(N)) { - if (Latch) return nullptr; - Latch = N; - } - } - - return Latch; -} - -//===----------------------------------------------------------------------===// -// APIs for updating loop information after changing the CFG -// - -/// addBasicBlockToLoop - This method is used by other analyses to update loop -/// information. NewBB is set to be a new member of the current loop. -/// Because of this, it is added as a member of all parent loops, and is added -/// to the specified LoopInfo object as being in the current basic block. It -/// is not valid to replace the loop header with this method. -/// -template -void LoopBase:: -addBasicBlockToLoop(BlockT *NewBB, LoopInfoBase &LIB) { - assert((Blocks.empty() || LIB[getHeader()] == this) && - "Incorrect LI specified for this loop!"); - assert(NewBB && "Cannot add a null basic block to the loop!"); - assert(!LIB[NewBB] && "BasicBlock already in the loop!"); - - LoopT *L = static_cast(this); - - // Add the loop mapping to the LoopInfo object... - LIB.BBMap[NewBB] = L; - - // Add the basic block to this loop and all parent loops... - while (L) { - L->addBlockEntry(NewBB); - L = L->getParentLoop(); - } -} - -/// replaceChildLoopWith - This is used when splitting loops up. It replaces -/// the OldChild entry in our children list with NewChild, and updates the -/// parent pointer of OldChild to be null and the NewChild to be this loop. -/// This updates the loop depth of the new child. -template -void LoopBase:: -replaceChildLoopWith(LoopT *OldChild, LoopT *NewChild) { - assert(OldChild->ParentLoop == this && "This loop is already broken!"); - assert(!NewChild->ParentLoop && "NewChild already has a parent!"); - typename std::vector::iterator I = - std::find(SubLoops.begin(), SubLoops.end(), OldChild); - assert(I != SubLoops.end() && "OldChild not in loop!"); - *I = NewChild; - OldChild->ParentLoop = nullptr; - NewChild->ParentLoop = static_cast(this); -} - -/// verifyLoop - Verify loop structure -template -void LoopBase::verifyLoop() const { -#ifndef NDEBUG - assert(!Blocks.empty() && "Loop header is missing"); - - // Setup for using a depth-first iterator to visit every block in the loop. - SmallVector ExitBBs; - getExitBlocks(ExitBBs); - llvm::SmallPtrSet VisitSet; - VisitSet.insert(ExitBBs.begin(), ExitBBs.end()); - df_ext_iterator > - BI = df_ext_begin(getHeader(), VisitSet), - BE = df_ext_end(getHeader(), VisitSet); - - // Keep track of the number of BBs visited. - unsigned NumVisited = 0; - - // Check the individual blocks. - for ( ; BI != BE; ++BI) { - BlockT *BB = *BI; - bool HasInsideLoopSuccs = false; - bool HasInsideLoopPreds = false; - SmallVector OutsideLoopPreds; - - typedef GraphTraits BlockTraits; - for (typename BlockTraits::ChildIteratorType SI = - BlockTraits::child_begin(BB), SE = BlockTraits::child_end(BB); - SI != SE; ++SI) - if (contains(*SI)) { - HasInsideLoopSuccs = true; - break; - } - typedef GraphTraits > InvBlockTraits; - for (typename InvBlockTraits::ChildIteratorType PI = - InvBlockTraits::child_begin(BB), PE = InvBlockTraits::child_end(BB); - PI != PE; ++PI) { - BlockT *N = *PI; - if (contains(N)) - HasInsideLoopPreds = true; - else - OutsideLoopPreds.push_back(N); - } - - if (BB == getHeader()) { - assert(!OutsideLoopPreds.empty() && "Loop is unreachable!"); - } else if (!OutsideLoopPreds.empty()) { - // A non-header loop shouldn't be reachable from outside the loop, - // though it is permitted if the predecessor is not itself actually - // reachable. - BlockT *EntryBB = &BB->getParent()->front(); - for (BlockT *CB : depth_first(EntryBB)) - for (unsigned i = 0, e = OutsideLoopPreds.size(); i != e; ++i) - assert(CB != OutsideLoopPreds[i] && - "Loop has multiple entry points!"); - } - assert(HasInsideLoopPreds && "Loop block has no in-loop predecessors!"); - assert(HasInsideLoopSuccs && "Loop block has no in-loop successors!"); - assert(BB != &getHeader()->getParent()->front() && - "Loop contains function entry block!"); - - NumVisited++; - } - - assert(NumVisited == getNumBlocks() && "Unreachable block in loop"); - - // Check the subloops. - for (iterator I = begin(), E = end(); I != E; ++I) - // Each block in each subloop should be contained within this loop. - for (block_iterator BI = (*I)->block_begin(), BE = (*I)->block_end(); - BI != BE; ++BI) { - assert(contains(*BI) && - "Loop does not contain all the blocks of a subloop!"); - } - - // Check the parent loop pointer. - if (ParentLoop) { - assert(std::find(ParentLoop->begin(), ParentLoop->end(), this) != - ParentLoop->end() && - "Loop is not a subloop of its parent!"); - } -#endif -} - -/// verifyLoop - Verify loop structure of this loop and all nested loops. -template -void LoopBase::verifyLoopNest( - DenseSet *Loops) const { - Loops->insert(static_cast(this)); - // Verify this loop. - verifyLoop(); - // Verify the subloops. - for (iterator I = begin(), E = end(); I != E; ++I) - (*I)->verifyLoopNest(Loops); -} - -template -void LoopBase::print(raw_ostream &OS, unsigned Depth) const { - OS.indent(Depth*2) << "Loop at depth " << getLoopDepth() - << " containing: "; - - for (unsigned i = 0; i < getBlocks().size(); ++i) { - if (i) OS << ","; - BlockT *BB = getBlocks()[i]; - BB->printAsOperand(OS, false); - if (BB == getHeader()) OS << "
"; - if (BB == getLoopLatch()) OS << ""; - if (isLoopExiting(BB)) OS << ""; - } - OS << "\n"; - - for (iterator I = begin(), E = end(); I != E; ++I) - (*I)->print(OS, Depth+2); -} - -//===----------------------------------------------------------------------===// -/// Stable LoopInfo Analysis - Build a loop tree using stable iterators so the -/// result does / not depend on use list (block predecessor) order. -/// - -/// Discover a subloop with the specified backedges such that: All blocks within -/// this loop are mapped to this loop or a subloop. And all subloops within this -/// loop have their parent loop set to this loop or a subloop. -template -static void discoverAndMapSubloop(LoopT *L, ArrayRef Backedges, - LoopInfoBase *LI, - const DominatorTreeBase &DomTree) { - typedef GraphTraits > InvBlockTraits; - - unsigned NumBlocks = 0; - unsigned NumSubloops = 0; - - // Perform a backward CFG traversal using a worklist. - std::vector ReverseCFGWorklist(Backedges.begin(), Backedges.end()); - while (!ReverseCFGWorklist.empty()) { - BlockT *PredBB = ReverseCFGWorklist.back(); - ReverseCFGWorklist.pop_back(); - - LoopT *Subloop = LI->getLoopFor(PredBB); - if (!Subloop) { - if (!DomTree.isReachableFromEntry(PredBB)) - continue; - - // This is an undiscovered block. Map it to the current loop. - LI->changeLoopFor(PredBB, L); - ++NumBlocks; - if (PredBB == L->getHeader()) - continue; - // Push all block predecessors on the worklist. - ReverseCFGWorklist.insert(ReverseCFGWorklist.end(), - InvBlockTraits::child_begin(PredBB), - InvBlockTraits::child_end(PredBB)); - } - else { - // This is a discovered block. Find its outermost discovered loop. - while (LoopT *Parent = Subloop->getParentLoop()) - Subloop = Parent; - - // If it is already discovered to be a subloop of this loop, continue. - if (Subloop == L) - continue; - - // Discover a subloop of this loop. - Subloop->setParentLoop(L); - ++NumSubloops; - NumBlocks += Subloop->getBlocks().capacity(); - PredBB = Subloop->getHeader(); - // Continue traversal along predecessors that are not loop-back edges from - // within this subloop tree itself. Note that a predecessor may directly - // reach another subloop that is not yet discovered to be a subloop of - // this loop, which we must traverse. - for (typename InvBlockTraits::ChildIteratorType PI = - InvBlockTraits::child_begin(PredBB), - PE = InvBlockTraits::child_end(PredBB); PI != PE; ++PI) { - if (LI->getLoopFor(*PI) != Subloop) - ReverseCFGWorklist.push_back(*PI); - } - } - } - L->getSubLoopsVector().reserve(NumSubloops); - L->reserveBlocks(NumBlocks); -} - -/// Populate all loop data in a stable order during a single forward DFS. -template -class PopulateLoopsDFS { - typedef GraphTraits BlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - - LoopInfoBase *LI; -public: - PopulateLoopsDFS(LoopInfoBase *li): - LI(li) {} - - void traverse(BlockT *EntryBlock); - -protected: - void insertIntoLoop(BlockT *Block); -}; - -/// Top-level driver for the forward DFS within the loop. -template -void PopulateLoopsDFS::traverse(BlockT *EntryBlock) { - for (BlockT *BB : post_order(EntryBlock)) - insertIntoLoop(BB); -} - -/// Add a single Block to its ancestor loops in PostOrder. If the block is a -/// subloop header, add the subloop to its parent in PostOrder, then reverse the -/// Block and Subloop vectors of the now complete subloop to achieve RPO. -template -void PopulateLoopsDFS::insertIntoLoop(BlockT *Block) { - LoopT *Subloop = LI->getLoopFor(Block); - if (Subloop && Block == Subloop->getHeader()) { - // We reach this point once per subloop after processing all the blocks in - // the subloop. - if (Subloop->getParentLoop()) - Subloop->getParentLoop()->getSubLoopsVector().push_back(Subloop); - else - LI->addTopLevelLoop(Subloop); - - // For convenience, Blocks and Subloops are inserted in postorder. Reverse - // the lists, except for the loop header, which is always at the beginning. - Subloop->reverseBlock(1); - std::reverse(Subloop->getSubLoopsVector().begin(), - Subloop->getSubLoopsVector().end()); - - Subloop = Subloop->getParentLoop(); - } - for (; Subloop; Subloop = Subloop->getParentLoop()) - Subloop->addBlockEntry(Block); -} - -/// Analyze LoopInfo discovers loops during a postorder DominatorTree traversal -/// interleaved with backward CFG traversals within each subloop -/// (discoverAndMapSubloop). The backward traversal skips inner subloops, so -/// this part of the algorithm is linear in the number of CFG edges. Subloop and -/// Block vectors are then populated during a single forward CFG traversal -/// (PopulateLoopDFS). -/// -/// During the two CFG traversals each block is seen three times: -/// 1) Discovered and mapped by a reverse CFG traversal. -/// 2) Visited during a forward DFS CFG traversal. -/// 3) Reverse-inserted in the loop in postorder following forward DFS. -/// -/// The Block vectors are inclusive, so step 3 requires loop-depth number of -/// insertions per block. -template -void LoopInfoBase:: -analyze(const DominatorTreeBase &DomTree) { - - // Postorder traversal of the dominator tree. - const DomTreeNodeBase *DomRoot = DomTree.getRootNode(); - for (auto DomNode : post_order(DomRoot)) { - - BlockT *Header = DomNode->getBlock(); - SmallVector Backedges; - - // Check each predecessor of the potential loop header. - typedef GraphTraits > InvBlockTraits; - for (typename InvBlockTraits::ChildIteratorType PI = - InvBlockTraits::child_begin(Header), - PE = InvBlockTraits::child_end(Header); PI != PE; ++PI) { - - BlockT *Backedge = *PI; - - // If Header dominates predBB, this is a new loop. Collect the backedges. - if (DomTree.dominates(Header, Backedge) - && DomTree.isReachableFromEntry(Backedge)) { - Backedges.push_back(Backedge); - } - } - // Perform a backward CFG traversal to discover and map blocks in this loop. - if (!Backedges.empty()) { - LoopT *L = new LoopT(Header); - discoverAndMapSubloop(L, ArrayRef(Backedges), this, DomTree); - } - } - // Perform a single forward CFG traversal to populate block and subloop - // vectors for all loops. - PopulateLoopsDFS DFS(this); - DFS.traverse(DomRoot->getBlock()); -} - -// Debugging -template -void LoopInfoBase::print(raw_ostream &OS) const { - for (unsigned i = 0; i < TopLevelLoops.size(); ++i) - TopLevelLoops[i]->print(OS); -#if 0 - for (DenseMap::const_iterator I = BBMap.begin(), - E = BBMap.end(); I != E; ++I) - OS << "BB '" << I->first->getName() << "' level = " - << I->second->getLoopDepth() << "\n"; -#endif -} - -template -void LoopInfoBase::verify() const { - DenseSet Loops; - for (iterator I = begin(), E = end(); I != E; ++I) { - assert(!(*I)->getParentLoop() && "Top-level loop has a parent!"); - (*I)->verifyLoopNest(&Loops); - } - - // Verify that blocks are mapped to valid loops. -#ifndef NDEBUG - for (auto &Entry : BBMap) { - const BlockT *BB = Entry.first; - LoopT *L = Entry.second; - assert(Loops.count(L) && "orphaned loop"); - assert(L->contains(BB) && "orphaned block"); - } -#endif -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/LoopIterator.h b/llvm/include/llvm/Analysis/LoopIterator.h deleted file mode 100644 index e3dd9635..00000000 --- a/llvm/include/llvm/Analysis/LoopIterator.h +++ /dev/null @@ -1,181 +0,0 @@ -//===--------- LoopIterator.h - Iterate over loop blocks --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// This file defines iterators to visit the basic blocks within a loop. -// -// These iterators currently visit blocks within subloops as well. -// Unfortunately we have no efficient way of summarizing loop exits which would -// allow skipping subloops during traversal. -// -// If you want to visit all blocks in a loop and don't need an ordered traveral, -// use Loop::block_begin() instead. -// -// This is intentionally designed to work with ill-formed loops in which the -// backedge has been deleted. The only prerequisite is that all blocks -// contained within the loop according to the most recent LoopInfo analysis are -// reachable from the loop header. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOOPITERATOR_H -#define LLVM_ANALYSIS_LOOPITERATOR_H - -#include "llvm/ADT/PostOrderIterator.h" -#include "llvm/Analysis/LoopInfo.h" - -namespace llvm { - -class LoopBlocksTraversal; - -/// Store the result of a depth first search within basic blocks contained by a -/// single loop. -/// -/// TODO: This could be generalized for any CFG region, or the entire CFG. -class LoopBlocksDFS { -public: - /// Postorder list iterators. - typedef std::vector::const_iterator POIterator; - typedef std::vector::const_reverse_iterator RPOIterator; - - friend class LoopBlocksTraversal; - -private: - Loop *L; - - /// Map each block to its postorder number. A block is only mapped after it is - /// preorder visited by DFS. It's postorder number is initially zero and set - /// to nonzero after it is finished by postorder traversal. - DenseMap PostNumbers; - std::vector PostBlocks; - -public: - LoopBlocksDFS(Loop *Container) : - L(Container), PostNumbers(NextPowerOf2(Container->getNumBlocks())) { - PostBlocks.reserve(Container->getNumBlocks()); - } - - Loop *getLoop() const { return L; } - - /// Traverse the loop blocks and store the DFS result. - void perform(LoopInfo *LI); - - /// Return true if postorder numbers are assigned to all loop blocks. - bool isComplete() const { return PostBlocks.size() == L->getNumBlocks(); } - - /// Iterate over the cached postorder blocks. - POIterator beginPostorder() const { - assert(isComplete() && "bad loop DFS"); - return PostBlocks.begin(); - } - POIterator endPostorder() const { return PostBlocks.end(); } - - /// Reverse iterate over the cached postorder blocks. - RPOIterator beginRPO() const { - assert(isComplete() && "bad loop DFS"); - return PostBlocks.rbegin(); - } - RPOIterator endRPO() const { return PostBlocks.rend(); } - - /// Return true if this block has been preorder visited. - bool hasPreorder(BasicBlock *BB) const { return PostNumbers.count(BB); } - - /// Return true if this block has a postorder number. - bool hasPostorder(BasicBlock *BB) const { - DenseMap::const_iterator I = PostNumbers.find(BB); - return I != PostNumbers.end() && I->second; - } - - /// Get a block's postorder number. - unsigned getPostorder(BasicBlock *BB) const { - DenseMap::const_iterator I = PostNumbers.find(BB); - assert(I != PostNumbers.end() && "block not visited by DFS"); - assert(I->second && "block not finished by DFS"); - return I->second; - } - - /// Get a block's reverse postorder number. - unsigned getRPO(BasicBlock *BB) const { - return 1 + PostBlocks.size() - getPostorder(BB); - } - - void clear() { - PostNumbers.clear(); - PostBlocks.clear(); - } -}; - -/// Specialize po_iterator_storage to record postorder numbers. -template<> class po_iterator_storage { - LoopBlocksTraversal &LBT; -public: - po_iterator_storage(LoopBlocksTraversal &lbs) : LBT(lbs) {} - // These functions are defined below. - bool insertEdge(BasicBlock *From, BasicBlock *To); - void finishPostorder(BasicBlock *BB); -}; - -/// Traverse the blocks in a loop using a depth-first search. -class LoopBlocksTraversal { -public: - /// Graph traversal iterator. - typedef po_iterator POTIterator; - -private: - LoopBlocksDFS &DFS; - LoopInfo *LI; - -public: - LoopBlocksTraversal(LoopBlocksDFS &Storage, LoopInfo *LInfo) : - DFS(Storage), LI(LInfo) {} - - /// Postorder traversal over the graph. This only needs to be done once. - /// po_iterator "automatically" calls back to visitPreorder and - /// finishPostorder to record the DFS result. - POTIterator begin() { - assert(DFS.PostBlocks.empty() && "Need clear DFS result before traversing"); - assert(DFS.L->getNumBlocks() && "po_iterator cannot handle an empty graph"); - return po_ext_begin(DFS.L->getHeader(), *this); - } - POTIterator end() { - // po_ext_end interface requires a basic block, but ignores its value. - return po_ext_end(DFS.L->getHeader(), *this); - } - - /// Called by po_iterator upon reaching a block via a CFG edge. If this block - /// is contained in the loop and has not been visited, then mark it preorder - /// visited and return true. - /// - /// TODO: If anyone is interested, we could record preorder numbers here. - bool visitPreorder(BasicBlock *BB) { - if (!DFS.L->contains(LI->getLoopFor(BB))) - return false; - - return DFS.PostNumbers.insert(std::make_pair(BB, 0)).second; - } - - /// Called by po_iterator each time it advances, indicating a block's - /// postorder. - void finishPostorder(BasicBlock *BB) { - assert(DFS.PostNumbers.count(BB) && "Loop DFS skipped preorder"); - DFS.PostBlocks.push_back(BB); - DFS.PostNumbers[BB] = DFS.PostBlocks.size(); - } -}; - -inline bool po_iterator_storage:: -insertEdge(BasicBlock *From, BasicBlock *To) { - return LBT.visitPreorder(To); -} - -inline void po_iterator_storage:: -finishPostorder(BasicBlock *BB) { - LBT.finishPostorder(BB); -} - -} // End namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/LoopPass.h b/llvm/include/llvm/Analysis/LoopPass.h deleted file mode 100644 index 89debec0..00000000 --- a/llvm/include/llvm/Analysis/LoopPass.h +++ /dev/null @@ -1,162 +0,0 @@ -//===- LoopPass.h - LoopPass class ----------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines LoopPass class. All loop optimization -// and transformation passes are derived from LoopPass. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOOPPASS_H -#define LLVM_ANALYSIS_LOOPPASS_H - -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/IR/LegacyPassManagers.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -class LPPassManager; -class Function; -class PMStack; - -class LoopPass : public Pass { -public: - explicit LoopPass(char &pid) : Pass(PT_Loop, pid) {} - - /// getPrinterPass - Get a pass to print the function corresponding - /// to a Loop. - Pass *createPrinterPass(raw_ostream &O, - const std::string &Banner) const override; - - // runOnLoop - This method should be implemented by the subclass to perform - // whatever action is necessary for the specified Loop. - virtual bool runOnLoop(Loop *L, LPPassManager &LPM) = 0; - - using llvm::Pass::doInitialization; - using llvm::Pass::doFinalization; - - // Initialization and finalization hooks. - virtual bool doInitialization(Loop *L, LPPassManager &LPM) { - return false; - } - - // Finalization hook does not supply Loop because at this time - // loop nest is completely different. - virtual bool doFinalization() { return false; } - - // Check if this pass is suitable for the current LPPassManager, if - // available. This pass P is not suitable for a LPPassManager if P - // is not preserving higher level analysis info used by other - // LPPassManager passes. In such case, pop LPPassManager from the - // stack. This will force assignPassManager() to create new - // LPPassManger as expected. - void preparePassManager(PMStack &PMS) override; - - /// Assign pass manager to manage this pass - void assignPassManager(PMStack &PMS, PassManagerType PMT) override; - - /// Return what kind of Pass Manager can manage this pass. - PassManagerType getPotentialPassManagerType() const override { - return PMT_LoopPassManager; - } - - //===--------------------------------------------------------------------===// - /// SimpleAnalysis - Provides simple interface to update analysis info - /// maintained by various passes. Note, if required this interface can - /// be extracted into a separate abstract class but it would require - /// additional use of multiple inheritance in Pass class hierarchy, something - /// we are trying to avoid. - - /// Each loop pass can override these simple analysis hooks to update - /// desired analysis information. - /// cloneBasicBlockAnalysis - Clone analysis info associated with basic block. - virtual void cloneBasicBlockAnalysis(BasicBlock *F, BasicBlock *T, Loop *L) {} - - /// deleteAnalysisValue - Delete analysis info associated with value V. - virtual void deleteAnalysisValue(Value *V, Loop *L) {} - - /// Delete analysis info associated with Loop L. - /// Called to notify a Pass that a loop has been deleted and any - /// associated analysis values can be deleted. - virtual void deleteAnalysisLoop(Loop *L) {} - -protected: - /// Optional passes call this function to check whether the pass should be - /// skipped. This is the case when Attribute::OptimizeNone is set or when - /// optimization bisect is over the limit. - bool skipLoop(const Loop *L) const; -}; - -class LPPassManager : public FunctionPass, public PMDataManager { -public: - static char ID; - explicit LPPassManager(); - - /// run - Execute all of the passes scheduled for execution. Keep track of - /// whether any of the passes modifies the module, and if so, return true. - bool runOnFunction(Function &F) override; - - /// Pass Manager itself does not invalidate any analysis info. - // LPPassManager needs LoopInfo. - void getAnalysisUsage(AnalysisUsage &Info) const override; - - const char *getPassName() const override { - return "Loop Pass Manager"; - } - - PMDataManager *getAsPMDataManager() override { return this; } - Pass *getAsPass() override { return this; } - - /// Print passes managed by this manager - void dumpPassStructure(unsigned Offset) override; - - LoopPass *getContainedPass(unsigned N) { - assert(N < PassVector.size() && "Pass number out of range!"); - LoopPass *LP = static_cast(PassVector[N]); - return LP; - } - - PassManagerType getPassManagerType() const override { - return PMT_LoopPassManager; - } - -public: - // Add a new loop into the loop queue as a child of the given parent, or at - // the top level if \c ParentLoop is null. - Loop &addLoop(Loop *ParentLoop); - - //===--------------------------------------------------------------------===// - /// SimpleAnalysis - Provides simple interface to update analysis info - /// maintained by various passes. Note, if required this interface can - /// be extracted into a separate abstract class but it would require - /// additional use of multiple inheritance in Pass class hierarchy, something - /// we are trying to avoid. - - /// cloneBasicBlockSimpleAnalysis - Invoke cloneBasicBlockAnalysis hook for - /// all passes that implement simple analysis interface. - void cloneBasicBlockSimpleAnalysis(BasicBlock *From, BasicBlock *To, Loop *L); - - /// deleteSimpleAnalysisValue - Invoke deleteAnalysisValue hook for all passes - /// that implement simple analysis interface. - void deleteSimpleAnalysisValue(Value *V, Loop *L); - - /// Invoke deleteAnalysisLoop hook for all passes that implement simple - /// analysis interface. - void deleteSimpleAnalysisLoop(Loop *L); - -private: - std::deque LQ; - LoopInfo *LI; - Loop *CurrentLoop; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/LoopPassManager.h b/llvm/include/llvm/Analysis/LoopPassManager.h deleted file mode 100644 index a8955185..00000000 --- a/llvm/include/llvm/Analysis/LoopPassManager.h +++ /dev/null @@ -1,142 +0,0 @@ -//===- LoopPassManager.h - Loop pass management -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This header provides classes for managing passes over loops in LLVM IR. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOOPPASSMANAGER_H -#define LLVM_ANALYSIS_LOOPPASSMANAGER_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/IR/PassManager.h" - -namespace llvm { - -extern template class PassManager; -/// \brief The loop pass manager. -/// -/// See the documentation for the PassManager template for details. It runs a -/// sequency of loop passes over each loop that the manager is run over. This -/// typedef serves as a convenient way to refer to this construct. -typedef PassManager LoopPassManager; - -extern template class AnalysisManager; -/// \brief The loop analysis manager. -/// -/// See the documentation for the AnalysisManager template for detail -/// documentation. This typedef serves as a convenient way to refer to this -/// construct in the adaptors and proxies used to integrate this into the larger -/// pass manager infrastructure. -typedef AnalysisManager LoopAnalysisManager; - -extern template class InnerAnalysisManagerProxy; -/// A proxy from a \c LoopAnalysisManager to a \c Function. -typedef InnerAnalysisManagerProxy - LoopAnalysisManagerFunctionProxy; - -extern template class OuterAnalysisManagerProxy; -/// A proxy from a \c FunctionAnalysisManager to a \c Loop. -typedef OuterAnalysisManagerProxy - FunctionAnalysisManagerLoopProxy; - -/// Returns the minimum set of Analyses that all loop passes must preserve. -PreservedAnalyses getLoopPassPreservedAnalyses(); - -/// \brief Adaptor that maps from a function to its loops. -/// -/// Designed to allow composition of a LoopPass(Manager) and a -/// FunctionPassManager. Note that if this pass is constructed with a \c -/// FunctionAnalysisManager it will run the \c LoopAnalysisManagerFunctionProxy -/// analysis prior to running the loop passes over the function to enable a \c -/// LoopAnalysisManager to be used within this run safely. -template -class FunctionToLoopPassAdaptor - : public PassInfoMixin> { -public: - explicit FunctionToLoopPassAdaptor(LoopPassT Pass) - : Pass(std::move(Pass)) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - FunctionToLoopPassAdaptor(const FunctionToLoopPassAdaptor &Arg) - : Pass(Arg.Pass) {} - FunctionToLoopPassAdaptor(FunctionToLoopPassAdaptor &&Arg) - : Pass(std::move(Arg.Pass)) {} - friend void swap(FunctionToLoopPassAdaptor &LHS, - FunctionToLoopPassAdaptor &RHS) { - using std::swap; - swap(LHS.Pass, RHS.Pass); - } - FunctionToLoopPassAdaptor &operator=(FunctionToLoopPassAdaptor RHS) { - swap(*this, RHS); - return *this; - } - - /// \brief Runs the loop passes across every loop in the function. - PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM) { - // Setup the loop analysis manager from its proxy. - LoopAnalysisManager &LAM = - AM.getResult(F).getManager(); - // Get the loop structure for this function - LoopInfo &LI = AM.getResult(F); - - PreservedAnalyses PA = PreservedAnalyses::all(); - - // We want to visit the loops in reverse post-order. We'll build the stack - // of loops to visit in Loops by first walking the loops in pre-order. - SmallVector Loops; - SmallVector WorkList(LI.begin(), LI.end()); - while (!WorkList.empty()) { - Loop *L = WorkList.pop_back_val(); - WorkList.insert(WorkList.end(), L->begin(), L->end()); - Loops.push_back(L); - } - - // Now pop each element off of the stack to visit the loops in reverse - // post-order. - for (auto *L : reverse(Loops)) { - PreservedAnalyses PassPA = Pass.run(*L, LAM); - assert(PassPA.preserved(getLoopPassPreservedAnalyses()) && - "Loop passes must preserve all relevant analyses"); - - // We know that the loop pass couldn't have invalidated any other loop's - // analyses (that's the contract of a loop pass), so directly handle the - // loop analysis manager's invalidation here. Also, update the - // preserved analyses to reflect that once invalidated these can again - // be preserved. - PassPA = LAM.invalidate(*L, std::move(PassPA)); - - // Then intersect the preserved set so that invalidation of module - // analyses will eventually occur when the module pass completes. - PA.intersect(std::move(PassPA)); - } - - // By definition we preserve the proxy. This precludes *any* invalidation of - // loop analyses by the proxy, but that's OK because we've taken care to - // invalidate analyses in the loop analysis manager incrementally above. - PA.preserve(); - return PA; - } - -private: - LoopPassT Pass; -}; - -/// \brief A function to deduce a loop pass type and wrap it in the templated -/// adaptor. -template -FunctionToLoopPassAdaptor -createFunctionToLoopPassAdaptor(LoopPassT Pass) { - return FunctionToLoopPassAdaptor(std::move(Pass)); -} -} - -#endif // LLVM_ANALYSIS_LOOPPASSMANAGER_H diff --git a/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h b/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h deleted file mode 100644 index 80f3e5fd..00000000 --- a/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h +++ /dev/null @@ -1,95 +0,0 @@ -//===- llvm/Analysis/LoopUnrollAnalyzer.h - Loop Unroll Analyzer-*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements UnrolledInstAnalyzer class. It's used for predicting -// potential effects that loop unrolling might have, such as enabling constant -// propagation and other optimizations. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_LOOPUNROLLANALYZER_H -#define LLVM_ANALYSIS_LOOPUNROLLANALYZER_H - -#include "llvm/Analysis/InstructionSimplify.h" -#include "llvm/Analysis/ScalarEvolutionExpressions.h" -#include "llvm/IR/InstVisitor.h" - -// This class is used to get an estimate of the optimization effects that we -// could get from complete loop unrolling. It comes from the fact that some -// loads might be replaced with concrete constant values and that could trigger -// a chain of instruction simplifications. -// -// E.g. we might have: -// int a[] = {0, 1, 0}; -// v = 0; -// for (i = 0; i < 3; i ++) -// v += b[i]*a[i]; -// If we completely unroll the loop, we would get: -// v = b[0]*a[0] + b[1]*a[1] + b[2]*a[2] -// Which then will be simplified to: -// v = b[0]* 0 + b[1]* 1 + b[2]* 0 -// And finally: -// v = b[1] -namespace llvm { -class UnrolledInstAnalyzer : private InstVisitor { - typedef InstVisitor Base; - friend class InstVisitor; - struct SimplifiedAddress { - Value *Base = nullptr; - ConstantInt *Offset = nullptr; - }; - -public: - UnrolledInstAnalyzer(unsigned Iteration, - DenseMap &SimplifiedValues, - ScalarEvolution &SE, const Loop *L) - : SimplifiedValues(SimplifiedValues), SE(SE), L(L) { - IterationNumber = SE.getConstant(APInt(64, Iteration)); - } - - // Allow access to the initial visit method. - using Base::visit; - -private: - /// \brief A cache of pointer bases and constant-folded offsets corresponding - /// to GEP (or derived from GEP) instructions. - /// - /// In order to find the base pointer one needs to perform non-trivial - /// traversal of the corresponding SCEV expression, so it's good to have the - /// results saved. - DenseMap SimplifiedAddresses; - - /// \brief SCEV expression corresponding to number of currently simulated - /// iteration. - const SCEV *IterationNumber; - - /// \brief A Value->Constant map for keeping values that we managed to - /// constant-fold on the given iteration. - /// - /// While we walk the loop instructions, we build up and maintain a mapping - /// of simplified values specific to this iteration. The idea is to propagate - /// any special information we have about loads that can be replaced with - /// constants after complete unrolling, and account for likely simplifications - /// post-unrolling. - DenseMap &SimplifiedValues; - - ScalarEvolution &SE; - const Loop *L; - - bool simplifyInstWithSCEV(Instruction *I); - - bool visitInstruction(Instruction &I) { return simplifyInstWithSCEV(&I); } - bool visitBinaryOperator(BinaryOperator &I); - bool visitLoad(LoadInst &I); - bool visitCastInst(CastInst &I); - bool visitCmpInst(CmpInst &I); - bool visitPHINode(PHINode &PN); -}; -} -#endif diff --git a/llvm/include/llvm/Analysis/MemoryBuiltins.h b/llvm/include/llvm/Analysis/MemoryBuiltins.h deleted file mode 100644 index 140b731c..00000000 --- a/llvm/include/llvm/Analysis/MemoryBuiltins.h +++ /dev/null @@ -1,267 +0,0 @@ -//===- llvm/Analysis/MemoryBuiltins.h- Calls to memory builtins -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This family of functions identifies calls to builtin functions that allocate -// or free memory. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_MEMORYBUILTINS_H -#define LLVM_ANALYSIS_MEMORYBUILTINS_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/Analysis/TargetFolder.h" -#include "llvm/IR/IRBuilder.h" -#include "llvm/IR/InstVisitor.h" -#include "llvm/IR/Operator.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { -class CallInst; -class PointerType; -class DataLayout; -class TargetLibraryInfo; -class Type; -class Value; - -enum class ObjSizeMode { - Exact = 0, - Min = 1, - Max = 2 -}; - -/// \brief Tests if a value is a call or invoke to a library function that -/// allocates or reallocates memory (either malloc, calloc, realloc, or strdup -/// like). -bool isAllocationFn(const Value *V, const TargetLibraryInfo *TLI, - bool LookThroughBitCast = false); - -/// \brief Tests if a value is a call or invoke to a function that returns a -/// NoAlias pointer (including malloc/calloc/realloc/strdup-like functions). -bool isNoAliasFn(const Value *V, const TargetLibraryInfo *TLI, - bool LookThroughBitCast = false); - -/// \brief Tests if a value is a call or invoke to a library function that -/// allocates uninitialized memory (such as malloc). -bool isMallocLikeFn(const Value *V, const TargetLibraryInfo *TLI, - bool LookThroughBitCast = false); - -/// \brief Tests if a value is a call or invoke to a library function that -/// allocates zero-filled memory (such as calloc). -bool isCallocLikeFn(const Value *V, const TargetLibraryInfo *TLI, - bool LookThroughBitCast = false); - -/// \brief Tests if a value is a call or invoke to a library function that -/// allocates memory (either malloc, calloc, or strdup like). -bool isAllocLikeFn(const Value *V, const TargetLibraryInfo *TLI, - bool LookThroughBitCast = false); - -//===----------------------------------------------------------------------===// -// malloc Call Utility Functions. -// - -/// extractMallocCall - Returns the corresponding CallInst if the instruction -/// is a malloc call. Since CallInst::CreateMalloc() only creates calls, we -/// ignore InvokeInst here. -const CallInst *extractMallocCall(const Value *I, const TargetLibraryInfo *TLI); -static inline CallInst *extractMallocCall(Value *I, - const TargetLibraryInfo *TLI) { - return const_cast(extractMallocCall((const Value*)I, TLI)); -} - -/// getMallocType - Returns the PointerType resulting from the malloc call. -/// The PointerType depends on the number of bitcast uses of the malloc call: -/// 0: PointerType is the malloc calls' return type. -/// 1: PointerType is the bitcast's result type. -/// >1: Unique PointerType cannot be determined, return NULL. -PointerType *getMallocType(const CallInst *CI, const TargetLibraryInfo *TLI); - -/// getMallocAllocatedType - Returns the Type allocated by malloc call. -/// The Type depends on the number of bitcast uses of the malloc call: -/// 0: PointerType is the malloc calls' return type. -/// 1: PointerType is the bitcast's result type. -/// >1: Unique PointerType cannot be determined, return NULL. -Type *getMallocAllocatedType(const CallInst *CI, const TargetLibraryInfo *TLI); - -/// getMallocArraySize - Returns the array size of a malloc call. If the -/// argument passed to malloc is a multiple of the size of the malloced type, -/// then return that multiple. For non-array mallocs, the multiple is -/// constant 1. Otherwise, return NULL for mallocs whose array size cannot be -/// determined. -Value *getMallocArraySize(CallInst *CI, const DataLayout &DL, - const TargetLibraryInfo *TLI, - bool LookThroughSExt = false); - -//===----------------------------------------------------------------------===// -// calloc Call Utility Functions. -// - -/// extractCallocCall - Returns the corresponding CallInst if the instruction -/// is a calloc call. -const CallInst *extractCallocCall(const Value *I, const TargetLibraryInfo *TLI); -static inline CallInst *extractCallocCall(Value *I, - const TargetLibraryInfo *TLI) { - return const_cast(extractCallocCall((const Value*)I, TLI)); -} - - -//===----------------------------------------------------------------------===// -// free Call Utility Functions. -// - -/// isFreeCall - Returns non-null if the value is a call to the builtin free() -const CallInst *isFreeCall(const Value *I, const TargetLibraryInfo *TLI); - -static inline CallInst *isFreeCall(Value *I, const TargetLibraryInfo *TLI) { - return const_cast(isFreeCall((const Value*)I, TLI)); -} - - -//===----------------------------------------------------------------------===// -// Utility functions to compute size of objects. -// - -/// \brief Compute the size of the object pointed by Ptr. Returns true and the -/// object size in Size if successful, and false otherwise. In this context, by -/// object we mean the region of memory starting at Ptr to the end of the -/// underlying object pointed to by Ptr. -/// If RoundToAlign is true, then Size is rounded up to the aligment of allocas, -/// byval arguments, and global variables. -/// If Mode is Min or Max the size will be evaluated even if it depends on -/// a condition and corresponding value will be returned (min or max). -bool getObjectSize(const Value *Ptr, uint64_t &Size, const DataLayout &DL, - const TargetLibraryInfo *TLI, bool RoundToAlign = false, - ObjSizeMode Mode = ObjSizeMode::Exact); - -typedef std::pair SizeOffsetType; - -/// \brief Evaluate the size and offset of an object pointed to by a Value* -/// statically. Fails if size or offset are not known at compile time. -class ObjectSizeOffsetVisitor - : public InstVisitor { - - const DataLayout &DL; - const TargetLibraryInfo *TLI; - bool RoundToAlign; - ObjSizeMode Mode; - unsigned IntTyBits; - APInt Zero; - SmallPtrSet SeenInsts; - - APInt align(APInt Size, uint64_t Align); - - SizeOffsetType unknown() { - return std::make_pair(APInt(), APInt()); - } - -public: - ObjectSizeOffsetVisitor(const DataLayout &DL, const TargetLibraryInfo *TLI, - LLVMContext &Context, bool RoundToAlign = false, - ObjSizeMode Mode = ObjSizeMode::Exact); - - SizeOffsetType compute(Value *V); - - static bool knownSize(const SizeOffsetType &SizeOffset) { - return SizeOffset.first.getBitWidth() > 1; - } - - static bool knownOffset(const SizeOffsetType &SizeOffset) { - return SizeOffset.second.getBitWidth() > 1; - } - - static bool bothKnown(const SizeOffsetType &SizeOffset) { - return knownSize(SizeOffset) && knownOffset(SizeOffset); - } - - // These are "private", except they can't actually be made private. Only - // compute() should be used by external users. - SizeOffsetType visitAllocaInst(AllocaInst &I); - SizeOffsetType visitArgument(Argument &A); - SizeOffsetType visitCallSite(CallSite CS); - SizeOffsetType visitConstantPointerNull(ConstantPointerNull&); - SizeOffsetType visitExtractElementInst(ExtractElementInst &I); - SizeOffsetType visitExtractValueInst(ExtractValueInst &I); - SizeOffsetType visitGEPOperator(GEPOperator &GEP); - SizeOffsetType visitGlobalAlias(GlobalAlias &GA); - SizeOffsetType visitGlobalVariable(GlobalVariable &GV); - SizeOffsetType visitIntToPtrInst(IntToPtrInst&); - SizeOffsetType visitLoadInst(LoadInst &I); - SizeOffsetType visitPHINode(PHINode&); - SizeOffsetType visitSelectInst(SelectInst &I); - SizeOffsetType visitUndefValue(UndefValue&); - SizeOffsetType visitInstruction(Instruction &I); -}; - -typedef std::pair SizeOffsetEvalType; - - -/// \brief Evaluate the size and offset of an object pointed to by a Value*. -/// May create code to compute the result at run-time. -class ObjectSizeOffsetEvaluator - : public InstVisitor { - - typedef IRBuilder BuilderTy; - typedef std::pair WeakEvalType; - typedef DenseMap CacheMapTy; - typedef SmallPtrSet PtrSetTy; - - const DataLayout &DL; - const TargetLibraryInfo *TLI; - LLVMContext &Context; - BuilderTy Builder; - IntegerType *IntTy; - Value *Zero; - CacheMapTy CacheMap; - PtrSetTy SeenVals; - bool RoundToAlign; - - SizeOffsetEvalType unknown() { - return std::make_pair(nullptr, nullptr); - } - SizeOffsetEvalType compute_(Value *V); - -public: - ObjectSizeOffsetEvaluator(const DataLayout &DL, const TargetLibraryInfo *TLI, - LLVMContext &Context, bool RoundToAlign = false); - SizeOffsetEvalType compute(Value *V); - - bool knownSize(SizeOffsetEvalType SizeOffset) { - return SizeOffset.first; - } - - bool knownOffset(SizeOffsetEvalType SizeOffset) { - return SizeOffset.second; - } - - bool anyKnown(SizeOffsetEvalType SizeOffset) { - return knownSize(SizeOffset) || knownOffset(SizeOffset); - } - - bool bothKnown(SizeOffsetEvalType SizeOffset) { - return knownSize(SizeOffset) && knownOffset(SizeOffset); - } - - // The individual instruction visitors should be treated as private. - SizeOffsetEvalType visitAllocaInst(AllocaInst &I); - SizeOffsetEvalType visitCallSite(CallSite CS); - SizeOffsetEvalType visitExtractElementInst(ExtractElementInst &I); - SizeOffsetEvalType visitExtractValueInst(ExtractValueInst &I); - SizeOffsetEvalType visitGEPOperator(GEPOperator &GEP); - SizeOffsetEvalType visitIntToPtrInst(IntToPtrInst&); - SizeOffsetEvalType visitLoadInst(LoadInst &I); - SizeOffsetEvalType visitPHINode(PHINode &PHI); - SizeOffsetEvalType visitSelectInst(SelectInst &I); - SizeOffsetEvalType visitInstruction(Instruction &I); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h b/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h deleted file mode 100644 index b19dabbf..00000000 --- a/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ /dev/null @@ -1,508 +0,0 @@ -//===- llvm/Analysis/MemoryDependenceAnalysis.h - Memory Deps --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MemoryDependenceAnalysis analysis pass. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_MEMORYDEPENDENCEANALYSIS_H -#define LLVM_ANALYSIS_MEMORYDEPENDENCEANALYSIS_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/PointerSumType.h" -#include "llvm/ADT/PointerEmbeddedInt.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/PassManager.h" -#include "llvm/IR/PredIteratorCache.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Pass.h" - -namespace llvm { -class Function; -class FunctionPass; -class Instruction; -class CallSite; -class AssumptionCache; -class MemoryDependenceResults; -class PredIteratorCache; -class DominatorTree; -class PHITransAddr; - -/// A memory dependence query can return one of three different answers. -class MemDepResult { - enum DepType { - /// Clients of MemDep never see this. - /// - /// Entries with this marker occur in a LocalDeps map or NonLocalDeps map - /// when the instruction they previously referenced was removed from - /// MemDep. In either case, the entry may include an instruction pointer. - /// If so, the pointer is an instruction in the block where scanning can - /// start from, saving some work. - /// - /// In a default-constructed MemDepResult object, the type will be Invalid - /// and the instruction pointer will be null. - Invalid = 0, - - /// This is a dependence on the specified instruction which clobbers the - /// desired value. The pointer member of the MemDepResult pair holds the - /// instruction that clobbers the memory. For example, this occurs when we - /// see a may-aliased store to the memory location we care about. - /// - /// There are several cases that may be interesting here: - /// 1. Loads are clobbered by may-alias stores. - /// 2. Loads are considered clobbered by partially-aliased loads. The - /// client may choose to analyze deeper into these cases. - Clobber, - - /// This is a dependence on the specified instruction which defines or - /// produces the desired memory location. The pointer member of the - /// MemDepResult pair holds the instruction that defines the memory. - /// - /// Cases of interest: - /// 1. This could be a load or store for dependence queries on - /// load/store. The value loaded or stored is the produced value. - /// Note that the pointer operand may be different than that of the - /// queried pointer due to must aliases and phi translation. Note - /// that the def may not be the same type as the query, the pointers - /// may just be must aliases. - /// 2. For loads and stores, this could be an allocation instruction. In - /// this case, the load is loading an undef value or a store is the - /// first store to (that part of) the allocation. - /// 3. Dependence queries on calls return Def only when they are readonly - /// calls or memory use intrinsics with identical callees and no - /// intervening clobbers. No validation is done that the operands to - /// the calls are the same. - Def, - - /// This marker indicates that the query has no known dependency in the - /// specified block. - /// - /// More detailed state info is encoded in the upper part of the pair (i.e. - /// the Instruction*) - Other - }; - - /// If DepType is "Other", the upper part of the sum type is an encoding of - /// the following more detailed type information. - enum OtherType { - /// This marker indicates that the query has no dependency in the specified - /// block. - /// - /// To find out more, the client should query other predecessor blocks. - NonLocal = 1, - /// This marker indicates that the query has no dependency in the specified - /// function. - NonFuncLocal, - /// This marker indicates that the query dependency is unknown. - Unknown - }; - - typedef PointerSumType< - DepType, PointerSumTypeMember, - PointerSumTypeMember, - PointerSumTypeMember, - PointerSumTypeMember>> - ValueTy; - ValueTy Value; - explicit MemDepResult(ValueTy V) : Value(V) {} - -public: - MemDepResult() : Value() {} - - /// get methods: These are static ctor methods for creating various - /// MemDepResult kinds. - static MemDepResult getDef(Instruction *Inst) { - assert(Inst && "Def requires inst"); - return MemDepResult(ValueTy::create(Inst)); - } - static MemDepResult getClobber(Instruction *Inst) { - assert(Inst && "Clobber requires inst"); - return MemDepResult(ValueTy::create(Inst)); - } - static MemDepResult getNonLocal() { - return MemDepResult(ValueTy::create(NonLocal)); - } - static MemDepResult getNonFuncLocal() { - return MemDepResult(ValueTy::create(NonFuncLocal)); - } - static MemDepResult getUnknown() { - return MemDepResult(ValueTy::create(Unknown)); - } - - /// Tests if this MemDepResult represents a query that is an instruction - /// clobber dependency. - bool isClobber() const { return Value.is(); } - - /// Tests if this MemDepResult represents a query that is an instruction - /// definition dependency. - bool isDef() const { return Value.is(); } - - /// Tests if this MemDepResult represents a query that is transparent to the - /// start of the block, but where a non-local hasn't been done. - bool isNonLocal() const { - return Value.is() && Value.cast() == NonLocal; - } - - /// Tests if this MemDepResult represents a query that is transparent to the - /// start of the function. - bool isNonFuncLocal() const { - return Value.is() && Value.cast() == NonFuncLocal; - } - - /// Tests if this MemDepResult represents a query which cannot and/or will - /// not be computed. - bool isUnknown() const { - return Value.is() && Value.cast() == Unknown; - } - - /// If this is a normal dependency, returns the instruction that is depended - /// on. Otherwise, returns null. - Instruction *getInst() const { - switch (Value.getTag()) { - case Invalid: - return Value.cast(); - case Clobber: - return Value.cast(); - case Def: - return Value.cast(); - case Other: - return nullptr; - } - llvm_unreachable("Unknown discriminant!"); - } - - bool operator==(const MemDepResult &M) const { return Value == M.Value; } - bool operator!=(const MemDepResult &M) const { return Value != M.Value; } - bool operator<(const MemDepResult &M) const { return Value < M.Value; } - bool operator>(const MemDepResult &M) const { return Value > M.Value; } - -private: - friend class MemoryDependenceResults; - - /// Tests if this is a MemDepResult in its dirty/invalid. state. - bool isDirty() const { return Value.is(); } - - static MemDepResult getDirty(Instruction *Inst) { - return MemDepResult(ValueTy::create(Inst)); - } -}; - -/// This is an entry in the NonLocalDepInfo cache. -/// -/// For each BasicBlock (the BB entry) it keeps a MemDepResult. -class NonLocalDepEntry { - BasicBlock *BB; - MemDepResult Result; - -public: - NonLocalDepEntry(BasicBlock *bb, MemDepResult result) - : BB(bb), Result(result) {} - - // This is used for searches. - NonLocalDepEntry(BasicBlock *bb) : BB(bb) {} - - // BB is the sort key, it can't be changed. - BasicBlock *getBB() const { return BB; } - - void setResult(const MemDepResult &R) { Result = R; } - - const MemDepResult &getResult() const { return Result; } - - bool operator<(const NonLocalDepEntry &RHS) const { return BB < RHS.BB; } -}; - -/// This is a result from a NonLocal dependence query. -/// -/// For each BasicBlock (the BB entry) it keeps a MemDepResult and the -/// (potentially phi translated) address that was live in the block. -class NonLocalDepResult { - NonLocalDepEntry Entry; - Value *Address; - -public: - NonLocalDepResult(BasicBlock *bb, MemDepResult result, Value *address) - : Entry(bb, result), Address(address) {} - - // BB is the sort key, it can't be changed. - BasicBlock *getBB() const { return Entry.getBB(); } - - void setResult(const MemDepResult &R, Value *Addr) { - Entry.setResult(R); - Address = Addr; - } - - const MemDepResult &getResult() const { return Entry.getResult(); } - - /// Returns the address of this pointer in this block. - /// - /// This can be different than the address queried for the non-local result - /// because of phi translation. This returns null if the address was not - /// available in a block (i.e. because phi translation failed) or if this is - /// a cached result and that address was deleted. - /// - /// The address is always null for a non-local 'call' dependence. - Value *getAddress() const { return Address; } -}; - -/// Provides a lazy, caching interface for making common memory aliasing -/// information queries, backed by LLVM's alias analysis passes. -/// -/// The dependency information returned is somewhat unusual, but is pragmatic. -/// If queried about a store or call that might modify memory, the analysis -/// will return the instruction[s] that may either load from that memory or -/// store to it. If queried with a load or call that can never modify memory, -/// the analysis will return calls and stores that might modify the pointer, -/// but generally does not return loads unless a) they are volatile, or -/// b) they load from *must-aliased* pointers. Returning a dependence on -/// must-alias'd pointers instead of all pointers interacts well with the -/// internal caching mechanism. -class MemoryDependenceResults { - // A map from instructions to their dependency. - typedef DenseMap LocalDepMapType; - LocalDepMapType LocalDeps; - -public: - typedef std::vector NonLocalDepInfo; - -private: - /// A pair where the bool is true if the dependence is a read - /// only dependence, false if read/write. - typedef PointerIntPair ValueIsLoadPair; - - /// This pair is used when caching information for a block. - /// - /// If the pointer is null, the cache value is not a full query that starts - /// at the specified block. If non-null, the bool indicates whether or not - /// the contents of the block was skipped. - typedef PointerIntPair BBSkipFirstBlockPair; - - /// This record is the information kept for each (value, is load) pair. - struct NonLocalPointerInfo { - /// The pair of the block and the skip-first-block flag. - BBSkipFirstBlockPair Pair; - /// The results of the query for each relevant block. - NonLocalDepInfo NonLocalDeps; - /// The maximum size of the dereferences of the pointer. - /// - /// May be UnknownSize if the sizes are unknown. - uint64_t Size; - /// The AA tags associated with dereferences of the pointer. - /// - /// The members may be null if there are no tags or conflicting tags. - AAMDNodes AATags; - - NonLocalPointerInfo() : Size(MemoryLocation::UnknownSize) {} - }; - - /// This map stores the cached results of doing a pointer lookup at the - /// bottom of a block. - /// - /// The key of this map is the pointer+isload bit, the value is a list of - /// result> mappings. - typedef DenseMap - CachedNonLocalPointerInfo; - CachedNonLocalPointerInfo NonLocalPointerDeps; - - // A map from instructions to their non-local pointer dependencies. - typedef DenseMap> - ReverseNonLocalPtrDepTy; - ReverseNonLocalPtrDepTy ReverseNonLocalPtrDeps; - - /// This is the instruction we keep for each cached access that we have for - /// an instruction. - /// - /// The pointer is an owning pointer and the bool indicates whether we have - /// any dirty bits in the set. - typedef std::pair PerInstNLInfo; - - // A map from instructions to their non-local dependencies. - typedef DenseMap NonLocalDepMapType; - - NonLocalDepMapType NonLocalDeps; - - // A reverse mapping from dependencies to the dependees. This is - // used when removing instructions to keep the cache coherent. - typedef DenseMap> - ReverseDepMapType; - ReverseDepMapType ReverseLocalDeps; - - // A reverse mapping from dependencies to the non-local dependees. - ReverseDepMapType ReverseNonLocalDeps; - - /// Current AA implementation, just a cache. - AliasAnalysis &AA; - AssumptionCache &AC; - const TargetLibraryInfo &TLI; - DominatorTree &DT; - PredIteratorCache PredCache; - -public: - MemoryDependenceResults(AliasAnalysis &AA, AssumptionCache &AC, - const TargetLibraryInfo &TLI, - DominatorTree &DT) - : AA(AA), AC(AC), TLI(TLI), DT(DT) {} - - /// Returns the instruction on which a memory operation depends. - /// - /// See the class comment for more details. It is illegal to call this on - /// non-memory instructions. - MemDepResult getDependency(Instruction *QueryInst); - - /// Perform a full dependency query for the specified call, returning the set - /// of blocks that the value is potentially live across. - /// - /// The returned set of results will include a "NonLocal" result for all - /// blocks where the value is live across. - /// - /// This method assumes the instruction returns a "NonLocal" dependency - /// within its own block. - /// - /// This returns a reference to an internal data structure that may be - /// invalidated on the next non-local query or when an instruction is - /// removed. Clients must copy this data if they want it around longer than - /// that. - const NonLocalDepInfo &getNonLocalCallDependency(CallSite QueryCS); - - /// Perform a full dependency query for an access to the QueryInst's - /// specified memory location, returning the set of instructions that either - /// define or clobber the value. - /// - /// Warning: For a volatile query instruction, the dependencies will be - /// accurate, and thus usable for reordering, but it is never legal to - /// remove the query instruction. - /// - /// This method assumes the pointer has a "NonLocal" dependency within - /// QueryInst's parent basic block. - void getNonLocalPointerDependency(Instruction *QueryInst, - SmallVectorImpl &Result); - - /// Removes an instruction from the dependence analysis, updating the - /// dependence of instructions that previously depended on it. - void removeInstruction(Instruction *InstToRemove); - - /// Invalidates cached information about the specified pointer, because it - /// may be too conservative in memdep. - /// - /// This is an optional call that can be used when the client detects an - /// equivalence between the pointer and some other value and replaces the - /// other value with ptr. This can make Ptr available in more places that - /// cached info does not necessarily keep. - void invalidateCachedPointerInfo(Value *Ptr); - - /// Clears the PredIteratorCache info. - /// - /// This needs to be done when the CFG changes, e.g., due to splitting - /// critical edges. - void invalidateCachedPredecessors(); - - /// Returns the instruction on which a memory location depends. - /// - /// If isLoad is true, this routine ignores may-aliases with read-only - /// operations. If isLoad is false, this routine ignores may-aliases - /// with reads from read-only locations. If possible, pass the query - /// instruction as well; this function may take advantage of the metadata - /// annotated to the query instruction to refine the result. - /// - /// Note that this is an uncached query, and thus may be inefficient. - MemDepResult getPointerDependencyFrom(const MemoryLocation &Loc, bool isLoad, - BasicBlock::iterator ScanIt, - BasicBlock *BB, - Instruction *QueryInst = nullptr); - - MemDepResult getSimplePointerDependencyFrom(const MemoryLocation &MemLoc, - bool isLoad, - BasicBlock::iterator ScanIt, - BasicBlock *BB, - Instruction *QueryInst); - - /// This analysis looks for other loads and stores with invariant.group - /// metadata and the same pointer operand. Returns Unknown if it does not - /// find anything, and Def if it can be assumed that 2 instructions load or - /// store the same value. - /// FIXME: This analysis works only on single block because of restrictions - /// at the call site. - MemDepResult getInvariantGroupPointerDependency(LoadInst *LI, BasicBlock *BB); - - /// Looks at a memory location for a load (specified by MemLocBase, Offs, and - /// Size) and compares it against a load. - /// - /// If the specified load could be safely widened to a larger integer load - /// that is 1) still efficient, 2) safe for the target, and 3) would provide - /// the specified memory location value, then this function returns the size - /// in bytes of the load width to use. If not, this returns zero. - static unsigned getLoadLoadClobberFullWidthSize(const Value *MemLocBase, - int64_t MemLocOffs, - unsigned MemLocSize, - const LoadInst *LI); - - /// Release memory in caches. - void releaseMemory(); - -private: - MemDepResult getCallSiteDependencyFrom(CallSite C, bool isReadOnlyCall, - BasicBlock::iterator ScanIt, - BasicBlock *BB); - bool getNonLocalPointerDepFromBB(Instruction *QueryInst, - const PHITransAddr &Pointer, - const MemoryLocation &Loc, bool isLoad, - BasicBlock *BB, - SmallVectorImpl &Result, - DenseMap &Visited, - bool SkipFirstBlock = false); - MemDepResult GetNonLocalInfoForBlock(Instruction *QueryInst, - const MemoryLocation &Loc, bool isLoad, - BasicBlock *BB, NonLocalDepInfo *Cache, - unsigned NumSortedEntries); - - void RemoveCachedNonLocalPointerDependencies(ValueIsLoadPair P); - - void verifyRemoved(Instruction *Inst) const; -}; - -/// An analysis that produces \c MemoryDependenceResults for a function. -/// -/// This is essentially a no-op because the results are computed entirely -/// lazily. -class MemoryDependenceAnalysis - : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef MemoryDependenceResults Result; - - MemoryDependenceResults run(Function &F, AnalysisManager &AM); -}; - -/// A wrapper analysis pass for the legacy pass manager that exposes a \c -/// MemoryDepnedenceResults instance. -class MemoryDependenceWrapperPass : public FunctionPass { - Optional MemDep; -public: - MemoryDependenceWrapperPass(); - ~MemoryDependenceWrapperPass() override; - static char ID; - - /// Pass Implementation stuff. This doesn't do any analysis eagerly. - bool runOnFunction(Function &) override; - - /// Clean up memory in between runs - void releaseMemory() override; - - /// Does not modify anything. It uses Value Numbering and Alias Analysis. - void getAnalysisUsage(AnalysisUsage &AU) const override; - - MemoryDependenceResults &getMemDep() { return *MemDep; } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/MemoryLocation.h b/llvm/include/llvm/Analysis/MemoryLocation.h deleted file mode 100644 index f2cb2a12..00000000 --- a/llvm/include/llvm/Analysis/MemoryLocation.h +++ /dev/null @@ -1,142 +0,0 @@ -//===- MemoryLocation.h - Memory location descriptions ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file provides utility analysis objects describing memory locations. -/// These are used both by the Alias Analysis infrastructure and more -/// specialized memory analysis layers. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_MEMORYLOCATION_H -#define LLVM_ANALYSIS_MEMORYLOCATION_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/IR/CallSite.h" -#include "llvm/IR/Metadata.h" - -namespace llvm { - -class LoadInst; -class StoreInst; -class MemTransferInst; -class MemIntrinsic; -class TargetLibraryInfo; - -/// Representation for a specific memory location. -/// -/// This abstraction can be used to represent a specific location in memory. -/// The goal of the location is to represent enough information to describe -/// abstract aliasing, modification, and reference behaviors of whatever -/// value(s) are stored in memory at the particular location. -/// -/// The primary user of this interface is LLVM's Alias Analysis, but other -/// memory analyses such as MemoryDependence can use it as well. -class MemoryLocation { -public: - /// UnknownSize - This is a special value which can be used with the - /// size arguments in alias queries to indicate that the caller does not - /// know the sizes of the potential memory references. - enum : uint64_t { UnknownSize = ~UINT64_C(0) }; - - /// The address of the start of the location. - const Value *Ptr; - - /// The maximum size of the location, in address-units, or - /// UnknownSize if the size is not known. - /// - /// Note that an unknown size does not mean the pointer aliases the entire - /// virtual address space, because there are restrictions on stepping out of - /// one object and into another. See - /// http://llvm.org/docs/LangRef.html#pointeraliasing - uint64_t Size; - - /// The metadata nodes which describes the aliasing of the location (each - /// member is null if that kind of information is unavailable). - AAMDNodes AATags; - - /// Return a location with information about the memory reference by the given - /// instruction. - static MemoryLocation get(const LoadInst *LI); - static MemoryLocation get(const StoreInst *SI); - static MemoryLocation get(const VAArgInst *VI); - static MemoryLocation get(const AtomicCmpXchgInst *CXI); - static MemoryLocation get(const AtomicRMWInst *RMWI); - static MemoryLocation get(const Instruction *Inst) { - if (auto *I = dyn_cast(Inst)) - return get(I); - else if (auto *I = dyn_cast(Inst)) - return get(I); - else if (auto *I = dyn_cast(Inst)) - return get(I); - else if (auto *I = dyn_cast(Inst)) - return get(I); - else if (auto *I = dyn_cast(Inst)) - return get(I); - llvm_unreachable("unsupported memory instruction"); - } - - /// Return a location representing the source of a memory transfer. - static MemoryLocation getForSource(const MemTransferInst *MTI); - - /// Return a location representing the destination of a memory set or - /// transfer. - static MemoryLocation getForDest(const MemIntrinsic *MI); - - /// Return a location representing a particular argument of a call. - static MemoryLocation getForArgument(ImmutableCallSite CS, unsigned ArgIdx, - const TargetLibraryInfo &TLI); - - explicit MemoryLocation(const Value *Ptr = nullptr, - uint64_t Size = UnknownSize, - const AAMDNodes &AATags = AAMDNodes()) - : Ptr(Ptr), Size(Size), AATags(AATags) {} - - MemoryLocation getWithNewPtr(const Value *NewPtr) const { - MemoryLocation Copy(*this); - Copy.Ptr = NewPtr; - return Copy; - } - - MemoryLocation getWithNewSize(uint64_t NewSize) const { - MemoryLocation Copy(*this); - Copy.Size = NewSize; - return Copy; - } - - MemoryLocation getWithoutAATags() const { - MemoryLocation Copy(*this); - Copy.AATags = AAMDNodes(); - return Copy; - } - - bool operator==(const MemoryLocation &Other) const { - return Ptr == Other.Ptr && Size == Other.Size && AATags == Other.AATags; - } -}; - -// Specialize DenseMapInfo for MemoryLocation. -template <> struct DenseMapInfo { - static inline MemoryLocation getEmptyKey() { - return MemoryLocation(DenseMapInfo::getEmptyKey(), 0); - } - static inline MemoryLocation getTombstoneKey() { - return MemoryLocation(DenseMapInfo::getTombstoneKey(), 0); - } - static unsigned getHashValue(const MemoryLocation &Val) { - return DenseMapInfo::getHashValue(Val.Ptr) ^ - DenseMapInfo::getHashValue(Val.Size) ^ - DenseMapInfo::getHashValue(Val.AATags); - } - static bool isEqual(const MemoryLocation &LHS, const MemoryLocation &RHS) { - return LHS == RHS; - } -}; -} - -#endif diff --git a/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h b/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h deleted file mode 100644 index 9f03610b..00000000 --- a/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h +++ /dev/null @@ -1,91 +0,0 @@ -//===- ModuleSummaryAnalysis.h - Module summary index builder ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This is the interface to build a ModuleSummaryIndex for a module. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_MODULESUMMARYANALYSIS_H -#define LLVM_ANALYSIS_MODULESUMMARYANALYSIS_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/IR/ModuleSummaryIndex.h" -#include "llvm/Pass.h" - -namespace llvm { - -class BlockFrequencyInfo; - -/// Class to build a module summary index for the given Module, possibly from -/// a Pass. -class ModuleSummaryIndexBuilder { - /// The index being built - std::unique_ptr Index; - /// The module for which we are building an index - const Module *M; - -public: - /// Default constructor - ModuleSummaryIndexBuilder() = default; - - /// Constructor that builds an index for the given Module. An optional - /// callback can be supplied to obtain the frequency info for a function. - ModuleSummaryIndexBuilder( - const Module *M, - std::function Ftor = nullptr); - - /// Get a reference to the index owned by builder - ModuleSummaryIndex &getIndex() const { return *Index; } - - /// Take ownership of the built index - std::unique_ptr takeIndex() { return std::move(Index); } - -private: - /// Compute summary for given function with optional frequency information - void computeFunctionSummary(const Function &F, - BlockFrequencyInfo *BFI = nullptr); - - /// Compute summary for given variable with optional frequency information - void computeVariableSummary(const GlobalVariable &V); -}; - -/// Legacy wrapper pass to provide the ModuleSummaryIndex object. -class ModuleSummaryIndexWrapperPass : public ModulePass { - std::unique_ptr IndexBuilder; - -public: - static char ID; - - ModuleSummaryIndexWrapperPass(); - - /// Get the index built by pass - ModuleSummaryIndex &getIndex() { return IndexBuilder->getIndex(); } - const ModuleSummaryIndex &getIndex() const { - return IndexBuilder->getIndex(); - } - - bool runOnModule(Module &M) override; - bool doFinalization(Module &M) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -//===--------------------------------------------------------------------===// -// -// createModuleSummaryIndexWrapperPass - This pass builds a ModuleSummaryIndex -// object for the module, to be written to bitcode or LLVM assembly. -// -ModulePass *createModuleSummaryIndexWrapperPass(); - -/// Returns true if \p M is eligible for ThinLTO promotion. -/// -/// Currently we check if it has any any InlineASM that uses an internal symbol. -bool moduleCanBeRenamedForThinLTO(const Module &M); -} - -#endif diff --git a/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h b/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h deleted file mode 100644 index 067a964b..00000000 --- a/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h +++ /dev/null @@ -1,94 +0,0 @@ -//===- ObjCARCAliasAnalysis.h - ObjC ARC Alias Analysis ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file declares a simple ARC-aware AliasAnalysis using special knowledge -/// of Objective C to enhance other optimization passes which rely on the Alias -/// Analysis infrastructure. -/// -/// WARNING: This file knows about certain library functions. It recognizes them -/// by name, and hardwires knowledge of their semantics. -/// -/// WARNING: This file knows about how certain Objective-C library functions are -/// used. Naive LLVM IR transformations which would otherwise be -/// behavior-preserving may break these assumptions. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_OBJCARCALIASANALYSIS_H -#define LLVM_ANALYSIS_OBJCARCALIASANALYSIS_H - -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Pass.h" - -namespace llvm { -namespace objcarc { - -/// \brief This is a simple alias analysis implementation that uses knowledge -/// of ARC constructs to answer queries. -/// -/// TODO: This class could be generalized to know about other ObjC-specific -/// tricks. Such as knowing that ivars in the non-fragile ABI are non-aliasing -/// even though their offsets are dynamic. -class ObjCARCAAResult : public AAResultBase { - friend AAResultBase; - - const DataLayout &DL; - -public: - explicit ObjCARCAAResult(const DataLayout &DL) : AAResultBase(), DL(DL) {} - ObjCARCAAResult(ObjCARCAAResult &&Arg) - : AAResultBase(std::move(Arg)), DL(Arg.DL) {} - - /// Handle invalidation events from the new pass manager. - /// - /// By definition, this result is stateless and so remains valid. - bool invalidate(Function &, const PreservedAnalyses &) { return false; } - - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB); - bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal); - - using AAResultBase::getModRefBehavior; - FunctionModRefBehavior getModRefBehavior(const Function *F); - - using AAResultBase::getModRefInfo; - ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc); -}; - -/// Analysis pass providing a never-invalidated alias analysis result. -class ObjCARCAA : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef ObjCARCAAResult Result; - - ObjCARCAAResult run(Function &F, AnalysisManager &AM); -}; - -/// Legacy wrapper pass to provide the ObjCARCAAResult object. -class ObjCARCAAWrapperPass : public ImmutablePass { - std::unique_ptr Result; - -public: - static char ID; - - ObjCARCAAWrapperPass(); - - ObjCARCAAResult &getResult() { return *Result; } - const ObjCARCAAResult &getResult() const { return *Result; } - - bool doInitialization(Module &M) override; - bool doFinalization(Module &M) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -} // namespace objcarc -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h b/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h deleted file mode 100644 index 5f4d8ecb..00000000 --- a/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h +++ /dev/null @@ -1,288 +0,0 @@ -//===- ObjCARCAnalysisUtils.h - ObjC ARC Analysis Utilities -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file defines common analysis utilities used by the ObjC ARC Optimizer. -/// ARC stands for Automatic Reference Counting and is a system for managing -/// reference counts for objects in Objective C. -/// -/// WARNING: This file knows about certain library functions. It recognizes them -/// by name, and hardwires knowledge of their semantics. -/// -/// WARNING: This file knows about how certain Objective-C library functions are -/// used. Naive LLVM IR transformations which would otherwise be -/// behavior-preserving may break these assumptions. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_ANALYSIS_OBJCARCANALYSISUTILS_H -#define LLVM_LIB_ANALYSIS_OBJCARCANALYSISUTILS_H - -#include "llvm/ADT/StringSwitch.h" -#include "llvm/ADT/Optional.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/ObjCARCInstKind.h" -#include "llvm/Analysis/Passes.h" -#include "llvm/Analysis/ValueTracking.h" -#include "llvm/IR/CallSite.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/InstIterator.h" -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/Module.h" -#include "llvm/Pass.h" - -namespace llvm { -class raw_ostream; -} - -namespace llvm { -namespace objcarc { - -/// \brief A handy option to enable/disable all ARC Optimizations. -extern bool EnableARCOpts; - -/// \brief Test if the given module looks interesting to run ARC optimization -/// on. -inline bool ModuleHasARC(const Module &M) { - return - M.getNamedValue("objc_retain") || - M.getNamedValue("objc_release") || - M.getNamedValue("objc_autorelease") || - M.getNamedValue("objc_retainAutoreleasedReturnValue") || - M.getNamedValue("objc_unsafeClaimAutoreleasedReturnValue") || - M.getNamedValue("objc_retainBlock") || - M.getNamedValue("objc_autoreleaseReturnValue") || - M.getNamedValue("objc_autoreleasePoolPush") || - M.getNamedValue("objc_loadWeakRetained") || - M.getNamedValue("objc_loadWeak") || - M.getNamedValue("objc_destroyWeak") || - M.getNamedValue("objc_storeWeak") || - M.getNamedValue("objc_initWeak") || - M.getNamedValue("objc_moveWeak") || - M.getNamedValue("objc_copyWeak") || - M.getNamedValue("objc_retainedObject") || - M.getNamedValue("objc_unretainedObject") || - M.getNamedValue("objc_unretainedPointer") || - M.getNamedValue("clang.arc.use"); -} - -/// \brief This is a wrapper around getUnderlyingObject which also knows how to -/// look through objc_retain and objc_autorelease calls, which we know to return -/// their argument verbatim. -inline const Value *GetUnderlyingObjCPtr(const Value *V, - const DataLayout &DL) { - for (;;) { - V = GetUnderlyingObject(V, DL); - if (!IsForwarding(GetBasicARCInstKind(V))) - break; - V = cast(V)->getArgOperand(0); - } - - return V; -} - -/// The RCIdentity root of a value \p V is a dominating value U for which -/// retaining or releasing U is equivalent to retaining or releasing V. In other -/// words, ARC operations on \p V are equivalent to ARC operations on \p U. -/// -/// We use this in the ARC optimizer to make it easier to match up ARC -/// operations by always mapping ARC operations to RCIdentityRoots instead of -/// pointers themselves. -/// -/// The two ways that we see RCIdentical values in ObjC are via: -/// -/// 1. PointerCasts -/// 2. Forwarding Calls that return their argument verbatim. -/// -/// Thus this function strips off pointer casts and forwarding calls. *NOTE* -/// This implies that two RCIdentical values must alias. -inline const Value *GetRCIdentityRoot(const Value *V) { - for (;;) { - V = V->stripPointerCasts(); - if (!IsForwarding(GetBasicARCInstKind(V))) - break; - V = cast(V)->getArgOperand(0); - } - return V; -} - -/// Helper which calls const Value *GetRCIdentityRoot(const Value *V) and just -/// casts away the const of the result. For documentation about what an -/// RCIdentityRoot (and by extension GetRCIdentityRoot is) look at that -/// function. -inline Value *GetRCIdentityRoot(Value *V) { - return const_cast(GetRCIdentityRoot((const Value *)V)); -} - -/// \brief Assuming the given instruction is one of the special calls such as -/// objc_retain or objc_release, return the RCIdentity root of the argument of -/// the call. -inline Value *GetArgRCIdentityRoot(Value *Inst) { - return GetRCIdentityRoot(cast(Inst)->getArgOperand(0)); -} - -inline bool IsNullOrUndef(const Value *V) { - return isa(V) || isa(V); -} - -inline bool IsNoopInstruction(const Instruction *I) { - return isa(I) || - (isa(I) && - cast(I)->hasAllZeroIndices()); -} - -/// \brief Test whether the given value is possible a retainable object pointer. -inline bool IsPotentialRetainableObjPtr(const Value *Op) { - // Pointers to static or stack storage are not valid retainable object - // pointers. - if (isa(Op) || isa(Op)) - return false; - // Special arguments can not be a valid retainable object pointer. - if (const Argument *Arg = dyn_cast(Op)) - if (Arg->hasByValAttr() || - Arg->hasInAllocaAttr() || - Arg->hasNestAttr() || - Arg->hasStructRetAttr()) - return false; - // Only consider values with pointer types. - // - // It seemes intuitive to exclude function pointer types as well, since - // functions are never retainable object pointers, however clang occasionally - // bitcasts retainable object pointers to function-pointer type temporarily. - PointerType *Ty = dyn_cast(Op->getType()); - if (!Ty) - return false; - // Conservatively assume anything else is a potential retainable object - // pointer. - return true; -} - -inline bool IsPotentialRetainableObjPtr(const Value *Op, - AliasAnalysis &AA) { - // First make the rudimentary check. - if (!IsPotentialRetainableObjPtr(Op)) - return false; - - // Objects in constant memory are not reference-counted. - if (AA.pointsToConstantMemory(Op)) - return false; - - // Pointers in constant memory are not pointing to reference-counted objects. - if (const LoadInst *LI = dyn_cast(Op)) - if (AA.pointsToConstantMemory(LI->getPointerOperand())) - return false; - - // Otherwise assume the worst. - return true; -} - -/// \brief Helper for GetARCInstKind. Determines what kind of construct CS -/// is. -inline ARCInstKind GetCallSiteClass(ImmutableCallSite CS) { - for (ImmutableCallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); - I != E; ++I) - if (IsPotentialRetainableObjPtr(*I)) - return CS.onlyReadsMemory() ? ARCInstKind::User : ARCInstKind::CallOrUser; - - return CS.onlyReadsMemory() ? ARCInstKind::None : ARCInstKind::Call; -} - -/// \brief Return true if this value refers to a distinct and identifiable -/// object. -/// -/// This is similar to AliasAnalysis's isIdentifiedObject, except that it uses -/// special knowledge of ObjC conventions. -inline bool IsObjCIdentifiedObject(const Value *V) { - // Assume that call results and arguments have their own "provenance". - // Constants (including GlobalVariables) and Allocas are never - // reference-counted. - if (isa(V) || isa(V) || - isa(V) || isa(V) || - isa(V)) - return true; - - if (const LoadInst *LI = dyn_cast(V)) { - const Value *Pointer = - GetRCIdentityRoot(LI->getPointerOperand()); - if (const GlobalVariable *GV = dyn_cast(Pointer)) { - // A constant pointer can't be pointing to an object on the heap. It may - // be reference-counted, but it won't be deleted. - if (GV->isConstant()) - return true; - StringRef Name = GV->getName(); - // These special variables are known to hold values which are not - // reference-counted pointers. - if (Name.startswith("\01l_objc_msgSend_fixup_")) - return true; - - StringRef Section = GV->getSection(); - if (Section.find("__message_refs") != StringRef::npos || - Section.find("__objc_classrefs") != StringRef::npos || - Section.find("__objc_superrefs") != StringRef::npos || - Section.find("__objc_methname") != StringRef::npos || - Section.find("__cstring") != StringRef::npos) - return true; - } - } - - return false; -} - -enum class ARCMDKindID { - ImpreciseRelease, - CopyOnEscape, - NoObjCARCExceptions, -}; - -/// A cache of MDKinds used by various ARC optimizations. -class ARCMDKindCache { - Module *M; - - /// The Metadata Kind for clang.imprecise_release metadata. - llvm::Optional ImpreciseReleaseMDKind; - - /// The Metadata Kind for clang.arc.copy_on_escape metadata. - llvm::Optional CopyOnEscapeMDKind; - - /// The Metadata Kind for clang.arc.no_objc_arc_exceptions metadata. - llvm::Optional NoObjCARCExceptionsMDKind; - -public: - void init(Module *Mod) { - M = Mod; - ImpreciseReleaseMDKind = NoneType::None; - CopyOnEscapeMDKind = NoneType::None; - NoObjCARCExceptionsMDKind = NoneType::None; - } - - unsigned get(ARCMDKindID ID) { - switch (ID) { - case ARCMDKindID::ImpreciseRelease: - if (!ImpreciseReleaseMDKind) - ImpreciseReleaseMDKind = - M->getContext().getMDKindID("clang.imprecise_release"); - return *ImpreciseReleaseMDKind; - case ARCMDKindID::CopyOnEscape: - if (!CopyOnEscapeMDKind) - CopyOnEscapeMDKind = - M->getContext().getMDKindID("clang.arc.copy_on_escape"); - return *CopyOnEscapeMDKind; - case ARCMDKindID::NoObjCARCExceptions: - if (!NoObjCARCExceptionsMDKind) - NoObjCARCExceptionsMDKind = - M->getContext().getMDKindID("clang.arc.no_objc_arc_exceptions"); - return *NoObjCARCExceptionsMDKind; - } - llvm_unreachable("Covered switch isn't covered?!"); - } -}; - -} // end namespace objcarc -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/ObjCARCInstKind.h b/llvm/include/llvm/Analysis/ObjCARCInstKind.h deleted file mode 100644 index 3b37ddf7..00000000 --- a/llvm/include/llvm/Analysis/ObjCARCInstKind.h +++ /dev/null @@ -1,124 +0,0 @@ -//===- ObjCARCInstKind.h - ARC instruction equivalence classes --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_OBJCARCINSTKIND_H -#define LLVM_ANALYSIS_OBJCARCINSTKIND_H - -#include "llvm/IR/Instructions.h" -#include "llvm/IR/Function.h" - -namespace llvm { -namespace objcarc { - -/// \enum ARCInstKind -/// -/// \brief Equivalence classes of instructions in the ARC Model. -/// -/// Since we do not have "instructions" to represent ARC concepts in LLVM IR, -/// we instead operate on equivalence classes of instructions. -/// -/// TODO: This should be split into two enums: a runtime entry point enum -/// (possibly united with the ARCRuntimeEntrypoint class) and an enum that deals -/// with effects of instructions in the ARC model (which would handle the notion -/// of a User or CallOrUser). -enum class ARCInstKind { - Retain, ///< objc_retain - RetainRV, ///< objc_retainAutoreleasedReturnValue - ClaimRV, ///< objc_unsafeClaimAutoreleasedReturnValue - RetainBlock, ///< objc_retainBlock - Release, ///< objc_release - Autorelease, ///< objc_autorelease - AutoreleaseRV, ///< objc_autoreleaseReturnValue - AutoreleasepoolPush, ///< objc_autoreleasePoolPush - AutoreleasepoolPop, ///< objc_autoreleasePoolPop - NoopCast, ///< objc_retainedObject, etc. - FusedRetainAutorelease, ///< objc_retainAutorelease - FusedRetainAutoreleaseRV, ///< objc_retainAutoreleaseReturnValue - LoadWeakRetained, ///< objc_loadWeakRetained (primitive) - StoreWeak, ///< objc_storeWeak (primitive) - InitWeak, ///< objc_initWeak (derived) - LoadWeak, ///< objc_loadWeak (derived) - MoveWeak, ///< objc_moveWeak (derived) - CopyWeak, ///< objc_copyWeak (derived) - DestroyWeak, ///< objc_destroyWeak (derived) - StoreStrong, ///< objc_storeStrong (derived) - IntrinsicUser, ///< clang.arc.use - CallOrUser, ///< could call objc_release and/or "use" pointers - Call, ///< could call objc_release - User, ///< could "use" a pointer - None ///< anything that is inert from an ARC perspective. -}; - -raw_ostream &operator<<(raw_ostream &OS, const ARCInstKind Class); - -/// \brief Test if the given class is a kind of user. -bool IsUser(ARCInstKind Class); - -/// \brief Test if the given class is objc_retain or equivalent. -bool IsRetain(ARCInstKind Class); - -/// \brief Test if the given class is objc_autorelease or equivalent. -bool IsAutorelease(ARCInstKind Class); - -/// \brief Test if the given class represents instructions which return their -/// argument verbatim. -bool IsForwarding(ARCInstKind Class); - -/// \brief Test if the given class represents instructions which do nothing if -/// passed a null pointer. -bool IsNoopOnNull(ARCInstKind Class); - -/// \brief Test if the given class represents instructions which are always safe -/// to mark with the "tail" keyword. -bool IsAlwaysTail(ARCInstKind Class); - -/// \brief Test if the given class represents instructions which are never safe -/// to mark with the "tail" keyword. -bool IsNeverTail(ARCInstKind Class); - -/// \brief Test if the given class represents instructions which are always safe -/// to mark with the nounwind attribute. -bool IsNoThrow(ARCInstKind Class); - -/// Test whether the given instruction can autorelease any pointer or cause an -/// autoreleasepool pop. -bool CanInterruptRV(ARCInstKind Class); - -/// \brief Determine if F is one of the special known Functions. If it isn't, -/// return ARCInstKind::CallOrUser. -ARCInstKind GetFunctionClass(const Function *F); - -/// \brief Determine which objc runtime call instruction class V belongs to. -/// -/// This is similar to GetARCInstKind except that it only detects objc -/// runtime calls. This allows it to be faster. -/// -inline ARCInstKind GetBasicARCInstKind(const Value *V) { - if (const CallInst *CI = dyn_cast(V)) { - if (const Function *F = CI->getCalledFunction()) - return GetFunctionClass(F); - // Otherwise, be conservative. - return ARCInstKind::CallOrUser; - } - - // Otherwise, be conservative. - return isa(V) ? ARCInstKind::CallOrUser : ARCInstKind::User; -} - -/// Map V to its ARCInstKind equivalence class. -ARCInstKind GetARCInstKind(const Value *V); - -/// Returns false if conservatively we can prove that any instruction mapped to -/// this kind can not decrement ref counts. Returns true otherwise. -bool CanDecrementRefCount(ARCInstKind Kind); - -} // end namespace objcarc -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h b/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h deleted file mode 100644 index b455a652..00000000 --- a/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h +++ /dev/null @@ -1,104 +0,0 @@ -//===- OptimizationDiagnosticInfo.h - Optimization Diagnostic ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Optimization diagnostic interfaces. It's packaged as an analysis pass so -// that by using this service passes become dependent on BFI as well. BFI is -// used to compute the "hotness" of the diagnostic message. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_OPTIMIZATIONDIAGNOSTICINFO_H -#define LLVM_IR_OPTIMIZATIONDIAGNOSTICINFO_H - -#include "llvm/ADT/Optional.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" - -namespace llvm { -class BlockFrequencyInfo; -class DebugLoc; -class Function; -class LLVMContext; -class Loop; -class Pass; -class Twine; -class Value; - -class OptimizationRemarkEmitter { -public: - OptimizationRemarkEmitter(Function *F, BlockFrequencyInfo *BFI) - : F(F), BFI(BFI) {} - - OptimizationRemarkEmitter(OptimizationRemarkEmitter &&Arg) - : F(Arg.F), BFI(Arg.BFI) {} - - OptimizationRemarkEmitter &operator=(OptimizationRemarkEmitter &&RHS) { - F = RHS.F; - BFI = RHS.BFI; - return *this; - } - - /// Emit an optimization-missed message. - /// - /// \p PassName is the name of the pass emitting the message. If - /// -Rpass-missed= is given and the name matches the regular expression in - /// -Rpass, then the remark will be emitted. \p Fn is the function triggering - /// the remark, \p DLoc is the debug location where the diagnostic is - /// generated. \p V is the IR Value that identifies the code region. \p Msg is - /// the message string to use. - void emitOptimizationRemarkMissed(const char *PassName, const DebugLoc &DLoc, - Value *V, const Twine &Msg); - - /// \brief Same as above but derives the IR Value for the code region and the - /// debug location from the Loop parameter \p L. - void emitOptimizationRemarkMissed(const char *PassName, Loop *L, - const Twine &Msg); - -private: - Function *F; - - BlockFrequencyInfo *BFI; - - Optional computeHotness(Value *V); - - OptimizationRemarkEmitter(const OptimizationRemarkEmitter &) = delete; - void operator=(const OptimizationRemarkEmitter &) = delete; -}; - -class OptimizationRemarkEmitterWrapperPass : public FunctionPass { - std::unique_ptr ORE; - -public: - OptimizationRemarkEmitterWrapperPass(); - - bool runOnFunction(Function &F) override; - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - OptimizationRemarkEmitter &getORE() { - assert(ORE && "pass not run yet"); - return *ORE; - } - - static char ID; -}; - -class OptimizationRemarkEmitterAnalysis - : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// \brief Provide the result typedef for this analysis pass. - typedef OptimizationRemarkEmitter Result; - - /// \brief Run the analysis pass over a function and produce BFI. - Result run(Function &F, AnalysisManager &AM); -}; -} -#endif // LLVM_IR_OPTIMIZATIONDIAGNOSTICINFO_H diff --git a/llvm/include/llvm/Analysis/OrderedBasicBlock.h b/llvm/include/llvm/Analysis/OrderedBasicBlock.h deleted file mode 100644 index 5aa813eb..00000000 --- a/llvm/include/llvm/Analysis/OrderedBasicBlock.h +++ /dev/null @@ -1,66 +0,0 @@ -//===- llvm/Analysis/OrderedBasicBlock.h --------------------- -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the OrderedBasicBlock class. OrderedBasicBlock maintains -// an interface where clients can query if one instruction comes before another -// in a BasicBlock. Since BasicBlock currently lacks a reliable way to query -// relative position between instructions one can use OrderedBasicBlock to do -// such queries. OrderedBasicBlock is lazily built on a source BasicBlock and -// maintains an internal Instruction -> Position map. A OrderedBasicBlock -// instance should be discarded whenever the source BasicBlock changes. -// -// It's currently used by the CaptureTracker in order to find relative -// positions of a pair of instructions inside a BasicBlock. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_ORDEREDBASICBLOCK_H -#define LLVM_ANALYSIS_ORDEREDBASICBLOCK_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/IR/BasicBlock.h" - -namespace llvm { - -class Instruction; -class BasicBlock; - -class OrderedBasicBlock { -private: - /// \brief Map a instruction to its position in a BasicBlock. - SmallDenseMap NumberedInsts; - - /// \brief Keep track of last instruction inserted into \p NumberedInsts. - /// It speeds up queries for uncached instructions by providing a start point - /// for new queries in OrderedBasicBlock::comesBefore. - BasicBlock::const_iterator LastInstFound; - - /// \brief The position/number to tag the next instruction to be found. - unsigned NextInstPos; - - /// \brief The source BasicBlock to map. - const BasicBlock *BB; - - /// \brief Given no cached results, find if \p A comes before \p B in \p BB. - /// Cache and number out instruction while walking \p BB. - bool comesBefore(const Instruction *A, const Instruction *B); - -public: - OrderedBasicBlock(const BasicBlock *BasicB); - - /// \brief Find out whether \p A dominates \p B, meaning whether \p A - /// comes before \p B in \p BB. This is a simplification that considers - /// cached instruction positions and ignores other basic blocks, being - /// only relevant to compare relative instructions positions inside \p BB. - bool dominates(const Instruction *A, const Instruction *B); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/PHITransAddr.h b/llvm/include/llvm/Analysis/PHITransAddr.h deleted file mode 100644 index f0f34f3a..00000000 --- a/llvm/include/llvm/Analysis/PHITransAddr.h +++ /dev/null @@ -1,127 +0,0 @@ -//===- PHITransAddr.h - PHI Translation for Addresses -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the PHITransAddr class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_PHITRANSADDR_H -#define LLVM_ANALYSIS_PHITRANSADDR_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/Instruction.h" - -namespace llvm { - class AssumptionCache; - class DominatorTree; - class DataLayout; - class TargetLibraryInfo; - -/// PHITransAddr - An address value which tracks and handles phi translation. -/// As we walk "up" the CFG through predecessors, we need to ensure that the -/// address we're tracking is kept up to date. For example, if we're analyzing -/// an address of "&A[i]" and walk through the definition of 'i' which is a PHI -/// node, we *must* phi translate i to get "&A[j]" or else we will analyze an -/// incorrect pointer in the predecessor block. -/// -/// This is designed to be a relatively small object that lives on the stack and -/// is copyable. -/// -class PHITransAddr { - /// Addr - The actual address we're analyzing. - Value *Addr; - - /// The DataLayout we are playing with. - const DataLayout &DL; - - /// TLI - The target library info if known, otherwise null. - const TargetLibraryInfo *TLI; - - /// A cache of @llvm.assume calls used by SimplifyInstruction. - AssumptionCache *AC; - - /// InstInputs - The inputs for our symbolic address. - SmallVector InstInputs; - -public: - PHITransAddr(Value *addr, const DataLayout &DL, AssumptionCache *AC) - : Addr(addr), DL(DL), TLI(nullptr), AC(AC) { - // If the address is an instruction, the whole thing is considered an input. - if (Instruction *I = dyn_cast(Addr)) - InstInputs.push_back(I); - } - - Value *getAddr() const { return Addr; } - - /// NeedsPHITranslationFromBlock - Return true if moving from the specified - /// BasicBlock to its predecessors requires PHI translation. - bool NeedsPHITranslationFromBlock(BasicBlock *BB) const { - // We do need translation if one of our input instructions is defined in - // this block. - for (unsigned i = 0, e = InstInputs.size(); i != e; ++i) - if (InstInputs[i]->getParent() == BB) - return true; - return false; - } - - /// IsPotentiallyPHITranslatable - If this needs PHI translation, return true - /// if we have some hope of doing it. This should be used as a filter to - /// avoid calling PHITranslateValue in hopeless situations. - bool IsPotentiallyPHITranslatable() const; - - /// PHITranslateValue - PHI translate the current address up the CFG from - /// CurBB to Pred, updating our state to reflect any needed changes. If - /// 'MustDominate' is true, the translated value must dominate - /// PredBB. This returns true on failure and sets Addr to null. - bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB, - const DominatorTree *DT, bool MustDominate); - - /// PHITranslateWithInsertion - PHI translate this value into the specified - /// predecessor block, inserting a computation of the value if it is - /// unavailable. - /// - /// All newly created instructions are added to the NewInsts list. This - /// returns null on failure. - /// - Value *PHITranslateWithInsertion(BasicBlock *CurBB, BasicBlock *PredBB, - const DominatorTree &DT, - SmallVectorImpl &NewInsts); - - void dump() const; - - /// Verify - Check internal consistency of this data structure. If the - /// structure is valid, it returns true. If invalid, it prints errors and - /// returns false. - bool Verify() const; - -private: - Value *PHITranslateSubExpr(Value *V, BasicBlock *CurBB, BasicBlock *PredBB, - const DominatorTree *DT); - - /// InsertPHITranslatedSubExpr - Insert a computation of the PHI translated - /// version of 'V' for the edge PredBB->CurBB into the end of the PredBB - /// block. All newly created instructions are added to the NewInsts list. - /// This returns null on failure. - /// - Value *InsertPHITranslatedSubExpr(Value *InVal, BasicBlock *CurBB, - BasicBlock *PredBB, const DominatorTree &DT, - SmallVectorImpl &NewInsts); - - /// AddAsInput - If the specified value is an instruction, add it as an input. - Value *AddAsInput(Value *V) { - // If V is an instruction, it is now an input. - if (Instruction *VI = dyn_cast(V)) - InstInputs.push_back(VI); - return V; - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/Passes.h b/llvm/include/llvm/Analysis/Passes.h deleted file mode 100644 index 6d8f14fa..00000000 --- a/llvm/include/llvm/Analysis/Passes.h +++ /dev/null @@ -1,101 +0,0 @@ -//===-- llvm/Analysis/Passes.h - Constructors for analyses ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header file defines prototypes for accessor functions that expose passes -// in the analysis libraries. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_PASSES_H -#define LLVM_ANALYSIS_PASSES_H - -namespace llvm { - class FunctionPass; - class ImmutablePass; - class LoopPass; - class ModulePass; - class Pass; - class PassInfo; - - //===--------------------------------------------------------------------===// - // - // createObjCARCAAWrapperPass - This pass implements ObjC-ARC-based - // alias analysis. - // - ImmutablePass *createObjCARCAAWrapperPass(); - - FunctionPass *createPAEvalPass(); - - //===--------------------------------------------------------------------===// - // - /// createLazyValueInfoPass - This creates an instance of the LazyValueInfo - /// pass. - FunctionPass *createLazyValueInfoPass(); - - //===--------------------------------------------------------------------===// - // - // createDependenceAnalysisWrapperPass - This creates an instance of the - // DependenceAnalysisWrapper pass. - // - FunctionPass *createDependenceAnalysisWrapperPass(); - - //===--------------------------------------------------------------------===// - // - // createCostModelAnalysisPass - This creates an instance of the - // CostModelAnalysis pass. - // - FunctionPass *createCostModelAnalysisPass(); - - //===--------------------------------------------------------------------===// - // - // createDelinearizationPass - This pass implements attempts to restore - // multidimensional array indices from linearized expressions. - // - FunctionPass *createDelinearizationPass(); - - //===--------------------------------------------------------------------===// - // - // createDivergenceAnalysisPass - This pass determines which branches in a GPU - // program are divergent. - // - FunctionPass *createDivergenceAnalysisPass(); - - //===--------------------------------------------------------------------===// - // - // Minor pass prototypes, allowing us to expose them through bugpoint and - // analyze. - FunctionPass *createInstCountPass(); - - //===--------------------------------------------------------------------===// - // - // createRegionInfoPass - This pass finds all single entry single exit regions - // in a function and builds the region hierarchy. - // - FunctionPass *createRegionInfoPass(); - - // Print module-level debug info metadata in human-readable form. - ModulePass *createModuleDebugInfoPrinterPass(); - - //===--------------------------------------------------------------------===// - // - // createMemDepPrinter - This pass exhaustively collects all memdep - // information and prints it with -analyze. - // - FunctionPass *createMemDepPrinter(); - - //===--------------------------------------------------------------------===// - // - // createMemDerefPrinter - This pass collects memory dereferenceability - // information and prints it with -analyze. - // - FunctionPass *createMemDerefPrinter(); - -} - -#endif diff --git a/llvm/include/llvm/Analysis/PostDominators.h b/llvm/include/llvm/Analysis/PostDominators.h deleted file mode 100644 index 99240a40..00000000 --- a/llvm/include/llvm/Analysis/PostDominators.h +++ /dev/null @@ -1,110 +0,0 @@ -//=- llvm/Analysis/PostDominators.h - Post Dominator Calculation-*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file exposes interfaces to post dominance information. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_POSTDOMINATORS_H -#define LLVM_ANALYSIS_POSTDOMINATORS_H - -#include "llvm/IR/Dominators.h" -#include "llvm/IR/PassManager.h" - -namespace llvm { - -/// PostDominatorTree Class - Concrete subclass of DominatorTree that is used to -/// compute the post-dominator tree. -/// -struct PostDominatorTree : public DominatorTreeBase { - typedef DominatorTreeBase Base; - - PostDominatorTree() : DominatorTreeBase(true) {} - - PostDominatorTree(PostDominatorTree &&Arg) - : Base(std::move(static_cast(Arg))) {} - - PostDominatorTree &operator=(PostDominatorTree &&RHS) { - Base::operator=(std::move(static_cast(RHS))); - return *this; - } -}; - -/// \brief Analysis pass which computes a \c PostDominatorTree. -class PostDominatorTreeAnalysis - : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// \brief Provide the result typedef for this analysis pass. - typedef PostDominatorTree Result; - - /// \brief Run the analysis pass over a function and produce a post dominator - /// tree. - PostDominatorTree run(Function &F, FunctionAnalysisManager &); -}; - -/// \brief Printer pass for the \c PostDominatorTree. -class PostDominatorTreePrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit PostDominatorTreePrinterPass(raw_ostream &OS); - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -struct PostDominatorTreeWrapperPass : public FunctionPass { - static char ID; // Pass identification, replacement for typeid - PostDominatorTree DT; - - PostDominatorTreeWrapperPass() : FunctionPass(ID) { - initializePostDominatorTreeWrapperPassPass(*PassRegistry::getPassRegistry()); - } - - PostDominatorTree &getPostDomTree() { return DT; } - const PostDominatorTree &getPostDomTree() const { return DT; } - - bool runOnFunction(Function &F) override; - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - } - - void releaseMemory() override { - DT.releaseMemory(); - } - - void print(raw_ostream &OS, const Module*) const override; -}; - -FunctionPass* createPostDomTree(); - -template <> struct GraphTraits - : public GraphTraits { - static NodeType *getEntryNode(PostDominatorTree *DT) { - return DT->getRootNode(); - } - - static nodes_iterator nodes_begin(PostDominatorTree *N) { - if (getEntryNode(N)) - return df_begin(getEntryNode(N)); - else - return df_end(getEntryNode(N)); - } - - static nodes_iterator nodes_end(PostDominatorTree *N) { - return df_end(getEntryNode(N)); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h deleted file mode 100644 index cd624c84..00000000 --- a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h +++ /dev/null @@ -1,113 +0,0 @@ -//===- llvm/Analysis/ProfileSummaryInfo.h - profile summary ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains a pass that provides access to profile summary -// information. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_PROFILE_SUMMARY_INFO_H -#define LLVM_ANALYSIS_PROFILE_SUMMARY_INFO_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallSet.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/PassManager.h" -#include "llvm/IR/ProfileSummary.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Pass.h" -#include - -namespace llvm { -class ProfileSummary; -/// \brief Analysis providing profile information. -/// -/// This is an immutable analysis pass that provides ability to query global -/// (program-level) profile information. The main APIs are isHotCount and -/// isColdCount that tells whether a given profile count is considered hot/cold -/// based on the profile summary. This also provides convenience methods to -/// check whether a function is hot or cold. - -// FIXME: Provide convenience methods to determine hotness/coldness of other IR -// units. This would require making this depend on BFI. -class ProfileSummaryInfo { -private: - Module &M; - std::unique_ptr Summary; - void computeSummary(); - void computeThresholds(); - // Count thresholds to answer isHotCount and isColdCount queries. - Optional HotCountThreshold, ColdCountThreshold; - -public: - ProfileSummaryInfo(Module &M) : M(M) {} - ProfileSummaryInfo(ProfileSummaryInfo &&Arg) - : M(Arg.M), Summary(std::move(Arg.Summary)) {} - /// \brief Returns true if \p F is a hot function. - bool isHotFunction(const Function *F); - /// \brief Returns true if \p F is a cold function. - bool isColdFunction(const Function *F); - /// \brief Returns true if count \p C is considered hot. - bool isHotCount(uint64_t C); - /// \brief Returns true if count \p C is considered cold. - bool isColdCount(uint64_t C); -}; - -/// An analysis pass based on legacy pass manager to deliver ProfileSummaryInfo. -class ProfileSummaryInfoWrapperPass : public ImmutablePass { - std::unique_ptr PSI; - -public: - static char ID; - ProfileSummaryInfoWrapperPass(); - - ProfileSummaryInfo *getPSI(Module &M); - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - } -}; - -/// An analysis pass based on the new PM to deliver ProfileSummaryInfo. -class ProfileSummaryAnalysis - : public AnalysisInfoMixin { -public: - typedef ProfileSummaryInfo Result; - - ProfileSummaryAnalysis() {} - ProfileSummaryAnalysis(const ProfileSummaryAnalysis &Arg) {} - ProfileSummaryAnalysis(ProfileSummaryAnalysis &&Arg) {} - ProfileSummaryAnalysis &operator=(const ProfileSummaryAnalysis &RHS) { - return *this; - } - ProfileSummaryAnalysis &operator=(ProfileSummaryAnalysis &&RHS) { - return *this; - } - - Result run(Module &M, ModuleAnalysisManager &); - -private: - friend AnalysisInfoMixin; - static char PassID; -}; - -/// \brief Printer pass that uses \c ProfileSummaryAnalysis. -class ProfileSummaryPrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit ProfileSummaryPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Module &M, AnalysisManager &AM); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/PtrUseVisitor.h b/llvm/include/llvm/Analysis/PtrUseVisitor.h deleted file mode 100644 index 6e61fc3b..00000000 --- a/llvm/include/llvm/Analysis/PtrUseVisitor.h +++ /dev/null @@ -1,285 +0,0 @@ -//===- PtrUseVisitor.h - InstVisitors over a pointers uses ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file provides a collection of visitors which walk the (instruction) -/// uses of a pointer. These visitors all provide the same essential behavior -/// as an InstVisitor with similar template-based flexibility and -/// implementation strategies. -/// -/// These can be used, for example, to quickly analyze the uses of an alloca, -/// global variable, or function argument. -/// -/// FIXME: Provide a variant which doesn't track offsets and is cheaper. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_PTRUSEVISITOR_H -#define LLVM_ANALYSIS_PTRUSEVISITOR_H - -#include "llvm/ADT/APInt.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/DataLayout.h" -#include "llvm/IR/InstVisitor.h" -#include "llvm/IR/IntrinsicInst.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { - -namespace detail { -/// \brief Implementation of non-dependent functionality for \c PtrUseVisitor. -/// -/// See \c PtrUseVisitor for the public interface and detailed comments about -/// usage. This class is just a helper base class which is not templated and -/// contains all common code to be shared between different instantiations of -/// PtrUseVisitor. -class PtrUseVisitorBase { -public: - /// \brief This class provides information about the result of a visit. - /// - /// After walking all the users (recursively) of a pointer, the basic - /// infrastructure records some commonly useful information such as escape - /// analysis and whether the visit completed or aborted early. - class PtrInfo { - public: - PtrInfo() : AbortedInfo(nullptr, false), EscapedInfo(nullptr, false) {} - - /// \brief Reset the pointer info, clearing all state. - void reset() { - AbortedInfo.setPointer(nullptr); - AbortedInfo.setInt(false); - EscapedInfo.setPointer(nullptr); - EscapedInfo.setInt(false); - } - - /// \brief Did we abort the visit early? - bool isAborted() const { return AbortedInfo.getInt(); } - - /// \brief Is the pointer escaped at some point? - bool isEscaped() const { return EscapedInfo.getInt(); } - - /// \brief Get the instruction causing the visit to abort. - /// \returns a pointer to the instruction causing the abort if one is - /// available; otherwise returns null. - Instruction *getAbortingInst() const { return AbortedInfo.getPointer(); } - - /// \brief Get the instruction causing the pointer to escape. - /// \returns a pointer to the instruction which escapes the pointer if one - /// is available; otherwise returns null. - Instruction *getEscapingInst() const { return EscapedInfo.getPointer(); } - - /// \brief Mark the visit as aborted. Intended for use in a void return. - /// \param I The instruction which caused the visit to abort, if available. - void setAborted(Instruction *I = nullptr) { - AbortedInfo.setInt(true); - AbortedInfo.setPointer(I); - } - - /// \brief Mark the pointer as escaped. Intended for use in a void return. - /// \param I The instruction which escapes the pointer, if available. - void setEscaped(Instruction *I = nullptr) { - EscapedInfo.setInt(true); - EscapedInfo.setPointer(I); - } - - /// \brief Mark the pointer as escaped, and the visit as aborted. Intended - /// for use in a void return. - /// \param I The instruction which both escapes the pointer and aborts the - /// visit, if available. - void setEscapedAndAborted(Instruction *I = nullptr) { - setEscaped(I); - setAborted(I); - } - - private: - PointerIntPair AbortedInfo, EscapedInfo; - }; - -protected: - const DataLayout &DL; - - /// \name Visitation infrastructure - /// @{ - - /// \brief The info collected about the pointer being visited thus far. - PtrInfo PI; - - /// \brief A struct of the data needed to visit a particular use. - /// - /// This is used to maintain a worklist fo to-visit uses. This is used to - /// make the visit be iterative rather than recursive. - struct UseToVisit { - typedef PointerIntPair UseAndIsOffsetKnownPair; - UseAndIsOffsetKnownPair UseAndIsOffsetKnown; - APInt Offset; - }; - - /// \brief The worklist of to-visit uses. - SmallVector Worklist; - - /// \brief A set of visited uses to break cycles in unreachable code. - SmallPtrSet VisitedUses; - - /// @} - - - /// \name Per-visit state - /// This state is reset for each instruction visited. - /// @{ - - /// \brief The use currently being visited. - Use *U; - - /// \brief True if we have a known constant offset for the use currently - /// being visited. - bool IsOffsetKnown; - - /// \brief The constant offset of the use if that is known. - APInt Offset; - - /// @} - - - /// Note that the constructor is protected because this class must be a base - /// class, we can't create instances directly of this class. - PtrUseVisitorBase(const DataLayout &DL) : DL(DL) {} - - /// \brief Enqueue the users of this instruction in the visit worklist. - /// - /// This will visit the users with the same offset of the current visit - /// (including an unknown offset if that is the current state). - void enqueueUsers(Instruction &I); - - /// \brief Walk the operands of a GEP and adjust the offset as appropriate. - /// - /// This routine does the heavy lifting of the pointer walk by computing - /// offsets and looking through GEPs. - bool adjustOffsetForGEP(GetElementPtrInst &GEPI); -}; -} // end namespace detail - -/// \brief A base class for visitors over the uses of a pointer value. -/// -/// Once constructed, a user can call \c visit on a pointer value, and this -/// will walk its uses and visit each instruction using an InstVisitor. It also -/// provides visit methods which will recurse through any pointer-to-pointer -/// transformations such as GEPs and bitcasts. -/// -/// During the visit, the current Use* being visited is available to the -/// subclass, as well as the current offset from the original base pointer if -/// known. -/// -/// The recursive visit of uses is accomplished with a worklist, so the only -/// ordering guarantee is that an instruction is visited before any uses of it -/// are visited. Note that this does *not* mean before any of its users are -/// visited! This is because users can be visited multiple times due to -/// multiple, different uses of pointers derived from the same base. -/// -/// A particular Use will only be visited once, but a User may be visited -/// multiple times, once per Use. This visits may notably have different -/// offsets. -/// -/// All visit methods on the underlying InstVisitor return a boolean. This -/// return short-circuits the visit, stopping it immediately. -/// -/// FIXME: Generalize this for all values rather than just instructions. -template -class PtrUseVisitor : protected InstVisitor, - public detail::PtrUseVisitorBase { - friend class InstVisitor; - typedef InstVisitor Base; - -public: - PtrUseVisitor(const DataLayout &DL) : PtrUseVisitorBase(DL) {} - - /// \brief Recursively visit the uses of the given pointer. - /// \returns An info struct about the pointer. See \c PtrInfo for details. - PtrInfo visitPtr(Instruction &I) { - // This must be a pointer type. Get an integer type suitable to hold - // offsets on this pointer. - // FIXME: Support a vector of pointers. - assert(I.getType()->isPointerTy()); - IntegerType *IntPtrTy = cast(DL.getIntPtrType(I.getType())); - IsOffsetKnown = true; - Offset = APInt(IntPtrTy->getBitWidth(), 0); - PI.reset(); - - // Enqueue the uses of this pointer. - enqueueUsers(I); - - // Visit all the uses off the worklist until it is empty. - while (!Worklist.empty()) { - UseToVisit ToVisit = Worklist.pop_back_val(); - U = ToVisit.UseAndIsOffsetKnown.getPointer(); - IsOffsetKnown = ToVisit.UseAndIsOffsetKnown.getInt(); - if (IsOffsetKnown) - Offset = std::move(ToVisit.Offset); - - Instruction *I = cast(U->getUser()); - static_cast(this)->visit(I); - if (PI.isAborted()) - break; - } - return PI; - } - -protected: - void visitStoreInst(StoreInst &SI) { - if (SI.getValueOperand() == U->get()) - PI.setEscaped(&SI); - } - - void visitBitCastInst(BitCastInst &BC) { - enqueueUsers(BC); - } - - void visitPtrToIntInst(PtrToIntInst &I) { - PI.setEscaped(&I); - } - - void visitGetElementPtrInst(GetElementPtrInst &GEPI) { - if (GEPI.use_empty()) - return; - - // If we can't walk the GEP, clear the offset. - if (!adjustOffsetForGEP(GEPI)) { - IsOffsetKnown = false; - Offset = APInt(); - } - - // Enqueue the users now that the offset has been adjusted. - enqueueUsers(GEPI); - } - - // No-op intrinsics which we know don't escape the pointer to to logic in - // some other function. - void visitDbgInfoIntrinsic(DbgInfoIntrinsic &I) {} - void visitMemIntrinsic(MemIntrinsic &I) {} - void visitIntrinsicInst(IntrinsicInst &II) { - switch (II.getIntrinsicID()) { - default: - return Base::visitIntrinsicInst(II); - - case Intrinsic::lifetime_start: - case Intrinsic::lifetime_end: - return; // No-op intrinsics. - } - } - - // Generically, arguments to calls and invokes escape the pointer to some - // other function. Mark that. - void visitCallSite(CallSite CS) { - PI.setEscaped(CS.getInstruction()); - Base::visitCallSite(CS); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/Analysis/RegionInfo.h b/llvm/include/llvm/Analysis/RegionInfo.h deleted file mode 100644 index 91bfd435..00000000 --- a/llvm/include/llvm/Analysis/RegionInfo.h +++ /dev/null @@ -1,984 +0,0 @@ -//===- RegionInfo.h - SESE region analysis ----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Calculate a program structure tree built out of single entry single exit -// regions. -// The basic ideas are taken from "The Program Structure Tree - Richard Johnson, -// David Pearson, Keshav Pingali - 1994", however enriched with ideas from "The -// Refined Process Structure Tree - Jussi Vanhatalo, Hagen Voelyer, Jana -// Koehler - 2009". -// The algorithm to calculate these data structures however is completely -// different, as it takes advantage of existing information already available -// in (Post)dominace tree and dominance frontier passes. This leads to a simpler -// and in practice hopefully better performing algorithm. The runtime of the -// algorithms described in the papers above are both linear in graph size, -// O(V+E), whereas this algorithm is not, as the dominance frontier information -// itself is not, but in practice runtime seems to be in the order of magnitude -// of dominance tree calculation. -// -// WARNING: LLVM is generally very concerned about compile time such that -// the use of additional analysis passes in the default -// optimization sequence is avoided as much as possible. -// Specifically, if you do not need the RegionInfo, but dominance -// information could be sufficient please base your work only on -// the dominator tree. Most passes maintain it, such that using -// it has often near zero cost. In contrast RegionInfo is by -// default not available, is not maintained by existing -// transformations and there is no intention to do so. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_REGIONINFO_H -#define LLVM_ANALYSIS_REGIONINFO_H - -#include "llvm/ADT/DepthFirstIterator.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/IR/CFG.h" -#include "llvm/IR/Dominators.h" -#include "llvm/IR/PassManager.h" -#include -#include -#include - -namespace llvm { - -// Class to be specialized for different users of RegionInfo -// (i.e. BasicBlocks or MachineBasicBlocks). This is only to avoid needing to -// pass around an unreasonable number of template parameters. -template -struct RegionTraits { - // FuncT - // BlockT - // RegionT - // RegionNodeT - // RegionInfoT - typedef typename FuncT_::UnknownRegionTypeError BrokenT; -}; - -class DominatorTree; -class DominanceFrontier; -class Loop; -class LoopInfo; -struct PostDominatorTree; -class raw_ostream; -class Region; -template -class RegionBase; -class RegionNode; -class RegionInfo; -template -class RegionInfoBase; - -template <> -struct RegionTraits { - typedef Function FuncT; - typedef BasicBlock BlockT; - typedef Region RegionT; - typedef RegionNode RegionNodeT; - typedef RegionInfo RegionInfoT; - typedef DominatorTree DomTreeT; - typedef DomTreeNode DomTreeNodeT; - typedef DominanceFrontier DomFrontierT; - typedef PostDominatorTree PostDomTreeT; - typedef Instruction InstT; - typedef Loop LoopT; - typedef LoopInfo LoopInfoT; - - static unsigned getNumSuccessors(BasicBlock *BB) { - return BB->getTerminator()->getNumSuccessors(); - } -}; - -/// @brief Marker class to iterate over the elements of a Region in flat mode. -/// -/// The class is used to either iterate in Flat mode or by not using it to not -/// iterate in Flat mode. During a Flat mode iteration all Regions are entered -/// and the iteration returns every BasicBlock. If the Flat mode is not -/// selected for SubRegions just one RegionNode containing the subregion is -/// returned. -template -class FlatIt {}; - -/// @brief A RegionNode represents a subregion or a BasicBlock that is part of a -/// Region. -template -class RegionNodeBase { - friend class RegionBase; - -public: - typedef typename Tr::BlockT BlockT; - typedef typename Tr::RegionT RegionT; - -private: - RegionNodeBase(const RegionNodeBase &) = delete; - const RegionNodeBase &operator=(const RegionNodeBase &) = delete; - - /// This is the entry basic block that starts this region node. If this is a - /// BasicBlock RegionNode, then entry is just the basic block, that this - /// RegionNode represents. Otherwise it is the entry of this (Sub)RegionNode. - /// - /// In the BBtoRegionNode map of the parent of this node, BB will always map - /// to this node no matter which kind of node this one is. - /// - /// The node can hold either a Region or a BasicBlock. - /// Use one bit to save, if this RegionNode is a subregion or BasicBlock - /// RegionNode. - PointerIntPair entry; - - /// @brief The parent Region of this RegionNode. - /// @see getParent() - RegionT *parent; - -protected: - /// @brief Create a RegionNode. - /// - /// @param Parent The parent of this RegionNode. - /// @param Entry The entry BasicBlock of the RegionNode. If this - /// RegionNode represents a BasicBlock, this is the - /// BasicBlock itself. If it represents a subregion, this - /// is the entry BasicBlock of the subregion. - /// @param isSubRegion If this RegionNode represents a SubRegion. - inline RegionNodeBase(RegionT *Parent, BlockT *Entry, - bool isSubRegion = false) - : entry(Entry, isSubRegion), parent(Parent) {} - -public: - /// @brief Get the parent Region of this RegionNode. - /// - /// The parent Region is the Region this RegionNode belongs to. If for - /// example a BasicBlock is element of two Regions, there exist two - /// RegionNodes for this BasicBlock. Each with the getParent() function - /// pointing to the Region this RegionNode belongs to. - /// - /// @return Get the parent Region of this RegionNode. - inline RegionT *getParent() const { return parent; } - - /// @brief Get the entry BasicBlock of this RegionNode. - /// - /// If this RegionNode represents a BasicBlock this is just the BasicBlock - /// itself, otherwise we return the entry BasicBlock of the Subregion - /// - /// @return The entry BasicBlock of this RegionNode. - inline BlockT *getEntry() const { return entry.getPointer(); } - - /// @brief Get the content of this RegionNode. - /// - /// This can be either a BasicBlock or a subregion. Before calling getNodeAs() - /// check the type of the content with the isSubRegion() function call. - /// - /// @return The content of this RegionNode. - template inline T *getNodeAs() const; - - /// @brief Is this RegionNode a subregion? - /// - /// @return True if it contains a subregion. False if it contains a - /// BasicBlock. - inline bool isSubRegion() const { return entry.getInt(); } -}; - -//===----------------------------------------------------------------------===// -/// @brief A single entry single exit Region. -/// -/// A Region is a connected subgraph of a control flow graph that has exactly -/// two connections to the remaining graph. It can be used to analyze or -/// optimize parts of the control flow graph. -/// -/// A simple Region is connected to the remaining graph by just two -/// edges. One edge entering the Region and another one leaving the Region. -/// -/// An extended Region (or just Region) is a subgraph that can be -/// transform into a simple Region. The transformation is done by adding -/// BasicBlocks that merge several entry or exit edges so that after the merge -/// just one entry and one exit edge exists. -/// -/// The \e Entry of a Region is the first BasicBlock that is passed after -/// entering the Region. It is an element of the Region. The entry BasicBlock -/// dominates all BasicBlocks in the Region. -/// -/// The \e Exit of a Region is the first BasicBlock that is passed after -/// leaving the Region. It is not an element of the Region. The exit BasicBlock, -/// postdominates all BasicBlocks in the Region. -/// -/// A canonical Region cannot be constructed by combining smaller -/// Regions. -/// -/// Region A is the \e parent of Region B, if B is completely contained in A. -/// -/// Two canonical Regions either do not intersect at all or one is -/// the parent of the other. -/// -/// The Program Structure Tree is a graph (V, E) where V is the set of -/// Regions in the control flow graph and E is the \e parent relation of these -/// Regions. -/// -/// Example: -/// -/// \verbatim -/// A simple control flow graph, that contains two regions. -/// -/// 1 -/// / | -/// 2 | -/// / \ 3 -/// 4 5 | -/// | | | -/// 6 7 8 -/// \ | / -/// \ |/ Region A: 1 -> 9 {1,2,3,4,5,6,7,8} -/// 9 Region B: 2 -> 9 {2,4,5,6,7} -/// \endverbatim -/// -/// You can obtain more examples by either calling -/// -/// "opt -regions -analyze anyprogram.ll" -/// or -/// "opt -view-regions-only anyprogram.ll" -/// -/// on any LLVM file you are interested in. -/// -/// The first call returns a textual representation of the program structure -/// tree, the second one creates a graphical representation using graphviz. -template -class RegionBase : public RegionNodeBase { - typedef typename Tr::FuncT FuncT; - typedef typename Tr::BlockT BlockT; - typedef typename Tr::RegionInfoT RegionInfoT; - typedef typename Tr::RegionT RegionT; - typedef typename Tr::RegionNodeT RegionNodeT; - typedef typename Tr::DomTreeT DomTreeT; - typedef typename Tr::LoopT LoopT; - typedef typename Tr::LoopInfoT LoopInfoT; - typedef typename Tr::InstT InstT; - - typedef GraphTraits BlockTraits; - typedef GraphTraits> InvBlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - typedef typename InvBlockTraits::ChildIteratorType PredIterTy; - - friend class RegionInfoBase; - RegionBase(const RegionBase &) = delete; - const RegionBase &operator=(const RegionBase &) = delete; - - // Information necessary to manage this Region. - RegionInfoT *RI; - DomTreeT *DT; - - // The exit BasicBlock of this region. - // (The entry BasicBlock is part of RegionNode) - BlockT *exit; - - typedef std::vector> RegionSet; - - // The subregions of this region. - RegionSet children; - - typedef std::map BBNodeMapT; - - // Save the BasicBlock RegionNodes that are element of this Region. - mutable BBNodeMapT BBNodeMap; - - /// Check if a BB is in this Region. This check also works - /// if the region is incorrectly built. (EXPENSIVE!) - void verifyBBInRegion(BlockT *BB) const; - - /// Walk over all the BBs of the region starting from BB and - /// verify that all reachable basic blocks are elements of the region. - /// (EXPENSIVE!) - void verifyWalk(BlockT *BB, std::set *visitedBB) const; - - /// Verify if the region and its children are valid regions (EXPENSIVE!) - void verifyRegionNest() const; - -public: - /// @brief Create a new region. - /// - /// @param Entry The entry basic block of the region. - /// @param Exit The exit basic block of the region. - /// @param RI The region info object that is managing this region. - /// @param DT The dominator tree of the current function. - /// @param Parent The surrounding region or NULL if this is a top level - /// region. - RegionBase(BlockT *Entry, BlockT *Exit, RegionInfoT *RI, DomTreeT *DT, - RegionT *Parent = nullptr); - - /// Delete the Region and all its subregions. - ~RegionBase(); - - /// @brief Get the entry BasicBlock of the Region. - /// @return The entry BasicBlock of the region. - BlockT *getEntry() const { - return RegionNodeBase::getEntry(); - } - - /// @brief Replace the entry basic block of the region with the new basic - /// block. - /// - /// @param BB The new entry basic block of the region. - void replaceEntry(BlockT *BB); - - /// @brief Replace the exit basic block of the region with the new basic - /// block. - /// - /// @param BB The new exit basic block of the region. - void replaceExit(BlockT *BB); - - /// @brief Recursively replace the entry basic block of the region. - /// - /// This function replaces the entry basic block with a new basic block. It - /// also updates all child regions that have the same entry basic block as - /// this region. - /// - /// @param NewEntry The new entry basic block. - void replaceEntryRecursive(BlockT *NewEntry); - - /// @brief Recursively replace the exit basic block of the region. - /// - /// This function replaces the exit basic block with a new basic block. It - /// also updates all child regions that have the same exit basic block as - /// this region. - /// - /// @param NewExit The new exit basic block. - void replaceExitRecursive(BlockT *NewExit); - - /// @brief Get the exit BasicBlock of the Region. - /// @return The exit BasicBlock of the Region, NULL if this is the TopLevel - /// Region. - BlockT *getExit() const { return exit; } - - /// @brief Get the parent of the Region. - /// @return The parent of the Region or NULL if this is a top level - /// Region. - RegionT *getParent() const { - return RegionNodeBase::getParent(); - } - - /// @brief Get the RegionNode representing the current Region. - /// @return The RegionNode representing the current Region. - RegionNodeT *getNode() const { - return const_cast( - reinterpret_cast(this)); - } - - /// @brief Get the nesting level of this Region. - /// - /// An toplevel Region has depth 0. - /// - /// @return The depth of the region. - unsigned getDepth() const; - - /// @brief Check if a Region is the TopLevel region. - /// - /// The toplevel region represents the whole function. - bool isTopLevelRegion() const { return exit == nullptr; } - - /// @brief Return a new (non-canonical) region, that is obtained by joining - /// this region with its predecessors. - /// - /// @return A region also starting at getEntry(), but reaching to the next - /// basic block that forms with getEntry() a (non-canonical) region. - /// NULL if such a basic block does not exist. - RegionT *getExpandedRegion() const; - - /// @brief Return the first block of this region's single entry edge, - /// if existing. - /// - /// @return The BasicBlock starting this region's single entry edge, - /// else NULL. - BlockT *getEnteringBlock() const; - - /// @brief Return the first block of this region's single exit edge, - /// if existing. - /// - /// @return The BasicBlock starting this region's single exit edge, - /// else NULL. - BlockT *getExitingBlock() const; - - /// @brief Is this a simple region? - /// - /// A region is simple if it has exactly one exit and one entry edge. - /// - /// @return True if the Region is simple. - bool isSimple() const; - - /// @brief Returns the name of the Region. - /// @return The Name of the Region. - std::string getNameStr() const; - - /// @brief Return the RegionInfo object, that belongs to this Region. - RegionInfoT *getRegionInfo() const { return RI; } - - /// PrintStyle - Print region in difference ways. - enum PrintStyle { PrintNone, PrintBB, PrintRN }; - - /// @brief Print the region. - /// - /// @param OS The output stream the Region is printed to. - /// @param printTree Print also the tree of subregions. - /// @param level The indentation level used for printing. - void print(raw_ostream &OS, bool printTree = true, unsigned level = 0, - PrintStyle Style = PrintNone) const; - -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - /// @brief Print the region to stderr. - void dump() const; -#endif - - /// @brief Check if the region contains a BasicBlock. - /// - /// @param BB The BasicBlock that might be contained in this Region. - /// @return True if the block is contained in the region otherwise false. - bool contains(const BlockT *BB) const; - - /// @brief Check if the region contains another region. - /// - /// @param SubRegion The region that might be contained in this Region. - /// @return True if SubRegion is contained in the region otherwise false. - bool contains(const RegionT *SubRegion) const { - // Toplevel Region. - if (!getExit()) - return true; - - return contains(SubRegion->getEntry()) && - (contains(SubRegion->getExit()) || - SubRegion->getExit() == getExit()); - } - - /// @brief Check if the region contains an Instruction. - /// - /// @param Inst The Instruction that might be contained in this region. - /// @return True if the Instruction is contained in the region otherwise - /// false. - bool contains(const InstT *Inst) const { return contains(Inst->getParent()); } - - /// @brief Check if the region contains a loop. - /// - /// @param L The loop that might be contained in this region. - /// @return True if the loop is contained in the region otherwise false. - /// In case a NULL pointer is passed to this function the result - /// is false, except for the region that describes the whole function. - /// In that case true is returned. - bool contains(const LoopT *L) const; - - /// @brief Get the outermost loop in the region that contains a loop. - /// - /// Find for a Loop L the outermost loop OuterL that is a parent loop of L - /// and is itself contained in the region. - /// - /// @param L The loop the lookup is started. - /// @return The outermost loop in the region, NULL if such a loop does not - /// exist or if the region describes the whole function. - LoopT *outermostLoopInRegion(LoopT *L) const; - - /// @brief Get the outermost loop in the region that contains a basic block. - /// - /// Find for a basic block BB the outermost loop L that contains BB and is - /// itself contained in the region. - /// - /// @param LI A pointer to a LoopInfo analysis. - /// @param BB The basic block surrounded by the loop. - /// @return The outermost loop in the region, NULL if such a loop does not - /// exist or if the region describes the whole function. - LoopT *outermostLoopInRegion(LoopInfoT *LI, BlockT *BB) const; - - /// @brief Get the subregion that starts at a BasicBlock - /// - /// @param BB The BasicBlock the subregion should start. - /// @return The Subregion if available, otherwise NULL. - RegionT *getSubRegionNode(BlockT *BB) const; - - /// @brief Get the RegionNode for a BasicBlock - /// - /// @param BB The BasicBlock at which the RegionNode should start. - /// @return If available, the RegionNode that represents the subregion - /// starting at BB. If no subregion starts at BB, the RegionNode - /// representing BB. - RegionNodeT *getNode(BlockT *BB) const; - - /// @brief Get the BasicBlock RegionNode for a BasicBlock - /// - /// @param BB The BasicBlock for which the RegionNode is requested. - /// @return The RegionNode representing the BB. - RegionNodeT *getBBNode(BlockT *BB) const; - - /// @brief Add a new subregion to this Region. - /// - /// @param SubRegion The new subregion that will be added. - /// @param moveChildren Move the children of this region, that are also - /// contained in SubRegion into SubRegion. - void addSubRegion(RegionT *SubRegion, bool moveChildren = false); - - /// @brief Remove a subregion from this Region. - /// - /// The subregion is not deleted, as it will probably be inserted into another - /// region. - /// @param SubRegion The SubRegion that will be removed. - RegionT *removeSubRegion(RegionT *SubRegion); - - /// @brief Move all direct child nodes of this Region to another Region. - /// - /// @param To The Region the child nodes will be transferred to. - void transferChildrenTo(RegionT *To); - - /// @brief Verify if the region is a correct region. - /// - /// Check if this is a correctly build Region. This is an expensive check, as - /// the complete CFG of the Region will be walked. - void verifyRegion() const; - - /// @brief Clear the cache for BB RegionNodes. - /// - /// After calling this function the BasicBlock RegionNodes will be stored at - /// different memory locations. RegionNodes obtained before this function is - /// called are therefore not comparable to RegionNodes abtained afterwords. - void clearNodeCache(); - - /// @name Subregion Iterators - /// - /// These iterators iterator over all subregions of this Region. - //@{ - typedef typename RegionSet::iterator iterator; - typedef typename RegionSet::const_iterator const_iterator; - - iterator begin() { return children.begin(); } - iterator end() { return children.end(); } - - const_iterator begin() const { return children.begin(); } - const_iterator end() const { return children.end(); } - //@} - - /// @name BasicBlock Iterators - /// - /// These iterators iterate over all BasicBlocks that are contained in this - /// Region. The iterator also iterates over BasicBlocks that are elements of - /// a subregion of this Region. It is therefore called a flat iterator. - //@{ - template - class block_iterator_wrapper - : public df_iterator< - typename std::conditional::type *> { - typedef df_iterator< - typename std::conditional::type *> super; - - public: - typedef block_iterator_wrapper Self; - typedef typename super::pointer pointer; - - // Construct the begin iterator. - block_iterator_wrapper(pointer Entry, pointer Exit) - : super(df_begin(Entry)) { - // Mark the exit of the region as visited, so that the children of the - // exit and the exit itself, i.e. the block outside the region will never - // be visited. - super::Visited.insert(Exit); - } - - // Construct the end iterator. - block_iterator_wrapper() : super(df_end((BlockT *)nullptr)) {} - - /*implicit*/ block_iterator_wrapper(super I) : super(I) {} - - // FIXME: Even a const_iterator returns a non-const BasicBlock pointer. - // This was introduced for backwards compatibility, but should - // be removed as soon as all users are fixed. - BlockT *operator*() const { - return const_cast(super::operator*()); - } - }; - - typedef block_iterator_wrapper block_iterator; - typedef block_iterator_wrapper const_block_iterator; - - block_iterator block_begin() { return block_iterator(getEntry(), getExit()); } - - block_iterator block_end() { return block_iterator(); } - - const_block_iterator block_begin() const { - return const_block_iterator(getEntry(), getExit()); - } - const_block_iterator block_end() const { return const_block_iterator(); } - - typedef iterator_range block_range; - typedef iterator_range const_block_range; - - /// @brief Returns a range view of the basic blocks in the region. - inline block_range blocks() { - return block_range(block_begin(), block_end()); - } - - /// @brief Returns a range view of the basic blocks in the region. - /// - /// This is the 'const' version of the range view. - inline const_block_range blocks() const { - return const_block_range(block_begin(), block_end()); - } - //@} - - /// @name Element Iterators - /// - /// These iterators iterate over all BasicBlock and subregion RegionNodes that - /// are direct children of this Region. It does not iterate over any - /// RegionNodes that are also element of a subregion of this Region. - //@{ - typedef df_iterator, false, - GraphTraits> element_iterator; - - typedef df_iterator, - false, - GraphTraits> const_element_iterator; - - element_iterator element_begin(); - element_iterator element_end(); - - const_element_iterator element_begin() const; - const_element_iterator element_end() const; - //@} -}; - -/// Print a RegionNode. -template -inline raw_ostream &operator<<(raw_ostream &OS, const RegionNodeBase &Node); - -//===----------------------------------------------------------------------===// -/// @brief Analysis that detects all canonical Regions. -/// -/// The RegionInfo pass detects all canonical regions in a function. The Regions -/// are connected using the parent relation. This builds a Program Structure -/// Tree. -template -class RegionInfoBase { - typedef typename Tr::BlockT BlockT; - typedef typename Tr::FuncT FuncT; - typedef typename Tr::RegionT RegionT; - typedef typename Tr::RegionInfoT RegionInfoT; - typedef typename Tr::DomTreeT DomTreeT; - typedef typename Tr::DomTreeNodeT DomTreeNodeT; - typedef typename Tr::PostDomTreeT PostDomTreeT; - typedef typename Tr::DomFrontierT DomFrontierT; - typedef GraphTraits BlockTraits; - typedef GraphTraits> InvBlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - typedef typename InvBlockTraits::ChildIteratorType PredIterTy; - - friend class RegionInfo; - friend class MachineRegionInfo; - typedef DenseMap BBtoBBMap; - typedef DenseMap BBtoRegionMap; - typedef SmallPtrSet RegionSet; - - RegionInfoBase(); - virtual ~RegionInfoBase(); - - RegionInfoBase(const RegionInfoBase &) = delete; - const RegionInfoBase &operator=(const RegionInfoBase &) = delete; - - RegionInfoBase(RegionInfoBase &&Arg) - : DT(std::move(Arg.DT)), PDT(std::move(Arg.PDT)), DF(std::move(Arg.DF)), - TopLevelRegion(std::move(Arg.TopLevelRegion)), - BBtoRegion(std::move(Arg.BBtoRegion)) { - Arg.wipe(); - } - RegionInfoBase &operator=(RegionInfoBase &&RHS) { - DT = std::move(RHS.DT); - PDT = std::move(RHS.PDT); - DF = std::move(RHS.DF); - TopLevelRegion = std::move(RHS.TopLevelRegion); - BBtoRegion = std::move(RHS.BBtoRegion); - RHS.wipe(); - return *this; - } - - DomTreeT *DT; - PostDomTreeT *PDT; - DomFrontierT *DF; - - /// The top level region. - RegionT *TopLevelRegion; - -private: - /// Map every BB to the smallest region, that contains BB. - BBtoRegionMap BBtoRegion; - - /// \brief Wipe this region tree's state without releasing any resources. - /// - /// This is essentially a post-move helper only. It leaves the object in an - /// assignable and destroyable state, but otherwise invalid. - void wipe() { - DT = nullptr; - PDT = nullptr; - DF = nullptr; - TopLevelRegion = nullptr; - BBtoRegion.clear(); - } - - // Check whether the entries of BBtoRegion for the BBs of region - // SR are correct. Triggers an assertion if not. Calls itself recursively for - // subregions. - void verifyBBMap(const RegionT *SR) const; - - // Returns true if BB is in the dominance frontier of - // entry, because it was inherited from exit. In the other case there is an - // edge going from entry to BB without passing exit. - bool isCommonDomFrontier(BlockT *BB, BlockT *entry, BlockT *exit) const; - - // Check if entry and exit surround a valid region, based on - // dominance tree and dominance frontier. - bool isRegion(BlockT *entry, BlockT *exit) const; - - // Saves a shortcut pointing from entry to exit. - // This function may extend this shortcut if possible. - void insertShortCut(BlockT *entry, BlockT *exit, BBtoBBMap *ShortCut) const; - - // Returns the next BB that postdominates N, while skipping - // all post dominators that cannot finish a canonical region. - DomTreeNodeT *getNextPostDom(DomTreeNodeT *N, BBtoBBMap *ShortCut) const; - - // A region is trivial, if it contains only one BB. - bool isTrivialRegion(BlockT *entry, BlockT *exit) const; - - // Creates a single entry single exit region. - RegionT *createRegion(BlockT *entry, BlockT *exit); - - // Detect all regions starting with bb 'entry'. - void findRegionsWithEntry(BlockT *entry, BBtoBBMap *ShortCut); - - // Detects regions in F. - void scanForRegions(FuncT &F, BBtoBBMap *ShortCut); - - // Get the top most parent with the same entry block. - RegionT *getTopMostParent(RegionT *region); - - // Build the region hierarchy after all region detected. - void buildRegionsTree(DomTreeNodeT *N, RegionT *region); - - // Update statistic about created regions. - virtual void updateStatistics(RegionT *R) = 0; - - // Detect all regions in function and build the region tree. - void calculate(FuncT &F); - -public: - static bool VerifyRegionInfo; - static typename RegionT::PrintStyle printStyle; - - void print(raw_ostream &OS) const; -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - void dump() const; -#endif - - void releaseMemory(); - - /// @brief Get the smallest region that contains a BasicBlock. - /// - /// @param BB The basic block. - /// @return The smallest region, that contains BB or NULL, if there is no - /// region containing BB. - RegionT *getRegionFor(BlockT *BB) const; - - /// @brief Set the smallest region that surrounds a basic block. - /// - /// @param BB The basic block surrounded by a region. - /// @param R The smallest region that surrounds BB. - void setRegionFor(BlockT *BB, RegionT *R); - - /// @brief A shortcut for getRegionFor(). - /// - /// @param BB The basic block. - /// @return The smallest region, that contains BB or NULL, if there is no - /// region containing BB. - RegionT *operator[](BlockT *BB) const; - - /// @brief Return the exit of the maximal refined region, that starts at a - /// BasicBlock. - /// - /// @param BB The BasicBlock the refined region starts. - BlockT *getMaxRegionExit(BlockT *BB) const; - - /// @brief Find the smallest region that contains two regions. - /// - /// @param A The first region. - /// @param B The second region. - /// @return The smallest region containing A and B. - RegionT *getCommonRegion(RegionT *A, RegionT *B) const; - - /// @brief Find the smallest region that contains two basic blocks. - /// - /// @param A The first basic block. - /// @param B The second basic block. - /// @return The smallest region that contains A and B. - RegionT *getCommonRegion(BlockT *A, BlockT *B) const { - return getCommonRegion(getRegionFor(A), getRegionFor(B)); - } - - /// @brief Find the smallest region that contains a set of regions. - /// - /// @param Regions A vector of regions. - /// @return The smallest region that contains all regions in Regions. - RegionT *getCommonRegion(SmallVectorImpl &Regions) const; - - /// @brief Find the smallest region that contains a set of basic blocks. - /// - /// @param BBs A vector of basic blocks. - /// @return The smallest region that contains all basic blocks in BBS. - RegionT *getCommonRegion(SmallVectorImpl &BBs) const; - - RegionT *getTopLevelRegion() const { return TopLevelRegion; } - - /// @brief Clear the Node Cache for all Regions. - /// - /// @see Region::clearNodeCache() - void clearNodeCache() { - if (TopLevelRegion) - TopLevelRegion->clearNodeCache(); - } - - void verifyAnalysis() const; -}; - -class Region; - -class RegionNode : public RegionNodeBase> { -public: - inline RegionNode(Region *Parent, BasicBlock *Entry, bool isSubRegion = false) - : RegionNodeBase>(Parent, Entry, isSubRegion) {} - - bool operator==(const Region &RN) const { - return this == reinterpret_cast(&RN); - } -}; - -class Region : public RegionBase> { -public: - Region(BasicBlock *Entry, BasicBlock *Exit, RegionInfo *RI, DominatorTree *DT, - Region *Parent = nullptr); - ~Region(); - - bool operator==(const RegionNode &RN) const { - return &RN == reinterpret_cast(this); - } -}; - -class RegionInfo : public RegionInfoBase> { -public: - typedef RegionInfoBase> Base; - - explicit RegionInfo(); - - ~RegionInfo() override; - - RegionInfo(RegionInfo &&Arg) - : Base(std::move(static_cast(Arg))) {} - RegionInfo &operator=(RegionInfo &&RHS) { - Base::operator=(std::move(static_cast(RHS))); - return *this; - } - - // updateStatistics - Update statistic about created regions. - void updateStatistics(Region *R) final; - - void recalculate(Function &F, DominatorTree *DT, PostDominatorTree *PDT, - DominanceFrontier *DF); - -#ifndef NDEBUG - /// @brief Opens a viewer to show the GraphViz visualization of the regions. - /// - /// Useful during debugging as an alternative to dump(). - void view(); - - /// @brief Opens a viewer to show the GraphViz visualization of this region - /// without instructions in the BasicBlocks. - /// - /// Useful during debugging as an alternative to dump(). - void viewOnly(); -#endif -}; - -class RegionInfoPass : public FunctionPass { - RegionInfo RI; - -public: - static char ID; - explicit RegionInfoPass(); - - ~RegionInfoPass() override; - - RegionInfo &getRegionInfo() { return RI; } - - const RegionInfo &getRegionInfo() const { return RI; } - - /// @name FunctionPass interface - //@{ - bool runOnFunction(Function &F) override; - void releaseMemory() override; - void verifyAnalysis() const override; - void getAnalysisUsage(AnalysisUsage &AU) const override; - void print(raw_ostream &OS, const Module *) const override; - void dump() const; - //@} -}; - -/// \brief Analysis pass that exposes the \c RegionInfo for a function. -class RegionInfoAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef RegionInfo Result; - - RegionInfo run(Function &F, AnalysisManager &AM); -}; - -/// \brief Printer pass for the \c RegionInfo. -class RegionInfoPrinterPass : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit RegionInfoPrinterPass(raw_ostream &OS); - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -/// \brief Verifier pass for the \c RegionInfo. -struct RegionInfoVerifierPass : PassInfoMixin { - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -template <> -template <> -inline BasicBlock * -RegionNodeBase>::getNodeAs() const { - assert(!isSubRegion() && "This is not a BasicBlock RegionNode!"); - return getEntry(); -} - -template <> -template <> -inline Region * -RegionNodeBase>::getNodeAs() const { - assert(isSubRegion() && "This is not a subregion RegionNode!"); - auto Unconst = const_cast> *>(this); - return reinterpret_cast(Unconst); -} - -template -inline raw_ostream &operator<<(raw_ostream &OS, - const RegionNodeBase &Node) { - typedef typename Tr::BlockT BlockT; - typedef typename Tr::RegionT RegionT; - - if (Node.isSubRegion()) - return OS << Node.template getNodeAs()->getNameStr(); - else - return OS << Node.template getNodeAs()->getName(); -} - -extern template class RegionBase>; -extern template class RegionNodeBase>; -extern template class RegionInfoBase>; - -} // End llvm namespace -#endif diff --git a/llvm/include/llvm/Analysis/RegionInfoImpl.h b/llvm/include/llvm/Analysis/RegionInfoImpl.h deleted file mode 100644 index 15dd1a20..00000000 --- a/llvm/include/llvm/Analysis/RegionInfoImpl.h +++ /dev/null @@ -1,926 +0,0 @@ -//===- RegionInfoImpl.h - SESE region detection analysis --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// Detects single entry single exit regions in the control flow graph. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_REGIONINFOIMPL_H -#define LLVM_ANALYSIS_REGIONINFOIMPL_H - -#include "llvm/ADT/PostOrderIterator.h" -#include "llvm/Analysis/DominanceFrontier.h" -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/PostDominators.h" -#include "llvm/Analysis/RegionInfo.h" -#include "llvm/Analysis/RegionIterator.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/ErrorHandling.h" -#include -#include -#include - -namespace llvm { - -#define DEBUG_TYPE "region" - -//===----------------------------------------------------------------------===// -/// RegionBase Implementation -template -RegionBase::RegionBase(BlockT *Entry, BlockT *Exit, - typename Tr::RegionInfoT *RInfo, DomTreeT *dt, - RegionT *Parent) - : RegionNodeBase(Parent, Entry, 1), RI(RInfo), DT(dt), exit(Exit) {} - -template -RegionBase::~RegionBase() { - // Free the cached nodes. - for (typename BBNodeMapT::iterator it = BBNodeMap.begin(), - ie = BBNodeMap.end(); - it != ie; ++it) - delete it->second; - - // Only clean the cache for this Region. Caches of child Regions will be - // cleaned when the child Regions are deleted. - BBNodeMap.clear(); -} - -template -void RegionBase::replaceEntry(BlockT *BB) { - this->entry.setPointer(BB); -} - -template -void RegionBase::replaceExit(BlockT *BB) { - assert(exit && "No exit to replace!"); - exit = BB; -} - -template -void RegionBase::replaceEntryRecursive(BlockT *NewEntry) { - std::vector RegionQueue; - BlockT *OldEntry = getEntry(); - - RegionQueue.push_back(static_cast(this)); - while (!RegionQueue.empty()) { - RegionT *R = RegionQueue.back(); - RegionQueue.pop_back(); - - R->replaceEntry(NewEntry); - for (typename RegionT::const_iterator RI = R->begin(), RE = R->end(); - RI != RE; ++RI) { - if ((*RI)->getEntry() == OldEntry) - RegionQueue.push_back(RI->get()); - } - } -} - -template -void RegionBase::replaceExitRecursive(BlockT *NewExit) { - std::vector RegionQueue; - BlockT *OldExit = getExit(); - - RegionQueue.push_back(static_cast(this)); - while (!RegionQueue.empty()) { - RegionT *R = RegionQueue.back(); - RegionQueue.pop_back(); - - R->replaceExit(NewExit); - for (typename RegionT::const_iterator RI = R->begin(), RE = R->end(); - RI != RE; ++RI) { - if ((*RI)->getExit() == OldExit) - RegionQueue.push_back(RI->get()); - } - } -} - -template -bool RegionBase::contains(const BlockT *B) const { - BlockT *BB = const_cast(B); - - if (!DT->getNode(BB)) - return false; - - BlockT *entry = getEntry(), *exit = getExit(); - - // Toplevel region. - if (!exit) - return true; - - return (DT->dominates(entry, BB) && - !(DT->dominates(exit, BB) && DT->dominates(entry, exit))); -} - -template -bool RegionBase::contains(const LoopT *L) const { - // BBs that are not part of any loop are element of the Loop - // described by the NULL pointer. This loop is not part of any region, - // except if the region describes the whole function. - if (!L) - return getExit() == nullptr; - - if (!contains(L->getHeader())) - return false; - - SmallVector ExitingBlocks; - L->getExitingBlocks(ExitingBlocks); - - for (BlockT *BB : ExitingBlocks) { - if (!contains(BB)) - return false; - } - - return true; -} - -template -typename Tr::LoopT *RegionBase::outermostLoopInRegion(LoopT *L) const { - if (!contains(L)) - return nullptr; - - while (L && contains(L->getParentLoop())) { - L = L->getParentLoop(); - } - - return L; -} - -template -typename Tr::LoopT *RegionBase::outermostLoopInRegion(LoopInfoT *LI, - BlockT *BB) const { - assert(LI && BB && "LI and BB cannot be null!"); - LoopT *L = LI->getLoopFor(BB); - return outermostLoopInRegion(L); -} - -template -typename RegionBase::BlockT *RegionBase::getEnteringBlock() const { - BlockT *entry = getEntry(); - BlockT *Pred; - BlockT *enteringBlock = nullptr; - - for (PredIterTy PI = InvBlockTraits::child_begin(entry), - PE = InvBlockTraits::child_end(entry); - PI != PE; ++PI) { - Pred = *PI; - if (DT->getNode(Pred) && !contains(Pred)) { - if (enteringBlock) - return nullptr; - - enteringBlock = Pred; - } - } - - return enteringBlock; -} - -template -typename RegionBase::BlockT *RegionBase::getExitingBlock() const { - BlockT *exit = getExit(); - BlockT *Pred; - BlockT *exitingBlock = nullptr; - - if (!exit) - return nullptr; - - for (PredIterTy PI = InvBlockTraits::child_begin(exit), - PE = InvBlockTraits::child_end(exit); - PI != PE; ++PI) { - Pred = *PI; - if (contains(Pred)) { - if (exitingBlock) - return nullptr; - - exitingBlock = Pred; - } - } - - return exitingBlock; -} - -template -bool RegionBase::isSimple() const { - return !isTopLevelRegion() && getEnteringBlock() && getExitingBlock(); -} - -template -std::string RegionBase::getNameStr() const { - std::string exitName; - std::string entryName; - - if (getEntry()->getName().empty()) { - raw_string_ostream OS(entryName); - - getEntry()->printAsOperand(OS, false); - } else - entryName = getEntry()->getName(); - - if (getExit()) { - if (getExit()->getName().empty()) { - raw_string_ostream OS(exitName); - - getExit()->printAsOperand(OS, false); - } else - exitName = getExit()->getName(); - } else - exitName = ""; - - return entryName + " => " + exitName; -} - -template -void RegionBase::verifyBBInRegion(BlockT *BB) const { - if (!contains(BB)) - llvm_unreachable("Broken region found: enumerated BB not in region!"); - - BlockT *entry = getEntry(), *exit = getExit(); - - for (SuccIterTy SI = BlockTraits::child_begin(BB), - SE = BlockTraits::child_end(BB); - SI != SE; ++SI) { - if (!contains(*SI) && exit != *SI) - llvm_unreachable("Broken region found: edges leaving the region must go " - "to the exit node!"); - } - - if (entry != BB) { - for (PredIterTy SI = InvBlockTraits::child_begin(BB), - SE = InvBlockTraits::child_end(BB); - SI != SE; ++SI) { - if (!contains(*SI)) - llvm_unreachable("Broken region found: edges entering the region must " - "go to the entry node!"); - } - } -} - -template -void RegionBase::verifyWalk(BlockT *BB, std::set *visited) const { - BlockT *exit = getExit(); - - visited->insert(BB); - - verifyBBInRegion(BB); - - for (SuccIterTy SI = BlockTraits::child_begin(BB), - SE = BlockTraits::child_end(BB); - SI != SE; ++SI) { - if (*SI != exit && visited->find(*SI) == visited->end()) - verifyWalk(*SI, visited); - } -} - -template -void RegionBase::verifyRegion() const { - // Only do verification when user wants to, otherwise this expensive check - // will be invoked by PMDataManager::verifyPreservedAnalysis when - // a regionpass (marked PreservedAll) finish. - if (!RegionInfoBase::VerifyRegionInfo) - return; - - std::set visited; - verifyWalk(getEntry(), &visited); -} - -template -void RegionBase::verifyRegionNest() const { - for (typename RegionT::const_iterator RI = begin(), RE = end(); RI != RE; - ++RI) - (*RI)->verifyRegionNest(); - - verifyRegion(); -} - -template -typename RegionBase::element_iterator RegionBase::element_begin() { - return GraphTraits::nodes_begin(static_cast(this)); -} - -template -typename RegionBase::element_iterator RegionBase::element_end() { - return GraphTraits::nodes_end(static_cast(this)); -} - -template -typename RegionBase::const_element_iterator -RegionBase::element_begin() const { - return GraphTraits::nodes_begin( - static_cast(this)); -} - -template -typename RegionBase::const_element_iterator -RegionBase::element_end() const { - return GraphTraits::nodes_end( - static_cast(this)); -} - -template -typename Tr::RegionT *RegionBase::getSubRegionNode(BlockT *BB) const { - typedef typename Tr::RegionT RegionT; - RegionT *R = RI->getRegionFor(BB); - - if (!R || R == this) - return nullptr; - - // If we pass the BB out of this region, that means our code is broken. - assert(contains(R) && "BB not in current region!"); - - while (contains(R->getParent()) && R->getParent() != this) - R = R->getParent(); - - if (R->getEntry() != BB) - return nullptr; - - return R; -} - -template -typename Tr::RegionNodeT *RegionBase::getBBNode(BlockT *BB) const { - assert(contains(BB) && "Can get BB node out of this region!"); - - typename BBNodeMapT::const_iterator at = BBNodeMap.find(BB); - - if (at != BBNodeMap.end()) - return at->second; - - auto Deconst = const_cast *>(this); - RegionNodeT *NewNode = new RegionNodeT(static_cast(Deconst), BB); - BBNodeMap.insert(std::make_pair(BB, NewNode)); - return NewNode; -} - -template -typename Tr::RegionNodeT *RegionBase::getNode(BlockT *BB) const { - assert(contains(BB) && "Can get BB node out of this region!"); - if (RegionT *Child = getSubRegionNode(BB)) - return Child->getNode(); - - return getBBNode(BB); -} - -template -void RegionBase::transferChildrenTo(RegionT *To) { - for (iterator I = begin(), E = end(); I != E; ++I) { - (*I)->parent = To; - To->children.push_back(std::move(*I)); - } - children.clear(); -} - -template -void RegionBase::addSubRegion(RegionT *SubRegion, bool moveChildren) { - assert(!SubRegion->parent && "SubRegion already has a parent!"); - assert(std::find_if(begin(), end(), [&](const std::unique_ptr &R) { - return R.get() == SubRegion; - }) == children.end() && - "Subregion already exists!"); - - SubRegion->parent = static_cast(this); - children.push_back(std::unique_ptr(SubRegion)); - - if (!moveChildren) - return; - - assert(SubRegion->children.empty() && - "SubRegions that contain children are not supported"); - - for (element_iterator I = element_begin(), E = element_end(); I != E; ++I) { - if (!(*I)->isSubRegion()) { - BlockT *BB = (*I)->template getNodeAs(); - - if (SubRegion->contains(BB)) - RI->setRegionFor(BB, SubRegion); - } - } - - std::vector> Keep; - for (iterator I = begin(), E = end(); I != E; ++I) { - if (SubRegion->contains(I->get()) && I->get() != SubRegion) { - (*I)->parent = SubRegion; - SubRegion->children.push_back(std::move(*I)); - } else - Keep.push_back(std::move(*I)); - } - - children.clear(); - children.insert( - children.begin(), - std::move_iterator(Keep.begin()), - std::move_iterator(Keep.end())); -} - -template -typename Tr::RegionT *RegionBase::removeSubRegion(RegionT *Child) { - assert(Child->parent == this && "Child is not a child of this region!"); - Child->parent = nullptr; - typename RegionSet::iterator I = std::find_if( - children.begin(), children.end(), - [&](const std::unique_ptr &R) { return R.get() == Child; }); - assert(I != children.end() && "Region does not exit. Unable to remove."); - children.erase(children.begin() + (I - begin())); - return Child; -} - -template -unsigned RegionBase::getDepth() const { - unsigned Depth = 0; - - for (RegionT *R = getParent(); R != nullptr; R = R->getParent()) - ++Depth; - - return Depth; -} - -template -typename Tr::RegionT *RegionBase::getExpandedRegion() const { - unsigned NumSuccessors = Tr::getNumSuccessors(exit); - - if (NumSuccessors == 0) - return nullptr; - - RegionT *R = RI->getRegionFor(exit); - - if (R->getEntry() != exit) { - for (PredIterTy PI = InvBlockTraits::child_begin(getExit()), - PE = InvBlockTraits::child_end(getExit()); - PI != PE; ++PI) - if (!contains(*PI)) - return nullptr; - if (Tr::getNumSuccessors(exit) == 1) - return new RegionT(getEntry(), *BlockTraits::child_begin(exit), RI, DT); - return nullptr; - } - - while (R->getParent() && R->getParent()->getEntry() == exit) - R = R->getParent(); - - for (PredIterTy PI = InvBlockTraits::child_begin(getExit()), - PE = InvBlockTraits::child_end(getExit()); - PI != PE; ++PI) { - if (!(contains(*PI) || R->contains(*PI))) - return nullptr; - } - - return new RegionT(getEntry(), R->getExit(), RI, DT); -} - -template -void RegionBase::print(raw_ostream &OS, bool print_tree, unsigned level, - PrintStyle Style) const { - if (print_tree) - OS.indent(level * 2) << '[' << level << "] " << getNameStr(); - else - OS.indent(level * 2) << getNameStr(); - - OS << '\n'; - - if (Style != PrintNone) { - OS.indent(level * 2) << "{\n"; - OS.indent(level * 2 + 2); - - if (Style == PrintBB) { - for (const auto *BB : blocks()) - OS << BB->getName() << ", "; // TODO: remove the last "," - } else if (Style == PrintRN) { - for (const_element_iterator I = element_begin(), E = element_end(); - I != E; ++I) { - OS << **I << ", "; // TODO: remove the last ", - } - } - - OS << '\n'; - } - - if (print_tree) { - for (const_iterator RI = begin(), RE = end(); RI != RE; ++RI) - (*RI)->print(OS, print_tree, level + 1, Style); - } - - if (Style != PrintNone) - OS.indent(level * 2) << "} \n"; -} - -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) -template -void RegionBase::dump() const { - print(dbgs(), true, getDepth(), RegionInfoBase::printStyle); -} -#endif - -template -void RegionBase::clearNodeCache() { - // Free the cached nodes. - for (typename BBNodeMapT::iterator I = BBNodeMap.begin(), - IE = BBNodeMap.end(); - I != IE; ++I) - delete I->second; - - BBNodeMap.clear(); - for (typename RegionT::iterator RI = begin(), RE = end(); RI != RE; ++RI) - (*RI)->clearNodeCache(); -} - -//===----------------------------------------------------------------------===// -// RegionInfoBase implementation -// - -template -RegionInfoBase::RegionInfoBase() - : TopLevelRegion(nullptr) {} - -template -RegionInfoBase::~RegionInfoBase() { - releaseMemory(); -} - -template -void RegionInfoBase::verifyBBMap(const RegionT *R) const { - assert(R && "Re must be non-null"); - for (auto I = R->element_begin(), E = R->element_end(); I != E; ++I) { - if (I->isSubRegion()) { - const RegionT *SR = I->template getNodeAs(); - verifyBBMap(SR); - } else { - BlockT *BB = I->template getNodeAs(); - if (getRegionFor(BB) != R) - llvm_unreachable("BB map does not match region nesting"); - } - } -} - -template -bool RegionInfoBase::isCommonDomFrontier(BlockT *BB, BlockT *entry, - BlockT *exit) const { - for (PredIterTy PI = InvBlockTraits::child_begin(BB), - PE = InvBlockTraits::child_end(BB); - PI != PE; ++PI) { - BlockT *P = *PI; - if (DT->dominates(entry, P) && !DT->dominates(exit, P)) - return false; - } - - return true; -} - -template -bool RegionInfoBase::isRegion(BlockT *entry, BlockT *exit) const { - assert(entry && exit && "entry and exit must not be null!"); - typedef typename DomFrontierT::DomSetType DST; - - DST *entrySuccs = &DF->find(entry)->second; - - // Exit is the header of a loop that contains the entry. In this case, - // the dominance frontier must only contain the exit. - if (!DT->dominates(entry, exit)) { - for (typename DST::iterator SI = entrySuccs->begin(), - SE = entrySuccs->end(); - SI != SE; ++SI) { - if (*SI != exit && *SI != entry) - return false; - } - - return true; - } - - DST *exitSuccs = &DF->find(exit)->second; - - // Do not allow edges leaving the region. - for (typename DST::iterator SI = entrySuccs->begin(), SE = entrySuccs->end(); - SI != SE; ++SI) { - if (*SI == exit || *SI == entry) - continue; - if (exitSuccs->find(*SI) == exitSuccs->end()) - return false; - if (!isCommonDomFrontier(*SI, entry, exit)) - return false; - } - - // Do not allow edges pointing into the region. - for (typename DST::iterator SI = exitSuccs->begin(), SE = exitSuccs->end(); - SI != SE; ++SI) { - if (DT->properlyDominates(entry, *SI) && *SI != exit) - return false; - } - - return true; -} - -template -void RegionInfoBase::insertShortCut(BlockT *entry, BlockT *exit, - BBtoBBMap *ShortCut) const { - assert(entry && exit && "entry and exit must not be null!"); - - typename BBtoBBMap::iterator e = ShortCut->find(exit); - - if (e == ShortCut->end()) - // No further region at exit available. - (*ShortCut)[entry] = exit; - else { - // We found a region e that starts at exit. Therefore (entry, e->second) - // is also a region, that is larger than (entry, exit). Insert the - // larger one. - BlockT *BB = e->second; - (*ShortCut)[entry] = BB; - } -} - -template -typename Tr::DomTreeNodeT * -RegionInfoBase::getNextPostDom(DomTreeNodeT *N, BBtoBBMap *ShortCut) const { - typename BBtoBBMap::iterator e = ShortCut->find(N->getBlock()); - - if (e == ShortCut->end()) - return N->getIDom(); - - return PDT->getNode(e->second)->getIDom(); -} - -template -bool RegionInfoBase::isTrivialRegion(BlockT *entry, BlockT *exit) const { - assert(entry && exit && "entry and exit must not be null!"); - - unsigned num_successors = - BlockTraits::child_end(entry) - BlockTraits::child_begin(entry); - - if (num_successors <= 1 && exit == *(BlockTraits::child_begin(entry))) - return true; - - return false; -} - -template -typename Tr::RegionT *RegionInfoBase::createRegion(BlockT *entry, - BlockT *exit) { - assert(entry && exit && "entry and exit must not be null!"); - - if (isTrivialRegion(entry, exit)) - return nullptr; - - RegionT *region = - new RegionT(entry, exit, static_cast(this), DT); - BBtoRegion.insert(std::make_pair(entry, region)); - -#ifdef EXPENSIVE_CHECKS - region->verifyRegion(); -#else - DEBUG(region->verifyRegion()); -#endif - - updateStatistics(region); - return region; -} - -template -void RegionInfoBase::findRegionsWithEntry(BlockT *entry, - BBtoBBMap *ShortCut) { - assert(entry); - - DomTreeNodeT *N = PDT->getNode(entry); - if (!N) - return; - - RegionT *lastRegion = nullptr; - BlockT *lastExit = entry; - - // As only a BasicBlock that postdominates entry can finish a region, walk the - // post dominance tree upwards. - while ((N = getNextPostDom(N, ShortCut))) { - BlockT *exit = N->getBlock(); - - if (!exit) - break; - - if (isRegion(entry, exit)) { - RegionT *newRegion = createRegion(entry, exit); - - if (lastRegion) - newRegion->addSubRegion(lastRegion); - - lastRegion = newRegion; - lastExit = exit; - } - - // This can never be a region, so stop the search. - if (!DT->dominates(entry, exit)) - break; - } - - // Tried to create regions from entry to lastExit. Next time take a - // shortcut from entry to lastExit. - if (lastExit != entry) - insertShortCut(entry, lastExit, ShortCut); -} - -template -void RegionInfoBase::scanForRegions(FuncT &F, BBtoBBMap *ShortCut) { - typedef typename std::add_pointer::type FuncPtrT; - BlockT *entry = GraphTraits::getEntryNode(&F); - DomTreeNodeT *N = DT->getNode(entry); - - // Iterate over the dominance tree in post order to start with the small - // regions from the bottom of the dominance tree. If the small regions are - // detected first, detection of bigger regions is faster, as we can jump - // over the small regions. - for (auto DomNode : post_order(N)) - findRegionsWithEntry(DomNode->getBlock(), ShortCut); -} - -template -typename Tr::RegionT *RegionInfoBase::getTopMostParent(RegionT *region) { - while (region->getParent()) - region = region->getParent(); - - return region; -} - -template -void RegionInfoBase::buildRegionsTree(DomTreeNodeT *N, RegionT *region) { - BlockT *BB = N->getBlock(); - - // Passed region exit - while (BB == region->getExit()) - region = region->getParent(); - - typename BBtoRegionMap::iterator it = BBtoRegion.find(BB); - - // This basic block is a start block of a region. It is already in the - // BBtoRegion relation. Only the child basic blocks have to be updated. - if (it != BBtoRegion.end()) { - RegionT *newRegion = it->second; - region->addSubRegion(getTopMostParent(newRegion)); - region = newRegion; - } else { - BBtoRegion[BB] = region; - } - - for (typename DomTreeNodeT::iterator CI = N->begin(), CE = N->end(); CI != CE; - ++CI) { - buildRegionsTree(*CI, region); - } -} - -#ifdef EXPENSIVE_CHECKS -template -bool RegionInfoBase::VerifyRegionInfo = true; -#else -template -bool RegionInfoBase::VerifyRegionInfo = false; -#endif - -template -typename Tr::RegionT::PrintStyle RegionInfoBase::printStyle = - RegionBase::PrintNone; - -template -void RegionInfoBase::print(raw_ostream &OS) const { - OS << "Region tree:\n"; - TopLevelRegion->print(OS, true, 0, printStyle); - OS << "End region tree\n"; -} - -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) -template -void RegionInfoBase::dump() const { print(dbgs()); } -#endif - -template -void RegionInfoBase::releaseMemory() { - BBtoRegion.clear(); - if (TopLevelRegion) - delete TopLevelRegion; - TopLevelRegion = nullptr; -} - -template -void RegionInfoBase::verifyAnalysis() const { - // Do only verify regions if explicitely activated using EXPENSIVE_CHECKS or - // -verify-region-info - if (!RegionInfoBase::VerifyRegionInfo) - return; - - TopLevelRegion->verifyRegionNest(); - - verifyBBMap(TopLevelRegion); -} - -// Region pass manager support. -template -typename Tr::RegionT *RegionInfoBase::getRegionFor(BlockT *BB) const { - typename BBtoRegionMap::const_iterator I = BBtoRegion.find(BB); - return I != BBtoRegion.end() ? I->second : nullptr; -} - -template -void RegionInfoBase::setRegionFor(BlockT *BB, RegionT *R) { - BBtoRegion[BB] = R; -} - -template -typename Tr::RegionT *RegionInfoBase::operator[](BlockT *BB) const { - return getRegionFor(BB); -} - -template -typename RegionInfoBase::BlockT * -RegionInfoBase::getMaxRegionExit(BlockT *BB) const { - BlockT *Exit = nullptr; - - while (true) { - // Get largest region that starts at BB. - RegionT *R = getRegionFor(BB); - while (R && R->getParent() && R->getParent()->getEntry() == BB) - R = R->getParent(); - - // Get the single exit of BB. - if (R && R->getEntry() == BB) - Exit = R->getExit(); - else if (++BlockTraits::child_begin(BB) == BlockTraits::child_end(BB)) - Exit = *BlockTraits::child_begin(BB); - else // No single exit exists. - return Exit; - - // Get largest region that starts at Exit. - RegionT *ExitR = getRegionFor(Exit); - while (ExitR && ExitR->getParent() && - ExitR->getParent()->getEntry() == Exit) - ExitR = ExitR->getParent(); - - for (PredIterTy PI = InvBlockTraits::child_begin(Exit), - PE = InvBlockTraits::child_end(Exit); - PI != PE; ++PI) { - if (!R->contains(*PI) && !ExitR->contains(*PI)) - break; - } - - // This stops infinite cycles. - if (DT->dominates(Exit, BB)) - break; - - BB = Exit; - } - - return Exit; -} - -template -typename Tr::RegionT *RegionInfoBase::getCommonRegion(RegionT *A, - RegionT *B) const { - assert(A && B && "One of the Regions is NULL"); - - if (A->contains(B)) - return A; - - while (!B->contains(A)) - B = B->getParent(); - - return B; -} - -template -typename Tr::RegionT * -RegionInfoBase::getCommonRegion(SmallVectorImpl &Regions) const { - RegionT *ret = Regions.back(); - Regions.pop_back(); - - for (RegionT *R : Regions) - ret = getCommonRegion(ret, R); - - return ret; -} - -template -typename Tr::RegionT * -RegionInfoBase::getCommonRegion(SmallVectorImpl &BBs) const { - RegionT *ret = getRegionFor(BBs.back()); - BBs.pop_back(); - - for (BlockT *BB : BBs) - ret = getCommonRegion(ret, getRegionFor(BB)); - - return ret; -} - -template -void RegionInfoBase::calculate(FuncT &F) { - typedef typename std::add_pointer::type FuncPtrT; - - // ShortCut a function where for every BB the exit of the largest region - // starting with BB is stored. These regions can be threated as single BBS. - // This improves performance on linear CFGs. - BBtoBBMap ShortCut; - - scanForRegions(F, &ShortCut); - BlockT *BB = GraphTraits::getEntryNode(&F); - buildRegionsTree(DT->getNode(BB), TopLevelRegion); -} - -#undef DEBUG_TYPE - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/RegionIterator.h b/llvm/include/llvm/Analysis/RegionIterator.h deleted file mode 100644 index ced58dfa..00000000 --- a/llvm/include/llvm/Analysis/RegionIterator.h +++ /dev/null @@ -1,345 +0,0 @@ -//===- RegionIterator.h - Iterators to iteratate over Regions ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// This file defines the iterators to iterate over the elements of a Region. -//===----------------------------------------------------------------------===// -#ifndef LLVM_ANALYSIS_REGIONITERATOR_H -#define LLVM_ANALYSIS_REGIONITERATOR_H - -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/Analysis/RegionInfo.h" -#include "llvm/IR/CFG.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { -//===----------------------------------------------------------------------===// -/// @brief Hierarchical RegionNode successor iterator. -/// -/// This iterator iterates over all successors of a RegionNode. -/// -/// For a BasicBlock RegionNode it skips all BasicBlocks that are not part of -/// the parent Region. Furthermore for BasicBlocks that start a subregion, a -/// RegionNode representing the subregion is returned. -/// -/// For a subregion RegionNode there is just one successor. The RegionNode -/// representing the exit of the subregion. -template -class RNSuccIterator : public std::iterator { - typedef std::iterator super; - - typedef GraphTraits BlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - - // The iterator works in two modes, bb mode or region mode. - enum ItMode { - // In BB mode it returns all successors of this BasicBlock as its - // successors. - ItBB, - // In region mode there is only one successor, thats the regionnode mapping - // to the exit block of the regionnode - ItRgBegin, // At the beginning of the regionnode successor. - ItRgEnd // At the end of the regionnode successor. - }; - - // Use two bit to represent the mode iterator. - PointerIntPair Node; - - // The block successor iterator. - SuccIterTy BItor; - - // advanceRegionSucc - A region node has only one successor. It reaches end - // once we advance it. - void advanceRegionSucc() { - assert(Node.getInt() == ItRgBegin && "Cannot advance region successor!"); - Node.setInt(ItRgEnd); - } - - NodeType* getNode() const{ return Node.getPointer(); } - - // isRegionMode - Is the current iterator in region mode? - bool isRegionMode() const { return Node.getInt() != ItBB; } - - // Get the immediate successor. This function may return a Basic Block - // RegionNode or a subregion RegionNode. - NodeType* getISucc(BlockT* BB) const { - NodeType *succ; - succ = getNode()->getParent()->getNode(BB); - assert(succ && "BB not in Region or entered subregion!"); - return succ; - } - - // getRegionSucc - Return the successor basic block of a SubRegion RegionNode. - inline BlockT* getRegionSucc() const { - assert(Node.getInt() == ItRgBegin && "Cannot get the region successor!"); - return getNode()->template getNodeAs()->getExit(); - } - - // isExit - Is this the exit BB of the Region? - inline bool isExit(BlockT* BB) const { - return getNode()->getParent()->getExit() == BB; - } -public: - typedef RNSuccIterator Self; - - typedef typename super::pointer pointer; - - /// @brief Create begin iterator of a RegionNode. - inline RNSuccIterator(NodeType* node) - : Node(node, node->isSubRegion() ? ItRgBegin : ItBB), - BItor(BlockTraits::child_begin(node->getEntry())) { - - // Skip the exit block - if (!isRegionMode()) - while (BlockTraits::child_end(node->getEntry()) != BItor && isExit(*BItor)) - ++BItor; - - if (isRegionMode() && isExit(getRegionSucc())) - advanceRegionSucc(); - } - - /// @brief Create an end iterator. - inline RNSuccIterator(NodeType* node, bool) - : Node(node, node->isSubRegion() ? ItRgEnd : ItBB), - BItor(BlockTraits::child_end(node->getEntry())) {} - - inline bool operator==(const Self& x) const { - assert(isRegionMode() == x.isRegionMode() && "Broken iterator!"); - if (isRegionMode()) - return Node.getInt() == x.Node.getInt(); - else - return BItor == x.BItor; - } - - inline bool operator!=(const Self& x) const { return !operator==(x); } - - inline pointer operator*() const { - BlockT *BB = isRegionMode() ? getRegionSucc() : *BItor; - assert(!isExit(BB) && "Iterator out of range!"); - return getISucc(BB); - } - - inline Self& operator++() { - if(isRegionMode()) { - // The Region only has 1 successor. - advanceRegionSucc(); - } else { - // Skip the exit. - do - ++BItor; - while (BItor != BlockTraits::child_end(getNode()->getEntry()) - && isExit(*BItor)); - } - return *this; - } - - inline Self operator++(int) { - Self tmp = *this; - ++*this; - return tmp; - } -}; - - -//===----------------------------------------------------------------------===// -/// @brief Flat RegionNode iterator. -/// -/// The Flat Region iterator will iterate over all BasicBlock RegionNodes that -/// are contained in the Region and its subregions. This is close to a virtual -/// control flow graph of the Region. -template -class RNSuccIterator, BlockT, RegionT> - : public std::iterator { - typedef std::iterator super; - typedef GraphTraits BlockTraits; - typedef typename BlockTraits::ChildIteratorType SuccIterTy; - - NodeType* Node; - SuccIterTy Itor; - -public: - typedef RNSuccIterator, BlockT, RegionT> Self; - typedef typename super::pointer pointer; - - /// @brief Create the iterator from a RegionNode. - /// - /// Note that the incoming node must be a bb node, otherwise it will trigger - /// an assertion when we try to get a BasicBlock. - inline RNSuccIterator(NodeType* node) : - Node(node), - Itor(BlockTraits::child_begin(node->getEntry())) { - assert(!Node->isSubRegion() - && "Subregion node not allowed in flat iterating mode!"); - assert(Node->getParent() && "A BB node must have a parent!"); - - // Skip the exit block of the iterating region. - while (BlockTraits::child_end(Node->getEntry()) != Itor - && Node->getParent()->getExit() == *Itor) - ++Itor; - } - - /// @brief Create an end iterator - inline RNSuccIterator(NodeType* node, bool) : - Node(node), - Itor(BlockTraits::child_end(node->getEntry())) { - assert(!Node->isSubRegion() - && "Subregion node not allowed in flat iterating mode!"); - } - - inline bool operator==(const Self& x) const { - assert(Node->getParent() == x.Node->getParent() - && "Cannot compare iterators of different regions!"); - - return Itor == x.Itor && Node == x.Node; - } - - inline bool operator!=(const Self& x) const { return !operator==(x); } - - inline pointer operator*() const { - BlockT *BB = *Itor; - - // Get the iterating region. - RegionT *Parent = Node->getParent(); - - // The only case that the successor reaches out of the region is it reaches - // the exit of the region. - assert(Parent->getExit() != BB && "iterator out of range!"); - - return Parent->getBBNode(BB); - } - - inline Self& operator++() { - // Skip the exit block of the iterating region. - do - ++Itor; - while (Itor != succ_end(Node->getEntry()) - && Node->getParent()->getExit() == *Itor); - - return *this; - } - - inline Self operator++(int) { - Self tmp = *this; - ++*this; - return tmp; - } -}; - -template -inline RNSuccIterator succ_begin(NodeType* Node) { - return RNSuccIterator(Node); -} - -template -inline RNSuccIterator succ_end(NodeType* Node) { - return RNSuccIterator(Node, true); -} - -//===--------------------------------------------------------------------===// -// RegionNode GraphTraits specialization so the bbs in the region can be -// iterate by generic graph iterators. -// -// NodeT can either be region node or const region node, otherwise child_begin -// and child_end fail. - -#define RegionNodeGraphTraits(NodeT, BlockT, RegionT) \ - template<> struct GraphTraits { \ - typedef NodeT NodeType; \ - typedef RNSuccIterator ChildIteratorType; \ - static NodeType *getEntryNode(NodeType* N) { return N; } \ - static inline ChildIteratorType child_begin(NodeType *N) { \ - return RNSuccIterator(N); \ - } \ - static inline ChildIteratorType child_end(NodeType *N) { \ - return RNSuccIterator(N, true); \ - } \ -}; \ -template<> struct GraphTraits> { \ - typedef NodeT NodeType; \ - typedef RNSuccIterator, BlockT, RegionT > ChildIteratorType; \ - static NodeType *getEntryNode(NodeType* N) { return N; } \ - static inline ChildIteratorType child_begin(NodeType *N) { \ - return RNSuccIterator, BlockT, RegionT>(N); \ - } \ - static inline ChildIteratorType child_end(NodeType *N) { \ - return RNSuccIterator, BlockT, RegionT>(N, true); \ - } \ -} - -#define RegionGraphTraits(RegionT, NodeT) \ -template<> struct GraphTraits \ - : public GraphTraits { \ - typedef df_iterator nodes_iterator; \ - static NodeType *getEntryNode(RegionT* R) { \ - return R->getNode(R->getEntry()); \ - } \ - static nodes_iterator nodes_begin(RegionT* R) { \ - return nodes_iterator::begin(getEntryNode(R)); \ - } \ - static nodes_iterator nodes_end(RegionT* R) { \ - return nodes_iterator::end(getEntryNode(R)); \ - } \ -}; \ -template<> struct GraphTraits > \ - : public GraphTraits > { \ - typedef df_iterator, false, \ - GraphTraits > > nodes_iterator; \ - static NodeType *getEntryNode(RegionT* R) { \ - return R->getBBNode(R->getEntry()); \ - } \ - static nodes_iterator nodes_begin(RegionT* R) { \ - return nodes_iterator::begin(getEntryNode(R)); \ - } \ - static nodes_iterator nodes_end(RegionT* R) { \ - return nodes_iterator::end(getEntryNode(R)); \ - } \ -} - -RegionNodeGraphTraits(RegionNode, BasicBlock, Region); -RegionNodeGraphTraits(const RegionNode, BasicBlock, Region); - -RegionGraphTraits(Region, RegionNode); -RegionGraphTraits(const Region, const RegionNode); - -template <> struct GraphTraits - : public GraphTraits > { - typedef df_iterator, false, - GraphTraits > > nodes_iterator; - - static NodeType *getEntryNode(RegionInfo *RI) { - return GraphTraits >::getEntryNode(RI->getTopLevelRegion()); - } - static nodes_iterator nodes_begin(RegionInfo* RI) { - return nodes_iterator::begin(getEntryNode(RI)); - } - static nodes_iterator nodes_end(RegionInfo *RI) { - return nodes_iterator::end(getEntryNode(RI)); - } -}; - -template <> struct GraphTraits - : public GraphTraits { - typedef df_iterator, false, - GraphTraits > > nodes_iterator; - - static NodeType *getEntryNode(RegionInfoPass *RI) { - return GraphTraits::getEntryNode(&RI->getRegionInfo()); - } - static nodes_iterator nodes_begin(RegionInfoPass* RI) { - return GraphTraits::nodes_begin(&RI->getRegionInfo()); - } - static nodes_iterator nodes_end(RegionInfoPass *RI) { - return GraphTraits::nodes_end(&RI->getRegionInfo()); - } -}; - -} // End namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/RegionPass.h b/llvm/include/llvm/Analysis/RegionPass.h deleted file mode 100644 index bd51c49e..00000000 --- a/llvm/include/llvm/Analysis/RegionPass.h +++ /dev/null @@ -1,128 +0,0 @@ -//===- RegionPass.h - RegionPass class --------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the RegionPass class. All region based analysis, -// optimization and transformation passes are derived from RegionPass. -// This class is implemented following the some ideas of the LoopPass.h class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_REGIONPASS_H -#define LLVM_ANALYSIS_REGIONPASS_H - -#include "llvm/Analysis/RegionInfo.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/LegacyPassManagers.h" -#include "llvm/Pass.h" -#include - -namespace llvm { - -class RGPassManager; -class Function; - -//===----------------------------------------------------------------------===// -/// @brief A pass that runs on each Region in a function. -/// -/// RegionPass is managed by RGPassManager. -class RegionPass : public Pass { -public: - explicit RegionPass(char &pid) : Pass(PT_Region, pid) {} - - //===--------------------------------------------------------------------===// - /// @name To be implemented by every RegionPass - /// - //@{ - /// @brief Run the pass on a specific Region - /// - /// Accessing regions not contained in the current region is not allowed. - /// - /// @param R The region this pass is run on. - /// @param RGM The RegionPassManager that manages this Pass. - /// - /// @return True if the pass modifies this Region. - virtual bool runOnRegion(Region *R, RGPassManager &RGM) = 0; - - /// @brief Get a pass to print the LLVM IR in the region. - /// - /// @param O The output stream to print the Region. - /// @param Banner The banner to separate different printed passes. - /// - /// @return The pass to print the LLVM IR in the region. - Pass *createPrinterPass(raw_ostream &O, - const std::string &Banner) const override; - - using llvm::Pass::doInitialization; - using llvm::Pass::doFinalization; - - virtual bool doInitialization(Region *R, RGPassManager &RGM) { return false; } - virtual bool doFinalization() { return false; } - //@} - - //===--------------------------------------------------------------------===// - /// @name PassManager API - /// - //@{ - void preparePassManager(PMStack &PMS) override; - - void assignPassManager(PMStack &PMS, - PassManagerType PMT = PMT_RegionPassManager) override; - - PassManagerType getPotentialPassManagerType() const override { - return PMT_RegionPassManager; - } - //@} -}; - -/// @brief The pass manager to schedule RegionPasses. -class RGPassManager : public FunctionPass, public PMDataManager { - std::deque RQ; - bool skipThisRegion; - bool redoThisRegion; - RegionInfo *RI; - Region *CurrentRegion; - -public: - static char ID; - explicit RGPassManager(); - - /// @brief Execute all of the passes scheduled for execution. - /// - /// @return True if any of the passes modifies the function. - bool runOnFunction(Function &F) override; - - /// Pass Manager itself does not invalidate any analysis info. - /// RGPassManager needs RegionInfo. - void getAnalysisUsage(AnalysisUsage &Info) const override; - - const char *getPassName() const override { - return "Region Pass Manager"; - } - - PMDataManager *getAsPMDataManager() override { return this; } - Pass *getAsPass() override { return this; } - - /// @brief Print passes managed by this manager. - void dumpPassStructure(unsigned Offset) override; - - /// @brief Get passes contained by this manager. - Pass *getContainedPass(unsigned N) { - assert(N < PassVector.size() && "Pass number out of range!"); - Pass *FP = static_cast(PassVector[N]); - return FP; - } - - PassManagerType getPassManagerType() const override { - return PMT_RegionPassManager; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/RegionPrinter.h b/llvm/include/llvm/Analysis/RegionPrinter.h deleted file mode 100644 index 8f0035cf..00000000 --- a/llvm/include/llvm/Analysis/RegionPrinter.h +++ /dev/null @@ -1,71 +0,0 @@ -//===-- RegionPrinter.h - Region printer external interface -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines external functions that can be called to explicitly -// instantiate the region printer. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_REGIONPRINTER_H -#define LLVM_ANALYSIS_REGIONPRINTER_H - -namespace llvm { - class FunctionPass; - class Function; - class RegionInfo; - - FunctionPass *createRegionViewerPass(); - FunctionPass *createRegionOnlyViewerPass(); - FunctionPass *createRegionPrinterPass(); - FunctionPass *createRegionOnlyPrinterPass(); - -#ifndef NDEBUG - /// @brief Open a viewer to display the GraphViz vizualization of the analysis - /// result. - /// - /// Practical to call in the debugger. - /// Includes the instructions in each BasicBlock. - /// - /// @param RI The analysis to display. - void viewRegion(llvm::RegionInfo *RI); - - /// @brief Analyze the regions of a function and open its GraphViz - /// visualization in a viewer. - /// - /// Useful to call in the debugger. - /// Includes the instructions in each BasicBlock. - /// The result of a new analysis may differ from the RegionInfo the pass - /// manager currently holds. - /// - /// @param F Function to analyze. - void viewRegion(const llvm::Function *F); - - /// @brief Open a viewer to display the GraphViz vizualization of the analysis - /// result. - /// - /// Useful to call in the debugger. - /// Shows only the BasicBlock names without their instructions. - /// - /// @param RI The analysis to display. - void viewRegionOnly(llvm::RegionInfo *RI); - - /// @brief Analyze the regions of a function and open its GraphViz - /// visualization in a viewer. - /// - /// Useful to call in the debugger. - /// Shows only the BasicBlock names without their instructions. - /// The result of a new analysis may differ from the RegionInfo the pass - /// manager currently holds. - /// - /// @param F Function to analyze. - void viewRegionOnly(const llvm::Function *F); -#endif -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h deleted file mode 100644 index 535b623d..00000000 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ /dev/null @@ -1,1804 +0,0 @@ -//===- llvm/Analysis/ScalarEvolution.h - Scalar Evolution -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The ScalarEvolution class is an LLVM pass which can be used to analyze and -// categorize scalar expressions in loops. It specializes in recognizing -// general induction variables, representing them with the abstract and opaque -// SCEV class. Given this analysis, trip counts of loops and other important -// properties can be obtained. -// -// This analysis is primarily useful for induction variable substitution and -// strength reduction. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_SCALAREVOLUTION_H -#define LLVM_ANALYSIS_SCALAREVOLUTION_H - -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/FoldingSet.h" -#include "llvm/ADT/SetVector.h" -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/IR/ConstantRange.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/Operator.h" -#include "llvm/IR/PassManager.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/IR/ValueMap.h" -#include "llvm/Pass.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - class APInt; - class AssumptionCache; - class Constant; - class ConstantInt; - class DominatorTree; - class Type; - class ScalarEvolution; - class DataLayout; - class TargetLibraryInfo; - class LLVMContext; - class Operator; - class SCEV; - class SCEVAddRecExpr; - class SCEVConstant; - class SCEVExpander; - class SCEVPredicate; - class SCEVUnknown; - class Function; - - template <> struct FoldingSetTrait; - template <> struct FoldingSetTrait; - - /// This class represents an analyzed expression in the program. These are - /// opaque objects that the client is not allowed to do much with directly. - /// - class SCEV : public FoldingSetNode { - friend struct FoldingSetTrait; - - /// A reference to an Interned FoldingSetNodeID for this node. The - /// ScalarEvolution's BumpPtrAllocator holds the data. - FoldingSetNodeIDRef FastID; - - // The SCEV baseclass this node corresponds to - const unsigned short SCEVType; - - protected: - /// This field is initialized to zero and may be used in subclasses to store - /// miscellaneous information. - unsigned short SubclassData; - - private: - SCEV(const SCEV &) = delete; - void operator=(const SCEV &) = delete; - - public: - /// NoWrapFlags are bitfield indices into SubclassData. - /// - /// Add and Mul expressions may have no-unsigned-wrap or - /// no-signed-wrap properties, which are derived from the IR - /// operator. NSW is a misnomer that we use to mean no signed overflow or - /// underflow. - /// - /// AddRec expressions may have a no-self-wraparound property if, in - /// the integer domain, abs(step) * max-iteration(loop) <= - /// unsigned-max(bitwidth). This means that the recurrence will never reach - /// its start value if the step is non-zero. Computing the same value on - /// each iteration is not considered wrapping, and recurrences with step = 0 - /// are trivially . is independent of the sign of step and the - /// value the add recurrence starts with. - /// - /// Note that NUW and NSW are also valid properties of a recurrence, and - /// either implies NW. For convenience, NW will be set for a recurrence - /// whenever either NUW or NSW are set. - enum NoWrapFlags { FlagAnyWrap = 0, // No guarantee. - FlagNW = (1 << 0), // No self-wrap. - FlagNUW = (1 << 1), // No unsigned wrap. - FlagNSW = (1 << 2), // No signed wrap. - NoWrapMask = (1 << 3) -1 }; - - explicit SCEV(const FoldingSetNodeIDRef ID, unsigned SCEVTy) : - FastID(ID), SCEVType(SCEVTy), SubclassData(0) {} - - unsigned getSCEVType() const { return SCEVType; } - - /// Return the LLVM type of this SCEV expression. - /// - Type *getType() const; - - /// Return true if the expression is a constant zero. - /// - bool isZero() const; - - /// Return true if the expression is a constant one. - /// - bool isOne() const; - - /// Return true if the expression is a constant all-ones value. - /// - bool isAllOnesValue() const; - - /// Return true if the specified scev is negated, but not a constant. - bool isNonConstantNegative() const; - - /// Print out the internal representation of this scalar to the specified - /// stream. This should really only be used for debugging purposes. - void print(raw_ostream &OS) const; - - /// This method is used for debugging. - /// - void dump() const; - }; - - // Specialize FoldingSetTrait for SCEV to avoid needing to compute - // temporary FoldingSetNodeID values. - template<> struct FoldingSetTrait : DefaultFoldingSetTrait { - static void Profile(const SCEV &X, FoldingSetNodeID& ID) { - ID = X.FastID; - } - static bool Equals(const SCEV &X, const FoldingSetNodeID &ID, - unsigned IDHash, FoldingSetNodeID &TempID) { - return ID == X.FastID; - } - static unsigned ComputeHash(const SCEV &X, FoldingSetNodeID &TempID) { - return X.FastID.ComputeHash(); - } - }; - - inline raw_ostream &operator<<(raw_ostream &OS, const SCEV &S) { - S.print(OS); - return OS; - } - - /// An object of this class is returned by queries that could not be answered. - /// For example, if you ask for the number of iterations of a linked-list - /// traversal loop, you will get one of these. None of the standard SCEV - /// operations are valid on this class, it is just a marker. - struct SCEVCouldNotCompute : public SCEV { - SCEVCouldNotCompute(); - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const SCEV *S); - }; - - /// This class represents an assumption made using SCEV expressions which can - /// be checked at run-time. - class SCEVPredicate : public FoldingSetNode { - friend struct FoldingSetTrait; - - /// A reference to an Interned FoldingSetNodeID for this node. The - /// ScalarEvolution's BumpPtrAllocator holds the data. - FoldingSetNodeIDRef FastID; - - public: - enum SCEVPredicateKind { P_Union, P_Equal, P_Wrap }; - - protected: - SCEVPredicateKind Kind; - ~SCEVPredicate() = default; - SCEVPredicate(const SCEVPredicate&) = default; - SCEVPredicate &operator=(const SCEVPredicate&) = default; - - public: - SCEVPredicate(const FoldingSetNodeIDRef ID, SCEVPredicateKind Kind); - - SCEVPredicateKind getKind() const { return Kind; } - - /// Returns the estimated complexity of this predicate. This is roughly - /// measured in the number of run-time checks required. - virtual unsigned getComplexity() const { return 1; } - - /// Returns true if the predicate is always true. This means that no - /// assumptions were made and nothing needs to be checked at run-time. - virtual bool isAlwaysTrue() const = 0; - - /// Returns true if this predicate implies \p N. - virtual bool implies(const SCEVPredicate *N) const = 0; - - /// Prints a textual representation of this predicate with an indentation of - /// \p Depth. - virtual void print(raw_ostream &OS, unsigned Depth = 0) const = 0; - - /// Returns the SCEV to which this predicate applies, or nullptr if this is - /// a SCEVUnionPredicate. - virtual const SCEV *getExpr() const = 0; - }; - - inline raw_ostream &operator<<(raw_ostream &OS, const SCEVPredicate &P) { - P.print(OS); - return OS; - } - - // Specialize FoldingSetTrait for SCEVPredicate to avoid needing to compute - // temporary FoldingSetNodeID values. - template <> - struct FoldingSetTrait - : DefaultFoldingSetTrait { - - static void Profile(const SCEVPredicate &X, FoldingSetNodeID &ID) { - ID = X.FastID; - } - - static bool Equals(const SCEVPredicate &X, const FoldingSetNodeID &ID, - unsigned IDHash, FoldingSetNodeID &TempID) { - return ID == X.FastID; - } - static unsigned ComputeHash(const SCEVPredicate &X, - FoldingSetNodeID &TempID) { - return X.FastID.ComputeHash(); - } - }; - - /// This class represents an assumption that two SCEV expressions are equal, - /// and this can be checked at run-time. We assume that the left hand side is - /// a SCEVUnknown and the right hand side a constant. - class SCEVEqualPredicate final : public SCEVPredicate { - /// We assume that LHS == RHS, where LHS is a SCEVUnknown and RHS a - /// constant. - const SCEVUnknown *LHS; - const SCEVConstant *RHS; - - public: - SCEVEqualPredicate(const FoldingSetNodeIDRef ID, const SCEVUnknown *LHS, - const SCEVConstant *RHS); - - /// Implementation of the SCEVPredicate interface - bool implies(const SCEVPredicate *N) const override; - void print(raw_ostream &OS, unsigned Depth = 0) const override; - bool isAlwaysTrue() const override; - const SCEV *getExpr() const override; - - /// Returns the left hand side of the equality. - const SCEVUnknown *getLHS() const { return LHS; } - - /// Returns the right hand side of the equality. - const SCEVConstant *getRHS() const { return RHS; } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEVPredicate *P) { - return P->getKind() == P_Equal; - } - }; - - /// This class represents an assumption made on an AddRec expression. Given an - /// affine AddRec expression {a,+,b}, we assume that it has the nssw or nusw - /// flags (defined below) in the first X iterations of the loop, where X is a - /// SCEV expression returned by getPredicatedBackedgeTakenCount). - /// - /// Note that this does not imply that X is equal to the backedge taken - /// count. This means that if we have a nusw predicate for i32 {0,+,1} with a - /// predicated backedge taken count of X, we only guarantee that {0,+,1} has - /// nusw in the first X iterations. {0,+,1} may still wrap in the loop if we - /// have more than X iterations. - class SCEVWrapPredicate final : public SCEVPredicate { - public: - /// Similar to SCEV::NoWrapFlags, but with slightly different semantics - /// for FlagNUSW. The increment is considered to be signed, and a + b - /// (where b is the increment) is considered to wrap if: - /// zext(a + b) != zext(a) + sext(b) - /// - /// If Signed is a function that takes an n-bit tuple and maps to the - /// integer domain as the tuples value interpreted as twos complement, - /// and Unsigned a function that takes an n-bit tuple and maps to the - /// integer domain as as the base two value of input tuple, then a + b - /// has IncrementNUSW iff: - /// - /// 0 <= Unsigned(a) + Signed(b) < 2^n - /// - /// The IncrementNSSW flag has identical semantics with SCEV::FlagNSW. - /// - /// Note that the IncrementNUSW flag is not commutative: if base + inc - /// has IncrementNUSW, then inc + base doesn't neccessarily have this - /// property. The reason for this is that this is used for sign/zero - /// extending affine AddRec SCEV expressions when a SCEVWrapPredicate is - /// assumed. A {base,+,inc} expression is already non-commutative with - /// regards to base and inc, since it is interpreted as: - /// (((base + inc) + inc) + inc) ... - enum IncrementWrapFlags { - IncrementAnyWrap = 0, // No guarantee. - IncrementNUSW = (1 << 0), // No unsigned with signed increment wrap. - IncrementNSSW = (1 << 1), // No signed with signed increment wrap - // (equivalent with SCEV::NSW) - IncrementNoWrapMask = (1 << 2) - 1 - }; - - /// Convenient IncrementWrapFlags manipulation methods. - static SCEVWrapPredicate::IncrementWrapFlags LLVM_ATTRIBUTE_UNUSED_RESULT - clearFlags(SCEVWrapPredicate::IncrementWrapFlags Flags, - SCEVWrapPredicate::IncrementWrapFlags OffFlags) { - assert((Flags & IncrementNoWrapMask) == Flags && "Invalid flags value!"); - assert((OffFlags & IncrementNoWrapMask) == OffFlags && - "Invalid flags value!"); - return (SCEVWrapPredicate::IncrementWrapFlags)(Flags & ~OffFlags); - } - - static SCEVWrapPredicate::IncrementWrapFlags LLVM_ATTRIBUTE_UNUSED_RESULT - maskFlags(SCEVWrapPredicate::IncrementWrapFlags Flags, int Mask) { - assert((Flags & IncrementNoWrapMask) == Flags && "Invalid flags value!"); - assert((Mask & IncrementNoWrapMask) == Mask && "Invalid mask value!"); - - return (SCEVWrapPredicate::IncrementWrapFlags)(Flags & Mask); - } - - static SCEVWrapPredicate::IncrementWrapFlags LLVM_ATTRIBUTE_UNUSED_RESULT - setFlags(SCEVWrapPredicate::IncrementWrapFlags Flags, - SCEVWrapPredicate::IncrementWrapFlags OnFlags) { - assert((Flags & IncrementNoWrapMask) == Flags && "Invalid flags value!"); - assert((OnFlags & IncrementNoWrapMask) == OnFlags && - "Invalid flags value!"); - - return (SCEVWrapPredicate::IncrementWrapFlags)(Flags | OnFlags); - } - - /// Returns the set of SCEVWrapPredicate no wrap flags implied by a - /// SCEVAddRecExpr. - static SCEVWrapPredicate::IncrementWrapFlags - getImpliedFlags(const SCEVAddRecExpr *AR, ScalarEvolution &SE); - - private: - const SCEVAddRecExpr *AR; - IncrementWrapFlags Flags; - - public: - explicit SCEVWrapPredicate(const FoldingSetNodeIDRef ID, - const SCEVAddRecExpr *AR, - IncrementWrapFlags Flags); - - /// Returns the set assumed no overflow flags. - IncrementWrapFlags getFlags() const { return Flags; } - /// Implementation of the SCEVPredicate interface - const SCEV *getExpr() const override; - bool implies(const SCEVPredicate *N) const override; - void print(raw_ostream &OS, unsigned Depth = 0) const override; - bool isAlwaysTrue() const override; - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEVPredicate *P) { - return P->getKind() == P_Wrap; - } - }; - - /// This class represents a composition of other SCEV predicates, and is the - /// class that most clients will interact with. This is equivalent to a - /// logical "AND" of all the predicates in the union. - class SCEVUnionPredicate final : public SCEVPredicate { - private: - typedef DenseMap> - PredicateMap; - - /// Vector with references to all predicates in this union. - SmallVector Preds; - /// Maps SCEVs to predicates for quick look-ups. - PredicateMap SCEVToPreds; - - public: - SCEVUnionPredicate(); - - const SmallVectorImpl &getPredicates() const { - return Preds; - } - - /// Adds a predicate to this union. - void add(const SCEVPredicate *N); - - /// Returns a reference to a vector containing all predicates which apply to - /// \p Expr. - ArrayRef getPredicatesForExpr(const SCEV *Expr); - - /// Implementation of the SCEVPredicate interface - bool isAlwaysTrue() const override; - bool implies(const SCEVPredicate *N) const override; - void print(raw_ostream &OS, unsigned Depth) const override; - const SCEV *getExpr() const override; - - /// We estimate the complexity of a union predicate as the size number of - /// predicates in the union. - unsigned getComplexity() const override { return Preds.size(); } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEVPredicate *P) { - return P->getKind() == P_Union; - } - }; - - /// The main scalar evolution driver. Because client code (intentionally) - /// can't do much with the SCEV objects directly, they must ask this class - /// for services. - class ScalarEvolution { - public: - /// An enum describing the relationship between a SCEV and a loop. - enum LoopDisposition { - LoopVariant, ///< The SCEV is loop-variant (unknown). - LoopInvariant, ///< The SCEV is loop-invariant. - LoopComputable ///< The SCEV varies predictably with the loop. - }; - - /// An enum describing the relationship between a SCEV and a basic block. - enum BlockDisposition { - DoesNotDominateBlock, ///< The SCEV does not dominate the block. - DominatesBlock, ///< The SCEV dominates the block. - ProperlyDominatesBlock ///< The SCEV properly dominates the block. - }; - - /// Convenient NoWrapFlags manipulation that hides enum casts and is - /// visible in the ScalarEvolution name space. - static SCEV::NoWrapFlags LLVM_ATTRIBUTE_UNUSED_RESULT - maskFlags(SCEV::NoWrapFlags Flags, int Mask) { - return (SCEV::NoWrapFlags)(Flags & Mask); - } - static SCEV::NoWrapFlags LLVM_ATTRIBUTE_UNUSED_RESULT - setFlags(SCEV::NoWrapFlags Flags, SCEV::NoWrapFlags OnFlags) { - return (SCEV::NoWrapFlags)(Flags | OnFlags); - } - static SCEV::NoWrapFlags LLVM_ATTRIBUTE_UNUSED_RESULT - clearFlags(SCEV::NoWrapFlags Flags, SCEV::NoWrapFlags OffFlags) { - return (SCEV::NoWrapFlags)(Flags & ~OffFlags); - } - - private: - /// A CallbackVH to arrange for ScalarEvolution to be notified whenever a - /// Value is deleted. - class SCEVCallbackVH final : public CallbackVH { - ScalarEvolution *SE; - void deleted() override; - void allUsesReplacedWith(Value *New) override; - public: - SCEVCallbackVH(Value *V, ScalarEvolution *SE = nullptr); - }; - - friend class SCEVCallbackVH; - friend class SCEVExpander; - friend class SCEVUnknown; - - /// The function we are analyzing. - /// - Function &F; - - /// Does the module have any calls to the llvm.experimental.guard intrinsic - /// at all? If this is false, we avoid doing work that will only help if - /// thare are guards present in the IR. - /// - bool HasGuards; - - /// The target library information for the target we are targeting. - /// - TargetLibraryInfo &TLI; - - /// The tracker for @llvm.assume intrinsics in this function. - AssumptionCache &AC; - - /// The dominator tree. - /// - DominatorTree &DT; - - /// The loop information for the function we are currently analyzing. - /// - LoopInfo &LI; - - /// This SCEV is used to represent unknown trip counts and things. - std::unique_ptr CouldNotCompute; - - /// The typedef for HasRecMap. - /// - typedef DenseMap HasRecMapType; - - /// This is a cache to record whether a SCEV contains any scAddRecExpr. - HasRecMapType HasRecMap; - - /// The typedef for ExprValueMap. - /// - typedef DenseMap> ExprValueMapType; - - /// ExprValueMap -- This map records the original values from which - /// the SCEV expr is generated from. - ExprValueMapType ExprValueMap; - - /// The typedef for ValueExprMap. - /// - typedef DenseMap > - ValueExprMapType; - - /// This is a cache of the values we have analyzed so far. - /// - ValueExprMapType ValueExprMap; - - /// Mark predicate values currently being processed by isImpliedCond. - DenseSet PendingLoopPredicates; - - /// Set to true by isLoopBackedgeGuardedByCond when we're walking the set of - /// conditions dominating the backedge of a loop. - bool WalkingBEDominatingConds; - - /// Set to true by isKnownPredicateViaSplitting when we're trying to prove a - /// predicate by splitting it into a set of independent predicates. - bool ProvingSplitPredicate; - - /// Information about the number of loop iterations for which a loop exit's - /// branch condition evaluates to the not-taken path. This is a temporary - /// pair of exact and max expressions that are eventually summarized in - /// ExitNotTakenInfo and BackedgeTakenInfo. - struct ExitLimit { - const SCEV *Exact; - const SCEV *Max; - - /// A predicate union guard for this ExitLimit. The result is only - /// valid if this predicate evaluates to 'true' at run-time. - SCEVUnionPredicate Pred; - - /*implicit*/ ExitLimit(const SCEV *E) : Exact(E), Max(E) {} - - ExitLimit(const SCEV *E, const SCEV *M, SCEVUnionPredicate &P) - : Exact(E), Max(M), Pred(P) { - assert((isa(Exact) || - !isa(Max)) && - "Exact is not allowed to be less precise than Max"); - } - - /// Test whether this ExitLimit contains any computed information, or - /// whether it's all SCEVCouldNotCompute values. - bool hasAnyInfo() const { - return !isa(Exact) || - !isa(Max); - } - - /// Test whether this ExitLimit contains all information. - bool hasFullInfo() const { return !isa(Exact); } - }; - - /// Forward declaration of ExitNotTakenExtras - struct ExitNotTakenExtras; - - /// Information about the number of times a particular loop exit may be - /// reached before exiting the loop. - struct ExitNotTakenInfo { - AssertingVH ExitingBlock; - const SCEV *ExactNotTaken; - - ExitNotTakenExtras *ExtraInfo; - bool Complete; - - ExitNotTakenInfo() - : ExitingBlock(nullptr), ExactNotTaken(nullptr), ExtraInfo(nullptr), - Complete(true) {} - - ExitNotTakenInfo(BasicBlock *ExitBlock, const SCEV *Expr, - ExitNotTakenExtras *Ptr) - : ExitingBlock(ExitBlock), ExactNotTaken(Expr), ExtraInfo(Ptr), - Complete(true) {} - - /// Return true if all loop exits are computable. - bool isCompleteList() const { return Complete; } - - /// Sets the incomplete property, indicating that one of the loop exits - /// doesn't have a corresponding ExitNotTakenInfo entry. - void setIncomplete() { Complete = false; } - - /// Returns a pointer to the predicate associated with this information, - /// or nullptr if this doesn't exist (meaning always true). - SCEVUnionPredicate *getPred() const { - if (ExtraInfo) - return &ExtraInfo->Pred; - - return nullptr; - } - - /// Return true if the SCEV predicate associated with this information - /// is always true. - bool hasAlwaysTruePred() const { - return !getPred() || getPred()->isAlwaysTrue(); - } - - /// Defines a simple forward iterator for ExitNotTakenInfo. - class ExitNotTakenInfoIterator - : public std::iterator { - const ExitNotTakenInfo *Start; - unsigned Position; - - public: - ExitNotTakenInfoIterator(const ExitNotTakenInfo *Start, - unsigned Position) - : Start(Start), Position(Position) {} - - const ExitNotTakenInfo &operator*() const { - if (Position == 0) - return *Start; - - return Start->ExtraInfo->Exits[Position - 1]; - } - - const ExitNotTakenInfo *operator->() const { - if (Position == 0) - return Start; - - return &Start->ExtraInfo->Exits[Position - 1]; - } - - bool operator==(const ExitNotTakenInfoIterator &RHS) const { - return Start == RHS.Start && Position == RHS.Position; - } - - bool operator!=(const ExitNotTakenInfoIterator &RHS) const { - return Start != RHS.Start || Position != RHS.Position; - } - - ExitNotTakenInfoIterator &operator++() { // Preincrement - if (!Start) - return *this; - - unsigned Elements = - Start->ExtraInfo ? Start->ExtraInfo->Exits.size() + 1 : 1; - - ++Position; - - // We've run out of elements. - if (Position == Elements) { - Start = nullptr; - Position = 0; - } - - return *this; - } - ExitNotTakenInfoIterator operator++(int) { // Postincrement - ExitNotTakenInfoIterator Tmp = *this; - ++*this; - return Tmp; - } - }; - - /// Iterators - ExitNotTakenInfoIterator begin() const { - return ExitNotTakenInfoIterator(this, 0); - } - ExitNotTakenInfoIterator end() const { - return ExitNotTakenInfoIterator(nullptr, 0); - } - }; - - /// Describes the extra information that a ExitNotTakenInfo can have. - struct ExitNotTakenExtras { - /// The predicate associated with the ExitNotTakenInfo struct. - SCEVUnionPredicate Pred; - - /// The extra exits in the loop. Only the ExitNotTakenExtras structure - /// pointed to by the first ExitNotTakenInfo struct (associated with the - /// first loop exit) will populate this vector to prevent having - /// redundant information. - SmallVector Exits; - }; - - /// A struct containing the information attached to a backedge. - struct EdgeInfo { - EdgeInfo(BasicBlock *Block, const SCEV *Taken, SCEVUnionPredicate &P) : - ExitBlock(Block), Taken(Taken), Pred(std::move(P)) {} - - /// The exit basic block. - BasicBlock *ExitBlock; - - /// The (exact) number of time we take the edge back. - const SCEV *Taken; - - /// The SCEV predicated associated with Taken. If Pred doesn't evaluate - /// to true, the information in Taken is not valid (or equivalent with - /// a CouldNotCompute. - SCEVUnionPredicate Pred; - }; - - /// Information about the backedge-taken count of a loop. This currently - /// includes an exact count and a maximum count. - /// - class BackedgeTakenInfo { - /// A list of computable exits and their not-taken counts. Loops almost - /// never have more than one computable exit. - ExitNotTakenInfo ExitNotTaken; - - /// An expression indicating the least maximum backedge-taken count of the - /// loop that is known, or a SCEVCouldNotCompute. This expression is only - /// valid if the predicates associated with all loop exits are true. - const SCEV *Max; - - public: - BackedgeTakenInfo() : Max(nullptr) {} - - /// Initialize BackedgeTakenInfo from a list of exact exit counts. - BackedgeTakenInfo(SmallVectorImpl &ExitCounts, bool Complete, - const SCEV *MaxCount); - - /// Test whether this BackedgeTakenInfo contains any computed information, - /// or whether it's all SCEVCouldNotCompute values. - bool hasAnyInfo() const { - return ExitNotTaken.ExitingBlock || !isa(Max); - } - - /// Test whether this BackedgeTakenInfo contains complete information. - bool hasFullInfo() const { return ExitNotTaken.isCompleteList(); } - - /// Return an expression indicating the exact backedge-taken count of the - /// loop if it is known or SCEVCouldNotCompute otherwise. This is the - /// number of times the loop header can be guaranteed to execute, minus - /// one. - /// - /// If the SCEV predicate associated with the answer can be different - /// from AlwaysTrue, we must add a (non null) Predicates argument. - /// The SCEV predicate associated with the answer will be added to - /// Predicates. A run-time check needs to be emitted for the SCEV - /// predicate in order for the answer to be valid. - /// - /// Note that we should always know if we need to pass a predicate - /// argument or not from the way the ExitCounts vector was computed. - /// If we allowed SCEV predicates to be generated when populating this - /// vector, this information can contain them and therefore a - /// SCEVPredicate argument should be added to getExact. - const SCEV *getExact(ScalarEvolution *SE, - SCEVUnionPredicate *Predicates = nullptr) const; - - /// Return the number of times this loop exit may fall through to the back - /// edge, or SCEVCouldNotCompute. The loop is guaranteed not to exit via - /// this block before this number of iterations, but may exit via another - /// block. - const SCEV *getExact(BasicBlock *ExitingBlock, ScalarEvolution *SE) const; - - /// Get the max backedge taken count for the loop. - const SCEV *getMax(ScalarEvolution *SE) const; - - /// Return true if any backedge taken count expressions refer to the given - /// subexpression. - bool hasOperand(const SCEV *S, ScalarEvolution *SE) const; - - /// Invalidate this result and free associated memory. - void clear(); - }; - - /// Cache the backedge-taken count of the loops for this function as they - /// are computed. - DenseMap BackedgeTakenCounts; - - /// Cache the predicated backedge-taken count of the loops for this - /// function as they are computed. - DenseMap PredicatedBackedgeTakenCounts; - - /// This map contains entries for all of the PHI instructions that we - /// attempt to compute constant evolutions for. This allows us to avoid - /// potentially expensive recomputation of these properties. An instruction - /// maps to null if we are unable to compute its exit value. - DenseMap ConstantEvolutionLoopExitValue; - - /// This map contains entries for all the expressions that we attempt to - /// compute getSCEVAtScope information for, which can be expensive in - /// extreme cases. - DenseMap, 2> > ValuesAtScopes; - - /// Memoized computeLoopDisposition results. - DenseMap, 2>> - LoopDispositions; - - /// Cache for \c loopHasNoAbnormalExits. - DenseMap LoopHasNoAbnormalExits; - - /// Returns true if \p L contains no instruction that can abnormally exit - /// the loop (i.e. via throwing an exception, by terminating the thread - /// cleanly or by infinite looping in a called function). Strictly - /// speaking, the last one is not leaving the loop, but is identical to - /// leaving the loop for reasoning about undefined behavior. - bool loopHasNoAbnormalExits(const Loop *L); - - /// Compute a LoopDisposition value. - LoopDisposition computeLoopDisposition(const SCEV *S, const Loop *L); - - /// Memoized computeBlockDisposition results. - DenseMap< - const SCEV *, - SmallVector, 2>> - BlockDispositions; - - /// Compute a BlockDisposition value. - BlockDisposition computeBlockDisposition(const SCEV *S, const BasicBlock *BB); - - /// Memoized results from getRange - DenseMap UnsignedRanges; - - /// Memoized results from getRange - DenseMap SignedRanges; - - /// Used to parameterize getRange - enum RangeSignHint { HINT_RANGE_UNSIGNED, HINT_RANGE_SIGNED }; - - /// Set the memoized range for the given SCEV. - const ConstantRange &setRange(const SCEV *S, RangeSignHint Hint, - const ConstantRange &CR) { - DenseMap &Cache = - Hint == HINT_RANGE_UNSIGNED ? UnsignedRanges : SignedRanges; - - auto Pair = Cache.insert({S, CR}); - if (!Pair.second) - Pair.first->second = CR; - return Pair.first->second; - } - - /// Determine the range for a particular SCEV. - ConstantRange getRange(const SCEV *S, RangeSignHint Hint); - - /// Determines the range for the affine SCEVAddRecExpr {\p Start,+,\p Stop}. - /// Helper for \c getRange. - ConstantRange getRangeForAffineAR(const SCEV *Start, const SCEV *Stop, - const SCEV *MaxBECount, - unsigned BitWidth); - - /// Try to compute a range for the affine SCEVAddRecExpr {\p Start,+,\p - /// Stop} by "factoring out" a ternary expression from the add recurrence. - /// Helper called by \c getRange. - ConstantRange getRangeViaFactoring(const SCEV *Start, const SCEV *Stop, - const SCEV *MaxBECount, - unsigned BitWidth); - - /// We know that there is no SCEV for the specified value. Analyze the - /// expression. - const SCEV *createSCEV(Value *V); - - /// Provide the special handling we need to analyze PHI SCEVs. - const SCEV *createNodeForPHI(PHINode *PN); - - /// Helper function called from createNodeForPHI. - const SCEV *createAddRecFromPHI(PHINode *PN); - - /// Helper function called from createNodeForPHI. - const SCEV *createNodeFromSelectLikePHI(PHINode *PN); - - /// Provide special handling for a select-like instruction (currently this - /// is either a select instruction or a phi node). \p I is the instruction - /// being processed, and it is assumed equivalent to "Cond ? TrueVal : - /// FalseVal". - const SCEV *createNodeForSelectOrPHI(Instruction *I, Value *Cond, - Value *TrueVal, Value *FalseVal); - - /// Provide the special handling we need to analyze GEP SCEVs. - const SCEV *createNodeForGEP(GEPOperator *GEP); - - /// Implementation code for getSCEVAtScope; called at most once for each - /// SCEV+Loop pair. - /// - const SCEV *computeSCEVAtScope(const SCEV *S, const Loop *L); - - /// This looks up computed SCEV values for all instructions that depend on - /// the given instruction and removes them from the ValueExprMap map if they - /// reference SymName. This is used during PHI resolution. - void forgetSymbolicName(Instruction *I, const SCEV *SymName); - - /// Return the BackedgeTakenInfo for the given loop, lazily computing new - /// values if the loop hasn't been analyzed yet. The returned result is - /// guaranteed not to be predicated. - const BackedgeTakenInfo &getBackedgeTakenInfo(const Loop *L); - - /// Similar to getBackedgeTakenInfo, but will add predicates as required - /// with the purpose of returning complete information. - const BackedgeTakenInfo &getPredicatedBackedgeTakenInfo(const Loop *L); - - /// Compute the number of times the specified loop will iterate. - /// If AllowPredicates is set, we will create new SCEV predicates as - /// necessary in order to return an exact answer. - BackedgeTakenInfo computeBackedgeTakenCount(const Loop *L, - bool AllowPredicates = false); - - /// Compute the number of times the backedge of the specified loop will - /// execute if it exits via the specified block. If AllowPredicates is set, - /// this call will try to use a minimal set of SCEV predicates in order to - /// return an exact answer. - ExitLimit computeExitLimit(const Loop *L, BasicBlock *ExitingBlock, - bool AllowPredicates = false); - - /// Compute the number of times the backedge of the specified loop will - /// execute if its exit condition were a conditional branch of ExitCond, - /// TBB, and FBB. - /// - /// \p ControlsExit is true if ExitCond directly controls the exit - /// branch. In this case, we can assume that the loop exits only if the - /// condition is true and can infer that failing to meet the condition prior - /// to integer wraparound results in undefined behavior. - /// - /// If \p AllowPredicates is set, this call will try to use a minimal set of - /// SCEV predicates in order to return an exact answer. - ExitLimit computeExitLimitFromCond(const Loop *L, - Value *ExitCond, - BasicBlock *TBB, - BasicBlock *FBB, - bool ControlsExit, - bool AllowPredicates = false); - - /// Compute the number of times the backedge of the specified loop will - /// execute if its exit condition were a conditional branch of the ICmpInst - /// ExitCond, TBB, and FBB. If AllowPredicates is set, this call will try - /// to use a minimal set of SCEV predicates in order to return an exact - /// answer. - ExitLimit computeExitLimitFromICmp(const Loop *L, - ICmpInst *ExitCond, - BasicBlock *TBB, - BasicBlock *FBB, - bool IsSubExpr, - bool AllowPredicates = false); - - /// Compute the number of times the backedge of the specified loop will - /// execute if its exit condition were a switch with a single exiting case - /// to ExitingBB. - ExitLimit - computeExitLimitFromSingleExitSwitch(const Loop *L, SwitchInst *Switch, - BasicBlock *ExitingBB, bool IsSubExpr); - - /// Given an exit condition of 'icmp op load X, cst', try to see if we can - /// compute the backedge-taken count. - ExitLimit computeLoadConstantCompareExitLimit(LoadInst *LI, - Constant *RHS, - const Loop *L, - ICmpInst::Predicate p); - - /// Compute the exit limit of a loop that is controlled by a - /// "(IV >> 1) != 0" type comparison. We cannot compute the exact trip - /// count in these cases (since SCEV has no way of expressing them), but we - /// can still sometimes compute an upper bound. - /// - /// Return an ExitLimit for a loop whose backedge is guarded by `LHS Pred - /// RHS`. - ExitLimit computeShiftCompareExitLimit(Value *LHS, Value *RHS, - const Loop *L, - ICmpInst::Predicate Pred); - - /// If the loop is known to execute a constant number of times (the - /// condition evolves only from constants), try to evaluate a few iterations - /// of the loop until we get the exit condition gets a value of ExitWhen - /// (true or false). If we cannot evaluate the exit count of the loop, - /// return CouldNotCompute. - const SCEV *computeExitCountExhaustively(const Loop *L, - Value *Cond, - bool ExitWhen); - - /// Return the number of times an exit condition comparing the specified - /// value to zero will execute. If not computable, return CouldNotCompute. - /// If AllowPredicates is set, this call will try to use a minimal set of - /// SCEV predicates in order to return an exact answer. - ExitLimit howFarToZero(const SCEV *V, const Loop *L, bool IsSubExpr, - bool AllowPredicates = false); - - /// Return the number of times an exit condition checking the specified - /// value for nonzero will execute. If not computable, return - /// CouldNotCompute. - ExitLimit howFarToNonZero(const SCEV *V, const Loop *L); - - /// Return the number of times an exit condition containing the specified - /// less-than comparison will execute. If not computable, return - /// CouldNotCompute. - /// - /// \p isSigned specifies whether the less-than is signed. - /// - /// \p ControlsExit is true when the LHS < RHS condition directly controls - /// the branch (loops exits only if condition is true). In this case, we can - /// use NoWrapFlags to skip overflow checks. - /// - /// If \p AllowPredicates is set, this call will try to use a minimal set of - /// SCEV predicates in order to return an exact answer. - ExitLimit howManyLessThans(const SCEV *LHS, const SCEV *RHS, const Loop *L, - bool isSigned, bool ControlsExit, - bool AllowPredicates = false); - - ExitLimit howManyGreaterThans(const SCEV *LHS, const SCEV *RHS, - const Loop *L, bool isSigned, bool IsSubExpr, - bool AllowPredicates = false); - - /// Return a predecessor of BB (which may not be an immediate predecessor) - /// which has exactly one successor from which BB is reachable, or null if - /// no such block is found. - std::pair - getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB); - - /// Test whether the condition described by Pred, LHS, and RHS is true - /// whenever the given FoundCondValue value evaluates to true. - bool isImpliedCond(ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS, - Value *FoundCondValue, - bool Inverse); - - /// Test whether the condition described by Pred, LHS, and RHS is true - /// whenever the condition described by FoundPred, FoundLHS, FoundRHS is - /// true. - bool isImpliedCond(ICmpInst::Predicate Pred, const SCEV *LHS, - const SCEV *RHS, ICmpInst::Predicate FoundPred, - const SCEV *FoundLHS, const SCEV *FoundRHS); - - /// Test whether the condition described by Pred, LHS, and RHS is true - /// whenever the condition described by Pred, FoundLHS, and FoundRHS is - /// true. - bool isImpliedCondOperands(ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS, - const SCEV *FoundLHS, const SCEV *FoundRHS); - - /// Test whether the condition described by Pred, LHS, and RHS is true - /// whenever the condition described by Pred, FoundLHS, and FoundRHS is - /// true. - bool isImpliedCondOperandsHelper(ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS, - const SCEV *FoundLHS, - const SCEV *FoundRHS); - - /// Test whether the condition described by Pred, LHS, and RHS is true - /// whenever the condition described by Pred, FoundLHS, and FoundRHS is - /// true. Utility function used by isImpliedCondOperands. Tries to get - /// cases like "X `sgt` 0 => X - 1 `sgt` -1". - bool isImpliedCondOperandsViaRanges(ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS, - const SCEV *FoundLHS, - const SCEV *FoundRHS); - - /// Return true if the condition denoted by \p LHS \p Pred \p RHS is implied - /// by a call to \c @llvm.experimental.guard in \p BB. - bool isImpliedViaGuard(BasicBlock *BB, ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS); - - /// Test whether the condition described by Pred, LHS, and RHS is true - /// whenever the condition described by Pred, FoundLHS, and FoundRHS is - /// true. - /// - /// This routine tries to rule out certain kinds of integer overflow, and - /// then tries to reason about arithmetic properties of the predicates. - bool isImpliedCondOperandsViaNoOverflow(ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS, - const SCEV *FoundLHS, - const SCEV *FoundRHS); - - /// If we know that the specified Phi is in the header of its containing - /// loop, we know the loop executes a constant number of times, and the PHI - /// node is just a recurrence involving constants, fold it. - Constant *getConstantEvolutionLoopExitValue(PHINode *PN, const APInt& BEs, - const Loop *L); - - /// Test if the given expression is known to satisfy the condition described - /// by Pred and the known constant ranges of LHS and RHS. - /// - bool isKnownPredicateViaConstantRanges(ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS); - - /// Try to prove the condition described by "LHS Pred RHS" by ruling out - /// integer overflow. - /// - /// For instance, this will return true for "A s< (A + C)" if C is - /// positive. - bool isKnownPredicateViaNoOverflow(ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS); - - /// Try to split Pred LHS RHS into logical conjunctions (and's) and try to - /// prove them individually. - bool isKnownPredicateViaSplitting(ICmpInst::Predicate Pred, const SCEV *LHS, - const SCEV *RHS); - - /// Try to match the Expr as "(L + R)". - bool splitBinaryAdd(const SCEV *Expr, const SCEV *&L, const SCEV *&R, - SCEV::NoWrapFlags &Flags); - - /// Return true if More == (Less + C), where C is a constant. This is - /// intended to be used as a cheaper substitute for full SCEV subtraction. - bool computeConstantDifference(const SCEV *Less, const SCEV *More, - APInt &C); - - /// Drop memoized information computed for S. - void forgetMemoizedResults(const SCEV *S); - - /// Return an existing SCEV for V if there is one, otherwise return nullptr. - const SCEV *getExistingSCEV(Value *V); - - /// Return false iff given SCEV contains a SCEVUnknown with NULL value- - /// pointer. - bool checkValidity(const SCEV *S) const; - - /// Return true if `ExtendOpTy`({`Start`,+,`Step`}) can be proved to be - /// equal to {`ExtendOpTy`(`Start`),+,`ExtendOpTy`(`Step`)}. This is - /// equivalent to proving no signed (resp. unsigned) wrap in - /// {`Start`,+,`Step`} if `ExtendOpTy` is `SCEVSignExtendExpr` - /// (resp. `SCEVZeroExtendExpr`). - /// - template - bool proveNoWrapByVaryingStart(const SCEV *Start, const SCEV *Step, - const Loop *L); - - /// Try to prove NSW or NUW on \p AR relying on ConstantRange manipulation. - SCEV::NoWrapFlags proveNoWrapViaConstantRanges(const SCEVAddRecExpr *AR); - - bool isMonotonicPredicateImpl(const SCEVAddRecExpr *LHS, - ICmpInst::Predicate Pred, bool &Increasing); - - /// Return true if, for all loop invariant X, the predicate "LHS `Pred` X" - /// is monotonically increasing or decreasing. In the former case set - /// `Increasing` to true and in the latter case set `Increasing` to false. - /// - /// A predicate is said to be monotonically increasing if may go from being - /// false to being true as the loop iterates, but never the other way - /// around. A predicate is said to be monotonically decreasing if may go - /// from being true to being false as the loop iterates, but never the other - /// way around. - bool isMonotonicPredicate(const SCEVAddRecExpr *LHS, - ICmpInst::Predicate Pred, bool &Increasing); - - /// Return SCEV no-wrap flags that can be proven based on reasoning about - /// how poison produced from no-wrap flags on this value (e.g. a nuw add) - /// would trigger undefined behavior on overflow. - SCEV::NoWrapFlags getNoWrapFlagsFromUB(const Value *V); - - /// Return true if the SCEV corresponding to \p I is never poison. Proving - /// this is more complex than proving that just \p I is never poison, since - /// SCEV commons expressions across control flow, and you can have cases - /// like: - /// - /// idx0 = a + b; - /// ptr[idx0] = 100; - /// if () { - /// idx1 = a +nsw b; - /// ptr[idx1] = 200; - /// } - /// - /// where the SCEV expression (+ a b) is guaranteed to not be poison (and - /// hence not sign-overflow) only if "" is true. Since both - /// `idx0` and `idx1` will be mapped to the same SCEV expression, (+ a b), - /// it is not okay to annotate (+ a b) with in the above example. - bool isSCEVExprNeverPoison(const Instruction *I); - - /// This is like \c isSCEVExprNeverPoison but it specifically works for - /// instructions that will get mapped to SCEV add recurrences. Return true - /// if \p I will never generate poison under the assumption that \p I is an - /// add recurrence on the loop \p L. - bool isAddRecNeverPoison(const Instruction *I, const Loop *L); - - public: - ScalarEvolution(Function &F, TargetLibraryInfo &TLI, AssumptionCache &AC, - DominatorTree &DT, LoopInfo &LI); - ~ScalarEvolution(); - ScalarEvolution(ScalarEvolution &&Arg); - - LLVMContext &getContext() const { return F.getContext(); } - - /// Test if values of the given type are analyzable within the SCEV - /// framework. This primarily includes integer types, and it can optionally - /// include pointer types if the ScalarEvolution class has access to - /// target-specific information. - bool isSCEVable(Type *Ty) const; - - /// Return the size in bits of the specified type, for which isSCEVable must - /// return true. - uint64_t getTypeSizeInBits(Type *Ty) const; - - /// Return a type with the same bitwidth as the given type and which - /// represents how SCEV will treat the given type, for which isSCEVable must - /// return true. For pointer types, this is the pointer-sized integer type. - Type *getEffectiveSCEVType(Type *Ty) const; - - /// Return true if the SCEV is a scAddRecExpr or it contains - /// scAddRecExpr. The result will be cached in HasRecMap. - /// - bool containsAddRecurrence(const SCEV *S); - - /// Return the Value set from which the SCEV expr is generated. - SetVector *getSCEVValues(const SCEV *S); - - /// Erase Value from ValueExprMap and ExprValueMap. - void eraseValueFromMap(Value *V); - - /// Return a SCEV expression for the full generality of the specified - /// expression. - const SCEV *getSCEV(Value *V); - - const SCEV *getConstant(ConstantInt *V); - const SCEV *getConstant(const APInt& Val); - const SCEV *getConstant(Type *Ty, uint64_t V, bool isSigned = false); - const SCEV *getTruncateExpr(const SCEV *Op, Type *Ty); - const SCEV *getZeroExtendExpr(const SCEV *Op, Type *Ty); - const SCEV *getSignExtendExpr(const SCEV *Op, Type *Ty); - const SCEV *getAnyExtendExpr(const SCEV *Op, Type *Ty); - const SCEV *getAddExpr(SmallVectorImpl &Ops, - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap); - const SCEV *getAddExpr(const SCEV *LHS, const SCEV *RHS, - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap) { - SmallVector Ops = {LHS, RHS}; - return getAddExpr(Ops, Flags); - } - const SCEV *getAddExpr(const SCEV *Op0, const SCEV *Op1, const SCEV *Op2, - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap) { - SmallVector Ops = {Op0, Op1, Op2}; - return getAddExpr(Ops, Flags); - } - const SCEV *getMulExpr(SmallVectorImpl &Ops, - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap); - const SCEV *getMulExpr(const SCEV *LHS, const SCEV *RHS, - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap) { - SmallVector Ops = {LHS, RHS}; - return getMulExpr(Ops, Flags); - } - const SCEV *getMulExpr(const SCEV *Op0, const SCEV *Op1, const SCEV *Op2, - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap) { - SmallVector Ops = {Op0, Op1, Op2}; - return getMulExpr(Ops, Flags); - } - const SCEV *getUDivExpr(const SCEV *LHS, const SCEV *RHS); - const SCEV *getUDivExactExpr(const SCEV *LHS, const SCEV *RHS); - const SCEV *getAddRecExpr(const SCEV *Start, const SCEV *Step, - const Loop *L, SCEV::NoWrapFlags Flags); - const SCEV *getAddRecExpr(SmallVectorImpl &Operands, - const Loop *L, SCEV::NoWrapFlags Flags); - const SCEV *getAddRecExpr(const SmallVectorImpl &Operands, - const Loop *L, SCEV::NoWrapFlags Flags) { - SmallVector NewOp(Operands.begin(), Operands.end()); - return getAddRecExpr(NewOp, L, Flags); - } - /// Returns an expression for a GEP - /// - /// \p PointeeType The type used as the basis for the pointer arithmetics - /// \p BaseExpr The expression for the pointer operand. - /// \p IndexExprs The expressions for the indices. - /// \p InBounds Whether the GEP is in bounds. - const SCEV *getGEPExpr(Type *PointeeType, const SCEV *BaseExpr, - const SmallVectorImpl &IndexExprs, - bool InBounds = false); - const SCEV *getSMaxExpr(const SCEV *LHS, const SCEV *RHS); - const SCEV *getSMaxExpr(SmallVectorImpl &Operands); - const SCEV *getUMaxExpr(const SCEV *LHS, const SCEV *RHS); - const SCEV *getUMaxExpr(SmallVectorImpl &Operands); - const SCEV *getSMinExpr(const SCEV *LHS, const SCEV *RHS); - const SCEV *getUMinExpr(const SCEV *LHS, const SCEV *RHS); - const SCEV *getUnknown(Value *V); - const SCEV *getCouldNotCompute(); - - /// Return a SCEV for the constant 0 of a specific type. - const SCEV *getZero(Type *Ty) { return getConstant(Ty, 0); } - - /// Return a SCEV for the constant 1 of a specific type. - const SCEV *getOne(Type *Ty) { return getConstant(Ty, 1); } - - /// Return an expression for sizeof AllocTy that is type IntTy - /// - const SCEV *getSizeOfExpr(Type *IntTy, Type *AllocTy); - - /// Return an expression for offsetof on the given field with type IntTy - /// - const SCEV *getOffsetOfExpr(Type *IntTy, StructType *STy, unsigned FieldNo); - - /// Return the SCEV object corresponding to -V. - /// - const SCEV *getNegativeSCEV(const SCEV *V, - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap); - - /// Return the SCEV object corresponding to ~V. - /// - const SCEV *getNotSCEV(const SCEV *V); - - /// Return LHS-RHS. Minus is represented in SCEV as A+B*-1. - const SCEV *getMinusSCEV(const SCEV *LHS, const SCEV *RHS, - SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap); - - /// Return a SCEV corresponding to a conversion of the input value to the - /// specified type. If the type must be extended, it is zero extended. - const SCEV *getTruncateOrZeroExtend(const SCEV *V, Type *Ty); - - /// Return a SCEV corresponding to a conversion of the input value to the - /// specified type. If the type must be extended, it is sign extended. - const SCEV *getTruncateOrSignExtend(const SCEV *V, Type *Ty); - - /// Return a SCEV corresponding to a conversion of the input value to the - /// specified type. If the type must be extended, it is zero extended. The - /// conversion must not be narrowing. - const SCEV *getNoopOrZeroExtend(const SCEV *V, Type *Ty); - - /// Return a SCEV corresponding to a conversion of the input value to the - /// specified type. If the type must be extended, it is sign extended. The - /// conversion must not be narrowing. - const SCEV *getNoopOrSignExtend(const SCEV *V, Type *Ty); - - /// Return a SCEV corresponding to a conversion of the input value to the - /// specified type. If the type must be extended, it is extended with - /// unspecified bits. The conversion must not be narrowing. - const SCEV *getNoopOrAnyExtend(const SCEV *V, Type *Ty); - - /// Return a SCEV corresponding to a conversion of the input value to the - /// specified type. The conversion must not be widening. - const SCEV *getTruncateOrNoop(const SCEV *V, Type *Ty); - - /// Promote the operands to the wider of the types using zero-extension, and - /// then perform a umax operation with them. - const SCEV *getUMaxFromMismatchedTypes(const SCEV *LHS, - const SCEV *RHS); - - /// Promote the operands to the wider of the types using zero-extension, and - /// then perform a umin operation with them. - const SCEV *getUMinFromMismatchedTypes(const SCEV *LHS, - const SCEV *RHS); - - /// Transitively follow the chain of pointer-type operands until reaching a - /// SCEV that does not have a single pointer operand. This returns a - /// SCEVUnknown pointer for well-formed pointer-type expressions, but corner - /// cases do exist. - const SCEV *getPointerBase(const SCEV *V); - - /// Return a SCEV expression for the specified value at the specified scope - /// in the program. The L value specifies a loop nest to evaluate the - /// expression at, where null is the top-level or a specified loop is - /// immediately inside of the loop. - /// - /// This method can be used to compute the exit value for a variable defined - /// in a loop by querying what the value will hold in the parent loop. - /// - /// In the case that a relevant loop exit value cannot be computed, the - /// original value V is returned. - const SCEV *getSCEVAtScope(const SCEV *S, const Loop *L); - - /// This is a convenience function which does getSCEVAtScope(getSCEV(V), L). - const SCEV *getSCEVAtScope(Value *V, const Loop *L); - - /// Test whether entry to the loop is protected by a conditional between LHS - /// and RHS. This is used to help avoid max expressions in loop trip - /// counts, and to eliminate casts. - bool isLoopEntryGuardedByCond(const Loop *L, ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS); - - /// Test whether the backedge of the loop is protected by a conditional - /// between LHS and RHS. This is used to to eliminate casts. - bool isLoopBackedgeGuardedByCond(const Loop *L, ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS); - - /// Returns the maximum trip count of the loop if it is a single-exit - /// loop and we can compute a small maximum for that loop. - /// - /// Implemented in terms of the \c getSmallConstantTripCount overload with - /// the single exiting block passed to it. See that routine for details. - unsigned getSmallConstantTripCount(Loop *L); - - /// Returns the maximum trip count of this loop as a normal unsigned - /// value. Returns 0 if the trip count is unknown or not constant. This - /// "trip count" assumes that control exits via ExitingBlock. More - /// precisely, it is the number of times that control may reach ExitingBlock - /// before taking the branch. For loops with multiple exits, it may not be - /// the number times that the loop header executes if the loop exits - /// prematurely via another branch. - unsigned getSmallConstantTripCount(Loop *L, BasicBlock *ExitingBlock); - - /// Returns the largest constant divisor of the trip count of the - /// loop if it is a single-exit loop and we can compute a small maximum for - /// that loop. - /// - /// Implemented in terms of the \c getSmallConstantTripMultiple overload with - /// the single exiting block passed to it. See that routine for details. - unsigned getSmallConstantTripMultiple(Loop *L); - - /// Returns the largest constant divisor of the trip count of this loop as a - /// normal unsigned value, if possible. This means that the actual trip - /// count is always a multiple of the returned value (don't forget the trip - /// count could very well be zero as well!). As explained in the comments - /// for getSmallConstantTripCount, this assumes that control exits the loop - /// via ExitingBlock. - unsigned getSmallConstantTripMultiple(Loop *L, BasicBlock *ExitingBlock); - - /// Get the expression for the number of loop iterations for which this loop - /// is guaranteed not to exit via ExitingBlock. Otherwise return - /// SCEVCouldNotCompute. - const SCEV *getExitCount(Loop *L, BasicBlock *ExitingBlock); - - /// If the specified loop has a predictable backedge-taken count, return it, - /// otherwise return a SCEVCouldNotCompute object. The backedge-taken count - /// is the number of times the loop header will be branched to from within - /// the loop. This is one less than the trip count of the loop, since it - /// doesn't count the first iteration, when the header is branched to from - /// outside the loop. - /// - /// Note that it is not valid to call this method on a loop without a - /// loop-invariant backedge-taken count (see - /// hasLoopInvariantBackedgeTakenCount). - /// - const SCEV *getBackedgeTakenCount(const Loop *L); - - /// Similar to getBackedgeTakenCount, except it will add a set of - /// SCEV predicates to Predicates that are required to be true in order for - /// the answer to be correct. Predicates can be checked with run-time - /// checks and can be used to perform loop versioning. - const SCEV *getPredicatedBackedgeTakenCount(const Loop *L, - SCEVUnionPredicate &Predicates); - - /// Similar to getBackedgeTakenCount, except return the least SCEV value - /// that is known never to be less than the actual backedge taken count. - const SCEV *getMaxBackedgeTakenCount(const Loop *L); - - /// Return true if the specified loop has an analyzable loop-invariant - /// backedge-taken count. - bool hasLoopInvariantBackedgeTakenCount(const Loop *L); - - /// This method should be called by the client when it has changed a loop in - /// a way that may effect ScalarEvolution's ability to compute a trip count, - /// or if the loop is deleted. This call is potentially expensive for large - /// loop bodies. - void forgetLoop(const Loop *L); - - /// This method should be called by the client when it has changed a value - /// in a way that may effect its value, or which may disconnect it from a - /// def-use chain linking it to a loop. - void forgetValue(Value *V); - - /// Called when the client has changed the disposition of values in - /// this loop. - /// - /// We don't have a way to invalidate per-loop dispositions. Clear and - /// recompute is simpler. - void forgetLoopDispositions(const Loop *L) { LoopDispositions.clear(); } - - /// Determine the minimum number of zero bits that S is guaranteed to end in - /// (at every loop iteration). It is, at the same time, the minimum number - /// of times S is divisible by 2. For example, given {4,+,8} it returns 2. - /// If S is guaranteed to be 0, it returns the bitwidth of S. - uint32_t GetMinTrailingZeros(const SCEV *S); - - /// Determine the unsigned range for a particular SCEV. - /// - ConstantRange getUnsignedRange(const SCEV *S) { - return getRange(S, HINT_RANGE_UNSIGNED); - } - - /// Determine the signed range for a particular SCEV. - /// - ConstantRange getSignedRange(const SCEV *S) { - return getRange(S, HINT_RANGE_SIGNED); - } - - /// Test if the given expression is known to be negative. - /// - bool isKnownNegative(const SCEV *S); - - /// Test if the given expression is known to be positive. - /// - bool isKnownPositive(const SCEV *S); - - /// Test if the given expression is known to be non-negative. - /// - bool isKnownNonNegative(const SCEV *S); - - /// Test if the given expression is known to be non-positive. - /// - bool isKnownNonPositive(const SCEV *S); - - /// Test if the given expression is known to be non-zero. - /// - bool isKnownNonZero(const SCEV *S); - - /// Test if the given expression is known to satisfy the condition described - /// by Pred, LHS, and RHS. - /// - bool isKnownPredicate(ICmpInst::Predicate Pred, - const SCEV *LHS, const SCEV *RHS); - - /// Return true if the result of the predicate LHS `Pred` RHS is loop - /// invariant with respect to L. Set InvariantPred, InvariantLHS and - /// InvariantLHS so that InvariantLHS `InvariantPred` InvariantRHS is the - /// loop invariant form of LHS `Pred` RHS. - bool isLoopInvariantPredicate(ICmpInst::Predicate Pred, const SCEV *LHS, - const SCEV *RHS, const Loop *L, - ICmpInst::Predicate &InvariantPred, - const SCEV *&InvariantLHS, - const SCEV *&InvariantRHS); - - /// Simplify LHS and RHS in a comparison with predicate Pred. Return true - /// iff any changes were made. If the operands are provably equal or - /// unequal, LHS and RHS are set to the same value and Pred is set to either - /// ICMP_EQ or ICMP_NE. - /// - bool SimplifyICmpOperands(ICmpInst::Predicate &Pred, - const SCEV *&LHS, - const SCEV *&RHS, - unsigned Depth = 0); - - /// Return the "disposition" of the given SCEV with respect to the given - /// loop. - LoopDisposition getLoopDisposition(const SCEV *S, const Loop *L); - - /// Return true if the value of the given SCEV is unchanging in the - /// specified loop. - bool isLoopInvariant(const SCEV *S, const Loop *L); - - /// Return true if the given SCEV changes value in a known way in the - /// specified loop. This property being true implies that the value is - /// variant in the loop AND that we can emit an expression to compute the - /// value of the expression at any particular loop iteration. - bool hasComputableLoopEvolution(const SCEV *S, const Loop *L); - - /// Return the "disposition" of the given SCEV with respect to the given - /// block. - BlockDisposition getBlockDisposition(const SCEV *S, const BasicBlock *BB); - - /// Return true if elements that makes up the given SCEV dominate the - /// specified basic block. - bool dominates(const SCEV *S, const BasicBlock *BB); - - /// Return true if elements that makes up the given SCEV properly dominate - /// the specified basic block. - bool properlyDominates(const SCEV *S, const BasicBlock *BB); - - /// Test whether the given SCEV has Op as a direct or indirect operand. - bool hasOperand(const SCEV *S, const SCEV *Op) const; - - /// Return the size of an element read or written by Inst. - const SCEV *getElementSize(Instruction *Inst); - - /// Compute the array dimensions Sizes from the set of Terms extracted from - /// the memory access function of this SCEVAddRecExpr (second step of - /// delinearization). - void findArrayDimensions(SmallVectorImpl &Terms, - SmallVectorImpl &Sizes, - const SCEV *ElementSize) const; - - void print(raw_ostream &OS) const; - void verify() const; - - /// Collect parametric terms occurring in step expressions (first step of - /// delinearization). - void collectParametricTerms(const SCEV *Expr, - SmallVectorImpl &Terms); - - - - /// Return in Subscripts the access functions for each dimension in Sizes - /// (third step of delinearization). - void computeAccessFunctions(const SCEV *Expr, - SmallVectorImpl &Subscripts, - SmallVectorImpl &Sizes); - - /// Split this SCEVAddRecExpr into two vectors of SCEVs representing the - /// subscripts and sizes of an array access. - /// - /// The delinearization is a 3 step process: the first two steps compute the - /// sizes of each subscript and the third step computes the access functions - /// for the delinearized array: - /// - /// 1. Find the terms in the step functions - /// 2. Compute the array size - /// 3. Compute the access function: divide the SCEV by the array size - /// starting with the innermost dimensions found in step 2. The Quotient - /// is the SCEV to be divided in the next step of the recursion. The - /// Remainder is the subscript of the innermost dimension. Loop over all - /// array dimensions computed in step 2. - /// - /// To compute a uniform array size for several memory accesses to the same - /// object, one can collect in step 1 all the step terms for all the memory - /// accesses, and compute in step 2 a unique array shape. This guarantees - /// that the array shape will be the same across all memory accesses. - /// - /// FIXME: We could derive the result of steps 1 and 2 from a description of - /// the array shape given in metadata. - /// - /// Example: - /// - /// A[][n][m] - /// - /// for i - /// for j - /// for k - /// A[j+k][2i][5i] = - /// - /// The initial SCEV: - /// - /// A[{{{0,+,2*m+5}_i, +, n*m}_j, +, n*m}_k] - /// - /// 1. Find the different terms in the step functions: - /// -> [2*m, 5, n*m, n*m] - /// - /// 2. Compute the array size: sort and unique them - /// -> [n*m, 2*m, 5] - /// find the GCD of all the terms = 1 - /// divide by the GCD and erase constant terms - /// -> [n*m, 2*m] - /// GCD = m - /// divide by GCD -> [n, 2] - /// remove constant terms - /// -> [n] - /// size of the array is A[unknown][n][m] - /// - /// 3. Compute the access function - /// a. Divide {{{0,+,2*m+5}_i, +, n*m}_j, +, n*m}_k by the innermost size m - /// Quotient: {{{0,+,2}_i, +, n}_j, +, n}_k - /// Remainder: {{{0,+,5}_i, +, 0}_j, +, 0}_k - /// The remainder is the subscript of the innermost array dimension: [5i]. - /// - /// b. Divide Quotient: {{{0,+,2}_i, +, n}_j, +, n}_k by next outer size n - /// Quotient: {{{0,+,0}_i, +, 1}_j, +, 1}_k - /// Remainder: {{{0,+,2}_i, +, 0}_j, +, 0}_k - /// The Remainder is the subscript of the next array dimension: [2i]. - /// - /// The subscript of the outermost dimension is the Quotient: [j+k]. - /// - /// Overall, we have: A[][n][m], and the access function: A[j+k][2i][5i]. - void delinearize(const SCEV *Expr, - SmallVectorImpl &Subscripts, - SmallVectorImpl &Sizes, - const SCEV *ElementSize); - - /// Return the DataLayout associated with the module this SCEV instance is - /// operating on. - const DataLayout &getDataLayout() const { - return F.getParent()->getDataLayout(); - } - - const SCEVPredicate *getEqualPredicate(const SCEVUnknown *LHS, - const SCEVConstant *RHS); - - const SCEVPredicate * - getWrapPredicate(const SCEVAddRecExpr *AR, - SCEVWrapPredicate::IncrementWrapFlags AddedFlags); - - /// Re-writes the SCEV according to the Predicates in \p A. - const SCEV *rewriteUsingPredicate(const SCEV *S, const Loop *L, - SCEVUnionPredicate &A); - /// Tries to convert the \p S expression to an AddRec expression, - /// adding additional predicates to \p Preds as required. - const SCEVAddRecExpr * - convertSCEVToAddRecWithPredicates(const SCEV *S, const Loop *L, - SCEVUnionPredicate &Preds); - - private: - /// Compute the backedge taken count knowing the interval difference, the - /// stride and presence of the equality in the comparison. - const SCEV *computeBECount(const SCEV *Delta, const SCEV *Stride, - bool Equality); - - /// Verify if an linear IV with positive stride can overflow when in a - /// less-than comparison, knowing the invariant term of the comparison, - /// the stride and the knowledge of NSW/NUW flags on the recurrence. - bool doesIVOverflowOnLT(const SCEV *RHS, const SCEV *Stride, - bool IsSigned, bool NoWrap); - - /// Verify if an linear IV with negative stride can overflow when in a - /// greater-than comparison, knowing the invariant term of the comparison, - /// the stride and the knowledge of NSW/NUW flags on the recurrence. - bool doesIVOverflowOnGT(const SCEV *RHS, const SCEV *Stride, - bool IsSigned, bool NoWrap); - - private: - FoldingSet UniqueSCEVs; - FoldingSet UniquePreds; - BumpPtrAllocator SCEVAllocator; - - /// The head of a linked list of all SCEVUnknown values that have been - /// allocated. This is used by releaseMemory to locate them all and call - /// their destructors. - SCEVUnknown *FirstUnknown; - }; - - /// Analysis pass that exposes the \c ScalarEvolution for a function. - class ScalarEvolutionAnalysis - : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - - public: - typedef ScalarEvolution Result; - - ScalarEvolution run(Function &F, AnalysisManager &AM); - }; - - /// Printer pass for the \c ScalarEvolutionAnalysis results. - class ScalarEvolutionPrinterPass - : public PassInfoMixin { - raw_ostream &OS; - - public: - explicit ScalarEvolutionPrinterPass(raw_ostream &OS) : OS(OS) {} - PreservedAnalyses run(Function &F, AnalysisManager &AM); - }; - - class ScalarEvolutionWrapperPass : public FunctionPass { - std::unique_ptr SE; - - public: - static char ID; - - ScalarEvolutionWrapperPass(); - - ScalarEvolution &getSE() { return *SE; } - const ScalarEvolution &getSE() const { return *SE; } - - bool runOnFunction(Function &F) override; - void releaseMemory() override; - void getAnalysisUsage(AnalysisUsage &AU) const override; - void print(raw_ostream &OS, const Module * = nullptr) const override; - void verifyAnalysis() const override; - }; - - /// An interface layer with SCEV used to manage how we see SCEV expressions - /// for values in the context of existing predicates. We can add new - /// predicates, but we cannot remove them. - /// - /// This layer has multiple purposes: - /// - provides a simple interface for SCEV versioning. - /// - guarantees that the order of transformations applied on a SCEV - /// expression for a single Value is consistent across two different - /// getSCEV calls. This means that, for example, once we've obtained - /// an AddRec expression for a certain value through expression - /// rewriting, we will continue to get an AddRec expression for that - /// Value. - /// - lowers the number of expression rewrites. - class PredicatedScalarEvolution { - public: - PredicatedScalarEvolution(ScalarEvolution &SE, Loop &L); - const SCEVUnionPredicate &getUnionPredicate() const; - - /// Returns the SCEV expression of V, in the context of the current SCEV - /// predicate. The order of transformations applied on the expression of V - /// returned by ScalarEvolution is guaranteed to be preserved, even when - /// adding new predicates. - const SCEV *getSCEV(Value *V); - - /// Get the (predicated) backedge count for the analyzed loop. - const SCEV *getBackedgeTakenCount(); - - /// Adds a new predicate. - void addPredicate(const SCEVPredicate &Pred); - - /// Attempts to produce an AddRecExpr for V by adding additional SCEV - /// predicates. If we can't transform the expression into an AddRecExpr we - /// return nullptr and not add additional SCEV predicates to the current - /// context. - const SCEVAddRecExpr *getAsAddRec(Value *V); - - /// Proves that V doesn't overflow by adding SCEV predicate. - void setNoOverflow(Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags); - - /// Returns true if we've proved that V doesn't wrap by means of a SCEV - /// predicate. - bool hasNoOverflow(Value *V, SCEVWrapPredicate::IncrementWrapFlags Flags); - - /// Returns the ScalarEvolution analysis used. - ScalarEvolution *getSE() const { return &SE; } - - /// We need to explicitly define the copy constructor because of FlagsMap. - PredicatedScalarEvolution(const PredicatedScalarEvolution&); - - /// Print the SCEV mappings done by the Predicated Scalar Evolution. - /// The printed text is indented by \p Depth. - void print(raw_ostream &OS, unsigned Depth) const; - - private: - /// Increments the version number of the predicate. This needs to be called - /// every time the SCEV predicate changes. - void updateGeneration(); - - /// Holds a SCEV and the version number of the SCEV predicate used to - /// perform the rewrite of the expression. - typedef std::pair RewriteEntry; - - /// Maps a SCEV to the rewrite result of that SCEV at a certain version - /// number. If this number doesn't match the current Generation, we will - /// need to do a rewrite. To preserve the transformation order of previous - /// rewrites, we will rewrite the previous result instead of the original - /// SCEV. - DenseMap RewriteMap; - - /// Records what NoWrap flags we've added to a Value *. - ValueMap FlagsMap; - - /// The ScalarEvolution analysis. - ScalarEvolution &SE; - - /// The analyzed Loop. - const Loop &L; - - /// The SCEVPredicate that forms our context. We will rewrite all - /// expressions assuming that this predicate true. - SCEVUnionPredicate Preds; - - /// Marks the version of the SCEV predicate used. When rewriting a SCEV - /// expression we mark it with the version of the predicate. We use this to - /// figure out if the predicate has changed from the last rewrite of the - /// SCEV. If so, we need to perform a new rewrite. - unsigned Generation; - - /// The backedge taken count. - const SCEV *BackedgeCount; - }; -} - -#endif diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h b/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h deleted file mode 100644 index ac10370b..00000000 --- a/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h +++ /dev/null @@ -1,72 +0,0 @@ -//===- ScalarEvolutionAliasAnalysis.h - SCEV-based AA -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This is the interface for a SCEV-based alias analysis. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_SCALAREVOLUTIONALIASANALYSIS_H -#define LLVM_ANALYSIS_SCALAREVOLUTIONALIASANALYSIS_H - -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/ScalarEvolutionExpressions.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/Pass.h" - -namespace llvm { - -/// A simple alias analysis implementation that uses ScalarEvolution to answer -/// queries. -class SCEVAAResult : public AAResultBase { - ScalarEvolution &SE; - -public: - explicit SCEVAAResult(ScalarEvolution &SE) : AAResultBase(), SE(SE) {} - SCEVAAResult(SCEVAAResult &&Arg) : AAResultBase(std::move(Arg)), SE(Arg.SE) {} - - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB); - -private: - Value *GetBaseValue(const SCEV *S); -}; - -/// Analysis pass providing a never-invalidated alias analysis result. -class SCEVAA : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef SCEVAAResult Result; - - SCEVAAResult run(Function &F, AnalysisManager &AM); -}; - -/// Legacy wrapper pass to provide the SCEVAAResult object. -class SCEVAAWrapperPass : public FunctionPass { - std::unique_ptr Result; - -public: - static char ID; - - SCEVAAWrapperPass(); - - SCEVAAResult &getResult() { return *Result; } - const SCEVAAResult &getResult() const { return *Result; } - - bool runOnFunction(Function &F) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -/// Creates an instance of \c SCEVAAWrapperPass. -FunctionPass *createSCEVAAWrapperPass(); - -} - -#endif diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h b/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h deleted file mode 100644 index 1acf952a..00000000 --- a/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h +++ /dev/null @@ -1,384 +0,0 @@ -//===---- llvm/Analysis/ScalarEvolutionExpander.h - SCEV Exprs --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the classes used to generate code from scalar expressions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H -#define LLVM_ANALYSIS_SCALAREVOLUTIONEXPANDER_H - -#include "llvm/Analysis/ScalarEvolutionExpressions.h" -#include "llvm/Analysis/ScalarEvolutionNormalization.h" -#include "llvm/Analysis/TargetFolder.h" -#include "llvm/IR/IRBuilder.h" -#include "llvm/IR/ValueHandle.h" -#include - -namespace llvm { - class TargetTransformInfo; - - /// Return true if the given expression is safe to expand in the sense that - /// all materialized values are safe to speculate. - bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE); - - /// This class uses information about analyze scalars to - /// rewrite expressions in canonical form. - /// - /// Clients should create an instance of this class when rewriting is needed, - /// and destroy it when finished to allow the release of the associated - /// memory. - class SCEVExpander : public SCEVVisitor { - ScalarEvolution &SE; - const DataLayout &DL; - - // New instructions receive a name to identifies them with the current pass. - const char* IVName; - - // InsertedExpressions caches Values for reuse, so must track RAUW. - std::map, TrackingVH > - InsertedExpressions; - // InsertedValues only flags inserted instructions so needs no RAUW. - std::set > InsertedValues; - std::set > InsertedPostIncValues; - - /// A memoization of the "relevant" loop for a given SCEV. - DenseMap RelevantLoops; - - /// \brief Addrecs referring to any of the given loops are expanded - /// in post-inc mode. For example, expanding {1,+,1} in post-inc mode - /// returns the add instruction that adds one to the phi for {0,+,1}, - /// as opposed to a new phi starting at 1. This is only supported in - /// non-canonical mode. - PostIncLoopSet PostIncLoops; - - /// \brief When this is non-null, addrecs expanded in the loop it indicates - /// should be inserted with increments at IVIncInsertPos. - const Loop *IVIncInsertLoop; - - /// \brief When expanding addrecs in the IVIncInsertLoop loop, insert the IV - /// increment at this position. - Instruction *IVIncInsertPos; - - /// \brief Phis that complete an IV chain. Reuse - std::set > ChainedPhis; - - /// \brief When true, expressions are expanded in "canonical" form. In - /// particular, addrecs are expanded as arithmetic based on a canonical - /// induction variable. When false, expression are expanded in a more - /// literal form. - bool CanonicalMode; - - /// \brief When invoked from LSR, the expander is in "strength reduction" - /// mode. The only difference is that phi's are only reused if they are - /// already in "expanded" form. - bool LSRMode; - - typedef IRBuilder BuilderType; - BuilderType Builder; - - // RAII object that stores the current insertion point and restores it when - // the object is destroyed. This includes the debug location. Duplicated - // from InsertPointGuard to add SetInsertPoint() which is used to updated - // InsertPointGuards stack when insert points are moved during SCEV - // expansion. - class SCEVInsertPointGuard { - IRBuilderBase &Builder; - AssertingVH Block; - BasicBlock::iterator Point; - DebugLoc DbgLoc; - SCEVExpander *SE; - - SCEVInsertPointGuard(const SCEVInsertPointGuard &) = delete; - SCEVInsertPointGuard &operator=(const SCEVInsertPointGuard &) = delete; - - public: - SCEVInsertPointGuard(IRBuilderBase &B, SCEVExpander *SE) - : Builder(B), Block(B.GetInsertBlock()), Point(B.GetInsertPoint()), - DbgLoc(B.getCurrentDebugLocation()), SE(SE) { - SE->InsertPointGuards.push_back(this); - } - - ~SCEVInsertPointGuard() { - // These guards should always created/destroyed in FIFO order since they - // are used to guard lexically scoped blocks of code in - // ScalarEvolutionExpander. - assert(SE->InsertPointGuards.back() == this); - SE->InsertPointGuards.pop_back(); - Builder.restoreIP(IRBuilderBase::InsertPoint(Block, Point)); - Builder.SetCurrentDebugLocation(DbgLoc); - } - - BasicBlock::iterator GetInsertPoint() const { return Point; } - void SetInsertPoint(BasicBlock::iterator I) { Point = I; } - }; - - /// Stack of pointers to saved insert points, used to keep insert points - /// consistent when instructions are moved. - SmallVector InsertPointGuards; - -#ifndef NDEBUG - const char *DebugType; -#endif - - friend struct SCEVVisitor; - - public: - /// \brief Construct a SCEVExpander in "canonical" mode. - explicit SCEVExpander(ScalarEvolution &se, const DataLayout &DL, - const char *name) - : SE(se), DL(DL), IVName(name), IVIncInsertLoop(nullptr), - IVIncInsertPos(nullptr), CanonicalMode(true), LSRMode(false), - Builder(se.getContext(), TargetFolder(DL)) { -#ifndef NDEBUG - DebugType = ""; -#endif - } - - ~SCEVExpander() { - // Make sure the insert point guard stack is consistent. - assert(InsertPointGuards.empty()); - } - -#ifndef NDEBUG - void setDebugType(const char* s) { DebugType = s; } -#endif - - /// \brief Erase the contents of the InsertedExpressions map so that users - /// trying to expand the same expression into multiple BasicBlocks or - /// different places within the same BasicBlock can do so. - void clear() { - InsertedExpressions.clear(); - InsertedValues.clear(); - InsertedPostIncValues.clear(); - ChainedPhis.clear(); - } - - /// \brief Return true for expressions that may incur non-trivial cost to - /// evaluate at runtime. - /// - /// At is an optional parameter which specifies point in code where user is - /// going to expand this expression. Sometimes this knowledge can lead to a - /// more accurate cost estimation. - bool isHighCostExpansion(const SCEV *Expr, Loop *L, - const Instruction *At = nullptr) { - SmallPtrSet Processed; - return isHighCostExpansionHelper(Expr, L, At, Processed); - } - - /// \brief This method returns the canonical induction variable of the - /// specified type for the specified loop (inserting one if there is none). - /// A canonical induction variable starts at zero and steps by one on each - /// iteration. - PHINode *getOrInsertCanonicalInductionVariable(const Loop *L, Type *Ty); - - /// \brief Return the induction variable increment's IV operand. - Instruction *getIVIncOperand(Instruction *IncV, Instruction *InsertPos, - bool allowScale); - - /// \brief Utility for hoisting an IV increment. - bool hoistIVInc(Instruction *IncV, Instruction *InsertPos); - - /// \brief replace congruent phis with their most canonical - /// representative. Return the number of phis eliminated. - unsigned replaceCongruentIVs(Loop *L, const DominatorTree *DT, - SmallVectorImpl &DeadInsts, - const TargetTransformInfo *TTI = nullptr); - - /// \brief Insert code to directly compute the specified SCEV expression - /// into the program. The inserted code is inserted into the specified - /// block. - Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I); - - /// \brief Insert code to directly compute the specified SCEV expression - /// into the program. The inserted code is inserted into the SCEVExpander's - /// current insertion point. If a type is specified, the result will be - /// expanded to have that type, with a cast if necessary. - Value *expandCodeFor(const SCEV *SH, Type *Ty = nullptr); - - - /// \brief Generates a code sequence that evaluates this predicate. - /// The inserted instructions will be at position \p Loc. - /// The result will be of type i1 and will have a value of 0 when the - /// predicate is false and 1 otherwise. - Value *expandCodeForPredicate(const SCEVPredicate *Pred, Instruction *Loc); - - /// \brief A specialized variant of expandCodeForPredicate, handling the - /// case when we are expanding code for a SCEVEqualPredicate. - Value *expandEqualPredicate(const SCEVEqualPredicate *Pred, - Instruction *Loc); - - /// \brief Generates code that evaluates if the \p AR expression will - /// overflow. - Value *generateOverflowCheck(const SCEVAddRecExpr *AR, Instruction *Loc, - bool Signed); - - /// \brief A specialized variant of expandCodeForPredicate, handling the - /// case when we are expanding code for a SCEVWrapPredicate. - Value *expandWrapPredicate(const SCEVWrapPredicate *P, Instruction *Loc); - - /// \brief A specialized variant of expandCodeForPredicate, handling the - /// case when we are expanding code for a SCEVUnionPredicate. - Value *expandUnionPredicate(const SCEVUnionPredicate *Pred, - Instruction *Loc); - - /// \brief Set the current IV increment loop and position. - void setIVIncInsertPos(const Loop *L, Instruction *Pos) { - assert(!CanonicalMode && - "IV increment positions are not supported in CanonicalMode"); - IVIncInsertLoop = L; - IVIncInsertPos = Pos; - } - - /// \brief Enable post-inc expansion for addrecs referring to the given - /// loops. Post-inc expansion is only supported in non-canonical mode. - void setPostInc(const PostIncLoopSet &L) { - assert(!CanonicalMode && - "Post-inc expansion is not supported in CanonicalMode"); - PostIncLoops = L; - } - - /// \brief Disable all post-inc expansion. - void clearPostInc() { - PostIncLoops.clear(); - - // When we change the post-inc loop set, cached expansions may no - // longer be valid. - InsertedPostIncValues.clear(); - } - - /// \brief Disable the behavior of expanding expressions in canonical form - /// rather than in a more literal form. Non-canonical mode is useful for - /// late optimization passes. - void disableCanonicalMode() { CanonicalMode = false; } - - void enableLSRMode() { LSRMode = true; } - - /// \brief Set the current insertion point. This is useful if multiple calls - /// to expandCodeFor() are going to be made with the same insert point and - /// the insert point may be moved during one of the expansions (e.g. if the - /// insert point is not a block terminator). - void setInsertPoint(Instruction *IP) { - assert(IP); - Builder.SetInsertPoint(IP); - } - - /// \brief Clear the current insertion point. This is useful if the - /// instruction that had been serving as the insertion point may have been - /// deleted. - void clearInsertPoint() { - Builder.ClearInsertionPoint(); - } - - /// \brief Return true if the specified instruction was inserted by the code - /// rewriter. If so, the client should not modify the instruction. - bool isInsertedInstruction(Instruction *I) const { - return InsertedValues.count(I) || InsertedPostIncValues.count(I); - } - - void setChainedPhi(PHINode *PN) { ChainedPhis.insert(PN); } - - /// \brief Try to find LLVM IR value for S available at the point At. - /// - /// L is a hint which tells in which loop to look for the suitable value. - /// On success return value which is equivalent to the expanded S at point - /// At. Return nullptr if value was not found. - /// - /// Note that this function does not perform an exhaustive search. I.e if it - /// didn't find any value it does not mean that there is no such value. - Value *findExistingExpansion(const SCEV *S, const Instruction *At, Loop *L); - - private: - LLVMContext &getContext() const { return SE.getContext(); } - - /// \brief Recursive helper function for isHighCostExpansion. - bool isHighCostExpansionHelper(const SCEV *S, Loop *L, - const Instruction *At, - SmallPtrSetImpl &Processed); - - /// \brief Insert the specified binary operator, doing a small amount - /// of work to avoid inserting an obviously redundant operation. - Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS); - - /// \brief Arrange for there to be a cast of V to Ty at IP, reusing an - /// existing cast if a suitable one exists, moving an existing cast if a - /// suitable one exists but isn't in the right place, or or creating a new - /// one. - Value *ReuseOrCreateCast(Value *V, Type *Ty, - Instruction::CastOps Op, - BasicBlock::iterator IP); - - /// \brief Insert a cast of V to the specified type, which must be possible - /// with a noop cast, doing what we can to share the casts. - Value *InsertNoopCastOfTo(Value *V, Type *Ty); - - /// \brief Expand a SCEVAddExpr with a pointer type into a GEP - /// instead of using ptrtoint+arithmetic+inttoptr. - Value *expandAddToGEP(const SCEV *const *op_begin, - const SCEV *const *op_end, - PointerType *PTy, Type *Ty, Value *V); - - /// \brief Find a previous Value in ExprValueMap for expand. - Value *FindValueInExprValueMap(const SCEV *S, const Instruction *InsertPt); - - Value *expand(const SCEV *S); - - /// \brief Determine the most "relevant" loop for the given SCEV. - const Loop *getRelevantLoop(const SCEV *); - - Value *visitConstant(const SCEVConstant *S) { - return S->getValue(); - } - - Value *visitTruncateExpr(const SCEVTruncateExpr *S); - - Value *visitZeroExtendExpr(const SCEVZeroExtendExpr *S); - - Value *visitSignExtendExpr(const SCEVSignExtendExpr *S); - - Value *visitAddExpr(const SCEVAddExpr *S); - - Value *visitMulExpr(const SCEVMulExpr *S); - - Value *visitUDivExpr(const SCEVUDivExpr *S); - - Value *visitAddRecExpr(const SCEVAddRecExpr *S); - - Value *visitSMaxExpr(const SCEVSMaxExpr *S); - - Value *visitUMaxExpr(const SCEVUMaxExpr *S); - - Value *visitUnknown(const SCEVUnknown *S) { - return S->getValue(); - } - - void rememberInstruction(Value *I); - - bool isNormalAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L); - - bool isExpandedAddRecExprPHI(PHINode *PN, Instruction *IncV, const Loop *L); - - Value *expandAddRecExprLiterally(const SCEVAddRecExpr *); - PHINode *getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized, - const Loop *L, - Type *ExpandTy, - Type *IntTy, - Type *&TruncTy, - bool &InvertStep); - Value *expandIVInc(PHINode *PN, Value *StepV, const Loop *L, - Type *ExpandTy, Type *IntTy, bool useSubtract); - - void hoistBeforePos(DominatorTree *DT, Instruction *InstToHoist, - Instruction *Pos, PHINode *LoopPhi); - - void fixupInsertPoints(Instruction *I); - }; -} - -#endif diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h deleted file mode 100644 index ff24cafb..00000000 --- a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ /dev/null @@ -1,685 +0,0 @@ -//===- llvm/Analysis/ScalarEvolutionExpressions.h - SCEV Exprs --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the classes used to represent and build scalar expressions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H -#define LLVM_ANALYSIS_SCALAREVOLUTIONEXPRESSIONS_H - -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/Analysis/ScalarEvolution.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { - class ConstantInt; - class ConstantRange; - class DominatorTree; - - enum SCEVTypes { - // These should be ordered in terms of increasing complexity to make the - // folders simpler. - scConstant, scTruncate, scZeroExtend, scSignExtend, scAddExpr, scMulExpr, - scUDivExpr, scAddRecExpr, scUMaxExpr, scSMaxExpr, - scUnknown, scCouldNotCompute - }; - - /// This class represents a constant integer value. - class SCEVConstant : public SCEV { - friend class ScalarEvolution; - - ConstantInt *V; - SCEVConstant(const FoldingSetNodeIDRef ID, ConstantInt *v) : - SCEV(ID, scConstant), V(v) {} - public: - ConstantInt *getValue() const { return V; } - const APInt &getAPInt() const { return getValue()->getValue(); } - - Type *getType() const { return V->getType(); } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scConstant; - } - }; - - /// This is the base class for unary cast operator classes. - class SCEVCastExpr : public SCEV { - protected: - const SCEV *Op; - Type *Ty; - - SCEVCastExpr(const FoldingSetNodeIDRef ID, - unsigned SCEVTy, const SCEV *op, Type *ty); - - public: - const SCEV *getOperand() const { return Op; } - Type *getType() const { return Ty; } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scTruncate || - S->getSCEVType() == scZeroExtend || - S->getSCEVType() == scSignExtend; - } - }; - - /// This class represents a truncation of an integer value to a - /// smaller integer value. - class SCEVTruncateExpr : public SCEVCastExpr { - friend class ScalarEvolution; - - SCEVTruncateExpr(const FoldingSetNodeIDRef ID, - const SCEV *op, Type *ty); - - public: - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scTruncate; - } - }; - - /// This class represents a zero extension of a small integer value - /// to a larger integer value. - class SCEVZeroExtendExpr : public SCEVCastExpr { - friend class ScalarEvolution; - - SCEVZeroExtendExpr(const FoldingSetNodeIDRef ID, - const SCEV *op, Type *ty); - - public: - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scZeroExtend; - } - }; - - /// This class represents a sign extension of a small integer value - /// to a larger integer value. - class SCEVSignExtendExpr : public SCEVCastExpr { - friend class ScalarEvolution; - - SCEVSignExtendExpr(const FoldingSetNodeIDRef ID, - const SCEV *op, Type *ty); - - public: - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scSignExtend; - } - }; - - - /// This node is a base class providing common functionality for - /// n'ary operators. - class SCEVNAryExpr : public SCEV { - protected: - // Since SCEVs are immutable, ScalarEvolution allocates operand - // arrays with its SCEVAllocator, so this class just needs a simple - // pointer rather than a more elaborate vector-like data structure. - // This also avoids the need for a non-trivial destructor. - const SCEV *const *Operands; - size_t NumOperands; - - SCEVNAryExpr(const FoldingSetNodeIDRef ID, - enum SCEVTypes T, const SCEV *const *O, size_t N) - : SCEV(ID, T), Operands(O), NumOperands(N) {} - - public: - size_t getNumOperands() const { return NumOperands; } - const SCEV *getOperand(unsigned i) const { - assert(i < NumOperands && "Operand index out of range!"); - return Operands[i]; - } - - typedef const SCEV *const *op_iterator; - typedef iterator_range op_range; - op_iterator op_begin() const { return Operands; } - op_iterator op_end() const { return Operands + NumOperands; } - op_range operands() const { - return make_range(op_begin(), op_end()); - } - - Type *getType() const { return getOperand(0)->getType(); } - - NoWrapFlags getNoWrapFlags(NoWrapFlags Mask = NoWrapMask) const { - return (NoWrapFlags)(SubclassData & Mask); - } - - bool hasNoUnsignedWrap() const { - return getNoWrapFlags(FlagNUW) != FlagAnyWrap; - } - - bool hasNoSignedWrap() const { - return getNoWrapFlags(FlagNSW) != FlagAnyWrap; - } - - bool hasNoSelfWrap() const { - return getNoWrapFlags(FlagNW) != FlagAnyWrap; - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scAddExpr || - S->getSCEVType() == scMulExpr || - S->getSCEVType() == scSMaxExpr || - S->getSCEVType() == scUMaxExpr || - S->getSCEVType() == scAddRecExpr; - } - }; - - /// This node is the base class for n'ary commutative operators. - class SCEVCommutativeExpr : public SCEVNAryExpr { - protected: - SCEVCommutativeExpr(const FoldingSetNodeIDRef ID, - enum SCEVTypes T, const SCEV *const *O, size_t N) - : SCEVNAryExpr(ID, T, O, N) {} - - public: - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scAddExpr || - S->getSCEVType() == scMulExpr || - S->getSCEVType() == scSMaxExpr || - S->getSCEVType() == scUMaxExpr; - } - - /// Set flags for a non-recurrence without clearing previously set flags. - void setNoWrapFlags(NoWrapFlags Flags) { - SubclassData |= Flags; - } - }; - - - /// This node represents an addition of some number of SCEVs. - class SCEVAddExpr : public SCEVCommutativeExpr { - friend class ScalarEvolution; - - SCEVAddExpr(const FoldingSetNodeIDRef ID, - const SCEV *const *O, size_t N) - : SCEVCommutativeExpr(ID, scAddExpr, O, N) { - } - - public: - Type *getType() const { - // Use the type of the last operand, which is likely to be a pointer - // type, if there is one. This doesn't usually matter, but it can help - // reduce casts when the expressions are expanded. - return getOperand(getNumOperands() - 1)->getType(); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scAddExpr; - } - }; - - - /// This node represents multiplication of some number of SCEVs. - class SCEVMulExpr : public SCEVCommutativeExpr { - friend class ScalarEvolution; - - SCEVMulExpr(const FoldingSetNodeIDRef ID, - const SCEV *const *O, size_t N) - : SCEVCommutativeExpr(ID, scMulExpr, O, N) { - } - - public: - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scMulExpr; - } - }; - - - /// This class represents a binary unsigned division operation. - class SCEVUDivExpr : public SCEV { - friend class ScalarEvolution; - - const SCEV *LHS; - const SCEV *RHS; - SCEVUDivExpr(const FoldingSetNodeIDRef ID, const SCEV *lhs, const SCEV *rhs) - : SCEV(ID, scUDivExpr), LHS(lhs), RHS(rhs) {} - - public: - const SCEV *getLHS() const { return LHS; } - const SCEV *getRHS() const { return RHS; } - - Type *getType() const { - // In most cases the types of LHS and RHS will be the same, but in some - // crazy cases one or the other may be a pointer. ScalarEvolution doesn't - // depend on the type for correctness, but handling types carefully can - // avoid extra casts in the SCEVExpander. The LHS is more likely to be - // a pointer type than the RHS, so use the RHS' type here. - return getRHS()->getType(); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scUDivExpr; - } - }; - - - /// This node represents a polynomial recurrence on the trip count - /// of the specified loop. This is the primary focus of the - /// ScalarEvolution framework; all the other SCEV subclasses are - /// mostly just supporting infrastructure to allow SCEVAddRecExpr - /// expressions to be created and analyzed. - /// - /// All operands of an AddRec are required to be loop invariant. - /// - class SCEVAddRecExpr : public SCEVNAryExpr { - friend class ScalarEvolution; - - const Loop *L; - - SCEVAddRecExpr(const FoldingSetNodeIDRef ID, - const SCEV *const *O, size_t N, const Loop *l) - : SCEVNAryExpr(ID, scAddRecExpr, O, N), L(l) {} - - public: - const SCEV *getStart() const { return Operands[0]; } - const Loop *getLoop() const { return L; } - - /// Constructs and returns the recurrence indicating how much this - /// expression steps by. If this is a polynomial of degree N, it - /// returns a chrec of degree N-1. We cannot determine whether - /// the step recurrence has self-wraparound. - const SCEV *getStepRecurrence(ScalarEvolution &SE) const { - if (isAffine()) return getOperand(1); - return SE.getAddRecExpr(SmallVector(op_begin()+1, - op_end()), - getLoop(), FlagAnyWrap); - } - - /// Return true if this represents an expression A + B*x where A - /// and B are loop invariant values. - bool isAffine() const { - // We know that the start value is invariant. This expression is thus - // affine iff the step is also invariant. - return getNumOperands() == 2; - } - - /// Return true if this represents an expression A + B*x + C*x^2 - /// where A, B and C are loop invariant values. This corresponds - /// to an addrec of the form {L,+,M,+,N} - bool isQuadratic() const { - return getNumOperands() == 3; - } - - /// Set flags for a recurrence without clearing any previously set flags. - /// For AddRec, either NUW or NSW implies NW. Keep track of this fact here - /// to make it easier to propagate flags. - void setNoWrapFlags(NoWrapFlags Flags) { - if (Flags & (FlagNUW | FlagNSW)) - Flags = ScalarEvolution::setFlags(Flags, FlagNW); - SubclassData |= Flags; - } - - /// Return the value of this chain of recurrences at the specified - /// iteration number. - const SCEV *evaluateAtIteration(const SCEV *It, ScalarEvolution &SE) const; - - /// Return the number of iterations of this loop that produce - /// values in the specified constant range. Another way of - /// looking at this is that it returns the first iteration number - /// where the value is not in the condition, thus computing the - /// exit count. If the iteration count can't be computed, an - /// instance of SCEVCouldNotCompute is returned. - const SCEV *getNumIterationsInRange(const ConstantRange &Range, - ScalarEvolution &SE) const; - - /// Return an expression representing the value of this expression - /// one iteration of the loop ahead. - const SCEVAddRecExpr *getPostIncExpr(ScalarEvolution &SE) const { - return cast(SE.getAddExpr(this, getStepRecurrence(SE))); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scAddRecExpr; - } - }; - - /// This class represents a signed maximum selection. - class SCEVSMaxExpr : public SCEVCommutativeExpr { - friend class ScalarEvolution; - - SCEVSMaxExpr(const FoldingSetNodeIDRef ID, - const SCEV *const *O, size_t N) - : SCEVCommutativeExpr(ID, scSMaxExpr, O, N) { - // Max never overflows. - setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW)); - } - - public: - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scSMaxExpr; - } - }; - - - /// This class represents an unsigned maximum selection. - class SCEVUMaxExpr : public SCEVCommutativeExpr { - friend class ScalarEvolution; - - SCEVUMaxExpr(const FoldingSetNodeIDRef ID, - const SCEV *const *O, size_t N) - : SCEVCommutativeExpr(ID, scUMaxExpr, O, N) { - // Max never overflows. - setNoWrapFlags((NoWrapFlags)(FlagNUW | FlagNSW)); - } - - public: - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scUMaxExpr; - } - }; - - /// This means that we are dealing with an entirely unknown SCEV - /// value, and only represent it as its LLVM Value. This is the - /// "bottom" value for the analysis. - class SCEVUnknown final : public SCEV, private CallbackVH { - friend class ScalarEvolution; - - // Implement CallbackVH. - void deleted() override; - void allUsesReplacedWith(Value *New) override; - - /// The parent ScalarEvolution value. This is used to update the - /// parent's maps when the value associated with a SCEVUnknown is - /// deleted or RAUW'd. - ScalarEvolution *SE; - - /// The next pointer in the linked list of all SCEVUnknown - /// instances owned by a ScalarEvolution. - SCEVUnknown *Next; - - SCEVUnknown(const FoldingSetNodeIDRef ID, Value *V, - ScalarEvolution *se, SCEVUnknown *next) : - SCEV(ID, scUnknown), CallbackVH(V), SE(se), Next(next) {} - - public: - Value *getValue() const { return getValPtr(); } - - /// @{ - /// Test whether this is a special constant representing a type - /// size, alignment, or field offset in a target-independent - /// manner, and hasn't happened to have been folded with other - /// operations into something unrecognizable. This is mainly only - /// useful for pretty-printing and other situations where it isn't - /// absolutely required for these to succeed. - bool isSizeOf(Type *&AllocTy) const; - bool isAlignOf(Type *&AllocTy) const; - bool isOffsetOf(Type *&STy, Constant *&FieldNo) const; - /// @} - - Type *getType() const { return getValPtr()->getType(); } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const SCEV *S) { - return S->getSCEVType() == scUnknown; - } - }; - - /// This class defines a simple visitor class that may be used for - /// various SCEV analysis purposes. - template - struct SCEVVisitor { - RetVal visit(const SCEV *S) { - switch (S->getSCEVType()) { - case scConstant: - return ((SC*)this)->visitConstant((const SCEVConstant*)S); - case scTruncate: - return ((SC*)this)->visitTruncateExpr((const SCEVTruncateExpr*)S); - case scZeroExtend: - return ((SC*)this)->visitZeroExtendExpr((const SCEVZeroExtendExpr*)S); - case scSignExtend: - return ((SC*)this)->visitSignExtendExpr((const SCEVSignExtendExpr*)S); - case scAddExpr: - return ((SC*)this)->visitAddExpr((const SCEVAddExpr*)S); - case scMulExpr: - return ((SC*)this)->visitMulExpr((const SCEVMulExpr*)S); - case scUDivExpr: - return ((SC*)this)->visitUDivExpr((const SCEVUDivExpr*)S); - case scAddRecExpr: - return ((SC*)this)->visitAddRecExpr((const SCEVAddRecExpr*)S); - case scSMaxExpr: - return ((SC*)this)->visitSMaxExpr((const SCEVSMaxExpr*)S); - case scUMaxExpr: - return ((SC*)this)->visitUMaxExpr((const SCEVUMaxExpr*)S); - case scUnknown: - return ((SC*)this)->visitUnknown((const SCEVUnknown*)S); - case scCouldNotCompute: - return ((SC*)this)->visitCouldNotCompute((const SCEVCouldNotCompute*)S); - default: - llvm_unreachable("Unknown SCEV type!"); - } - } - - RetVal visitCouldNotCompute(const SCEVCouldNotCompute *S) { - llvm_unreachable("Invalid use of SCEVCouldNotCompute!"); - } - }; - - /// Visit all nodes in the expression tree using worklist traversal. - /// - /// Visitor implements: - /// // return true to follow this node. - /// bool follow(const SCEV *S); - /// // return true to terminate the search. - /// bool isDone(); - template - class SCEVTraversal { - SV &Visitor; - SmallVector Worklist; - SmallPtrSet Visited; - - void push(const SCEV *S) { - if (Visited.insert(S).second && Visitor.follow(S)) - Worklist.push_back(S); - } - public: - SCEVTraversal(SV& V): Visitor(V) {} - - void visitAll(const SCEV *Root) { - push(Root); - while (!Worklist.empty() && !Visitor.isDone()) { - const SCEV *S = Worklist.pop_back_val(); - - switch (S->getSCEVType()) { - case scConstant: - case scUnknown: - break; - case scTruncate: - case scZeroExtend: - case scSignExtend: - push(cast(S)->getOperand()); - break; - case scAddExpr: - case scMulExpr: - case scSMaxExpr: - case scUMaxExpr: - case scAddRecExpr: - for (const auto *Op : cast(S)->operands()) - push(Op); - break; - case scUDivExpr: { - const SCEVUDivExpr *UDiv = cast(S); - push(UDiv->getLHS()); - push(UDiv->getRHS()); - break; - } - case scCouldNotCompute: - llvm_unreachable("Attempt to use a SCEVCouldNotCompute object!"); - default: - llvm_unreachable("Unknown SCEV kind!"); - } - } - } - }; - - /// Use SCEVTraversal to visit all nodes in the given expression tree. - template - void visitAll(const SCEV *Root, SV& Visitor) { - SCEVTraversal T(Visitor); - T.visitAll(Root); - } - - /// Recursively visits a SCEV expression and re-writes it. - template - class SCEVRewriteVisitor : public SCEVVisitor { - protected: - ScalarEvolution &SE; - public: - SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {} - - const SCEV *visitConstant(const SCEVConstant *Constant) { - return Constant; - } - - const SCEV *visitTruncateExpr(const SCEVTruncateExpr *Expr) { - const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand()); - return SE.getTruncateExpr(Operand, Expr->getType()); - } - - const SCEV *visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) { - const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand()); - return SE.getZeroExtendExpr(Operand, Expr->getType()); - } - - const SCEV *visitSignExtendExpr(const SCEVSignExtendExpr *Expr) { - const SCEV *Operand = ((SC*)this)->visit(Expr->getOperand()); - return SE.getSignExtendExpr(Operand, Expr->getType()); - } - - const SCEV *visitAddExpr(const SCEVAddExpr *Expr) { - SmallVector Operands; - for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) - Operands.push_back(((SC*)this)->visit(Expr->getOperand(i))); - return SE.getAddExpr(Operands); - } - - const SCEV *visitMulExpr(const SCEVMulExpr *Expr) { - SmallVector Operands; - for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) - Operands.push_back(((SC*)this)->visit(Expr->getOperand(i))); - return SE.getMulExpr(Operands); - } - - const SCEV *visitUDivExpr(const SCEVUDivExpr *Expr) { - return SE.getUDivExpr(((SC*)this)->visit(Expr->getLHS()), - ((SC*)this)->visit(Expr->getRHS())); - } - - const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) { - SmallVector Operands; - for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) - Operands.push_back(((SC*)this)->visit(Expr->getOperand(i))); - return SE.getAddRecExpr(Operands, Expr->getLoop(), - Expr->getNoWrapFlags()); - } - - const SCEV *visitSMaxExpr(const SCEVSMaxExpr *Expr) { - SmallVector Operands; - for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) - Operands.push_back(((SC*)this)->visit(Expr->getOperand(i))); - return SE.getSMaxExpr(Operands); - } - - const SCEV *visitUMaxExpr(const SCEVUMaxExpr *Expr) { - SmallVector Operands; - for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) - Operands.push_back(((SC*)this)->visit(Expr->getOperand(i))); - return SE.getUMaxExpr(Operands); - } - - const SCEV *visitUnknown(const SCEVUnknown *Expr) { - return Expr; - } - - const SCEV *visitCouldNotCompute(const SCEVCouldNotCompute *Expr) { - return Expr; - } - }; - - typedef DenseMap ValueToValueMap; - - /// The SCEVParameterRewriter takes a scalar evolution expression and updates - /// the SCEVUnknown components following the Map (Value -> Value). - class SCEVParameterRewriter : public SCEVRewriteVisitor { - public: - static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE, - ValueToValueMap &Map, - bool InterpretConsts = false) { - SCEVParameterRewriter Rewriter(SE, Map, InterpretConsts); - return Rewriter.visit(Scev); - } - - SCEVParameterRewriter(ScalarEvolution &SE, ValueToValueMap &M, bool C) - : SCEVRewriteVisitor(SE), Map(M), InterpretConsts(C) {} - - const SCEV *visitUnknown(const SCEVUnknown *Expr) { - Value *V = Expr->getValue(); - if (Map.count(V)) { - Value *NV = Map[V]; - if (InterpretConsts && isa(NV)) - return SE.getConstant(cast(NV)); - return SE.getUnknown(NV); - } - return Expr; - } - - private: - ValueToValueMap ⤅ - bool InterpretConsts; - }; - - typedef DenseMap LoopToScevMapT; - - /// The SCEVLoopAddRecRewriter takes a scalar evolution expression and applies - /// the Map (Loop -> SCEV) to all AddRecExprs. - class SCEVLoopAddRecRewriter - : public SCEVRewriteVisitor { - public: - static const SCEV *rewrite(const SCEV *Scev, LoopToScevMapT &Map, - ScalarEvolution &SE) { - SCEVLoopAddRecRewriter Rewriter(SE, Map); - return Rewriter.visit(Scev); - } - - SCEVLoopAddRecRewriter(ScalarEvolution &SE, LoopToScevMapT &M) - : SCEVRewriteVisitor(SE), Map(M) {} - - const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr) { - SmallVector Operands; - for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) - Operands.push_back(visit(Expr->getOperand(i))); - - const Loop *L = Expr->getLoop(); - const SCEV *Res = SE.getAddRecExpr(Operands, L, Expr->getNoWrapFlags()); - - if (0 == Map.count(L)) - return Res; - - const SCEVAddRecExpr *Rec = cast(Res); - return Rec->evaluateAtIteration(Map[L], SE); - } - - private: - LoopToScevMapT ⤅ - }; -} - -#endif diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionNormalization.h b/llvm/include/llvm/Analysis/ScalarEvolutionNormalization.h deleted file mode 100644 index 7c6423a2..00000000 --- a/llvm/include/llvm/Analysis/ScalarEvolutionNormalization.h +++ /dev/null @@ -1,78 +0,0 @@ -//===- llvm/Analysis/ScalarEvolutionNormalization.h - See below -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines utilities for working with "normalized" ScalarEvolution -// expressions. -// -// The following example illustrates post-increment uses and how normalized -// expressions help. -// -// for (i=0; i!=n; ++i) { -// ... -// } -// use(i); -// -// While the expression for most uses of i inside the loop is {0,+,1}<%L>, the -// expression for the use of i outside the loop is {1,+,1}<%L>, since i is -// incremented at the end of the loop body. This is inconveient, since it -// suggests that we need two different induction variables, one that starts -// at 0 and one that starts at 1. We'd prefer to be able to think of these as -// the same induction variable, with uses inside the loop using the -// "pre-incremented" value, and uses after the loop using the -// "post-incremented" value. -// -// Expressions for post-incremented uses are represented as an expression -// paired with a set of loops for which the expression is in "post-increment" -// mode (there may be multiple loops). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_SCALAREVOLUTIONNORMALIZATION_H -#define LLVM_ANALYSIS_SCALAREVOLUTIONNORMALIZATION_H - -#include "llvm/ADT/SmallPtrSet.h" - -namespace llvm { - -class Instruction; -class DominatorTree; -class Loop; -class ScalarEvolution; -class SCEV; -class Value; - -/// TransformKind - Different types of transformations that -/// TransformForPostIncUse can do. -enum TransformKind { - /// Normalize - Normalize according to the given loops. - Normalize, - /// NormalizeAutodetect - Detect post-inc opportunities on new expressions, - /// update the given loop set, and normalize. - NormalizeAutodetect, - /// Denormalize - Perform the inverse transform on the expression with the - /// given loop set. - Denormalize -}; - -/// PostIncLoopSet - A set of loops. -typedef SmallPtrSet PostIncLoopSet; - -/// TransformForPostIncUse - Transform the given expression according to the -/// given transformation kind. -const SCEV *TransformForPostIncUse(TransformKind Kind, - const SCEV *S, - Instruction *User, - Value *OperandValToReplace, - PostIncLoopSet &Loops, - ScalarEvolution &SE, - DominatorTree &DT); - -} - -#endif diff --git a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h deleted file mode 100644 index 87b85d4e..00000000 --- a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h +++ /dev/null @@ -1,85 +0,0 @@ -//===- ScopedNoAliasAA.h - Scoped No-Alias Alias Analysis -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This is the interface for a metadata-based scoped no-alias analysis. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_SCOPEDNOALIASAA_H -#define LLVM_ANALYSIS_SCOPEDNOALIASAA_H - -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Metadata.h" -#include "llvm/IR/Module.h" -#include "llvm/Pass.h" - -namespace llvm { - -/// A simple AA result which uses scoped-noalias metadata to answer queries. -class ScopedNoAliasAAResult : public AAResultBase { - friend AAResultBase; - -public: - explicit ScopedNoAliasAAResult() : AAResultBase() {} - ScopedNoAliasAAResult(ScopedNoAliasAAResult &&Arg) - : AAResultBase(std::move(Arg)) {} - - /// Handle invalidation events from the new pass manager. - /// - /// By definition, this result is stateless and so remains valid. - bool invalidate(Function &, const PreservedAnalyses &) { return false; } - - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB); - ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc); - ModRefInfo getModRefInfo(ImmutableCallSite CS1, ImmutableCallSite CS2); - -private: - bool mayAliasInScopes(const MDNode *Scopes, const MDNode *NoAlias) const; - void collectMDInDomain(const MDNode *List, const MDNode *Domain, - SmallPtrSetImpl &Nodes) const; -}; - -/// Analysis pass providing a never-invalidated alias analysis result. -class ScopedNoAliasAA : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef ScopedNoAliasAAResult Result; - - ScopedNoAliasAAResult run(Function &F, AnalysisManager &AM); -}; - -/// Legacy wrapper pass to provide the ScopedNoAliasAAResult object. -class ScopedNoAliasAAWrapperPass : public ImmutablePass { - std::unique_ptr Result; - -public: - static char ID; - - ScopedNoAliasAAWrapperPass(); - - ScopedNoAliasAAResult &getResult() { return *Result; } - const ScopedNoAliasAAResult &getResult() const { return *Result; } - - bool doInitialization(Module &M) override; - bool doFinalization(Module &M) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -//===--------------------------------------------------------------------===// -// -// createScopedNoAliasAAWrapperPass - This pass implements metadata-based -// scoped noalias analysis. -// -ImmutablePass *createScopedNoAliasAAWrapperPass(); -} - -#endif diff --git a/llvm/include/llvm/Analysis/SparsePropagation.h b/llvm/include/llvm/Analysis/SparsePropagation.h deleted file mode 100644 index d1a54171..00000000 --- a/llvm/include/llvm/Analysis/SparsePropagation.h +++ /dev/null @@ -1,202 +0,0 @@ -//===- SparsePropagation.h - Sparse Conditional Property Propagation ------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements an abstract sparse conditional propagation algorithm, -// modeled after SCCP, but with a customizable lattice function. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_SPARSEPROPAGATION_H -#define LLVM_ANALYSIS_SPARSEPROPAGATION_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/IR/BasicBlock.h" -#include -#include - -namespace llvm { -class Value; -class Constant; -class Argument; -class Instruction; -class PHINode; -class TerminatorInst; -class BasicBlock; -class Function; -class SparseSolver; -class raw_ostream; - -template class SmallVectorImpl; - -/// AbstractLatticeFunction - This class is implemented by the dataflow instance -/// to specify what the lattice values are and how they handle merges etc. -/// This gives the client the power to compute lattice values from instructions, -/// constants, etc. The requirement is that lattice values must all fit into -/// a void*. If a void* is not sufficient, the implementation should use this -/// pointer to be a pointer into a uniquing set or something. -/// -class AbstractLatticeFunction { -public: - typedef void *LatticeVal; - -private: - LatticeVal UndefVal, OverdefinedVal, UntrackedVal; - -public: - AbstractLatticeFunction(LatticeVal undefVal, LatticeVal overdefinedVal, - LatticeVal untrackedVal) { - UndefVal = undefVal; - OverdefinedVal = overdefinedVal; - UntrackedVal = untrackedVal; - } - virtual ~AbstractLatticeFunction(); - - LatticeVal getUndefVal() const { return UndefVal; } - LatticeVal getOverdefinedVal() const { return OverdefinedVal; } - LatticeVal getUntrackedVal() const { return UntrackedVal; } - - /// IsUntrackedValue - If the specified Value is something that is obviously - /// uninteresting to the analysis (and would always return UntrackedVal), - /// this function can return true to avoid pointless work. - virtual bool IsUntrackedValue(Value *V) { return false; } - - /// ComputeConstant - Given a constant value, compute and return a lattice - /// value corresponding to the specified constant. - virtual LatticeVal ComputeConstant(Constant *C) { - return getOverdefinedVal(); // always safe - } - - /// IsSpecialCasedPHI - Given a PHI node, determine whether this PHI node is - /// one that the we want to handle through ComputeInstructionState. - virtual bool IsSpecialCasedPHI(PHINode *PN) { return false; } - - /// GetConstant - If the specified lattice value is representable as an LLVM - /// constant value, return it. Otherwise return null. The returned value - /// must be in the same LLVM type as Val. - virtual Constant *GetConstant(LatticeVal LV, Value *Val, SparseSolver &SS) { - return nullptr; - } - - /// ComputeArgument - Given a formal argument value, compute and return a - /// lattice value corresponding to the specified argument. - virtual LatticeVal ComputeArgument(Argument *I) { - return getOverdefinedVal(); // always safe - } - - /// MergeValues - Compute and return the merge of the two specified lattice - /// values. Merging should only move one direction down the lattice to - /// guarantee convergence (toward overdefined). - virtual LatticeVal MergeValues(LatticeVal X, LatticeVal Y) { - return getOverdefinedVal(); // always safe, never useful. - } - - /// ComputeInstructionState - Given an instruction and a vector of its operand - /// values, compute the result value of the instruction. - virtual LatticeVal ComputeInstructionState(Instruction &I, SparseSolver &SS) { - return getOverdefinedVal(); // always safe, never useful. - } - - /// PrintValue - Render the specified lattice value to the specified stream. - virtual void PrintValue(LatticeVal V, raw_ostream &OS); -}; - -/// SparseSolver - This class is a general purpose solver for Sparse Conditional -/// Propagation with a programmable lattice function. -/// -class SparseSolver { - typedef AbstractLatticeFunction::LatticeVal LatticeVal; - - /// LatticeFunc - This is the object that knows the lattice and how to do - /// compute transfer functions. - AbstractLatticeFunction *LatticeFunc; - - DenseMap ValueState; // The state each value is in. - SmallPtrSet BBExecutable; // The bbs that are executable. - - std::vector InstWorkList; // Worklist of insts to process. - - std::vector BBWorkList; // The BasicBlock work list - - /// KnownFeasibleEdges - Entries in this set are edges which have already had - /// PHI nodes retriggered. - typedef std::pair Edge; - std::set KnownFeasibleEdges; - - SparseSolver(const SparseSolver&) = delete; - void operator=(const SparseSolver&) = delete; - -public: - explicit SparseSolver(AbstractLatticeFunction *Lattice) - : LatticeFunc(Lattice) {} - ~SparseSolver() { delete LatticeFunc; } - - /// Solve - Solve for constants and executable blocks. - /// - void Solve(Function &F); - - void Print(Function &F, raw_ostream &OS) const; - - /// getLatticeState - Return the LatticeVal object that corresponds to the - /// value. If an value is not in the map, it is returned as untracked, - /// unlike the getOrInitValueState method. - LatticeVal getLatticeState(Value *V) const { - DenseMap::const_iterator I = ValueState.find(V); - return I != ValueState.end() ? I->second : LatticeFunc->getUntrackedVal(); - } - - /// getOrInitValueState - Return the LatticeVal object that corresponds to the - /// value, initializing the value's state if it hasn't been entered into the - /// map yet. This function is necessary because not all values should start - /// out in the underdefined state... Arguments should be overdefined, and - /// constants should be marked as constants. - /// - LatticeVal getOrInitValueState(Value *V); - - /// isEdgeFeasible - Return true if the control flow edge from the 'From' - /// basic block to the 'To' basic block is currently feasible. If - /// AggressiveUndef is true, then this treats values with unknown lattice - /// values as undefined. This is generally only useful when solving the - /// lattice, not when querying it. - bool isEdgeFeasible(BasicBlock *From, BasicBlock *To, - bool AggressiveUndef = false); - - /// isBlockExecutable - Return true if there are any known feasible - /// edges into the basic block. This is generally only useful when - /// querying the lattice. - bool isBlockExecutable(BasicBlock *BB) const { - return BBExecutable.count(BB); - } - -private: - /// UpdateState - When the state for some instruction is potentially updated, - /// this function notices and adds I to the worklist if needed. - void UpdateState(Instruction &Inst, LatticeVal V); - - /// MarkBlockExecutable - This method can be used by clients to mark all of - /// the blocks that are known to be intrinsically live in the processed unit. - void MarkBlockExecutable(BasicBlock *BB); - - /// markEdgeExecutable - Mark a basic block as executable, adding it to the BB - /// work list if it is not already executable. - void markEdgeExecutable(BasicBlock *Source, BasicBlock *Dest); - - /// getFeasibleSuccessors - Return a vector of booleans to indicate which - /// successors are reachable from a given terminator instruction. - void getFeasibleSuccessors(TerminatorInst &TI, SmallVectorImpl &Succs, - bool AggressiveUndef); - - void visitInst(Instruction &I); - void visitPHINode(PHINode &I); - void visitTerminatorInst(TerminatorInst &TI); -}; - -} // end namespace llvm - -#endif // LLVM_ANALYSIS_SPARSEPROPAGATION_H diff --git a/llvm/include/llvm/Analysis/TargetFolder.h b/llvm/include/llvm/Analysis/TargetFolder.h deleted file mode 100644 index 12bf9fe7..00000000 --- a/llvm/include/llvm/Analysis/TargetFolder.h +++ /dev/null @@ -1,270 +0,0 @@ -//====- TargetFolder.h - Constant folding helper ---------------*- C++ -*-====// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the TargetFolder class, a helper for IRBuilder. -// It provides IRBuilder with a set of methods for creating constants with -// target dependent folding, in addition to the same target-independent -// folding that the ConstantFolder class provides. For general constant -// creation and folding, use ConstantExpr and the routines in -// llvm/Analysis/ConstantFolding.h. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_TARGETFOLDER_H -#define LLVM_ANALYSIS_TARGETFOLDER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/Analysis/ConstantFolding.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/InstrTypes.h" - -namespace llvm { - -class DataLayout; - -/// TargetFolder - Create constants with target dependent folding. -class TargetFolder { - const DataLayout &DL; - - /// Fold - Fold the constant using target specific information. - Constant *Fold(Constant *C) const { - if (ConstantExpr *CE = dyn_cast(C)) - if (Constant *CF = ConstantFoldConstantExpression(CE, DL)) - return CF; - return C; - } - -public: - explicit TargetFolder(const DataLayout &DL) : DL(DL) {} - - //===--------------------------------------------------------------------===// - // Binary Operators - //===--------------------------------------------------------------------===// - - Constant *CreateAdd(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - return Fold(ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW)); - } - Constant *CreateFAdd(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getFAdd(LHS, RHS)); - } - Constant *CreateSub(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - return Fold(ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW)); - } - Constant *CreateFSub(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getFSub(LHS, RHS)); - } - Constant *CreateMul(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - return Fold(ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW)); - } - Constant *CreateFMul(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getFMul(LHS, RHS)); - } - Constant *CreateUDiv(Constant *LHS, Constant *RHS, bool isExact = false)const{ - return Fold(ConstantExpr::getUDiv(LHS, RHS, isExact)); - } - Constant *CreateSDiv(Constant *LHS, Constant *RHS, bool isExact = false)const{ - return Fold(ConstantExpr::getSDiv(LHS, RHS, isExact)); - } - Constant *CreateFDiv(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getFDiv(LHS, RHS)); - } - Constant *CreateURem(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getURem(LHS, RHS)); - } - Constant *CreateSRem(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getSRem(LHS, RHS)); - } - Constant *CreateFRem(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getFRem(LHS, RHS)); - } - Constant *CreateShl(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - return Fold(ConstantExpr::getShl(LHS, RHS, HasNUW, HasNSW)); - } - Constant *CreateLShr(Constant *LHS, Constant *RHS, bool isExact = false)const{ - return Fold(ConstantExpr::getLShr(LHS, RHS, isExact)); - } - Constant *CreateAShr(Constant *LHS, Constant *RHS, bool isExact = false)const{ - return Fold(ConstantExpr::getAShr(LHS, RHS, isExact)); - } - Constant *CreateAnd(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getAnd(LHS, RHS)); - } - Constant *CreateOr(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getOr(LHS, RHS)); - } - Constant *CreateXor(Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::getXor(LHS, RHS)); - } - - Constant *CreateBinOp(Instruction::BinaryOps Opc, - Constant *LHS, Constant *RHS) const { - return Fold(ConstantExpr::get(Opc, LHS, RHS)); - } - - //===--------------------------------------------------------------------===// - // Unary Operators - //===--------------------------------------------------------------------===// - - Constant *CreateNeg(Constant *C, - bool HasNUW = false, bool HasNSW = false) const { - return Fold(ConstantExpr::getNeg(C, HasNUW, HasNSW)); - } - Constant *CreateFNeg(Constant *C) const { - return Fold(ConstantExpr::getFNeg(C)); - } - Constant *CreateNot(Constant *C) const { - return Fold(ConstantExpr::getNot(C)); - } - - //===--------------------------------------------------------------------===// - // Memory Instructions - //===--------------------------------------------------------------------===// - - Constant *CreateGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return Fold(ConstantExpr::getGetElementPtr(Ty, C, IdxList)); - } - Constant *CreateGetElementPtr(Type *Ty, Constant *C, Constant *Idx) const { - // This form of the function only exists to avoid ambiguous overload - // warnings about whether to convert Idx to ArrayRef or - // ArrayRef. - return Fold(ConstantExpr::getGetElementPtr(Ty, C, Idx)); - } - Constant *CreateGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return Fold(ConstantExpr::getGetElementPtr(Ty, C, IdxList)); - } - - Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return Fold(ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList)); - } - Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - Constant *Idx) const { - // This form of the function only exists to avoid ambiguous overload - // warnings about whether to convert Idx to ArrayRef or - // ArrayRef. - return Fold(ConstantExpr::getInBoundsGetElementPtr(Ty, C, Idx)); - } - Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return Fold(ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList)); - } - - //===--------------------------------------------------------------------===// - // Cast/Conversion Operators - //===--------------------------------------------------------------------===// - - Constant *CreateCast(Instruction::CastOps Op, Constant *C, - Type *DestTy) const { - if (C->getType() == DestTy) - return C; // avoid calling Fold - return Fold(ConstantExpr::getCast(Op, C, DestTy)); - } - Constant *CreateIntCast(Constant *C, Type *DestTy, - bool isSigned) const { - if (C->getType() == DestTy) - return C; // avoid calling Fold - return Fold(ConstantExpr::getIntegerCast(C, DestTy, isSigned)); - } - Constant *CreatePointerCast(Constant *C, Type *DestTy) const { - if (C->getType() == DestTy) - return C; // avoid calling Fold - return Fold(ConstantExpr::getPointerCast(C, DestTy)); - } - Constant *CreateFPCast(Constant *C, Type *DestTy) const { - if (C->getType() == DestTy) - return C; // avoid calling Fold - return Fold(ConstantExpr::getFPCast(C, DestTy)); - } - Constant *CreateBitCast(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::BitCast, C, DestTy); - } - Constant *CreateIntToPtr(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::IntToPtr, C, DestTy); - } - Constant *CreatePtrToInt(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::PtrToInt, C, DestTy); - } - Constant *CreateZExtOrBitCast(Constant *C, Type *DestTy) const { - if (C->getType() == DestTy) - return C; // avoid calling Fold - return Fold(ConstantExpr::getZExtOrBitCast(C, DestTy)); - } - Constant *CreateSExtOrBitCast(Constant *C, Type *DestTy) const { - if (C->getType() == DestTy) - return C; // avoid calling Fold - return Fold(ConstantExpr::getSExtOrBitCast(C, DestTy)); - } - Constant *CreateTruncOrBitCast(Constant *C, Type *DestTy) const { - if (C->getType() == DestTy) - return C; // avoid calling Fold - return Fold(ConstantExpr::getTruncOrBitCast(C, DestTy)); - } - - Constant *CreatePointerBitCastOrAddrSpaceCast(Constant *C, - Type *DestTy) const { - if (C->getType() == DestTy) - return C; // avoid calling Fold - return Fold(ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy)); - } - - //===--------------------------------------------------------------------===// - // Compare Instructions - //===--------------------------------------------------------------------===// - - Constant *CreateICmp(CmpInst::Predicate P, Constant *LHS, - Constant *RHS) const { - return Fold(ConstantExpr::getCompare(P, LHS, RHS)); - } - Constant *CreateFCmp(CmpInst::Predicate P, Constant *LHS, - Constant *RHS) const { - return Fold(ConstantExpr::getCompare(P, LHS, RHS)); - } - - //===--------------------------------------------------------------------===// - // Other Instructions - //===--------------------------------------------------------------------===// - - Constant *CreateSelect(Constant *C, Constant *True, Constant *False) const { - return Fold(ConstantExpr::getSelect(C, True, False)); - } - - Constant *CreateExtractElement(Constant *Vec, Constant *Idx) const { - return Fold(ConstantExpr::getExtractElement(Vec, Idx)); - } - - Constant *CreateInsertElement(Constant *Vec, Constant *NewElt, - Constant *Idx) const { - return Fold(ConstantExpr::getInsertElement(Vec, NewElt, Idx)); - } - - Constant *CreateShuffleVector(Constant *V1, Constant *V2, - Constant *Mask) const { - return Fold(ConstantExpr::getShuffleVector(V1, V2, Mask)); - } - - Constant *CreateExtractValue(Constant *Agg, - ArrayRef IdxList) const { - return Fold(ConstantExpr::getExtractValue(Agg, IdxList)); - } - - Constant *CreateInsertValue(Constant *Agg, Constant *Val, - ArrayRef IdxList) const { - return Fold(ConstantExpr::getInsertValue(Agg, Val, IdxList)); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def deleted file mode 100644 index b2a593d6..00000000 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def +++ /dev/null @@ -1,1124 +0,0 @@ -//===-- TargetLibraryInfo.def - Library information -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -// This .def file will either fill in the enum definition or fill in the -// string representation array definition for TargetLibraryInfo. -// Which is defined depends on whether TLI_DEFINE_ENUM is defined or -// TLI_DEFINE_STRING is defined. Only one should be defined at a time. - -#if !(defined(TLI_DEFINE_ENUM) || defined(TLI_DEFINE_STRING)) -#error "Must define TLI_DEFINE_ENUM or TLI_DEFINE_STRING for TLI .def." -#elif defined(TLI_DEFINE_ENUM) && defined(TLI_DEFINE_STRING) -#error "Can only define one of TLI_DEFINE_ENUM or TLI_DEFINE_STRING at a time." -#else -// One of TLI_DEFINE_ENUM/STRING are defined. - -#if defined(TLI_DEFINE_ENUM) -#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) enum_variant, -#define TLI_DEFINE_STRING_INTERNAL(string_repr) -#else -#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) -#define TLI_DEFINE_STRING_INTERNAL(string_repr) string_repr, -#endif - -/// void *new(unsigned int); -TLI_DEFINE_ENUM_INTERNAL(msvc_new_int) -TLI_DEFINE_STRING_INTERNAL("??2@YAPAXI@Z") - -/// void *new(unsigned int, nothrow); -TLI_DEFINE_ENUM_INTERNAL(msvc_new_int_nothrow) -TLI_DEFINE_STRING_INTERNAL("??2@YAPAXIABUnothrow_t@std@@@Z") - -/// void *new(unsigned long long); -TLI_DEFINE_ENUM_INTERNAL(msvc_new_longlong) -TLI_DEFINE_STRING_INTERNAL("??2@YAPEAX_K@Z") - -/// void *new(unsigned long long, nothrow); -TLI_DEFINE_ENUM_INTERNAL(msvc_new_longlong_nothrow) -TLI_DEFINE_STRING_INTERNAL("??2@YAPEAX_KAEBUnothrow_t@std@@@Z") - -/// void operator delete(void*); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_ptr32) -TLI_DEFINE_STRING_INTERNAL("??3@YAXPAX@Z") - -/// void operator delete(void*, nothrow); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_ptr32_nothrow) -TLI_DEFINE_STRING_INTERNAL("??3@YAXPAXABUnothrow_t@std@@@Z") - -/// void operator delete(void*, unsigned int); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_ptr32_int) -TLI_DEFINE_STRING_INTERNAL("??3@YAXPAXI@Z") - -/// void operator delete(void*); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_ptr64) -TLI_DEFINE_STRING_INTERNAL("??3@YAXPEAX@Z") - -/// void operator delete(void*, nothrow); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_ptr64_nothrow) -TLI_DEFINE_STRING_INTERNAL("??3@YAXPEAXAEBUnothrow_t@std@@@Z") - -/// void operator delete(void*, unsigned long long); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_ptr64_longlong) -TLI_DEFINE_STRING_INTERNAL("??3@YAXPEAX_K@Z") - -/// void *new[](unsigned int); -TLI_DEFINE_ENUM_INTERNAL(msvc_new_array_int) -TLI_DEFINE_STRING_INTERNAL("??_U@YAPAXI@Z") - -/// void *new[](unsigned int, nothrow); -TLI_DEFINE_ENUM_INTERNAL(msvc_new_array_int_nothrow) -TLI_DEFINE_STRING_INTERNAL("??_U@YAPAXIABUnothrow_t@std@@@Z") - -/// void *new[](unsigned long long); -TLI_DEFINE_ENUM_INTERNAL(msvc_new_array_longlong) -TLI_DEFINE_STRING_INTERNAL("??_U@YAPEAX_K@Z") - -/// void *new[](unsigned long long, nothrow); -TLI_DEFINE_ENUM_INTERNAL(msvc_new_array_longlong_nothrow) -TLI_DEFINE_STRING_INTERNAL("??_U@YAPEAX_KAEBUnothrow_t@std@@@Z") - -/// void operator delete[](void*); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_array_ptr32) -TLI_DEFINE_STRING_INTERNAL("??_V@YAXPAX@Z") - -/// void operator delete[](void*, nothrow); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_array_ptr32_nothrow) -TLI_DEFINE_STRING_INTERNAL("??_V@YAXPAXABUnothrow_t@std@@@Z") - -/// void operator delete[](void*, unsigned int); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_array_ptr32_int) -TLI_DEFINE_STRING_INTERNAL("??_V@YAXPAXI@Z") - -/// void operator delete[](void*); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_array_ptr64) -TLI_DEFINE_STRING_INTERNAL("??_V@YAXPEAX@Z") - -/// void operator delete[](void*, nothrow); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_array_ptr64_nothrow) -TLI_DEFINE_STRING_INTERNAL("??_V@YAXPEAXAEBUnothrow_t@std@@@Z") - -/// void operator delete[](void*, unsigned long long); -TLI_DEFINE_ENUM_INTERNAL(msvc_delete_array_ptr64_longlong) -TLI_DEFINE_STRING_INTERNAL("??_V@YAXPEAX_K@Z") - -/// int _IO_getc(_IO_FILE * __fp); -TLI_DEFINE_ENUM_INTERNAL(under_IO_getc) -TLI_DEFINE_STRING_INTERNAL("_IO_getc") -/// int _IO_putc(int __c, _IO_FILE * __fp); -TLI_DEFINE_ENUM_INTERNAL(under_IO_putc) -TLI_DEFINE_STRING_INTERNAL("_IO_putc") -/// void operator delete[](void*); -TLI_DEFINE_ENUM_INTERNAL(ZdaPv) -TLI_DEFINE_STRING_INTERNAL("_ZdaPv") -/// void operator delete[](void*, nothrow); -TLI_DEFINE_ENUM_INTERNAL(ZdaPvRKSt9nothrow_t) -TLI_DEFINE_STRING_INTERNAL("_ZdaPvRKSt9nothrow_t") -/// void operator delete[](void*, unsigned int); -TLI_DEFINE_ENUM_INTERNAL(ZdaPvj) -TLI_DEFINE_STRING_INTERNAL("_ZdaPvj") -/// void operator delete[](void*, unsigned long); -TLI_DEFINE_ENUM_INTERNAL(ZdaPvm) -TLI_DEFINE_STRING_INTERNAL("_ZdaPvm") -/// void operator delete(void*); -TLI_DEFINE_ENUM_INTERNAL(ZdlPv) -TLI_DEFINE_STRING_INTERNAL("_ZdlPv") -/// void operator delete(void*, nothrow); -TLI_DEFINE_ENUM_INTERNAL(ZdlPvRKSt9nothrow_t) -TLI_DEFINE_STRING_INTERNAL("_ZdlPvRKSt9nothrow_t") -/// void operator delete(void*, unsigned int); -TLI_DEFINE_ENUM_INTERNAL(ZdlPvj) -TLI_DEFINE_STRING_INTERNAL("_ZdlPvj") -/// void operator delete(void*, unsigned long); -TLI_DEFINE_ENUM_INTERNAL(ZdlPvm) -TLI_DEFINE_STRING_INTERNAL("_ZdlPvm") -/// void *new[](unsigned int); -TLI_DEFINE_ENUM_INTERNAL(Znaj) -TLI_DEFINE_STRING_INTERNAL("_Znaj") -/// void *new[](unsigned int, nothrow); -TLI_DEFINE_ENUM_INTERNAL(ZnajRKSt9nothrow_t) -TLI_DEFINE_STRING_INTERNAL("_ZnajRKSt9nothrow_t") -/// void *new[](unsigned long); -TLI_DEFINE_ENUM_INTERNAL(Znam) -TLI_DEFINE_STRING_INTERNAL("_Znam") -/// void *new[](unsigned long, nothrow); -TLI_DEFINE_ENUM_INTERNAL(ZnamRKSt9nothrow_t) -TLI_DEFINE_STRING_INTERNAL("_ZnamRKSt9nothrow_t") -/// void *new(unsigned int); -TLI_DEFINE_ENUM_INTERNAL(Znwj) -TLI_DEFINE_STRING_INTERNAL("_Znwj") -/// void *new(unsigned int, nothrow); -TLI_DEFINE_ENUM_INTERNAL(ZnwjRKSt9nothrow_t) -TLI_DEFINE_STRING_INTERNAL("_ZnwjRKSt9nothrow_t") -/// void *new(unsigned long); -TLI_DEFINE_ENUM_INTERNAL(Znwm) -TLI_DEFINE_STRING_INTERNAL("_Znwm") -/// void *new(unsigned long, nothrow); -TLI_DEFINE_ENUM_INTERNAL(ZnwmRKSt9nothrow_t) -TLI_DEFINE_STRING_INTERNAL("_ZnwmRKSt9nothrow_t") -/// double __cospi(double x); -TLI_DEFINE_ENUM_INTERNAL(cospi) -TLI_DEFINE_STRING_INTERNAL("__cospi") -/// float __cospif(float x); -TLI_DEFINE_ENUM_INTERNAL(cospif) -TLI_DEFINE_STRING_INTERNAL("__cospif") -/// int __cxa_atexit(void (*f)(void *), void *p, void *d); -TLI_DEFINE_ENUM_INTERNAL(cxa_atexit) -TLI_DEFINE_STRING_INTERNAL("__cxa_atexit") -/// void __cxa_guard_abort(guard_t *guard); -/// guard_t is int64_t in Itanium ABI or int32_t on ARM eabi. -TLI_DEFINE_ENUM_INTERNAL(cxa_guard_abort) -TLI_DEFINE_STRING_INTERNAL("__cxa_guard_abort") -/// int __cxa_guard_acquire(guard_t *guard); -TLI_DEFINE_ENUM_INTERNAL(cxa_guard_acquire) -TLI_DEFINE_STRING_INTERNAL("__cxa_guard_acquire") -/// void __cxa_guard_release(guard_t *guard); -TLI_DEFINE_ENUM_INTERNAL(cxa_guard_release) -TLI_DEFINE_STRING_INTERNAL("__cxa_guard_release") -/// int __isoc99_scanf (const char *format, ...) -TLI_DEFINE_ENUM_INTERNAL(dunder_isoc99_scanf) -TLI_DEFINE_STRING_INTERNAL("__isoc99_scanf") -/// int __isoc99_sscanf(const char *s, const char *format, ...) -TLI_DEFINE_ENUM_INTERNAL(dunder_isoc99_sscanf) -TLI_DEFINE_STRING_INTERNAL("__isoc99_sscanf") -/// void *__memcpy_chk(void *s1, const void *s2, size_t n, size_t s1size); -TLI_DEFINE_ENUM_INTERNAL(memcpy_chk) -TLI_DEFINE_STRING_INTERNAL("__memcpy_chk") -/// void *__memmove_chk(void *s1, const void *s2, size_t n, size_t s1size); -TLI_DEFINE_ENUM_INTERNAL(memmove_chk) -TLI_DEFINE_STRING_INTERNAL("__memmove_chk") -/// void *__memset_chk(void *s, char v, size_t n, size_t s1size); -TLI_DEFINE_ENUM_INTERNAL(memset_chk) -TLI_DEFINE_STRING_INTERNAL("__memset_chk") - -// int __nvvm_reflect(const char *) -TLI_DEFINE_ENUM_INTERNAL(nvvm_reflect) -TLI_DEFINE_STRING_INTERNAL("__nvvm_reflect") - -/// double __sincospi_stret(double x); -TLI_DEFINE_ENUM_INTERNAL(sincospi_stret) -TLI_DEFINE_STRING_INTERNAL("__sincospi_stret") -/// float __sincospif_stret(float x); -TLI_DEFINE_ENUM_INTERNAL(sincospif_stret) -TLI_DEFINE_STRING_INTERNAL("__sincospif_stret") -/// double __sinpi(double x); -TLI_DEFINE_ENUM_INTERNAL(sinpi) -TLI_DEFINE_STRING_INTERNAL("__sinpi") -/// float __sinpif(float x); -TLI_DEFINE_ENUM_INTERNAL(sinpif) -TLI_DEFINE_STRING_INTERNAL("__sinpif") -/// double __sqrt_finite(double x); -TLI_DEFINE_ENUM_INTERNAL(sqrt_finite) -TLI_DEFINE_STRING_INTERNAL("__sqrt_finite") -/// float __sqrt_finite(float x); -TLI_DEFINE_ENUM_INTERNAL(sqrtf_finite) -TLI_DEFINE_STRING_INTERNAL("__sqrtf_finite") -/// long double __sqrt_finite(long double x); -TLI_DEFINE_ENUM_INTERNAL(sqrtl_finite) -TLI_DEFINE_STRING_INTERNAL("__sqrtl_finite") -/// char *__stpcpy_chk(char *s1, const char *s2, size_t s1size); -TLI_DEFINE_ENUM_INTERNAL(stpcpy_chk) -TLI_DEFINE_STRING_INTERNAL("__stpcpy_chk") -/// char *__stpncpy_chk(char *s1, const char *s2, size_t n, size_t s1size); -TLI_DEFINE_ENUM_INTERNAL(stpncpy_chk) -TLI_DEFINE_STRING_INTERNAL("__stpncpy_chk") -/// char *__strcpy_chk(char *s1, const char *s2, size_t s1size); -TLI_DEFINE_ENUM_INTERNAL(strcpy_chk) -TLI_DEFINE_STRING_INTERNAL("__strcpy_chk") -/// char * __strdup(const char *s); -TLI_DEFINE_ENUM_INTERNAL(dunder_strdup) -TLI_DEFINE_STRING_INTERNAL("__strdup") -/// char *__strncpy_chk(char *s1, const char *s2, size_t n, size_t s1size); -TLI_DEFINE_ENUM_INTERNAL(strncpy_chk) -TLI_DEFINE_STRING_INTERNAL("__strncpy_chk") -/// char *__strndup(const char *s, size_t n); -TLI_DEFINE_ENUM_INTERNAL(dunder_strndup) -TLI_DEFINE_STRING_INTERNAL("__strndup") -/// char * __strtok_r(char *s, const char *delim, char **save_ptr); -TLI_DEFINE_ENUM_INTERNAL(dunder_strtok_r) -TLI_DEFINE_STRING_INTERNAL("__strtok_r") -/// int abs(int j); -TLI_DEFINE_ENUM_INTERNAL(abs) -TLI_DEFINE_STRING_INTERNAL("abs") -/// int access(const char *path, int amode); -TLI_DEFINE_ENUM_INTERNAL(access) -TLI_DEFINE_STRING_INTERNAL("access") -/// double acos(double x); -TLI_DEFINE_ENUM_INTERNAL(acos) -TLI_DEFINE_STRING_INTERNAL("acos") -/// float acosf(float x); -TLI_DEFINE_ENUM_INTERNAL(acosf) -TLI_DEFINE_STRING_INTERNAL("acosf") -/// double acosh(double x); -TLI_DEFINE_ENUM_INTERNAL(acosh) -TLI_DEFINE_STRING_INTERNAL("acosh") -/// float acoshf(float x); -TLI_DEFINE_ENUM_INTERNAL(acoshf) -TLI_DEFINE_STRING_INTERNAL("acoshf") -/// long double acoshl(long double x); -TLI_DEFINE_ENUM_INTERNAL(acoshl) -TLI_DEFINE_STRING_INTERNAL("acoshl") -/// long double acosl(long double x); -TLI_DEFINE_ENUM_INTERNAL(acosl) -TLI_DEFINE_STRING_INTERNAL("acosl") -/// double asin(double x); -TLI_DEFINE_ENUM_INTERNAL(asin) -TLI_DEFINE_STRING_INTERNAL("asin") -/// float asinf(float x); -TLI_DEFINE_ENUM_INTERNAL(asinf) -TLI_DEFINE_STRING_INTERNAL("asinf") -/// double asinh(double x); -TLI_DEFINE_ENUM_INTERNAL(asinh) -TLI_DEFINE_STRING_INTERNAL("asinh") -/// float asinhf(float x); -TLI_DEFINE_ENUM_INTERNAL(asinhf) -TLI_DEFINE_STRING_INTERNAL("asinhf") -/// long double asinhl(long double x); -TLI_DEFINE_ENUM_INTERNAL(asinhl) -TLI_DEFINE_STRING_INTERNAL("asinhl") -/// long double asinl(long double x); -TLI_DEFINE_ENUM_INTERNAL(asinl) -TLI_DEFINE_STRING_INTERNAL("asinl") -/// double atan(double x); -TLI_DEFINE_ENUM_INTERNAL(atan) -TLI_DEFINE_STRING_INTERNAL("atan") -/// double atan2(double y, double x); -TLI_DEFINE_ENUM_INTERNAL(atan2) -TLI_DEFINE_STRING_INTERNAL("atan2") -/// float atan2f(float y, float x); -TLI_DEFINE_ENUM_INTERNAL(atan2f) -TLI_DEFINE_STRING_INTERNAL("atan2f") -/// long double atan2l(long double y, long double x); -TLI_DEFINE_ENUM_INTERNAL(atan2l) -TLI_DEFINE_STRING_INTERNAL("atan2l") -/// float atanf(float x); -TLI_DEFINE_ENUM_INTERNAL(atanf) -TLI_DEFINE_STRING_INTERNAL("atanf") -/// double atanh(double x); -TLI_DEFINE_ENUM_INTERNAL(atanh) -TLI_DEFINE_STRING_INTERNAL("atanh") -/// float atanhf(float x); -TLI_DEFINE_ENUM_INTERNAL(atanhf) -TLI_DEFINE_STRING_INTERNAL("atanhf") -/// long double atanhl(long double x); -TLI_DEFINE_ENUM_INTERNAL(atanhl) -TLI_DEFINE_STRING_INTERNAL("atanhl") -/// long double atanl(long double x); -TLI_DEFINE_ENUM_INTERNAL(atanl) -TLI_DEFINE_STRING_INTERNAL("atanl") -/// double atof(const char *str); -TLI_DEFINE_ENUM_INTERNAL(atof) -TLI_DEFINE_STRING_INTERNAL("atof") -/// int atoi(const char *str); -TLI_DEFINE_ENUM_INTERNAL(atoi) -TLI_DEFINE_STRING_INTERNAL("atoi") -/// long atol(const char *str); -TLI_DEFINE_ENUM_INTERNAL(atol) -TLI_DEFINE_STRING_INTERNAL("atol") -/// long long atoll(const char *nptr); -TLI_DEFINE_ENUM_INTERNAL(atoll) -TLI_DEFINE_STRING_INTERNAL("atoll") -/// int bcmp(const void *s1, const void *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(bcmp) -TLI_DEFINE_STRING_INTERNAL("bcmp") -/// void bcopy(const void *s1, void *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(bcopy) -TLI_DEFINE_STRING_INTERNAL("bcopy") -/// void bzero(void *s, size_t n); -TLI_DEFINE_ENUM_INTERNAL(bzero) -TLI_DEFINE_STRING_INTERNAL("bzero") -/// void *calloc(size_t count, size_t size); -TLI_DEFINE_ENUM_INTERNAL(calloc) -TLI_DEFINE_STRING_INTERNAL("calloc") -/// double cbrt(double x); -TLI_DEFINE_ENUM_INTERNAL(cbrt) -TLI_DEFINE_STRING_INTERNAL("cbrt") -/// float cbrtf(float x); -TLI_DEFINE_ENUM_INTERNAL(cbrtf) -TLI_DEFINE_STRING_INTERNAL("cbrtf") -/// long double cbrtl(long double x); -TLI_DEFINE_ENUM_INTERNAL(cbrtl) -TLI_DEFINE_STRING_INTERNAL("cbrtl") -/// double ceil(double x); -TLI_DEFINE_ENUM_INTERNAL(ceil) -TLI_DEFINE_STRING_INTERNAL("ceil") -/// float ceilf(float x); -TLI_DEFINE_ENUM_INTERNAL(ceilf) -TLI_DEFINE_STRING_INTERNAL("ceilf") -/// long double ceill(long double x); -TLI_DEFINE_ENUM_INTERNAL(ceill) -TLI_DEFINE_STRING_INTERNAL("ceill") -/// int chmod(const char *path, mode_t mode); -TLI_DEFINE_ENUM_INTERNAL(chmod) -TLI_DEFINE_STRING_INTERNAL("chmod") -/// int chown(const char *path, uid_t owner, gid_t group); -TLI_DEFINE_ENUM_INTERNAL(chown) -TLI_DEFINE_STRING_INTERNAL("chown") -/// void clearerr(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(clearerr) -TLI_DEFINE_STRING_INTERNAL("clearerr") -/// int closedir(DIR *dirp); -TLI_DEFINE_ENUM_INTERNAL(closedir) -TLI_DEFINE_STRING_INTERNAL("closedir") -/// double copysign(double x, double y); -TLI_DEFINE_ENUM_INTERNAL(copysign) -TLI_DEFINE_STRING_INTERNAL("copysign") -/// float copysignf(float x, float y); -TLI_DEFINE_ENUM_INTERNAL(copysignf) -TLI_DEFINE_STRING_INTERNAL("copysignf") -/// long double copysignl(long double x, long double y); -TLI_DEFINE_ENUM_INTERNAL(copysignl) -TLI_DEFINE_STRING_INTERNAL("copysignl") -/// double cos(double x); -TLI_DEFINE_ENUM_INTERNAL(cos) -TLI_DEFINE_STRING_INTERNAL("cos") -/// float cosf(float x); -TLI_DEFINE_ENUM_INTERNAL(cosf) -TLI_DEFINE_STRING_INTERNAL("cosf") -/// double cosh(double x); -TLI_DEFINE_ENUM_INTERNAL(cosh) -TLI_DEFINE_STRING_INTERNAL("cosh") -/// float coshf(float x); -TLI_DEFINE_ENUM_INTERNAL(coshf) -TLI_DEFINE_STRING_INTERNAL("coshf") -/// long double coshl(long double x); -TLI_DEFINE_ENUM_INTERNAL(coshl) -TLI_DEFINE_STRING_INTERNAL("coshl") -/// long double cosl(long double x); -TLI_DEFINE_ENUM_INTERNAL(cosl) -TLI_DEFINE_STRING_INTERNAL("cosl") -/// char *ctermid(char *s); -TLI_DEFINE_ENUM_INTERNAL(ctermid) -TLI_DEFINE_STRING_INTERNAL("ctermid") -/// double exp(double x); -TLI_DEFINE_ENUM_INTERNAL(exp) -TLI_DEFINE_STRING_INTERNAL("exp") -/// double exp10(double x); -TLI_DEFINE_ENUM_INTERNAL(exp10) -TLI_DEFINE_STRING_INTERNAL("exp10") -/// float exp10f(float x); -TLI_DEFINE_ENUM_INTERNAL(exp10f) -TLI_DEFINE_STRING_INTERNAL("exp10f") -/// long double exp10l(long double x); -TLI_DEFINE_ENUM_INTERNAL(exp10l) -TLI_DEFINE_STRING_INTERNAL("exp10l") -/// double exp2(double x); -TLI_DEFINE_ENUM_INTERNAL(exp2) -TLI_DEFINE_STRING_INTERNAL("exp2") -/// float exp2f(float x); -TLI_DEFINE_ENUM_INTERNAL(exp2f) -TLI_DEFINE_STRING_INTERNAL("exp2f") -/// long double exp2l(long double x); -TLI_DEFINE_ENUM_INTERNAL(exp2l) -TLI_DEFINE_STRING_INTERNAL("exp2l") -/// float expf(float x); -TLI_DEFINE_ENUM_INTERNAL(expf) -TLI_DEFINE_STRING_INTERNAL("expf") -/// long double expl(long double x); -TLI_DEFINE_ENUM_INTERNAL(expl) -TLI_DEFINE_STRING_INTERNAL("expl") -/// double expm1(double x); -TLI_DEFINE_ENUM_INTERNAL(expm1) -TLI_DEFINE_STRING_INTERNAL("expm1") -/// float expm1f(float x); -TLI_DEFINE_ENUM_INTERNAL(expm1f) -TLI_DEFINE_STRING_INTERNAL("expm1f") -/// long double expm1l(long double x); -TLI_DEFINE_ENUM_INTERNAL(expm1l) -TLI_DEFINE_STRING_INTERNAL("expm1l") -/// double fabs(double x); -TLI_DEFINE_ENUM_INTERNAL(fabs) -TLI_DEFINE_STRING_INTERNAL("fabs") -/// float fabsf(float x); -TLI_DEFINE_ENUM_INTERNAL(fabsf) -TLI_DEFINE_STRING_INTERNAL("fabsf") -/// long double fabsl(long double x); -TLI_DEFINE_ENUM_INTERNAL(fabsl) -TLI_DEFINE_STRING_INTERNAL("fabsl") -/// int fclose(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fclose) -TLI_DEFINE_STRING_INTERNAL("fclose") -/// FILE *fdopen(int fildes, const char *mode); -TLI_DEFINE_ENUM_INTERNAL(fdopen) -TLI_DEFINE_STRING_INTERNAL("fdopen") -/// int feof(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(feof) -TLI_DEFINE_STRING_INTERNAL("feof") -/// int ferror(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(ferror) -TLI_DEFINE_STRING_INTERNAL("ferror") -/// int fflush(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fflush) -TLI_DEFINE_STRING_INTERNAL("fflush") -/// int ffs(int i); -TLI_DEFINE_ENUM_INTERNAL(ffs) -TLI_DEFINE_STRING_INTERNAL("ffs") -/// int ffsl(long int i); -TLI_DEFINE_ENUM_INTERNAL(ffsl) -TLI_DEFINE_STRING_INTERNAL("ffsl") -/// int ffsll(long long int i); -TLI_DEFINE_ENUM_INTERNAL(ffsll) -TLI_DEFINE_STRING_INTERNAL("ffsll") -/// int fgetc(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fgetc) -TLI_DEFINE_STRING_INTERNAL("fgetc") -/// int fgetpos(FILE *stream, fpos_t *pos); -TLI_DEFINE_ENUM_INTERNAL(fgetpos) -TLI_DEFINE_STRING_INTERNAL("fgetpos") -/// char *fgets(char *s, int n, FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fgets) -TLI_DEFINE_STRING_INTERNAL("fgets") -/// int fileno(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fileno) -TLI_DEFINE_STRING_INTERNAL("fileno") -/// int fiprintf(FILE *stream, const char *format, ...); -TLI_DEFINE_ENUM_INTERNAL(fiprintf) -TLI_DEFINE_STRING_INTERNAL("fiprintf") -/// void flockfile(FILE *file); -TLI_DEFINE_ENUM_INTERNAL(flockfile) -TLI_DEFINE_STRING_INTERNAL("flockfile") -/// double floor(double x); -TLI_DEFINE_ENUM_INTERNAL(floor) -TLI_DEFINE_STRING_INTERNAL("floor") -/// float floorf(float x); -TLI_DEFINE_ENUM_INTERNAL(floorf) -TLI_DEFINE_STRING_INTERNAL("floorf") -/// long double floorl(long double x); -TLI_DEFINE_ENUM_INTERNAL(floorl) -TLI_DEFINE_STRING_INTERNAL("floorl") -/// int fls(int i); -TLI_DEFINE_ENUM_INTERNAL(fls) -TLI_DEFINE_STRING_INTERNAL("fls") -/// int flsl(long int i); -TLI_DEFINE_ENUM_INTERNAL(flsl) -TLI_DEFINE_STRING_INTERNAL("flsl") -/// int flsll(long long int i); -TLI_DEFINE_ENUM_INTERNAL(flsll) -TLI_DEFINE_STRING_INTERNAL("flsll") -/// double fmax(double x, double y); -TLI_DEFINE_ENUM_INTERNAL(fmax) -TLI_DEFINE_STRING_INTERNAL("fmax") -/// float fmaxf(float x, float y); -TLI_DEFINE_ENUM_INTERNAL(fmaxf) -TLI_DEFINE_STRING_INTERNAL("fmaxf") -/// long double fmaxl(long double x, long double y); -TLI_DEFINE_ENUM_INTERNAL(fmaxl) -TLI_DEFINE_STRING_INTERNAL("fmaxl") -/// double fmin(double x, double y); -TLI_DEFINE_ENUM_INTERNAL(fmin) -TLI_DEFINE_STRING_INTERNAL("fmin") -/// float fminf(float x, float y); -TLI_DEFINE_ENUM_INTERNAL(fminf) -TLI_DEFINE_STRING_INTERNAL("fminf") -/// long double fminl(long double x, long double y); -TLI_DEFINE_ENUM_INTERNAL(fminl) -TLI_DEFINE_STRING_INTERNAL("fminl") -/// double fmod(double x, double y); -TLI_DEFINE_ENUM_INTERNAL(fmod) -TLI_DEFINE_STRING_INTERNAL("fmod") -/// float fmodf(float x, float y); -TLI_DEFINE_ENUM_INTERNAL(fmodf) -TLI_DEFINE_STRING_INTERNAL("fmodf") -/// long double fmodl(long double x, long double y); -TLI_DEFINE_ENUM_INTERNAL(fmodl) -TLI_DEFINE_STRING_INTERNAL("fmodl") -/// FILE *fopen(const char *filename, const char *mode); -TLI_DEFINE_ENUM_INTERNAL(fopen) -TLI_DEFINE_STRING_INTERNAL("fopen") -/// FILE *fopen64(const char *filename, const char *opentype) -TLI_DEFINE_ENUM_INTERNAL(fopen64) -TLI_DEFINE_STRING_INTERNAL("fopen64") -/// int fprintf(FILE *stream, const char *format, ...); -TLI_DEFINE_ENUM_INTERNAL(fprintf) -TLI_DEFINE_STRING_INTERNAL("fprintf") -/// int fputc(int c, FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fputc) -TLI_DEFINE_STRING_INTERNAL("fputc") -/// int fputs(const char *s, FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fputs) -TLI_DEFINE_STRING_INTERNAL("fputs") -/// size_t fread(void *ptr, size_t size, size_t nitems, FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fread) -TLI_DEFINE_STRING_INTERNAL("fread") -/// void free(void *ptr); -TLI_DEFINE_ENUM_INTERNAL(free) -TLI_DEFINE_STRING_INTERNAL("free") -/// double frexp(double num, int *exp); -TLI_DEFINE_ENUM_INTERNAL(frexp) -TLI_DEFINE_STRING_INTERNAL("frexp") -/// float frexpf(float num, int *exp); -TLI_DEFINE_ENUM_INTERNAL(frexpf) -TLI_DEFINE_STRING_INTERNAL("frexpf") -/// long double frexpl(long double num, int *exp); -TLI_DEFINE_ENUM_INTERNAL(frexpl) -TLI_DEFINE_STRING_INTERNAL("frexpl") -/// int fscanf(FILE *stream, const char *format, ... ); -TLI_DEFINE_ENUM_INTERNAL(fscanf) -TLI_DEFINE_STRING_INTERNAL("fscanf") -/// int fseek(FILE *stream, long offset, int whence); -TLI_DEFINE_ENUM_INTERNAL(fseek) -TLI_DEFINE_STRING_INTERNAL("fseek") -/// int fseeko(FILE *stream, off_t offset, int whence); -TLI_DEFINE_ENUM_INTERNAL(fseeko) -TLI_DEFINE_STRING_INTERNAL("fseeko") -/// int fseeko64(FILE *stream, off64_t offset, int whence) -TLI_DEFINE_ENUM_INTERNAL(fseeko64) -TLI_DEFINE_STRING_INTERNAL("fseeko64") -/// int fsetpos(FILE *stream, const fpos_t *pos); -TLI_DEFINE_ENUM_INTERNAL(fsetpos) -TLI_DEFINE_STRING_INTERNAL("fsetpos") -/// int fstat(int fildes, struct stat *buf); -TLI_DEFINE_ENUM_INTERNAL(fstat) -TLI_DEFINE_STRING_INTERNAL("fstat") -/// int fstat64(int filedes, struct stat64 *buf) -TLI_DEFINE_ENUM_INTERNAL(fstat64) -TLI_DEFINE_STRING_INTERNAL("fstat64") -/// int fstatvfs(int fildes, struct statvfs *buf); -TLI_DEFINE_ENUM_INTERNAL(fstatvfs) -TLI_DEFINE_STRING_INTERNAL("fstatvfs") -/// int fstatvfs64(int fildes, struct statvfs64 *buf); -TLI_DEFINE_ENUM_INTERNAL(fstatvfs64) -TLI_DEFINE_STRING_INTERNAL("fstatvfs64") -/// long ftell(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(ftell) -TLI_DEFINE_STRING_INTERNAL("ftell") -/// off_t ftello(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(ftello) -TLI_DEFINE_STRING_INTERNAL("ftello") -/// off64_t ftello64(FILE *stream) -TLI_DEFINE_ENUM_INTERNAL(ftello64) -TLI_DEFINE_STRING_INTERNAL("ftello64") -/// int ftrylockfile(FILE *file); -TLI_DEFINE_ENUM_INTERNAL(ftrylockfile) -TLI_DEFINE_STRING_INTERNAL("ftrylockfile") -/// void funlockfile(FILE *file); -TLI_DEFINE_ENUM_INTERNAL(funlockfile) -TLI_DEFINE_STRING_INTERNAL("funlockfile") -/// size_t fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(fwrite) -TLI_DEFINE_STRING_INTERNAL("fwrite") -/// int getc(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(getc) -TLI_DEFINE_STRING_INTERNAL("getc") -/// int getc_unlocked(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(getc_unlocked) -TLI_DEFINE_STRING_INTERNAL("getc_unlocked") -/// int getchar(void); -TLI_DEFINE_ENUM_INTERNAL(getchar) -TLI_DEFINE_STRING_INTERNAL("getchar") -/// char *getenv(const char *name); -TLI_DEFINE_ENUM_INTERNAL(getenv) -TLI_DEFINE_STRING_INTERNAL("getenv") -/// int getitimer(int which, struct itimerval *value); -TLI_DEFINE_ENUM_INTERNAL(getitimer) -TLI_DEFINE_STRING_INTERNAL("getitimer") -/// int getlogin_r(char *name, size_t namesize); -TLI_DEFINE_ENUM_INTERNAL(getlogin_r) -TLI_DEFINE_STRING_INTERNAL("getlogin_r") -/// struct passwd *getpwnam(const char *name); -TLI_DEFINE_ENUM_INTERNAL(getpwnam) -TLI_DEFINE_STRING_INTERNAL("getpwnam") -/// char *gets(char *s); -TLI_DEFINE_ENUM_INTERNAL(gets) -TLI_DEFINE_STRING_INTERNAL("gets") -/// int gettimeofday(struct timeval *tp, void *tzp); -TLI_DEFINE_ENUM_INTERNAL(gettimeofday) -TLI_DEFINE_STRING_INTERNAL("gettimeofday") -/// uint32_t htonl(uint32_t hostlong); -TLI_DEFINE_ENUM_INTERNAL(htonl) -TLI_DEFINE_STRING_INTERNAL("htonl") -/// uint16_t htons(uint16_t hostshort); -TLI_DEFINE_ENUM_INTERNAL(htons) -TLI_DEFINE_STRING_INTERNAL("htons") -/// int iprintf(const char *format, ...); -TLI_DEFINE_ENUM_INTERNAL(iprintf) -TLI_DEFINE_STRING_INTERNAL("iprintf") -/// int isascii(int c); -TLI_DEFINE_ENUM_INTERNAL(isascii) -TLI_DEFINE_STRING_INTERNAL("isascii") -/// int isdigit(int c); -TLI_DEFINE_ENUM_INTERNAL(isdigit) -TLI_DEFINE_STRING_INTERNAL("isdigit") -/// long int labs(long int j); -TLI_DEFINE_ENUM_INTERNAL(labs) -TLI_DEFINE_STRING_INTERNAL("labs") -/// int lchown(const char *path, uid_t owner, gid_t group); -TLI_DEFINE_ENUM_INTERNAL(lchown) -TLI_DEFINE_STRING_INTERNAL("lchown") -/// double ldexp(double x, int n); -TLI_DEFINE_ENUM_INTERNAL(ldexp) -TLI_DEFINE_STRING_INTERNAL("ldexp") -/// float ldexpf(float x, int n); -TLI_DEFINE_ENUM_INTERNAL(ldexpf) -TLI_DEFINE_STRING_INTERNAL("ldexpf") -/// long double ldexpl(long double x, int n); -TLI_DEFINE_ENUM_INTERNAL(ldexpl) -TLI_DEFINE_STRING_INTERNAL("ldexpl") -/// long long int llabs(long long int j); -TLI_DEFINE_ENUM_INTERNAL(llabs) -TLI_DEFINE_STRING_INTERNAL("llabs") -/// double log(double x); -TLI_DEFINE_ENUM_INTERNAL(log) -TLI_DEFINE_STRING_INTERNAL("log") -/// double log10(double x); -TLI_DEFINE_ENUM_INTERNAL(log10) -TLI_DEFINE_STRING_INTERNAL("log10") -/// float log10f(float x); -TLI_DEFINE_ENUM_INTERNAL(log10f) -TLI_DEFINE_STRING_INTERNAL("log10f") -/// long double log10l(long double x); -TLI_DEFINE_ENUM_INTERNAL(log10l) -TLI_DEFINE_STRING_INTERNAL("log10l") -/// double log1p(double x); -TLI_DEFINE_ENUM_INTERNAL(log1p) -TLI_DEFINE_STRING_INTERNAL("log1p") -/// float log1pf(float x); -TLI_DEFINE_ENUM_INTERNAL(log1pf) -TLI_DEFINE_STRING_INTERNAL("log1pf") -/// long double log1pl(long double x); -TLI_DEFINE_ENUM_INTERNAL(log1pl) -TLI_DEFINE_STRING_INTERNAL("log1pl") -/// double log2(double x); -TLI_DEFINE_ENUM_INTERNAL(log2) -TLI_DEFINE_STRING_INTERNAL("log2") -/// float log2f(float x); -TLI_DEFINE_ENUM_INTERNAL(log2f) -TLI_DEFINE_STRING_INTERNAL("log2f") -/// double long double log2l(long double x); -TLI_DEFINE_ENUM_INTERNAL(log2l) -TLI_DEFINE_STRING_INTERNAL("log2l") -/// double logb(double x); -TLI_DEFINE_ENUM_INTERNAL(logb) -TLI_DEFINE_STRING_INTERNAL("logb") -/// float logbf(float x); -TLI_DEFINE_ENUM_INTERNAL(logbf) -TLI_DEFINE_STRING_INTERNAL("logbf") -/// long double logbl(long double x); -TLI_DEFINE_ENUM_INTERNAL(logbl) -TLI_DEFINE_STRING_INTERNAL("logbl") -/// float logf(float x); -TLI_DEFINE_ENUM_INTERNAL(logf) -TLI_DEFINE_STRING_INTERNAL("logf") -/// long double logl(long double x); -TLI_DEFINE_ENUM_INTERNAL(logl) -TLI_DEFINE_STRING_INTERNAL("logl") -/// int lstat(const char *path, struct stat *buf); -TLI_DEFINE_ENUM_INTERNAL(lstat) -TLI_DEFINE_STRING_INTERNAL("lstat") -/// int lstat64(const char *path, struct stat64 *buf); -TLI_DEFINE_ENUM_INTERNAL(lstat64) -TLI_DEFINE_STRING_INTERNAL("lstat64") -/// void *malloc(size_t size); -TLI_DEFINE_ENUM_INTERNAL(malloc) -TLI_DEFINE_STRING_INTERNAL("malloc") -/// void *memalign(size_t boundary, size_t size); -TLI_DEFINE_ENUM_INTERNAL(memalign) -TLI_DEFINE_STRING_INTERNAL("memalign") -/// void *memccpy(void *s1, const void *s2, int c, size_t n); -TLI_DEFINE_ENUM_INTERNAL(memccpy) -TLI_DEFINE_STRING_INTERNAL("memccpy") -/// void *memchr(const void *s, int c, size_t n); -TLI_DEFINE_ENUM_INTERNAL(memchr) -TLI_DEFINE_STRING_INTERNAL("memchr") -/// int memcmp(const void *s1, const void *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(memcmp) -TLI_DEFINE_STRING_INTERNAL("memcmp") -/// void *memcpy(void *s1, const void *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(memcpy) -TLI_DEFINE_STRING_INTERNAL("memcpy") -/// void *memmove(void *s1, const void *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(memmove) -TLI_DEFINE_STRING_INTERNAL("memmove") -// void *memrchr(const void *s, int c, size_t n); -TLI_DEFINE_ENUM_INTERNAL(memrchr) -TLI_DEFINE_STRING_INTERNAL("memrchr") -/// void *memset(void *b, int c, size_t len); -TLI_DEFINE_ENUM_INTERNAL(memset) -TLI_DEFINE_STRING_INTERNAL("memset") -/// void memset_pattern16(void *b, const void *pattern16, size_t len); -TLI_DEFINE_ENUM_INTERNAL(memset_pattern16) -TLI_DEFINE_STRING_INTERNAL("memset_pattern16") -/// int mkdir(const char *path, mode_t mode); -TLI_DEFINE_ENUM_INTERNAL(mkdir) -TLI_DEFINE_STRING_INTERNAL("mkdir") -/// time_t mktime(struct tm *timeptr); -TLI_DEFINE_ENUM_INTERNAL(mktime) -TLI_DEFINE_STRING_INTERNAL("mktime") -/// double modf(double x, double *iptr); -TLI_DEFINE_ENUM_INTERNAL(modf) -TLI_DEFINE_STRING_INTERNAL("modf") -/// float modff(float, float *iptr); -TLI_DEFINE_ENUM_INTERNAL(modff) -TLI_DEFINE_STRING_INTERNAL("modff") -/// long double modfl(long double value, long double *iptr); -TLI_DEFINE_ENUM_INTERNAL(modfl) -TLI_DEFINE_STRING_INTERNAL("modfl") - -/// double nearbyint(double x); -TLI_DEFINE_ENUM_INTERNAL(nearbyint) -TLI_DEFINE_STRING_INTERNAL("nearbyint") -/// float nearbyintf(float x); -TLI_DEFINE_ENUM_INTERNAL(nearbyintf) -TLI_DEFINE_STRING_INTERNAL("nearbyintf") -/// long double nearbyintl(long double x); -TLI_DEFINE_ENUM_INTERNAL(nearbyintl) -TLI_DEFINE_STRING_INTERNAL("nearbyintl") -/// uint32_t ntohl(uint32_t netlong); -TLI_DEFINE_ENUM_INTERNAL(ntohl) -TLI_DEFINE_STRING_INTERNAL("ntohl") -/// uint16_t ntohs(uint16_t netshort); -TLI_DEFINE_ENUM_INTERNAL(ntohs) -TLI_DEFINE_STRING_INTERNAL("ntohs") -/// int open(const char *path, int oflag, ... ); -TLI_DEFINE_ENUM_INTERNAL(open) -TLI_DEFINE_STRING_INTERNAL("open") -/// int open64(const char *filename, int flags[, mode_t mode]) -TLI_DEFINE_ENUM_INTERNAL(open64) -TLI_DEFINE_STRING_INTERNAL("open64") -/// DIR *opendir(const char *dirname); -TLI_DEFINE_ENUM_INTERNAL(opendir) -TLI_DEFINE_STRING_INTERNAL("opendir") -/// int pclose(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(pclose) -TLI_DEFINE_STRING_INTERNAL("pclose") -/// void perror(const char *s); -TLI_DEFINE_ENUM_INTERNAL(perror) -TLI_DEFINE_STRING_INTERNAL("perror") -/// FILE *popen(const char *command, const char *mode); -TLI_DEFINE_ENUM_INTERNAL(popen) -TLI_DEFINE_STRING_INTERNAL("popen") -/// int posix_memalign(void **memptr, size_t alignment, size_t size); -TLI_DEFINE_ENUM_INTERNAL(posix_memalign) -TLI_DEFINE_STRING_INTERNAL("posix_memalign") -/// double pow(double x, double y); -TLI_DEFINE_ENUM_INTERNAL(pow) -TLI_DEFINE_STRING_INTERNAL("pow") -/// float powf(float x, float y); -TLI_DEFINE_ENUM_INTERNAL(powf) -TLI_DEFINE_STRING_INTERNAL("powf") -/// long double powl(long double x, long double y); -TLI_DEFINE_ENUM_INTERNAL(powl) -TLI_DEFINE_STRING_INTERNAL("powl") -/// ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); -TLI_DEFINE_ENUM_INTERNAL(pread) -TLI_DEFINE_STRING_INTERNAL("pread") -/// int printf(const char *format, ...); -TLI_DEFINE_ENUM_INTERNAL(printf) -TLI_DEFINE_STRING_INTERNAL("printf") -/// int putc(int c, FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(putc) -TLI_DEFINE_STRING_INTERNAL("putc") -/// int putchar(int c); -TLI_DEFINE_ENUM_INTERNAL(putchar) -TLI_DEFINE_STRING_INTERNAL("putchar") -/// int puts(const char *s); -TLI_DEFINE_ENUM_INTERNAL(puts) -TLI_DEFINE_STRING_INTERNAL("puts") -/// ssize_t pwrite(int fildes, const void *buf, size_t nbyte, off_t offset); -TLI_DEFINE_ENUM_INTERNAL(pwrite) -TLI_DEFINE_STRING_INTERNAL("pwrite") -/// void qsort(void *base, size_t nel, size_t width, -/// int (*compar)(const void *, const void *)); -TLI_DEFINE_ENUM_INTERNAL(qsort) -TLI_DEFINE_STRING_INTERNAL("qsort") -/// ssize_t read(int fildes, void *buf, size_t nbyte); -TLI_DEFINE_ENUM_INTERNAL(read) -TLI_DEFINE_STRING_INTERNAL("read") -/// ssize_t readlink(const char *path, char *buf, size_t bufsize); -TLI_DEFINE_ENUM_INTERNAL(readlink) -TLI_DEFINE_STRING_INTERNAL("readlink") -/// void *realloc(void *ptr, size_t size); -TLI_DEFINE_ENUM_INTERNAL(realloc) -TLI_DEFINE_STRING_INTERNAL("realloc") -/// void *reallocf(void *ptr, size_t size); -TLI_DEFINE_ENUM_INTERNAL(reallocf) -TLI_DEFINE_STRING_INTERNAL("reallocf") -/// char *realpath(const char *file_name, char *resolved_name); -TLI_DEFINE_ENUM_INTERNAL(realpath) -TLI_DEFINE_STRING_INTERNAL("realpath") -/// int remove(const char *path); -TLI_DEFINE_ENUM_INTERNAL(remove) -TLI_DEFINE_STRING_INTERNAL("remove") -/// int rename(const char *old, const char *new); -TLI_DEFINE_ENUM_INTERNAL(rename) -TLI_DEFINE_STRING_INTERNAL("rename") -/// void rewind(FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(rewind) -TLI_DEFINE_STRING_INTERNAL("rewind") -/// double rint(double x); -TLI_DEFINE_ENUM_INTERNAL(rint) -TLI_DEFINE_STRING_INTERNAL("rint") -/// float rintf(float x); -TLI_DEFINE_ENUM_INTERNAL(rintf) -TLI_DEFINE_STRING_INTERNAL("rintf") -/// long double rintl(long double x); -TLI_DEFINE_ENUM_INTERNAL(rintl) -TLI_DEFINE_STRING_INTERNAL("rintl") -/// int rmdir(const char *path); -TLI_DEFINE_ENUM_INTERNAL(rmdir) -TLI_DEFINE_STRING_INTERNAL("rmdir") -/// double round(double x); -TLI_DEFINE_ENUM_INTERNAL(round) -TLI_DEFINE_STRING_INTERNAL("round") -/// float roundf(float x); -TLI_DEFINE_ENUM_INTERNAL(roundf) -TLI_DEFINE_STRING_INTERNAL("roundf") -/// long double roundl(long double x); -TLI_DEFINE_ENUM_INTERNAL(roundl) -TLI_DEFINE_STRING_INTERNAL("roundl") -/// int scanf(const char *restrict format, ... ); -TLI_DEFINE_ENUM_INTERNAL(scanf) -TLI_DEFINE_STRING_INTERNAL("scanf") -/// void setbuf(FILE *stream, char *buf); -TLI_DEFINE_ENUM_INTERNAL(setbuf) -TLI_DEFINE_STRING_INTERNAL("setbuf") -/// int setitimer(int which, const struct itimerval *value, -/// struct itimerval *ovalue); -TLI_DEFINE_ENUM_INTERNAL(setitimer) -TLI_DEFINE_STRING_INTERNAL("setitimer") -/// int setvbuf(FILE *stream, char *buf, int type, size_t size); -TLI_DEFINE_ENUM_INTERNAL(setvbuf) -TLI_DEFINE_STRING_INTERNAL("setvbuf") -/// double sin(double x); -TLI_DEFINE_ENUM_INTERNAL(sin) -TLI_DEFINE_STRING_INTERNAL("sin") -/// float sinf(float x); -TLI_DEFINE_ENUM_INTERNAL(sinf) -TLI_DEFINE_STRING_INTERNAL("sinf") -/// double sinh(double x); -TLI_DEFINE_ENUM_INTERNAL(sinh) -TLI_DEFINE_STRING_INTERNAL("sinh") -/// float sinhf(float x); -TLI_DEFINE_ENUM_INTERNAL(sinhf) -TLI_DEFINE_STRING_INTERNAL("sinhf") -/// long double sinhl(long double x); -TLI_DEFINE_ENUM_INTERNAL(sinhl) -TLI_DEFINE_STRING_INTERNAL("sinhl") -/// long double sinl(long double x); -TLI_DEFINE_ENUM_INTERNAL(sinl) -TLI_DEFINE_STRING_INTERNAL("sinl") -/// int siprintf(char *str, const char *format, ...); -TLI_DEFINE_ENUM_INTERNAL(siprintf) -TLI_DEFINE_STRING_INTERNAL("siprintf") -/// int snprintf(char *s, size_t n, const char *format, ...); -TLI_DEFINE_ENUM_INTERNAL(snprintf) -TLI_DEFINE_STRING_INTERNAL("snprintf") -/// int sprintf(char *str, const char *format, ...); -TLI_DEFINE_ENUM_INTERNAL(sprintf) -TLI_DEFINE_STRING_INTERNAL("sprintf") -/// double sqrt(double x); -TLI_DEFINE_ENUM_INTERNAL(sqrt) -TLI_DEFINE_STRING_INTERNAL("sqrt") -/// float sqrtf(float x); -TLI_DEFINE_ENUM_INTERNAL(sqrtf) -TLI_DEFINE_STRING_INTERNAL("sqrtf") -/// long double sqrtl(long double x); -TLI_DEFINE_ENUM_INTERNAL(sqrtl) -TLI_DEFINE_STRING_INTERNAL("sqrtl") -/// int sscanf(const char *s, const char *format, ... ); -TLI_DEFINE_ENUM_INTERNAL(sscanf) -TLI_DEFINE_STRING_INTERNAL("sscanf") -/// int stat(const char *path, struct stat *buf); -TLI_DEFINE_ENUM_INTERNAL(stat) -TLI_DEFINE_STRING_INTERNAL("stat") -/// int stat64(const char *path, struct stat64 *buf); -TLI_DEFINE_ENUM_INTERNAL(stat64) -TLI_DEFINE_STRING_INTERNAL("stat64") -/// int statvfs(const char *path, struct statvfs *buf); -TLI_DEFINE_ENUM_INTERNAL(statvfs) -TLI_DEFINE_STRING_INTERNAL("statvfs") -/// int statvfs64(const char *path, struct statvfs64 *buf) -TLI_DEFINE_ENUM_INTERNAL(statvfs64) -TLI_DEFINE_STRING_INTERNAL("statvfs64") -/// char *stpcpy(char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(stpcpy) -TLI_DEFINE_STRING_INTERNAL("stpcpy") -/// char *stpncpy(char *s1, const char *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(stpncpy) -TLI_DEFINE_STRING_INTERNAL("stpncpy") -/// int strcasecmp(const char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strcasecmp) -TLI_DEFINE_STRING_INTERNAL("strcasecmp") -/// char *strcat(char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strcat) -TLI_DEFINE_STRING_INTERNAL("strcat") -/// char *strchr(const char *s, int c); -TLI_DEFINE_ENUM_INTERNAL(strchr) -TLI_DEFINE_STRING_INTERNAL("strchr") -/// int strcmp(const char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strcmp) -TLI_DEFINE_STRING_INTERNAL("strcmp") -/// int strcoll(const char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strcoll) -TLI_DEFINE_STRING_INTERNAL("strcoll") -/// char *strcpy(char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strcpy) -TLI_DEFINE_STRING_INTERNAL("strcpy") -/// size_t strcspn(const char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strcspn) -TLI_DEFINE_STRING_INTERNAL("strcspn") -/// char *strdup(const char *s1); -TLI_DEFINE_ENUM_INTERNAL(strdup) -TLI_DEFINE_STRING_INTERNAL("strdup") -/// size_t strlen(const char *s); -TLI_DEFINE_ENUM_INTERNAL(strlen) -TLI_DEFINE_STRING_INTERNAL("strlen") -/// int strncasecmp(const char *s1, const char *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(strncasecmp) -TLI_DEFINE_STRING_INTERNAL("strncasecmp") -/// char *strncat(char *s1, const char *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(strncat) -TLI_DEFINE_STRING_INTERNAL("strncat") -/// int strncmp(const char *s1, const char *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(strncmp) -TLI_DEFINE_STRING_INTERNAL("strncmp") -/// char *strncpy(char *s1, const char *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(strncpy) -TLI_DEFINE_STRING_INTERNAL("strncpy") -/// char *strndup(const char *s1, size_t n); -TLI_DEFINE_ENUM_INTERNAL(strndup) -TLI_DEFINE_STRING_INTERNAL("strndup") -/// size_t strnlen(const char *s, size_t maxlen); -TLI_DEFINE_ENUM_INTERNAL(strnlen) -TLI_DEFINE_STRING_INTERNAL("strnlen") -/// char *strpbrk(const char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strpbrk) -TLI_DEFINE_STRING_INTERNAL("strpbrk") -/// char *strrchr(const char *s, int c); -TLI_DEFINE_ENUM_INTERNAL(strrchr) -TLI_DEFINE_STRING_INTERNAL("strrchr") -/// size_t strspn(const char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strspn) -TLI_DEFINE_STRING_INTERNAL("strspn") -/// char *strstr(const char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strstr) -TLI_DEFINE_STRING_INTERNAL("strstr") -/// double strtod(const char *nptr, char **endptr); -TLI_DEFINE_ENUM_INTERNAL(strtod) -TLI_DEFINE_STRING_INTERNAL("strtod") -/// float strtof(const char *nptr, char **endptr); -TLI_DEFINE_ENUM_INTERNAL(strtof) -TLI_DEFINE_STRING_INTERNAL("strtof") -// char *strtok(char *s1, const char *s2); -TLI_DEFINE_ENUM_INTERNAL(strtok) -TLI_DEFINE_STRING_INTERNAL("strtok") -// char *strtok_r(char *s, const char *sep, char **lasts); -TLI_DEFINE_ENUM_INTERNAL(strtok_r) -TLI_DEFINE_STRING_INTERNAL("strtok_r") -/// long int strtol(const char *nptr, char **endptr, int base); -TLI_DEFINE_ENUM_INTERNAL(strtol) -TLI_DEFINE_STRING_INTERNAL("strtol") -/// long double strtold(const char *nptr, char **endptr); -TLI_DEFINE_ENUM_INTERNAL(strtold) -TLI_DEFINE_STRING_INTERNAL("strtold") -/// long long int strtoll(const char *nptr, char **endptr, int base); -TLI_DEFINE_ENUM_INTERNAL(strtoll) -TLI_DEFINE_STRING_INTERNAL("strtoll") -/// unsigned long int strtoul(const char *nptr, char **endptr, int base); -TLI_DEFINE_ENUM_INTERNAL(strtoul) -TLI_DEFINE_STRING_INTERNAL("strtoul") -/// unsigned long long int strtoull(const char *nptr, char **endptr, int base); -TLI_DEFINE_ENUM_INTERNAL(strtoull) -TLI_DEFINE_STRING_INTERNAL("strtoull") -/// size_t strxfrm(char *s1, const char *s2, size_t n); -TLI_DEFINE_ENUM_INTERNAL(strxfrm) -TLI_DEFINE_STRING_INTERNAL("strxfrm") -/// int system(const char *command); -TLI_DEFINE_ENUM_INTERNAL(system) -TLI_DEFINE_STRING_INTERNAL("system") -/// double tan(double x); -TLI_DEFINE_ENUM_INTERNAL(tan) -TLI_DEFINE_STRING_INTERNAL("tan") -/// float tanf(float x); -TLI_DEFINE_ENUM_INTERNAL(tanf) -TLI_DEFINE_STRING_INTERNAL("tanf") -/// double tanh(double x); -TLI_DEFINE_ENUM_INTERNAL(tanh) -TLI_DEFINE_STRING_INTERNAL("tanh") -/// float tanhf(float x); -TLI_DEFINE_ENUM_INTERNAL(tanhf) -TLI_DEFINE_STRING_INTERNAL("tanhf") -/// long double tanhl(long double x); -TLI_DEFINE_ENUM_INTERNAL(tanhl) -TLI_DEFINE_STRING_INTERNAL("tanhl") -/// long double tanl(long double x); -TLI_DEFINE_ENUM_INTERNAL(tanl) -TLI_DEFINE_STRING_INTERNAL("tanl") -/// clock_t times(struct tms *buffer); -TLI_DEFINE_ENUM_INTERNAL(times) -TLI_DEFINE_STRING_INTERNAL("times") -/// FILE *tmpfile(void); -TLI_DEFINE_ENUM_INTERNAL(tmpfile) -TLI_DEFINE_STRING_INTERNAL("tmpfile") -/// FILE *tmpfile64(void) -TLI_DEFINE_ENUM_INTERNAL(tmpfile64) -TLI_DEFINE_STRING_INTERNAL("tmpfile64") -/// int toascii(int c); -TLI_DEFINE_ENUM_INTERNAL(toascii) -TLI_DEFINE_STRING_INTERNAL("toascii") -/// double trunc(double x); -TLI_DEFINE_ENUM_INTERNAL(trunc) -TLI_DEFINE_STRING_INTERNAL("trunc") -/// float truncf(float x); -TLI_DEFINE_ENUM_INTERNAL(truncf) -TLI_DEFINE_STRING_INTERNAL("truncf") -/// long double truncl(long double x); -TLI_DEFINE_ENUM_INTERNAL(truncl) -TLI_DEFINE_STRING_INTERNAL("truncl") -/// int uname(struct utsname *name); -TLI_DEFINE_ENUM_INTERNAL(uname) -TLI_DEFINE_STRING_INTERNAL("uname") -/// int ungetc(int c, FILE *stream); -TLI_DEFINE_ENUM_INTERNAL(ungetc) -TLI_DEFINE_STRING_INTERNAL("ungetc") -/// int unlink(const char *path); -TLI_DEFINE_ENUM_INTERNAL(unlink) -TLI_DEFINE_STRING_INTERNAL("unlink") -/// int unsetenv(const char *name); -TLI_DEFINE_ENUM_INTERNAL(unsetenv) -TLI_DEFINE_STRING_INTERNAL("unsetenv") -/// int utime(const char *path, const struct utimbuf *times); -TLI_DEFINE_ENUM_INTERNAL(utime) -TLI_DEFINE_STRING_INTERNAL("utime") -/// int utimes(const char *path, const struct timeval times[2]); -TLI_DEFINE_ENUM_INTERNAL(utimes) -TLI_DEFINE_STRING_INTERNAL("utimes") -/// void *valloc(size_t size); -TLI_DEFINE_ENUM_INTERNAL(valloc) -TLI_DEFINE_STRING_INTERNAL("valloc") -/// int vfprintf(FILE *stream, const char *format, va_list ap); -TLI_DEFINE_ENUM_INTERNAL(vfprintf) -TLI_DEFINE_STRING_INTERNAL("vfprintf") -/// int vfscanf(FILE *stream, const char *format, va_list arg); -TLI_DEFINE_ENUM_INTERNAL(vfscanf) -TLI_DEFINE_STRING_INTERNAL("vfscanf") -/// int vprintf(const char *restrict format, va_list ap); -TLI_DEFINE_ENUM_INTERNAL(vprintf) -TLI_DEFINE_STRING_INTERNAL("vprintf") -/// int vscanf(const char *format, va_list arg); -TLI_DEFINE_ENUM_INTERNAL(vscanf) -TLI_DEFINE_STRING_INTERNAL("vscanf") -/// int vsnprintf(char *s, size_t n, const char *format, va_list ap); -TLI_DEFINE_ENUM_INTERNAL(vsnprintf) -TLI_DEFINE_STRING_INTERNAL("vsnprintf") -/// int vsprintf(char *s, const char *format, va_list ap); -TLI_DEFINE_ENUM_INTERNAL(vsprintf) -TLI_DEFINE_STRING_INTERNAL("vsprintf") -/// int vsscanf(const char *s, const char *format, va_list arg); -TLI_DEFINE_ENUM_INTERNAL(vsscanf) -TLI_DEFINE_STRING_INTERNAL("vsscanf") -/// ssize_t write(int fildes, const void *buf, size_t nbyte); -TLI_DEFINE_ENUM_INTERNAL(write) -TLI_DEFINE_STRING_INTERNAL("write") - -#undef TLI_DEFINE_ENUM_INTERNAL -#undef TLI_DEFINE_STRING_INTERNAL -#endif // One of TLI_DEFINE_ENUM/STRING are defined. - -#undef TLI_DEFINE_ENUM -#undef TLI_DEFINE_STRING diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.h b/llvm/include/llvm/Analysis/TargetLibraryInfo.h deleted file mode 100644 index 7efa6f05..00000000 --- a/llvm/include/llvm/Analysis/TargetLibraryInfo.h +++ /dev/null @@ -1,339 +0,0 @@ -//===-- TargetLibraryInfo.h - Library information ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_TARGETLIBRARYINFO_H -#define LLVM_ANALYSIS_TARGETLIBRARYINFO_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/Triple.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" - -namespace llvm { -template class ArrayRef; - -/// Describes a possible vectorization of a function. -/// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized -/// by a factor 'VectorizationFactor'. -struct VecDesc { - const char *ScalarFnName; - const char *VectorFnName; - unsigned VectorizationFactor; -}; - - namespace LibFunc { - enum Func { -#define TLI_DEFINE_ENUM -#include "llvm/Analysis/TargetLibraryInfo.def" - - NumLibFuncs - }; - } - -/// Implementation of the target library information. -/// -/// This class constructs tables that hold the target library information and -/// make it available. However, it is somewhat expensive to compute and only -/// depends on the triple. So users typically interact with the \c -/// TargetLibraryInfo wrapper below. -class TargetLibraryInfoImpl { - friend class TargetLibraryInfo; - - unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4]; - llvm::DenseMap CustomNames; - static const char *const StandardNames[LibFunc::NumLibFuncs]; - - enum AvailabilityState { - StandardName = 3, // (memset to all ones) - CustomName = 1, - Unavailable = 0 // (memset to all zeros) - }; - void setState(LibFunc::Func F, AvailabilityState State) { - AvailableArray[F/4] &= ~(3 << 2*(F&3)); - AvailableArray[F/4] |= State << 2*(F&3); - } - AvailabilityState getState(LibFunc::Func F) const { - return static_cast((AvailableArray[F/4] >> 2*(F&3)) & 3); - } - - /// Vectorization descriptors - sorted by ScalarFnName. - std::vector VectorDescs; - /// Scalarization descriptors - same content as VectorDescs but sorted based - /// on VectorFnName rather than ScalarFnName. - std::vector ScalarDescs; - - /// Return true if the function type FTy is valid for the library function - /// F, regardless of whether the function is available. - bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc::Func F, - const DataLayout *DL) const; - -public: - /// List of known vector-functions libraries. - /// - /// The vector-functions library defines, which functions are vectorizable - /// and with which factor. The library can be specified by either frontend, - /// or a commandline option, and then used by - /// addVectorizableFunctionsFromVecLib for filling up the tables of - /// vectorizable functions. - enum VectorLibrary { - NoLibrary, // Don't use any vector library. - Accelerate // Use Accelerate framework. - }; - - TargetLibraryInfoImpl(); - explicit TargetLibraryInfoImpl(const Triple &T); - - // Provide value semantics. - TargetLibraryInfoImpl(const TargetLibraryInfoImpl &TLI); - TargetLibraryInfoImpl(TargetLibraryInfoImpl &&TLI); - TargetLibraryInfoImpl &operator=(const TargetLibraryInfoImpl &TLI); - TargetLibraryInfoImpl &operator=(TargetLibraryInfoImpl &&TLI); - - /// Searches for a particular function name. - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. - bool getLibFunc(StringRef funcName, LibFunc::Func &F) const; - - /// Searches for a particular function name, also checking that its type is - /// valid for the library function matching that name. - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. - bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const; - - /// Forces a function to be marked as unavailable. - void setUnavailable(LibFunc::Func F) { - setState(F, Unavailable); - } - - /// Forces a function to be marked as available. - void setAvailable(LibFunc::Func F) { - setState(F, StandardName); - } - - /// Forces a function to be marked as available and provide an alternate name - /// that must be used. - void setAvailableWithName(LibFunc::Func F, StringRef Name) { - if (StandardNames[F] != Name) { - setState(F, CustomName); - CustomNames[F] = Name; - assert(CustomNames.find(F) != CustomNames.end()); - } else { - setState(F, StandardName); - } - } - - /// Disables all builtins. - /// - /// This can be used for options like -fno-builtin. - void disableAllFunctions(); - - /// Add a set of scalar -> vector mappings, queryable via - /// getVectorizedFunction and getScalarizedFunction. - void addVectorizableFunctions(ArrayRef Fns); - - /// Calls addVectorizableFunctions with a known preset of functions for the - /// given vector library. - void addVectorizableFunctionsFromVecLib(enum VectorLibrary VecLib); - - /// Return true if the function F has a vector equivalent with vectorization - /// factor VF. - bool isFunctionVectorizable(StringRef F, unsigned VF) const { - return !getVectorizedFunction(F, VF).empty(); - } - - /// Return true if the function F has a vector equivalent with any - /// vectorization factor. - bool isFunctionVectorizable(StringRef F) const; - - /// Return the name of the equivalent of F, vectorized with factor VF. If no - /// such mapping exists, return the empty string. - StringRef getVectorizedFunction(StringRef F, unsigned VF) const; - - /// Return true if the function F has a scalar equivalent, and set VF to be - /// the vectorization factor. - bool isFunctionScalarizable(StringRef F, unsigned &VF) const { - return !getScalarizedFunction(F, VF).empty(); - } - - /// Return the name of the equivalent of F, scalarized. If no such mapping - /// exists, return the empty string. - /// - /// Set VF to the vectorization factor. - StringRef getScalarizedFunction(StringRef F, unsigned &VF) const; -}; - -/// Provides information about what library functions are available for -/// the current target. -/// -/// This both allows optimizations to handle them specially and frontends to -/// disable such optimizations through -fno-builtin etc. -class TargetLibraryInfo { - friend class TargetLibraryAnalysis; - friend class TargetLibraryInfoWrapperPass; - - const TargetLibraryInfoImpl *Impl; - -public: - explicit TargetLibraryInfo(const TargetLibraryInfoImpl &Impl) : Impl(&Impl) {} - - // Provide value semantics. - TargetLibraryInfo(const TargetLibraryInfo &TLI) : Impl(TLI.Impl) {} - TargetLibraryInfo(TargetLibraryInfo &&TLI) : Impl(TLI.Impl) {} - TargetLibraryInfo &operator=(const TargetLibraryInfo &TLI) { - Impl = TLI.Impl; - return *this; - } - TargetLibraryInfo &operator=(TargetLibraryInfo &&TLI) { - Impl = TLI.Impl; - return *this; - } - - /// Searches for a particular function name. - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. - bool getLibFunc(StringRef funcName, LibFunc::Func &F) const { - return Impl->getLibFunc(funcName, F); - } - - bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const { - return Impl->getLibFunc(FDecl, F); - } - - /// Tests whether a library function is available. - bool has(LibFunc::Func F) const { - return Impl->getState(F) != TargetLibraryInfoImpl::Unavailable; - } - bool isFunctionVectorizable(StringRef F, unsigned VF) const { - return Impl->isFunctionVectorizable(F, VF); - } - bool isFunctionVectorizable(StringRef F) const { - return Impl->isFunctionVectorizable(F); - } - StringRef getVectorizedFunction(StringRef F, unsigned VF) const { - return Impl->getVectorizedFunction(F, VF); - } - - /// Tests if the function is both available and a candidate for optimized code - /// generation. - bool hasOptimizedCodeGen(LibFunc::Func F) const { - if (Impl->getState(F) == TargetLibraryInfoImpl::Unavailable) - return false; - switch (F) { - default: break; - case LibFunc::copysign: case LibFunc::copysignf: case LibFunc::copysignl: - case LibFunc::fabs: case LibFunc::fabsf: case LibFunc::fabsl: - case LibFunc::sin: case LibFunc::sinf: case LibFunc::sinl: - case LibFunc::cos: case LibFunc::cosf: case LibFunc::cosl: - case LibFunc::sqrt: case LibFunc::sqrtf: case LibFunc::sqrtl: - case LibFunc::sqrt_finite: case LibFunc::sqrtf_finite: - case LibFunc::sqrtl_finite: - case LibFunc::fmax: case LibFunc::fmaxf: case LibFunc::fmaxl: - case LibFunc::fmin: case LibFunc::fminf: case LibFunc::fminl: - case LibFunc::floor: case LibFunc::floorf: case LibFunc::floorl: - case LibFunc::nearbyint: case LibFunc::nearbyintf: case LibFunc::nearbyintl: - case LibFunc::ceil: case LibFunc::ceilf: case LibFunc::ceill: - case LibFunc::rint: case LibFunc::rintf: case LibFunc::rintl: - case LibFunc::round: case LibFunc::roundf: case LibFunc::roundl: - case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl: - case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l: - case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l: - case LibFunc::memcmp: case LibFunc::strcmp: case LibFunc::strcpy: - case LibFunc::stpcpy: case LibFunc::strlen: case LibFunc::strnlen: - case LibFunc::memchr: - return true; - } - return false; - } - - StringRef getName(LibFunc::Func F) const { - auto State = Impl->getState(F); - if (State == TargetLibraryInfoImpl::Unavailable) - return StringRef(); - if (State == TargetLibraryInfoImpl::StandardName) - return Impl->StandardNames[F]; - assert(State == TargetLibraryInfoImpl::CustomName); - return Impl->CustomNames.find(F)->second; - } - - /// Handle invalidation from the pass manager. - /// - /// If we try to invalidate this info, just return false. It cannot become - /// invalid even if the module changes. - bool invalidate(Module &, const PreservedAnalyses &) { return false; } -}; - -/// Analysis pass providing the \c TargetLibraryInfo. -/// -/// Note that this pass's result cannot be invalidated, it is immutable for the -/// life of the module. -class TargetLibraryAnalysis : public AnalysisInfoMixin { -public: - typedef TargetLibraryInfo Result; - - /// Default construct the library analysis. - /// - /// This will use the module's triple to construct the library info for that - /// module. - TargetLibraryAnalysis() {} - - /// Construct a library analysis with preset info. - /// - /// This will directly copy the preset info into the result without - /// consulting the module's triple. - TargetLibraryAnalysis(TargetLibraryInfoImpl PresetInfoImpl) - : PresetInfoImpl(std::move(PresetInfoImpl)) {} - - // Move semantics. We spell out the constructors for MSVC. - TargetLibraryAnalysis(TargetLibraryAnalysis &&Arg) - : PresetInfoImpl(std::move(Arg.PresetInfoImpl)), Impls(std::move(Arg.Impls)) {} - TargetLibraryAnalysis &operator=(TargetLibraryAnalysis &&RHS) { - PresetInfoImpl = std::move(RHS.PresetInfoImpl); - Impls = std::move(RHS.Impls); - return *this; - } - - TargetLibraryInfo run(Module &M, ModuleAnalysisManager &); - TargetLibraryInfo run(Function &F, FunctionAnalysisManager &); - -private: - friend AnalysisInfoMixin; - static char PassID; - - Optional PresetInfoImpl; - - StringMap> Impls; - - TargetLibraryInfoImpl &lookupInfoImpl(const Triple &T); -}; - -class TargetLibraryInfoWrapperPass : public ImmutablePass { - TargetLibraryInfoImpl TLIImpl; - TargetLibraryInfo TLI; - - virtual void anchor(); - -public: - static char ID; - TargetLibraryInfoWrapperPass(); - explicit TargetLibraryInfoWrapperPass(const Triple &T); - explicit TargetLibraryInfoWrapperPass(const TargetLibraryInfoImpl &TLI); - - TargetLibraryInfo &getTLI() { return TLI; } - const TargetLibraryInfo &getTLI() const { return TLI; } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h deleted file mode 100644 index 7570d22a..00000000 --- a/llvm/include/llvm/Analysis/TargetTransformInfo.h +++ /dev/null @@ -1,1082 +0,0 @@ -//===- TargetTransformInfo.h ------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This pass exposes codegen information to IR-level passes. Every -/// transformation that uses codegen information is broken into three parts: -/// 1. The IR-level analysis pass. -/// 2. The IR-level transformation interface which provides the needed -/// information. -/// 3. Codegen-level implementation which uses target-specific hooks. -/// -/// This file defines #2, which is the interface that IR-level transformations -/// use for querying the codegen. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFO_H -#define LLVM_ANALYSIS_TARGETTRANSFORMINFO_H - -#include "llvm/ADT/Optional.h" -#include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/IR/Operator.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -class Function; -class GlobalValue; -class Loop; -class Type; -class User; -class Value; - -/// \brief Information about a load/store intrinsic defined by the target. -struct MemIntrinsicInfo { - MemIntrinsicInfo() - : ReadMem(false), WriteMem(false), IsSimple(false), MatchingId(0), - NumMemRefs(0), PtrVal(nullptr) {} - bool ReadMem; - bool WriteMem; - /// True only if this memory operation is non-volatile, non-atomic, and - /// unordered. (See LoadInst/StoreInst for details on each) - bool IsSimple; - // Same Id is set by the target for corresponding load/store intrinsics. - unsigned short MatchingId; - int NumMemRefs; - Value *PtrVal; -}; - -/// \brief This pass provides access to the codegen interfaces that are needed -/// for IR-level transformations. -class TargetTransformInfo { -public: - /// \brief Construct a TTI object using a type implementing the \c Concept - /// API below. - /// - /// This is used by targets to construct a TTI wrapping their target-specific - /// implementaion that encodes appropriate costs for their target. - template TargetTransformInfo(T Impl); - - /// \brief Construct a baseline TTI object using a minimal implementation of - /// the \c Concept API below. - /// - /// The TTI implementation will reflect the information in the DataLayout - /// provided if non-null. - explicit TargetTransformInfo(const DataLayout &DL); - - // Provide move semantics. - TargetTransformInfo(TargetTransformInfo &&Arg); - TargetTransformInfo &operator=(TargetTransformInfo &&RHS); - - // We need to define the destructor out-of-line to define our sub-classes - // out-of-line. - ~TargetTransformInfo(); - - /// \brief Handle the invalidation of this information. - /// - /// When used as a result of \c TargetIRAnalysis this method will be called - /// when the function this was computed for changes. When it returns false, - /// the information is preserved across those changes. - bool invalidate(Function &, const PreservedAnalyses &) { - // FIXME: We should probably in some way ensure that the subtarget - // information for a function hasn't changed. - return false; - } - - /// \name Generic Target Information - /// @{ - - /// \brief Underlying constants for 'cost' values in this interface. - /// - /// Many APIs in this interface return a cost. This enum defines the - /// fundamental values that should be used to interpret (and produce) those - /// costs. The costs are returned as an int rather than a member of this - /// enumeration because it is expected that the cost of one IR instruction - /// may have a multiplicative factor to it or otherwise won't fit directly - /// into the enum. Moreover, it is common to sum or average costs which works - /// better as simple integral values. Thus this enum only provides constants. - /// Also note that the returned costs are signed integers to make it natural - /// to add, subtract, and test with zero (a common boundary condition). It is - /// not expected that 2^32 is a realistic cost to be modeling at any point. - /// - /// Note that these costs should usually reflect the intersection of code-size - /// cost and execution cost. A free instruction is typically one that folds - /// into another instruction. For example, reg-to-reg moves can often be - /// skipped by renaming the registers in the CPU, but they still are encoded - /// and thus wouldn't be considered 'free' here. - enum TargetCostConstants { - TCC_Free = 0, ///< Expected to fold away in lowering. - TCC_Basic = 1, ///< The cost of a typical 'add' instruction. - TCC_Expensive = 4 ///< The cost of a 'div' instruction on x86. - }; - - /// \brief Estimate the cost of a specific operation when lowered. - /// - /// Note that this is designed to work on an arbitrary synthetic opcode, and - /// thus work for hypothetical queries before an instruction has even been - /// formed. However, this does *not* work for GEPs, and must not be called - /// for a GEP instruction. Instead, use the dedicated getGEPCost interface as - /// analyzing a GEP's cost required more information. - /// - /// Typically only the result type is required, and the operand type can be - /// omitted. However, if the opcode is one of the cast instructions, the - /// operand type is required. - /// - /// The returned cost is defined in terms of \c TargetCostConstants, see its - /// comments for a detailed explanation of the cost values. - int getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy = nullptr) const; - - /// \brief Estimate the cost of a GEP operation when lowered. - /// - /// The contract for this function is the same as \c getOperationCost except - /// that it supports an interface that provides extra information specific to - /// the GEP operation. - int getGEPCost(Type *PointeeType, const Value *Ptr, - ArrayRef Operands) const; - - /// \brief Estimate the cost of a function call when lowered. - /// - /// The contract for this is the same as \c getOperationCost except that it - /// supports an interface that provides extra information specific to call - /// instructions. - /// - /// This is the most basic query for estimating call cost: it only knows the - /// function type and (potentially) the number of arguments at the call site. - /// The latter is only interesting for varargs function types. - int getCallCost(FunctionType *FTy, int NumArgs = -1) const; - - /// \brief Estimate the cost of calling a specific function when lowered. - /// - /// This overload adds the ability to reason about the particular function - /// being called in the event it is a library call with special lowering. - int getCallCost(const Function *F, int NumArgs = -1) const; - - /// \brief Estimate the cost of calling a specific function when lowered. - /// - /// This overload allows specifying a set of candidate argument values. - int getCallCost(const Function *F, ArrayRef Arguments) const; - - /// \returns A value by which our inlining threshold should be multiplied. - /// This is primarily used to bump up the inlining threshold wholesale on - /// targets where calls are unusually expensive. - /// - /// TODO: This is a rather blunt instrument. Perhaps altering the costs of - /// individual classes of instructions would be better. - unsigned getInliningThresholdMultiplier() const; - - /// \brief Estimate the cost of an intrinsic when lowered. - /// - /// Mirrors the \c getCallCost method but uses an intrinsic identifier. - int getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef ParamTys) const; - - /// \brief Estimate the cost of an intrinsic when lowered. - /// - /// Mirrors the \c getCallCost method but uses an intrinsic identifier. - int getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef Arguments) const; - - /// \brief Estimate the cost of a given IR user when lowered. - /// - /// This can estimate the cost of either a ConstantExpr or Instruction when - /// lowered. It has two primary advantages over the \c getOperationCost and - /// \c getGEPCost above, and one significant disadvantage: it can only be - /// used when the IR construct has already been formed. - /// - /// The advantages are that it can inspect the SSA use graph to reason more - /// accurately about the cost. For example, all-constant-GEPs can often be - /// folded into a load or other instruction, but if they are used in some - /// other context they may not be folded. This routine can distinguish such - /// cases. - /// - /// The returned cost is defined in terms of \c TargetCostConstants, see its - /// comments for a detailed explanation of the cost values. - int getUserCost(const User *U) const; - - /// \brief Return true if branch divergence exists. - /// - /// Branch divergence has a significantly negative impact on GPU performance - /// when threads in the same wavefront take different paths due to conditional - /// branches. - bool hasBranchDivergence() const; - - /// \brief Returns whether V is a source of divergence. - /// - /// This function provides the target-dependent information for - /// the target-independent DivergenceAnalysis. DivergenceAnalysis first - /// builds the dependency graph, and then runs the reachability algorithm - /// starting with the sources of divergence. - bool isSourceOfDivergence(const Value *V) const; - - /// \brief Test whether calls to a function lower to actual program function - /// calls. - /// - /// The idea is to test whether the program is likely to require a 'call' - /// instruction or equivalent in order to call the given function. - /// - /// FIXME: It's not clear that this is a good or useful query API. Client's - /// should probably move to simpler cost metrics using the above. - /// Alternatively, we could split the cost interface into distinct code-size - /// and execution-speed costs. This would allow modelling the core of this - /// query more accurately as a call is a single small instruction, but - /// incurs significant execution cost. - bool isLoweredToCall(const Function *F) const; - - /// Parameters that control the generic loop unrolling transformation. - struct UnrollingPreferences { - /// The cost threshold for the unrolled loop. Should be relative to the - /// getUserCost values returned by this API, and the expectation is that - /// the unrolled loop's instructions when run through that interface should - /// not exceed this cost. However, this is only an estimate. Also, specific - /// loops may be unrolled even with a cost above this threshold if deemed - /// profitable. Set this to UINT_MAX to disable the loop body cost - /// restriction. - unsigned Threshold; - /// If complete unrolling will reduce the cost of the loop below its - /// expected dynamic cost while rolled by this percentage, apply a discount - /// (below) to its unrolled cost. - unsigned PercentDynamicCostSavedThreshold; - /// The discount applied to the unrolled cost when the *dynamic* cost - /// savings of unrolling exceed the \c PercentDynamicCostSavedThreshold. - unsigned DynamicCostSavingsDiscount; - /// The cost threshold for the unrolled loop when optimizing for size (set - /// to UINT_MAX to disable). - unsigned OptSizeThreshold; - /// The cost threshold for the unrolled loop, like Threshold, but used - /// for partial/runtime unrolling (set to UINT_MAX to disable). - unsigned PartialThreshold; - /// The cost threshold for the unrolled loop when optimizing for size, like - /// OptSizeThreshold, but used for partial/runtime unrolling (set to - /// UINT_MAX to disable). - unsigned PartialOptSizeThreshold; - /// A forced unrolling factor (the number of concatenated bodies of the - /// original loop in the unrolled loop body). When set to 0, the unrolling - /// transformation will select an unrolling factor based on the current cost - /// threshold and other factors. - unsigned Count; - // Set the maximum unrolling factor. The unrolling factor may be selected - // using the appropriate cost threshold, but may not exceed this number - // (set to UINT_MAX to disable). This does not apply in cases where the - // loop is being fully unrolled. - unsigned MaxCount; - /// Set the maximum unrolling factor for full unrolling. Like MaxCount, but - /// applies even if full unrolling is selected. This allows a target to fall - /// back to Partial unrolling if full unrolling is above FullUnrollMaxCount. - unsigned FullUnrollMaxCount; - /// Allow partial unrolling (unrolling of loops to expand the size of the - /// loop body, not only to eliminate small constant-trip-count loops). - bool Partial; - /// Allow runtime unrolling (unrolling of loops to expand the size of the - /// loop body even when the number of loop iterations is not known at - /// compile time). - bool Runtime; - /// Allow generation of a loop remainder (extra iterations after unroll). - bool AllowRemainder; - /// Allow emitting expensive instructions (such as divisions) when computing - /// the trip count of a loop for runtime unrolling. - bool AllowExpensiveTripCount; - /// Apply loop unroll on any kind of loop - /// (mainly to loops that fail runtime unrolling). - bool Force; - }; - - /// \brief Get target-customized preferences for the generic loop unrolling - /// transformation. The caller will initialize UP with the current - /// target-independent defaults. - void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) const; - - /// @} - - /// \name Scalar Target Information - /// @{ - - /// \brief Flags indicating the kind of support for population count. - /// - /// Compared to the SW implementation, HW support is supposed to - /// significantly boost the performance when the population is dense, and it - /// may or may not degrade performance if the population is sparse. A HW - /// support is considered as "Fast" if it can outperform, or is on a par - /// with, SW implementation when the population is sparse; otherwise, it is - /// considered as "Slow". - enum PopcntSupportKind { PSK_Software, PSK_SlowHardware, PSK_FastHardware }; - - /// \brief Return true if the specified immediate is legal add immediate, that - /// is the target has add instructions which can add a register with the - /// immediate without having to materialize the immediate into a register. - bool isLegalAddImmediate(int64_t Imm) const; - - /// \brief Return true if the specified immediate is legal icmp immediate, - /// that is the target has icmp instructions which can compare a register - /// against the immediate without having to materialize the immediate into a - /// register. - bool isLegalICmpImmediate(int64_t Imm) const; - - /// \brief Return true if the addressing mode represented by AM is legal for - /// this target, for a load/store of the specified type. - /// The type may be VoidTy, in which case only return true if the addressing - /// mode is legal for a load/store of any legal type. - /// TODO: Handle pre/postinc as well. - bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale, - unsigned AddrSpace = 0) const; - - /// \brief Return true if the target supports masked load/store - /// AVX2 and AVX-512 targets allow masks for consecutive load and store - bool isLegalMaskedStore(Type *DataType) const; - bool isLegalMaskedLoad(Type *DataType) const; - - /// \brief Return true if the target supports masked gather/scatter - /// AVX-512 fully supports gather and scatter for vectors with 32 and 64 - /// bits scalar type. - bool isLegalMaskedScatter(Type *DataType) const; - bool isLegalMaskedGather(Type *DataType) const; - - /// \brief Return the cost of the scaling factor used in the addressing - /// mode represented by AM for this target, for a load/store - /// of the specified type. - /// If the AM is supported, the return value must be >= 0. - /// If the AM is not supported, it returns a negative value. - /// TODO: Handle pre/postinc as well. - int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale, - unsigned AddrSpace = 0) const; - - /// \brief Return true if it's free to truncate a value of type Ty1 to type - /// Ty2. e.g. On x86 it's free to truncate a i32 value in register EAX to i16 - /// by referencing its sub-register AX. - bool isTruncateFree(Type *Ty1, Type *Ty2) const; - - /// \brief Return true if it is profitable to hoist instruction in the - /// then/else to before if. - bool isProfitableToHoist(Instruction *I) const; - - /// \brief Return true if this type is legal. - bool isTypeLegal(Type *Ty) const; - - /// \brief Returns the target's jmp_buf alignment in bytes. - unsigned getJumpBufAlignment() const; - - /// \brief Returns the target's jmp_buf size in bytes. - unsigned getJumpBufSize() const; - - /// \brief Return true if switches should be turned into lookup tables for the - /// target. - bool shouldBuildLookupTables() const; - - /// \brief Don't restrict interleaved unrolling to small loops. - bool enableAggressiveInterleaving(bool LoopHasReductions) const; - - /// \brief Enable matching of interleaved access groups. - bool enableInterleavedAccessVectorization() const; - - /// \brief Indicate that it is potentially unsafe to automatically vectorize - /// floating-point operations because the semantics of vector and scalar - /// floating-point semantics may differ. For example, ARM NEON v7 SIMD math - /// does not support IEEE-754 denormal numbers, while depending on the - /// platform, scalar floating-point math does. - /// This applies to floating-point math operations and calls, not memory - /// operations, shuffles, or casts. - bool isFPVectorizationPotentiallyUnsafe() const; - - /// \brief Determine if the target supports unaligned memory accesses. - bool allowsMisalignedMemoryAccesses(unsigned BitWidth, unsigned AddressSpace = 0, - unsigned Alignment = 1, - bool *Fast = nullptr) const; - - /// \brief Return hardware support for population count. - PopcntSupportKind getPopcntSupport(unsigned IntTyWidthInBit) const; - - /// \brief Return true if the hardware has a fast square-root instruction. - bool haveFastSqrt(Type *Ty) const; - - /// \brief Return the expected cost of supporting the floating point operation - /// of the specified type. - int getFPOpCost(Type *Ty) const; - - /// \brief Return the expected cost of materializing for the given integer - /// immediate of the specified type. - int getIntImmCost(const APInt &Imm, Type *Ty) const; - - /// \brief Return the expected cost of materialization for the given integer - /// immediate of the specified type for a given instruction. The cost can be - /// zero if the immediate can be folded into the specified instruction. - int getIntImmCost(unsigned Opc, unsigned Idx, const APInt &Imm, - Type *Ty) const; - int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, - Type *Ty) const; - - /// \brief Return the expected cost for the given integer when optimising - /// for size. This is different than the other integer immediate cost - /// functions in that it is subtarget agnostic. This is useful when you e.g. - /// target one ISA such as Aarch32 but smaller encodings could be possible - /// with another such as Thumb. This return value is used as a penalty when - /// the total costs for a constant is calculated (the bigger the cost, the - /// more beneficial constant hoisting is). - int getIntImmCodeSizeCost(unsigned Opc, unsigned Idx, const APInt &Imm, - Type *Ty) const; - /// @} - - /// \name Vector Target Information - /// @{ - - /// \brief The various kinds of shuffle patterns for vector queries. - enum ShuffleKind { - SK_Broadcast, ///< Broadcast element 0 to all other elements. - SK_Reverse, ///< Reverse the order of the vector. - SK_Alternate, ///< Choose alternate elements from vector. - SK_InsertSubvector, ///< InsertSubvector. Index indicates start offset. - SK_ExtractSubvector ///< ExtractSubvector Index indicates start offset. - }; - - /// \brief Additional information about an operand's possible values. - enum OperandValueKind { - OK_AnyValue, // Operand can have any value. - OK_UniformValue, // Operand is uniform (splat of a value). - OK_UniformConstantValue, // Operand is uniform constant. - OK_NonUniformConstantValue // Operand is a non uniform constant value. - }; - - /// \brief Additional properties of an operand's values. - enum OperandValueProperties { OP_None = 0, OP_PowerOf2 = 1 }; - - /// \return The number of scalar or vector registers that the target has. - /// If 'Vectors' is true, it returns the number of vector registers. If it is - /// set to false, it returns the number of scalar registers. - unsigned getNumberOfRegisters(bool Vector) const; - - /// \return The width of the largest scalar or vector register type. - unsigned getRegisterBitWidth(bool Vector) const; - - /// \return The bitwidth of the largest vector type that should be used to - /// load/store in the given address space. - unsigned getLoadStoreVecRegBitWidth(unsigned AddrSpace) const; - - /// \return The size of a cache line in bytes. - unsigned getCacheLineSize() const; - - /// \return How much before a load we should place the prefetch instruction. - /// This is currently measured in number of instructions. - unsigned getPrefetchDistance() const; - - /// \return Some HW prefetchers can handle accesses up to a certain constant - /// stride. This is the minimum stride in bytes where it makes sense to start - /// adding SW prefetches. The default is 1, i.e. prefetch with any stride. - unsigned getMinPrefetchStride() const; - - /// \return The maximum number of iterations to prefetch ahead. If the - /// required number of iterations is more than this number, no prefetching is - /// performed. - unsigned getMaxPrefetchIterationsAhead() const; - - /// \return The maximum interleave factor that any transform should try to - /// perform for this target. This number depends on the level of parallelism - /// and the number of execution units in the CPU. - unsigned getMaxInterleaveFactor(unsigned VF) const; - - /// \return The expected cost of arithmetic ops, such as mul, xor, fsub, etc. - int getArithmeticInstrCost( - unsigned Opcode, Type *Ty, OperandValueKind Opd1Info = OK_AnyValue, - OperandValueKind Opd2Info = OK_AnyValue, - OperandValueProperties Opd1PropInfo = OP_None, - OperandValueProperties Opd2PropInfo = OP_None) const; - - /// \return The cost of a shuffle instruction of kind Kind and of type Tp. - /// The index and subtype parameters are used by the subvector insertion and - /// extraction shuffle kinds. - int getShuffleCost(ShuffleKind Kind, Type *Tp, int Index = 0, - Type *SubTp = nullptr) const; - - /// \return The expected cost of cast instructions, such as bitcast, trunc, - /// zext, etc. - int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) const; - - /// \return The expected cost of a sign- or zero-extended vector extract. Use - /// -1 to indicate that there is no information about the index value. - int getExtractWithExtendCost(unsigned Opcode, Type *Dst, VectorType *VecTy, - unsigned Index = -1) const; - - /// \return The expected cost of control-flow related instructions such as - /// Phi, Ret, Br. - int getCFInstrCost(unsigned Opcode) const; - - /// \returns The expected cost of compare and select instructions. - int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, - Type *CondTy = nullptr) const; - - /// \return The expected cost of vector Insert and Extract. - /// Use -1 to indicate that there is no information on the index value. - int getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index = -1) const; - - /// \return The cost of Load and Store instructions. - int getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) const; - - /// \return The cost of masked Load and Store instructions. - int getMaskedMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) const; - - /// \return The cost of Gather or Scatter operation - /// \p Opcode - is a type of memory access Load or Store - /// \p DataTy - a vector type of the data to be loaded or stored - /// \p Ptr - pointer [or vector of pointers] - address[es] in memory - /// \p VariableMask - true when the memory access is predicated with a mask - /// that is not a compile-time constant - /// \p Alignment - alignment of single element - int getGatherScatterOpCost(unsigned Opcode, Type *DataTy, Value *Ptr, - bool VariableMask, unsigned Alignment) const; - - /// \return The cost of the interleaved memory operation. - /// \p Opcode is the memory operation code - /// \p VecTy is the vector type of the interleaved access. - /// \p Factor is the interleave factor - /// \p Indices is the indices for interleaved load members (as interleaved - /// load allows gaps) - /// \p Alignment is the alignment of the memory operation - /// \p AddressSpace is address space of the pointer. - int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, - ArrayRef Indices, unsigned Alignment, - unsigned AddressSpace) const; - - /// \brief Calculate the cost of performing a vector reduction. - /// - /// This is the cost of reducing the vector value of type \p Ty to a scalar - /// value using the operation denoted by \p Opcode. The form of the reduction - /// can either be a pairwise reduction or a reduction that splits the vector - /// at every reduction level. - /// - /// Pairwise: - /// (v0, v1, v2, v3) - /// ((v0+v1), (v2, v3), undef, undef) - /// Split: - /// (v0, v1, v2, v3) - /// ((v0+v2), (v1+v3), undef, undef) - int getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwiseForm) const; - - /// \returns The cost of Intrinsic instructions. Types analysis only. - int getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, - ArrayRef Tys, FastMathFlags FMF) const; - - /// \returns The cost of Intrinsic instructions. Analyses the real arguments. - int getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, - ArrayRef Args, FastMathFlags FMF) const; - - /// \returns The cost of Call instructions. - int getCallInstrCost(Function *F, Type *RetTy, ArrayRef Tys) const; - - /// \returns The number of pieces into which the provided type must be - /// split during legalization. Zero is returned when the answer is unknown. - unsigned getNumberOfParts(Type *Tp) const; - - /// \returns The cost of the address computation. For most targets this can be - /// merged into the instruction indexing mode. Some targets might want to - /// distinguish between address computation for memory operations on vector - /// types and scalar types. Such targets should override this function. - /// The 'IsComplex' parameter is a hint that the address computation is likely - /// to involve multiple instructions and as such unlikely to be merged into - /// the address indexing mode. - int getAddressComputationCost(Type *Ty, bool IsComplex = false) const; - - /// \returns The cost, if any, of keeping values of the given types alive - /// over a callsite. - /// - /// Some types may require the use of register classes that do not have - /// any callee-saved registers, so would require a spill and fill. - unsigned getCostOfKeepingLiveOverCall(ArrayRef Tys) const; - - /// \returns True if the intrinsic is a supported memory intrinsic. Info - /// will contain additional information - whether the intrinsic may write - /// or read to memory, volatility and the pointer. Info is undefined - /// if false is returned. - bool getTgtMemIntrinsic(IntrinsicInst *Inst, MemIntrinsicInfo &Info) const; - - /// \returns A value which is the result of the given memory intrinsic. New - /// instructions may be created to extract the result from the given intrinsic - /// memory operation. Returns nullptr if the target cannot create a result - /// from the given intrinsic. - Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst, - Type *ExpectedType) const; - - /// \returns True if the two functions have compatible attributes for inlining - /// purposes. - bool areInlineCompatible(const Function *Caller, - const Function *Callee) const; - - /// @} - -private: - /// \brief The abstract base class used to type erase specific TTI - /// implementations. - class Concept; - - /// \brief The template model for the base class which wraps a concrete - /// implementation in a type erased interface. - template class Model; - - std::unique_ptr TTIImpl; -}; - -class TargetTransformInfo::Concept { -public: - virtual ~Concept() = 0; - virtual const DataLayout &getDataLayout() const = 0; - virtual int getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) = 0; - virtual int getGEPCost(Type *PointeeType, const Value *Ptr, - ArrayRef Operands) = 0; - virtual int getCallCost(FunctionType *FTy, int NumArgs) = 0; - virtual int getCallCost(const Function *F, int NumArgs) = 0; - virtual int getCallCost(const Function *F, - ArrayRef Arguments) = 0; - virtual unsigned getInliningThresholdMultiplier() = 0; - virtual int getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef ParamTys) = 0; - virtual int getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef Arguments) = 0; - virtual int getUserCost(const User *U) = 0; - virtual bool hasBranchDivergence() = 0; - virtual bool isSourceOfDivergence(const Value *V) = 0; - virtual bool isLoweredToCall(const Function *F) = 0; - virtual void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) = 0; - virtual bool isLegalAddImmediate(int64_t Imm) = 0; - virtual bool isLegalICmpImmediate(int64_t Imm) = 0; - virtual bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, - int64_t BaseOffset, bool HasBaseReg, - int64_t Scale, - unsigned AddrSpace) = 0; - virtual bool isLegalMaskedStore(Type *DataType) = 0; - virtual bool isLegalMaskedLoad(Type *DataType) = 0; - virtual bool isLegalMaskedScatter(Type *DataType) = 0; - virtual bool isLegalMaskedGather(Type *DataType) = 0; - virtual int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, - int64_t BaseOffset, bool HasBaseReg, - int64_t Scale, unsigned AddrSpace) = 0; - virtual bool isTruncateFree(Type *Ty1, Type *Ty2) = 0; - virtual bool isProfitableToHoist(Instruction *I) = 0; - virtual bool isTypeLegal(Type *Ty) = 0; - virtual unsigned getJumpBufAlignment() = 0; - virtual unsigned getJumpBufSize() = 0; - virtual bool shouldBuildLookupTables() = 0; - virtual bool enableAggressiveInterleaving(bool LoopHasReductions) = 0; - virtual bool enableInterleavedAccessVectorization() = 0; - virtual bool isFPVectorizationPotentiallyUnsafe() = 0; - virtual bool allowsMisalignedMemoryAccesses(unsigned BitWidth, - unsigned AddressSpace, - unsigned Alignment, - bool *Fast) = 0; - virtual PopcntSupportKind getPopcntSupport(unsigned IntTyWidthInBit) = 0; - virtual bool haveFastSqrt(Type *Ty) = 0; - virtual int getFPOpCost(Type *Ty) = 0; - virtual int getIntImmCodeSizeCost(unsigned Opc, unsigned Idx, const APInt &Imm, - Type *Ty) = 0; - virtual int getIntImmCost(const APInt &Imm, Type *Ty) = 0; - virtual int getIntImmCost(unsigned Opc, unsigned Idx, const APInt &Imm, - Type *Ty) = 0; - virtual int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, - Type *Ty) = 0; - virtual unsigned getNumberOfRegisters(bool Vector) = 0; - virtual unsigned getRegisterBitWidth(bool Vector) = 0; - virtual unsigned getLoadStoreVecRegBitWidth(unsigned AddrSpace) = 0; - virtual unsigned getCacheLineSize() = 0; - virtual unsigned getPrefetchDistance() = 0; - virtual unsigned getMinPrefetchStride() = 0; - virtual unsigned getMaxPrefetchIterationsAhead() = 0; - virtual unsigned getMaxInterleaveFactor(unsigned VF) = 0; - virtual unsigned - getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind Opd1Info, - OperandValueKind Opd2Info, - OperandValueProperties Opd1PropInfo, - OperandValueProperties Opd2PropInfo) = 0; - virtual int getShuffleCost(ShuffleKind Kind, Type *Tp, int Index, - Type *SubTp) = 0; - virtual int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) = 0; - virtual int getExtractWithExtendCost(unsigned Opcode, Type *Dst, - VectorType *VecTy, unsigned Index) = 0; - virtual int getCFInstrCost(unsigned Opcode) = 0; - virtual int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, - Type *CondTy) = 0; - virtual int getVectorInstrCost(unsigned Opcode, Type *Val, - unsigned Index) = 0; - virtual int getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) = 0; - virtual int getMaskedMemoryOpCost(unsigned Opcode, Type *Src, - unsigned Alignment, - unsigned AddressSpace) = 0; - virtual int getGatherScatterOpCost(unsigned Opcode, Type *DataTy, - Value *Ptr, bool VariableMask, - unsigned Alignment) = 0; - virtual int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, - unsigned Factor, - ArrayRef Indices, - unsigned Alignment, - unsigned AddressSpace) = 0; - virtual int getReductionCost(unsigned Opcode, Type *Ty, - bool IsPairwiseForm) = 0; - virtual int getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, - ArrayRef Tys, - FastMathFlags FMF) = 0; - virtual int getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, - ArrayRef Args, - FastMathFlags FMF) = 0; - virtual int getCallInstrCost(Function *F, Type *RetTy, - ArrayRef Tys) = 0; - virtual unsigned getNumberOfParts(Type *Tp) = 0; - virtual int getAddressComputationCost(Type *Ty, bool IsComplex) = 0; - virtual unsigned getCostOfKeepingLiveOverCall(ArrayRef Tys) = 0; - virtual bool getTgtMemIntrinsic(IntrinsicInst *Inst, - MemIntrinsicInfo &Info) = 0; - virtual Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst, - Type *ExpectedType) = 0; - virtual bool areInlineCompatible(const Function *Caller, - const Function *Callee) const = 0; -}; - -template -class TargetTransformInfo::Model final : public TargetTransformInfo::Concept { - T Impl; - -public: - Model(T Impl) : Impl(std::move(Impl)) {} - ~Model() override {} - - const DataLayout &getDataLayout() const override { - return Impl.getDataLayout(); - } - - int getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) override { - return Impl.getOperationCost(Opcode, Ty, OpTy); - } - int getGEPCost(Type *PointeeType, const Value *Ptr, - ArrayRef Operands) override { - return Impl.getGEPCost(PointeeType, Ptr, Operands); - } - int getCallCost(FunctionType *FTy, int NumArgs) override { - return Impl.getCallCost(FTy, NumArgs); - } - int getCallCost(const Function *F, int NumArgs) override { - return Impl.getCallCost(F, NumArgs); - } - int getCallCost(const Function *F, - ArrayRef Arguments) override { - return Impl.getCallCost(F, Arguments); - } - unsigned getInliningThresholdMultiplier() override { - return Impl.getInliningThresholdMultiplier(); - } - int getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef ParamTys) override { - return Impl.getIntrinsicCost(IID, RetTy, ParamTys); - } - int getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef Arguments) override { - return Impl.getIntrinsicCost(IID, RetTy, Arguments); - } - int getUserCost(const User *U) override { return Impl.getUserCost(U); } - bool hasBranchDivergence() override { return Impl.hasBranchDivergence(); } - bool isSourceOfDivergence(const Value *V) override { - return Impl.isSourceOfDivergence(V); - } - bool isLoweredToCall(const Function *F) override { - return Impl.isLoweredToCall(F); - } - void getUnrollingPreferences(Loop *L, UnrollingPreferences &UP) override { - return Impl.getUnrollingPreferences(L, UP); - } - bool isLegalAddImmediate(int64_t Imm) override { - return Impl.isLegalAddImmediate(Imm); - } - bool isLegalICmpImmediate(int64_t Imm) override { - return Impl.isLegalICmpImmediate(Imm); - } - bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale, - unsigned AddrSpace) override { - return Impl.isLegalAddressingMode(Ty, BaseGV, BaseOffset, HasBaseReg, - Scale, AddrSpace); - } - bool isLegalMaskedStore(Type *DataType) override { - return Impl.isLegalMaskedStore(DataType); - } - bool isLegalMaskedLoad(Type *DataType) override { - return Impl.isLegalMaskedLoad(DataType); - } - bool isLegalMaskedScatter(Type *DataType) override { - return Impl.isLegalMaskedScatter(DataType); - } - bool isLegalMaskedGather(Type *DataType) override { - return Impl.isLegalMaskedGather(DataType); - } - int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale, - unsigned AddrSpace) override { - return Impl.getScalingFactorCost(Ty, BaseGV, BaseOffset, HasBaseReg, - Scale, AddrSpace); - } - bool isTruncateFree(Type *Ty1, Type *Ty2) override { - return Impl.isTruncateFree(Ty1, Ty2); - } - bool isProfitableToHoist(Instruction *I) override { - return Impl.isProfitableToHoist(I); - } - bool isTypeLegal(Type *Ty) override { return Impl.isTypeLegal(Ty); } - unsigned getJumpBufAlignment() override { return Impl.getJumpBufAlignment(); } - unsigned getJumpBufSize() override { return Impl.getJumpBufSize(); } - bool shouldBuildLookupTables() override { - return Impl.shouldBuildLookupTables(); - } - bool enableAggressiveInterleaving(bool LoopHasReductions) override { - return Impl.enableAggressiveInterleaving(LoopHasReductions); - } - bool enableInterleavedAccessVectorization() override { - return Impl.enableInterleavedAccessVectorization(); - } - bool isFPVectorizationPotentiallyUnsafe() override { - return Impl.isFPVectorizationPotentiallyUnsafe(); - } - bool allowsMisalignedMemoryAccesses(unsigned BitWidth, unsigned AddressSpace, - unsigned Alignment, bool *Fast) override { - return Impl.allowsMisalignedMemoryAccesses(BitWidth, AddressSpace, - Alignment, Fast); - } - PopcntSupportKind getPopcntSupport(unsigned IntTyWidthInBit) override { - return Impl.getPopcntSupport(IntTyWidthInBit); - } - bool haveFastSqrt(Type *Ty) override { return Impl.haveFastSqrt(Ty); } - - int getFPOpCost(Type *Ty) override { return Impl.getFPOpCost(Ty); } - - int getIntImmCodeSizeCost(unsigned Opc, unsigned Idx, const APInt &Imm, - Type *Ty) override { - return Impl.getIntImmCodeSizeCost(Opc, Idx, Imm, Ty); - } - int getIntImmCost(const APInt &Imm, Type *Ty) override { - return Impl.getIntImmCost(Imm, Ty); - } - int getIntImmCost(unsigned Opc, unsigned Idx, const APInt &Imm, - Type *Ty) override { - return Impl.getIntImmCost(Opc, Idx, Imm, Ty); - } - int getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, - Type *Ty) override { - return Impl.getIntImmCost(IID, Idx, Imm, Ty); - } - unsigned getNumberOfRegisters(bool Vector) override { - return Impl.getNumberOfRegisters(Vector); - } - unsigned getRegisterBitWidth(bool Vector) override { - return Impl.getRegisterBitWidth(Vector); - } - - unsigned getLoadStoreVecRegBitWidth(unsigned AddrSpace) override { - return Impl.getLoadStoreVecRegBitWidth(AddrSpace); - } - - unsigned getCacheLineSize() override { - return Impl.getCacheLineSize(); - } - unsigned getPrefetchDistance() override { return Impl.getPrefetchDistance(); } - unsigned getMinPrefetchStride() override { - return Impl.getMinPrefetchStride(); - } - unsigned getMaxPrefetchIterationsAhead() override { - return Impl.getMaxPrefetchIterationsAhead(); - } - unsigned getMaxInterleaveFactor(unsigned VF) override { - return Impl.getMaxInterleaveFactor(VF); - } - unsigned - getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind Opd1Info, - OperandValueKind Opd2Info, - OperandValueProperties Opd1PropInfo, - OperandValueProperties Opd2PropInfo) override { - return Impl.getArithmeticInstrCost(Opcode, Ty, Opd1Info, Opd2Info, - Opd1PropInfo, Opd2PropInfo); - } - int getShuffleCost(ShuffleKind Kind, Type *Tp, int Index, - Type *SubTp) override { - return Impl.getShuffleCost(Kind, Tp, Index, SubTp); - } - int getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) override { - return Impl.getCastInstrCost(Opcode, Dst, Src); - } - int getExtractWithExtendCost(unsigned Opcode, Type *Dst, VectorType *VecTy, - unsigned Index) override { - return Impl.getExtractWithExtendCost(Opcode, Dst, VecTy, Index); - } - int getCFInstrCost(unsigned Opcode) override { - return Impl.getCFInstrCost(Opcode); - } - int getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy) override { - return Impl.getCmpSelInstrCost(Opcode, ValTy, CondTy); - } - int getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) override { - return Impl.getVectorInstrCost(Opcode, Val, Index); - } - int getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) override { - return Impl.getMemoryOpCost(Opcode, Src, Alignment, AddressSpace); - } - int getMaskedMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) override { - return Impl.getMaskedMemoryOpCost(Opcode, Src, Alignment, AddressSpace); - } - int getGatherScatterOpCost(unsigned Opcode, Type *DataTy, - Value *Ptr, bool VariableMask, - unsigned Alignment) override { - return Impl.getGatherScatterOpCost(Opcode, DataTy, Ptr, VariableMask, - Alignment); - } - int getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, unsigned Factor, - ArrayRef Indices, unsigned Alignment, - unsigned AddressSpace) override { - return Impl.getInterleavedMemoryOpCost(Opcode, VecTy, Factor, Indices, - Alignment, AddressSpace); - } - int getReductionCost(unsigned Opcode, Type *Ty, - bool IsPairwiseForm) override { - return Impl.getReductionCost(Opcode, Ty, IsPairwiseForm); - } - int getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, ArrayRef Tys, - FastMathFlags FMF) override { - return Impl.getIntrinsicInstrCost(ID, RetTy, Tys, FMF); - } - int getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, - ArrayRef Args, - FastMathFlags FMF) override { - return Impl.getIntrinsicInstrCost(ID, RetTy, Args, FMF); - } - int getCallInstrCost(Function *F, Type *RetTy, - ArrayRef Tys) override { - return Impl.getCallInstrCost(F, RetTy, Tys); - } - unsigned getNumberOfParts(Type *Tp) override { - return Impl.getNumberOfParts(Tp); - } - int getAddressComputationCost(Type *Ty, bool IsComplex) override { - return Impl.getAddressComputationCost(Ty, IsComplex); - } - unsigned getCostOfKeepingLiveOverCall(ArrayRef Tys) override { - return Impl.getCostOfKeepingLiveOverCall(Tys); - } - bool getTgtMemIntrinsic(IntrinsicInst *Inst, - MemIntrinsicInfo &Info) override { - return Impl.getTgtMemIntrinsic(Inst, Info); - } - Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst, - Type *ExpectedType) override { - return Impl.getOrCreateResultFromMemIntrinsic(Inst, ExpectedType); - } - bool areInlineCompatible(const Function *Caller, - const Function *Callee) const override { - return Impl.areInlineCompatible(Caller, Callee); - } -}; - -template -TargetTransformInfo::TargetTransformInfo(T Impl) - : TTIImpl(new Model(Impl)) {} - -/// \brief Analysis pass providing the \c TargetTransformInfo. -/// -/// The core idea of the TargetIRAnalysis is to expose an interface through -/// which LLVM targets can analyze and provide information about the middle -/// end's target-independent IR. This supports use cases such as target-aware -/// cost modeling of IR constructs. -/// -/// This is a function analysis because much of the cost modeling for targets -/// is done in a subtarget specific way and LLVM supports compiling different -/// functions targeting different subtargets in order to support runtime -/// dispatch according to the observed subtarget. -class TargetIRAnalysis : public AnalysisInfoMixin { -public: - typedef TargetTransformInfo Result; - - /// \brief Default construct a target IR analysis. - /// - /// This will use the module's datalayout to construct a baseline - /// conservative TTI result. - TargetIRAnalysis(); - - /// \brief Construct an IR analysis pass around a target-provide callback. - /// - /// The callback will be called with a particular function for which the TTI - /// is needed and must return a TTI object for that function. - TargetIRAnalysis(std::function TTICallback); - - // Value semantics. We spell out the constructors for MSVC. - TargetIRAnalysis(const TargetIRAnalysis &Arg) - : TTICallback(Arg.TTICallback) {} - TargetIRAnalysis(TargetIRAnalysis &&Arg) - : TTICallback(std::move(Arg.TTICallback)) {} - TargetIRAnalysis &operator=(const TargetIRAnalysis &RHS) { - TTICallback = RHS.TTICallback; - return *this; - } - TargetIRAnalysis &operator=(TargetIRAnalysis &&RHS) { - TTICallback = std::move(RHS.TTICallback); - return *this; - } - - Result run(const Function &F, AnalysisManager &); - -private: - friend AnalysisInfoMixin; - static char PassID; - - /// \brief The callback used to produce a result. - /// - /// We use a completely opaque callback so that targets can provide whatever - /// mechanism they desire for constructing the TTI for a given function. - /// - /// FIXME: Should we really use std::function? It's relatively inefficient. - /// It might be possible to arrange for even stateful callbacks to outlive - /// the analysis and thus use a function_ref which would be lighter weight. - /// This may also be less error prone as the callback is likely to reference - /// the external TargetMachine, and that reference needs to never dangle. - std::function TTICallback; - - /// \brief Helper function used as the callback in the default constructor. - static Result getDefaultTTI(const Function &F); -}; - -/// \brief Wrapper pass for TargetTransformInfo. -/// -/// This pass can be constructed from a TTI object which it stores internally -/// and is queried by passes. -class TargetTransformInfoWrapperPass : public ImmutablePass { - TargetIRAnalysis TIRA; - Optional TTI; - - virtual void anchor(); - -public: - static char ID; - - /// \brief We must provide a default constructor for the pass but it should - /// never be used. - /// - /// Use the constructor below or call one of the creation routines. - TargetTransformInfoWrapperPass(); - - explicit TargetTransformInfoWrapperPass(TargetIRAnalysis TIRA); - - TargetTransformInfo &getTTI(const Function &F); -}; - -/// \brief Create an analysis pass wrapper around a TTI object. -/// -/// This analysis pass just holds the TTI instance and makes it available to -/// clients. -ImmutablePass *createTargetTransformInfoWrapperPass(TargetIRAnalysis TIRA); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h b/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h deleted file mode 100644 index a97624bc..00000000 --- a/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h +++ /dev/null @@ -1,541 +0,0 @@ -//===- TargetTransformInfoImpl.h --------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file provides helpers for the implementation of -/// a TargetTransformInfo-conforming class. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_TARGETTRANSFORMINFOIMPL_H -#define LLVM_ANALYSIS_TARGETTRANSFORMINFOIMPL_H - -#include "llvm/Analysis/TargetTransformInfo.h" -#include "llvm/IR/CallSite.h" -#include "llvm/IR/DataLayout.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/GetElementPtrTypeIterator.h" -#include "llvm/IR/Operator.h" -#include "llvm/IR/Type.h" -#include "llvm/Analysis/VectorUtils.h" - -namespace llvm { - -/// \brief Base class for use as a mix-in that aids implementing -/// a TargetTransformInfo-compatible class. -class TargetTransformInfoImplBase { -protected: - typedef TargetTransformInfo TTI; - - const DataLayout &DL; - - explicit TargetTransformInfoImplBase(const DataLayout &DL) : DL(DL) {} - -public: - // Provide value semantics. MSVC requires that we spell all of these out. - TargetTransformInfoImplBase(const TargetTransformInfoImplBase &Arg) - : DL(Arg.DL) {} - TargetTransformInfoImplBase(TargetTransformInfoImplBase &&Arg) : DL(Arg.DL) {} - - const DataLayout &getDataLayout() const { return DL; } - - unsigned getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) { - switch (Opcode) { - default: - // By default, just classify everything as 'basic'. - return TTI::TCC_Basic; - - case Instruction::GetElementPtr: - llvm_unreachable("Use getGEPCost for GEP operations!"); - - case Instruction::BitCast: - assert(OpTy && "Cast instructions must provide the operand type"); - if (Ty == OpTy || (Ty->isPointerTy() && OpTy->isPointerTy())) - // Identity and pointer-to-pointer casts are free. - return TTI::TCC_Free; - - // Otherwise, the default basic cost is used. - return TTI::TCC_Basic; - - case Instruction::FDiv: - case Instruction::FRem: - case Instruction::SDiv: - case Instruction::SRem: - case Instruction::UDiv: - case Instruction::URem: - return TTI::TCC_Expensive; - - case Instruction::IntToPtr: { - // An inttoptr cast is free so long as the input is a legal integer type - // which doesn't contain values outside the range of a pointer. - unsigned OpSize = OpTy->getScalarSizeInBits(); - if (DL.isLegalInteger(OpSize) && - OpSize <= DL.getPointerTypeSizeInBits(Ty)) - return TTI::TCC_Free; - - // Otherwise it's not a no-op. - return TTI::TCC_Basic; - } - case Instruction::PtrToInt: { - // A ptrtoint cast is free so long as the result is large enough to store - // the pointer, and a legal integer type. - unsigned DestSize = Ty->getScalarSizeInBits(); - if (DL.isLegalInteger(DestSize) && - DestSize >= DL.getPointerTypeSizeInBits(OpTy)) - return TTI::TCC_Free; - - // Otherwise it's not a no-op. - return TTI::TCC_Basic; - } - case Instruction::Trunc: - // trunc to a native type is free (assuming the target has compare and - // shift-right of the same width). - if (DL.isLegalInteger(DL.getTypeSizeInBits(Ty))) - return TTI::TCC_Free; - - return TTI::TCC_Basic; - } - } - - int getGEPCost(Type *PointeeType, const Value *Ptr, - ArrayRef Operands) { - // In the basic model, we just assume that all-constant GEPs will be folded - // into their uses via addressing modes. - for (unsigned Idx = 0, Size = Operands.size(); Idx != Size; ++Idx) - if (!isa(Operands[Idx])) - return TTI::TCC_Basic; - - return TTI::TCC_Free; - } - - unsigned getCallCost(FunctionType *FTy, int NumArgs) { - assert(FTy && "FunctionType must be provided to this routine."); - - // The target-independent implementation just measures the size of the - // function by approximating that each argument will take on average one - // instruction to prepare. - - if (NumArgs < 0) - // Set the argument number to the number of explicit arguments in the - // function. - NumArgs = FTy->getNumParams(); - - return TTI::TCC_Basic * (NumArgs + 1); - } - - unsigned getInliningThresholdMultiplier() { return 1; } - - unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef ParamTys) { - switch (IID) { - default: - // Intrinsics rarely (if ever) have normal argument setup constraints. - // Model them as having a basic instruction cost. - // FIXME: This is wrong for libc intrinsics. - return TTI::TCC_Basic; - - case Intrinsic::annotation: - case Intrinsic::assume: - case Intrinsic::dbg_declare: - case Intrinsic::dbg_value: - case Intrinsic::invariant_start: - case Intrinsic::invariant_end: - case Intrinsic::lifetime_start: - case Intrinsic::lifetime_end: - case Intrinsic::objectsize: - case Intrinsic::ptr_annotation: - case Intrinsic::var_annotation: - case Intrinsic::experimental_gc_result: - case Intrinsic::experimental_gc_relocate: - // These intrinsics don't actually represent code after lowering. - return TTI::TCC_Free; - } - } - - bool hasBranchDivergence() { return false; } - - bool isSourceOfDivergence(const Value *V) { return false; } - - bool isLoweredToCall(const Function *F) { - // FIXME: These should almost certainly not be handled here, and instead - // handled with the help of TLI or the target itself. This was largely - // ported from existing analysis heuristics here so that such refactorings - // can take place in the future. - - if (F->isIntrinsic()) - return false; - - if (F->hasLocalLinkage() || !F->hasName()) - return true; - - StringRef Name = F->getName(); - - // These will all likely lower to a single selection DAG node. - if (Name == "copysign" || Name == "copysignf" || Name == "copysignl" || - Name == "fabs" || Name == "fabsf" || Name == "fabsl" || Name == "sin" || - Name == "fmin" || Name == "fminf" || Name == "fminl" || - Name == "fmax" || Name == "fmaxf" || Name == "fmaxl" || - Name == "sinf" || Name == "sinl" || Name == "cos" || Name == "cosf" || - Name == "cosl" || Name == "sqrt" || Name == "sqrtf" || Name == "sqrtl") - return false; - - // These are all likely to be optimized into something smaller. - if (Name == "pow" || Name == "powf" || Name == "powl" || Name == "exp2" || - Name == "exp2l" || Name == "exp2f" || Name == "floor" || - Name == "floorf" || Name == "ceil" || Name == "round" || - Name == "ffs" || Name == "ffsl" || Name == "abs" || Name == "labs" || - Name == "llabs") - return false; - - return true; - } - - void getUnrollingPreferences(Loop *, TTI::UnrollingPreferences &) {} - - bool isLegalAddImmediate(int64_t Imm) { return false; } - - bool isLegalICmpImmediate(int64_t Imm) { return false; } - - bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale, - unsigned AddrSpace) { - // Guess that only reg and reg+reg addressing is allowed. This heuristic is - // taken from the implementation of LSR. - return !BaseGV && BaseOffset == 0 && (Scale == 0 || Scale == 1); - } - - bool isLegalMaskedStore(Type *DataType) { return false; } - - bool isLegalMaskedLoad(Type *DataType) { return false; } - - bool isLegalMaskedScatter(Type *DataType) { return false; } - - bool isLegalMaskedGather(Type *DataType) { return false; } - - int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale, unsigned AddrSpace) { - // Guess that all legal addressing mode are free. - if (isLegalAddressingMode(Ty, BaseGV, BaseOffset, HasBaseReg, - Scale, AddrSpace)) - return 0; - return -1; - } - - bool isTruncateFree(Type *Ty1, Type *Ty2) { return false; } - - bool isProfitableToHoist(Instruction *I) { return true; } - - bool isTypeLegal(Type *Ty) { return false; } - - unsigned getJumpBufAlignment() { return 0; } - - unsigned getJumpBufSize() { return 0; } - - bool shouldBuildLookupTables() { return true; } - - bool enableAggressiveInterleaving(bool LoopHasReductions) { return false; } - - bool enableInterleavedAccessVectorization() { return false; } - - bool isFPVectorizationPotentiallyUnsafe() { return false; } - - bool allowsMisalignedMemoryAccesses(unsigned BitWidth, - unsigned AddressSpace, - unsigned Alignment, - bool *Fast) { return false; } - - TTI::PopcntSupportKind getPopcntSupport(unsigned IntTyWidthInBit) { - return TTI::PSK_Software; - } - - bool haveFastSqrt(Type *Ty) { return false; } - - unsigned getFPOpCost(Type *Ty) { return TargetTransformInfo::TCC_Basic; } - - int getIntImmCodeSizeCost(unsigned Opcode, unsigned Idx, const APInt &Imm, - Type *Ty) { - return 0; - } - - unsigned getIntImmCost(const APInt &Imm, Type *Ty) { return TTI::TCC_Basic; } - - unsigned getIntImmCost(unsigned Opcode, unsigned Idx, const APInt &Imm, - Type *Ty) { - return TTI::TCC_Free; - } - - unsigned getIntImmCost(Intrinsic::ID IID, unsigned Idx, const APInt &Imm, - Type *Ty) { - return TTI::TCC_Free; - } - - unsigned getNumberOfRegisters(bool Vector) { return 8; } - - unsigned getRegisterBitWidth(bool Vector) { return 32; } - - unsigned getLoadStoreVecRegBitWidth(unsigned AddrSpace) { return 128; } - - unsigned getCacheLineSize() { return 0; } - - unsigned getPrefetchDistance() { return 0; } - - unsigned getMinPrefetchStride() { return 1; } - - unsigned getMaxPrefetchIterationsAhead() { return UINT_MAX; } - - unsigned getMaxInterleaveFactor(unsigned VF) { return 1; } - - unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, - TTI::OperandValueKind Opd1Info, - TTI::OperandValueKind Opd2Info, - TTI::OperandValueProperties Opd1PropInfo, - TTI::OperandValueProperties Opd2PropInfo) { - return 1; - } - - unsigned getShuffleCost(TTI::ShuffleKind Kind, Type *Ty, int Index, - Type *SubTp) { - return 1; - } - - unsigned getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) { return 1; } - - unsigned getExtractWithExtendCost(unsigned Opcode, Type *Dst, - VectorType *VecTy, unsigned Index) { - return 1; - } - - unsigned getCFInstrCost(unsigned Opcode) { return 1; } - - unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy) { - return 1; - } - - unsigned getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) { - return 1; - } - - unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) { - return 1; - } - - unsigned getMaskedMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) { - return 1; - } - - unsigned getGatherScatterOpCost(unsigned Opcode, Type *DataTy, Value *Ptr, - bool VariableMask, - unsigned Alignment) { - return 1; - } - - unsigned getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, - unsigned Factor, - ArrayRef Indices, - unsigned Alignment, - unsigned AddressSpace) { - return 1; - } - - unsigned getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, - ArrayRef Tys, FastMathFlags FMF) { - return 1; - } - unsigned getIntrinsicInstrCost(Intrinsic::ID ID, Type *RetTy, - ArrayRef Args, FastMathFlags FMF) { - return 1; - } - - unsigned getCallInstrCost(Function *F, Type *RetTy, ArrayRef Tys) { - return 1; - } - - unsigned getNumberOfParts(Type *Tp) { return 0; } - - unsigned getAddressComputationCost(Type *Tp, bool) { return 0; } - - unsigned getReductionCost(unsigned, Type *, bool) { return 1; } - - unsigned getCostOfKeepingLiveOverCall(ArrayRef Tys) { return 0; } - - bool getTgtMemIntrinsic(IntrinsicInst *Inst, MemIntrinsicInfo &Info) { - return false; - } - - Value *getOrCreateResultFromMemIntrinsic(IntrinsicInst *Inst, - Type *ExpectedType) { - return nullptr; - } - - bool areInlineCompatible(const Function *Caller, - const Function *Callee) const { - return (Caller->getFnAttribute("target-cpu") == - Callee->getFnAttribute("target-cpu")) && - (Caller->getFnAttribute("target-features") == - Callee->getFnAttribute("target-features")); - } -}; - -/// \brief CRTP base class for use as a mix-in that aids implementing -/// a TargetTransformInfo-compatible class. -template -class TargetTransformInfoImplCRTPBase : public TargetTransformInfoImplBase { -private: - typedef TargetTransformInfoImplBase BaseT; - -protected: - explicit TargetTransformInfoImplCRTPBase(const DataLayout &DL) : BaseT(DL) {} - -public: - // Provide value semantics. MSVC requires that we spell all of these out. - TargetTransformInfoImplCRTPBase(const TargetTransformInfoImplCRTPBase &Arg) - : BaseT(static_cast(Arg)) {} - TargetTransformInfoImplCRTPBase(TargetTransformInfoImplCRTPBase &&Arg) - : BaseT(std::move(static_cast(Arg))) {} - - using BaseT::getCallCost; - - unsigned getCallCost(const Function *F, int NumArgs) { - assert(F && "A concrete function must be provided to this routine."); - - if (NumArgs < 0) - // Set the argument number to the number of explicit arguments in the - // function. - NumArgs = F->arg_size(); - - if (Intrinsic::ID IID = F->getIntrinsicID()) { - FunctionType *FTy = F->getFunctionType(); - SmallVector ParamTys(FTy->param_begin(), FTy->param_end()); - return static_cast(this) - ->getIntrinsicCost(IID, FTy->getReturnType(), ParamTys); - } - - if (!static_cast(this)->isLoweredToCall(F)) - return TTI::TCC_Basic; // Give a basic cost if it will be lowered - // directly. - - return static_cast(this)->getCallCost(F->getFunctionType(), NumArgs); - } - - unsigned getCallCost(const Function *F, ArrayRef Arguments) { - // Simply delegate to generic handling of the call. - // FIXME: We should use instsimplify or something else to catch calls which - // will constant fold with these arguments. - return static_cast(this)->getCallCost(F, Arguments.size()); - } - - using BaseT::getGEPCost; - - int getGEPCost(Type *PointeeType, const Value *Ptr, - ArrayRef Operands) { - const GlobalValue *BaseGV = nullptr; - if (Ptr != nullptr) { - // TODO: will remove this when pointers have an opaque type. - assert(Ptr->getType()->getScalarType()->getPointerElementType() == - PointeeType && - "explicit pointee type doesn't match operand's pointee type"); - BaseGV = dyn_cast(Ptr->stripPointerCasts()); - } - bool HasBaseReg = (BaseGV == nullptr); - int64_t BaseOffset = 0; - int64_t Scale = 0; - - // Assumes the address space is 0 when Ptr is nullptr. - unsigned AS = - (Ptr == nullptr ? 0 : Ptr->getType()->getPointerAddressSpace()); - auto GTI = gep_type_begin(PointeeType, AS, Operands); - for (auto I = Operands.begin(); I != Operands.end(); ++I, ++GTI) { - // We assume that the cost of Scalar GEP with constant index and the - // cost of Vector GEP with splat constant index are the same. - const ConstantInt *ConstIdx = dyn_cast(*I); - if (!ConstIdx) - if (auto Splat = getSplatValue(*I)) - ConstIdx = dyn_cast(Splat); - if (isa(*GTI)) { - int64_t ElementSize = DL.getTypeAllocSize(GTI.getIndexedType()); - if (ConstIdx) - BaseOffset += ConstIdx->getSExtValue() * ElementSize; - else { - // Needs scale register. - if (Scale != 0) - // No addressing mode takes two scale registers. - return TTI::TCC_Basic; - Scale = ElementSize; - } - } else { - StructType *STy = cast(*GTI); - // For structures the index is always splat or scalar constant - assert(ConstIdx && "Unexpected GEP index"); - uint64_t Field = ConstIdx->getZExtValue(); - BaseOffset += DL.getStructLayout(STy)->getElementOffset(Field); - } - } - - if (static_cast(this)->isLegalAddressingMode( - PointerType::get(*GTI, AS), const_cast(BaseGV), - BaseOffset, HasBaseReg, Scale, AS)) { - return TTI::TCC_Free; - } - return TTI::TCC_Basic; - } - - using BaseT::getIntrinsicCost; - - unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef Arguments) { - // Delegate to the generic intrinsic handling code. This mostly provides an - // opportunity for targets to (for example) special case the cost of - // certain intrinsics based on constants used as arguments. - SmallVector ParamTys; - ParamTys.reserve(Arguments.size()); - for (unsigned Idx = 0, Size = Arguments.size(); Idx != Size; ++Idx) - ParamTys.push_back(Arguments[Idx]->getType()); - return static_cast(this)->getIntrinsicCost(IID, RetTy, ParamTys); - } - - unsigned getUserCost(const User *U) { - if (isa(U)) - return TTI::TCC_Free; // Model all PHI nodes as free. - - if (const GEPOperator *GEP = dyn_cast(U)) { - SmallVector Indices(GEP->idx_begin(), GEP->idx_end()); - return static_cast(this)->getGEPCost( - GEP->getSourceElementType(), GEP->getPointerOperand(), Indices); - } - - if (auto CS = ImmutableCallSite(U)) { - const Function *F = CS.getCalledFunction(); - if (!F) { - // Just use the called value type. - Type *FTy = CS.getCalledValue()->getType()->getPointerElementType(); - return static_cast(this) - ->getCallCost(cast(FTy), CS.arg_size()); - } - - SmallVector Arguments(CS.arg_begin(), CS.arg_end()); - return static_cast(this)->getCallCost(F, Arguments); - } - - if (const CastInst *CI = dyn_cast(U)) { - // Result of a cmp instruction is often extended (to be used by other - // cmp instructions, logical or return instructions). These are usually - // nop on most sane targets. - if (isa(CI->getOperand(0))) - return TTI::TCC_Free; - } - - return static_cast(this)->getOperationCost( - Operator::getOpcode(U), U->getType(), - U->getNumOperands() == 1 ? U->getOperand(0)->getType() : nullptr); - } -}; -} - -#endif diff --git a/llvm/include/llvm/Analysis/Trace.h b/llvm/include/llvm/Analysis/Trace.h deleted file mode 100644 index bedd654c..00000000 --- a/llvm/include/llvm/Analysis/Trace.h +++ /dev/null @@ -1,119 +0,0 @@ -//===- llvm/Analysis/Trace.h - Represent one trace of LLVM code -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This class represents a single trace of LLVM basic blocks. A trace is a -// single entry, multiple exit, region of code that is often hot. Trace-based -// optimizations treat traces almost like they are a large, strange, basic -// block: because the trace path is assumed to be hot, optimizations for the -// fall-through path are made at the expense of the non-fall-through paths. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_TRACE_H -#define LLVM_ANALYSIS_TRACE_H - -#include -#include - -namespace llvm { - class BasicBlock; - class Function; - class Module; - class raw_ostream; - -class Trace { - typedef std::vector BasicBlockListType; - BasicBlockListType BasicBlocks; - -public: - /// Trace ctor - Make a new trace from a vector of basic blocks, - /// residing in the function which is the parent of the first - /// basic block in the vector. - /// - Trace(const std::vector &vBB) : BasicBlocks (vBB) {} - - /// getEntryBasicBlock - Return the entry basic block (first block) - /// of the trace. - /// - BasicBlock *getEntryBasicBlock () const { return BasicBlocks[0]; } - - /// operator[]/getBlock - Return basic block N in the trace. - /// - BasicBlock *operator[](unsigned i) const { return BasicBlocks[i]; } - BasicBlock *getBlock(unsigned i) const { return BasicBlocks[i]; } - - /// getFunction - Return this trace's parent function. - /// - Function *getFunction () const; - - /// getModule - Return this Module that contains this trace's parent - /// function. - /// - Module *getModule () const; - - /// getBlockIndex - Return the index of the specified basic block in the - /// trace, or -1 if it is not in the trace. - int getBlockIndex(const BasicBlock *X) const { - for (unsigned i = 0, e = BasicBlocks.size(); i != e; ++i) - if (BasicBlocks[i] == X) - return i; - return -1; - } - - /// contains - Returns true if this trace contains the given basic - /// block. - /// - bool contains(const BasicBlock *X) const { - return getBlockIndex(X) != -1; - } - - /// Returns true if B1 occurs before B2 in the trace, or if it is the same - /// block as B2.. Both blocks must be in the trace. - /// - bool dominates(const BasicBlock *B1, const BasicBlock *B2) const { - int B1Idx = getBlockIndex(B1), B2Idx = getBlockIndex(B2); - assert(B1Idx != -1 && B2Idx != -1 && "Block is not in the trace!"); - return B1Idx <= B2Idx; - } - - // BasicBlock iterators... - typedef BasicBlockListType::iterator iterator; - typedef BasicBlockListType::const_iterator const_iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - - iterator begin() { return BasicBlocks.begin(); } - const_iterator begin() const { return BasicBlocks.begin(); } - iterator end () { return BasicBlocks.end(); } - const_iterator end () const { return BasicBlocks.end(); } - - reverse_iterator rbegin() { return BasicBlocks.rbegin(); } - const_reverse_iterator rbegin() const { return BasicBlocks.rbegin(); } - reverse_iterator rend () { return BasicBlocks.rend(); } - const_reverse_iterator rend () const { return BasicBlocks.rend(); } - - unsigned size() const { return BasicBlocks.size(); } - bool empty() const { return BasicBlocks.empty(); } - - iterator erase(iterator q) { return BasicBlocks.erase (q); } - iterator erase(iterator q1, iterator q2) { return BasicBlocks.erase (q1, q2); } - - /// print - Write trace to output stream. - /// - void print(raw_ostream &O) const; - - /// dump - Debugger convenience method; writes trace to standard error - /// output stream. - /// - void dump() const; -}; - -} // end namespace llvm - -#endif // LLVM_ANALYSIS_TRACE_H diff --git a/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h b/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h deleted file mode 100644 index 229b0f97..00000000 --- a/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h +++ /dev/null @@ -1,86 +0,0 @@ -//===- TypeBasedAliasAnalysis.h - Type-Based Alias Analysis -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This is the interface for a metadata-based TBAA. See the source file for -/// details on the algorithm. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_TYPEBASEDALIASANALYSIS_H -#define LLVM_ANALYSIS_TYPEBASEDALIASANALYSIS_H - -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Metadata.h" -#include "llvm/Pass.h" - -namespace llvm { - -/// A simple AA result that uses TBAA metadata to answer queries. -class TypeBasedAAResult : public AAResultBase { - friend AAResultBase; - -public: - explicit TypeBasedAAResult() {} - TypeBasedAAResult(TypeBasedAAResult &&Arg) : AAResultBase(std::move(Arg)) {} - - /// Handle invalidation events from the new pass manager. - /// - /// By definition, this result is stateless and so remains valid. - bool invalidate(Function &, const PreservedAnalyses &) { return false; } - - AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB); - bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal); - FunctionModRefBehavior getModRefBehavior(ImmutableCallSite CS); - FunctionModRefBehavior getModRefBehavior(const Function *F); - ModRefInfo getModRefInfo(ImmutableCallSite CS, const MemoryLocation &Loc); - ModRefInfo getModRefInfo(ImmutableCallSite CS1, ImmutableCallSite CS2); - -private: - bool Aliases(const MDNode *A, const MDNode *B) const; - bool PathAliases(const MDNode *A, const MDNode *B) const; -}; - -/// Analysis pass providing a never-invalidated alias analysis result. -class TypeBasedAA : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - typedef TypeBasedAAResult Result; - - TypeBasedAAResult run(Function &F, AnalysisManager &AM); -}; - -/// Legacy wrapper pass to provide the TypeBasedAAResult object. -class TypeBasedAAWrapperPass : public ImmutablePass { - std::unique_ptr Result; - -public: - static char ID; - - TypeBasedAAWrapperPass(); - - TypeBasedAAResult &getResult() { return *Result; } - const TypeBasedAAResult &getResult() const { return *Result; } - - bool doInitialization(Module &M) override; - bool doFinalization(Module &M) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -//===--------------------------------------------------------------------===// -// -// createTypeBasedAAWrapperPass - This pass implements metadata-based -// type-based alias analysis. -// -ImmutablePass *createTypeBasedAAWrapperPass(); -} - -#endif diff --git a/llvm/include/llvm/Analysis/TypeMetadataUtils.h b/llvm/include/llvm/Analysis/TypeMetadataUtils.h deleted file mode 100644 index c3f688f5..00000000 --- a/llvm/include/llvm/Analysis/TypeMetadataUtils.h +++ /dev/null @@ -1,45 +0,0 @@ -//===- TypeMetadataUtils.h - Utilities related to type metadata --*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains functions that make it easier to manipulate type metadata -// for devirtualization. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_TYPEMETADATAUTILS_H -#define LLVM_ANALYSIS_TYPEMETADATAUTILS_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/CallSite.h" - -namespace llvm { - -/// A call site that could be devirtualized. -struct DevirtCallSite { - /// The offset from the address point to the virtual function. - uint64_t Offset; - /// The call site itself. - CallSite CS; -}; - -/// Given a call to the intrinsic @llvm.type.test, find all devirtualizable -/// call sites based on the call and return them in DevirtCalls. -void findDevirtualizableCallsForTypeTest( - SmallVectorImpl &DevirtCalls, - SmallVectorImpl &Assumes, CallInst *CI); - -/// Given a call to the intrinsic @llvm.type.checked.load, find all -/// devirtualizable call sites based on the call and return them in DevirtCalls. -void findDevirtualizableCallsForTypeCheckedLoad( - SmallVectorImpl &DevirtCalls, - SmallVectorImpl &LoadedPtrs, - SmallVectorImpl &Preds, bool &HasNonCallUses, CallInst *CI); -} - -#endif diff --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h deleted file mode 100644 index 2c6221d4..00000000 --- a/llvm/include/llvm/Analysis/ValueTracking.h +++ /dev/null @@ -1,470 +0,0 @@ -//===- llvm/Analysis/ValueTracking.h - Walk computations --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains routines that help analyze properties that chains of -// computations have. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ANALYSIS_VALUETRACKING_H -#define LLVM_ANALYSIS_VALUETRACKING_H - -#include "llvm/IR/CallSite.h" -#include "llvm/IR/ConstantRange.h" -#include "llvm/IR/Instruction.h" -#include "llvm/IR/IntrinsicInst.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { -template class ArrayRef; - class APInt; - class AddOperator; - class AssumptionCache; - class DataLayout; - class DominatorTree; - class GEPOperator; - class Instruction; - class Loop; - class LoopInfo; - class MDNode; - class StringRef; - class TargetLibraryInfo; - class Value; - - namespace Intrinsic { - enum ID : unsigned; - } - - /// Determine which bits of V are known to be either zero or one and return - /// them in the KnownZero/KnownOne bit sets. - /// - /// This function is defined on values with integer type, values with pointer - /// type, and vectors of integers. In the case - /// where V is a vector, the known zero and known one values are the - /// same width as the vector element, and the bit is set only if it is true - /// for all of the elements in the vector. - void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne, - const DataLayout &DL, unsigned Depth = 0, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - /// Compute known bits from the range metadata. - /// \p KnownZero the set of bits that are known to be zero - /// \p KnownOne the set of bits that are known to be one - void computeKnownBitsFromRangeMetadata(const MDNode &Ranges, - APInt &KnownZero, APInt &KnownOne); - /// Return true if LHS and RHS have no common bits set. - bool haveNoCommonBitsSet(Value *LHS, Value *RHS, const DataLayout &DL, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Determine whether the sign bit is known to be zero or one. Convenience - /// wrapper around computeKnownBits. - void ComputeSignBit(Value *V, bool &KnownZero, bool &KnownOne, - const DataLayout &DL, unsigned Depth = 0, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Return true if the given value is known to have exactly one bit set when - /// defined. For vectors return true if every element is known to be a power - /// of two when defined. Supports values with integer or pointer type and - /// vectors of integers. If 'OrZero' is set, then return true if the given - /// value is either a power of two or zero. - bool isKnownToBeAPowerOfTwo(Value *V, const DataLayout &DL, - bool OrZero = false, unsigned Depth = 0, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Return true if the given value is known to be non-zero when defined. For - /// vectors, return true if every element is known to be non-zero when - /// defined. Supports values with integer or pointer type and vectors of - /// integers. - bool isKnownNonZero(Value *V, const DataLayout &DL, unsigned Depth = 0, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Returns true if the give value is known to be non-negative. - bool isKnownNonNegative(Value *V, const DataLayout &DL, unsigned Depth = 0, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Returns true if the given value is known be positive (i.e. non-negative - /// and non-zero). - bool isKnownPositive(Value *V, const DataLayout &DL, unsigned Depth = 0, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Returns true if the given value is known be negative (i.e. non-positive - /// and non-zero). - bool isKnownNegative(Value *V, const DataLayout &DL, unsigned Depth = 0, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Return true if the given values are known to be non-equal when defined. - /// Supports scalar integer types only. - bool isKnownNonEqual(Value *V1, Value *V2, const DataLayout &DL, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Return true if 'V & Mask' is known to be zero. We use this predicate to - /// simplify operations downstream. Mask is known to be zero for bits that V - /// cannot have. - /// - /// This function is defined on values with integer type, values with pointer - /// type, and vectors of integers. In the case - /// where V is a vector, the mask, known zero, and known one values are the - /// same width as the vector element, and the bit is set only if it is true - /// for all of the elements in the vector. - bool MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL, - unsigned Depth = 0, AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Return the number of times the sign bit of the register is replicated into - /// the other bits. We know that at least 1 bit is always equal to the sign - /// bit (itself), but other cases can give us information. For example, - /// immediately after an "ashr X, 2", we know that the top 3 bits are all - /// equal to each other, so we return 3. For vectors, return the number of - /// sign bits for the vector element with the mininum number of known sign - /// bits. - unsigned ComputeNumSignBits(Value *Op, const DataLayout &DL, - unsigned Depth = 0, AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// This function computes the integer multiple of Base that equals V. If - /// successful, it returns true and returns the multiple in Multiple. If - /// unsuccessful, it returns false. Also, if V can be simplified to an - /// integer, then the simplified V is returned in Val. Look through sext only - /// if LookThroughSExt=true. - bool ComputeMultiple(Value *V, unsigned Base, Value *&Multiple, - bool LookThroughSExt = false, - unsigned Depth = 0); - - /// Map a call instruction to an intrinsic ID. Libcalls which have equivalent - /// intrinsics are treated as-if they were intrinsics. - Intrinsic::ID getIntrinsicForCallSite(ImmutableCallSite ICS, - const TargetLibraryInfo *TLI); - - /// Return true if we can prove that the specified FP value is never equal to - /// -0.0. - bool CannotBeNegativeZero(const Value *V, const TargetLibraryInfo *TLI, - unsigned Depth = 0); - - /// Return true if we can prove that the specified FP value is either a NaN or - /// never less than 0.0. - bool CannotBeOrderedLessThanZero(const Value *V, const TargetLibraryInfo *TLI, - unsigned Depth = 0); - - /// If the specified value can be set by repeating the same byte in memory, - /// return the i8 value that it is represented with. This is true for all i8 - /// values obviously, but is also true for i32 0, i32 -1, i16 0xF0F0, double - /// 0.0 etc. If the value can't be handled with a repeated byte store (e.g. - /// i16 0x1234), return null. - Value *isBytewiseValue(Value *V); - - /// Given an aggregrate and an sequence of indices, see if the scalar value - /// indexed is already around as a register, for example if it were inserted - /// directly into the aggregrate. - /// - /// If InsertBefore is not null, this function will duplicate (modified) - /// insertvalues when a part of a nested struct is extracted. - Value *FindInsertedValue(Value *V, - ArrayRef idx_range, - Instruction *InsertBefore = nullptr); - - /// Analyze the specified pointer to see if it can be expressed as a base - /// pointer plus a constant offset. Return the base and offset to the caller. - Value *GetPointerBaseWithConstantOffset(Value *Ptr, int64_t &Offset, - const DataLayout &DL); - static inline const Value * - GetPointerBaseWithConstantOffset(const Value *Ptr, int64_t &Offset, - const DataLayout &DL) { - return GetPointerBaseWithConstantOffset(const_cast(Ptr), Offset, - DL); - } - - /// Returns true if the GEP is based on a pointer to a string (array of i8), - /// and is indexing into this string. - bool isGEPBasedOnPointerToString(const GEPOperator *GEP); - - /// This function computes the length of a null-terminated C string pointed to - /// by V. If successful, it returns true and returns the string in Str. If - /// unsuccessful, it returns false. This does not include the trailing null - /// character by default. If TrimAtNul is set to false, then this returns any - /// trailing null characters as well as any other characters that come after - /// it. - bool getConstantStringInfo(const Value *V, StringRef &Str, - uint64_t Offset = 0, bool TrimAtNul = true); - - /// If we can compute the length of the string pointed to by the specified - /// pointer, return 'len+1'. If we can't, return 0. - uint64_t GetStringLength(Value *V); - - /// This method strips off any GEP address adjustments and pointer casts from - /// the specified value, returning the original object being addressed. Note - /// that the returned value has pointer type if the specified value does. If - /// the MaxLookup value is non-zero, it limits the number of instructions to - /// be stripped off. - Value *GetUnderlyingObject(Value *V, const DataLayout &DL, - unsigned MaxLookup = 6); - static inline const Value *GetUnderlyingObject(const Value *V, - const DataLayout &DL, - unsigned MaxLookup = 6) { - return GetUnderlyingObject(const_cast(V), DL, MaxLookup); - } - - /// \brief This method is similar to GetUnderlyingObject except that it can - /// look through phi and select instructions and return multiple objects. - /// - /// If LoopInfo is passed, loop phis are further analyzed. If a pointer - /// accesses different objects in each iteration, we don't look through the - /// phi node. E.g. consider this loop nest: - /// - /// int **A; - /// for (i) - /// for (j) { - /// A[i][j] = A[i-1][j] * B[j] - /// } - /// - /// This is transformed by Load-PRE to stash away A[i] for the next iteration - /// of the outer loop: - /// - /// Curr = A[0]; // Prev_0 - /// for (i: 1..N) { - /// Prev = Curr; // Prev = PHI (Prev_0, Curr) - /// Curr = A[i]; - /// for (j: 0..N) { - /// Curr[j] = Prev[j] * B[j] - /// } - /// } - /// - /// Since A[i] and A[i-1] are independent pointers, getUnderlyingObjects - /// should not assume that Curr and Prev share the same underlying object thus - /// it shouldn't look through the phi above. - void GetUnderlyingObjects(Value *V, SmallVectorImpl &Objects, - const DataLayout &DL, LoopInfo *LI = nullptr, - unsigned MaxLookup = 6); - - /// Return true if the only users of this pointer are lifetime markers. - bool onlyUsedByLifetimeMarkers(const Value *V); - - /// Return true if the instruction does not have any effects besides - /// calculating the result and does not have undefined behavior. - /// - /// This method never returns true for an instruction that returns true for - /// mayHaveSideEffects; however, this method also does some other checks in - /// addition. It checks for undefined behavior, like dividing by zero or - /// loading from an invalid pointer (but not for undefined results, like a - /// shift with a shift amount larger than the width of the result). It checks - /// for malloc and alloca because speculatively executing them might cause a - /// memory leak. It also returns false for instructions related to control - /// flow, specifically terminators and PHI nodes. - /// - /// If the CtxI is specified this method performs context-sensitive analysis - /// and returns true if it is safe to execute the instruction immediately - /// before the CtxI. - /// - /// If the CtxI is NOT specified this method only looks at the instruction - /// itself and its operands, so if this method returns true, it is safe to - /// move the instruction as long as the correct dominance relationships for - /// the operands and users hold. - /// - /// This method can return true for instructions that read memory; - /// for such instructions, moving them may change the resulting value. - bool isSafeToSpeculativelyExecute(const Value *V, - const Instruction *CtxI = nullptr, - const DominatorTree *DT = nullptr); - - /// Returns true if the result or effects of the given instructions \p I - /// depend on or influence global memory. - /// Memory dependence arises for example if the instruction reads from - /// memory or may produce effects or undefined behaviour. Memory dependent - /// instructions generally cannot be reorderd with respect to other memory - /// dependent instructions or moved into non-dominated basic blocks. - /// Instructions which just compute a value based on the values of their - /// operands are not memory dependent. - bool mayBeMemoryDependent(const Instruction &I); - - /// Return true if this pointer couldn't possibly be null by its definition. - /// This returns true for allocas, non-extern-weak globals, and byval - /// arguments. - bool isKnownNonNull(const Value *V); - - /// Return true if this pointer couldn't possibly be null. If the context - /// instruction is specified, perform context-sensitive analysis and return - /// true if the pointer couldn't possibly be null at the specified - /// instruction. - bool isKnownNonNullAt(const Value *V, - const Instruction *CtxI = nullptr, - const DominatorTree *DT = nullptr); - - /// Return true if it is valid to use the assumptions provided by an - /// assume intrinsic, I, at the point in the control-flow identified by the - /// context instruction, CxtI. - bool isValidAssumeForContext(const Instruction *I, const Instruction *CxtI, - const DominatorTree *DT = nullptr); - - enum class OverflowResult { AlwaysOverflows, MayOverflow, NeverOverflows }; - OverflowResult computeOverflowForUnsignedMul(Value *LHS, Value *RHS, - const DataLayout &DL, - AssumptionCache *AC, - const Instruction *CxtI, - const DominatorTree *DT); - OverflowResult computeOverflowForUnsignedAdd(Value *LHS, Value *RHS, - const DataLayout &DL, - AssumptionCache *AC, - const Instruction *CxtI, - const DominatorTree *DT); - OverflowResult computeOverflowForSignedAdd(Value *LHS, Value *RHS, - const DataLayout &DL, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - /// This version also leverages the sign bit of Add if known. - OverflowResult computeOverflowForSignedAdd(AddOperator *Add, - const DataLayout &DL, - AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); - - /// Returns true if the arithmetic part of the \p II 's result is - /// used only along the paths control dependent on the computation - /// not overflowing, \p II being an .with.overflow intrinsic. - bool isOverflowIntrinsicNoWrap(IntrinsicInst *II, DominatorTree &DT); - - /// Return true if this function can prove that the instruction I will - /// always transfer execution to one of its successors (including the next - /// instruction that follows within a basic block). E.g. this is not - /// guaranteed for function calls that could loop infinitely. - /// - /// In other words, this function returns false for instructions that may - /// transfer execution or fail to transfer execution in a way that is not - /// captured in the CFG nor in the sequence of instructions within a basic - /// block. - /// - /// Undefined behavior is assumed not to happen, so e.g. division is - /// guaranteed to transfer execution to the following instruction even - /// though division by zero might cause undefined behavior. - bool isGuaranteedToTransferExecutionToSuccessor(const Instruction *I); - - /// Return true if this function can prove that the instruction I - /// is executed for every iteration of the loop L. - /// - /// Note that this currently only considers the loop header. - bool isGuaranteedToExecuteForEveryIteration(const Instruction *I, - const Loop *L); - - /// Return true if this function can prove that I is guaranteed to yield - /// full-poison (all bits poison) if at least one of its operands are - /// full-poison (all bits poison). - /// - /// The exact rules for how poison propagates through instructions have - /// not been settled as of 2015-07-10, so this function is conservative - /// and only considers poison to be propagated in uncontroversial - /// cases. There is no attempt to track values that may be only partially - /// poison. - bool propagatesFullPoison(const Instruction *I); - - /// Return either nullptr or an operand of I such that I will trigger - /// undefined behavior if I is executed and that operand has a full-poison - /// value (all bits poison). - const Value *getGuaranteedNonFullPoisonOp(const Instruction *I); - - /// Return true if this function can prove that if PoisonI is executed - /// and yields a full-poison value (all bits poison), then that will - /// trigger undefined behavior. - /// - /// Note that this currently only considers the basic block that is - /// the parent of I. - bool isKnownNotFullPoison(const Instruction *PoisonI); - - /// \brief Specific patterns of select instructions we can match. - enum SelectPatternFlavor { - SPF_UNKNOWN = 0, - SPF_SMIN, /// Signed minimum - SPF_UMIN, /// Unsigned minimum - SPF_SMAX, /// Signed maximum - SPF_UMAX, /// Unsigned maximum - SPF_FMINNUM, /// Floating point minnum - SPF_FMAXNUM, /// Floating point maxnum - SPF_ABS, /// Absolute value - SPF_NABS /// Negated absolute value - }; - /// \brief Behavior when a floating point min/max is given one NaN and one - /// non-NaN as input. - enum SelectPatternNaNBehavior { - SPNB_NA = 0, /// NaN behavior not applicable. - SPNB_RETURNS_NAN, /// Given one NaN input, returns the NaN. - SPNB_RETURNS_OTHER, /// Given one NaN input, returns the non-NaN. - SPNB_RETURNS_ANY /// Given one NaN input, can return either (or - /// it has been determined that no operands can - /// be NaN). - }; - struct SelectPatternResult { - SelectPatternFlavor Flavor; - SelectPatternNaNBehavior NaNBehavior; /// Only applicable if Flavor is - /// SPF_FMINNUM or SPF_FMAXNUM. - bool Ordered; /// When implementing this min/max pattern as - /// fcmp; select, does the fcmp have to be - /// ordered? - - /// \brief Return true if \p SPF is a min or a max pattern. - static bool isMinOrMax(SelectPatternFlavor SPF) { - return !(SPF == SPF_UNKNOWN || SPF == SPF_ABS || SPF == SPF_NABS); - } - }; - /// Pattern match integer [SU]MIN, [SU]MAX and ABS idioms, returning the kind - /// and providing the out parameter results if we successfully match. - /// - /// If CastOp is not nullptr, also match MIN/MAX idioms where the type does - /// not match that of the original select. If this is the case, the cast - /// operation (one of Trunc,SExt,Zext) that must be done to transform the - /// type of LHS and RHS into the type of V is returned in CastOp. - /// - /// For example: - /// %1 = icmp slt i32 %a, i32 4 - /// %2 = sext i32 %a to i64 - /// %3 = select i1 %1, i64 %2, i64 4 - /// - /// -> LHS = %a, RHS = i32 4, *CastOp = Instruction::SExt - /// - SelectPatternResult matchSelectPattern(Value *V, Value *&LHS, Value *&RHS, - Instruction::CastOps *CastOp = nullptr); - - /// Parse out a conservative ConstantRange from !range metadata. - /// - /// E.g. if RangeMD is !{i32 0, i32 10, i32 15, i32 20} then return [0, 20). - ConstantRange getConstantRangeFromMetadata(MDNode &RangeMD); - - /// Return true if RHS is known to be implied true by LHS. Return false if - /// RHS is known to be implied false by LHS. Otherwise, return None if no - /// implication can be made. - /// A & B must be i1 (boolean) values or a vector of such values. Note that - /// the truth table for implication is the same as <=u on i1 values (but not - /// <=s!). The truth table for both is: - /// | T | F (B) - /// T | T | F - /// F | T | T - /// (A) - Optional isImpliedCondition( - Value *LHS, Value *RHS, const DataLayout &DL, bool InvertAPred = false, - unsigned Depth = 0, AssumptionCache *AC = nullptr, - const Instruction *CxtI = nullptr, const DominatorTree *DT = nullptr); -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Analysis/VectorUtils.h b/llvm/include/llvm/Analysis/VectorUtils.h deleted file mode 100644 index eaa068b8..00000000 --- a/llvm/include/llvm/Analysis/VectorUtils.h +++ /dev/null @@ -1,128 +0,0 @@ -//===- llvm/Transforms/Utils/VectorUtils.h - Vector utilities -*- C++ -*-=====// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines some vectorizer utilities. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TRANSFORMS_UTILS_VECTORUTILS_H -#define LLVM_TRANSFORMS_UTILS_VECTORUTILS_H - -#include "llvm/ADT/MapVector.h" -#include "llvm/Analysis/TargetLibraryInfo.h" - -namespace llvm { - -template class ArrayRef; -class DemandedBits; -class GetElementPtrInst; -class Loop; -class ScalarEvolution; -class TargetTransformInfo; -class Type; -class Value; - -namespace Intrinsic { -enum ID : unsigned; -} - -/// \brief Identify if the intrinsic is trivially vectorizable. -/// This method returns true if the intrinsic's argument types are all -/// scalars for the scalar form of the intrinsic and all vectors for -/// the vector form of the intrinsic. -bool isTriviallyVectorizable(Intrinsic::ID ID); - -/// \brief Identifies if the intrinsic has a scalar operand. It checks for -/// ctlz,cttz and powi special intrinsics whose argument is scalar. -bool hasVectorInstrinsicScalarOpd(Intrinsic::ID ID, unsigned ScalarOpdIdx); - -/// \brief Returns intrinsic ID for call. -/// For the input call instruction it finds mapping intrinsic and returns -/// its intrinsic ID, in case it does not found it return not_intrinsic. -Intrinsic::ID getVectorIntrinsicIDForCall(const CallInst *CI, - const TargetLibraryInfo *TLI); - -/// \brief Find the operand of the GEP that should be checked for consecutive -/// stores. This ignores trailing indices that have no effect on the final -/// pointer. -unsigned getGEPInductionOperand(const GetElementPtrInst *Gep); - -/// \brief If the argument is a GEP, then returns the operand identified by -/// getGEPInductionOperand. However, if there is some other non-loop-invariant -/// operand, it returns that instead. -Value *stripGetElementPtr(Value *Ptr, ScalarEvolution *SE, Loop *Lp); - -/// \brief If a value has only one user that is a CastInst, return it. -Value *getUniqueCastUse(Value *Ptr, Loop *Lp, Type *Ty); - -/// \brief Get the stride of a pointer access in a loop. Looks for symbolic -/// strides "a[i*stride]". Returns the symbolic stride, or null otherwise. -Value *getStrideFromPointer(Value *Ptr, ScalarEvolution *SE, Loop *Lp); - -/// \brief Given a vector and an element number, see if the scalar value is -/// already around as a register, for example if it were inserted then extracted -/// from the vector. -Value *findScalarElement(Value *V, unsigned EltNo); - -/// \brief Get splat value if the input is a splat vector or return nullptr. -/// The value may be extracted from a splat constants vector or from -/// a sequence of instructions that broadcast a single value into a vector. -const Value *getSplatValue(const Value *V); - -/// \brief Compute a map of integer instructions to their minimum legal type -/// size. -/// -/// C semantics force sub-int-sized values (e.g. i8, i16) to be promoted to int -/// type (e.g. i32) whenever arithmetic is performed on them. -/// -/// For targets with native i8 or i16 operations, usually InstCombine can shrink -/// the arithmetic type down again. However InstCombine refuses to create -/// illegal types, so for targets without i8 or i16 registers, the lengthening -/// and shrinking remains. -/// -/// Most SIMD ISAs (e.g. NEON) however support vectors of i8 or i16 even when -/// their scalar equivalents do not, so during vectorization it is important to -/// remove these lengthens and truncates when deciding the profitability of -/// vectorization. -/// -/// This function analyzes the given range of instructions and determines the -/// minimum type size each can be converted to. It attempts to remove or -/// minimize type size changes across each def-use chain, so for example in the -/// following code: -/// -/// %1 = load i8, i8* -/// %2 = add i8 %1, 2 -/// %3 = load i16, i16* -/// %4 = zext i8 %2 to i32 -/// %5 = zext i16 %3 to i32 -/// %6 = add i32 %4, %5 -/// %7 = trunc i32 %6 to i16 -/// -/// Instruction %6 must be done at least in i16, so computeMinimumValueSizes -/// will return: {%1: 16, %2: 16, %3: 16, %4: 16, %5: 16, %6: 16, %7: 16}. -/// -/// If the optional TargetTransformInfo is provided, this function tries harder -/// to do less work by only looking at illegal types. -MapVector -computeMinimumValueSizes(ArrayRef Blocks, - DemandedBits &DB, - const TargetTransformInfo *TTI=nullptr); - -/// Specifically, let Kinds = [MD_tbaa, MD_alias_scope, MD_noalias, MD_fpmath, -/// MD_nontemporal]. For K in Kinds, we get the MDNode for K from each of the -/// elements of VL, compute their "intersection" (i.e., the most generic -/// metadata value that covers all of the individual values), and set I's -/// metadata for M equal to the intersection value. -/// -/// This function always sets a (possibly null) value for each K in Kinds. -Instruction *propagateMetadata(Instruction *I, ArrayRef VL); - -} // llvm namespace - -#endif diff --git a/llvm/include/llvm/AsmParser/Parser.h b/llvm/include/llvm/AsmParser/Parser.h deleted file mode 100644 index 768b089b..00000000 --- a/llvm/include/llvm/AsmParser/Parser.h +++ /dev/null @@ -1,115 +0,0 @@ -//===-- Parser.h - Parser for LLVM IR text assembly files -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// These classes are implemented by the lib/AsmParser library. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ASMPARSER_PARSER_H -#define LLVM_ASMPARSER_PARSER_H - -#include "llvm/Support/MemoryBuffer.h" - -namespace llvm { - -class Constant; -class LLVMContext; -class Module; -struct SlotMapping; -class SMDiagnostic; -class Type; - -/// This function is the main interface to the LLVM Assembly Parser. It parses -/// an ASCII file that (presumably) contains LLVM Assembly code. It returns a -/// Module (intermediate representation) with the corresponding features. Note -/// that this does not verify that the generated Module is valid, so you should -/// run the verifier after parsing the file to check that it is okay. -/// \brief Parse LLVM Assembly from a file -/// \param Filename The name of the file to parse -/// \param Error Error result info. -/// \param Context Context in which to allocate globals info. -/// \param Slots The optional slot mapping that will be initialized during -/// parsing. -std::unique_ptr parseAssemblyFile(StringRef Filename, - SMDiagnostic &Error, - LLVMContext &Context, - SlotMapping *Slots = nullptr); - -/// The function is a secondary interface to the LLVM Assembly Parser. It parses -/// an ASCII string that (presumably) contains LLVM Assembly code. It returns a -/// Module (intermediate representation) with the corresponding features. Note -/// that this does not verify that the generated Module is valid, so you should -/// run the verifier after parsing the file to check that it is okay. -/// \brief Parse LLVM Assembly from a string -/// \param AsmString The string containing assembly -/// \param Error Error result info. -/// \param Context Context in which to allocate globals info. -/// \param Slots The optional slot mapping that will be initialized during -/// parsing. -std::unique_ptr parseAssemblyString(StringRef AsmString, - SMDiagnostic &Error, - LLVMContext &Context, - SlotMapping *Slots = nullptr); - -/// parseAssemblyFile and parseAssemblyString are wrappers around this function. -/// \brief Parse LLVM Assembly from a MemoryBuffer. -/// \param F The MemoryBuffer containing assembly -/// \param Err Error result info. -/// \param Slots The optional slot mapping that will be initialized during -/// parsing. -std::unique_ptr parseAssembly(MemoryBufferRef F, SMDiagnostic &Err, - LLVMContext &Context, - SlotMapping *Slots = nullptr); - -/// This function is the low-level interface to the LLVM Assembly Parser. -/// This is kept as an independent function instead of being inlined into -/// parseAssembly for the convenience of interactive users that want to add -/// recently parsed bits to an existing module. -/// -/// \param F The MemoryBuffer containing assembly -/// \param M The module to add data to. -/// \param Err Error result info. -/// \param Slots The optional slot mapping that will be initialized during -/// parsing. -/// \return true on error. -bool parseAssemblyInto(MemoryBufferRef F, Module &M, SMDiagnostic &Err, - SlotMapping *Slots = nullptr); - -/// Parse a type and a constant value in the given string. -/// -/// The constant value can be any LLVM constant, including a constant -/// expression. -/// -/// \param Slots The optional slot mapping that will restore the parsing state -/// of the module. -/// \return null on error. -Constant *parseConstantValue(StringRef Asm, SMDiagnostic &Err, const Module &M, - const SlotMapping *Slots = nullptr); - -/// Parse a type in the given string. -/// -/// \param Slots The optional slot mapping that will restore the parsing state -/// of the module. -/// \return null on error. -Type *parseType(StringRef Asm, SMDiagnostic &Err, const Module &M, - const SlotMapping *Slots = nullptr); - -/// Parse a string \p Asm that starts with a type. -/// \p Read[out] gives the number of characters that have been read to parse -/// the type in \p Asm. -/// -/// \param Slots The optional slot mapping that will restore the parsing state -/// of the module. -/// \return null on error. -Type *parseTypeAtBeginning(StringRef Asm, unsigned &Read, SMDiagnostic &Err, - const Module &M, const SlotMapping *Slots = nullptr); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/AsmParser/SlotMapping.h b/llvm/include/llvm/AsmParser/SlotMapping.h deleted file mode 100644 index bd7e8fca..00000000 --- a/llvm/include/llvm/AsmParser/SlotMapping.h +++ /dev/null @@ -1,42 +0,0 @@ -//===-- SlotMapping.h - Slot number mapping for unnamed values --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the SlotMapping struct. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_ASMPARSER_SLOTMAPPING_H -#define LLVM_ASMPARSER_SLOTMAPPING_H - -#include "llvm/ADT/StringMap.h" -#include "llvm/IR/TrackingMDRef.h" -#include -#include - -namespace llvm { - -class GlobalValue; -class Type; - -/// This struct contains the mappings from the slot numbers to unnamed metadata -/// nodes, global values and types. It also contains the mapping for the named -/// types. -/// It can be used to save the parsing state of an LLVM IR module so that the -/// textual references to the values in the module can be parsed outside of the -/// module's source. -struct SlotMapping { - std::vector GlobalValues; - std::map MetadataNodes; - StringMap NamedTypes; - std::map Types; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Bitcode/BitCodes.h b/llvm/include/llvm/Bitcode/BitCodes.h deleted file mode 100644 index 66400b69..00000000 --- a/llvm/include/llvm/Bitcode/BitCodes.h +++ /dev/null @@ -1,181 +0,0 @@ -//===- BitCodes.h - Enum values for the bitcode format ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header Bitcode enum values. -// -// The enum values defined in this file should be considered permanent. If -// new features are added, they should have values added at the end of the -// respective lists. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_BITCODE_BITCODES_H -#define LLVM_BITCODE_BITCODES_H - -#include "llvm/ADT/IntrusiveRefCntPtr.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" -#include - -namespace llvm { -namespace bitc { - enum StandardWidths { - BlockIDWidth = 8, // We use VBR-8 for block IDs. - CodeLenWidth = 4, // Codelen are VBR-4. - BlockSizeWidth = 32 // BlockSize up to 2^32 32-bit words = 16GB per block. - }; - - // The standard abbrev namespace always has a way to exit a block, enter a - // nested block, define abbrevs, and define an unabbreviated record. - enum FixedAbbrevIDs { - END_BLOCK = 0, // Must be zero to guarantee termination for broken bitcode. - ENTER_SUBBLOCK = 1, - - /// DEFINE_ABBREV - Defines an abbrev for the current block. It consists - /// of a vbr5 for # operand infos. Each operand info is emitted with a - /// single bit to indicate if it is a literal encoding. If so, the value is - /// emitted with a vbr8. If not, the encoding is emitted as 3 bits followed - /// by the info value as a vbr5 if needed. - DEFINE_ABBREV = 2, - - // UNABBREV_RECORDs are emitted with a vbr6 for the record code, followed by - // a vbr6 for the # operands, followed by vbr6's for each operand. - UNABBREV_RECORD = 3, - - // This is not a code, this is a marker for the first abbrev assignment. - FIRST_APPLICATION_ABBREV = 4 - }; - - /// StandardBlockIDs - All bitcode files can optionally include a BLOCKINFO - /// block, which contains metadata about other blocks in the file. - enum StandardBlockIDs { - /// BLOCKINFO_BLOCK is used to define metadata about blocks, for example, - /// standard abbrevs that should be available to all blocks of a specified - /// ID. - BLOCKINFO_BLOCK_ID = 0, - - // Block IDs 1-7 are reserved for future expansion. - FIRST_APPLICATION_BLOCKID = 8 - }; - - /// BlockInfoCodes - The blockinfo block contains metadata about user-defined - /// blocks. - enum BlockInfoCodes { - // DEFINE_ABBREV has magic semantics here, applying to the current SETBID'd - // block, instead of the BlockInfo block. - - BLOCKINFO_CODE_SETBID = 1, // SETBID: [blockid#] - BLOCKINFO_CODE_BLOCKNAME = 2, // BLOCKNAME: [name] - BLOCKINFO_CODE_SETRECORDNAME = 3 // BLOCKINFO_CODE_SETRECORDNAME: - // [id, name] - }; - -} // End bitc namespace - -/// BitCodeAbbrevOp - This describes one or more operands in an abbreviation. -/// This is actually a union of two different things: -/// 1. It could be a literal integer value ("the operand is always 17"). -/// 2. It could be an encoding specification ("this operand encoded like so"). -/// -class BitCodeAbbrevOp { - uint64_t Val; // A literal value or data for an encoding. - bool IsLiteral : 1; // Indicate whether this is a literal value or not. - unsigned Enc : 3; // The encoding to use. -public: - enum Encoding { - Fixed = 1, // A fixed width field, Val specifies number of bits. - VBR = 2, // A VBR field where Val specifies the width of each chunk. - Array = 3, // A sequence of fields, next field species elt encoding. - Char6 = 4, // A 6-bit fixed field which maps to [a-zA-Z0-9._]. - Blob = 5 // 32-bit aligned array of 8-bit characters. - }; - - explicit BitCodeAbbrevOp(uint64_t V) : Val(V), IsLiteral(true) {} - explicit BitCodeAbbrevOp(Encoding E, uint64_t Data = 0) - : Val(Data), IsLiteral(false), Enc(E) {} - - bool isLiteral() const { return IsLiteral; } - bool isEncoding() const { return !IsLiteral; } - - // Accessors for literals. - uint64_t getLiteralValue() const { assert(isLiteral()); return Val; } - - // Accessors for encoding info. - Encoding getEncoding() const { assert(isEncoding()); return (Encoding)Enc; } - uint64_t getEncodingData() const { - assert(isEncoding() && hasEncodingData()); - return Val; - } - - bool hasEncodingData() const { return hasEncodingData(getEncoding()); } - static bool hasEncodingData(Encoding E) { - switch (E) { - case Fixed: - case VBR: - return true; - case Array: - case Char6: - case Blob: - return false; - } - report_fatal_error("Invalid encoding"); - } - - /// isChar6 - Return true if this character is legal in the Char6 encoding. - static bool isChar6(char C) { - if (C >= 'a' && C <= 'z') return true; - if (C >= 'A' && C <= 'Z') return true; - if (C >= '0' && C <= '9') return true; - if (C == '.' || C == '_') return true; - return false; - } - static unsigned EncodeChar6(char C) { - if (C >= 'a' && C <= 'z') return C-'a'; - if (C >= 'A' && C <= 'Z') return C-'A'+26; - if (C >= '0' && C <= '9') return C-'0'+26+26; - if (C == '.') return 62; - if (C == '_') return 63; - llvm_unreachable("Not a value Char6 character!"); - } - - static char DecodeChar6(unsigned V) { - assert((V & ~63) == 0 && "Not a Char6 encoded character!"); - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._" - [V]; - } - -}; - -template <> struct isPodLike { static const bool value=true; }; - -/// BitCodeAbbrev - This class represents an abbreviation record. An -/// abbreviation allows a complex record that has redundancy to be stored in a -/// specialized format instead of the fully-general, fully-vbr, format. -class BitCodeAbbrev : public RefCountedBase { - SmallVector OperandList; - // Only RefCountedBase is allowed to delete. - ~BitCodeAbbrev() = default; - friend class RefCountedBase; - -public: - unsigned getNumOperandInfos() const { - return static_cast(OperandList.size()); - } - const BitCodeAbbrevOp &getOperandInfo(unsigned N) const { - return OperandList[N]; - } - - void Add(const BitCodeAbbrevOp &OpInfo) { - OperandList.push_back(OpInfo); - } -}; -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Bitcode/BitcodeWriterPass.h b/llvm/include/llvm/Bitcode/BitcodeWriterPass.h deleted file mode 100644 index 946255b8..00000000 --- a/llvm/include/llvm/Bitcode/BitcodeWriterPass.h +++ /dev/null @@ -1,77 +0,0 @@ -//===-- BitcodeWriterPass.h - Bitcode writing pass --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This file provides a bitcode writing pass. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_BITCODE_BITCODEWRITERPASS_H -#define LLVM_BITCODE_BITCODEWRITERPASS_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/IR/PassManager.h" - -namespace llvm { -class Module; -class ModulePass; -class raw_ostream; - -/// \brief Create and return a pass that writes the module to the specified -/// ostream. Note that this pass is designed for use with the legacy pass -/// manager. -/// -/// If \c ShouldPreserveUseListOrder, encode use-list order so it can be -/// reproduced when deserialized. -/// -/// If \c EmitSummaryIndex, emit the summary index (currently for use in ThinLTO -/// optimization). -/// -/// If \c EmitModuleHash, compute and emit the module hash in the bitcode -/// (currently for use in ThinLTO incremental build). -ModulePass *createBitcodeWriterPass(raw_ostream &Str, - bool ShouldPreserveUseListOrder = false, - bool EmitSummaryIndex = false, - bool EmitModuleHash = false); - -/// \brief Pass for writing a module of IR out to a bitcode file. -/// -/// Note that this is intended for use with the new pass manager. To construct -/// a pass for the legacy pass manager, use the function above. -class BitcodeWriterPass { - raw_ostream &OS; - bool ShouldPreserveUseListOrder; - bool EmitSummaryIndex; - bool EmitModuleHash; - -public: - /// \brief Construct a bitcode writer pass around a particular output stream. - /// - /// If \c ShouldPreserveUseListOrder, encode use-list order so it can be - /// reproduced when deserialized. - /// - /// If \c EmitSummaryIndex, emit the summary index (currently - /// for use in ThinLTO optimization). - explicit BitcodeWriterPass(raw_ostream &OS, - bool ShouldPreserveUseListOrder = false, - bool EmitSummaryIndex = false, - bool EmitModuleHash = false) - : OS(OS), ShouldPreserveUseListOrder(ShouldPreserveUseListOrder), - EmitSummaryIndex(EmitSummaryIndex), EmitModuleHash(EmitModuleHash) {} - - /// \brief Run the bitcode writer pass, and output the module to the selected - /// output stream. - PreservedAnalyses run(Module &M, ModuleAnalysisManager &); - - static StringRef name() { return "BitcodeWriterPass"; } -}; - -} - -#endif diff --git a/llvm/include/llvm/Bitcode/BitstreamReader.h b/llvm/include/llvm/Bitcode/BitstreamReader.h deleted file mode 100644 index b331ceea..00000000 --- a/llvm/include/llvm/Bitcode/BitstreamReader.h +++ /dev/null @@ -1,598 +0,0 @@ -//===- BitstreamReader.h - Low-level bitstream reader interface -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header defines the BitstreamReader class. This class can be used to -// read an arbitrary bitstream, regardless of its contents. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_BITCODE_BITSTREAMREADER_H -#define LLVM_BITCODE_BITSTREAMREADER_H - -#include "llvm/Bitcode/BitCodes.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/StreamingMemoryObject.h" -#include -#include -#include - -namespace llvm { - -/// This class is used to read from an LLVM bitcode stream, maintaining -/// information that is global to decoding the entire file. While a file is -/// being read, multiple cursors can be independently advanced or skipped around -/// within the file. These are represented by the BitstreamCursor class. -class BitstreamReader { -public: - /// This contains information emitted to BLOCKINFO_BLOCK blocks. These - /// describe abbreviations that all blocks of the specified ID inherit. - struct BlockInfo { - unsigned BlockID; - std::vector> Abbrevs; - std::string Name; - - std::vector > RecordNames; - }; -private: - std::unique_ptr BitcodeBytes; - - std::vector BlockInfoRecords; - - /// This is set to true if we don't care about the block/record name - /// information in the BlockInfo block. Only llvm-bcanalyzer uses this. - bool IgnoreBlockInfoNames; - - BitstreamReader(const BitstreamReader&) = delete; - void operator=(const BitstreamReader&) = delete; -public: - BitstreamReader() : IgnoreBlockInfoNames(true) { - } - - BitstreamReader(const unsigned char *Start, const unsigned char *End) - : IgnoreBlockInfoNames(true) { - init(Start, End); - } - - BitstreamReader(std::unique_ptr BitcodeBytes) - : BitcodeBytes(std::move(BitcodeBytes)), IgnoreBlockInfoNames(true) {} - - BitstreamReader(BitstreamReader &&Other) { - *this = std::move(Other); - } - - BitstreamReader &operator=(BitstreamReader &&Other) { - BitcodeBytes = std::move(Other.BitcodeBytes); - // Explicitly swap block info, so that nothing gets destroyed twice. - std::swap(BlockInfoRecords, Other.BlockInfoRecords); - IgnoreBlockInfoNames = Other.IgnoreBlockInfoNames; - return *this; - } - - void init(const unsigned char *Start, const unsigned char *End) { - assert(((End-Start) & 3) == 0 &&"Bitcode stream not a multiple of 4 bytes"); - BitcodeBytes.reset(getNonStreamedMemoryObject(Start, End)); - } - - MemoryObject &getBitcodeBytes() { return *BitcodeBytes; } - - /// This is called by clients that want block/record name information. - void CollectBlockInfoNames() { IgnoreBlockInfoNames = false; } - bool isIgnoringBlockInfoNames() { return IgnoreBlockInfoNames; } - - //===--------------------------------------------------------------------===// - // Block Manipulation - //===--------------------------------------------------------------------===// - - /// Return true if we've already read and processed the block info block for - /// this Bitstream. We only process it for the first cursor that walks over - /// it. - bool hasBlockInfoRecords() const { return !BlockInfoRecords.empty(); } - - /// If there is block info for the specified ID, return it, otherwise return - /// null. - const BlockInfo *getBlockInfo(unsigned BlockID) const { - // Common case, the most recent entry matches BlockID. - if (!BlockInfoRecords.empty() && BlockInfoRecords.back().BlockID == BlockID) - return &BlockInfoRecords.back(); - - for (unsigned i = 0, e = static_cast(BlockInfoRecords.size()); - i != e; ++i) - if (BlockInfoRecords[i].BlockID == BlockID) - return &BlockInfoRecords[i]; - return nullptr; - } - - BlockInfo &getOrCreateBlockInfo(unsigned BlockID) { - if (const BlockInfo *BI = getBlockInfo(BlockID)) - return *const_cast(BI); - - // Otherwise, add a new record. - BlockInfoRecords.emplace_back(); - BlockInfoRecords.back().BlockID = BlockID; - return BlockInfoRecords.back(); - } - - /// Takes block info from the other bitstream reader. - /// - /// This is a "take" operation because BlockInfo records are non-trivial, and - /// indeed rather expensive. - void takeBlockInfo(BitstreamReader &&Other) { - assert(!hasBlockInfoRecords()); - BlockInfoRecords = std::move(Other.BlockInfoRecords); - } -}; - -/// This represents a position within a bitstream. There may be multiple -/// independent cursors reading within one bitstream, each maintaining their -/// own local state. -class SimpleBitstreamCursor { - BitstreamReader *R = nullptr; - size_t NextChar = 0; - - // The size of the bicode. 0 if we don't know it yet. - size_t Size = 0; - - /// This is the current data we have pulled from the stream but have not - /// returned to the client. This is specifically and intentionally defined to - /// follow the word size of the host machine for efficiency. We use word_t in - /// places that are aware of this to make it perfectly explicit what is going - /// on. -public: - typedef size_t word_t; - -private: - word_t CurWord = 0; - - /// This is the number of bits in CurWord that are valid. This is always from - /// [0...bits_of(size_t)-1] inclusive. - unsigned BitsInCurWord = 0; - -public: - static const size_t MaxChunkSize = sizeof(word_t) * 8; - - SimpleBitstreamCursor() = default; - - explicit SimpleBitstreamCursor(BitstreamReader &R) : R(&R) {} - explicit SimpleBitstreamCursor(BitstreamReader *R) : R(R) {} - - bool canSkipToPos(size_t pos) const { - // pos can be skipped to if it is a valid address or one byte past the end. - return pos == 0 || - R->getBitcodeBytes().isValidAddress(static_cast(pos - 1)); - } - - bool AtEndOfStream() { - if (BitsInCurWord != 0) - return false; - if (Size != 0) - return Size <= NextChar; - fillCurWord(); - return BitsInCurWord == 0; - } - - /// Return the bit # of the bit we are reading. - uint64_t GetCurrentBitNo() const { - return NextChar*CHAR_BIT - BitsInCurWord; - } - - // Return the byte # of the current bit. - uint64_t getCurrentByteNo() const { return GetCurrentBitNo() / 8; } - - BitstreamReader *getBitStreamReader() { return R; } - const BitstreamReader *getBitStreamReader() const { return R; } - - /// Reset the stream to the specified bit number. - void JumpToBit(uint64_t BitNo) { - size_t ByteNo = size_t(BitNo/8) & ~(sizeof(word_t)-1); - unsigned WordBitNo = unsigned(BitNo & (sizeof(word_t)*8-1)); - assert(canSkipToPos(ByteNo) && "Invalid location"); - - // Move the cursor to the right word. - NextChar = ByteNo; - BitsInCurWord = 0; - - // Skip over any bits that are already consumed. - if (WordBitNo) - Read(WordBitNo); - } - - /// Reset the stream to the bit pointed at by the specified pointer. - /// - /// The pointer must be a dereferenceable pointer into the bytes in the - /// underlying memory object. - void jumpToPointer(const uint8_t *Pointer) { - auto *Pointer0 = getPointerToByte(0, 1); - assert((intptr_t)Pointer0 <= (intptr_t)Pointer && - "Expected pointer into bitstream"); - - JumpToBit(8 * (Pointer - Pointer0)); - assert((intptr_t)getPointerToByte(getCurrentByteNo(), 1) == - (intptr_t)Pointer && - "Expected to reach pointer"); - } - void jumpToPointer(const char *Pointer) { - jumpToPointer((const uint8_t *)Pointer); - } - - /// Get a pointer into the bitstream at the specified byte offset. - const uint8_t *getPointerToByte(uint64_t ByteNo, uint64_t NumBytes) { - return R->getBitcodeBytes().getPointer(ByteNo, NumBytes); - } - - /// Get a pointer into the bitstream at the specified bit offset. - /// - /// The bit offset must be on a byte boundary. - const uint8_t *getPointerToBit(uint64_t BitNo, uint64_t NumBytes) { - assert(!(BitNo % 8) && "Expected bit on byte boundary"); - return getPointerToByte(BitNo / 8, NumBytes); - } - - void fillCurWord() { - if (Size != 0 && NextChar >= Size) - report_fatal_error("Unexpected end of file"); - - // Read the next word from the stream. - uint8_t Array[sizeof(word_t)] = {0}; - - uint64_t BytesRead = - R->getBitcodeBytes().readBytes(Array, sizeof(Array), NextChar); - - // If we run out of data, stop at the end of the stream. - if (BytesRead == 0) { - CurWord = 0; - BitsInCurWord = 0; - Size = NextChar; - return; - } - - CurWord = - support::endian::read( - Array); - NextChar += BytesRead; - BitsInCurWord = BytesRead * 8; - } - - word_t Read(unsigned NumBits) { - static const unsigned BitsInWord = MaxChunkSize; - - assert(NumBits && NumBits <= BitsInWord && - "Cannot return zero or more than BitsInWord bits!"); - - static const unsigned Mask = sizeof(word_t) > 4 ? 0x3f : 0x1f; - - // If the field is fully contained by CurWord, return it quickly. - if (BitsInCurWord >= NumBits) { - word_t R = CurWord & (~word_t(0) >> (BitsInWord - NumBits)); - - // Use a mask to avoid undefined behavior. - CurWord >>= (NumBits & Mask); - - BitsInCurWord -= NumBits; - return R; - } - - word_t R = BitsInCurWord ? CurWord : 0; - unsigned BitsLeft = NumBits - BitsInCurWord; - - fillCurWord(); - - // If we run out of data, stop at the end of the stream. - if (BitsLeft > BitsInCurWord) - return 0; - - word_t R2 = CurWord & (~word_t(0) >> (BitsInWord - BitsLeft)); - - // Use a mask to avoid undefined behavior. - CurWord >>= (BitsLeft & Mask); - - BitsInCurWord -= BitsLeft; - - R |= R2 << (NumBits - BitsLeft); - - return R; - } - - uint32_t ReadVBR(unsigned NumBits) { - uint32_t Piece = Read(NumBits); - if ((Piece & (1U << (NumBits-1))) == 0) - return Piece; - - uint32_t Result = 0; - unsigned NextBit = 0; - while (1) { - Result |= (Piece & ((1U << (NumBits-1))-1)) << NextBit; - - if ((Piece & (1U << (NumBits-1))) == 0) - return Result; - - NextBit += NumBits-1; - Piece = Read(NumBits); - } - } - - // Read a VBR that may have a value up to 64-bits in size. The chunk size of - // the VBR must still be <= 32 bits though. - uint64_t ReadVBR64(unsigned NumBits) { - uint32_t Piece = Read(NumBits); - if ((Piece & (1U << (NumBits-1))) == 0) - return uint64_t(Piece); - - uint64_t Result = 0; - unsigned NextBit = 0; - while (1) { - Result |= uint64_t(Piece & ((1U << (NumBits-1))-1)) << NextBit; - - if ((Piece & (1U << (NumBits-1))) == 0) - return Result; - - NextBit += NumBits-1; - Piece = Read(NumBits); - } - } - - void SkipToFourByteBoundary() { - // If word_t is 64-bits and if we've read less than 32 bits, just dump - // the bits we have up to the next 32-bit boundary. - if (sizeof(word_t) > 4 && - BitsInCurWord >= 32) { - CurWord >>= BitsInCurWord-32; - BitsInCurWord = 32; - return; - } - - BitsInCurWord = 0; - } - - /// Skip to the end of the file. - void skipToEnd() { NextChar = R->getBitcodeBytes().getExtent(); } - - /// Prevent the cursor from reading past a byte boundary. - /// - /// Prevent the cursor from requesting byte reads past \c Limit. This is - /// useful when working with a cursor on a StreamingMemoryObject, when it's - /// desirable to avoid invalidating the result of getPointerToByte(). - /// - /// If \c Limit is on a word boundary, AtEndOfStream() will return true if - /// the cursor position reaches or exceeds \c Limit, regardless of the true - /// number of available bytes. Otherwise, AtEndOfStream() returns true when - /// it reaches or exceeds the next word boundary. - void setArtificialByteLimit(uint64_t Limit) { - assert(getCurrentByteNo() < Limit && "Move cursor before lowering limit"); - - // Round to word boundary. - Limit = alignTo(Limit, sizeof(word_t)); - - // Only change size if the new one is lower. - if (!Size || Size > Limit) - Size = Limit; - } - - /// Return the Size, if known. - uint64_t getSizeIfKnown() const { return Size; } -}; - -/// When advancing through a bitstream cursor, each advance can discover a few -/// different kinds of entries: -struct BitstreamEntry { - enum { - Error, // Malformed bitcode was found. - EndBlock, // We've reached the end of the current block, (or the end of the - // file, which is treated like a series of EndBlock records. - SubBlock, // This is the start of a new subblock of a specific ID. - Record // This is a record with a specific AbbrevID. - } Kind; - - unsigned ID; - - static BitstreamEntry getError() { - BitstreamEntry E; E.Kind = Error; return E; - } - static BitstreamEntry getEndBlock() { - BitstreamEntry E; E.Kind = EndBlock; return E; - } - static BitstreamEntry getSubBlock(unsigned ID) { - BitstreamEntry E; E.Kind = SubBlock; E.ID = ID; return E; - } - static BitstreamEntry getRecord(unsigned AbbrevID) { - BitstreamEntry E; E.Kind = Record; E.ID = AbbrevID; return E; - } -}; - -/// This represents a position within a bitcode file, implemented on top of a -/// SimpleBitstreamCursor. -/// -/// Unlike iterators, BitstreamCursors are heavy-weight objects that should not -/// be passed by value. -class BitstreamCursor : SimpleBitstreamCursor { - // This is the declared size of code values used for the current block, in - // bits. - unsigned CurCodeSize = 2; - - /// Abbrevs installed at in this block. - std::vector> CurAbbrevs; - - struct Block { - unsigned PrevCodeSize; - std::vector> PrevAbbrevs; - explicit Block(unsigned PCS) : PrevCodeSize(PCS) {} - }; - - /// This tracks the codesize of parent blocks. - SmallVector BlockScope; - - -public: - static const size_t MaxChunkSize = sizeof(word_t) * 8; - - BitstreamCursor() = default; - - explicit BitstreamCursor(BitstreamReader &R) { init(&R); } - - void init(BitstreamReader *R) { - freeState(); - SimpleBitstreamCursor::operator=(SimpleBitstreamCursor(R)); - CurCodeSize = 2; - } - - void freeState(); - - using SimpleBitstreamCursor::canSkipToPos; - using SimpleBitstreamCursor::AtEndOfStream; - using SimpleBitstreamCursor::GetCurrentBitNo; - using SimpleBitstreamCursor::getCurrentByteNo; - using SimpleBitstreamCursor::getPointerToByte; - using SimpleBitstreamCursor::getBitStreamReader; - using SimpleBitstreamCursor::JumpToBit; - using SimpleBitstreamCursor::fillCurWord; - using SimpleBitstreamCursor::Read; - using SimpleBitstreamCursor::ReadVBR; - using SimpleBitstreamCursor::ReadVBR64; - - /// Return the number of bits used to encode an abbrev #. - unsigned getAbbrevIDWidth() const { return CurCodeSize; } - - /// Flags that modify the behavior of advance(). - enum { - /// If this flag is used, the advance() method does not automatically pop - /// the block scope when the end of a block is reached. - AF_DontPopBlockAtEnd = 1, - - /// If this flag is used, abbrev entries are returned just like normal - /// records. - AF_DontAutoprocessAbbrevs = 2 - }; - - /// Advance the current bitstream, returning the next entry in the stream. - BitstreamEntry advance(unsigned Flags = 0) { - while (1) { - unsigned Code = ReadCode(); - if (Code == bitc::END_BLOCK) { - // Pop the end of the block unless Flags tells us not to. - if (!(Flags & AF_DontPopBlockAtEnd) && ReadBlockEnd()) - return BitstreamEntry::getError(); - return BitstreamEntry::getEndBlock(); - } - - if (Code == bitc::ENTER_SUBBLOCK) - return BitstreamEntry::getSubBlock(ReadSubBlockID()); - - if (Code == bitc::DEFINE_ABBREV && - !(Flags & AF_DontAutoprocessAbbrevs)) { - // We read and accumulate abbrev's, the client can't do anything with - // them anyway. - ReadAbbrevRecord(); - continue; - } - - return BitstreamEntry::getRecord(Code); - } - } - - /// This is a convenience function for clients that don't expect any - /// subblocks. This just skips over them automatically. - BitstreamEntry advanceSkippingSubblocks(unsigned Flags = 0) { - while (1) { - // If we found a normal entry, return it. - BitstreamEntry Entry = advance(Flags); - if (Entry.Kind != BitstreamEntry::SubBlock) - return Entry; - - // If we found a sub-block, just skip over it and check the next entry. - if (SkipBlock()) - return BitstreamEntry::getError(); - } - } - - unsigned ReadCode() { - return Read(CurCodeSize); - } - - - // Block header: - // [ENTER_SUBBLOCK, blockid, newcodelen, , blocklen] - - /// Having read the ENTER_SUBBLOCK code, read the BlockID for the block. - unsigned ReadSubBlockID() { - return ReadVBR(bitc::BlockIDWidth); - } - - /// Having read the ENTER_SUBBLOCK abbrevid and a BlockID, skip over the body - /// of this block. If the block record is malformed, return true. - bool SkipBlock() { - // Read and ignore the codelen value. Since we are skipping this block, we - // don't care what code widths are used inside of it. - ReadVBR(bitc::CodeLenWidth); - SkipToFourByteBoundary(); - unsigned NumFourBytes = Read(bitc::BlockSizeWidth); - - // Check that the block wasn't partially defined, and that the offset isn't - // bogus. - size_t SkipTo = GetCurrentBitNo() + NumFourBytes*4*8; - if (AtEndOfStream() || !canSkipToPos(SkipTo/8)) - return true; - - JumpToBit(SkipTo); - return false; - } - - /// Having read the ENTER_SUBBLOCK abbrevid, enter the block, and return true - /// if the block has an error. - bool EnterSubBlock(unsigned BlockID, unsigned *NumWordsP = nullptr); - - bool ReadBlockEnd() { - if (BlockScope.empty()) return true; - - // Block tail: - // [END_BLOCK, ] - SkipToFourByteBoundary(); - - popBlockScope(); - return false; - } - -private: - - void popBlockScope() { - CurCodeSize = BlockScope.back().PrevCodeSize; - - CurAbbrevs = std::move(BlockScope.back().PrevAbbrevs); - BlockScope.pop_back(); - } - - //===--------------------------------------------------------------------===// - // Record Processing - //===--------------------------------------------------------------------===// - -public: - /// Return the abbreviation for the specified AbbrevId. - const BitCodeAbbrev *getAbbrev(unsigned AbbrevID) { - unsigned AbbrevNo = AbbrevID - bitc::FIRST_APPLICATION_ABBREV; - if (AbbrevNo >= CurAbbrevs.size()) - report_fatal_error("Invalid abbrev number"); - return CurAbbrevs[AbbrevNo].get(); - } - - /// Read the current record and discard it. - void skipRecord(unsigned AbbrevID); - - unsigned readRecord(unsigned AbbrevID, SmallVectorImpl &Vals, - StringRef *Blob = nullptr); - - //===--------------------------------------------------------------------===// - // Abbrev Processing - //===--------------------------------------------------------------------===// - void ReadAbbrevRecord(); - - bool ReadBlockInfoBlock(); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Bitcode/BitstreamWriter.h b/llvm/include/llvm/Bitcode/BitstreamWriter.h deleted file mode 100644 index d613f5e1..00000000 --- a/llvm/include/llvm/Bitcode/BitstreamWriter.h +++ /dev/null @@ -1,553 +0,0 @@ -//===- BitstreamWriter.h - Low-level bitstream writer interface -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header defines the BitstreamWriter class. This class can be used to -// write an arbitrary bitstream, regardless of its contents. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_BITCODE_BITSTREAMWRITER_H -#define LLVM_BITCODE_BITSTREAMWRITER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Bitcode/BitCodes.h" -#include "llvm/Support/Endian.h" -#include - -namespace llvm { - -class BitstreamWriter { - SmallVectorImpl &Out; - - /// CurBit - Always between 0 and 31 inclusive, specifies the next bit to use. - unsigned CurBit; - - /// CurValue - The current value. Only bits < CurBit are valid. - uint32_t CurValue; - - /// CurCodeSize - This is the declared size of code values used for the - /// current block, in bits. - unsigned CurCodeSize; - - /// BlockInfoCurBID - When emitting a BLOCKINFO_BLOCK, this is the currently - /// selected BLOCK ID. - unsigned BlockInfoCurBID; - - /// CurAbbrevs - Abbrevs installed at in this block. - std::vector> CurAbbrevs; - - struct Block { - unsigned PrevCodeSize; - size_t StartSizeWord; - std::vector> PrevAbbrevs; - Block(unsigned PCS, size_t SSW) : PrevCodeSize(PCS), StartSizeWord(SSW) {} - }; - - /// BlockScope - This tracks the current blocks that we have entered. - std::vector BlockScope; - - /// BlockInfo - This contains information emitted to BLOCKINFO_BLOCK blocks. - /// These describe abbreviations that all blocks of the specified ID inherit. - struct BlockInfo { - unsigned BlockID; - std::vector> Abbrevs; - }; - std::vector BlockInfoRecords; - - void WriteByte(unsigned char Value) { - Out.push_back(Value); - } - - void WriteWord(unsigned Value) { - Value = support::endian::byte_swap(Value); - Out.append(reinterpret_cast(&Value), - reinterpret_cast(&Value + 1)); - } - - size_t GetBufferOffset() const { return Out.size(); } - - size_t GetWordIndex() const { - size_t Offset = GetBufferOffset(); - assert((Offset & 3) == 0 && "Not 32-bit aligned"); - return Offset / 4; - } - -public: - explicit BitstreamWriter(SmallVectorImpl &O) - : Out(O), CurBit(0), CurValue(0), CurCodeSize(2) {} - - ~BitstreamWriter() { - assert(CurBit == 0 && "Unflushed data remaining"); - assert(BlockScope.empty() && CurAbbrevs.empty() && "Block imbalance"); - } - - /// \brief Retrieve the current position in the stream, in bits. - uint64_t GetCurrentBitNo() const { return GetBufferOffset() * 8 + CurBit; } - - /// \brief Retrieve the number of bits currently used to encode an abbrev ID. - unsigned GetAbbrevIDWidth() const { return CurCodeSize; } - - //===--------------------------------------------------------------------===// - // Basic Primitives for emitting bits to the stream. - //===--------------------------------------------------------------------===// - - /// Backpatch a 32-bit word in the output at the given bit offset - /// with the specified value. - void BackpatchWord(uint64_t BitNo, unsigned NewWord) { - using namespace llvm::support; - unsigned ByteNo = BitNo / 8; - assert((!endian::readAtBitAlignment( - &Out[ByteNo], BitNo & 7)) && - "Expected to be patching over 0-value placeholders"); - endian::writeAtBitAlignment( - &Out[ByteNo], NewWord, BitNo & 7); - } - - void Emit(uint32_t Val, unsigned NumBits) { - assert(NumBits && NumBits <= 32 && "Invalid value size!"); - assert((Val & ~(~0U >> (32-NumBits))) == 0 && "High bits set!"); - CurValue |= Val << CurBit; - if (CurBit + NumBits < 32) { - CurBit += NumBits; - return; - } - - // Add the current word. - WriteWord(CurValue); - - if (CurBit) - CurValue = Val >> (32-CurBit); - else - CurValue = 0; - CurBit = (CurBit+NumBits) & 31; - } - - void Emit64(uint64_t Val, unsigned NumBits) { - if (NumBits <= 32) - Emit((uint32_t)Val, NumBits); - else { - Emit((uint32_t)Val, 32); - Emit((uint32_t)(Val >> 32), NumBits-32); - } - } - - void FlushToWord() { - if (CurBit) { - WriteWord(CurValue); - CurBit = 0; - CurValue = 0; - } - } - - void EmitVBR(uint32_t Val, unsigned NumBits) { - assert(NumBits <= 32 && "Too many bits to emit!"); - uint32_t Threshold = 1U << (NumBits-1); - - // Emit the bits with VBR encoding, NumBits-1 bits at a time. - while (Val >= Threshold) { - Emit((Val & ((1 << (NumBits-1))-1)) | (1 << (NumBits-1)), NumBits); - Val >>= NumBits-1; - } - - Emit(Val, NumBits); - } - - void EmitVBR64(uint64_t Val, unsigned NumBits) { - assert(NumBits <= 32 && "Too many bits to emit!"); - if ((uint32_t)Val == Val) - return EmitVBR((uint32_t)Val, NumBits); - - uint32_t Threshold = 1U << (NumBits-1); - - // Emit the bits with VBR encoding, NumBits-1 bits at a time. - while (Val >= Threshold) { - Emit(((uint32_t)Val & ((1 << (NumBits-1))-1)) | - (1 << (NumBits-1)), NumBits); - Val >>= NumBits-1; - } - - Emit((uint32_t)Val, NumBits); - } - - /// EmitCode - Emit the specified code. - void EmitCode(unsigned Val) { - Emit(Val, CurCodeSize); - } - - //===--------------------------------------------------------------------===// - // Block Manipulation - //===--------------------------------------------------------------------===// - - /// getBlockInfo - If there is block info for the specified ID, return it, - /// otherwise return null. - BlockInfo *getBlockInfo(unsigned BlockID) { - // Common case, the most recent entry matches BlockID. - if (!BlockInfoRecords.empty() && BlockInfoRecords.back().BlockID == BlockID) - return &BlockInfoRecords.back(); - - for (unsigned i = 0, e = static_cast(BlockInfoRecords.size()); - i != e; ++i) - if (BlockInfoRecords[i].BlockID == BlockID) - return &BlockInfoRecords[i]; - return nullptr; - } - - void EnterSubblock(unsigned BlockID, unsigned CodeLen) { - // Block header: - // [ENTER_SUBBLOCK, blockid, newcodelen, , blocklen] - EmitCode(bitc::ENTER_SUBBLOCK); - EmitVBR(BlockID, bitc::BlockIDWidth); - EmitVBR(CodeLen, bitc::CodeLenWidth); - FlushToWord(); - - size_t BlockSizeWordIndex = GetWordIndex(); - unsigned OldCodeSize = CurCodeSize; - - // Emit a placeholder, which will be replaced when the block is popped. - Emit(0, bitc::BlockSizeWidth); - - CurCodeSize = CodeLen; - - // Push the outer block's abbrev set onto the stack, start out with an - // empty abbrev set. - BlockScope.emplace_back(OldCodeSize, BlockSizeWordIndex); - BlockScope.back().PrevAbbrevs.swap(CurAbbrevs); - - // If there is a blockinfo for this BlockID, add all the predefined abbrevs - // to the abbrev list. - if (BlockInfo *Info = getBlockInfo(BlockID)) { - CurAbbrevs.insert(CurAbbrevs.end(), Info->Abbrevs.begin(), - Info->Abbrevs.end()); - } - } - - void ExitBlock() { - assert(!BlockScope.empty() && "Block scope imbalance!"); - const Block &B = BlockScope.back(); - - // Block tail: - // [END_BLOCK, ] - EmitCode(bitc::END_BLOCK); - FlushToWord(); - - // Compute the size of the block, in words, not counting the size field. - size_t SizeInWords = GetWordIndex() - B.StartSizeWord - 1; - uint64_t BitNo = uint64_t(B.StartSizeWord) * 32; - - // Update the block size field in the header of this sub-block. - BackpatchWord(BitNo, SizeInWords); - - // Restore the inner block's code size and abbrev table. - CurCodeSize = B.PrevCodeSize; - CurAbbrevs = std::move(B.PrevAbbrevs); - BlockScope.pop_back(); - } - - //===--------------------------------------------------------------------===// - // Record Emission - //===--------------------------------------------------------------------===// - -private: - /// EmitAbbreviatedLiteral - Emit a literal value according to its abbrev - /// record. This is a no-op, since the abbrev specifies the literal to use. - template - void EmitAbbreviatedLiteral(const BitCodeAbbrevOp &Op, uintty V) { - assert(Op.isLiteral() && "Not a literal"); - // If the abbrev specifies the literal value to use, don't emit - // anything. - assert(V == Op.getLiteralValue() && - "Invalid abbrev for record!"); - } - - /// EmitAbbreviatedField - Emit a single scalar field value with the specified - /// encoding. - template - void EmitAbbreviatedField(const BitCodeAbbrevOp &Op, uintty V) { - assert(!Op.isLiteral() && "Literals should use EmitAbbreviatedLiteral!"); - - // Encode the value as we are commanded. - switch (Op.getEncoding()) { - default: llvm_unreachable("Unknown encoding!"); - case BitCodeAbbrevOp::Fixed: - if (Op.getEncodingData()) - Emit((unsigned)V, (unsigned)Op.getEncodingData()); - break; - case BitCodeAbbrevOp::VBR: - if (Op.getEncodingData()) - EmitVBR64(V, (unsigned)Op.getEncodingData()); - break; - case BitCodeAbbrevOp::Char6: - Emit(BitCodeAbbrevOp::EncodeChar6((char)V), 6); - break; - } - } - - /// EmitRecordWithAbbrevImpl - This is the core implementation of the record - /// emission code. If BlobData is non-null, then it specifies an array of - /// data that should be emitted as part of the Blob or Array operand that is - /// known to exist at the end of the record. If Code is specified, then - /// it is the record code to emit before the Vals, which must not contain - /// the code. - template - void EmitRecordWithAbbrevImpl(unsigned Abbrev, ArrayRef Vals, - StringRef Blob, Optional Code) { - const char *BlobData = Blob.data(); - unsigned BlobLen = (unsigned) Blob.size(); - unsigned AbbrevNo = Abbrev-bitc::FIRST_APPLICATION_ABBREV; - assert(AbbrevNo < CurAbbrevs.size() && "Invalid abbrev #!"); - const BitCodeAbbrev *Abbv = CurAbbrevs[AbbrevNo].get(); - - EmitCode(Abbrev); - - unsigned i = 0, e = static_cast(Abbv->getNumOperandInfos()); - if (Code) { - assert(e && "Expected non-empty abbreviation"); - const BitCodeAbbrevOp &Op = Abbv->getOperandInfo(i++); - - if (Op.isLiteral()) - EmitAbbreviatedLiteral(Op, Code.getValue()); - else { - assert(Op.getEncoding() != BitCodeAbbrevOp::Array && - Op.getEncoding() != BitCodeAbbrevOp::Blob && - "Expected literal or scalar"); - EmitAbbreviatedField(Op, Code.getValue()); - } - } - - unsigned RecordIdx = 0; - for (; i != e; ++i) { - const BitCodeAbbrevOp &Op = Abbv->getOperandInfo(i); - if (Op.isLiteral()) { - assert(RecordIdx < Vals.size() && "Invalid abbrev/record"); - EmitAbbreviatedLiteral(Op, Vals[RecordIdx]); - ++RecordIdx; - } else if (Op.getEncoding() == BitCodeAbbrevOp::Array) { - // Array case. - assert(i + 2 == e && "array op not second to last?"); - const BitCodeAbbrevOp &EltEnc = Abbv->getOperandInfo(++i); - - // If this record has blob data, emit it, otherwise we must have record - // entries to encode this way. - if (BlobData) { - assert(RecordIdx == Vals.size() && - "Blob data and record entries specified for array!"); - // Emit a vbr6 to indicate the number of elements present. - EmitVBR(static_cast(BlobLen), 6); - - // Emit each field. - for (unsigned i = 0; i != BlobLen; ++i) - EmitAbbreviatedField(EltEnc, (unsigned char)BlobData[i]); - - // Know that blob data is consumed for assertion below. - BlobData = nullptr; - } else { - // Emit a vbr6 to indicate the number of elements present. - EmitVBR(static_cast(Vals.size()-RecordIdx), 6); - - // Emit each field. - for (unsigned e = Vals.size(); RecordIdx != e; ++RecordIdx) - EmitAbbreviatedField(EltEnc, Vals[RecordIdx]); - } - } else if (Op.getEncoding() == BitCodeAbbrevOp::Blob) { - // If this record has blob data, emit it, otherwise we must have record - // entries to encode this way. - - if (BlobData) { - assert(RecordIdx == Vals.size() && - "Blob data and record entries specified for blob operand!"); - - assert(Blob.data() == BlobData && "BlobData got moved"); - assert(Blob.size() == BlobLen && "BlobLen got changed"); - emitBlob(Blob); - BlobData = nullptr; - } else { - emitBlob(Vals.slice(RecordIdx)); - } - } else { // Single scalar field. - assert(RecordIdx < Vals.size() && "Invalid abbrev/record"); - EmitAbbreviatedField(Op, Vals[RecordIdx]); - ++RecordIdx; - } - } - assert(RecordIdx == Vals.size() && "Not all record operands emitted!"); - assert(BlobData == nullptr && - "Blob data specified for record that doesn't use it!"); - } - -public: - /// Emit a blob, including flushing before and tail-padding. - template - void emitBlob(ArrayRef Bytes, bool ShouldEmitSize = true) { - // Emit a vbr6 to indicate the number of elements present. - if (ShouldEmitSize) - EmitVBR(static_cast(Bytes.size()), 6); - - // Flush to a 32-bit alignment boundary. - FlushToWord(); - - // Emit literal bytes. - for (const auto &B : Bytes) { - assert(isUInt<8>(B) && "Value too large to emit as byte"); - WriteByte((unsigned char)B); - } - - // Align end to 32-bits. - while (GetBufferOffset() & 3) - WriteByte(0); - } - void emitBlob(StringRef Bytes, bool ShouldEmitSize = true) { - emitBlob(makeArrayRef((const uint8_t *)Bytes.data(), Bytes.size()), - ShouldEmitSize); - } - - /// EmitRecord - Emit the specified record to the stream, using an abbrev if - /// we have one to compress the output. - template - void EmitRecord(unsigned Code, const Container &Vals, unsigned Abbrev = 0) { - if (!Abbrev) { - // If we don't have an abbrev to use, emit this in its fully unabbreviated - // form. - auto Count = static_cast(makeArrayRef(Vals).size()); - EmitCode(bitc::UNABBREV_RECORD); - EmitVBR(Code, 6); - EmitVBR(Count, 6); - for (unsigned i = 0, e = Count; i != e; ++i) - EmitVBR64(Vals[i], 6); - return; - } - - EmitRecordWithAbbrevImpl(Abbrev, makeArrayRef(Vals), StringRef(), Code); - } - - /// EmitRecordWithAbbrev - Emit a record with the specified abbreviation. - /// Unlike EmitRecord, the code for the record should be included in Vals as - /// the first entry. - template - void EmitRecordWithAbbrev(unsigned Abbrev, const Container &Vals) { - EmitRecordWithAbbrevImpl(Abbrev, makeArrayRef(Vals), StringRef(), None); - } - - /// EmitRecordWithBlob - Emit the specified record to the stream, using an - /// abbrev that includes a blob at the end. The blob data to emit is - /// specified by the pointer and length specified at the end. In contrast to - /// EmitRecord, this routine expects that the first entry in Vals is the code - /// of the record. - template - void EmitRecordWithBlob(unsigned Abbrev, const Container &Vals, - StringRef Blob) { - EmitRecordWithAbbrevImpl(Abbrev, makeArrayRef(Vals), Blob, None); - } - template - void EmitRecordWithBlob(unsigned Abbrev, const Container &Vals, - const char *BlobData, unsigned BlobLen) { - return EmitRecordWithAbbrevImpl(Abbrev, makeArrayRef(Vals), - StringRef(BlobData, BlobLen), None); - } - - /// EmitRecordWithArray - Just like EmitRecordWithBlob, works with records - /// that end with an array. - template - void EmitRecordWithArray(unsigned Abbrev, const Container &Vals, - StringRef Array) { - EmitRecordWithAbbrevImpl(Abbrev, makeArrayRef(Vals), Array, None); - } - template - void EmitRecordWithArray(unsigned Abbrev, const Container &Vals, - const char *ArrayData, unsigned ArrayLen) { - return EmitRecordWithAbbrevImpl(Abbrev, makeArrayRef(Vals), - StringRef(ArrayData, ArrayLen), None); - } - - //===--------------------------------------------------------------------===// - // Abbrev Emission - //===--------------------------------------------------------------------===// - -private: - // Emit the abbreviation as a DEFINE_ABBREV record. - void EncodeAbbrev(BitCodeAbbrev *Abbv) { - EmitCode(bitc::DEFINE_ABBREV); - EmitVBR(Abbv->getNumOperandInfos(), 5); - for (unsigned i = 0, e = static_cast(Abbv->getNumOperandInfos()); - i != e; ++i) { - const BitCodeAbbrevOp &Op = Abbv->getOperandInfo(i); - Emit(Op.isLiteral(), 1); - if (Op.isLiteral()) { - EmitVBR64(Op.getLiteralValue(), 8); - } else { - Emit(Op.getEncoding(), 3); - if (Op.hasEncodingData()) - EmitVBR64(Op.getEncodingData(), 5); - } - } - } -public: - - /// EmitAbbrev - This emits an abbreviation to the stream. Note that this - /// method takes ownership of the specified abbrev. - unsigned EmitAbbrev(BitCodeAbbrev *Abbv) { - // Emit the abbreviation as a record. - EncodeAbbrev(Abbv); - CurAbbrevs.push_back(Abbv); - return static_cast(CurAbbrevs.size())-1 + - bitc::FIRST_APPLICATION_ABBREV; - } - - //===--------------------------------------------------------------------===// - // BlockInfo Block Emission - //===--------------------------------------------------------------------===// - - /// EnterBlockInfoBlock - Start emitting the BLOCKINFO_BLOCK. - void EnterBlockInfoBlock(unsigned CodeWidth) { - EnterSubblock(bitc::BLOCKINFO_BLOCK_ID, CodeWidth); - BlockInfoCurBID = ~0U; - } -private: - /// SwitchToBlockID - If we aren't already talking about the specified block - /// ID, emit a BLOCKINFO_CODE_SETBID record. - void SwitchToBlockID(unsigned BlockID) { - if (BlockInfoCurBID == BlockID) return; - SmallVector V; - V.push_back(BlockID); - EmitRecord(bitc::BLOCKINFO_CODE_SETBID, V); - BlockInfoCurBID = BlockID; - } - - BlockInfo &getOrCreateBlockInfo(unsigned BlockID) { - if (BlockInfo *BI = getBlockInfo(BlockID)) - return *BI; - - // Otherwise, add a new record. - BlockInfoRecords.emplace_back(); - BlockInfoRecords.back().BlockID = BlockID; - return BlockInfoRecords.back(); - } - -public: - - /// EmitBlockInfoAbbrev - Emit a DEFINE_ABBREV record for the specified - /// BlockID. - unsigned EmitBlockInfoAbbrev(unsigned BlockID, BitCodeAbbrev *Abbv) { - SwitchToBlockID(BlockID); - EncodeAbbrev(Abbv); - - // Add the abbrev to the specified block record. - BlockInfo &Info = getOrCreateBlockInfo(BlockID); - Info.Abbrevs.push_back(Abbv); - - return Info.Abbrevs.size()-1+bitc::FIRST_APPLICATION_ABBREV; - } -}; - - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Bitcode/LLVMBitCodes.h b/llvm/include/llvm/Bitcode/LLVMBitCodes.h deleted file mode 100644 index 52d4f01b..00000000 --- a/llvm/include/llvm/Bitcode/LLVMBitCodes.h +++ /dev/null @@ -1,539 +0,0 @@ -//===- LLVMBitCodes.h - Enum values for the LLVM bitcode format -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header defines Bitcode enum values for LLVM IR bitcode files. -// -// The enum values defined in this file should be considered permanent. If -// new features are added, they should have values added at the end of the -// respective lists. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_BITCODE_LLVMBITCODES_H -#define LLVM_BITCODE_LLVMBITCODES_H - -#include "llvm/Bitcode/BitCodes.h" - -namespace llvm { -namespace bitc { -// The only top-level block type defined is for a module. -enum BlockIDs { - // Blocks - MODULE_BLOCK_ID = FIRST_APPLICATION_BLOCKID, - - // Module sub-block id's. - PARAMATTR_BLOCK_ID, - PARAMATTR_GROUP_BLOCK_ID, - - CONSTANTS_BLOCK_ID, - FUNCTION_BLOCK_ID, - - // Block intended to contains information on the bitcode versioning. - // Can be used to provide better error messages when we fail to parse a - // bitcode file. - IDENTIFICATION_BLOCK_ID, - - VALUE_SYMTAB_BLOCK_ID, - METADATA_BLOCK_ID, - METADATA_ATTACHMENT_ID, - - TYPE_BLOCK_ID_NEW, - - USELIST_BLOCK_ID, - - MODULE_STRTAB_BLOCK_ID, - GLOBALVAL_SUMMARY_BLOCK_ID, - - OPERAND_BUNDLE_TAGS_BLOCK_ID, - - METADATA_KIND_BLOCK_ID -}; - -/// Identification block contains a string that describes the producer details, -/// and an epoch that defines the auto-upgrade capability. -enum IdentificationCodes { - IDENTIFICATION_CODE_STRING = 1, // IDENTIFICATION: [strchr x N] - IDENTIFICATION_CODE_EPOCH = 2, // EPOCH: [epoch#] -}; - -/// The epoch that defines the auto-upgrade compatibility for the bitcode. -/// -/// LLVM guarantees in a major release that a minor release can read bitcode -/// generated by previous minor releases. We translate this by making the reader -/// accepting only bitcode with the same epoch, except for the X.0 release which -/// also accepts N-1. -enum { BITCODE_CURRENT_EPOCH = 0 }; - -/// MODULE blocks have a number of optional fields and subblocks. -enum ModuleCodes { - MODULE_CODE_VERSION = 1, // VERSION: [version#] - MODULE_CODE_TRIPLE = 2, // TRIPLE: [strchr x N] - MODULE_CODE_DATALAYOUT = 3, // DATALAYOUT: [strchr x N] - MODULE_CODE_ASM = 4, // ASM: [strchr x N] - MODULE_CODE_SECTIONNAME = 5, // SECTIONNAME: [strchr x N] - - // FIXME: Remove DEPLIB in 4.0. - MODULE_CODE_DEPLIB = 6, // DEPLIB: [strchr x N] - - // GLOBALVAR: [pointer type, isconst, initid, - // linkage, alignment, section, visibility, threadlocal] - MODULE_CODE_GLOBALVAR = 7, - - // FUNCTION: [type, callingconv, isproto, linkage, paramattrs, alignment, - // section, visibility, gc, unnamed_addr] - MODULE_CODE_FUNCTION = 8, - - // ALIAS: [alias type, aliasee val#, linkage, visibility] - MODULE_CODE_ALIAS_OLD = 9, - - // MODULE_CODE_PURGEVALS: [numvals] - MODULE_CODE_PURGEVALS = 10, - - MODULE_CODE_GCNAME = 11, // GCNAME: [strchr x N] - MODULE_CODE_COMDAT = 12, // COMDAT: [selection_kind, name] - - MODULE_CODE_VSTOFFSET = 13, // VSTOFFSET: [offset] - - // ALIAS: [alias value type, addrspace, aliasee val#, linkage, visibility] - MODULE_CODE_ALIAS = 14, - - MODULE_CODE_METADATA_VALUES_UNUSED = 15, - - // SOURCE_FILENAME: [namechar x N] - MODULE_CODE_SOURCE_FILENAME = 16, - - // HASH: [5*i32] - MODULE_CODE_HASH = 17, - - // IFUNC: [ifunc value type, addrspace, resolver val#, linkage, visibility] - MODULE_CODE_IFUNC = 18, -}; - -/// PARAMATTR blocks have code for defining a parameter attribute set. -enum AttributeCodes { - // FIXME: Remove `PARAMATTR_CODE_ENTRY_OLD' in 4.0 - PARAMATTR_CODE_ENTRY_OLD = 1, // ENTRY: [paramidx0, attr0, - // paramidx1, attr1...] - PARAMATTR_CODE_ENTRY = 2, // ENTRY: [paramidx0, attrgrp0, - // paramidx1, attrgrp1, ...] - PARAMATTR_GRP_CODE_ENTRY = 3 // ENTRY: [id, attr0, att1, ...] -}; - -/// TYPE blocks have codes for each type primitive they use. -enum TypeCodes { - TYPE_CODE_NUMENTRY = 1, // NUMENTRY: [numentries] - - // Type Codes - TYPE_CODE_VOID = 2, // VOID - TYPE_CODE_FLOAT = 3, // FLOAT - TYPE_CODE_DOUBLE = 4, // DOUBLE - TYPE_CODE_LABEL = 5, // LABEL - TYPE_CODE_OPAQUE = 6, // OPAQUE - TYPE_CODE_INTEGER = 7, // INTEGER: [width] - TYPE_CODE_POINTER = 8, // POINTER: [pointee type] - - TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty, - // paramty x N] - - TYPE_CODE_HALF = 10, // HALF - - TYPE_CODE_ARRAY = 11, // ARRAY: [numelts, eltty] - TYPE_CODE_VECTOR = 12, // VECTOR: [numelts, eltty] - - // These are not with the other floating point types because they're - // a late addition, and putting them in the right place breaks - // binary compatibility. - TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE - TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa) - TYPE_CODE_PPC_FP128 = 15, // PPC LONG DOUBLE (2 doubles) - - TYPE_CODE_METADATA = 16, // METADATA - - TYPE_CODE_X86_MMX = 17, // X86 MMX - - TYPE_CODE_STRUCT_ANON = 18, // STRUCT_ANON: [ispacked, eltty x N] - TYPE_CODE_STRUCT_NAME = 19, // STRUCT_NAME: [strchr x N] - TYPE_CODE_STRUCT_NAMED = 20, // STRUCT_NAMED: [ispacked, eltty x N] - - TYPE_CODE_FUNCTION = 21, // FUNCTION: [vararg, retty, paramty x N] - - TYPE_CODE_TOKEN = 22 // TOKEN -}; - -enum OperandBundleTagCode { - OPERAND_BUNDLE_TAG = 1, // TAG: [strchr x N] -}; - -// The type symbol table only has one code (TST_ENTRY_CODE). -enum TypeSymtabCodes { - TST_CODE_ENTRY = 1 // TST_ENTRY: [typeid, namechar x N] -}; - -// Value symbol table codes. -enum ValueSymtabCodes { - VST_CODE_ENTRY = 1, // VST_ENTRY: [valueid, namechar x N] - VST_CODE_BBENTRY = 2, // VST_BBENTRY: [bbid, namechar x N] - VST_CODE_FNENTRY = 3, // VST_FNENTRY: [valueid, offset, namechar x N] - // VST_COMBINED_ENTRY: [valueid, refguid] - VST_CODE_COMBINED_ENTRY = 5 -}; - -// The module path symbol table only has one code (MST_CODE_ENTRY). -enum ModulePathSymtabCodes { - MST_CODE_ENTRY = 1, // MST_ENTRY: [modid, namechar x N] - MST_CODE_HASH = 2, // MST_HASH: [5*i32] -}; - -// The summary section uses different codes in the per-module -// and combined index cases. -enum GlobalValueSummarySymtabCodes { - // PERMODULE: [valueid, flags, instcount, numrefs, numrefs x valueid, - // n x (valueid, callsitecount)] - FS_PERMODULE = 1, - // PERMODULE_PROFILE: [valueid, flags, instcount, numrefs, - // numrefs x valueid, - // n x (valueid, callsitecount, profilecount)] - FS_PERMODULE_PROFILE = 2, - // PERMODULE_GLOBALVAR_INIT_REFS: [valueid, flags, n x valueid] - FS_PERMODULE_GLOBALVAR_INIT_REFS = 3, - // COMBINED: [valueid, modid, flags, instcount, numrefs, numrefs x valueid, - // n x (valueid, callsitecount)] - FS_COMBINED = 4, - // COMBINED_PROFILE: [valueid, modid, flags, instcount, numrefs, - // numrefs x valueid, - // n x (valueid, callsitecount, profilecount)] - FS_COMBINED_PROFILE = 5, - // COMBINED_GLOBALVAR_INIT_REFS: [valueid, modid, flags, n x valueid] - FS_COMBINED_GLOBALVAR_INIT_REFS = 6, - // ALIAS: [valueid, flags, valueid] - FS_ALIAS = 7, - // COMBINED_ALIAS: [valueid, modid, flags, valueid] - FS_COMBINED_ALIAS = 8, - // COMBINED_ORIGINAL_NAME: [original_name_hash] - FS_COMBINED_ORIGINAL_NAME = 9, - // VERSION of the summary, bumped when adding flags for instance. - FS_VERSION = 10, -}; - -enum MetadataCodes { - METADATA_STRING_OLD = 1, // MDSTRING: [values] - METADATA_VALUE = 2, // VALUE: [type num, value num] - METADATA_NODE = 3, // NODE: [n x md num] - METADATA_NAME = 4, // STRING: [values] - METADATA_DISTINCT_NODE = 5, // DISTINCT_NODE: [n x md num] - METADATA_KIND = 6, // [n x [id, name]] - METADATA_LOCATION = 7, // [distinct, line, col, scope, inlined-at?] - METADATA_OLD_NODE = 8, // OLD_NODE: [n x (type num, value num)] - METADATA_OLD_FN_NODE = 9, // OLD_FN_NODE: [n x (type num, value num)] - METADATA_NAMED_NODE = 10, // NAMED_NODE: [n x mdnodes] - METADATA_ATTACHMENT = 11, // [m x [value, [n x [id, mdnode]]] - METADATA_GENERIC_DEBUG = 12, // [distinct, tag, vers, header, n x md num] - METADATA_SUBRANGE = 13, // [distinct, count, lo] - METADATA_ENUMERATOR = 14, // [distinct, value, name] - METADATA_BASIC_TYPE = 15, // [distinct, tag, name, size, align, enc] - METADATA_FILE = 16, // [distinct, filename, directory] - METADATA_DERIVED_TYPE = 17, // [distinct, ...] - METADATA_COMPOSITE_TYPE = 18, // [distinct, ...] - METADATA_SUBROUTINE_TYPE = 19, // [distinct, flags, types, cc] - METADATA_COMPILE_UNIT = 20, // [distinct, ...] - METADATA_SUBPROGRAM = 21, // [distinct, ...] - METADATA_LEXICAL_BLOCK = 22, // [distinct, scope, file, line, column] - METADATA_LEXICAL_BLOCK_FILE = 23, //[distinct, scope, file, discriminator] - METADATA_NAMESPACE = 24, // [distinct, scope, file, name, line] - METADATA_TEMPLATE_TYPE = 25, // [distinct, scope, name, type, ...] - METADATA_TEMPLATE_VALUE = 26, // [distinct, scope, name, type, value, ...] - METADATA_GLOBAL_VAR = 27, // [distinct, ...] - METADATA_LOCAL_VAR = 28, // [distinct, ...] - METADATA_EXPRESSION = 29, // [distinct, n x element] - METADATA_OBJC_PROPERTY = 30, // [distinct, name, file, line, ...] - METADATA_IMPORTED_ENTITY = 31, // [distinct, tag, scope, entity, line, name] - METADATA_MODULE = 32, // [distinct, scope, name, ...] - METADATA_MACRO = 33, // [distinct, macinfo, line, name, value] - METADATA_MACRO_FILE = 34, // [distinct, macinfo, line, file, ...] - METADATA_STRINGS = 35, // [count, offset] blob([lengths][chars]) - METADATA_GLOBAL_DECL_ATTACHMENT = 36, // [valueid, n x [id, mdnode]] -}; - -// The constants block (CONSTANTS_BLOCK_ID) describes emission for each -// constant and maintains an implicit current type value. -enum ConstantsCodes { - CST_CODE_SETTYPE = 1, // SETTYPE: [typeid] - CST_CODE_NULL = 2, // NULL - CST_CODE_UNDEF = 3, // UNDEF - CST_CODE_INTEGER = 4, // INTEGER: [intval] - CST_CODE_WIDE_INTEGER = 5, // WIDE_INTEGER: [n x intval] - CST_CODE_FLOAT = 6, // FLOAT: [fpval] - CST_CODE_AGGREGATE = 7, // AGGREGATE: [n x value number] - CST_CODE_STRING = 8, // STRING: [values] - CST_CODE_CSTRING = 9, // CSTRING: [values] - CST_CODE_CE_BINOP = 10, // CE_BINOP: [opcode, opval, opval] - CST_CODE_CE_CAST = 11, // CE_CAST: [opcode, opty, opval] - CST_CODE_CE_GEP = 12, // CE_GEP: [n x operands] - CST_CODE_CE_SELECT = 13, // CE_SELECT: [opval, opval, opval] - CST_CODE_CE_EXTRACTELT = 14, // CE_EXTRACTELT: [opty, opval, opval] - CST_CODE_CE_INSERTELT = 15, // CE_INSERTELT: [opval, opval, opval] - CST_CODE_CE_SHUFFLEVEC = 16, // CE_SHUFFLEVEC: [opval, opval, opval] - CST_CODE_CE_CMP = 17, // CE_CMP: [opty, opval, opval, pred] - CST_CODE_INLINEASM_OLD = 18, // INLINEASM: [sideeffect|alignstack, - // asmstr,conststr] - CST_CODE_CE_SHUFVEC_EX = 19, // SHUFVEC_EX: [opty, opval, opval, opval] - CST_CODE_CE_INBOUNDS_GEP = 20, // INBOUNDS_GEP: [n x operands] - CST_CODE_BLOCKADDRESS = 21, // CST_CODE_BLOCKADDRESS [fnty, fnval, bb#] - CST_CODE_DATA = 22, // DATA: [n x elements] - CST_CODE_INLINEASM = 23 // INLINEASM: [sideeffect|alignstack| - // asmdialect,asmstr,conststr] -}; - -/// CastOpcodes - These are values used in the bitcode files to encode which -/// cast a CST_CODE_CE_CAST or a XXX refers to. The values of these enums -/// have no fixed relation to the LLVM IR enum values. Changing these will -/// break compatibility with old files. -enum CastOpcodes { - CAST_TRUNC = 0, - CAST_ZEXT = 1, - CAST_SEXT = 2, - CAST_FPTOUI = 3, - CAST_FPTOSI = 4, - CAST_UITOFP = 5, - CAST_SITOFP = 6, - CAST_FPTRUNC = 7, - CAST_FPEXT = 8, - CAST_PTRTOINT = 9, - CAST_INTTOPTR = 10, - CAST_BITCAST = 11, - CAST_ADDRSPACECAST = 12 -}; - -/// BinaryOpcodes - These are values used in the bitcode files to encode which -/// binop a CST_CODE_CE_BINOP or a XXX refers to. The values of these enums -/// have no fixed relation to the LLVM IR enum values. Changing these will -/// break compatibility with old files. -enum BinaryOpcodes { - BINOP_ADD = 0, - BINOP_SUB = 1, - BINOP_MUL = 2, - BINOP_UDIV = 3, - BINOP_SDIV = 4, // overloaded for FP - BINOP_UREM = 5, - BINOP_SREM = 6, // overloaded for FP - BINOP_SHL = 7, - BINOP_LSHR = 8, - BINOP_ASHR = 9, - BINOP_AND = 10, - BINOP_OR = 11, - BINOP_XOR = 12 -}; - -/// These are values used in the bitcode files to encode AtomicRMW operations. -/// The values of these enums have no fixed relation to the LLVM IR enum -/// values. Changing these will break compatibility with old files. -enum RMWOperations { - RMW_XCHG = 0, - RMW_ADD = 1, - RMW_SUB = 2, - RMW_AND = 3, - RMW_NAND = 4, - RMW_OR = 5, - RMW_XOR = 6, - RMW_MAX = 7, - RMW_MIN = 8, - RMW_UMAX = 9, - RMW_UMIN = 10 -}; - -/// OverflowingBinaryOperatorOptionalFlags - Flags for serializing -/// OverflowingBinaryOperator's SubclassOptionalData contents. -enum OverflowingBinaryOperatorOptionalFlags { - OBO_NO_UNSIGNED_WRAP = 0, - OBO_NO_SIGNED_WRAP = 1 -}; - -/// PossiblyExactOperatorOptionalFlags - Flags for serializing -/// PossiblyExactOperator's SubclassOptionalData contents. -enum PossiblyExactOperatorOptionalFlags { PEO_EXACT = 0 }; - -/// Encoded AtomicOrdering values. -enum AtomicOrderingCodes { - ORDERING_NOTATOMIC = 0, - ORDERING_UNORDERED = 1, - ORDERING_MONOTONIC = 2, - ORDERING_ACQUIRE = 3, - ORDERING_RELEASE = 4, - ORDERING_ACQREL = 5, - ORDERING_SEQCST = 6 -}; - -/// Encoded SynchronizationScope values. -enum AtomicSynchScopeCodes { - SYNCHSCOPE_SINGLETHREAD = 0, - SYNCHSCOPE_CROSSTHREAD = 1 -}; - -/// Markers and flags for call instruction. -enum CallMarkersFlags { - CALL_TAIL = 0, - CALL_CCONV = 1, - CALL_MUSTTAIL = 14, - CALL_EXPLICIT_TYPE = 15, - CALL_NOTAIL = 16, - CALL_FMF = 17 // Call has optional fast-math-flags. -}; - -// The function body block (FUNCTION_BLOCK_ID) describes function bodies. It -// can contain a constant block (CONSTANTS_BLOCK_ID). -enum FunctionCodes { - FUNC_CODE_DECLAREBLOCKS = 1, // DECLAREBLOCKS: [n] - - FUNC_CODE_INST_BINOP = 2, // BINOP: [opcode, ty, opval, opval] - FUNC_CODE_INST_CAST = 3, // CAST: [opcode, ty, opty, opval] - FUNC_CODE_INST_GEP_OLD = 4, // GEP: [n x operands] - FUNC_CODE_INST_SELECT = 5, // SELECT: [ty, opval, opval, opval] - FUNC_CODE_INST_EXTRACTELT = 6, // EXTRACTELT: [opty, opval, opval] - FUNC_CODE_INST_INSERTELT = 7, // INSERTELT: [ty, opval, opval, opval] - FUNC_CODE_INST_SHUFFLEVEC = 8, // SHUFFLEVEC: [ty, opval, opval, opval] - FUNC_CODE_INST_CMP = 9, // CMP: [opty, opval, opval, pred] - - FUNC_CODE_INST_RET = 10, // RET: [opty,opval] - FUNC_CODE_INST_BR = 11, // BR: [bb#, bb#, cond] or [bb#] - FUNC_CODE_INST_SWITCH = 12, // SWITCH: [opty, op0, op1, ...] - FUNC_CODE_INST_INVOKE = 13, // INVOKE: [attr, fnty, op0,op1, ...] - // 14 is unused. - FUNC_CODE_INST_UNREACHABLE = 15, // UNREACHABLE - - FUNC_CODE_INST_PHI = 16, // PHI: [ty, val0,bb0, ...] - // 17 is unused. - // 18 is unused. - FUNC_CODE_INST_ALLOCA = 19, // ALLOCA: [instty, opty, op, align] - FUNC_CODE_INST_LOAD = 20, // LOAD: [opty, op, align, vol] - // 21 is unused. - // 22 is unused. - FUNC_CODE_INST_VAARG = 23, // VAARG: [valistty, valist, instty] - // This store code encodes the pointer type, rather than the value type - // this is so information only available in the pointer type (e.g. address - // spaces) is retained. - FUNC_CODE_INST_STORE_OLD = 24, // STORE: [ptrty,ptr,val, align, vol] - // 25 is unused. - FUNC_CODE_INST_EXTRACTVAL = 26, // EXTRACTVAL: [n x operands] - FUNC_CODE_INST_INSERTVAL = 27, // INSERTVAL: [n x operands] - // fcmp/icmp returning Int1TY or vector of Int1Ty. Same as CMP, exists to - // support legacy vicmp/vfcmp instructions. - FUNC_CODE_INST_CMP2 = 28, // CMP2: [opty, opval, opval, pred] - // new select on i1 or [N x i1] - FUNC_CODE_INST_VSELECT = 29, // VSELECT: [ty,opval,opval,predty,pred] - FUNC_CODE_INST_INBOUNDS_GEP_OLD = 30, // INBOUNDS_GEP: [n x operands] - FUNC_CODE_INST_INDIRECTBR = 31, // INDIRECTBR: [opty, op0, op1, ...] - // 32 is unused. - FUNC_CODE_DEBUG_LOC_AGAIN = 33, // DEBUG_LOC_AGAIN - - FUNC_CODE_INST_CALL = 34, // CALL: [attr, cc, fnty, fnid, args...] - - FUNC_CODE_DEBUG_LOC = 35, // DEBUG_LOC: [Line,Col,ScopeVal, IAVal] - FUNC_CODE_INST_FENCE = 36, // FENCE: [ordering, synchscope] - FUNC_CODE_INST_CMPXCHG_OLD = 37, // CMPXCHG: [ptrty,ptr,cmp,new, align, vol, - // ordering, synchscope] - FUNC_CODE_INST_ATOMICRMW = 38, // ATOMICRMW: [ptrty,ptr,val, operation, - // align, vol, - // ordering, synchscope] - FUNC_CODE_INST_RESUME = 39, // RESUME: [opval] - FUNC_CODE_INST_LANDINGPAD_OLD = - 40, // LANDINGPAD: [ty,val,val,num,id0,val0...] - FUNC_CODE_INST_LOADATOMIC = 41, // LOAD: [opty, op, align, vol, - // ordering, synchscope] - FUNC_CODE_INST_STOREATOMIC_OLD = 42, // STORE: [ptrty,ptr,val, align, vol - // ordering, synchscope] - FUNC_CODE_INST_GEP = 43, // GEP: [inbounds, n x operands] - FUNC_CODE_INST_STORE = 44, // STORE: [ptrty,ptr,valty,val, align, vol] - FUNC_CODE_INST_STOREATOMIC = 45, // STORE: [ptrty,ptr,val, align, vol - FUNC_CODE_INST_CMPXCHG = 46, // CMPXCHG: [ptrty,ptr,valty,cmp,new, align, - // vol,ordering,synchscope] - FUNC_CODE_INST_LANDINGPAD = 47, // LANDINGPAD: [ty,val,num,id0,val0...] - FUNC_CODE_INST_CLEANUPRET = 48, // CLEANUPRET: [val] or [val,bb#] - FUNC_CODE_INST_CATCHRET = 49, // CATCHRET: [val,bb#] - FUNC_CODE_INST_CATCHPAD = 50, // CATCHPAD: [bb#,bb#,num,args...] - FUNC_CODE_INST_CLEANUPPAD = 51, // CLEANUPPAD: [num,args...] - FUNC_CODE_INST_CATCHSWITCH = - 52, // CATCHSWITCH: [num,args...] or [num,args...,bb] - // 53 is unused. - // 54 is unused. - FUNC_CODE_OPERAND_BUNDLE = 55, // OPERAND_BUNDLE: [tag#, value...] -}; - -enum UseListCodes { - USELIST_CODE_DEFAULT = 1, // DEFAULT: [index..., value-id] - USELIST_CODE_BB = 2 // BB: [index..., bb-id] -}; - -enum AttributeKindCodes { - // = 0 is unused - ATTR_KIND_ALIGNMENT = 1, - ATTR_KIND_ALWAYS_INLINE = 2, - ATTR_KIND_BY_VAL = 3, - ATTR_KIND_INLINE_HINT = 4, - ATTR_KIND_IN_REG = 5, - ATTR_KIND_MIN_SIZE = 6, - ATTR_KIND_NAKED = 7, - ATTR_KIND_NEST = 8, - ATTR_KIND_NO_ALIAS = 9, - ATTR_KIND_NO_BUILTIN = 10, - ATTR_KIND_NO_CAPTURE = 11, - ATTR_KIND_NO_DUPLICATE = 12, - ATTR_KIND_NO_IMPLICIT_FLOAT = 13, - ATTR_KIND_NO_INLINE = 14, - ATTR_KIND_NON_LAZY_BIND = 15, - ATTR_KIND_NO_RED_ZONE = 16, - ATTR_KIND_NO_RETURN = 17, - ATTR_KIND_NO_UNWIND = 18, - ATTR_KIND_OPTIMIZE_FOR_SIZE = 19, - ATTR_KIND_READ_NONE = 20, - ATTR_KIND_READ_ONLY = 21, - ATTR_KIND_RETURNED = 22, - ATTR_KIND_RETURNS_TWICE = 23, - ATTR_KIND_S_EXT = 24, - ATTR_KIND_STACK_ALIGNMENT = 25, - ATTR_KIND_STACK_PROTECT = 26, - ATTR_KIND_STACK_PROTECT_REQ = 27, - ATTR_KIND_STACK_PROTECT_STRONG = 28, - ATTR_KIND_STRUCT_RET = 29, - ATTR_KIND_SANITIZE_ADDRESS = 30, - ATTR_KIND_SANITIZE_THREAD = 31, - ATTR_KIND_SANITIZE_MEMORY = 32, - ATTR_KIND_UW_TABLE = 33, - ATTR_KIND_Z_EXT = 34, - ATTR_KIND_BUILTIN = 35, - ATTR_KIND_COLD = 36, - ATTR_KIND_OPTIMIZE_NONE = 37, - ATTR_KIND_IN_ALLOCA = 38, - ATTR_KIND_NON_NULL = 39, - ATTR_KIND_JUMP_TABLE = 40, - ATTR_KIND_DEREFERENCEABLE = 41, - ATTR_KIND_DEREFERENCEABLE_OR_NULL = 42, - ATTR_KIND_CONVERGENT = 43, - ATTR_KIND_SAFESTACK = 44, - ATTR_KIND_ARGMEMONLY = 45, - ATTR_KIND_SWIFT_SELF = 46, - ATTR_KIND_SWIFT_ERROR = 47, - ATTR_KIND_NO_RECURSE = 48, - ATTR_KIND_INACCESSIBLEMEM_ONLY = 49, - ATTR_KIND_INACCESSIBLEMEM_OR_ARGMEMONLY = 50, - ATTR_KIND_ALLOC_SIZE = 51, - ATTR_KIND_WRITEONLY = 52 -}; - -enum ComdatSelectionKindCodes { - COMDAT_SELECTION_KIND_ANY = 1, - COMDAT_SELECTION_KIND_EXACT_MATCH = 2, - COMDAT_SELECTION_KIND_LARGEST = 3, - COMDAT_SELECTION_KIND_NO_DUPLICATES = 4, - COMDAT_SELECTION_KIND_SAME_SIZE = 5, -}; - -} // End bitc namespace -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Bitcode/ReaderWriter.h b/llvm/include/llvm/Bitcode/ReaderWriter.h deleted file mode 100644 index 76a60a0b..00000000 --- a/llvm/include/llvm/Bitcode/ReaderWriter.h +++ /dev/null @@ -1,212 +0,0 @@ -//===-- llvm/Bitcode/ReaderWriter.h - Bitcode reader/writers ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header defines interfaces to read and write LLVM bitcode files/streams. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_BITCODE_READERWRITER_H -#define LLVM_BITCODE_READERWRITER_H - -#include "llvm/IR/DiagnosticInfo.h" -#include "llvm/IR/ModuleSummaryIndex.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/ErrorOr.h" -#include "llvm/Support/MemoryBuffer.h" -#include -#include - -namespace llvm { - class BitstreamWriter; - class DataStreamer; - class LLVMContext; - class Module; - class ModulePass; - class raw_ostream; - - /// Offsets of the 32-bit fields of bitcode wrapper header. - static const unsigned BWH_MagicField = 0*4; - static const unsigned BWH_VersionField = 1*4; - static const unsigned BWH_OffsetField = 2*4; - static const unsigned BWH_SizeField = 3*4; - static const unsigned BWH_CPUTypeField = 4*4; - static const unsigned BWH_HeaderSize = 5*4; - - /// Read the header of the specified bitcode buffer and prepare for lazy - /// deserialization of function bodies. If ShouldLazyLoadMetadata is true, - /// lazily load metadata as well. If successful, this moves Buffer. On - /// error, this *does not* move Buffer. - ErrorOr> - getLazyBitcodeModule(std::unique_ptr &&Buffer, - LLVMContext &Context, - bool ShouldLazyLoadMetadata = false); - - /// Read the header of the specified stream and prepare for lazy - /// deserialization and streaming of function bodies. - ErrorOr> - getStreamedBitcodeModule(StringRef Name, - std::unique_ptr Streamer, - LLVMContext &Context); - - /// Read the header of the specified bitcode buffer and extract just the - /// triple information. If successful, this returns a string. On error, this - /// returns "". - std::string getBitcodeTargetTriple(MemoryBufferRef Buffer, - LLVMContext &Context); - - /// Return true if \p Buffer contains a bitcode file with ObjC code (category - /// or class) in it. - bool isBitcodeContainingObjCCategory(MemoryBufferRef Buffer, - LLVMContext &Context); - - /// Read the header of the specified bitcode buffer and extract just the - /// producer string information. If successful, this returns a string. On - /// error, this returns "". - std::string getBitcodeProducerString(MemoryBufferRef Buffer, - LLVMContext &Context); - - /// Read the specified bitcode file, returning the module. - ErrorOr> parseBitcodeFile(MemoryBufferRef Buffer, - LLVMContext &Context); - - /// Check if the given bitcode buffer contains a summary block. - bool - hasGlobalValueSummary(MemoryBufferRef Buffer, - const DiagnosticHandlerFunction &DiagnosticHandler); - - /// Parse the specified bitcode buffer, returning the module summary index. - ErrorOr> - getModuleSummaryIndex(MemoryBufferRef Buffer, - const DiagnosticHandlerFunction &DiagnosticHandler); - - /// \brief Write the specified module to the specified raw output stream. - /// - /// For streams where it matters, the given stream should be in "binary" - /// mode. - /// - /// If \c ShouldPreserveUseListOrder, encode the use-list order for each \a - /// Value in \c M. These will be reconstructed exactly when \a M is - /// deserialized. - /// - /// If \c EmitSummaryIndex, emit the module's summary index (currently - /// for use in ThinLTO optimization). - void WriteBitcodeToFile(const Module *M, raw_ostream &Out, - bool ShouldPreserveUseListOrder = false, - const ModuleSummaryIndex *Index = nullptr, - bool GenerateHash = false); - - /// Write the specified module summary index to the given raw output stream, - /// where it will be written in a new bitcode block. This is used when - /// writing the combined index file for ThinLTO. When writing a subset of the - /// index for a distributed backend, provide the \p ModuleToSummariesForIndex - /// map. - void WriteIndexToFile(const ModuleSummaryIndex &Index, raw_ostream &Out, - std::map - *ModuleToSummariesForIndex = nullptr); - - /// isBitcodeWrapper - Return true if the given bytes are the magic bytes - /// for an LLVM IR bitcode wrapper. - /// - inline bool isBitcodeWrapper(const unsigned char *BufPtr, - const unsigned char *BufEnd) { - // See if you can find the hidden message in the magic bytes :-). - // (Hint: it's a little-endian encoding.) - return BufPtr != BufEnd && - BufPtr[0] == 0xDE && - BufPtr[1] == 0xC0 && - BufPtr[2] == 0x17 && - BufPtr[3] == 0x0B; - } - - /// isRawBitcode - Return true if the given bytes are the magic bytes for - /// raw LLVM IR bitcode (without a wrapper). - /// - inline bool isRawBitcode(const unsigned char *BufPtr, - const unsigned char *BufEnd) { - // These bytes sort of have a hidden message, but it's not in - // little-endian this time, and it's a little redundant. - return BufPtr != BufEnd && - BufPtr[0] == 'B' && - BufPtr[1] == 'C' && - BufPtr[2] == 0xc0 && - BufPtr[3] == 0xde; - } - - /// isBitcode - Return true if the given bytes are the magic bytes for - /// LLVM IR bitcode, either with or without a wrapper. - /// - inline bool isBitcode(const unsigned char *BufPtr, - const unsigned char *BufEnd) { - return isBitcodeWrapper(BufPtr, BufEnd) || - isRawBitcode(BufPtr, BufEnd); - } - - /// SkipBitcodeWrapperHeader - Some systems wrap bc files with a special - /// header for padding or other reasons. The format of this header is: - /// - /// struct bc_header { - /// uint32_t Magic; // 0x0B17C0DE - /// uint32_t Version; // Version, currently always 0. - /// uint32_t BitcodeOffset; // Offset to traditional bitcode file. - /// uint32_t BitcodeSize; // Size of traditional bitcode file. - /// ... potentially other gunk ... - /// }; - /// - /// This function is called when we find a file with a matching magic number. - /// In this case, skip down to the subsection of the file that is actually a - /// BC file. - /// If 'VerifyBufferSize' is true, check that the buffer is large enough to - /// contain the whole bitcode file. - inline bool SkipBitcodeWrapperHeader(const unsigned char *&BufPtr, - const unsigned char *&BufEnd, - bool VerifyBufferSize) { - // Must contain the offset and size field! - if (unsigned(BufEnd - BufPtr) < BWH_SizeField + 4) - return true; - - unsigned Offset = support::endian::read32le(&BufPtr[BWH_OffsetField]); - unsigned Size = support::endian::read32le(&BufPtr[BWH_SizeField]); - uint64_t BitcodeOffsetEnd = (uint64_t)Offset + (uint64_t)Size; - - // Verify that Offset+Size fits in the file. - if (VerifyBufferSize && BitcodeOffsetEnd > uint64_t(BufEnd-BufPtr)) - return true; - BufPtr += Offset; - BufEnd = BufPtr+Size; - return false; - } - - const std::error_category &BitcodeErrorCategory(); - enum class BitcodeError { InvalidBitcodeSignature = 1, CorruptedBitcode }; - inline std::error_code make_error_code(BitcodeError E) { - return std::error_code(static_cast(E), BitcodeErrorCategory()); - } - - class BitcodeDiagnosticInfo : public DiagnosticInfo { - const Twine &Msg; - std::error_code EC; - - public: - BitcodeDiagnosticInfo(std::error_code EC, DiagnosticSeverity Severity, - const Twine &Msg); - void print(DiagnosticPrinter &DP) const override; - std::error_code getError() const { return EC; } - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_Bitcode; - } - }; - -} // End llvm namespace - -namespace std { -template <> struct is_error_code_enum : std::true_type {}; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/Analysis.h b/llvm/include/llvm/CodeGen/Analysis.h deleted file mode 100644 index 2e4dc49a..00000000 --- a/llvm/include/llvm/CodeGen/Analysis.h +++ /dev/null @@ -1,128 +0,0 @@ -//===- CodeGen/Analysis.h - CodeGen LLVM IR Analysis Utilities --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares several CodeGen-specific LLVM IR analysis utilities. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_ANALYSIS_H -#define LLVM_CODEGEN_ANALYSIS_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/Triple.h" -#include "llvm/CodeGen/ISDOpcodes.h" -#include "llvm/IR/CallSite.h" -#include "llvm/IR/InlineAsm.h" -#include "llvm/IR/Instructions.h" -#include "llvm/Support/CodeGen.h" - -namespace llvm { -class GlobalValue; -class MachineBasicBlock; -class MachineFunction; -class TargetLoweringBase; -class TargetLowering; -class TargetMachine; -class SDNode; -class SDValue; -class SelectionDAG; -struct EVT; - -/// \brief Compute the linearized index of a member in a nested -/// aggregate/struct/array. -/// -/// Given an LLVM IR aggregate type and a sequence of insertvalue or -/// extractvalue indices that identify a member, return the linearized index of -/// the start of the member, i.e the number of element in memory before the -/// sought one. This is disconnected from the number of bytes. -/// -/// \param Ty is the type indexed by \p Indices. -/// \param Indices is an optional pointer in the indices list to the current -/// index. -/// \param IndicesEnd is the end of the indices list. -/// \param CurIndex is the current index in the recursion. -/// -/// \returns \p CurIndex plus the linear index in \p Ty the indices list. -unsigned ComputeLinearIndex(Type *Ty, - const unsigned *Indices, - const unsigned *IndicesEnd, - unsigned CurIndex = 0); - -inline unsigned ComputeLinearIndex(Type *Ty, - ArrayRef Indices, - unsigned CurIndex = 0) { - return ComputeLinearIndex(Ty, Indices.begin(), Indices.end(), CurIndex); -} - -/// ComputeValueVTs - Given an LLVM IR type, compute a sequence of -/// EVTs that represent all the individual underlying -/// non-aggregate types that comprise it. -/// -/// If Offsets is non-null, it points to a vector to be filled in -/// with the in-memory offsets of each of the individual values. -/// -void ComputeValueVTs(const TargetLowering &TLI, const DataLayout &DL, Type *Ty, - SmallVectorImpl &ValueVTs, - SmallVectorImpl *Offsets = nullptr, - uint64_t StartingOffset = 0); - -/// ExtractTypeInfo - Returns the type info, possibly bitcast, encoded in V. -GlobalValue *ExtractTypeInfo(Value *V); - -/// hasInlineAsmMemConstraint - Return true if the inline asm instruction being -/// processed uses a memory 'm' constraint. -bool hasInlineAsmMemConstraint(InlineAsm::ConstraintInfoVector &CInfos, - const TargetLowering &TLI); - -/// getFCmpCondCode - Return the ISD condition code corresponding to -/// the given LLVM IR floating-point condition code. This includes -/// consideration of global floating-point math flags. -/// -ISD::CondCode getFCmpCondCode(FCmpInst::Predicate Pred); - -/// getFCmpCodeWithoutNaN - Given an ISD condition code comparing floats, -/// return the equivalent code if we're allowed to assume that NaNs won't occur. -ISD::CondCode getFCmpCodeWithoutNaN(ISD::CondCode CC); - -/// getICmpCondCode - Return the ISD condition code corresponding to -/// the given LLVM IR integer condition code. -/// -ISD::CondCode getICmpCondCode(ICmpInst::Predicate Pred); - -/// Test if the given instruction is in a position to be optimized -/// with a tail-call. This roughly means that it's in a block with -/// a return and there's nothing that needs to be scheduled -/// between it and the return. -/// -/// This function only tests target-independent requirements. -bool isInTailCallPosition(ImmutableCallSite CS, const TargetMachine &TM); - -/// Test if given that the input instruction is in the tail call position if the -/// return type or any attributes of the function will inhibit tail call -/// optimization. -bool returnTypeIsEligibleForTailCall(const Function *F, - const Instruction *I, - const ReturnInst *Ret, - const TargetLoweringBase &TLI); - -// True if GV can be left out of the object symbol table. This is the case -// for linkonce_odr values whose address is not significant. While legal, it is -// not normally profitable to omit them from the .o symbol table. Using this -// analysis makes sense when the information can be passed down to the linker -// or we are in LTO. -bool canBeOmittedFromSymbolTable(const GlobalValue *GV); - -DenseMap -getFuncletMembership(const MachineFunction &MF); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h deleted file mode 100644 index de618d17..00000000 --- a/llvm/include/llvm/CodeGen/AsmPrinter.h +++ /dev/null @@ -1,558 +0,0 @@ -//===-- llvm/CodeGen/AsmPrinter.h - AsmPrinter Framework --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains a class to be used as the base class for target specific -// asm writers. This class primarily handles common functionality used by -// all asm writers. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_ASMPRINTER_H -#define LLVM_CODEGEN_ASMPRINTER_H - -#include "llvm/ADT/MapVector.h" -#include "llvm/ADT/Twine.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/DwarfStringPoolEntry.h" -#include "llvm/IR/InlineAsm.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { -class AsmPrinterHandler; -class BlockAddress; -class ByteStreamer; -class GCStrategy; -class Constant; -class ConstantArray; -class DIE; -class DIEAbbrev; -class GCMetadataPrinter; -class GlobalIndirectSymbol; -class GlobalValue; -class GlobalVariable; -class MachineBasicBlock; -class MachineFunction; -class MachineInstr; -class MachineLocation; -class MachineLoopInfo; -class MachineLoop; -class MachineConstantPoolValue; -class MachineJumpTableInfo; -class MachineModuleInfo; -class MCAsmInfo; -class MCCFIInstruction; -class MCContext; -class MCExpr; -class MCInst; -class MCSection; -class MCStreamer; -class MCSubtargetInfo; -class MCSymbol; -class MCTargetOptions; -class MDNode; -class DwarfDebug; -class Mangler; -class TargetLoweringObjectFile; -class DataLayout; -class TargetMachine; - -/// This class is intended to be used as a driving class for all asm writers. -class AsmPrinter : public MachineFunctionPass { -public: - /// Target machine description. - /// - TargetMachine &TM; - - /// Target Asm Printer information. - /// - const MCAsmInfo *MAI; - - /// This is the context for the output file that we are streaming. This owns - /// all of the global MC-related objects for the generated translation unit. - MCContext &OutContext; - - /// This is the MCStreamer object for the file we are generating. This - /// contains the transient state for the current translation unit that we are - /// generating (such as the current section etc). - std::unique_ptr OutStreamer; - - /// The current machine function. - const MachineFunction *MF; - - /// This is a pointer to the current MachineModuleInfo. - MachineModuleInfo *MMI; - - /// Name-mangler for global names. - /// - Mangler *Mang; - - /// The symbol for the current function. This is recalculated at the beginning - /// of each call to runOnMachineFunction(). - /// - MCSymbol *CurrentFnSym; - - /// The symbol used to represent the start of the current function for the - /// purpose of calculating its size (e.g. using the .size directive). By - /// default, this is equal to CurrentFnSym. - MCSymbol *CurrentFnSymForSize; - - /// Map global GOT equivalent MCSymbols to GlobalVariables and keep track of - /// its number of uses by other globals. - typedef std::pair GOTEquivUsePair; - MapVector GlobalGOTEquivs; - -private: - MCSymbol *CurrentFnBegin; - MCSymbol *CurrentFnEnd; - MCSymbol *CurExceptionSym; - - // The garbage collection metadata printer table. - void *GCMetadataPrinters; // Really a DenseMap. - - /// Emit comments in assembly output if this is true. - /// - bool VerboseAsm; - static char ID; - - /// If VerboseAsm is set, a pointer to the loop info for this function. - MachineLoopInfo *LI; - - struct HandlerInfo { - AsmPrinterHandler *Handler; - const char *TimerName, *TimerGroupName; - HandlerInfo(AsmPrinterHandler *Handler, const char *TimerName, - const char *TimerGroupName) - : Handler(Handler), TimerName(TimerName), - TimerGroupName(TimerGroupName) {} - }; - /// A vector of all debug/EH info emitters we should use. This vector - /// maintains ownership of the emitters. - SmallVector Handlers; - - /// If the target supports dwarf debug info, this pointer is non-null. - DwarfDebug *DD; - -protected: - explicit AsmPrinter(TargetMachine &TM, std::unique_ptr Streamer); - -public: - ~AsmPrinter() override; - - DwarfDebug *getDwarfDebug() { return DD; } - DwarfDebug *getDwarfDebug() const { return DD; } - - bool isPositionIndependent() const; - - /// Return true if assembly output should contain comments. - /// - bool isVerbose() const { return VerboseAsm; } - - /// Return a unique ID for the current function. - /// - unsigned getFunctionNumber() const; - - MCSymbol *getFunctionBegin() const { return CurrentFnBegin; } - MCSymbol *getFunctionEnd() const { return CurrentFnEnd; } - MCSymbol *getCurExceptionSym(); - - /// Return information about object file lowering. - const TargetLoweringObjectFile &getObjFileLowering() const; - - /// Return information about data layout. - const DataLayout &getDataLayout() const; - - /// Return the pointer size from the TargetMachine - unsigned getPointerSize() const; - - /// Return information about subtarget. - const MCSubtargetInfo &getSubtargetInfo() const; - - void EmitToStreamer(MCStreamer &S, const MCInst &Inst); - - /// Return the target triple string. - StringRef getTargetTriple() const; - - /// Return the current section we are emitting to. - const MCSection *getCurrentSection() const; - - void getNameWithPrefix(SmallVectorImpl &Name, - const GlobalValue *GV) const; - - MCSymbol *getSymbol(const GlobalValue *GV) const; - - //===------------------------------------------------------------------===// - // MachineFunctionPass Implementation. - //===------------------------------------------------------------------===// - - /// Record analysis usage. - /// - void getAnalysisUsage(AnalysisUsage &AU) const override; - - /// Set up the AsmPrinter when we are working on a new module. If your pass - /// overrides this, it must make sure to explicitly call this implementation. - bool doInitialization(Module &M) override; - - /// Shut down the asmprinter. If you override this in your pass, you must make - /// sure to call it explicitly. - bool doFinalization(Module &M) override; - - /// Emit the specified function out to the OutStreamer. - bool runOnMachineFunction(MachineFunction &MF) override { - SetupMachineFunction(MF); - EmitFunctionBody(); - return false; - } - - //===------------------------------------------------------------------===// - // Coarse grained IR lowering routines. - //===------------------------------------------------------------------===// - - /// This should be called when a new MachineFunction is being processed from - /// runOnMachineFunction. - void SetupMachineFunction(MachineFunction &MF); - - /// This method emits the body and trailer for a function. - void EmitFunctionBody(); - - void emitCFIInstruction(const MachineInstr &MI); - - void emitFrameAlloc(const MachineInstr &MI); - - enum CFIMoveType { CFI_M_None, CFI_M_EH, CFI_M_Debug }; - CFIMoveType needsCFIMoves(); - - bool needsSEHMoves(); - - /// Print to the current output stream assembly representations of the - /// constants in the constant pool MCP. This is used to print out constants - /// which have been "spilled to memory" by the code generator. - /// - virtual void EmitConstantPool(); - - /// Print assembly representations of the jump tables used by the current - /// function to the current output stream. - /// - virtual void EmitJumpTableInfo(); - - /// Emit the specified global variable to the .s file. - virtual void EmitGlobalVariable(const GlobalVariable *GV); - - /// Check to see if the specified global is a special global used by LLVM. If - /// so, emit it and return true, otherwise do nothing and return false. - bool EmitSpecialLLVMGlobal(const GlobalVariable *GV); - - /// Emit an alignment directive to the specified power of two boundary. For - /// example, if you pass in 3 here, you will get an 8 byte alignment. If a - /// global value is specified, and if that global has an explicit alignment - /// requested, it will override the alignment request if required for - /// correctness. - /// - void EmitAlignment(unsigned NumBits, const GlobalObject *GO = nullptr) const; - - /// Lower the specified LLVM Constant to an MCExpr. - virtual const MCExpr *lowerConstant(const Constant *CV); - - /// \brief Print a general LLVM constant to the .s file. - void EmitGlobalConstant(const DataLayout &DL, const Constant *CV); - - /// \brief Unnamed constant global variables solely contaning a pointer to - /// another globals variable act like a global variable "proxy", or GOT - /// equivalents, i.e., it's only used to hold the address of the latter. One - /// optimization is to replace accesses to these proxies by using the GOT - /// entry for the final global instead. Hence, we select GOT equivalent - /// candidates among all the module global variables, avoid emitting them - /// unnecessarily and finally replace references to them by pc relative - /// accesses to GOT entries. - void computeGlobalGOTEquivs(Module &M); - - /// \brief Constant expressions using GOT equivalent globals may not be - /// eligible for PC relative GOT entry conversion, in such cases we need to - /// emit the proxies we previously omitted in EmitGlobalVariable. - void emitGlobalGOTEquivs(); - - //===------------------------------------------------------------------===// - // Overridable Hooks - //===------------------------------------------------------------------===// - - // Targets can, or in the case of EmitInstruction, must implement these to - // customize output. - - /// This virtual method can be overridden by targets that want to emit - /// something at the start of their file. - virtual void EmitStartOfAsmFile(Module &) {} - - /// This virtual method can be overridden by targets that want to emit - /// something at the end of their file. - virtual void EmitEndOfAsmFile(Module &) {} - - /// Targets can override this to emit stuff before the first basic block in - /// the function. - virtual void EmitFunctionBodyStart() {} - - /// Targets can override this to emit stuff after the last basic block in the - /// function. - virtual void EmitFunctionBodyEnd() {} - - /// Targets can override this to emit stuff at the start of a basic block. - /// By default, this method prints the label for the specified - /// MachineBasicBlock, an alignment (if present) and a comment describing it - /// if appropriate. - virtual void EmitBasicBlockStart(const MachineBasicBlock &MBB) const; - - /// Targets can override this to emit stuff at the end of a basic block. - virtual void EmitBasicBlockEnd(const MachineBasicBlock &MBB) {} - - /// Targets should implement this to emit instructions. - virtual void EmitInstruction(const MachineInstr *) { - llvm_unreachable("EmitInstruction not implemented"); - } - - /// Return the symbol for the specified constant pool entry. - virtual MCSymbol *GetCPISymbol(unsigned CPID) const; - - virtual void EmitFunctionEntryLabel(); - - virtual void EmitMachineConstantPoolValue(MachineConstantPoolValue *MCPV); - - /// Targets can override this to change how global constants that are part of - /// a C++ static/global constructor list are emitted. - virtual void EmitXXStructor(const DataLayout &DL, const Constant *CV) { - EmitGlobalConstant(DL, CV); - } - - /// Return true if the basic block has exactly one predecessor and the control - /// transfer mechanism between the predecessor and this block is a - /// fall-through. - virtual bool - isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const; - - /// Targets can override this to customize the output of IMPLICIT_DEF - /// instructions in verbose mode. - virtual void emitImplicitDef(const MachineInstr *MI) const; - - //===------------------------------------------------------------------===// - // Symbol Lowering Routines. - //===------------------------------------------------------------------===// -public: - MCSymbol *createTempSymbol(const Twine &Name) const; - - /// Return the MCSymbol for a private symbol with global value name as its - /// base, with the specified suffix. - MCSymbol *getSymbolWithGlobalValueBase(const GlobalValue *GV, - StringRef Suffix) const; - - /// Return the MCSymbol for the specified ExternalSymbol. - MCSymbol *GetExternalSymbolSymbol(StringRef Sym) const; - - /// Return the symbol for the specified jump table entry. - MCSymbol *GetJTISymbol(unsigned JTID, bool isLinkerPrivate = false) const; - - /// Return the symbol for the specified jump table .set - /// FIXME: privatize to AsmPrinter. - MCSymbol *GetJTSetSymbol(unsigned UID, unsigned MBBID) const; - - /// Return the MCSymbol used to satisfy BlockAddress uses of the specified - /// basic block. - MCSymbol *GetBlockAddressSymbol(const BlockAddress *BA) const; - MCSymbol *GetBlockAddressSymbol(const BasicBlock *BB) const; - - //===------------------------------------------------------------------===// - // Emission Helper Routines. - //===------------------------------------------------------------------===// -public: - /// This is just convenient handler for printing offsets. - void printOffset(int64_t Offset, raw_ostream &OS) const; - - /// Emit a byte directive and value. - /// - void EmitInt8(int Value) const; - - /// Emit a short directive and value. - /// - void EmitInt16(int Value) const; - - /// Emit a long directive and value. - /// - void EmitInt32(int Value) const; - - /// Emit something like ".long Hi-Lo" where the size in bytes of the directive - /// is specified by Size and Hi/Lo specify the labels. This implicitly uses - /// .set if it is available. - void EmitLabelDifference(const MCSymbol *Hi, const MCSymbol *Lo, - unsigned Size) const; - - /// Emit something like ".long Label+Offset" where the size in bytes of the - /// directive is specified by Size and Label specifies the label. This - /// implicitly uses .set if it is available. - void EmitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset, - unsigned Size, bool IsSectionRelative = false) const; - - /// Emit something like ".long Label" where the size in bytes of the directive - /// is specified by Size and Label specifies the label. - void EmitLabelReference(const MCSymbol *Label, unsigned Size, - bool IsSectionRelative = false) const { - EmitLabelPlusOffset(Label, 0, Size, IsSectionRelative); - } - - //===------------------------------------------------------------------===// - // Dwarf Emission Helper Routines - //===------------------------------------------------------------------===// - - /// Emit the specified signed leb128 value. - void EmitSLEB128(int64_t Value, const char *Desc = nullptr) const; - - /// Emit the specified unsigned leb128 value. - void EmitULEB128(uint64_t Value, const char *Desc = nullptr, - unsigned PadTo = 0) const; - - /// Emit a .byte 42 directive that corresponds to an encoding. If verbose - /// assembly output is enabled, we output comments describing the encoding. - /// Desc is a string saying what the encoding is specifying (e.g. "LSDA"). - void EmitEncodingByte(unsigned Val, const char *Desc = nullptr) const; - - /// Return the size of the encoding in bytes. - unsigned GetSizeOfEncodedValue(unsigned Encoding) const; - - /// Emit reference to a ttype global with a specified encoding. - void EmitTTypeReference(const GlobalValue *GV, unsigned Encoding) const; - - /// Emit a reference to a symbol for use in dwarf. Different object formats - /// represent this in different ways. Some use a relocation others encode - /// the label offset in its section. - void emitDwarfSymbolReference(const MCSymbol *Label, - bool ForceOffset = false) const; - - /// Emit the 4-byte offset of a string from the start of its section. - /// - /// When possible, emit a DwarfStringPool section offset without any - /// relocations, and without using the symbol. Otherwise, defers to \a - /// emitDwarfSymbolReference(). - void emitDwarfStringOffset(DwarfStringPoolEntryRef S) const; - - /// Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified. - virtual unsigned getISAEncoding() { return 0; } - - /// EmitDwarfRegOp - Emit a dwarf register operation. - virtual void EmitDwarfRegOp(ByteStreamer &BS, - const MachineLocation &MLoc) const; - - //===------------------------------------------------------------------===// - // Dwarf Lowering Routines - //===------------------------------------------------------------------===// - - /// \brief Emit frame instruction to describe the layout of the frame. - void emitCFIInstruction(const MCCFIInstruction &Inst) const; - - /// \brief Emit Dwarf abbreviation table. - template void emitDwarfAbbrevs(const T &Abbrevs) const { - // For each abbreviation. - for (const auto &Abbrev : Abbrevs) - emitDwarfAbbrev(*Abbrev); - - // Mark end of abbreviations. - EmitULEB128(0, "EOM(3)"); - } - - void emitDwarfAbbrev(const DIEAbbrev &Abbrev) const; - - /// \brief Recursively emit Dwarf DIE tree. - void emitDwarfDIE(const DIE &Die) const; - - //===------------------------------------------------------------------===// - // Inline Asm Support - //===------------------------------------------------------------------===// -public: - // These are hooks that targets can override to implement inline asm - // support. These should probably be moved out of AsmPrinter someday. - - /// Print information related to the specified machine instr that is - /// independent of the operand, and may be independent of the instr itself. - /// This can be useful for portably encoding the comment character or other - /// bits of target-specific knowledge into the asmstrings. The syntax used is - /// ${:comment}. Targets can override this to add support for their own - /// strange codes. - virtual void PrintSpecial(const MachineInstr *MI, raw_ostream &OS, - const char *Code) const; - - /// Print the specified operand of MI, an INLINEASM instruction, using the - /// specified assembler variant. Targets should override this to format as - /// appropriate. This method can return true if the operand is erroneous. - virtual bool PrintAsmOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, const char *ExtraCode, - raw_ostream &OS); - - /// Print the specified operand of MI, an INLINEASM instruction, using the - /// specified assembler variant as an address. Targets should override this to - /// format as appropriate. This method can return true if the operand is - /// erroneous. - virtual bool PrintAsmMemoryOperand(const MachineInstr *MI, unsigned OpNo, - unsigned AsmVariant, const char *ExtraCode, - raw_ostream &OS); - - /// Let the target do anything it needs to do before emitting inlineasm. - /// \p StartInfo - the subtarget info before parsing inline asm - virtual void emitInlineAsmStart() const; - - /// Let the target do anything it needs to do after emitting inlineasm. - /// This callback can be used restore the original mode in case the - /// inlineasm contains directives to switch modes. - /// \p StartInfo - the original subtarget info before inline asm - /// \p EndInfo - the final subtarget info after parsing the inline asm, - /// or NULL if the value is unknown. - virtual void emitInlineAsmEnd(const MCSubtargetInfo &StartInfo, - const MCSubtargetInfo *EndInfo) const; - -private: - /// Private state for PrintSpecial() - // Assign a unique ID to this machine instruction. - mutable const MachineInstr *LastMI; - mutable unsigned LastFn; - mutable unsigned Counter; - - /// This method emits the header for the current function. - virtual void EmitFunctionHeader(); - - /// Emit a blob of inline asm to the output streamer. - void - EmitInlineAsm(StringRef Str, const MCSubtargetInfo &STI, - const MCTargetOptions &MCOptions, - const MDNode *LocMDNode = nullptr, - InlineAsm::AsmDialect AsmDialect = InlineAsm::AD_ATT) const; - - /// This method formats and emits the specified machine instruction that is an - /// inline asm. - void EmitInlineAsm(const MachineInstr *MI) const; - - //===------------------------------------------------------------------===// - // Internal Implementation Details - //===------------------------------------------------------------------===// - - /// This emits visibility information about symbol, if this is suported by the - /// target. - void EmitVisibility(MCSymbol *Sym, unsigned Visibility, - bool IsDefinition = true) const; - - void EmitLinkage(const GlobalValue *GV, MCSymbol *GVSym) const; - - void EmitJumpTableEntry(const MachineJumpTableInfo *MJTI, - const MachineBasicBlock *MBB, unsigned uid) const; - void EmitLLVMUsedList(const ConstantArray *InitList); - /// Emit llvm.ident metadata in an '.ident' directive. - void EmitModuleIdents(Module &M); - void EmitXXStructorList(const DataLayout &DL, const Constant *List, - bool isCtor); - GCMetadataPrinter *GetOrCreateGCPrinter(GCStrategy &C); - /// Emit GlobalAlias or GlobalIFunc. - void emitGlobalIndirectSymbol(Module &M, - const GlobalIndirectSymbol& GIS); -}; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/AtomicExpandUtils.h b/llvm/include/llvm/CodeGen/AtomicExpandUtils.h deleted file mode 100644 index ac18eac8..00000000 --- a/llvm/include/llvm/CodeGen/AtomicExpandUtils.h +++ /dev/null @@ -1,57 +0,0 @@ -//===-- AtomicExpandUtils.h - Utilities for expanding atomic instructions -===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include "llvm/ADT/STLExtras.h" -#include "llvm/IR/IRBuilder.h" - -namespace llvm { -class Value; -class AtomicRMWInst; - - -/// Parameters (see the expansion example below): -/// (the builder, %addr, %loaded, %new_val, ordering, -/// /* OUT */ %success, /* OUT */ %new_loaded) -typedef function_ref &, Value *, Value *, Value *, - AtomicOrdering, Value *&, Value *&)> CreateCmpXchgInstFun; - -/// \brief Expand an atomic RMW instruction into a loop utilizing -/// cmpxchg. You'll want to make sure your target machine likes cmpxchg -/// instructions in the first place and that there isn't another, better, -/// transformation available (for example AArch32/AArch64 have linked loads). -/// -/// This is useful in passes which can't rewrite the more exotic RMW -/// instructions directly into a platform specific intrinsics (because, say, -/// those intrinsics don't exist). If such a pass is able to expand cmpxchg -/// instructions directly however, then, with this function, it could avoid two -/// extra module passes (avoiding passes by `-atomic-expand` and itself). A -/// specific example would be PNaCl's `RewriteAtomics` pass. -/// -/// Given: atomicrmw some_op iN* %addr, iN %incr ordering -/// -/// The standard expansion we produce is: -/// [...] -/// %init_loaded = load atomic iN* %addr -/// br label %loop -/// loop: -/// %loaded = phi iN [ %init_loaded, %entry ], [ %new_loaded, %loop ] -/// %new = some_op iN %loaded, %incr -/// ; This is what -atomic-expand will produce using this function on i686 targets: -/// %pair = cmpxchg iN* %addr, iN %loaded, iN %new_val -/// %new_loaded = extractvalue { iN, i1 } %pair, 0 -/// %success = extractvalue { iN, i1 } %pair, 1 -/// ; End callback produced IR -/// br i1 %success, label %atomicrmw.end, label %loop -/// atomicrmw.end: -/// [...] -/// -/// Returns true if the containing function was modified. -bool -expandAtomicRMWToCmpXchg(AtomicRMWInst *AI, CreateCmpXchgInstFun Factory); -} diff --git a/llvm/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h deleted file mode 100644 index 69951afb..00000000 --- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h +++ /dev/null @@ -1,965 +0,0 @@ -//===- BasicTTIImpl.h -------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file provides a helper that implements much of the TTI interface in -/// terms of the target-independent code generator and TargetLowering -/// interfaces. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_BASICTTIIMPL_H -#define LLVM_CODEGEN_BASICTTIIMPL_H - -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/Analysis/TargetTransformInfoImpl.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Target/TargetLowering.h" -#include "llvm/Target/TargetSubtargetInfo.h" -#include "llvm/Analysis/TargetLibraryInfo.h" - -namespace llvm { - -extern cl::opt PartialUnrollingThreshold; - -/// \brief Base class which can be used to help build a TTI implementation. -/// -/// This class provides as much implementation of the TTI interface as is -/// possible using the target independent parts of the code generator. -/// -/// In order to subclass it, your class must implement a getST() method to -/// return the subtarget, and a getTLI() method to return the target lowering. -/// We need these methods implemented in the derived class so that this class -/// doesn't have to duplicate storage for them. -template -class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase { -private: - typedef TargetTransformInfoImplCRTPBase BaseT; - typedef TargetTransformInfo TTI; - - /// Estimate the overhead of scalarizing an instruction. Insert and Extract - /// are set if the result needs to be inserted and/or extracted from vectors. - unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) { - assert(Ty->isVectorTy() && "Can only scalarize vectors"); - unsigned Cost = 0; - - for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) { - if (Insert) - Cost += static_cast(this) - ->getVectorInstrCost(Instruction::InsertElement, Ty, i); - if (Extract) - Cost += static_cast(this) - ->getVectorInstrCost(Instruction::ExtractElement, Ty, i); - } - - return Cost; - } - - /// Estimate the cost overhead of SK_Alternate shuffle. - unsigned getAltShuffleOverhead(Type *Ty) { - assert(Ty->isVectorTy() && "Can only shuffle vectors"); - unsigned Cost = 0; - // Shuffle cost is equal to the cost of extracting element from its argument - // plus the cost of inserting them onto the result vector. - - // e.g. <4 x float> has a mask of <0,5,2,7> i.e we need to extract from - // index 0 of first vector, index 1 of second vector,index 2 of first - // vector and finally index 3 of second vector and insert them at index - // <0,1,2,3> of result vector. - for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) { - Cost += static_cast(this) - ->getVectorInstrCost(Instruction::InsertElement, Ty, i); - Cost += static_cast(this) - ->getVectorInstrCost(Instruction::ExtractElement, Ty, i); - } - return Cost; - } - - /// \brief Local query method delegates up to T which *must* implement this! - const TargetSubtargetInfo *getST() const { - return static_cast(this)->getST(); - } - - /// \brief Local query method delegates up to T which *must* implement this! - const TargetLoweringBase *getTLI() const { - return static_cast(this)->getTLI(); - } - -protected: - explicit BasicTTIImplBase(const TargetMachine *TM, const DataLayout &DL) - : BaseT(DL) {} - - using TargetTransformInfoImplBase::DL; - -public: - // Provide value semantics. MSVC requires that we spell all of these out. - BasicTTIImplBase(const BasicTTIImplBase &Arg) - : BaseT(static_cast(Arg)) {} - BasicTTIImplBase(BasicTTIImplBase &&Arg) - : BaseT(std::move(static_cast(Arg))) {} - - /// \name Scalar TTI Implementations - /// @{ - bool allowsMisalignedMemoryAccesses(unsigned BitWidth, unsigned AddressSpace, - unsigned Alignment, bool *Fast) const { - MVT M = MVT::getIntegerVT(BitWidth); - return getTLI()->allowsMisalignedMemoryAccesses(M, AddressSpace, Alignment, Fast); - } - - bool hasBranchDivergence() { return false; } - - bool isSourceOfDivergence(const Value *V) { return false; } - - bool isLegalAddImmediate(int64_t imm) { - return getTLI()->isLegalAddImmediate(imm); - } - - bool isLegalICmpImmediate(int64_t imm) { - return getTLI()->isLegalICmpImmediate(imm); - } - - bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale, - unsigned AddrSpace) { - TargetLoweringBase::AddrMode AM; - AM.BaseGV = BaseGV; - AM.BaseOffs = BaseOffset; - AM.HasBaseReg = HasBaseReg; - AM.Scale = Scale; - return getTLI()->isLegalAddressingMode(DL, AM, Ty, AddrSpace); - } - - int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, - bool HasBaseReg, int64_t Scale, unsigned AddrSpace) { - TargetLoweringBase::AddrMode AM; - AM.BaseGV = BaseGV; - AM.BaseOffs = BaseOffset; - AM.HasBaseReg = HasBaseReg; - AM.Scale = Scale; - return getTLI()->getScalingFactorCost(DL, AM, Ty, AddrSpace); - } - - bool isTruncateFree(Type *Ty1, Type *Ty2) { - return getTLI()->isTruncateFree(Ty1, Ty2); - } - - bool isProfitableToHoist(Instruction *I) { - return getTLI()->isProfitableToHoist(I); - } - - bool isTypeLegal(Type *Ty) { - EVT VT = getTLI()->getValueType(DL, Ty); - return getTLI()->isTypeLegal(VT); - } - - int getGEPCost(Type *PointeeType, const Value *Ptr, - ArrayRef Operands) { - return BaseT::getGEPCost(PointeeType, Ptr, Operands); - } - - unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef Arguments) { - return BaseT::getIntrinsicCost(IID, RetTy, Arguments); - } - - unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef ParamTys) { - if (IID == Intrinsic::cttz) { - if (getTLI()->isCheapToSpeculateCttz()) - return TargetTransformInfo::TCC_Basic; - return TargetTransformInfo::TCC_Expensive; - } - - if (IID == Intrinsic::ctlz) { - if (getTLI()->isCheapToSpeculateCtlz()) - return TargetTransformInfo::TCC_Basic; - return TargetTransformInfo::TCC_Expensive; - } - - return BaseT::getIntrinsicCost(IID, RetTy, ParamTys); - } - - unsigned getJumpBufAlignment() { return getTLI()->getJumpBufAlignment(); } - - unsigned getJumpBufSize() { return getTLI()->getJumpBufSize(); } - - bool shouldBuildLookupTables() { - const TargetLoweringBase *TLI = getTLI(); - return TLI->isOperationLegalOrCustom(ISD::BR_JT, MVT::Other) || - TLI->isOperationLegalOrCustom(ISD::BRIND, MVT::Other); - } - - bool haveFastSqrt(Type *Ty) { - const TargetLoweringBase *TLI = getTLI(); - EVT VT = TLI->getValueType(DL, Ty); - return TLI->isTypeLegal(VT) && - TLI->isOperationLegalOrCustom(ISD::FSQRT, VT); - } - - unsigned getFPOpCost(Type *Ty) { - // By default, FP instructions are no more expensive since they are - // implemented in HW. Target specific TTI can override this. - return TargetTransformInfo::TCC_Basic; - } - - unsigned getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) { - const TargetLoweringBase *TLI = getTLI(); - switch (Opcode) { - default: break; - case Instruction::Trunc: { - if (TLI->isTruncateFree(OpTy, Ty)) - return TargetTransformInfo::TCC_Free; - return TargetTransformInfo::TCC_Basic; - } - case Instruction::ZExt: { - if (TLI->isZExtFree(OpTy, Ty)) - return TargetTransformInfo::TCC_Free; - return TargetTransformInfo::TCC_Basic; - } - } - - return BaseT::getOperationCost(Opcode, Ty, OpTy); - } - - unsigned getInliningThresholdMultiplier() { return 1; } - - void getUnrollingPreferences(Loop *L, TTI::UnrollingPreferences &UP) { - // This unrolling functionality is target independent, but to provide some - // motivation for its intended use, for x86: - - // According to the Intel 64 and IA-32 Architectures Optimization Reference - // Manual, Intel Core models and later have a loop stream detector (and - // associated uop queue) that can benefit from partial unrolling. - // The relevant requirements are: - // - The loop must have no more than 4 (8 for Nehalem and later) branches - // taken, and none of them may be calls. - // - The loop can have no more than 18 (28 for Nehalem and later) uops. - - // According to the Software Optimization Guide for AMD Family 15h - // Processors, models 30h-4fh (Steamroller and later) have a loop predictor - // and loop buffer which can benefit from partial unrolling. - // The relevant requirements are: - // - The loop must have fewer than 16 branches - // - The loop must have less than 40 uops in all executed loop branches - - // The number of taken branches in a loop is hard to estimate here, and - // benchmarking has revealed that it is better not to be conservative when - // estimating the branch count. As a result, we'll ignore the branch limits - // until someone finds a case where it matters in practice. - - unsigned MaxOps; - const TargetSubtargetInfo *ST = getST(); - if (PartialUnrollingThreshold.getNumOccurrences() > 0) - MaxOps = PartialUnrollingThreshold; - else if (ST->getSchedModel().LoopMicroOpBufferSize > 0) - MaxOps = ST->getSchedModel().LoopMicroOpBufferSize; - else - return; - - // Scan the loop: don't unroll loops with calls. - for (Loop::block_iterator I = L->block_begin(), E = L->block_end(); I != E; - ++I) { - BasicBlock *BB = *I; - - for (BasicBlock::iterator J = BB->begin(), JE = BB->end(); J != JE; ++J) - if (isa(J) || isa(J)) { - ImmutableCallSite CS(&*J); - if (const Function *F = CS.getCalledFunction()) { - if (!static_cast(this)->isLoweredToCall(F)) - continue; - } - - return; - } - } - - // Enable runtime and partial unrolling up to the specified size. - UP.Partial = UP.Runtime = true; - UP.PartialThreshold = UP.PartialOptSizeThreshold = MaxOps; - } - - /// @} - - /// \name Vector TTI Implementations - /// @{ - - unsigned getNumberOfRegisters(bool Vector) { return Vector ? 0 : 1; } - - unsigned getRegisterBitWidth(bool Vector) { return 32; } - - unsigned getMaxInterleaveFactor(unsigned VF) { return 1; } - - unsigned getArithmeticInstrCost( - unsigned Opcode, Type *Ty, - TTI::OperandValueKind Opd1Info = TTI::OK_AnyValue, - TTI::OperandValueKind Opd2Info = TTI::OK_AnyValue, - TTI::OperandValueProperties Opd1PropInfo = TTI::OP_None, - TTI::OperandValueProperties Opd2PropInfo = TTI::OP_None) { - // Check if any of the operands are vector operands. - const TargetLoweringBase *TLI = getTLI(); - int ISD = TLI->InstructionOpcodeToISD(Opcode); - assert(ISD && "Invalid opcode"); - - std::pair LT = TLI->getTypeLegalizationCost(DL, Ty); - - bool IsFloat = Ty->getScalarType()->isFloatingPointTy(); - // Assume that floating point arithmetic operations cost twice as much as - // integer operations. - unsigned OpCost = (IsFloat ? 2 : 1); - - if (TLI->isOperationLegalOrPromote(ISD, LT.second)) { - // The operation is legal. Assume it costs 1. - // TODO: Once we have extract/insert subvector cost we need to use them. - return LT.first * OpCost; - } - - if (!TLI->isOperationExpand(ISD, LT.second)) { - // If the operation is custom lowered, then assume that the code is twice - // as expensive. - return LT.first * 2 * OpCost; - } - - // Else, assume that we need to scalarize this op. - // TODO: If one of the types get legalized by splitting, handle this - // similarly to what getCastInstrCost() does. - if (Ty->isVectorTy()) { - unsigned Num = Ty->getVectorNumElements(); - unsigned Cost = static_cast(this) - ->getArithmeticInstrCost(Opcode, Ty->getScalarType()); - // return the cost of multiple scalar invocation plus the cost of - // inserting - // and extracting the values. - return getScalarizationOverhead(Ty, true, true) + Num * Cost; - } - - // We don't know anything about this scalar instruction. - return OpCost; - } - - unsigned getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index, - Type *SubTp) { - if (Kind == TTI::SK_Alternate) { - return getAltShuffleOverhead(Tp); - } - return 1; - } - - unsigned getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) { - const TargetLoweringBase *TLI = getTLI(); - int ISD = TLI->InstructionOpcodeToISD(Opcode); - assert(ISD && "Invalid opcode"); - std::pair SrcLT = TLI->getTypeLegalizationCost(DL, Src); - std::pair DstLT = TLI->getTypeLegalizationCost(DL, Dst); - - // Check for NOOP conversions. - if (SrcLT.first == DstLT.first && - SrcLT.second.getSizeInBits() == DstLT.second.getSizeInBits()) { - - // Bitcast between types that are legalized to the same type are free. - if (Opcode == Instruction::BitCast || Opcode == Instruction::Trunc) - return 0; - } - - if (Opcode == Instruction::Trunc && - TLI->isTruncateFree(SrcLT.second, DstLT.second)) - return 0; - - if (Opcode == Instruction::ZExt && - TLI->isZExtFree(SrcLT.second, DstLT.second)) - return 0; - - if (Opcode == Instruction::AddrSpaceCast && - TLI->isNoopAddrSpaceCast(Src->getPointerAddressSpace(), - Dst->getPointerAddressSpace())) - return 0; - - // If the cast is marked as legal (or promote) then assume low cost. - if (SrcLT.first == DstLT.first && - TLI->isOperationLegalOrPromote(ISD, DstLT.second)) - return 1; - - // Handle scalar conversions. - if (!Src->isVectorTy() && !Dst->isVectorTy()) { - - // Scalar bitcasts are usually free. - if (Opcode == Instruction::BitCast) - return 0; - - // Just check the op cost. If the operation is legal then assume it costs - // 1. - if (!TLI->isOperationExpand(ISD, DstLT.second)) - return 1; - - // Assume that illegal scalar instruction are expensive. - return 4; - } - - // Check vector-to-vector casts. - if (Dst->isVectorTy() && Src->isVectorTy()) { - - // If the cast is between same-sized registers, then the check is simple. - if (SrcLT.first == DstLT.first && - SrcLT.second.getSizeInBits() == DstLT.second.getSizeInBits()) { - - // Assume that Zext is done using AND. - if (Opcode == Instruction::ZExt) - return 1; - - // Assume that sext is done using SHL and SRA. - if (Opcode == Instruction::SExt) - return 2; - - // Just check the op cost. If the operation is legal then assume it - // costs - // 1 and multiply by the type-legalization overhead. - if (!TLI->isOperationExpand(ISD, DstLT.second)) - return SrcLT.first * 1; - } - - // If we are legalizing by splitting, query the concrete TTI for the cost - // of casting the original vector twice. We also need to factor int the - // cost of the split itself. Count that as 1, to be consistent with - // TLI->getTypeLegalizationCost(). - if ((TLI->getTypeAction(Src->getContext(), TLI->getValueType(DL, Src)) == - TargetLowering::TypeSplitVector) || - (TLI->getTypeAction(Dst->getContext(), TLI->getValueType(DL, Dst)) == - TargetLowering::TypeSplitVector)) { - Type *SplitDst = VectorType::get(Dst->getVectorElementType(), - Dst->getVectorNumElements() / 2); - Type *SplitSrc = VectorType::get(Src->getVectorElementType(), - Src->getVectorNumElements() / 2); - T *TTI = static_cast(this); - return TTI->getVectorSplitCost() + - (2 * TTI->getCastInstrCost(Opcode, SplitDst, SplitSrc)); - } - - // In other cases where the source or destination are illegal, assume - // the operation will get scalarized. - unsigned Num = Dst->getVectorNumElements(); - unsigned Cost = static_cast(this)->getCastInstrCost( - Opcode, Dst->getScalarType(), Src->getScalarType()); - - // Return the cost of multiple scalar invocation plus the cost of - // inserting and extracting the values. - return getScalarizationOverhead(Dst, true, true) + Num * Cost; - } - - // We already handled vector-to-vector and scalar-to-scalar conversions. - // This - // is where we handle bitcast between vectors and scalars. We need to assume - // that the conversion is scalarized in one way or another. - if (Opcode == Instruction::BitCast) - // Illegal bitcasts are done by storing and loading from a stack slot. - return (Src->isVectorTy() ? getScalarizationOverhead(Src, false, true) - : 0) + - (Dst->isVectorTy() ? getScalarizationOverhead(Dst, true, false) - : 0); - - llvm_unreachable("Unhandled cast"); - } - - unsigned getExtractWithExtendCost(unsigned Opcode, Type *Dst, - VectorType *VecTy, unsigned Index) { - return static_cast(this)->getVectorInstrCost( - Instruction::ExtractElement, VecTy, Index) + - static_cast(this)->getCastInstrCost(Opcode, Dst, - VecTy->getElementType()); - } - - unsigned getCFInstrCost(unsigned Opcode) { - // Branches are assumed to be predicted. - return 0; - } - - unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy) { - const TargetLoweringBase *TLI = getTLI(); - int ISD = TLI->InstructionOpcodeToISD(Opcode); - assert(ISD && "Invalid opcode"); - - // Selects on vectors are actually vector selects. - if (ISD == ISD::SELECT) { - assert(CondTy && "CondTy must exist"); - if (CondTy->isVectorTy()) - ISD = ISD::VSELECT; - } - std::pair LT = TLI->getTypeLegalizationCost(DL, ValTy); - - if (!(ValTy->isVectorTy() && !LT.second.isVector()) && - !TLI->isOperationExpand(ISD, LT.second)) { - // The operation is legal. Assume it costs 1. Multiply - // by the type-legalization overhead. - return LT.first * 1; - } - - // Otherwise, assume that the cast is scalarized. - // TODO: If one of the types get legalized by splitting, handle this - // similarly to what getCastInstrCost() does. - if (ValTy->isVectorTy()) { - unsigned Num = ValTy->getVectorNumElements(); - if (CondTy) - CondTy = CondTy->getScalarType(); - unsigned Cost = static_cast(this)->getCmpSelInstrCost( - Opcode, ValTy->getScalarType(), CondTy); - - // Return the cost of multiple scalar invocation plus the cost of - // inserting and extracting the values. - return getScalarizationOverhead(ValTy, true, false) + Num * Cost; - } - - // Unknown scalar opcode. - return 1; - } - - unsigned getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) { - std::pair LT = - getTLI()->getTypeLegalizationCost(DL, Val->getScalarType()); - - return LT.first; - } - - unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, - unsigned AddressSpace) { - assert(!Src->isVoidTy() && "Invalid type"); - std::pair LT = getTLI()->getTypeLegalizationCost(DL, Src); - - // Assuming that all loads of legal types cost 1. - unsigned Cost = LT.first; - - if (Src->isVectorTy() && - Src->getPrimitiveSizeInBits() < LT.second.getSizeInBits()) { - // This is a vector load that legalizes to a larger type than the vector - // itself. Unless the corresponding extending load or truncating store is - // legal, then this will scalarize. - TargetLowering::LegalizeAction LA = TargetLowering::Expand; - EVT MemVT = getTLI()->getValueType(DL, Src); - if (Opcode == Instruction::Store) - LA = getTLI()->getTruncStoreAction(LT.second, MemVT); - else - LA = getTLI()->getLoadExtAction(ISD::EXTLOAD, LT.second, MemVT); - - if (LA != TargetLowering::Legal && LA != TargetLowering::Custom) { - // This is a vector load/store for some illegal type that is scalarized. - // We must account for the cost of building or decomposing the vector. - Cost += getScalarizationOverhead(Src, Opcode != Instruction::Store, - Opcode == Instruction::Store); - } - } - - return Cost; - } - - unsigned getInterleavedMemoryOpCost(unsigned Opcode, Type *VecTy, - unsigned Factor, - ArrayRef Indices, - unsigned Alignment, - unsigned AddressSpace) { - VectorType *VT = dyn_cast(VecTy); - assert(VT && "Expect a vector type for interleaved memory op"); - - unsigned NumElts = VT->getNumElements(); - assert(Factor > 1 && NumElts % Factor == 0 && "Invalid interleave factor"); - - unsigned NumSubElts = NumElts / Factor; - VectorType *SubVT = VectorType::get(VT->getElementType(), NumSubElts); - - // Firstly, the cost of load/store operation. - unsigned Cost = static_cast(this)->getMemoryOpCost( - Opcode, VecTy, Alignment, AddressSpace); - - // Legalize the vector type, and get the legalized and unlegalized type - // sizes. - MVT VecTyLT = getTLI()->getTypeLegalizationCost(DL, VecTy).second; - unsigned VecTySize = - static_cast(this)->getDataLayout().getTypeStoreSize(VecTy); - unsigned VecTyLTSize = VecTyLT.getStoreSize(); - - // Return the ceiling of dividing A by B. - auto ceil = [](unsigned A, unsigned B) { return (A + B - 1) / B; }; - - // Scale the cost of the memory operation by the fraction of legalized - // instructions that will actually be used. We shouldn't account for the - // cost of dead instructions since they will be removed. - // - // E.g., An interleaved load of factor 8: - // %vec = load <16 x i64>, <16 x i64>* %ptr - // %v0 = shufflevector %vec, undef, <0, 8> - // - // If <16 x i64> is legalized to 8 v2i64 loads, only 2 of the loads will be - // used (those corresponding to elements [0:1] and [8:9] of the unlegalized - // type). The other loads are unused. - // - // We only scale the cost of loads since interleaved store groups aren't - // allowed to have gaps. - if (Opcode == Instruction::Load && VecTySize > VecTyLTSize) { - - // The number of loads of a legal type it will take to represent a load - // of the unlegalized vector type. - unsigned NumLegalInsts = ceil(VecTySize, VecTyLTSize); - - // The number of elements of the unlegalized type that correspond to a - // single legal instruction. - unsigned NumEltsPerLegalInst = ceil(NumElts, NumLegalInsts); - - // Determine which legal instructions will be used. - BitVector UsedInsts(NumLegalInsts, false); - for (unsigned Index : Indices) - for (unsigned Elt = 0; Elt < NumSubElts; ++Elt) - UsedInsts.set((Index + Elt * Factor) / NumEltsPerLegalInst); - - // Scale the cost of the load by the fraction of legal instructions that - // will be used. - Cost *= UsedInsts.count() / NumLegalInsts; - } - - // Then plus the cost of interleave operation. - if (Opcode == Instruction::Load) { - // The interleave cost is similar to extract sub vectors' elements - // from the wide vector, and insert them into sub vectors. - // - // E.g. An interleaved load of factor 2 (with one member of index 0): - // %vec = load <8 x i32>, <8 x i32>* %ptr - // %v0 = shuffle %vec, undef, <0, 2, 4, 6> ; Index 0 - // The cost is estimated as extract elements at 0, 2, 4, 6 from the - // <8 x i32> vector and insert them into a <4 x i32> vector. - - assert(Indices.size() <= Factor && - "Interleaved memory op has too many members"); - - for (unsigned Index : Indices) { - assert(Index < Factor && "Invalid index for interleaved memory op"); - - // Extract elements from loaded vector for each sub vector. - for (unsigned i = 0; i < NumSubElts; i++) - Cost += static_cast(this)->getVectorInstrCost( - Instruction::ExtractElement, VT, Index + i * Factor); - } - - unsigned InsSubCost = 0; - for (unsigned i = 0; i < NumSubElts; i++) - InsSubCost += static_cast(this)->getVectorInstrCost( - Instruction::InsertElement, SubVT, i); - - Cost += Indices.size() * InsSubCost; - } else { - // The interleave cost is extract all elements from sub vectors, and - // insert them into the wide vector. - // - // E.g. An interleaved store of factor 2: - // %v0_v1 = shuffle %v0, %v1, <0, 4, 1, 5, 2, 6, 3, 7> - // store <8 x i32> %interleaved.vec, <8 x i32>* %ptr - // The cost is estimated as extract all elements from both <4 x i32> - // vectors and insert into the <8 x i32> vector. - - unsigned ExtSubCost = 0; - for (unsigned i = 0; i < NumSubElts; i++) - ExtSubCost += static_cast(this)->getVectorInstrCost( - Instruction::ExtractElement, SubVT, i); - Cost += ExtSubCost * Factor; - - for (unsigned i = 0; i < NumElts; i++) - Cost += static_cast(this) - ->getVectorInstrCost(Instruction::InsertElement, VT, i); - } - - return Cost; - } - - /// Get intrinsic cost based on arguments - unsigned getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef Args, FastMathFlags FMF) { - switch (IID) { - default: { - SmallVector Types; - for (Value *Op : Args) - Types.push_back(Op->getType()); - return static_cast(this)->getIntrinsicInstrCost(IID, RetTy, Types, - FMF); - } - case Intrinsic::masked_scatter: { - Value *Mask = Args[3]; - bool VarMask = !isa(Mask); - unsigned Alignment = cast(Args[2])->getZExtValue(); - return - static_cast(this)->getGatherScatterOpCost(Instruction::Store, - Args[0]->getType(), - Args[1], VarMask, - Alignment); - } - case Intrinsic::masked_gather: { - Value *Mask = Args[2]; - bool VarMask = !isa(Mask); - unsigned Alignment = cast(Args[1])->getZExtValue(); - return - static_cast(this)->getGatherScatterOpCost(Instruction::Load, - RetTy, Args[0], VarMask, - Alignment); - } - } - } - - /// Get intrinsic cost based on argument types - unsigned getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy, - ArrayRef Tys, FastMathFlags FMF) { - SmallVector ISDs; - unsigned SingleCallCost = 10; // Library call cost. Make it expensive. - switch (IID) { - default: { - // Assume that we need to scalarize this intrinsic. - unsigned ScalarizationCost = 0; - unsigned ScalarCalls = 1; - Type *ScalarRetTy = RetTy; - if (RetTy->isVectorTy()) { - ScalarizationCost = getScalarizationOverhead(RetTy, true, false); - ScalarCalls = std::max(ScalarCalls, RetTy->getVectorNumElements()); - ScalarRetTy = RetTy->getScalarType(); - } - SmallVector ScalarTys; - for (unsigned i = 0, ie = Tys.size(); i != ie; ++i) { - Type *Ty = Tys[i]; - if (Ty->isVectorTy()) { - ScalarizationCost += getScalarizationOverhead(Ty, false, true); - ScalarCalls = std::max(ScalarCalls, Ty->getVectorNumElements()); - Ty = Ty->getScalarType(); - } - ScalarTys.push_back(Ty); - } - if (ScalarCalls == 1) - return 1; // Return cost of a scalar intrinsic. Assume it to be cheap. - - unsigned ScalarCost = static_cast(this)->getIntrinsicInstrCost( - IID, ScalarRetTy, ScalarTys, FMF); - - return ScalarCalls * ScalarCost + ScalarizationCost; - } - // Look for intrinsics that can be lowered directly or turned into a scalar - // intrinsic call. - case Intrinsic::sqrt: - ISDs.push_back(ISD::FSQRT); - break; - case Intrinsic::sin: - ISDs.push_back(ISD::FSIN); - break; - case Intrinsic::cos: - ISDs.push_back(ISD::FCOS); - break; - case Intrinsic::exp: - ISDs.push_back(ISD::FEXP); - break; - case Intrinsic::exp2: - ISDs.push_back(ISD::FEXP2); - break; - case Intrinsic::log: - ISDs.push_back(ISD::FLOG); - break; - case Intrinsic::log10: - ISDs.push_back(ISD::FLOG10); - break; - case Intrinsic::log2: - ISDs.push_back(ISD::FLOG2); - break; - case Intrinsic::fabs: - ISDs.push_back(ISD::FABS); - break; - case Intrinsic::minnum: - ISDs.push_back(ISD::FMINNUM); - if (FMF.noNaNs()) - ISDs.push_back(ISD::FMINNAN); - break; - case Intrinsic::maxnum: - ISDs.push_back(ISD::FMAXNUM); - if (FMF.noNaNs()) - ISDs.push_back(ISD::FMAXNAN); - break; - case Intrinsic::copysign: - ISDs.push_back(ISD::FCOPYSIGN); - break; - case Intrinsic::floor: - ISDs.push_back(ISD::FFLOOR); - break; - case Intrinsic::ceil: - ISDs.push_back(ISD::FCEIL); - break; - case Intrinsic::trunc: - ISDs.push_back(ISD::FTRUNC); - break; - case Intrinsic::nearbyint: - ISDs.push_back(ISD::FNEARBYINT); - break; - case Intrinsic::rint: - ISDs.push_back(ISD::FRINT); - break; - case Intrinsic::round: - ISDs.push_back(ISD::FROUND); - break; - case Intrinsic::pow: - ISDs.push_back(ISD::FPOW); - break; - case Intrinsic::fma: - ISDs.push_back(ISD::FMA); - break; - case Intrinsic::fmuladd: - ISDs.push_back(ISD::FMA); - break; - // FIXME: We should return 0 whenever getIntrinsicCost == TCC_Free. - case Intrinsic::lifetime_start: - case Intrinsic::lifetime_end: - return 0; - case Intrinsic::masked_store: - return static_cast(this) - ->getMaskedMemoryOpCost(Instruction::Store, Tys[0], 0, 0); - case Intrinsic::masked_load: - return static_cast(this) - ->getMaskedMemoryOpCost(Instruction::Load, RetTy, 0, 0); - case Intrinsic::ctpop: - ISDs.push_back(ISD::CTPOP); - // In case of legalization use TCC_Expensive. This is cheaper than a - // library call but still not a cheap instruction. - SingleCallCost = TargetTransformInfo::TCC_Expensive; - break; - // FIXME: ctlz, cttz, ... - } - - const TargetLoweringBase *TLI = getTLI(); - std::pair LT = TLI->getTypeLegalizationCost(DL, RetTy); - - SmallVector LegalCost; - SmallVector CustomCost; - for (unsigned ISD : ISDs) { - if (TLI->isOperationLegalOrPromote(ISD, LT.second)) { - if (IID == Intrinsic::fabs && TLI->isFAbsFree(LT.second)) { - return 0; - } - - // The operation is legal. Assume it costs 1. - // If the type is split to multiple registers, assume that there is some - // overhead to this. - // TODO: Once we have extract/insert subvector cost we need to use them. - if (LT.first > 1) - LegalCost.push_back(LT.first * 2); - else - LegalCost.push_back(LT.first * 1); - } else if (!TLI->isOperationExpand(ISD, LT.second)) { - // If the operation is custom lowered then assume - // that the code is twice as expensive. - CustomCost.push_back(LT.first * 2); - } - } - - auto MinLegalCostI = std::min_element(LegalCost.begin(), LegalCost.end()); - if (MinLegalCostI != LegalCost.end()) - return *MinLegalCostI; - - auto MinCustomCostI = std::min_element(CustomCost.begin(), CustomCost.end()); - if (MinCustomCostI != CustomCost.end()) - return *MinCustomCostI; - - // If we can't lower fmuladd into an FMA estimate the cost as a floating - // point mul followed by an add. - if (IID == Intrinsic::fmuladd) - return static_cast(this) - ->getArithmeticInstrCost(BinaryOperator::FMul, RetTy) + - static_cast(this) - ->getArithmeticInstrCost(BinaryOperator::FAdd, RetTy); - - // Else, assume that we need to scalarize this intrinsic. For math builtins - // this will emit a costly libcall, adding call overhead and spills. Make it - // very expensive. - if (RetTy->isVectorTy()) { - unsigned ScalarizationCost = getScalarizationOverhead(RetTy, true, false); - unsigned ScalarCalls = RetTy->getVectorNumElements(); - SmallVector ScalarTys; - for (unsigned i = 0, ie = Tys.size(); i != ie; ++i) { - Type *Ty = Tys[i]; - if (Ty->isVectorTy()) - Ty = Ty->getScalarType(); - ScalarTys.push_back(Ty); - } - unsigned ScalarCost = static_cast(this)->getIntrinsicInstrCost( - IID, RetTy->getScalarType(), ScalarTys, FMF); - for (unsigned i = 0, ie = Tys.size(); i != ie; ++i) { - if (Tys[i]->isVectorTy()) { - ScalarizationCost += getScalarizationOverhead(Tys[i], false, true); - ScalarCalls = std::max(ScalarCalls, Tys[i]->getVectorNumElements()); - } - } - - return ScalarCalls * ScalarCost + ScalarizationCost; - } - - // This is going to be turned into a library call, make it expensive. - return SingleCallCost; - } - - /// \brief Compute a cost of the given call instruction. - /// - /// Compute the cost of calling function F with return type RetTy and - /// argument types Tys. F might be nullptr, in this case the cost of an - /// arbitrary call with the specified signature will be returned. - /// This is used, for instance, when we estimate call of a vector - /// counterpart of the given function. - /// \param F Called function, might be nullptr. - /// \param RetTy Return value types. - /// \param Tys Argument types. - /// \returns The cost of Call instruction. - unsigned getCallInstrCost(Function *F, Type *RetTy, ArrayRef Tys) { - return 10; - } - - unsigned getNumberOfParts(Type *Tp) { - std::pair LT = getTLI()->getTypeLegalizationCost(DL, Tp); - return LT.first; - } - - unsigned getAddressComputationCost(Type *Ty, bool IsComplex) { return 0; } - - unsigned getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwise) { - assert(Ty->isVectorTy() && "Expect a vector type"); - unsigned NumVecElts = Ty->getVectorNumElements(); - unsigned NumReduxLevels = Log2_32(NumVecElts); - unsigned ArithCost = - NumReduxLevels * - static_cast(this)->getArithmeticInstrCost(Opcode, Ty); - // Assume the pairwise shuffles add a cost. - unsigned ShuffleCost = - NumReduxLevels * (IsPairwise + 1) * - static_cast(this) - ->getShuffleCost(TTI::SK_ExtractSubvector, Ty, NumVecElts / 2, Ty); - return ShuffleCost + ArithCost + getScalarizationOverhead(Ty, false, true); - } - - unsigned getVectorSplitCost() { return 1; } - - /// @} -}; - -/// \brief Concrete BasicTTIImpl that can be used if no further customization -/// is needed. -class BasicTTIImpl : public BasicTTIImplBase { - typedef BasicTTIImplBase BaseT; - friend class BasicTTIImplBase; - - const TargetSubtargetInfo *ST; - const TargetLoweringBase *TLI; - - const TargetSubtargetInfo *getST() const { return ST; } - const TargetLoweringBase *getTLI() const { return TLI; } - -public: - explicit BasicTTIImpl(const TargetMachine *ST, const Function &F); - - // Provide value semantics. MSVC requires that we spell all of these out. - BasicTTIImpl(const BasicTTIImpl &Arg) - : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {} - BasicTTIImpl(BasicTTIImpl &&Arg) - : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)), - TLI(std::move(Arg.TLI)) {} -}; - -} - -#endif diff --git a/llvm/include/llvm/CodeGen/CalcSpillWeights.h b/llvm/include/llvm/CodeGen/CalcSpillWeights.h deleted file mode 100644 index 17c9415a..00000000 --- a/llvm/include/llvm/CodeGen/CalcSpillWeights.h +++ /dev/null @@ -1,82 +0,0 @@ -//===---------------- lib/CodeGen/CalcSpillWeights.h ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - - -#ifndef LLVM_CODEGEN_CALCSPILLWEIGHTS_H -#define LLVM_CODEGEN_CALCSPILLWEIGHTS_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/CodeGen/SlotIndexes.h" - -namespace llvm { - - class LiveInterval; - class LiveIntervals; - class MachineBlockFrequencyInfo; - class MachineLoopInfo; - class VirtRegMap; - - /// \brief Normalize the spill weight of a live interval - /// - /// The spill weight of a live interval is computed as: - /// - /// (sum(use freq) + sum(def freq)) / (K + size) - /// - /// @param UseDefFreq Expected number of executed use and def instructions - /// per function call. Derived from block frequencies. - /// @param Size Size of live interval as returnexd by getSize() - /// @param NumInstr Number of instructions using this live interval - /// - static inline float normalizeSpillWeight(float UseDefFreq, unsigned Size, - unsigned NumInstr) { - // The constant 25 instructions is added to avoid depending too much on - // accidental SlotIndex gaps for small intervals. The effect is that small - // intervals have a spill weight that is mostly proportional to the number - // of uses, while large intervals get a spill weight that is closer to a use - // density. - return UseDefFreq / (Size + 25*SlotIndex::InstrDist); - } - - /// \brief Calculate auxiliary information for a virtual register such as its - /// spill weight and allocation hint. - class VirtRegAuxInfo { - public: - typedef float (*NormalizingFn)(float, unsigned, unsigned); - - private: - MachineFunction &MF; - LiveIntervals &LIS; - VirtRegMap *VRM; - const MachineLoopInfo &Loops; - const MachineBlockFrequencyInfo &MBFI; - DenseMap Hint; - NormalizingFn normalize; - - public: - VirtRegAuxInfo(MachineFunction &mf, LiveIntervals &lis, - VirtRegMap *vrm, const MachineLoopInfo &loops, - const MachineBlockFrequencyInfo &mbfi, - NormalizingFn norm = normalizeSpillWeight) - : MF(mf), LIS(lis), VRM(vrm), Loops(loops), MBFI(mbfi), normalize(norm) {} - - /// \brief (re)compute li's spill weight and allocation hint. - void calculateSpillWeightAndHint(LiveInterval &li); - }; - - /// \brief Compute spill weights and allocation hints for all virtual register - /// live intervals. - void calculateSpillWeightsAndHints(LiveIntervals &LIS, MachineFunction &MF, - VirtRegMap *VRM, - const MachineLoopInfo &MLI, - const MachineBlockFrequencyInfo &MBFI, - VirtRegAuxInfo::NormalizingFn norm = - normalizeSpillWeight); -} - -#endif // LLVM_CODEGEN_CALCSPILLWEIGHTS_H diff --git a/llvm/include/llvm/CodeGen/CallingConvLower.h b/llvm/include/llvm/CodeGen/CallingConvLower.h deleted file mode 100644 index 92e58564..00000000 --- a/llvm/include/llvm/CodeGen/CallingConvLower.h +++ /dev/null @@ -1,533 +0,0 @@ -//===-- llvm/CallingConvLower.h - Calling Conventions -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the CCState and CCValAssign classes, used for lowering -// and implementing calling conventions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_CALLINGCONVLOWER_H -#define LLVM_CODEGEN_CALLINGCONVLOWER_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/CodeGen/MachineFrameInfo.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/IR/CallingConv.h" -#include "llvm/MC/MCRegisterInfo.h" -#include "llvm/Target/TargetCallingConv.h" - -namespace llvm { -class CCState; -class MVT; -class TargetMachine; -class TargetRegisterInfo; - -/// CCValAssign - Represent assignment of one arg/retval to a location. -class CCValAssign { -public: - enum LocInfo { - Full, // The value fills the full location. - SExt, // The value is sign extended in the location. - ZExt, // The value is zero extended in the location. - AExt, // The value is extended with undefined upper bits. - SExtUpper, // The value is in the upper bits of the location and should be - // sign extended when retrieved. - ZExtUpper, // The value is in the upper bits of the location and should be - // zero extended when retrieved. - AExtUpper, // The value is in the upper bits of the location and should be - // extended with undefined upper bits when retrieved. - BCvt, // The value is bit-converted in the location. - VExt, // The value is vector-widened in the location. - // FIXME: Not implemented yet. Code that uses AExt to mean - // vector-widen should be fixed to use VExt instead. - FPExt, // The floating-point value is fp-extended in the location. - Indirect // The location contains pointer to the value. - // TODO: a subset of the value is in the location. - }; - -private: - /// ValNo - This is the value number begin assigned (e.g. an argument number). - unsigned ValNo; - - /// Loc is either a stack offset or a register number. - unsigned Loc; - - /// isMem - True if this is a memory loc, false if it is a register loc. - unsigned isMem : 1; - - /// isCustom - True if this arg/retval requires special handling. - unsigned isCustom : 1; - - /// Information about how the value is assigned. - LocInfo HTP : 6; - - /// ValVT - The type of the value being assigned. - MVT ValVT; - - /// LocVT - The type of the location being assigned to. - MVT LocVT; -public: - - static CCValAssign getReg(unsigned ValNo, MVT ValVT, - unsigned RegNo, MVT LocVT, - LocInfo HTP) { - CCValAssign Ret; - Ret.ValNo = ValNo; - Ret.Loc = RegNo; - Ret.isMem = false; - Ret.isCustom = false; - Ret.HTP = HTP; - Ret.ValVT = ValVT; - Ret.LocVT = LocVT; - return Ret; - } - - static CCValAssign getCustomReg(unsigned ValNo, MVT ValVT, - unsigned RegNo, MVT LocVT, - LocInfo HTP) { - CCValAssign Ret; - Ret = getReg(ValNo, ValVT, RegNo, LocVT, HTP); - Ret.isCustom = true; - return Ret; - } - - static CCValAssign getMem(unsigned ValNo, MVT ValVT, - unsigned Offset, MVT LocVT, - LocInfo HTP) { - CCValAssign Ret; - Ret.ValNo = ValNo; - Ret.Loc = Offset; - Ret.isMem = true; - Ret.isCustom = false; - Ret.HTP = HTP; - Ret.ValVT = ValVT; - Ret.LocVT = LocVT; - return Ret; - } - - static CCValAssign getCustomMem(unsigned ValNo, MVT ValVT, - unsigned Offset, MVT LocVT, - LocInfo HTP) { - CCValAssign Ret; - Ret = getMem(ValNo, ValVT, Offset, LocVT, HTP); - Ret.isCustom = true; - return Ret; - } - - // There is no need to differentiate between a pending CCValAssign and other - // kinds, as they are stored in a different list. - static CCValAssign getPending(unsigned ValNo, MVT ValVT, MVT LocVT, - LocInfo HTP, unsigned ExtraInfo = 0) { - return getReg(ValNo, ValVT, ExtraInfo, LocVT, HTP); - } - - void convertToReg(unsigned RegNo) { - Loc = RegNo; - isMem = false; - } - - void convertToMem(unsigned Offset) { - Loc = Offset; - isMem = true; - } - - unsigned getValNo() const { return ValNo; } - MVT getValVT() const { return ValVT; } - - bool isRegLoc() const { return !isMem; } - bool isMemLoc() const { return isMem; } - - bool needsCustom() const { return isCustom; } - - unsigned getLocReg() const { assert(isRegLoc()); return Loc; } - unsigned getLocMemOffset() const { assert(isMemLoc()); return Loc; } - unsigned getExtraInfo() const { return Loc; } - MVT getLocVT() const { return LocVT; } - - LocInfo getLocInfo() const { return HTP; } - bool isExtInLoc() const { - return (HTP == AExt || HTP == SExt || HTP == ZExt); - } - - bool isUpperBitsInLoc() const { - return HTP == AExtUpper || HTP == SExtUpper || HTP == ZExtUpper; - } -}; - -/// Describes a register that needs to be forwarded from the prologue to a -/// musttail call. -struct ForwardedRegister { - ForwardedRegister(unsigned VReg, MCPhysReg PReg, MVT VT) - : VReg(VReg), PReg(PReg), VT(VT) {} - unsigned VReg; - MCPhysReg PReg; - MVT VT; -}; - -/// CCAssignFn - This function assigns a location for Val, updating State to -/// reflect the change. It returns 'true' if it failed to handle Val. -typedef bool CCAssignFn(unsigned ValNo, MVT ValVT, - MVT LocVT, CCValAssign::LocInfo LocInfo, - ISD::ArgFlagsTy ArgFlags, CCState &State); - -/// CCCustomFn - This function assigns a location for Val, possibly updating -/// all args to reflect changes and indicates if it handled it. It must set -/// isCustom if it handles the arg and returns true. -typedef bool CCCustomFn(unsigned &ValNo, MVT &ValVT, - MVT &LocVT, CCValAssign::LocInfo &LocInfo, - ISD::ArgFlagsTy &ArgFlags, CCState &State); - -/// ParmContext - This enum tracks whether calling convention lowering is in -/// the context of prologue or call generation. Not all backends make use of -/// this information. -typedef enum { Unknown, Prologue, Call } ParmContext; - -/// CCState - This class holds information needed while lowering arguments and -/// return values. It captures which registers are already assigned and which -/// stack slots are used. It provides accessors to allocate these values. -class CCState { -private: - CallingConv::ID CallingConv; - bool IsVarArg; - bool AnalyzingMustTailForwardedRegs = false; - MachineFunction &MF; - const TargetRegisterInfo &TRI; - SmallVectorImpl &Locs; - LLVMContext &Context; - - unsigned StackOffset; - unsigned MaxStackArgAlign; - SmallVector UsedRegs; - SmallVector PendingLocs; - - // ByValInfo and SmallVector ByValRegs: - // - // Vector of ByValInfo instances (ByValRegs) is introduced for byval registers - // tracking. - // Or, in another words it tracks byval parameters that are stored in - // general purpose registers. - // - // For 4 byte stack alignment, - // instance index means byval parameter number in formal - // arguments set. Assume, we have some "struct_type" with size = 4 bytes, - // then, for function "foo": - // - // i32 foo(i32 %p, %struct_type* %r, i32 %s, %struct_type* %t) - // - // ByValRegs[0] describes how "%r" is stored (Begin == r1, End == r2) - // ByValRegs[1] describes how "%t" is stored (Begin == r3, End == r4). - // - // In case of 8 bytes stack alignment, - // ByValRegs may also contain information about wasted registers. - // In function shown above, r3 would be wasted according to AAPCS rules. - // And in that case ByValRegs[1].Waste would be "true". - // ByValRegs vector size still would be 2, - // while "%t" goes to the stack: it wouldn't be described in ByValRegs. - // - // Supposed use-case for this collection: - // 1. Initially ByValRegs is empty, InRegsParamsProcessed is 0. - // 2. HandleByVal fillups ByValRegs. - // 3. Argument analysis (LowerFormatArguments, for example). After - // some byval argument was analyzed, InRegsParamsProcessed is increased. - struct ByValInfo { - ByValInfo(unsigned B, unsigned E, bool IsWaste = false) : - Begin(B), End(E), Waste(IsWaste) {} - // First register allocated for current parameter. - unsigned Begin; - - // First after last register allocated for current parameter. - unsigned End; - - // Means that current range of registers doesn't belong to any - // parameters. It was wasted due to stack alignment rules. - // For more information see: - // AAPCS, 5.5 Parameter Passing, Stage C, C.3. - bool Waste; - }; - SmallVector ByValRegs; - - // InRegsParamsProcessed - shows how many instances of ByValRegs was proceed - // during argument analysis. - unsigned InRegsParamsProcessed; - -protected: - ParmContext CallOrPrologue; - -public: - CCState(CallingConv::ID CC, bool isVarArg, MachineFunction &MF, - SmallVectorImpl &locs, LLVMContext &C); - - void addLoc(const CCValAssign &V) { - Locs.push_back(V); - } - - LLVMContext &getContext() const { return Context; } - MachineFunction &getMachineFunction() const { return MF; } - CallingConv::ID getCallingConv() const { return CallingConv; } - bool isVarArg() const { return IsVarArg; } - - /// getNextStackOffset - Return the next stack offset such that all stack - /// slots satisfy their alignment requirements. - unsigned getNextStackOffset() const { - return StackOffset; - } - - /// getAlignedCallFrameSize - Return the size of the call frame needed to - /// be able to store all arguments and such that the alignment requirement - /// of each of the arguments is satisfied. - unsigned getAlignedCallFrameSize() const { - return alignTo(StackOffset, MaxStackArgAlign); - } - - /// isAllocated - Return true if the specified register (or an alias) is - /// allocated. - bool isAllocated(unsigned Reg) const { - return UsedRegs[Reg/32] & (1 << (Reg&31)); - } - - /// AnalyzeFormalArguments - Analyze an array of argument values, - /// incorporating info about the formals into this state. - void AnalyzeFormalArguments(const SmallVectorImpl &Ins, - CCAssignFn Fn); - - /// AnalyzeReturn - Analyze the returned values of a return, - /// incorporating info about the result values into this state. - void AnalyzeReturn(const SmallVectorImpl &Outs, - CCAssignFn Fn); - - /// CheckReturn - Analyze the return values of a function, returning - /// true if the return can be performed without sret-demotion, and - /// false otherwise. - bool CheckReturn(const SmallVectorImpl &ArgsFlags, - CCAssignFn Fn); - - /// AnalyzeCallOperands - Analyze the outgoing arguments to a call, - /// incorporating info about the passed values into this state. - void AnalyzeCallOperands(const SmallVectorImpl &Outs, - CCAssignFn Fn); - - /// AnalyzeCallOperands - Same as above except it takes vectors of types - /// and argument flags. - void AnalyzeCallOperands(SmallVectorImpl &ArgVTs, - SmallVectorImpl &Flags, - CCAssignFn Fn); - - /// AnalyzeCallResult - Analyze the return values of a call, - /// incorporating info about the passed values into this state. - void AnalyzeCallResult(const SmallVectorImpl &Ins, - CCAssignFn Fn); - - /// AnalyzeCallResult - Same as above except it's specialized for calls which - /// produce a single value. - void AnalyzeCallResult(MVT VT, CCAssignFn Fn); - - /// getFirstUnallocated - Return the index of the first unallocated register - /// in the set, or Regs.size() if they are all allocated. - unsigned getFirstUnallocated(ArrayRef Regs) const { - for (unsigned i = 0; i < Regs.size(); ++i) - if (!isAllocated(Regs[i])) - return i; - return Regs.size(); - } - - /// AllocateReg - Attempt to allocate one register. If it is not available, - /// return zero. Otherwise, return the register, marking it and any aliases - /// as allocated. - unsigned AllocateReg(unsigned Reg) { - if (isAllocated(Reg)) return 0; - MarkAllocated(Reg); - return Reg; - } - - /// Version of AllocateReg with extra register to be shadowed. - unsigned AllocateReg(unsigned Reg, unsigned ShadowReg) { - if (isAllocated(Reg)) return 0; - MarkAllocated(Reg); - MarkAllocated(ShadowReg); - return Reg; - } - - /// AllocateReg - Attempt to allocate one of the specified registers. If none - /// are available, return zero. Otherwise, return the first one available, - /// marking it and any aliases as allocated. - unsigned AllocateReg(ArrayRef Regs) { - unsigned FirstUnalloc = getFirstUnallocated(Regs); - if (FirstUnalloc == Regs.size()) - return 0; // Didn't find the reg. - - // Mark the register and any aliases as allocated. - unsigned Reg = Regs[FirstUnalloc]; - MarkAllocated(Reg); - return Reg; - } - - /// AllocateRegBlock - Attempt to allocate a block of RegsRequired consecutive - /// registers. If this is not possible, return zero. Otherwise, return the first - /// register of the block that were allocated, marking the entire block as allocated. - unsigned AllocateRegBlock(ArrayRef Regs, unsigned RegsRequired) { - if (RegsRequired > Regs.size()) - return 0; - - for (unsigned StartIdx = 0; StartIdx <= Regs.size() - RegsRequired; - ++StartIdx) { - bool BlockAvailable = true; - // Check for already-allocated regs in this block - for (unsigned BlockIdx = 0; BlockIdx < RegsRequired; ++BlockIdx) { - if (isAllocated(Regs[StartIdx + BlockIdx])) { - BlockAvailable = false; - break; - } - } - if (BlockAvailable) { - // Mark the entire block as allocated - for (unsigned BlockIdx = 0; BlockIdx < RegsRequired; ++BlockIdx) { - MarkAllocated(Regs[StartIdx + BlockIdx]); - } - return Regs[StartIdx]; - } - } - // No block was available - return 0; - } - - /// Version of AllocateReg with list of registers to be shadowed. - unsigned AllocateReg(ArrayRef Regs, const MCPhysReg *ShadowRegs) { - unsigned FirstUnalloc = getFirstUnallocated(Regs); - if (FirstUnalloc == Regs.size()) - return 0; // Didn't find the reg. - - // Mark the register and any aliases as allocated. - unsigned Reg = Regs[FirstUnalloc], ShadowReg = ShadowRegs[FirstUnalloc]; - MarkAllocated(Reg); - MarkAllocated(ShadowReg); - return Reg; - } - - /// AllocateStack - Allocate a chunk of stack space with the specified size - /// and alignment. - unsigned AllocateStack(unsigned Size, unsigned Align) { - assert(Align && ((Align - 1) & Align) == 0); // Align is power of 2. - StackOffset = alignTo(StackOffset, Align); - unsigned Result = StackOffset; - StackOffset += Size; - MaxStackArgAlign = std::max(Align, MaxStackArgAlign); - ensureMaxAlignment(Align); - return Result; - } - - void ensureMaxAlignment(unsigned Align) { - if (!AnalyzingMustTailForwardedRegs) - MF.getFrameInfo()->ensureMaxAlignment(Align); - } - - /// Version of AllocateStack with extra register to be shadowed. - unsigned AllocateStack(unsigned Size, unsigned Align, unsigned ShadowReg) { - MarkAllocated(ShadowReg); - return AllocateStack(Size, Align); - } - - /// Version of AllocateStack with list of extra registers to be shadowed. - /// Note that, unlike AllocateReg, this shadows ALL of the shadow registers. - unsigned AllocateStack(unsigned Size, unsigned Align, - ArrayRef ShadowRegs) { - for (unsigned i = 0; i < ShadowRegs.size(); ++i) - MarkAllocated(ShadowRegs[i]); - return AllocateStack(Size, Align); - } - - // HandleByVal - Allocate a stack slot large enough to pass an argument by - // value. The size and alignment information of the argument is encoded in its - // parameter attribute. - void HandleByVal(unsigned ValNo, MVT ValVT, - MVT LocVT, CCValAssign::LocInfo LocInfo, - int MinSize, int MinAlign, ISD::ArgFlagsTy ArgFlags); - - // Returns count of byval arguments that are to be stored (even partly) - // in registers. - unsigned getInRegsParamsCount() const { return ByValRegs.size(); } - - // Returns count of byval in-regs arguments proceed. - unsigned getInRegsParamsProcessed() const { return InRegsParamsProcessed; } - - // Get information about N-th byval parameter that is stored in registers. - // Here "ByValParamIndex" is N. - void getInRegsParamInfo(unsigned InRegsParamRecordIndex, - unsigned& BeginReg, unsigned& EndReg) const { - assert(InRegsParamRecordIndex < ByValRegs.size() && - "Wrong ByVal parameter index"); - - const ByValInfo& info = ByValRegs[InRegsParamRecordIndex]; - BeginReg = info.Begin; - EndReg = info.End; - } - - // Add information about parameter that is kept in registers. - void addInRegsParamInfo(unsigned RegBegin, unsigned RegEnd) { - ByValRegs.push_back(ByValInfo(RegBegin, RegEnd)); - } - - // Goes either to next byval parameter (excluding "waste" record), or - // to the end of collection. - // Returns false, if end is reached. - bool nextInRegsParam() { - unsigned e = ByValRegs.size(); - if (InRegsParamsProcessed < e) - ++InRegsParamsProcessed; - return InRegsParamsProcessed < e; - } - - // Clear byval registers tracking info. - void clearByValRegsInfo() { - InRegsParamsProcessed = 0; - ByValRegs.clear(); - } - - // Rewind byval registers tracking info. - void rewindByValRegsInfo() { - InRegsParamsProcessed = 0; - } - - ParmContext getCallOrPrologue() const { return CallOrPrologue; } - - // Get list of pending assignments - SmallVectorImpl &getPendingLocs() { - return PendingLocs; - } - - /// Compute the remaining unused register parameters that would be used for - /// the given value type. This is useful when varargs are passed in the - /// registers that normal prototyped parameters would be passed in, or for - /// implementing perfect forwarding. - void getRemainingRegParmsForType(SmallVectorImpl &Regs, MVT VT, - CCAssignFn Fn); - - /// Compute the set of registers that need to be preserved and forwarded to - /// any musttail calls. - void analyzeMustTailForwardedRegisters( - SmallVectorImpl &Forwards, ArrayRef RegParmTypes, - CCAssignFn Fn); - - /// Returns true if the results of the two calling conventions are compatible. - /// This is usually part of the check for tailcall eligibility. - static bool resultsCompatible(CallingConv::ID CalleeCC, - CallingConv::ID CallerCC, MachineFunction &MF, - LLVMContext &C, - const SmallVectorImpl &Ins, - CCAssignFn CalleeFn, CCAssignFn CallerFn); - -private: - /// MarkAllocated - Mark a register and all of its aliases as allocated. - void MarkAllocated(unsigned Reg); -}; - - - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/CommandFlags.h b/llvm/include/llvm/CodeGen/CommandFlags.h deleted file mode 100644 index 6376c067..00000000 --- a/llvm/include/llvm/CodeGen/CommandFlags.h +++ /dev/null @@ -1,396 +0,0 @@ -//===-- CommandFlags.h - Command Line Flags Interface -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains codegen-specific flags that are shared between different -// command line tools. The tools "llc" and "opt" both use this file to prevent -// flag duplication. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_COMMANDFLAGS_H -#define LLVM_CODEGEN_COMMANDFLAGS_H - -#include "llvm/ADT/StringExtras.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/IR/Module.h" -#include "llvm/MC/MCTargetOptionsCommandFlags.h" -#include "llvm/MC/SubtargetFeature.h" -#include "llvm/Support/CodeGen.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/Host.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetOptions.h" -#include "llvm/Target/TargetRecip.h" -#include -using namespace llvm; - -cl::opt -MArch("march", cl::desc("Architecture to generate code for (see --version)")); - -cl::opt -MCPU("mcpu", - cl::desc("Target a specific cpu type (-mcpu=help for details)"), - cl::value_desc("cpu-name"), - cl::init("")); - -cl::list -MAttrs("mattr", - cl::CommaSeparated, - cl::desc("Target specific attributes (-mattr=help for details)"), - cl::value_desc("a1,+a2,-a3,...")); - -cl::opt RelocModel( - "relocation-model", cl::desc("Choose relocation model"), - cl::values( - clEnumValN(Reloc::Static, "static", "Non-relocatable code"), - clEnumValN(Reloc::PIC_, "pic", - "Fully relocatable, position independent code"), - clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic", - "Relocatable external references, non-relocatable code"), - clEnumValEnd)); - -static inline Optional getRelocModel() { - if (RelocModel.getNumOccurrences()) { - Reloc::Model R = RelocModel; - return R; - } - return None; -} - -cl::opt -TMModel("thread-model", - cl::desc("Choose threading model"), - cl::init(ThreadModel::POSIX), - cl::values(clEnumValN(ThreadModel::POSIX, "posix", - "POSIX thread model"), - clEnumValN(ThreadModel::Single, "single", - "Single thread model"), - clEnumValEnd)); - -cl::opt -CMModel("code-model", - cl::desc("Choose code model"), - cl::init(CodeModel::Default), - cl::values(clEnumValN(CodeModel::Default, "default", - "Target default code model"), - clEnumValN(CodeModel::Small, "small", - "Small code model"), - clEnumValN(CodeModel::Kernel, "kernel", - "Kernel code model"), - clEnumValN(CodeModel::Medium, "medium", - "Medium code model"), - clEnumValN(CodeModel::Large, "large", - "Large code model"), - clEnumValEnd)); - -cl::opt -ExceptionModel("exception-model", - cl::desc("exception model"), - cl::init(ExceptionHandling::None), - cl::values(clEnumValN(ExceptionHandling::None, "default", - "default exception handling model"), - clEnumValN(ExceptionHandling::DwarfCFI, "dwarf", - "DWARF-like CFI based exception handling"), - clEnumValN(ExceptionHandling::SjLj, "sjlj", - "SjLj exception handling"), - clEnumValN(ExceptionHandling::ARM, "arm", - "ARM EHABI exceptions"), - clEnumValN(ExceptionHandling::WinEH, "wineh", - "Windows exception model"), - clEnumValEnd)); - -cl::opt -FileType("filetype", cl::init(TargetMachine::CGFT_AssemblyFile), - cl::desc("Choose a file type (not all types are supported by all targets):"), - cl::values( - clEnumValN(TargetMachine::CGFT_AssemblyFile, "asm", - "Emit an assembly ('.s') file"), - clEnumValN(TargetMachine::CGFT_ObjectFile, "obj", - "Emit a native object ('.o') file"), - clEnumValN(TargetMachine::CGFT_Null, "null", - "Emit nothing, for performance testing"), - clEnumValEnd)); - -cl::opt -EnableFPMAD("enable-fp-mad", - cl::desc("Enable less precise MAD instructions to be generated"), - cl::init(false)); - -cl::opt -DisableFPElim("disable-fp-elim", - cl::desc("Disable frame pointer elimination optimization"), - cl::init(false)); - -cl::opt -EnableUnsafeFPMath("enable-unsafe-fp-math", - cl::desc("Enable optimizations that may decrease FP precision"), - cl::init(false)); - -cl::opt -EnableNoInfsFPMath("enable-no-infs-fp-math", - cl::desc("Enable FP math optimizations that assume no +-Infs"), - cl::init(false)); - -cl::opt -EnableNoNaNsFPMath("enable-no-nans-fp-math", - cl::desc("Enable FP math optimizations that assume no NaNs"), - cl::init(false)); - -cl::opt -EnableHonorSignDependentRoundingFPMath("enable-sign-dependent-rounding-fp-math", - cl::Hidden, - cl::desc("Force codegen to assume rounding mode can change dynamically"), - cl::init(false)); - -cl::opt -FloatABIForCalls("float-abi", - cl::desc("Choose float ABI type"), - cl::init(FloatABI::Default), - cl::values( - clEnumValN(FloatABI::Default, "default", - "Target default float ABI type"), - clEnumValN(FloatABI::Soft, "soft", - "Soft float ABI (implied by -soft-float)"), - clEnumValN(FloatABI::Hard, "hard", - "Hard float ABI (uses FP registers)"), - clEnumValEnd)); - -cl::opt -FuseFPOps("fp-contract", - cl::desc("Enable aggressive formation of fused FP ops"), - cl::init(FPOpFusion::Standard), - cl::values( - clEnumValN(FPOpFusion::Fast, "fast", - "Fuse FP ops whenever profitable"), - clEnumValN(FPOpFusion::Standard, "on", - "Only fuse 'blessed' FP ops."), - clEnumValN(FPOpFusion::Strict, "off", - "Only fuse FP ops when the result won't be affected."), - clEnumValEnd)); - -cl::list -ReciprocalOps("recip", - cl::CommaSeparated, - cl::desc("Choose reciprocal operation types and parameters."), - cl::value_desc("all,none,default,divf,!vec-sqrtd,vec-divd:0,sqrt:9...")); - -cl::opt -DontPlaceZerosInBSS("nozero-initialized-in-bss", - cl::desc("Don't place zero-initialized symbols into bss section"), - cl::init(false)); - -cl::opt -EnableGuaranteedTailCallOpt("tailcallopt", - cl::desc("Turn fastcc calls into tail calls by (potentially) changing ABI."), - cl::init(false)); - -cl::opt -DisableTailCalls("disable-tail-calls", - cl::desc("Never emit tail calls"), - cl::init(false)); - -cl::opt -StackSymbolOrdering("stack-symbol-ordering", - cl::desc("Order local stack symbols."), - cl::init(true)); - -cl::opt -OverrideStackAlignment("stack-alignment", - cl::desc("Override default stack alignment"), - cl::init(0)); - -cl::opt -StackRealign("stackrealign", - cl::desc("Force align the stack to the minimum alignment"), - cl::init(false)); - -cl::opt -TrapFuncName("trap-func", cl::Hidden, - cl::desc("Emit a call to trap function rather than a trap instruction"), - cl::init("")); - -cl::opt -UseCtors("use-ctors", - cl::desc("Use .ctors instead of .init_array."), - cl::init(false)); - -cl::opt StopAfter("stop-after", - cl::desc("Stop compilation after a specific pass"), - cl::value_desc("pass-name"), - cl::init("")); -cl::opt StartAfter("start-after", - cl::desc("Resume compilation after a specific pass"), - cl::value_desc("pass-name"), - cl::init("")); - -cl::opt DataSections("data-sections", - cl::desc("Emit data into separate sections"), - cl::init(false)); - -cl::opt -FunctionSections("function-sections", - cl::desc("Emit functions into separate sections"), - cl::init(false)); - -cl::opt EmulatedTLS("emulated-tls", - cl::desc("Use emulated TLS model"), - cl::init(false)); - -cl::opt UniqueSectionNames("unique-section-names", - cl::desc("Give unique names to every section"), - cl::init(true)); - -cl::opt -JTableType("jump-table-type", - cl::desc("Choose the type of Jump-Instruction Table for jumptable."), - cl::init(JumpTable::Single), - cl::values( - clEnumValN(JumpTable::Single, "single", - "Create a single table for all jumptable functions"), - clEnumValN(JumpTable::Arity, "arity", - "Create one table per number of parameters."), - clEnumValN(JumpTable::Simplified, "simplified", - "Create one table per simplified function type."), - clEnumValN(JumpTable::Full, "full", - "Create one table per unique function type."), - clEnumValEnd)); - -cl::opt EABIVersion( - "meabi", cl::desc("Set EABI type (default depends on triple):"), - cl::init(EABI::Default), - cl::values(clEnumValN(EABI::Default, "default", - "Triple default EABI version"), - clEnumValN(EABI::EABI4, "4", "EABI version 4"), - clEnumValN(EABI::EABI5, "5", "EABI version 5"), - clEnumValN(EABI::GNU, "gnu", "EABI GNU"), clEnumValEnd)); - -cl::opt -DebuggerTuningOpt("debugger-tune", - cl::desc("Tune debug info for a particular debugger"), - cl::init(DebuggerKind::Default), - cl::values( - clEnumValN(DebuggerKind::GDB, "gdb", "gdb"), - clEnumValN(DebuggerKind::LLDB, "lldb", "lldb"), - clEnumValN(DebuggerKind::SCE, "sce", - "SCE targets (e.g. PS4)"), - clEnumValEnd)); - -// Common utility function tightly tied to the options listed here. Initializes -// a TargetOptions object with CodeGen flags and returns it. -static inline TargetOptions InitTargetOptionsFromCodeGenFlags() { - TargetOptions Options; - Options.LessPreciseFPMADOption = EnableFPMAD; - Options.AllowFPOpFusion = FuseFPOps; - Options.Reciprocals = TargetRecip(ReciprocalOps); - Options.UnsafeFPMath = EnableUnsafeFPMath; - Options.NoInfsFPMath = EnableNoInfsFPMath; - Options.NoNaNsFPMath = EnableNoNaNsFPMath; - Options.HonorSignDependentRoundingFPMathOption = - EnableHonorSignDependentRoundingFPMath; - if (FloatABIForCalls != FloatABI::Default) - Options.FloatABIType = FloatABIForCalls; - Options.NoZerosInBSS = DontPlaceZerosInBSS; - Options.GuaranteedTailCallOpt = EnableGuaranteedTailCallOpt; - Options.StackAlignmentOverride = OverrideStackAlignment; - Options.StackSymbolOrdering = StackSymbolOrdering; - Options.UseInitArray = !UseCtors; - Options.DataSections = DataSections; - Options.FunctionSections = FunctionSections; - Options.UniqueSectionNames = UniqueSectionNames; - Options.EmulatedTLS = EmulatedTLS; - Options.ExceptionModel = ExceptionModel; - - Options.MCOptions = InitMCTargetOptionsFromFlags(); - Options.JTType = JTableType; - - Options.ThreadModel = TMModel; - Options.EABIVersion = EABIVersion; - Options.DebuggerTuning = DebuggerTuningOpt; - - return Options; -} - -static inline std::string getCPUStr() { - // If user asked for the 'native' CPU, autodetect here. If autodection fails, - // this will set the CPU to an empty string which tells the target to - // pick a basic default. - if (MCPU == "native") - return sys::getHostCPUName(); - - return MCPU; -} - -static inline std::string getFeaturesStr() { - SubtargetFeatures Features; - - // If user asked for the 'native' CPU, we need to autodetect features. - // This is necessary for x86 where the CPU might not support all the - // features the autodetected CPU name lists in the target. For example, - // not all Sandybridge processors support AVX. - if (MCPU == "native") { - StringMap HostFeatures; - if (sys::getHostCPUFeatures(HostFeatures)) - for (auto &F : HostFeatures) - Features.AddFeature(F.first(), F.second); - } - - for (unsigned i = 0; i != MAttrs.size(); ++i) - Features.AddFeature(MAttrs[i]); - - return Features.getString(); -} - -/// \brief Set function attributes of functions in Module M based on CPU, -/// Features, and command line flags. -static inline void setFunctionAttributes(StringRef CPU, StringRef Features, - Module &M) { - for (auto &F : M) { - auto &Ctx = F.getContext(); - AttributeSet Attrs = F.getAttributes(), NewAttrs; - - if (!CPU.empty()) - NewAttrs = NewAttrs.addAttribute(Ctx, AttributeSet::FunctionIndex, - "target-cpu", CPU); - - if (!Features.empty()) - NewAttrs = NewAttrs.addAttribute(Ctx, AttributeSet::FunctionIndex, - "target-features", Features); - - if (DisableFPElim.getNumOccurrences() > 0) - NewAttrs = NewAttrs.addAttribute(Ctx, AttributeSet::FunctionIndex, - "no-frame-pointer-elim", - DisableFPElim ? "true" : "false"); - - if (DisableTailCalls.getNumOccurrences() > 0) - NewAttrs = NewAttrs.addAttribute(Ctx, AttributeSet::FunctionIndex, - "disable-tail-calls", - toStringRef(DisableTailCalls)); - - if (StackRealign) - NewAttrs = NewAttrs.addAttribute(Ctx, AttributeSet::FunctionIndex, - "stackrealign"); - - if (TrapFuncName.getNumOccurrences() > 0) - for (auto &B : F) - for (auto &I : B) - if (auto *Call = dyn_cast(&I)) - if (const auto *F = Call->getCalledFunction()) - if (F->getIntrinsicID() == Intrinsic::debugtrap || - F->getIntrinsicID() == Intrinsic::trap) - Call->addAttribute(llvm::AttributeSet::FunctionIndex, - "trap-func-name", TrapFuncName); - - // Let NewAttrs override Attrs. - NewAttrs = Attrs.addAttributes(Ctx, AttributeSet::FunctionIndex, NewAttrs); - F.setAttributes(NewAttrs); - } -} - -#endif diff --git a/llvm/include/llvm/CodeGen/DAGCombine.h b/llvm/include/llvm/CodeGen/DAGCombine.h deleted file mode 100644 index 8b591900..00000000 --- a/llvm/include/llvm/CodeGen/DAGCombine.h +++ /dev/null @@ -1,25 +0,0 @@ -//===-- llvm/CodeGen/DAGCombine.h ------- SelectionDAG Nodes ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// - -#ifndef LLVM_CODEGEN_DAGCOMBINE_H -#define LLVM_CODEGEN_DAGCOMBINE_H - -namespace llvm { - -enum CombineLevel { - BeforeLegalizeTypes, - AfterLegalizeTypes, - AfterLegalizeVectorOps, - AfterLegalizeDAG -}; - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/DFAPacketizer.h b/llvm/include/llvm/CodeGen/DFAPacketizer.h deleted file mode 100644 index 8de140e9..00000000 --- a/llvm/include/llvm/CodeGen/DFAPacketizer.h +++ /dev/null @@ -1,210 +0,0 @@ -//=- llvm/CodeGen/DFAPacketizer.h - DFA Packetizer for VLIW ---*- C++ -*-=====// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// This class implements a deterministic finite automaton (DFA) based -// packetizing mechanism for VLIW architectures. It provides APIs to -// determine whether there exists a legal mapping of instructions to -// functional unit assignments in a packet. The DFA is auto-generated from -// the target's Schedule.td file. -// -// A DFA consists of 3 major elements: states, inputs, and transitions. For -// the packetizing mechanism, the input is the set of instruction classes for -// a target. The state models all possible combinations of functional unit -// consumption for a given set of instructions in a packet. A transition -// models the addition of an instruction to a packet. In the DFA constructed -// by this class, if an instruction can be added to a packet, then a valid -// transition exists from the corresponding state. Invalid transitions -// indicate that the instruction cannot be added to the current packet. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_DFAPACKETIZER_H -#define LLVM_CODEGEN_DFAPACKETIZER_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/ScheduleDAGMutation.h" -#include - -namespace llvm { - -class MCInstrDesc; -class MachineInstr; -class MachineLoopInfo; -class MachineDominatorTree; -class InstrItineraryData; -class DefaultVLIWScheduler; -class SUnit; - -// -------------------------------------------------------------------- -// Definitions shared between DFAPacketizer.cpp and DFAPacketizerEmitter.cpp - -// DFA_MAX_RESTERMS * DFA_MAX_RESOURCES must fit within sizeof DFAInput. -// This is verified in DFAPacketizer.cpp:DFAPacketizer::DFAPacketizer. -// -// e.g. terms x resource bit combinations that fit in uint32_t: -// 4 terms x 8 bits = 32 bits -// 3 terms x 10 bits = 30 bits -// 2 terms x 16 bits = 32 bits -// -// e.g. terms x resource bit combinations that fit in uint64_t: -// 8 terms x 8 bits = 64 bits -// 7 terms x 9 bits = 63 bits -// 6 terms x 10 bits = 60 bits -// 5 terms x 12 bits = 60 bits -// 4 terms x 16 bits = 64 bits <--- current -// 3 terms x 21 bits = 63 bits -// 2 terms x 32 bits = 64 bits -// -#define DFA_MAX_RESTERMS 4 // The max # of AND'ed resource terms. -#define DFA_MAX_RESOURCES 16 // The max # of resource bits in one term. - -typedef uint64_t DFAInput; -typedef int64_t DFAStateInput; -#define DFA_TBLTYPE "int64_t" // For generating DFAStateInputTable. -// -------------------------------------------------------------------- - -class DFAPacketizer { -private: - typedef std::pair UnsignPair; - - const InstrItineraryData *InstrItins; - int CurrentState; - const DFAStateInput (*DFAStateInputTable)[2]; - const unsigned *DFAStateEntryTable; - - // CachedTable is a map from to ToState. - DenseMap CachedTable; - - // Read the DFA transition table and update CachedTable. - void ReadTable(unsigned state); - -public: - DFAPacketizer(const InstrItineraryData *I, const DFAStateInput (*SIT)[2], - const unsigned *SET); - - // Reset the current state to make all resources available. - void clearResources() { - CurrentState = 0; - } - - // Return the DFAInput for an instruction class. - DFAInput getInsnInput(unsigned InsnClass); - - // Return the DFAInput for an instruction class input vector. - static DFAInput getInsnInput(const std::vector &InsnClass); - - // Check if the resources occupied by a MCInstrDesc are available in - // the current state. - bool canReserveResources(const llvm::MCInstrDesc *MID); - - // Reserve the resources occupied by a MCInstrDesc and change the current - // state to reflect that change. - void reserveResources(const llvm::MCInstrDesc *MID); - - // Check if the resources occupied by a machine instruction are available - // in the current state. - bool canReserveResources(llvm::MachineInstr &MI); - - // Reserve the resources occupied by a machine instruction and change the - // current state to reflect that change. - void reserveResources(llvm::MachineInstr &MI); - - const InstrItineraryData *getInstrItins() const { return InstrItins; } -}; - - -// VLIWPacketizerList implements a simple VLIW packetizer using DFA. The -// packetizer works on machine basic blocks. For each instruction I in BB, -// the packetizer consults the DFA to see if machine resources are available -// to execute I. If so, the packetizer checks if I depends on any instruction -// in the current packet. If no dependency is found, I is added to current -// packet and the machine resource is marked as taken. If any dependency is -// found, a target API call is made to prune the dependence. -class VLIWPacketizerList { -protected: - MachineFunction &MF; - const TargetInstrInfo *TII; - AliasAnalysis *AA; - - // The VLIW Scheduler. - DefaultVLIWScheduler *VLIWScheduler; - // Vector of instructions assigned to the current packet. - std::vector CurrentPacketMIs; - // DFA resource tracker. - DFAPacketizer *ResourceTracker; - // Map: MI -> SU. - std::map MIToSUnit; - -public: - // The AliasAnalysis parameter can be nullptr. - VLIWPacketizerList(MachineFunction &MF, MachineLoopInfo &MLI, - AliasAnalysis *AA); - - virtual ~VLIWPacketizerList(); - - // Implement this API in the backend to bundle instructions. - void PacketizeMIs(MachineBasicBlock *MBB, - MachineBasicBlock::iterator BeginItr, - MachineBasicBlock::iterator EndItr); - - // Return the ResourceTracker. - DFAPacketizer *getResourceTracker() {return ResourceTracker;} - - // addToPacket - Add MI to the current packet. - virtual MachineBasicBlock::iterator addToPacket(MachineInstr &MI) { - CurrentPacketMIs.push_back(&MI); - ResourceTracker->reserveResources(MI); - return MI; - } - - // End the current packet and reset the state of the packetizer. - // Overriding this function allows the target-specific packetizer - // to perform custom finalization. - virtual void endPacket(MachineBasicBlock *MBB, - MachineBasicBlock::iterator MI); - - // Perform initialization before packetizing an instruction. This - // function is supposed to be overrided by the target dependent packetizer. - virtual void initPacketizerState() {} - - // Check if the given instruction I should be ignored by the packetizer. - virtual bool ignorePseudoInstruction(const MachineInstr &I, - const MachineBasicBlock *MBB) { - return false; - } - - // Return true if instruction MI can not be packetized with any other - // instruction, which means that MI itself is a packet. - virtual bool isSoloInstruction(const MachineInstr &MI) { return true; } - - // Check if the packetizer should try to add the given instruction to - // the current packet. One reasons for which it may not be desirable - // to include an instruction in the current packet could be that it - // would cause a stall. - // If this function returns "false", the current packet will be ended, - // and the instruction will be added to the next packet. - virtual bool shouldAddToPacket(const MachineInstr &MI) { return true; } - - // Check if it is legal to packetize SUI and SUJ together. - virtual bool isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) { - return false; - } - - // Check if it is legal to prune dependece between SUI and SUJ. - virtual bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) { - return false; - } - - // Add a DAG mutation to be done before the packetization begins. - void addMutation(std::unique_ptr Mutation); -}; - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/DIE.h b/llvm/include/llvm/CodeGen/DIE.h deleted file mode 100644 index 7d6e66fa..00000000 --- a/llvm/include/llvm/CodeGen/DIE.h +++ /dev/null @@ -1,745 +0,0 @@ -//===--- lib/CodeGen/DIE.h - DWARF Info Entries -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Data structures for DWARF info entries. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DIE_H -#define LLVM_LIB_CODEGEN_ASMPRINTER_DIE_H - -#include "llvm/ADT/FoldingSet.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/CodeGen/DwarfStringPoolEntry.h" -#include "llvm/Support/Dwarf.h" - -namespace llvm { -class AsmPrinter; -class MCExpr; -class MCSymbol; -class raw_ostream; -class DwarfTypeUnit; - -//===--------------------------------------------------------------------===// -/// DIEAbbrevData - Dwarf abbreviation data, describes one attribute of a -/// Dwarf abbreviation. -class DIEAbbrevData { - /// Attribute - Dwarf attribute code. - /// - dwarf::Attribute Attribute; - - /// Form - Dwarf form code. - /// - dwarf::Form Form; - -public: - DIEAbbrevData(dwarf::Attribute A, dwarf::Form F) : Attribute(A), Form(F) {} - - // Accessors. - dwarf::Attribute getAttribute() const { return Attribute; } - dwarf::Form getForm() const { return Form; } - - /// Profile - Used to gather unique data for the abbreviation folding set. - /// - void Profile(FoldingSetNodeID &ID) const; -}; - -//===--------------------------------------------------------------------===// -/// DIEAbbrev - Dwarf abbreviation, describes the organization of a debug -/// information object. -class DIEAbbrev : public FoldingSetNode { - /// Unique number for node. - /// - unsigned Number; - - /// Tag - Dwarf tag code. - /// - dwarf::Tag Tag; - - /// Children - Whether or not this node has children. - /// - // This cheats a bit in all of the uses since the values in the standard - // are 0 and 1 for no children and children respectively. - bool Children; - - /// Data - Raw data bytes for abbreviation. - /// - SmallVector Data; - -public: - DIEAbbrev(dwarf::Tag T, bool C) : Tag(T), Children(C), Data() {} - - // Accessors. - dwarf::Tag getTag() const { return Tag; } - unsigned getNumber() const { return Number; } - bool hasChildren() const { return Children; } - const SmallVectorImpl &getData() const { return Data; } - void setChildrenFlag(bool hasChild) { Children = hasChild; } - void setNumber(unsigned N) { Number = N; } - - /// AddAttribute - Adds another set of attribute information to the - /// abbreviation. - void AddAttribute(dwarf::Attribute Attribute, dwarf::Form Form) { - Data.push_back(DIEAbbrevData(Attribute, Form)); - } - - /// Profile - Used to gather unique data for the abbreviation folding set. - /// - void Profile(FoldingSetNodeID &ID) const; - - /// Emit - Print the abbreviation using the specified asm printer. - /// - void Emit(const AsmPrinter *AP) const; - - void print(raw_ostream &O); - void dump(); -}; - -//===--------------------------------------------------------------------===// -/// DIEInteger - An integer value DIE. -/// -class DIEInteger { - uint64_t Integer; - -public: - explicit DIEInteger(uint64_t I) : Integer(I) {} - - /// BestForm - Choose the best form for integer. - /// - static dwarf::Form BestForm(bool IsSigned, uint64_t Int) { - if (IsSigned) { - const int64_t SignedInt = Int; - if ((char)Int == SignedInt) - return dwarf::DW_FORM_data1; - if ((short)Int == SignedInt) - return dwarf::DW_FORM_data2; - if ((int)Int == SignedInt) - return dwarf::DW_FORM_data4; - } else { - if ((unsigned char)Int == Int) - return dwarf::DW_FORM_data1; - if ((unsigned short)Int == Int) - return dwarf::DW_FORM_data2; - if ((unsigned int)Int == Int) - return dwarf::DW_FORM_data4; - } - return dwarf::DW_FORM_data8; - } - - uint64_t getValue() const { return Integer; } - void setValue(uint64_t Val) { Integer = Val; } - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const; - - void print(raw_ostream &O) const; -}; - -//===--------------------------------------------------------------------===// -/// DIEExpr - An expression DIE. -// -class DIEExpr { - const MCExpr *Expr; - -public: - explicit DIEExpr(const MCExpr *E) : Expr(E) {} - - /// getValue - Get MCExpr. - /// - const MCExpr *getValue() const { return Expr; } - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const; - - void print(raw_ostream &O) const; -}; - -//===--------------------------------------------------------------------===// -/// DIELabel - A label DIE. -// -class DIELabel { - const MCSymbol *Label; - -public: - explicit DIELabel(const MCSymbol *L) : Label(L) {} - - /// getValue - Get MCSymbol. - /// - const MCSymbol *getValue() const { return Label; } - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const; - - void print(raw_ostream &O) const; -}; - -//===--------------------------------------------------------------------===// -/// DIEDelta - A simple label difference DIE. -/// -class DIEDelta { - const MCSymbol *LabelHi; - const MCSymbol *LabelLo; - -public: - DIEDelta(const MCSymbol *Hi, const MCSymbol *Lo) : LabelHi(Hi), LabelLo(Lo) {} - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const; - - void print(raw_ostream &O) const; -}; - -//===--------------------------------------------------------------------===// -/// DIEString - A container for string values. -/// -class DIEString { - DwarfStringPoolEntryRef S; - -public: - DIEString(DwarfStringPoolEntryRef S) : S(S) {} - - /// getString - Grab the string out of the object. - StringRef getString() const { return S.getString(); } - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const; - - void print(raw_ostream &O) const; -}; - -//===--------------------------------------------------------------------===// -/// DIEEntry - A pointer to another debug information entry. An instance of -/// this class can also be used as a proxy for a debug information entry not -/// yet defined (ie. types.) -class DIE; -class DIEEntry { - DIE *Entry; - - DIEEntry() = delete; - -public: - explicit DIEEntry(DIE &E) : Entry(&E) {} - - DIE &getEntry() const { return *Entry; } - - /// Returns size of a ref_addr entry. - static unsigned getRefAddrSize(const AsmPrinter *AP); - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const { - return Form == dwarf::DW_FORM_ref_addr ? getRefAddrSize(AP) - : sizeof(int32_t); - } - - void print(raw_ostream &O) const; -}; - -//===--------------------------------------------------------------------===// -/// DIELocList - Represents a pointer to a location list in the debug_loc -/// section. -// -class DIELocList { - // Index into the .debug_loc vector. - size_t Index; - -public: - DIELocList(size_t I) : Index(I) {} - - /// getValue - Grab the current index out. - size_t getValue() const { return Index; } - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const; - - void print(raw_ostream &O) const; -}; - -//===--------------------------------------------------------------------===// -/// DIEValue - A debug information entry value. Some of these roughly correlate -/// to DWARF attribute classes. -/// -class DIEBlock; -class DIELoc; -class DIEValue { -public: - enum Type { - isNone, -#define HANDLE_DIEVALUE(T) is##T, -#include "llvm/CodeGen/DIEValue.def" - }; - -private: - /// Ty - Type of data stored in the value. - /// - Type Ty = isNone; - dwarf::Attribute Attribute = (dwarf::Attribute)0; - dwarf::Form Form = (dwarf::Form)0; - - /// Storage for the value. - /// - /// All values that aren't standard layout (or are larger than 8 bytes) - /// should be stored by reference instead of by value. - typedef AlignedCharArrayUnion - ValTy; - static_assert(sizeof(ValTy) <= sizeof(uint64_t) || - sizeof(ValTy) <= sizeof(void *), - "Expected all large types to be stored via pointer"); - - /// Underlying stored value. - ValTy Val; - - template void construct(T V) { - static_assert(std::is_standard_layout::value || - std::is_pointer::value, - "Expected standard layout or pointer"); - new (reinterpret_cast(Val.buffer)) T(V); - } - - template T *get() { return reinterpret_cast(Val.buffer); } - template const T *get() const { - return reinterpret_cast(Val.buffer); - } - template void destruct() { get()->~T(); } - - /// Destroy the underlying value. - /// - /// This should get optimized down to a no-op. We could skip it if we could - /// add a static assert on \a std::is_trivially_copyable(), but we currently - /// support versions of GCC that don't understand that. - void destroyVal() { - switch (Ty) { - case isNone: - return; -#define HANDLE_DIEVALUE_SMALL(T) \ - case is##T: \ - destruct(); - return; -#define HANDLE_DIEVALUE_LARGE(T) \ - case is##T: \ - destruct(); - return; -#include "llvm/CodeGen/DIEValue.def" - } - } - - /// Copy the underlying value. - /// - /// This should get optimized down to a simple copy. We need to actually - /// construct the value, rather than calling memcpy, to satisfy strict - /// aliasing rules. - void copyVal(const DIEValue &X) { - switch (Ty) { - case isNone: - return; -#define HANDLE_DIEVALUE_SMALL(T) \ - case is##T: \ - construct(*X.get()); \ - return; -#define HANDLE_DIEVALUE_LARGE(T) \ - case is##T: \ - construct(*X.get()); \ - return; -#include "llvm/CodeGen/DIEValue.def" - } - } - -public: - DIEValue() = default; - DIEValue(const DIEValue &X) : Ty(X.Ty), Attribute(X.Attribute), Form(X.Form) { - copyVal(X); - } - DIEValue &operator=(const DIEValue &X) { - destroyVal(); - Ty = X.Ty; - Attribute = X.Attribute; - Form = X.Form; - copyVal(X); - return *this; - } - ~DIEValue() { destroyVal(); } - -#define HANDLE_DIEVALUE_SMALL(T) \ - DIEValue(dwarf::Attribute Attribute, dwarf::Form Form, const DIE##T &V) \ - : Ty(is##T), Attribute(Attribute), Form(Form) { \ - construct(V); \ - } -#define HANDLE_DIEVALUE_LARGE(T) \ - DIEValue(dwarf::Attribute Attribute, dwarf::Form Form, const DIE##T *V) \ - : Ty(is##T), Attribute(Attribute), Form(Form) { \ - assert(V && "Expected valid value"); \ - construct(V); \ - } -#include "llvm/CodeGen/DIEValue.def" - - // Accessors - Type getType() const { return Ty; } - dwarf::Attribute getAttribute() const { return Attribute; } - dwarf::Form getForm() const { return Form; } - explicit operator bool() const { return Ty; } - -#define HANDLE_DIEVALUE_SMALL(T) \ - const DIE##T &getDIE##T() const { \ - assert(getType() == is##T && "Expected " #T); \ - return *get(); \ - } -#define HANDLE_DIEVALUE_LARGE(T) \ - const DIE##T &getDIE##T() const { \ - assert(getType() == is##T && "Expected " #T); \ - return **get(); \ - } -#include "llvm/CodeGen/DIEValue.def" - - /// EmitValue - Emit value via the Dwarf writer. - /// - void EmitValue(const AsmPrinter *AP) const; - - /// SizeOf - Return the size of a value in bytes. - /// - unsigned SizeOf(const AsmPrinter *AP) const; - - void print(raw_ostream &O) const; - void dump() const; -}; - -struct IntrusiveBackListNode { - PointerIntPair Next; - IntrusiveBackListNode() : Next(this, true) {} - - IntrusiveBackListNode *getNext() const { - return Next.getInt() ? nullptr : Next.getPointer(); - } -}; - -struct IntrusiveBackListBase { - typedef IntrusiveBackListNode Node; - Node *Last = nullptr; - - bool empty() const { return !Last; } - void push_back(Node &N) { - assert(N.Next.getPointer() == &N && "Expected unlinked node"); - assert(N.Next.getInt() == true && "Expected unlinked node"); - - if (Last) { - N.Next = Last->Next; - Last->Next.setPointerAndInt(&N, false); - } - Last = &N; - } -}; - -template class IntrusiveBackList : IntrusiveBackListBase { -public: - using IntrusiveBackListBase::empty; - void push_back(T &N) { IntrusiveBackListBase::push_back(N); } - T &back() { return *static_cast(Last); } - const T &back() const { return *static_cast(Last); } - - class const_iterator; - class iterator - : public iterator_facade_base { - friend class const_iterator; - Node *N = nullptr; - - public: - iterator() = default; - explicit iterator(T *N) : N(N) {} - - iterator &operator++() { - N = N->getNext(); - return *this; - } - - explicit operator bool() const { return N; } - T &operator*() const { return *static_cast(N); } - - bool operator==(const iterator &X) const { return N == X.N; } - bool operator!=(const iterator &X) const { return N != X.N; } - }; - - class const_iterator - : public iterator_facade_base { - const Node *N = nullptr; - - public: - const_iterator() = default; - // Placate MSVC by explicitly scoping 'iterator'. - const_iterator(typename IntrusiveBackList::iterator X) : N(X.N) {} - explicit const_iterator(const T *N) : N(N) {} - - const_iterator &operator++() { - N = N->getNext(); - return *this; - } - - explicit operator bool() const { return N; } - const T &operator*() const { return *static_cast(N); } - - bool operator==(const const_iterator &X) const { return N == X.N; } - bool operator!=(const const_iterator &X) const { return N != X.N; } - }; - - iterator begin() { - return Last ? iterator(static_cast(Last->Next.getPointer())) : end(); - } - const_iterator begin() const { - return const_cast(this)->begin(); - } - iterator end() { return iterator(); } - const_iterator end() const { return const_iterator(); } - - static iterator toIterator(T &N) { return iterator(&N); } - static const_iterator toIterator(const T &N) { return const_iterator(&N); } -}; - -/// A list of DIE values. -/// -/// This is a singly-linked list, but instead of reversing the order of -/// insertion, we keep a pointer to the back of the list so we can push in -/// order. -/// -/// There are two main reasons to choose a linked list over a customized -/// vector-like data structure. -/// -/// 1. For teardown efficiency, we want DIEs to be BumpPtrAllocated. Using a -/// linked list here makes this way easier to accomplish. -/// 2. Carrying an extra pointer per \a DIEValue isn't expensive. 45% of DIEs -/// have 2 or fewer values, and 90% have 5 or fewer. A vector would be -/// over-allocated by 50% on average anyway, the same cost as the -/// linked-list node. -class DIEValueList { - struct Node : IntrusiveBackListNode { - DIEValue V; - explicit Node(DIEValue V) : V(V) {} - }; - - typedef IntrusiveBackList ListTy; - ListTy List; - -public: - class const_value_iterator; - class value_iterator - : public iterator_adaptor_base { - friend class const_value_iterator; - typedef iterator_adaptor_base iterator_adaptor; - - public: - value_iterator() = default; - explicit value_iterator(ListTy::iterator X) : iterator_adaptor(X) {} - - explicit operator bool() const { return bool(wrapped()); } - DIEValue &operator*() const { return wrapped()->V; } - }; - - class const_value_iterator : public iterator_adaptor_base< - const_value_iterator, ListTy::const_iterator, - std::forward_iterator_tag, const DIEValue> { - typedef iterator_adaptor_base iterator_adaptor; - - public: - const_value_iterator() = default; - const_value_iterator(DIEValueList::value_iterator X) - : iterator_adaptor(X.wrapped()) {} - explicit const_value_iterator(ListTy::const_iterator X) - : iterator_adaptor(X) {} - - explicit operator bool() const { return bool(wrapped()); } - const DIEValue &operator*() const { return wrapped()->V; } - }; - - typedef iterator_range value_range; - typedef iterator_range const_value_range; - - value_iterator addValue(BumpPtrAllocator &Alloc, const DIEValue &V) { - List.push_back(*new (Alloc) Node(V)); - return value_iterator(ListTy::toIterator(List.back())); - } - template - value_iterator addValue(BumpPtrAllocator &Alloc, dwarf::Attribute Attribute, - dwarf::Form Form, T &&Value) { - return addValue(Alloc, DIEValue(Attribute, Form, std::forward(Value))); - } - - value_range values() { - return llvm::make_range(value_iterator(List.begin()), - value_iterator(List.end())); - } - const_value_range values() const { - return llvm::make_range(const_value_iterator(List.begin()), - const_value_iterator(List.end())); - } -}; - -//===--------------------------------------------------------------------===// -/// DIE - A structured debug information entry. Has an abbreviation which -/// describes its organization. -class DIE : IntrusiveBackListNode, public DIEValueList { - friend class IntrusiveBackList; - - /// Offset - Offset in debug info section. - /// - unsigned Offset; - - /// Size - Size of instance + children. - /// - unsigned Size; - - unsigned AbbrevNumber = ~0u; - - /// Tag - Dwarf tag code. - /// - dwarf::Tag Tag = (dwarf::Tag)0; - - /// Children DIEs. - IntrusiveBackList Children; - - DIE *Parent = nullptr; - - DIE() = delete; - explicit DIE(dwarf::Tag Tag) : Offset(0), Size(0), Tag(Tag) {} - -public: - static DIE *get(BumpPtrAllocator &Alloc, dwarf::Tag Tag) { - return new (Alloc) DIE(Tag); - } - - // Accessors. - unsigned getAbbrevNumber() const { return AbbrevNumber; } - dwarf::Tag getTag() const { return Tag; } - unsigned getOffset() const { return Offset; } - unsigned getSize() const { return Size; } - bool hasChildren() const { return !Children.empty(); } - - typedef IntrusiveBackList::iterator child_iterator; - typedef IntrusiveBackList::const_iterator const_child_iterator; - typedef iterator_range child_range; - typedef iterator_range const_child_range; - - child_range children() { - return llvm::make_range(Children.begin(), Children.end()); - } - const_child_range children() const { - return llvm::make_range(Children.begin(), Children.end()); - } - - DIE *getParent() const { return Parent; } - - /// Generate the abbreviation for this DIE. - /// - /// Calculate the abbreviation for this, which should be uniqued and - /// eventually used to call \a setAbbrevNumber(). - DIEAbbrev generateAbbrev() const; - - /// Set the abbreviation number for this DIE. - void setAbbrevNumber(unsigned I) { AbbrevNumber = I; } - - /// Climb up the parent chain to get the compile or type unit DIE this DIE - /// belongs to. - const DIE *getUnit() const; - /// Similar to getUnit, returns null when DIE is not added to an - /// owner yet. - const DIE *getUnitOrNull() const; - void setOffset(unsigned O) { Offset = O; } - void setSize(unsigned S) { Size = S; } - - /// Add a child to the DIE. - DIE &addChild(DIE *Child) { - assert(!Child->getParent() && "Child should be orphaned"); - Child->Parent = this; - Children.push_back(*Child); - return Children.back(); - } - - /// Find a value in the DIE with the attribute given. - /// - /// Returns a default-constructed DIEValue (where \a DIEValue::getType() - /// gives \a DIEValue::isNone) if no such attribute exists. - DIEValue findAttribute(dwarf::Attribute Attribute) const; - - void print(raw_ostream &O, unsigned IndentCount = 0) const; - void dump(); -}; - -//===--------------------------------------------------------------------===// -/// DIELoc - Represents an expression location. -// -class DIELoc : public DIEValueList { - mutable unsigned Size; // Size in bytes excluding size header. - -public: - DIELoc() : Size(0) {} - - /// ComputeSize - Calculate the size of the location expression. - /// - unsigned ComputeSize(const AsmPrinter *AP) const; - - /// BestForm - Choose the best form for data. - /// - dwarf::Form BestForm(unsigned DwarfVersion) const { - if (DwarfVersion > 3) - return dwarf::DW_FORM_exprloc; - // Pre-DWARF4 location expressions were blocks and not exprloc. - if ((unsigned char)Size == Size) - return dwarf::DW_FORM_block1; - if ((unsigned short)Size == Size) - return dwarf::DW_FORM_block2; - if ((unsigned int)Size == Size) - return dwarf::DW_FORM_block4; - return dwarf::DW_FORM_block; - } - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const; - - void print(raw_ostream &O) const; -}; - -//===--------------------------------------------------------------------===// -/// DIEBlock - Represents a block of values. -// -class DIEBlock : public DIEValueList { - mutable unsigned Size; // Size in bytes excluding size header. - -public: - DIEBlock() : Size(0) {} - - /// ComputeSize - Calculate the size of the location expression. - /// - unsigned ComputeSize(const AsmPrinter *AP) const; - - /// BestForm - Choose the best form for data. - /// - dwarf::Form BestForm() const { - if ((unsigned char)Size == Size) - return dwarf::DW_FORM_block1; - if ((unsigned short)Size == Size) - return dwarf::DW_FORM_block2; - if ((unsigned int)Size == Size) - return dwarf::DW_FORM_block4; - return dwarf::DW_FORM_block; - } - - void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const; - unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const; - - void print(raw_ostream &O) const; -}; - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/DIEValue.def b/llvm/include/llvm/CodeGen/DIEValue.def deleted file mode 100644 index c5ff4010..00000000 --- a/llvm/include/llvm/CodeGen/DIEValue.def +++ /dev/null @@ -1,46 +0,0 @@ -//===- llvm/CodeGen/DIEValue.def - DIEValue types ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Macros for running through all types of DIEValue. -// -//===----------------------------------------------------------------------===// - -#if !(defined HANDLE_DIEVALUE || defined HANDLE_DIEVALUE_SMALL || \ - defined HANDLE_DIEVALUE_LARGE) -#error "Missing macro definition of HANDLE_DIEVALUE" -#endif - -// Handler for all values. -#ifndef HANDLE_DIEVALUE -#define HANDLE_DIEVALUE(T) -#endif - -// Handler for small values. -#ifndef HANDLE_DIEVALUE_SMALL -#define HANDLE_DIEVALUE_SMALL(T) HANDLE_DIEVALUE(T) -#endif - -// Handler for large values. -#ifndef HANDLE_DIEVALUE_LARGE -#define HANDLE_DIEVALUE_LARGE(T) HANDLE_DIEVALUE(T) -#endif - -HANDLE_DIEVALUE_SMALL(Integer) -HANDLE_DIEVALUE_SMALL(String) -HANDLE_DIEVALUE_SMALL(Expr) -HANDLE_DIEVALUE_SMALL(Label) -HANDLE_DIEVALUE_LARGE(Delta) -HANDLE_DIEVALUE_SMALL(Entry) -HANDLE_DIEVALUE_LARGE(Block) -HANDLE_DIEVALUE_LARGE(Loc) -HANDLE_DIEVALUE_SMALL(LocList) - -#undef HANDLE_DIEVALUE -#undef HANDLE_DIEVALUE_SMALL -#undef HANDLE_DIEVALUE_LARGE diff --git a/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h b/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h deleted file mode 100644 index fc2b5ddd..00000000 --- a/llvm/include/llvm/CodeGen/DwarfStringPoolEntry.h +++ /dev/null @@ -1,51 +0,0 @@ -//===- llvm/CodeGen/DwarfStringPoolEntry.h - String pool entry --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_DWARFSTRINGPOOLENTRY_H -#define LLVM_CODEGEN_DWARFSTRINGPOOLENTRY_H - -#include "llvm/ADT/StringMap.h" - -namespace llvm { - -class MCSymbol; - -/// Data for a string pool entry. -struct DwarfStringPoolEntry { - MCSymbol *Symbol; - unsigned Offset; - unsigned Index; -}; - -/// String pool entry reference. -struct DwarfStringPoolEntryRef { - const StringMapEntry *I = nullptr; - -public: - DwarfStringPoolEntryRef() = default; - explicit DwarfStringPoolEntryRef( - const StringMapEntry &I) - : I(&I) {} - - explicit operator bool() const { return I; } - MCSymbol *getSymbol() const { - assert(I->second.Symbol && "No symbol available!"); - return I->second.Symbol; - } - unsigned getOffset() const { return I->second.Offset; } - unsigned getIndex() const { return I->second.Index; } - StringRef getString() const { return I->first(); } - - bool operator==(const DwarfStringPoolEntryRef &X) const { return I == X.I; } - bool operator!=(const DwarfStringPoolEntryRef &X) const { return I != X.I; } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/EdgeBundles.h b/llvm/include/llvm/CodeGen/EdgeBundles.h deleted file mode 100644 index c31fad24..00000000 --- a/llvm/include/llvm/CodeGen/EdgeBundles.h +++ /dev/null @@ -1,64 +0,0 @@ -//===-------- EdgeBundles.h - Bundles of CFG edges --------------*- c++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The EdgeBundles analysis forms equivalence classes of CFG edges such that all -// edges leaving a machine basic block are in the same bundle, and all edges -// leaving a basic block are in the same bundle. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_EDGEBUNDLES_H -#define LLVM_CODEGEN_EDGEBUNDLES_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/IntEqClasses.h" -#include "llvm/ADT/Twine.h" -#include "llvm/CodeGen/MachineFunctionPass.h" - -namespace llvm { - -class EdgeBundles : public MachineFunctionPass { - const MachineFunction *MF; - - /// EC - Each edge bundle is an equivalence class. The keys are: - /// 2*BB->getNumber() -> Ingoing bundle. - /// 2*BB->getNumber()+1 -> Outgoing bundle. - IntEqClasses EC; - - /// Blocks - Map each bundle to a list of basic block numbers. - SmallVector, 4> Blocks; - -public: - static char ID; - EdgeBundles() : MachineFunctionPass(ID) {} - - /// getBundle - Return the ingoing (Out = false) or outgoing (Out = true) - /// bundle number for basic block #N - unsigned getBundle(unsigned N, bool Out) const { return EC[2 * N + Out]; } - - /// getNumBundles - Return the total number of bundles in the CFG. - unsigned getNumBundles() const { return EC.getNumClasses(); } - - /// getBlocks - Return an array of blocks that are connected to Bundle. - ArrayRef getBlocks(unsigned Bundle) const { return Blocks[Bundle]; } - - /// getMachineFunction - Return the last machine function computed. - const MachineFunction *getMachineFunction() const { return MF; } - - /// view - Visualize the annotated bipartite CFG with Graphviz. - void view() const; - -private: - bool runOnMachineFunction(MachineFunction&) override; - void getAnalysisUsage(AnalysisUsage&) const override; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/FastISel.h b/llvm/include/llvm/CodeGen/FastISel.h deleted file mode 100644 index 4bff48de..00000000 --- a/llvm/include/llvm/CodeGen/FastISel.h +++ /dev/null @@ -1,583 +0,0 @@ -//===-- FastISel.h - Definition of the FastISel class ---*- C++ -*---------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// This file defines the FastISel class. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_FASTISEL_H -#define LLVM_CODEGEN_FASTISEL_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/IR/CallingConv.h" -#include "llvm/IR/IntrinsicInst.h" -#include "llvm/Target/TargetLowering.h" - -namespace llvm { - -class MachineConstantPool; - -/// \brief This is a fast-path instruction selection class that generates poor -/// code and doesn't support illegal types or non-trivial lowering, but runs -/// quickly. -class FastISel { -public: - struct ArgListEntry { - Value *Val; - Type *Ty; - bool IsSExt : 1; - bool IsZExt : 1; - bool IsInReg : 1; - bool IsSRet : 1; - bool IsNest : 1; - bool IsByVal : 1; - bool IsInAlloca : 1; - bool IsReturned : 1; - bool IsSwiftSelf : 1; - bool IsSwiftError : 1; - uint16_t Alignment; - - ArgListEntry() - : Val(nullptr), Ty(nullptr), IsSExt(false), IsZExt(false), - IsInReg(false), IsSRet(false), IsNest(false), IsByVal(false), - IsInAlloca(false), IsReturned(false), IsSwiftSelf(false), - IsSwiftError(false), Alignment(0) {} - - /// \brief Set CallLoweringInfo attribute flags based on a call instruction - /// and called function attributes. - void setAttributes(ImmutableCallSite *CS, unsigned AttrIdx); - }; - typedef std::vector ArgListTy; - - struct CallLoweringInfo { - Type *RetTy; - bool RetSExt : 1; - bool RetZExt : 1; - bool IsVarArg : 1; - bool IsInReg : 1; - bool DoesNotReturn : 1; - bool IsReturnValueUsed : 1; - - // \brief IsTailCall Should be modified by implementations of FastLowerCall - // that perform tail call conversions. - bool IsTailCall; - - unsigned NumFixedArgs; - CallingConv::ID CallConv; - const Value *Callee; - MCSymbol *Symbol; - ArgListTy Args; - ImmutableCallSite *CS; - MachineInstr *Call; - unsigned ResultReg; - unsigned NumResultRegs; - - bool IsPatchPoint; - - SmallVector OutVals; - SmallVector OutFlags; - SmallVector OutRegs; - SmallVector Ins; - SmallVector InRegs; - - CallLoweringInfo() - : RetTy(nullptr), RetSExt(false), RetZExt(false), IsVarArg(false), - IsInReg(false), DoesNotReturn(false), IsReturnValueUsed(true), - IsTailCall(false), NumFixedArgs(-1), CallConv(CallingConv::C), - Callee(nullptr), Symbol(nullptr), CS(nullptr), Call(nullptr), - ResultReg(0), NumResultRegs(0), IsPatchPoint(false) {} - - CallLoweringInfo &setCallee(Type *ResultTy, FunctionType *FuncTy, - const Value *Target, ArgListTy &&ArgsList, - ImmutableCallSite &Call) { - RetTy = ResultTy; - Callee = Target; - - IsInReg = Call.paramHasAttr(0, Attribute::InReg); - DoesNotReturn = Call.doesNotReturn(); - IsVarArg = FuncTy->isVarArg(); - IsReturnValueUsed = !Call.getInstruction()->use_empty(); - RetSExt = Call.paramHasAttr(0, Attribute::SExt); - RetZExt = Call.paramHasAttr(0, Attribute::ZExt); - - CallConv = Call.getCallingConv(); - Args = std::move(ArgsList); - NumFixedArgs = FuncTy->getNumParams(); - - CS = &Call; - - return *this; - } - - CallLoweringInfo &setCallee(Type *ResultTy, FunctionType *FuncTy, - MCSymbol *Target, ArgListTy &&ArgsList, - ImmutableCallSite &Call, - unsigned FixedArgs = ~0U) { - RetTy = ResultTy; - Callee = Call.getCalledValue(); - Symbol = Target; - - IsInReg = Call.paramHasAttr(0, Attribute::InReg); - DoesNotReturn = Call.doesNotReturn(); - IsVarArg = FuncTy->isVarArg(); - IsReturnValueUsed = !Call.getInstruction()->use_empty(); - RetSExt = Call.paramHasAttr(0, Attribute::SExt); - RetZExt = Call.paramHasAttr(0, Attribute::ZExt); - - CallConv = Call.getCallingConv(); - Args = std::move(ArgsList); - NumFixedArgs = (FixedArgs == ~0U) ? FuncTy->getNumParams() : FixedArgs; - - CS = &Call; - - return *this; - } - - CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultTy, - const Value *Target, ArgListTy &&ArgsList, - unsigned FixedArgs = ~0U) { - RetTy = ResultTy; - Callee = Target; - CallConv = CC; - Args = std::move(ArgsList); - NumFixedArgs = (FixedArgs == ~0U) ? Args.size() : FixedArgs; - return *this; - } - - CallLoweringInfo &setCallee(const DataLayout &DL, MCContext &Ctx, - CallingConv::ID CC, Type *ResultTy, - const char *Target, ArgListTy &&ArgsList, - unsigned FixedArgs = ~0U); - - CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultTy, - MCSymbol *Target, ArgListTy &&ArgsList, - unsigned FixedArgs = ~0U) { - RetTy = ResultTy; - Symbol = Target; - CallConv = CC; - Args = std::move(ArgsList); - NumFixedArgs = (FixedArgs == ~0U) ? Args.size() : FixedArgs; - return *this; - } - - CallLoweringInfo &setTailCall(bool Value = true) { - IsTailCall = Value; - return *this; - } - - CallLoweringInfo &setIsPatchPoint(bool Value = true) { - IsPatchPoint = Value; - return *this; - } - - ArgListTy &getArgs() { return Args; } - - void clearOuts() { - OutVals.clear(); - OutFlags.clear(); - OutRegs.clear(); - } - - void clearIns() { - Ins.clear(); - InRegs.clear(); - } - }; - -protected: - DenseMap LocalValueMap; - FunctionLoweringInfo &FuncInfo; - MachineFunction *MF; - MachineRegisterInfo &MRI; - MachineFrameInfo &MFI; - MachineConstantPool &MCP; - DebugLoc DbgLoc; - const TargetMachine &TM; - const DataLayout &DL; - const TargetInstrInfo &TII; - const TargetLowering &TLI; - const TargetRegisterInfo &TRI; - const TargetLibraryInfo *LibInfo; - bool SkipTargetIndependentISel; - - /// \brief The position of the last instruction for materializing constants - /// for use in the current block. It resets to EmitStartPt when it makes sense - /// (for example, it's usually profitable to avoid function calls between the - /// definition and the use) - MachineInstr *LastLocalValue; - - /// \brief The top most instruction in the current block that is allowed for - /// emitting local variables. LastLocalValue resets to EmitStartPt when it - /// makes sense (for example, on function calls) - MachineInstr *EmitStartPt; - -public: - /// \brief Return the position of the last instruction emitted for - /// materializing constants for use in the current block. - MachineInstr *getLastLocalValue() { return LastLocalValue; } - - /// \brief Update the position of the last instruction emitted for - /// materializing constants for use in the current block. - void setLastLocalValue(MachineInstr *I) { - EmitStartPt = I; - LastLocalValue = I; - } - - /// \brief Set the current block to which generated machine instructions will - /// be appended, and clear the local CSE map. - void startNewBlock(); - - /// \brief Return current debug location information. - DebugLoc getCurDebugLoc() const { return DbgLoc; } - - /// \brief Do "fast" instruction selection for function arguments and append - /// the machine instructions to the current block. Returns true when - /// successful. - bool lowerArguments(); - - /// \brief Do "fast" instruction selection for the given LLVM IR instruction - /// and append the generated machine instructions to the current block. - /// Returns true if selection was successful. - bool selectInstruction(const Instruction *I); - - /// \brief Do "fast" instruction selection for the given LLVM IR operator - /// (Instruction or ConstantExpr), and append generated machine instructions - /// to the current block. Return true if selection was successful. - bool selectOperator(const User *I, unsigned Opcode); - - /// \brief Create a virtual register and arrange for it to be assigned the - /// value for the given LLVM value. - unsigned getRegForValue(const Value *V); - - /// \brief Look up the value to see if its value is already cached in a - /// register. It may be defined by instructions across blocks or defined - /// locally. - unsigned lookUpRegForValue(const Value *V); - - /// \brief This is a wrapper around getRegForValue that also takes care of - /// truncating or sign-extending the given getelementptr index value. - std::pair getRegForGEPIndex(const Value *V); - - /// \brief We're checking to see if we can fold \p LI into \p FoldInst. Note - /// that we could have a sequence where multiple LLVM IR instructions are - /// folded into the same machineinstr. For example we could have: - /// - /// A: x = load i32 *P - /// B: y = icmp A, 42 - /// C: br y, ... - /// - /// In this scenario, \p LI is "A", and \p FoldInst is "C". We know about "B" - /// (and any other folded instructions) because it is between A and C. - /// - /// If we succeed folding, return true. - bool tryToFoldLoad(const LoadInst *LI, const Instruction *FoldInst); - - /// \brief The specified machine instr operand is a vreg, and that vreg is - /// being provided by the specified load instruction. If possible, try to - /// fold the load as an operand to the instruction, returning true if - /// possible. - /// - /// This method should be implemented by targets. - virtual bool tryToFoldLoadIntoMI(MachineInstr * /*MI*/, unsigned /*OpNo*/, - const LoadInst * /*LI*/) { - return false; - } - - /// \brief Reset InsertPt to prepare for inserting instructions into the - /// current block. - void recomputeInsertPt(); - - /// \brief Remove all dead instructions between the I and E. - void removeDeadCode(MachineBasicBlock::iterator I, - MachineBasicBlock::iterator E); - - struct SavePoint { - MachineBasicBlock::iterator InsertPt; - DebugLoc DL; - }; - - /// \brief Prepare InsertPt to begin inserting instructions into the local - /// value area and return the old insert position. - SavePoint enterLocalValueArea(); - - /// \brief Reset InsertPt to the given old insert position. - void leaveLocalValueArea(SavePoint Old); - - virtual ~FastISel(); - -protected: - explicit FastISel(FunctionLoweringInfo &FuncInfo, - const TargetLibraryInfo *LibInfo, - bool SkipTargetIndependentISel = false); - - /// \brief This method is called by target-independent code when the normal - /// FastISel process fails to select an instruction. This gives targets a - /// chance to emit code for anything that doesn't fit into FastISel's - /// framework. It returns true if it was successful. - virtual bool fastSelectInstruction(const Instruction *I) = 0; - - /// \brief This method is called by target-independent code to do target- - /// specific argument lowering. It returns true if it was successful. - virtual bool fastLowerArguments(); - - /// \brief This method is called by target-independent code to do target- - /// specific call lowering. It returns true if it was successful. - virtual bool fastLowerCall(CallLoweringInfo &CLI); - - /// \brief This method is called by target-independent code to do target- - /// specific intrinsic lowering. It returns true if it was successful. - virtual bool fastLowerIntrinsicCall(const IntrinsicInst *II); - - /// \brief This method is called by target-independent code to request that an - /// instruction with the given type and opcode be emitted. - virtual unsigned fastEmit_(MVT VT, MVT RetVT, unsigned Opcode); - - /// \brief This method is called by target-independent code to request that an - /// instruction with the given type, opcode, and register operand be emitted. - virtual unsigned fastEmit_r(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, - bool Op0IsKill); - - /// \brief This method is called by target-independent code to request that an - /// instruction with the given type, opcode, and register operands be emitted. - virtual unsigned fastEmit_rr(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, - bool Op0IsKill, unsigned Op1, bool Op1IsKill); - - /// \brief This method is called by target-independent code to request that an - /// instruction with the given type, opcode, and register and immediate - // operands be emitted. - virtual unsigned fastEmit_ri(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, - bool Op0IsKill, uint64_t Imm); - - /// \brief This method is called by target-independent code to request that an - /// instruction with the given type, opcode, and register and floating-point - /// immediate operands be emitted. - virtual unsigned fastEmit_rf(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, - bool Op0IsKill, const ConstantFP *FPImm); - - /// \brief This method is called by target-independent code to request that an - /// instruction with the given type, opcode, and register and immediate - /// operands be emitted. - virtual unsigned fastEmit_rri(MVT VT, MVT RetVT, unsigned Opcode, - unsigned Op0, bool Op0IsKill, unsigned Op1, - bool Op1IsKill, uint64_t Imm); - - /// \brief This method is a wrapper of fastEmit_ri. - /// - /// It first tries to emit an instruction with an immediate operand using - /// fastEmit_ri. If that fails, it materializes the immediate into a register - /// and try fastEmit_rr instead. - unsigned fastEmit_ri_(MVT VT, unsigned Opcode, unsigned Op0, bool Op0IsKill, - uint64_t Imm, MVT ImmType); - - /// \brief This method is called by target-independent code to request that an - /// instruction with the given type, opcode, and immediate operand be emitted. - virtual unsigned fastEmit_i(MVT VT, MVT RetVT, unsigned Opcode, uint64_t Imm); - - /// \brief This method is called by target-independent code to request that an - /// instruction with the given type, opcode, and floating-point immediate - /// operand be emitted. - virtual unsigned fastEmit_f(MVT VT, MVT RetVT, unsigned Opcode, - const ConstantFP *FPImm); - - /// \brief Emit a MachineInstr with no operands and a result register in the - /// given register class. - unsigned fastEmitInst_(unsigned MachineInstOpcode, - const TargetRegisterClass *RC); - - /// \brief Emit a MachineInstr with one register operand and a result register - /// in the given register class. - unsigned fastEmitInst_r(unsigned MachineInstOpcode, - const TargetRegisterClass *RC, unsigned Op0, - bool Op0IsKill); - - /// \brief Emit a MachineInstr with two register operands and a result - /// register in the given register class. - unsigned fastEmitInst_rr(unsigned MachineInstOpcode, - const TargetRegisterClass *RC, unsigned Op0, - bool Op0IsKill, unsigned Op1, bool Op1IsKill); - - /// \brief Emit a MachineInstr with three register operands and a result - /// register in the given register class. - unsigned fastEmitInst_rrr(unsigned MachineInstOpcode, - const TargetRegisterClass *RC, unsigned Op0, - bool Op0IsKill, unsigned Op1, bool Op1IsKill, - unsigned Op2, bool Op2IsKill); - - /// \brief Emit a MachineInstr with a register operand, an immediate, and a - /// result register in the given register class. - unsigned fastEmitInst_ri(unsigned MachineInstOpcode, - const TargetRegisterClass *RC, unsigned Op0, - bool Op0IsKill, uint64_t Imm); - - /// \brief Emit a MachineInstr with one register operand and two immediate - /// operands. - unsigned fastEmitInst_rii(unsigned MachineInstOpcode, - const TargetRegisterClass *RC, unsigned Op0, - bool Op0IsKill, uint64_t Imm1, uint64_t Imm2); - - /// \brief Emit a MachineInstr with a floating point immediate, and a result - /// register in the given register class. - unsigned fastEmitInst_f(unsigned MachineInstOpcode, - const TargetRegisterClass *RC, - const ConstantFP *FPImm); - - /// \brief Emit a MachineInstr with two register operands, an immediate, and a - /// result register in the given register class. - unsigned fastEmitInst_rri(unsigned MachineInstOpcode, - const TargetRegisterClass *RC, unsigned Op0, - bool Op0IsKill, unsigned Op1, bool Op1IsKill, - uint64_t Imm); - - /// \brief Emit a MachineInstr with a single immediate operand, and a result - /// register in the given register class. - unsigned fastEmitInst_i(unsigned MachineInstrOpcode, - const TargetRegisterClass *RC, uint64_t Imm); - - /// \brief Emit a MachineInstr for an extract_subreg from a specified index of - /// a superregister to a specified type. - unsigned fastEmitInst_extractsubreg(MVT RetVT, unsigned Op0, bool Op0IsKill, - uint32_t Idx); - - /// \brief Emit MachineInstrs to compute the value of Op with all but the - /// least significant bit set to zero. - unsigned fastEmitZExtFromI1(MVT VT, unsigned Op0, bool Op0IsKill); - - /// \brief Emit an unconditional branch to the given block, unless it is the - /// immediate (fall-through) successor, and update the CFG. - void fastEmitBranch(MachineBasicBlock *MBB, const DebugLoc &DL); - - /// Emit an unconditional branch to \p FalseMBB, obtains the branch weight - /// and adds TrueMBB and FalseMBB to the successor list. - void finishCondBranch(const BasicBlock *BranchBB, MachineBasicBlock *TrueMBB, - MachineBasicBlock *FalseMBB); - - /// \brief Update the value map to include the new mapping for this - /// instruction, or insert an extra copy to get the result in a previous - /// determined register. - /// - /// NOTE: This is only necessary because we might select a block that uses a - /// value before we select the block that defines the value. It might be - /// possible to fix this by selecting blocks in reverse postorder. - void updateValueMap(const Value *I, unsigned Reg, unsigned NumRegs = 1); - - unsigned createResultReg(const TargetRegisterClass *RC); - - /// \brief Try to constrain Op so that it is usable by argument OpNum of the - /// provided MCInstrDesc. If this fails, create a new virtual register in the - /// correct class and COPY the value there. - unsigned constrainOperandRegClass(const MCInstrDesc &II, unsigned Op, - unsigned OpNum); - - /// \brief Emit a constant in a register using target-specific logic, such as - /// constant pool loads. - virtual unsigned fastMaterializeConstant(const Constant *C) { return 0; } - - /// \brief Emit an alloca address in a register using target-specific logic. - virtual unsigned fastMaterializeAlloca(const AllocaInst *C) { return 0; } - - /// \brief Emit the floating-point constant +0.0 in a register using target- - /// specific logic. - virtual unsigned fastMaterializeFloatZero(const ConstantFP *CF) { - return 0; - } - - /// \brief Check if \c Add is an add that can be safely folded into \c GEP. - /// - /// \c Add can be folded into \c GEP if: - /// - \c Add is an add, - /// - \c Add's size matches \c GEP's, - /// - \c Add is in the same basic block as \c GEP, and - /// - \c Add has a constant operand. - bool canFoldAddIntoGEP(const User *GEP, const Value *Add); - - /// \brief Test whether the given value has exactly one use. - bool hasTrivialKill(const Value *V); - - /// \brief Create a machine mem operand from the given instruction. - MachineMemOperand *createMachineMemOperandFor(const Instruction *I) const; - - CmpInst::Predicate optimizeCmpPredicate(const CmpInst *CI) const; - - bool lowerCallTo(const CallInst *CI, MCSymbol *Symbol, unsigned NumArgs); - bool lowerCallTo(const CallInst *CI, const char *SymbolName, - unsigned NumArgs); - bool lowerCallTo(CallLoweringInfo &CLI); - - bool isCommutativeIntrinsic(IntrinsicInst const *II) { - switch (II->getIntrinsicID()) { - case Intrinsic::sadd_with_overflow: - case Intrinsic::uadd_with_overflow: - case Intrinsic::smul_with_overflow: - case Intrinsic::umul_with_overflow: - return true; - default: - return false; - } - } - - - bool lowerCall(const CallInst *I); - /// \brief Select and emit code for a binary operator instruction, which has - /// an opcode which directly corresponds to the given ISD opcode. - bool selectBinaryOp(const User *I, unsigned ISDOpcode); - bool selectFNeg(const User *I); - bool selectGetElementPtr(const User *I); - bool selectStackmap(const CallInst *I); - bool selectPatchpoint(const CallInst *I); - bool selectCall(const User *Call); - bool selectIntrinsicCall(const IntrinsicInst *II); - bool selectBitCast(const User *I); - bool selectCast(const User *I, unsigned Opcode); - bool selectExtractValue(const User *I); - bool selectInsertValue(const User *I); - -private: - /// \brief Handle PHI nodes in successor blocks. - /// - /// Emit code to ensure constants are copied into registers when needed. - /// Remember the virtual registers that need to be added to the Machine PHI - /// nodes as input. We cannot just directly add them, because expansion might - /// result in multiple MBB's for one BB. As such, the start of the BB might - /// correspond to a different MBB than the end. - bool handlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB); - - /// \brief Helper for materializeRegForValue to materialize a constant in a - /// target-independent way. - unsigned materializeConstant(const Value *V, MVT VT); - - /// \brief Helper for getRegForVale. This function is called when the value - /// isn't already available in a register and must be materialized with new - /// instructions. - unsigned materializeRegForValue(const Value *V, MVT VT); - - /// \brief Clears LocalValueMap and moves the area for the new local variables - /// to the beginning of the block. It helps to avoid spilling cached variables - /// across heavy instructions like calls. - void flushLocalValueMap(); - - /// \brief Removes dead local value instructions after SavedLastLocalvalue. - void removeDeadLocalValueCode(MachineInstr *SavedLastLocalValue); - - /// \brief Insertion point before trying to select the current instruction. - MachineBasicBlock::iterator SavedInsertPt; - - /// \brief Add a stackmap or patchpoint intrinsic call's live variable - /// operands to a stackmap or patchpoint machine instruction. - bool addStackMapLiveVars(SmallVectorImpl &Ops, - const CallInst *CI, unsigned StartIdx); - bool lowerCallOperands(const CallInst *CI, unsigned ArgIdx, unsigned NumArgs, - const Value *Callee, bool ForceRetVoidTy, - CallLoweringInfo &CLI); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/FaultMaps.h b/llvm/include/llvm/CodeGen/FaultMaps.h deleted file mode 100644 index 9b5a3e1b..00000000 --- a/llvm/include/llvm/CodeGen/FaultMaps.h +++ /dev/null @@ -1,219 +0,0 @@ -//===------------------- FaultMaps.h - The "FaultMaps" section --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_FAULTMAPS_H -#define LLVM_CODEGEN_FAULTMAPS_H - -#include "llvm/MC/MCSymbol.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Format.h" - -#include -#include - -namespace llvm { - -class AsmPrinter; -class MCExpr; -class MCSymbol; -class MCStreamer; - -class FaultMaps { -public: - enum FaultKind { FaultingLoad = 1, FaultKindMax }; - - static const char *faultTypeToString(FaultKind); - - explicit FaultMaps(AsmPrinter &AP); - - void recordFaultingOp(FaultKind FaultTy, const MCSymbol *HandlerLabel); - void serializeToFaultMapSection(); - -private: - static const char *WFMP; - - struct FaultInfo { - FaultKind Kind; - const MCExpr *FaultingOffsetExpr; - const MCExpr *HandlerOffsetExpr; - - FaultInfo() - : Kind(FaultKindMax), FaultingOffsetExpr(nullptr), - HandlerOffsetExpr(nullptr) {} - - explicit FaultInfo(FaultMaps::FaultKind Kind, const MCExpr *FaultingOffset, - const MCExpr *HandlerOffset) - : Kind(Kind), FaultingOffsetExpr(FaultingOffset), - HandlerOffsetExpr(HandlerOffset) {} - }; - - typedef std::vector FunctionFaultInfos; - - // We'd like to keep a stable iteration order for FunctionInfos to help - // FileCheck based testing. - struct MCSymbolComparator { - bool operator()(const MCSymbol *LHS, const MCSymbol *RHS) const { - return LHS->getName() < RHS->getName(); - } - }; - - std::map - FunctionInfos; - AsmPrinter &AP; - - void emitFunctionInfo(const MCSymbol *FnLabel, const FunctionFaultInfos &FFI); -}; - -/// A parser for the __llvm_faultmaps section generated by the FaultMaps class -/// above. This parser is version locked with with the __llvm_faultmaps section -/// generated by the version of LLVM that includes it. No guarantees are made -/// with respect to forward or backward compatibility. -class FaultMapParser { - typedef uint8_t FaultMapVersionType; - static const size_t FaultMapVersionOffset = 0; - - typedef uint8_t Reserved0Type; - static const size_t Reserved0Offset = - FaultMapVersionOffset + sizeof(FaultMapVersionType); - - typedef uint16_t Reserved1Type; - static const size_t Reserved1Offset = Reserved0Offset + sizeof(Reserved0Type); - - typedef uint32_t NumFunctionsType; - static const size_t NumFunctionsOffset = - Reserved1Offset + sizeof(Reserved1Type); - - static const size_t FunctionInfosOffset = - NumFunctionsOffset + sizeof(NumFunctionsType); - - const uint8_t *P; - const uint8_t *E; - - template static T read(const uint8_t *P, const uint8_t *E) { - assert(P + sizeof(T) <= E && "out of bounds read!"); - return support::endian::read(P); - } - -public: - class FunctionFaultInfoAccessor { - typedef uint32_t FaultKindType; - static const size_t FaultKindOffset = 0; - - typedef uint32_t FaultingPCOffsetType; - static const size_t FaultingPCOffsetOffset = - FaultKindOffset + sizeof(FaultKindType); - - typedef uint32_t HandlerPCOffsetType; - static const size_t HandlerPCOffsetOffset = - FaultingPCOffsetOffset + sizeof(FaultingPCOffsetType); - - const uint8_t *P; - const uint8_t *E; - - public: - static const size_t Size = - HandlerPCOffsetOffset + sizeof(HandlerPCOffsetType); - - explicit FunctionFaultInfoAccessor(const uint8_t *P, const uint8_t *E) - : P(P), E(E) {} - - FaultKindType getFaultKind() const { - return read(P + FaultKindOffset, E); - } - - FaultingPCOffsetType getFaultingPCOffset() const { - return read(P + FaultingPCOffsetOffset, E); - } - - HandlerPCOffsetType getHandlerPCOffset() const { - return read(P + HandlerPCOffsetOffset, E); - } - }; - - class FunctionInfoAccessor { - typedef uint64_t FunctionAddrType; - static const size_t FunctionAddrOffset = 0; - - typedef uint32_t NumFaultingPCsType; - static const size_t NumFaultingPCsOffset = - FunctionAddrOffset + sizeof(FunctionAddrType); - - typedef uint32_t ReservedType; - static const size_t ReservedOffset = - NumFaultingPCsOffset + sizeof(NumFaultingPCsType); - - static const size_t FunctionFaultInfosOffset = - ReservedOffset + sizeof(ReservedType); - - static const size_t FunctionInfoHeaderSize = FunctionFaultInfosOffset; - - const uint8_t *P; - const uint8_t *E; - - public: - FunctionInfoAccessor() : P(nullptr), E(nullptr) {} - - explicit FunctionInfoAccessor(const uint8_t *P, const uint8_t *E) - : P(P), E(E) {} - - FunctionAddrType getFunctionAddr() const { - return read(P + FunctionAddrOffset, E); - } - - NumFaultingPCsType getNumFaultingPCs() const { - return read(P + NumFaultingPCsOffset, E); - } - - FunctionFaultInfoAccessor getFunctionFaultInfoAt(uint32_t Index) const { - assert(Index < getNumFaultingPCs() && "index out of bounds!"); - const uint8_t *Begin = P + FunctionFaultInfosOffset + - FunctionFaultInfoAccessor::Size * Index; - return FunctionFaultInfoAccessor(Begin, E); - } - - FunctionInfoAccessor getNextFunctionInfo() const { - size_t MySize = FunctionInfoHeaderSize + - getNumFaultingPCs() * FunctionFaultInfoAccessor::Size; - - const uint8_t *Begin = P + MySize; - assert(Begin < E && "out of bounds!"); - return FunctionInfoAccessor(Begin, E); - } - }; - - explicit FaultMapParser(const uint8_t *Begin, const uint8_t *End) - : P(Begin), E(End) {} - - FaultMapVersionType getFaultMapVersion() const { - auto Version = read(P + FaultMapVersionOffset, E); - assert(Version == 1 && "only version 1 supported!"); - return Version; - } - - NumFunctionsType getNumFunctions() const { - return read(P + NumFunctionsOffset, E); - } - - FunctionInfoAccessor getFirstFunctionInfo() const { - const uint8_t *Begin = P + FunctionInfosOffset; - return FunctionInfoAccessor(Begin, E); - } -}; - -raw_ostream & -operator<<(raw_ostream &OS, const FaultMapParser::FunctionFaultInfoAccessor &); - -raw_ostream &operator<<(raw_ostream &OS, - const FaultMapParser::FunctionInfoAccessor &); - -raw_ostream &operator<<(raw_ostream &OS, const FaultMapParser &); - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h b/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h deleted file mode 100644 index 010e3417..00000000 --- a/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h +++ /dev/null @@ -1,314 +0,0 @@ -//===-- FunctionLoweringInfo.h - Lower functions from LLVM IR to CodeGen --===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This implements routines for translating functions from LLVM IR into -// Machine IR. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_FUNCTIONLOWERINGINFO_H -#define LLVM_CODEGEN_FUNCTIONLOWERINGINFO_H - -#include "llvm/ADT/APInt.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/IndexedMap.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/CodeGen/ISDOpcodes.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/IR/InlineAsm.h" -#include "llvm/IR/Instructions.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include - -namespace llvm { - -class AllocaInst; -class BasicBlock; -class BranchProbabilityInfo; -class CallInst; -class Function; -class GlobalVariable; -class Instruction; -class MachineInstr; -class MachineBasicBlock; -class MachineFunction; -class MachineModuleInfo; -class MachineRegisterInfo; -class SelectionDAG; -class MVT; -class TargetLowering; -class Value; - -//===--------------------------------------------------------------------===// -/// FunctionLoweringInfo - This contains information that is global to a -/// function that is used when lowering a region of the function. -/// -class FunctionLoweringInfo { -public: - const Function *Fn; - MachineFunction *MF; - const TargetLowering *TLI; - MachineRegisterInfo *RegInfo; - BranchProbabilityInfo *BPI; - /// CanLowerReturn - true iff the function's return value can be lowered to - /// registers. - bool CanLowerReturn; - - /// True if part of the CSRs will be handled via explicit copies. - bool SplitCSR; - - /// DemoteRegister - if CanLowerReturn is false, DemoteRegister is a vreg - /// allocated to hold a pointer to the hidden sret parameter. - unsigned DemoteRegister; - - /// MBBMap - A mapping from LLVM basic blocks to their machine code entry. - DenseMap MBBMap; - - typedef SmallVector SwiftErrorVRegs; - typedef SmallVector SwiftErrorValues; - /// A function can only have a single swifterror argument. And if it does - /// have a swifterror argument, it must be the first entry in - /// SwiftErrorVals. - SwiftErrorValues SwiftErrorVals; - - /// Track the virtual register for each swifterror value in a given basic - /// block. Entries in SwiftErrorVRegs have the same ordering as entries - /// in SwiftErrorVals. - /// Note that another choice that is more straight-forward is to use - /// Map>. It - /// maintains a map from swifterror values to virtual registers for each - /// machine basic block. This choice does not require a one-to-one - /// correspondence between SwiftErrorValues and SwiftErrorVRegs. But because - /// of efficiency concern, we do not choose it. - llvm::DenseMap SwiftErrorMap; - - /// Track the virtual register for each swifterror value at the end of a basic - /// block when we need the assignment of a virtual register before the basic - /// block is visited. When we actually visit the basic block, we will make - /// sure the swifterror value is in the correct virtual register. - llvm::DenseMap - SwiftErrorWorklist; - - /// Find the swifterror virtual register in SwiftErrorMap. We will assert - /// failure when the value does not exist in swifterror map. - unsigned findSwiftErrorVReg(const MachineBasicBlock*, const Value*) const; - /// Set the swifterror virtual register in SwiftErrorMap. - void setSwiftErrorVReg(const MachineBasicBlock *MBB, const Value*, unsigned); - - /// ValueMap - Since we emit code for the function a basic block at a time, - /// we must remember which virtual registers hold the values for - /// cross-basic-block values. - DenseMap ValueMap; - - /// Track virtual registers created for exception pointers. - DenseMap CatchPadExceptionPointers; - - /// Keep track of frame indices allocated for statepoints as they could be - /// used across basic block boundaries. This struct is more complex than a - /// simple map because the stateopint lowering code de-duplicates gc pointers - /// based on their SDValue (so %p and (bitcast %p to T) will get the same - /// slot), and we track that here. - - struct StatepointSpillMap { - typedef DenseMap> SlotMapTy; - - /// Maps uniqued llvm IR values to the slots they were spilled in. If a - /// value is mapped to None it means we visited the value but didn't spill - /// it (because it was a constant, for instance). - SlotMapTy SlotMap; - - /// Maps llvm IR values to the values they were de-duplicated to. - DenseMap DuplicateMap; - - SlotMapTy::const_iterator find(const Value *V) const { - auto DuplIt = DuplicateMap.find(V); - if (DuplIt != DuplicateMap.end()) - V = DuplIt->second; - return SlotMap.find(V); - } - - SlotMapTy::const_iterator end() const { return SlotMap.end(); } - }; - - /// Maps gc.statepoint instructions to their corresponding StatepointSpillMap - /// instances. - DenseMap StatepointSpillMaps; - - /// StaticAllocaMap - Keep track of frame indices for fixed sized allocas in - /// the entry block. This allows the allocas to be efficiently referenced - /// anywhere in the function. - DenseMap StaticAllocaMap; - - /// ByValArgFrameIndexMap - Keep track of frame indices for byval arguments. - DenseMap ByValArgFrameIndexMap; - - /// ArgDbgValues - A list of DBG_VALUE instructions created during isel for - /// function arguments that are inserted after scheduling is completed. - SmallVector ArgDbgValues; - - /// RegFixups - Registers which need to be replaced after isel is done. - DenseMap RegFixups; - - /// StatepointStackSlots - A list of temporary stack slots (frame indices) - /// used to spill values at a statepoint. We store them here to enable - /// reuse of the same stack slots across different statepoints in different - /// basic blocks. - SmallVector StatepointStackSlots; - - /// MBB - The current block. - MachineBasicBlock *MBB; - - /// MBB - The current insert position inside the current block. - MachineBasicBlock::iterator InsertPt; - - struct LiveOutInfo { - unsigned NumSignBits : 31; - unsigned IsValid : 1; - APInt KnownOne, KnownZero; - LiveOutInfo() : NumSignBits(0), IsValid(true), KnownOne(1, 0), - KnownZero(1, 0) {} - }; - - /// Record the preferred extend type (ISD::SIGN_EXTEND or ISD::ZERO_EXTEND) - /// for a value. - DenseMap PreferredExtendType; - - /// VisitedBBs - The set of basic blocks visited thus far by instruction - /// selection. - SmallPtrSet VisitedBBs; - - /// PHINodesToUpdate - A list of phi instructions whose operand list will - /// be updated after processing the current basic block. - /// TODO: This isn't per-function state, it's per-basic-block state. But - /// there's no other convenient place for it to live right now. - std::vector > PHINodesToUpdate; - unsigned OrigNumPHINodesToUpdate; - - /// If the current MBB is a landing pad, the exception pointer and exception - /// selector registers are copied into these virtual registers by - /// SelectionDAGISel::PrepareEHLandingPad(). - unsigned ExceptionPointerVirtReg, ExceptionSelectorVirtReg; - - /// set - Initialize this FunctionLoweringInfo with the given Function - /// and its associated MachineFunction. - /// - void set(const Function &Fn, MachineFunction &MF, SelectionDAG *DAG); - - /// clear - Clear out all the function-specific state. This returns this - /// FunctionLoweringInfo to an empty state, ready to be used for a - /// different function. - void clear(); - - /// isExportedInst - Return true if the specified value is an instruction - /// exported from its block. - bool isExportedInst(const Value *V) { - return ValueMap.count(V); - } - - unsigned CreateReg(MVT VT); - - unsigned CreateRegs(Type *Ty); - - unsigned InitializeRegForValue(const Value *V) { - // Tokens never live in vregs. - if (V->getType()->isTokenTy()) - return 0; - unsigned &R = ValueMap[V]; - assert(R == 0 && "Already initialized this value register!"); - return R = CreateRegs(V->getType()); - } - - /// GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the - /// register is a PHI destination and the PHI's LiveOutInfo is not valid. - const LiveOutInfo *GetLiveOutRegInfo(unsigned Reg) { - if (!LiveOutRegInfo.inBounds(Reg)) - return nullptr; - - const LiveOutInfo *LOI = &LiveOutRegInfo[Reg]; - if (!LOI->IsValid) - return nullptr; - - return LOI; - } - - /// GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the - /// register is a PHI destination and the PHI's LiveOutInfo is not valid. If - /// the register's LiveOutInfo is for a smaller bit width, it is extended to - /// the larger bit width by zero extension. The bit width must be no smaller - /// than the LiveOutInfo's existing bit width. - const LiveOutInfo *GetLiveOutRegInfo(unsigned Reg, unsigned BitWidth); - - /// AddLiveOutRegInfo - Adds LiveOutInfo for a register. - void AddLiveOutRegInfo(unsigned Reg, unsigned NumSignBits, - const APInt &KnownZero, const APInt &KnownOne) { - // Only install this information if it tells us something. - if (NumSignBits == 1 && KnownZero == 0 && KnownOne == 0) - return; - - LiveOutRegInfo.grow(Reg); - LiveOutInfo &LOI = LiveOutRegInfo[Reg]; - LOI.NumSignBits = NumSignBits; - LOI.KnownOne = KnownOne; - LOI.KnownZero = KnownZero; - } - - /// ComputePHILiveOutRegInfo - Compute LiveOutInfo for a PHI's destination - /// register based on the LiveOutInfo of its operands. - void ComputePHILiveOutRegInfo(const PHINode*); - - /// InvalidatePHILiveOutRegInfo - Invalidates a PHI's LiveOutInfo, to be - /// called when a block is visited before all of its predecessors. - void InvalidatePHILiveOutRegInfo(const PHINode *PN) { - // PHIs with no uses have no ValueMap entry. - DenseMap::const_iterator It = ValueMap.find(PN); - if (It == ValueMap.end()) - return; - - unsigned Reg = It->second; - if (Reg == 0) - return; - - LiveOutRegInfo.grow(Reg); - LiveOutRegInfo[Reg].IsValid = false; - } - - /// setArgumentFrameIndex - Record frame index for the byval - /// argument. - void setArgumentFrameIndex(const Argument *A, int FI); - - /// getArgumentFrameIndex - Get frame index for the byval argument. - int getArgumentFrameIndex(const Argument *A); - - unsigned getCatchPadExceptionPointerVReg(const Value *CPI, - const TargetRegisterClass *RC); - -private: - void addSEHHandlersForLPads(ArrayRef LPads); - - /// LiveOutRegInfo - Information about live out vregs. - IndexedMap LiveOutRegInfo; -}; - -/// ComputeUsesVAFloatArgument - Determine if any floating-point values are -/// being passed to this variadic function, and set the MachineModuleInfo's -/// usesVAFloatArgument flag if so. This flag is used to emit an undefined -/// reference to _fltused on Windows, which will link in MSVCRT's -/// floating-point support. -void ComputeUsesVAFloatArgument(const CallInst &I, MachineModuleInfo *MMI); - -/// AddLandingPadInfo - Extract the exception handling information from the -/// landingpad instruction and add them to the specified machine module info. -void AddLandingPadInfo(const LandingPadInst &I, MachineModuleInfo &MMI, - MachineBasicBlock *MBB); - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/GCMetadata.h b/llvm/include/llvm/CodeGen/GCMetadata.h deleted file mode 100644 index e6afcbc8..00000000 --- a/llvm/include/llvm/CodeGen/GCMetadata.h +++ /dev/null @@ -1,207 +0,0 @@ -//===-- GCMetadata.h - Garbage collector metadata ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the GCFunctionInfo and GCModuleInfo classes, which are -// used as a communication channel from the target code generator to the target -// garbage collectors. This interface allows code generators and garbage -// collectors to be developed independently. -// -// The GCFunctionInfo class logs the data necessary to build a type accurate -// stack map. The code generator outputs: -// -// - Safe points as specified by the GCStrategy's NeededSafePoints. -// - Stack offsets for GC roots, as specified by calls to llvm.gcroot -// -// As a refinement, liveness analysis calculates the set of live roots at each -// safe point. Liveness analysis is not presently performed by the code -// generator, so all roots are assumed live. -// -// GCModuleInfo simply collects GCFunctionInfo instances for each Function as -// they are compiled. This accretion is necessary for collectors which must emit -// a stack map for the compilation unit as a whole. Therefore, GCFunctionInfo -// outlives the MachineFunction from which it is derived and must not refer to -// any code generator data structures. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GCMETADATA_H -#define LLVM_CODEGEN_GCMETADATA_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/CodeGen/GCStrategy.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/Pass.h" -#include -#include - -namespace llvm { -class AsmPrinter; -class Constant; -class MCSymbol; - -/// GCPoint - Metadata for a collector-safe point in machine code. -/// -struct GCPoint { - GC::PointKind Kind; ///< The kind of the safe point. - MCSymbol *Label; ///< A label. - DebugLoc Loc; - - GCPoint(GC::PointKind K, MCSymbol *L, DebugLoc DL) - : Kind(K), Label(L), Loc(std::move(DL)) {} -}; - -/// GCRoot - Metadata for a pointer to an object managed by the garbage -/// collector. -struct GCRoot { - int Num; ///< Usually a frame index. - int StackOffset; ///< Offset from the stack pointer. - const Constant *Metadata; ///< Metadata straight from the call - ///< to llvm.gcroot. - - GCRoot(int N, const Constant *MD) : Num(N), StackOffset(-1), Metadata(MD) {} -}; - -/// Garbage collection metadata for a single function. Currently, this -/// information only applies to GCStrategies which use GCRoot. -class GCFunctionInfo { -public: - typedef std::vector::iterator iterator; - typedef std::vector::iterator roots_iterator; - typedef std::vector::const_iterator live_iterator; - -private: - const Function &F; - GCStrategy &S; - uint64_t FrameSize; - std::vector Roots; - std::vector SafePoints; - - // FIXME: Liveness. A 2D BitVector, perhaps? - // - // BitVector Liveness; - // - // bool islive(int point, int root) = - // Liveness[point * SafePoints.size() + root] - // - // The bit vector is the more compact representation where >3.2% of roots - // are live per safe point (1.5% on 64-bit hosts). - -public: - GCFunctionInfo(const Function &F, GCStrategy &S); - ~GCFunctionInfo(); - - /// getFunction - Return the function to which this metadata applies. - /// - const Function &getFunction() const { return F; } - - /// getStrategy - Return the GC strategy for the function. - /// - GCStrategy &getStrategy() { return S; } - - /// addStackRoot - Registers a root that lives on the stack. Num is the - /// stack object ID for the alloca (if the code generator is - // using MachineFrameInfo). - void addStackRoot(int Num, const Constant *Metadata) { - Roots.push_back(GCRoot(Num, Metadata)); - } - - /// removeStackRoot - Removes a root. - roots_iterator removeStackRoot(roots_iterator position) { - return Roots.erase(position); - } - - /// addSafePoint - Notes the existence of a safe point. Num is the ID of the - /// label just prior to the safe point (if the code generator is using - /// MachineModuleInfo). - void addSafePoint(GC::PointKind Kind, MCSymbol *Label, const DebugLoc &DL) { - SafePoints.emplace_back(Kind, Label, DL); - } - - /// getFrameSize/setFrameSize - Records the function's frame size. - /// - uint64_t getFrameSize() const { return FrameSize; } - void setFrameSize(uint64_t S) { FrameSize = S; } - - /// begin/end - Iterators for safe points. - /// - iterator begin() { return SafePoints.begin(); } - iterator end() { return SafePoints.end(); } - size_t size() const { return SafePoints.size(); } - - /// roots_begin/roots_end - Iterators for all roots in the function. - /// - roots_iterator roots_begin() { return Roots.begin(); } - roots_iterator roots_end() { return Roots.end(); } - size_t roots_size() const { return Roots.size(); } - - /// live_begin/live_end - Iterators for live roots at a given safe point. - /// - live_iterator live_begin(const iterator &p) { return roots_begin(); } - live_iterator live_end(const iterator &p) { return roots_end(); } - size_t live_size(const iterator &p) const { return roots_size(); } -}; - -/// An analysis pass which caches information about the entire Module. -/// Records both the function level information used by GCRoots and a -/// cache of the 'active' gc strategy objects for the current Module. -class GCModuleInfo : public ImmutablePass { - /// An owning list of all GCStrategies which have been created - SmallVector, 1> GCStrategyList; - /// A helper map to speedup lookups into the above list - StringMap GCStrategyMap; - -public: - /// Lookup the GCStrategy object associated with the given gc name. - /// Objects are owned internally; No caller should attempt to delete the - /// returned objects. - GCStrategy *getGCStrategy(const StringRef Name); - - /// List of per function info objects. In theory, Each of these - /// may be associated with a different GC. - typedef std::vector> FuncInfoVec; - - FuncInfoVec::iterator funcinfo_begin() { return Functions.begin(); } - FuncInfoVec::iterator funcinfo_end() { return Functions.end(); } - -private: - /// Owning list of all GCFunctionInfos associated with this Module - FuncInfoVec Functions; - - /// Non-owning map to bypass linear search when finding the GCFunctionInfo - /// associated with a particular Function. - typedef DenseMap finfo_map_type; - finfo_map_type FInfoMap; - -public: - typedef SmallVector,1>::const_iterator iterator; - - static char ID; - - GCModuleInfo(); - - /// clear - Resets the pass. Any pass, which uses GCModuleInfo, should - /// call it in doFinalization(). - /// - void clear(); - - /// begin/end - Iterators for used strategies. - /// - iterator begin() const { return GCStrategyList.begin(); } - iterator end() const { return GCStrategyList.end(); } - - /// get - Look up function metadata. This is currently assumed - /// have the side effect of initializing the associated GCStrategy. That - /// will soon change. - GCFunctionInfo &getFunctionInfo(const Function &F); -}; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/GCMetadataPrinter.h b/llvm/include/llvm/CodeGen/GCMetadataPrinter.h deleted file mode 100644 index 22084702..00000000 --- a/llvm/include/llvm/CodeGen/GCMetadataPrinter.h +++ /dev/null @@ -1,64 +0,0 @@ -//===-- llvm/CodeGen/GCMetadataPrinter.h - Prints asm GC tables -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The abstract base class GCMetadataPrinter supports writing GC metadata tables -// as assembly code. This is a separate class from GCStrategy in order to allow -// users of the LLVM JIT to avoid linking with the AsmWriter. -// -// Subclasses of GCMetadataPrinter must be registered using the -// GCMetadataPrinterRegistry. This is separate from the GCStrategy itself -// because these subclasses are logically plugins for the AsmWriter. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GCMETADATAPRINTER_H -#define LLVM_CODEGEN_GCMETADATAPRINTER_H - -#include "llvm/CodeGen/GCMetadata.h" -#include "llvm/CodeGen/GCStrategy.h" -#include "llvm/Support/Registry.h" - -namespace llvm { - -class GCMetadataPrinter; - -/// GCMetadataPrinterRegistry - The GC assembly printer registry uses all the -/// defaults from Registry. -typedef Registry GCMetadataPrinterRegistry; - -/// GCMetadataPrinter - Emits GC metadata as assembly code. Instances are -/// created, managed, and owned by the AsmPrinter. -class GCMetadataPrinter { -private: - GCStrategy *S; - friend class AsmPrinter; - -protected: - // May only be subclassed. - GCMetadataPrinter(); - -private: - GCMetadataPrinter(const GCMetadataPrinter &) = delete; - GCMetadataPrinter &operator=(const GCMetadataPrinter &) = delete; - -public: - GCStrategy &getStrategy() { return *S; } - - /// Called before the assembly for the module is generated by - /// the AsmPrinter (but after target specific hooks.) - virtual void beginAssembly(Module &M, GCModuleInfo &Info, AsmPrinter &AP) {} - /// Called after the assembly for the module is generated by - /// the AsmPrinter (but before target specific hooks) - virtual void finishAssembly(Module &M, GCModuleInfo &Info, AsmPrinter &AP) {} - - virtual ~GCMetadataPrinter(); -}; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/GCStrategy.h b/llvm/include/llvm/CodeGen/GCStrategy.h deleted file mode 100644 index 3088a86a..00000000 --- a/llvm/include/llvm/CodeGen/GCStrategy.h +++ /dev/null @@ -1,177 +0,0 @@ -//===-- llvm/CodeGen/GCStrategy.h - Garbage collection ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// GCStrategy coordinates code generation algorithms and implements some itself -// in order to generate code compatible with a target code generator as -// specified in a function's 'gc' attribute. Algorithms are enabled by setting -// flags in a subclass's constructor, and some virtual methods can be -// overridden. -// -// GCStrategy is relevant for implementations using either gc.root or -// gc.statepoint based lowering strategies, but is currently focused mostly on -// options for gc.root. This will change over time. -// -// When requested by a subclass of GCStrategy, the gc.root implementation will -// populate GCModuleInfo and GCFunctionInfo with that about each Function in -// the Module that opts in to garbage collection. Specifically: -// -// - Safe points -// Garbage collection is generally only possible at certain points in code. -// GCStrategy can request that the collector insert such points: -// -// - At and after any call to a subroutine -// - Before returning from the current function -// - Before backwards branches (loops) -// -// - Roots -// When a reference to a GC-allocated object exists on the stack, it must be -// stored in an alloca registered with llvm.gcoot. -// -// This information can used to emit the metadata tables which are required by -// the target garbage collector runtime. -// -// When used with gc.statepoint, information about safepoint and roots can be -// found in the binary StackMap section after code generation. Safepoint -// placement is currently the responsibility of the frontend, though late -// insertion support is planned. gc.statepoint does not currently support -// custom stack map formats; such can be generated by parsing the standard -// stack map section if desired. -// -// The read and write barrier support can be used with either implementation. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GCSTRATEGY_H -#define LLVM_IR_GCSTRATEGY_H - -#include "llvm/ADT/Optional.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/Value.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/Registry.h" -#include - -namespace llvm { -namespace GC { -/// PointKind - Used to indicate whether the address of the call instruction -/// or the address after the call instruction is listed in the stackmap. For -/// most runtimes, PostCall safepoints are appropriate. -/// -enum PointKind { - PreCall, ///< Instr is a call instruction. - PostCall ///< Instr is the return address of a call. -}; -} - -/// GCStrategy describes a garbage collector algorithm's code generation -/// requirements, and provides overridable hooks for those needs which cannot -/// be abstractly described. GCStrategy objects must be looked up through -/// the Function. The objects themselves are owned by the Context and must -/// be immutable. -class GCStrategy { -private: - std::string Name; - friend class GCModuleInfo; - -protected: - bool UseStatepoints; /// Uses gc.statepoints as opposed to gc.roots, - /// if set, none of the other options can be - /// anything but their default values. - - unsigned NeededSafePoints; ///< Bitmask of required safe points. - bool CustomReadBarriers; ///< Default is to insert loads. - bool CustomWriteBarriers; ///< Default is to insert stores. - bool CustomRoots; ///< Default is to pass through to backend. - bool InitRoots; ///< If set, roots are nulled during lowering. - bool UsesMetadata; ///< If set, backend must emit metadata tables. - -public: - GCStrategy(); - virtual ~GCStrategy() {} - - /// Return the name of the GC strategy. This is the value of the collector - /// name string specified on functions which use this strategy. - const std::string &getName() const { return Name; } - - /// By default, write barriers are replaced with simple store - /// instructions. If true, you must provide a custom pass to lower - /// calls to @llvm.gcwrite. - bool customWriteBarrier() const { return CustomWriteBarriers; } - - /// By default, read barriers are replaced with simple load - /// instructions. If true, you must provide a custom pass to lower - /// calls to @llvm.gcread. - bool customReadBarrier() const { return CustomReadBarriers; } - - /// Returns true if this strategy is expecting the use of gc.statepoints, - /// and false otherwise. - bool useStatepoints() const { return UseStatepoints; } - - /** @name Statepoint Specific Properties */ - ///@{ - - /// If the type specified can be reliably distinguished, returns true for - /// pointers to GC managed locations and false for pointers to non-GC - /// managed locations. Note a GCStrategy can always return 'None' (i.e. an - /// empty optional indicating it can't reliably distinguish. - virtual Optional isGCManagedPointer(const Type *Ty) const { - return None; - } - ///@} - - /** @name GCRoot Specific Properties - * These properties and overrides only apply to collector strategies using - * GCRoot. - */ - ///@{ - - /// True if safe points of any kind are required. By default, none are - /// recorded. - bool needsSafePoints() const { return NeededSafePoints != 0; } - - /// True if the given kind of safe point is required. By default, none are - /// recorded. - bool needsSafePoint(GC::PointKind Kind) const { - return (NeededSafePoints & 1 << Kind) != 0; - } - - /// By default, roots are left for the code generator so it can generate a - /// stack map. If true, you must provide a custom pass to lower - /// calls to @llvm.gcroot. - bool customRoots() const { return CustomRoots; } - - /// If set, gcroot intrinsics should initialize their allocas to null - /// before the first use. This is necessary for most GCs and is enabled by - /// default. - bool initializeRoots() const { return InitRoots; } - - /// If set, appropriate metadata tables must be emitted by the back-end - /// (assembler, JIT, or otherwise). For statepoint, this method is - /// currently unsupported. The stackmap information can be found in the - /// StackMap section as described in the documentation. - bool usesMetadata() const { return UsesMetadata; } - - ///@} -}; - -/// Subclasses of GCStrategy are made available for use during compilation by -/// adding them to the global GCRegistry. This can done either within the -/// LLVM source tree or via a loadable plugin. An example registeration -/// would be: -/// static GCRegistry::Add X("custom-name", -/// "my custom supper fancy gc strategy"); -/// -/// Note that to use a custom GCMetadataPrinter w/gc.roots, you must also -/// register your GCMetadataPrinter subclass with the -/// GCMetadataPrinterRegistery as well. -typedef Registry GCRegistry; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/GCs.h b/llvm/include/llvm/CodeGen/GCs.h deleted file mode 100644 index 5207f801..00000000 --- a/llvm/include/llvm/CodeGen/GCs.h +++ /dev/null @@ -1,46 +0,0 @@ -//===-- GCs.h - Garbage collector linkage hacks ---------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains hack functions to force linking in the GC components. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GCS_H -#define LLVM_CODEGEN_GCS_H - -namespace llvm { -class GCStrategy; -class GCMetadataPrinter; - -/// FIXME: Collector instances are not useful on their own. These no longer -/// serve any purpose except to link in the plugins. - -/// Creates a CoreCLR-compatible garbage collector. -void linkCoreCLRGC(); - -/// Creates an ocaml-compatible garbage collector. -void linkOcamlGC(); - -/// Creates an ocaml-compatible metadata printer. -void linkOcamlGCPrinter(); - -/// Creates an erlang-compatible garbage collector. -void linkErlangGC(); - -/// Creates an erlang-compatible metadata printer. -void linkErlangGCPrinter(); - -/// Creates a shadow stack garbage collector. This collector requires no code -/// generator support. -void linkShadowStackGC(); - -void linkStatepointExampleGC(); -} - -#endif diff --git a/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h b/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h deleted file mode 100644 index bbd0b6d8..00000000 --- a/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h +++ /dev/null @@ -1,72 +0,0 @@ -//===-- llvm/CodeGen/GlobalISel/CallLowering.h - Call lowering --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// This file describes how to lower LLVM calls to machine code calls. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GLOBALISEL_CALLLOWERING_H -#define LLVM_CODEGEN_GLOBALISEL_CALLLOWERING_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/Function.h" - -namespace llvm { -// Forward declarations. -class MachineIRBuilder; -class TargetLowering; -class Value; - -class CallLowering { - const TargetLowering *TLI; - protected: - /// Getter for generic TargetLowering class. - const TargetLowering *getTLI() const { - return TLI; - } - - /// Getter for target specific TargetLowering class. - template - const XXXTargetLowering *getTLI() const { - return static_cast(TLI); - } - public: - CallLowering(const TargetLowering *TLI) : TLI(TLI) {} - virtual ~CallLowering() {} - - /// This hook must be implemented to lower outgoing return values, described - /// by \p Val, into the specified virtual register \p VReg. - /// This hook is used by GlobalISel. - /// - /// \return True if the lowering succeeds, false otherwise. - virtual bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, - unsigned VReg) const { - return false; - } - - /// This hook must be implemented to lower the incoming (formal) - /// arguments, described by \p Args, for GlobalISel. Each argument - /// must end up in the related virtual register described by VRegs. - /// In other words, the first argument should end up in VRegs[0], - /// the second in VRegs[1], and so on. - /// \p MIRBuilder is set to the proper insertion for the argument - /// lowering. - /// - /// \return True if the lowering succeeded, false otherwise. - virtual bool - lowerFormalArguments(MachineIRBuilder &MIRBuilder, - const Function::ArgumentListType &Args, - const SmallVectorImpl &VRegs) const { - return false; - } -}; -} // End namespace llvm. - -#endif diff --git a/llvm/include/llvm/CodeGen/GlobalISel/GISelAccessor.h b/llvm/include/llvm/CodeGen/GlobalISel/GISelAccessor.h deleted file mode 100644 index 7c5ec9f3..00000000 --- a/llvm/include/llvm/CodeGen/GlobalISel/GISelAccessor.h +++ /dev/null @@ -1,33 +0,0 @@ -//===-- GISelAccessor.h - GISel Accessor ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// This file declares the API to access the various APIs related -/// to GlobalISel. -// -//===----------------------------------------------------------------------===/ - -#ifndef LLVM_CODEGEN_GLOBALISEL_GISELACCESSOR_H -#define LLVM_CODEGEN_GLOBALISEL_GISELACCESSOR_H - -namespace llvm { -class CallLowering; -class RegisterBankInfo; - -/// The goal of this helper class is to gather the accessor to all -/// the APIs related to GlobalISel. -/// It should be derived to feature an actual accessor to the GISel APIs. -/// The reason why this is not simply done into the subtarget is to avoid -/// spreading ifdefs around. -struct GISelAccessor { - virtual ~GISelAccessor() {} - virtual const CallLowering *getCallLowering() const { return nullptr;} - virtual const RegisterBankInfo *getRegBankInfo() const { return nullptr;} -}; -} // End namespace llvm; -#endif diff --git a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h deleted file mode 100644 index 833e8749..00000000 --- a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h +++ /dev/null @@ -1,158 +0,0 @@ -//===-- llvm/CodeGen/GlobalISel/IRTranslator.h - IRTranslator ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file declares the IRTranslator pass. -/// This pass is responsible for translating LLVM IR into MachineInstr. -/// It uses target hooks to lower the ABI but aside from that, the pass -/// generated code is generic. This is the default translator used for -/// GlobalISel. -/// -/// \todo Replace the comments with actual doxygen comments. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GLOBALISEL_IRTRANSLATOR_H -#define LLVM_CODEGEN_GLOBALISEL_IRTRANSLATOR_H - -#include "Types.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SetVector.h" -#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h" -#include "llvm/CodeGen/MachineFunctionPass.h" - -namespace llvm { -// Forward declarations. -class BasicBlock; -class CallLowering; -class Constant; -class Instruction; -class MachineBasicBlock; -class MachineFunction; -class MachineInstr; -class MachineRegisterInfo; - -// Technically the pass should run on an hypothetical MachineModule, -// since it should translate Global into some sort of MachineGlobal. -// The MachineGlobal should ultimately just be a transfer of ownership of -// the interesting bits that are relevant to represent a global value. -// That being said, we could investigate what would it cost to just duplicate -// the information from the LLVM IR. -// The idea is that ultimately we would be able to free up the memory used -// by the LLVM IR as soon as the translation is over. -class IRTranslator : public MachineFunctionPass { -public: - static char ID; - -private: - /// Interface used to lower the everything related to calls. - const CallLowering *CLI; - /// Mapping of the values of the current LLVM IR function - /// to the related virtual registers. - ValueToVReg ValToVReg; - // Constants are special because when we encounter one, - // we do not know at first where to insert the definition since - // this depends on all its uses. - // Thus, we will insert the sequences to materialize them when - // we know all their users. - // In the meantime, just keep it in a set. - // Note: Constants that end up as immediate in the related instructions, - // do not appear in that map. - SmallSetVector Constants; - - DenseMap BBToMBB; - - /// Methods for translating form LLVM IR to MachineInstr. - /// \see ::translate for general information on the translate methods. - /// @{ - - /// Translate \p Inst into its corresponding MachineInstr instruction(s). - /// Insert the newly translated instruction(s) right where the MIRBuilder - /// is set. - /// - /// The general algorithm is: - /// 1. Look for a virtual register for each operand or - /// create one. - /// 2 Update the ValToVReg accordingly. - /// 2.alt. For constant arguments, if they are compile time constants, - /// produce an immediate in the right operand and do not touch - /// ValToReg. Actually we will go with a virtual register for each - /// constants because it may be expensive to actually materialize the - /// constant. Moreover, if the constant spans on several instructions, - /// CSE may not catch them. - /// => Update ValToVReg and remember that we saw a constant in Constants. - /// We will materialize all the constants in finalize. - /// Note: we would need to do something so that we can recognize such operand - /// as constants. - /// 3. Create the generic instruction. - /// - /// \return true if the translation succeeded. - bool translate(const Instruction &Inst); - - /// Translate \p Inst into a binary operation \p Opcode. - /// \pre \p Inst is a binary operation. - bool translateBinaryOp(unsigned Opcode, const Instruction &Inst); - - /// Translate branch (br) instruction. - /// \pre \p Inst is a branch instruction. - bool translateBr(const Instruction &Inst); - - /// Translate return (ret) instruction. - /// The target needs to implement CallLowering::lowerReturn for - /// this to succeed. - /// \pre \p Inst is a return instruction. - bool translateReturn(const Instruction &Inst); - /// @} - - // Builder for machine instruction a la IRBuilder. - // I.e., compared to regular MIBuilder, this one also inserts the instruction - // in the current block, it can creates block, etc., basically a kind of - // IRBuilder, but for Machine IR. - MachineIRBuilder MIRBuilder; - - /// MachineRegisterInfo used to create virtual registers. - MachineRegisterInfo *MRI; - - // * Insert all the code needed to materialize the constants - // at the proper place. E.g., Entry block or dominator block - // of each constant depending on how fancy we want to be. - // * Clear the different maps. - void finalize(); - - /// Get the VReg that represents \p Val. - /// If such VReg does not exist, it is created. - unsigned getOrCreateVReg(const Value &Val); - - /// Get the MachineBasicBlock that represents \p BB. - /// If such basic block does not exist, it is created. - MachineBasicBlock &getOrCreateBB(const BasicBlock &BB); - -public: - // Ctor, nothing fancy. - IRTranslator(); - - const char *getPassName() const override { - return "IRTranslator"; - } - - // Algo: - // CallLowering = MF.subtarget.getCallLowering() - // F = MF.getParent() - // MIRBuilder.reset(MF) - // MIRBuilder.getOrCreateBB(F.getEntryBB()) - // CallLowering->translateArguments(MIRBuilder, F, ValToVReg) - // for each bb in F - // MIRBuilder.getOrCreateBB(bb) - // for each inst in bb - // if (!translate(MIRBuilder, inst, ValToVReg, ConstantToSequence)) - // report_fatal_error(“Don’t know how to translate input"); - // finalize() - bool runOnMachineFunction(MachineFunction &MF) override; -}; - -} // End namespace llvm. -#endif diff --git a/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h b/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h deleted file mode 100644 index efdc59a9..00000000 --- a/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h +++ /dev/null @@ -1,146 +0,0 @@ -//===-- llvm/CodeGen/GlobalISel/MachineIRBuilder.h - MIBuilder --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This file declares the MachineIRBuilder class. -/// This is a helper class to build MachineInstr. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GLOBALISEL_MACHINEIRBUILDER_H -#define LLVM_CODEGEN_GLOBALISEL_MACHINEIRBUILDER_H - -#include "llvm/CodeGen/GlobalISel/Types.h" - -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/IR/DebugLoc.h" - -namespace llvm { - -// Forward declarations. -class MachineFunction; -class MachineInstr; -class TargetInstrInfo; - -/// Helper class to build MachineInstr. -/// It keeps internally the insertion point and debug location for all -/// the new instructions we want to create. -/// This information can be modify via the related setters. -class MachineIRBuilder { - /// MachineFunction under construction. - MachineFunction *MF; - /// Information used to access the description of the opcodes. - const TargetInstrInfo *TII; - /// Debug location to be set to any instruction we create. - DebugLoc DL; - - /// Fields describing the insertion point. - /// @{ - MachineBasicBlock *MBB; - MachineInstr *MI; - bool Before; - /// @} - - const TargetInstrInfo &getTII() { - assert(TII && "TargetInstrInfo is not set"); - return *TII; - } - -public: - /// Getter for the function we currently build. - MachineFunction &getMF() { - assert(MF && "MachineFunction is not set"); - return *MF; - } - - /// Getter for the basic block we currently build. - MachineBasicBlock &getMBB() { - assert(MBB && "MachineBasicBlock is not set"); - return *MBB; - } - - /// Current insertion point for new instructions. - MachineBasicBlock::iterator getInsertPt(); - - /// Setters for the insertion point. - /// @{ - /// Set the MachineFunction where to build instructions. - void setMF(MachineFunction &); - - /// Set the insertion point to the beginning (\p Beginning = true) or end - /// (\p Beginning = false) of \p MBB. - /// \pre \p MBB must be contained by getMF(). - void setMBB(MachineBasicBlock &MBB, bool Beginning = false); - - /// Set the insertion point to before (\p Before = true) or after - /// (\p Before = false) \p MI. - /// \pre MI must be in getMF(). - void setInstr(MachineInstr &MI, bool Before = false); - /// @} - - /// Set the debug location to \p DL for all the next build instructions. - void setDebugLoc(const DebugLoc &DL) { this->DL = DL; } - - /// Build and insert = \p Opcode [\p Ty] . - /// \p Ty is the type of the instruction if \p Opcode describes - /// a generic machine instruction. \p Ty must be nullptr if \p Opcode - /// does not describe a generic instruction. - /// The insertion point is the one set by the last call of either - /// setBasicBlock or setMI. - /// - /// \pre setBasicBlock or setMI must have been called. - /// \pre Ty == nullptr or isPreISelGenericOpcode(Opcode) - /// - /// \return The newly created instruction. - MachineInstr *buildInstr(unsigned Opcode, Type *Ty); - - /// Build and insert = \p Opcode [\p Ty] \p BB. - /// - /// \pre setBasicBlock or setMI must have been called. - /// \pre Ty == nullptr or isPreISelGenericOpcode(Opcode) - /// - /// \return The newly created instruction. - MachineInstr *buildInstr(unsigned Opcode, Type *Ty, MachineBasicBlock &BB); - - /// Build and insert \p Res = \p Opcode [\p Ty] \p Op0, \p Op1. - /// - /// \pre setBasicBlock or setMI must have been called. - /// \pre Ty == nullptr or isPreISelGenericOpcode(Opcode) - /// - /// \return The newly created instruction. - MachineInstr *buildInstr(unsigned Opcode, Type *Ty, unsigned Res, - unsigned Op0, unsigned Op1); - - /// Build and insert \p Res = \p Opcode \p Op0, \p Op1. - /// I.e., instruction with a non-generic opcode. - /// - /// \pre setBasicBlock or setMI must have been called. - /// \pre not isPreISelGenericOpcode(\p Opcode) - /// - /// \return The newly created instruction. - MachineInstr *buildInstr(unsigned Opcode, unsigned Res, unsigned Op0, - unsigned Op1); - - /// Build and insert \p Res = \p Opcode \p Op0. - /// - /// \pre setBasicBlock or setMI must have been called. - /// \pre not isPreISelGenericOpcode(\p Opcode) - /// - /// \return The newly created instruction. - MachineInstr *buildInstr(unsigned Opcode, unsigned Res, unsigned Op0); - - /// Build and insert = \p Opcode . - /// - /// \pre setBasicBlock or setMI must have been called. - /// \pre not isPreISelGenericOpcode(\p Opcode) - /// - /// \return The newly created instruction. - MachineInstr *buildInstr(unsigned Opcode); -}; - -} // End namespace llvm. -#endif // LLVM_CODEGEN_GLOBALISEL_MACHINEIRBUILDER_H diff --git a/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h b/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h deleted file mode 100644 index b393744e..00000000 --- a/llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h +++ /dev/null @@ -1,614 +0,0 @@ -//== llvm/CodeGen/GlobalISel/RegBankSelect.h - Reg Bank Selector -*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// \file This file describes the interface of the MachineFunctionPass -/// responsible for assigning the generic virtual registers to register bank. - -/// By default, the reg bank selector relies on local decisions to -/// assign the register bank. In other words, it looks at one instruction -/// at a time to decide where the operand of that instruction should live. -/// -/// At higher optimization level, we could imagine that the reg bank selector -/// would use more global analysis and do crazier thing like duplicating -/// instructions and so on. This is future work. -/// -/// For now, the pass uses a greedy algorithm to decide where the operand -/// of an instruction should live. It asks the target which banks may be -/// used for each operand of the instruction and what is the cost. Then, -/// it chooses the solution which minimize the cost of the instruction plus -/// the cost of any move that may be needed to to the values into the right -/// register bank. -/// In other words, the cost for an instruction on a register bank RegBank -/// is: Cost of I on RegBank plus the sum of the cost for bringing the -/// input operands from their current register bank to RegBank. -/// Thus, the following formula: -/// cost(I, RegBank) = cost(I.Opcode, RegBank) + -/// sum(for each arg in I.arguments: costCrossCopy(arg.RegBank, RegBank)) -/// -/// E.g., Let say we are assigning the register bank for the instruction -/// defining v2. -/// v0(A_REGBANK) = ... -/// v1(A_REGBANK) = ... -/// v2 = G_ADD i32 v0, v1 <-- MI -/// -/// The target may say it can generate G_ADD i32 on register bank A and B -/// with a cost of respectively 5 and 1. -/// Then, let say the cost of a cross register bank copies from A to B is 1. -/// The reg bank selector would compare the following two costs: -/// cost(MI, A_REGBANK) = cost(G_ADD, A_REGBANK) + cost(v0.RegBank, A_REGBANK) + -/// cost(v1.RegBank, A_REGBANK) -/// = 5 + cost(A_REGBANK, A_REGBANK) + cost(A_REGBANK, -/// A_REGBANK) -/// = 5 + 0 + 0 = 5 -/// cost(MI, B_REGBANK) = cost(G_ADD, B_REGBANK) + cost(v0.RegBank, B_REGBANK) + -/// cost(v1.RegBank, B_REGBANK) -/// = 1 + cost(A_REGBANK, B_REGBANK) + cost(A_REGBANK, -/// B_REGBANK) -/// = 1 + 1 + 1 = 3 -/// Therefore, in this specific example, the reg bank selector would choose -/// bank B for MI. -/// v0(A_REGBANK) = ... -/// v1(A_REGBANK) = ... -/// tmp0(B_REGBANK) = COPY v0 -/// tmp1(B_REGBANK) = COPY v1 -/// v2(B_REGBANK) = G_ADD i32 tmp0, tmp1 -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GLOBALISEL_REGBANKSELECT_H -#define LLVM_CODEGEN_GLOBALISEL_REGBANKSELECT_H - -#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h" -#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h" -#include "llvm/CodeGen/MachineFunctionPass.h" - -namespace llvm { -// Forward declarations. -class BlockFrequency; -class MachineBranchProbabilityInfo; -class MachineBlockFrequencyInfo; -class MachineRegisterInfo; -class TargetRegisterInfo; - -/// This pass implements the reg bank selector pass used in the GlobalISel -/// pipeline. At the end of this pass, all register operands have been assigned -class RegBankSelect : public MachineFunctionPass { -public: - static char ID; - - /// List of the modes supported by the RegBankSelect pass. - enum Mode { - /// Assign the register banks as fast as possible (default). - Fast, - /// Greedily minimize the cost of assigning register banks. - /// This should produce code of greater quality, but will - /// require more compile time. - Greedy - }; - - /// Abstract class used to represent an insertion point in a CFG. - /// This class records an insertion point and materializes it on - /// demand. - /// It allows to reason about the frequency of this insertion point, - /// without having to logically materialize it (e.g., on an edge), - /// before we actually need to insert something. - class InsertPoint { - protected: - /// Tell if the insert point has already been materialized. - bool WasMaterialized = false; - /// Materialize the insertion point. - /// - /// If isSplit() is true, this involves actually splitting - /// the block or edge. - /// - /// \post getPointImpl() returns a valid iterator. - /// \post getInsertMBBImpl() returns a valid basic block. - /// \post isSplit() == false ; no more splitting should be required. - virtual void materialize() = 0; - - /// Return the materialized insertion basic block. - /// Code will be inserted into that basic block. - /// - /// \pre ::materialize has been called. - virtual MachineBasicBlock &getInsertMBBImpl() = 0; - - /// Return the materialized insertion point. - /// Code will be inserted before that point. - /// - /// \pre ::materialize has been called. - virtual MachineBasicBlock::iterator getPointImpl() = 0; - - public: - virtual ~InsertPoint() {} - - /// The first call to this method will cause the splitting to - /// happen if need be, then sub sequent calls just return - /// the iterator to that point. I.e., no more splitting will - /// occur. - /// - /// \return The iterator that should be used with - /// MachineBasicBlock::insert. I.e., additional code happens - /// before that point. - MachineBasicBlock::iterator getPoint() { - if (!WasMaterialized) { - WasMaterialized = true; - assert(canMaterialize() && "Impossible to materialize this point"); - materialize(); - } - // When we materialized the point we should have done the splitting. - assert(!isSplit() && "Wrong pre-condition"); - return getPointImpl(); - } - - /// The first call to this method will cause the splitting to - /// happen if need be, then sub sequent calls just return - /// the basic block that contains the insertion point. - /// I.e., no more splitting will occur. - /// - /// \return The basic block should be used with - /// MachineBasicBlock::insert and ::getPoint. The new code should - /// happen before that point. - MachineBasicBlock &getInsertMBB() { - if (!WasMaterialized) { - WasMaterialized = true; - assert(canMaterialize() && "Impossible to materialize this point"); - materialize(); - } - // When we materialized the point we should have done the splitting. - assert(!isSplit() && "Wrong pre-condition"); - return getInsertMBBImpl(); - } - - /// Insert \p MI in the just before ::getPoint() - MachineBasicBlock::iterator insert(MachineInstr &MI) { - return getInsertMBB().insert(getPoint(), &MI); - } - - /// Does this point involve splitting an edge or block? - /// As soon as ::getPoint is called and thus, the point - /// materialized, the point will not require splitting anymore, - /// i.e., this will return false. - virtual bool isSplit() const { return false; } - - /// Frequency of the insertion point. - /// \p P is used to access the various analysis that will help to - /// get that information, like MachineBlockFrequencyInfo. If \p P - /// does not contain enough enough to return the actual frequency, - /// this returns 1. - virtual uint64_t frequency(const Pass &P) const { return 1; } - - /// Check whether this insertion point can be materialized. - /// As soon as ::getPoint is called and thus, the point materialized - /// calling this method does not make sense. - virtual bool canMaterialize() const { return false; } - }; - - /// Insertion point before or after an instruction. - class InstrInsertPoint : public InsertPoint { - private: - /// Insertion point. - MachineInstr &Instr; - /// Does the insertion point is before or after Instr. - bool Before; - - void materialize() override; - - MachineBasicBlock::iterator getPointImpl() override { - if (Before) - return Instr; - return Instr.getNextNode() ? *Instr.getNextNode() - : Instr.getParent()->end(); - } - - MachineBasicBlock &getInsertMBBImpl() override { - return *Instr.getParent(); - } - - public: - /// Create an insertion point before (\p Before=true) or after \p Instr. - InstrInsertPoint(MachineInstr &Instr, bool Before = true); - bool isSplit() const override; - uint64_t frequency(const Pass &P) const override; - - // Worst case, we need to slice the basic block, but that is still doable. - bool canMaterialize() const override { return true; } - }; - - /// Insertion point at the beginning or end of a basic block. - class MBBInsertPoint : public InsertPoint { - private: - /// Insertion point. - MachineBasicBlock &MBB; - /// Does the insertion point is at the beginning or end of MBB. - bool Beginning; - - void materialize() override { /*Nothing to do to materialize*/ - } - - MachineBasicBlock::iterator getPointImpl() override { - return Beginning ? MBB.begin() : MBB.end(); - } - - MachineBasicBlock &getInsertMBBImpl() override { return MBB; } - - public: - MBBInsertPoint(MachineBasicBlock &MBB, bool Beginning = true) - : InsertPoint(), MBB(MBB), Beginning(Beginning) { - // If we try to insert before phis, we should use the insertion - // points on the incoming edges. - assert((!Beginning || MBB.getFirstNonPHI() == MBB.begin()) && - "Invalid beginning point"); - // If we try to insert after the terminators, we should use the - // points on the outcoming edges. - assert((Beginning || MBB.getFirstTerminator() == MBB.end()) && - "Invalid end point"); - } - bool isSplit() const override { return false; } - uint64_t frequency(const Pass &P) const override; - bool canMaterialize() const override { return true; }; - }; - - /// Insertion point on an edge. - class EdgeInsertPoint : public InsertPoint { - private: - /// Source of the edge. - MachineBasicBlock &Src; - /// Destination of the edge. - /// After the materialization is done, this hold the basic block - /// that resulted from the splitting. - MachineBasicBlock *DstOrSplit; - /// P is used to update the analysis passes as applicable. - Pass &P; - - void materialize() override; - - MachineBasicBlock::iterator getPointImpl() override { - // DstOrSplit should be the Split block at this point. - // I.e., it should have one predecessor, Src, and one successor, - // the original Dst. - assert(DstOrSplit && DstOrSplit->isPredecessor(&Src) && - DstOrSplit->pred_size() == 1 && DstOrSplit->succ_size() == 1 && - "Did not split?!"); - return DstOrSplit->begin(); - } - - MachineBasicBlock &getInsertMBBImpl() override { return *DstOrSplit; } - - public: - EdgeInsertPoint(MachineBasicBlock &Src, MachineBasicBlock &Dst, Pass &P) - : InsertPoint(), Src(Src), DstOrSplit(&Dst), P(P) {} - bool isSplit() const override { - return Src.succ_size() > 1 && DstOrSplit->pred_size() > 1; - } - uint64_t frequency(const Pass &P) const override; - bool canMaterialize() const override; - }; - - /// Struct used to represent the placement of a repairing point for - /// a given operand. - class RepairingPlacement { - public: - /// Define the kind of action this repairing needs. - enum RepairingKind { - /// Nothing to repair, just drop this action. - None, - /// Reparing code needs to happen before InsertPoints. - Insert, - /// (Re)assign the register bank of the operand. - Reassign, - /// Mark this repairing placement as impossible. - Impossible - }; - - /// Convenient types for a list of insertion points. - /// @{ - typedef SmallVector, 2> InsertionPoints; - typedef InsertionPoints::iterator insertpt_iterator; - typedef InsertionPoints::const_iterator const_insertpt_iterator; - /// @} - - private: - /// Kind of repairing. - RepairingKind Kind; - /// Index of the operand that will be repaired. - unsigned OpIdx; - /// Are all the insert points materializeable? - bool CanMaterialize; - /// Is there any of the insert points needing splitting? - bool HasSplit; - /// Insertion point for the repair code. - /// The repairing code needs to happen just before these points. - InsertionPoints InsertPoints; - /// Some insertion points may need to update the liveness and such. - Pass &P; - - public: - /// Create a repairing placement for the \p OpIdx-th operand of - /// \p MI. \p TRI is used to make some checks on the register aliases - /// if the machine operand is a physical register. \p P is used to - /// to update liveness information and such when materializing the - /// points. - RepairingPlacement(MachineInstr &MI, unsigned OpIdx, - const TargetRegisterInfo &TRI, Pass &P, - RepairingKind Kind = RepairingKind::Insert); - - /// Getters. - /// @{ - RepairingKind getKind() const { return Kind; } - unsigned getOpIdx() const { return OpIdx; } - bool canMaterialize() const { return CanMaterialize; } - bool hasSplit() { return HasSplit; } - /// @} - - /// Overloaded methods to add an insertion point. - /// @{ - /// Add a MBBInsertionPoint to the list of InsertPoints. - void addInsertPoint(MachineBasicBlock &MBB, bool Beginning); - /// Add a InstrInsertionPoint to the list of InsertPoints. - void addInsertPoint(MachineInstr &MI, bool Before); - /// Add an EdgeInsertionPoint (\p Src, \p Dst) to the list of InsertPoints. - void addInsertPoint(MachineBasicBlock &Src, MachineBasicBlock &Dst); - /// Add an InsertPoint to the list of insert points. - /// This method takes the ownership of &\p Point. - void addInsertPoint(InsertPoint &Point); - /// @} - - /// Accessors related to the insertion points. - /// @{ - insertpt_iterator begin() { return InsertPoints.begin(); } - insertpt_iterator end() { return InsertPoints.end(); } - - const_insertpt_iterator begin() const { return InsertPoints.begin(); } - const_insertpt_iterator end() const { return InsertPoints.end(); } - - unsigned getNumInsertPoints() const { return InsertPoints.size(); } - /// @} - - /// Change the type of this repairing placement to \p NewKind. - /// It is not possible to switch a repairing placement to the - /// RepairingKind::Insert. There is no fundamental problem with - /// that, but no uses as well, so do not support it for now. - /// - /// \pre NewKind != RepairingKind::Insert - /// \post getKind() == NewKind - void switchTo(RepairingKind NewKind) { - assert(NewKind != Kind && "Already of the right Kind"); - Kind = NewKind; - InsertPoints.clear(); - CanMaterialize = NewKind != RepairingKind::Impossible; - HasSplit = false; - assert(NewKind != RepairingKind::Insert && - "We would need more MI to switch to Insert"); - } - }; - -private: - /// Helper class used to represent the cost for mapping an instruction. - /// When mapping an instruction, we may introduce some repairing code. - /// In most cases, the repairing code is local to the instruction, - /// thus, we can omit the basic block frequency from the cost. - /// However, some alternatives may produce non-local cost, e.g., when - /// repairing a phi, and thus we then need to scale the local cost - /// to the non-local cost. This class does this for us. - /// \note: We could simply always scale the cost. The problem is that - /// there are higher chances that we saturate the cost easier and end - /// up having the same cost for actually different alternatives. - /// Another option would be to use APInt everywhere. - class MappingCost { - private: - /// Cost of the local instructions. - /// This cost is free of basic block frequency. - uint64_t LocalCost; - /// Cost of the non-local instructions. - /// This cost should include the frequency of the related blocks. - uint64_t NonLocalCost; - /// Frequency of the block where the local instructions live. - uint64_t LocalFreq; - - MappingCost(uint64_t LocalCost, uint64_t NonLocalCost, uint64_t LocalFreq) - : LocalCost(LocalCost), NonLocalCost(NonLocalCost), - LocalFreq(LocalFreq) {} - - /// Check if this cost is saturated. - bool isSaturated() const; - - public: - /// Create a MappingCost assuming that most of the instructions - /// will occur in a basic block with \p LocalFreq frequency. - MappingCost(const BlockFrequency &LocalFreq); - - /// Add \p Cost to the local cost. - /// \return true if this cost is saturated, false otherwise. - bool addLocalCost(uint64_t Cost); - - /// Add \p Cost to the non-local cost. - /// Non-local cost should reflect the frequency of their placement. - /// \return true if this cost is saturated, false otherwise. - bool addNonLocalCost(uint64_t Cost); - - /// Saturate the cost to the maximal representable value. - void saturate(); - - /// Return an instance of MappingCost that represents an - /// impossible mapping. - static MappingCost ImpossibleCost(); - - /// Check if this is less than \p Cost. - bool operator<(const MappingCost &Cost) const; - /// Check if this is equal to \p Cost. - bool operator==(const MappingCost &Cost) const; - /// Check if this is not equal to \p Cost. - bool operator!=(const MappingCost &Cost) const { return !(*this == Cost); } - /// Check if this is greater than \p Cost. - bool operator>(const MappingCost &Cost) const { - return *this != Cost && Cost < *this; - } - }; - - /// Interface to the target lowering info related - /// to register banks. - const RegisterBankInfo *RBI; - - /// MRI contains all the register class/bank information that this - /// pass uses and updates. - MachineRegisterInfo *MRI; - - /// Information on the register classes for the current function. - const TargetRegisterInfo *TRI; - - /// Get the frequency of blocks. - /// This is required for non-fast mode. - MachineBlockFrequencyInfo *MBFI; - - /// Get the frequency of the edges. - /// This is required for non-fast mode. - MachineBranchProbabilityInfo *MBPI; - - /// Helper class used for every code morphing. - MachineIRBuilder MIRBuilder; - - /// Optimization mode of the pass. - Mode OptMode; - - /// Assign the register bank of each operand of \p MI. - void assignInstr(MachineInstr &MI); - - /// Initialize the field members using \p MF. - void init(MachineFunction &MF); - - /// Check if \p Reg is already assigned what is described by \p ValMapping. - /// \p OnlyAssign == true means that \p Reg just needs to be assigned a - /// register bank. I.e., no repairing is necessary to have the - /// assignment match. - bool assignmentMatch(unsigned Reg, - const RegisterBankInfo::ValueMapping &ValMapping, - bool &OnlyAssign) const; - - /// Insert repairing code for \p Reg as specified by \p ValMapping. - /// The repairing placement is specified by \p RepairPt. - /// \p NewVRegs contains all the registers required to remap \p Reg. - /// In other words, the number of registers in NewVRegs must be equal - /// to ValMapping.BreakDown.size(). - /// - /// The transformation could be sketched as: - /// \code - /// ... = op Reg - /// \endcode - /// Becomes - /// \code - /// = COPY or extract Reg - /// ... = op Reg - /// \endcode - /// - /// and - /// \code - /// Reg = op ... - /// \endcode - /// Becomes - /// \code - /// Reg = op ... - /// Reg = COPY or build_sequence - /// \endcode - /// - /// \pre NewVRegs.size() == ValMapping.BreakDown.size() - /// - /// \note The caller is supposed to do the rewriting of op if need be. - /// I.e., Reg = op ... => = NewOp ... - void repairReg(MachineOperand &MO, - const RegisterBankInfo::ValueMapping &ValMapping, - RegBankSelect::RepairingPlacement &RepairPt, - const iterator_range::const_iterator> - &NewVRegs); - - /// Return the cost of the instruction needed to map \p MO to \p ValMapping. - /// The cost is free of basic block frequencies. - /// \pre MO.isReg() - /// \pre MO is assigned to a register bank. - /// \pre ValMapping is a valid mapping for MO. - uint64_t - getRepairCost(const MachineOperand &MO, - const RegisterBankInfo::ValueMapping &ValMapping) const; - - /// Find the best mapping for \p MI from \p PossibleMappings. - /// \return a reference on the best mapping in \p PossibleMappings. - RegisterBankInfo::InstructionMapping & - findBestMapping(MachineInstr &MI, - RegisterBankInfo::InstructionMappings &PossibleMappings, - SmallVectorImpl &RepairPts); - - /// Compute the cost of mapping \p MI with \p InstrMapping and - /// compute the repairing placement for such mapping in \p - /// RepairPts. - /// \p BestCost is used to specify when the cost becomes too high - /// and thus it is not worth computing the RepairPts. Moreover if - /// \p BestCost == nullptr, the mapping cost is actually not - /// computed. - MappingCost - computeMapping(MachineInstr &MI, - const RegisterBankInfo::InstructionMapping &InstrMapping, - SmallVectorImpl &RepairPts, - const MappingCost *BestCost = nullptr); - - /// When \p RepairPt involves splitting to repair \p MO for the - /// given \p ValMapping, try to change the way we repair such that - /// the splitting is not required anymore. - /// - /// \pre \p RepairPt.hasSplit() - /// \pre \p MO == MO.getParent()->getOperand(\p RepairPt.getOpIdx()) - /// \pre \p ValMapping is the mapping of \p MO for MO.getParent() - /// that implied \p RepairPt. - void tryAvoidingSplit(RegBankSelect::RepairingPlacement &RepairPt, - const MachineOperand &MO, - const RegisterBankInfo::ValueMapping &ValMapping) const; - - /// Apply \p Mapping to \p MI. \p RepairPts represents the different - /// mapping action that need to happen for the mapping to be - /// applied. - void applyMapping(MachineInstr &MI, - const RegisterBankInfo::InstructionMapping &InstrMapping, - SmallVectorImpl &RepairPts); - -public: - /// Create a RegBankSelect pass with the specified \p RunningMode. - RegBankSelect(Mode RunningMode = Fast); - - const char *getPassName() const override { - return "RegBankSelect"; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - /// Walk through \p MF and assign a register bank to every virtual register - /// that are still mapped to nothing. - /// The target needs to provide a RegisterBankInfo and in particular - /// override RegisterBankInfo::getInstrMapping. - /// - /// Simplified algo: - /// \code - /// RBI = MF.subtarget.getRegBankInfo() - /// MIRBuilder.setMF(MF) - /// for each bb in MF - /// for each inst in bb - /// MIRBuilder.setInstr(inst) - /// MappingCosts = RBI.getMapping(inst); - /// Idx = findIdxOfMinCost(MappingCosts) - /// CurRegBank = MappingCosts[Idx].RegBank - /// MRI.setRegBank(inst.getOperand(0).getReg(), CurRegBank) - /// for each argument in inst - /// if (CurRegBank != argument.RegBank) - /// ArgReg = argument.getReg() - /// Tmp = MRI.createNewVirtual(MRI.getSize(ArgReg), CurRegBank) - /// MIRBuilder.buildInstr(COPY, Tmp, ArgReg) - /// inst.getOperand(argument.getOperandNo()).setReg(Tmp) - /// \endcode - bool runOnMachineFunction(MachineFunction &MF) override; -}; -} // End namespace llvm. - -#endif diff --git a/llvm/include/llvm/CodeGen/GlobalISel/RegisterBank.h b/llvm/include/llvm/CodeGen/GlobalISel/RegisterBank.h deleted file mode 100644 index e886382f..00000000 --- a/llvm/include/llvm/CodeGen/GlobalISel/RegisterBank.h +++ /dev/null @@ -1,101 +0,0 @@ -//==-- llvm/CodeGen/GlobalISel/RegisterBank.h - Register Bank ----*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// \file This file declares the API of register banks. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GLOBALISEL_REGBANK_H -#define LLVM_CODEGEN_GLOBALISEL_REGBANK_H - -#include "llvm/ADT/BitVector.h" - -namespace llvm { -// Forward declarations. -class RegisterBankInfo; -class raw_ostream; -class TargetRegisterClass; -class TargetRegisterInfo; - -/// This class implements the register bank concept. -/// Two instances of RegisterBank must have different ID. -/// This property is enforced by the RegisterBankInfo class. -class RegisterBank { -private: - unsigned ID; - const char *Name; - unsigned Size; - BitVector ContainedRegClasses; - - /// Sentinel value used to recognize register bank not properly - /// initialized yet. - static const unsigned InvalidID; - - /// Only the RegisterBankInfo can create RegisterBank. - /// The default constructor will leave the object in - /// an invalid state. I.e. isValid() == false. - /// The field must be updated to fix that. - RegisterBank(); - - friend RegisterBankInfo; - -public: - /// Get the identifier of this register bank. - unsigned getID() const { return ID; } - - /// Get a user friendly name of this register bank. - /// Should be used only for debugging purposes. - const char *getName() const { return Name; } - - /// Get the maximal size in bits that fits in this register bank. - unsigned getSize() const { return Size; } - - /// Check whether this instance is ready to be used. - bool isValid() const; - - /// Check if this register bank is valid. In other words, - /// if it has been properly constructed. - /// - /// \note This method does not check anything when assertions are disabled. - /// - /// \return True is the check was successful. - bool verify(const TargetRegisterInfo &TRI) const; - - /// Check whether this register bank covers \p RC. - /// In other words, check if this register bank fully covers - /// the registers that \p RC contains. - /// \pre isValid() - bool covers(const TargetRegisterClass &RC) const; - - /// Check whether \p OtherRB is the same as this. - bool operator==(const RegisterBank &OtherRB) const; - bool operator!=(const RegisterBank &OtherRB) const { - return !this->operator==(OtherRB); - } - - /// Dump the register mask on dbgs() stream. - /// The dump is verbose. - void dump(const TargetRegisterInfo *TRI = nullptr) const; - - /// Print the register mask on OS. - /// If IsForDebug is false, then only the name of the register bank - /// is printed. Otherwise, all the fields are printing. - /// TRI is then used to print the name of the register classes that - /// this register bank covers. - void print(raw_ostream &OS, bool IsForDebug = false, - const TargetRegisterInfo *TRI = nullptr) const; -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const RegisterBank &RegBank) { - RegBank.print(OS); - return OS; -} -} // End namespace llvm. - -#endif diff --git a/llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h b/llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h deleted file mode 100644 index 19d17036..00000000 --- a/llvm/include/llvm/CodeGen/GlobalISel/RegisterBankInfo.h +++ /dev/null @@ -1,602 +0,0 @@ -//==-- llvm/CodeGen/GlobalISel/RegisterBankInfo.h ----------------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// \file This file declares the API for the register bank info. -/// This API is responsible for handling the register banks. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GLOBALISEL_REGBANKINFO_H -#define LLVM_CODEGEN_GLOBALISEL_REGBANKINFO_H - -#include "llvm/ADT/APInt.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/CodeGen/GlobalISel/RegisterBank.h" -#include "llvm/CodeGen/MachineValueType.h" // For SimpleValueType. -#include "llvm/Support/ErrorHandling.h" - -#include -#include // For unique_ptr. - -namespace llvm { -class MachineInstr; -class MachineRegisterInfo; -class TargetInstrInfo; -class TargetRegisterInfo; -class raw_ostream; - -/// Holds all the information related to register banks. -class RegisterBankInfo { -public: - /// Helper struct that represents how a value is partially mapped - /// into a register. - /// The StartIdx and Length represent what region of the orginal - /// value this partial mapping covers. - /// This can be represented as a Mask of contiguous bit starting - /// at StartIdx bit and spanning Length bits. - /// StartIdx is the number of bits from the less significant bits. - struct PartialMapping { - /// Number of bits at which this partial mapping starts in the - /// original value. The bits are counted from less significant - /// bits to most significant bits. - unsigned StartIdx; - /// Length of this mapping in bits. This is how many bits this - /// partial mapping covers in the original value: - /// from StartIdx to StartIdx + Length -1. - unsigned Length; - /// Register bank where the partial value lives. - const RegisterBank *RegBank; - - PartialMapping() = default; - - /// Provide a shortcut for quickly building PartialMapping. - PartialMapping(unsigned StartIdx, unsigned Length, - const RegisterBank &RegBank) - : StartIdx(StartIdx), Length(Length), RegBank(&RegBank) {} - - /// \return the index of in the original value of the most - /// significant bit that this partial mapping covers. - unsigned getHighBitIdx() const { return StartIdx + Length - 1; } - - /// Print this partial mapping on dbgs() stream. - void dump() const; - - /// Print this partial mapping on \p OS; - void print(raw_ostream &OS) const; - - /// Check that the Mask is compatible with the RegBank. - /// Indeed, if the RegBank cannot accomadate the "active bits" of the mask, - /// there is no way this mapping is valid. - /// - /// \note This method does not check anything when assertions are disabled. - /// - /// \return True is the check was successful. - bool verify() const; - }; - - /// Helper struct that represents how a value is mapped through - /// different register banks. - struct ValueMapping { - /// How the value is broken down between the different register banks. - SmallVector BreakDown; - - /// Verify that this mapping makes sense for a value of \p ExpectedBitWidth. - /// \note This method does not check anything when assertions are disabled. - /// - /// \return True is the check was successful. - bool verify(unsigned ExpectedBitWidth) const; - - /// Print this on dbgs() stream. - void dump() const; - - /// Print this on \p OS; - void print(raw_ostream &OS) const; - }; - - /// Helper class that represents how the value of an instruction may be - /// mapped and what is the related cost of such mapping. - class InstructionMapping { - /// Identifier of the mapping. - /// This is used to communicate between the target and the optimizers - /// which mapping should be realized. - unsigned ID; - /// Cost of this mapping. - unsigned Cost; - /// Mapping of all the operands. - std::unique_ptr OperandsMapping; - /// Number of operands. - unsigned NumOperands; - - ValueMapping &getOperandMapping(unsigned i) { - assert(i < getNumOperands() && "Out of bound operand"); - return OperandsMapping[i]; - } - - public: - /// Constructor for the mapping of an instruction. - /// \p NumOperands must be equal to number of all the operands of - /// the related instruction. - /// The rationale is that it is more efficient for the optimizers - /// to be able to assume that the mapping of the ith operand is - /// at the index i. - /// - /// \pre ID != InvalidMappingID - InstructionMapping(unsigned ID, unsigned Cost, unsigned NumOperands) - : ID(ID), Cost(Cost), NumOperands(NumOperands) { - assert(getID() != InvalidMappingID && - "Use the default constructor for invalid mapping"); - OperandsMapping.reset(new ValueMapping[getNumOperands()]); - } - - /// Default constructor. - /// Use this constructor to express that the mapping is invalid. - InstructionMapping() : ID(InvalidMappingID), Cost(0), NumOperands(0) {} - - /// Get the cost. - unsigned getCost() const { return Cost; } - - /// Get the ID. - unsigned getID() const { return ID; } - - /// Get the number of operands. - unsigned getNumOperands() const { return NumOperands; } - - /// Get the value mapping of the ith operand. - const ValueMapping &getOperandMapping(unsigned i) const { - return const_cast(this)->getOperandMapping(i); - } - - /// Get the value mapping of the ith operand. - void setOperandMapping(unsigned i, const ValueMapping &ValMapping) { - getOperandMapping(i) = ValMapping; - } - - /// Check whether this object is valid. - /// This is a lightweight check for obvious wrong instance. - bool isValid() const { return getID() != InvalidMappingID; } - - /// Set the operand mapping for the \p OpIdx-th operand. - /// The mapping will consist of only one element in the break down list. - /// This element will map to \p RegBank and fully define a mask, whose - /// bitwidth matches the size of \p MaskSize. - void setOperandMapping(unsigned OpIdx, unsigned MaskSize, - const RegisterBank &RegBank); - - /// Verifiy that this mapping makes sense for \p MI. - /// \pre \p MI must be connected to a MachineFunction. - /// - /// \note This method does not check anything when assertions are disabled. - /// - /// \return True is the check was successful. - bool verify(const MachineInstr &MI) const; - - /// Print this on dbgs() stream. - void dump() const; - - /// Print this on \p OS; - void print(raw_ostream &OS) const; - }; - - /// Convenient type to represent the alternatives for mapping an - /// instruction. - /// \todo When we move to TableGen this should be an array ref. - typedef SmallVector InstructionMappings; - - /// Helper class use to get/create the virtual registers that will be used - /// to replace the MachineOperand when applying a mapping. - class OperandsMapper { - /// The OpIdx-th cell contains the index in NewVRegs where the VRegs of the - /// OpIdx-th operand starts. -1 means we do not have such mapping yet. - std::unique_ptr OpToNewVRegIdx; - /// Hold the registers that will be used to map MI with InstrMapping. - SmallVector NewVRegs; - /// Current MachineRegisterInfo, used to create new virtual registers. - MachineRegisterInfo &MRI; - /// Instruction being remapped. - MachineInstr &MI; - /// New mapping of the instruction. - const InstructionMapping &InstrMapping; - - /// Constant value identifying that the index in OpToNewVRegIdx - /// for an operand has not been set yet. - static const int DontKnowIdx; - - /// Get the range in NewVRegs to store all the partial - /// values for the \p OpIdx-th operand. - /// - /// \return The iterator range for the space created. - // - /// \pre getMI().getOperand(OpIdx).isReg() - iterator_range::iterator> - getVRegsMem(unsigned OpIdx); - - /// Get the end iterator for a range starting at \p StartIdx and - /// spannig \p NumVal in NewVRegs. - /// \pre StartIdx + NumVal <= NewVRegs.size() - SmallVectorImpl::const_iterator - getNewVRegsEnd(unsigned StartIdx, unsigned NumVal) const; - SmallVectorImpl::iterator getNewVRegsEnd(unsigned StartIdx, - unsigned NumVal); - - public: - /// Create an OperandsMapper that will hold the information to apply \p - /// InstrMapping to \p MI. - /// \pre InstrMapping.verify(MI) - OperandsMapper(MachineInstr &MI, const InstructionMapping &InstrMapping, - MachineRegisterInfo &MRI); - - /// Getters. - /// @{ - /// The MachineInstr being remapped. - MachineInstr &getMI() const { return MI; } - - /// The final mapping of the instruction. - const InstructionMapping &getInstrMapping() const { return InstrMapping; } - /// @} - - /// Create as many new virtual registers as needed for the mapping of the \p - /// OpIdx-th operand. - /// The number of registers is determined by the number of breakdown for the - /// related operand in the instruction mapping. - /// - /// \pre getMI().getOperand(OpIdx).isReg() - /// - /// \post All the partial mapping of the \p OpIdx-th operand have been - /// assigned a new virtual register. - void createVRegs(unsigned OpIdx); - - /// Set the virtual register of the \p PartialMapIdx-th partial mapping of - /// the OpIdx-th operand to \p NewVReg. - /// - /// \pre getMI().getOperand(OpIdx).isReg() - /// \pre getInstrMapping().getOperandMapping(OpIdx).BreakDown.size() > - /// PartialMapIdx - /// \pre NewReg != 0 - /// - /// \post the \p PartialMapIdx-th register of the value mapping of the \p - /// OpIdx-th operand has been set. - void setVRegs(unsigned OpIdx, unsigned PartialMapIdx, unsigned NewVReg); - - /// Get all the virtual registers required to map the \p OpIdx-th operand of - /// the instruction. - /// - /// This return an empty range when createVRegs or setVRegs has not been - /// called. - /// The iterator may be invalidated by a call to setVRegs or createVRegs. - /// - /// When \p ForDebug is true, we will not check that the list of new virtual - /// registers does not contain uninitialized values. - /// - /// \pre getMI().getOperand(OpIdx).isReg() - /// \pre ForDebug || All partial mappings have been set a register - iterator_range::const_iterator> - getVRegs(unsigned OpIdx, bool ForDebug = false) const; - - /// Print this operands mapper on dbgs() stream. - void dump() const; - - /// Print this operands mapper on \p OS stream. - void print(raw_ostream &OS, bool ForDebug = false) const; - }; - -protected: - /// Hold the set of supported register banks. - std::unique_ptr RegBanks; - /// Total number of register banks. - unsigned NumRegBanks; - - /// Mapping from MVT::SimpleValueType to register banks. - std::unique_ptr VTToRegBank; - - /// Create a RegisterBankInfo that can accomodate up to \p NumRegBanks - /// RegisterBank instances. - /// - /// \note For the verify method to succeed all the \p NumRegBanks - /// must be initialized by createRegisterBank and updated with - /// addRegBankCoverage RegisterBank. - RegisterBankInfo(unsigned NumRegBanks); - - /// This constructor is meaningless. - /// It just provides a default constructor that can be used at link time - /// when GlobalISel is not built. - /// That way, targets can still inherit from this class without doing - /// crazy gymnastic to avoid link time failures. - /// \note That works because the constructor is inlined. - RegisterBankInfo() { - llvm_unreachable("This constructor should not be executed"); - } - - /// Create a new register bank with the given parameter and add it - /// to RegBanks. - /// \pre \p ID must not already be used. - /// \pre \p ID < NumRegBanks. - void createRegisterBank(unsigned ID, const char *Name); - - /// Add \p RCId to the set of register class that the register bank, - /// identified \p ID, covers. - /// This method transitively adds all the sub classes and the subreg-classes - /// of \p RCId to the set of covered register classes. - /// It also adjusts the size of the register bank to reflect the maximal - /// size of a value that can be hold into that register bank. - /// - /// If \p AddTypeMapping is true, this method also records what types can - /// be mapped to \p ID. Although this done by default, targets may want to - /// disable it, espicially if a given type may be mapped on different - /// register bank. Indeed, in such case, this method only records the - /// first register bank where the type matches. - /// This information is only used to provide default mapping - /// (see getInstrMappingImpl). - /// - /// \note This method does *not* add the super classes of \p RCId. - /// The rationale is if \p ID covers the registers of \p RCId, that - /// does not necessarily mean that \p ID covers the set of registers - /// of RCId's superclasses. - /// This method does *not* add the superreg classes as well for consistents. - /// The expected use is to add the coverage top-down with respect to the - /// register hierarchy. - /// - /// \todo TableGen should just generate the BitSet vector for us. - void addRegBankCoverage(unsigned ID, unsigned RCId, - const TargetRegisterInfo &TRI, - bool AddTypeMapping = true); - - /// Get the register bank identified by \p ID. - RegisterBank &getRegBank(unsigned ID) { - assert(ID < getNumRegBanks() && "Accessing an unknown register bank"); - return RegBanks[ID]; - } - - /// Get the register bank that has been recorded to cover \p SVT. - const RegisterBank *getRegBankForType(MVT::SimpleValueType SVT) const { - if (!VTToRegBank) - return nullptr; - assert(SVT < MVT::SimpleValueType::LAST_VALUETYPE && "Out-of-bound access"); - return VTToRegBank.get()[SVT]; - } - - /// Record \p RegBank as the register bank that covers \p SVT. - /// If a record was already set for \p SVT, the mapping is not - /// updated, unless \p Force == true - /// - /// \post if getRegBankForType(SVT)\@pre == nullptr then - /// getRegBankForType(SVT) == &RegBank - /// \post if Force == true then getRegBankForType(SVT) == &RegBank - void recordRegBankForType(const RegisterBank &RegBank, - MVT::SimpleValueType SVT, bool Force = false) { - if (!VTToRegBank) { - VTToRegBank.reset( - new const RegisterBank *[MVT::SimpleValueType::LAST_VALUETYPE]); - std::fill(&VTToRegBank[0], - &VTToRegBank[MVT::SimpleValueType::LAST_VALUETYPE], nullptr); - } - assert(SVT < MVT::SimpleValueType::LAST_VALUETYPE && "Out-of-bound access"); - // If we want to override the mapping or the mapping does not exits yet, - // set the register bank for SVT. - if (Force || !getRegBankForType(SVT)) - VTToRegBank.get()[SVT] = &RegBank; - } - - /// Try to get the mapping of \p MI. - /// See getInstrMapping for more details on what a mapping represents. - /// - /// Unlike getInstrMapping the returned InstructionMapping may be invalid - /// (isValid() == false). - /// This means that the target independent code is not smart enough - /// to get the mapping of \p MI and thus, the target has to provide the - /// information for \p MI. - /// - /// This implementation is able to get the mapping of: - /// - Target specific instructions by looking at the encoding constraints. - /// - Any instruction if all the register operands are already been assigned - /// a register, a register class, or a register bank. - /// - Copies and phis if at least one of the operand has been assigned a - /// register, a register class, or a register bank. - /// In other words, this method will likely fail to find a mapping for - /// any generic opcode that has not been lowered by target specific code. - InstructionMapping getInstrMappingImpl(const MachineInstr &MI) const; - - /// Get the register bank for the \p OpIdx-th operand of \p MI form - /// the encoding constraints, if any. - /// - /// \return A register bank that covers the register class of the - /// related encoding constraints or nullptr if \p MI did not provide - /// enough information to deduce it. - const RegisterBank * - getRegBankFromConstraints(const MachineInstr &MI, unsigned OpIdx, - const TargetInstrInfo &TII, - const TargetRegisterInfo &TRI) const; - - /// Helper method to apply something that is like the default mapping. - /// Basically, that means that \p OpdMapper.getMI() is left untouched - /// aside from the reassignment of the register operand that have been - /// remapped. - /// If the mapping of one of the operand spans several registers, this - /// method will abort as this is not like a default mapping anymore. - /// - /// \pre For OpIdx in {0..\p OpdMapper.getMI().getNumOperands()) - /// the range OpdMapper.getVRegs(OpIdx) is empty or of size 1. - static void applyDefaultMapping(const OperandsMapper &OpdMapper); - - /// See ::applyMapping. - virtual void applyMappingImpl(const OperandsMapper &OpdMapper) const { - llvm_unreachable("The target has to implement that part"); - } - -public: - virtual ~RegisterBankInfo() {} - - /// Get the register bank identified by \p ID. - const RegisterBank &getRegBank(unsigned ID) const { - return const_cast(this)->getRegBank(ID); - } - - /// Get the register bank of \p Reg. - /// If Reg has not been assigned a register, a register class, - /// or a register bank, then this returns nullptr. - /// - /// \pre Reg != 0 (NoRegister) - const RegisterBank *getRegBank(unsigned Reg, const MachineRegisterInfo &MRI, - const TargetRegisterInfo &TRI) const; - - /// Get the total number of register banks. - unsigned getNumRegBanks() const { return NumRegBanks; } - - /// Get a register bank that covers \p RC. - /// - /// \pre \p RC is a user-defined register class (as opposed as one - /// generated by TableGen). - /// - /// \note The mapping RC -> RegBank could be built while adding the - /// coverage for the register banks. However, we do not do it, because, - /// at least for now, we only need this information for register classes - /// that are used in the description of instruction. In other words, - /// there are just a handful of them and we do not want to waste space. - /// - /// \todo This should be TableGen'ed. - virtual const RegisterBank & - getRegBankFromRegClass(const TargetRegisterClass &RC) const { - llvm_unreachable("The target must override this method"); - } - - /// Get the cost of a copy from \p B to \p A, or put differently, - /// get the cost of A = COPY B. Since register banks may cover - /// different size, \p Size specifies what will be the size in bits - /// that will be copied around. - /// - /// \note Since this is a copy, both registers have the same size. - virtual unsigned copyCost(const RegisterBank &A, const RegisterBank &B, - unsigned Size) const { - // Optimistically assume that copies are coalesced. I.e., when - // they are on the same bank, they are free. - // Otherwise assume a non-zero cost of 1. The targets are supposed - // to override that properly anyway if they care. - return &A != &B; - } - - /// Identifier used when the related instruction mapping instance - /// is generated by target independent code. - /// Make sure not to use that identifier to avoid possible collision. - static const unsigned DefaultMappingID; - - /// Identifier used when the related instruction mapping instance - /// is generated by the default constructor. - /// Make sure not to use that identifier. - static const unsigned InvalidMappingID; - - /// Get the mapping of the different operands of \p MI - /// on the register bank. - /// This mapping should be the direct translation of \p MI. - /// In other words, when \p MI is mapped with the returned mapping, - /// only the register banks of the operands of \p MI need to be updated. - /// In particular, neither the opcode or the type of \p MI needs to be - /// updated for this direct mapping. - /// - /// The target independent implementation gives a mapping based on - /// the register classes for the target specific opcode. - /// It uses the ID RegisterBankInfo::DefaultMappingID for that mapping. - /// Make sure you do not use that ID for the alternative mapping - /// for MI. See getInstrAlternativeMappings for the alternative - /// mappings. - /// - /// For instance, if \p MI is a vector add, the mapping should - /// not be a scalarization of the add. - /// - /// \post returnedVal.verify(MI). - /// - /// \note If returnedVal does not verify MI, this would probably mean - /// that the target does not support that instruction. - virtual InstructionMapping getInstrMapping(const MachineInstr &MI) const; - - /// Get the alternative mappings for \p MI. - /// Alternative in the sense different from getInstrMapping. - virtual InstructionMappings - getInstrAlternativeMappings(const MachineInstr &MI) const; - - /// Get the possible mapping for \p MI. - /// A mapping defines where the different operands may live and at what cost. - /// For instance, let us consider: - /// v0(16) = G_ADD <2 x i8> v1, v2 - /// The possible mapping could be: - /// - /// {/*ID*/VectorAdd, /*Cost*/1, /*v0*/{(0xFFFF, VPR)}, /*v1*/{(0xFFFF, VPR)}, - /// /*v2*/{(0xFFFF, VPR)}} - /// {/*ID*/ScalarAddx2, /*Cost*/2, /*v0*/{(0x00FF, GPR),(0xFF00, GPR)}, - /// /*v1*/{(0x00FF, GPR),(0xFF00, GPR)}, - /// /*v2*/{(0x00FF, GPR),(0xFF00, GPR)}} - /// - /// \note The first alternative of the returned mapping should be the - /// direct translation of \p MI current form. - /// - /// \post !returnedVal.empty(). - InstructionMappings getInstrPossibleMappings(const MachineInstr &MI) const; - - /// Apply \p OpdMapper.getInstrMapping() to \p OpdMapper.getMI(). - /// After this call \p OpdMapper.getMI() may not be valid anymore. - /// \p OpdMapper.getInstrMapping().getID() carries the information of - /// what has been chosen to map \p OpdMapper.getMI(). This ID is set - /// by the various getInstrXXXMapping method. - /// - /// Therefore, getting the mapping and applying it should be kept in - /// sync. - void applyMapping(const OperandsMapper &OpdMapper) const { - // The only mapping we know how to handle is the default mapping. - if (OpdMapper.getInstrMapping().getID() == DefaultMappingID) - return applyDefaultMapping(OpdMapper); - // For other mapping, the target needs to do the right thing. - // If that means calling applyDefaultMapping, fine, but this - // must be explicitly stated. - applyMappingImpl(OpdMapper); - } - - /// Get the size in bits of \p Reg. - /// Utility method to get the size of any registers. Unlike - /// MachineRegisterInfo::getSize, the register does not need to be a - /// virtual register. - /// - /// \pre \p Reg != 0 (NoRegister). - static unsigned getSizeInBits(unsigned Reg, const MachineRegisterInfo &MRI, - const TargetRegisterInfo &TRI); - - /// Check that information hold by this instance make sense for the - /// given \p TRI. - /// - /// \note This method does not check anything when assertions are disabled. - /// - /// \return True is the check was successful. - bool verify(const TargetRegisterInfo &TRI) const; -}; - -inline raw_ostream & -operator<<(raw_ostream &OS, - const RegisterBankInfo::PartialMapping &PartMapping) { - PartMapping.print(OS); - return OS; -} - -inline raw_ostream & -operator<<(raw_ostream &OS, const RegisterBankInfo::ValueMapping &ValMapping) { - ValMapping.print(OS); - return OS; -} - -inline raw_ostream & -operator<<(raw_ostream &OS, - const RegisterBankInfo::InstructionMapping &InstrMapping) { - InstrMapping.print(OS); - return OS; -} - -inline raw_ostream & -operator<<(raw_ostream &OS, const RegisterBankInfo::OperandsMapper &OpdMapper) { - OpdMapper.print(OS, /*ForDebug*/ false); - return OS; -} -} // End namespace llvm. - -#endif diff --git a/llvm/include/llvm/CodeGen/GlobalISel/Types.h b/llvm/include/llvm/CodeGen/GlobalISel/Types.h deleted file mode 100644 index 7d974878..00000000 --- a/llvm/include/llvm/CodeGen/GlobalISel/Types.h +++ /dev/null @@ -1,32 +0,0 @@ -//===-- llvm/CodeGen/GlobalISel/Types.h - Types used by GISel ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// This file describes high level types that are used by several passes or -/// APIs involved in the GlobalISel pipeline. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_GLOBALISEL_TYPES_H -#define LLVM_CODEGEN_GLOBALISEL_TYPES_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/IR/Value.h" - -namespace llvm { - -/// Map a value to a virtual register. -/// For now, we chose to map aggregate types to on single virtual -/// register. This might be revisited if it turns out to be inefficient. -/// PR26161 tracks that. -/// Note: We need to expose this type to the target hooks for thing like -/// ABI lowering that would be used during IRTranslation. -typedef DenseMap ValueToVReg; - -} // End namespace llvm. -#endif diff --git a/llvm/include/llvm/CodeGen/ISDOpcodes.h b/llvm/include/llvm/CodeGen/ISDOpcodes.h deleted file mode 100644 index 89cb7a86..00000000 --- a/llvm/include/llvm/CodeGen/ISDOpcodes.h +++ /dev/null @@ -1,944 +0,0 @@ -//===-- llvm/CodeGen/ISDOpcodes.h - CodeGen opcodes -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares codegen opcodes and related utilities. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_ISDOPCODES_H -#define LLVM_CODEGEN_ISDOPCODES_H - -namespace llvm { - -/// ISD namespace - This namespace contains an enum which represents all of the -/// SelectionDAG node types and value types. -/// -namespace ISD { - - //===--------------------------------------------------------------------===// - /// ISD::NodeType enum - This enum defines the target-independent operators - /// for a SelectionDAG. - /// - /// Targets may also define target-dependent operator codes for SDNodes. For - /// example, on x86, these are the enum values in the X86ISD namespace. - /// Targets should aim to use target-independent operators to model their - /// instruction sets as much as possible, and only use target-dependent - /// operators when they have special requirements. - /// - /// Finally, during and after selection proper, SNodes may use special - /// operator codes that correspond directly with MachineInstr opcodes. These - /// are used to represent selected instructions. See the isMachineOpcode() - /// and getMachineOpcode() member functions of SDNode. - /// - enum NodeType { - /// DELETED_NODE - This is an illegal value that is used to catch - /// errors. This opcode is not a legal opcode for any node. - DELETED_NODE, - - /// EntryToken - This is the marker used to indicate the start of a region. - EntryToken, - - /// TokenFactor - This node takes multiple tokens as input and produces a - /// single token result. This is used to represent the fact that the operand - /// operators are independent of each other. - TokenFactor, - - /// AssertSext, AssertZext - These nodes record if a register contains a - /// value that has already been zero or sign extended from a narrower type. - /// These nodes take two operands. The first is the node that has already - /// been extended, and the second is a value type node indicating the width - /// of the extension - AssertSext, AssertZext, - - /// Various leaf nodes. - BasicBlock, VALUETYPE, CONDCODE, Register, RegisterMask, - Constant, ConstantFP, - GlobalAddress, GlobalTLSAddress, FrameIndex, - JumpTable, ConstantPool, ExternalSymbol, BlockAddress, - - /// The address of the GOT - GLOBAL_OFFSET_TABLE, - - /// FRAMEADDR, RETURNADDR - These nodes represent llvm.frameaddress and - /// llvm.returnaddress on the DAG. These nodes take one operand, the index - /// of the frame or return address to return. An index of zero corresponds - /// to the current function's frame or return address, an index of one to - /// the parent's frame or return address, and so on. - FRAMEADDR, RETURNADDR, - - /// LOCAL_RECOVER - Represents the llvm.localrecover intrinsic. - /// Materializes the offset from the local object pointer of another - /// function to a particular local object passed to llvm.localescape. The - /// operand is the MCSymbol label used to represent this offset, since - /// typically the offset is not known until after code generation of the - /// parent. - LOCAL_RECOVER, - - /// READ_REGISTER, WRITE_REGISTER - This node represents llvm.register on - /// the DAG, which implements the named register global variables extension. - READ_REGISTER, - WRITE_REGISTER, - - /// FRAME_TO_ARGS_OFFSET - This node represents offset from frame pointer to - /// first (possible) on-stack argument. This is needed for correct stack - /// adjustment during unwind. - FRAME_TO_ARGS_OFFSET, - - /// OUTCHAIN = EH_RETURN(INCHAIN, OFFSET, HANDLER) - This node represents - /// 'eh_return' gcc dwarf builtin, which is used to return from - /// exception. The general meaning is: adjust stack by OFFSET and pass - /// execution to HANDLER. Many platform-related details also :) - EH_RETURN, - - /// RESULT, OUTCHAIN = EH_SJLJ_SETJMP(INCHAIN, buffer) - /// This corresponds to the eh.sjlj.setjmp intrinsic. - /// It takes an input chain and a pointer to the jump buffer as inputs - /// and returns an outchain. - EH_SJLJ_SETJMP, - - /// OUTCHAIN = EH_SJLJ_LONGJMP(INCHAIN, buffer) - /// This corresponds to the eh.sjlj.longjmp intrinsic. - /// It takes an input chain and a pointer to the jump buffer as inputs - /// and returns an outchain. - EH_SJLJ_LONGJMP, - - /// OUTCHAIN = EH_SJLJ_SETUP_DISPATCH(INCHAIN) - /// The target initializes the dispatch table here. - EH_SJLJ_SETUP_DISPATCH, - - /// TargetConstant* - Like Constant*, but the DAG does not do any folding, - /// simplification, or lowering of the constant. They are used for constants - /// which are known to fit in the immediate fields of their users, or for - /// carrying magic numbers which are not values which need to be - /// materialized in registers. - TargetConstant, - TargetConstantFP, - - /// TargetGlobalAddress - Like GlobalAddress, but the DAG does no folding or - /// anything else with this node, and this is valid in the target-specific - /// dag, turning into a GlobalAddress operand. - TargetGlobalAddress, - TargetGlobalTLSAddress, - TargetFrameIndex, - TargetJumpTable, - TargetConstantPool, - TargetExternalSymbol, - TargetBlockAddress, - - MCSymbol, - - /// TargetIndex - Like a constant pool entry, but with completely - /// target-dependent semantics. Holds target flags, a 32-bit index, and a - /// 64-bit index. Targets can use this however they like. - TargetIndex, - - /// RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...) - /// This node represents a target intrinsic function with no side effects. - /// The first operand is the ID number of the intrinsic from the - /// llvm::Intrinsic namespace. The operands to the intrinsic follow. The - /// node returns the result of the intrinsic. - INTRINSIC_WO_CHAIN, - - /// RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...) - /// This node represents a target intrinsic function with side effects that - /// returns a result. The first operand is a chain pointer. The second is - /// the ID number of the intrinsic from the llvm::Intrinsic namespace. The - /// operands to the intrinsic follow. The node has two results, the result - /// of the intrinsic and an output chain. - INTRINSIC_W_CHAIN, - - /// OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...) - /// This node represents a target intrinsic function with side effects that - /// does not return a result. The first operand is a chain pointer. The - /// second is the ID number of the intrinsic from the llvm::Intrinsic - /// namespace. The operands to the intrinsic follow. - INTRINSIC_VOID, - - /// CopyToReg - This node has three operands: a chain, a register number to - /// set to this value, and a value. - CopyToReg, - - /// CopyFromReg - This node indicates that the input value is a virtual or - /// physical register that is defined outside of the scope of this - /// SelectionDAG. The register is available from the RegisterSDNode object. - CopyFromReg, - - /// UNDEF - An undefined node. - UNDEF, - - /// EXTRACT_ELEMENT - This is used to get the lower or upper (determined by - /// a Constant, which is required to be operand #1) half of the integer or - /// float value specified as operand #0. This is only for use before - /// legalization, for values that will be broken into multiple registers. - EXTRACT_ELEMENT, - - /// BUILD_PAIR - This is the opposite of EXTRACT_ELEMENT in some ways. - /// Given two values of the same integer value type, this produces a value - /// twice as big. Like EXTRACT_ELEMENT, this can only be used before - /// legalization. - BUILD_PAIR, - - /// MERGE_VALUES - This node takes multiple discrete operands and returns - /// them all as its individual results. This nodes has exactly the same - /// number of inputs and outputs. This node is useful for some pieces of the - /// code generator that want to think about a single node with multiple - /// results, not multiple nodes. - MERGE_VALUES, - - /// Simple integer binary arithmetic operators. - ADD, SUB, MUL, SDIV, UDIV, SREM, UREM, - - /// SMUL_LOHI/UMUL_LOHI - Multiply two integers of type iN, producing - /// a signed/unsigned value of type i[2*N], and return the full value as - /// two results, each of type iN. - SMUL_LOHI, UMUL_LOHI, - - /// SDIVREM/UDIVREM - Divide two integers and produce both a quotient and - /// remainder result. - SDIVREM, UDIVREM, - - /// CARRY_FALSE - This node is used when folding other nodes, - /// like ADDC/SUBC, which indicate the carry result is always false. - CARRY_FALSE, - - /// Carry-setting nodes for multiple precision addition and subtraction. - /// These nodes take two operands of the same value type, and produce two - /// results. The first result is the normal add or sub result, the second - /// result is the carry flag result. - ADDC, SUBC, - - /// Carry-using nodes for multiple precision addition and subtraction. These - /// nodes take three operands: The first two are the normal lhs and rhs to - /// the add or sub, and the third is the input carry flag. These nodes - /// produce two results; the normal result of the add or sub, and the output - /// carry flag. These nodes both read and write a carry flag to allow them - /// to them to be chained together for add and sub of arbitrarily large - /// values. - ADDE, SUBE, - - /// RESULT, BOOL = [SU]ADDO(LHS, RHS) - Overflow-aware nodes for addition. - /// These nodes take two operands: the normal LHS and RHS to the add. They - /// produce two results: the normal result of the add, and a boolean that - /// indicates if an overflow occurred (*not* a flag, because it may be store - /// to memory, etc.). If the type of the boolean is not i1 then the high - /// bits conform to getBooleanContents. - /// These nodes are generated from llvm.[su]add.with.overflow intrinsics. - SADDO, UADDO, - - /// Same for subtraction. - SSUBO, USUBO, - - /// Same for multiplication. - SMULO, UMULO, - - /// Simple binary floating point operators. - FADD, FSUB, FMUL, FDIV, FREM, - - /// FMA - Perform a * b + c with no intermediate rounding step. - FMA, - - /// FMAD - Perform a * b + c, while getting the same result as the - /// separately rounded operations. - FMAD, - - /// FCOPYSIGN(X, Y) - Return the value of X with the sign of Y. NOTE: This - /// DAG node does not require that X and Y have the same type, just that - /// they are both floating point. X and the result must have the same type. - /// FCOPYSIGN(f32, f64) is allowed. - FCOPYSIGN, - - /// INT = FGETSIGN(FP) - Return the sign bit of the specified floating point - /// value as an integer 0/1 value. - FGETSIGN, - - /// Returns platform specific canonical encoding of a floating point number. - FCANONICALIZE, - - /// BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a vector with the - /// specified, possibly variable, elements. The number of elements is - /// required to be a power of two. The types of the operands must all be - /// the same and must match the vector element type, except that integer - /// types are allowed to be larger than the element type, in which case - /// the operands are implicitly truncated. - BUILD_VECTOR, - - /// INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element - /// at IDX replaced with VAL. If the type of VAL is larger than the vector - /// element type then VAL is truncated before replacement. - INSERT_VECTOR_ELT, - - /// EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR - /// identified by the (potentially variable) element number IDX. If the - /// return type is an integer type larger than the element type of the - /// vector, the result is extended to the width of the return type. - EXTRACT_VECTOR_ELT, - - /// CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of - /// vector type with the same length and element type, this produces a - /// concatenated vector result value, with length equal to the sum of the - /// lengths of the input vectors. - CONCAT_VECTORS, - - /// INSERT_SUBVECTOR(VECTOR1, VECTOR2, IDX) - Returns a vector - /// with VECTOR2 inserted into VECTOR1 at the (potentially - /// variable) element number IDX, which must be a multiple of the - /// VECTOR2 vector length. The elements of VECTOR1 starting at - /// IDX are overwritten with VECTOR2. Elements IDX through - /// vector_length(VECTOR2) must be valid VECTOR1 indices. - INSERT_SUBVECTOR, - - /// EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an - /// vector value) starting with the element number IDX, which must be a - /// constant multiple of the result vector length. - EXTRACT_SUBVECTOR, - - /// VECTOR_SHUFFLE(VEC1, VEC2) - Returns a vector, of the same type as - /// VEC1/VEC2. A VECTOR_SHUFFLE node also contains an array of constant int - /// values that indicate which value (or undef) each result element will - /// get. These constant ints are accessible through the - /// ShuffleVectorSDNode class. This is quite similar to the Altivec - /// 'vperm' instruction, except that the indices must be constants and are - /// in terms of the element size of VEC1/VEC2, not in terms of bytes. - VECTOR_SHUFFLE, - - /// SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a - /// scalar value into element 0 of the resultant vector type. The top - /// elements 1 to N-1 of the N-element vector are undefined. The type - /// of the operand must match the vector element type, except when they - /// are integer types. In this case the operand is allowed to be wider - /// than the vector element type, and is implicitly truncated to it. - SCALAR_TO_VECTOR, - - /// MULHU/MULHS - Multiply high - Multiply two integers of type iN, - /// producing an unsigned/signed value of type i[2*N], then return the top - /// part. - MULHU, MULHS, - - /// [US]{MIN/MAX} - Binary minimum or maximum or signed or unsigned - /// integers. - SMIN, SMAX, UMIN, UMAX, - - /// Bitwise operators - logical and, logical or, logical xor. - AND, OR, XOR, - - /// Shift and rotation operations. After legalization, the type of the - /// shift amount is known to be TLI.getShiftAmountTy(). Before legalization - /// the shift amount can be any type, but care must be taken to ensure it is - /// large enough. TLI.getShiftAmountTy() is i8 on some targets, but before - /// legalization, types like i1024 can occur and i8 doesn't have enough bits - /// to represent the shift amount. - /// When the 1st operand is a vector, the shift amount must be in the same - /// type. (TLI.getShiftAmountTy() will return the same type when the input - /// type is a vector.) - SHL, SRA, SRL, ROTL, ROTR, - - /// Byte Swap and Counting operators. - BSWAP, CTTZ, CTLZ, CTPOP, BITREVERSE, - - /// Bit counting operators with an undefined result for zero inputs. - CTTZ_ZERO_UNDEF, CTLZ_ZERO_UNDEF, - - /// Select(COND, TRUEVAL, FALSEVAL). If the type of the boolean COND is not - /// i1 then the high bits must conform to getBooleanContents. - SELECT, - - /// Select with a vector condition (op #0) and two vector operands (ops #1 - /// and #2), returning a vector result. All vectors have the same length. - /// Much like the scalar select and setcc, each bit in the condition selects - /// whether the corresponding result element is taken from op #1 or op #2. - /// At first, the VSELECT condition is of vXi1 type. Later, targets may - /// change the condition type in order to match the VSELECT node using a - /// pattern. The condition follows the BooleanContent format of the target. - VSELECT, - - /// Select with condition operator - This selects between a true value and - /// a false value (ops #2 and #3) based on the boolean result of comparing - /// the lhs and rhs (ops #0 and #1) of a conditional expression with the - /// condition code in op #4, a CondCodeSDNode. - SELECT_CC, - - /// SetCC operator - This evaluates to a true value iff the condition is - /// true. If the result value type is not i1 then the high bits conform - /// to getBooleanContents. The operands to this are the left and right - /// operands to compare (ops #0, and #1) and the condition code to compare - /// them with (op #2) as a CondCodeSDNode. If the operands are vector types - /// then the result type must also be a vector type. - SETCC, - - /// Like SetCC, ops #0 and #1 are the LHS and RHS operands to compare, but - /// op #2 is a *carry value*. This operator checks the result of - /// "LHS - RHS - Carry", and can be used to compare two wide integers: - /// (setcce lhshi rhshi (subc lhslo rhslo) cc). Only valid for integers. - SETCCE, - - /// SHL_PARTS/SRA_PARTS/SRL_PARTS - These operators are used for expanded - /// integer shift operations. The operation ordering is: - /// [Lo,Hi] = op [LoLHS,HiLHS], Amt - SHL_PARTS, SRA_PARTS, SRL_PARTS, - - /// Conversion operators. These are all single input single output - /// operations. For all of these, the result type must be strictly - /// wider or narrower (depending on the operation) than the source - /// type. - - /// SIGN_EXTEND - Used for integer types, replicating the sign bit - /// into new bits. - SIGN_EXTEND, - - /// ZERO_EXTEND - Used for integer types, zeroing the new bits. - ZERO_EXTEND, - - /// ANY_EXTEND - Used for integer types. The high bits are undefined. - ANY_EXTEND, - - /// TRUNCATE - Completely drop the high bits. - TRUNCATE, - - /// [SU]INT_TO_FP - These operators convert integers (whose interpreted sign - /// depends on the first letter) to floating point. - SINT_TO_FP, - UINT_TO_FP, - - /// SIGN_EXTEND_INREG - This operator atomically performs a SHL/SRA pair to - /// sign extend a small value in a large integer register (e.g. sign - /// extending the low 8 bits of a 32-bit register to fill the top 24 bits - /// with the 7th bit). The size of the smaller type is indicated by the 1th - /// operand, a ValueType node. - SIGN_EXTEND_INREG, - - /// ANY_EXTEND_VECTOR_INREG(Vector) - This operator represents an - /// in-register any-extension of the low lanes of an integer vector. The - /// result type must have fewer elements than the operand type, and those - /// elements must be larger integer types such that the total size of the - /// operand type and the result type match. Each of the low operand - /// elements is any-extended into the corresponding, wider result - /// elements with the high bits becoming undef. - ANY_EXTEND_VECTOR_INREG, - - /// SIGN_EXTEND_VECTOR_INREG(Vector) - This operator represents an - /// in-register sign-extension of the low lanes of an integer vector. The - /// result type must have fewer elements than the operand type, and those - /// elements must be larger integer types such that the total size of the - /// operand type and the result type match. Each of the low operand - /// elements is sign-extended into the corresponding, wider result - /// elements. - // FIXME: The SIGN_EXTEND_INREG node isn't specifically limited to - // scalars, but it also doesn't handle vectors well. Either it should be - // restricted to scalars or this node (and its handling) should be merged - // into it. - SIGN_EXTEND_VECTOR_INREG, - - /// ZERO_EXTEND_VECTOR_INREG(Vector) - This operator represents an - /// in-register zero-extension of the low lanes of an integer vector. The - /// result type must have fewer elements than the operand type, and those - /// elements must be larger integer types such that the total size of the - /// operand type and the result type match. Each of the low operand - /// elements is zero-extended into the corresponding, wider result - /// elements. - ZERO_EXTEND_VECTOR_INREG, - - /// FP_TO_[US]INT - Convert a floating point value to a signed or unsigned - /// integer. - FP_TO_SINT, - FP_TO_UINT, - - /// X = FP_ROUND(Y, TRUNC) - Rounding 'Y' from a larger floating point type - /// down to the precision of the destination VT. TRUNC is a flag, which is - /// always an integer that is zero or one. If TRUNC is 0, this is a - /// normal rounding, if it is 1, this FP_ROUND is known to not change the - /// value of Y. - /// - /// The TRUNC = 1 case is used in cases where we know that the value will - /// not be modified by the node, because Y is not using any of the extra - /// precision of source type. This allows certain transformations like - /// FP_EXTEND(FP_ROUND(X,1)) -> X which are not safe for - /// FP_EXTEND(FP_ROUND(X,0)) because the extra bits aren't removed. - FP_ROUND, - - /// FLT_ROUNDS_ - Returns current rounding mode: - /// -1 Undefined - /// 0 Round to 0 - /// 1 Round to nearest - /// 2 Round to +inf - /// 3 Round to -inf - FLT_ROUNDS_, - - /// X = FP_ROUND_INREG(Y, VT) - This operator takes an FP register, and - /// rounds it to a floating point value. It then promotes it and returns it - /// in a register of the same size. This operation effectively just - /// discards excess precision. The type to round down to is specified by - /// the VT operand, a VTSDNode. - FP_ROUND_INREG, - - /// X = FP_EXTEND(Y) - Extend a smaller FP type into a larger FP type. - FP_EXTEND, - - /// BITCAST - This operator converts between integer, vector and FP - /// values, as if the value was stored to memory with one type and loaded - /// from the same address with the other type (or equivalently for vector - /// format conversions, etc). The source and result are required to have - /// the same bit size (e.g. f32 <-> i32). This can also be used for - /// int-to-int or fp-to-fp conversions, but that is a noop, deleted by - /// getNode(). - /// - /// This operator is subtly different from the bitcast instruction from - /// LLVM-IR since this node may change the bits in the register. For - /// example, this occurs on big-endian NEON and big-endian MSA where the - /// layout of the bits in the register depends on the vector type and this - /// operator acts as a shuffle operation for some vector type combinations. - BITCAST, - - /// ADDRSPACECAST - This operator converts between pointers of different - /// address spaces. - ADDRSPACECAST, - - /// CONVERT_RNDSAT - This operator is used to support various conversions - /// between various types (float, signed, unsigned and vectors of those - /// types) with rounding and saturation. NOTE: Avoid using this operator as - /// most target don't support it and the operator might be removed in the - /// future. It takes the following arguments: - /// 0) value - /// 1) dest type (type to convert to) - /// 2) src type (type to convert from) - /// 3) rounding imm - /// 4) saturation imm - /// 5) ISD::CvtCode indicating the type of conversion to do - CONVERT_RNDSAT, - - /// FP16_TO_FP, FP_TO_FP16 - These operators are used to perform promotions - /// and truncation for half-precision (16 bit) floating numbers. These nodes - /// form a semi-softened interface for dealing with f16 (as an i16), which - /// is often a storage-only type but has native conversions. - FP16_TO_FP, FP_TO_FP16, - - /// FNEG, FABS, FSQRT, FSIN, FCOS, FPOWI, FPOW, - /// FLOG, FLOG2, FLOG10, FEXP, FEXP2, - /// FCEIL, FTRUNC, FRINT, FNEARBYINT, FROUND, FFLOOR - Perform various unary - /// floating point operations. These are inspired by libm. - FNEG, FABS, FSQRT, FSIN, FCOS, FPOWI, FPOW, - FLOG, FLOG2, FLOG10, FEXP, FEXP2, - FCEIL, FTRUNC, FRINT, FNEARBYINT, FROUND, FFLOOR, - /// FMINNUM/FMAXNUM - Perform floating-point minimum or maximum on two - /// values. - /// In the case where a single input is NaN, the non-NaN input is returned. - /// - /// The return value of (FMINNUM 0.0, -0.0) could be either 0.0 or -0.0. - FMINNUM, FMAXNUM, - /// FMINNAN/FMAXNAN - Behave identically to FMINNUM/FMAXNUM, except that - /// when a single input is NaN, NaN is returned. - FMINNAN, FMAXNAN, - - /// FSINCOS - Compute both fsin and fcos as a single operation. - FSINCOS, - - /// LOAD and STORE have token chains as their first operand, then the same - /// operands as an LLVM load/store instruction, then an offset node that - /// is added / subtracted from the base pointer to form the address (for - /// indexed memory ops). - LOAD, STORE, - - /// DYNAMIC_STACKALLOC - Allocate some number of bytes on the stack aligned - /// to a specified boundary. This node always has two return values: a new - /// stack pointer value and a chain. The first operand is the token chain, - /// the second is the number of bytes to allocate, and the third is the - /// alignment boundary. The size is guaranteed to be a multiple of the - /// stack alignment, and the alignment is guaranteed to be bigger than the - /// stack alignment (if required) or 0 to get standard stack alignment. - DYNAMIC_STACKALLOC, - - /// Control flow instructions. These all have token chains. - - /// BR - Unconditional branch. The first operand is the chain - /// operand, the second is the MBB to branch to. - BR, - - /// BRIND - Indirect branch. The first operand is the chain, the second - /// is the value to branch to, which must be of the same type as the - /// target's pointer type. - BRIND, - - /// BR_JT - Jumptable branch. The first operand is the chain, the second - /// is the jumptable index, the last one is the jumptable entry index. - BR_JT, - - /// BRCOND - Conditional branch. The first operand is the chain, the - /// second is the condition, the third is the block to branch to if the - /// condition is true. If the type of the condition is not i1, then the - /// high bits must conform to getBooleanContents. - BRCOND, - - /// BR_CC - Conditional branch. The behavior is like that of SELECT_CC, in - /// that the condition is represented as condition code, and two nodes to - /// compare, rather than as a combined SetCC node. The operands in order - /// are chain, cc, lhs, rhs, block to branch to if condition is true. - BR_CC, - - /// INLINEASM - Represents an inline asm block. This node always has two - /// return values: a chain and a flag result. The inputs are as follows: - /// Operand #0 : Input chain. - /// Operand #1 : a ExternalSymbolSDNode with a pointer to the asm string. - /// Operand #2 : a MDNodeSDNode with the !srcloc metadata. - /// Operand #3 : HasSideEffect, IsAlignStack bits. - /// After this, it is followed by a list of operands with this format: - /// ConstantSDNode: Flags that encode whether it is a mem or not, the - /// of operands that follow, etc. See InlineAsm.h. - /// ... however many operands ... - /// Operand #last: Optional, an incoming flag. - /// - /// The variable width operands are required to represent target addressing - /// modes as a single "operand", even though they may have multiple - /// SDOperands. - INLINEASM, - - /// EH_LABEL - Represents a label in mid basic block used to track - /// locations needed for debug and exception handling tables. These nodes - /// take a chain as input and return a chain. - EH_LABEL, - - /// CATCHPAD - Represents a catchpad instruction. - CATCHPAD, - - /// CATCHRET - Represents a return from a catch block funclet. Used for - /// MSVC compatible exception handling. Takes a chain operand and a - /// destination basic block operand. - CATCHRET, - - /// CLEANUPRET - Represents a return from a cleanup block funclet. Used for - /// MSVC compatible exception handling. Takes only a chain operand. - CLEANUPRET, - - /// STACKSAVE - STACKSAVE has one operand, an input chain. It produces a - /// value, the same type as the pointer type for the system, and an output - /// chain. - STACKSAVE, - - /// STACKRESTORE has two operands, an input chain and a pointer to restore - /// to it returns an output chain. - STACKRESTORE, - - /// CALLSEQ_START/CALLSEQ_END - These operators mark the beginning and end - /// of a call sequence, and carry arbitrary information that target might - /// want to know. The first operand is a chain, the rest are specified by - /// the target and not touched by the DAG optimizers. - /// CALLSEQ_START..CALLSEQ_END pairs may not be nested. - CALLSEQ_START, // Beginning of a call sequence - CALLSEQ_END, // End of a call sequence - - /// VAARG - VAARG has four operands: an input chain, a pointer, a SRCVALUE, - /// and the alignment. It returns a pair of values: the vaarg value and a - /// new chain. - VAARG, - - /// VACOPY - VACOPY has 5 operands: an input chain, a destination pointer, - /// a source pointer, a SRCVALUE for the destination, and a SRCVALUE for the - /// source. - VACOPY, - - /// VAEND, VASTART - VAEND and VASTART have three operands: an input chain, - /// pointer, and a SRCVALUE. - VAEND, VASTART, - - /// SRCVALUE - This is a node type that holds a Value* that is used to - /// make reference to a value in the LLVM IR. - SRCVALUE, - - /// MDNODE_SDNODE - This is a node that holdes an MDNode*, which is used to - /// reference metadata in the IR. - MDNODE_SDNODE, - - /// PCMARKER - This corresponds to the pcmarker intrinsic. - PCMARKER, - - /// READCYCLECOUNTER - This corresponds to the readcyclecounter intrinsic. - /// It produces a chain and one i64 value. The only operand is a chain. - /// If i64 is not legal, the result will be expanded into smaller values. - /// Still, it returns an i64, so targets should set legality for i64. - /// The result is the content of the architecture-specific cycle - /// counter-like register (or other high accuracy low latency clock source). - READCYCLECOUNTER, - - /// HANDLENODE node - Used as a handle for various purposes. - HANDLENODE, - - /// INIT_TRAMPOLINE - This corresponds to the init_trampoline intrinsic. It - /// takes as input a token chain, the pointer to the trampoline, the pointer - /// to the nested function, the pointer to pass for the 'nest' parameter, a - /// SRCVALUE for the trampoline and another for the nested function - /// (allowing targets to access the original Function*). - /// It produces a token chain as output. - INIT_TRAMPOLINE, - - /// ADJUST_TRAMPOLINE - This corresponds to the adjust_trampoline intrinsic. - /// It takes a pointer to the trampoline and produces a (possibly) new - /// pointer to the same trampoline with platform-specific adjustments - /// applied. The pointer it returns points to an executable block of code. - ADJUST_TRAMPOLINE, - - /// TRAP - Trapping instruction - TRAP, - - /// DEBUGTRAP - Trap intended to get the attention of a debugger. - DEBUGTRAP, - - /// PREFETCH - This corresponds to a prefetch intrinsic. The first operand - /// is the chain. The other operands are the address to prefetch, - /// read / write specifier, locality specifier and instruction / data cache - /// specifier. - PREFETCH, - - /// OUTCHAIN = ATOMIC_FENCE(INCHAIN, ordering, scope) - /// This corresponds to the fence instruction. It takes an input chain, and - /// two integer constants: an AtomicOrdering and a SynchronizationScope. - ATOMIC_FENCE, - - /// Val, OUTCHAIN = ATOMIC_LOAD(INCHAIN, ptr) - /// This corresponds to "load atomic" instruction. - ATOMIC_LOAD, - - /// OUTCHAIN = ATOMIC_STORE(INCHAIN, ptr, val) - /// This corresponds to "store atomic" instruction. - ATOMIC_STORE, - - /// Val, OUTCHAIN = ATOMIC_CMP_SWAP(INCHAIN, ptr, cmp, swap) - /// For double-word atomic operations: - /// ValLo, ValHi, OUTCHAIN = ATOMIC_CMP_SWAP(INCHAIN, ptr, cmpLo, cmpHi, - /// swapLo, swapHi) - /// This corresponds to the cmpxchg instruction. - ATOMIC_CMP_SWAP, - - /// Val, Success, OUTCHAIN - /// = ATOMIC_CMP_SWAP_WITH_SUCCESS(INCHAIN, ptr, cmp, swap) - /// N.b. this is still a strong cmpxchg operation, so - /// Success == "Val == cmp". - ATOMIC_CMP_SWAP_WITH_SUCCESS, - - /// Val, OUTCHAIN = ATOMIC_SWAP(INCHAIN, ptr, amt) - /// Val, OUTCHAIN = ATOMIC_LOAD_[OpName](INCHAIN, ptr, amt) - /// For double-word atomic operations: - /// ValLo, ValHi, OUTCHAIN = ATOMIC_SWAP(INCHAIN, ptr, amtLo, amtHi) - /// ValLo, ValHi, OUTCHAIN = ATOMIC_LOAD_[OpName](INCHAIN, ptr, amtLo, amtHi) - /// These correspond to the atomicrmw instruction. - ATOMIC_SWAP, - ATOMIC_LOAD_ADD, - ATOMIC_LOAD_SUB, - ATOMIC_LOAD_AND, - ATOMIC_LOAD_OR, - ATOMIC_LOAD_XOR, - ATOMIC_LOAD_NAND, - ATOMIC_LOAD_MIN, - ATOMIC_LOAD_MAX, - ATOMIC_LOAD_UMIN, - ATOMIC_LOAD_UMAX, - - // Masked load and store - consecutive vector load and store operations - // with additional mask operand that prevents memory accesses to the - // masked-off lanes. - MLOAD, MSTORE, - - // Masked gather and scatter - load and store operations for a vector of - // random addresses with additional mask operand that prevents memory - // accesses to the masked-off lanes. - MGATHER, MSCATTER, - - /// This corresponds to the llvm.lifetime.* intrinsics. The first operand - /// is the chain and the second operand is the alloca pointer. - LIFETIME_START, LIFETIME_END, - - /// GC_TRANSITION_START/GC_TRANSITION_END - These operators mark the - /// beginning and end of GC transition sequence, and carry arbitrary - /// information that target might need for lowering. The first operand is - /// a chain, the rest are specified by the target and not touched by the DAG - /// optimizers. GC_TRANSITION_START..GC_TRANSITION_END pairs may not be - /// nested. - GC_TRANSITION_START, - GC_TRANSITION_END, - - /// GET_DYNAMIC_AREA_OFFSET - get offset from native SP to the address of - /// the most recent dynamic alloca. For most targets that would be 0, but - /// for some others (e.g. PowerPC, PowerPC64) that would be compile-time - /// known nonzero constant. The only operand here is the chain. - GET_DYNAMIC_AREA_OFFSET, - - /// BUILTIN_OP_END - This must be the last enum value in this list. - /// The target-specific pre-isel opcode values start here. - BUILTIN_OP_END - }; - - /// FIRST_TARGET_MEMORY_OPCODE - Target-specific pre-isel operations - /// which do not reference a specific memory location should be less than - /// this value. Those that do must not be less than this value, and can - /// be used with SelectionDAG::getMemIntrinsicNode. - static const int FIRST_TARGET_MEMORY_OPCODE = BUILTIN_OP_END+300; - - //===--------------------------------------------------------------------===// - /// MemIndexedMode enum - This enum defines the load / store indexed - /// addressing modes. - /// - /// UNINDEXED "Normal" load / store. The effective address is already - /// computed and is available in the base pointer. The offset - /// operand is always undefined. In addition to producing a - /// chain, an unindexed load produces one value (result of the - /// load); an unindexed store does not produce a value. - /// - /// PRE_INC Similar to the unindexed mode where the effective address is - /// PRE_DEC the value of the base pointer add / subtract the offset. - /// It considers the computation as being folded into the load / - /// store operation (i.e. the load / store does the address - /// computation as well as performing the memory transaction). - /// The base operand is always undefined. In addition to - /// producing a chain, pre-indexed load produces two values - /// (result of the load and the result of the address - /// computation); a pre-indexed store produces one value (result - /// of the address computation). - /// - /// POST_INC The effective address is the value of the base pointer. The - /// POST_DEC value of the offset operand is then added to / subtracted - /// from the base after memory transaction. In addition to - /// producing a chain, post-indexed load produces two values - /// (the result of the load and the result of the base +/- offset - /// computation); a post-indexed store produces one value (the - /// the result of the base +/- offset computation). - enum MemIndexedMode { - UNINDEXED = 0, - PRE_INC, - PRE_DEC, - POST_INC, - POST_DEC, - LAST_INDEXED_MODE - }; - - //===--------------------------------------------------------------------===// - /// LoadExtType enum - This enum defines the three variants of LOADEXT - /// (load with extension). - /// - /// SEXTLOAD loads the integer operand and sign extends it to a larger - /// integer result type. - /// ZEXTLOAD loads the integer operand and zero extends it to a larger - /// integer result type. - /// EXTLOAD is used for two things: floating point extending loads and - /// integer extending loads [the top bits are undefined]. - enum LoadExtType { - NON_EXTLOAD = 0, - EXTLOAD, - SEXTLOAD, - ZEXTLOAD, - LAST_LOADEXT_TYPE - }; - - NodeType getExtForLoadExtType(bool IsFP, LoadExtType); - - //===--------------------------------------------------------------------===// - /// ISD::CondCode enum - These are ordered carefully to make the bitfields - /// below work out, when considering SETFALSE (something that never exists - /// dynamically) as 0. "U" -> Unsigned (for integer operands) or Unordered - /// (for floating point), "L" -> Less than, "G" -> Greater than, "E" -> Equal - /// to. If the "N" column is 1, the result of the comparison is undefined if - /// the input is a NAN. - /// - /// All of these (except for the 'always folded ops') should be handled for - /// floating point. For integer, only the SETEQ,SETNE,SETLT,SETLE,SETGT, - /// SETGE,SETULT,SETULE,SETUGT, and SETUGE opcodes are used. - /// - /// Note that these are laid out in a specific order to allow bit-twiddling - /// to transform conditions. - enum CondCode { - // Opcode N U L G E Intuitive operation - SETFALSE, // 0 0 0 0 Always false (always folded) - SETOEQ, // 0 0 0 1 True if ordered and equal - SETOGT, // 0 0 1 0 True if ordered and greater than - SETOGE, // 0 0 1 1 True if ordered and greater than or equal - SETOLT, // 0 1 0 0 True if ordered and less than - SETOLE, // 0 1 0 1 True if ordered and less than or equal - SETONE, // 0 1 1 0 True if ordered and operands are unequal - SETO, // 0 1 1 1 True if ordered (no nans) - SETUO, // 1 0 0 0 True if unordered: isnan(X) | isnan(Y) - SETUEQ, // 1 0 0 1 True if unordered or equal - SETUGT, // 1 0 1 0 True if unordered or greater than - SETUGE, // 1 0 1 1 True if unordered, greater than, or equal - SETULT, // 1 1 0 0 True if unordered or less than - SETULE, // 1 1 0 1 True if unordered, less than, or equal - SETUNE, // 1 1 1 0 True if unordered or not equal - SETTRUE, // 1 1 1 1 Always true (always folded) - // Don't care operations: undefined if the input is a nan. - SETFALSE2, // 1 X 0 0 0 Always false (always folded) - SETEQ, // 1 X 0 0 1 True if equal - SETGT, // 1 X 0 1 0 True if greater than - SETGE, // 1 X 0 1 1 True if greater than or equal - SETLT, // 1 X 1 0 0 True if less than - SETLE, // 1 X 1 0 1 True if less than or equal - SETNE, // 1 X 1 1 0 True if not equal - SETTRUE2, // 1 X 1 1 1 Always true (always folded) - - SETCC_INVALID // Marker value. - }; - - /// Return true if this is a setcc instruction that performs a signed - /// comparison when used with integer operands. - inline bool isSignedIntSetCC(CondCode Code) { - return Code == SETGT || Code == SETGE || Code == SETLT || Code == SETLE; - } - - /// Return true if this is a setcc instruction that performs an unsigned - /// comparison when used with integer operands. - inline bool isUnsignedIntSetCC(CondCode Code) { - return Code == SETUGT || Code == SETUGE || Code == SETULT || Code == SETULE; - } - - /// Return true if the specified condition returns true if the two operands to - /// the condition are equal. Note that if one of the two operands is a NaN, - /// this value is meaningless. - inline bool isTrueWhenEqual(CondCode Cond) { - return ((int)Cond & 1) != 0; - } - - /// This function returns 0 if the condition is always false if an operand is - /// a NaN, 1 if the condition is always true if the operand is a NaN, and 2 if - /// the condition is undefined if the operand is a NaN. - inline unsigned getUnorderedFlavor(CondCode Cond) { - return ((int)Cond >> 3) & 3; - } - - /// Return the operation corresponding to !(X op Y), where 'op' is a valid - /// SetCC operation. - CondCode getSetCCInverse(CondCode Operation, bool isInteger); - - /// Return the operation corresponding to (Y op X) when given the operation - /// for (X op Y). - CondCode getSetCCSwappedOperands(CondCode Operation); - - /// Return the result of a logical OR between different comparisons of - /// identical values: ((X op1 Y) | (X op2 Y)). This function returns - /// SETCC_INVALID if it is not possible to represent the resultant comparison. - CondCode getSetCCOrOperation(CondCode Op1, CondCode Op2, bool isInteger); - - /// Return the result of a logical AND between different comparisons of - /// identical values: ((X op1 Y) & (X op2 Y)). This function returns - /// SETCC_INVALID if it is not possible to represent the resultant comparison. - CondCode getSetCCAndOperation(CondCode Op1, CondCode Op2, bool isInteger); - - //===--------------------------------------------------------------------===// - /// This enum defines the various converts CONVERT_RNDSAT supports. - enum CvtCode { - CVT_FF, /// Float from Float - CVT_FS, /// Float from Signed - CVT_FU, /// Float from Unsigned - CVT_SF, /// Signed from Float - CVT_UF, /// Unsigned from Float - CVT_SS, /// Signed from Signed - CVT_SU, /// Signed from Unsigned - CVT_US, /// Unsigned from Signed - CVT_UU, /// Unsigned from Unsigned - CVT_INVALID /// Marker - Invalid opcode - }; - -} // end llvm::ISD namespace - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/IntrinsicLowering.h b/llvm/include/llvm/CodeGen/IntrinsicLowering.h deleted file mode 100644 index a404b9b7..00000000 --- a/llvm/include/llvm/CodeGen/IntrinsicLowering.h +++ /dev/null @@ -1,58 +0,0 @@ -//===-- IntrinsicLowering.h - Intrinsic Function Lowering -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the IntrinsicLowering interface. This interface allows -// addition of domain-specific or front-end specific intrinsics to LLVM without -// having to modify all of the C backend or interpreter. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_INTRINSICLOWERING_H -#define LLVM_CODEGEN_INTRINSICLOWERING_H - -#include "llvm/IR/Intrinsics.h" - -namespace llvm { -class CallInst; -class Module; -class DataLayout; - -class IntrinsicLowering { - const DataLayout &DL; - - bool Warned; - -public: - explicit IntrinsicLowering(const DataLayout &DL) : DL(DL), Warned(false) {} - - /// AddPrototypes - This method, if called, causes all of the prototypes - /// that might be needed by an intrinsic lowering implementation to be - /// inserted into the module specified. - void AddPrototypes(Module &M); - - /// LowerIntrinsicCall - This method replaces a call with the LLVM function - /// which should be used to implement the specified intrinsic function call. - /// If an intrinsic function must be implemented by the code generator - /// (such as va_start), this function should print a message and abort. - /// - /// Otherwise, if an intrinsic function call can be lowered, the code to - /// implement it (often a call to a non-intrinsic function) is inserted - /// _after_ the call instruction and the call is deleted. The caller must - /// be capable of handling this kind of change. - /// - void LowerIntrinsicCall(CallInst *CI); - - /// LowerToByteSwap - Replace a call instruction into a call to bswap - /// intrinsic. Return false if it has determined the call is not a - /// simple integer bswap. - static bool LowerToByteSwap(CallInst *CI); -}; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/LatencyPriorityQueue.h b/llvm/include/llvm/CodeGen/LatencyPriorityQueue.h deleted file mode 100644 index f347f66e..00000000 --- a/llvm/include/llvm/CodeGen/LatencyPriorityQueue.h +++ /dev/null @@ -1,98 +0,0 @@ -//===---- LatencyPriorityQueue.h - A latency-oriented priority queue ------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the LatencyPriorityQueue class, which is a -// SchedulingPriorityQueue that schedules using latency information to -// reduce the length of the critical path through the basic block. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LATENCYPRIORITYQUEUE_H -#define LLVM_CODEGEN_LATENCYPRIORITYQUEUE_H - -#include "llvm/CodeGen/ScheduleDAG.h" - -namespace llvm { - class LatencyPriorityQueue; - - /// Sorting functions for the Available queue. - struct latency_sort : public std::binary_function { - LatencyPriorityQueue *PQ; - explicit latency_sort(LatencyPriorityQueue *pq) : PQ(pq) {} - - bool operator()(const SUnit* left, const SUnit* right) const; - }; - - class LatencyPriorityQueue : public SchedulingPriorityQueue { - // SUnits - The SUnits for the current graph. - std::vector *SUnits; - - /// NumNodesSolelyBlocking - This vector contains, for every node in the - /// Queue, the number of nodes that the node is the sole unscheduled - /// predecessor for. This is used as a tie-breaker heuristic for better - /// mobility. - std::vector NumNodesSolelyBlocking; - - /// Queue - The queue. - std::vector Queue; - latency_sort Picker; - - public: - LatencyPriorityQueue() : Picker(this) { - } - - bool isBottomUp() const override { return false; } - - void initNodes(std::vector &sunits) override { - SUnits = &sunits; - NumNodesSolelyBlocking.resize(SUnits->size(), 0); - } - - void addNode(const SUnit *SU) override { - NumNodesSolelyBlocking.resize(SUnits->size(), 0); - } - - void updateNode(const SUnit *SU) override { - } - - void releaseState() override { - SUnits = nullptr; - } - - unsigned getLatency(unsigned NodeNum) const { - assert(NodeNum < (*SUnits).size()); - return (*SUnits)[NodeNum].getHeight(); - } - - unsigned getNumSolelyBlockNodes(unsigned NodeNum) const { - assert(NodeNum < NumNodesSolelyBlocking.size()); - return NumNodesSolelyBlocking[NodeNum]; - } - - bool empty() const override { return Queue.empty(); } - - void push(SUnit *U) override; - - SUnit *pop() override; - - void remove(SUnit *SU) override; - - // scheduledNode - As nodes are scheduled, we look to see if there are any - // successor nodes that have a single unscheduled predecessor. If so, that - // single predecessor has a higher priority, since scheduling it will make - // the node available. - void scheduledNode(SUnit *Node) override; - -private: - void AdjustPriorityOfUnscheduledPreds(SUnit *SU); - SUnit *getSingleUnscheduledPred(SUnit *SU); - }; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/LexicalScopes.h b/llvm/include/llvm/CodeGen/LexicalScopes.h deleted file mode 100644 index 7d7e48af..00000000 --- a/llvm/include/llvm/CodeGen/LexicalScopes.h +++ /dev/null @@ -1,257 +0,0 @@ -//===- LexicalScopes.cpp - Collecting lexical scope info -*- C++ -*--------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements LexicalScopes analysis. -// -// This pass collects lexical scope information and maps machine instructions -// to respective lexical scopes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LEXICALSCOPES_H -#define LLVM_CODEGEN_LEXICALSCOPES_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/IR/DebugInfoMetadata.h" -#include "llvm/IR/ValueHandle.h" -#include -#include -namespace llvm { - -class MachineInstr; -class MachineBasicBlock; -class MachineFunction; - -//===----------------------------------------------------------------------===// -/// InsnRange - This is used to track range of instructions with identical -/// lexical scope. -/// -typedef std::pair InsnRange; - -//===----------------------------------------------------------------------===// -/// LexicalScope - This class is used to track scope information. -/// -class LexicalScope { - -public: - LexicalScope(LexicalScope *P, const DILocalScope *D, const DILocation *I, - bool A) - : Parent(P), Desc(D), InlinedAtLocation(I), AbstractScope(A), - LastInsn(nullptr), FirstInsn(nullptr), DFSIn(0), DFSOut(0) { - assert((!D || D->isResolved()) && "Expected resolved node"); - assert((!I || I->isResolved()) && "Expected resolved node"); - if (Parent) - Parent->addChild(this); - } - - // Accessors. - LexicalScope *getParent() const { return Parent; } - const MDNode *getDesc() const { return Desc; } - const DILocation *getInlinedAt() const { return InlinedAtLocation; } - const DILocalScope *getScopeNode() const { return Desc; } - bool isAbstractScope() const { return AbstractScope; } - SmallVectorImpl &getChildren() { return Children; } - SmallVectorImpl &getRanges() { return Ranges; } - - /// addChild - Add a child scope. - void addChild(LexicalScope *S) { Children.push_back(S); } - - /// openInsnRange - This scope covers instruction range starting from MI. - void openInsnRange(const MachineInstr *MI) { - if (!FirstInsn) - FirstInsn = MI; - - if (Parent) - Parent->openInsnRange(MI); - } - - /// extendInsnRange - Extend the current instruction range covered by - /// this scope. - void extendInsnRange(const MachineInstr *MI) { - assert(FirstInsn && "MI Range is not open!"); - LastInsn = MI; - if (Parent) - Parent->extendInsnRange(MI); - } - - /// closeInsnRange - Create a range based on FirstInsn and LastInsn collected - /// until now. This is used when a new scope is encountered while walking - /// machine instructions. - void closeInsnRange(LexicalScope *NewScope = nullptr) { - assert(LastInsn && "Last insn missing!"); - Ranges.push_back(InsnRange(FirstInsn, LastInsn)); - FirstInsn = nullptr; - LastInsn = nullptr; - // If Parent dominates NewScope then do not close Parent's instruction - // range. - if (Parent && (!NewScope || !Parent->dominates(NewScope))) - Parent->closeInsnRange(NewScope); - } - - /// dominates - Return true if current scope dominates given lexical scope. - bool dominates(const LexicalScope *S) const { - if (S == this) - return true; - if (DFSIn < S->getDFSIn() && DFSOut > S->getDFSOut()) - return true; - return false; - } - - // Depth First Search support to walk and manipulate LexicalScope hierarchy. - unsigned getDFSOut() const { return DFSOut; } - void setDFSOut(unsigned O) { DFSOut = O; } - unsigned getDFSIn() const { return DFSIn; } - void setDFSIn(unsigned I) { DFSIn = I; } - - /// dump - print lexical scope. - void dump(unsigned Indent = 0) const; - -private: - LexicalScope *Parent; // Parent to this scope. - const DILocalScope *Desc; // Debug info descriptor. - const DILocation *InlinedAtLocation; // Location at which this - // scope is inlined. - bool AbstractScope; // Abstract Scope - SmallVector Children; // Scopes defined in scope. - // Contents not owned. - SmallVector Ranges; - - const MachineInstr *LastInsn; // Last instruction of this scope. - const MachineInstr *FirstInsn; // First instruction of this scope. - unsigned DFSIn, DFSOut; // In & Out Depth use to determine - // scope nesting. -}; - -//===----------------------------------------------------------------------===// -/// LexicalScopes - This class provides interface to collect and use lexical -/// scoping information from machine instruction. -/// -class LexicalScopes { -public: - LexicalScopes() : MF(nullptr), CurrentFnLexicalScope(nullptr) {} - - /// initialize - Scan machine function and constuct lexical scope nest, resets - /// the instance if necessary. - void initialize(const MachineFunction &); - - /// releaseMemory - release memory. - void reset(); - - /// empty - Return true if there is any lexical scope information available. - bool empty() { return CurrentFnLexicalScope == nullptr; } - - /// getCurrentFunctionScope - Return lexical scope for the current function. - LexicalScope *getCurrentFunctionScope() const { - return CurrentFnLexicalScope; - } - - /// getMachineBasicBlocks - Populate given set using machine basic blocks - /// which have machine instructions that belong to lexical scope identified by - /// DebugLoc. - void getMachineBasicBlocks(const DILocation *DL, - SmallPtrSetImpl &MBBs); - - /// dominates - Return true if DebugLoc's lexical scope dominates at least one - /// machine instruction's lexical scope in a given machine basic block. - bool dominates(const DILocation *DL, MachineBasicBlock *MBB); - - /// findLexicalScope - Find lexical scope, either regular or inlined, for the - /// given DebugLoc. Return NULL if not found. - LexicalScope *findLexicalScope(const DILocation *DL); - - /// getAbstractScopesList - Return a reference to list of abstract scopes. - ArrayRef getAbstractScopesList() const { - return AbstractScopesList; - } - - /// findAbstractScope - Find an abstract scope or return null. - LexicalScope *findAbstractScope(const DILocalScope *N) { - auto I = AbstractScopeMap.find(N); - return I != AbstractScopeMap.end() ? &I->second : nullptr; - } - - /// findInlinedScope - Find an inlined scope for the given scope/inlined-at. - LexicalScope *findInlinedScope(const DILocalScope *N, const DILocation *IA) { - auto I = InlinedLexicalScopeMap.find(std::make_pair(N, IA)); - return I != InlinedLexicalScopeMap.end() ? &I->second : nullptr; - } - - /// findLexicalScope - Find regular lexical scope or return null. - LexicalScope *findLexicalScope(const DILocalScope *N) { - auto I = LexicalScopeMap.find(N); - return I != LexicalScopeMap.end() ? &I->second : nullptr; - } - - /// dump - Print data structures to dbgs(). - void dump(); - - /// getOrCreateAbstractScope - Find or create an abstract lexical scope. - LexicalScope *getOrCreateAbstractScope(const DILocalScope *Scope); - -private: - /// getOrCreateLexicalScope - Find lexical scope for the given Scope/IA. If - /// not available then create new lexical scope. - LexicalScope *getOrCreateLexicalScope(const DILocalScope *Scope, - const DILocation *IA = nullptr); - LexicalScope *getOrCreateLexicalScope(const DILocation *DL) { - return DL ? getOrCreateLexicalScope(DL->getScope(), DL->getInlinedAt()) - : nullptr; - } - - /// getOrCreateRegularScope - Find or create a regular lexical scope. - LexicalScope *getOrCreateRegularScope(const DILocalScope *Scope); - - /// getOrCreateInlinedScope - Find or create an inlined lexical scope. - LexicalScope *getOrCreateInlinedScope(const DILocalScope *Scope, - const DILocation *InlinedAt); - - /// extractLexicalScopes - Extract instruction ranges for each lexical scopes - /// for the given machine function. - void extractLexicalScopes(SmallVectorImpl &MIRanges, - DenseMap &M); - void constructScopeNest(LexicalScope *Scope); - void - assignInstructionRanges(SmallVectorImpl &MIRanges, - DenseMap &M); - -private: - const MachineFunction *MF; - - /// LexicalScopeMap - Tracks the scopes in the current function. - // Use an unordered_map to ensure value pointer validity over insertion. - std::unordered_map LexicalScopeMap; - - /// InlinedLexicalScopeMap - Tracks inlined function scopes in current - /// function. - std::unordered_map, - LexicalScope, - pair_hash> - InlinedLexicalScopeMap; - - /// AbstractScopeMap - These scopes are not included LexicalScopeMap. - // Use an unordered_map to ensure value pointer validity over insertion. - std::unordered_map AbstractScopeMap; - - /// AbstractScopesList - Tracks abstract scopes constructed while processing - /// a function. - SmallVector AbstractScopesList; - - /// CurrentFnLexicalScope - Top level scope for the current function. - /// - LexicalScope *CurrentFnLexicalScope; -}; - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/LinkAllAsmWriterComponents.h b/llvm/include/llvm/CodeGen/LinkAllAsmWriterComponents.h deleted file mode 100644 index c3046da9..00000000 --- a/llvm/include/llvm/CodeGen/LinkAllAsmWriterComponents.h +++ /dev/null @@ -1,38 +0,0 @@ -//===- llvm/Codegen/LinkAllAsmWriterComponents.h ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header file pulls in all assembler writer related passes for tools like -// llc that need this functionality. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H -#define LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H - -#include "llvm/CodeGen/GCs.h" -#include - -namespace { - struct ForceAsmWriterLinking { - ForceAsmWriterLinking() { - // We must reference the plug-ins in such a way that compilers will not - // delete it all as dead code, even with whole program optimization, - // yet is effectively a NO-OP. As the compiler isn't smart enough - // to know that getenv() never returns -1, this will do the job. - if (std::getenv("bar") != (char*) -1) - return; - - llvm::linkOcamlGCPrinter(); - llvm::linkErlangGCPrinter(); - - } - } ForceAsmWriterLinking; // Force link by creating a global definition. -} - -#endif // LLVM_CODEGEN_LINKALLASMWRITERCOMPONENTS_H diff --git a/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h b/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h deleted file mode 100644 index fee131e4..00000000 --- a/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h +++ /dev/null @@ -1,59 +0,0 @@ -//===- llvm/Codegen/LinkAllCodegenComponents.h ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header file pulls in all codegen related passes for tools like lli and -// llc that need this functionality. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LINKALLCODEGENCOMPONENTS_H -#define LLVM_CODEGEN_LINKALLCODEGENCOMPONENTS_H - -#include "llvm/CodeGen/GCs.h" -#include "llvm/CodeGen/Passes.h" -#include "llvm/CodeGen/SchedulerRegistry.h" -#include "llvm/Target/TargetMachine.h" -#include - -namespace { - struct ForceCodegenLinking { - ForceCodegenLinking() { - // We must reference the passes in such a way that compilers will not - // delete it all as dead code, even with whole program optimization, - // yet is effectively a NO-OP. As the compiler isn't smart enough - // to know that getenv() never returns -1, this will do the job. - if (std::getenv("bar") != (char*) -1) - return; - - (void) llvm::createFastRegisterAllocator(); - (void) llvm::createBasicRegisterAllocator(); - (void) llvm::createGreedyRegisterAllocator(); - (void) llvm::createDefaultPBQPRegisterAllocator(); - - llvm::linkCoreCLRGC(); - llvm::linkOcamlGC(); - llvm::linkErlangGC(); - llvm::linkShadowStackGC(); - llvm::linkStatepointExampleGC(); - - (void) llvm::createBURRListDAGScheduler(nullptr, - llvm::CodeGenOpt::Default); - (void) llvm::createSourceListDAGScheduler(nullptr, - llvm::CodeGenOpt::Default); - (void) llvm::createHybridListDAGScheduler(nullptr, - llvm::CodeGenOpt::Default); - (void) llvm::createFastDAGScheduler(nullptr, llvm::CodeGenOpt::Default); - (void) llvm::createDefaultScheduler(nullptr, llvm::CodeGenOpt::Default); - (void) llvm::createVLIWDAGScheduler(nullptr, llvm::CodeGenOpt::Default); - - } - } ForceCodegenLinking; // Force link by creating a global definition. -} - -#endif diff --git a/llvm/include/llvm/CodeGen/LiveInterval.h b/llvm/include/llvm/CodeGen/LiveInterval.h deleted file mode 100644 index 04e840de..00000000 --- a/llvm/include/llvm/CodeGen/LiveInterval.h +++ /dev/null @@ -1,877 +0,0 @@ -//===-- llvm/CodeGen/LiveInterval.h - Interval representation ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the LiveRange and LiveInterval classes. Given some -// numbering of each the machine instructions an interval [i, j) is said to be a -// live range for register v if there is no instruction with number j' >= j -// such that v is live at j' and there is no instruction with number i' < i such -// that v is live at i'. In this implementation ranges can have holes, -// i.e. a range might look like [1,20), [50,65), [1000,1001). Each -// individual segment is represented as an instance of LiveRange::Segment, -// and the whole range is represented as an instance of LiveRange. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LIVEINTERVAL_H -#define LLVM_CODEGEN_LIVEINTERVAL_H - -#include "llvm/ADT/IntEqClasses.h" -#include "llvm/CodeGen/SlotIndexes.h" -#include "llvm/Support/AlignOf.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include -#include -#include - -namespace llvm { - class CoalescerPair; - class LiveIntervals; - class MachineInstr; - class MachineRegisterInfo; - class TargetRegisterInfo; - class raw_ostream; - template class SmallPtrSet; - - /// VNInfo - Value Number Information. - /// This class holds information about a machine level values, including - /// definition and use points. - /// - class VNInfo { - public: - typedef BumpPtrAllocator Allocator; - - /// The ID number of this value. - unsigned id; - - /// The index of the defining instruction. - SlotIndex def; - - /// VNInfo constructor. - VNInfo(unsigned i, SlotIndex d) - : id(i), def(d) - { } - - /// VNInfo construtor, copies values from orig, except for the value number. - VNInfo(unsigned i, const VNInfo &orig) - : id(i), def(orig.def) - { } - - /// Copy from the parameter into this VNInfo. - void copyFrom(VNInfo &src) { - def = src.def; - } - - /// Returns true if this value is defined by a PHI instruction (or was, - /// PHI instructions may have been eliminated). - /// PHI-defs begin at a block boundary, all other defs begin at register or - /// EC slots. - bool isPHIDef() const { return def.isBlock(); } - - /// Returns true if this value is unused. - bool isUnused() const { return !def.isValid(); } - - /// Mark this value as unused. - void markUnused() { def = SlotIndex(); } - }; - - /// Result of a LiveRange query. This class hides the implementation details - /// of live ranges, and it should be used as the primary interface for - /// examining live ranges around instructions. - class LiveQueryResult { - VNInfo *const EarlyVal; - VNInfo *const LateVal; - const SlotIndex EndPoint; - const bool Kill; - - public: - LiveQueryResult(VNInfo *EarlyVal, VNInfo *LateVal, SlotIndex EndPoint, - bool Kill) - : EarlyVal(EarlyVal), LateVal(LateVal), EndPoint(EndPoint), Kill(Kill) - {} - - /// Return the value that is live-in to the instruction. This is the value - /// that will be read by the instruction's use operands. Return NULL if no - /// value is live-in. - VNInfo *valueIn() const { - return EarlyVal; - } - - /// Return true if the live-in value is killed by this instruction. This - /// means that either the live range ends at the instruction, or it changes - /// value. - bool isKill() const { - return Kill; - } - - /// Return true if this instruction has a dead def. - bool isDeadDef() const { - return EndPoint.isDead(); - } - - /// Return the value leaving the instruction, if any. This can be a - /// live-through value, or a live def. A dead def returns NULL. - VNInfo *valueOut() const { - return isDeadDef() ? nullptr : LateVal; - } - - /// Returns the value alive at the end of the instruction, if any. This can - /// be a live-through value, a live def or a dead def. - VNInfo *valueOutOrDead() const { - return LateVal; - } - - /// Return the value defined by this instruction, if any. This includes - /// dead defs, it is the value created by the instruction's def operands. - VNInfo *valueDefined() const { - return EarlyVal == LateVal ? nullptr : LateVal; - } - - /// Return the end point of the last live range segment to interact with - /// the instruction, if any. - /// - /// The end point is an invalid SlotIndex only if the live range doesn't - /// intersect the instruction at all. - /// - /// The end point may be at or past the end of the instruction's basic - /// block. That means the value was live out of the block. - SlotIndex endPoint() const { - return EndPoint; - } - }; - - /// This class represents the liveness of a register, stack slot, etc. - /// It manages an ordered list of Segment objects. - /// The Segments are organized in a static single assignment form: At places - /// where a new value is defined or different values reach a CFG join a new - /// segment with a new value number is used. - class LiveRange { - public: - - /// This represents a simple continuous liveness interval for a value. - /// The start point is inclusive, the end point exclusive. These intervals - /// are rendered as [start,end). - struct Segment { - SlotIndex start; // Start point of the interval (inclusive) - SlotIndex end; // End point of the interval (exclusive) - VNInfo *valno; // identifier for the value contained in this segment. - - Segment() : valno(nullptr) {} - - Segment(SlotIndex S, SlotIndex E, VNInfo *V) - : start(S), end(E), valno(V) { - assert(S < E && "Cannot create empty or backwards segment"); - } - - /// Return true if the index is covered by this segment. - bool contains(SlotIndex I) const { - return start <= I && I < end; - } - - /// Return true if the given interval, [S, E), is covered by this segment. - bool containsInterval(SlotIndex S, SlotIndex E) const { - assert((S < E) && "Backwards interval?"); - return (start <= S && S < end) && (start < E && E <= end); - } - - bool operator<(const Segment &Other) const { - return std::tie(start, end) < std::tie(Other.start, Other.end); - } - bool operator==(const Segment &Other) const { - return start == Other.start && end == Other.end; - } - - void dump() const; - }; - - typedef SmallVector Segments; - typedef SmallVector VNInfoList; - - Segments segments; // the liveness segments - VNInfoList valnos; // value#'s - - // The segment set is used temporarily to accelerate initial computation - // of live ranges of physical registers in computeRegUnitRange. - // After that the set is flushed to the segment vector and deleted. - typedef std::set SegmentSet; - std::unique_ptr segmentSet; - - typedef Segments::iterator iterator; - iterator begin() { return segments.begin(); } - iterator end() { return segments.end(); } - - typedef Segments::const_iterator const_iterator; - const_iterator begin() const { return segments.begin(); } - const_iterator end() const { return segments.end(); } - - typedef VNInfoList::iterator vni_iterator; - vni_iterator vni_begin() { return valnos.begin(); } - vni_iterator vni_end() { return valnos.end(); } - - typedef VNInfoList::const_iterator const_vni_iterator; - const_vni_iterator vni_begin() const { return valnos.begin(); } - const_vni_iterator vni_end() const { return valnos.end(); } - - /// Constructs a new LiveRange object. - LiveRange(bool UseSegmentSet = false) - : segmentSet(UseSegmentSet ? llvm::make_unique() - : nullptr) {} - - /// Constructs a new LiveRange object by copying segments and valnos from - /// another LiveRange. - LiveRange(const LiveRange &Other, BumpPtrAllocator &Allocator) { - assert(Other.segmentSet == nullptr && - "Copying of LiveRanges with active SegmentSets is not supported"); - - // Duplicate valnos. - for (const VNInfo *VNI : Other.valnos) { - createValueCopy(VNI, Allocator); - } - // Now we can copy segments and remap their valnos. - for (const Segment &S : Other.segments) { - segments.push_back(Segment(S.start, S.end, valnos[S.valno->id])); - } - } - - /// advanceTo - Advance the specified iterator to point to the Segment - /// containing the specified position, or end() if the position is past the - /// end of the range. If no Segment contains this position, but the - /// position is in a hole, this method returns an iterator pointing to the - /// Segment immediately after the hole. - iterator advanceTo(iterator I, SlotIndex Pos) { - assert(I != end()); - if (Pos >= endIndex()) - return end(); - while (I->end <= Pos) ++I; - return I; - } - - const_iterator advanceTo(const_iterator I, SlotIndex Pos) const { - assert(I != end()); - if (Pos >= endIndex()) - return end(); - while (I->end <= Pos) ++I; - return I; - } - - /// find - Return an iterator pointing to the first segment that ends after - /// Pos, or end(). This is the same as advanceTo(begin(), Pos), but faster - /// when searching large ranges. - /// - /// If Pos is contained in a Segment, that segment is returned. - /// If Pos is in a hole, the following Segment is returned. - /// If Pos is beyond endIndex, end() is returned. - iterator find(SlotIndex Pos); - - const_iterator find(SlotIndex Pos) const { - return const_cast(this)->find(Pos); - } - - void clear() { - valnos.clear(); - segments.clear(); - } - - size_t size() const { - return segments.size(); - } - - bool hasAtLeastOneValue() const { return !valnos.empty(); } - - bool containsOneValue() const { return valnos.size() == 1; } - - unsigned getNumValNums() const { return (unsigned)valnos.size(); } - - /// getValNumInfo - Returns pointer to the specified val#. - /// - inline VNInfo *getValNumInfo(unsigned ValNo) { - return valnos[ValNo]; - } - inline const VNInfo *getValNumInfo(unsigned ValNo) const { - return valnos[ValNo]; - } - - /// containsValue - Returns true if VNI belongs to this range. - bool containsValue(const VNInfo *VNI) const { - return VNI && VNI->id < getNumValNums() && VNI == getValNumInfo(VNI->id); - } - - /// getNextValue - Create a new value number and return it. MIIdx specifies - /// the instruction that defines the value number. - VNInfo *getNextValue(SlotIndex def, VNInfo::Allocator &VNInfoAllocator) { - VNInfo *VNI = - new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), def); - valnos.push_back(VNI); - return VNI; - } - - /// createDeadDef - Make sure the range has a value defined at Def. - /// If one already exists, return it. Otherwise allocate a new value and - /// add liveness for a dead def. - VNInfo *createDeadDef(SlotIndex Def, VNInfo::Allocator &VNInfoAllocator); - - /// Create a copy of the given value. The new value will be identical except - /// for the Value number. - VNInfo *createValueCopy(const VNInfo *orig, - VNInfo::Allocator &VNInfoAllocator) { - VNInfo *VNI = - new (VNInfoAllocator) VNInfo((unsigned)valnos.size(), *orig); - valnos.push_back(VNI); - return VNI; - } - - /// RenumberValues - Renumber all values in order of appearance and remove - /// unused values. - void RenumberValues(); - - /// MergeValueNumberInto - This method is called when two value numbers - /// are found to be equivalent. This eliminates V1, replacing all - /// segments with the V1 value number with the V2 value number. This can - /// cause merging of V1/V2 values numbers and compaction of the value space. - VNInfo* MergeValueNumberInto(VNInfo *V1, VNInfo *V2); - - /// Merge all of the live segments of a specific val# in RHS into this live - /// range as the specified value number. The segments in RHS are allowed - /// to overlap with segments in the current range, it will replace the - /// value numbers of the overlaped live segments with the specified value - /// number. - void MergeSegmentsInAsValue(const LiveRange &RHS, VNInfo *LHSValNo); - - /// MergeValueInAsValue - Merge all of the segments of a specific val# - /// in RHS into this live range as the specified value number. - /// The segments in RHS are allowed to overlap with segments in the - /// current range, but only if the overlapping segments have the - /// specified value number. - void MergeValueInAsValue(const LiveRange &RHS, - const VNInfo *RHSValNo, VNInfo *LHSValNo); - - bool empty() const { return segments.empty(); } - - /// beginIndex - Return the lowest numbered slot covered. - SlotIndex beginIndex() const { - assert(!empty() && "Call to beginIndex() on empty range."); - return segments.front().start; - } - - /// endNumber - return the maximum point of the range of the whole, - /// exclusive. - SlotIndex endIndex() const { - assert(!empty() && "Call to endIndex() on empty range."); - return segments.back().end; - } - - bool expiredAt(SlotIndex index) const { - return index >= endIndex(); - } - - bool liveAt(SlotIndex index) const { - const_iterator r = find(index); - return r != end() && r->start <= index; - } - - /// Return the segment that contains the specified index, or null if there - /// is none. - const Segment *getSegmentContaining(SlotIndex Idx) const { - const_iterator I = FindSegmentContaining(Idx); - return I == end() ? nullptr : &*I; - } - - /// Return the live segment that contains the specified index, or null if - /// there is none. - Segment *getSegmentContaining(SlotIndex Idx) { - iterator I = FindSegmentContaining(Idx); - return I == end() ? nullptr : &*I; - } - - /// getVNInfoAt - Return the VNInfo that is live at Idx, or NULL. - VNInfo *getVNInfoAt(SlotIndex Idx) const { - const_iterator I = FindSegmentContaining(Idx); - return I == end() ? nullptr : I->valno; - } - - /// getVNInfoBefore - Return the VNInfo that is live up to but not - /// necessarilly including Idx, or NULL. Use this to find the reaching def - /// used by an instruction at this SlotIndex position. - VNInfo *getVNInfoBefore(SlotIndex Idx) const { - const_iterator I = FindSegmentContaining(Idx.getPrevSlot()); - return I == end() ? nullptr : I->valno; - } - - /// Return an iterator to the segment that contains the specified index, or - /// end() if there is none. - iterator FindSegmentContaining(SlotIndex Idx) { - iterator I = find(Idx); - return I != end() && I->start <= Idx ? I : end(); - } - - const_iterator FindSegmentContaining(SlotIndex Idx) const { - const_iterator I = find(Idx); - return I != end() && I->start <= Idx ? I : end(); - } - - /// overlaps - Return true if the intersection of the two live ranges is - /// not empty. - bool overlaps(const LiveRange &other) const { - if (other.empty()) - return false; - return overlapsFrom(other, other.begin()); - } - - /// overlaps - Return true if the two ranges have overlapping segments - /// that are not coalescable according to CP. - /// - /// Overlapping segments where one range is defined by a coalescable - /// copy are allowed. - bool overlaps(const LiveRange &Other, const CoalescerPair &CP, - const SlotIndexes&) const; - - /// overlaps - Return true if the live range overlaps an interval specified - /// by [Start, End). - bool overlaps(SlotIndex Start, SlotIndex End) const; - - /// overlapsFrom - Return true if the intersection of the two live ranges - /// is not empty. The specified iterator is a hint that we can begin - /// scanning the Other range starting at I. - bool overlapsFrom(const LiveRange &Other, const_iterator I) const; - - /// Returns true if all segments of the @p Other live range are completely - /// covered by this live range. - /// Adjacent live ranges do not affect the covering:the liverange - /// [1,5](5,10] covers (3,7]. - bool covers(const LiveRange &Other) const; - - /// Add the specified Segment to this range, merging segments as - /// appropriate. This returns an iterator to the inserted segment (which - /// may have grown since it was inserted). - iterator addSegment(Segment S); - - /// If this range is live before @p Use in the basic block that starts at - /// @p StartIdx, extend it to be live up to @p Use, and return the value. If - /// there is no segment before @p Use, return nullptr. - VNInfo *extendInBlock(SlotIndex StartIdx, SlotIndex Use); - - /// join - Join two live ranges (this, and other) together. This applies - /// mappings to the value numbers in the LHS/RHS ranges as specified. If - /// the ranges are not joinable, this aborts. - void join(LiveRange &Other, - const int *ValNoAssignments, - const int *RHSValNoAssignments, - SmallVectorImpl &NewVNInfo); - - /// True iff this segment is a single segment that lies between the - /// specified boundaries, exclusively. Vregs live across a backedge are not - /// considered local. The boundaries are expected to lie within an extended - /// basic block, so vregs that are not live out should contain no holes. - bool isLocal(SlotIndex Start, SlotIndex End) const { - return beginIndex() > Start.getBaseIndex() && - endIndex() < End.getBoundaryIndex(); - } - - /// Remove the specified segment from this range. Note that the segment - /// must be a single Segment in its entirety. - void removeSegment(SlotIndex Start, SlotIndex End, - bool RemoveDeadValNo = false); - - void removeSegment(Segment S, bool RemoveDeadValNo = false) { - removeSegment(S.start, S.end, RemoveDeadValNo); - } - - /// Remove segment pointed to by iterator @p I from this range. This does - /// not remove dead value numbers. - iterator removeSegment(iterator I) { - return segments.erase(I); - } - - /// Query Liveness at Idx. - /// The sub-instruction slot of Idx doesn't matter, only the instruction - /// it refers to is considered. - LiveQueryResult Query(SlotIndex Idx) const { - // Find the segment that enters the instruction. - const_iterator I = find(Idx.getBaseIndex()); - const_iterator E = end(); - if (I == E) - return LiveQueryResult(nullptr, nullptr, SlotIndex(), false); - - // Is this an instruction live-in segment? - // If Idx is the start index of a basic block, include live-in segments - // that start at Idx.getBaseIndex(). - VNInfo *EarlyVal = nullptr; - VNInfo *LateVal = nullptr; - SlotIndex EndPoint; - bool Kill = false; - if (I->start <= Idx.getBaseIndex()) { - EarlyVal = I->valno; - EndPoint = I->end; - // Move to the potentially live-out segment. - if (SlotIndex::isSameInstr(Idx, I->end)) { - Kill = true; - if (++I == E) - return LiveQueryResult(EarlyVal, LateVal, EndPoint, Kill); - } - // Special case: A PHIDef value can have its def in the middle of a - // segment if the value happens to be live out of the layout - // predecessor. - // Such a value is not live-in. - if (EarlyVal->def == Idx.getBaseIndex()) - EarlyVal = nullptr; - } - // I now points to the segment that may be live-through, or defined by - // this instr. Ignore segments starting after the current instr. - if (!SlotIndex::isEarlierInstr(Idx, I->start)) { - LateVal = I->valno; - EndPoint = I->end; - } - return LiveQueryResult(EarlyVal, LateVal, EndPoint, Kill); - } - - /// removeValNo - Remove all the segments defined by the specified value#. - /// Also remove the value# from value# list. - void removeValNo(VNInfo *ValNo); - - /// Returns true if the live range is zero length, i.e. no live segments - /// span instructions. It doesn't pay to spill such a range. - bool isZeroLength(SlotIndexes *Indexes) const { - for (const Segment &S : segments) - if (Indexes->getNextNonNullIndex(S.start).getBaseIndex() < - S.end.getBaseIndex()) - return false; - return true; - } - - // Returns true if any segment in the live range contains any of the - // provided slot indexes. Slots which occur in holes between - // segments will not cause the function to return true. - bool isLiveAtIndexes(ArrayRef Slots) const; - - bool operator<(const LiveRange& other) const { - const SlotIndex &thisIndex = beginIndex(); - const SlotIndex &otherIndex = other.beginIndex(); - return thisIndex < otherIndex; - } - - /// Flush segment set into the regular segment vector. - /// The method is to be called after the live range - /// has been created, if use of the segment set was - /// activated in the constructor of the live range. - void flushSegmentSet(); - - void print(raw_ostream &OS) const; - void dump() const; - - /// \brief Walk the range and assert if any invariants fail to hold. - /// - /// Note that this is a no-op when asserts are disabled. -#ifdef NDEBUG - void verify() const {} -#else - void verify() const; -#endif - - protected: - /// Append a segment to the list of segments. - void append(const LiveRange::Segment S); - - private: - friend class LiveRangeUpdater; - void addSegmentToSet(Segment S); - void markValNoForDeletion(VNInfo *V); - - }; - - inline raw_ostream &operator<<(raw_ostream &OS, const LiveRange &LR) { - LR.print(OS); - return OS; - } - - /// LiveInterval - This class represents the liveness of a register, - /// or stack slot. - class LiveInterval : public LiveRange { - public: - typedef LiveRange super; - - /// A live range for subregisters. The LaneMask specifies which parts of the - /// super register are covered by the interval. - /// (@sa TargetRegisterInfo::getSubRegIndexLaneMask()). - class SubRange : public LiveRange { - public: - SubRange *Next; - LaneBitmask LaneMask; - - /// Constructs a new SubRange object. - SubRange(LaneBitmask LaneMask) - : Next(nullptr), LaneMask(LaneMask) { - } - - /// Constructs a new SubRange object by copying liveness from @p Other. - SubRange(LaneBitmask LaneMask, const LiveRange &Other, - BumpPtrAllocator &Allocator) - : LiveRange(Other, Allocator), Next(nullptr), LaneMask(LaneMask) { - } - - void print(raw_ostream &OS) const; - void dump() const; - }; - - private: - SubRange *SubRanges; ///< Single linked list of subregister live ranges. - - public: - const unsigned reg; // the register or stack slot of this interval. - float weight; // weight of this interval - - LiveInterval(unsigned Reg, float Weight) - : SubRanges(nullptr), reg(Reg), weight(Weight) {} - - ~LiveInterval() { - clearSubRanges(); - } - - template - class SingleLinkedListIterator { - T *P; - public: - SingleLinkedListIterator(T *P) : P(P) {} - SingleLinkedListIterator &operator++() { - P = P->Next; - return *this; - } - SingleLinkedListIterator &operator++(int) { - SingleLinkedListIterator res = *this; - ++*this; - return res; - } - bool operator!=(const SingleLinkedListIterator &Other) { - return P != Other.operator->(); - } - bool operator==(const SingleLinkedListIterator &Other) { - return P == Other.operator->(); - } - T &operator*() const { - return *P; - } - T *operator->() const { - return P; - } - }; - - typedef SingleLinkedListIterator subrange_iterator; - subrange_iterator subrange_begin() { - return subrange_iterator(SubRanges); - } - subrange_iterator subrange_end() { - return subrange_iterator(nullptr); - } - - typedef SingleLinkedListIterator const_subrange_iterator; - const_subrange_iterator subrange_begin() const { - return const_subrange_iterator(SubRanges); - } - const_subrange_iterator subrange_end() const { - return const_subrange_iterator(nullptr); - } - - iterator_range subranges() { - return make_range(subrange_begin(), subrange_end()); - } - - iterator_range subranges() const { - return make_range(subrange_begin(), subrange_end()); - } - - /// Creates a new empty subregister live range. The range is added at the - /// beginning of the subrange list; subrange iterators stay valid. - SubRange *createSubRange(BumpPtrAllocator &Allocator, - LaneBitmask LaneMask) { - SubRange *Range = new (Allocator) SubRange(LaneMask); - appendSubRange(Range); - return Range; - } - - /// Like createSubRange() but the new range is filled with a copy of the - /// liveness information in @p CopyFrom. - SubRange *createSubRangeFrom(BumpPtrAllocator &Allocator, - LaneBitmask LaneMask, - const LiveRange &CopyFrom) { - SubRange *Range = new (Allocator) SubRange(LaneMask, CopyFrom, Allocator); - appendSubRange(Range); - return Range; - } - - /// Returns true if subregister liveness information is available. - bool hasSubRanges() const { - return SubRanges != nullptr; - } - - /// Removes all subregister liveness information. - void clearSubRanges(); - - /// Removes all subranges without any segments (subranges without segments - /// are not considered valid and should only exist temporarily). - void removeEmptySubRanges(); - - /// getSize - Returns the sum of sizes of all the LiveRange's. - /// - unsigned getSize() const; - - /// isSpillable - Can this interval be spilled? - bool isSpillable() const { - return weight != llvm::huge_valf; - } - - /// markNotSpillable - Mark interval as not spillable - void markNotSpillable() { - weight = llvm::huge_valf; - } - - bool operator<(const LiveInterval& other) const { - const SlotIndex &thisIndex = beginIndex(); - const SlotIndex &otherIndex = other.beginIndex(); - return std::tie(thisIndex, reg) < std::tie(otherIndex, other.reg); - } - - void print(raw_ostream &OS) const; - void dump() const; - - /// \brief Walks the interval and assert if any invariants fail to hold. - /// - /// Note that this is a no-op when asserts are disabled. -#ifdef NDEBUG - void verify(const MachineRegisterInfo *MRI = nullptr) const {} -#else - void verify(const MachineRegisterInfo *MRI = nullptr) const; -#endif - - private: - /// Appends @p Range to SubRanges list. - void appendSubRange(SubRange *Range) { - Range->Next = SubRanges; - SubRanges = Range; - } - - /// Free memory held by SubRange. - void freeSubRange(SubRange *S); - }; - - inline raw_ostream &operator<<(raw_ostream &OS, - const LiveInterval::SubRange &SR) { - SR.print(OS); - return OS; - } - - inline raw_ostream &operator<<(raw_ostream &OS, const LiveInterval &LI) { - LI.print(OS); - return OS; - } - - raw_ostream &operator<<(raw_ostream &OS, const LiveRange::Segment &S); - - inline bool operator<(SlotIndex V, const LiveRange::Segment &S) { - return V < S.start; - } - - inline bool operator<(const LiveRange::Segment &S, SlotIndex V) { - return S.start < V; - } - - /// Helper class for performant LiveRange bulk updates. - /// - /// Calling LiveRange::addSegment() repeatedly can be expensive on large - /// live ranges because segments after the insertion point may need to be - /// shifted. The LiveRangeUpdater class can defer the shifting when adding - /// many segments in order. - /// - /// The LiveRange will be in an invalid state until flush() is called. - class LiveRangeUpdater { - LiveRange *LR; - SlotIndex LastStart; - LiveRange::iterator WriteI; - LiveRange::iterator ReadI; - SmallVector Spills; - void mergeSpills(); - - public: - /// Create a LiveRangeUpdater for adding segments to LR. - /// LR will temporarily be in an invalid state until flush() is called. - LiveRangeUpdater(LiveRange *lr = nullptr) : LR(lr) {} - - ~LiveRangeUpdater() { flush(); } - - /// Add a segment to LR and coalesce when possible, just like - /// LR.addSegment(). Segments should be added in increasing start order for - /// best performance. - void add(LiveRange::Segment); - - void add(SlotIndex Start, SlotIndex End, VNInfo *VNI) { - add(LiveRange::Segment(Start, End, VNI)); - } - - /// Return true if the LR is currently in an invalid state, and flush() - /// needs to be called. - bool isDirty() const { return LastStart.isValid(); } - - /// Flush the updater state to LR so it is valid and contains all added - /// segments. - void flush(); - - /// Select a different destination live range. - void setDest(LiveRange *lr) { - if (LR != lr && isDirty()) - flush(); - LR = lr; - } - - /// Get the current destination live range. - LiveRange *getDest() const { return LR; } - - void dump() const; - void print(raw_ostream&) const; - }; - - inline raw_ostream &operator<<(raw_ostream &OS, const LiveRangeUpdater &X) { - X.print(OS); - return OS; - } - - /// ConnectedVNInfoEqClasses - Helper class that can divide VNInfos in a - /// LiveInterval into equivalence clases of connected components. A - /// LiveInterval that has multiple connected components can be broken into - /// multiple LiveIntervals. - /// - /// Given a LiveInterval that may have multiple connected components, run: - /// - /// unsigned numComps = ConEQ.Classify(LI); - /// if (numComps > 1) { - /// // allocate numComps-1 new LiveIntervals into LIS[1..] - /// ConEQ.Distribute(LIS); - /// } - - class ConnectedVNInfoEqClasses { - LiveIntervals &LIS; - IntEqClasses EqClass; - - public: - explicit ConnectedVNInfoEqClasses(LiveIntervals &lis) : LIS(lis) {} - - /// Classify the values in \p LR into connected components. - /// Returns the number of connected components. - unsigned Classify(const LiveRange &LR); - - /// getEqClass - Classify creates equivalence classes numbered 0..N. Return - /// the equivalence class assigned the VNI. - unsigned getEqClass(const VNInfo *VNI) const { return EqClass[VNI->id]; } - - /// Distribute values in \p LI into a separate LiveIntervals - /// for each connected component. LIV must have an empty LiveInterval for - /// each additional connected component. The first connected component is - /// left in \p LI. - void Distribute(LiveInterval &LI, LiveInterval *LIV[], - MachineRegisterInfo &MRI); - }; -} -#endif diff --git a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h b/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h deleted file mode 100644 index d4ee0582..00000000 --- a/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ /dev/null @@ -1,453 +0,0 @@ -//===-- LiveIntervalAnalysis.h - Live Interval Analysis ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the LiveInterval analysis pass. Given some numbering of -// each the machine instructions (in this implemention depth-first order) an -// interval [i, j) is said to be a live interval for register v if there is no -// instruction with number j' > j such that v is live at j' and there is no -// instruction with number i' < i such that v is live at i'. In this -// implementation intervals can have holes, i.e. an interval might look like -// [1,20), [50,65), [1000,1001). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LIVEINTERVALANALYSIS_H -#define LLVM_CODEGEN_LIVEINTERVALANALYSIS_H - -#include "llvm/ADT/IndexedMap.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/CodeGen/LiveInterval.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/SlotIndexes.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include - -namespace llvm { - -extern cl::opt UseSegmentSetForPhysRegs; - - class BitVector; - class BlockFrequency; - class LiveRangeCalc; - class LiveVariables; - class MachineDominatorTree; - class MachineLoopInfo; - class TargetRegisterInfo; - class MachineRegisterInfo; - class TargetInstrInfo; - class TargetRegisterClass; - class VirtRegMap; - class MachineBlockFrequencyInfo; - - class LiveIntervals : public MachineFunctionPass { - MachineFunction* MF; - MachineRegisterInfo* MRI; - const TargetRegisterInfo* TRI; - const TargetInstrInfo* TII; - AliasAnalysis *AA; - SlotIndexes* Indexes; - MachineDominatorTree *DomTree; - LiveRangeCalc *LRCalc; - - /// Special pool allocator for VNInfo's (LiveInterval val#). - /// - VNInfo::Allocator VNInfoAllocator; - - /// Live interval pointers for all the virtual registers. - IndexedMap VirtRegIntervals; - - /// RegMaskSlots - Sorted list of instructions with register mask operands. - /// Always use the 'r' slot, RegMasks are normal clobbers, not early - /// clobbers. - SmallVector RegMaskSlots; - - /// RegMaskBits - This vector is parallel to RegMaskSlots, it holds a - /// pointer to the corresponding register mask. This pointer can be - /// recomputed as: - /// - /// MI = Indexes->getInstructionFromIndex(RegMaskSlot[N]); - /// unsigned OpNum = findRegMaskOperand(MI); - /// RegMaskBits[N] = MI->getOperand(OpNum).getRegMask(); - /// - /// This is kept in a separate vector partly because some standard - /// libraries don't support lower_bound() with mixed objects, partly to - /// improve locality when searching in RegMaskSlots. - /// Also see the comment in LiveInterval::find(). - SmallVector RegMaskBits; - - /// For each basic block number, keep (begin, size) pairs indexing into the - /// RegMaskSlots and RegMaskBits arrays. - /// Note that basic block numbers may not be layout contiguous, that's why - /// we can't just keep track of the first register mask in each basic - /// block. - SmallVector, 8> RegMaskBlocks; - - /// Keeps a live range set for each register unit to track fixed physreg - /// interference. - SmallVector RegUnitRanges; - - public: - static char ID; // Pass identification, replacement for typeid - LiveIntervals(); - ~LiveIntervals() override; - - // Calculate the spill weight to assign to a single instruction. - static float getSpillWeight(bool isDef, bool isUse, - const MachineBlockFrequencyInfo *MBFI, - const MachineInstr &Instr); - - LiveInterval &getInterval(unsigned Reg) { - if (hasInterval(Reg)) - return *VirtRegIntervals[Reg]; - else - return createAndComputeVirtRegInterval(Reg); - } - - const LiveInterval &getInterval(unsigned Reg) const { - return const_cast(this)->getInterval(Reg); - } - - bool hasInterval(unsigned Reg) const { - return VirtRegIntervals.inBounds(Reg) && VirtRegIntervals[Reg]; - } - - // Interval creation. - LiveInterval &createEmptyInterval(unsigned Reg) { - assert(!hasInterval(Reg) && "Interval already exists!"); - VirtRegIntervals.grow(Reg); - VirtRegIntervals[Reg] = createInterval(Reg); - return *VirtRegIntervals[Reg]; - } - - LiveInterval &createAndComputeVirtRegInterval(unsigned Reg) { - LiveInterval &LI = createEmptyInterval(Reg); - computeVirtRegInterval(LI); - return LI; - } - - // Interval removal. - void removeInterval(unsigned Reg) { - delete VirtRegIntervals[Reg]; - VirtRegIntervals[Reg] = nullptr; - } - - /// Given a register and an instruction, adds a live segment from that - /// instruction to the end of its MBB. - LiveInterval::Segment addSegmentToEndOfBlock(unsigned reg, - MachineInstr &startInst); - - /// After removing some uses of a register, shrink its live range to just - /// the remaining uses. This method does not compute reaching defs for new - /// uses, and it doesn't remove dead defs. - /// Dead PHIDef values are marked as unused. New dead machine instructions - /// are added to the dead vector. Returns true if the interval may have been - /// separated into multiple connected components. - bool shrinkToUses(LiveInterval *li, - SmallVectorImpl *dead = nullptr); - - /// Specialized version of - /// shrinkToUses(LiveInterval *li, SmallVectorImpl *dead) - /// that works on a subregister live range and only looks at uses matching - /// the lane mask of the subregister range. - /// This may leave the subrange empty which needs to be cleaned up with - /// LiveInterval::removeEmptySubranges() afterwards. - void shrinkToUses(LiveInterval::SubRange &SR, unsigned Reg); - - /// extendToIndices - Extend the live range of LI to reach all points in - /// Indices. The points in the Indices array must be jointly dominated by - /// existing defs in LI. PHI-defs are added as needed to maintain SSA form. - /// - /// If a SlotIndex in Indices is the end index of a basic block, LI will be - /// extended to be live out of the basic block. - /// - /// See also LiveRangeCalc::extend(). - void extendToIndices(LiveRange &LR, ArrayRef Indices); - - - /// If @p LR has a live value at @p Kill, prune its live range by removing - /// any liveness reachable from Kill. Add live range end points to - /// EndPoints such that extendToIndices(LI, EndPoints) will reconstruct the - /// value's live range. - /// - /// Calling pruneValue() and extendToIndices() can be used to reconstruct - /// SSA form after adding defs to a virtual register. - void pruneValue(LiveRange &LR, SlotIndex Kill, - SmallVectorImpl *EndPoints); - - SlotIndexes *getSlotIndexes() const { - return Indexes; - } - - AliasAnalysis *getAliasAnalysis() const { - return AA; - } - - /// isNotInMIMap - returns true if the specified machine instr has been - /// removed or was never entered in the map. - bool isNotInMIMap(const MachineInstr &Instr) const { - return !Indexes->hasIndex(Instr); - } - - /// Returns the base index of the given instruction. - SlotIndex getInstructionIndex(const MachineInstr &Instr) const { - return Indexes->getInstructionIndex(Instr); - } - - /// Returns the instruction associated with the given index. - MachineInstr* getInstructionFromIndex(SlotIndex index) const { - return Indexes->getInstructionFromIndex(index); - } - - /// Return the first index in the given basic block. - SlotIndex getMBBStartIdx(const MachineBasicBlock *mbb) const { - return Indexes->getMBBStartIdx(mbb); - } - - /// Return the last index in the given basic block. - SlotIndex getMBBEndIdx(const MachineBasicBlock *mbb) const { - return Indexes->getMBBEndIdx(mbb); - } - - bool isLiveInToMBB(const LiveRange &LR, - const MachineBasicBlock *mbb) const { - return LR.liveAt(getMBBStartIdx(mbb)); - } - - bool isLiveOutOfMBB(const LiveRange &LR, - const MachineBasicBlock *mbb) const { - return LR.liveAt(getMBBEndIdx(mbb).getPrevSlot()); - } - - MachineBasicBlock* getMBBFromIndex(SlotIndex index) const { - return Indexes->getMBBFromIndex(index); - } - - void insertMBBInMaps(MachineBasicBlock *MBB) { - Indexes->insertMBBInMaps(MBB); - assert(unsigned(MBB->getNumber()) == RegMaskBlocks.size() && - "Blocks must be added in order."); - RegMaskBlocks.push_back(std::make_pair(RegMaskSlots.size(), 0)); - } - - SlotIndex InsertMachineInstrInMaps(MachineInstr &MI) { - return Indexes->insertMachineInstrInMaps(MI); - } - - void InsertMachineInstrRangeInMaps(MachineBasicBlock::iterator B, - MachineBasicBlock::iterator E) { - for (MachineBasicBlock::iterator I = B; I != E; ++I) - Indexes->insertMachineInstrInMaps(*I); - } - - void RemoveMachineInstrFromMaps(MachineInstr &MI) { - Indexes->removeMachineInstrFromMaps(MI); - } - - void ReplaceMachineInstrInMaps(MachineInstr &MI, MachineInstr &NewMI) { - Indexes->replaceMachineInstrInMaps(MI, NewMI); - } - - VNInfo::Allocator& getVNInfoAllocator() { return VNInfoAllocator; } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - void releaseMemory() override; - - /// runOnMachineFunction - pass entry point - bool runOnMachineFunction(MachineFunction&) override; - - /// print - Implement the dump method. - void print(raw_ostream &O, const Module* = nullptr) const override; - - /// intervalIsInOneMBB - If LI is confined to a single basic block, return - /// a pointer to that block. If LI is live in to or out of any block, - /// return NULL. - MachineBasicBlock *intervalIsInOneMBB(const LiveInterval &LI) const; - - /// Returns true if VNI is killed by any PHI-def values in LI. - /// This may conservatively return true to avoid expensive computations. - bool hasPHIKill(const LiveInterval &LI, const VNInfo *VNI) const; - - /// addKillFlags - Add kill flags to any instruction that kills a virtual - /// register. - void addKillFlags(const VirtRegMap*); - - /// handleMove - call this method to notify LiveIntervals that - /// instruction 'mi' has been moved within a basic block. This will update - /// the live intervals for all operands of mi. Moves between basic blocks - /// are not supported. - /// - /// \param UpdateFlags Update live intervals for nonallocatable physregs. - void handleMove(MachineInstr &MI, bool UpdateFlags = false); - - /// moveIntoBundle - Update intervals for operands of MI so that they - /// begin/end on the SlotIndex for BundleStart. - /// - /// \param UpdateFlags Update live intervals for nonallocatable physregs. - /// - /// Requires MI and BundleStart to have SlotIndexes, and assumes - /// existing liveness is accurate. BundleStart should be the first - /// instruction in the Bundle. - void handleMoveIntoBundle(MachineInstr &MI, MachineInstr &BundleStart, - bool UpdateFlags = false); - - /// repairIntervalsInRange - Update live intervals for instructions in a - /// range of iterators. It is intended for use after target hooks that may - /// insert or remove instructions, and is only efficient for a small number - /// of instructions. - /// - /// OrigRegs is a vector of registers that were originally used by the - /// instructions in the range between the two iterators. - /// - /// Currently, the only only changes that are supported are simple removal - /// and addition of uses. - void repairIntervalsInRange(MachineBasicBlock *MBB, - MachineBasicBlock::iterator Begin, - MachineBasicBlock::iterator End, - ArrayRef OrigRegs); - - // Register mask functions. - // - // Machine instructions may use a register mask operand to indicate that a - // large number of registers are clobbered by the instruction. This is - // typically used for calls. - // - // For compile time performance reasons, these clobbers are not recorded in - // the live intervals for individual physical registers. Instead, - // LiveIntervalAnalysis maintains a sorted list of instructions with - // register mask operands. - - /// getRegMaskSlots - Returns a sorted array of slot indices of all - /// instructions with register mask operands. - ArrayRef getRegMaskSlots() const { return RegMaskSlots; } - - /// getRegMaskSlotsInBlock - Returns a sorted array of slot indices of all - /// instructions with register mask operands in the basic block numbered - /// MBBNum. - ArrayRef getRegMaskSlotsInBlock(unsigned MBBNum) const { - std::pair P = RegMaskBlocks[MBBNum]; - return getRegMaskSlots().slice(P.first, P.second); - } - - /// getRegMaskBits() - Returns an array of register mask pointers - /// corresponding to getRegMaskSlots(). - ArrayRef getRegMaskBits() const { return RegMaskBits; } - - /// getRegMaskBitsInBlock - Returns an array of mask pointers corresponding - /// to getRegMaskSlotsInBlock(MBBNum). - ArrayRef getRegMaskBitsInBlock(unsigned MBBNum) const { - std::pair P = RegMaskBlocks[MBBNum]; - return getRegMaskBits().slice(P.first, P.second); - } - - /// checkRegMaskInterference - Test if LI is live across any register mask - /// instructions, and compute a bit mask of physical registers that are not - /// clobbered by any of them. - /// - /// Returns false if LI doesn't cross any register mask instructions. In - /// that case, the bit vector is not filled in. - bool checkRegMaskInterference(LiveInterval &LI, - BitVector &UsableRegs); - - // Register unit functions. - // - // Fixed interference occurs when MachineInstrs use physregs directly - // instead of virtual registers. This typically happens when passing - // arguments to a function call, or when instructions require operands in - // fixed registers. - // - // Each physreg has one or more register units, see MCRegisterInfo. We - // track liveness per register unit to handle aliasing registers more - // efficiently. - - /// getRegUnit - Return the live range for Unit. - /// It will be computed if it doesn't exist. - LiveRange &getRegUnit(unsigned Unit) { - LiveRange *LR = RegUnitRanges[Unit]; - if (!LR) { - // Compute missing ranges on demand. - // Use segment set to speed-up initial computation of the live range. - RegUnitRanges[Unit] = LR = new LiveRange(UseSegmentSetForPhysRegs); - computeRegUnitRange(*LR, Unit); - } - return *LR; - } - - /// getCachedRegUnit - Return the live range for Unit if it has already - /// been computed, or NULL if it hasn't been computed yet. - LiveRange *getCachedRegUnit(unsigned Unit) { - return RegUnitRanges[Unit]; - } - - const LiveRange *getCachedRegUnit(unsigned Unit) const { - return RegUnitRanges[Unit]; - } - - /// Remove value numbers and related live segments starting at position - /// @p Pos that are part of any liverange of physical register @p Reg or one - /// of its subregisters. - void removePhysRegDefAt(unsigned Reg, SlotIndex Pos); - - /// Remove value number and related live segments of @p LI and its subranges - /// that start at position @p Pos. - void removeVRegDefAt(LiveInterval &LI, SlotIndex Pos); - - /// Split separate components in LiveInterval \p LI into separate intervals. - void splitSeparateComponents(LiveInterval &LI, - SmallVectorImpl &SplitLIs); - - /// For live interval \p LI with correct SubRanges construct matching - /// information for the main live range. Expects the main live range to not - /// have any segments or value numbers. - void constructMainRangeFromSubranges(LiveInterval &LI); - - private: - /// Compute live intervals for all virtual registers. - void computeVirtRegs(); - - /// Compute RegMaskSlots and RegMaskBits. - void computeRegMasks(); - - /// Walk the values in @p LI and check for dead values: - /// - Dead PHIDef values are marked as unused. - /// - Dead operands are marked as such. - /// - Completely dead machine instructions are added to the @p dead vector - /// if it is not nullptr. - /// Returns true if any PHI value numbers have been removed which may - /// have separated the interval into multiple connected components. - bool computeDeadValues(LiveInterval &LI, - SmallVectorImpl *dead); - - static LiveInterval* createInterval(unsigned Reg); - - void printInstrs(raw_ostream &O) const; - void dumpInstrs() const; - - void computeLiveInRegUnits(); - void computeRegUnitRange(LiveRange&, unsigned Unit); - void computeVirtRegInterval(LiveInterval&); - - - /// Helper function for repairIntervalsInRange(), walks backwards and - /// creates/modifies live segments in @p LR to match the operands found. - /// Only full operands or operands with subregisters matching @p LaneMask - /// are considered. - void repairOldRegInRange(MachineBasicBlock::iterator Begin, - MachineBasicBlock::iterator End, - const SlotIndex endIdx, LiveRange &LR, - unsigned Reg, LaneBitmask LaneMask = ~0u); - - class HMEditor; - }; -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/LiveIntervalUnion.h b/llvm/include/llvm/CodeGen/LiveIntervalUnion.h deleted file mode 100644 index f0f1637d..00000000 --- a/llvm/include/llvm/CodeGen/LiveIntervalUnion.h +++ /dev/null @@ -1,216 +0,0 @@ -//===-- LiveIntervalUnion.h - Live interval union data struct --*- C++ -*--===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// LiveIntervalUnion is a union of live segments across multiple live virtual -// registers. This may be used during coalescing to represent a congruence -// class, or during register allocation to model liveness of a physical -// register. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LIVEINTERVALUNION_H -#define LLVM_CODEGEN_LIVEINTERVALUNION_H - -#include "llvm/ADT/IntervalMap.h" -#include "llvm/CodeGen/LiveInterval.h" - -namespace llvm { - -class TargetRegisterInfo; - -#ifndef NDEBUG -// forward declaration -template class SparseBitVector; -typedef SparseBitVector<128> LiveVirtRegBitSet; -#endif - -/// Compare a live virtual register segment to a LiveIntervalUnion segment. -inline bool -overlap(const LiveInterval::Segment &VRSeg, - const IntervalMap::const_iterator &LUSeg) { - return VRSeg.start < LUSeg.stop() && LUSeg.start() < VRSeg.end; -} - -/// Union of live intervals that are strong candidates for coalescing into a -/// single register (either physical or virtual depending on the context). We -/// expect the constituent live intervals to be disjoint, although we may -/// eventually make exceptions to handle value-based interference. -class LiveIntervalUnion { - // A set of live virtual register segments that supports fast insertion, - // intersection, and removal. - // Mapping SlotIndex intervals to virtual register numbers. - typedef IntervalMap LiveSegments; - -public: - // SegmentIter can advance to the next segment ordered by starting position - // which may belong to a different live virtual register. We also must be able - // to reach the current segment's containing virtual register. - typedef LiveSegments::iterator SegmentIter; - - // LiveIntervalUnions share an external allocator. - typedef LiveSegments::Allocator Allocator; - - class Query; - -private: - unsigned Tag; // unique tag for current contents. - LiveSegments Segments; // union of virtual reg segments - -public: - explicit LiveIntervalUnion(Allocator &a) : Tag(0), Segments(a) {} - - // Iterate over all segments in the union of live virtual registers ordered - // by their starting position. - SegmentIter begin() { return Segments.begin(); } - SegmentIter end() { return Segments.end(); } - SegmentIter find(SlotIndex x) { return Segments.find(x); } - bool empty() const { return Segments.empty(); } - SlotIndex startIndex() const { return Segments.start(); } - - // Provide public access to the underlying map to allow overlap iteration. - typedef LiveSegments Map; - const Map &getMap() { return Segments; } - - /// getTag - Return an opaque tag representing the current state of the union. - unsigned getTag() const { return Tag; } - - /// changedSince - Return true if the union change since getTag returned tag. - bool changedSince(unsigned tag) const { return tag != Tag; } - - // Add a live virtual register to this union and merge its segments. - void unify(LiveInterval &VirtReg, const LiveRange &Range); - void unify(LiveInterval &VirtReg) { - unify(VirtReg, VirtReg); - } - - // Remove a live virtual register's segments from this union. - void extract(LiveInterval &VirtReg, const LiveRange &Range); - void extract(LiveInterval &VirtReg) { - extract(VirtReg, VirtReg); - } - - // Remove all inserted virtual registers. - void clear() { Segments.clear(); ++Tag; } - - // Print union, using TRI to translate register names - void print(raw_ostream &OS, const TargetRegisterInfo *TRI) const; - -#ifndef NDEBUG - // Verify the live intervals in this union and add them to the visited set. - void verify(LiveVirtRegBitSet& VisitedVRegs); -#endif - - /// Query interferences between a single live virtual register and a live - /// interval union. - class Query { - LiveIntervalUnion *LiveUnion; - LiveInterval *VirtReg; - LiveInterval::iterator VirtRegI; // current position in VirtReg - SegmentIter LiveUnionI; // current position in LiveUnion - SmallVector InterferingVRegs; - bool CheckedFirstInterference; - bool SeenAllInterferences; - bool SeenUnspillableVReg; - unsigned Tag, UserTag; - - public: - Query(): LiveUnion(), VirtReg(), Tag(0), UserTag(0) {} - - Query(LiveInterval *VReg, LiveIntervalUnion *LIU): - LiveUnion(LIU), VirtReg(VReg), CheckedFirstInterference(false), - SeenAllInterferences(false), SeenUnspillableVReg(false) - {} - - void clear() { - LiveUnion = nullptr; - VirtReg = nullptr; - InterferingVRegs.clear(); - CheckedFirstInterference = false; - SeenAllInterferences = false; - SeenUnspillableVReg = false; - Tag = 0; - UserTag = 0; - } - - void init(unsigned UTag, LiveInterval *VReg, LiveIntervalUnion *LIU) { - assert(VReg && LIU && "Invalid arguments"); - if (UserTag == UTag && VirtReg == VReg && - LiveUnion == LIU && !LIU->changedSince(Tag)) { - // Retain cached results, e.g. firstInterference. - return; - } - clear(); - LiveUnion = LIU; - VirtReg = VReg; - Tag = LIU->getTag(); - UserTag = UTag; - } - - LiveInterval &virtReg() const { - assert(VirtReg && "uninitialized"); - return *VirtReg; - } - - // Does this live virtual register interfere with the union? - bool checkInterference() { return collectInterferingVRegs(1); } - - // Count the virtual registers in this union that interfere with this - // query's live virtual register, up to maxInterferingRegs. - unsigned collectInterferingVRegs(unsigned MaxInterferingRegs = UINT_MAX); - - // Was this virtual register visited during collectInterferingVRegs? - bool isSeenInterference(LiveInterval *VReg) const; - - // Did collectInterferingVRegs collect all interferences? - bool seenAllInterferences() const { return SeenAllInterferences; } - - // Did collectInterferingVRegs encounter an unspillable vreg? - bool seenUnspillableVReg() const { return SeenUnspillableVReg; } - - // Vector generated by collectInterferingVRegs. - const SmallVectorImpl &interferingVRegs() const { - return InterferingVRegs; - } - - private: - Query(const Query&) = delete; - void operator=(const Query&) = delete; - }; - - // Array of LiveIntervalUnions. - class Array { - unsigned Size; - LiveIntervalUnion *LIUs; - public: - Array() : Size(0), LIUs(nullptr) {} - ~Array() { clear(); } - - // Initialize the array to have Size entries. - // Reuse an existing allocation if the size matches. - void init(LiveIntervalUnion::Allocator&, unsigned Size); - - unsigned size() const { return Size; } - - void clear(); - - LiveIntervalUnion& operator[](unsigned idx) { - assert(idx < Size && "idx out of bounds"); - return LIUs[idx]; - } - - const LiveIntervalUnion& operator[](unsigned Idx) const { - assert(Idx < Size && "Idx out of bounds"); - return LIUs[Idx]; - } - }; -}; - -} // end namespace llvm - -#endif // !defined(LLVM_CODEGEN_LIVEINTERVALUNION_H) diff --git a/llvm/include/llvm/CodeGen/LivePhysRegs.h b/llvm/include/llvm/CodeGen/LivePhysRegs.h deleted file mode 100644 index 1cea9d5b..00000000 --- a/llvm/include/llvm/CodeGen/LivePhysRegs.h +++ /dev/null @@ -1,153 +0,0 @@ -//===- llvm/CodeGen/LivePhysRegs.h - Live Physical Register Set -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the LivePhysRegs utility for tracking liveness of -// physical registers. This can be used for ad-hoc liveness tracking after -// register allocation. You can start with the live-ins/live-outs at the -// beginning/end of a block and update the information while walking the -// instructions inside the block. This implementation tracks the liveness on a -// sub-register granularity. -// -// We assume that the high bits of a physical super-register are not preserved -// unless the instruction has an implicit-use operand reading the super- -// register. -// -// X86 Example: -// %YMM0 = ... -// %XMM0 = ... (Kills %XMM0, all %XMM0s sub-registers, and %YMM0) -// -// %YMM0 = ... -// %XMM0 = ..., %YMM0 (%YMM0 and all its sub-registers are alive) -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LIVEPHYSREGS_H -#define LLVM_CODEGEN_LIVEPHYSREGS_H - -#include "llvm/ADT/SparseSet.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include - -namespace llvm { - -class MachineInstr; - -/// \brief A set of live physical registers with functions to track liveness -/// when walking backward/forward through a basic block. -class LivePhysRegs { - const TargetRegisterInfo *TRI; - SparseSet LiveRegs; - - LivePhysRegs(const LivePhysRegs&) = delete; - LivePhysRegs &operator=(const LivePhysRegs&) = delete; -public: - /// \brief Constructs a new empty LivePhysRegs set. - LivePhysRegs() : TRI(nullptr), LiveRegs() {} - - /// \brief Constructs and initialize an empty LivePhysRegs set. - LivePhysRegs(const TargetRegisterInfo *TRI) : TRI(TRI) { - assert(TRI && "Invalid TargetRegisterInfo pointer."); - LiveRegs.setUniverse(TRI->getNumRegs()); - } - - /// \brief Clear and initialize the LivePhysRegs set. - void init(const TargetRegisterInfo *TRI) { - assert(TRI && "Invalid TargetRegisterInfo pointer."); - this->TRI = TRI; - LiveRegs.clear(); - LiveRegs.setUniverse(TRI->getNumRegs()); - } - - /// \brief Clears the LivePhysRegs set. - void clear() { LiveRegs.clear(); } - - /// \brief Returns true if the set is empty. - bool empty() const { return LiveRegs.empty(); } - - /// \brief Adds a physical register and all its sub-registers to the set. - void addReg(unsigned Reg) { - assert(TRI && "LivePhysRegs is not initialized."); - assert(Reg <= TRI->getNumRegs() && "Expected a physical register."); - for (MCSubRegIterator SubRegs(Reg, TRI, /*IncludeSelf=*/true); - SubRegs.isValid(); ++SubRegs) - LiveRegs.insert(*SubRegs); - } - - /// \brief Removes a physical register, all its sub-registers, and all its - /// super-registers from the set. - void removeReg(unsigned Reg) { - assert(TRI && "LivePhysRegs is not initialized."); - assert(Reg <= TRI->getNumRegs() && "Expected a physical register."); - for (MCRegAliasIterator R(Reg, TRI, true); R.isValid(); ++R) - LiveRegs.erase(*R); - } - - /// \brief Removes physical registers clobbered by the regmask operand @p MO. - void removeRegsInMask(const MachineOperand &MO, - SmallVectorImpl> *Clobbers); - - /// \brief Returns true if register @p Reg is contained in the set. This also - /// works if only the super register of @p Reg has been defined, because - /// addReg() always adds all sub-registers to the set as well. - /// Note: Returns false if just some sub registers are live, use available() - /// when searching a free register. - bool contains(unsigned Reg) const { return LiveRegs.count(Reg); } - - /// Returns true if register \p Reg and no aliasing register is in the set. - bool available(const MachineRegisterInfo &MRI, unsigned Reg) const; - - /// \brief Simulates liveness when stepping backwards over an - /// instruction(bundle): Remove Defs, add uses. This is the recommended way of - /// calculating liveness. - void stepBackward(const MachineInstr &MI); - - /// \brief Simulates liveness when stepping forward over an - /// instruction(bundle): Remove killed-uses, add defs. This is the not - /// recommended way, because it depends on accurate kill flags. If possible - /// use stepBackward() instead of this function. - /// The clobbers set will be the list of registers either defined or clobbered - /// by a regmask. The operand will identify whether this is a regmask or - /// register operand. - void stepForward(const MachineInstr &MI, - SmallVectorImpl> &Clobbers); - - /// Adds all live-in registers of basic block @p MBB. - /// Live in registers are the registers in the blocks live-in list and the - /// pristine registers. - void addLiveIns(const MachineBasicBlock &MBB); - - /// Adds all live-out registers of basic block @p MBB. - /// Live out registers are the union of the live-in registers of the successor - /// blocks and pristine registers. Live out registers of the end block are the - /// callee saved registers. - void addLiveOuts(const MachineBasicBlock &MBB); - - /// Like addLiveOuts() but does not add pristine registers/callee saved - /// registers. - void addLiveOutsNoPristines(const MachineBasicBlock &MBB); - - typedef SparseSet::const_iterator const_iterator; - const_iterator begin() const { return LiveRegs.begin(); } - const_iterator end() const { return LiveRegs.end(); } - - /// \brief Prints the currently live registers to @p OS. - void print(raw_ostream &OS) const; - - /// \brief Dumps the currently live registers to the debug output. - void dump() const; -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const LivePhysRegs& LR) { - LR.print(OS); - return OS; -} - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/LiveRangeEdit.h b/llvm/include/llvm/CodeGen/LiveRangeEdit.h deleted file mode 100644 index 42507776..00000000 --- a/llvm/include/llvm/CodeGen/LiveRangeEdit.h +++ /dev/null @@ -1,258 +0,0 @@ -//===---- LiveRangeEdit.h - Basic tools for split and spill -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The LiveRangeEdit class represents changes done to a virtual register when it -// is spilled or split. -// -// The parent register is never changed. Instead, a number of new virtual -// registers are created and added to the newRegs vector. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LIVERANGEEDIT_H -#define LLVM_CODEGEN_LIVERANGEEDIT_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SetVector.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/CodeGen/LiveInterval.h" -#include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetSubtargetInfo.h" - -namespace llvm { - -class LiveIntervals; -class MachineBlockFrequencyInfo; -class MachineLoopInfo; -class VirtRegMap; - -class LiveRangeEdit : private MachineRegisterInfo::Delegate { -public: - /// Callback methods for LiveRangeEdit owners. - class Delegate { - virtual void anchor(); - public: - /// Called immediately before erasing a dead machine instruction. - virtual void LRE_WillEraseInstruction(MachineInstr *MI) {} - - /// Called when a virtual register is no longer used. Return false to defer - /// its deletion from LiveIntervals. - virtual bool LRE_CanEraseVirtReg(unsigned) { return true; } - - /// Called before shrinking the live range of a virtual register. - virtual void LRE_WillShrinkVirtReg(unsigned) {} - - /// Called after cloning a virtual register. - /// This is used for new registers representing connected components of Old. - virtual void LRE_DidCloneVirtReg(unsigned New, unsigned Old) {} - - virtual ~Delegate() {} - }; - -private: - LiveInterval *Parent; - SmallVectorImpl &NewRegs; - MachineRegisterInfo &MRI; - LiveIntervals &LIS; - VirtRegMap *VRM; - const TargetInstrInfo &TII; - Delegate *const TheDelegate; - - /// FirstNew - Index of the first register added to NewRegs. - const unsigned FirstNew; - - /// ScannedRemattable - true when remattable values have been identified. - bool ScannedRemattable; - - /// DeadRemats - The saved instructions which have already been dead after - /// rematerialization but not deleted yet -- to be done in postOptimization. - SmallPtrSet *DeadRemats; - - /// Remattable - Values defined by remattable instructions as identified by - /// tii.isTriviallyReMaterializable(). - SmallPtrSet Remattable; - - /// Rematted - Values that were actually rematted, and so need to have their - /// live range trimmed or entirely removed. - SmallPtrSet Rematted; - - /// scanRemattable - Identify the Parent values that may rematerialize. - void scanRemattable(AliasAnalysis *aa); - - /// allUsesAvailableAt - Return true if all registers used by OrigMI at - /// OrigIdx are also available with the same value at UseIdx. - bool allUsesAvailableAt(const MachineInstr *OrigMI, SlotIndex OrigIdx, - SlotIndex UseIdx) const; - - /// foldAsLoad - If LI has a single use and a single def that can be folded as - /// a load, eliminate the register by folding the def into the use. - bool foldAsLoad(LiveInterval *LI, SmallVectorImpl &Dead); - - typedef SetVector, - SmallPtrSet > ToShrinkSet; - /// Helper for eliminateDeadDefs. - void eliminateDeadDef(MachineInstr *MI, ToShrinkSet &ToShrink, - AliasAnalysis *AA); - - /// MachineRegisterInfo callback to notify when new virtual - /// registers are created. - void MRI_NoteNewVirtualRegister(unsigned VReg) override; - - /// \brief Check if MachineOperand \p MO is a last use/kill either in the - /// main live range of \p LI or in one of the matching subregister ranges. - bool useIsKill(const LiveInterval &LI, const MachineOperand &MO) const; - -public: - /// Create a LiveRangeEdit for breaking down parent into smaller pieces. - /// @param parent The register being spilled or split. - /// @param newRegs List to receive any new registers created. This needn't be - /// empty initially, any existing registers are ignored. - /// @param MF The MachineFunction the live range edit is taking place in. - /// @param lis The collection of all live intervals in this function. - /// @param vrm Map of virtual registers to physical registers for this - /// function. If NULL, no virtual register map updates will - /// be done. This could be the case if called before Regalloc. - /// @param deadRemats The collection of all the instructions defining an - /// original reg and are dead after remat. - LiveRangeEdit(LiveInterval *parent, SmallVectorImpl &newRegs, - MachineFunction &MF, LiveIntervals &lis, VirtRegMap *vrm, - Delegate *delegate = nullptr, - SmallPtrSet *deadRemats = nullptr) - : Parent(parent), NewRegs(newRegs), MRI(MF.getRegInfo()), LIS(lis), - VRM(vrm), TII(*MF.getSubtarget().getInstrInfo()), TheDelegate(delegate), - FirstNew(newRegs.size()), ScannedRemattable(false), - DeadRemats(deadRemats) { - MRI.setDelegate(this); - } - - ~LiveRangeEdit() override { MRI.resetDelegate(this); } - - LiveInterval &getParent() const { - assert(Parent && "No parent LiveInterval"); - return *Parent; - } - unsigned getReg() const { return getParent().reg; } - - /// Iterator for accessing the new registers added by this edit. - typedef SmallVectorImpl::const_iterator iterator; - iterator begin() const { return NewRegs.begin()+FirstNew; } - iterator end() const { return NewRegs.end(); } - unsigned size() const { return NewRegs.size()-FirstNew; } - bool empty() const { return size() == 0; } - unsigned get(unsigned idx) const { return NewRegs[idx+FirstNew]; } - - /// pop_back - It allows LiveRangeEdit users to drop new registers. - /// The context is when an original def instruction of a register is - /// dead after rematerialization, we still want to keep it for following - /// rematerializations. We save the def instruction in DeadRemats, - /// and replace the original dst register with a new dummy register so - /// the live range of original dst register can be shrinked normally. - /// We don't want to allocate phys register for the dummy register, so - /// we want to drop it from the NewRegs set. - void pop_back() { NewRegs.pop_back(); } - - ArrayRef regs() const { - return makeArrayRef(NewRegs).slice(FirstNew); - } - - /// createEmptyIntervalFrom - Create a new empty interval based on OldReg. - LiveInterval &createEmptyIntervalFrom(unsigned OldReg); - - /// createFrom - Create a new virtual register based on OldReg. - unsigned createFrom(unsigned OldReg); - - /// create - Create a new register with the same class and original slot as - /// parent. - LiveInterval &createEmptyInterval() { - return createEmptyIntervalFrom(getReg()); - } - - unsigned create() { - return createFrom(getReg()); - } - - /// anyRematerializable - Return true if any parent values may be - /// rematerializable. - /// This function must be called before any rematerialization is attempted. - bool anyRematerializable(AliasAnalysis*); - - /// checkRematerializable - Manually add VNI to the list of rematerializable - /// values if DefMI may be rematerializable. - bool checkRematerializable(VNInfo *VNI, const MachineInstr *DefMI, - AliasAnalysis*); - - /// Remat - Information needed to rematerialize at a specific location. - struct Remat { - VNInfo *ParentVNI; // parent_'s value at the remat location. - MachineInstr *OrigMI; // Instruction defining OrigVNI. It contains the - // real expr for remat. - explicit Remat(VNInfo *ParentVNI) : ParentVNI(ParentVNI), OrigMI(nullptr) {} - }; - - /// canRematerializeAt - Determine if ParentVNI can be rematerialized at - /// UseIdx. It is assumed that parent_.getVNINfoAt(UseIdx) == ParentVNI. - /// When cheapAsAMove is set, only cheap remats are allowed. - bool canRematerializeAt(Remat &RM, VNInfo *OrigVNI, SlotIndex UseIdx, - bool cheapAsAMove); - - /// rematerializeAt - Rematerialize RM.ParentVNI into DestReg by inserting an - /// instruction into MBB before MI. The new instruction is mapped, but - /// liveness is not updated. - /// Return the SlotIndex of the new instruction. - SlotIndex rematerializeAt(MachineBasicBlock &MBB, - MachineBasicBlock::iterator MI, - unsigned DestReg, - const Remat &RM, - const TargetRegisterInfo&, - bool Late = false); - - /// markRematerialized - explicitly mark a value as rematerialized after doing - /// it manually. - void markRematerialized(const VNInfo *ParentVNI) { - Rematted.insert(ParentVNI); - } - - /// didRematerialize - Return true if ParentVNI was rematerialized anywhere. - bool didRematerialize(const VNInfo *ParentVNI) const { - return Rematted.count(ParentVNI); - } - - void markDeadRemat(MachineInstr *inst) { - // DeadRemats is an optional field. - if (DeadRemats) - DeadRemats->insert(inst); - } - - /// eraseVirtReg - Notify the delegate that Reg is no longer in use, and try - /// to erase it from LIS. - void eraseVirtReg(unsigned Reg); - - /// eliminateDeadDefs - Try to delete machine instructions that are now dead - /// (allDefsAreDead returns true). This may cause live intervals to be trimmed - /// and further dead efs to be eliminated. - /// RegsBeingSpilled lists registers currently being spilled by the register - /// allocator. These registers should not be split into new intervals - /// as currently those new intervals are not guaranteed to spill. - void eliminateDeadDefs(SmallVectorImpl &Dead, - ArrayRef RegsBeingSpilled = None, - AliasAnalysis *AA = nullptr); - - /// calculateRegClassAndHint - Recompute register class and hint for each new - /// register. - void calculateRegClassAndHint(MachineFunction&, - const MachineLoopInfo&, - const MachineBlockFrequencyInfo&); -}; - -} - -#endif diff --git a/llvm/include/llvm/CodeGen/LiveRegMatrix.h b/llvm/include/llvm/CodeGen/LiveRegMatrix.h deleted file mode 100644 index e169058c..00000000 --- a/llvm/include/llvm/CodeGen/LiveRegMatrix.h +++ /dev/null @@ -1,148 +0,0 @@ -//===-- LiveRegMatrix.h - Track register interference ---------*- C++ -*---===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The LiveRegMatrix analysis pass keeps track of virtual register interference -// along two dimensions: Slot indexes and register units. The matrix is used by -// register allocators to ensure that no interfering virtual registers get -// assigned to overlapping physical registers. -// -// Register units are defined in MCRegisterInfo.h, they represent the smallest -// unit of interference when dealing with overlapping physical registers. The -// LiveRegMatrix is represented as a LiveIntervalUnion per register unit. When -// a virtual register is assigned to a physical register, the live range for -// the virtual register is inserted into the LiveIntervalUnion for each regunit -// in the physreg. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LIVEREGMATRIX_H -#define LLVM_CODEGEN_LIVEREGMATRIX_H - -#include "llvm/ADT/BitVector.h" -#include "llvm/CodeGen/LiveIntervalUnion.h" -#include "llvm/CodeGen/MachineFunctionPass.h" - -namespace llvm { - -class LiveInterval; -class LiveIntervalAnalysis; -class TargetRegisterInfo; -class VirtRegMap; - -class LiveRegMatrix : public MachineFunctionPass { - const TargetRegisterInfo *TRI; - LiveIntervals *LIS; - VirtRegMap *VRM; - - // UserTag changes whenever virtual registers have been modified. - unsigned UserTag; - - // The matrix is represented as a LiveIntervalUnion per register unit. - LiveIntervalUnion::Allocator LIUAlloc; - LiveIntervalUnion::Array Matrix; - - // Cached queries per register unit. - std::unique_ptr Queries; - - // Cached register mask interference info. - unsigned RegMaskTag; - unsigned RegMaskVirtReg; - BitVector RegMaskUsable; - - // MachineFunctionPass boilerplate. - void getAnalysisUsage(AnalysisUsage&) const override; - bool runOnMachineFunction(MachineFunction&) override; - void releaseMemory() override; -public: - static char ID; - LiveRegMatrix(); - - //===--------------------------------------------------------------------===// - // High-level interface. - //===--------------------------------------------------------------------===// - // - // Check for interference before assigning virtual registers to physical - // registers. - // - - /// Invalidate cached interference queries after modifying virtual register - /// live ranges. Interference checks may return stale information unless - /// caches are invalidated. - void invalidateVirtRegs() { ++UserTag; } - - enum InterferenceKind { - /// No interference, go ahead and assign. - IK_Free = 0, - - /// Virtual register interference. There are interfering virtual registers - /// assigned to PhysReg or its aliases. This interference could be resolved - /// by unassigning those other virtual registers. - IK_VirtReg, - - /// Register unit interference. A fixed live range is in the way, typically - /// argument registers for a call. This can't be resolved by unassigning - /// other virtual registers. - IK_RegUnit, - - /// RegMask interference. The live range is crossing an instruction with a - /// regmask operand that doesn't preserve PhysReg. This typically means - /// VirtReg is live across a call, and PhysReg isn't call-preserved. - IK_RegMask - }; - - /// Check for interference before assigning VirtReg to PhysReg. - /// If this function returns IK_Free, it is legal to assign(VirtReg, PhysReg). - /// When there is more than one kind of interference, the InterferenceKind - /// with the highest enum value is returned. - InterferenceKind checkInterference(LiveInterval &VirtReg, unsigned PhysReg); - - /// Assign VirtReg to PhysReg. - /// This will mark VirtReg's live range as occupied in the LiveRegMatrix and - /// update VirtRegMap. The live range is expected to be available in PhysReg. - void assign(LiveInterval &VirtReg, unsigned PhysReg); - - /// Unassign VirtReg from its PhysReg. - /// Assuming that VirtReg was previously assigned to a PhysReg, this undoes - /// the assignment and updates VirtRegMap accordingly. - void unassign(LiveInterval &VirtReg); - - /// Returns true if the given \p PhysReg has any live intervals assigned. - bool isPhysRegUsed(unsigned PhysReg) const; - - //===--------------------------------------------------------------------===// - // Low-level interface. - //===--------------------------------------------------------------------===// - // - // Provide access to the underlying LiveIntervalUnions. - // - - /// Check for regmask interference only. - /// Return true if VirtReg crosses a regmask operand that clobbers PhysReg. - /// If PhysReg is null, check if VirtReg crosses any regmask operands. - bool checkRegMaskInterference(LiveInterval &VirtReg, unsigned PhysReg = 0); - - /// Check for regunit interference only. - /// Return true if VirtReg overlaps a fixed assignment of one of PhysRegs's - /// register units. - bool checkRegUnitInterference(LiveInterval &VirtReg, unsigned PhysReg); - - /// Query a line of the assigned virtual register matrix directly. - /// Use MCRegUnitIterator to enumerate all regunits in the desired PhysReg. - /// This returns a reference to an internal Query data structure that is only - /// valid until the next query() call. - LiveIntervalUnion::Query &query(LiveInterval &VirtReg, unsigned RegUnit); - - /// Directly access the live interval unions per regunit. - /// This returns an array indexed by the regunit number. - LiveIntervalUnion *getLiveUnions() { return &Matrix[0]; } -}; - -} // end namespace llvm - -#endif // LLVM_CODEGEN_LIVEREGMATRIX_H diff --git a/llvm/include/llvm/CodeGen/LiveStackAnalysis.h b/llvm/include/llvm/CodeGen/LiveStackAnalysis.h deleted file mode 100644 index 3ffbe3d7..00000000 --- a/llvm/include/llvm/CodeGen/LiveStackAnalysis.h +++ /dev/null @@ -1,98 +0,0 @@ -//===-- LiveStackAnalysis.h - Live Stack Slot Analysis ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the live stack slot analysis pass. It is analogous to -// live interval analysis except it's analyzing liveness of stack slots rather -// than registers. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LIVESTACKANALYSIS_H -#define LLVM_CODEGEN_LIVESTACKANALYSIS_H - -#include "llvm/CodeGen/LiveInterval.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include -#include - -namespace llvm { - -class LiveStacks : public MachineFunctionPass { - const TargetRegisterInfo *TRI; - - /// Special pool allocator for VNInfo's (LiveInterval val#). - /// - VNInfo::Allocator VNInfoAllocator; - - /// S2IMap - Stack slot indices to live interval mapping. - /// - typedef std::unordered_map SS2IntervalMap; - SS2IntervalMap S2IMap; - - /// S2RCMap - Stack slot indices to register class mapping. - std::map S2RCMap; - -public: - static char ID; // Pass identification, replacement for typeid - LiveStacks() : MachineFunctionPass(ID) { - initializeLiveStacksPass(*PassRegistry::getPassRegistry()); - } - - typedef SS2IntervalMap::iterator iterator; - typedef SS2IntervalMap::const_iterator const_iterator; - const_iterator begin() const { return S2IMap.begin(); } - const_iterator end() const { return S2IMap.end(); } - iterator begin() { return S2IMap.begin(); } - iterator end() { return S2IMap.end(); } - - unsigned getNumIntervals() const { return (unsigned)S2IMap.size(); } - - LiveInterval &getOrCreateInterval(int Slot, const TargetRegisterClass *RC); - - LiveInterval &getInterval(int Slot) { - assert(Slot >= 0 && "Spill slot indice must be >= 0"); - SS2IntervalMap::iterator I = S2IMap.find(Slot); - assert(I != S2IMap.end() && "Interval does not exist for stack slot"); - return I->second; - } - - const LiveInterval &getInterval(int Slot) const { - assert(Slot >= 0 && "Spill slot indice must be >= 0"); - SS2IntervalMap::const_iterator I = S2IMap.find(Slot); - assert(I != S2IMap.end() && "Interval does not exist for stack slot"); - return I->second; - } - - bool hasInterval(int Slot) const { return S2IMap.count(Slot); } - - const TargetRegisterClass *getIntervalRegClass(int Slot) const { - assert(Slot >= 0 && "Spill slot indice must be >= 0"); - std::map::const_iterator I = - S2RCMap.find(Slot); - assert(I != S2RCMap.end() && - "Register class info does not exist for stack slot"); - return I->second; - } - - VNInfo::Allocator &getVNInfoAllocator() { return VNInfoAllocator; } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - void releaseMemory() override; - - /// runOnMachineFunction - pass entry point - bool runOnMachineFunction(MachineFunction &) override; - - /// print - Implement the dump method. - void print(raw_ostream &O, const Module * = nullptr) const override; -}; -} - -#endif /* LLVM_CODEGEN_LIVESTACK_ANALYSIS_H */ diff --git a/llvm/include/llvm/CodeGen/LiveVariables.h b/llvm/include/llvm/CodeGen/LiveVariables.h deleted file mode 100644 index bc210dda..00000000 --- a/llvm/include/llvm/CodeGen/LiveVariables.h +++ /dev/null @@ -1,310 +0,0 @@ -//===-- llvm/CodeGen/LiveVariables.h - Live Variable Analysis ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the LiveVariables analysis pass. For each machine -// instruction in the function, this pass calculates the set of registers that -// are immediately dead after the instruction (i.e., the instruction calculates -// the value, but it is never used) and the set of registers that are used by -// the instruction, but are never used after the instruction (i.e., they are -// killed). -// -// This class computes live variables using a sparse implementation based on -// the machine code SSA form. This class computes live variable information for -// each virtual and _register allocatable_ physical register in a function. It -// uses the dominance properties of SSA form to efficiently compute live -// variables for virtual registers, and assumes that physical registers are only -// live within a single basic block (allowing it to do a single local analysis -// to resolve physical register lifetimes in each basic block). If a physical -// register is not register allocatable, it is not tracked. This is useful for -// things like the stack pointer and condition codes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_LIVEVARIABLES_H -#define LLVM_CODEGEN_LIVEVARIABLES_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/IndexedMap.h" -#include "llvm/ADT/SmallSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/SparseBitVector.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineInstr.h" -#include "llvm/Target/TargetRegisterInfo.h" - -namespace llvm { - -class MachineBasicBlock; -class MachineRegisterInfo; - -class LiveVariables : public MachineFunctionPass { -public: - static char ID; // Pass identification, replacement for typeid - LiveVariables() : MachineFunctionPass(ID) { - initializeLiveVariablesPass(*PassRegistry::getPassRegistry()); - } - - /// VarInfo - This represents the regions where a virtual register is live in - /// the program. We represent this with three different pieces of - /// information: the set of blocks in which the instruction is live - /// throughout, the set of blocks in which the instruction is actually used, - /// and the set of non-phi instructions that are the last users of the value. - /// - /// In the common case where a value is defined and killed in the same block, - /// There is one killing instruction, and AliveBlocks is empty. - /// - /// Otherwise, the value is live out of the block. If the value is live - /// throughout any blocks, these blocks are listed in AliveBlocks. Blocks - /// where the liveness range ends are not included in AliveBlocks, instead - /// being captured by the Kills set. In these blocks, the value is live into - /// the block (unless the value is defined and killed in the same block) and - /// lives until the specified instruction. Note that there cannot ever be a - /// value whose Kills set contains two instructions from the same basic block. - /// - /// PHI nodes complicate things a bit. If a PHI node is the last user of a - /// value in one of its predecessor blocks, it is not listed in the kills set, - /// but does include the predecessor block in the AliveBlocks set (unless that - /// block also defines the value). This leads to the (perfectly sensical) - /// situation where a value is defined in a block, and the last use is a phi - /// node in the successor. In this case, AliveBlocks is empty (the value is - /// not live across any blocks) and Kills is empty (phi nodes are not - /// included). This is sensical because the value must be live to the end of - /// the block, but is not live in any successor blocks. - struct VarInfo { - /// AliveBlocks - Set of blocks in which this value is alive completely - /// through. This is a bit set which uses the basic block number as an - /// index. - /// - SparseBitVector<> AliveBlocks; - - /// Kills - List of MachineInstruction's which are the last use of this - /// virtual register (kill it) in their basic block. - /// - std::vector Kills; - - /// removeKill - Delete a kill corresponding to the specified - /// machine instruction. Returns true if there was a kill - /// corresponding to this instruction, false otherwise. - bool removeKill(MachineInstr &MI) { - std::vector::iterator I = - std::find(Kills.begin(), Kills.end(), &MI); - if (I == Kills.end()) - return false; - Kills.erase(I); - return true; - } - - /// findKill - Find a kill instruction in MBB. Return NULL if none is found. - MachineInstr *findKill(const MachineBasicBlock *MBB) const; - - /// isLiveIn - Is Reg live in to MBB? This means that Reg is live through - /// MBB, or it is killed in MBB. If Reg is only used by PHI instructions in - /// MBB, it is not considered live in. - bool isLiveIn(const MachineBasicBlock &MBB, - unsigned Reg, - MachineRegisterInfo &MRI); - - void dump() const; - }; - -private: - /// VirtRegInfo - This list is a mapping from virtual register number to - /// variable information. - /// - IndexedMap VirtRegInfo; - - /// PHIJoins - list of virtual registers that are PHI joins. These registers - /// may have multiple definitions, and they require special handling when - /// building live intervals. - SparseBitVector<> PHIJoins; - -private: // Intermediate data structures - MachineFunction *MF; - - MachineRegisterInfo* MRI; - - const TargetRegisterInfo *TRI; - - // PhysRegInfo - Keep track of which instruction was the last def of a - // physical register. This is a purely local property, because all physical - // register references are presumed dead across basic blocks. - std::vector PhysRegDef; - - // PhysRegInfo - Keep track of which instruction was the last use of a - // physical register. This is a purely local property, because all physical - // register references are presumed dead across basic blocks. - std::vector PhysRegUse; - - std::vector> PHIVarInfo; - - // DistanceMap - Keep track the distance of a MI from the start of the - // current basic block. - DenseMap DistanceMap; - - /// HandlePhysRegKill - Add kills of Reg and its sub-registers to the - /// uses. Pay special attention to the sub-register uses which may come below - /// the last use of the whole register. - bool HandlePhysRegKill(unsigned Reg, MachineInstr *MI); - - /// HandleRegMask - Call HandlePhysRegKill for all registers clobbered by Mask. - void HandleRegMask(const MachineOperand&); - - void HandlePhysRegUse(unsigned Reg, MachineInstr &MI); - void HandlePhysRegDef(unsigned Reg, MachineInstr *MI, - SmallVectorImpl &Defs); - void UpdatePhysRegDefs(MachineInstr &MI, SmallVectorImpl &Defs); - - /// FindLastRefOrPartRef - Return the last reference or partial reference of - /// the specified register. - MachineInstr *FindLastRefOrPartRef(unsigned Reg); - - /// FindLastPartialDef - Return the last partial def of the specified - /// register. Also returns the sub-registers that're defined by the - /// instruction. - MachineInstr *FindLastPartialDef(unsigned Reg, - SmallSet &PartDefRegs); - - /// analyzePHINodes - Gather information about the PHI nodes in here. In - /// particular, we want to map the variable information of a virtual - /// register which is used in a PHI node. We map that to the BB the vreg - /// is coming from. - void analyzePHINodes(const MachineFunction& Fn); - - void runOnInstr(MachineInstr &MI, SmallVectorImpl &Defs); - - void runOnBlock(MachineBasicBlock *MBB, unsigned NumRegs); -public: - - bool runOnMachineFunction(MachineFunction &MF) override; - - /// RegisterDefIsDead - Return true if the specified instruction defines the - /// specified register, but that definition is dead. - bool RegisterDefIsDead(MachineInstr &MI, unsigned Reg) const; - - //===--------------------------------------------------------------------===// - // API to update live variable information - - /// replaceKillInstruction - Update register kill info by replacing a kill - /// instruction with a new one. - void replaceKillInstruction(unsigned Reg, MachineInstr &OldMI, - MachineInstr &NewMI); - - /// addVirtualRegisterKilled - Add information about the fact that the - /// specified register is killed after being used by the specified - /// instruction. If AddIfNotFound is true, add a implicit operand if it's - /// not found. - void addVirtualRegisterKilled(unsigned IncomingReg, MachineInstr &MI, - bool AddIfNotFound = false) { - if (MI.addRegisterKilled(IncomingReg, TRI, AddIfNotFound)) - getVarInfo(IncomingReg).Kills.push_back(&MI); - } - - /// removeVirtualRegisterKilled - Remove the specified kill of the virtual - /// register from the live variable information. Returns true if the - /// variable was marked as killed by the specified instruction, - /// false otherwise. - bool removeVirtualRegisterKilled(unsigned reg, MachineInstr &MI) { - if (!getVarInfo(reg).removeKill(MI)) - return false; - - bool Removed = false; - for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) { - MachineOperand &MO = MI.getOperand(i); - if (MO.isReg() && MO.isKill() && MO.getReg() == reg) { - MO.setIsKill(false); - Removed = true; - break; - } - } - - assert(Removed && "Register is not used by this instruction!"); - (void)Removed; - return true; - } - - /// removeVirtualRegistersKilled - Remove all killed info for the specified - /// instruction. - void removeVirtualRegistersKilled(MachineInstr &MI); - - /// addVirtualRegisterDead - Add information about the fact that the specified - /// register is dead after being used by the specified instruction. If - /// AddIfNotFound is true, add a implicit operand if it's not found. - void addVirtualRegisterDead(unsigned IncomingReg, MachineInstr &MI, - bool AddIfNotFound = false) { - if (MI.addRegisterDead(IncomingReg, TRI, AddIfNotFound)) - getVarInfo(IncomingReg).Kills.push_back(&MI); - } - - /// removeVirtualRegisterDead - Remove the specified kill of the virtual - /// register from the live variable information. Returns true if the - /// variable was marked dead at the specified instruction, false - /// otherwise. - bool removeVirtualRegisterDead(unsigned reg, MachineInstr &MI) { - if (!getVarInfo(reg).removeKill(MI)) - return false; - - bool Removed = false; - for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) { - MachineOperand &MO = MI.getOperand(i); - if (MO.isReg() && MO.isDef() && MO.getReg() == reg) { - MO.setIsDead(false); - Removed = true; - break; - } - } - assert(Removed && "Register is not defined by this instruction!"); - (void)Removed; - return true; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - void releaseMemory() override { - VirtRegInfo.clear(); - } - - /// getVarInfo - Return the VarInfo structure for the specified VIRTUAL - /// register. - VarInfo &getVarInfo(unsigned RegIdx); - - void MarkVirtRegAliveInBlock(VarInfo& VRInfo, MachineBasicBlock* DefBlock, - MachineBasicBlock *BB); - void MarkVirtRegAliveInBlock(VarInfo& VRInfo, MachineBasicBlock* DefBlock, - MachineBasicBlock *BB, - std::vector &WorkList); - void HandleVirtRegDef(unsigned reg, MachineInstr &MI); - void HandleVirtRegUse(unsigned reg, MachineBasicBlock *MBB, MachineInstr &MI); - - bool isLiveIn(unsigned Reg, const MachineBasicBlock &MBB) { - return getVarInfo(Reg).isLiveIn(MBB, Reg, *MRI); - } - - /// isLiveOut - Determine if Reg is live out from MBB, when not considering - /// PHI nodes. This means that Reg is either killed by a successor block or - /// passed through one. - bool isLiveOut(unsigned Reg, const MachineBasicBlock &MBB); - - /// addNewBlock - Add a new basic block BB between DomBB and SuccBB. All - /// variables that are live out of DomBB and live into SuccBB will be marked - /// as passing live through BB. This method assumes that the machine code is - /// still in SSA form. - void addNewBlock(MachineBasicBlock *BB, - MachineBasicBlock *DomBB, - MachineBasicBlock *SuccBB); - - /// isPHIJoin - Return true if Reg is a phi join register. - bool isPHIJoin(unsigned Reg) { return PHIJoins.test(Reg); } - - /// setPHIJoin - Mark Reg as a phi join register. - void setPHIJoin(unsigned Reg) { PHIJoins.set(Reg); } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MIRParser/MIRParser.h b/llvm/include/llvm/CodeGen/MIRParser/MIRParser.h deleted file mode 100644 index dd078039..00000000 --- a/llvm/include/llvm/CodeGen/MIRParser/MIRParser.h +++ /dev/null @@ -1,81 +0,0 @@ -//===- MIRParser.h - MIR serialization format parser ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This MIR serialization library is currently a work in progress. It can't -// serialize machine functions at this time. -// -// This file declares the functions that parse the MIR serialization format -// files. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MIRPARSER_MIRPARSER_H -#define LLVM_CODEGEN_MIRPARSER_MIRPARSER_H - -#include "llvm/CodeGen/MachineFunctionInitializer.h" -#include "llvm/IR/Module.h" -#include "llvm/Support/MemoryBuffer.h" -#include - -namespace llvm { - -class StringRef; -class MIRParserImpl; -class SMDiagnostic; - -/// This class initializes machine functions by applying the state loaded from -/// a MIR file. -class MIRParser : public MachineFunctionInitializer { - std::unique_ptr Impl; - -public: - MIRParser(std::unique_ptr Impl); - MIRParser(const MIRParser &) = delete; - ~MIRParser() override; - - /// Parse the optional LLVM IR module that's embedded in the MIR file. - /// - /// A new, empty module is created if the LLVM IR isn't present. - /// Returns null if a parsing error occurred. - std::unique_ptr parseLLVMModule(); - - /// Initialize the machine function to the state that's described in the MIR - /// file. - /// - /// Return true if error occurred. - bool initializeMachineFunction(MachineFunction &MF) override; -}; - -/// This function is the main interface to the MIR serialization format parser. -/// -/// It reads in a MIR file and returns a MIR parser that can parse the embedded -/// LLVM IR module and initialize the machine functions by parsing the machine -/// function's state. -/// -/// \param Filename - The name of the file to parse. -/// \param Error - Error result info. -/// \param Context - Context which will be used for the parsed LLVM IR module. -std::unique_ptr createMIRParserFromFile(StringRef Filename, - SMDiagnostic &Error, - LLVMContext &Context); - -/// This function is another interface to the MIR serialization format parser. -/// -/// It returns a MIR parser that works with the given memory buffer and that can -/// parse the embedded LLVM IR module and initialize the machine functions by -/// parsing the machine function's state. -/// -/// \param Contents - The MemoryBuffer containing the machine level IR. -/// \param Context - Context which will be used for the parsed LLVM IR module. -std::unique_ptr -createMIRParser(std::unique_ptr Contents, LLVMContext &Context); - -} // end namespace llvm - -#endif // LLVM_CODEGEN_MIRPARSER_MIRPARSER_H diff --git a/llvm/include/llvm/CodeGen/MIRYamlMapping.h b/llvm/include/llvm/CodeGen/MIRYamlMapping.h deleted file mode 100644 index 7f9c4483..00000000 --- a/llvm/include/llvm/CodeGen/MIRYamlMapping.h +++ /dev/null @@ -1,430 +0,0 @@ -//===- MIRYAMLMapping.h - Describes the mapping between MIR and YAML ------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the mapping between various MIR data structures and -// their corresponding YAML representation. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_CODEGEN_MIRYAMLMAPPING_H -#define LLVM_LIB_CODEGEN_MIRYAMLMAPPING_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/CodeGen/MachineJumpTableInfo.h" -#include "llvm/Support/YAMLTraits.h" -#include - -namespace llvm { -namespace yaml { - -/// A wrapper around std::string which contains a source range that's being -/// set during parsing. -struct StringValue { - std::string Value; - SMRange SourceRange; - - StringValue() {} - StringValue(std::string Value) : Value(std::move(Value)) {} - - bool operator==(const StringValue &Other) const { - return Value == Other.Value; - } -}; - -template <> struct ScalarTraits { - static void output(const StringValue &S, void *, llvm::raw_ostream &OS) { - OS << S.Value; - } - - static StringRef input(StringRef Scalar, void *Ctx, StringValue &S) { - S.Value = Scalar.str(); - if (const auto *Node = - reinterpret_cast(Ctx)->getCurrentNode()) - S.SourceRange = Node->getSourceRange(); - return ""; - } - - static bool mustQuote(StringRef Scalar) { return needsQuotes(Scalar); } -}; - -struct FlowStringValue : StringValue { - FlowStringValue() {} - FlowStringValue(std::string Value) : StringValue(Value) {} -}; - -template <> struct ScalarTraits { - static void output(const FlowStringValue &S, void *, llvm::raw_ostream &OS) { - return ScalarTraits::output(S, nullptr, OS); - } - - static StringRef input(StringRef Scalar, void *Ctx, FlowStringValue &S) { - return ScalarTraits::input(Scalar, Ctx, S); - } - - static bool mustQuote(StringRef Scalar) { return needsQuotes(Scalar); } -}; - -struct BlockStringValue { - StringValue Value; -}; - -template <> struct BlockScalarTraits { - static void output(const BlockStringValue &S, void *Ctx, raw_ostream &OS) { - return ScalarTraits::output(S.Value, Ctx, OS); - } - - static StringRef input(StringRef Scalar, void *Ctx, BlockStringValue &S) { - return ScalarTraits::input(Scalar, Ctx, S.Value); - } -}; - -/// A wrapper around unsigned which contains a source range that's being set -/// during parsing. -struct UnsignedValue { - unsigned Value; - SMRange SourceRange; - - UnsignedValue() : Value(0) {} - UnsignedValue(unsigned Value) : Value(Value) {} - - bool operator==(const UnsignedValue &Other) const { - return Value == Other.Value; - } -}; - -template <> struct ScalarTraits { - static void output(const UnsignedValue &Value, void *Ctx, raw_ostream &OS) { - return ScalarTraits::output(Value.Value, Ctx, OS); - } - - static StringRef input(StringRef Scalar, void *Ctx, UnsignedValue &Value) { - if (const auto *Node = - reinterpret_cast(Ctx)->getCurrentNode()) - Value.SourceRange = Node->getSourceRange(); - return ScalarTraits::input(Scalar, Ctx, Value.Value); - } - - static bool mustQuote(StringRef Scalar) { - return ScalarTraits::mustQuote(Scalar); - } -}; - -template <> struct ScalarEnumerationTraits { - static void enumeration(yaml::IO &IO, - MachineJumpTableInfo::JTEntryKind &EntryKind) { - IO.enumCase(EntryKind, "block-address", - MachineJumpTableInfo::EK_BlockAddress); - IO.enumCase(EntryKind, "gp-rel64-block-address", - MachineJumpTableInfo::EK_GPRel64BlockAddress); - IO.enumCase(EntryKind, "gp-rel32-block-address", - MachineJumpTableInfo::EK_GPRel32BlockAddress); - IO.enumCase(EntryKind, "label-difference32", - MachineJumpTableInfo::EK_LabelDifference32); - IO.enumCase(EntryKind, "inline", MachineJumpTableInfo::EK_Inline); - IO.enumCase(EntryKind, "custom32", MachineJumpTableInfo::EK_Custom32); - } -}; - -} // end namespace yaml -} // end namespace llvm - -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::StringValue) -LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(llvm::yaml::FlowStringValue) -LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(llvm::yaml::UnsignedValue) - -namespace llvm { -namespace yaml { - -struct VirtualRegisterDefinition { - UnsignedValue ID; - StringValue Class; - StringValue PreferredRegister; - // TODO: Serialize the target specific register hints. -}; - -template <> struct MappingTraits { - static void mapping(IO &YamlIO, VirtualRegisterDefinition &Reg) { - YamlIO.mapRequired("id", Reg.ID); - YamlIO.mapRequired("class", Reg.Class); - YamlIO.mapOptional("preferred-register", Reg.PreferredRegister, - StringValue()); // Don't print out when it's empty. - } - - static const bool flow = true; -}; - -struct MachineFunctionLiveIn { - StringValue Register; - StringValue VirtualRegister; -}; - -template <> struct MappingTraits { - static void mapping(IO &YamlIO, MachineFunctionLiveIn &LiveIn) { - YamlIO.mapRequired("reg", LiveIn.Register); - YamlIO.mapOptional( - "virtual-reg", LiveIn.VirtualRegister, - StringValue()); // Don't print the virtual register when it's empty. - } - - static const bool flow = true; -}; - -/// Serializable representation of stack object from the MachineFrameInfo class. -/// -/// The flags 'isImmutable' and 'isAliased' aren't serialized, as they are -/// determined by the object's type and frame information flags. -/// Dead stack objects aren't serialized. -/// -/// The 'isPreallocated' flag is determined by the local offset. -struct MachineStackObject { - enum ObjectType { DefaultType, SpillSlot, VariableSized }; - UnsignedValue ID; - StringValue Name; - // TODO: Serialize unnamed LLVM alloca reference. - ObjectType Type = DefaultType; - int64_t Offset = 0; - uint64_t Size = 0; - unsigned Alignment = 0; - StringValue CalleeSavedRegister; - Optional LocalOffset; - StringValue DebugVar; - StringValue DebugExpr; - StringValue DebugLoc; -}; - -template <> struct ScalarEnumerationTraits { - static void enumeration(yaml::IO &IO, MachineStackObject::ObjectType &Type) { - IO.enumCase(Type, "default", MachineStackObject::DefaultType); - IO.enumCase(Type, "spill-slot", MachineStackObject::SpillSlot); - IO.enumCase(Type, "variable-sized", MachineStackObject::VariableSized); - } -}; - -template <> struct MappingTraits { - static void mapping(yaml::IO &YamlIO, MachineStackObject &Object) { - YamlIO.mapRequired("id", Object.ID); - YamlIO.mapOptional("name", Object.Name, - StringValue()); // Don't print out an empty name. - YamlIO.mapOptional( - "type", Object.Type, - MachineStackObject::DefaultType); // Don't print the default type. - YamlIO.mapOptional("offset", Object.Offset); - if (Object.Type != MachineStackObject::VariableSized) - YamlIO.mapRequired("size", Object.Size); - YamlIO.mapOptional("alignment", Object.Alignment); - YamlIO.mapOptional("callee-saved-register", Object.CalleeSavedRegister, - StringValue()); // Don't print it out when it's empty. - YamlIO.mapOptional("local-offset", Object.LocalOffset); - YamlIO.mapOptional("di-variable", Object.DebugVar, - StringValue()); // Don't print it out when it's empty. - YamlIO.mapOptional("di-expression", Object.DebugExpr, - StringValue()); // Don't print it out when it's empty. - YamlIO.mapOptional("di-location", Object.DebugLoc, - StringValue()); // Don't print it out when it's empty. - } - - static const bool flow = true; -}; - -/// Serializable representation of the fixed stack object from the -/// MachineFrameInfo class. -struct FixedMachineStackObject { - enum ObjectType { DefaultType, SpillSlot }; - UnsignedValue ID; - ObjectType Type = DefaultType; - int64_t Offset = 0; - uint64_t Size = 0; - unsigned Alignment = 0; - bool IsImmutable = false; - bool IsAliased = false; - StringValue CalleeSavedRegister; -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(yaml::IO &IO, - FixedMachineStackObject::ObjectType &Type) { - IO.enumCase(Type, "default", FixedMachineStackObject::DefaultType); - IO.enumCase(Type, "spill-slot", FixedMachineStackObject::SpillSlot); - } -}; - -template <> struct MappingTraits { - static void mapping(yaml::IO &YamlIO, FixedMachineStackObject &Object) { - YamlIO.mapRequired("id", Object.ID); - YamlIO.mapOptional( - "type", Object.Type, - FixedMachineStackObject::DefaultType); // Don't print the default type. - YamlIO.mapOptional("offset", Object.Offset); - YamlIO.mapOptional("size", Object.Size); - YamlIO.mapOptional("alignment", Object.Alignment); - if (Object.Type != FixedMachineStackObject::SpillSlot) { - YamlIO.mapOptional("isImmutable", Object.IsImmutable); - YamlIO.mapOptional("isAliased", Object.IsAliased); - } - YamlIO.mapOptional("callee-saved-register", Object.CalleeSavedRegister, - StringValue()); // Don't print it out when it's empty. - } - - static const bool flow = true; -}; - -struct MachineConstantPoolValue { - UnsignedValue ID; - StringValue Value; - unsigned Alignment = 0; -}; - -template <> struct MappingTraits { - static void mapping(IO &YamlIO, MachineConstantPoolValue &Constant) { - YamlIO.mapRequired("id", Constant.ID); - YamlIO.mapOptional("value", Constant.Value); - YamlIO.mapOptional("alignment", Constant.Alignment); - } -}; - -struct MachineJumpTable { - struct Entry { - UnsignedValue ID; - std::vector Blocks; - }; - - MachineJumpTableInfo::JTEntryKind Kind = MachineJumpTableInfo::EK_Custom32; - std::vector Entries; -}; - -template <> struct MappingTraits { - static void mapping(IO &YamlIO, MachineJumpTable::Entry &Entry) { - YamlIO.mapRequired("id", Entry.ID); - YamlIO.mapOptional("blocks", Entry.Blocks); - } -}; - -} // end namespace yaml -} // end namespace llvm - -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::MachineFunctionLiveIn) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::VirtualRegisterDefinition) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::MachineStackObject) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::FixedMachineStackObject) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::MachineConstantPoolValue) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::MachineJumpTable::Entry) - -namespace llvm { -namespace yaml { - -template <> struct MappingTraits { - static void mapping(IO &YamlIO, MachineJumpTable &JT) { - YamlIO.mapRequired("kind", JT.Kind); - YamlIO.mapOptional("entries", JT.Entries); - } -}; - -/// Serializable representation of MachineFrameInfo. -/// -/// Doesn't serialize attributes like 'StackAlignment', 'IsStackRealignable' and -/// 'RealignOption' as they are determined by the target and LLVM function -/// attributes. -/// It also doesn't serialize attributes like 'NumFixedObject' and -/// 'HasVarSizedObjects' as they are determined by the frame objects themselves. -struct MachineFrameInfo { - bool IsFrameAddressTaken = false; - bool IsReturnAddressTaken = false; - bool HasStackMap = false; - bool HasPatchPoint = false; - uint64_t StackSize = 0; - int OffsetAdjustment = 0; - unsigned MaxAlignment = 0; - bool AdjustsStack = false; - bool HasCalls = false; - StringValue StackProtector; - // TODO: Serialize FunctionContextIdx - unsigned MaxCallFrameSize = 0; - bool HasOpaqueSPAdjustment = false; - bool HasVAStart = false; - bool HasMustTailInVarArgFunc = false; - StringValue SavePoint; - StringValue RestorePoint; -}; - -template <> struct MappingTraits { - static void mapping(IO &YamlIO, MachineFrameInfo &MFI) { - YamlIO.mapOptional("isFrameAddressTaken", MFI.IsFrameAddressTaken); - YamlIO.mapOptional("isReturnAddressTaken", MFI.IsReturnAddressTaken); - YamlIO.mapOptional("hasStackMap", MFI.HasStackMap); - YamlIO.mapOptional("hasPatchPoint", MFI.HasPatchPoint); - YamlIO.mapOptional("stackSize", MFI.StackSize); - YamlIO.mapOptional("offsetAdjustment", MFI.OffsetAdjustment); - YamlIO.mapOptional("maxAlignment", MFI.MaxAlignment); - YamlIO.mapOptional("adjustsStack", MFI.AdjustsStack); - YamlIO.mapOptional("hasCalls", MFI.HasCalls); - YamlIO.mapOptional("stackProtector", MFI.StackProtector, - StringValue()); // Don't print it out when it's empty. - YamlIO.mapOptional("maxCallFrameSize", MFI.MaxCallFrameSize); - YamlIO.mapOptional("hasOpaqueSPAdjustment", MFI.HasOpaqueSPAdjustment); - YamlIO.mapOptional("hasVAStart", MFI.HasVAStart); - YamlIO.mapOptional("hasMustTailInVarArgFunc", MFI.HasMustTailInVarArgFunc); - YamlIO.mapOptional("savePoint", MFI.SavePoint, - StringValue()); // Don't print it out when it's empty. - YamlIO.mapOptional("restorePoint", MFI.RestorePoint, - StringValue()); // Don't print it out when it's empty. - } -}; - -struct MachineFunction { - StringRef Name; - unsigned Alignment = 0; - bool ExposesReturnsTwice = false; - bool HasInlineAsm = false; - // MachineFunctionProperties - bool AllVRegsAllocated = false; - // Register information - bool IsSSA = false; - bool TracksRegLiveness = false; - bool TracksSubRegLiveness = false; - std::vector VirtualRegisters; - std::vector LiveIns; - Optional> CalleeSavedRegisters; - // TODO: Serialize the various register masks. - // Frame information - MachineFrameInfo FrameInfo; - std::vector FixedStackObjects; - std::vector StackObjects; - std::vector Constants; /// Constant pool. - MachineJumpTable JumpTableInfo; - BlockStringValue Body; -}; - -template <> struct MappingTraits { - static void mapping(IO &YamlIO, MachineFunction &MF) { - YamlIO.mapRequired("name", MF.Name); - YamlIO.mapOptional("alignment", MF.Alignment); - YamlIO.mapOptional("exposesReturnsTwice", MF.ExposesReturnsTwice); - YamlIO.mapOptional("hasInlineAsm", MF.HasInlineAsm); - YamlIO.mapOptional("allVRegsAllocated", MF.AllVRegsAllocated); - YamlIO.mapOptional("isSSA", MF.IsSSA); - YamlIO.mapOptional("tracksRegLiveness", MF.TracksRegLiveness); - YamlIO.mapOptional("tracksSubRegLiveness", MF.TracksSubRegLiveness); - YamlIO.mapOptional("registers", MF.VirtualRegisters); - YamlIO.mapOptional("liveins", MF.LiveIns); - YamlIO.mapOptional("calleeSavedRegisters", MF.CalleeSavedRegisters); - YamlIO.mapOptional("frameInfo", MF.FrameInfo); - YamlIO.mapOptional("fixedStack", MF.FixedStackObjects); - YamlIO.mapOptional("stack", MF.StackObjects); - YamlIO.mapOptional("constants", MF.Constants); - if (!YamlIO.outputting() || !MF.JumpTableInfo.Entries.empty()) - YamlIO.mapOptional("jumpTable", MF.JumpTableInfo); - YamlIO.mapOptional("body", MF.Body); - } -}; - -} // end namespace yaml -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachORelocation.h b/llvm/include/llvm/CodeGen/MachORelocation.h deleted file mode 100644 index 8c9b7a84..00000000 --- a/llvm/include/llvm/CodeGen/MachORelocation.h +++ /dev/null @@ -1,56 +0,0 @@ -//=== MachORelocation.h - Mach-O Relocation Info ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MachORelocation class. -// -//===----------------------------------------------------------------------===// - - -#ifndef LLVM_CODEGEN_MACHORELOCATION_H -#define LLVM_CODEGEN_MACHORELOCATION_H - -#include "llvm/Support/DataTypes.h" - -namespace llvm { - - /// MachORelocation - This struct contains information about each relocation - /// that needs to be emitted to the file. - /// see - class MachORelocation { - uint32_t r_address; // offset in the section to what is being relocated - uint32_t r_symbolnum; // symbol index if r_extern == 1 else section index - bool r_pcrel; // was relocated pc-relative already - uint8_t r_length; // length = 2 ^ r_length - bool r_extern; // - uint8_t r_type; // if not 0, machine-specific relocation type. - bool r_scattered; // 1 = scattered, 0 = non-scattered - int32_t r_value; // the value the item to be relocated is referring - // to. - public: - uint32_t getPackedFields() const { - if (r_scattered) - return (1 << 31) | (r_pcrel << 30) | ((r_length & 3) << 28) | - ((r_type & 15) << 24) | (r_address & 0x00FFFFFF); - else - return (r_symbolnum << 8) | (r_pcrel << 7) | ((r_length & 3) << 5) | - (r_extern << 4) | (r_type & 15); - } - uint32_t getAddress() const { return r_scattered ? r_value : r_address; } - uint32_t getRawAddress() const { return r_address; } - - MachORelocation(uint32_t addr, uint32_t index, bool pcrel, uint8_t len, - bool ext, uint8_t type, bool scattered = false, - int32_t value = 0) : - r_address(addr), r_symbolnum(index), r_pcrel(pcrel), r_length(len), - r_extern(ext), r_type(type), r_scattered(scattered), r_value(value) {} - }; - -} // end llvm namespace - -#endif // LLVM_CODEGEN_MACHORELOCATION_H diff --git a/llvm/include/llvm/CodeGen/MachineBasicBlock.h b/llvm/include/llvm/CodeGen/MachineBasicBlock.h deleted file mode 100644 index 2923371c..00000000 --- a/llvm/include/llvm/CodeGen/MachineBasicBlock.h +++ /dev/null @@ -1,832 +0,0 @@ -//===-- llvm/CodeGen/MachineBasicBlock.h ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Collect the sequence of machine instructions for a basic block. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEBASICBLOCK_H -#define LLVM_CODEGEN_MACHINEBASICBLOCK_H - -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/CodeGen/MachineInstrBundleIterator.h" -#include "llvm/CodeGen/MachineInstr.h" -#include "llvm/Support/BranchProbability.h" -#include "llvm/MC/MCRegisterInfo.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -class Pass; -class BasicBlock; -class MachineFunction; -class MCSymbol; -class MIPrinter; -class SlotIndexes; -class StringRef; -class raw_ostream; -class MachineBranchProbabilityInfo; - -// Forward declaration to avoid circular include problem with TargetRegisterInfo -typedef unsigned LaneBitmask; - -template <> -struct ilist_traits : public ilist_default_traits { -private: - mutable ilist_half_node Sentinel; - - // this is only set by the MachineBasicBlock owning the LiveList - friend class MachineBasicBlock; - MachineBasicBlock* Parent; - -public: - MachineInstr *createSentinel() const { - return static_cast(&Sentinel); - } - void destroySentinel(MachineInstr *) const {} - - MachineInstr *provideInitialHead() const { return createSentinel(); } - MachineInstr *ensureHead(MachineInstr*) const { return createSentinel(); } - static void noteHead(MachineInstr*, MachineInstr*) {} - - void addNodeToList(MachineInstr* N); - void removeNodeFromList(MachineInstr* N); - void transferNodesFromList(ilist_traits &SrcTraits, - ilist_iterator First, - ilist_iterator Last); - void deleteNode(MachineInstr *N); -private: - void createNode(const MachineInstr &); -}; - -class MachineBasicBlock - : public ilist_node_with_parent { -public: - /// Pair of physical register and lane mask. - /// This is not simply a std::pair typedef because the members should be named - /// clearly as they both have an integer type. - struct RegisterMaskPair { - public: - MCPhysReg PhysReg; - LaneBitmask LaneMask; - - RegisterMaskPair(MCPhysReg PhysReg, LaneBitmask LaneMask) - : PhysReg(PhysReg), LaneMask(LaneMask) {} - }; - -private: - typedef ilist Instructions; - Instructions Insts; - const BasicBlock *BB; - int Number; - MachineFunction *xParent; - - /// Keep track of the predecessor / successor basic blocks. - std::vector Predecessors; - std::vector Successors; - - /// Keep track of the probabilities to the successors. This vector has the - /// same order as Successors, or it is empty if we don't use it (disable - /// optimization). - std::vector Probs; - typedef std::vector::iterator probability_iterator; - typedef std::vector::const_iterator - const_probability_iterator; - - /// Keep track of the physical registers that are livein of the basicblock. - typedef std::vector LiveInVector; - LiveInVector LiveIns; - - /// Alignment of the basic block. Zero if the basic block does not need to be - /// aligned. The alignment is specified as log2(bytes). - unsigned Alignment = 0; - - /// Indicate that this basic block is entered via an exception handler. - bool IsEHPad = false; - - /// Indicate that this basic block is potentially the target of an indirect - /// branch. - bool AddressTaken = false; - - /// Indicate that this basic block is the entry block of an EH funclet. - bool IsEHFuncletEntry = false; - - /// Indicate that this basic block is the entry block of a cleanup funclet. - bool IsCleanupFuncletEntry = false; - - /// \brief since getSymbol is a relatively heavy-weight operation, the symbol - /// is only computed once and is cached. - mutable MCSymbol *CachedMCSymbol = nullptr; - - // Intrusive list support - MachineBasicBlock() {} - - explicit MachineBasicBlock(MachineFunction &MF, const BasicBlock *BB); - - ~MachineBasicBlock(); - - // MachineBasicBlocks are allocated and owned by MachineFunction. - friend class MachineFunction; - -public: - /// Return the LLVM basic block that this instance corresponded to originally. - /// Note that this may be NULL if this instance does not correspond directly - /// to an LLVM basic block. - const BasicBlock *getBasicBlock() const { return BB; } - - /// Return the name of the corresponding LLVM basic block, or "(null)". - StringRef getName() const; - - /// Return a formatted string to identify this block and its parent function. - std::string getFullName() const; - - /// Test whether this block is potentially the target of an indirect branch. - bool hasAddressTaken() const { return AddressTaken; } - - /// Set this block to reflect that it potentially is the target of an indirect - /// branch. - void setHasAddressTaken() { AddressTaken = true; } - - /// Return the MachineFunction containing this basic block. - const MachineFunction *getParent() const { return xParent; } - MachineFunction *getParent() { return xParent; } - - typedef Instructions::iterator instr_iterator; - typedef Instructions::const_iterator const_instr_iterator; - typedef std::reverse_iterator reverse_instr_iterator; - typedef - std::reverse_iterator const_reverse_instr_iterator; - - typedef MachineInstrBundleIterator iterator; - typedef MachineInstrBundleIterator const_iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - - - unsigned size() const { return (unsigned)Insts.size(); } - bool empty() const { return Insts.empty(); } - - MachineInstr &instr_front() { return Insts.front(); } - MachineInstr &instr_back() { return Insts.back(); } - const MachineInstr &instr_front() const { return Insts.front(); } - const MachineInstr &instr_back() const { return Insts.back(); } - - MachineInstr &front() { return Insts.front(); } - MachineInstr &back() { return *--end(); } - const MachineInstr &front() const { return Insts.front(); } - const MachineInstr &back() const { return *--end(); } - - instr_iterator instr_begin() { return Insts.begin(); } - const_instr_iterator instr_begin() const { return Insts.begin(); } - instr_iterator instr_end() { return Insts.end(); } - const_instr_iterator instr_end() const { return Insts.end(); } - reverse_instr_iterator instr_rbegin() { return Insts.rbegin(); } - const_reverse_instr_iterator instr_rbegin() const { return Insts.rbegin(); } - reverse_instr_iterator instr_rend () { return Insts.rend(); } - const_reverse_instr_iterator instr_rend () const { return Insts.rend(); } - - typedef iterator_range instr_range; - typedef iterator_range const_instr_range; - instr_range instrs() { return instr_range(instr_begin(), instr_end()); } - const_instr_range instrs() const { - return const_instr_range(instr_begin(), instr_end()); - } - - iterator begin() { return instr_begin(); } - const_iterator begin() const { return instr_begin(); } - iterator end () { return instr_end(); } - const_iterator end () const { return instr_end(); } - reverse_iterator rbegin() { return instr_rbegin(); } - const_reverse_iterator rbegin() const { return instr_rbegin(); } - reverse_iterator rend () { return instr_rend(); } - const_reverse_iterator rend () const { return instr_rend(); } - - /// Support for MachineInstr::getNextNode(). - static Instructions MachineBasicBlock::*getSublistAccess(MachineInstr *) { - return &MachineBasicBlock::Insts; - } - - inline iterator_range terminators() { - return make_range(getFirstTerminator(), end()); - } - inline iterator_range terminators() const { - return make_range(getFirstTerminator(), end()); - } - - // Machine-CFG iterators - typedef std::vector::iterator pred_iterator; - typedef std::vector::const_iterator const_pred_iterator; - typedef std::vector::iterator succ_iterator; - typedef std::vector::const_iterator const_succ_iterator; - typedef std::vector::reverse_iterator - pred_reverse_iterator; - typedef std::vector::const_reverse_iterator - const_pred_reverse_iterator; - typedef std::vector::reverse_iterator - succ_reverse_iterator; - typedef std::vector::const_reverse_iterator - const_succ_reverse_iterator; - pred_iterator pred_begin() { return Predecessors.begin(); } - const_pred_iterator pred_begin() const { return Predecessors.begin(); } - pred_iterator pred_end() { return Predecessors.end(); } - const_pred_iterator pred_end() const { return Predecessors.end(); } - pred_reverse_iterator pred_rbegin() - { return Predecessors.rbegin();} - const_pred_reverse_iterator pred_rbegin() const - { return Predecessors.rbegin();} - pred_reverse_iterator pred_rend() - { return Predecessors.rend(); } - const_pred_reverse_iterator pred_rend() const - { return Predecessors.rend(); } - unsigned pred_size() const { - return (unsigned)Predecessors.size(); - } - bool pred_empty() const { return Predecessors.empty(); } - succ_iterator succ_begin() { return Successors.begin(); } - const_succ_iterator succ_begin() const { return Successors.begin(); } - succ_iterator succ_end() { return Successors.end(); } - const_succ_iterator succ_end() const { return Successors.end(); } - succ_reverse_iterator succ_rbegin() - { return Successors.rbegin(); } - const_succ_reverse_iterator succ_rbegin() const - { return Successors.rbegin(); } - succ_reverse_iterator succ_rend() - { return Successors.rend(); } - const_succ_reverse_iterator succ_rend() const - { return Successors.rend(); } - unsigned succ_size() const { - return (unsigned)Successors.size(); - } - bool succ_empty() const { return Successors.empty(); } - - inline iterator_range predecessors() { - return make_range(pred_begin(), pred_end()); - } - inline iterator_range predecessors() const { - return make_range(pred_begin(), pred_end()); - } - inline iterator_range successors() { - return make_range(succ_begin(), succ_end()); - } - inline iterator_range successors() const { - return make_range(succ_begin(), succ_end()); - } - - // LiveIn management methods. - - /// Adds the specified register as a live in. Note that it is an error to add - /// the same register to the same set more than once unless the intention is - /// to call sortUniqueLiveIns after all registers are added. - void addLiveIn(MCPhysReg PhysReg, LaneBitmask LaneMask = ~0u) { - LiveIns.push_back(RegisterMaskPair(PhysReg, LaneMask)); - } - void addLiveIn(const RegisterMaskPair &RegMaskPair) { - LiveIns.push_back(RegMaskPair); - } - - /// Sorts and uniques the LiveIns vector. It can be significantly faster to do - /// this than repeatedly calling isLiveIn before calling addLiveIn for every - /// LiveIn insertion. - void sortUniqueLiveIns(); - - /// Add PhysReg as live in to this block, and ensure that there is a copy of - /// PhysReg to a virtual register of class RC. Return the virtual register - /// that is a copy of the live in PhysReg. - unsigned addLiveIn(MCPhysReg PhysReg, const TargetRegisterClass *RC); - - /// Remove the specified register from the live in set. - void removeLiveIn(MCPhysReg Reg, LaneBitmask LaneMask = ~0u); - - /// Return true if the specified register is in the live in set. - bool isLiveIn(MCPhysReg Reg, LaneBitmask LaneMask = ~0u) const; - - // Iteration support for live in sets. These sets are kept in sorted - // order by their register number. - typedef LiveInVector::const_iterator livein_iterator; - livein_iterator livein_begin() const { return LiveIns.begin(); } - livein_iterator livein_end() const { return LiveIns.end(); } - bool livein_empty() const { return LiveIns.empty(); } - iterator_range liveins() const { - return make_range(livein_begin(), livein_end()); - } - - /// Get the clobber mask for the start of this basic block. Funclets use this - /// to prevent register allocation across funclet transitions. - const uint32_t *getBeginClobberMask(const TargetRegisterInfo *TRI) const; - - /// Get the clobber mask for the end of the basic block. - /// \see getBeginClobberMask() - const uint32_t *getEndClobberMask(const TargetRegisterInfo *TRI) const; - - /// Return alignment of the basic block. The alignment is specified as - /// log2(bytes). - unsigned getAlignment() const { return Alignment; } - - /// Set alignment of the basic block. The alignment is specified as - /// log2(bytes). - void setAlignment(unsigned Align) { Alignment = Align; } - - /// Returns true if the block is a landing pad. That is this basic block is - /// entered via an exception handler. - bool isEHPad() const { return IsEHPad; } - - /// Indicates the block is a landing pad. That is this basic block is entered - /// via an exception handler. - void setIsEHPad(bool V = true) { IsEHPad = V; } - - bool hasEHPadSuccessor() const; - - /// Returns true if this is the entry block of an EH funclet. - bool isEHFuncletEntry() const { return IsEHFuncletEntry; } - - /// Indicates if this is the entry block of an EH funclet. - void setIsEHFuncletEntry(bool V = true) { IsEHFuncletEntry = V; } - - /// Returns true if this is the entry block of a cleanup funclet. - bool isCleanupFuncletEntry() const { return IsCleanupFuncletEntry; } - - /// Indicates if this is the entry block of a cleanup funclet. - void setIsCleanupFuncletEntry(bool V = true) { IsCleanupFuncletEntry = V; } - - // Code Layout methods. - - /// Move 'this' block before or after the specified block. This only moves - /// the block, it does not modify the CFG or adjust potential fall-throughs at - /// the end of the block. - void moveBefore(MachineBasicBlock *NewAfter); - void moveAfter(MachineBasicBlock *NewBefore); - - /// Update the terminator instructions in block to account for changes to the - /// layout. If the block previously used a fallthrough, it may now need a - /// branch, and if it previously used branching it may now be able to use a - /// fallthrough. - void updateTerminator(); - - // Machine-CFG mutators - - /// Add Succ as a successor of this MachineBasicBlock. The Predecessors list - /// of Succ is automatically updated. PROB parameter is stored in - /// Probabilities list. The default probability is set as unknown. Mixing - /// known and unknown probabilities in successor list is not allowed. When all - /// successors have unknown probabilities, 1 / N is returned as the - /// probability for each successor, where N is the number of successors. - /// - /// Note that duplicate Machine CFG edges are not allowed. - void addSuccessor(MachineBasicBlock *Succ, - BranchProbability Prob = BranchProbability::getUnknown()); - - /// Add Succ as a successor of this MachineBasicBlock. The Predecessors list - /// of Succ is automatically updated. The probability is not provided because - /// BPI is not available (e.g. -O0 is used), in which case edge probabilities - /// won't be used. Using this interface can save some space. - void addSuccessorWithoutProb(MachineBasicBlock *Succ); - - /// Set successor probability of a given iterator. - void setSuccProbability(succ_iterator I, BranchProbability Prob); - - /// Normalize probabilities of all successors so that the sum of them becomes - /// one. This is usually done when the current update on this MBB is done, and - /// the sum of its successors' probabilities is not guaranteed to be one. The - /// user is responsible for the correct use of this function. - /// MBB::removeSuccessor() has an option to do this automatically. - void normalizeSuccProbs() { - BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); - } - - /// Validate successors' probabilities and check if the sum of them is - /// approximate one. This only works in DEBUG mode. - void validateSuccProbs() const; - - /// Remove successor from the successors list of this MachineBasicBlock. The - /// Predecessors list of Succ is automatically updated. - /// If NormalizeSuccProbs is true, then normalize successors' probabilities - /// after the successor is removed. - void removeSuccessor(MachineBasicBlock *Succ, - bool NormalizeSuccProbs = false); - - /// Remove specified successor from the successors list of this - /// MachineBasicBlock. The Predecessors list of Succ is automatically updated. - /// If NormalizeSuccProbs is true, then normalize successors' probabilities - /// after the successor is removed. - /// Return the iterator to the element after the one removed. - succ_iterator removeSuccessor(succ_iterator I, - bool NormalizeSuccProbs = false); - - /// Replace successor OLD with NEW and update probability info. - void replaceSuccessor(MachineBasicBlock *Old, MachineBasicBlock *New); - - /// Transfers all the successors from MBB to this machine basic block (i.e., - /// copies all the successors FromMBB and remove all the successors from - /// FromMBB). - void transferSuccessors(MachineBasicBlock *FromMBB); - - /// Transfers all the successors, as in transferSuccessors, and update PHI - /// operands in the successor blocks which refer to FromMBB to refer to this. - void transferSuccessorsAndUpdatePHIs(MachineBasicBlock *FromMBB); - - /// Return true if any of the successors have probabilities attached to them. - bool hasSuccessorProbabilities() const { return !Probs.empty(); } - - /// Return true if the specified MBB is a predecessor of this block. - bool isPredecessor(const MachineBasicBlock *MBB) const; - - /// Return true if the specified MBB is a successor of this block. - bool isSuccessor(const MachineBasicBlock *MBB) const; - - /// Return true if the specified MBB will be emitted immediately after this - /// block, such that if this block exits by falling through, control will - /// transfer to the specified MBB. Note that MBB need not be a successor at - /// all, for example if this block ends with an unconditional branch to some - /// other block. - bool isLayoutSuccessor(const MachineBasicBlock *MBB) const; - - /// Return true if the block can implicitly transfer control to the block - /// after it by falling off the end of it. This should return false if it can - /// reach the block after it, but it uses an explicit branch to do so (e.g., a - /// table jump). True is a conservative answer. - bool canFallThrough(); - - /// Returns a pointer to the first instruction in this block that is not a - /// PHINode instruction. When adding instructions to the beginning of the - /// basic block, they should be added before the returned value, not before - /// the first instruction, which might be PHI. - /// Returns end() is there's no non-PHI instruction. - iterator getFirstNonPHI(); - - /// Return the first instruction in MBB after I that is not a PHI or a label. - /// This is the correct point to insert copies at the beginning of a basic - /// block. - iterator SkipPHIsAndLabels(iterator I); - - /// Returns an iterator to the first terminator instruction of this basic - /// block. If a terminator does not exist, it returns end(). - iterator getFirstTerminator(); - const_iterator getFirstTerminator() const { - return const_cast(this)->getFirstTerminator(); - } - - /// Same getFirstTerminator but it ignores bundles and return an - /// instr_iterator instead. - instr_iterator getFirstInstrTerminator(); - - /// Returns an iterator to the first non-debug instruction in the basic block, - /// or end(). - iterator getFirstNonDebugInstr(); - const_iterator getFirstNonDebugInstr() const { - return const_cast(this)->getFirstNonDebugInstr(); - } - - /// Returns an iterator to the last non-debug instruction in the basic block, - /// or end(). - iterator getLastNonDebugInstr(); - const_iterator getLastNonDebugInstr() const { - return const_cast(this)->getLastNonDebugInstr(); - } - - /// Convenience function that returns true if the block ends in a return - /// instruction. - bool isReturnBlock() const { - return !empty() && back().isReturn(); - } - - /// Split the critical edge from this block to the given successor block, and - /// return the newly created block, or null if splitting is not possible. - /// - /// This function updates LiveVariables, MachineDominatorTree, and - /// MachineLoopInfo, as applicable. - MachineBasicBlock *SplitCriticalEdge(MachineBasicBlock *Succ, Pass &P); - - /// Check if the edge between this block and the given successor \p - /// Succ, can be split. If this returns true a subsequent call to - /// SplitCriticalEdge is guaranteed to return a valid basic block if - /// no changes occured in the meantime. - bool canSplitCriticalEdge(const MachineBasicBlock *Succ) const; - - void pop_front() { Insts.pop_front(); } - void pop_back() { Insts.pop_back(); } - void push_back(MachineInstr *MI) { Insts.push_back(MI); } - - /// Insert MI into the instruction list before I, possibly inside a bundle. - /// - /// If the insertion point is inside a bundle, MI will be added to the bundle, - /// otherwise MI will not be added to any bundle. That means this function - /// alone can't be used to prepend or append instructions to bundles. See - /// MIBundleBuilder::insert() for a more reliable way of doing that. - instr_iterator insert(instr_iterator I, MachineInstr *M); - - /// Insert a range of instructions into the instruction list before I. - template - void insert(iterator I, IT S, IT E) { - assert((I == end() || I->getParent() == this) && - "iterator points outside of basic block"); - Insts.insert(I.getInstrIterator(), S, E); - } - - /// Insert MI into the instruction list before I. - iterator insert(iterator I, MachineInstr *MI) { - assert((I == end() || I->getParent() == this) && - "iterator points outside of basic block"); - assert(!MI->isBundledWithPred() && !MI->isBundledWithSucc() && - "Cannot insert instruction with bundle flags"); - return Insts.insert(I.getInstrIterator(), MI); - } - - /// Insert MI into the instruction list after I. - iterator insertAfter(iterator I, MachineInstr *MI) { - assert((I == end() || I->getParent() == this) && - "iterator points outside of basic block"); - assert(!MI->isBundledWithPred() && !MI->isBundledWithSucc() && - "Cannot insert instruction with bundle flags"); - return Insts.insertAfter(I.getInstrIterator(), MI); - } - - /// Remove an instruction from the instruction list and delete it. - /// - /// If the instruction is part of a bundle, the other instructions in the - /// bundle will still be bundled after removing the single instruction. - instr_iterator erase(instr_iterator I); - - /// Remove an instruction from the instruction list and delete it. - /// - /// If the instruction is part of a bundle, the other instructions in the - /// bundle will still be bundled after removing the single instruction. - instr_iterator erase_instr(MachineInstr *I) { - return erase(instr_iterator(I)); - } - - /// Remove a range of instructions from the instruction list and delete them. - iterator erase(iterator I, iterator E) { - return Insts.erase(I.getInstrIterator(), E.getInstrIterator()); - } - - /// Remove an instruction or bundle from the instruction list and delete it. - /// - /// If I points to a bundle of instructions, they are all erased. - iterator erase(iterator I) { - return erase(I, std::next(I)); - } - - /// Remove an instruction from the instruction list and delete it. - /// - /// If I is the head of a bundle of instructions, the whole bundle will be - /// erased. - iterator erase(MachineInstr *I) { - return erase(iterator(I)); - } - - /// Remove the unbundled instruction from the instruction list without - /// deleting it. - /// - /// This function can not be used to remove bundled instructions, use - /// remove_instr to remove individual instructions from a bundle. - MachineInstr *remove(MachineInstr *I) { - assert(!I->isBundled() && "Cannot remove bundled instructions"); - return Insts.remove(instr_iterator(I)); - } - - /// Remove the possibly bundled instruction from the instruction list - /// without deleting it. - /// - /// If the instruction is part of a bundle, the other instructions in the - /// bundle will still be bundled after removing the single instruction. - MachineInstr *remove_instr(MachineInstr *I); - - void clear() { - Insts.clear(); - } - - /// Take an instruction from MBB 'Other' at the position From, and insert it - /// into this MBB right before 'Where'. - /// - /// If From points to a bundle of instructions, the whole bundle is moved. - void splice(iterator Where, MachineBasicBlock *Other, iterator From) { - // The range splice() doesn't allow noop moves, but this one does. - if (Where != From) - splice(Where, Other, From, std::next(From)); - } - - /// Take a block of instructions from MBB 'Other' in the range [From, To), - /// and insert them into this MBB right before 'Where'. - /// - /// The instruction at 'Where' must not be included in the range of - /// instructions to move. - void splice(iterator Where, MachineBasicBlock *Other, - iterator From, iterator To) { - Insts.splice(Where.getInstrIterator(), Other->Insts, - From.getInstrIterator(), To.getInstrIterator()); - } - - /// This method unlinks 'this' from the containing function, and returns it, - /// but does not delete it. - MachineBasicBlock *removeFromParent(); - - /// This method unlinks 'this' from the containing function and deletes it. - void eraseFromParent(); - - /// Given a machine basic block that branched to 'Old', change the code and - /// CFG so that it branches to 'New' instead. - void ReplaceUsesOfBlockWith(MachineBasicBlock *Old, MachineBasicBlock *New); - - /// Various pieces of code can cause excess edges in the CFG to be inserted. - /// If we have proven that MBB can only branch to DestA and DestB, remove any - /// other MBB successors from the CFG. DestA and DestB can be null. Besides - /// DestA and DestB, retain other edges leading to LandingPads (currently - /// there can be only one; we don't check or require that here). Note it is - /// possible that DestA and/or DestB are LandingPads. - bool CorrectExtraCFGEdges(MachineBasicBlock *DestA, - MachineBasicBlock *DestB, - bool IsCond); - - /// Find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE - /// instructions. Return UnknownLoc if there is none. - DebugLoc findDebugLoc(instr_iterator MBBI); - DebugLoc findDebugLoc(iterator MBBI) { - return findDebugLoc(MBBI.getInstrIterator()); - } - - /// Possible outcome of a register liveness query to computeRegisterLiveness() - enum LivenessQueryResult { - LQR_Live, ///< Register is known to be (at least partially) live. - LQR_Dead, ///< Register is known to be fully dead. - LQR_Unknown ///< Register liveness not decidable from local neighborhood. - }; - - /// Return whether (physical) register \p Reg has been ined and not - /// ed as of just before \p Before. - /// - /// Search is localised to a neighborhood of \p Neighborhood instructions - /// before (searching for defs or kills) and \p Neighborhood instructions - /// after (searching just for defs) \p Before. - /// - /// \p Reg must be a physical register. - LivenessQueryResult computeRegisterLiveness(const TargetRegisterInfo *TRI, - unsigned Reg, - const_iterator Before, - unsigned Neighborhood=10) const; - - // Debugging methods. - void dump() const; - void print(raw_ostream &OS, const SlotIndexes* = nullptr) const; - void print(raw_ostream &OS, ModuleSlotTracker &MST, - const SlotIndexes* = nullptr) const; - - // Printing method used by LoopInfo. - void printAsOperand(raw_ostream &OS, bool PrintType = true) const; - - /// MachineBasicBlocks are uniquely numbered at the function level, unless - /// they're not in a MachineFunction yet, in which case this will return -1. - int getNumber() const { return Number; } - void setNumber(int N) { Number = N; } - - /// Return the MCSymbol for this basic block. - MCSymbol *getSymbol() const; - - -private: - /// Return probability iterator corresponding to the I successor iterator. - probability_iterator getProbabilityIterator(succ_iterator I); - const_probability_iterator - getProbabilityIterator(const_succ_iterator I) const; - - friend class MachineBranchProbabilityInfo; - friend class MIPrinter; - - /// Return probability of the edge from this block to MBB. This method should - /// NOT be called directly, but by using getEdgeProbability method from - /// MachineBranchProbabilityInfo class. - BranchProbability getSuccProbability(const_succ_iterator Succ) const; - - // Methods used to maintain doubly linked list of blocks... - friend struct ilist_traits; - - // Machine-CFG mutators - - /// Remove Pred as a predecessor of this MachineBasicBlock. Don't do this - /// unless you know what you're doing, because it doesn't update Pred's - /// successors list. Use Pred->addSuccessor instead. - void addPredecessor(MachineBasicBlock *Pred); - - /// Remove Pred as a predecessor of this MachineBasicBlock. Don't do this - /// unless you know what you're doing, because it doesn't update Pred's - /// successors list. Use Pred->removeSuccessor instead. - void removePredecessor(MachineBasicBlock *Pred); -}; - -raw_ostream& operator<<(raw_ostream &OS, const MachineBasicBlock &MBB); - -// This is useful when building IndexedMaps keyed on basic block pointers. -struct MBB2NumberFunctor : - public std::unary_function { - unsigned operator()(const MachineBasicBlock *MBB) const { - return MBB->getNumber(); - } -}; - -//===--------------------------------------------------------------------===// -// GraphTraits specializations for machine basic block graphs (machine-CFGs) -//===--------------------------------------------------------------------===// - -// Provide specializations of GraphTraits to be able to treat a -// MachineFunction as a graph of MachineBasicBlocks. -// - -template <> struct GraphTraits { - typedef MachineBasicBlock NodeType; - typedef MachineBasicBlock *NodeRef; - typedef MachineBasicBlock::succ_iterator ChildIteratorType; - - static NodeType *getEntryNode(MachineBasicBlock *BB) { return BB; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->succ_begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->succ_end(); - } -}; - -template <> struct GraphTraits { - typedef const MachineBasicBlock NodeType; - typedef const MachineBasicBlock *NodeRef; - typedef MachineBasicBlock::const_succ_iterator ChildIteratorType; - - static NodeType *getEntryNode(const MachineBasicBlock *BB) { return BB; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->succ_begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->succ_end(); - } -}; - -// Provide specializations of GraphTraits to be able to treat a -// MachineFunction as a graph of MachineBasicBlocks and to walk it -// in inverse order. Inverse order for a function is considered -// to be when traversing the predecessor edges of a MBB -// instead of the successor edges. -// -template <> struct GraphTraits > { - typedef MachineBasicBlock NodeType; - typedef MachineBasicBlock *NodeRef; - typedef MachineBasicBlock::pred_iterator ChildIteratorType; - static NodeType *getEntryNode(Inverse G) { - return G.Graph; - } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->pred_begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->pred_end(); - } -}; - -template <> struct GraphTraits > { - typedef const MachineBasicBlock NodeType; - typedef const MachineBasicBlock *NodeRef; - typedef MachineBasicBlock::const_pred_iterator ChildIteratorType; - static NodeType *getEntryNode(Inverse G) { - return G.Graph; - } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->pred_begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->pred_end(); - } -}; - - - -/// MachineInstrSpan provides an interface to get an iteration range -/// containing the instruction it was initialized with, along with all -/// those instructions inserted prior to or following that instruction -/// at some point after the MachineInstrSpan is constructed. -class MachineInstrSpan { - MachineBasicBlock &MBB; - MachineBasicBlock::iterator I, B, E; -public: - MachineInstrSpan(MachineBasicBlock::iterator I) - : MBB(*I->getParent()), - I(I), - B(I == MBB.begin() ? MBB.end() : std::prev(I)), - E(std::next(I)) {} - - MachineBasicBlock::iterator begin() { - return B == MBB.end() ? MBB.begin() : std::next(B); - } - MachineBasicBlock::iterator end() { return E; } - bool empty() { return begin() == end(); } - - MachineBasicBlock::iterator getInitial() { return I; } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h b/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h deleted file mode 100644 index 7a236086..00000000 --- a/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h +++ /dev/null @@ -1,75 +0,0 @@ -//===- MachineBlockFrequencyInfo.h - MBB Frequency Analysis -*- C++ -*-----===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Loops should be simplified before this analysis. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEBLOCKFREQUENCYINFO_H -#define LLVM_CODEGEN_MACHINEBLOCKFREQUENCYINFO_H - -#include "llvm/ADT/Optional.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/Support/BlockFrequency.h" -#include - -namespace llvm { - -class MachineBasicBlock; -class MachineBranchProbabilityInfo; -template class BlockFrequencyInfoImpl; - -/// MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation -/// to estimate machine basic block frequencies. -class MachineBlockFrequencyInfo : public MachineFunctionPass { - typedef BlockFrequencyInfoImpl ImplType; - std::unique_ptr MBFI; - -public: - static char ID; - - MachineBlockFrequencyInfo(); - - ~MachineBlockFrequencyInfo() override; - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - bool runOnMachineFunction(MachineFunction &F) override; - - void releaseMemory() override; - - /// getblockFreq - Return block frequency. Return 0 if we don't have the - /// information. Please note that initial frequency is equal to 1024. It means - /// that we should not rely on the value itself, but only on the comparison to - /// the other block frequencies. We do this to avoid using of floating points. - /// - BlockFrequency getBlockFreq(const MachineBasicBlock *MBB) const; - - Optional getBlockProfileCount(const MachineBasicBlock *MBB) const; - - const MachineFunction *getFunction() const; - const MachineBranchProbabilityInfo *getMBPI() const; - void view() const; - - // Print the block frequency Freq to OS using the current functions entry - // frequency to convert freq into a relative decimal form. - raw_ostream &printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const; - - // Convenience method that attempts to look up the frequency associated with - // BB and print it to OS. - raw_ostream &printBlockFreq(raw_ostream &OS, - const MachineBasicBlock *MBB) const; - - uint64_t getEntryFreq() const; - -}; - -} - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h b/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h deleted file mode 100644 index 81b0524c..00000000 --- a/llvm/include/llvm/CodeGen/MachineBranchProbabilityInfo.h +++ /dev/null @@ -1,77 +0,0 @@ -//=- MachineBranchProbabilityInfo.h - Branch Probability Analysis -*- C++ -*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This pass is used to evaluate branch probabilties on machine basic blocks. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEBRANCHPROBABILITYINFO_H -#define LLVM_CODEGEN_MACHINEBRANCHPROBABILITYINFO_H - -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/Pass.h" -#include "llvm/Support/BranchProbability.h" -#include -#include - -namespace llvm { - -class MachineBranchProbabilityInfo : public ImmutablePass { - virtual void anchor(); - - // Default weight value. Used when we don't have information about the edge. - // TODO: DEFAULT_WEIGHT makes sense during static predication, when none of - // the successors have a weight yet. But it doesn't make sense when providing - // weight to an edge that may have siblings with non-zero weights. This can - // be handled various ways, but it's probably fine for an edge with unknown - // weight to just "inherit" the non-zero weight of an adjacent successor. - static const uint32_t DEFAULT_WEIGHT = 16; - -public: - static char ID; - - MachineBranchProbabilityInfo() : ImmutablePass(ID) { - PassRegistry &Registry = *PassRegistry::getPassRegistry(); - initializeMachineBranchProbabilityInfoPass(Registry); - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - } - - // Return edge probability. - BranchProbability getEdgeProbability(const MachineBasicBlock *Src, - const MachineBasicBlock *Dst) const; - - // Same as above, but using a const_succ_iterator from Src. This is faster - // when the iterator is already available. - BranchProbability - getEdgeProbability(const MachineBasicBlock *Src, - MachineBasicBlock::const_succ_iterator Dst) const; - - // A 'Hot' edge is an edge which probability is >= 80%. - bool isEdgeHot(const MachineBasicBlock *Src, - const MachineBasicBlock *Dst) const; - - // Return a hot successor for the block BB or null if there isn't one. - // NB: This routine's complexity is linear on the number of successors. - MachineBasicBlock *getHotSucc(MachineBasicBlock *MBB) const; - - // Print value between 0 (0% probability) and 1 (100% probability), - // however the value is never equal to 0, and can be 1 only iff SRC block - // has only one successor. - raw_ostream &printEdgeProbability(raw_ostream &OS, - const MachineBasicBlock *Src, - const MachineBasicBlock *Dst) const; -}; - -} - - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineCombinerPattern.h b/llvm/include/llvm/CodeGen/MachineCombinerPattern.h deleted file mode 100644 index 11238016..00000000 --- a/llvm/include/llvm/CodeGen/MachineCombinerPattern.h +++ /dev/null @@ -1,79 +0,0 @@ -//===-- llvm/CodeGen/MachineCombinerPattern.h - Instruction pattern supported by -// combiner ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines instruction pattern supported by combiner -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINECOMBINERPATTERN_H -#define LLVM_CODEGEN_MACHINECOMBINERPATTERN_H - -namespace llvm { - -/// These are instruction patterns matched by the machine combiner pass. -enum class MachineCombinerPattern { - // These are commutative variants for reassociating a computation chain. See - // the comments before getMachineCombinerPatterns() in TargetInstrInfo.cpp. - REASSOC_AX_BY, - REASSOC_AX_YB, - REASSOC_XA_BY, - REASSOC_XA_YB, - - // These are multiply-add patterns matched by the AArch64 machine combiner. - MULADDW_OP1, - MULADDW_OP2, - MULSUBW_OP1, - MULSUBW_OP2, - MULADDWI_OP1, - MULSUBWI_OP1, - MULADDX_OP1, - MULADDX_OP2, - MULSUBX_OP1, - MULSUBX_OP2, - MULADDXI_OP1, - MULSUBXI_OP1, - // Floating Point - FMULADDS_OP1, - FMULADDS_OP2, - FMULSUBS_OP1, - FMULSUBS_OP2, - FMULADDD_OP1, - FMULADDD_OP2, - FMULSUBD_OP1, - FMULSUBD_OP2, - FMLAv1i32_indexed_OP1, - FMLAv1i32_indexed_OP2, - FMLAv1i64_indexed_OP1, - FMLAv1i64_indexed_OP2, - FMLAv2f32_OP2, - FMLAv2f32_OP1, - FMLAv2f64_OP1, - FMLAv2f64_OP2, - FMLAv2i32_indexed_OP1, - FMLAv2i32_indexed_OP2, - FMLAv2i64_indexed_OP1, - FMLAv2i64_indexed_OP2, - FMLAv4f32_OP1, - FMLAv4f32_OP2, - FMLAv4i32_indexed_OP1, - FMLAv4i32_indexed_OP2, - FMLSv1i32_indexed_OP2, - FMLSv1i64_indexed_OP2, - FMLSv2i32_indexed_OP2, - FMLSv2i64_indexed_OP2, - FMLSv2f32_OP2, - FMLSv2f64_OP2, - FMLSv4i32_indexed_OP2, - FMLSv4f32_OP2 -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineConstantPool.h b/llvm/include/llvm/CodeGen/MachineConstantPool.h deleted file mode 100644 index d2036c4a..00000000 --- a/llvm/include/llvm/CodeGen/MachineConstantPool.h +++ /dev/null @@ -1,165 +0,0 @@ -//===-- CodeGen/MachineConstantPool.h - Abstract Constant Pool --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// @file -/// This file declares the MachineConstantPool class which is an abstract -/// constant pool to keep track of constants referenced by a function. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINECONSTANTPOOL_H -#define LLVM_CODEGEN_MACHINECONSTANTPOOL_H - -#include "llvm/ADT/DenseSet.h" -#include "llvm/MC/SectionKind.h" -#include -#include -#include - -namespace llvm { - -class Constant; -class FoldingSetNodeID; -class DataLayout; -class TargetMachine; -class Type; -class MachineConstantPool; -class raw_ostream; - -/// Abstract base class for all machine specific constantpool value subclasses. -/// -class MachineConstantPoolValue { - virtual void anchor(); - Type *Ty; - -public: - explicit MachineConstantPoolValue(Type *ty) : Ty(ty) {} - virtual ~MachineConstantPoolValue() {} - - /// getType - get type of this MachineConstantPoolValue. - /// - Type *getType() const { return Ty; } - - virtual int getExistingMachineCPValue(MachineConstantPool *CP, - unsigned Alignment) = 0; - - virtual void addSelectionDAGCSEId(FoldingSetNodeID &ID) = 0; - - /// print - Implement operator<< - virtual void print(raw_ostream &O) const = 0; -}; - -inline raw_ostream &operator<<(raw_ostream &OS, - const MachineConstantPoolValue &V) { - V.print(OS); - return OS; -} - -/// This class is a data container for one entry in a MachineConstantPool. -/// It contains a pointer to the value and an offset from the start of -/// the constant pool. -/// @brief An entry in a MachineConstantPool -class MachineConstantPoolEntry { -public: - /// The constant itself. - union { - const Constant *ConstVal; - MachineConstantPoolValue *MachineCPVal; - } Val; - - /// The required alignment for this entry. The top bit is set when Val is - /// a target specific MachineConstantPoolValue. - unsigned Alignment; - - MachineConstantPoolEntry(const Constant *V, unsigned A) - : Alignment(A) { - Val.ConstVal = V; - } - MachineConstantPoolEntry(MachineConstantPoolValue *V, unsigned A) - : Alignment(A) { - Val.MachineCPVal = V; - Alignment |= 1U << (sizeof(unsigned) * CHAR_BIT - 1); - } - - /// isMachineConstantPoolEntry - Return true if the MachineConstantPoolEntry - /// is indeed a target specific constantpool entry, not a wrapper over a - /// Constant. - bool isMachineConstantPoolEntry() const { - return (int)Alignment < 0; - } - - int getAlignment() const { - return Alignment & ~(1 << (sizeof(unsigned) * CHAR_BIT - 1)); - } - - Type *getType() const; - - /// This method classifies the entry according to whether or not it may - /// generate a relocation entry. This must be conservative, so if it might - /// codegen to a relocatable entry, it should say so. - bool needsRelocation() const; - - SectionKind getSectionKind(const DataLayout *DL) const; -}; - -/// The MachineConstantPool class keeps track of constants referenced by a -/// function which must be spilled to memory. This is used for constants which -/// are unable to be used directly as operands to instructions, which typically -/// include floating point and large integer constants. -/// -/// Instructions reference the address of these constant pool constants through -/// the use of MO_ConstantPoolIndex values. When emitting assembly or machine -/// code, these virtual address references are converted to refer to the -/// address of the function constant pool values. -/// @brief The machine constant pool. -class MachineConstantPool { - unsigned PoolAlignment; ///< The alignment for the pool. - std::vector Constants; ///< The pool of constants. - /// MachineConstantPoolValues that use an existing MachineConstantPoolEntry. - DenseSet MachineCPVsSharingEntries; - const DataLayout &DL; - - const DataLayout &getDataLayout() const { return DL; } - -public: - /// @brief The only constructor. - explicit MachineConstantPool(const DataLayout &DL) - : PoolAlignment(1), DL(DL) {} - ~MachineConstantPool(); - - /// getConstantPoolAlignment - Return the alignment required by - /// the whole constant pool, of which the first element must be aligned. - unsigned getConstantPoolAlignment() const { return PoolAlignment; } - - /// getConstantPoolIndex - Create a new entry in the constant pool or return - /// an existing one. User must specify the minimum required alignment for - /// the object. - unsigned getConstantPoolIndex(const Constant *C, unsigned Alignment); - unsigned getConstantPoolIndex(MachineConstantPoolValue *V, - unsigned Alignment); - - /// isEmpty - Return true if this constant pool contains no constants. - bool isEmpty() const { return Constants.empty(); } - - const std::vector &getConstants() const { - return Constants; - } - - /// print - Used by the MachineFunction printer to print information about - /// constant pool objects. Implemented in MachineFunction.cpp - /// - void print(raw_ostream &OS) const; - - /// dump - Call print(cerr) to be called from the debugger. - void dump() const; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h b/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h deleted file mode 100644 index 4131194a..00000000 --- a/llvm/include/llvm/CodeGen/MachineDominanceFrontier.h +++ /dev/null @@ -1,109 +0,0 @@ -//===- llvm/CodeGen/MachineDominanceFrontier.h ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H -#define LLVM_CODEGEN_MACHINEDOMINANCEFRONTIER_H - -#include "llvm/Analysis/DominanceFrontier.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineFunctionPass.h" - - -namespace llvm { - -class MachineDominanceFrontier : public MachineFunctionPass { - ForwardDominanceFrontierBase Base; -public: - typedef DominatorTreeBase DomTreeT; - typedef DomTreeNodeBase DomTreeNodeT; - typedef DominanceFrontierBase::DomSetType DomSetType; - typedef DominanceFrontierBase::iterator iterator; - typedef DominanceFrontierBase::const_iterator const_iterator; - - void operator=(const MachineDominanceFrontier &) = delete; - MachineDominanceFrontier(const MachineDominanceFrontier &) = delete; - - static char ID; - - MachineDominanceFrontier(); - - DominanceFrontierBase &getBase() { - return Base; - } - - inline const std::vector &getRoots() const { - return Base.getRoots(); - } - - MachineBasicBlock *getRoot() const { - return Base.getRoot(); - } - - bool isPostDominator() const { - return Base.isPostDominator(); - } - - iterator begin() { - return Base.begin(); - } - - const_iterator begin() const { - return Base.begin(); - } - - iterator end() { - return Base.end(); - } - - const_iterator end() const { - return Base.end(); - } - - iterator find(MachineBasicBlock *B) { - return Base.find(B); - } - - const_iterator find(MachineBasicBlock *B) const { - return Base.find(B); - } - - iterator addBasicBlock(MachineBasicBlock *BB, const DomSetType &frontier) { - return Base.addBasicBlock(BB, frontier); - } - - void removeBlock(MachineBasicBlock *BB) { - return Base.removeBlock(BB); - } - - void addToFrontier(iterator I, MachineBasicBlock *Node) { - return Base.addToFrontier(I, Node); - } - - void removeFromFrontier(iterator I, MachineBasicBlock *Node) { - return Base.removeFromFrontier(I, Node); - } - - bool compareDomSet(DomSetType &DS1, const DomSetType &DS2) const { - return Base.compareDomSet(DS1, DS2); - } - - bool compare(DominanceFrontierBase &Other) const { - return Base.compare(Other); - } - - bool runOnMachineFunction(MachineFunction &F) override; - - void releaseMemory() override; - - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -} - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineDominators.h b/llvm/include/llvm/CodeGen/MachineDominators.h deleted file mode 100644 index ed7cc277..00000000 --- a/llvm/include/llvm/CodeGen/MachineDominators.h +++ /dev/null @@ -1,306 +0,0 @@ -//=- llvm/CodeGen/MachineDominators.h - Machine Dom Calculation --*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines classes mirroring those in llvm/Analysis/Dominators.h, -// but for target-specific code rather than target-independent IR. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEDOMINATORS_H -#define LLVM_CODEGEN_MACHINEDOMINATORS_H - -#include "llvm/ADT/SmallSet.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/Support/GenericDomTree.h" -#include "llvm/Support/GenericDomTreeConstruction.h" - -namespace llvm { - -template<> -inline void DominatorTreeBase::addRoot(MachineBasicBlock* MBB) { - this->Roots.push_back(MBB); -} - -extern template class DomTreeNodeBase; -extern template class DominatorTreeBase; - -typedef DomTreeNodeBase MachineDomTreeNode; - -//===------------------------------------- -/// DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to -/// compute a normal dominator tree. -/// -class MachineDominatorTree : public MachineFunctionPass { - /// \brief Helper structure used to hold all the basic blocks - /// involved in the split of a critical edge. - struct CriticalEdge { - MachineBasicBlock *FromBB; - MachineBasicBlock *ToBB; - MachineBasicBlock *NewBB; - }; - - /// \brief Pile up all the critical edges to be split. - /// The splitting of a critical edge is local and thus, it is possible - /// to apply several of those changes at the same time. - mutable SmallVector CriticalEdgesToSplit; - /// \brief Remember all the basic blocks that are inserted during - /// edge splitting. - /// Invariant: NewBBs == all the basic blocks contained in the NewBB - /// field of all the elements of CriticalEdgesToSplit. - /// I.e., forall elt in CriticalEdgesToSplit, it exists BB in NewBBs - /// such as BB == elt.NewBB. - mutable SmallSet NewBBs; - - /// \brief Apply all the recorded critical edges to the DT. - /// This updates the underlying DT information in a way that uses - /// the fast query path of DT as much as possible. - /// - /// \post CriticalEdgesToSplit.empty(). - void applySplitCriticalEdges() const; - -public: - static char ID; // Pass ID, replacement for typeid - DominatorTreeBase* DT; - - MachineDominatorTree(); - - ~MachineDominatorTree() override; - - DominatorTreeBase &getBase() { - applySplitCriticalEdges(); - return *DT; - } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - /// getRoots - Return the root blocks of the current CFG. This may include - /// multiple blocks if we are computing post dominators. For forward - /// dominators, this will always be a single block (the entry node). - /// - inline const std::vector &getRoots() const { - applySplitCriticalEdges(); - return DT->getRoots(); - } - - inline MachineBasicBlock *getRoot() const { - applySplitCriticalEdges(); - return DT->getRoot(); - } - - inline MachineDomTreeNode *getRootNode() const { - applySplitCriticalEdges(); - return DT->getRootNode(); - } - - bool runOnMachineFunction(MachineFunction &F) override; - - inline bool dominates(const MachineDomTreeNode* A, - const MachineDomTreeNode* B) const { - applySplitCriticalEdges(); - return DT->dominates(A, B); - } - - inline bool dominates(const MachineBasicBlock* A, - const MachineBasicBlock* B) const { - applySplitCriticalEdges(); - return DT->dominates(A, B); - } - - // dominates - Return true if A dominates B. This performs the - // special checks necessary if A and B are in the same basic block. - bool dominates(const MachineInstr *A, const MachineInstr *B) const { - applySplitCriticalEdges(); - const MachineBasicBlock *BBA = A->getParent(), *BBB = B->getParent(); - if (BBA != BBB) return DT->dominates(BBA, BBB); - - // Loop through the basic block until we find A or B. - MachineBasicBlock::const_iterator I = BBA->begin(); - for (; &*I != A && &*I != B; ++I) - /*empty*/ ; - - //if(!DT.IsPostDominators) { - // A dominates B if it is found first in the basic block. - return &*I == A; - //} else { - // // A post-dominates B if B is found first in the basic block. - // return &*I == B; - //} - } - - inline bool properlyDominates(const MachineDomTreeNode* A, - const MachineDomTreeNode* B) const { - applySplitCriticalEdges(); - return DT->properlyDominates(A, B); - } - - inline bool properlyDominates(const MachineBasicBlock* A, - const MachineBasicBlock* B) const { - applySplitCriticalEdges(); - return DT->properlyDominates(A, B); - } - - /// findNearestCommonDominator - Find nearest common dominator basic block - /// for basic block A and B. If there is no such block then return NULL. - inline MachineBasicBlock *findNearestCommonDominator(MachineBasicBlock *A, - MachineBasicBlock *B) { - applySplitCriticalEdges(); - return DT->findNearestCommonDominator(A, B); - } - - inline MachineDomTreeNode *operator[](MachineBasicBlock *BB) const { - applySplitCriticalEdges(); - return DT->getNode(BB); - } - - /// getNode - return the (Post)DominatorTree node for the specified basic - /// block. This is the same as using operator[] on this class. - /// - inline MachineDomTreeNode *getNode(MachineBasicBlock *BB) const { - applySplitCriticalEdges(); - return DT->getNode(BB); - } - - /// addNewBlock - Add a new node to the dominator tree information. This - /// creates a new node as a child of DomBB dominator node,linking it into - /// the children list of the immediate dominator. - inline MachineDomTreeNode *addNewBlock(MachineBasicBlock *BB, - MachineBasicBlock *DomBB) { - applySplitCriticalEdges(); - return DT->addNewBlock(BB, DomBB); - } - - /// changeImmediateDominator - This method is used to update the dominator - /// tree information when a node's immediate dominator changes. - /// - inline void changeImmediateDominator(MachineBasicBlock *N, - MachineBasicBlock* NewIDom) { - applySplitCriticalEdges(); - DT->changeImmediateDominator(N, NewIDom); - } - - inline void changeImmediateDominator(MachineDomTreeNode *N, - MachineDomTreeNode* NewIDom) { - applySplitCriticalEdges(); - DT->changeImmediateDominator(N, NewIDom); - } - - /// eraseNode - Removes a node from the dominator tree. Block must not - /// dominate any other blocks. Removes node from its immediate dominator's - /// children list. Deletes dominator node associated with basic block BB. - inline void eraseNode(MachineBasicBlock *BB) { - applySplitCriticalEdges(); - DT->eraseNode(BB); - } - - /// splitBlock - BB is split and now it has one successor. Update dominator - /// tree to reflect this change. - inline void splitBlock(MachineBasicBlock* NewBB) { - applySplitCriticalEdges(); - DT->splitBlock(NewBB); - } - - /// isReachableFromEntry - Return true if A is dominated by the entry - /// block of the function containing it. - bool isReachableFromEntry(const MachineBasicBlock *A) { - applySplitCriticalEdges(); - return DT->isReachableFromEntry(A); - } - - void releaseMemory() override; - - void verifyAnalysis() const override; - - void print(raw_ostream &OS, const Module*) const override; - - /// \brief Record that the critical edge (FromBB, ToBB) has been - /// split with NewBB. - /// This is best to use this method instead of directly update the - /// underlying information, because this helps mitigating the - /// number of time the DT information is invalidated. - /// - /// \note Do not use this method with regular edges. - /// - /// \note To benefit from the compile time improvement incurred by this - /// method, the users of this method have to limit the queries to the DT - /// interface between two edges splitting. In other words, they have to - /// pack the splitting of critical edges as much as possible. - void recordSplitCriticalEdge(MachineBasicBlock *FromBB, - MachineBasicBlock *ToBB, - MachineBasicBlock *NewBB) { - bool Inserted = NewBBs.insert(NewBB).second; - (void)Inserted; - assert(Inserted && - "A basic block inserted via edge splitting cannot appear twice"); - CriticalEdgesToSplit.push_back({FromBB, ToBB, NewBB}); - } - - /// \brief Returns *false* if the other dominator tree matches this dominator - /// tree. - inline bool compare(const MachineDominatorTree &Other) const { - const MachineDomTreeNode *R = getRootNode(); - const MachineDomTreeNode *OtherR = Other.getRootNode(); - - if (!R || !OtherR || R->getBlock() != OtherR->getBlock()) - return true; - - if (DT->compare(*Other.DT)) - return true; - - return false; - } - - /// \brief Verify the correctness of the domtree by re-computing it. - /// - /// This should only be used for debugging as it aborts the program if the - /// verification fails. - void verifyDomTree() const; -}; - -//===------------------------------------- -/// DominatorTree GraphTraits specialization so the DominatorTree can be -/// iterable by generic graph iterators. -/// - -template -struct MachineDomTreeGraphTraitsBase { - typedef Node NodeType; - typedef ChildIterator ChildIteratorType; - - static NodeType *getEntryNode(NodeType *N) { return N; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { return N->end(); } -}; - -template struct GraphTraits; - -template <> -struct GraphTraits - : public MachineDomTreeGraphTraitsBase {}; - -template <> -struct GraphTraits - : public MachineDomTreeGraphTraitsBase { -}; - -template <> struct GraphTraits - : public GraphTraits { - static NodeType *getEntryNode(MachineDominatorTree *DT) { - return DT->getRootNode(); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineFrameInfo.h b/llvm/include/llvm/CodeGen/MachineFrameInfo.h deleted file mode 100644 index 59755674..00000000 --- a/llvm/include/llvm/CodeGen/MachineFrameInfo.h +++ /dev/null @@ -1,669 +0,0 @@ -//===-- CodeGen/MachineFrameInfo.h - Abstract Stack Frame Rep. --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The file defines the MachineFrameInfo class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H -#define LLVM_CODEGEN_MACHINEFRAMEINFO_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/DataTypes.h" -#include -#include - -namespace llvm { -class raw_ostream; -class DataLayout; -class TargetRegisterClass; -class Type; -class MachineFunction; -class MachineBasicBlock; -class TargetFrameLowering; -class TargetMachine; -class BitVector; -class Value; -class AllocaInst; - -/// The CalleeSavedInfo class tracks the information need to locate where a -/// callee saved register is in the current frame. -class CalleeSavedInfo { - unsigned Reg; - int FrameIdx; - -public: - explicit CalleeSavedInfo(unsigned R, int FI = 0) - : Reg(R), FrameIdx(FI) {} - - // Accessors. - unsigned getReg() const { return Reg; } - int getFrameIdx() const { return FrameIdx; } - void setFrameIdx(int FI) { FrameIdx = FI; } -}; - -/// The MachineFrameInfo class represents an abstract stack frame until -/// prolog/epilog code is inserted. This class is key to allowing stack frame -/// representation optimizations, such as frame pointer elimination. It also -/// allows more mundane (but still important) optimizations, such as reordering -/// of abstract objects on the stack frame. -/// -/// To support this, the class assigns unique integer identifiers to stack -/// objects requested clients. These identifiers are negative integers for -/// fixed stack objects (such as arguments passed on the stack) or nonnegative -/// for objects that may be reordered. Instructions which refer to stack -/// objects use a special MO_FrameIndex operand to represent these frame -/// indexes. -/// -/// Because this class keeps track of all references to the stack frame, it -/// knows when a variable sized object is allocated on the stack. This is the -/// sole condition which prevents frame pointer elimination, which is an -/// important optimization on register-poor architectures. Because original -/// variable sized alloca's in the source program are the only source of -/// variable sized stack objects, it is safe to decide whether there will be -/// any variable sized objects before all stack objects are known (for -/// example, register allocator spill code never needs variable sized -/// objects). -/// -/// When prolog/epilog code emission is performed, the final stack frame is -/// built and the machine instructions are modified to refer to the actual -/// stack offsets of the object, eliminating all MO_FrameIndex operands from -/// the program. -/// -/// @brief Abstract Stack Frame Information -class MachineFrameInfo { - - // Represent a single object allocated on the stack. - struct StackObject { - // The offset of this object from the stack pointer on entry to - // the function. This field has no meaning for a variable sized element. - int64_t SPOffset; - - // The size of this object on the stack. 0 means a variable sized object, - // ~0ULL means a dead object. - uint64_t Size; - - // The required alignment of this stack slot. - unsigned Alignment; - - // If true, the value of the stack object is set before - // entering the function and is not modified inside the function. By - // default, fixed objects are immutable unless marked otherwise. - bool isImmutable; - - // If true the stack object is used as spill slot. It - // cannot alias any other memory objects. - bool isSpillSlot; - - /// If true, this stack slot is used to spill a value (could be deopt - /// and/or GC related) over a statepoint. We know that the address of the - /// slot can't alias any LLVM IR value. This is very similiar to a Spill - /// Slot, but is created by statepoint lowering is SelectionDAG, not the - /// register allocator. - bool isStatepointSpillSlot; - - /// If this stack object is originated from an Alloca instruction - /// this value saves the original IR allocation. Can be NULL. - const AllocaInst *Alloca; - - // If true, the object was mapped into the local frame - // block and doesn't need additional handling for allocation beyond that. - bool PreAllocated; - - // If true, an LLVM IR value might point to this object. - // Normally, spill slots and fixed-offset objects don't alias IR-accessible - // objects, but there are exceptions (on PowerPC, for example, some byval - // arguments have ABI-prescribed offsets). - bool isAliased; - - /// If true, the object has been zero-extended. - bool isZExt; - - /// If true, the object has been zero-extended. - bool isSExt; - - StackObject(uint64_t Sz, unsigned Al, int64_t SP, bool IM, - bool isSS, const AllocaInst *Val, bool A) - : SPOffset(SP), Size(Sz), Alignment(Al), isImmutable(IM), - isSpillSlot(isSS), isStatepointSpillSlot(false), Alloca(Val), - PreAllocated(false), isAliased(A), isZExt(false), isSExt(false) {} - }; - - /// The alignment of the stack. - unsigned StackAlignment; - - /// Can the stack be realigned. This can be false if the target does not - /// support stack realignment, or if the user asks us not to realign the - /// stack. In this situation, overaligned allocas are all treated as dynamic - /// allocations and the target must handle them as part of DYNAMIC_STACKALLOC - /// lowering. All non-alloca stack objects have their alignment clamped to the - /// base ABI stack alignment. - /// FIXME: There is room for improvement in this case, in terms of - /// grouping overaligned allocas into a "secondary stack frame" and - /// then only use a single alloca to allocate this frame and only a - /// single virtual register to access it. Currently, without such an - /// optimization, each such alloca gets it's own dynamic - /// realignment. - bool StackRealignable; - - /// Whether the function has the \c alignstack attribute. - bool ForcedRealign; - - /// The list of stack objects allocated. - std::vector Objects; - - /// This contains the number of fixed objects contained on - /// the stack. Because fixed objects are stored at a negative index in the - /// Objects list, this is also the index to the 0th object in the list. - unsigned NumFixedObjects = 0; - - /// This boolean keeps track of whether any variable - /// sized objects have been allocated yet. - bool HasVarSizedObjects = false; - - /// This boolean keeps track of whether there is a call - /// to builtin \@llvm.frameaddress. - bool FrameAddressTaken = false; - - /// This boolean keeps track of whether there is a call - /// to builtin \@llvm.returnaddress. - bool ReturnAddressTaken = false; - - /// This boolean keeps track of whether there is a call - /// to builtin \@llvm.experimental.stackmap. - bool HasStackMap = false; - - /// This boolean keeps track of whether there is a call - /// to builtin \@llvm.experimental.patchpoint. - bool HasPatchPoint = false; - - /// The prolog/epilog code inserter calculates the final stack - /// offsets for all of the fixed size objects, updating the Objects list - /// above. It then updates StackSize to contain the number of bytes that need - /// to be allocated on entry to the function. - uint64_t StackSize = 0; - - /// The amount that a frame offset needs to be adjusted to - /// have the actual offset from the stack/frame pointer. The exact usage of - /// this is target-dependent, but it is typically used to adjust between - /// SP-relative and FP-relative offsets. E.G., if objects are accessed via - /// SP then OffsetAdjustment is zero; if FP is used, OffsetAdjustment is set - /// to the distance between the initial SP and the value in FP. For many - /// targets, this value is only used when generating debug info (via - /// TargetRegisterInfo::getFrameIndexReference); when generating code, the - /// corresponding adjustments are performed directly. - int OffsetAdjustment = 0; - - /// The prolog/epilog code inserter may process objects that require greater - /// alignment than the default alignment the target provides. - /// To handle this, MaxAlignment is set to the maximum alignment - /// needed by the objects on the current frame. If this is greater than the - /// native alignment maintained by the compiler, dynamic alignment code will - /// be needed. - /// - unsigned MaxAlignment = 0; - - /// Set to true if this function adjusts the stack -- e.g., - /// when calling another function. This is only valid during and after - /// prolog/epilog code insertion. - bool AdjustsStack = false; - - /// Set to true if this function has any function calls. - bool HasCalls = false; - - /// The frame index for the stack protector. - int StackProtectorIdx = -1; - - /// The frame index for the function context. Used for SjLj exceptions. - int FunctionContextIdx = -1; - - /// This contains the size of the largest call frame if the target uses frame - /// setup/destroy pseudo instructions (as defined in the TargetFrameInfo - /// class). This information is important for frame pointer elimination. - /// It is only valid during and after prolog/epilog code insertion. - unsigned MaxCallFrameSize = 0; - - /// The prolog/epilog code inserter fills in this vector with each - /// callee saved register saved in the frame. Beyond its use by the prolog/ - /// epilog code inserter, this data used for debug info and exception - /// handling. - std::vector CSInfo; - - /// Has CSInfo been set yet? - bool CSIValid = false; - - /// References to frame indices which are mapped - /// into the local frame allocation block. - SmallVector, 32> LocalFrameObjects; - - /// Size of the pre-allocated local frame block. - int64_t LocalFrameSize = 0; - - /// Required alignment of the local object blob, which is the strictest - /// alignment of any object in it. - unsigned LocalFrameMaxAlign = 0; - - /// Whether the local object blob needs to be allocated together. If not, - /// PEI should ignore the isPreAllocated flags on the stack objects and - /// just allocate them normally. - bool UseLocalStackAllocationBlock = false; - - /// True if the function dynamically adjusts the stack pointer through some - /// opaque mechanism like inline assembly or Win32 EH. - bool HasOpaqueSPAdjustment = false; - - /// True if the function contains operations which will lower down to - /// instructions which manipulate the stack pointer. - bool HasCopyImplyingStackAdjustment = false; - - /// True if the function contains a call to the llvm.vastart intrinsic. - bool HasVAStart = false; - - /// True if this is a varargs function that contains a musttail call. - bool HasMustTailInVarArgFunc = false; - - /// True if this function contains a tail call. If so immutable objects like - /// function arguments are no longer so. A tail call *can* override fixed - /// stack objects like arguments so we can't treat them as immutable. - bool HasTailCall = false; - - /// Not null, if shrink-wrapping found a better place for the prologue. - MachineBasicBlock *Save = nullptr; - /// Not null, if shrink-wrapping found a better place for the epilogue. - MachineBasicBlock *Restore = nullptr; - -public: - explicit MachineFrameInfo(unsigned StackAlignment, bool StackRealignable, - bool ForcedRealign) - : StackAlignment(StackAlignment), StackRealignable(StackRealignable), - ForcedRealign(ForcedRealign) {} - - /// Return true if there are any stack objects in this function. - bool hasStackObjects() const { return !Objects.empty(); } - - /// This method may be called any time after instruction - /// selection is complete to determine if the stack frame for this function - /// contains any variable sized objects. - bool hasVarSizedObjects() const { return HasVarSizedObjects; } - - /// Return the index for the stack protector object. - int getStackProtectorIndex() const { return StackProtectorIdx; } - void setStackProtectorIndex(int I) { StackProtectorIdx = I; } - bool hasStackProtectorIndex() const { return StackProtectorIdx != -1; } - - /// Return the index for the function context object. - /// This object is used for SjLj exceptions. - int getFunctionContextIndex() const { return FunctionContextIdx; } - void setFunctionContextIndex(int I) { FunctionContextIdx = I; } - - /// This method may be called any time after instruction - /// selection is complete to determine if there is a call to - /// \@llvm.frameaddress in this function. - bool isFrameAddressTaken() const { return FrameAddressTaken; } - void setFrameAddressIsTaken(bool T) { FrameAddressTaken = T; } - - /// This method may be called any time after - /// instruction selection is complete to determine if there is a call to - /// \@llvm.returnaddress in this function. - bool isReturnAddressTaken() const { return ReturnAddressTaken; } - void setReturnAddressIsTaken(bool s) { ReturnAddressTaken = s; } - - /// This method may be called any time after instruction - /// selection is complete to determine if there is a call to builtin - /// \@llvm.experimental.stackmap. - bool hasStackMap() const { return HasStackMap; } - void setHasStackMap(bool s = true) { HasStackMap = s; } - - /// This method may be called any time after instruction - /// selection is complete to determine if there is a call to builtin - /// \@llvm.experimental.patchpoint. - bool hasPatchPoint() const { return HasPatchPoint; } - void setHasPatchPoint(bool s = true) { HasPatchPoint = s; } - - /// Return the minimum frame object index. - int getObjectIndexBegin() const { return -NumFixedObjects; } - - /// Return one past the maximum frame object index. - int getObjectIndexEnd() const { return (int)Objects.size()-NumFixedObjects; } - - /// Return the number of fixed objects. - unsigned getNumFixedObjects() const { return NumFixedObjects; } - - /// Return the number of objects. - unsigned getNumObjects() const { return Objects.size(); } - - /// Map a frame index into the local object block - void mapLocalFrameObject(int ObjectIndex, int64_t Offset) { - LocalFrameObjects.push_back(std::pair(ObjectIndex, Offset)); - Objects[ObjectIndex + NumFixedObjects].PreAllocated = true; - } - - /// Get the local offset mapping for a for an object. - std::pair getLocalFrameObjectMap(int i) const { - assert (i >= 0 && (unsigned)i < LocalFrameObjects.size() && - "Invalid local object reference!"); - return LocalFrameObjects[i]; - } - - /// Return the number of objects allocated into the local object block. - int64_t getLocalFrameObjectCount() const { return LocalFrameObjects.size(); } - - /// Set the size of the local object blob. - void setLocalFrameSize(int64_t sz) { LocalFrameSize = sz; } - - /// Get the size of the local object blob. - int64_t getLocalFrameSize() const { return LocalFrameSize; } - - /// Required alignment of the local object blob, - /// which is the strictest alignment of any object in it. - void setLocalFrameMaxAlign(unsigned Align) { LocalFrameMaxAlign = Align; } - - /// Return the required alignment of the local object blob. - unsigned getLocalFrameMaxAlign() const { return LocalFrameMaxAlign; } - - /// Get whether the local allocation blob should be allocated together or - /// let PEI allocate the locals in it directly. - bool getUseLocalStackAllocationBlock() const { - return UseLocalStackAllocationBlock; - } - - /// setUseLocalStackAllocationBlock - Set whether the local allocation blob - /// should be allocated together or let PEI allocate the locals in it - /// directly. - void setUseLocalStackAllocationBlock(bool v) { - UseLocalStackAllocationBlock = v; - } - - /// Return true if the object was pre-allocated into the local block. - bool isObjectPreAllocated(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].PreAllocated; - } - - /// Return the size of the specified object. - int64_t getObjectSize(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].Size; - } - - /// Change the size of the specified stack object. - void setObjectSize(int ObjectIdx, int64_t Size) { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - Objects[ObjectIdx+NumFixedObjects].Size = Size; - } - - /// Return the alignment of the specified stack object. - unsigned getObjectAlignment(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].Alignment; - } - - /// setObjectAlignment - Change the alignment of the specified stack object. - void setObjectAlignment(int ObjectIdx, unsigned Align) { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - Objects[ObjectIdx+NumFixedObjects].Alignment = Align; - ensureMaxAlignment(Align); - } - - /// Return the underlying Alloca of the specified - /// stack object if it exists. Returns 0 if none exists. - const AllocaInst* getObjectAllocation(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].Alloca; - } - - /// Return the assigned stack offset of the specified object - /// from the incoming stack pointer. - int64_t getObjectOffset(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - assert(!isDeadObjectIndex(ObjectIdx) && - "Getting frame offset for a dead object?"); - return Objects[ObjectIdx+NumFixedObjects].SPOffset; - } - - bool isObjectZExt(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].isZExt; - } - - void setObjectZExt(int ObjectIdx, bool IsZExt) { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - Objects[ObjectIdx+NumFixedObjects].isZExt = IsZExt; - } - - bool isObjectSExt(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].isSExt; - } - - void setObjectSExt(int ObjectIdx, bool IsSExt) { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - Objects[ObjectIdx+NumFixedObjects].isSExt = IsSExt; - } - - /// Set the stack frame offset of the specified object. The - /// offset is relative to the stack pointer on entry to the function. - void setObjectOffset(int ObjectIdx, int64_t SPOffset) { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - assert(!isDeadObjectIndex(ObjectIdx) && - "Setting frame offset for a dead object?"); - Objects[ObjectIdx+NumFixedObjects].SPOffset = SPOffset; - } - - /// Return the number of bytes that must be allocated to hold - /// all of the fixed size frame objects. This is only valid after - /// Prolog/Epilog code insertion has finalized the stack frame layout. - uint64_t getStackSize() const { return StackSize; } - - /// Set the size of the stack. - void setStackSize(uint64_t Size) { StackSize = Size; } - - /// Estimate and return the size of the stack frame. - unsigned estimateStackSize(const MachineFunction &MF) const; - - /// Return the correction for frame offsets. - int getOffsetAdjustment() const { return OffsetAdjustment; } - - /// Set the correction for frame offsets. - void setOffsetAdjustment(int Adj) { OffsetAdjustment = Adj; } - - /// Return the alignment in bytes that this function must be aligned to, - /// which is greater than the default stack alignment provided by the target. - unsigned getMaxAlignment() const { return MaxAlignment; } - - /// Make sure the function is at least Align bytes aligned. - void ensureMaxAlignment(unsigned Align); - - /// Return true if this function adjusts the stack -- e.g., - /// when calling another function. This is only valid during and after - /// prolog/epilog code insertion. - bool adjustsStack() const { return AdjustsStack; } - void setAdjustsStack(bool V) { AdjustsStack = V; } - - /// Return true if the current function has any function calls. - bool hasCalls() const { return HasCalls; } - void setHasCalls(bool V) { HasCalls = V; } - - /// Returns true if the function contains opaque dynamic stack adjustments. - bool hasOpaqueSPAdjustment() const { return HasOpaqueSPAdjustment; } - void setHasOpaqueSPAdjustment(bool B) { HasOpaqueSPAdjustment = B; } - - /// Returns true if the function contains operations which will lower down to - /// instructions which manipulate the stack pointer. - bool hasCopyImplyingStackAdjustment() const { - return HasCopyImplyingStackAdjustment; - } - void setHasCopyImplyingStackAdjustment(bool B) { - HasCopyImplyingStackAdjustment = B; - } - - /// Returns true if the function calls the llvm.va_start intrinsic. - bool hasVAStart() const { return HasVAStart; } - void setHasVAStart(bool B) { HasVAStart = B; } - - /// Returns true if the function is variadic and contains a musttail call. - bool hasMustTailInVarArgFunc() const { return HasMustTailInVarArgFunc; } - void setHasMustTailInVarArgFunc(bool B) { HasMustTailInVarArgFunc = B; } - - /// Returns true if the function contains a tail call. - bool hasTailCall() const { return HasTailCall; } - void setHasTailCall() { HasTailCall = true; } - - /// Return the maximum size of a call frame that must be - /// allocated for an outgoing function call. This is only available if - /// CallFrameSetup/Destroy pseudo instructions are used by the target, and - /// then only during or after prolog/epilog code insertion. - /// - unsigned getMaxCallFrameSize() const { return MaxCallFrameSize; } - void setMaxCallFrameSize(unsigned S) { MaxCallFrameSize = S; } - - /// Create a new object at a fixed location on the stack. - /// All fixed objects should be created before other objects are created for - /// efficiency. By default, fixed objects are not pointed to by LLVM IR - /// values. This returns an index with a negative value. - int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool Immutable, - bool isAliased = false); - - /// Create a spill slot at a fixed location on the stack. - /// Returns an index with a negative value. - int CreateFixedSpillStackObject(uint64_t Size, int64_t SPOffset); - - /// Returns true if the specified index corresponds to a fixed stack object. - bool isFixedObjectIndex(int ObjectIdx) const { - return ObjectIdx < 0 && (ObjectIdx >= -(int)NumFixedObjects); - } - - /// Returns true if the specified index corresponds - /// to an object that might be pointed to by an LLVM IR value. - bool isAliasedObjectIndex(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].isAliased; - } - - /// isImmutableObjectIndex - Returns true if the specified index corresponds - /// to an immutable object. - bool isImmutableObjectIndex(int ObjectIdx) const { - // Tail calling functions can clobber their function arguments. - if (HasTailCall) - return false; - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].isImmutable; - } - - /// Returns true if the specified index corresponds to a spill slot. - bool isSpillSlotObjectIndex(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].isSpillSlot; - } - - bool isStatepointSpillSlotObjectIndex(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].isStatepointSpillSlot; - } - - /// Returns true if the specified index corresponds to a dead object. - bool isDeadObjectIndex(int ObjectIdx) const { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx+NumFixedObjects].Size == ~0ULL; - } - - /// Returns true if the specified index corresponds to a variable sized - /// object. - bool isVariableSizedObjectIndex(int ObjectIdx) const { - assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - return Objects[ObjectIdx + NumFixedObjects].Size == 0; - } - - void markAsStatepointSpillSlotObjectIndex(int ObjectIdx) { - assert(unsigned(ObjectIdx+NumFixedObjects) < Objects.size() && - "Invalid Object Idx!"); - Objects[ObjectIdx+NumFixedObjects].isStatepointSpillSlot = true; - assert(isStatepointSpillSlotObjectIndex(ObjectIdx) && "inconsistent"); - } - - /// Create a new statically sized stack object, returning - /// a nonnegative identifier to represent it. - int CreateStackObject(uint64_t Size, unsigned Alignment, bool isSS, - const AllocaInst *Alloca = nullptr); - - /// Create a new statically sized stack object that represents a spill slot, - /// returning a nonnegative identifier to represent it. - int CreateSpillStackObject(uint64_t Size, unsigned Alignment); - - /// Remove or mark dead a statically sized stack object. - void RemoveStackObject(int ObjectIdx) { - // Mark it dead. - Objects[ObjectIdx+NumFixedObjects].Size = ~0ULL; - } - - /// Notify the MachineFrameInfo object that a variable sized object has been - /// created. This must be created whenever a variable sized object is - /// created, whether or not the index returned is actually used. - int CreateVariableSizedObject(unsigned Alignment, const AllocaInst *Alloca); - - /// Returns a reference to call saved info vector for the current function. - const std::vector &getCalleeSavedInfo() const { - return CSInfo; - } - - /// Used by prolog/epilog inserter to set the function's callee saved - /// information. - void setCalleeSavedInfo(const std::vector &CSI) { - CSInfo = CSI; - } - - /// Has the callee saved info been calculated yet? - bool isCalleeSavedInfoValid() const { return CSIValid; } - - void setCalleeSavedInfoValid(bool v) { CSIValid = v; } - - MachineBasicBlock *getSavePoint() const { return Save; } - void setSavePoint(MachineBasicBlock *NewSave) { Save = NewSave; } - MachineBasicBlock *getRestorePoint() const { return Restore; } - void setRestorePoint(MachineBasicBlock *NewRestore) { Restore = NewRestore; } - - /// Return a set of physical registers that are pristine. - /// - /// Pristine registers hold a value that is useless to the current function, - /// but that must be preserved - they are callee saved registers that are not - /// saved. - /// - /// Before the PrologueEpilogueInserter has placed the CSR spill code, this - /// method always returns an empty set. - BitVector getPristineRegs(const MachineFunction &MF) const; - - /// Used by the MachineFunction printer to print information about - /// stack objects. Implemented in MachineFunction.cpp. - void print(const MachineFunction &MF, raw_ostream &OS) const; - - /// dump - Print the function to stderr. - void dump(const MachineFunction &MF) const; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineFunction.h b/llvm/include/llvm/CodeGen/MachineFunction.h deleted file mode 100644 index 4aa9a92e..00000000 --- a/llvm/include/llvm/CodeGen/MachineFunction.h +++ /dev/null @@ -1,667 +0,0 @@ -//===-- llvm/CodeGen/MachineFunction.h --------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Collect native machine code for a function. This class contains a list of -// MachineBasicBlock instances that make up the current compiled function. -// -// This class also contains pointers to various classes which hold -// target-specific information about the generated code. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEFUNCTION_H -#define LLVM_CODEGEN_MACHINEFUNCTION_H - -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/ilist.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineMemOperand.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/IR/Metadata.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/ArrayRecycler.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/Recycler.h" - -namespace llvm { - -class Value; -class Function; -class GCModuleInfo; -class MachineRegisterInfo; -class MachineFrameInfo; -class MachineConstantPool; -class MachineJumpTableInfo; -class MachineModuleInfo; -class MCContext; -class Pass; -class PseudoSourceValueManager; -class TargetMachine; -class TargetSubtargetInfo; -class TargetRegisterClass; -struct MachinePointerInfo; -struct WinEHFuncInfo; - -template <> -struct ilist_traits - : public ilist_default_traits { - mutable ilist_half_node Sentinel; -public: - // FIXME: This downcast is UB. See llvm.org/PR26753. - LLVM_NO_SANITIZE("object-size") - MachineBasicBlock *createSentinel() const { - return static_cast(&Sentinel); - } - void destroySentinel(MachineBasicBlock *) const {} - - MachineBasicBlock *provideInitialHead() const { return createSentinel(); } - MachineBasicBlock *ensureHead(MachineBasicBlock*) const { - return createSentinel(); - } - static void noteHead(MachineBasicBlock*, MachineBasicBlock*) {} - - void addNodeToList(MachineBasicBlock* MBB); - void removeNodeFromList(MachineBasicBlock* MBB); - void deleteNode(MachineBasicBlock *MBB); -private: - void createNode(const MachineBasicBlock &); -}; - -/// MachineFunctionInfo - This class can be derived from and used by targets to -/// hold private target-specific information for each MachineFunction. Objects -/// of type are accessed/created with MF::getInfo and destroyed when the -/// MachineFunction is destroyed. -struct MachineFunctionInfo { - virtual ~MachineFunctionInfo(); - - /// \brief Factory function: default behavior is to call new using the - /// supplied allocator. - /// - /// This function can be overridden in a derive class. - template - static Ty *create(BumpPtrAllocator &Allocator, MachineFunction &MF) { - return new (Allocator.Allocate()) Ty(MF); - } -}; - -/// Properties which a MachineFunction may have at a given point in time. -/// Each of these has checking code in the MachineVerifier, and passes can -/// require that a property be set. -class MachineFunctionProperties { - // TODO: Add MachineVerifier checks for AllVRegsAllocated - // TODO: Add a way to print the properties and make more useful error messages - // Possible TODO: Allow targets to extend this (perhaps by allowing the - // constructor to specify the size of the bit vector) - // Possible TODO: Allow requiring the negative (e.g. VRegsAllocated could be - // stated as the negative of "has vregs" - -public: - // The properties are stated in "positive" form; i.e. a pass could require - // that the property hold, but not that it does not hold. - - // Property descriptions: - // IsSSA: True when the machine function is in SSA form and virtual registers - // have a single def. - // TracksLiveness: True when tracking register liveness accurately. - // While this property is set, register liveness information in basic block - // live-in lists and machine instruction operands (e.g. kill flags, implicit - // defs) is accurate. This means it can be used to change the code in ways - // that affect the values in registers, for example by the register - // scavenger. - // When this property is clear, liveness is no longer reliable. - // AllVRegsAllocated: All virtual registers have been allocated; i.e. all - // register operands are physical registers. - enum class Property : unsigned { - IsSSA, - TracksLiveness, - AllVRegsAllocated, - LastProperty, - }; - - bool hasProperty(Property P) const { - return Properties[static_cast(P)]; - } - MachineFunctionProperties &set(Property P) { - Properties.set(static_cast(P)); - return *this; - } - MachineFunctionProperties &clear(Property P) { - Properties.reset(static_cast(P)); - return *this; - } - MachineFunctionProperties &set(const MachineFunctionProperties &MFP) { - Properties |= MFP.Properties; - return *this; - } - MachineFunctionProperties &clear(const MachineFunctionProperties &MFP) { - Properties.reset(MFP.Properties); - return *this; - } - // Returns true if all properties set in V (i.e. required by a pass) are set - // in this. - bool verifyRequiredProperties(const MachineFunctionProperties &V) const { - return !V.Properties.test(Properties); - } - - // Print the MachineFunctionProperties in human-readable form. If OnlySet is - // true, only print the properties that are set. - void print(raw_ostream &ROS, bool OnlySet=false) const; - -private: - BitVector Properties = - BitVector(static_cast(Property::LastProperty)); -}; - -class MachineFunction { - const Function *Fn; - const TargetMachine &Target; - const TargetSubtargetInfo *STI; - MCContext &Ctx; - MachineModuleInfo &MMI; - - // RegInfo - Information about each register in use in the function. - MachineRegisterInfo *RegInfo; - - // Used to keep track of target-specific per-machine function information for - // the target implementation. - MachineFunctionInfo *MFInfo; - - // Keep track of objects allocated on the stack. - MachineFrameInfo *FrameInfo; - - // Keep track of constants which are spilled to memory - MachineConstantPool *ConstantPool; - - // Keep track of jump tables for switch instructions - MachineJumpTableInfo *JumpTableInfo; - - // Keeps track of Windows exception handling related data. This will be null - // for functions that aren't using a funclet-based EH personality. - WinEHFuncInfo *WinEHInfo = nullptr; - - // Function-level unique numbering for MachineBasicBlocks. When a - // MachineBasicBlock is inserted into a MachineFunction is it automatically - // numbered and this vector keeps track of the mapping from ID's to MBB's. - std::vector MBBNumbering; - - // Pool-allocate MachineFunction-lifetime and IR objects. - BumpPtrAllocator Allocator; - - // Allocation management for instructions in function. - Recycler InstructionRecycler; - - // Allocation management for operand arrays on instructions. - ArrayRecycler OperandRecycler; - - // Allocation management for basic blocks in function. - Recycler BasicBlockRecycler; - - // List of machine basic blocks in function - typedef ilist BasicBlockListType; - BasicBlockListType BasicBlocks; - - /// FunctionNumber - This provides a unique ID for each function emitted in - /// this translation unit. - /// - unsigned FunctionNumber; - - /// Alignment - The alignment of the function. - unsigned Alignment; - - /// ExposesReturnsTwice - True if the function calls setjmp or related - /// functions with attribute "returns twice", but doesn't have - /// the attribute itself. - /// This is used to limit optimizations which cannot reason - /// about the control flow of such functions. - bool ExposesReturnsTwice = false; - - /// True if the function includes any inline assembly. - bool HasInlineAsm = false; - - /// Current high-level properties of the IR of the function (e.g. is in SSA - /// form or whether registers have been allocated) - MachineFunctionProperties Properties; - - // Allocation management for pseudo source values. - std::unique_ptr PSVManager; - - MachineFunction(const MachineFunction &) = delete; - void operator=(const MachineFunction&) = delete; -public: - MachineFunction(const Function *Fn, const TargetMachine &TM, - unsigned FunctionNum, MachineModuleInfo &MMI); - ~MachineFunction(); - - MachineModuleInfo &getMMI() const { return MMI; } - MCContext &getContext() const { return Ctx; } - - PseudoSourceValueManager &getPSVManager() const { return *PSVManager; } - - /// Return the DataLayout attached to the Module associated to this MF. - const DataLayout &getDataLayout() const; - - /// getFunction - Return the LLVM function that this machine code represents - /// - const Function *getFunction() const { return Fn; } - - /// getName - Return the name of the corresponding LLVM function. - /// - StringRef getName() const; - - /// getFunctionNumber - Return a unique ID for the current function. - /// - unsigned getFunctionNumber() const { return FunctionNumber; } - - /// getTarget - Return the target machine this machine code is compiled with - /// - const TargetMachine &getTarget() const { return Target; } - - /// getSubtarget - Return the subtarget for which this machine code is being - /// compiled. - const TargetSubtargetInfo &getSubtarget() const { return *STI; } - void setSubtarget(const TargetSubtargetInfo *ST) { STI = ST; } - - /// getSubtarget - This method returns a pointer to the specified type of - /// TargetSubtargetInfo. In debug builds, it verifies that the object being - /// returned is of the correct type. - template const STC &getSubtarget() const { - return *static_cast(STI); - } - - /// getRegInfo - Return information about the registers currently in use. - /// - MachineRegisterInfo &getRegInfo() { return *RegInfo; } - const MachineRegisterInfo &getRegInfo() const { return *RegInfo; } - - /// getFrameInfo - Return the frame info object for the current function. - /// This object contains information about objects allocated on the stack - /// frame of the current function in an abstract way. - /// - MachineFrameInfo *getFrameInfo() { return FrameInfo; } - const MachineFrameInfo *getFrameInfo() const { return FrameInfo; } - - /// getJumpTableInfo - Return the jump table info object for the current - /// function. This object contains information about jump tables in the - /// current function. If the current function has no jump tables, this will - /// return null. - const MachineJumpTableInfo *getJumpTableInfo() const { return JumpTableInfo; } - MachineJumpTableInfo *getJumpTableInfo() { return JumpTableInfo; } - - /// getOrCreateJumpTableInfo - Get the JumpTableInfo for this function, if it - /// does already exist, allocate one. - MachineJumpTableInfo *getOrCreateJumpTableInfo(unsigned JTEntryKind); - - /// getConstantPool - Return the constant pool object for the current - /// function. - /// - MachineConstantPool *getConstantPool() { return ConstantPool; } - const MachineConstantPool *getConstantPool() const { return ConstantPool; } - - /// getWinEHFuncInfo - Return information about how the current function uses - /// Windows exception handling. Returns null for functions that don't use - /// funclets for exception handling. - const WinEHFuncInfo *getWinEHFuncInfo() const { return WinEHInfo; } - WinEHFuncInfo *getWinEHFuncInfo() { return WinEHInfo; } - - /// getAlignment - Return the alignment (log2, not bytes) of the function. - /// - unsigned getAlignment() const { return Alignment; } - - /// setAlignment - Set the alignment (log2, not bytes) of the function. - /// - void setAlignment(unsigned A) { Alignment = A; } - - /// ensureAlignment - Make sure the function is at least 1 << A bytes aligned. - void ensureAlignment(unsigned A) { - if (Alignment < A) Alignment = A; - } - - /// exposesReturnsTwice - Returns true if the function calls setjmp or - /// any other similar functions with attribute "returns twice" without - /// having the attribute itself. - bool exposesReturnsTwice() const { - return ExposesReturnsTwice; - } - - /// setCallsSetJmp - Set a flag that indicates if there's a call to - /// a "returns twice" function. - void setExposesReturnsTwice(bool B) { - ExposesReturnsTwice = B; - } - - /// Returns true if the function contains any inline assembly. - bool hasInlineAsm() const { - return HasInlineAsm; - } - - /// Set a flag that indicates that the function contains inline assembly. - void setHasInlineAsm(bool B) { - HasInlineAsm = B; - } - - /// Get the function properties - const MachineFunctionProperties &getProperties() const { return Properties; } - MachineFunctionProperties &getProperties() { return Properties; } - - /// getInfo - Keep track of various per-function pieces of information for - /// backends that would like to do so. - /// - template - Ty *getInfo() { - if (!MFInfo) - MFInfo = Ty::template create(Allocator, *this); - return static_cast(MFInfo); - } - - template - const Ty *getInfo() const { - return const_cast(this)->getInfo(); - } - - /// getBlockNumbered - MachineBasicBlocks are automatically numbered when they - /// are inserted into the machine function. The block number for a machine - /// basic block can be found by using the MBB::getBlockNumber method, this - /// method provides the inverse mapping. - /// - MachineBasicBlock *getBlockNumbered(unsigned N) const { - assert(N < MBBNumbering.size() && "Illegal block number"); - assert(MBBNumbering[N] && "Block was removed from the machine function!"); - return MBBNumbering[N]; - } - - /// Should we be emitting segmented stack stuff for the function - bool shouldSplitStack() const; - - /// getNumBlockIDs - Return the number of MBB ID's allocated. - /// - unsigned getNumBlockIDs() const { return (unsigned)MBBNumbering.size(); } - - /// RenumberBlocks - This discards all of the MachineBasicBlock numbers and - /// recomputes them. This guarantees that the MBB numbers are sequential, - /// dense, and match the ordering of the blocks within the function. If a - /// specific MachineBasicBlock is specified, only that block and those after - /// it are renumbered. - void RenumberBlocks(MachineBasicBlock *MBBFrom = nullptr); - - /// print - Print out the MachineFunction in a format suitable for debugging - /// to the specified stream. - /// - void print(raw_ostream &OS, const SlotIndexes* = nullptr) const; - - /// viewCFG - This function is meant for use from the debugger. You can just - /// say 'call F->viewCFG()' and a ghostview window should pop up from the - /// program, displaying the CFG of the current function with the code for each - /// basic block inside. This depends on there being a 'dot' and 'gv' program - /// in your path. - /// - void viewCFG() const; - - /// viewCFGOnly - This function is meant for use from the debugger. It works - /// just like viewCFG, but it does not include the contents of basic blocks - /// into the nodes, just the label. If you are only interested in the CFG - /// this can make the graph smaller. - /// - void viewCFGOnly() const; - - /// dump - Print the current MachineFunction to cerr, useful for debugger use. - /// - void dump() const; - - /// Run the current MachineFunction through the machine code verifier, useful - /// for debugger use. - /// \returns true if no problems were found. - bool verify(Pass *p = nullptr, const char *Banner = nullptr, - bool AbortOnError = true) const; - - // Provide accessors for the MachineBasicBlock list... - typedef BasicBlockListType::iterator iterator; - typedef BasicBlockListType::const_iterator const_iterator; - typedef std::reverse_iterator const_reverse_iterator; - typedef std::reverse_iterator reverse_iterator; - - /// Support for MachineBasicBlock::getNextNode(). - static BasicBlockListType MachineFunction::* - getSublistAccess(MachineBasicBlock *) { - return &MachineFunction::BasicBlocks; - } - - /// addLiveIn - Add the specified physical register as a live-in value and - /// create a corresponding virtual register for it. - unsigned addLiveIn(unsigned PReg, const TargetRegisterClass *RC); - - //===--------------------------------------------------------------------===// - // BasicBlock accessor functions. - // - iterator begin() { return BasicBlocks.begin(); } - const_iterator begin() const { return BasicBlocks.begin(); } - iterator end () { return BasicBlocks.end(); } - const_iterator end () const { return BasicBlocks.end(); } - - reverse_iterator rbegin() { return BasicBlocks.rbegin(); } - const_reverse_iterator rbegin() const { return BasicBlocks.rbegin(); } - reverse_iterator rend () { return BasicBlocks.rend(); } - const_reverse_iterator rend () const { return BasicBlocks.rend(); } - - unsigned size() const { return (unsigned)BasicBlocks.size();} - bool empty() const { return BasicBlocks.empty(); } - const MachineBasicBlock &front() const { return BasicBlocks.front(); } - MachineBasicBlock &front() { return BasicBlocks.front(); } - const MachineBasicBlock & back() const { return BasicBlocks.back(); } - MachineBasicBlock & back() { return BasicBlocks.back(); } - - void push_back (MachineBasicBlock *MBB) { BasicBlocks.push_back (MBB); } - void push_front(MachineBasicBlock *MBB) { BasicBlocks.push_front(MBB); } - void insert(iterator MBBI, MachineBasicBlock *MBB) { - BasicBlocks.insert(MBBI, MBB); - } - void splice(iterator InsertPt, iterator MBBI) { - BasicBlocks.splice(InsertPt, BasicBlocks, MBBI); - } - void splice(iterator InsertPt, MachineBasicBlock *MBB) { - BasicBlocks.splice(InsertPt, BasicBlocks, MBB); - } - void splice(iterator InsertPt, iterator MBBI, iterator MBBE) { - BasicBlocks.splice(InsertPt, BasicBlocks, MBBI, MBBE); - } - - void remove(iterator MBBI) { BasicBlocks.remove(MBBI); } - void remove(MachineBasicBlock *MBBI) { BasicBlocks.remove(MBBI); } - void erase(iterator MBBI) { BasicBlocks.erase(MBBI); } - void erase(MachineBasicBlock *MBBI) { BasicBlocks.erase(MBBI); } - - template - void sort(Comp comp) { - BasicBlocks.sort(comp); - } - - //===--------------------------------------------------------------------===// - // Internal functions used to automatically number MachineBasicBlocks - // - - /// \brief Adds the MBB to the internal numbering. Returns the unique number - /// assigned to the MBB. - /// - unsigned addToMBBNumbering(MachineBasicBlock *MBB) { - MBBNumbering.push_back(MBB); - return (unsigned)MBBNumbering.size()-1; - } - - /// removeFromMBBNumbering - Remove the specific machine basic block from our - /// tracker, this is only really to be used by the MachineBasicBlock - /// implementation. - void removeFromMBBNumbering(unsigned N) { - assert(N < MBBNumbering.size() && "Illegal basic block #"); - MBBNumbering[N] = nullptr; - } - - /// CreateMachineInstr - Allocate a new MachineInstr. Use this instead - /// of `new MachineInstr'. - /// - MachineInstr *CreateMachineInstr(const MCInstrDesc &MCID, const DebugLoc &DL, - bool NoImp = false); - - /// CloneMachineInstr - Create a new MachineInstr which is a copy of the - /// 'Orig' instruction, identical in all ways except the instruction - /// has no parent, prev, or next. - /// - /// See also TargetInstrInfo::duplicate() for target-specific fixes to cloned - /// instructions. - MachineInstr *CloneMachineInstr(const MachineInstr *Orig); - - /// DeleteMachineInstr - Delete the given MachineInstr. - /// - void DeleteMachineInstr(MachineInstr *MI); - - /// CreateMachineBasicBlock - Allocate a new MachineBasicBlock. Use this - /// instead of `new MachineBasicBlock'. - /// - MachineBasicBlock *CreateMachineBasicBlock(const BasicBlock *bb = nullptr); - - /// DeleteMachineBasicBlock - Delete the given MachineBasicBlock. - /// - void DeleteMachineBasicBlock(MachineBasicBlock *MBB); - - /// getMachineMemOperand - Allocate a new MachineMemOperand. - /// MachineMemOperands are owned by the MachineFunction and need not be - /// explicitly deallocated. - MachineMemOperand *getMachineMemOperand(MachinePointerInfo PtrInfo, - MachineMemOperand::Flags f, - uint64_t s, unsigned base_alignment, - const AAMDNodes &AAInfo = AAMDNodes(), - const MDNode *Ranges = nullptr); - - /// getMachineMemOperand - Allocate a new MachineMemOperand by copying - /// an existing one, adjusting by an offset and using the given size. - /// MachineMemOperands are owned by the MachineFunction and need not be - /// explicitly deallocated. - MachineMemOperand *getMachineMemOperand(const MachineMemOperand *MMO, - int64_t Offset, uint64_t Size); - - typedef ArrayRecycler::Capacity OperandCapacity; - - /// Allocate an array of MachineOperands. This is only intended for use by - /// internal MachineInstr functions. - MachineOperand *allocateOperandArray(OperandCapacity Cap) { - return OperandRecycler.allocate(Cap, Allocator); - } - - /// Dellocate an array of MachineOperands and recycle the memory. This is - /// only intended for use by internal MachineInstr functions. - /// Cap must be the same capacity that was used to allocate the array. - void deallocateOperandArray(OperandCapacity Cap, MachineOperand *Array) { - OperandRecycler.deallocate(Cap, Array); - } - - /// \brief Allocate and initialize a register mask with @p NumRegister bits. - uint32_t *allocateRegisterMask(unsigned NumRegister) { - unsigned Size = (NumRegister + 31) / 32; - uint32_t *Mask = Allocator.Allocate(Size); - for (unsigned i = 0; i != Size; ++i) - Mask[i] = 0; - return Mask; - } - - /// allocateMemRefsArray - Allocate an array to hold MachineMemOperand - /// pointers. This array is owned by the MachineFunction. - MachineInstr::mmo_iterator allocateMemRefsArray(unsigned long Num); - - /// extractLoadMemRefs - Allocate an array and populate it with just the - /// load information from the given MachineMemOperand sequence. - std::pair - extractLoadMemRefs(MachineInstr::mmo_iterator Begin, - MachineInstr::mmo_iterator End); - - /// extractStoreMemRefs - Allocate an array and populate it with just the - /// store information from the given MachineMemOperand sequence. - std::pair - extractStoreMemRefs(MachineInstr::mmo_iterator Begin, - MachineInstr::mmo_iterator End); - - /// Allocate a string and populate it with the given external symbol name. - const char *createExternalSymbolName(StringRef Name); - - //===--------------------------------------------------------------------===// - // Label Manipulation. - // - - /// getJTISymbol - Return the MCSymbol for the specified non-empty jump table. - /// If isLinkerPrivate is specified, an 'l' label is returned, otherwise a - /// normal 'L' label is returned. - MCSymbol *getJTISymbol(unsigned JTI, MCContext &Ctx, - bool isLinkerPrivate = false) const; - - /// getPICBaseSymbol - Return a function-local symbol to represent the PIC - /// base. - MCSymbol *getPICBaseSymbol() const; -}; - -//===--------------------------------------------------------------------===// -// GraphTraits specializations for function basic block graphs (CFGs) -//===--------------------------------------------------------------------===// - -// Provide specializations of GraphTraits to be able to treat a -// machine function as a graph of machine basic blocks... these are -// the same as the machine basic block iterators, except that the root -// node is implicitly the first node of the function. -// -template <> struct GraphTraits : - public GraphTraits { - static NodeType *getEntryNode(MachineFunction *F) { - return &F->front(); - } - - // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - typedef MachineFunction::iterator nodes_iterator; - static nodes_iterator nodes_begin(MachineFunction *F) { return F->begin(); } - static nodes_iterator nodes_end (MachineFunction *F) { return F->end(); } - static unsigned size (MachineFunction *F) { return F->size(); } -}; -template <> struct GraphTraits : - public GraphTraits { - static NodeType *getEntryNode(const MachineFunction *F) { - return &F->front(); - } - - // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - typedef MachineFunction::const_iterator nodes_iterator; - static nodes_iterator nodes_begin(const MachineFunction *F) { - return F->begin(); - } - static nodes_iterator nodes_end (const MachineFunction *F) { - return F->end(); - } - static unsigned size (const MachineFunction *F) { - return F->size(); - } -}; - - -// Provide specializations of GraphTraits to be able to treat a function as a -// graph of basic blocks... and to walk it in inverse order. Inverse order for -// a function is considered to be when traversing the predecessor edges of a BB -// instead of the successor edges. -// -template <> struct GraphTraits > : - public GraphTraits > { - static NodeType *getEntryNode(Inverse G) { - return &G.Graph->front(); - } -}; -template <> struct GraphTraits > : - public GraphTraits > { - static NodeType *getEntryNode(Inverse G) { - return &G.Graph->front(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineFunctionAnalysis.h b/llvm/include/llvm/CodeGen/MachineFunctionAnalysis.h deleted file mode 100644 index 4c0f5e63..00000000 --- a/llvm/include/llvm/CodeGen/MachineFunctionAnalysis.h +++ /dev/null @@ -1,55 +0,0 @@ -//===-- MachineFunctionAnalysis.h - Owner of MachineFunctions ----*-C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MachineFunctionAnalysis class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEFUNCTIONANALYSIS_H -#define LLVM_CODEGEN_MACHINEFUNCTIONANALYSIS_H - -#include "llvm/Pass.h" - -namespace llvm { - -class MachineFunction; -class MachineFunctionInitializer; -class TargetMachine; - -/// MachineFunctionAnalysis - This class is a Pass that manages a -/// MachineFunction object. -struct MachineFunctionAnalysis : public FunctionPass { -private: - const TargetMachine &TM; - MachineFunction *MF; - unsigned NextFnNum; - MachineFunctionInitializer *MFInitializer; - -public: - static char ID; - explicit MachineFunctionAnalysis(const TargetMachine &tm, - MachineFunctionInitializer *MFInitializer); - ~MachineFunctionAnalysis() override; - - MachineFunction &getMF() const { return *MF; } - - const char* getPassName() const override { - return "Machine Function Analysis"; - } - -private: - bool doInitialization(Module &M) override; - bool runOnFunction(Function &F) override; - void releaseMemory() override; - void getAnalysisUsage(AnalysisUsage &AU) const override; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineFunctionInitializer.h b/llvm/include/llvm/CodeGen/MachineFunctionInitializer.h deleted file mode 100644 index ff4c29cc..00000000 --- a/llvm/include/llvm/CodeGen/MachineFunctionInitializer.h +++ /dev/null @@ -1,38 +0,0 @@ -//===- MachineFunctionInitalizer.h - machine function initializer ---------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares an interface that allows custom machine function -// initialization. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEFUNCTIONINITIALIZER_H -#define LLVM_CODEGEN_MACHINEFUNCTIONINITIALIZER_H - -namespace llvm { - -class MachineFunction; - -/// This interface provides a way to initialize machine functions after they are -/// created by the machine function analysis pass. -class MachineFunctionInitializer { - virtual void anchor(); - -public: - virtual ~MachineFunctionInitializer() {} - - /// Initialize the machine function. - /// - /// Return true if error occurred. - virtual bool initializeMachineFunction(MachineFunction &MF) = 0; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineFunctionPass.h b/llvm/include/llvm/CodeGen/MachineFunctionPass.h deleted file mode 100644 index 653d1175..00000000 --- a/llvm/include/llvm/CodeGen/MachineFunctionPass.h +++ /dev/null @@ -1,81 +0,0 @@ -//===-- MachineFunctionPass.h - Pass for MachineFunctions --------*-C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MachineFunctionPass class. MachineFunctionPass's are -// just FunctionPass's, except they operate on machine code as part of a code -// generator. Because they operate on machine code, not the LLVM -// representation, MachineFunctionPass's are not allowed to modify the LLVM -// representation. Due to this limitation, the MachineFunctionPass class takes -// care of declaring that no LLVM passes are invalidated. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEFUNCTIONPASS_H -#define LLVM_CODEGEN_MACHINEFUNCTIONPASS_H - -#include "llvm/Pass.h" -#include "llvm/CodeGen/MachineFunction.h" - -namespace llvm { - -/// MachineFunctionPass - This class adapts the FunctionPass interface to -/// allow convenient creation of passes that operate on the MachineFunction -/// representation. Instead of overriding runOnFunction, subclasses -/// override runOnMachineFunction. -class MachineFunctionPass : public FunctionPass { -public: - bool doInitialization(Module&) override { - // Cache the properties info at module-init time so we don't have to - // construct them for every function. - RequiredProperties = getRequiredProperties(); - SetProperties = getSetProperties(); - ClearedProperties = getClearedProperties(); - return false; - } -protected: - explicit MachineFunctionPass(char &ID) : FunctionPass(ID) {} - - /// runOnMachineFunction - This method must be overloaded to perform the - /// desired machine code transformation or analysis. - /// - virtual bool runOnMachineFunction(MachineFunction &MF) = 0; - - /// getAnalysisUsage - Subclasses that override getAnalysisUsage - /// must call this. - /// - /// For MachineFunctionPasses, calling AU.preservesCFG() indicates that - /// the pass does not modify the MachineBasicBlock CFG. - /// - void getAnalysisUsage(AnalysisUsage &AU) const override; - - virtual MachineFunctionProperties getRequiredProperties() const { - return MachineFunctionProperties(); - } - virtual MachineFunctionProperties getSetProperties() const { - return MachineFunctionProperties(); - } - virtual MachineFunctionProperties getClearedProperties() const { - return MachineFunctionProperties(); - } - -private: - MachineFunctionProperties RequiredProperties; - MachineFunctionProperties SetProperties; - MachineFunctionProperties ClearedProperties; - - /// createPrinterPass - Get a machine function printer pass. - Pass *createPrinterPass(raw_ostream &O, - const std::string &Banner) const override; - - bool runOnFunction(Function &F) override; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h deleted file mode 100644 index 8f1cb9b6..00000000 --- a/llvm/include/llvm/CodeGen/MachineInstr.h +++ /dev/null @@ -1,1312 +0,0 @@ -//===-- llvm/CodeGen/MachineInstr.h - MachineInstr class --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MachineInstr class, which is the -// basic representation for all target dependent machine instructions used by -// the back end. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEINSTR_H -#define LLVM_CODEGEN_MACHINEINSTR_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/CodeGen/MachineOperand.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/IR/InlineAsm.h" -#include "llvm/MC/MCInstrDesc.h" -#include "llvm/Support/ArrayRecycler.h" -#include "llvm/Target/TargetOpcodes.h" - -namespace llvm { - -class StringRef; -template class ArrayRef; -template class SmallVectorImpl; -class DILocalVariable; -class DIExpression; -class TargetInstrInfo; -class TargetRegisterClass; -class TargetRegisterInfo; -#ifdef LLVM_BUILD_GLOBAL_ISEL -class Type; -#endif -class MachineFunction; -class MachineMemOperand; - -//===----------------------------------------------------------------------===// -/// Representation of each machine instruction. -/// -/// This class isn't a POD type, but it must have a trivial destructor. When a -/// MachineFunction is deleted, all the contained MachineInstrs are deallocated -/// without having their destructor called. -/// -class MachineInstr - : public ilist_node_with_parent { -public: - typedef MachineMemOperand **mmo_iterator; - - /// Flags to specify different kinds of comments to output in - /// assembly code. These flags carry semantic information not - /// otherwise easily derivable from the IR text. - /// - enum CommentFlag { - ReloadReuse = 0x1 - }; - - enum MIFlag { - NoFlags = 0, - FrameSetup = 1 << 0, // Instruction is used as a part of - // function frame setup code. - FrameDestroy = 1 << 1, // Instruction is used as a part of - // function frame destruction code. - BundledPred = 1 << 2, // Instruction has bundled predecessors. - BundledSucc = 1 << 3 // Instruction has bundled successors. - }; -private: - const MCInstrDesc *MCID; // Instruction descriptor. - MachineBasicBlock *Parent; // Pointer to the owning basic block. - - // Operands are allocated by an ArrayRecycler. - MachineOperand *Operands; // Pointer to the first operand. - unsigned NumOperands; // Number of operands on instruction. - typedef ArrayRecycler::Capacity OperandCapacity; - OperandCapacity CapOperands; // Capacity of the Operands array. - - uint8_t Flags; // Various bits of additional - // information about machine - // instruction. - - uint8_t AsmPrinterFlags; // Various bits of information used by - // the AsmPrinter to emit helpful - // comments. This is *not* semantic - // information. Do not use this for - // anything other than to convey comment - // information to AsmPrinter. - - uint8_t NumMemRefs; // Information on memory references. - // Note that MemRefs == nullptr, means 'don't know', not 'no memory access'. - // Calling code must treat missing information conservatively. If the number - // of memory operands required to be precise exceeds the maximum value of - // NumMemRefs - currently 256 - we remove the operands entirely. Note also - // that this is a non-owning reference to a shared copy on write buffer owned - // by the MachineFunction and created via MF.allocateMemRefsArray. - mmo_iterator MemRefs; - - DebugLoc debugLoc; // Source line information. - -#ifdef LLVM_BUILD_GLOBAL_ISEL - /// Type of the instruction in case of a generic opcode. - /// \invariant This must be nullptr is getOpcode() is not - /// in the range of generic opcodes. - Type *Ty; -#endif - - MachineInstr(const MachineInstr&) = delete; - void operator=(const MachineInstr&) = delete; - // Use MachineFunction::DeleteMachineInstr() instead. - ~MachineInstr() = delete; - - // Intrusive list support - friend struct ilist_traits; - friend struct ilist_traits; - void setParent(MachineBasicBlock *P) { Parent = P; } - - /// This constructor creates a copy of the given - /// MachineInstr in the given MachineFunction. - MachineInstr(MachineFunction &, const MachineInstr &); - - /// This constructor create a MachineInstr and add the implicit operands. - /// It reserves space for number of operands specified by - /// MCInstrDesc. An explicit DebugLoc is supplied. - MachineInstr(MachineFunction &, const MCInstrDesc &MCID, DebugLoc dl, - bool NoImp = false); - - // MachineInstrs are pool-allocated and owned by MachineFunction. - friend class MachineFunction; - -public: - const MachineBasicBlock* getParent() const { return Parent; } - MachineBasicBlock* getParent() { return Parent; } - - /// Return the asm printer flags bitvector. - uint8_t getAsmPrinterFlags() const { return AsmPrinterFlags; } - - /// Clear the AsmPrinter bitvector. - void clearAsmPrinterFlags() { AsmPrinterFlags = 0; } - - /// Return whether an AsmPrinter flag is set. - bool getAsmPrinterFlag(CommentFlag Flag) const { - return AsmPrinterFlags & Flag; - } - - /// Set a flag for the AsmPrinter. - void setAsmPrinterFlag(CommentFlag Flag) { - AsmPrinterFlags |= (uint8_t)Flag; - } - - /// Clear specific AsmPrinter flags. - void clearAsmPrinterFlag(CommentFlag Flag) { - AsmPrinterFlags &= ~Flag; - } - - /// Return the MI flags bitvector. - uint8_t getFlags() const { - return Flags; - } - - /// Return whether an MI flag is set. - bool getFlag(MIFlag Flag) const { - return Flags & Flag; - } - - /// Set a MI flag. - void setFlag(MIFlag Flag) { - Flags |= (uint8_t)Flag; - } - - void setFlags(unsigned flags) { - // Filter out the automatically maintained flags. - unsigned Mask = BundledPred | BundledSucc; - Flags = (Flags & Mask) | (flags & ~Mask); - } - - /// clearFlag - Clear a MI flag. - void clearFlag(MIFlag Flag) { - Flags &= ~((uint8_t)Flag); - } - - /// Set the type of the instruction. - /// \pre getOpcode() is in the range of the generic opcodes. - void setType(Type *Ty); - Type *getType() const; - - /// Return true if MI is in a bundle (but not the first MI in a bundle). - /// - /// A bundle looks like this before it's finalized: - /// ---------------- - /// | MI | - /// ---------------- - /// | - /// ---------------- - /// | MI * | - /// ---------------- - /// | - /// ---------------- - /// | MI * | - /// ---------------- - /// In this case, the first MI starts a bundle but is not inside a bundle, the - /// next 2 MIs are considered "inside" the bundle. - /// - /// After a bundle is finalized, it looks like this: - /// ---------------- - /// | Bundle | - /// ---------------- - /// | - /// ---------------- - /// | MI * | - /// ---------------- - /// | - /// ---------------- - /// | MI * | - /// ---------------- - /// | - /// ---------------- - /// | MI * | - /// ---------------- - /// The first instruction has the special opcode "BUNDLE". It's not "inside" - /// a bundle, but the next three MIs are. - bool isInsideBundle() const { - return getFlag(BundledPred); - } - - /// Return true if this instruction part of a bundle. This is true - /// if either itself or its following instruction is marked "InsideBundle". - bool isBundled() const { - return isBundledWithPred() || isBundledWithSucc(); - } - - /// Return true if this instruction is part of a bundle, and it is not the - /// first instruction in the bundle. - bool isBundledWithPred() const { return getFlag(BundledPred); } - - /// Return true if this instruction is part of a bundle, and it is not the - /// last instruction in the bundle. - bool isBundledWithSucc() const { return getFlag(BundledSucc); } - - /// Bundle this instruction with its predecessor. This can be an unbundled - /// instruction, or it can be the first instruction in a bundle. - void bundleWithPred(); - - /// Bundle this instruction with its successor. This can be an unbundled - /// instruction, or it can be the last instruction in a bundle. - void bundleWithSucc(); - - /// Break bundle above this instruction. - void unbundleFromPred(); - - /// Break bundle below this instruction. - void unbundleFromSucc(); - - /// Returns the debug location id of this MachineInstr. - const DebugLoc &getDebugLoc() const { return debugLoc; } - - /// Return the debug variable referenced by - /// this DBG_VALUE instruction. - const DILocalVariable *getDebugVariable() const; - - /// Return the complex address expression referenced by - /// this DBG_VALUE instruction. - const DIExpression *getDebugExpression() const; - - /// Emit an error referring to the source location of this instruction. - /// This should only be used for inline assembly that is somehow - /// impossible to compile. Other errors should have been handled much - /// earlier. - /// - /// If this method returns, the caller should try to recover from the error. - /// - void emitError(StringRef Msg) const; - - /// Returns the target instruction descriptor of this MachineInstr. - const MCInstrDesc &getDesc() const { return *MCID; } - - /// Returns the opcode of this MachineInstr. - unsigned getOpcode() const { return MCID->Opcode; } - - /// Access to explicit operands of the instruction. - /// - unsigned getNumOperands() const { return NumOperands; } - - const MachineOperand& getOperand(unsigned i) const { - assert(i < getNumOperands() && "getOperand() out of range!"); - return Operands[i]; - } - MachineOperand& getOperand(unsigned i) { - assert(i < getNumOperands() && "getOperand() out of range!"); - return Operands[i]; - } - - /// Returns the number of non-implicit operands. - unsigned getNumExplicitOperands() const; - - /// iterator/begin/end - Iterate over all operands of a machine instruction. - typedef MachineOperand *mop_iterator; - typedef const MachineOperand *const_mop_iterator; - - mop_iterator operands_begin() { return Operands; } - mop_iterator operands_end() { return Operands + NumOperands; } - - const_mop_iterator operands_begin() const { return Operands; } - const_mop_iterator operands_end() const { return Operands + NumOperands; } - - iterator_range operands() { - return make_range(operands_begin(), operands_end()); - } - iterator_range operands() const { - return make_range(operands_begin(), operands_end()); - } - iterator_range explicit_operands() { - return make_range(operands_begin(), - operands_begin() + getNumExplicitOperands()); - } - iterator_range explicit_operands() const { - return make_range(operands_begin(), - operands_begin() + getNumExplicitOperands()); - } - iterator_range implicit_operands() { - return make_range(explicit_operands().end(), operands_end()); - } - iterator_range implicit_operands() const { - return make_range(explicit_operands().end(), operands_end()); - } - /// Returns a range over all explicit operands that are register definitions. - /// Implicit definition are not included! - iterator_range defs() { - return make_range(operands_begin(), - operands_begin() + getDesc().getNumDefs()); - } - /// \copydoc defs() - iterator_range defs() const { - return make_range(operands_begin(), - operands_begin() + getDesc().getNumDefs()); - } - /// Returns a range that includes all operands that are register uses. - /// This may include unrelated operands which are not register uses. - iterator_range uses() { - return make_range(operands_begin() + getDesc().getNumDefs(), - operands_end()); - } - /// \copydoc uses() - iterator_range uses() const { - return make_range(operands_begin() + getDesc().getNumDefs(), - operands_end()); - } - iterator_range explicit_uses() { - return make_range(operands_begin() + getDesc().getNumDefs(), - operands_begin() + getNumExplicitOperands() ); - } - iterator_range explicit_uses() const { - return make_range(operands_begin() + getDesc().getNumDefs(), - operands_begin() + getNumExplicitOperands() ); - } - - /// Returns the number of the operand iterator \p I points to. - unsigned getOperandNo(const_mop_iterator I) const { - return I - operands_begin(); - } - - /// Access to memory operands of the instruction - mmo_iterator memoperands_begin() const { return MemRefs; } - mmo_iterator memoperands_end() const { return MemRefs + NumMemRefs; } - /// Return true if we don't have any memory operands which described the the - /// memory access done by this instruction. If this is true, calling code - /// must be conservative. - bool memoperands_empty() const { return NumMemRefs == 0; } - - iterator_range memoperands() { - return make_range(memoperands_begin(), memoperands_end()); - } - iterator_range memoperands() const { - return make_range(memoperands_begin(), memoperands_end()); - } - - /// Return true if this instruction has exactly one MachineMemOperand. - bool hasOneMemOperand() const { - return NumMemRefs == 1; - } - - /// API for querying MachineInstr properties. They are the same as MCInstrDesc - /// queries but they are bundle aware. - - enum QueryType { - IgnoreBundle, // Ignore bundles - AnyInBundle, // Return true if any instruction in bundle has property - AllInBundle // Return true if all instructions in bundle have property - }; - - /// Return true if the instruction (or in the case of a bundle, - /// the instructions inside the bundle) has the specified property. - /// The first argument is the property being queried. - /// The second argument indicates whether the query should look inside - /// instruction bundles. - bool hasProperty(unsigned MCFlag, QueryType Type = AnyInBundle) const { - // Inline the fast path for unbundled or bundle-internal instructions. - if (Type == IgnoreBundle || !isBundled() || isBundledWithPred()) - return getDesc().getFlags() & (1 << MCFlag); - - // If this is the first instruction in a bundle, take the slow path. - return hasPropertyInBundle(1 << MCFlag, Type); - } - - /// Return true if this instruction can have a variable number of operands. - /// In this case, the variable operands will be after the normal - /// operands but before the implicit definitions and uses (if any are - /// present). - bool isVariadic(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::Variadic, Type); - } - - /// Set if this instruction has an optional definition, e.g. - /// ARM instructions which can set condition code if 's' bit is set. - bool hasOptionalDef(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::HasOptionalDef, Type); - } - - /// Return true if this is a pseudo instruction that doesn't - /// correspond to a real machine instruction. - bool isPseudo(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::Pseudo, Type); - } - - bool isReturn(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::Return, Type); - } - - bool isCall(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::Call, Type); - } - - /// Returns true if the specified instruction stops control flow - /// from executing the instruction immediately following it. Examples include - /// unconditional branches and return instructions. - bool isBarrier(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::Barrier, Type); - } - - /// Returns true if this instruction part of the terminator for a basic block. - /// Typically this is things like return and branch instructions. - /// - /// Various passes use this to insert code into the bottom of a basic block, - /// but before control flow occurs. - bool isTerminator(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::Terminator, Type); - } - - /// Returns true if this is a conditional, unconditional, or indirect branch. - /// Predicates below can be used to discriminate between - /// these cases, and the TargetInstrInfo::AnalyzeBranch method can be used to - /// get more information. - bool isBranch(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::Branch, Type); - } - - /// Return true if this is an indirect branch, such as a - /// branch through a register. - bool isIndirectBranch(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::IndirectBranch, Type); - } - - /// Return true if this is a branch which may fall - /// through to the next instruction or may transfer control flow to some other - /// block. The TargetInstrInfo::AnalyzeBranch method can be used to get more - /// information about this branch. - bool isConditionalBranch(QueryType Type = AnyInBundle) const { - return isBranch(Type) & !isBarrier(Type) & !isIndirectBranch(Type); - } - - /// Return true if this is a branch which always - /// transfers control flow to some other block. The - /// TargetInstrInfo::AnalyzeBranch method can be used to get more information - /// about this branch. - bool isUnconditionalBranch(QueryType Type = AnyInBundle) const { - return isBranch(Type) & isBarrier(Type) & !isIndirectBranch(Type); - } - - /// Return true if this instruction has a predicate operand that - /// controls execution. It may be set to 'always', or may be set to other - /// values. There are various methods in TargetInstrInfo that can be used to - /// control and modify the predicate in this instruction. - bool isPredicable(QueryType Type = AllInBundle) const { - // If it's a bundle than all bundled instructions must be predicable for this - // to return true. - return hasProperty(MCID::Predicable, Type); - } - - /// Return true if this instruction is a comparison. - bool isCompare(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::Compare, Type); - } - - /// Return true if this instruction is a move immediate - /// (including conditional moves) instruction. - bool isMoveImmediate(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::MoveImm, Type); - } - - /// Return true if this instruction is a bitcast instruction. - bool isBitcast(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::Bitcast, Type); - } - - /// Return true if this instruction is a select instruction. - bool isSelect(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::Select, Type); - } - - /// Return true if this instruction cannot be safely duplicated. - /// For example, if the instruction has a unique labels attached - /// to it, duplicating it would cause multiple definition errors. - bool isNotDuplicable(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::NotDuplicable, Type); - } - - /// Return true if this instruction is convergent. - /// Convergent instructions can not be made control-dependent on any - /// additional values. - bool isConvergent(QueryType Type = AnyInBundle) const { - if (isInlineAsm()) { - unsigned ExtraInfo = getOperand(InlineAsm::MIOp_ExtraInfo).getImm(); - if (ExtraInfo & InlineAsm::Extra_IsConvergent) - return true; - } - return hasProperty(MCID::Convergent, Type); - } - - /// Returns true if the specified instruction has a delay slot - /// which must be filled by the code generator. - bool hasDelaySlot(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::DelaySlot, Type); - } - - /// Return true for instructions that can be folded as - /// memory operands in other instructions. The most common use for this - /// is instructions that are simple loads from memory that don't modify - /// the loaded value in any way, but it can also be used for instructions - /// that can be expressed as constant-pool loads, such as V_SETALLONES - /// on x86, to allow them to be folded when it is beneficial. - /// This should only be set on instructions that return a value in their - /// only virtual register definition. - bool canFoldAsLoad(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::FoldableAsLoad, Type); - } - - /// \brief Return true if this instruction behaves - /// the same way as the generic REG_SEQUENCE instructions. - /// E.g., on ARM, - /// dX VMOVDRR rY, rZ - /// is equivalent to - /// dX = REG_SEQUENCE rY, ssub_0, rZ, ssub_1. - /// - /// Note that for the optimizers to be able to take advantage of - /// this property, TargetInstrInfo::getRegSequenceLikeInputs has to be - /// override accordingly. - bool isRegSequenceLike(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::RegSequence, Type); - } - - /// \brief Return true if this instruction behaves - /// the same way as the generic EXTRACT_SUBREG instructions. - /// E.g., on ARM, - /// rX, rY VMOVRRD dZ - /// is equivalent to two EXTRACT_SUBREG: - /// rX = EXTRACT_SUBREG dZ, ssub_0 - /// rY = EXTRACT_SUBREG dZ, ssub_1 - /// - /// Note that for the optimizers to be able to take advantage of - /// this property, TargetInstrInfo::getExtractSubregLikeInputs has to be - /// override accordingly. - bool isExtractSubregLike(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::ExtractSubreg, Type); - } - - /// \brief Return true if this instruction behaves - /// the same way as the generic INSERT_SUBREG instructions. - /// E.g., on ARM, - /// dX = VSETLNi32 dY, rZ, Imm - /// is equivalent to a INSERT_SUBREG: - /// dX = INSERT_SUBREG dY, rZ, translateImmToSubIdx(Imm) - /// - /// Note that for the optimizers to be able to take advantage of - /// this property, TargetInstrInfo::getInsertSubregLikeInputs has to be - /// override accordingly. - bool isInsertSubregLike(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::InsertSubreg, Type); - } - - //===--------------------------------------------------------------------===// - // Side Effect Analysis - //===--------------------------------------------------------------------===// - - /// Return true if this instruction could possibly read memory. - /// Instructions with this flag set are not necessarily simple load - /// instructions, they may load a value and modify it, for example. - bool mayLoad(QueryType Type = AnyInBundle) const { - if (isInlineAsm()) { - unsigned ExtraInfo = getOperand(InlineAsm::MIOp_ExtraInfo).getImm(); - if (ExtraInfo & InlineAsm::Extra_MayLoad) - return true; - } - return hasProperty(MCID::MayLoad, Type); - } - - /// Return true if this instruction could possibly modify memory. - /// Instructions with this flag set are not necessarily simple store - /// instructions, they may store a modified value based on their operands, or - /// may not actually modify anything, for example. - bool mayStore(QueryType Type = AnyInBundle) const { - if (isInlineAsm()) { - unsigned ExtraInfo = getOperand(InlineAsm::MIOp_ExtraInfo).getImm(); - if (ExtraInfo & InlineAsm::Extra_MayStore) - return true; - } - return hasProperty(MCID::MayStore, Type); - } - - /// Return true if this instruction could possibly read or modify memory. - bool mayLoadOrStore(QueryType Type = AnyInBundle) const { - return mayLoad(Type) || mayStore(Type); - } - - //===--------------------------------------------------------------------===// - // Flags that indicate whether an instruction can be modified by a method. - //===--------------------------------------------------------------------===// - - /// Return true if this may be a 2- or 3-address - /// instruction (of the form "X = op Y, Z, ..."), which produces the same - /// result if Y and Z are exchanged. If this flag is set, then the - /// TargetInstrInfo::commuteInstruction method may be used to hack on the - /// instruction. - /// - /// Note that this flag may be set on instructions that are only commutable - /// sometimes. In these cases, the call to commuteInstruction will fail. - /// Also note that some instructions require non-trivial modification to - /// commute them. - bool isCommutable(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::Commutable, Type); - } - - /// Return true if this is a 2-address instruction - /// which can be changed into a 3-address instruction if needed. Doing this - /// transformation can be profitable in the register allocator, because it - /// means that the instruction can use a 2-address form if possible, but - /// degrade into a less efficient form if the source and dest register cannot - /// be assigned to the same register. For example, this allows the x86 - /// backend to turn a "shl reg, 3" instruction into an LEA instruction, which - /// is the same speed as the shift but has bigger code size. - /// - /// If this returns true, then the target must implement the - /// TargetInstrInfo::convertToThreeAddress method for this instruction, which - /// is allowed to fail if the transformation isn't valid for this specific - /// instruction (e.g. shl reg, 4 on x86). - /// - bool isConvertibleTo3Addr(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::ConvertibleTo3Addr, Type); - } - - /// Return true if this instruction requires - /// custom insertion support when the DAG scheduler is inserting it into a - /// machine basic block. If this is true for the instruction, it basically - /// means that it is a pseudo instruction used at SelectionDAG time that is - /// expanded out into magic code by the target when MachineInstrs are formed. - /// - /// If this is true, the TargetLoweringInfo::InsertAtEndOfBasicBlock method - /// is used to insert this into the MachineBasicBlock. - bool usesCustomInsertionHook(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::UsesCustomInserter, Type); - } - - /// Return true if this instruction requires *adjustment* - /// after instruction selection by calling a target hook. For example, this - /// can be used to fill in ARM 's' optional operand depending on whether - /// the conditional flag register is used. - bool hasPostISelHook(QueryType Type = IgnoreBundle) const { - return hasProperty(MCID::HasPostISelHook, Type); - } - - /// Returns true if this instruction is a candidate for remat. - /// This flag is deprecated, please don't use it anymore. If this - /// flag is set, the isReallyTriviallyReMaterializable() method is called to - /// verify the instruction is really rematable. - bool isRematerializable(QueryType Type = AllInBundle) const { - // It's only possible to re-mat a bundle if all bundled instructions are - // re-materializable. - return hasProperty(MCID::Rematerializable, Type); - } - - /// Returns true if this instruction has the same cost (or less) than a move - /// instruction. This is useful during certain types of optimizations - /// (e.g., remat during two-address conversion or machine licm) - /// where we would like to remat or hoist the instruction, but not if it costs - /// more than moving the instruction into the appropriate register. Note, we - /// are not marking copies from and to the same register class with this flag. - bool isAsCheapAsAMove(QueryType Type = AllInBundle) const { - // Only returns true for a bundle if all bundled instructions are cheap. - return hasProperty(MCID::CheapAsAMove, Type); - } - - /// Returns true if this instruction source operands - /// have special register allocation requirements that are not captured by the - /// operand register classes. e.g. ARM::STRD's two source registers must be an - /// even / odd pair, ARM::STM registers have to be in ascending order. - /// Post-register allocation passes should not attempt to change allocations - /// for sources of instructions with this flag. - bool hasExtraSrcRegAllocReq(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::ExtraSrcRegAllocReq, Type); - } - - /// Returns true if this instruction def operands - /// have special register allocation requirements that are not captured by the - /// operand register classes. e.g. ARM::LDRD's two def registers must be an - /// even / odd pair, ARM::LDM registers have to be in ascending order. - /// Post-register allocation passes should not attempt to change allocations - /// for definitions of instructions with this flag. - bool hasExtraDefRegAllocReq(QueryType Type = AnyInBundle) const { - return hasProperty(MCID::ExtraDefRegAllocReq, Type); - } - - - enum MICheckType { - CheckDefs, // Check all operands for equality - CheckKillDead, // Check all operands including kill / dead markers - IgnoreDefs, // Ignore all definitions - IgnoreVRegDefs // Ignore virtual register definitions - }; - - /// Return true if this instruction is identical to (same - /// opcode and same operands as) the specified instruction. - bool isIdenticalTo(const MachineInstr &Other, - MICheckType Check = CheckDefs) const; - - /// Unlink 'this' from the containing basic block, and return it without - /// deleting it. - /// - /// This function can not be used on bundled instructions, use - /// removeFromBundle() to remove individual instructions from a bundle. - MachineInstr *removeFromParent(); - - /// Unlink this instruction from its basic block and return it without - /// deleting it. - /// - /// If the instruction is part of a bundle, the other instructions in the - /// bundle remain bundled. - MachineInstr *removeFromBundle(); - - /// Unlink 'this' from the containing basic block and delete it. - /// - /// If this instruction is the header of a bundle, the whole bundle is erased. - /// This function can not be used for instructions inside a bundle, use - /// eraseFromBundle() to erase individual bundled instructions. - void eraseFromParent(); - - /// Unlink 'this' from the containing basic block and delete it. - /// - /// For all definitions mark their uses in DBG_VALUE nodes - /// as undefined. Otherwise like eraseFromParent(). - void eraseFromParentAndMarkDBGValuesForRemoval(); - - /// Unlink 'this' form its basic block and delete it. - /// - /// If the instruction is part of a bundle, the other instructions in the - /// bundle remain bundled. - void eraseFromBundle(); - - bool isEHLabel() const { return getOpcode() == TargetOpcode::EH_LABEL; } - bool isGCLabel() const { return getOpcode() == TargetOpcode::GC_LABEL; } - - /// Returns true if the MachineInstr represents a label. - bool isLabel() const { return isEHLabel() || isGCLabel(); } - bool isCFIInstruction() const { - return getOpcode() == TargetOpcode::CFI_INSTRUCTION; - } - - // True if the instruction represents a position in the function. - bool isPosition() const { return isLabel() || isCFIInstruction(); } - - bool isDebugValue() const { return getOpcode() == TargetOpcode::DBG_VALUE; } - /// A DBG_VALUE is indirect iff the first operand is a register and - /// the second operand is an immediate. - bool isIndirectDebugValue() const { - return isDebugValue() - && getOperand(0).isReg() - && getOperand(1).isImm(); - } - - bool isPHI() const { return getOpcode() == TargetOpcode::PHI; } - bool isKill() const { return getOpcode() == TargetOpcode::KILL; } - bool isImplicitDef() const { return getOpcode()==TargetOpcode::IMPLICIT_DEF; } - bool isInlineAsm() const { return getOpcode() == TargetOpcode::INLINEASM; } - bool isMSInlineAsm() const { - return getOpcode() == TargetOpcode::INLINEASM && getInlineAsmDialect(); - } - bool isStackAligningInlineAsm() const; - InlineAsm::AsmDialect getInlineAsmDialect() const; - bool isInsertSubreg() const { - return getOpcode() == TargetOpcode::INSERT_SUBREG; - } - bool isSubregToReg() const { - return getOpcode() == TargetOpcode::SUBREG_TO_REG; - } - bool isRegSequence() const { - return getOpcode() == TargetOpcode::REG_SEQUENCE; - } - bool isBundle() const { - return getOpcode() == TargetOpcode::BUNDLE; - } - bool isCopy() const { - return getOpcode() == TargetOpcode::COPY; - } - bool isFullCopy() const { - return isCopy() && !getOperand(0).getSubReg() && !getOperand(1).getSubReg(); - } - bool isExtractSubreg() const { - return getOpcode() == TargetOpcode::EXTRACT_SUBREG; - } - - /// Return true if the instruction behaves like a copy. - /// This does not include native copy instructions. - bool isCopyLike() const { - return isCopy() || isSubregToReg(); - } - - /// Return true is the instruction is an identity copy. - bool isIdentityCopy() const { - return isCopy() && getOperand(0).getReg() == getOperand(1).getReg() && - getOperand(0).getSubReg() == getOperand(1).getSubReg(); - } - - /// Return true if this is a transient instruction that is - /// either very likely to be eliminated during register allocation (such as - /// copy-like instructions), or if this instruction doesn't have an - /// execution-time cost. - bool isTransient() const { - switch(getOpcode()) { - default: return false; - // Copy-like instructions are usually eliminated during register allocation. - case TargetOpcode::PHI: - case TargetOpcode::COPY: - case TargetOpcode::INSERT_SUBREG: - case TargetOpcode::SUBREG_TO_REG: - case TargetOpcode::REG_SEQUENCE: - // Pseudo-instructions that don't produce any real output. - case TargetOpcode::IMPLICIT_DEF: - case TargetOpcode::KILL: - case TargetOpcode::CFI_INSTRUCTION: - case TargetOpcode::EH_LABEL: - case TargetOpcode::GC_LABEL: - case TargetOpcode::DBG_VALUE: - return true; - } - } - - /// Return the number of instructions inside the MI bundle, excluding the - /// bundle header. - /// - /// This is the number of instructions that MachineBasicBlock::iterator - /// skips, 0 for unbundled instructions. - unsigned getBundleSize() const; - - /// Return true if the MachineInstr reads the specified register. - /// If TargetRegisterInfo is passed, then it also checks if there - /// is a read of a super-register. - /// This does not count partial redefines of virtual registers as reads: - /// %reg1024:6 = OP. - bool readsRegister(unsigned Reg, - const TargetRegisterInfo *TRI = nullptr) const { - return findRegisterUseOperandIdx(Reg, false, TRI) != -1; - } - - /// Return true if the MachineInstr reads the specified virtual register. - /// Take into account that a partial define is a - /// read-modify-write operation. - bool readsVirtualRegister(unsigned Reg) const { - return readsWritesVirtualRegister(Reg).first; - } - - /// Return a pair of bools (reads, writes) indicating if this instruction - /// reads or writes Reg. This also considers partial defines. - /// If Ops is not null, all operand indices for Reg are added. - std::pair readsWritesVirtualRegister(unsigned Reg, - SmallVectorImpl *Ops = nullptr) const; - - /// Return true if the MachineInstr kills the specified register. - /// If TargetRegisterInfo is passed, then it also checks if there is - /// a kill of a super-register. - bool killsRegister(unsigned Reg, - const TargetRegisterInfo *TRI = nullptr) const { - return findRegisterUseOperandIdx(Reg, true, TRI) != -1; - } - - /// Return true if the MachineInstr fully defines the specified register. - /// If TargetRegisterInfo is passed, then it also checks - /// if there is a def of a super-register. - /// NOTE: It's ignoring subreg indices on virtual registers. - bool definesRegister(unsigned Reg, - const TargetRegisterInfo *TRI = nullptr) const { - return findRegisterDefOperandIdx(Reg, false, false, TRI) != -1; - } - - /// Return true if the MachineInstr modifies (fully define or partially - /// define) the specified register. - /// NOTE: It's ignoring subreg indices on virtual registers. - bool modifiesRegister(unsigned Reg, const TargetRegisterInfo *TRI) const { - return findRegisterDefOperandIdx(Reg, false, true, TRI) != -1; - } - - /// Returns true if the register is dead in this machine instruction. - /// If TargetRegisterInfo is passed, then it also checks - /// if there is a dead def of a super-register. - bool registerDefIsDead(unsigned Reg, - const TargetRegisterInfo *TRI = nullptr) const { - return findRegisterDefOperandIdx(Reg, true, false, TRI) != -1; - } - - /// Returns true if the MachineInstr has an implicit-use operand of exactly - /// the given register (not considering sub/super-registers). - bool hasRegisterImplicitUseOperand(unsigned Reg) const; - - /// Returns the operand index that is a use of the specific register or -1 - /// if it is not found. It further tightens the search criteria to a use - /// that kills the register if isKill is true. - int findRegisterUseOperandIdx(unsigned Reg, bool isKill = false, - const TargetRegisterInfo *TRI = nullptr) const; - - /// Wrapper for findRegisterUseOperandIdx, it returns - /// a pointer to the MachineOperand rather than an index. - MachineOperand *findRegisterUseOperand(unsigned Reg, bool isKill = false, - const TargetRegisterInfo *TRI = nullptr) { - int Idx = findRegisterUseOperandIdx(Reg, isKill, TRI); - return (Idx == -1) ? nullptr : &getOperand(Idx); - } - - const MachineOperand *findRegisterUseOperand( - unsigned Reg, bool isKill = false, - const TargetRegisterInfo *TRI = nullptr) const { - return const_cast(this)-> - findRegisterUseOperand(Reg, isKill, TRI); - } - - /// Returns the operand index that is a def of the specified register or - /// -1 if it is not found. If isDead is true, defs that are not dead are - /// skipped. If Overlap is true, then it also looks for defs that merely - /// overlap the specified register. If TargetRegisterInfo is non-null, - /// then it also checks if there is a def of a super-register. - /// This may also return a register mask operand when Overlap is true. - int findRegisterDefOperandIdx(unsigned Reg, - bool isDead = false, bool Overlap = false, - const TargetRegisterInfo *TRI = nullptr) const; - - /// Wrapper for findRegisterDefOperandIdx, it returns - /// a pointer to the MachineOperand rather than an index. - MachineOperand *findRegisterDefOperand(unsigned Reg, bool isDead = false, - const TargetRegisterInfo *TRI = nullptr) { - int Idx = findRegisterDefOperandIdx(Reg, isDead, false, TRI); - return (Idx == -1) ? nullptr : &getOperand(Idx); - } - - /// Find the index of the first operand in the - /// operand list that is used to represent the predicate. It returns -1 if - /// none is found. - int findFirstPredOperandIdx() const; - - /// Find the index of the flag word operand that - /// corresponds to operand OpIdx on an inline asm instruction. Returns -1 if - /// getOperand(OpIdx) does not belong to an inline asm operand group. - /// - /// If GroupNo is not NULL, it will receive the number of the operand group - /// containing OpIdx. - /// - /// The flag operand is an immediate that can be decoded with methods like - /// InlineAsm::hasRegClassConstraint(). - /// - int findInlineAsmFlagIdx(unsigned OpIdx, unsigned *GroupNo = nullptr) const; - - /// Compute the static register class constraint for operand OpIdx. - /// For normal instructions, this is derived from the MCInstrDesc. - /// For inline assembly it is derived from the flag words. - /// - /// Returns NULL if the static register class constraint cannot be - /// determined. - /// - const TargetRegisterClass* - getRegClassConstraint(unsigned OpIdx, - const TargetInstrInfo *TII, - const TargetRegisterInfo *TRI) const; - - /// \brief Applies the constraints (def/use) implied by this MI on \p Reg to - /// the given \p CurRC. - /// If \p ExploreBundle is set and MI is part of a bundle, all the - /// instructions inside the bundle will be taken into account. In other words, - /// this method accumulates all the constraints of the operand of this MI and - /// the related bundle if MI is a bundle or inside a bundle. - /// - /// Returns the register class that satisfies both \p CurRC and the - /// constraints set by MI. Returns NULL if such a register class does not - /// exist. - /// - /// \pre CurRC must not be NULL. - const TargetRegisterClass *getRegClassConstraintEffectForVReg( - unsigned Reg, const TargetRegisterClass *CurRC, - const TargetInstrInfo *TII, const TargetRegisterInfo *TRI, - bool ExploreBundle = false) const; - - /// \brief Applies the constraints (def/use) implied by the \p OpIdx operand - /// to the given \p CurRC. - /// - /// Returns the register class that satisfies both \p CurRC and the - /// constraints set by \p OpIdx MI. Returns NULL if such a register class - /// does not exist. - /// - /// \pre CurRC must not be NULL. - /// \pre The operand at \p OpIdx must be a register. - const TargetRegisterClass * - getRegClassConstraintEffect(unsigned OpIdx, const TargetRegisterClass *CurRC, - const TargetInstrInfo *TII, - const TargetRegisterInfo *TRI) const; - - /// Add a tie between the register operands at DefIdx and UseIdx. - /// The tie will cause the register allocator to ensure that the two - /// operands are assigned the same physical register. - /// - /// Tied operands are managed automatically for explicit operands in the - /// MCInstrDesc. This method is for exceptional cases like inline asm. - void tieOperands(unsigned DefIdx, unsigned UseIdx); - - /// Given the index of a tied register operand, find the - /// operand it is tied to. Defs are tied to uses and vice versa. Returns the - /// index of the tied operand which must exist. - unsigned findTiedOperandIdx(unsigned OpIdx) const; - - /// Given the index of a register def operand, - /// check if the register def is tied to a source operand, due to either - /// two-address elimination or inline assembly constraints. Returns the - /// first tied use operand index by reference if UseOpIdx is not null. - bool isRegTiedToUseOperand(unsigned DefOpIdx, - unsigned *UseOpIdx = nullptr) const { - const MachineOperand &MO = getOperand(DefOpIdx); - if (!MO.isReg() || !MO.isDef() || !MO.isTied()) - return false; - if (UseOpIdx) - *UseOpIdx = findTiedOperandIdx(DefOpIdx); - return true; - } - - /// Return true if the use operand of the specified index is tied to a def - /// operand. It also returns the def operand index by reference if DefOpIdx - /// is not null. - bool isRegTiedToDefOperand(unsigned UseOpIdx, - unsigned *DefOpIdx = nullptr) const { - const MachineOperand &MO = getOperand(UseOpIdx); - if (!MO.isReg() || !MO.isUse() || !MO.isTied()) - return false; - if (DefOpIdx) - *DefOpIdx = findTiedOperandIdx(UseOpIdx); - return true; - } - - /// Clears kill flags on all operands. - void clearKillInfo(); - - /// Replace all occurrences of FromReg with ToReg:SubIdx, - /// properly composing subreg indices where necessary. - void substituteRegister(unsigned FromReg, unsigned ToReg, unsigned SubIdx, - const TargetRegisterInfo &RegInfo); - - /// We have determined MI kills a register. Look for the - /// operand that uses it and mark it as IsKill. If AddIfNotFound is true, - /// add a implicit operand if it's not found. Returns true if the operand - /// exists / is added. - bool addRegisterKilled(unsigned IncomingReg, - const TargetRegisterInfo *RegInfo, - bool AddIfNotFound = false); - - /// Clear all kill flags affecting Reg. If RegInfo is provided, this includes - /// all aliasing registers. - void clearRegisterKills(unsigned Reg, const TargetRegisterInfo *RegInfo); - - /// We have determined MI defined a register without a use. - /// Look for the operand that defines it and mark it as IsDead. If - /// AddIfNotFound is true, add a implicit operand if it's not found. Returns - /// true if the operand exists / is added. - bool addRegisterDead(unsigned Reg, const TargetRegisterInfo *RegInfo, - bool AddIfNotFound = false); - - /// Clear all dead flags on operands defining register @p Reg. - void clearRegisterDeads(unsigned Reg); - - /// Mark all subregister defs of register @p Reg with the undef flag. - /// This function is used when we determined to have a subregister def in an - /// otherwise undefined super register. - void setRegisterDefReadUndef(unsigned Reg, bool IsUndef = true); - - /// We have determined MI defines a register. Make sure there is an operand - /// defining Reg. - void addRegisterDefined(unsigned Reg, - const TargetRegisterInfo *RegInfo = nullptr); - - /// Mark every physreg used by this instruction as - /// dead except those in the UsedRegs list. - /// - /// On instructions with register mask operands, also add implicit-def - /// operands for all registers in UsedRegs. - void setPhysRegsDeadExcept(ArrayRef UsedRegs, - const TargetRegisterInfo &TRI); - - /// Return true if it is safe to move this instruction. If - /// SawStore is set to true, it means that there is a store (or call) between - /// the instruction's location and its intended destination. - bool isSafeToMove(AliasAnalysis *AA, bool &SawStore) const; - - /// Return true if this instruction may have an ordered - /// or volatile memory reference, or if the information describing the memory - /// reference is not available. Return false if it is known to have no - /// ordered or volatile memory references. - bool hasOrderedMemoryRef() const; - - /// Return true if this instruction is loading from a - /// location whose value is invariant across the function. For example, - /// loading a value from the constant pool or from the argument area of - /// a function if it does not change. This should only return true of *all* - /// loads the instruction does are invariant (if it does multiple loads). - bool isInvariantLoad(AliasAnalysis *AA) const; - - /// If the specified instruction is a PHI that always merges together the - /// same virtual register, return the register, otherwise return 0. - unsigned isConstantValuePHI() const; - - /// Return true if this instruction has side effects that are not modeled - /// by mayLoad / mayStore, etc. - /// For all instructions, the property is encoded in MCInstrDesc::Flags - /// (see MCInstrDesc::hasUnmodeledSideEffects(). The only exception is - /// INLINEASM instruction, in which case the side effect property is encoded - /// in one of its operands (see InlineAsm::Extra_HasSideEffect). - /// - bool hasUnmodeledSideEffects() const; - - /// Returns true if it is illegal to fold a load across this instruction. - bool isLoadFoldBarrier() const; - - /// Return true if all the defs of this instruction are dead. - bool allDefsAreDead() const; - - /// Copy implicit register operands from specified - /// instruction to this instruction. - void copyImplicitOps(MachineFunction &MF, const MachineInstr &MI); - - // - // Debugging support - // - void print(raw_ostream &OS, bool SkipOpers = false) const; - void print(raw_ostream &OS, ModuleSlotTracker &MST, - bool SkipOpers = false) const; - void dump() const; - - //===--------------------------------------------------------------------===// - // Accessors used to build up machine instructions. - - /// Add the specified operand to the instruction. If it is an implicit - /// operand, it is added to the end of the operand list. If it is an - /// explicit operand it is added at the end of the explicit operand list - /// (before the first implicit operand). - /// - /// MF must be the machine function that was used to allocate this - /// instruction. - /// - /// MachineInstrBuilder provides a more convenient interface for creating - /// instructions and adding operands. - void addOperand(MachineFunction &MF, const MachineOperand &Op); - - /// Add an operand without providing an MF reference. This only works for - /// instructions that are inserted in a basic block. - /// - /// MachineInstrBuilder and the two-argument addOperand(MF, MO) should be - /// preferred. - void addOperand(const MachineOperand &Op); - - /// Replace the instruction descriptor (thus opcode) of - /// the current instruction with a new one. - void setDesc(const MCInstrDesc &tid) { MCID = &tid; } - - /// Replace current source information with new such. - /// Avoid using this, the constructor argument is preferable. - void setDebugLoc(DebugLoc dl) { - debugLoc = std::move(dl); - assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor"); - } - - /// Erase an operand from an instruction, leaving it with one - /// fewer operand than it started with. - void RemoveOperand(unsigned i); - - /// Add a MachineMemOperand to the machine instruction. - /// This function should be used only occasionally. The setMemRefs function - /// is the primary method for setting up a MachineInstr's MemRefs list. - void addMemOperand(MachineFunction &MF, MachineMemOperand *MO); - - /// Assign this MachineInstr's memory reference descriptor list. - /// This does not transfer ownership. - void setMemRefs(mmo_iterator NewMemRefs, mmo_iterator NewMemRefsEnd) { - setMemRefs(std::make_pair(NewMemRefs, NewMemRefsEnd-NewMemRefs)); - } - - /// Assign this MachineInstr's memory reference descriptor list. First - /// element in the pair is the begin iterator/pointer to the array; the - /// second is the number of MemoryOperands. This does not transfer ownership - /// of the underlying memory. - void setMemRefs(std::pair NewMemRefs) { - MemRefs = NewMemRefs.first; - NumMemRefs = uint8_t(NewMemRefs.second); - assert(NumMemRefs == NewMemRefs.second && - "Too many memrefs - must drop memory operands"); - } - - /// Return a set of memrefs (begin iterator, size) which conservatively - /// describe the memory behavior of both MachineInstrs. This is appropriate - /// for use when merging two MachineInstrs into one. This routine does not - /// modify the memrefs of the this MachineInstr. - std::pair mergeMemRefsWith(const MachineInstr& Other); - - /// Clear this MachineInstr's memory reference descriptor list. This resets - /// the memrefs to their most conservative state. This should be used only - /// as a last resort since it greatly pessimizes our knowledge of the memory - /// access performed by the instruction. - void dropMemRefs() { - MemRefs = nullptr; - NumMemRefs = 0; - } - - /// Break any tie involving OpIdx. - void untieRegOperand(unsigned OpIdx) { - MachineOperand &MO = getOperand(OpIdx); - if (MO.isReg() && MO.isTied()) { - getOperand(findTiedOperandIdx(OpIdx)).TiedTo = 0; - MO.TiedTo = 0; - } - } - - /// Add all implicit def and use operands to this instruction. - void addImplicitDefUseOperands(MachineFunction &MF); - -private: - /// If this instruction is embedded into a MachineFunction, return the - /// MachineRegisterInfo object for the current function, otherwise - /// return null. - MachineRegisterInfo *getRegInfo(); - - /// Unlink all of the register operands in this instruction from their - /// respective use lists. This requires that the operands already be on their - /// use lists. - void RemoveRegOperandsFromUseLists(MachineRegisterInfo&); - - /// Add all of the register operands in this instruction from their - /// respective use lists. This requires that the operands not be on their - /// use lists yet. - void AddRegOperandsToUseLists(MachineRegisterInfo&); - - /// Slow path for hasProperty when we're dealing with a bundle. - bool hasPropertyInBundle(unsigned Mask, QueryType Type) const; - - /// \brief Implements the logic of getRegClassConstraintEffectForVReg for the - /// this MI and the given operand index \p OpIdx. - /// If the related operand does not constrained Reg, this returns CurRC. - const TargetRegisterClass *getRegClassConstraintEffectForVRegImpl( - unsigned OpIdx, unsigned Reg, const TargetRegisterClass *CurRC, - const TargetInstrInfo *TII, const TargetRegisterInfo *TRI) const; -}; - -/// Special DenseMapInfo traits to compare MachineInstr* by *value* of the -/// instruction rather than by pointer value. -/// The hashing and equality testing functions ignore definitions so this is -/// useful for CSE, etc. -struct MachineInstrExpressionTrait : DenseMapInfo { - static inline MachineInstr *getEmptyKey() { - return nullptr; - } - - static inline MachineInstr *getTombstoneKey() { - return reinterpret_cast(-1); - } - - static unsigned getHashValue(const MachineInstr* const &MI); - - static bool isEqual(const MachineInstr* const &LHS, - const MachineInstr* const &RHS) { - if (RHS == getEmptyKey() || RHS == getTombstoneKey() || - LHS == getEmptyKey() || LHS == getTombstoneKey()) - return LHS == RHS; - return LHS->isIdenticalTo(*RHS, MachineInstr::IgnoreVRegDefs); - } -}; - -//===----------------------------------------------------------------------===// -// Debugging Support - -inline raw_ostream& operator<<(raw_ostream &OS, const MachineInstr &MI) { - MI.print(OS); - return OS; -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h b/llvm/include/llvm/CodeGen/MachineInstrBuilder.h deleted file mode 100644 index 37b67aa0..00000000 --- a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h +++ /dev/null @@ -1,490 +0,0 @@ -//===-- CodeGen/MachineInstBuilder.h - Simplify creation of MIs -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file exposes a function named BuildMI, which is useful for dramatically -// simplifying how MachineInstr's are created. It allows use of code like this: -// -// M = BuildMI(MBB, MI, DL, TII.get(X86::ADD8rr), Dst) -// .addReg(argVal1) -// .addReg(argVal2); -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEINSTRBUILDER_H -#define LLVM_CODEGEN_MACHINEINSTRBUILDER_H - -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineInstrBundle.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { - -class MCInstrDesc; -class MDNode; - -namespace RegState { - enum { - Define = 0x2, - Implicit = 0x4, - Kill = 0x8, - Dead = 0x10, - Undef = 0x20, - EarlyClobber = 0x40, - Debug = 0x80, - InternalRead = 0x100, - DefineNoRead = Define | Undef, - ImplicitDefine = Implicit | Define, - ImplicitKill = Implicit | Kill - }; -} - -class MachineInstrBuilder { - MachineFunction *MF; - MachineInstr *MI; -public: - MachineInstrBuilder() : MF(nullptr), MI(nullptr) {} - - /// Create a MachineInstrBuilder for manipulating an existing instruction. - /// F must be the machine function that was used to allocate I. - MachineInstrBuilder(MachineFunction &F, MachineInstr *I) : MF(&F), MI(I) {} - MachineInstrBuilder(MachineFunction &F, MachineBasicBlock::iterator I) - : MF(&F), MI(&*I) {} - - /// Allow automatic conversion to the machine instruction we are working on. - operator MachineInstr*() const { return MI; } - MachineInstr *operator->() const { return MI; } - operator MachineBasicBlock::iterator() const { return MI; } - - /// If conversion operators fail, use this method to get the MachineInstr - /// explicitly. - MachineInstr *getInstr() const { return MI; } - - /// Add a new virtual register operand. - const MachineInstrBuilder &addReg(unsigned RegNo, unsigned flags = 0, - unsigned SubReg = 0) const { - assert((flags & 0x1) == 0 && - "Passing in 'true' to addReg is forbidden! Use enums instead."); - MI->addOperand(*MF, MachineOperand::CreateReg(RegNo, - flags & RegState::Define, - flags & RegState::Implicit, - flags & RegState::Kill, - flags & RegState::Dead, - flags & RegState::Undef, - flags & RegState::EarlyClobber, - SubReg, - flags & RegState::Debug, - flags & RegState::InternalRead)); - return *this; - } - - /// Add a new immediate operand. - const MachineInstrBuilder &addImm(int64_t Val) const { - MI->addOperand(*MF, MachineOperand::CreateImm(Val)); - return *this; - } - - const MachineInstrBuilder &addCImm(const ConstantInt *Val) const { - MI->addOperand(*MF, MachineOperand::CreateCImm(Val)); - return *this; - } - - const MachineInstrBuilder &addFPImm(const ConstantFP *Val) const { - MI->addOperand(*MF, MachineOperand::CreateFPImm(Val)); - return *this; - } - - const MachineInstrBuilder &addMBB(MachineBasicBlock *MBB, - unsigned char TargetFlags = 0) const { - MI->addOperand(*MF, MachineOperand::CreateMBB(MBB, TargetFlags)); - return *this; - } - - const MachineInstrBuilder &addFrameIndex(int Idx) const { - MI->addOperand(*MF, MachineOperand::CreateFI(Idx)); - return *this; - } - - const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx, - int Offset = 0, - unsigned char TargetFlags = 0) const { - MI->addOperand(*MF, MachineOperand::CreateCPI(Idx, Offset, TargetFlags)); - return *this; - } - - const MachineInstrBuilder &addTargetIndex(unsigned Idx, int64_t Offset = 0, - unsigned char TargetFlags = 0) const { - MI->addOperand(*MF, MachineOperand::CreateTargetIndex(Idx, Offset, - TargetFlags)); - return *this; - } - - const MachineInstrBuilder &addJumpTableIndex(unsigned Idx, - unsigned char TargetFlags = 0) const { - MI->addOperand(*MF, MachineOperand::CreateJTI(Idx, TargetFlags)); - return *this; - } - - const MachineInstrBuilder &addGlobalAddress(const GlobalValue *GV, - int64_t Offset = 0, - unsigned char TargetFlags = 0) const { - MI->addOperand(*MF, MachineOperand::CreateGA(GV, Offset, TargetFlags)); - return *this; - } - - const MachineInstrBuilder &addExternalSymbol(const char *FnName, - unsigned char TargetFlags = 0) const { - MI->addOperand(*MF, MachineOperand::CreateES(FnName, TargetFlags)); - return *this; - } - - const MachineInstrBuilder &addBlockAddress(const BlockAddress *BA, - int64_t Offset = 0, - unsigned char TargetFlags = 0) const { - MI->addOperand(*MF, MachineOperand::CreateBA(BA, Offset, TargetFlags)); - return *this; - } - - const MachineInstrBuilder &addRegMask(const uint32_t *Mask) const { - MI->addOperand(*MF, MachineOperand::CreateRegMask(Mask)); - return *this; - } - - const MachineInstrBuilder &addMemOperand(MachineMemOperand *MMO) const { - MI->addMemOperand(*MF, MMO); - return *this; - } - - const MachineInstrBuilder &setMemRefs(MachineInstr::mmo_iterator b, - MachineInstr::mmo_iterator e) const { - MI->setMemRefs(b, e); - return *this; - } - - const MachineInstrBuilder &setMemRefs(std::pair MemOperandsRef) const { - MI->setMemRefs(MemOperandsRef); - return *this; - } - - const MachineInstrBuilder &addOperand(const MachineOperand &MO) const { - MI->addOperand(*MF, MO); - return *this; - } - - const MachineInstrBuilder &addMetadata(const MDNode *MD) const { - MI->addOperand(*MF, MachineOperand::CreateMetadata(MD)); - assert((MI->isDebugValue() ? static_cast(MI->getDebugVariable()) - : true) && - "first MDNode argument of a DBG_VALUE not a variable"); - return *this; - } - - const MachineInstrBuilder &addCFIIndex(unsigned CFIIndex) const { - MI->addOperand(*MF, MachineOperand::CreateCFIIndex(CFIIndex)); - return *this; - } - - const MachineInstrBuilder &addSym(MCSymbol *Sym, - unsigned char TargetFlags = 0) const { - MI->addOperand(*MF, MachineOperand::CreateMCSymbol(Sym, TargetFlags)); - return *this; - } - - const MachineInstrBuilder &setMIFlags(unsigned Flags) const { - MI->setFlags(Flags); - return *this; - } - - const MachineInstrBuilder &setMIFlag(MachineInstr::MIFlag Flag) const { - MI->setFlag(Flag); - return *this; - } - - // Add a displacement from an existing MachineOperand with an added offset. - const MachineInstrBuilder &addDisp(const MachineOperand &Disp, int64_t off, - unsigned char TargetFlags = 0) const { - // If caller specifies new TargetFlags then use it, otherwise the - // default behavior is to copy the target flags from the existing - // MachineOperand. This means if the caller wants to clear the - // target flags it needs to do so explicitly. - if (0 == TargetFlags) - TargetFlags = Disp.getTargetFlags(); - - switch (Disp.getType()) { - default: - llvm_unreachable("Unhandled operand type in addDisp()"); - case MachineOperand::MO_Immediate: - return addImm(Disp.getImm() + off); - case MachineOperand::MO_ConstantPoolIndex: - return addConstantPoolIndex(Disp.getIndex(), Disp.getOffset() + off, - TargetFlags); - case MachineOperand::MO_GlobalAddress: - return addGlobalAddress(Disp.getGlobal(), Disp.getOffset() + off, - TargetFlags); - } - } - - /// Copy all the implicit operands from OtherMI onto this one. - const MachineInstrBuilder & - copyImplicitOps(const MachineInstr &OtherMI) const { - MI->copyImplicitOps(*MF, OtherMI); - return *this; - } -}; - -/// Builder interface. Specify how to create the initial instruction itself. -inline MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, - const MCInstrDesc &MCID) { - return MachineInstrBuilder(MF, MF.CreateMachineInstr(MCID, DL)); -} - -/// This version of the builder sets up the first operand as a -/// destination virtual register. -inline MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, - const MCInstrDesc &MCID, unsigned DestReg) { - return MachineInstrBuilder(MF, MF.CreateMachineInstr(MCID, DL)) - .addReg(DestReg, RegState::Define); -} - -/// This version of the builder inserts the newly-built instruction before -/// the given position in the given MachineBasicBlock, and sets up the first -/// operand as a destination virtual register. -inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, - MachineBasicBlock::iterator I, - const DebugLoc &DL, const MCInstrDesc &MCID, - unsigned DestReg) { - MachineFunction &MF = *BB.getParent(); - MachineInstr *MI = MF.CreateMachineInstr(MCID, DL); - BB.insert(I, MI); - return MachineInstrBuilder(MF, MI).addReg(DestReg, RegState::Define); -} - -/// This version of the builder inserts the newly-built instruction before -/// the given position in the given MachineBasicBlock, and sets up the first -/// operand as a destination virtual register. -/// -/// If \c I is inside a bundle, then the newly inserted \a MachineInstr is -/// added to the same bundle. -inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, - MachineBasicBlock::instr_iterator I, - const DebugLoc &DL, const MCInstrDesc &MCID, - unsigned DestReg) { - MachineFunction &MF = *BB.getParent(); - MachineInstr *MI = MF.CreateMachineInstr(MCID, DL); - BB.insert(I, MI); - return MachineInstrBuilder(MF, MI).addReg(DestReg, RegState::Define); -} - -inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, MachineInstr &I, - const DebugLoc &DL, const MCInstrDesc &MCID, - unsigned DestReg) { - // Calling the overload for instr_iterator is always correct. However, the - // definition is not available in headers, so inline the check. - if (I.isInsideBundle()) - return BuildMI(BB, MachineBasicBlock::instr_iterator(I), DL, MCID, DestReg); - return BuildMI(BB, MachineBasicBlock::iterator(I), DL, MCID, DestReg); -} - -inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, MachineInstr *I, - const DebugLoc &DL, const MCInstrDesc &MCID, - unsigned DestReg) { - return BuildMI(BB, *I, DL, MCID, DestReg); -} - -/// This version of the builder inserts the newly-built instruction before the -/// given position in the given MachineBasicBlock, and does NOT take a -/// destination register. -inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, - MachineBasicBlock::iterator I, - const DebugLoc &DL, - const MCInstrDesc &MCID) { - MachineFunction &MF = *BB.getParent(); - MachineInstr *MI = MF.CreateMachineInstr(MCID, DL); - BB.insert(I, MI); - return MachineInstrBuilder(MF, MI); -} - -inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, - MachineBasicBlock::instr_iterator I, - const DebugLoc &DL, - const MCInstrDesc &MCID) { - MachineFunction &MF = *BB.getParent(); - MachineInstr *MI = MF.CreateMachineInstr(MCID, DL); - BB.insert(I, MI); - return MachineInstrBuilder(MF, MI); -} - -inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, MachineInstr &I, - const DebugLoc &DL, - const MCInstrDesc &MCID) { - // Calling the overload for instr_iterator is always correct. However, the - // definition is not available in headers, so inline the check. - if (I.isInsideBundle()) - return BuildMI(BB, MachineBasicBlock::instr_iterator(I), DL, MCID); - return BuildMI(BB, MachineBasicBlock::iterator(I), DL, MCID); -} - -inline MachineInstrBuilder BuildMI(MachineBasicBlock &BB, MachineInstr *I, - const DebugLoc &DL, - const MCInstrDesc &MCID) { - return BuildMI(BB, *I, DL, MCID); -} - -/// This version of the builder inserts the newly-built instruction at the end -/// of the given MachineBasicBlock, and does NOT take a destination register. -inline MachineInstrBuilder BuildMI(MachineBasicBlock *BB, const DebugLoc &DL, - const MCInstrDesc &MCID) { - return BuildMI(*BB, BB->end(), DL, MCID); -} - -/// This version of the builder inserts the newly-built instruction at the -/// end of the given MachineBasicBlock, and sets up the first operand as a -/// destination virtual register. -inline MachineInstrBuilder BuildMI(MachineBasicBlock *BB, const DebugLoc &DL, - const MCInstrDesc &MCID, unsigned DestReg) { - return BuildMI(*BB, BB->end(), DL, MCID, DestReg); -} - -/// This version of the builder builds a DBG_VALUE intrinsic -/// for either a value in a register or a register-indirect+offset -/// address. The convention is that a DBG_VALUE is indirect iff the -/// second operand is an immediate. -MachineInstrBuilder BuildMI(MachineFunction &MF, const DebugLoc &DL, - const MCInstrDesc &MCID, bool IsIndirect, - unsigned Reg, unsigned Offset, - const MDNode *Variable, const MDNode *Expr); - -/// This version of the builder builds a DBG_VALUE intrinsic -/// for either a value in a register or a register-indirect+offset -/// address and inserts it at position I. -MachineInstrBuilder BuildMI(MachineBasicBlock &BB, - MachineBasicBlock::iterator I, const DebugLoc &DL, - const MCInstrDesc &MCID, bool IsIndirect, - unsigned Reg, unsigned Offset, - const MDNode *Variable, const MDNode *Expr); - -inline unsigned getDefRegState(bool B) { - return B ? RegState::Define : 0; -} -inline unsigned getImplRegState(bool B) { - return B ? RegState::Implicit : 0; -} -inline unsigned getKillRegState(bool B) { - return B ? RegState::Kill : 0; -} -inline unsigned getDeadRegState(bool B) { - return B ? RegState::Dead : 0; -} -inline unsigned getUndefRegState(bool B) { - return B ? RegState::Undef : 0; -} -inline unsigned getInternalReadRegState(bool B) { - return B ? RegState::InternalRead : 0; -} -inline unsigned getDebugRegState(bool B) { - return B ? RegState::Debug : 0; -} - -/// Get all register state flags from machine operand \p RegOp. -inline unsigned getRegState(const MachineOperand &RegOp) { - assert(RegOp.isReg() && "Not a register operand"); - return getDefRegState(RegOp.isDef()) | - getImplRegState(RegOp.isImplicit()) | - getKillRegState(RegOp.isKill()) | - getDeadRegState(RegOp.isDead()) | - getUndefRegState(RegOp.isUndef()) | - getInternalReadRegState(RegOp.isInternalRead()) | - getDebugRegState(RegOp.isDebug()); -} - -/// Helper class for constructing bundles of MachineInstrs. -/// -/// MIBundleBuilder can create a bundle from scratch by inserting new -/// MachineInstrs one at a time, or it can create a bundle from a sequence of -/// existing MachineInstrs in a basic block. -class MIBundleBuilder { - MachineBasicBlock &MBB; - MachineBasicBlock::instr_iterator Begin; - MachineBasicBlock::instr_iterator End; - -public: - /// Create an MIBundleBuilder that inserts instructions into a new bundle in - /// BB above the bundle or instruction at Pos. - MIBundleBuilder(MachineBasicBlock &BB, MachineBasicBlock::iterator Pos) - : MBB(BB), Begin(Pos.getInstrIterator()), End(Begin) {} - - /// Create a bundle from the sequence of instructions between B and E. - MIBundleBuilder(MachineBasicBlock &BB, MachineBasicBlock::iterator B, - MachineBasicBlock::iterator E) - : MBB(BB), Begin(B.getInstrIterator()), End(E.getInstrIterator()) { - assert(B != E && "No instructions to bundle"); - ++B; - while (B != E) { - MachineInstr &MI = *B; - ++B; - MI.bundleWithPred(); - } - } - - /// Create an MIBundleBuilder representing an existing instruction or bundle - /// that has MI as its head. - explicit MIBundleBuilder(MachineInstr *MI) - : MBB(*MI->getParent()), Begin(MI), End(getBundleEnd(*MI)) {} - - /// Return a reference to the basic block containing this bundle. - MachineBasicBlock &getMBB() const { return MBB; } - - /// Return true if no instructions have been inserted in this bundle yet. - /// Empty bundles aren't representable in a MachineBasicBlock. - bool empty() const { return Begin == End; } - - /// Return an iterator to the first bundled instruction. - MachineBasicBlock::instr_iterator begin() const { return Begin; } - - /// Return an iterator beyond the last bundled instruction. - MachineBasicBlock::instr_iterator end() const { return End; } - - /// Insert MI into this bundle before I which must point to an instruction in - /// the bundle, or end(). - MIBundleBuilder &insert(MachineBasicBlock::instr_iterator I, - MachineInstr *MI) { - MBB.insert(I, MI); - if (I == Begin) { - if (!empty()) - MI->bundleWithSucc(); - Begin = MI->getIterator(); - return *this; - } - if (I == End) { - MI->bundleWithPred(); - return *this; - } - // MI was inserted in the middle of the bundle, so its neighbors' flags are - // already fine. Update MI's bundle flags manually. - MI->setFlag(MachineInstr::BundledPred); - MI->setFlag(MachineInstr::BundledSucc); - return *this; - } - - /// Insert MI into MBB by prepending it to the instructions in the bundle. - /// MI will become the first instruction in the bundle. - MIBundleBuilder &prepend(MachineInstr *MI) { - return insert(begin(), MI); - } - - /// Insert MI into MBB by appending it to the instructions in the bundle. - /// MI will become the last instruction in the bundle. - MIBundleBuilder &append(MachineInstr *MI) { - return insert(end(), MI); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineInstrBundle.h b/llvm/include/llvm/CodeGen/MachineInstrBundle.h deleted file mode 100644 index c0033a51..00000000 --- a/llvm/include/llvm/CodeGen/MachineInstrBundle.h +++ /dev/null @@ -1,262 +0,0 @@ -//===-- CodeGen/MachineInstBundle.h - MI bundle utilities -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provide utility functions to manipulate machine instruction -// bundles. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEINSTRBUNDLE_H -#define LLVM_CODEGEN_MACHINEINSTRBUNDLE_H - -#include "llvm/CodeGen/MachineBasicBlock.h" - -namespace llvm { - -/// finalizeBundle - Finalize a machine instruction bundle which includes -/// a sequence of instructions starting from FirstMI to LastMI (exclusive). -/// This routine adds a BUNDLE instruction to represent the bundle, it adds -/// IsInternalRead markers to MachineOperands which are defined inside the -/// bundle, and it copies externally visible defs and uses to the BUNDLE -/// instruction. -void finalizeBundle(MachineBasicBlock &MBB, - MachineBasicBlock::instr_iterator FirstMI, - MachineBasicBlock::instr_iterator LastMI); - -/// finalizeBundle - Same functionality as the previous finalizeBundle except -/// the last instruction in the bundle is not provided as an input. This is -/// used in cases where bundles are pre-determined by marking instructions -/// with 'InsideBundle' marker. It returns the MBB instruction iterator that -/// points to the end of the bundle. -MachineBasicBlock::instr_iterator finalizeBundle(MachineBasicBlock &MBB, - MachineBasicBlock::instr_iterator FirstMI); - -/// finalizeBundles - Finalize instruction bundles in the specified -/// MachineFunction. Return true if any bundles are finalized. -bool finalizeBundles(MachineFunction &MF); - -/// getBundleStart - Returns the first instruction in the bundle containing MI. -/// -inline MachineInstr &getBundleStart(MachineInstr &MI) { - MachineBasicBlock::instr_iterator I(MI); - while (I->isBundledWithPred()) - --I; - return *I; -} - -inline const MachineInstr &getBundleStart(const MachineInstr &MI) { - MachineBasicBlock::const_instr_iterator I(MI); - while (I->isBundledWithPred()) - --I; - return *I; -} - -/// Return an iterator pointing beyond the bundle containing MI. -inline MachineBasicBlock::instr_iterator getBundleEnd(MachineInstr &MI) { - MachineBasicBlock::instr_iterator I(MI); - while (I->isBundledWithSucc()) - ++I; - return ++I; -} - -/// Return an iterator pointing beyond the bundle containing MI. -inline MachineBasicBlock::const_instr_iterator -getBundleEnd(const MachineInstr &MI) { - MachineBasicBlock::const_instr_iterator I(MI); - while (I->isBundledWithSucc()) - ++I; - return ++I; -} - -//===----------------------------------------------------------------------===// -// MachineOperand iterator -// - -/// MachineOperandIteratorBase - Iterator that can visit all operands on a -/// MachineInstr, or all operands on a bundle of MachineInstrs. This class is -/// not intended to be used directly, use one of the sub-classes instead. -/// -/// Intended use: -/// -/// for (MIBundleOperands MIO(MI); MIO.isValid(); ++MIO) { -/// if (!MIO->isReg()) -/// continue; -/// ... -/// } -/// -class MachineOperandIteratorBase { - MachineBasicBlock::instr_iterator InstrI, InstrE; - MachineInstr::mop_iterator OpI, OpE; - - // If the operands on InstrI are exhausted, advance InstrI to the next - // bundled instruction with operands. - void advance() { - while (OpI == OpE) { - // Don't advance off the basic block, or into a new bundle. - if (++InstrI == InstrE || !InstrI->isInsideBundle()) - break; - OpI = InstrI->operands_begin(); - OpE = InstrI->operands_end(); - } - } - -protected: - /// MachineOperandIteratorBase - Create an iterator that visits all operands - /// on MI, or all operands on every instruction in the bundle containing MI. - /// - /// @param MI The instruction to examine. - /// @param WholeBundle When true, visit all operands on the entire bundle. - /// - explicit MachineOperandIteratorBase(MachineInstr &MI, bool WholeBundle) { - if (WholeBundle) { - InstrI = getBundleStart(MI).getIterator(); - InstrE = MI.getParent()->instr_end(); - } else { - InstrI = InstrE = MI.getIterator(); - ++InstrE; - } - OpI = InstrI->operands_begin(); - OpE = InstrI->operands_end(); - if (WholeBundle) - advance(); - } - - MachineOperand &deref() const { return *OpI; } - -public: - /// isValid - Returns true until all the operands have been visited. - bool isValid() const { return OpI != OpE; } - - /// Preincrement. Move to the next operand. - void operator++() { - assert(isValid() && "Cannot advance MIOperands beyond the last operand"); - ++OpI; - advance(); - } - - /// getOperandNo - Returns the number of the current operand relative to its - /// instruction. - /// - unsigned getOperandNo() const { - return OpI - InstrI->operands_begin(); - } - - /// VirtRegInfo - Information about a virtual register used by a set of operands. - /// - struct VirtRegInfo { - /// Reads - One of the operands read the virtual register. This does not - /// include or use operands, see MO::readsReg(). - bool Reads; - - /// Writes - One of the operands writes the virtual register. - bool Writes; - - /// Tied - Uses and defs must use the same register. This can be because of - /// a two-address constraint, or there may be a partial redefinition of a - /// sub-register. - bool Tied; - }; - - /// Information about how a physical register Reg is used by a set of - /// operands. - struct PhysRegInfo { - /// There is a regmask operand indicating Reg is clobbered. - /// \see MachineOperand::CreateRegMask(). - bool Clobbered; - - /// Reg or one of its aliases is defined. The definition may only cover - /// parts of the register. - bool Defined; - /// Reg or a super-register is defined. The definition covers the full - /// register. - bool FullyDefined; - - /// Reg or one of its aliases is read. The register may only be read - /// partially. - bool Read; - /// Reg or a super-register is read. The full register is read. - bool FullyRead; - - /// Either: - /// - Reg is FullyDefined and all defs of reg or an overlapping - /// register are dead, or - /// - Reg is completely dead because "defined" by a clobber. - bool DeadDef; - - /// Reg is Defined and all defs of reg or an overlapping register are - /// dead. - bool PartialDeadDef; - - /// There is a use operand of reg or a super-register with kill flag set. - bool Killed; - }; - - /// analyzeVirtReg - Analyze how the current instruction or bundle uses a - /// virtual register. This function should not be called after operator++(), - /// it expects a fresh iterator. - /// - /// @param Reg The virtual register to analyze. - /// @param Ops When set, this vector will receive an (MI, OpNum) entry for - /// each operand referring to Reg. - /// @returns A filled-in RegInfo struct. - VirtRegInfo analyzeVirtReg(unsigned Reg, - SmallVectorImpl > *Ops = nullptr); - - /// analyzePhysReg - Analyze how the current instruction or bundle uses a - /// physical register. This function should not be called after operator++(), - /// it expects a fresh iterator. - /// - /// @param Reg The physical register to analyze. - /// @returns A filled-in PhysRegInfo struct. - PhysRegInfo analyzePhysReg(unsigned Reg, const TargetRegisterInfo *TRI); -}; - -/// MIOperands - Iterate over operands of a single instruction. -/// -class MIOperands : public MachineOperandIteratorBase { -public: - MIOperands(MachineInstr &MI) : MachineOperandIteratorBase(MI, false) {} - MachineOperand &operator* () const { return deref(); } - MachineOperand *operator->() const { return &deref(); } -}; - -/// ConstMIOperands - Iterate over operands of a single const instruction. -/// -class ConstMIOperands : public MachineOperandIteratorBase { -public: - ConstMIOperands(const MachineInstr &MI) - : MachineOperandIteratorBase(const_cast(MI), false) {} - const MachineOperand &operator* () const { return deref(); } - const MachineOperand *operator->() const { return &deref(); } -}; - -/// MIBundleOperands - Iterate over all operands in a bundle of machine -/// instructions. -/// -class MIBundleOperands : public MachineOperandIteratorBase { -public: - MIBundleOperands(MachineInstr &MI) : MachineOperandIteratorBase(MI, true) {} - MachineOperand &operator* () const { return deref(); } - MachineOperand *operator->() const { return &deref(); } -}; - -/// ConstMIBundleOperands - Iterate over all operands in a const bundle of -/// machine instructions. -/// -class ConstMIBundleOperands : public MachineOperandIteratorBase { -public: - ConstMIBundleOperands(const MachineInstr &MI) - : MachineOperandIteratorBase(const_cast(MI), true) {} - const MachineOperand &operator* () const { return deref(); } - const MachineOperand *operator->() const { return &deref(); } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h b/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h deleted file mode 100644 index 45a9a188..00000000 --- a/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h +++ /dev/null @@ -1,92 +0,0 @@ -//===- llvm/CodeGen/MachineInstrBundleIterator.h ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Defines an iterator class that bundles MachineInstr. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H -#define LLVM_CODEGEN_MACHINEINSTRBUNDLEITERATOR_H - -#include "llvm/ADT/ilist.h" -#include - -namespace llvm { - -/// MachineBasicBlock iterator that automatically skips over MIs that are -/// inside bundles (i.e. walk top level MIs only). -template -class MachineInstrBundleIterator - : public std::iterator { - typedef ilist_iterator instr_iterator; - instr_iterator MII; - -public: - MachineInstrBundleIterator(instr_iterator MI) : MII(MI) {} - - MachineInstrBundleIterator(Ty &MI) : MII(MI) { - assert(!MI.isBundledWithPred() && "It's not legal to initialize " - "MachineInstrBundleIterator with a " - "bundled MI"); - } - MachineInstrBundleIterator(Ty *MI) : MII(MI) { - // FIXME: This conversion should be explicit. - assert((!MI || !MI->isBundledWithPred()) && "It's not legal to initialize " - "MachineInstrBundleIterator " - "with a bundled MI"); - } - // Template allows conversion from const to nonconst. - template - MachineInstrBundleIterator(const MachineInstrBundleIterator &I) - : MII(I.getInstrIterator()) {} - MachineInstrBundleIterator() : MII(nullptr) {} - - Ty &operator*() const { return *MII; } - Ty *operator->() const { return &operator*(); } - - // FIXME: This conversion should be explicit. - operator Ty *() const { return MII.getNodePtrUnchecked(); } - - bool operator==(const MachineInstrBundleIterator &X) const { - return MII == X.MII; - } - bool operator!=(const MachineInstrBundleIterator &X) const { - return !operator==(X); - } - - // Increment and decrement operators... - MachineInstrBundleIterator &operator--() { - do - --MII; - while (MII->isBundledWithPred()); - return *this; - } - MachineInstrBundleIterator &operator++() { - while (MII->isBundledWithSucc()) - ++MII; - ++MII; - return *this; - } - MachineInstrBundleIterator operator--(int) { - MachineInstrBundleIterator Temp = *this; - --*this; - return Temp; - } - MachineInstrBundleIterator operator++(int) { - MachineInstrBundleIterator Temp = *this; - ++*this; - return Temp; - } - - instr_iterator getInstrIterator() const { return MII; } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineJumpTableInfo.h b/llvm/include/llvm/CodeGen/MachineJumpTableInfo.h deleted file mode 100644 index adcd1d0d..00000000 --- a/llvm/include/llvm/CodeGen/MachineJumpTableInfo.h +++ /dev/null @@ -1,130 +0,0 @@ -//===-- CodeGen/MachineJumpTableInfo.h - Abstract Jump Tables --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The MachineJumpTableInfo class keeps track of jump tables referenced by -// lowered switch instructions in the MachineFunction. -// -// Instructions reference the address of these jump tables through the use of -// MO_JumpTableIndex values. When emitting assembly or machine code, these -// virtual address references are converted to refer to the address of the -// function jump tables. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H -#define LLVM_CODEGEN_MACHINEJUMPTABLEINFO_H - -#include -#include - -namespace llvm { - -class MachineBasicBlock; -class DataLayout; -class raw_ostream; - -/// MachineJumpTableEntry - One jump table in the jump table info. -/// -struct MachineJumpTableEntry { - /// MBBs - The vector of basic blocks from which to create the jump table. - std::vector MBBs; - - explicit MachineJumpTableEntry(const std::vector &M) - : MBBs(M) {} -}; - -class MachineJumpTableInfo { -public: - /// JTEntryKind - This enum indicates how each entry of the jump table is - /// represented and emitted. - enum JTEntryKind { - /// EK_BlockAddress - Each entry is a plain address of block, e.g.: - /// .word LBB123 - EK_BlockAddress, - - /// EK_GPRel64BlockAddress - Each entry is an address of block, encoded - /// with a relocation as gp-relative, e.g.: - /// .gpdword LBB123 - EK_GPRel64BlockAddress, - - /// EK_GPRel32BlockAddress - Each entry is an address of block, encoded - /// with a relocation as gp-relative, e.g.: - /// .gprel32 LBB123 - EK_GPRel32BlockAddress, - - /// EK_LabelDifference32 - Each entry is the address of the block minus - /// the address of the jump table. This is used for PIC jump tables where - /// gprel32 is not supported. e.g.: - /// .word LBB123 - LJTI1_2 - /// If the .set directive is supported, this is emitted as: - /// .set L4_5_set_123, LBB123 - LJTI1_2 - /// .word L4_5_set_123 - EK_LabelDifference32, - - /// EK_Inline - Jump table entries are emitted inline at their point of - /// use. It is the responsibility of the target to emit the entries. - EK_Inline, - - /// EK_Custom32 - Each entry is a 32-bit value that is custom lowered by the - /// TargetLowering::LowerCustomJumpTableEntry hook. - EK_Custom32 - }; -private: - JTEntryKind EntryKind; - std::vector JumpTables; -public: - explicit MachineJumpTableInfo(JTEntryKind Kind): EntryKind(Kind) {} - - JTEntryKind getEntryKind() const { return EntryKind; } - - /// getEntrySize - Return the size of each entry in the jump table. - unsigned getEntrySize(const DataLayout &TD) const; - /// getEntryAlignment - Return the alignment of each entry in the jump table. - unsigned getEntryAlignment(const DataLayout &TD) const; - - /// createJumpTableIndex - Create a new jump table. - /// - unsigned createJumpTableIndex(const std::vector &DestBBs); - - /// isEmpty - Return true if there are no jump tables. - /// - bool isEmpty() const { return JumpTables.empty(); } - - const std::vector &getJumpTables() const { - return JumpTables; - } - - /// RemoveJumpTable - Mark the specific index as being dead. This will - /// prevent it from being emitted. - void RemoveJumpTable(unsigned Idx) { - JumpTables[Idx].MBBs.clear(); - } - - /// ReplaceMBBInJumpTables - If Old is the target of any jump tables, update - /// the jump tables to branch to New instead. - bool ReplaceMBBInJumpTables(MachineBasicBlock *Old, MachineBasicBlock *New); - - /// ReplaceMBBInJumpTable - If Old is a target of the jump tables, update - /// the jump table to branch to New instead. - bool ReplaceMBBInJumpTable(unsigned Idx, MachineBasicBlock *Old, - MachineBasicBlock *New); - - /// print - Used by the MachineFunction printer to print information about - /// jump tables. Implemented in MachineFunction.cpp - /// - void print(raw_ostream &OS) const; - - /// dump - Call to stderr. - /// - void dump() const; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineLoopInfo.h b/llvm/include/llvm/CodeGen/MachineLoopInfo.h deleted file mode 100644 index 224a2a1a..00000000 --- a/llvm/include/llvm/CodeGen/MachineLoopInfo.h +++ /dev/null @@ -1,178 +0,0 @@ -//===- llvm/CodeGen/MachineLoopInfo.h - Natural Loop Calculator -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MachineLoopInfo class that is used to identify natural -// loops and determine the loop depth of various nodes of the CFG. Note that -// natural loops may actually be several loops that share the same header node. -// -// This analysis calculates the nesting structure of loops in a function. For -// each natural loop identified, this analysis identifies natural loops -// contained entirely within the loop and the basic blocks the make up the loop. -// -// It can calculate on the fly various bits of information, for example: -// -// * whether there is a preheader for the loop -// * the number of back edges to the header -// * whether or not a particular block branches out of the loop -// * the successor blocks of the loop -// * the loop depth -// * the trip count -// * etc... -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINELOOPINFO_H -#define LLVM_CODEGEN_MACHINELOOPINFO_H - -#include "llvm/Analysis/LoopInfo.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineFunctionPass.h" - -namespace llvm { - -// Implementation in LoopInfoImpl.h -class MachineLoop; -extern template class LoopBase; - -class MachineLoop : public LoopBase { -public: - MachineLoop(); - - /// Return the "top" block in the loop, which is the first block in the linear - /// layout, ignoring any parts of the loop not contiguous with the part that - /// contains the header. - MachineBasicBlock *getTopBlock(); - - /// Return the "bottom" block in the loop, which is the last block in the - /// linear layout, ignoring any parts of the loop not contiguous with the part - /// that contains the header. - MachineBasicBlock *getBottomBlock(); - - void dump() const; - -private: - friend class LoopInfoBase; - explicit MachineLoop(MachineBasicBlock *MBB) - : LoopBase(MBB) {} -}; - -// Implementation in LoopInfoImpl.h -extern template class LoopInfoBase; - -class MachineLoopInfo : public MachineFunctionPass { - LoopInfoBase LI; - friend class LoopBase; - - void operator=(const MachineLoopInfo &) = delete; - MachineLoopInfo(const MachineLoopInfo &) = delete; - -public: - static char ID; // Pass identification, replacement for typeid - - MachineLoopInfo() : MachineFunctionPass(ID) { - initializeMachineLoopInfoPass(*PassRegistry::getPassRegistry()); - } - - LoopInfoBase& getBase() { return LI; } - - /// The iterator interface to the top-level loops in the current function. - typedef LoopInfoBase::iterator iterator; - inline iterator begin() const { return LI.begin(); } - inline iterator end() const { return LI.end(); } - bool empty() const { return LI.empty(); } - - /// Return the innermost loop that BB lives in. If a basic block is in no loop - /// (for example the entry node), null is returned. - inline MachineLoop *getLoopFor(const MachineBasicBlock *BB) const { - return LI.getLoopFor(BB); - } - - /// Same as getLoopFor. - inline const MachineLoop *operator[](const MachineBasicBlock *BB) const { - return LI.getLoopFor(BB); - } - - /// Return the loop nesting level of the specified block. - inline unsigned getLoopDepth(const MachineBasicBlock *BB) const { - return LI.getLoopDepth(BB); - } - - /// True if the block is a loop header node. - inline bool isLoopHeader(const MachineBasicBlock *BB) const { - return LI.isLoopHeader(BB); - } - - /// Calculate the natural loop information. - bool runOnMachineFunction(MachineFunction &F) override; - - void releaseMemory() override { LI.releaseMemory(); } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - /// This removes the specified top-level loop from this loop info object. The - /// loop is not deleted, as it will presumably be inserted into another loop. - inline MachineLoop *removeLoop(iterator I) { return LI.removeLoop(I); } - - /// Change the top-level loop that contains BB to the specified loop. This - /// should be used by transformations that restructure the loop hierarchy - /// tree. - inline void changeLoopFor(MachineBasicBlock *BB, MachineLoop *L) { - LI.changeLoopFor(BB, L); - } - - /// Replace the specified loop in the top-level loops list with the indicated - /// loop. - inline void changeTopLevelLoop(MachineLoop *OldLoop, MachineLoop *NewLoop) { - LI.changeTopLevelLoop(OldLoop, NewLoop); - } - - /// This adds the specified loop to the collection of top-level loops. - inline void addTopLevelLoop(MachineLoop *New) { - LI.addTopLevelLoop(New); - } - - /// This method completely removes BB from all data structures, including all - /// of the Loop objects it is nested in and our mapping from - /// MachineBasicBlocks to loops. - void removeBlock(MachineBasicBlock *BB) { - LI.removeBlock(BB); - } -}; - - -// Allow clients to walk the list of nested loops... -template <> struct GraphTraits { - typedef const MachineLoop NodeType; - typedef MachineLoopInfo::iterator ChildIteratorType; - - static NodeType *getEntryNode(const MachineLoop *L) { return L; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->end(); - } -}; - -template <> struct GraphTraits { - typedef MachineLoop NodeType; - typedef MachineLoopInfo::iterator ChildIteratorType; - - static NodeType *getEntryNode(MachineLoop *L) { return L; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->end(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineMemOperand.h b/llvm/include/llvm/CodeGen/MachineMemOperand.h deleted file mode 100644 index 5fa70587..00000000 --- a/llvm/include/llvm/CodeGen/MachineMemOperand.h +++ /dev/null @@ -1,240 +0,0 @@ -//==- llvm/CodeGen/MachineMemOperand.h - MachineMemOperand class -*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MachineMemOperand class, which is a -// description of a memory reference. It is used to help track dependencies -// in the backend. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEMEMOPERAND_H -#define LLVM_CODEGEN_MACHINEMEMOPERAND_H - -#include "llvm/ADT/BitmaskEnum.h" -#include "llvm/ADT/PointerUnion.h" -#include "llvm/CodeGen/PseudoSourceValue.h" -#include "llvm/IR/Metadata.h" -#include "llvm/IR/Value.h" // PointerLikeTypeTraits -#include "llvm/Support/DataTypes.h" - -namespace llvm { - -class FoldingSetNodeID; -class MDNode; -class raw_ostream; -class MachineFunction; -class ModuleSlotTracker; - -/// This class contains a discriminated union of information about pointers in -/// memory operands, relating them back to LLVM IR or to virtual locations (such -/// as frame indices) that are exposed during codegen. -struct MachinePointerInfo { - /// This is the IR pointer value for the access, or it is null if unknown. - /// If this is null, then the access is to a pointer in the default address - /// space. - PointerUnion V; - - /// Offset - This is an offset from the base Value*. - int64_t Offset; - - explicit MachinePointerInfo(const Value *v = nullptr, int64_t offset = 0) - : V(v), Offset(offset) {} - - explicit MachinePointerInfo(const PseudoSourceValue *v, - int64_t offset = 0) - : V(v), Offset(offset) {} - - MachinePointerInfo getWithOffset(int64_t O) const { - if (V.isNull()) return MachinePointerInfo(); - if (V.is()) - return MachinePointerInfo(V.get(), Offset+O); - return MachinePointerInfo(V.get(), Offset+O); - } - - /// Return the LLVM IR address space number that this pointer points into. - unsigned getAddrSpace() const; - - /// Return a MachinePointerInfo record that refers to the constant pool. - static MachinePointerInfo getConstantPool(MachineFunction &MF); - - /// Return a MachinePointerInfo record that refers to the specified - /// FrameIndex. - static MachinePointerInfo getFixedStack(MachineFunction &MF, int FI, - int64_t Offset = 0); - - /// Return a MachinePointerInfo record that refers to a jump table entry. - static MachinePointerInfo getJumpTable(MachineFunction &MF); - - /// Return a MachinePointerInfo record that refers to a GOT entry. - static MachinePointerInfo getGOT(MachineFunction &MF); - - /// Stack pointer relative access. - static MachinePointerInfo getStack(MachineFunction &MF, int64_t Offset); -}; - - -//===----------------------------------------------------------------------===// -/// A description of a memory reference used in the backend. -/// Instead of holding a StoreInst or LoadInst, this class holds the address -/// Value of the reference along with a byte size and offset. This allows it -/// to describe lowered loads and stores. Also, the special PseudoSourceValue -/// objects can be used to represent loads and stores to memory locations -/// that aren't explicit in the regular LLVM IR. -/// -class MachineMemOperand { -public: - /// Flags values. These may be or'd together. - enum Flags : uint16_t { - // No flags set. - MONone = 0, - /// The memory access reads data. - MOLoad = 1u << 0, - /// The memory access writes data. - MOStore = 1u << 1, - /// The memory access is volatile. - MOVolatile = 1u << 2, - /// The memory access is non-temporal. - MONonTemporal = 1u << 3, - /// The memory access is invariant. - MOInvariant = 1u << 4, - - // Reserved for use by target-specific passes. - MOTargetFlag1 = 1u << 5, - MOTargetFlag2 = 1u << 6, - MOTargetFlag3 = 1u << 7, - - LLVM_MARK_AS_BITMASK_ENUM(/* LargestFlag = */ MOTargetFlag3) - }; - -private: - MachinePointerInfo PtrInfo; - uint64_t Size; - Flags FlagVals; - uint16_t BaseAlignLog2; // log_2(base_alignment) + 1 - AAMDNodes AAInfo; - const MDNode *Ranges; - -public: - /// Construct a MachineMemOperand object with the specified PtrInfo, flags, - /// size, and base alignment. - MachineMemOperand(MachinePointerInfo PtrInfo, Flags flags, uint64_t s, - unsigned base_alignment, - const AAMDNodes &AAInfo = AAMDNodes(), - const MDNode *Ranges = nullptr); - - const MachinePointerInfo &getPointerInfo() const { return PtrInfo; } - - /// Return the base address of the memory access. This may either be a normal - /// LLVM IR Value, or one of the special values used in CodeGen. - /// Special values are those obtained via - /// PseudoSourceValue::getFixedStack(int), PseudoSourceValue::getStack, and - /// other PseudoSourceValue member functions which return objects which stand - /// for frame/stack pointer relative references and other special references - /// which are not representable in the high-level IR. - const Value *getValue() const { return PtrInfo.V.dyn_cast(); } - - const PseudoSourceValue *getPseudoValue() const { - return PtrInfo.V.dyn_cast(); - } - - const void *getOpaqueValue() const { return PtrInfo.V.getOpaqueValue(); } - - /// Return the raw flags of the source value, \see Flags. - Flags getFlags() const { return FlagVals; } - - /// Bitwise OR the current flags with the given flags. - void setFlags(Flags f) { FlagVals |= f; } - - /// For normal values, this is a byte offset added to the base address. - /// For PseudoSourceValue::FPRel values, this is the FrameIndex number. - int64_t getOffset() const { return PtrInfo.Offset; } - - unsigned getAddrSpace() const { return PtrInfo.getAddrSpace(); } - - /// Return the size in bytes of the memory reference. - uint64_t getSize() const { return Size; } - - /// Return the minimum known alignment in bytes of the actual memory - /// reference. - uint64_t getAlignment() const; - - /// Return the minimum known alignment in bytes of the base address, without - /// the offset. - uint64_t getBaseAlignment() const { return (1u << BaseAlignLog2) >> 1; } - - /// Return the AA tags for the memory reference. - AAMDNodes getAAInfo() const { return AAInfo; } - - /// Return the range tag for the memory reference. - const MDNode *getRanges() const { return Ranges; } - - bool isLoad() const { return FlagVals & MOLoad; } - bool isStore() const { return FlagVals & MOStore; } - bool isVolatile() const { return FlagVals & MOVolatile; } - bool isNonTemporal() const { return FlagVals & MONonTemporal; } - bool isInvariant() const { return FlagVals & MOInvariant; } - - /// Returns true if this memory operation doesn't have any ordering - /// constraints other than normal aliasing. Volatile and atomic memory - /// operations can't be reordered. - /// - /// Currently, we don't model the difference between volatile and atomic - /// operations. They should retain their ordering relative to all memory - /// operations. - bool isUnordered() const { return !isVolatile(); } - - /// Update this MachineMemOperand to reflect the alignment of MMO, if it has a - /// greater alignment. This must only be used when the new alignment applies - /// to all users of this MachineMemOperand. - void refineAlignment(const MachineMemOperand *MMO); - - /// Change the SourceValue for this MachineMemOperand. This should only be - /// used when an object is being relocated and all references to it are being - /// updated. - void setValue(const Value *NewSV) { PtrInfo.V = NewSV; } - void setValue(const PseudoSourceValue *NewSV) { PtrInfo.V = NewSV; } - void setOffset(int64_t NewOffset) { PtrInfo.Offset = NewOffset; } - - /// Profile - Gather unique data for the object. - /// - void Profile(FoldingSetNodeID &ID) const; - - /// Support for operator<<. - /// @{ - void print(raw_ostream &OS) const; - void print(raw_ostream &OS, ModuleSlotTracker &MST) const; - /// @} - - friend bool operator==(const MachineMemOperand &LHS, - const MachineMemOperand &RHS) { - return LHS.getValue() == RHS.getValue() && - LHS.getPseudoValue() == RHS.getPseudoValue() && - LHS.getSize() == RHS.getSize() && - LHS.getOffset() == RHS.getOffset() && - LHS.getFlags() == RHS.getFlags() && - LHS.getAAInfo() == RHS.getAAInfo() && - LHS.getRanges() == RHS.getRanges() && - LHS.getAlignment() == RHS.getAlignment() && - LHS.getAddrSpace() == RHS.getAddrSpace(); - } - - friend bool operator!=(const MachineMemOperand &LHS, - const MachineMemOperand &RHS) { - return !(LHS == RHS); - } -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const MachineMemOperand &MRO) { - MRO.print(OS); - return OS; -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineModuleInfo.h b/llvm/include/llvm/CodeGen/MachineModuleInfo.h deleted file mode 100644 index 77571124..00000000 --- a/llvm/include/llvm/CodeGen/MachineModuleInfo.h +++ /dev/null @@ -1,433 +0,0 @@ -//===-- llvm/CodeGen/MachineModuleInfo.h ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Collect meta information for a module. This information should be in a -// neutral form that can be used by different debugging and exception handling -// schemes. -// -// The organization of information is primarily clustered around the source -// compile units. The main exception is source line correspondence where -// inlining may interleave code from various compile units. -// -// The following information can be retrieved from the MachineModuleInfo. -// -// -- Source directories - Directories are uniqued based on their canonical -// string and assigned a sequential numeric ID (base 1.) -// -- Source files - Files are also uniqued based on their name and directory -// ID. A file ID is sequential number (base 1.) -// -- Source line correspondence - A vector of file ID, line#, column# triples. -// A DEBUG_LOCATION instruction is generated by the DAG Legalizer -// corresponding to each entry in the source line list. This allows a debug -// emitter to generate labels referenced by debug information tables. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEMODULEINFO_H -#define LLVM_CODEGEN_MACHINEMODULEINFO_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Analysis/EHPersonalities.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/IR/Metadata.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/MC/MCContext.h" -#include "llvm/MC/MCSymbol.h" -#include "llvm/MC/MachineLocation.h" -#include "llvm/Pass.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/Dwarf.h" - -namespace llvm { - -//===----------------------------------------------------------------------===// -// Forward declarations. -class Constant; -class GlobalVariable; -class BlockAddress; -class MDNode; -class MMIAddrLabelMap; -class MachineBasicBlock; -class MachineFunction; -class Module; -class PointerType; -class StructType; - -struct SEHHandler { - // Filter or finally function. Null indicates a catch-all. - const Function *FilterOrFinally; - - // Address of block to recover at. Null for a finally handler. - const BlockAddress *RecoverBA; -}; - -//===----------------------------------------------------------------------===// -/// LandingPadInfo - This structure is used to retain landing pad info for -/// the current function. -/// -struct LandingPadInfo { - MachineBasicBlock *LandingPadBlock; // Landing pad block. - SmallVector BeginLabels; // Labels prior to invoke. - SmallVector EndLabels; // Labels after invoke. - SmallVector SEHHandlers; // SEH handlers active at this lpad. - MCSymbol *LandingPadLabel; // Label at beginning of landing pad. - std::vector TypeIds; // List of type ids (filters negative). - - explicit LandingPadInfo(MachineBasicBlock *MBB) - : LandingPadBlock(MBB), LandingPadLabel(nullptr) {} -}; - -//===----------------------------------------------------------------------===// -/// MachineModuleInfoImpl - This class can be derived from and used by targets -/// to hold private target-specific information for each Module. Objects of -/// type are accessed/created with MMI::getInfo and destroyed when the -/// MachineModuleInfo is destroyed. -/// -class MachineModuleInfoImpl { -public: - typedef PointerIntPair StubValueTy; - virtual ~MachineModuleInfoImpl(); - typedef std::vector > SymbolListTy; -protected: - - /// Return the entries from a DenseMap in a deterministic sorted orer. - /// Clears the map. - static SymbolListTy getSortedStubs(DenseMap&); -}; - -//===----------------------------------------------------------------------===// -/// MachineModuleInfo - This class contains meta information specific to a -/// module. Queries can be made by different debugging and exception handling -/// schemes and reformated for specific use. -/// -class MachineModuleInfo : public ImmutablePass { - /// Context - This is the MCContext used for the entire code generator. - MCContext Context; - - /// TheModule - This is the LLVM Module being worked on. - const Module *TheModule; - - /// ObjFileMMI - This is the object-file-format-specific implementation of - /// MachineModuleInfoImpl, which lets targets accumulate whatever info they - /// want. - MachineModuleInfoImpl *ObjFileMMI; - - /// List of moves done by a function's prolog. Used to construct frame maps - /// by debug and exception handling consumers. - std::vector FrameInstructions; - - /// LandingPads - List of LandingPadInfo describing the landing pad - /// information in the current function. - std::vector LandingPads; - - /// LPadToCallSiteMap - Map a landing pad's EH symbol to the call site - /// indexes. - DenseMap > LPadToCallSiteMap; - - /// CallSiteMap - Map of invoke call site index values to associated begin - /// EH_LABEL for the current function. - DenseMap CallSiteMap; - - /// CurCallSite - The current call site index being processed, if any. 0 if - /// none. - unsigned CurCallSite; - - /// TypeInfos - List of C++ TypeInfo used in the current function. - std::vector TypeInfos; - - /// FilterIds - List of typeids encoding filters used in the current function. - std::vector FilterIds; - - /// FilterEnds - List of the indices in FilterIds corresponding to filter - /// terminators. - std::vector FilterEnds; - - /// Personalities - Vector of all personality functions ever seen. Used to - /// emit common EH frames. - std::vector Personalities; - - /// AddrLabelSymbols - This map keeps track of which symbol is being used for - /// the specified basic block's address of label. - MMIAddrLabelMap *AddrLabelSymbols; - - bool CallsEHReturn; - bool CallsUnwindInit; - bool HasEHFunclets; - - // TODO: Ideally, what we'd like is to have a switch that allows emitting - // synchronous (precise at call-sites only) CFA into .eh_frame. However, - // even under this switch, we'd like .debug_frame to be precise when using. - // -g. At this moment, there's no way to specify that some CFI directives - // go into .eh_frame only, while others go into .debug_frame only. - - /// DbgInfoAvailable - True if debugging information is available - /// in this module. - bool DbgInfoAvailable; - - /// UsesVAFloatArgument - True if this module calls VarArg function with - /// floating-point arguments. This is used to emit an undefined reference - /// to _fltused on Windows targets. - bool UsesVAFloatArgument; - - /// UsesMorestackAddr - True if the module calls the __morestack function - /// indirectly, as is required under the large code model on x86. This is used - /// to emit a definition of a symbol, __morestack_addr, containing the - /// address. See comments in lib/Target/X86/X86FrameLowering.cpp for more - /// details. - bool UsesMorestackAddr; - - EHPersonality PersonalityTypeCache; - -public: - static char ID; // Pass identification, replacement for typeid - - struct VariableDbgInfo { - const DILocalVariable *Var; - const DIExpression *Expr; - unsigned Slot; - const DILocation *Loc; - - VariableDbgInfo(const DILocalVariable *Var, const DIExpression *Expr, - unsigned Slot, const DILocation *Loc) - : Var(Var), Expr(Expr), Slot(Slot), Loc(Loc) {} - }; - typedef SmallVector VariableDbgInfoMapTy; - VariableDbgInfoMapTy VariableDbgInfos; - - MachineModuleInfo(); // DUMMY CONSTRUCTOR, DO NOT CALL. - // Real constructor. - MachineModuleInfo(const MCAsmInfo &MAI, const MCRegisterInfo &MRI, - const MCObjectFileInfo *MOFI); - ~MachineModuleInfo() override; - - // Initialization and Finalization - bool doInitialization(Module &) override; - bool doFinalization(Module &) override; - - /// EndFunction - Discard function meta information. - /// - void EndFunction(); - - const MCContext &getContext() const { return Context; } - MCContext &getContext() { return Context; } - - void setModule(const Module *M) { TheModule = M; } - const Module *getModule() const { return TheModule; } - - /// getInfo - Keep track of various per-function pieces of information for - /// backends that would like to do so. - /// - template - Ty &getObjFileInfo() { - if (ObjFileMMI == nullptr) - ObjFileMMI = new Ty(*this); - return *static_cast(ObjFileMMI); - } - - template - const Ty &getObjFileInfo() const { - return const_cast(this)->getObjFileInfo(); - } - - /// hasDebugInfo - Returns true if valid debug info is present. - /// - bool hasDebugInfo() const { return DbgInfoAvailable; } - void setDebugInfoAvailability(bool avail) { DbgInfoAvailable = avail; } - - bool callsEHReturn() const { return CallsEHReturn; } - void setCallsEHReturn(bool b) { CallsEHReturn = b; } - - bool callsUnwindInit() const { return CallsUnwindInit; } - void setCallsUnwindInit(bool b) { CallsUnwindInit = b; } - - bool hasEHFunclets() const { return HasEHFunclets; } - void setHasEHFunclets(bool V) { HasEHFunclets = V; } - - bool usesVAFloatArgument() const { - return UsesVAFloatArgument; - } - - void setUsesVAFloatArgument(bool b) { - UsesVAFloatArgument = b; - } - - bool usesMorestackAddr() const { - return UsesMorestackAddr; - } - - void setUsesMorestackAddr(bool b) { - UsesMorestackAddr = b; - } - - /// \brief Returns a reference to a list of cfi instructions in the current - /// function's prologue. Used to construct frame maps for debug and exception - /// handling comsumers. - const std::vector &getFrameInstructions() const { - return FrameInstructions; - } - - unsigned LLVM_ATTRIBUTE_UNUSED_RESULT - addFrameInst(const MCCFIInstruction &Inst) { - FrameInstructions.push_back(Inst); - return FrameInstructions.size() - 1; - } - - /// getAddrLabelSymbol - Return the symbol to be used for the specified basic - /// block when its address is taken. This cannot be its normal LBB label - /// because the block may be accessed outside its containing function. - MCSymbol *getAddrLabelSymbol(const BasicBlock *BB) { - return getAddrLabelSymbolToEmit(BB).front(); - } - - /// getAddrLabelSymbolToEmit - Return the symbol to be used for the specified - /// basic block when its address is taken. If other blocks were RAUW'd to - /// this one, we may have to emit them as well, return the whole set. - ArrayRef getAddrLabelSymbolToEmit(const BasicBlock *BB); - - /// takeDeletedSymbolsForFunction - If the specified function has had any - /// references to address-taken blocks generated, but the block got deleted, - /// return the symbol now so we can emit it. This prevents emitting a - /// reference to a symbol that has no definition. - void takeDeletedSymbolsForFunction(const Function *F, - std::vector &Result); - - - //===- EH ---------------------------------------------------------------===// - - /// getOrCreateLandingPadInfo - Find or create an LandingPadInfo for the - /// specified MachineBasicBlock. - LandingPadInfo &getOrCreateLandingPadInfo(MachineBasicBlock *LandingPad); - - /// addInvoke - Provide the begin and end labels of an invoke style call and - /// associate it with a try landing pad block. - void addInvoke(MachineBasicBlock *LandingPad, - MCSymbol *BeginLabel, MCSymbol *EndLabel); - - /// addLandingPad - Add a new panding pad. Returns the label ID for the - /// landing pad entry. - MCSymbol *addLandingPad(MachineBasicBlock *LandingPad); - - /// addPersonality - Provide the personality function for the exception - /// information. - void addPersonality(const Function *Personality); - - /// getPersonalities - Return array of personality functions ever seen. - const std::vector& getPersonalities() const { - return Personalities; - } - - /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. - /// - void addCatchTypeInfo(MachineBasicBlock *LandingPad, - ArrayRef TyInfo); - - /// addFilterTypeInfo - Provide the filter typeinfo for a landing pad. - /// - void addFilterTypeInfo(MachineBasicBlock *LandingPad, - ArrayRef TyInfo); - - /// addCleanup - Add a cleanup action for a landing pad. - /// - void addCleanup(MachineBasicBlock *LandingPad); - - void addSEHCatchHandler(MachineBasicBlock *LandingPad, const Function *Filter, - const BlockAddress *RecoverLabel); - - void addSEHCleanupHandler(MachineBasicBlock *LandingPad, - const Function *Cleanup); - - /// getTypeIDFor - Return the type id for the specified typeinfo. This is - /// function wide. - unsigned getTypeIDFor(const GlobalValue *TI); - - /// getFilterIDFor - Return the id of the filter encoded by TyIds. This is - /// function wide. - int getFilterIDFor(std::vector &TyIds); - - /// TidyLandingPads - Remap landing pad labels and remove any deleted landing - /// pads. - void TidyLandingPads(DenseMap *LPMap = nullptr); - - /// getLandingPads - Return a reference to the landing pad info for the - /// current function. - const std::vector &getLandingPads() const { - return LandingPads; - } - - /// setCallSiteLandingPad - Map the landing pad's EH symbol to the call - /// site indexes. - void setCallSiteLandingPad(MCSymbol *Sym, ArrayRef Sites); - - /// getCallSiteLandingPad - Get the call site indexes for a landing pad EH - /// symbol. - SmallVectorImpl &getCallSiteLandingPad(MCSymbol *Sym) { - assert(hasCallSiteLandingPad(Sym) && - "missing call site number for landing pad!"); - return LPadToCallSiteMap[Sym]; - } - - /// hasCallSiteLandingPad - Return true if the landing pad Eh symbol has an - /// associated call site. - bool hasCallSiteLandingPad(MCSymbol *Sym) { - return !LPadToCallSiteMap[Sym].empty(); - } - - /// setCallSiteBeginLabel - Map the begin label for a call site. - void setCallSiteBeginLabel(MCSymbol *BeginLabel, unsigned Site) { - CallSiteMap[BeginLabel] = Site; - } - - /// getCallSiteBeginLabel - Get the call site number for a begin label. - unsigned getCallSiteBeginLabel(MCSymbol *BeginLabel) { - assert(hasCallSiteBeginLabel(BeginLabel) && - "Missing call site number for EH_LABEL!"); - return CallSiteMap[BeginLabel]; - } - - /// hasCallSiteBeginLabel - Return true if the begin label has a call site - /// number associated with it. - bool hasCallSiteBeginLabel(MCSymbol *BeginLabel) { - return CallSiteMap[BeginLabel] != 0; - } - - /// setCurrentCallSite - Set the call site currently being processed. - void setCurrentCallSite(unsigned Site) { CurCallSite = Site; } - - /// getCurrentCallSite - Get the call site currently being processed, if any. - /// return zero if none. - unsigned getCurrentCallSite() { return CurCallSite; } - - /// getTypeInfos - Return a reference to the C++ typeinfo for the current - /// function. - const std::vector &getTypeInfos() const { - return TypeInfos; - } - - /// getFilterIds - Return a reference to the typeids encoding filters used in - /// the current function. - const std::vector &getFilterIds() const { - return FilterIds; - } - - /// setVariableDbgInfo - Collect information used to emit debugging - /// information of a variable. - void setVariableDbgInfo(const DILocalVariable *Var, const DIExpression *Expr, - unsigned Slot, const DILocation *Loc) { - VariableDbgInfos.emplace_back(Var, Expr, Slot, Loc); - } - - VariableDbgInfoMapTy &getVariableDbgInfo() { return VariableDbgInfos; } - -}; // End class MachineModuleInfo - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h b/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h deleted file mode 100644 index f9fa6999..00000000 --- a/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h +++ /dev/null @@ -1,80 +0,0 @@ -//===-- llvm/CodeGen/MachineModuleInfoImpls.h -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines object-file format specific implementations of -// MachineModuleInfoImpl. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEMODULEINFOIMPLS_H -#define LLVM_CODEGEN_MACHINEMODULEINFOIMPLS_H - -#include "llvm/CodeGen/MachineModuleInfo.h" - -namespace llvm { -class MCSymbol; - -/// MachineModuleInfoMachO - This is a MachineModuleInfoImpl implementation -/// for MachO targets. -class MachineModuleInfoMachO : public MachineModuleInfoImpl { - /// GVStubs - Darwin '$non_lazy_ptr' stubs. The key is something like - /// "Lfoo$non_lazy_ptr", the value is something like "_foo". The extra bit - /// is true if this GV is external. - DenseMap GVStubs; - - /// ThreadLocalGVStubs - Darwin '$non_lazy_ptr' stubs. The key is something - /// like "Lfoo$non_lazy_ptr", the value is something like "_foo". The extra - /// bit is true if this GV is external. - DenseMap ThreadLocalGVStubs; - - virtual void anchor(); // Out of line virtual method. -public: - MachineModuleInfoMachO(const MachineModuleInfo &) {} - - StubValueTy &getGVStubEntry(MCSymbol *Sym) { - assert(Sym && "Key cannot be null"); - return GVStubs[Sym]; - } - - StubValueTy &getThreadLocalGVStubEntry(MCSymbol *Sym) { - assert(Sym && "Key cannot be null"); - return ThreadLocalGVStubs[Sym]; - } - - /// Accessor methods to return the set of stubs in sorted order. - SymbolListTy GetGVStubList() { return getSortedStubs(GVStubs); } - SymbolListTy GetThreadLocalGVStubList() { - return getSortedStubs(ThreadLocalGVStubs); - } -}; - -/// MachineModuleInfoELF - This is a MachineModuleInfoImpl implementation -/// for ELF targets. -class MachineModuleInfoELF : public MachineModuleInfoImpl { - /// GVStubs - These stubs are used to materialize global addresses in PIC - /// mode. - DenseMap GVStubs; - - virtual void anchor(); // Out of line virtual method. -public: - MachineModuleInfoELF(const MachineModuleInfo &) {} - - StubValueTy &getGVStubEntry(MCSymbol *Sym) { - assert(Sym && "Key cannot be null"); - return GVStubs[Sym]; - } - - /// Accessor methods to return the set of stubs in sorted order. - - SymbolListTy GetGVStubList() { return getSortedStubs(GVStubs); } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineOperand.h b/llvm/include/llvm/CodeGen/MachineOperand.h deleted file mode 100644 index ee0a9cf1..00000000 --- a/llvm/include/llvm/CodeGen/MachineOperand.h +++ /dev/null @@ -1,763 +0,0 @@ -//===-- llvm/CodeGen/MachineOperand.h - MachineOperand class ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MachineOperand class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEOPERAND_H -#define LLVM_CODEGEN_MACHINEOPERAND_H - -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -class BlockAddress; -class ConstantFP; -class ConstantInt; -class GlobalValue; -class MachineBasicBlock; -class MachineInstr; -class MachineRegisterInfo; -class MDNode; -class ModuleSlotTracker; -class TargetMachine; -class TargetRegisterInfo; -class hash_code; -class raw_ostream; -class MCSymbol; - -/// MachineOperand class - Representation of each machine instruction operand. -/// -/// This class isn't a POD type because it has a private constructor, but its -/// destructor must be trivial. Functions like MachineInstr::addOperand(), -/// MachineRegisterInfo::moveOperands(), and MF::DeleteMachineInstr() depend on -/// not having to call the MachineOperand destructor. -/// -class MachineOperand { -public: - enum MachineOperandType : unsigned char { - MO_Register, ///< Register operand. - MO_Immediate, ///< Immediate operand - MO_CImmediate, ///< Immediate >64bit operand - MO_FPImmediate, ///< Floating-point immediate operand - MO_MachineBasicBlock, ///< MachineBasicBlock reference - MO_FrameIndex, ///< Abstract Stack Frame Index - MO_ConstantPoolIndex, ///< Address of indexed Constant in Constant Pool - MO_TargetIndex, ///< Target-dependent index+offset operand. - MO_JumpTableIndex, ///< Address of indexed Jump Table for switch - MO_ExternalSymbol, ///< Name of external global symbol - MO_GlobalAddress, ///< Address of a global value - MO_BlockAddress, ///< Address of a basic block - MO_RegisterMask, ///< Mask of preserved registers. - MO_RegisterLiveOut, ///< Mask of live-out registers. - MO_Metadata, ///< Metadata reference (for debug info) - MO_MCSymbol, ///< MCSymbol reference (for debug/eh info) - MO_CFIIndex ///< MCCFIInstruction index. - }; - -private: - /// OpKind - Specify what kind of operand this is. This discriminates the - /// union. - MachineOperandType OpKind : 8; - - /// Subregister number for MO_Register. A value of 0 indicates the - /// MO_Register has no subReg. - /// - /// For all other kinds of operands, this field holds target-specific flags. - unsigned SubReg_TargetFlags : 12; - - /// TiedTo - Non-zero when this register operand is tied to another register - /// operand. The encoding of this field is described in the block comment - /// before MachineInstr::tieOperands(). - unsigned char TiedTo : 4; - - /// IsDef/IsImp/IsKill/IsDead flags - These are only valid for MO_Register - /// operands. - - /// IsDef - True if this is a def, false if this is a use of the register. - /// - bool IsDef : 1; - - /// IsImp - True if this is an implicit def or use, false if it is explicit. - /// - bool IsImp : 1; - - /// IsKill - True if this instruction is the last use of the register on this - /// path through the function. This is only valid on uses of registers. - bool IsKill : 1; - - /// IsDead - True if this register is never used by a subsequent instruction. - /// This is only valid on definitions of registers. - bool IsDead : 1; - - /// IsUndef - True if this register operand reads an "undef" value, i.e. the - /// read value doesn't matter. This flag can be set on both use and def - /// operands. On a sub-register def operand, it refers to the part of the - /// register that isn't written. On a full-register def operand, it is a - /// noop. See readsReg(). - /// - /// This is only valid on registers. - /// - /// Note that an instruction may have multiple operands referring to - /// the same register. In that case, the instruction may depend on those - /// operands reading the same dont-care value. For example: - /// - /// %vreg1 = XOR %vreg2, %vreg2 - /// - /// Any register can be used for %vreg2, and its value doesn't matter, but - /// the two operands must be the same register. - /// - bool IsUndef : 1; - - /// IsInternalRead - True if this operand reads a value that was defined - /// inside the same instruction or bundle. This flag can be set on both use - /// and def operands. On a sub-register def operand, it refers to the part - /// of the register that isn't written. On a full-register def operand, it - /// is a noop. - /// - /// When this flag is set, the instruction bundle must contain at least one - /// other def of the register. If multiple instructions in the bundle define - /// the register, the meaning is target-defined. - bool IsInternalRead : 1; - - /// IsEarlyClobber - True if this MO_Register 'def' operand is written to - /// by the MachineInstr before all input registers are read. This is used to - /// model the GCC inline asm '&' constraint modifier. - bool IsEarlyClobber : 1; - - /// IsDebug - True if this MO_Register 'use' operand is in a debug pseudo, - /// not a real instruction. Such uses should be ignored during codegen. - bool IsDebug : 1; - - /// SmallContents - This really should be part of the Contents union, but - /// lives out here so we can get a better packed struct. - /// MO_Register: Register number. - /// OffsetedInfo: Low bits of offset. - union { - unsigned RegNo; // For MO_Register. - unsigned OffsetLo; // Matches Contents.OffsetedInfo.OffsetHi. - } SmallContents; - - /// ParentMI - This is the instruction that this operand is embedded into. - /// This is valid for all operand types, when the operand is in an instr. - MachineInstr *ParentMI; - - /// Contents union - This contains the payload for the various operand types. - union { - MachineBasicBlock *MBB; // For MO_MachineBasicBlock. - const ConstantFP *CFP; // For MO_FPImmediate. - const ConstantInt *CI; // For MO_CImmediate. Integers > 64bit. - int64_t ImmVal; // For MO_Immediate. - const uint32_t *RegMask; // For MO_RegisterMask and MO_RegisterLiveOut. - const MDNode *MD; // For MO_Metadata. - MCSymbol *Sym; // For MO_MCSymbol. - unsigned CFIIndex; // For MO_CFI. - - struct { // For MO_Register. - // Register number is in SmallContents.RegNo. - MachineOperand *Prev; // Access list for register. See MRI. - MachineOperand *Next; - } Reg; - - /// OffsetedInfo - This struct contains the offset and an object identifier. - /// this represent the object as with an optional offset from it. - struct { - union { - int Index; // For MO_*Index - The index itself. - const char *SymbolName; // For MO_ExternalSymbol. - const GlobalValue *GV; // For MO_GlobalAddress. - const BlockAddress *BA; // For MO_BlockAddress. - } Val; - // Low bits of offset are in SmallContents.OffsetLo. - int OffsetHi; // An offset from the object, high 32 bits. - } OffsetedInfo; - } Contents; - - explicit MachineOperand(MachineOperandType K) - : OpKind(K), SubReg_TargetFlags(0), ParentMI(nullptr) {} -public: - /// getType - Returns the MachineOperandType for this operand. - /// - MachineOperandType getType() const { return (MachineOperandType)OpKind; } - - unsigned getTargetFlags() const { - return isReg() ? 0 : SubReg_TargetFlags; - } - void setTargetFlags(unsigned F) { - assert(!isReg() && "Register operands can't have target flags"); - SubReg_TargetFlags = F; - assert(SubReg_TargetFlags == F && "Target flags out of range"); - } - void addTargetFlag(unsigned F) { - assert(!isReg() && "Register operands can't have target flags"); - SubReg_TargetFlags |= F; - assert((SubReg_TargetFlags & F) && "Target flags out of range"); - } - - - /// getParent - Return the instruction that this operand belongs to. - /// - MachineInstr *getParent() { return ParentMI; } - const MachineInstr *getParent() const { return ParentMI; } - - /// clearParent - Reset the parent pointer. - /// - /// The MachineOperand copy constructor also copies ParentMI, expecting the - /// original to be deleted. If a MachineOperand is ever stored outside a - /// MachineInstr, the parent pointer must be cleared. - /// - /// Never call clearParent() on an operand in a MachineInstr. - /// - void clearParent() { ParentMI = nullptr; } - - void print(raw_ostream &os, const TargetRegisterInfo *TRI = nullptr) const; - void print(raw_ostream &os, ModuleSlotTracker &MST, - const TargetRegisterInfo *TRI = nullptr) const; - - //===--------------------------------------------------------------------===// - // Accessors that tell you what kind of MachineOperand you're looking at. - //===--------------------------------------------------------------------===// - - /// isReg - Tests if this is a MO_Register operand. - bool isReg() const { return OpKind == MO_Register; } - /// isImm - Tests if this is a MO_Immediate operand. - bool isImm() const { return OpKind == MO_Immediate; } - /// isCImm - Test if this is a MO_CImmediate operand. - bool isCImm() const { return OpKind == MO_CImmediate; } - /// isFPImm - Tests if this is a MO_FPImmediate operand. - bool isFPImm() const { return OpKind == MO_FPImmediate; } - /// isMBB - Tests if this is a MO_MachineBasicBlock operand. - bool isMBB() const { return OpKind == MO_MachineBasicBlock; } - /// isFI - Tests if this is a MO_FrameIndex operand. - bool isFI() const { return OpKind == MO_FrameIndex; } - /// isCPI - Tests if this is a MO_ConstantPoolIndex operand. - bool isCPI() const { return OpKind == MO_ConstantPoolIndex; } - /// isTargetIndex - Tests if this is a MO_TargetIndex operand. - bool isTargetIndex() const { return OpKind == MO_TargetIndex; } - /// isJTI - Tests if this is a MO_JumpTableIndex operand. - bool isJTI() const { return OpKind == MO_JumpTableIndex; } - /// isGlobal - Tests if this is a MO_GlobalAddress operand. - bool isGlobal() const { return OpKind == MO_GlobalAddress; } - /// isSymbol - Tests if this is a MO_ExternalSymbol operand. - bool isSymbol() const { return OpKind == MO_ExternalSymbol; } - /// isBlockAddress - Tests if this is a MO_BlockAddress operand. - bool isBlockAddress() const { return OpKind == MO_BlockAddress; } - /// isRegMask - Tests if this is a MO_RegisterMask operand. - bool isRegMask() const { return OpKind == MO_RegisterMask; } - /// isRegLiveOut - Tests if this is a MO_RegisterLiveOut operand. - bool isRegLiveOut() const { return OpKind == MO_RegisterLiveOut; } - /// isMetadata - Tests if this is a MO_Metadata operand. - bool isMetadata() const { return OpKind == MO_Metadata; } - bool isMCSymbol() const { return OpKind == MO_MCSymbol; } - bool isCFIIndex() const { return OpKind == MO_CFIIndex; } - - //===--------------------------------------------------------------------===// - // Accessors for Register Operands - //===--------------------------------------------------------------------===// - - /// getReg - Returns the register number. - unsigned getReg() const { - assert(isReg() && "This is not a register operand!"); - return SmallContents.RegNo; - } - - unsigned getSubReg() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return SubReg_TargetFlags; - } - - bool isUse() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return !IsDef; - } - - bool isDef() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return IsDef; - } - - bool isImplicit() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return IsImp; - } - - bool isDead() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return IsDead; - } - - bool isKill() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return IsKill; - } - - bool isUndef() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return IsUndef; - } - - bool isInternalRead() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return IsInternalRead; - } - - bool isEarlyClobber() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return IsEarlyClobber; - } - - bool isTied() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return TiedTo; - } - - bool isDebug() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return IsDebug; - } - - /// readsReg - Returns true if this operand reads the previous value of its - /// register. A use operand with the flag set doesn't read its - /// register. A sub-register def implicitly reads the other parts of the - /// register being redefined unless the flag is set. - /// - /// This refers to reading the register value from before the current - /// instruction or bundle. Internal bundle reads are not included. - bool readsReg() const { - assert(isReg() && "Wrong MachineOperand accessor"); - return !isUndef() && !isInternalRead() && (isUse() || getSubReg()); - } - - //===--------------------------------------------------------------------===// - // Mutators for Register Operands - //===--------------------------------------------------------------------===// - - /// Change the register this operand corresponds to. - /// - void setReg(unsigned Reg); - - void setSubReg(unsigned subReg) { - assert(isReg() && "Wrong MachineOperand accessor"); - SubReg_TargetFlags = subReg; - assert(SubReg_TargetFlags == subReg && "SubReg out of range"); - } - - /// substVirtReg - Substitute the current register with the virtual - /// subregister Reg:SubReg. Take any existing SubReg index into account, - /// using TargetRegisterInfo to compose the subreg indices if necessary. - /// Reg must be a virtual register, SubIdx can be 0. - /// - void substVirtReg(unsigned Reg, unsigned SubIdx, const TargetRegisterInfo&); - - /// substPhysReg - Substitute the current register with the physical register - /// Reg, taking any existing SubReg into account. For instance, - /// substPhysReg(%EAX) will change %reg1024:sub_8bit to %AL. - /// - void substPhysReg(unsigned Reg, const TargetRegisterInfo&); - - void setIsUse(bool Val = true) { setIsDef(!Val); } - - void setIsDef(bool Val = true); - - void setImplicit(bool Val = true) { - assert(isReg() && "Wrong MachineOperand accessor"); - IsImp = Val; - } - - void setIsKill(bool Val = true) { - assert(isReg() && !IsDef && "Wrong MachineOperand accessor"); - assert((!Val || !isDebug()) && "Marking a debug operation as kill"); - IsKill = Val; - } - - void setIsDead(bool Val = true) { - assert(isReg() && IsDef && "Wrong MachineOperand accessor"); - IsDead = Val; - } - - void setIsUndef(bool Val = true) { - assert(isReg() && "Wrong MachineOperand accessor"); - IsUndef = Val; - } - - void setIsInternalRead(bool Val = true) { - assert(isReg() && "Wrong MachineOperand accessor"); - IsInternalRead = Val; - } - - void setIsEarlyClobber(bool Val = true) { - assert(isReg() && IsDef && "Wrong MachineOperand accessor"); - IsEarlyClobber = Val; - } - - void setIsDebug(bool Val = true) { - assert(isReg() && !IsDef && "Wrong MachineOperand accessor"); - IsDebug = Val; - } - - //===--------------------------------------------------------------------===// - // Accessors for various operand types. - //===--------------------------------------------------------------------===// - - int64_t getImm() const { - assert(isImm() && "Wrong MachineOperand accessor"); - return Contents.ImmVal; - } - - const ConstantInt *getCImm() const { - assert(isCImm() && "Wrong MachineOperand accessor"); - return Contents.CI; - } - - const ConstantFP *getFPImm() const { - assert(isFPImm() && "Wrong MachineOperand accessor"); - return Contents.CFP; - } - - MachineBasicBlock *getMBB() const { - assert(isMBB() && "Wrong MachineOperand accessor"); - return Contents.MBB; - } - - int getIndex() const { - assert((isFI() || isCPI() || isTargetIndex() || isJTI()) && - "Wrong MachineOperand accessor"); - return Contents.OffsetedInfo.Val.Index; - } - - const GlobalValue *getGlobal() const { - assert(isGlobal() && "Wrong MachineOperand accessor"); - return Contents.OffsetedInfo.Val.GV; - } - - const BlockAddress *getBlockAddress() const { - assert(isBlockAddress() && "Wrong MachineOperand accessor"); - return Contents.OffsetedInfo.Val.BA; - } - - MCSymbol *getMCSymbol() const { - assert(isMCSymbol() && "Wrong MachineOperand accessor"); - return Contents.Sym; - } - - unsigned getCFIIndex() const { - assert(isCFIIndex() && "Wrong MachineOperand accessor"); - return Contents.CFIIndex; - } - - /// Return the offset from the symbol in this operand. This always returns 0 - /// for ExternalSymbol operands. - int64_t getOffset() const { - assert((isGlobal() || isSymbol() || isMCSymbol() || isCPI() || - isTargetIndex() || isBlockAddress()) && - "Wrong MachineOperand accessor"); - return int64_t(uint64_t(Contents.OffsetedInfo.OffsetHi) << 32) | - SmallContents.OffsetLo; - } - - const char *getSymbolName() const { - assert(isSymbol() && "Wrong MachineOperand accessor"); - return Contents.OffsetedInfo.Val.SymbolName; - } - - /// clobbersPhysReg - Returns true if this RegMask clobbers PhysReg. - /// It is sometimes necessary to detach the register mask pointer from its - /// machine operand. This static method can be used for such detached bit - /// mask pointers. - static bool clobbersPhysReg(const uint32_t *RegMask, unsigned PhysReg) { - // See TargetRegisterInfo.h. - assert(PhysReg < (1u << 30) && "Not a physical register"); - return !(RegMask[PhysReg / 32] & (1u << PhysReg % 32)); - } - - /// clobbersPhysReg - Returns true if this RegMask operand clobbers PhysReg. - bool clobbersPhysReg(unsigned PhysReg) const { - return clobbersPhysReg(getRegMask(), PhysReg); - } - - /// getRegMask - Returns a bit mask of registers preserved by this RegMask - /// operand. - const uint32_t *getRegMask() const { - assert(isRegMask() && "Wrong MachineOperand accessor"); - return Contents.RegMask; - } - - /// getRegLiveOut - Returns a bit mask of live-out registers. - const uint32_t *getRegLiveOut() const { - assert(isRegLiveOut() && "Wrong MachineOperand accessor"); - return Contents.RegMask; - } - - const MDNode *getMetadata() const { - assert(isMetadata() && "Wrong MachineOperand accessor"); - return Contents.MD; - } - - //===--------------------------------------------------------------------===// - // Mutators for various operand types. - //===--------------------------------------------------------------------===// - - void setImm(int64_t immVal) { - assert(isImm() && "Wrong MachineOperand mutator"); - Contents.ImmVal = immVal; - } - - void setFPImm(const ConstantFP *CFP) { - assert(isFPImm() && "Wrong MachineOperand mutator"); - Contents.CFP = CFP; - } - - void setOffset(int64_t Offset) { - assert((isGlobal() || isSymbol() || isMCSymbol() || isCPI() || - isTargetIndex() || isBlockAddress()) && - "Wrong MachineOperand accessor"); - SmallContents.OffsetLo = unsigned(Offset); - Contents.OffsetedInfo.OffsetHi = int(Offset >> 32); - } - - void setIndex(int Idx) { - assert((isFI() || isCPI() || isTargetIndex() || isJTI()) && - "Wrong MachineOperand accessor"); - Contents.OffsetedInfo.Val.Index = Idx; - } - - void setMBB(MachineBasicBlock *MBB) { - assert(isMBB() && "Wrong MachineOperand accessor"); - Contents.MBB = MBB; - } - - /// Sets value of register mask operand referencing Mask. The - /// operand does not take ownership of the memory referenced by Mask, it must - /// remain valid for the lifetime of the operand. See CreateRegMask(). - /// Any physreg with a 0 bit in the mask is clobbered by the instruction. - void setRegMask(const uint32_t *RegMaskPtr) { - assert(isRegMask() && "Wrong MachineOperand mutator"); - Contents.RegMask = RegMaskPtr; - } - - //===--------------------------------------------------------------------===// - // Other methods. - //===--------------------------------------------------------------------===// - - /// isIdenticalTo - Return true if this operand is identical to the specified - /// operand. Note: This method ignores isKill and isDead properties. - bool isIdenticalTo(const MachineOperand &Other) const; - - /// \brief MachineOperand hash_value overload. - /// - /// Note that this includes the same information in the hash that - /// isIdenticalTo uses for comparison. It is thus suited for use in hash - /// tables which use that function for equality comparisons only. - friend hash_code hash_value(const MachineOperand &MO); - - /// ChangeToImmediate - Replace this operand with a new immediate operand of - /// the specified value. If an operand is known to be an immediate already, - /// the setImm method should be used. - void ChangeToImmediate(int64_t ImmVal); - - /// ChangeToFPImmediate - Replace this operand with a new FP immediate operand - /// of the specified value. If an operand is known to be an FP immediate - /// already, the setFPImm method should be used. - void ChangeToFPImmediate(const ConstantFP *FPImm); - - /// ChangeToES - Replace this operand with a new external symbol operand. - void ChangeToES(const char *SymName, unsigned char TargetFlags = 0); - - /// ChangeToMCSymbol - Replace this operand with a new MC symbol operand. - void ChangeToMCSymbol(MCSymbol *Sym); - - /// ChangeToRegister - Replace this operand with a new register operand of - /// the specified value. If an operand is known to be an register already, - /// the setReg method should be used. - void ChangeToRegister(unsigned Reg, bool isDef, bool isImp = false, - bool isKill = false, bool isDead = false, - bool isUndef = false, bool isDebug = false); - - //===--------------------------------------------------------------------===// - // Construction methods. - //===--------------------------------------------------------------------===// - - static MachineOperand CreateImm(int64_t Val) { - MachineOperand Op(MachineOperand::MO_Immediate); - Op.setImm(Val); - return Op; - } - - static MachineOperand CreateCImm(const ConstantInt *CI) { - MachineOperand Op(MachineOperand::MO_CImmediate); - Op.Contents.CI = CI; - return Op; - } - - static MachineOperand CreateFPImm(const ConstantFP *CFP) { - MachineOperand Op(MachineOperand::MO_FPImmediate); - Op.Contents.CFP = CFP; - return Op; - } - - static MachineOperand CreateReg(unsigned Reg, bool isDef, bool isImp = false, - bool isKill = false, bool isDead = false, - bool isUndef = false, - bool isEarlyClobber = false, - unsigned SubReg = 0, - bool isDebug = false, - bool isInternalRead = false) { - assert(!(isDead && !isDef) && "Dead flag on non-def"); - assert(!(isKill && isDef) && "Kill flag on def"); - MachineOperand Op(MachineOperand::MO_Register); - Op.IsDef = isDef; - Op.IsImp = isImp; - Op.IsKill = isKill; - Op.IsDead = isDead; - Op.IsUndef = isUndef; - Op.IsInternalRead = isInternalRead; - Op.IsEarlyClobber = isEarlyClobber; - Op.TiedTo = 0; - Op.IsDebug = isDebug; - Op.SmallContents.RegNo = Reg; - Op.Contents.Reg.Prev = nullptr; - Op.Contents.Reg.Next = nullptr; - Op.setSubReg(SubReg); - return Op; - } - static MachineOperand CreateMBB(MachineBasicBlock *MBB, - unsigned char TargetFlags = 0) { - MachineOperand Op(MachineOperand::MO_MachineBasicBlock); - Op.setMBB(MBB); - Op.setTargetFlags(TargetFlags); - return Op; - } - static MachineOperand CreateFI(int Idx) { - MachineOperand Op(MachineOperand::MO_FrameIndex); - Op.setIndex(Idx); - return Op; - } - static MachineOperand CreateCPI(unsigned Idx, int Offset, - unsigned char TargetFlags = 0) { - MachineOperand Op(MachineOperand::MO_ConstantPoolIndex); - Op.setIndex(Idx); - Op.setOffset(Offset); - Op.setTargetFlags(TargetFlags); - return Op; - } - static MachineOperand CreateTargetIndex(unsigned Idx, int64_t Offset, - unsigned char TargetFlags = 0) { - MachineOperand Op(MachineOperand::MO_TargetIndex); - Op.setIndex(Idx); - Op.setOffset(Offset); - Op.setTargetFlags(TargetFlags); - return Op; - } - static MachineOperand CreateJTI(unsigned Idx, - unsigned char TargetFlags = 0) { - MachineOperand Op(MachineOperand::MO_JumpTableIndex); - Op.setIndex(Idx); - Op.setTargetFlags(TargetFlags); - return Op; - } - static MachineOperand CreateGA(const GlobalValue *GV, int64_t Offset, - unsigned char TargetFlags = 0) { - MachineOperand Op(MachineOperand::MO_GlobalAddress); - Op.Contents.OffsetedInfo.Val.GV = GV; - Op.setOffset(Offset); - Op.setTargetFlags(TargetFlags); - return Op; - } - static MachineOperand CreateES(const char *SymName, - unsigned char TargetFlags = 0) { - MachineOperand Op(MachineOperand::MO_ExternalSymbol); - Op.Contents.OffsetedInfo.Val.SymbolName = SymName; - Op.setOffset(0); // Offset is always 0. - Op.setTargetFlags(TargetFlags); - return Op; - } - static MachineOperand CreateBA(const BlockAddress *BA, int64_t Offset, - unsigned char TargetFlags = 0) { - MachineOperand Op(MachineOperand::MO_BlockAddress); - Op.Contents.OffsetedInfo.Val.BA = BA; - Op.setOffset(Offset); - Op.setTargetFlags(TargetFlags); - return Op; - } - /// CreateRegMask - Creates a register mask operand referencing Mask. The - /// operand does not take ownership of the memory referenced by Mask, it must - /// remain valid for the lifetime of the operand. - /// - /// A RegMask operand represents a set of non-clobbered physical registers on - /// an instruction that clobbers many registers, typically a call. The bit - /// mask has a bit set for each physreg that is preserved by this - /// instruction, as described in the documentation for - /// TargetRegisterInfo::getCallPreservedMask(). - /// - /// Any physreg with a 0 bit in the mask is clobbered by the instruction. - /// - static MachineOperand CreateRegMask(const uint32_t *Mask) { - assert(Mask && "Missing register mask"); - MachineOperand Op(MachineOperand::MO_RegisterMask); - Op.Contents.RegMask = Mask; - return Op; - } - static MachineOperand CreateRegLiveOut(const uint32_t *Mask) { - assert(Mask && "Missing live-out register mask"); - MachineOperand Op(MachineOperand::MO_RegisterLiveOut); - Op.Contents.RegMask = Mask; - return Op; - } - static MachineOperand CreateMetadata(const MDNode *Meta) { - MachineOperand Op(MachineOperand::MO_Metadata); - Op.Contents.MD = Meta; - return Op; - } - - static MachineOperand CreateMCSymbol(MCSymbol *Sym, - unsigned char TargetFlags = 0) { - MachineOperand Op(MachineOperand::MO_MCSymbol); - Op.Contents.Sym = Sym; - Op.setOffset(0); - Op.setTargetFlags(TargetFlags); - return Op; - } - - static MachineOperand CreateCFIIndex(unsigned CFIIndex) { - MachineOperand Op(MachineOperand::MO_CFIIndex); - Op.Contents.CFIIndex = CFIIndex; - return Op; - } - - friend class MachineInstr; - friend class MachineRegisterInfo; -private: - void removeRegFromUses(); - - //===--------------------------------------------------------------------===// - // Methods for handling register use/def lists. - //===--------------------------------------------------------------------===// - - /// isOnRegUseList - Return true if this operand is on a register use/def list - /// or false if not. This can only be called for register operands that are - /// part of a machine instruction. - bool isOnRegUseList() const { - assert(isReg() && "Can only add reg operand to use lists"); - return Contents.Reg.Prev != nullptr; - } -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const MachineOperand& MO) { - MO.print(OS, nullptr); - return OS; -} - - // See friend declaration above. This additional declaration is required in - // order to compile LLVM with IBM xlC compiler. - hash_code hash_value(const MachineOperand &MO); -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachinePassRegistry.h b/llvm/include/llvm/CodeGen/MachinePassRegistry.h deleted file mode 100644 index 6731983c..00000000 --- a/llvm/include/llvm/CodeGen/MachinePassRegistry.h +++ /dev/null @@ -1,157 +0,0 @@ -//===-- llvm/CodeGen/MachinePassRegistry.h ----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the mechanics for machine function pass registries. A -// function pass registry (MachinePassRegistry) is auto filled by the static -// constructors of MachinePassRegistryNode. Further there is a command line -// parser (RegisterPassParser) which listens to each registry for additions -// and deletions, so that the appropriate command option is updated. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEPASSREGISTRY_H -#define LLVM_CODEGEN_MACHINEPASSREGISTRY_H - -#include "llvm/CodeGen/Passes.h" -#include "llvm/Support/CommandLine.h" - -namespace llvm { - -typedef void *(*MachinePassCtor)(); - - -//===----------------------------------------------------------------------===// -/// -/// MachinePassRegistryListener - Listener to adds and removals of nodes in -/// registration list. -/// -//===----------------------------------------------------------------------===// -class MachinePassRegistryListener { - virtual void anchor(); -public: - MachinePassRegistryListener() {} - virtual ~MachinePassRegistryListener() {} - virtual void NotifyAdd(const char *N, MachinePassCtor C, const char *D) = 0; - virtual void NotifyRemove(const char *N) = 0; -}; - - -//===----------------------------------------------------------------------===// -/// -/// MachinePassRegistryNode - Machine pass node stored in registration list. -/// -//===----------------------------------------------------------------------===// -class MachinePassRegistryNode { - -private: - - MachinePassRegistryNode *Next; // Next function pass in list. - const char *Name; // Name of function pass. - const char *Description; // Description string. - MachinePassCtor Ctor; // Function pass creator. - -public: - - MachinePassRegistryNode(const char *N, const char *D, MachinePassCtor C) - : Next(nullptr) - , Name(N) - , Description(D) - , Ctor(C) - {} - - // Accessors - MachinePassRegistryNode *getNext() const { return Next; } - MachinePassRegistryNode **getNextAddress() { return &Next; } - const char *getName() const { return Name; } - const char *getDescription() const { return Description; } - MachinePassCtor getCtor() const { return Ctor; } - void setNext(MachinePassRegistryNode *N) { Next = N; } - -}; - - -//===----------------------------------------------------------------------===// -/// -/// MachinePassRegistry - Track the registration of machine passes. -/// -//===----------------------------------------------------------------------===// -class MachinePassRegistry { - -private: - - MachinePassRegistryNode *List; // List of registry nodes. - MachinePassCtor Default; // Default function pass creator. - MachinePassRegistryListener* Listener;// Listener for list adds are removes. - -public: - - // NO CONSTRUCTOR - we don't want static constructor ordering to mess - // with the registry. - - // Accessors. - // - MachinePassRegistryNode *getList() { return List; } - MachinePassCtor getDefault() { return Default; } - void setDefault(MachinePassCtor C) { Default = C; } - void setDefault(StringRef Name); - void setListener(MachinePassRegistryListener *L) { Listener = L; } - - /// Add - Adds a function pass to the registration list. - /// - void Add(MachinePassRegistryNode *Node); - - /// Remove - Removes a function pass from the registration list. - /// - void Remove(MachinePassRegistryNode *Node); - -}; - - -//===----------------------------------------------------------------------===// -/// -/// RegisterPassParser class - Handle the addition of new machine passes. -/// -//===----------------------------------------------------------------------===// -template -class RegisterPassParser : public MachinePassRegistryListener, - public cl::parser { -public: - RegisterPassParser(cl::Option &O) - : cl::parser(O) {} - ~RegisterPassParser() override { RegistryClass::setListener(nullptr); } - - void initialize() { - cl::parser::initialize(); - - // Add existing passes to option. - for (RegistryClass *Node = RegistryClass::getList(); - Node; Node = Node->getNext()) { - this->addLiteralOption(Node->getName(), - (typename RegistryClass::FunctionPassCtor)Node->getCtor(), - Node->getDescription()); - } - - // Make sure we listen for list changes. - RegistryClass::setListener(this); - } - - // Implement the MachinePassRegistryListener callbacks. - // - void NotifyAdd(const char *N, MachinePassCtor C, const char *D) override { - this->addLiteralOption(N, (typename RegistryClass::FunctionPassCtor)C, D); - } - void NotifyRemove(const char *N) override { - this->removeLiteralOption(N); - } -}; - - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachinePostDominators.h b/llvm/include/llvm/CodeGen/MachinePostDominators.h deleted file mode 100644 index 70bdb191..00000000 --- a/llvm/include/llvm/CodeGen/MachinePostDominators.h +++ /dev/null @@ -1,86 +0,0 @@ -//=- llvm/CodeGen/MachineDominators.h ----------------------------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file exposes interfaces to post dominance information for -// target-specific code. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEPOSTDOMINATORS_H -#define LLVM_CODEGEN_MACHINEPOSTDOMINATORS_H - -#include "llvm/CodeGen/MachineDominators.h" -#include "llvm/CodeGen/MachineFunctionPass.h" - -namespace llvm { - -/// -/// PostDominatorTree Class - Concrete subclass of DominatorTree that is used -/// to compute the post-dominator tree. -/// -struct MachinePostDominatorTree : public MachineFunctionPass { -private: - DominatorTreeBase *DT; - -public: - static char ID; - - MachinePostDominatorTree(); - - ~MachinePostDominatorTree() override; - - FunctionPass *createMachinePostDominatorTreePass(); - - const std::vector &getRoots() const { - return DT->getRoots(); - } - - MachineDomTreeNode *getRootNode() const { - return DT->getRootNode(); - } - - MachineDomTreeNode *operator[](MachineBasicBlock *BB) const { - return DT->getNode(BB); - } - - MachineDomTreeNode *getNode(MachineBasicBlock *BB) const { - return DT->getNode(BB); - } - - bool dominates(const MachineDomTreeNode *A, - const MachineDomTreeNode *B) const { - return DT->dominates(A, B); - } - - bool dominates(const MachineBasicBlock *A, const MachineBasicBlock *B) const { - return DT->dominates(A, B); - } - - bool properlyDominates(const MachineDomTreeNode *A, - const MachineDomTreeNode *B) const { - return DT->properlyDominates(A, B); - } - - bool properlyDominates(const MachineBasicBlock *A, - const MachineBasicBlock *B) const { - return DT->properlyDominates(A, B); - } - - MachineBasicBlock *findNearestCommonDominator(MachineBasicBlock *A, - MachineBasicBlock *B) { - return DT->findNearestCommonDominator(A, B); - } - - bool runOnMachineFunction(MachineFunction &MF) override; - void getAnalysisUsage(AnalysisUsage &AU) const override; - void print(llvm::raw_ostream &OS, const Module *M = nullptr) const override; -}; -} //end of namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineRegionInfo.h b/llvm/include/llvm/CodeGen/MachineRegionInfo.h deleted file mode 100644 index df9823f7..00000000 --- a/llvm/include/llvm/CodeGen/MachineRegionInfo.h +++ /dev/null @@ -1,180 +0,0 @@ -//===- llvm/CodeGen/MachineRegionInfo.h -------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEREGIONINFO_H -#define LLVM_CODEGEN_MACHINEREGIONINFO_H - -#include "llvm/Analysis/RegionInfo.h" -#include "llvm/Analysis/RegionIterator.h" -#include "llvm/CodeGen/MachineDominanceFrontier.h" -#include "llvm/CodeGen/MachineDominators.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineLoopInfo.h" - - -namespace llvm { - -class MachineDominatorTree; -struct MachinePostDominatorTree; -class MachineRegion; -class MachineRegionNode; -class MachineRegionInfo; - -template<> -struct RegionTraits { - typedef MachineFunction FuncT; - typedef MachineBasicBlock BlockT; - typedef MachineRegion RegionT; - typedef MachineRegionNode RegionNodeT; - typedef MachineRegionInfo RegionInfoT; - typedef MachineDominatorTree DomTreeT; - typedef MachineDomTreeNode DomTreeNodeT; - typedef MachinePostDominatorTree PostDomTreeT; - typedef MachineDominanceFrontier DomFrontierT; - typedef MachineInstr InstT; - typedef MachineLoop LoopT; - typedef MachineLoopInfo LoopInfoT; - - static unsigned getNumSuccessors(MachineBasicBlock *BB) { - return BB->succ_size(); - } -}; - - -class MachineRegionNode : public RegionNodeBase> { -public: - inline MachineRegionNode(MachineRegion *Parent, - MachineBasicBlock *Entry, - bool isSubRegion = false) - : RegionNodeBase>(Parent, Entry, isSubRegion) { - - } - - bool operator==(const MachineRegion &RN) const { - return this == reinterpret_cast(&RN); - } -}; - -class MachineRegion : public RegionBase> { -public: - MachineRegion(MachineBasicBlock *Entry, MachineBasicBlock *Exit, - MachineRegionInfo* RI, - MachineDominatorTree *DT, MachineRegion *Parent = nullptr); - ~MachineRegion(); - - bool operator==(const MachineRegionNode &RN) const { - return &RN == reinterpret_cast(this); - } -}; - -class MachineRegionInfo : public RegionInfoBase> { -public: - explicit MachineRegionInfo(); - - ~MachineRegionInfo() override; - - // updateStatistics - Update statistic about created regions. - void updateStatistics(MachineRegion *R) final; - - void recalculate(MachineFunction &F, - MachineDominatorTree *DT, - MachinePostDominatorTree *PDT, - MachineDominanceFrontier *DF); -}; - -class MachineRegionInfoPass : public MachineFunctionPass { - MachineRegionInfo RI; - -public: - static char ID; - explicit MachineRegionInfoPass(); - - ~MachineRegionInfoPass() override; - - MachineRegionInfo &getRegionInfo() { - return RI; - } - - const MachineRegionInfo &getRegionInfo() const { - return RI; - } - - /// @name MachineFunctionPass interface - //@{ - bool runOnMachineFunction(MachineFunction &F) override; - void releaseMemory() override; - void verifyAnalysis() const override; - void getAnalysisUsage(AnalysisUsage &AU) const override; - void print(raw_ostream &OS, const Module *) const override; - void dump() const; - //@} -}; - - -template <> -template <> -inline MachineBasicBlock* RegionNodeBase>::getNodeAs() const { - assert(!isSubRegion() && "This is not a MachineBasicBlock RegionNode!"); - return getEntry(); -} - -template<> -template<> -inline MachineRegion* RegionNodeBase>::getNodeAs() const { - assert(isSubRegion() && "This is not a subregion RegionNode!"); - auto Unconst = const_cast>*>(this); - return reinterpret_cast(Unconst); -} - - -RegionNodeGraphTraits(MachineRegionNode, MachineBasicBlock, MachineRegion); -RegionNodeGraphTraits(const MachineRegionNode, MachineBasicBlock, MachineRegion); - -RegionGraphTraits(MachineRegion, MachineRegionNode); -RegionGraphTraits(const MachineRegion, const MachineRegionNode); - -template <> struct GraphTraits - : public GraphTraits > { - typedef df_iterator, false, - GraphTraits > > nodes_iterator; - - static NodeType *getEntryNode(MachineRegionInfo *RI) { - return GraphTraits >::getEntryNode(RI->getTopLevelRegion()); - } - static nodes_iterator nodes_begin(MachineRegionInfo* RI) { - return nodes_iterator::begin(getEntryNode(RI)); - } - static nodes_iterator nodes_end(MachineRegionInfo *RI) { - return nodes_iterator::end(getEntryNode(RI)); - } -}; - -template <> struct GraphTraits - : public GraphTraits { - typedef df_iterator, false, - GraphTraits > > nodes_iterator; - - static NodeType *getEntryNode(MachineRegionInfoPass *RI) { - return GraphTraits::getEntryNode(&RI->getRegionInfo()); - } - static nodes_iterator nodes_begin(MachineRegionInfoPass* RI) { - return GraphTraits::nodes_begin(&RI->getRegionInfo()); - } - static nodes_iterator nodes_end(MachineRegionInfoPass *RI) { - return GraphTraits::nodes_end(&RI->getRegionInfo()); - } -}; - -extern template class RegionBase>; -extern template class RegionNodeBase>; -extern template class RegionInfoBase>; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h deleted file mode 100644 index 07d2d016..00000000 --- a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h +++ /dev/null @@ -1,1064 +0,0 @@ -//===-- llvm/CodeGen/MachineRegisterInfo.h ----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MachineRegisterInfo class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEREGISTERINFO_H -#define LLVM_CODEGEN_MACHINEREGISTERINFO_H - -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/IndexedMap.h" -#include "llvm/ADT/PointerUnion.h" -#include "llvm/ADT/iterator_range.h" -// PointerUnion needs to have access to the full RegisterBank type. -#include "llvm/CodeGen/GlobalISel/RegisterBank.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineInstrBundle.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include "llvm/Target/TargetSubtargetInfo.h" -#include - -namespace llvm { -class PSetIterator; - -/// Convenient type to represent either a register class or a register bank. -typedef PointerUnion - RegClassOrRegBank; - -/// MachineRegisterInfo - Keep track of information for virtual and physical -/// registers, including vreg register classes, use/def chains for registers, -/// etc. -class MachineRegisterInfo { -public: - class Delegate { - virtual void anchor(); - public: - virtual void MRI_NoteNewVirtualRegister(unsigned Reg) = 0; - - virtual ~Delegate() {} - }; - -private: - MachineFunction *MF; - Delegate *TheDelegate; - - /// True if subregister liveness is tracked. - bool TracksSubRegLiveness; - - /// VRegInfo - Information we keep for each virtual register. - /// - /// Each element in this list contains the register class of the vreg and the - /// start of the use/def list for the register. - IndexedMap, - VirtReg2IndexFunctor> - VRegInfo; - - /// RegAllocHints - This vector records register allocation hints for virtual - /// registers. For each virtual register, it keeps a register and hint type - /// pair making up the allocation hint. Hint type is target specific except - /// for the value 0 which means the second value of the pair is the preferred - /// register for allocation. For example, if the hint is <0, 1024>, it means - /// the allocator should prefer the physical register allocated to the virtual - /// register of the hint. - IndexedMap, VirtReg2IndexFunctor> RegAllocHints; - - /// PhysRegUseDefLists - This is an array of the head of the use/def list for - /// physical registers. - std::unique_ptr PhysRegUseDefLists; - - /// getRegUseDefListHead - Return the head pointer for the register use/def - /// list for the specified virtual or physical register. - MachineOperand *&getRegUseDefListHead(unsigned RegNo) { - if (TargetRegisterInfo::isVirtualRegister(RegNo)) - return VRegInfo[RegNo].second; - return PhysRegUseDefLists[RegNo]; - } - - MachineOperand *getRegUseDefListHead(unsigned RegNo) const { - if (TargetRegisterInfo::isVirtualRegister(RegNo)) - return VRegInfo[RegNo].second; - return PhysRegUseDefLists[RegNo]; - } - - /// Get the next element in the use-def chain. - static MachineOperand *getNextOperandForReg(const MachineOperand *MO) { - assert(MO && MO->isReg() && "This is not a register operand!"); - return MO->Contents.Reg.Next; - } - - /// UsedPhysRegMask - Additional used physregs including aliases. - /// This bit vector represents all the registers clobbered by function calls. - BitVector UsedPhysRegMask; - - /// ReservedRegs - This is a bit vector of reserved registers. The target - /// may change its mind about which registers should be reserved. This - /// vector is the frozen set of reserved registers when register allocation - /// started. - BitVector ReservedRegs; - - typedef DenseMap VRegToSizeMap; - /// Map generic virtual registers to their actual size. - mutable std::unique_ptr VRegToSize; - - /// Accessor for VRegToSize. This accessor should only be used - /// by global-isel related work. - VRegToSizeMap &getVRegToSize() const { - if (!VRegToSize) - VRegToSize.reset(new VRegToSizeMap); - return *VRegToSize.get(); - } - - /// Keep track of the physical registers that are live in to the function. - /// Live in values are typically arguments in registers. LiveIn values are - /// allowed to have virtual registers associated with them, stored in the - /// second element. - std::vector > LiveIns; - - MachineRegisterInfo(const MachineRegisterInfo&) = delete; - void operator=(const MachineRegisterInfo&) = delete; -public: - explicit MachineRegisterInfo(MachineFunction *MF); - - const TargetRegisterInfo *getTargetRegisterInfo() const { - return MF->getSubtarget().getRegisterInfo(); - } - - void resetDelegate(Delegate *delegate) { - // Ensure another delegate does not take over unless the current - // delegate first unattaches itself. If we ever need to multicast - // notifications, we will need to change to using a list. - assert(TheDelegate == delegate && - "Only the current delegate can perform reset!"); - TheDelegate = nullptr; - } - - void setDelegate(Delegate *delegate) { - assert(delegate && !TheDelegate && - "Attempted to set delegate to null, or to change it without " - "first resetting it!"); - - TheDelegate = delegate; - } - - //===--------------------------------------------------------------------===// - // Function State - //===--------------------------------------------------------------------===// - - // isSSA - Returns true when the machine function is in SSA form. Early - // passes require the machine function to be in SSA form where every virtual - // register has a single defining instruction. - // - // The TwoAddressInstructionPass and PHIElimination passes take the machine - // function out of SSA form when they introduce multiple defs per virtual - // register. - bool isSSA() const { - return MF->getProperties().hasProperty( - MachineFunctionProperties::Property::IsSSA); - } - - // leaveSSA - Indicates that the machine function is no longer in SSA form. - void leaveSSA() { - MF->getProperties().clear(MachineFunctionProperties::Property::IsSSA); - } - - /// tracksLiveness - Returns true when tracking register liveness accurately. - /// (see MachineFUnctionProperties::Property description for details) - bool tracksLiveness() const { - return MF->getProperties().hasProperty( - MachineFunctionProperties::Property::TracksLiveness); - } - - /// invalidateLiveness - Indicates that register liveness is no longer being - /// tracked accurately. - /// - /// This should be called by late passes that invalidate the liveness - /// information. - void invalidateLiveness() { - MF->getProperties().clear( - MachineFunctionProperties::Property::TracksLiveness); - } - - /// Returns true if liveness for register class @p RC should be tracked at - /// the subregister level. - bool shouldTrackSubRegLiveness(const TargetRegisterClass &RC) const { - return subRegLivenessEnabled() && RC.HasDisjunctSubRegs; - } - bool shouldTrackSubRegLiveness(unsigned VReg) const { - assert(TargetRegisterInfo::isVirtualRegister(VReg) && "Must pass a VReg"); - return shouldTrackSubRegLiveness(*getRegClass(VReg)); - } - bool subRegLivenessEnabled() const { - return TracksSubRegLiveness; - } - - void enableSubRegLiveness(bool Enable = true) { - TracksSubRegLiveness = Enable; - } - - //===--------------------------------------------------------------------===// - // Register Info - //===--------------------------------------------------------------------===// - - // Strictly for use by MachineInstr.cpp. - void addRegOperandToUseList(MachineOperand *MO); - - // Strictly for use by MachineInstr.cpp. - void removeRegOperandFromUseList(MachineOperand *MO); - - // Strictly for use by MachineInstr.cpp. - void moveOperands(MachineOperand *Dst, MachineOperand *Src, unsigned NumOps); - - /// Verify the sanity of the use list for Reg. - void verifyUseList(unsigned Reg) const; - - /// Verify the use list of all registers. - void verifyUseLists() const; - - /// reg_begin/reg_end - Provide iteration support to walk over all definitions - /// and uses of a register within the MachineFunction that corresponds to this - /// MachineRegisterInfo object. - template - class defusechain_iterator; - template - class defusechain_instr_iterator; - - // Make it a friend so it can access getNextOperandForReg(). - template - friend class defusechain_iterator; - template - friend class defusechain_instr_iterator; - - - - /// reg_iterator/reg_begin/reg_end - Walk all defs and uses of the specified - /// register. - typedef defusechain_iterator - reg_iterator; - reg_iterator reg_begin(unsigned RegNo) const { - return reg_iterator(getRegUseDefListHead(RegNo)); - } - static reg_iterator reg_end() { return reg_iterator(nullptr); } - - inline iterator_range reg_operands(unsigned Reg) const { - return make_range(reg_begin(Reg), reg_end()); - } - - /// reg_instr_iterator/reg_instr_begin/reg_instr_end - Walk all defs and uses - /// of the specified register, stepping by MachineInstr. - typedef defusechain_instr_iterator - reg_instr_iterator; - reg_instr_iterator reg_instr_begin(unsigned RegNo) const { - return reg_instr_iterator(getRegUseDefListHead(RegNo)); - } - static reg_instr_iterator reg_instr_end() { - return reg_instr_iterator(nullptr); - } - - inline iterator_range - reg_instructions(unsigned Reg) const { - return make_range(reg_instr_begin(Reg), reg_instr_end()); - } - - /// reg_bundle_iterator/reg_bundle_begin/reg_bundle_end - Walk all defs and uses - /// of the specified register, stepping by bundle. - typedef defusechain_instr_iterator - reg_bundle_iterator; - reg_bundle_iterator reg_bundle_begin(unsigned RegNo) const { - return reg_bundle_iterator(getRegUseDefListHead(RegNo)); - } - static reg_bundle_iterator reg_bundle_end() { - return reg_bundle_iterator(nullptr); - } - - inline iterator_range reg_bundles(unsigned Reg) const { - return make_range(reg_bundle_begin(Reg), reg_bundle_end()); - } - - /// reg_empty - Return true if there are no instructions using or defining the - /// specified register (it may be live-in). - bool reg_empty(unsigned RegNo) const { return reg_begin(RegNo) == reg_end(); } - - /// reg_nodbg_iterator/reg_nodbg_begin/reg_nodbg_end - Walk all defs and uses - /// of the specified register, skipping those marked as Debug. - typedef defusechain_iterator - reg_nodbg_iterator; - reg_nodbg_iterator reg_nodbg_begin(unsigned RegNo) const { - return reg_nodbg_iterator(getRegUseDefListHead(RegNo)); - } - static reg_nodbg_iterator reg_nodbg_end() { - return reg_nodbg_iterator(nullptr); - } - - inline iterator_range - reg_nodbg_operands(unsigned Reg) const { - return make_range(reg_nodbg_begin(Reg), reg_nodbg_end()); - } - - /// reg_instr_nodbg_iterator/reg_instr_nodbg_begin/reg_instr_nodbg_end - Walk - /// all defs and uses of the specified register, stepping by MachineInstr, - /// skipping those marked as Debug. - typedef defusechain_instr_iterator - reg_instr_nodbg_iterator; - reg_instr_nodbg_iterator reg_instr_nodbg_begin(unsigned RegNo) const { - return reg_instr_nodbg_iterator(getRegUseDefListHead(RegNo)); - } - static reg_instr_nodbg_iterator reg_instr_nodbg_end() { - return reg_instr_nodbg_iterator(nullptr); - } - - inline iterator_range - reg_nodbg_instructions(unsigned Reg) const { - return make_range(reg_instr_nodbg_begin(Reg), reg_instr_nodbg_end()); - } - - /// reg_bundle_nodbg_iterator/reg_bundle_nodbg_begin/reg_bundle_nodbg_end - Walk - /// all defs and uses of the specified register, stepping by bundle, - /// skipping those marked as Debug. - typedef defusechain_instr_iterator - reg_bundle_nodbg_iterator; - reg_bundle_nodbg_iterator reg_bundle_nodbg_begin(unsigned RegNo) const { - return reg_bundle_nodbg_iterator(getRegUseDefListHead(RegNo)); - } - static reg_bundle_nodbg_iterator reg_bundle_nodbg_end() { - return reg_bundle_nodbg_iterator(nullptr); - } - - inline iterator_range - reg_nodbg_bundles(unsigned Reg) const { - return make_range(reg_bundle_nodbg_begin(Reg), reg_bundle_nodbg_end()); - } - - /// reg_nodbg_empty - Return true if the only instructions using or defining - /// Reg are Debug instructions. - bool reg_nodbg_empty(unsigned RegNo) const { - return reg_nodbg_begin(RegNo) == reg_nodbg_end(); - } - - /// def_iterator/def_begin/def_end - Walk all defs of the specified register. - typedef defusechain_iterator - def_iterator; - def_iterator def_begin(unsigned RegNo) const { - return def_iterator(getRegUseDefListHead(RegNo)); - } - static def_iterator def_end() { return def_iterator(nullptr); } - - inline iterator_range def_operands(unsigned Reg) const { - return make_range(def_begin(Reg), def_end()); - } - - /// def_instr_iterator/def_instr_begin/def_instr_end - Walk all defs of the - /// specified register, stepping by MachineInst. - typedef defusechain_instr_iterator - def_instr_iterator; - def_instr_iterator def_instr_begin(unsigned RegNo) const { - return def_instr_iterator(getRegUseDefListHead(RegNo)); - } - static def_instr_iterator def_instr_end() { - return def_instr_iterator(nullptr); - } - - inline iterator_range - def_instructions(unsigned Reg) const { - return make_range(def_instr_begin(Reg), def_instr_end()); - } - - /// def_bundle_iterator/def_bundle_begin/def_bundle_end - Walk all defs of the - /// specified register, stepping by bundle. - typedef defusechain_instr_iterator - def_bundle_iterator; - def_bundle_iterator def_bundle_begin(unsigned RegNo) const { - return def_bundle_iterator(getRegUseDefListHead(RegNo)); - } - static def_bundle_iterator def_bundle_end() { - return def_bundle_iterator(nullptr); - } - - inline iterator_range def_bundles(unsigned Reg) const { - return make_range(def_bundle_begin(Reg), def_bundle_end()); - } - - /// def_empty - Return true if there are no instructions defining the - /// specified register (it may be live-in). - bool def_empty(unsigned RegNo) const { return def_begin(RegNo) == def_end(); } - - /// Return true if there is exactly one operand defining the specified - /// register. - bool hasOneDef(unsigned RegNo) const { - def_iterator DI = def_begin(RegNo); - if (DI == def_end()) - return false; - return ++DI == def_end(); - } - - /// use_iterator/use_begin/use_end - Walk all uses of the specified register. - typedef defusechain_iterator - use_iterator; - use_iterator use_begin(unsigned RegNo) const { - return use_iterator(getRegUseDefListHead(RegNo)); - } - static use_iterator use_end() { return use_iterator(nullptr); } - - inline iterator_range use_operands(unsigned Reg) const { - return make_range(use_begin(Reg), use_end()); - } - - /// use_instr_iterator/use_instr_begin/use_instr_end - Walk all uses of the - /// specified register, stepping by MachineInstr. - typedef defusechain_instr_iterator - use_instr_iterator; - use_instr_iterator use_instr_begin(unsigned RegNo) const { - return use_instr_iterator(getRegUseDefListHead(RegNo)); - } - static use_instr_iterator use_instr_end() { - return use_instr_iterator(nullptr); - } - - inline iterator_range - use_instructions(unsigned Reg) const { - return make_range(use_instr_begin(Reg), use_instr_end()); - } - - /// use_bundle_iterator/use_bundle_begin/use_bundle_end - Walk all uses of the - /// specified register, stepping by bundle. - typedef defusechain_instr_iterator - use_bundle_iterator; - use_bundle_iterator use_bundle_begin(unsigned RegNo) const { - return use_bundle_iterator(getRegUseDefListHead(RegNo)); - } - static use_bundle_iterator use_bundle_end() { - return use_bundle_iterator(nullptr); - } - - inline iterator_range use_bundles(unsigned Reg) const { - return make_range(use_bundle_begin(Reg), use_bundle_end()); - } - - /// use_empty - Return true if there are no instructions using the specified - /// register. - bool use_empty(unsigned RegNo) const { return use_begin(RegNo) == use_end(); } - - /// hasOneUse - Return true if there is exactly one instruction using the - /// specified register. - bool hasOneUse(unsigned RegNo) const { - use_iterator UI = use_begin(RegNo); - if (UI == use_end()) - return false; - return ++UI == use_end(); - } - - /// use_nodbg_iterator/use_nodbg_begin/use_nodbg_end - Walk all uses of the - /// specified register, skipping those marked as Debug. - typedef defusechain_iterator - use_nodbg_iterator; - use_nodbg_iterator use_nodbg_begin(unsigned RegNo) const { - return use_nodbg_iterator(getRegUseDefListHead(RegNo)); - } - static use_nodbg_iterator use_nodbg_end() { - return use_nodbg_iterator(nullptr); - } - - inline iterator_range - use_nodbg_operands(unsigned Reg) const { - return make_range(use_nodbg_begin(Reg), use_nodbg_end()); - } - - /// use_instr_nodbg_iterator/use_instr_nodbg_begin/use_instr_nodbg_end - Walk - /// all uses of the specified register, stepping by MachineInstr, skipping - /// those marked as Debug. - typedef defusechain_instr_iterator - use_instr_nodbg_iterator; - use_instr_nodbg_iterator use_instr_nodbg_begin(unsigned RegNo) const { - return use_instr_nodbg_iterator(getRegUseDefListHead(RegNo)); - } - static use_instr_nodbg_iterator use_instr_nodbg_end() { - return use_instr_nodbg_iterator(nullptr); - } - - inline iterator_range - use_nodbg_instructions(unsigned Reg) const { - return make_range(use_instr_nodbg_begin(Reg), use_instr_nodbg_end()); - } - - /// use_bundle_nodbg_iterator/use_bundle_nodbg_begin/use_bundle_nodbg_end - Walk - /// all uses of the specified register, stepping by bundle, skipping - /// those marked as Debug. - typedef defusechain_instr_iterator - use_bundle_nodbg_iterator; - use_bundle_nodbg_iterator use_bundle_nodbg_begin(unsigned RegNo) const { - return use_bundle_nodbg_iterator(getRegUseDefListHead(RegNo)); - } - static use_bundle_nodbg_iterator use_bundle_nodbg_end() { - return use_bundle_nodbg_iterator(nullptr); - } - - inline iterator_range - use_nodbg_bundles(unsigned Reg) const { - return make_range(use_bundle_nodbg_begin(Reg), use_bundle_nodbg_end()); - } - - /// use_nodbg_empty - Return true if there are no non-Debug instructions - /// using the specified register. - bool use_nodbg_empty(unsigned RegNo) const { - return use_nodbg_begin(RegNo) == use_nodbg_end(); - } - - /// hasOneNonDBGUse - Return true if there is exactly one non-Debug - /// instruction using the specified register. - bool hasOneNonDBGUse(unsigned RegNo) const; - - /// replaceRegWith - Replace all instances of FromReg with ToReg in the - /// machine function. This is like llvm-level X->replaceAllUsesWith(Y), - /// except that it also changes any definitions of the register as well. - /// - /// Note that it is usually necessary to first constrain ToReg's register - /// class to match the FromReg constraints using: - /// - /// constrainRegClass(ToReg, getRegClass(FromReg)) - /// - /// That function will return NULL if the virtual registers have incompatible - /// constraints. - /// - /// Note that if ToReg is a physical register the function will replace and - /// apply sub registers to ToReg in order to obtain a final/proper physical - /// register. - void replaceRegWith(unsigned FromReg, unsigned ToReg); - - /// getVRegDef - Return the machine instr that defines the specified virtual - /// register or null if none is found. This assumes that the code is in SSA - /// form, so there should only be one definition. - MachineInstr *getVRegDef(unsigned Reg) const; - - /// getUniqueVRegDef - Return the unique machine instr that defines the - /// specified virtual register or null if none is found. If there are - /// multiple definitions or no definition, return null. - MachineInstr *getUniqueVRegDef(unsigned Reg) const; - - /// clearKillFlags - Iterate over all the uses of the given register and - /// clear the kill flag from the MachineOperand. This function is used by - /// optimization passes which extend register lifetimes and need only - /// preserve conservative kill flag information. - void clearKillFlags(unsigned Reg) const; - -#ifndef NDEBUG - void dumpUses(unsigned RegNo) const; -#endif - - /// isConstantPhysReg - Returns true if PhysReg is unallocatable and constant - /// throughout the function. It is safe to move instructions that read such - /// a physreg. - bool isConstantPhysReg(unsigned PhysReg, const MachineFunction &MF) const; - - /// Get an iterator over the pressure sets affected by the given physical or - /// virtual register. If RegUnit is physical, it must be a register unit (from - /// MCRegUnitIterator). - PSetIterator getPressureSets(unsigned RegUnit) const; - - //===--------------------------------------------------------------------===// - // Virtual Register Info - //===--------------------------------------------------------------------===// - - /// Return the register class of the specified virtual register. - /// This shouldn't be used directly unless \p Reg has a register class. - /// \see getRegClassOrNull when this might happen. - /// - const TargetRegisterClass *getRegClass(unsigned Reg) const { - assert(VRegInfo[Reg].first.is() && - "Register class not set, wrong accessor"); - return VRegInfo[Reg].first.get(); - } - - /// Return the register class of \p Reg, or null if Reg has not been assigned - /// a register class yet. - /// - /// \note A null register class can only happen when these two - /// conditions are met: - /// 1. Generic virtual registers are created. - /// 2. The machine function has not completely been through the - /// instruction selection process. - /// None of this condition is possible without GlobalISel for now. - /// In other words, if GlobalISel is not used or if the query happens after - /// the select pass, using getRegClass is safe. - const TargetRegisterClass *getRegClassOrNull(unsigned Reg) const { - const RegClassOrRegBank &Val = VRegInfo[Reg].first; - return Val.dyn_cast(); - } - - /// Return the register bank of \p Reg, or null if Reg has not been assigned - /// a register bank or has been assigned a register class. - /// \note It is possible to get the register bank from the register class via - /// RegisterBankInfo::getRegBankFromRegClass. - /// - const RegisterBank *getRegBankOrNull(unsigned Reg) const { - const RegClassOrRegBank &Val = VRegInfo[Reg].first; - return Val.dyn_cast(); - } - - /// Return the register bank or register class of \p Reg. - /// \note Before the register bank gets assigned (i.e., before the - /// RegBankSelect pass) \p Reg may not have either. - /// - const RegClassOrRegBank &getRegClassOrRegBank(unsigned Reg) const { - return VRegInfo[Reg].first; - } - - /// setRegClass - Set the register class of the specified virtual register. - /// - void setRegClass(unsigned Reg, const TargetRegisterClass *RC); - - /// Set the register bank to \p RegBank for \p Reg. - /// - void setRegBank(unsigned Reg, const RegisterBank &RegBank); - - /// constrainRegClass - Constrain the register class of the specified virtual - /// register to be a common subclass of RC and the current register class, - /// but only if the new class has at least MinNumRegs registers. Return the - /// new register class, or NULL if no such class exists. - /// This should only be used when the constraint is known to be trivial, like - /// GR32 -> GR32_NOSP. Beware of increasing register pressure. - /// - const TargetRegisterClass *constrainRegClass(unsigned Reg, - const TargetRegisterClass *RC, - unsigned MinNumRegs = 0); - - /// recomputeRegClass - Try to find a legal super-class of Reg's register - /// class that still satisfies the constraints from the instructions using - /// Reg. Returns true if Reg was upgraded. - /// - /// This method can be used after constraints have been removed from a - /// virtual register, for example after removing instructions or splitting - /// the live range. - /// - bool recomputeRegClass(unsigned Reg); - - /// createVirtualRegister - Create and return a new virtual register in the - /// function with the specified register class. - /// - unsigned createVirtualRegister(const TargetRegisterClass *RegClass); - - /// Get the size in bits of \p VReg or 0 if VReg is not a generic - /// (target independent) virtual register. - unsigned getSize(unsigned VReg) const; - - /// Set the size in bits of \p VReg to \p Size. - /// Although the size should be set at build time, mir infrastructure - /// is not yet able to do it. - void setSize(unsigned VReg, unsigned Size); - - /// Create and return a new generic virtual register with a size of \p Size. - /// \pre Size > 0. - unsigned createGenericVirtualRegister(unsigned Size); - - /// getNumVirtRegs - Return the number of virtual registers created. - /// - unsigned getNumVirtRegs() const { return VRegInfo.size(); } - - /// clearVirtRegs - Remove all virtual registers (after physreg assignment). - void clearVirtRegs(); - - /// setRegAllocationHint - Specify a register allocation hint for the - /// specified virtual register. - void setRegAllocationHint(unsigned VReg, unsigned Type, unsigned PrefReg) { - assert(TargetRegisterInfo::isVirtualRegister(VReg)); - RegAllocHints[VReg].first = Type; - RegAllocHints[VReg].second = PrefReg; - } - - /// Specify the preferred register allocation hint for the specified virtual - /// register. - void setSimpleHint(unsigned VReg, unsigned PrefReg) { - setRegAllocationHint(VReg, /*Type=*/0, PrefReg); - } - - /// getRegAllocationHint - Return the register allocation hint for the - /// specified virtual register. - std::pair - getRegAllocationHint(unsigned VReg) const { - assert(TargetRegisterInfo::isVirtualRegister(VReg)); - return RegAllocHints[VReg]; - } - - /// getSimpleHint - Return the preferred register allocation hint, or 0 if a - /// standard simple hint (Type == 0) is not set. - unsigned getSimpleHint(unsigned VReg) const { - assert(TargetRegisterInfo::isVirtualRegister(VReg)); - std::pair Hint = getRegAllocationHint(VReg); - return Hint.first ? 0 : Hint.second; - } - - /// markUsesInDebugValueAsUndef - Mark every DBG_VALUE referencing the - /// specified register as undefined which causes the DBG_VALUE to be - /// deleted during LiveDebugVariables analysis. - void markUsesInDebugValueAsUndef(unsigned Reg) const; - - /// Return true if the specified register is modified in this function. - /// This checks that no defining machine operands exist for the register or - /// any of its aliases. Definitions found on functions marked noreturn are - /// ignored, to consider them pass 'true' for optional parameter - /// SkipNoReturnDef. The register is also considered modified when it is set - /// in the UsedPhysRegMask. - bool isPhysRegModified(unsigned PhysReg, bool SkipNoReturnDef = false) const; - - /// Return true if the specified register is modified or read in this - /// function. This checks that no machine operands exist for the register or - /// any of its aliases. The register is also considered used when it is set - /// in the UsedPhysRegMask. - bool isPhysRegUsed(unsigned PhysReg) const; - - /// addPhysRegsUsedFromRegMask - Mark any registers not in RegMask as used. - /// This corresponds to the bit mask attached to register mask operands. - void addPhysRegsUsedFromRegMask(const uint32_t *RegMask) { - UsedPhysRegMask.setBitsNotInMask(RegMask); - } - - const BitVector &getUsedPhysRegsMask() const { return UsedPhysRegMask; } - - void setUsedPhysRegMask(BitVector &Mask) { UsedPhysRegMask = Mask; } - - //===--------------------------------------------------------------------===// - // Reserved Register Info - //===--------------------------------------------------------------------===// - // - // The set of reserved registers must be invariant during register - // allocation. For example, the target cannot suddenly decide it needs a - // frame pointer when the register allocator has already used the frame - // pointer register for something else. - // - // These methods can be used by target hooks like hasFP() to avoid changing - // the reserved register set during register allocation. - - /// freezeReservedRegs - Called by the register allocator to freeze the set - /// of reserved registers before allocation begins. - void freezeReservedRegs(const MachineFunction&); - - /// reservedRegsFrozen - Returns true after freezeReservedRegs() was called - /// to ensure the set of reserved registers stays constant. - bool reservedRegsFrozen() const { - return !ReservedRegs.empty(); - } - - /// canReserveReg - Returns true if PhysReg can be used as a reserved - /// register. Any register can be reserved before freezeReservedRegs() is - /// called. - bool canReserveReg(unsigned PhysReg) const { - return !reservedRegsFrozen() || ReservedRegs.test(PhysReg); - } - - /// getReservedRegs - Returns a reference to the frozen set of reserved - /// registers. This method should always be preferred to calling - /// TRI::getReservedRegs() when possible. - const BitVector &getReservedRegs() const { - assert(reservedRegsFrozen() && - "Reserved registers haven't been frozen yet. " - "Use TRI::getReservedRegs()."); - return ReservedRegs; - } - - /// isReserved - Returns true when PhysReg is a reserved register. - /// - /// Reserved registers may belong to an allocatable register class, but the - /// target has explicitly requested that they are not used. - /// - bool isReserved(unsigned PhysReg) const { - return getReservedRegs().test(PhysReg); - } - - /// isAllocatable - Returns true when PhysReg belongs to an allocatable - /// register class and it hasn't been reserved. - /// - /// Allocatable registers may show up in the allocation order of some virtual - /// register, so a register allocator needs to track its liveness and - /// availability. - bool isAllocatable(unsigned PhysReg) const { - return getTargetRegisterInfo()->isInAllocatableClass(PhysReg) && - !isReserved(PhysReg); - } - - //===--------------------------------------------------------------------===// - // LiveIn Management - //===--------------------------------------------------------------------===// - - /// addLiveIn - Add the specified register as a live-in. Note that it - /// is an error to add the same register to the same set more than once. - void addLiveIn(unsigned Reg, unsigned vreg = 0) { - LiveIns.push_back(std::make_pair(Reg, vreg)); - } - - // Iteration support for the live-ins set. It's kept in sorted order - // by register number. - typedef std::vector >::const_iterator - livein_iterator; - livein_iterator livein_begin() const { return LiveIns.begin(); } - livein_iterator livein_end() const { return LiveIns.end(); } - bool livein_empty() const { return LiveIns.empty(); } - - bool isLiveIn(unsigned Reg) const; - - /// getLiveInPhysReg - If VReg is a live-in virtual register, return the - /// corresponding live-in physical register. - unsigned getLiveInPhysReg(unsigned VReg) const; - - /// getLiveInVirtReg - If PReg is a live-in physical register, return the - /// corresponding live-in physical register. - unsigned getLiveInVirtReg(unsigned PReg) const; - - /// EmitLiveInCopies - Emit copies to initialize livein virtual registers - /// into the given entry block. - void EmitLiveInCopies(MachineBasicBlock *EntryMBB, - const TargetRegisterInfo &TRI, - const TargetInstrInfo &TII); - - /// Returns a mask covering all bits that can appear in lane masks of - /// subregisters of the virtual register @p Reg. - LaneBitmask getMaxLaneMaskForVReg(unsigned Reg) const; - - /// defusechain_iterator - This class provides iterator support for machine - /// operands in the function that use or define a specific register. If - /// ReturnUses is true it returns uses of registers, if ReturnDefs is true it - /// returns defs. If neither are true then you are silly and it always - /// returns end(). If SkipDebug is true it skips uses marked Debug - /// when incrementing. - template - class defusechain_iterator - : public std::iterator { - MachineOperand *Op; - explicit defusechain_iterator(MachineOperand *op) : Op(op) { - // If the first node isn't one we're interested in, advance to one that - // we are interested in. - if (op) { - if ((!ReturnUses && op->isUse()) || - (!ReturnDefs && op->isDef()) || - (SkipDebug && op->isDebug())) - advance(); - } - } - friend class MachineRegisterInfo; - - void advance() { - assert(Op && "Cannot increment end iterator!"); - Op = getNextOperandForReg(Op); - - // All defs come before the uses, so stop def_iterator early. - if (!ReturnUses) { - if (Op) { - if (Op->isUse()) - Op = nullptr; - else - assert(!Op->isDebug() && "Can't have debug defs"); - } - } else { - // If this is an operand we don't care about, skip it. - while (Op && ((!ReturnDefs && Op->isDef()) || - (SkipDebug && Op->isDebug()))) - Op = getNextOperandForReg(Op); - } - } - public: - typedef std::iterator::reference reference; - typedef std::iterator::pointer pointer; - - defusechain_iterator() : Op(nullptr) {} - - bool operator==(const defusechain_iterator &x) const { - return Op == x.Op; - } - bool operator!=(const defusechain_iterator &x) const { - return !operator==(x); - } - - /// atEnd - return true if this iterator is equal to reg_end() on the value. - bool atEnd() const { return Op == nullptr; } - - // Iterator traversal: forward iteration only - defusechain_iterator &operator++() { // Preincrement - assert(Op && "Cannot increment end iterator!"); - if (ByOperand) - advance(); - else if (ByInstr) { - MachineInstr *P = Op->getParent(); - do { - advance(); - } while (Op && Op->getParent() == P); - } else if (ByBundle) { - MachineInstr &P = getBundleStart(*Op->getParent()); - do { - advance(); - } while (Op && &getBundleStart(*Op->getParent()) == &P); - } - - return *this; - } - defusechain_iterator operator++(int) { // Postincrement - defusechain_iterator tmp = *this; ++*this; return tmp; - } - - /// getOperandNo - Return the operand # of this MachineOperand in its - /// MachineInstr. - unsigned getOperandNo() const { - assert(Op && "Cannot dereference end iterator!"); - return Op - &Op->getParent()->getOperand(0); - } - - // Retrieve a reference to the current operand. - MachineOperand &operator*() const { - assert(Op && "Cannot dereference end iterator!"); - return *Op; - } - - MachineOperand *operator->() const { - assert(Op && "Cannot dereference end iterator!"); - return Op; - } - }; - - /// defusechain_iterator - This class provides iterator support for machine - /// operands in the function that use or define a specific register. If - /// ReturnUses is true it returns uses of registers, if ReturnDefs is true it - /// returns defs. If neither are true then you are silly and it always - /// returns end(). If SkipDebug is true it skips uses marked Debug - /// when incrementing. - template - class defusechain_instr_iterator - : public std::iterator { - MachineOperand *Op; - explicit defusechain_instr_iterator(MachineOperand *op) : Op(op) { - // If the first node isn't one we're interested in, advance to one that - // we are interested in. - if (op) { - if ((!ReturnUses && op->isUse()) || - (!ReturnDefs && op->isDef()) || - (SkipDebug && op->isDebug())) - advance(); - } - } - friend class MachineRegisterInfo; - - void advance() { - assert(Op && "Cannot increment end iterator!"); - Op = getNextOperandForReg(Op); - - // All defs come before the uses, so stop def_iterator early. - if (!ReturnUses) { - if (Op) { - if (Op->isUse()) - Op = nullptr; - else - assert(!Op->isDebug() && "Can't have debug defs"); - } - } else { - // If this is an operand we don't care about, skip it. - while (Op && ((!ReturnDefs && Op->isDef()) || - (SkipDebug && Op->isDebug()))) - Op = getNextOperandForReg(Op); - } - } - public: - typedef std::iterator::reference reference; - typedef std::iterator::pointer pointer; - - defusechain_instr_iterator() : Op(nullptr) {} - - bool operator==(const defusechain_instr_iterator &x) const { - return Op == x.Op; - } - bool operator!=(const defusechain_instr_iterator &x) const { - return !operator==(x); - } - - /// atEnd - return true if this iterator is equal to reg_end() on the value. - bool atEnd() const { return Op == nullptr; } - - // Iterator traversal: forward iteration only - defusechain_instr_iterator &operator++() { // Preincrement - assert(Op && "Cannot increment end iterator!"); - if (ByOperand) - advance(); - else if (ByInstr) { - MachineInstr *P = Op->getParent(); - do { - advance(); - } while (Op && Op->getParent() == P); - } else if (ByBundle) { - MachineInstr &P = getBundleStart(*Op->getParent()); - do { - advance(); - } while (Op && &getBundleStart(*Op->getParent()) == &P); - } - - return *this; - } - defusechain_instr_iterator operator++(int) { // Postincrement - defusechain_instr_iterator tmp = *this; ++*this; return tmp; - } - - // Retrieve a reference to the current operand. - MachineInstr &operator*() const { - assert(Op && "Cannot dereference end iterator!"); - if (ByBundle) - return getBundleStart(*Op->getParent()); - return *Op->getParent(); - } - - MachineInstr *operator->() const { return &operator*(); } - }; -}; - -/// Iterate over the pressure sets affected by the given physical or virtual -/// register. If Reg is physical, it must be a register unit (from -/// MCRegUnitIterator). -class PSetIterator { - const int *PSet; - unsigned Weight; -public: - PSetIterator(): PSet(nullptr), Weight(0) {} - PSetIterator(unsigned RegUnit, const MachineRegisterInfo *MRI) { - const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo(); - if (TargetRegisterInfo::isVirtualRegister(RegUnit)) { - const TargetRegisterClass *RC = MRI->getRegClass(RegUnit); - PSet = TRI->getRegClassPressureSets(RC); - Weight = TRI->getRegClassWeight(RC).RegWeight; - } - else { - PSet = TRI->getRegUnitPressureSets(RegUnit); - Weight = TRI->getRegUnitWeight(RegUnit); - } - if (*PSet == -1) - PSet = nullptr; - } - bool isValid() const { return PSet; } - - unsigned getWeight() const { return Weight; } - - unsigned operator*() const { return *PSet; } - - void operator++() { - assert(isValid() && "Invalid PSetIterator."); - ++PSet; - if (*PSet == -1) - PSet = nullptr; - } -}; - -inline PSetIterator MachineRegisterInfo:: -getPressureSets(unsigned RegUnit) const { - return PSetIterator(RegUnit, this); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineSSAUpdater.h b/llvm/include/llvm/CodeGen/MachineSSAUpdater.h deleted file mode 100644 index 50a7d90b..00000000 --- a/llvm/include/llvm/CodeGen/MachineSSAUpdater.h +++ /dev/null @@ -1,115 +0,0 @@ -//===-- MachineSSAUpdater.h - Unstructured SSA Update Tool ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MachineSSAUpdater class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINESSAUPDATER_H -#define LLVM_CODEGEN_MACHINESSAUPDATER_H - -#include "llvm/Support/Compiler.h" - -namespace llvm { - class MachineBasicBlock; - class MachineFunction; - class MachineInstr; - class MachineOperand; - class MachineRegisterInfo; - class TargetInstrInfo; - class TargetRegisterClass; - template class SmallVectorImpl; - template class SSAUpdaterTraits; - -/// MachineSSAUpdater - This class updates SSA form for a set of virtual -/// registers defined in multiple blocks. This is used when code duplication -/// or another unstructured transformation wants to rewrite a set of uses of one -/// vreg with uses of a set of vregs. -class MachineSSAUpdater { - friend class SSAUpdaterTraits; - -private: - /// AvailableVals - This keeps track of which value to use on a per-block - /// basis. When we insert PHI nodes, we keep track of them here. - //typedef DenseMap AvailableValsTy; - void *AV; - - /// VR - Current virtual register whose uses are being updated. - unsigned VR; - - /// VRC - Register class of the current virtual register. - const TargetRegisterClass *VRC; - - /// InsertedPHIs - If this is non-null, the MachineSSAUpdater adds all PHI - /// nodes that it creates to the vector. - SmallVectorImpl *InsertedPHIs; - - const TargetInstrInfo *TII; - MachineRegisterInfo *MRI; -public: - /// MachineSSAUpdater constructor. If InsertedPHIs is specified, it will be - /// filled in with all PHI Nodes created by rewriting. - explicit MachineSSAUpdater(MachineFunction &MF, - SmallVectorImpl *InsertedPHIs = nullptr); - ~MachineSSAUpdater(); - - /// Initialize - Reset this object to get ready for a new set of SSA - /// updates. - void Initialize(unsigned V); - - /// AddAvailableValue - Indicate that a rewritten value is available at the - /// end of the specified block with the specified value. - void AddAvailableValue(MachineBasicBlock *BB, unsigned V); - - /// HasValueForBlock - Return true if the MachineSSAUpdater already has a - /// value for the specified block. - bool HasValueForBlock(MachineBasicBlock *BB) const; - - /// GetValueAtEndOfBlock - Construct SSA form, materializing a value that is - /// live at the end of the specified block. - unsigned GetValueAtEndOfBlock(MachineBasicBlock *BB); - - /// GetValueInMiddleOfBlock - Construct SSA form, materializing a value that - /// is live in the middle of the specified block. - /// - /// GetValueInMiddleOfBlock is the same as GetValueAtEndOfBlock except in one - /// important case: if there is a definition of the rewritten value after the - /// 'use' in BB. Consider code like this: - /// - /// X1 = ... - /// SomeBB: - /// use(X) - /// X2 = ... - /// br Cond, SomeBB, OutBB - /// - /// In this case, there are two values (X1 and X2) added to the AvailableVals - /// set by the client of the rewriter, and those values are both live out of - /// their respective blocks. However, the use of X happens in the *middle* of - /// a block. Because of this, we need to insert a new PHI node in SomeBB to - /// merge the appropriate values, and this value isn't live out of the block. - /// - unsigned GetValueInMiddleOfBlock(MachineBasicBlock *BB); - - /// RewriteUse - Rewrite a use of the symbolic value. This handles PHI nodes, - /// which use their value in the corresponding predecessor. Note that this - /// will not work if the use is supposed to be rewritten to a value defined in - /// the same block as the use, but above it. Any 'AddAvailableValue's added - /// for the use's block will be considered to be below it. - void RewriteUse(MachineOperand &U); - -private: - unsigned GetValueAtEndOfBlockInternal(MachineBasicBlock *BB); - - void operator=(const MachineSSAUpdater&) = delete; - MachineSSAUpdater(const MachineSSAUpdater&) = delete; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineScheduler.h b/llvm/include/llvm/CodeGen/MachineScheduler.h deleted file mode 100644 index 06e99217..00000000 --- a/llvm/include/llvm/CodeGen/MachineScheduler.h +++ /dev/null @@ -1,1002 +0,0 @@ -//==- MachineScheduler.h - MachineInstr Scheduling Pass ----------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides an interface for customizing the standard MachineScheduler -// pass. Note that the entire pass may be replaced as follows: -// -// TargetMachine::createPassConfig(PassManagerBase &PM) { -// PM.substitutePass(&MachineSchedulerID, &CustomSchedulerPassID); -// ...} -// -// The MachineScheduler pass is only responsible for choosing the regions to be -// scheduled. Targets can override the DAG builder and scheduler without -// replacing the pass as follows: -// -// ScheduleDAGInstrs *PassConfig:: -// createMachineScheduler(MachineSchedContext *C) { -// return new CustomMachineScheduler(C); -// } -// -// The default scheduler, ScheduleDAGMILive, builds the DAG and drives list -// scheduling while updating the instruction stream, register pressure, and live -// intervals. Most targets don't need to override the DAG builder and list -// schedulier, but subtargets that require custom scheduling heuristics may -// plugin an alternate MachineSchedStrategy. The strategy is responsible for -// selecting the highest priority node from the list: -// -// ScheduleDAGInstrs *PassConfig:: -// createMachineScheduler(MachineSchedContext *C) { -// return new ScheduleDAGMI(C, CustomStrategy(C)); -// } -// -// The DAG builder can also be customized in a sense by adding DAG mutations -// that will run after DAG building and before list scheduling. DAG mutations -// can adjust dependencies based on target-specific knowledge or add weak edges -// to aid heuristics: -// -// ScheduleDAGInstrs *PassConfig:: -// createMachineScheduler(MachineSchedContext *C) { -// ScheduleDAGMI *DAG = new ScheduleDAGMI(C, CustomStrategy(C)); -// DAG->addMutation(new CustomDependencies(DAG->TII, DAG->TRI)); -// return DAG; -// } -// -// A target that supports alternative schedulers can use the -// MachineSchedRegistry to allow command line selection. This can be done by -// implementing the following boilerplate: -// -// static ScheduleDAGInstrs *createCustomMachineSched(MachineSchedContext *C) { -// return new CustomMachineScheduler(C); -// } -// static MachineSchedRegistry -// SchedCustomRegistry("custom", "Run my target's custom scheduler", -// createCustomMachineSched); -// -// -// Finally, subtargets that don't need to implement custom heuristics but would -// like to configure the GenericScheduler's policy for a given scheduler region, -// including scheduling direction and register pressure tracking policy, can do -// this: -// -// void Subtarget:: -// overrideSchedPolicy(MachineSchedPolicy &Policy, -// unsigned NumRegionInstrs) const { -// Policy. = true; -// } -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINESCHEDULER_H -#define LLVM_CODEGEN_MACHINESCHEDULER_H - -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/CodeGen/MachinePassRegistry.h" -#include "llvm/CodeGen/RegisterPressure.h" -#include "llvm/CodeGen/ScheduleDAGInstrs.h" -#include "llvm/CodeGen/ScheduleDAGMutation.h" -#include - -namespace llvm { - -extern cl::opt ForceTopDown; -extern cl::opt ForceBottomUp; - -class LiveIntervals; -class MachineDominatorTree; -class MachineLoopInfo; -class RegisterClassInfo; -class ScheduleDAGInstrs; -class SchedDFSResult; -class ScheduleHazardRecognizer; - -/// MachineSchedContext provides enough context from the MachineScheduler pass -/// for the target to instantiate a scheduler. -struct MachineSchedContext { - MachineFunction *MF; - const MachineLoopInfo *MLI; - const MachineDominatorTree *MDT; - const TargetPassConfig *PassConfig; - AliasAnalysis *AA; - LiveIntervals *LIS; - - RegisterClassInfo *RegClassInfo; - - MachineSchedContext(); - virtual ~MachineSchedContext(); -}; - -/// MachineSchedRegistry provides a selection of available machine instruction -/// schedulers. -class MachineSchedRegistry : public MachinePassRegistryNode { -public: - typedef ScheduleDAGInstrs *(*ScheduleDAGCtor)(MachineSchedContext *); - - // RegisterPassParser requires a (misnamed) FunctionPassCtor type. - typedef ScheduleDAGCtor FunctionPassCtor; - - static MachinePassRegistry Registry; - - MachineSchedRegistry(const char *N, const char *D, ScheduleDAGCtor C) - : MachinePassRegistryNode(N, D, (MachinePassCtor)C) { - Registry.Add(this); - } - ~MachineSchedRegistry() { Registry.Remove(this); } - - // Accessors. - // - MachineSchedRegistry *getNext() const { - return (MachineSchedRegistry *)MachinePassRegistryNode::getNext(); - } - static MachineSchedRegistry *getList() { - return (MachineSchedRegistry *)Registry.getList(); - } - static void setListener(MachinePassRegistryListener *L) { - Registry.setListener(L); - } -}; - -class ScheduleDAGMI; - -/// Define a generic scheduling policy for targets that don't provide their own -/// MachineSchedStrategy. This can be overriden for each scheduling region -/// before building the DAG. -struct MachineSchedPolicy { - // Allow the scheduler to disable register pressure tracking. - bool ShouldTrackPressure; - /// Track LaneMasks to allow reordering of independent subregister writes - /// of the same vreg. \sa MachineSchedStrategy::shouldTrackLaneMasks() - bool ShouldTrackLaneMasks; - - // Allow the scheduler to force top-down or bottom-up scheduling. If neither - // is true, the scheduler runs in both directions and converges. - bool OnlyTopDown; - bool OnlyBottomUp; - - // Disable heuristic that tries to fetch nodes from long dependency chains - // first. - bool DisableLatencyHeuristic; - - MachineSchedPolicy(): ShouldTrackPressure(false), ShouldTrackLaneMasks(false), - OnlyTopDown(false), OnlyBottomUp(false), DisableLatencyHeuristic(false) {} -}; - -/// MachineSchedStrategy - Interface to the scheduling algorithm used by -/// ScheduleDAGMI. -/// -/// Initialization sequence: -/// initPolicy -> shouldTrackPressure -> initialize(DAG) -> registerRoots -class MachineSchedStrategy { - virtual void anchor(); -public: - virtual ~MachineSchedStrategy() {} - - /// Optionally override the per-region scheduling policy. - virtual void initPolicy(MachineBasicBlock::iterator Begin, - MachineBasicBlock::iterator End, - unsigned NumRegionInstrs) {} - - virtual void dumpPolicy() {} - - /// Check if pressure tracking is needed before building the DAG and - /// initializing this strategy. Called after initPolicy. - virtual bool shouldTrackPressure() const { return true; } - - /// Returns true if lanemasks should be tracked. LaneMask tracking is - /// necessary to reorder independent subregister defs for the same vreg. - /// This has to be enabled in combination with shouldTrackPressure(). - virtual bool shouldTrackLaneMasks() const { return false; } - - /// Initialize the strategy after building the DAG for a new region. - virtual void initialize(ScheduleDAGMI *DAG) = 0; - - /// Notify this strategy that all roots have been released (including those - /// that depend on EntrySU or ExitSU). - virtual void registerRoots() {} - - /// Pick the next node to schedule, or return NULL. Set IsTopNode to true to - /// schedule the node at the top of the unscheduled region. Otherwise it will - /// be scheduled at the bottom. - virtual SUnit *pickNode(bool &IsTopNode) = 0; - - /// \brief Scheduler callback to notify that a new subtree is scheduled. - virtual void scheduleTree(unsigned SubtreeID) {} - - /// Notify MachineSchedStrategy that ScheduleDAGMI has scheduled an - /// instruction and updated scheduled/remaining flags in the DAG nodes. - virtual void schedNode(SUnit *SU, bool IsTopNode) = 0; - - /// When all predecessor dependencies have been resolved, free this node for - /// top-down scheduling. - virtual void releaseTopNode(SUnit *SU) = 0; - /// When all successor dependencies have been resolved, free this node for - /// bottom-up scheduling. - virtual void releaseBottomNode(SUnit *SU) = 0; -}; - -/// ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply -/// schedules machine instructions according to the given MachineSchedStrategy -/// without much extra book-keeping. This is the common functionality between -/// PreRA and PostRA MachineScheduler. -class ScheduleDAGMI : public ScheduleDAGInstrs { -protected: - AliasAnalysis *AA; - LiveIntervals *LIS; - std::unique_ptr SchedImpl; - - /// Topo - A topological ordering for SUnits which permits fast IsReachable - /// and similar queries. - ScheduleDAGTopologicalSort Topo; - - /// Ordered list of DAG postprocessing steps. - std::vector> Mutations; - - /// The top of the unscheduled zone. - MachineBasicBlock::iterator CurrentTop; - - /// The bottom of the unscheduled zone. - MachineBasicBlock::iterator CurrentBottom; - - /// Record the next node in a scheduled cluster. - const SUnit *NextClusterPred; - const SUnit *NextClusterSucc; - -#ifndef NDEBUG - /// The number of instructions scheduled so far. Used to cut off the - /// scheduler at the point determined by misched-cutoff. - unsigned NumInstrsScheduled; -#endif -public: - ScheduleDAGMI(MachineSchedContext *C, std::unique_ptr S, - bool RemoveKillFlags) - : ScheduleDAGInstrs(*C->MF, C->MLI, RemoveKillFlags), AA(C->AA), - LIS(C->LIS), SchedImpl(std::move(S)), Topo(SUnits, &ExitSU), - CurrentTop(), CurrentBottom(), NextClusterPred(nullptr), - NextClusterSucc(nullptr) { -#ifndef NDEBUG - NumInstrsScheduled = 0; -#endif - } - - // Provide a vtable anchor - ~ScheduleDAGMI() override; - - // Returns LiveIntervals instance for use in DAG mutators and such. - LiveIntervals *getLIS() const { return LIS; } - - /// Return true if this DAG supports VReg liveness and RegPressure. - virtual bool hasVRegLiveness() const { return false; } - - /// Add a postprocessing step to the DAG builder. - /// Mutations are applied in the order that they are added after normal DAG - /// building and before MachineSchedStrategy initialization. - /// - /// ScheduleDAGMI takes ownership of the Mutation object. - void addMutation(std::unique_ptr Mutation) { - Mutations.push_back(std::move(Mutation)); - } - - /// \brief True if an edge can be added from PredSU to SuccSU without creating - /// a cycle. - bool canAddEdge(SUnit *SuccSU, SUnit *PredSU); - - /// \brief Add a DAG edge to the given SU with the given predecessor - /// dependence data. - /// - /// \returns true if the edge may be added without creating a cycle OR if an - /// equivalent edge already existed (false indicates failure). - bool addEdge(SUnit *SuccSU, const SDep &PredDep); - - MachineBasicBlock::iterator top() const { return CurrentTop; } - MachineBasicBlock::iterator bottom() const { return CurrentBottom; } - - /// Implement the ScheduleDAGInstrs interface for handling the next scheduling - /// region. This covers all instructions in a block, while schedule() may only - /// cover a subset. - void enterRegion(MachineBasicBlock *bb, - MachineBasicBlock::iterator begin, - MachineBasicBlock::iterator end, - unsigned regioninstrs) override; - - /// Implement ScheduleDAGInstrs interface for scheduling a sequence of - /// reorderable instructions. - void schedule() override; - - /// Change the position of an instruction within the basic block and update - /// live ranges and region boundary iterators. - void moveInstruction(MachineInstr *MI, MachineBasicBlock::iterator InsertPos); - - const SUnit *getNextClusterPred() const { return NextClusterPred; } - - const SUnit *getNextClusterSucc() const { return NextClusterSucc; } - - void viewGraph(const Twine &Name, const Twine &Title) override; - void viewGraph() override; - -protected: - // Top-Level entry points for the schedule() driver... - - /// Apply each ScheduleDAGMutation step in order. This allows different - /// instances of ScheduleDAGMI to perform custom DAG postprocessing. - void postprocessDAG(); - - /// Release ExitSU predecessors and setup scheduler queues. - void initQueues(ArrayRef TopRoots, ArrayRef BotRoots); - - /// Update scheduler DAG and queues after scheduling an instruction. - void updateQueues(SUnit *SU, bool IsTopNode); - - /// Reinsert debug_values recorded in ScheduleDAGInstrs::DbgValues. - void placeDebugValues(); - - /// \brief dump the scheduled Sequence. - void dumpSchedule() const; - - // Lesser helpers... - bool checkSchedLimit(); - - void findRootsAndBiasEdges(SmallVectorImpl &TopRoots, - SmallVectorImpl &BotRoots); - - void releaseSucc(SUnit *SU, SDep *SuccEdge); - void releaseSuccessors(SUnit *SU); - void releasePred(SUnit *SU, SDep *PredEdge); - void releasePredecessors(SUnit *SU); -}; - -/// ScheduleDAGMILive is an implementation of ScheduleDAGInstrs that schedules -/// machine instructions while updating LiveIntervals and tracking regpressure. -class ScheduleDAGMILive : public ScheduleDAGMI { -protected: - RegisterClassInfo *RegClassInfo; - - /// Information about DAG subtrees. If DFSResult is NULL, then SchedulerTrees - /// will be empty. - SchedDFSResult *DFSResult; - BitVector ScheduledTrees; - - MachineBasicBlock::iterator LiveRegionEnd; - - // Map each SU to its summary of pressure changes. This array is updated for - // liveness during bottom-up scheduling. Top-down scheduling may proceed but - // has no affect on the pressure diffs. - PressureDiffs SUPressureDiffs; - - /// Register pressure in this region computed by initRegPressure. - bool ShouldTrackPressure; - bool ShouldTrackLaneMasks; - IntervalPressure RegPressure; - RegPressureTracker RPTracker; - - /// List of pressure sets that exceed the target's pressure limit before - /// scheduling, listed in increasing set ID order. Each pressure set is paired - /// with its max pressure in the currently scheduled regions. - std::vector RegionCriticalPSets; - - /// The top of the unscheduled zone. - IntervalPressure TopPressure; - RegPressureTracker TopRPTracker; - - /// The bottom of the unscheduled zone. - IntervalPressure BotPressure; - RegPressureTracker BotRPTracker; - - /// True if disconnected subregister components are already renamed. - /// The renaming is only done on demand if lane masks are tracked. - bool DisconnectedComponentsRenamed; - -public: - ScheduleDAGMILive(MachineSchedContext *C, - std::unique_ptr S) - : ScheduleDAGMI(C, std::move(S), /*RemoveKillFlags=*/false), - RegClassInfo(C->RegClassInfo), DFSResult(nullptr), - ShouldTrackPressure(false), ShouldTrackLaneMasks(false), - RPTracker(RegPressure), TopRPTracker(TopPressure), - BotRPTracker(BotPressure), DisconnectedComponentsRenamed(false) {} - - ~ScheduleDAGMILive() override; - - /// Return true if this DAG supports VReg liveness and RegPressure. - bool hasVRegLiveness() const override { return true; } - - /// \brief Return true if register pressure tracking is enabled. - bool isTrackingPressure() const { return ShouldTrackPressure; } - - /// Get current register pressure for the top scheduled instructions. - const IntervalPressure &getTopPressure() const { return TopPressure; } - const RegPressureTracker &getTopRPTracker() const { return TopRPTracker; } - - /// Get current register pressure for the bottom scheduled instructions. - const IntervalPressure &getBotPressure() const { return BotPressure; } - const RegPressureTracker &getBotRPTracker() const { return BotRPTracker; } - - /// Get register pressure for the entire scheduling region before scheduling. - const IntervalPressure &getRegPressure() const { return RegPressure; } - - const std::vector &getRegionCriticalPSets() const { - return RegionCriticalPSets; - } - - PressureDiff &getPressureDiff(const SUnit *SU) { - return SUPressureDiffs[SU->NodeNum]; - } - - /// Compute a DFSResult after DAG building is complete, and before any - /// queue comparisons. - void computeDFSResult(); - - /// Return a non-null DFS result if the scheduling strategy initialized it. - const SchedDFSResult *getDFSResult() const { return DFSResult; } - - BitVector &getScheduledTrees() { return ScheduledTrees; } - - /// Implement the ScheduleDAGInstrs interface for handling the next scheduling - /// region. This covers all instructions in a block, while schedule() may only - /// cover a subset. - void enterRegion(MachineBasicBlock *bb, - MachineBasicBlock::iterator begin, - MachineBasicBlock::iterator end, - unsigned regioninstrs) override; - - /// Implement ScheduleDAGInstrs interface for scheduling a sequence of - /// reorderable instructions. - void schedule() override; - - /// Compute the cyclic critical path through the DAG. - unsigned computeCyclicCriticalPath(); - -protected: - // Top-Level entry points for the schedule() driver... - - /// Call ScheduleDAGInstrs::buildSchedGraph with register pressure tracking - /// enabled. This sets up three trackers. RPTracker will cover the entire DAG - /// region, TopTracker and BottomTracker will be initialized to the top and - /// bottom of the DAG region without covereing any unscheduled instruction. - void buildDAGWithRegPressure(); - - /// Release ExitSU predecessors and setup scheduler queues. Re-position - /// the Top RP tracker in case the region beginning has changed. - void initQueues(ArrayRef TopRoots, ArrayRef BotRoots); - - /// Move an instruction and update register pressure. - void scheduleMI(SUnit *SU, bool IsTopNode); - - // Lesser helpers... - - void initRegPressure(); - - void updatePressureDiffs(ArrayRef LiveUses); - - void updateScheduledPressure(const SUnit *SU, - const std::vector &NewMaxPressure); -}; - -//===----------------------------------------------------------------------===// -/// -/// Helpers for implementing custom MachineSchedStrategy classes. These take -/// care of the book-keeping associated with list scheduling heuristics. -/// -//===----------------------------------------------------------------------===// - -/// ReadyQueue encapsulates vector of "ready" SUnits with basic convenience -/// methods for pushing and removing nodes. ReadyQueue's are uniquely identified -/// by an ID. SUnit::NodeQueueId is a mask of the ReadyQueues the SUnit is in. -/// -/// This is a convenience class that may be used by implementations of -/// MachineSchedStrategy. -class ReadyQueue { - unsigned ID; - std::string Name; - std::vector Queue; - -public: - ReadyQueue(unsigned id, const Twine &name): ID(id), Name(name.str()) {} - - unsigned getID() const { return ID; } - - StringRef getName() const { return Name; } - - // SU is in this queue if it's NodeQueueID is a superset of this ID. - bool isInQueue(SUnit *SU) const { return (SU->NodeQueueId & ID); } - - bool empty() const { return Queue.empty(); } - - void clear() { Queue.clear(); } - - unsigned size() const { return Queue.size(); } - - typedef std::vector::iterator iterator; - - iterator begin() { return Queue.begin(); } - - iterator end() { return Queue.end(); } - - ArrayRef elements() { return Queue; } - - iterator find(SUnit *SU) { - return std::find(Queue.begin(), Queue.end(), SU); - } - - void push(SUnit *SU) { - Queue.push_back(SU); - SU->NodeQueueId |= ID; - } - - iterator remove(iterator I) { - (*I)->NodeQueueId &= ~ID; - *I = Queue.back(); - unsigned idx = I - Queue.begin(); - Queue.pop_back(); - return Queue.begin() + idx; - } - - void dump(); -}; - -/// Summarize the unscheduled region. -struct SchedRemainder { - // Critical path through the DAG in expected latency. - unsigned CriticalPath; - unsigned CyclicCritPath; - - // Scaled count of micro-ops left to schedule. - unsigned RemIssueCount; - - bool IsAcyclicLatencyLimited; - - // Unscheduled resources - SmallVector RemainingCounts; - - void reset() { - CriticalPath = 0; - CyclicCritPath = 0; - RemIssueCount = 0; - IsAcyclicLatencyLimited = false; - RemainingCounts.clear(); - } - - SchedRemainder() { reset(); } - - void init(ScheduleDAGMI *DAG, const TargetSchedModel *SchedModel); -}; - -/// Each Scheduling boundary is associated with ready queues. It tracks the -/// current cycle in the direction of movement, and maintains the state -/// of "hazards" and other interlocks at the current cycle. -class SchedBoundary { -public: - /// SUnit::NodeQueueId: 0 (none), 1 (top), 2 (bot), 3 (both) - enum { - TopQID = 1, - BotQID = 2, - LogMaxQID = 2 - }; - - ScheduleDAGMI *DAG; - const TargetSchedModel *SchedModel; - SchedRemainder *Rem; - - ReadyQueue Available; - ReadyQueue Pending; - - ScheduleHazardRecognizer *HazardRec; - -private: - /// True if the pending Q should be checked/updated before scheduling another - /// instruction. - bool CheckPending; - - // For heuristics, keep a list of the nodes that immediately depend on the - // most recently scheduled node. - SmallPtrSet NextSUs; - - /// Number of cycles it takes to issue the instructions scheduled in this - /// zone. It is defined as: scheduled-micro-ops / issue-width + stalls. - /// See getStalls(). - unsigned CurrCycle; - - /// Micro-ops issued in the current cycle - unsigned CurrMOps; - - /// MinReadyCycle - Cycle of the soonest available instruction. - unsigned MinReadyCycle; - - // The expected latency of the critical path in this scheduled zone. - unsigned ExpectedLatency; - - // The latency of dependence chains leading into this zone. - // For each node scheduled bottom-up: DLat = max DLat, N.Depth. - // For each cycle scheduled: DLat -= 1. - unsigned DependentLatency; - - /// Count the scheduled (issued) micro-ops that can be retired by - /// time=CurrCycle assuming the first scheduled instr is retired at time=0. - unsigned RetiredMOps; - - // Count scheduled resources that have been executed. Resources are - // considered executed if they become ready in the time that it takes to - // saturate any resource including the one in question. Counts are scaled - // for direct comparison with other resources. Counts can be compared with - // MOps * getMicroOpFactor and Latency * getLatencyFactor. - SmallVector ExecutedResCounts; - - /// Cache the max count for a single resource. - unsigned MaxExecutedResCount; - - // Cache the critical resources ID in this scheduled zone. - unsigned ZoneCritResIdx; - - // Is the scheduled region resource limited vs. latency limited. - bool IsResourceLimited; - - // Record the highest cycle at which each resource has been reserved by a - // scheduled instruction. - SmallVector ReservedCycles; - -#ifndef NDEBUG - // Remember the greatest possible stall as an upper bound on the number of - // times we should retry the pending queue because of a hazard. - unsigned MaxObservedStall; -#endif - -public: - /// Pending queues extend the ready queues with the same ID and the - /// PendingFlag set. - SchedBoundary(unsigned ID, const Twine &Name): - DAG(nullptr), SchedModel(nullptr), Rem(nullptr), Available(ID, Name+".A"), - Pending(ID << LogMaxQID, Name+".P"), - HazardRec(nullptr) { - reset(); - } - - ~SchedBoundary(); - - void reset(); - - void init(ScheduleDAGMI *dag, const TargetSchedModel *smodel, - SchedRemainder *rem); - - bool isTop() const { - return Available.getID() == TopQID; - } - - /// Number of cycles to issue the instructions scheduled in this zone. - unsigned getCurrCycle() const { return CurrCycle; } - - /// Micro-ops issued in the current cycle - unsigned getCurrMOps() const { return CurrMOps; } - - /// Return true if the given SU is used by the most recently scheduled - /// instruction. - bool isNextSU(const SUnit *SU) const { return NextSUs.count(SU); } - - // The latency of dependence chains leading into this zone. - unsigned getDependentLatency() const { return DependentLatency; } - - /// Get the number of latency cycles "covered" by the scheduled - /// instructions. This is the larger of the critical path within the zone - /// and the number of cycles required to issue the instructions. - unsigned getScheduledLatency() const { - return std::max(ExpectedLatency, CurrCycle); - } - - unsigned getUnscheduledLatency(SUnit *SU) const { - return isTop() ? SU->getHeight() : SU->getDepth(); - } - - unsigned getResourceCount(unsigned ResIdx) const { - return ExecutedResCounts[ResIdx]; - } - - /// Get the scaled count of scheduled micro-ops and resources, including - /// executed resources. - unsigned getCriticalCount() const { - if (!ZoneCritResIdx) - return RetiredMOps * SchedModel->getMicroOpFactor(); - return getResourceCount(ZoneCritResIdx); - } - - /// Get a scaled count for the minimum execution time of the scheduled - /// micro-ops that are ready to execute by getExecutedCount. Notice the - /// feedback loop. - unsigned getExecutedCount() const { - return std::max(CurrCycle * SchedModel->getLatencyFactor(), - MaxExecutedResCount); - } - - unsigned getZoneCritResIdx() const { return ZoneCritResIdx; } - - // Is the scheduled region resource limited vs. latency limited. - bool isResourceLimited() const { return IsResourceLimited; } - - /// Get the difference between the given SUnit's ready time and the current - /// cycle. - unsigned getLatencyStallCycles(SUnit *SU); - - unsigned getNextResourceCycle(unsigned PIdx, unsigned Cycles); - - bool checkHazard(SUnit *SU); - - unsigned findMaxLatency(ArrayRef ReadySUs); - - unsigned getOtherResourceCount(unsigned &OtherCritIdx); - - void releaseNode(SUnit *SU, unsigned ReadyCycle); - - void releaseTopNode(SUnit *SU); - - void releaseBottomNode(SUnit *SU); - - void bumpCycle(unsigned NextCycle); - - void incExecutedResources(unsigned PIdx, unsigned Count); - - unsigned countResource(unsigned PIdx, unsigned Cycles, unsigned ReadyCycle); - - void bumpNode(SUnit *SU); - - void releasePending(); - - void removeReady(SUnit *SU); - - /// Call this before applying any other heuristics to the Available queue. - /// Updates the Available/Pending Q's if necessary and returns the single - /// available instruction, or NULL if there are multiple candidates. - SUnit *pickOnlyChoice(); - -#ifndef NDEBUG - void dumpScheduledState(); -#endif -}; - -/// Base class for GenericScheduler. This class maintains information about -/// scheduling candidates based on TargetSchedModel making it easy to implement -/// heuristics for either preRA or postRA scheduling. -class GenericSchedulerBase : public MachineSchedStrategy { -public: - /// Represent the type of SchedCandidate found within a single queue. - /// pickNodeBidirectional depends on these listed by decreasing priority. - enum CandReason : uint8_t { - NoCand, Only1, PhysRegCopy, RegExcess, RegCritical, Stall, Cluster, Weak, - RegMax, ResourceReduce, ResourceDemand, BotHeightReduce, BotPathReduce, - TopDepthReduce, TopPathReduce, NextDefUse, NodeOrder}; - -#ifndef NDEBUG - static const char *getReasonStr(GenericSchedulerBase::CandReason Reason); -#endif - - /// Policy for scheduling the next instruction in the candidate's zone. - struct CandPolicy { - bool ReduceLatency; - unsigned ReduceResIdx; - unsigned DemandResIdx; - - CandPolicy(): ReduceLatency(false), ReduceResIdx(0), DemandResIdx(0) {} - - bool operator==(const CandPolicy &RHS) const { - return ReduceLatency == RHS.ReduceLatency && - ReduceResIdx == RHS.ReduceResIdx && - DemandResIdx == RHS.DemandResIdx; - } - bool operator!=(const CandPolicy &RHS) const { - return !(*this == RHS); - } - }; - - /// Status of an instruction's critical resource consumption. - struct SchedResourceDelta { - // Count critical resources in the scheduled region required by SU. - unsigned CritResources; - - // Count critical resources from another region consumed by SU. - unsigned DemandedResources; - - SchedResourceDelta(): CritResources(0), DemandedResources(0) {} - - bool operator==(const SchedResourceDelta &RHS) const { - return CritResources == RHS.CritResources - && DemandedResources == RHS.DemandedResources; - } - bool operator!=(const SchedResourceDelta &RHS) const { - return !operator==(RHS); - } - }; - - /// Store the state used by GenericScheduler heuristics, required for the - /// lifetime of one invocation of pickNode(). - struct SchedCandidate { - CandPolicy Policy; - - // The best SUnit candidate. - SUnit *SU; - - // The reason for this candidate. - CandReason Reason; - - // Whether this candidate should be scheduled at top/bottom. - bool AtTop; - - // Register pressure values for the best candidate. - RegPressureDelta RPDelta; - - // Critical resource consumption of the best candidate. - SchedResourceDelta ResDelta; - - SchedCandidate() { reset(CandPolicy()); } - SchedCandidate(const CandPolicy &Policy) { reset(Policy); } - - void reset(const CandPolicy &NewPolicy) { - Policy = NewPolicy; - SU = nullptr; - Reason = NoCand; - AtTop = false; - RPDelta = RegPressureDelta(); - ResDelta = SchedResourceDelta(); - } - - bool isValid() const { return SU; } - - // Copy the status of another candidate without changing policy. - void setBest(SchedCandidate &Best) { - assert(Best.Reason != NoCand && "uninitialized Sched candidate"); - SU = Best.SU; - Reason = Best.Reason; - AtTop = Best.AtTop; - RPDelta = Best.RPDelta; - ResDelta = Best.ResDelta; - } - - void initResourceDelta(const ScheduleDAGMI *DAG, - const TargetSchedModel *SchedModel); - }; - -protected: - const MachineSchedContext *Context; - const TargetSchedModel *SchedModel; - const TargetRegisterInfo *TRI; - - SchedRemainder Rem; -protected: - GenericSchedulerBase(const MachineSchedContext *C): - Context(C), SchedModel(nullptr), TRI(nullptr) {} - - void setPolicy(CandPolicy &Policy, bool IsPostRA, SchedBoundary &CurrZone, - SchedBoundary *OtherZone); - -#ifndef NDEBUG - void traceCandidate(const SchedCandidate &Cand); -#endif -}; - -/// GenericScheduler shrinks the unscheduled zone using heuristics to balance -/// the schedule. -class GenericScheduler : public GenericSchedulerBase { - ScheduleDAGMILive *DAG; - - // State of the top and bottom scheduled instruction boundaries. - SchedBoundary Top; - SchedBoundary Bot; - - /// Candidate last picked from Top boundary. - SchedCandidate TopCand; - /// Candidate last picked from Bot boundary. - SchedCandidate BotCand; - - MachineSchedPolicy RegionPolicy; -public: - GenericScheduler(const MachineSchedContext *C): - GenericSchedulerBase(C), DAG(nullptr), Top(SchedBoundary::TopQID, "TopQ"), - Bot(SchedBoundary::BotQID, "BotQ") {} - - void initPolicy(MachineBasicBlock::iterator Begin, - MachineBasicBlock::iterator End, - unsigned NumRegionInstrs) override; - - void dumpPolicy() override; - - bool shouldTrackPressure() const override { - return RegionPolicy.ShouldTrackPressure; - } - - bool shouldTrackLaneMasks() const override { - return RegionPolicy.ShouldTrackLaneMasks; - } - - void initialize(ScheduleDAGMI *dag) override; - - SUnit *pickNode(bool &IsTopNode) override; - - void schedNode(SUnit *SU, bool IsTopNode) override; - - void releaseTopNode(SUnit *SU) override { - Top.releaseTopNode(SU); - TopCand.SU = nullptr; - } - - void releaseBottomNode(SUnit *SU) override { - Bot.releaseBottomNode(SU); - BotCand.SU = nullptr; - } - - void registerRoots() override; - -protected: - void checkAcyclicLatency(); - - void initCandidate(SchedCandidate &Cand, SUnit *SU, bool AtTop, - const RegPressureTracker &RPTracker, - RegPressureTracker &TempTracker); - - void tryCandidate(SchedCandidate &Cand, - SchedCandidate &TryCand, - SchedBoundary *Zone); - - SUnit *pickNodeBidirectional(bool &IsTopNode); - - void pickNodeFromQueue(SchedBoundary &Zone, - const CandPolicy &ZonePolicy, - const RegPressureTracker &RPTracker, - SchedCandidate &Candidate); - - void reschedulePhysRegCopies(SUnit *SU, bool isTop); -}; - -/// PostGenericScheduler - Interface to the scheduling algorithm used by -/// ScheduleDAGMI. -/// -/// Callbacks from ScheduleDAGMI: -/// initPolicy -> initialize(DAG) -> registerRoots -> pickNode ... -class PostGenericScheduler : public GenericSchedulerBase { - ScheduleDAGMI *DAG; - SchedBoundary Top; - SmallVector BotRoots; -public: - PostGenericScheduler(const MachineSchedContext *C): - GenericSchedulerBase(C), Top(SchedBoundary::TopQID, "TopQ") {} - - ~PostGenericScheduler() override {} - - void initPolicy(MachineBasicBlock::iterator Begin, - MachineBasicBlock::iterator End, - unsigned NumRegionInstrs) override { - /* no configurable policy */ - } - - /// PostRA scheduling does not track pressure. - bool shouldTrackPressure() const override { return false; } - - void initialize(ScheduleDAGMI *Dag) override; - - void registerRoots() override; - - SUnit *pickNode(bool &IsTopNode) override; - - void scheduleTree(unsigned SubtreeID) override { - llvm_unreachable("PostRA scheduler does not support subtree analysis."); - } - - void schedNode(SUnit *SU, bool IsTopNode) override; - - void releaseTopNode(SUnit *SU) override { - Top.releaseTopNode(SU); - } - - // Only called for roots. - void releaseBottomNode(SUnit *SU) override { - BotRoots.push_back(SU); - } - -protected: - void tryCandidate(SchedCandidate &Cand, SchedCandidate &TryCand); - - void pickNodeFromQueue(SchedCandidate &Cand); -}; - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineTraceMetrics.h b/llvm/include/llvm/CodeGen/MachineTraceMetrics.h deleted file mode 100644 index 06db17ab..00000000 --- a/llvm/include/llvm/CodeGen/MachineTraceMetrics.h +++ /dev/null @@ -1,399 +0,0 @@ -//===- lib/CodeGen/MachineTraceMetrics.h - Super-scalar metrics -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the interface for the MachineTraceMetrics analysis pass -// that estimates CPU resource usage and critical data dependency paths through -// preferred traces. This is useful for super-scalar CPUs where execution speed -// can be limited both by data dependencies and by limited execution resources. -// -// Out-of-order CPUs will often be executing instructions from multiple basic -// blocks at the same time. This makes it difficult to estimate the resource -// usage accurately in a single basic block. Resources can be estimated better -// by looking at a trace through the current basic block. -// -// For every block, the MachineTraceMetrics pass will pick a preferred trace -// that passes through the block. The trace is chosen based on loop structure, -// branch probabilities, and resource usage. The intention is to pick likely -// traces that would be the most affected by code transformations. -// -// It is expensive to compute a full arbitrary trace for every block, so to -// save some computations, traces are chosen to be convergent. This means that -// if the traces through basic blocks A and B ever cross when moving away from -// A and B, they never diverge again. This applies in both directions - If the -// traces meet above A and B, they won't diverge when going further back. -// -// Traces tend to align with loops. The trace through a block in an inner loop -// will begin at the loop entry block and end at a back edge. If there are -// nested loops, the trace may begin and end at those instead. -// -// For each trace, we compute the critical path length, which is the number of -// cycles required to execute the trace when execution is limited by data -// dependencies only. We also compute the resource height, which is the number -// of cycles required to execute all instructions in the trace when ignoring -// data dependencies. -// -// Every instruction in the current block has a slack - the number of cycles -// execution of the instruction can be delayed without extending the critical -// path. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINETRACEMETRICS_H -#define LLVM_CODEGEN_MACHINETRACEMETRICS_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineInstr.h" -#include "llvm/CodeGen/TargetSchedule.h" - -namespace llvm { - -class InstrItineraryData; -class MachineBasicBlock; -class MachineInstr; -class MachineLoop; -class MachineLoopInfo; -class MachineRegisterInfo; -class TargetInstrInfo; -class TargetRegisterInfo; -class raw_ostream; - -class MachineTraceMetrics : public MachineFunctionPass { - const MachineFunction *MF; - const TargetInstrInfo *TII; - const TargetRegisterInfo *TRI; - const MachineRegisterInfo *MRI; - const MachineLoopInfo *Loops; - TargetSchedModel SchedModel; - -public: - class Ensemble; - class Trace; - static char ID; - MachineTraceMetrics(); - void getAnalysisUsage(AnalysisUsage&) const override; - bool runOnMachineFunction(MachineFunction&) override; - void releaseMemory() override; - void verifyAnalysis() const override; - - friend class Ensemble; - friend class Trace; - - /// Per-basic block information that doesn't depend on the trace through the - /// block. - struct FixedBlockInfo { - /// The number of non-trivial instructions in the block. - /// Doesn't count PHI and COPY instructions that are likely to be removed. - unsigned InstrCount; - - /// True when the block contains calls. - bool HasCalls; - - FixedBlockInfo() : InstrCount(~0u), HasCalls(false) {} - - /// Returns true when resource information for this block has been computed. - bool hasResources() const { return InstrCount != ~0u; } - - /// Invalidate resource information. - void invalidate() { InstrCount = ~0u; } - }; - - /// Get the fixed resource information about MBB. Compute it on demand. - const FixedBlockInfo *getResources(const MachineBasicBlock*); - - /// Get the scaled number of cycles used per processor resource in MBB. - /// This is an array with SchedModel.getNumProcResourceKinds() entries. - /// The getResources() function above must have been called first. - /// - /// These numbers have already been scaled by SchedModel.getResourceFactor(). - ArrayRef getProcResourceCycles(unsigned MBBNum) const; - - /// A virtual register or regunit required by a basic block or its trace - /// successors. - struct LiveInReg { - /// The virtual register required, or a register unit. - unsigned Reg; - - /// For virtual registers: Minimum height of the defining instruction. - /// For regunits: Height of the highest user in the trace. - unsigned Height; - - LiveInReg(unsigned Reg, unsigned Height = 0) : Reg(Reg), Height(Height) {} - }; - - /// Per-basic block information that relates to a specific trace through the - /// block. Convergent traces means that only one of these is required per - /// block in a trace ensemble. - struct TraceBlockInfo { - /// Trace predecessor, or NULL for the first block in the trace. - /// Valid when hasValidDepth(). - const MachineBasicBlock *Pred; - - /// Trace successor, or NULL for the last block in the trace. - /// Valid when hasValidHeight(). - const MachineBasicBlock *Succ; - - /// The block number of the head of the trace. (When hasValidDepth()). - unsigned Head; - - /// The block number of the tail of the trace. (When hasValidHeight()). - unsigned Tail; - - /// Accumulated number of instructions in the trace above this block. - /// Does not include instructions in this block. - unsigned InstrDepth; - - /// Accumulated number of instructions in the trace below this block. - /// Includes instructions in this block. - unsigned InstrHeight; - - TraceBlockInfo() : - Pred(nullptr), Succ(nullptr), - InstrDepth(~0u), InstrHeight(~0u), - HasValidInstrDepths(false), HasValidInstrHeights(false) {} - - /// Returns true if the depth resources have been computed from the trace - /// above this block. - bool hasValidDepth() const { return InstrDepth != ~0u; } - - /// Returns true if the height resources have been computed from the trace - /// below this block. - bool hasValidHeight() const { return InstrHeight != ~0u; } - - /// Invalidate depth resources when some block above this one has changed. - void invalidateDepth() { InstrDepth = ~0u; HasValidInstrDepths = false; } - - /// Invalidate height resources when a block below this one has changed. - void invalidateHeight() { InstrHeight = ~0u; HasValidInstrHeights = false; } - - /// Assuming that this is a dominator of TBI, determine if it contains - /// useful instruction depths. A dominating block can be above the current - /// trace head, and any dependencies from such a far away dominator are not - /// expected to affect the critical path. - /// - /// Also returns true when TBI == this. - bool isUsefulDominator(const TraceBlockInfo &TBI) const { - // The trace for TBI may not even be calculated yet. - if (!hasValidDepth() || !TBI.hasValidDepth()) - return false; - // Instruction depths are only comparable if the traces share a head. - if (Head != TBI.Head) - return false; - // It is almost always the case that TBI belongs to the same trace as - // this block, but rare convoluted cases involving irreducible control - // flow, a dominator may share a trace head without actually being on the - // same trace as TBI. This is not a big problem as long as it doesn't - // increase the instruction depth. - return HasValidInstrDepths && InstrDepth <= TBI.InstrDepth; - } - - // Data-dependency-related information. Per-instruction depth and height - // are computed from data dependencies in the current trace, using - // itinerary data. - - /// Instruction depths have been computed. This implies hasValidDepth(). - bool HasValidInstrDepths; - - /// Instruction heights have been computed. This implies hasValidHeight(). - bool HasValidInstrHeights; - - /// Critical path length. This is the number of cycles in the longest data - /// dependency chain through the trace. This is only valid when both - /// HasValidInstrDepths and HasValidInstrHeights are set. - unsigned CriticalPath; - - /// Live-in registers. These registers are defined above the current block - /// and used by this block or a block below it. - /// This does not include PHI uses in the current block, but it does - /// include PHI uses in deeper blocks. - SmallVector LiveIns; - - void print(raw_ostream&) const; - }; - - /// InstrCycles represents the cycle height and depth of an instruction in a - /// trace. - struct InstrCycles { - /// Earliest issue cycle as determined by data dependencies and instruction - /// latencies from the beginning of the trace. Data dependencies from - /// before the trace are not included. - unsigned Depth; - - /// Minimum number of cycles from this instruction is issued to the of the - /// trace, as determined by data dependencies and instruction latencies. - unsigned Height; - }; - - /// A trace represents a plausible sequence of executed basic blocks that - /// passes through the current basic block one. The Trace class serves as a - /// handle to internal cached data structures. - class Trace { - Ensemble &TE; - TraceBlockInfo &TBI; - - unsigned getBlockNum() const { return &TBI - &TE.BlockInfo[0]; } - - public: - explicit Trace(Ensemble &te, TraceBlockInfo &tbi) : TE(te), TBI(tbi) {} - void print(raw_ostream&) const; - - /// Compute the total number of instructions in the trace. - unsigned getInstrCount() const { - return TBI.InstrDepth + TBI.InstrHeight; - } - - /// Return the resource depth of the top/bottom of the trace center block. - /// This is the number of cycles required to execute all instructions from - /// the trace head to the trace center block. The resource depth only - /// considers execution resources, it ignores data dependencies. - /// When Bottom is set, instructions in the trace center block are included. - unsigned getResourceDepth(bool Bottom) const; - - /// Return the resource length of the trace. This is the number of cycles - /// required to execute the instructions in the trace if they were all - /// independent, exposing the maximum instruction-level parallelism. - /// - /// Any blocks in Extrablocks are included as if they were part of the - /// trace. Likewise, extra resources required by the specified scheduling - /// classes are included. For the caller to account for extra machine - /// instructions, it must first resolve each instruction's scheduling class. - unsigned getResourceLength( - ArrayRef Extrablocks = None, - ArrayRef ExtraInstrs = None, - ArrayRef RemoveInstrs = None) const; - - /// Return the length of the (data dependency) critical path through the - /// trace. - unsigned getCriticalPath() const { return TBI.CriticalPath; } - - /// Return the depth and height of MI. The depth is only valid for - /// instructions in or above the trace center block. The height is only - /// valid for instructions in or below the trace center block. - InstrCycles getInstrCycles(const MachineInstr &MI) const { - return TE.Cycles.lookup(&MI); - } - - /// Return the slack of MI. This is the number of cycles MI can be delayed - /// before the critical path becomes longer. - /// MI must be an instruction in the trace center block. - unsigned getInstrSlack(const MachineInstr &MI) const; - - /// Return the Depth of a PHI instruction in a trace center block successor. - /// The PHI does not have to be part of the trace. - unsigned getPHIDepth(const MachineInstr &PHI) const; - - /// A dependence is useful if the basic block of the defining instruction - /// is part of the trace of the user instruction. It is assumed that DefMI - /// dominates UseMI (see also isUsefulDominator). - bool isDepInTrace(const MachineInstr &DefMI, - const MachineInstr &UseMI) const; - }; - - /// A trace ensemble is a collection of traces selected using the same - /// strategy, for example 'minimum resource height'. There is one trace for - /// every block in the function. - class Ensemble { - SmallVector BlockInfo; - DenseMap Cycles; - SmallVector ProcResourceDepths; - SmallVector ProcResourceHeights; - friend class Trace; - - void computeTrace(const MachineBasicBlock*); - void computeDepthResources(const MachineBasicBlock*); - void computeHeightResources(const MachineBasicBlock*); - unsigned computeCrossBlockCriticalPath(const TraceBlockInfo&); - void computeInstrDepths(const MachineBasicBlock*); - void computeInstrHeights(const MachineBasicBlock*); - void addLiveIns(const MachineInstr *DefMI, unsigned DefOp, - ArrayRef Trace); - - protected: - MachineTraceMetrics &MTM; - virtual const MachineBasicBlock *pickTracePred(const MachineBasicBlock*) =0; - virtual const MachineBasicBlock *pickTraceSucc(const MachineBasicBlock*) =0; - explicit Ensemble(MachineTraceMetrics*); - const MachineLoop *getLoopFor(const MachineBasicBlock*) const; - const TraceBlockInfo *getDepthResources(const MachineBasicBlock*) const; - const TraceBlockInfo *getHeightResources(const MachineBasicBlock*) const; - ArrayRef getProcResourceDepths(unsigned MBBNum) const; - ArrayRef getProcResourceHeights(unsigned MBBNum) const; - - public: - virtual ~Ensemble(); - virtual const char *getName() const =0; - void print(raw_ostream&) const; - void invalidate(const MachineBasicBlock *MBB); - void verify() const; - - /// Get the trace that passes through MBB. - /// The trace is computed on demand. - Trace getTrace(const MachineBasicBlock *MBB); - }; - - /// Strategies for selecting traces. - enum Strategy { - /// Select the trace through a block that has the fewest instructions. - TS_MinInstrCount, - - TS_NumStrategies - }; - - /// Get the trace ensemble representing the given trace selection strategy. - /// The returned Ensemble object is owned by the MachineTraceMetrics analysis, - /// and valid for the lifetime of the analysis pass. - Ensemble *getEnsemble(Strategy); - - /// Invalidate cached information about MBB. This must be called *before* MBB - /// is erased, or the CFG is otherwise changed. - /// - /// This invalidates per-block information about resource usage for MBB only, - /// and it invalidates per-trace information for any trace that passes - /// through MBB. - /// - /// Call Ensemble::getTrace() again to update any trace handles. - void invalidate(const MachineBasicBlock *MBB); - -private: - // One entry per basic block, indexed by block number. - SmallVector BlockInfo; - - // Cycles consumed on each processor resource per block. - // The number of processor resource kinds is constant for a given subtarget, - // but it is not known at compile time. The number of cycles consumed by - // block B on processor resource R is at ProcResourceCycles[B*Kinds + R] - // where Kinds = SchedModel.getNumProcResourceKinds(). - SmallVector ProcResourceCycles; - - // One ensemble per strategy. - Ensemble* Ensembles[TS_NumStrategies]; - - // Convert scaled resource usage to a cycle count that can be compared with - // latencies. - unsigned getCycles(unsigned Scaled) { - unsigned Factor = SchedModel.getLatencyFactor(); - return (Scaled + Factor - 1) / Factor; - } -}; - -inline raw_ostream &operator<<(raw_ostream &OS, - const MachineTraceMetrics::Trace &Tr) { - Tr.print(OS); - return OS; -} - -inline raw_ostream &operator<<(raw_ostream &OS, - const MachineTraceMetrics::Ensemble &En) { - En.print(OS); - return OS; -} -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/MachineValueType.h b/llvm/include/llvm/CodeGen/MachineValueType.h deleted file mode 100644 index 0bb53d1a..00000000 --- a/llvm/include/llvm/CodeGen/MachineValueType.h +++ /dev/null @@ -1,720 +0,0 @@ -//===- CodeGen/MachineValueType.h - Machine-Level types ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the set of machine-level target independent types which -// legal values in the code generator use. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_MACHINEVALUETYPE_H -#define LLVM_CODEGEN_MACHINEVALUETYPE_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/MathExtras.h" - -namespace llvm { - - class Type; - - /// MVT - Machine Value Type. Every type that is supported natively by some - /// processor targeted by LLVM occurs here. This means that any legal value - /// type can be represented by an MVT. -class MVT { - public: - enum SimpleValueType : int8_t { - // INVALID_SIMPLE_VALUE_TYPE - Simple value types less than zero are - // considered extended value types. - INVALID_SIMPLE_VALUE_TYPE = -1, - - // If you change this numbering, you must change the values in - // ValueTypes.td as well! - Other = 0, // This is a non-standard value - i1 = 1, // This is a 1 bit integer value - i8 = 2, // This is an 8 bit integer value - i16 = 3, // This is a 16 bit integer value - i32 = 4, // This is a 32 bit integer value - i64 = 5, // This is a 64 bit integer value - i128 = 6, // This is a 128 bit integer value - - FIRST_INTEGER_VALUETYPE = i1, - LAST_INTEGER_VALUETYPE = i128, - - f16 = 7, // This is a 16 bit floating point value - f32 = 8, // This is a 32 bit floating point value - f64 = 9, // This is a 64 bit floating point value - f80 = 10, // This is a 80 bit floating point value - f128 = 11, // This is a 128 bit floating point value - ppcf128 = 12, // This is a PPC 128-bit floating point value - - FIRST_FP_VALUETYPE = f16, - LAST_FP_VALUETYPE = ppcf128, - - v2i1 = 13, // 2 x i1 - v4i1 = 14, // 4 x i1 - v8i1 = 15, // 8 x i1 - v16i1 = 16, // 16 x i1 - v32i1 = 17, // 32 x i1 - v64i1 = 18, // 64 x i1 - v512i1 = 19, // 512 x i1 - v1024i1 = 20, // 1024 x i1 - - v1i8 = 21, // 1 x i8 - v2i8 = 22, // 2 x i8 - v4i8 = 23, // 4 x i8 - v8i8 = 24, // 8 x i8 - v16i8 = 25, // 16 x i8 - v32i8 = 26, // 32 x i8 - v64i8 = 27, // 64 x i8 - v128i8 = 28, //128 x i8 - v256i8 = 29, //256 x i8 - - v1i16 = 30, // 1 x i16 - v2i16 = 31, // 2 x i16 - v4i16 = 32, // 4 x i16 - v8i16 = 33, // 8 x i16 - v16i16 = 34, // 16 x i16 - v32i16 = 35, // 32 x i16 - v64i16 = 36, // 64 x i16 - v128i16 = 37, //128 x i16 - - v1i32 = 38, // 1 x i32 - v2i32 = 39, // 2 x i32 - v4i32 = 40, // 4 x i32 - v8i32 = 41, // 8 x i32 - v16i32 = 42, // 16 x i32 - v32i32 = 43, // 32 x i32 - v64i32 = 44, // 64 x i32 - - v1i64 = 45, // 1 x i64 - v2i64 = 46, // 2 x i64 - v4i64 = 47, // 4 x i64 - v8i64 = 48, // 8 x i64 - v16i64 = 49, // 16 x i64 - v32i64 = 50, // 32 x i64 - - v1i128 = 51, // 1 x i128 - - FIRST_INTEGER_VECTOR_VALUETYPE = v2i1, - LAST_INTEGER_VECTOR_VALUETYPE = v1i128, - - v2f16 = 52, // 2 x f16 - v4f16 = 53, // 4 x f16 - v8f16 = 54, // 8 x f16 - v1f32 = 55, // 1 x f32 - v2f32 = 56, // 2 x f32 - v4f32 = 57, // 4 x f32 - v8f32 = 58, // 8 x f32 - v16f32 = 59, // 16 x f32 - v1f64 = 60, // 1 x f64 - v2f64 = 61, // 2 x f64 - v4f64 = 62, // 4 x f64 - v8f64 = 63, // 8 x f64 - - FIRST_FP_VECTOR_VALUETYPE = v2f16, - LAST_FP_VECTOR_VALUETYPE = v8f64, - - FIRST_VECTOR_VALUETYPE = v2i1, - LAST_VECTOR_VALUETYPE = v8f64, - - x86mmx = 64, // This is an X86 MMX value - - Glue = 65, // This glues nodes together during pre-RA sched - - isVoid = 66, // This has no value - - Untyped = 67, // This value takes a register, but has - // unspecified type. The register class - // will be determined by the opcode. - - FIRST_VALUETYPE = 0, // This is always the beginning of the list. - LAST_VALUETYPE = 68, // This always remains at the end of the list. - - // This is the current maximum for LAST_VALUETYPE. - // MVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors - // This value must be a multiple of 32. - MAX_ALLOWED_VALUETYPE = 96, - - // Token - A value of type llvm::TokenTy - token = 120, - - // Metadata - This is MDNode or MDString. - Metadata = 121, - - // iPTRAny - An int value the size of the pointer of the current - // target to any address space. This must only be used internal to - // tblgen. Other than for overloading, we treat iPTRAny the same as iPTR. - iPTRAny = 122, - - // vAny - A vector with any length and element size. This is used - // for intrinsics that have overloadings based on vector types. - // This is only for tblgen's consumption! - vAny = 123, - - // fAny - Any floating-point or vector floating-point value. This is used - // for intrinsics that have overloadings based on floating-point types. - // This is only for tblgen's consumption! - fAny = 124, - - // iAny - An integer or vector integer value of any bit width. This is - // used for intrinsics that have overloadings based on integer bit widths. - // This is only for tblgen's consumption! - iAny = 125, - - // iPTR - An int value the size of the pointer of the current - // target. This should only be used internal to tblgen! - iPTR = 126, - - // Any - Any type. This is used for intrinsics that have overloadings. - // This is only for tblgen's consumption! - Any = 127 - }; - - SimpleValueType SimpleTy; - - LLVM_CONSTEXPR MVT() : SimpleTy(INVALID_SIMPLE_VALUE_TYPE) {} - LLVM_CONSTEXPR MVT(SimpleValueType SVT) : SimpleTy(SVT) { } - - bool operator>(const MVT& S) const { return SimpleTy > S.SimpleTy; } - bool operator<(const MVT& S) const { return SimpleTy < S.SimpleTy; } - bool operator==(const MVT& S) const { return SimpleTy == S.SimpleTy; } - bool operator!=(const MVT& S) const { return SimpleTy != S.SimpleTy; } - bool operator>=(const MVT& S) const { return SimpleTy >= S.SimpleTy; } - bool operator<=(const MVT& S) const { return SimpleTy <= S.SimpleTy; } - - /// isValid - Return true if this is a valid simple valuetype. - bool isValid() const { - return (SimpleTy >= MVT::FIRST_VALUETYPE && - SimpleTy < MVT::LAST_VALUETYPE); - } - - /// isFloatingPoint - Return true if this is a FP, or a vector FP type. - bool isFloatingPoint() const { - return ((SimpleTy >= MVT::FIRST_FP_VALUETYPE && - SimpleTy <= MVT::LAST_FP_VALUETYPE) || - (SimpleTy >= MVT::FIRST_FP_VECTOR_VALUETYPE && - SimpleTy <= MVT::LAST_FP_VECTOR_VALUETYPE)); - } - - /// isInteger - Return true if this is an integer, or a vector integer type. - bool isInteger() const { - return ((SimpleTy >= MVT::FIRST_INTEGER_VALUETYPE && - SimpleTy <= MVT::LAST_INTEGER_VALUETYPE) || - (SimpleTy >= MVT::FIRST_INTEGER_VECTOR_VALUETYPE && - SimpleTy <= MVT::LAST_INTEGER_VECTOR_VALUETYPE)); - } - - /// isScalarInteger - Return true if this is an integer, not including - /// vectors. - bool isScalarInteger() const { - return (SimpleTy >= MVT::FIRST_INTEGER_VALUETYPE && - SimpleTy <= MVT::LAST_INTEGER_VALUETYPE); - } - - /// isVector - Return true if this is a vector value type. - bool isVector() const { - return (SimpleTy >= MVT::FIRST_VECTOR_VALUETYPE && - SimpleTy <= MVT::LAST_VECTOR_VALUETYPE); - } - - /// is16BitVector - Return true if this is a 16-bit vector type. - bool is16BitVector() const { - return (SimpleTy == MVT::v2i8 || SimpleTy == MVT::v1i16 || - SimpleTy == MVT::v16i1); - } - - /// is32BitVector - Return true if this is a 32-bit vector type. - bool is32BitVector() const { - return (SimpleTy == MVT::v4i8 || SimpleTy == MVT::v2i16 || - SimpleTy == MVT::v1i32 || SimpleTy == MVT::v2f16 || - SimpleTy == MVT::v1f32); - } - - /// is64BitVector - Return true if this is a 64-bit vector type. - bool is64BitVector() const { - return (SimpleTy == MVT::v8i8 || SimpleTy == MVT::v4i16 || - SimpleTy == MVT::v2i32 || SimpleTy == MVT::v1i64 || - SimpleTy == MVT::v4f16 || SimpleTy == MVT::v2f32 || - SimpleTy == MVT::v1f64); - } - - /// is128BitVector - Return true if this is a 128-bit vector type. - bool is128BitVector() const { - return (SimpleTy == MVT::v16i8 || SimpleTy == MVT::v8i16 || - SimpleTy == MVT::v4i32 || SimpleTy == MVT::v2i64 || - SimpleTy == MVT::v1i128 || SimpleTy == MVT::v8f16 || - SimpleTy == MVT::v4f32 || SimpleTy == MVT::v2f64); - } - - /// is256BitVector - Return true if this is a 256-bit vector type. - bool is256BitVector() const { - return (SimpleTy == MVT::v8f32 || SimpleTy == MVT::v4f64 || - SimpleTy == MVT::v32i8 || SimpleTy == MVT::v16i16 || - SimpleTy == MVT::v8i32 || SimpleTy == MVT::v4i64); - } - - /// is512BitVector - Return true if this is a 512-bit vector type. - bool is512BitVector() const { - return (SimpleTy == MVT::v16f32 || SimpleTy == MVT::v8f64 || - SimpleTy == MVT::v512i1 || SimpleTy == MVT::v64i8 || - SimpleTy == MVT::v32i16 || SimpleTy == MVT::v16i32 || - SimpleTy == MVT::v8i64); - } - - /// is1024BitVector - Return true if this is a 1024-bit vector type. - bool is1024BitVector() const { - return (SimpleTy == MVT::v1024i1 || SimpleTy == MVT::v128i8 || - SimpleTy == MVT::v64i16 || SimpleTy == MVT::v32i32 || - SimpleTy == MVT::v16i64); - } - - /// is2048BitVector - Return true if this is a 1024-bit vector type. - bool is2048BitVector() const { - return (SimpleTy == MVT::v256i8 || SimpleTy == MVT::v128i16 || - SimpleTy == MVT::v64i32 || SimpleTy == MVT::v32i64); - } - - /// isOverloaded - Return true if this is an overloaded type for TableGen. - bool isOverloaded() const { - return (SimpleTy==MVT::Any || - SimpleTy==MVT::iAny || SimpleTy==MVT::fAny || - SimpleTy==MVT::vAny || SimpleTy==MVT::iPTRAny); - } - - /// isPow2VectorType - Returns true if the given vector is a power of 2. - bool isPow2VectorType() const { - unsigned NElts = getVectorNumElements(); - return !(NElts & (NElts - 1)); - } - - /// getPow2VectorType - Widens the length of the given vector MVT up to - /// the nearest power of 2 and returns that type. - MVT getPow2VectorType() const { - if (isPow2VectorType()) - return *this; - - unsigned NElts = getVectorNumElements(); - unsigned Pow2NElts = 1 << Log2_32_Ceil(NElts); - return MVT::getVectorVT(getVectorElementType(), Pow2NElts); - } - - /// getScalarType - If this is a vector type, return the element type, - /// otherwise return this. - MVT getScalarType() const { - return isVector() ? getVectorElementType() : *this; - } - - MVT getVectorElementType() const { - switch (SimpleTy) { - default: - llvm_unreachable("Not a vector MVT!"); - case v2i1: - case v4i1: - case v8i1: - case v16i1: - case v32i1: - case v64i1: - case v512i1: - case v1024i1: return i1; - case v1i8: - case v2i8: - case v4i8: - case v8i8: - case v16i8: - case v32i8: - case v64i8: - case v128i8: - case v256i8: return i8; - case v1i16: - case v2i16: - case v4i16: - case v8i16: - case v16i16: - case v32i16: - case v64i16: - case v128i16: return i16; - case v1i32: - case v2i32: - case v4i32: - case v8i32: - case v16i32: - case v32i32: - case v64i32: return i32; - case v1i64: - case v2i64: - case v4i64: - case v8i64: - case v16i64: - case v32i64: return i64; - case v1i128: return i128; - case v2f16: - case v4f16: - case v8f16: return f16; - case v1f32: - case v2f32: - case v4f32: - case v8f32: - case v16f32: return f32; - case v1f64: - case v2f64: - case v4f64: - case v8f64: return f64; - } - } - - unsigned getVectorNumElements() const { - switch (SimpleTy) { - default: - llvm_unreachable("Not a vector MVT!"); - case v1024i1: return 1024; - case v512i1: return 512; - case v256i8: return 256; - case v128i8: - case v128i16: return 128; - case v64i1: - case v64i8: - case v64i16: - case v64i32: return 64; - case v32i1: - case v32i8: - case v32i16: - case v32i32: - case v32i64: return 32; - case v16i1: - case v16i8: - case v16i16: - case v16i32: - case v16i64: - case v16f32: return 16; - case v8i1: - case v8i8: - case v8i16: - case v8i32: - case v8i64: - case v8f16: - case v8f32: - case v8f64: return 8; - case v4i1: - case v4i8: - case v4i16: - case v4i32: - case v4i64: - case v4f16: - case v4f32: - case v4f64: return 4; - case v2i1: - case v2i8: - case v2i16: - case v2i32: - case v2i64: - case v2f16: - case v2f32: - case v2f64: return 2; - case v1i8: - case v1i16: - case v1i32: - case v1i64: - case v1i128: - case v1f32: - case v1f64: return 1; - } - } - - unsigned getSizeInBits() const { - switch (SimpleTy) { - default: - llvm_unreachable("getSizeInBits called on extended MVT."); - case Other: - llvm_unreachable("Value type is non-standard value, Other."); - case iPTR: - llvm_unreachable("Value type size is target-dependent. Ask TLI."); - case iPTRAny: - case iAny: - case fAny: - case vAny: - case Any: - llvm_unreachable("Value type is overloaded."); - case token: - llvm_unreachable("Token type is a sentinel that cannot be used " - "in codegen and has no size"); - case Metadata: - llvm_unreachable("Value type is metadata."); - case i1 : return 1; - case v2i1: return 2; - case v4i1: return 4; - case i8 : - case v1i8: - case v8i1: return 8; - case i16 : - case f16: - case v16i1: - case v2i8: - case v1i16: return 16; - case f32 : - case i32 : - case v32i1: - case v4i8: - case v2i16: - case v2f16: - case v1f32: - case v1i32: return 32; - case x86mmx: - case f64 : - case i64 : - case v64i1: - case v8i8: - case v4i16: - case v2i32: - case v1i64: - case v4f16: - case v2f32: - case v1f64: return 64; - case f80 : return 80; - case f128: - case ppcf128: - case i128: - case v16i8: - case v8i16: - case v4i32: - case v2i64: - case v1i128: - case v8f16: - case v4f32: - case v2f64: return 128; - case v32i8: - case v16i16: - case v8i32: - case v4i64: - case v8f32: - case v4f64: return 256; - case v512i1: - case v64i8: - case v32i16: - case v16i32: - case v8i64: - case v16f32: - case v8f64: return 512; - case v1024i1: - case v128i8: - case v64i16: - case v32i32: - case v16i64: return 1024; - case v256i8: - case v128i16: - case v64i32: - case v32i64: return 2048; - } - } - - unsigned getScalarSizeInBits() const { - return getScalarType().getSizeInBits(); - } - - /// getStoreSize - Return the number of bytes overwritten by a store - /// of the specified value type. - unsigned getStoreSize() const { - return (getSizeInBits() + 7) / 8; - } - - /// getStoreSizeInBits - Return the number of bits overwritten by a store - /// of the specified value type. - unsigned getStoreSizeInBits() const { - return getStoreSize() * 8; - } - - /// Return true if this has more bits than VT. - bool bitsGT(MVT VT) const { - return getSizeInBits() > VT.getSizeInBits(); - } - - /// Return true if this has no less bits than VT. - bool bitsGE(MVT VT) const { - return getSizeInBits() >= VT.getSizeInBits(); - } - - /// Return true if this has less bits than VT. - bool bitsLT(MVT VT) const { - return getSizeInBits() < VT.getSizeInBits(); - } - - /// Return true if this has no more bits than VT. - bool bitsLE(MVT VT) const { - return getSizeInBits() <= VT.getSizeInBits(); - } - - - static MVT getFloatingPointVT(unsigned BitWidth) { - switch (BitWidth) { - default: - llvm_unreachable("Bad bit width!"); - case 16: - return MVT::f16; - case 32: - return MVT::f32; - case 64: - return MVT::f64; - case 80: - return MVT::f80; - case 128: - return MVT::f128; - } - } - - static MVT getIntegerVT(unsigned BitWidth) { - switch (BitWidth) { - default: - return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE); - case 1: - return MVT::i1; - case 8: - return MVT::i8; - case 16: - return MVT::i16; - case 32: - return MVT::i32; - case 64: - return MVT::i64; - case 128: - return MVT::i128; - } - } - - static MVT getVectorVT(MVT VT, unsigned NumElements) { - switch (VT.SimpleTy) { - default: - break; - case MVT::i1: - if (NumElements == 2) return MVT::v2i1; - if (NumElements == 4) return MVT::v4i1; - if (NumElements == 8) return MVT::v8i1; - if (NumElements == 16) return MVT::v16i1; - if (NumElements == 32) return MVT::v32i1; - if (NumElements == 64) return MVT::v64i1; - if (NumElements == 512) return MVT::v512i1; - if (NumElements == 1024) return MVT::v1024i1; - break; - case MVT::i8: - if (NumElements == 1) return MVT::v1i8; - if (NumElements == 2) return MVT::v2i8; - if (NumElements == 4) return MVT::v4i8; - if (NumElements == 8) return MVT::v8i8; - if (NumElements == 16) return MVT::v16i8; - if (NumElements == 32) return MVT::v32i8; - if (NumElements == 64) return MVT::v64i8; - if (NumElements == 128) return MVT::v128i8; - if (NumElements == 256) return MVT::v256i8; - break; - case MVT::i16: - if (NumElements == 1) return MVT::v1i16; - if (NumElements == 2) return MVT::v2i16; - if (NumElements == 4) return MVT::v4i16; - if (NumElements == 8) return MVT::v8i16; - if (NumElements == 16) return MVT::v16i16; - if (NumElements == 32) return MVT::v32i16; - if (NumElements == 64) return MVT::v64i16; - if (NumElements == 128) return MVT::v128i16; - break; - case MVT::i32: - if (NumElements == 1) return MVT::v1i32; - if (NumElements == 2) return MVT::v2i32; - if (NumElements == 4) return MVT::v4i32; - if (NumElements == 8) return MVT::v8i32; - if (NumElements == 16) return MVT::v16i32; - if (NumElements == 32) return MVT::v32i32; - if (NumElements == 64) return MVT::v64i32; - break; - case MVT::i64: - if (NumElements == 1) return MVT::v1i64; - if (NumElements == 2) return MVT::v2i64; - if (NumElements == 4) return MVT::v4i64; - if (NumElements == 8) return MVT::v8i64; - if (NumElements == 16) return MVT::v16i64; - if (NumElements == 32) return MVT::v32i64; - break; - case MVT::i128: - if (NumElements == 1) return MVT::v1i128; - break; - case MVT::f16: - if (NumElements == 2) return MVT::v2f16; - if (NumElements == 4) return MVT::v4f16; - if (NumElements == 8) return MVT::v8f16; - break; - case MVT::f32: - if (NumElements == 1) return MVT::v1f32; - if (NumElements == 2) return MVT::v2f32; - if (NumElements == 4) return MVT::v4f32; - if (NumElements == 8) return MVT::v8f32; - if (NumElements == 16) return MVT::v16f32; - break; - case MVT::f64: - if (NumElements == 1) return MVT::v1f64; - if (NumElements == 2) return MVT::v2f64; - if (NumElements == 4) return MVT::v4f64; - if (NumElements == 8) return MVT::v8f64; - break; - } - return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE); - } - - /// Return the value type corresponding to the specified type. This returns - /// all pointers as iPTR. If HandleUnknown is true, unknown types are - /// returned as Other, otherwise they are invalid. - static MVT getVT(Type *Ty, bool HandleUnknown = false); - - private: - /// A simple iterator over the MVT::SimpleValueType enum. - struct mvt_iterator { - SimpleValueType VT; - mvt_iterator(SimpleValueType VT) : VT(VT) {} - MVT operator*() const { return VT; } - bool operator!=(const mvt_iterator &LHS) const { return VT != LHS.VT; } - mvt_iterator& operator++() { - VT = (MVT::SimpleValueType)((int)VT + 1); - assert((int)VT <= MVT::MAX_ALLOWED_VALUETYPE && - "MVT iterator overflowed."); - return *this; - } - }; - /// A range of the MVT::SimpleValueType enum. - typedef iterator_range mvt_range; - - public: - /// SimpleValueType Iteration - /// @{ - static mvt_range all_valuetypes() { - return mvt_range(MVT::FIRST_VALUETYPE, MVT::LAST_VALUETYPE); - } - static mvt_range integer_valuetypes() { - return mvt_range(MVT::FIRST_INTEGER_VALUETYPE, - (MVT::SimpleValueType)(MVT::LAST_INTEGER_VALUETYPE + 1)); - } - static mvt_range fp_valuetypes() { - return mvt_range(MVT::FIRST_FP_VALUETYPE, - (MVT::SimpleValueType)(MVT::LAST_FP_VALUETYPE + 1)); - } - static mvt_range vector_valuetypes() { - return mvt_range(MVT::FIRST_VECTOR_VALUETYPE, - (MVT::SimpleValueType)(MVT::LAST_VECTOR_VALUETYPE + 1)); - } - static mvt_range integer_vector_valuetypes() { - return mvt_range( - MVT::FIRST_INTEGER_VECTOR_VALUETYPE, - (MVT::SimpleValueType)(MVT::LAST_INTEGER_VECTOR_VALUETYPE + 1)); - } - static mvt_range fp_vector_valuetypes() { - return mvt_range( - MVT::FIRST_FP_VECTOR_VALUETYPE, - (MVT::SimpleValueType)(MVT::LAST_FP_VECTOR_VALUETYPE + 1)); - } - /// @} - }; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/PBQP/CostAllocator.h b/llvm/include/llvm/CodeGen/PBQP/CostAllocator.h deleted file mode 100644 index 02d39fe3..00000000 --- a/llvm/include/llvm/CodeGen/PBQP/CostAllocator.h +++ /dev/null @@ -1,132 +0,0 @@ -//===---------- CostAllocator.h - PBQP Cost Allocator -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Defines classes conforming to the PBQP cost value manager concept. -// -// Cost value managers are memory managers for PBQP cost values (vectors and -// matrices). Since PBQP graphs can grow very large (E.g. hundreds of thousands -// of edges on the largest function in SPEC2006). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PBQP_COSTALLOCATOR_H -#define LLVM_CODEGEN_PBQP_COSTALLOCATOR_H - -#include "llvm/ADT/DenseSet.h" -#include -#include - -namespace llvm { -namespace PBQP { - -template -class ValuePool { -public: - typedef std::shared_ptr PoolRef; - -private: - - class PoolEntry : public std::enable_shared_from_this { - public: - template - PoolEntry(ValuePool &Pool, ValueKeyT Value) - : Pool(Pool), Value(std::move(Value)) {} - ~PoolEntry() { Pool.removeEntry(this); } - const ValueT& getValue() const { return Value; } - private: - ValuePool &Pool; - ValueT Value; - }; - - class PoolEntryDSInfo { - public: - static inline PoolEntry* getEmptyKey() { return nullptr; } - - static inline PoolEntry* getTombstoneKey() { - return reinterpret_cast(static_cast(1)); - } - - template - static unsigned getHashValue(const ValueKeyT &C) { - return hash_value(C); - } - - static unsigned getHashValue(PoolEntry *P) { - return getHashValue(P->getValue()); - } - - static unsigned getHashValue(const PoolEntry *P) { - return getHashValue(P->getValue()); - } - - template - static - bool isEqual(const ValueKeyT1 &C1, const ValueKeyT2 &C2) { - return C1 == C2; - } - - template - static bool isEqual(const ValueKeyT &C, PoolEntry *P) { - if (P == getEmptyKey() || P == getTombstoneKey()) - return false; - return isEqual(C, P->getValue()); - } - - static bool isEqual(PoolEntry *P1, PoolEntry *P2) { - if (P1 == getEmptyKey() || P1 == getTombstoneKey()) - return P1 == P2; - return isEqual(P1->getValue(), P2); - } - - }; - - typedef DenseSet EntrySetT; - - EntrySetT EntrySet; - - void removeEntry(PoolEntry *P) { EntrySet.erase(P); } - -public: - template PoolRef getValue(ValueKeyT ValueKey) { - typename EntrySetT::iterator I = EntrySet.find_as(ValueKey); - - if (I != EntrySet.end()) - return PoolRef((*I)->shared_from_this(), &(*I)->getValue()); - - auto P = std::make_shared(*this, std::move(ValueKey)); - EntrySet.insert(P.get()); - return PoolRef(std::move(P), &P->getValue()); - } -}; - -template -class PoolCostAllocator { -private: - typedef ValuePool VectorCostPool; - typedef ValuePool MatrixCostPool; -public: - typedef VectorT Vector; - typedef MatrixT Matrix; - typedef typename VectorCostPool::PoolRef VectorPtr; - typedef typename MatrixCostPool::PoolRef MatrixPtr; - - template - VectorPtr getVector(VectorKeyT v) { return VectorPool.getValue(std::move(v)); } - - template - MatrixPtr getMatrix(MatrixKeyT m) { return MatrixPool.getValue(std::move(m)); } -private: - VectorCostPool VectorPool; - MatrixCostPool MatrixPool; -}; - -} // namespace PBQP -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/PBQP/Graph.h b/llvm/include/llvm/CodeGen/PBQP/Graph.h deleted file mode 100644 index 8301ca4d..00000000 --- a/llvm/include/llvm/CodeGen/PBQP/Graph.h +++ /dev/null @@ -1,681 +0,0 @@ -//===-------------------- Graph.h - PBQP Graph ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// PBQP Graph class. -// -//===----------------------------------------------------------------------===// - - -#ifndef LLVM_CODEGEN_PBQP_GRAPH_H -#define LLVM_CODEGEN_PBQP_GRAPH_H - -#include "llvm/Support/Debug.h" -#include -#include -#include -#include -#include - -namespace llvm { -namespace PBQP { - - class GraphBase { - public: - typedef unsigned NodeId; - typedef unsigned EdgeId; - - /// @brief Returns a value representing an invalid (non-existent) node. - static NodeId invalidNodeId() { - return std::numeric_limits::max(); - } - - /// @brief Returns a value representing an invalid (non-existent) edge. - static EdgeId invalidEdgeId() { - return std::numeric_limits::max(); - } - }; - - /// PBQP Graph class. - /// Instances of this class describe PBQP problems. - /// - template - class Graph : public GraphBase { - private: - typedef typename SolverT::CostAllocator CostAllocator; - public: - typedef typename SolverT::RawVector RawVector; - typedef typename SolverT::RawMatrix RawMatrix; - typedef typename SolverT::Vector Vector; - typedef typename SolverT::Matrix Matrix; - typedef typename CostAllocator::VectorPtr VectorPtr; - typedef typename CostAllocator::MatrixPtr MatrixPtr; - typedef typename SolverT::NodeMetadata NodeMetadata; - typedef typename SolverT::EdgeMetadata EdgeMetadata; - typedef typename SolverT::GraphMetadata GraphMetadata; - - private: - - class NodeEntry { - public: - typedef std::vector AdjEdgeList; - typedef AdjEdgeList::size_type AdjEdgeIdx; - typedef AdjEdgeList::const_iterator AdjEdgeItr; - - static AdjEdgeIdx getInvalidAdjEdgeIdx() { - return std::numeric_limits::max(); - } - - NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {} - - AdjEdgeIdx addAdjEdgeId(EdgeId EId) { - AdjEdgeIdx Idx = AdjEdgeIds.size(); - AdjEdgeIds.push_back(EId); - return Idx; - } - - void removeAdjEdgeId(Graph &G, NodeId ThisNId, AdjEdgeIdx Idx) { - // Swap-and-pop for fast removal. - // 1) Update the adj index of the edge currently at back(). - // 2) Move last Edge down to Idx. - // 3) pop_back() - // If Idx == size() - 1 then the setAdjEdgeIdx and swap are - // redundant, but both operations are cheap. - G.getEdge(AdjEdgeIds.back()).setAdjEdgeIdx(ThisNId, Idx); - AdjEdgeIds[Idx] = AdjEdgeIds.back(); - AdjEdgeIds.pop_back(); - } - - const AdjEdgeList& getAdjEdgeIds() const { return AdjEdgeIds; } - - VectorPtr Costs; - NodeMetadata Metadata; - private: - AdjEdgeList AdjEdgeIds; - }; - - class EdgeEntry { - public: - EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs) - : Costs(std::move(Costs)) { - NIds[0] = N1Id; - NIds[1] = N2Id; - ThisEdgeAdjIdxs[0] = NodeEntry::getInvalidAdjEdgeIdx(); - ThisEdgeAdjIdxs[1] = NodeEntry::getInvalidAdjEdgeIdx(); - } - - void invalidate() { - NIds[0] = NIds[1] = Graph::invalidNodeId(); - ThisEdgeAdjIdxs[0] = ThisEdgeAdjIdxs[1] = - NodeEntry::getInvalidAdjEdgeIdx(); - Costs = nullptr; - } - - void connectToN(Graph &G, EdgeId ThisEdgeId, unsigned NIdx) { - assert(ThisEdgeAdjIdxs[NIdx] == NodeEntry::getInvalidAdjEdgeIdx() && - "Edge already connected to NIds[NIdx]."); - NodeEntry &N = G.getNode(NIds[NIdx]); - ThisEdgeAdjIdxs[NIdx] = N.addAdjEdgeId(ThisEdgeId); - } - - void connectTo(Graph &G, EdgeId ThisEdgeId, NodeId NId) { - if (NId == NIds[0]) - connectToN(G, ThisEdgeId, 0); - else { - assert(NId == NIds[1] && "Edge does not connect NId."); - connectToN(G, ThisEdgeId, 1); - } - } - - void connect(Graph &G, EdgeId ThisEdgeId) { - connectToN(G, ThisEdgeId, 0); - connectToN(G, ThisEdgeId, 1); - } - - void setAdjEdgeIdx(NodeId NId, typename NodeEntry::AdjEdgeIdx NewIdx) { - if (NId == NIds[0]) - ThisEdgeAdjIdxs[0] = NewIdx; - else { - assert(NId == NIds[1] && "Edge not connected to NId"); - ThisEdgeAdjIdxs[1] = NewIdx; - } - } - - void disconnectFromN(Graph &G, unsigned NIdx) { - assert(ThisEdgeAdjIdxs[NIdx] != NodeEntry::getInvalidAdjEdgeIdx() && - "Edge not connected to NIds[NIdx]."); - NodeEntry &N = G.getNode(NIds[NIdx]); - N.removeAdjEdgeId(G, NIds[NIdx], ThisEdgeAdjIdxs[NIdx]); - ThisEdgeAdjIdxs[NIdx] = NodeEntry::getInvalidAdjEdgeIdx(); - } - - void disconnectFrom(Graph &G, NodeId NId) { - if (NId == NIds[0]) - disconnectFromN(G, 0); - else { - assert(NId == NIds[1] && "Edge does not connect NId"); - disconnectFromN(G, 1); - } - } - - NodeId getN1Id() const { return NIds[0]; } - NodeId getN2Id() const { return NIds[1]; } - MatrixPtr Costs; - EdgeMetadata Metadata; - private: - NodeId NIds[2]; - typename NodeEntry::AdjEdgeIdx ThisEdgeAdjIdxs[2]; - }; - - // ----- MEMBERS ----- - - GraphMetadata Metadata; - CostAllocator CostAlloc; - SolverT *Solver; - - typedef std::vector NodeVector; - typedef std::vector FreeNodeVector; - NodeVector Nodes; - FreeNodeVector FreeNodeIds; - - typedef std::vector EdgeVector; - typedef std::vector FreeEdgeVector; - EdgeVector Edges; - FreeEdgeVector FreeEdgeIds; - - // ----- INTERNAL METHODS ----- - - NodeEntry &getNode(NodeId NId) { - assert(NId < Nodes.size() && "Out of bound NodeId"); - return Nodes[NId]; - } - const NodeEntry &getNode(NodeId NId) const { - assert(NId < Nodes.size() && "Out of bound NodeId"); - return Nodes[NId]; - } - - EdgeEntry& getEdge(EdgeId EId) { return Edges[EId]; } - const EdgeEntry& getEdge(EdgeId EId) const { return Edges[EId]; } - - NodeId addConstructedNode(NodeEntry N) { - NodeId NId = 0; - if (!FreeNodeIds.empty()) { - NId = FreeNodeIds.back(); - FreeNodeIds.pop_back(); - Nodes[NId] = std::move(N); - } else { - NId = Nodes.size(); - Nodes.push_back(std::move(N)); - } - return NId; - } - - EdgeId addConstructedEdge(EdgeEntry E) { - assert(findEdge(E.getN1Id(), E.getN2Id()) == invalidEdgeId() && - "Attempt to add duplicate edge."); - EdgeId EId = 0; - if (!FreeEdgeIds.empty()) { - EId = FreeEdgeIds.back(); - FreeEdgeIds.pop_back(); - Edges[EId] = std::move(E); - } else { - EId = Edges.size(); - Edges.push_back(std::move(E)); - } - - EdgeEntry &NE = getEdge(EId); - - // Add the edge to the adjacency sets of its nodes. - NE.connect(*this, EId); - return EId; - } - - Graph(const Graph &Other) {} - void operator=(const Graph &Other) {} - - public: - - typedef typename NodeEntry::AdjEdgeItr AdjEdgeItr; - - class NodeItr { - public: - typedef std::forward_iterator_tag iterator_category; - typedef NodeId value_type; - typedef int difference_type; - typedef NodeId* pointer; - typedef NodeId& reference; - - NodeItr(NodeId CurNId, const Graph &G) - : CurNId(CurNId), EndNId(G.Nodes.size()), FreeNodeIds(G.FreeNodeIds) { - this->CurNId = findNextInUse(CurNId); // Move to first in-use node id - } - - bool operator==(const NodeItr &O) const { return CurNId == O.CurNId; } - bool operator!=(const NodeItr &O) const { return !(*this == O); } - NodeItr& operator++() { CurNId = findNextInUse(++CurNId); return *this; } - NodeId operator*() const { return CurNId; } - - private: - NodeId findNextInUse(NodeId NId) const { - while (NId < EndNId && - std::find(FreeNodeIds.begin(), FreeNodeIds.end(), NId) != - FreeNodeIds.end()) { - ++NId; - } - return NId; - } - - NodeId CurNId, EndNId; - const FreeNodeVector &FreeNodeIds; - }; - - class EdgeItr { - public: - EdgeItr(EdgeId CurEId, const Graph &G) - : CurEId(CurEId), EndEId(G.Edges.size()), FreeEdgeIds(G.FreeEdgeIds) { - this->CurEId = findNextInUse(CurEId); // Move to first in-use edge id - } - - bool operator==(const EdgeItr &O) const { return CurEId == O.CurEId; } - bool operator!=(const EdgeItr &O) const { return !(*this == O); } - EdgeItr& operator++() { CurEId = findNextInUse(++CurEId); return *this; } - EdgeId operator*() const { return CurEId; } - - private: - EdgeId findNextInUse(EdgeId EId) const { - while (EId < EndEId && - std::find(FreeEdgeIds.begin(), FreeEdgeIds.end(), EId) != - FreeEdgeIds.end()) { - ++EId; - } - return EId; - } - - EdgeId CurEId, EndEId; - const FreeEdgeVector &FreeEdgeIds; - }; - - class NodeIdSet { - public: - NodeIdSet(const Graph &G) : G(G) { } - NodeItr begin() const { return NodeItr(0, G); } - NodeItr end() const { return NodeItr(G.Nodes.size(), G); } - bool empty() const { return G.Nodes.empty(); } - typename NodeVector::size_type size() const { - return G.Nodes.size() - G.FreeNodeIds.size(); - } - private: - const Graph& G; - }; - - class EdgeIdSet { - public: - EdgeIdSet(const Graph &G) : G(G) { } - EdgeItr begin() const { return EdgeItr(0, G); } - EdgeItr end() const { return EdgeItr(G.Edges.size(), G); } - bool empty() const { return G.Edges.empty(); } - typename NodeVector::size_type size() const { - return G.Edges.size() - G.FreeEdgeIds.size(); - } - private: - const Graph& G; - }; - - class AdjEdgeIdSet { - public: - AdjEdgeIdSet(const NodeEntry &NE) : NE(NE) { } - typename NodeEntry::AdjEdgeItr begin() const { - return NE.getAdjEdgeIds().begin(); - } - typename NodeEntry::AdjEdgeItr end() const { - return NE.getAdjEdgeIds().end(); - } - bool empty() const { return NE.getAdjEdgeIds().empty(); } - typename NodeEntry::AdjEdgeList::size_type size() const { - return NE.getAdjEdgeIds().size(); - } - private: - const NodeEntry &NE; - }; - - /// @brief Construct an empty PBQP graph. - Graph() : Solver(nullptr) {} - - /// @brief Construct an empty PBQP graph with the given graph metadata. - Graph(GraphMetadata Metadata) - : Metadata(std::move(Metadata)), Solver(nullptr) {} - - /// @brief Get a reference to the graph metadata. - GraphMetadata& getMetadata() { return Metadata; } - - /// @brief Get a const-reference to the graph metadata. - const GraphMetadata& getMetadata() const { return Metadata; } - - /// @brief Lock this graph to the given solver instance in preparation - /// for running the solver. This method will call solver.handleAddNode for - /// each node in the graph, and handleAddEdge for each edge, to give the - /// solver an opportunity to set up any requried metadata. - void setSolver(SolverT &S) { - assert(!Solver && "Solver already set. Call unsetSolver()."); - Solver = &S; - for (auto NId : nodeIds()) - Solver->handleAddNode(NId); - for (auto EId : edgeIds()) - Solver->handleAddEdge(EId); - } - - /// @brief Release from solver instance. - void unsetSolver() { - assert(Solver && "Solver not set."); - Solver = nullptr; - } - - /// @brief Add a node with the given costs. - /// @param Costs Cost vector for the new node. - /// @return Node iterator for the added node. - template - NodeId addNode(OtherVectorT Costs) { - // Get cost vector from the problem domain - VectorPtr AllocatedCosts = CostAlloc.getVector(std::move(Costs)); - NodeId NId = addConstructedNode(NodeEntry(AllocatedCosts)); - if (Solver) - Solver->handleAddNode(NId); - return NId; - } - - /// @brief Add a node bypassing the cost allocator. - /// @param Costs Cost vector ptr for the new node (must be convertible to - /// VectorPtr). - /// @return Node iterator for the added node. - /// - /// This method allows for fast addition of a node whose costs don't need - /// to be passed through the cost allocator. The most common use case for - /// this is when duplicating costs from an existing node (when using a - /// pooling allocator). These have already been uniqued, so we can avoid - /// re-constructing and re-uniquing them by attaching them directly to the - /// new node. - template - NodeId addNodeBypassingCostAllocator(OtherVectorPtrT Costs) { - NodeId NId = addConstructedNode(NodeEntry(Costs)); - if (Solver) - Solver->handleAddNode(NId); - return NId; - } - - /// @brief Add an edge between the given nodes with the given costs. - /// @param N1Id First node. - /// @param N2Id Second node. - /// @param Costs Cost matrix for new edge. - /// @return Edge iterator for the added edge. - template - EdgeId addEdge(NodeId N1Id, NodeId N2Id, OtherVectorT Costs) { - assert(getNodeCosts(N1Id).getLength() == Costs.getRows() && - getNodeCosts(N2Id).getLength() == Costs.getCols() && - "Matrix dimensions mismatch."); - // Get cost matrix from the problem domain. - MatrixPtr AllocatedCosts = CostAlloc.getMatrix(std::move(Costs)); - EdgeId EId = addConstructedEdge(EdgeEntry(N1Id, N2Id, AllocatedCosts)); - if (Solver) - Solver->handleAddEdge(EId); - return EId; - } - - /// @brief Add an edge bypassing the cost allocator. - /// @param N1Id First node. - /// @param N2Id Second node. - /// @param Costs Cost matrix for new edge. - /// @return Edge iterator for the added edge. - /// - /// This method allows for fast addition of an edge whose costs don't need - /// to be passed through the cost allocator. The most common use case for - /// this is when duplicating costs from an existing edge (when using a - /// pooling allocator). These have already been uniqued, so we can avoid - /// re-constructing and re-uniquing them by attaching them directly to the - /// new edge. - template - NodeId addEdgeBypassingCostAllocator(NodeId N1Id, NodeId N2Id, - OtherMatrixPtrT Costs) { - assert(getNodeCosts(N1Id).getLength() == Costs->getRows() && - getNodeCosts(N2Id).getLength() == Costs->getCols() && - "Matrix dimensions mismatch."); - // Get cost matrix from the problem domain. - EdgeId EId = addConstructedEdge(EdgeEntry(N1Id, N2Id, Costs)); - if (Solver) - Solver->handleAddEdge(EId); - return EId; - } - - /// @brief Returns true if the graph is empty. - bool empty() const { return NodeIdSet(*this).empty(); } - - NodeIdSet nodeIds() const { return NodeIdSet(*this); } - EdgeIdSet edgeIds() const { return EdgeIdSet(*this); } - - AdjEdgeIdSet adjEdgeIds(NodeId NId) { return AdjEdgeIdSet(getNode(NId)); } - - /// @brief Get the number of nodes in the graph. - /// @return Number of nodes in the graph. - unsigned getNumNodes() const { return NodeIdSet(*this).size(); } - - /// @brief Get the number of edges in the graph. - /// @return Number of edges in the graph. - unsigned getNumEdges() const { return EdgeIdSet(*this).size(); } - - /// @brief Set a node's cost vector. - /// @param NId Node to update. - /// @param Costs New costs to set. - template - void setNodeCosts(NodeId NId, OtherVectorT Costs) { - VectorPtr AllocatedCosts = CostAlloc.getVector(std::move(Costs)); - if (Solver) - Solver->handleSetNodeCosts(NId, *AllocatedCosts); - getNode(NId).Costs = AllocatedCosts; - } - - /// @brief Get a VectorPtr to a node's cost vector. Rarely useful - use - /// getNodeCosts where possible. - /// @param NId Node id. - /// @return VectorPtr to node cost vector. - /// - /// This method is primarily useful for duplicating costs quickly by - /// bypassing the cost allocator. See addNodeBypassingCostAllocator. Prefer - /// getNodeCosts when dealing with node cost values. - const VectorPtr& getNodeCostsPtr(NodeId NId) const { - return getNode(NId).Costs; - } - - /// @brief Get a node's cost vector. - /// @param NId Node id. - /// @return Node cost vector. - const Vector& getNodeCosts(NodeId NId) const { - return *getNodeCostsPtr(NId); - } - - NodeMetadata& getNodeMetadata(NodeId NId) { - return getNode(NId).Metadata; - } - - const NodeMetadata& getNodeMetadata(NodeId NId) const { - return getNode(NId).Metadata; - } - - typename NodeEntry::AdjEdgeList::size_type getNodeDegree(NodeId NId) const { - return getNode(NId).getAdjEdgeIds().size(); - } - - /// @brief Update an edge's cost matrix. - /// @param EId Edge id. - /// @param Costs New cost matrix. - template - void updateEdgeCosts(EdgeId EId, OtherMatrixT Costs) { - MatrixPtr AllocatedCosts = CostAlloc.getMatrix(std::move(Costs)); - if (Solver) - Solver->handleUpdateCosts(EId, *AllocatedCosts); - getEdge(EId).Costs = AllocatedCosts; - } - - /// @brief Get a MatrixPtr to a node's cost matrix. Rarely useful - use - /// getEdgeCosts where possible. - /// @param EId Edge id. - /// @return MatrixPtr to edge cost matrix. - /// - /// This method is primarily useful for duplicating costs quickly by - /// bypassing the cost allocator. See addNodeBypassingCostAllocator. Prefer - /// getEdgeCosts when dealing with edge cost values. - const MatrixPtr& getEdgeCostsPtr(EdgeId EId) const { - return getEdge(EId).Costs; - } - - /// @brief Get an edge's cost matrix. - /// @param EId Edge id. - /// @return Edge cost matrix. - const Matrix& getEdgeCosts(EdgeId EId) const { - return *getEdge(EId).Costs; - } - - EdgeMetadata& getEdgeMetadata(EdgeId EId) { - return getEdge(EId).Metadata; - } - - const EdgeMetadata& getEdgeMetadata(EdgeId EId) const { - return getEdge(EId).Metadata; - } - - /// @brief Get the first node connected to this edge. - /// @param EId Edge id. - /// @return The first node connected to the given edge. - NodeId getEdgeNode1Id(EdgeId EId) const { - return getEdge(EId).getN1Id(); - } - - /// @brief Get the second node connected to this edge. - /// @param EId Edge id. - /// @return The second node connected to the given edge. - NodeId getEdgeNode2Id(EdgeId EId) const { - return getEdge(EId).getN2Id(); - } - - /// @brief Get the "other" node connected to this edge. - /// @param EId Edge id. - /// @param NId Node id for the "given" node. - /// @return The iterator for the "other" node connected to this edge. - NodeId getEdgeOtherNodeId(EdgeId EId, NodeId NId) { - EdgeEntry &E = getEdge(EId); - if (E.getN1Id() == NId) { - return E.getN2Id(); - } // else - return E.getN1Id(); - } - - /// @brief Get the edge connecting two nodes. - /// @param N1Id First node id. - /// @param N2Id Second node id. - /// @return An id for edge (N1Id, N2Id) if such an edge exists, - /// otherwise returns an invalid edge id. - EdgeId findEdge(NodeId N1Id, NodeId N2Id) { - for (auto AEId : adjEdgeIds(N1Id)) { - if ((getEdgeNode1Id(AEId) == N2Id) || - (getEdgeNode2Id(AEId) == N2Id)) { - return AEId; - } - } - return invalidEdgeId(); - } - - /// @brief Remove a node from the graph. - /// @param NId Node id. - void removeNode(NodeId NId) { - if (Solver) - Solver->handleRemoveNode(NId); - NodeEntry &N = getNode(NId); - // TODO: Can this be for-each'd? - for (AdjEdgeItr AEItr = N.adjEdgesBegin(), - AEEnd = N.adjEdgesEnd(); - AEItr != AEEnd;) { - EdgeId EId = *AEItr; - ++AEItr; - removeEdge(EId); - } - FreeNodeIds.push_back(NId); - } - - /// @brief Disconnect an edge from the given node. - /// - /// Removes the given edge from the adjacency list of the given node. - /// This operation leaves the edge in an 'asymmetric' state: It will no - /// longer appear in an iteration over the given node's (NId's) edges, but - /// will appear in an iteration over the 'other', unnamed node's edges. - /// - /// This does not correspond to any normal graph operation, but exists to - /// support efficient PBQP graph-reduction based solvers. It is used to - /// 'effectively' remove the unnamed node from the graph while the solver - /// is performing the reduction. The solver will later call reconnectNode - /// to restore the edge in the named node's adjacency list. - /// - /// Since the degree of a node is the number of connected edges, - /// disconnecting an edge from a node 'u' will cause the degree of 'u' to - /// drop by 1. - /// - /// A disconnected edge WILL still appear in an iteration over the graph - /// edges. - /// - /// A disconnected edge should not be removed from the graph, it should be - /// reconnected first. - /// - /// A disconnected edge can be reconnected by calling the reconnectEdge - /// method. - void disconnectEdge(EdgeId EId, NodeId NId) { - if (Solver) - Solver->handleDisconnectEdge(EId, NId); - - EdgeEntry &E = getEdge(EId); - E.disconnectFrom(*this, NId); - } - - /// @brief Convenience method to disconnect all neighbours from the given - /// node. - void disconnectAllNeighborsFromNode(NodeId NId) { - for (auto AEId : adjEdgeIds(NId)) - disconnectEdge(AEId, getEdgeOtherNodeId(AEId, NId)); - } - - /// @brief Re-attach an edge to its nodes. - /// - /// Adds an edge that had been previously disconnected back into the - /// adjacency set of the nodes that the edge connects. - void reconnectEdge(EdgeId EId, NodeId NId) { - EdgeEntry &E = getEdge(EId); - E.connectTo(*this, EId, NId); - if (Solver) - Solver->handleReconnectEdge(EId, NId); - } - - /// @brief Remove an edge from the graph. - /// @param EId Edge id. - void removeEdge(EdgeId EId) { - if (Solver) - Solver->handleRemoveEdge(EId); - EdgeEntry &E = getEdge(EId); - E.disconnect(); - FreeEdgeIds.push_back(EId); - Edges[EId].invalidate(); - } - - /// @brief Remove all nodes and edges from the graph. - void clear() { - Nodes.clear(); - FreeNodeIds.clear(); - Edges.clear(); - FreeEdgeIds.clear(); - } - }; - -} // namespace PBQP -} // namespace llvm - -#endif // LLVM_CODEGEN_PBQP_GRAPH_HPP diff --git a/llvm/include/llvm/CodeGen/PBQP/Math.h b/llvm/include/llvm/CodeGen/PBQP/Math.h deleted file mode 100644 index 2792608e..00000000 --- a/llvm/include/llvm/CodeGen/PBQP/Math.h +++ /dev/null @@ -1,429 +0,0 @@ -//===------ Math.h - PBQP Vector and Matrix classes -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PBQP_MATH_H -#define LLVM_CODEGEN_PBQP_MATH_H - -#include "llvm/ADT/Hashing.h" -#include -#include -#include - -namespace llvm { -namespace PBQP { - -typedef float PBQPNum; - -/// \brief PBQP Vector class. -class Vector { - friend hash_code hash_value(const Vector &); -public: - - /// \brief Construct a PBQP vector of the given size. - explicit Vector(unsigned Length) - : Length(Length), Data(new PBQPNum[Length]) { - // llvm::dbgs() << "Constructing PBQP::Vector " - // << this << " (length " << Length << ")\n"; - } - - /// \brief Construct a PBQP vector with initializer. - Vector(unsigned Length, PBQPNum InitVal) - : Length(Length), Data(new PBQPNum[Length]) { - // llvm::dbgs() << "Constructing PBQP::Vector " - // << this << " (length " << Length << ", fill " - // << InitVal << ")\n"; - std::fill(Data, Data + Length, InitVal); - } - - /// \brief Copy construct a PBQP vector. - Vector(const Vector &V) - : Length(V.Length), Data(new PBQPNum[Length]) { - // llvm::dbgs() << "Copy-constructing PBQP::Vector " << this - // << " from PBQP::Vector " << &V << "\n"; - std::copy(V.Data, V.Data + Length, Data); - } - - /// \brief Move construct a PBQP vector. - Vector(Vector &&V) - : Length(V.Length), Data(V.Data) { - V.Length = 0; - V.Data = nullptr; - } - - /// \brief Destroy this vector, return its memory. - ~Vector() { - // llvm::dbgs() << "Deleting PBQP::Vector " << this << "\n"; - delete[] Data; - } - - /// \brief Copy-assignment operator. - Vector& operator=(const Vector &V) { - // llvm::dbgs() << "Assigning to PBQP::Vector " << this - // << " from PBQP::Vector " << &V << "\n"; - delete[] Data; - Length = V.Length; - Data = new PBQPNum[Length]; - std::copy(V.Data, V.Data + Length, Data); - return *this; - } - - /// \brief Move-assignment operator. - Vector& operator=(Vector &&V) { - delete[] Data; - Length = V.Length; - Data = V.Data; - V.Length = 0; - V.Data = nullptr; - return *this; - } - - /// \brief Comparison operator. - bool operator==(const Vector &V) const { - assert(Length != 0 && Data != nullptr && "Invalid vector"); - if (Length != V.Length) - return false; - return std::equal(Data, Data + Length, V.Data); - } - - /// \brief Return the length of the vector - unsigned getLength() const { - assert(Length != 0 && Data != nullptr && "Invalid vector"); - return Length; - } - - /// \brief Element access. - PBQPNum& operator[](unsigned Index) { - assert(Length != 0 && Data != nullptr && "Invalid vector"); - assert(Index < Length && "Vector element access out of bounds."); - return Data[Index]; - } - - /// \brief Const element access. - const PBQPNum& operator[](unsigned Index) const { - assert(Length != 0 && Data != nullptr && "Invalid vector"); - assert(Index < Length && "Vector element access out of bounds."); - return Data[Index]; - } - - /// \brief Add another vector to this one. - Vector& operator+=(const Vector &V) { - assert(Length != 0 && Data != nullptr && "Invalid vector"); - assert(Length == V.Length && "Vector length mismatch."); - std::transform(Data, Data + Length, V.Data, Data, std::plus()); - return *this; - } - - /// \brief Subtract another vector from this one. - Vector& operator-=(const Vector &V) { - assert(Length != 0 && Data != nullptr && "Invalid vector"); - assert(Length == V.Length && "Vector length mismatch."); - std::transform(Data, Data + Length, V.Data, Data, std::minus()); - return *this; - } - - /// \brief Returns the index of the minimum value in this vector - unsigned minIndex() const { - assert(Length != 0 && Data != nullptr && "Invalid vector"); - return std::min_element(Data, Data + Length) - Data; - } - -private: - unsigned Length; - PBQPNum *Data; -}; - -/// \brief Return a hash_value for the given vector. -inline hash_code hash_value(const Vector &V) { - unsigned *VBegin = reinterpret_cast(V.Data); - unsigned *VEnd = reinterpret_cast(V.Data + V.Length); - return hash_combine(V.Length, hash_combine_range(VBegin, VEnd)); -} - -/// \brief Output a textual representation of the given vector on the given -/// output stream. -template -OStream& operator<<(OStream &OS, const Vector &V) { - assert((V.getLength() != 0) && "Zero-length vector badness."); - - OS << "[ " << V[0]; - for (unsigned i = 1; i < V.getLength(); ++i) - OS << ", " << V[i]; - OS << " ]"; - - return OS; -} - -/// \brief PBQP Matrix class -class Matrix { -private: - friend hash_code hash_value(const Matrix &); -public: - - /// \brief Construct a PBQP Matrix with the given dimensions. - Matrix(unsigned Rows, unsigned Cols) : - Rows(Rows), Cols(Cols), Data(new PBQPNum[Rows * Cols]) { - } - - /// \brief Construct a PBQP Matrix with the given dimensions and initial - /// value. - Matrix(unsigned Rows, unsigned Cols, PBQPNum InitVal) - : Rows(Rows), Cols(Cols), Data(new PBQPNum[Rows * Cols]) { - std::fill(Data, Data + (Rows * Cols), InitVal); - } - - /// \brief Copy construct a PBQP matrix. - Matrix(const Matrix &M) - : Rows(M.Rows), Cols(M.Cols), Data(new PBQPNum[Rows * Cols]) { - std::copy(M.Data, M.Data + (Rows * Cols), Data); - } - - /// \brief Move construct a PBQP matrix. - Matrix(Matrix &&M) - : Rows(M.Rows), Cols(M.Cols), Data(M.Data) { - M.Rows = M.Cols = 0; - M.Data = nullptr; - } - - /// \brief Destroy this matrix, return its memory. - ~Matrix() { delete[] Data; } - - /// \brief Copy-assignment operator. - Matrix& operator=(const Matrix &M) { - delete[] Data; - Rows = M.Rows; Cols = M.Cols; - Data = new PBQPNum[Rows * Cols]; - std::copy(M.Data, M.Data + (Rows * Cols), Data); - return *this; - } - - /// \brief Move-assignment operator. - Matrix& operator=(Matrix &&M) { - delete[] Data; - Rows = M.Rows; - Cols = M.Cols; - Data = M.Data; - M.Rows = M.Cols = 0; - M.Data = nullptr; - return *this; - } - - /// \brief Comparison operator. - bool operator==(const Matrix &M) const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - if (Rows != M.Rows || Cols != M.Cols) - return false; - return std::equal(Data, Data + (Rows * Cols), M.Data); - } - - /// \brief Return the number of rows in this matrix. - unsigned getRows() const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - return Rows; - } - - /// \brief Return the number of cols in this matrix. - unsigned getCols() const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - return Cols; - } - - /// \brief Matrix element access. - PBQPNum* operator[](unsigned R) { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - assert(R < Rows && "Row out of bounds."); - return Data + (R * Cols); - } - - /// \brief Matrix element access. - const PBQPNum* operator[](unsigned R) const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - assert(R < Rows && "Row out of bounds."); - return Data + (R * Cols); - } - - /// \brief Returns the given row as a vector. - Vector getRowAsVector(unsigned R) const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - Vector V(Cols); - for (unsigned C = 0; C < Cols; ++C) - V[C] = (*this)[R][C]; - return V; - } - - /// \brief Returns the given column as a vector. - Vector getColAsVector(unsigned C) const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - Vector V(Rows); - for (unsigned R = 0; R < Rows; ++R) - V[R] = (*this)[R][C]; - return V; - } - - /// \brief Reset the matrix to the given value. - Matrix& reset(PBQPNum Val = 0) { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - std::fill(Data, Data + (Rows * Cols), Val); - return *this; - } - - /// \brief Set a single row of this matrix to the given value. - Matrix& setRow(unsigned R, PBQPNum Val) { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - assert(R < Rows && "Row out of bounds."); - std::fill(Data + (R * Cols), Data + ((R + 1) * Cols), Val); - return *this; - } - - /// \brief Set a single column of this matrix to the given value. - Matrix& setCol(unsigned C, PBQPNum Val) { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - assert(C < Cols && "Column out of bounds."); - for (unsigned R = 0; R < Rows; ++R) - (*this)[R][C] = Val; - return *this; - } - - /// \brief Matrix transpose. - Matrix transpose() const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - Matrix M(Cols, Rows); - for (unsigned r = 0; r < Rows; ++r) - for (unsigned c = 0; c < Cols; ++c) - M[c][r] = (*this)[r][c]; - return M; - } - - /// \brief Returns the diagonal of the matrix as a vector. - /// - /// Matrix must be square. - Vector diagonalize() const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - assert(Rows == Cols && "Attempt to diagonalize non-square matrix."); - Vector V(Rows); - for (unsigned r = 0; r < Rows; ++r) - V[r] = (*this)[r][r]; - return V; - } - - /// \brief Add the given matrix to this one. - Matrix& operator+=(const Matrix &M) { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - assert(Rows == M.Rows && Cols == M.Cols && - "Matrix dimensions mismatch."); - std::transform(Data, Data + (Rows * Cols), M.Data, Data, - std::plus()); - return *this; - } - - Matrix operator+(const Matrix &M) { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - Matrix Tmp(*this); - Tmp += M; - return Tmp; - } - - /// \brief Returns the minimum of the given row - PBQPNum getRowMin(unsigned R) const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - assert(R < Rows && "Row out of bounds"); - return *std::min_element(Data + (R * Cols), Data + ((R + 1) * Cols)); - } - - /// \brief Returns the minimum of the given column - PBQPNum getColMin(unsigned C) const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - PBQPNum MinElem = (*this)[0][C]; - for (unsigned R = 1; R < Rows; ++R) - if ((*this)[R][C] < MinElem) - MinElem = (*this)[R][C]; - return MinElem; - } - - /// \brief Subtracts the given scalar from the elements of the given row. - Matrix& subFromRow(unsigned R, PBQPNum Val) { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - assert(R < Rows && "Row out of bounds"); - std::transform(Data + (R * Cols), Data + ((R + 1) * Cols), - Data + (R * Cols), - std::bind2nd(std::minus(), Val)); - return *this; - } - - /// \brief Subtracts the given scalar from the elements of the given column. - Matrix& subFromCol(unsigned C, PBQPNum Val) { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - for (unsigned R = 0; R < Rows; ++R) - (*this)[R][C] -= Val; - return *this; - } - - /// \brief Returns true if this is a zero matrix. - bool isZero() const { - assert(Rows != 0 && Cols != 0 && Data != nullptr && "Invalid matrix"); - return find_if(Data, Data + (Rows * Cols), - std::bind2nd(std::not_equal_to(), 0)) == - Data + (Rows * Cols); - } - -private: - unsigned Rows, Cols; - PBQPNum *Data; -}; - -/// \brief Return a hash_code for the given matrix. -inline hash_code hash_value(const Matrix &M) { - unsigned *MBegin = reinterpret_cast(M.Data); - unsigned *MEnd = reinterpret_cast(M.Data + (M.Rows * M.Cols)); - return hash_combine(M.Rows, M.Cols, hash_combine_range(MBegin, MEnd)); -} - -/// \brief Output a textual representation of the given matrix on the given -/// output stream. -template -OStream& operator<<(OStream &OS, const Matrix &M) { - assert((M.getRows() != 0) && "Zero-row matrix badness."); - for (unsigned i = 0; i < M.getRows(); ++i) - OS << M.getRowAsVector(i) << "\n"; - return OS; -} - -template -class MDVector : public Vector { -public: - MDVector(const Vector &v) : Vector(v), md(*this) { } - MDVector(Vector &&v) : Vector(std::move(v)), md(*this) { } - const Metadata& getMetadata() const { return md; } -private: - Metadata md; -}; - -template -inline hash_code hash_value(const MDVector &V) { - return hash_value(static_cast(V)); -} - -template -class MDMatrix : public Matrix { -public: - MDMatrix(const Matrix &m) : Matrix(m), md(*this) { } - MDMatrix(Matrix &&m) : Matrix(std::move(m)), md(*this) { } - const Metadata& getMetadata() const { return md; } -private: - Metadata md; -}; - -template -inline hash_code hash_value(const MDMatrix &M) { - return hash_value(static_cast(M)); -} - -} // namespace PBQP -} // namespace llvm - -#endif // LLVM_CODEGEN_PBQP_MATH_H diff --git a/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h b/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h deleted file mode 100644 index d4a544bf..00000000 --- a/llvm/include/llvm/CodeGen/PBQP/ReductionRules.h +++ /dev/null @@ -1,221 +0,0 @@ -//===----------- ReductionRules.h - Reduction Rules -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Reduction Rules. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PBQP_REDUCTIONRULES_H -#define LLVM_CODEGEN_PBQP_REDUCTIONRULES_H - -#include "Graph.h" -#include "Math.h" -#include "Solution.h" - -namespace llvm { -namespace PBQP { - - /// \brief Reduce a node of degree one. - /// - /// Propagate costs from the given node, which must be of degree one, to its - /// neighbor. Notify the problem domain. - template - void applyR1(GraphT &G, typename GraphT::NodeId NId) { - typedef typename GraphT::NodeId NodeId; - typedef typename GraphT::EdgeId EdgeId; - typedef typename GraphT::Vector Vector; - typedef typename GraphT::Matrix Matrix; - typedef typename GraphT::RawVector RawVector; - - assert(G.getNodeDegree(NId) == 1 && - "R1 applied to node with degree != 1."); - - EdgeId EId = *G.adjEdgeIds(NId).begin(); - NodeId MId = G.getEdgeOtherNodeId(EId, NId); - - const Matrix &ECosts = G.getEdgeCosts(EId); - const Vector &XCosts = G.getNodeCosts(NId); - RawVector YCosts = G.getNodeCosts(MId); - - // Duplicate a little to avoid transposing matrices. - if (NId == G.getEdgeNode1Id(EId)) { - for (unsigned j = 0; j < YCosts.getLength(); ++j) { - PBQPNum Min = ECosts[0][j] + XCosts[0]; - for (unsigned i = 1; i < XCosts.getLength(); ++i) { - PBQPNum C = ECosts[i][j] + XCosts[i]; - if (C < Min) - Min = C; - } - YCosts[j] += Min; - } - } else { - for (unsigned i = 0; i < YCosts.getLength(); ++i) { - PBQPNum Min = ECosts[i][0] + XCosts[0]; - for (unsigned j = 1; j < XCosts.getLength(); ++j) { - PBQPNum C = ECosts[i][j] + XCosts[j]; - if (C < Min) - Min = C; - } - YCosts[i] += Min; - } - } - G.setNodeCosts(MId, YCosts); - G.disconnectEdge(EId, MId); - } - - template - void applyR2(GraphT &G, typename GraphT::NodeId NId) { - typedef typename GraphT::NodeId NodeId; - typedef typename GraphT::EdgeId EdgeId; - typedef typename GraphT::Vector Vector; - typedef typename GraphT::Matrix Matrix; - typedef typename GraphT::RawMatrix RawMatrix; - - assert(G.getNodeDegree(NId) == 2 && - "R2 applied to node with degree != 2."); - - const Vector &XCosts = G.getNodeCosts(NId); - - typename GraphT::AdjEdgeItr AEItr = G.adjEdgeIds(NId).begin(); - EdgeId YXEId = *AEItr, - ZXEId = *(++AEItr); - - NodeId YNId = G.getEdgeOtherNodeId(YXEId, NId), - ZNId = G.getEdgeOtherNodeId(ZXEId, NId); - - bool FlipEdge1 = (G.getEdgeNode1Id(YXEId) == NId), - FlipEdge2 = (G.getEdgeNode1Id(ZXEId) == NId); - - const Matrix *YXECosts = FlipEdge1 ? - new Matrix(G.getEdgeCosts(YXEId).transpose()) : - &G.getEdgeCosts(YXEId); - - const Matrix *ZXECosts = FlipEdge2 ? - new Matrix(G.getEdgeCosts(ZXEId).transpose()) : - &G.getEdgeCosts(ZXEId); - - unsigned XLen = XCosts.getLength(), - YLen = YXECosts->getRows(), - ZLen = ZXECosts->getRows(); - - RawMatrix Delta(YLen, ZLen); - - for (unsigned i = 0; i < YLen; ++i) { - for (unsigned j = 0; j < ZLen; ++j) { - PBQPNum Min = (*YXECosts)[i][0] + (*ZXECosts)[j][0] + XCosts[0]; - for (unsigned k = 1; k < XLen; ++k) { - PBQPNum C = (*YXECosts)[i][k] + (*ZXECosts)[j][k] + XCosts[k]; - if (C < Min) { - Min = C; - } - } - Delta[i][j] = Min; - } - } - - if (FlipEdge1) - delete YXECosts; - - if (FlipEdge2) - delete ZXECosts; - - EdgeId YZEId = G.findEdge(YNId, ZNId); - - if (YZEId == G.invalidEdgeId()) { - YZEId = G.addEdge(YNId, ZNId, Delta); - } else { - const Matrix &YZECosts = G.getEdgeCosts(YZEId); - if (YNId == G.getEdgeNode1Id(YZEId)) { - G.updateEdgeCosts(YZEId, Delta + YZECosts); - } else { - G.updateEdgeCosts(YZEId, Delta.transpose() + YZECosts); - } - } - - G.disconnectEdge(YXEId, YNId); - G.disconnectEdge(ZXEId, ZNId); - - // TODO: Try to normalize newly added/modified edge. - } - -#ifndef NDEBUG - // Does this Cost vector have any register options ? - template - bool hasRegisterOptions(const VectorT &V) { - unsigned VL = V.getLength(); - - // An empty or spill only cost vector does not provide any register option. - if (VL <= 1) - return false; - - // If there are registers in the cost vector, but all of them have infinite - // costs, then ... there is no available register. - for (unsigned i = 1; i < VL; ++i) - if (V[i] != std::numeric_limits::infinity()) - return true; - - return false; - } -#endif - - // \brief Find a solution to a fully reduced graph by backpropagation. - // - // Given a graph and a reduction order, pop each node from the reduction - // order and greedily compute a minimum solution based on the node costs, and - // the dependent costs due to previously solved nodes. - // - // Note - This does not return the graph to its original (pre-reduction) - // state: the existing solvers destructively alter the node and edge - // costs. Given that, the backpropagate function doesn't attempt to - // replace the edges either, but leaves the graph in its reduced - // state. - template - Solution backpropagate(GraphT& G, StackT stack) { - typedef GraphBase::NodeId NodeId; - typedef typename GraphT::Matrix Matrix; - typedef typename GraphT::RawVector RawVector; - - Solution s; - - while (!stack.empty()) { - NodeId NId = stack.back(); - stack.pop_back(); - - RawVector v = G.getNodeCosts(NId); - -#ifndef NDEBUG - // Although a conservatively allocatable node can be allocated to a register, - // spilling it may provide a lower cost solution. Assert here that spilling - // is done by choice, not because there were no register available. - if (G.getNodeMetadata(NId).wasConservativelyAllocatable()) - assert(hasRegisterOptions(v) && "A conservatively allocatable node " - "must have available register options"); -#endif - - for (auto EId : G.adjEdgeIds(NId)) { - const Matrix& edgeCosts = G.getEdgeCosts(EId); - if (NId == G.getEdgeNode1Id(EId)) { - NodeId mId = G.getEdgeNode2Id(EId); - v += edgeCosts.getColAsVector(s.getSelection(mId)); - } else { - NodeId mId = G.getEdgeNode1Id(EId); - v += edgeCosts.getRowAsVector(s.getSelection(mId)); - } - } - - s.setSelection(NId, v.minIndex()); - } - - return s; - } - -} // namespace PBQP -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/PBQP/Solution.h b/llvm/include/llvm/CodeGen/PBQP/Solution.h deleted file mode 100644 index a3bfaeb7..00000000 --- a/llvm/include/llvm/CodeGen/PBQP/Solution.h +++ /dev/null @@ -1,94 +0,0 @@ -//===-- Solution.h ------- PBQP Solution ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// PBQP Solution class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PBQP_SOLUTION_H -#define LLVM_CODEGEN_PBQP_SOLUTION_H - -#include "Graph.h" -#include "Math.h" -#include - -namespace llvm { -namespace PBQP { - - /// \brief Represents a solution to a PBQP problem. - /// - /// To get the selection for each node in the problem use the getSelection method. - class Solution { - private: - - typedef std::map SelectionsMap; - SelectionsMap selections; - - unsigned r0Reductions, r1Reductions, r2Reductions, rNReductions; - - public: - - /// \brief Initialise an empty solution. - Solution() - : r0Reductions(0), r1Reductions(0), r2Reductions(0), rNReductions(0) {} - - /// \brief Number of nodes for which selections have been made. - /// @return Number of nodes for which selections have been made. - unsigned numNodes() const { return selections.size(); } - - /// \brief Records a reduction via the R0 rule. Should be called from the - /// solver only. - void recordR0() { ++r0Reductions; } - - /// \brief Returns the number of R0 reductions applied to solve the problem. - unsigned numR0Reductions() const { return r0Reductions; } - - /// \brief Records a reduction via the R1 rule. Should be called from the - /// solver only. - void recordR1() { ++r1Reductions; } - - /// \brief Returns the number of R1 reductions applied to solve the problem. - unsigned numR1Reductions() const { return r1Reductions; } - - /// \brief Records a reduction via the R2 rule. Should be called from the - /// solver only. - void recordR2() { ++r2Reductions; } - - /// \brief Returns the number of R2 reductions applied to solve the problem. - unsigned numR2Reductions() const { return r2Reductions; } - - /// \brief Records a reduction via the RN rule. Should be called from the - /// solver only. - void recordRN() { ++ rNReductions; } - - /// \brief Returns the number of RN reductions applied to solve the problem. - unsigned numRNReductions() const { return rNReductions; } - - /// \brief Set the selection for a given node. - /// @param nodeId Node id. - /// @param selection Selection for nodeId. - void setSelection(GraphBase::NodeId nodeId, unsigned selection) { - selections[nodeId] = selection; - } - - /// \brief Get a node's selection. - /// @param nodeId Node id. - /// @return The selection for nodeId; - unsigned getSelection(GraphBase::NodeId nodeId) const { - SelectionsMap::const_iterator sItr = selections.find(nodeId); - assert(sItr != selections.end() && "No selection for node."); - return sItr->second; - } - - }; - -} // namespace PBQP -} // namespace llvm - -#endif // LLVM_CODEGEN_PBQP_SOLUTION_H diff --git a/llvm/include/llvm/CodeGen/PBQPRAConstraint.h b/llvm/include/llvm/CodeGen/PBQPRAConstraint.h deleted file mode 100644 index 833b9bad..00000000 --- a/llvm/include/llvm/CodeGen/PBQPRAConstraint.h +++ /dev/null @@ -1,69 +0,0 @@ -//===-- RegAllocPBQP.h ------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the PBQPBuilder interface, for classes which build PBQP -// instances to represent register allocation problems, and the RegAllocPBQP -// interface. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PBQPRACONSTRAINT_H -#define LLVM_CODEGEN_PBQPRACONSTRAINT_H - -#include -#include - -namespace llvm { -namespace PBQP { -namespace RegAlloc { -// Forward declare PBQP graph class. -class PBQPRAGraph; -} -} - -class LiveIntervals; -class MachineBlockFrequencyInfo; -class MachineFunction; -class TargetRegisterInfo; - -typedef PBQP::RegAlloc::PBQPRAGraph PBQPRAGraph; - -/// @brief Abstract base for classes implementing PBQP register allocation -/// constraints (e.g. Spill-costs, interference, coalescing). -class PBQPRAConstraint { -public: - virtual ~PBQPRAConstraint() = 0; - virtual void apply(PBQPRAGraph &G) = 0; -private: - virtual void anchor(); -}; - -/// @brief PBQP register allocation constraint composer. -/// -/// Constraints added to this list will be applied, in the order that they are -/// added, to the PBQP graph. -class PBQPRAConstraintList : public PBQPRAConstraint { -public: - void apply(PBQPRAGraph &G) override { - for (auto &C : Constraints) - C->apply(G); - } - - void addConstraint(std::unique_ptr C) { - if (C) - Constraints.push_back(std::move(C)); - } -private: - std::vector> Constraints; - void anchor() override; -}; - -} - -#endif /* LLVM_CODEGEN_PBQPRACONSTRAINT_H */ diff --git a/llvm/include/llvm/CodeGen/ParallelCG.h b/llvm/include/llvm/CodeGen/ParallelCG.h deleted file mode 100644 index 14ef0ec4..00000000 --- a/llvm/include/llvm/CodeGen/ParallelCG.h +++ /dev/null @@ -1,48 +0,0 @@ -//===-- llvm/CodeGen/ParallelCG.h - Parallel code generation ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header declares functions that can be used for parallel code generation. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PARALLELCG_H -#define LLVM_CODEGEN_PARALLELCG_H - -#include "llvm/Support/CodeGen.h" -#include "llvm/Target/TargetMachine.h" - -#include - -namespace llvm { - -template class ArrayRef; -class Module; -class TargetOptions; -class raw_pwrite_stream; - -/// Split M into OSs.size() partitions, and generate code for each. Takes a -/// factory function for the TargetMachine TMFactory. Writes OSs.size() output -/// files to the output streams in OSs. The resulting output files if linked -/// together are intended to be equivalent to the single output file that would -/// have been code generated from M. -/// -/// Writes bitcode for individual partitions into output streams in BCOSs, if -/// BCOSs is not empty. -/// -/// \returns M if OSs.size() == 1, otherwise returns std::unique_ptr(). -std::unique_ptr -splitCodeGen(std::unique_ptr M, ArrayRef OSs, - ArrayRef BCOSs, - const std::function()> &TMFactory, - TargetMachine::CodeGenFileType FT = TargetMachine::CGFT_ObjectFile, - bool PreserveLocals = false); - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/Passes.h b/llvm/include/llvm/CodeGen/Passes.h deleted file mode 100644 index ae9e5dfe..00000000 --- a/llvm/include/llvm/CodeGen/Passes.h +++ /dev/null @@ -1,408 +0,0 @@ -//===-- Passes.h - Target independent code generation passes ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines interfaces to access the target independent code generation -// passes provided by the LLVM backend. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PASSES_H -#define LLVM_CODEGEN_PASSES_H - -#include -#include - -namespace llvm { - -class Function; -class FunctionPass; -class MachineFunctionPass; -class ModulePass; -class Pass; -class TargetMachine; -class TargetRegisterClass; -class raw_ostream; - -} // End llvm namespace - -/// List of target independent CodeGen pass IDs. -namespace llvm { - FunctionPass *createAtomicExpandPass(const TargetMachine *TM); - - /// createUnreachableBlockEliminationPass - The LLVM code generator does not - /// work well with unreachable basic blocks (what live ranges make sense for a - /// block that cannot be reached?). As such, a code generator should either - /// not instruction select unreachable blocks, or run this pass as its - /// last LLVM modifying pass to clean up blocks that are not reachable from - /// the entry block. - FunctionPass *createUnreachableBlockEliminationPass(); - - /// MachineFunctionPrinter pass - This pass prints out the machine function to - /// the given stream as a debugging tool. - MachineFunctionPass * - createMachineFunctionPrinterPass(raw_ostream &OS, - const std::string &Banner =""); - - /// MIRPrinting pass - this pass prints out the LLVM IR into the given stream - /// using the MIR serialization format. - MachineFunctionPass *createPrintMIRPass(raw_ostream &OS); - - /// createCodeGenPreparePass - Transform the code to expose more pattern - /// matching during instruction selection. - FunctionPass *createCodeGenPreparePass(const TargetMachine *TM = nullptr); - - /// AtomicExpandID -- Lowers atomic operations in terms of either cmpxchg - /// load-linked/store-conditional loops. - extern char &AtomicExpandID; - - /// MachineLoopInfo - This pass is a loop analysis pass. - extern char &MachineLoopInfoID; - - /// MachineDominators - This pass is a machine dominators analysis pass. - extern char &MachineDominatorsID; - -/// MachineDominanaceFrontier - This pass is a machine dominators analysis pass. - extern char &MachineDominanceFrontierID; - - /// EdgeBundles analysis - Bundle machine CFG edges. - extern char &EdgeBundlesID; - - /// LiveVariables pass - This pass computes the set of blocks in which each - /// variable is life and sets machine operand kill flags. - extern char &LiveVariablesID; - - /// PHIElimination - This pass eliminates machine instruction PHI nodes - /// by inserting copy instructions. This destroys SSA information, but is the - /// desired input for some register allocators. This pass is "required" by - /// these register allocator like this: AU.addRequiredID(PHIEliminationID); - extern char &PHIEliminationID; - - /// LiveIntervals - This analysis keeps track of the live ranges of virtual - /// and physical registers. - extern char &LiveIntervalsID; - - /// LiveStacks pass. An analysis keeping track of the liveness of stack slots. - extern char &LiveStacksID; - - /// TwoAddressInstruction - This pass reduces two-address instructions to - /// use two operands. This destroys SSA information but it is desired by - /// register allocators. - extern char &TwoAddressInstructionPassID; - - /// ProcessImpicitDefs pass - This pass removes IMPLICIT_DEFs. - extern char &ProcessImplicitDefsID; - - /// RegisterCoalescer - This pass merges live ranges to eliminate copies. - extern char &RegisterCoalescerID; - - /// MachineScheduler - This pass schedules machine instructions. - extern char &MachineSchedulerID; - - /// PostMachineScheduler - This pass schedules machine instructions postRA. - extern char &PostMachineSchedulerID; - - /// SpillPlacement analysis. Suggest optimal placement of spill code between - /// basic blocks. - extern char &SpillPlacementID; - - /// ShrinkWrap pass. Look for the best place to insert save and restore - // instruction and update the MachineFunctionInfo with that information. - extern char &ShrinkWrapID; - - /// VirtRegRewriter pass. Rewrite virtual registers to physical registers as - /// assigned in VirtRegMap. - extern char &VirtRegRewriterID; - - /// UnreachableMachineBlockElimination - This pass removes unreachable - /// machine basic blocks. - extern char &UnreachableMachineBlockElimID; - - /// DeadMachineInstructionElim - This pass removes dead machine instructions. - extern char &DeadMachineInstructionElimID; - - /// This pass adds dead/undef flags after analyzing subregister lanes. - extern char &DetectDeadLanesID; - - /// FastRegisterAllocation Pass - This pass register allocates as fast as - /// possible. It is best suited for debug code where live ranges are short. - /// - FunctionPass *createFastRegisterAllocator(); - - /// BasicRegisterAllocation Pass - This pass implements a degenerate global - /// register allocator using the basic regalloc framework. - /// - FunctionPass *createBasicRegisterAllocator(); - - /// Greedy register allocation pass - This pass implements a global register - /// allocator for optimized builds. - /// - FunctionPass *createGreedyRegisterAllocator(); - - /// PBQPRegisterAllocation Pass - This pass implements the Partitioned Boolean - /// Quadratic Prograaming (PBQP) based register allocator. - /// - FunctionPass *createDefaultPBQPRegisterAllocator(); - - /// PrologEpilogCodeInserter - This pass inserts prolog and epilog code, - /// and eliminates abstract frame references. - extern char &PrologEpilogCodeInserterID; - MachineFunctionPass *createPrologEpilogInserterPass(const TargetMachine *TM); - - /// ExpandPostRAPseudos - This pass expands pseudo instructions after - /// register allocation. - extern char &ExpandPostRAPseudosID; - - /// createPostRAHazardRecognizer - This pass runs the post-ra hazard - /// recognizer. - extern char &PostRAHazardRecognizerID; - - /// createPostRAScheduler - This pass performs post register allocation - /// scheduling. - extern char &PostRASchedulerID; - - /// BranchFolding - This pass performs machine code CFG based - /// optimizations to delete branches to branches, eliminate branches to - /// successor blocks (creating fall throughs), and eliminating branches over - /// branches. - extern char &BranchFolderPassID; - - /// MachineFunctionPrinterPass - This pass prints out MachineInstr's. - extern char &MachineFunctionPrinterPassID; - - /// MIRPrintingPass - this pass prints out the LLVM IR using the MIR - /// serialization format. - extern char &MIRPrintingPassID; - - /// TailDuplicate - Duplicate blocks with unconditional branches - /// into tails of their predecessors. - extern char &TailDuplicateID; - - /// MachineTraceMetrics - This pass computes critical path and CPU resource - /// usage in an ensemble of traces. - extern char &MachineTraceMetricsID; - - /// EarlyIfConverter - This pass performs if-conversion on SSA form by - /// inserting cmov instructions. - extern char &EarlyIfConverterID; - - /// This pass performs instruction combining using trace metrics to estimate - /// critical-path and resource depth. - extern char &MachineCombinerID; - - /// StackSlotColoring - This pass performs stack coloring and merging. - /// It merges disjoint allocas to reduce the stack size. - extern char &StackColoringID; - - /// IfConverter - This pass performs machine code if conversion. - extern char &IfConverterID; - - FunctionPass *createIfConverter(std::function Ftor); - - /// MachineBlockPlacement - This pass places basic blocks based on branch - /// probabilities. - extern char &MachineBlockPlacementID; - - /// MachineBlockPlacementStats - This pass collects statistics about the - /// basic block placement using branch probabilities and block frequency - /// information. - extern char &MachineBlockPlacementStatsID; - - /// GCLowering Pass - Used by gc.root to perform its default lowering - /// operations. - FunctionPass *createGCLoweringPass(); - - /// ShadowStackGCLowering - Implements the custom lowering mechanism - /// used by the shadow stack GC. Only runs on functions which opt in to - /// the shadow stack collector. - FunctionPass *createShadowStackGCLoweringPass(); - - /// GCMachineCodeAnalysis - Target-independent pass to mark safe points - /// in machine code. Must be added very late during code generation, just - /// prior to output, and importantly after all CFG transformations (such as - /// branch folding). - extern char &GCMachineCodeAnalysisID; - - /// Creates a pass to print GC metadata. - /// - FunctionPass *createGCInfoPrinter(raw_ostream &OS); - - /// MachineCSE - This pass performs global CSE on machine instructions. - extern char &MachineCSEID; - - /// ImplicitNullChecks - This pass folds null pointer checks into nearby - /// memory operations. - extern char &ImplicitNullChecksID; - - /// MachineLICM - This pass performs LICM on machine instructions. - extern char &MachineLICMID; - - /// MachineSinking - This pass performs sinking on machine instructions. - extern char &MachineSinkingID; - - /// MachineCopyPropagation - This pass performs copy propagation on - /// machine instructions. - extern char &MachineCopyPropagationID; - - /// PeepholeOptimizer - This pass performs peephole optimizations - - /// like extension and comparison eliminations. - extern char &PeepholeOptimizerID; - - /// OptimizePHIs - This pass optimizes machine instruction PHIs - /// to take advantage of opportunities created during DAG legalization. - extern char &OptimizePHIsID; - - /// StackSlotColoring - This pass performs stack slot coloring. - extern char &StackSlotColoringID; - - /// \brief This pass lays out funclets contiguously. - extern char &FuncletLayoutID; - - /// This pass inserts the XRay instrumentation sleds if they are supported by - /// the target platform. - extern char &XRayInstrumentationID; - - /// \brief This pass implements the "patchable-function" attribute. - extern char &PatchableFunctionID; - - /// createStackProtectorPass - This pass adds stack protectors to functions. - /// - FunctionPass *createStackProtectorPass(const TargetMachine *TM); - - /// createMachineVerifierPass - This pass verifies cenerated machine code - /// instructions for correctness. - /// - FunctionPass *createMachineVerifierPass(const std::string& Banner); - - /// createDwarfEHPass - This pass mulches exception handling code into a form - /// adapted to code generation. Required if using dwarf exception handling. - FunctionPass *createDwarfEHPass(const TargetMachine *TM); - - /// createWinEHPass - Prepares personality functions used by MSVC on Windows, - /// in addition to the Itanium LSDA based personalities. - FunctionPass *createWinEHPass(const TargetMachine *TM); - - /// createSjLjEHPreparePass - This pass adapts exception handling code to use - /// the GCC-style builtin setjmp/longjmp (sjlj) to handling EH control flow. - /// - FunctionPass *createSjLjEHPreparePass(); - - /// LocalStackSlotAllocation - This pass assigns local frame indices to stack - /// slots relative to one another and allocates base registers to access them - /// when it is estimated by the target to be out of range of normal frame - /// pointer or stack pointer index addressing. - extern char &LocalStackSlotAllocationID; - - /// ExpandISelPseudos - This pass expands pseudo-instructions. - extern char &ExpandISelPseudosID; - - /// createExecutionDependencyFixPass - This pass fixes execution time - /// problems with dependent instructions, such as switching execution - /// domains to match. - /// - /// The pass will examine instructions using and defining registers in RC. - /// - FunctionPass *createExecutionDependencyFixPass(const TargetRegisterClass *RC); - - /// UnpackMachineBundles - This pass unpack machine instruction bundles. - extern char &UnpackMachineBundlesID; - - FunctionPass * - createUnpackMachineBundles(std::function Ftor); - - /// FinalizeMachineBundles - This pass finalize machine instruction - /// bundles (created earlier, e.g. during pre-RA scheduling). - extern char &FinalizeMachineBundlesID; - - /// StackMapLiveness - This pass analyses the register live-out set of - /// stackmap/patchpoint intrinsics and attaches the calculated information to - /// the intrinsic for later emission to the StackMap. - extern char &StackMapLivenessID; - - /// LiveDebugValues pass - extern char &LiveDebugValuesID; - - /// createJumpInstrTables - This pass creates jump-instruction tables. - ModulePass *createJumpInstrTablesPass(); - - /// createForwardControlFlowIntegrityPass - This pass adds control-flow - /// integrity. - ModulePass *createForwardControlFlowIntegrityPass(); - - /// InterleavedAccess Pass - This pass identifies and matches interleaved - /// memory accesses to target specific intrinsics. - /// - FunctionPass *createInterleavedAccessPass(const TargetMachine *TM); - - /// LowerEmuTLS - This pass generates __emutls_[vt].xyz variables for all - /// TLS variables for the emulated TLS model. - /// - ModulePass *createLowerEmuTLSPass(const TargetMachine *TM); - - /// This pass lowers the @llvm.load.relative intrinsic to instructions. - /// This is unsafe to do earlier because a pass may combine the constant - /// initializer into the load, which may result in an overflowing evaluation. - ModulePass *createPreISelIntrinsicLoweringPass(); - - /// GlobalMerge - This pass merges internal (by default) globals into structs - /// to enable reuse of a base pointer by indexed addressing modes. - /// It can also be configured to focus on size optimizations only. - /// - Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset, - bool OnlyOptimizeForSize = false, - bool MergeExternalByDefault = false); - - /// This pass splits the stack into a safe stack and an unsafe stack to - /// protect against stack-based overflow vulnerabilities. - FunctionPass *createSafeStackPass(const TargetMachine *TM = nullptr); - - /// This pass detects subregister lanes in a virtual register that are used - /// independently of other lanes and splits them into separate virtual - /// registers. - extern char &RenameIndependentSubregsID; - - /// This pass is executed POST-RA to collect which physical registers are - /// preserved by given machine function. - FunctionPass *createRegUsageInfoCollector(); - - /// Return a MachineFunction pass that identifies call sites - /// and propagates register usage information of callee to caller - /// if available with PysicalRegisterUsageInfo pass. - FunctionPass *createRegUsageInfoPropPass(); -} // End llvm namespace - -/// Target machine pass initializer for passes with dependencies. Use with -/// INITIALIZE_TM_PASS_END. -#define INITIALIZE_TM_PASS_BEGIN INITIALIZE_PASS_BEGIN - -/// Target machine pass initializer for passes with dependencies. Use with -/// INITIALIZE_TM_PASS_BEGIN. -#define INITIALIZE_TM_PASS_END(passName, arg, name, cfg, analysis) \ - PassInfo *PI = new PassInfo( \ - name, arg, &passName::ID, \ - PassInfo::NormalCtor_t(callDefaultCtor), cfg, analysis, \ - PassInfo::TargetMachineCtor_t(callTargetMachineCtor)); \ - Registry.registerPass(*PI, true); \ - return PI; \ - } \ - LLVM_DEFINE_ONCE_FLAG(Initialize##passName##PassFlag); \ - void llvm::initialize##passName##Pass(PassRegistry &Registry) { \ - llvm::call_once(Initialize##passName##PassFlag, \ - initialize##passName##PassOnce, std::ref(Registry)); \ - } - -/// This initializer registers TargetMachine constructor, so the pass being -/// initialized can use target dependent interfaces. Please do not move this -/// macro to be together with INITIALIZE_PASS, which is a complete target -/// independent initializer, and we don't want to make libScalarOpts depend -/// on libCodeGen. -#define INITIALIZE_TM_PASS(passName, arg, name, cfg, analysis) \ - INITIALIZE_TM_PASS_BEGIN(passName, arg, name, cfg, analysis) \ - INITIALIZE_TM_PASS_END(passName, arg, name, cfg, analysis) - -#endif diff --git a/llvm/include/llvm/CodeGen/PreISelIntrinsicLowering.h b/llvm/include/llvm/CodeGen/PreISelIntrinsicLowering.h deleted file mode 100644 index 765ca085..00000000 --- a/llvm/include/llvm/CodeGen/PreISelIntrinsicLowering.h +++ /dev/null @@ -1,26 +0,0 @@ -//===--- PreISelIntrinsicLowering.h - Pre-ISel intrinsic lowering pass ----===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This pass implements IR lowering for the llvm.load.relative intrinsic. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_CODEGEN_PREISELINTRINSICLOWERING_H -#define LLVM_CODEGEN_PREISELINTRINSICLOWERING_H - -#include "llvm/IR/PassManager.h" - -namespace llvm { - -struct PreISelIntrinsicLoweringPass - : PassInfoMixin { - PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); -}; -} - -#endif // LLVM_CODEGEN_PREISELINTRINSICLOWERING_H diff --git a/llvm/include/llvm/CodeGen/PseudoSourceValue.h b/llvm/include/llvm/CodeGen/PseudoSourceValue.h deleted file mode 100644 index c3f6fde9..00000000 --- a/llvm/include/llvm/CodeGen/PseudoSourceValue.h +++ /dev/null @@ -1,187 +0,0 @@ -//===-- llvm/CodeGen/PseudoSourceValue.h ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the PseudoSourceValue class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PSEUDOSOURCEVALUE_H -#define LLVM_CODEGEN_PSEUDOSOURCEVALUE_H - -#include "llvm/ADT/StringMap.h" -#include "llvm/IR/GlobalValue.h" -#include "llvm/IR/Value.h" -#include "llvm/IR/ValueMap.h" -#include - -namespace llvm { - -class MachineFrameInfo; -class MachineMemOperand; -class raw_ostream; - -raw_ostream &operator<<(raw_ostream &OS, const MachineMemOperand &MMO); -class PseudoSourceValue; -raw_ostream &operator<<(raw_ostream &OS, const PseudoSourceValue* PSV); - -/// Special value supplied for machine level alias analysis. It indicates that -/// a memory access references the functions stack frame (e.g., a spill slot), -/// below the stack frame (e.g., argument space), or constant pool. -class PseudoSourceValue { -public: - enum PSVKind { - Stack, - GOT, - JumpTable, - ConstantPool, - FixedStack, - GlobalValueCallEntry, - ExternalSymbolCallEntry - }; - -private: - PSVKind Kind; - friend raw_ostream &llvm::operator<<(raw_ostream &OS, - const PseudoSourceValue* PSV); - - friend class MachineMemOperand; // For printCustom(). - - /// Implement printing for PseudoSourceValue. This is called from - /// Value::print or Value's operator<<. - virtual void printCustom(raw_ostream &O) const; - -public: - explicit PseudoSourceValue(PSVKind Kind); - - virtual ~PseudoSourceValue(); - - PSVKind kind() const { return Kind; } - - bool isStack() const { return Kind == Stack; } - bool isGOT() const { return Kind == GOT; } - bool isConstantPool() const { return Kind == ConstantPool; } - bool isJumpTable() const { return Kind == JumpTable; } - - /// Test whether the memory pointed to by this PseudoSourceValue has a - /// constant value. - virtual bool isConstant(const MachineFrameInfo *) const; - - /// Test whether the memory pointed to by this PseudoSourceValue may also be - /// pointed to by an LLVM IR Value. - virtual bool isAliased(const MachineFrameInfo *) const; - - /// Return true if the memory pointed to by this PseudoSourceValue can ever - /// alias an LLVM IR Value. - virtual bool mayAlias(const MachineFrameInfo *) const; -}; - -/// A specialized PseudoSourceValue for holding FixedStack values, which must -/// include a frame index. -class FixedStackPseudoSourceValue : public PseudoSourceValue { - const int FI; - -public: - explicit FixedStackPseudoSourceValue(int FI) - : PseudoSourceValue(FixedStack), FI(FI) {} - - static inline bool classof(const PseudoSourceValue *V) { - return V->kind() == FixedStack; - } - - bool isConstant(const MachineFrameInfo *MFI) const override; - - bool isAliased(const MachineFrameInfo *MFI) const override; - - bool mayAlias(const MachineFrameInfo *) const override; - - void printCustom(raw_ostream &OS) const override; - - int getFrameIndex() const { return FI; } -}; - -class CallEntryPseudoSourceValue : public PseudoSourceValue { -protected: - CallEntryPseudoSourceValue(PSVKind Kind); - -public: - bool isConstant(const MachineFrameInfo *) const override; - bool isAliased(const MachineFrameInfo *) const override; - bool mayAlias(const MachineFrameInfo *) const override; -}; - -/// A specialized pseudo soruce value for holding GlobalValue values. -class GlobalValuePseudoSourceValue : public CallEntryPseudoSourceValue { - const GlobalValue *GV; - -public: - GlobalValuePseudoSourceValue(const GlobalValue *GV); - - static inline bool classof(const PseudoSourceValue *V) { - return V->kind() == GlobalValueCallEntry; - } - - const GlobalValue *getValue() const { return GV; } -}; - -/// A specialized pseudo source value for holding external symbol values. -class ExternalSymbolPseudoSourceValue : public CallEntryPseudoSourceValue { - const char *ES; - -public: - ExternalSymbolPseudoSourceValue(const char *ES); - - static inline bool classof(const PseudoSourceValue *V) { - return V->kind() == ExternalSymbolCallEntry; - } - - const char *getSymbol() const { return ES; } -}; - -/// Manages creation of pseudo source values. -class PseudoSourceValueManager { - const PseudoSourceValue StackPSV, GOTPSV, JumpTablePSV, ConstantPoolPSV; - std::map> FSValues; - StringMap> - ExternalCallEntries; - ValueMap> - GlobalCallEntries; - -public: - PseudoSourceValueManager(); - - /// Return a pseudo source value referencing the area below the stack frame of - /// a function, e.g., the argument space. - const PseudoSourceValue *getStack(); - - /// Return a pseudo source value referencing the global offset table - /// (or something the like). - const PseudoSourceValue *getGOT(); - - /// Return a pseudo source value referencing the constant pool. Since constant - /// pools are constant, this doesn't need to identify a specific constant - /// pool entry. - const PseudoSourceValue *getConstantPool(); - - /// Return a pseudo source value referencing a jump table. Since jump tables - /// are constant, this doesn't need to identify a specific jump table. - const PseudoSourceValue *getJumpTable(); - - /// Return a pseudo source value referencing a fixed stack frame entry, - /// e.g., a spill slot. - const PseudoSourceValue *getFixedStack(int FI); - - const PseudoSourceValue *getGlobalValueCallEntry(const GlobalValue *GV); - - const PseudoSourceValue *getExternalSymbolCallEntry(const char *ES); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/RegAllocPBQP.h b/llvm/include/llvm/CodeGen/RegAllocPBQP.h deleted file mode 100644 index 21952272..00000000 --- a/llvm/include/llvm/CodeGen/RegAllocPBQP.h +++ /dev/null @@ -1,599 +0,0 @@ -//===-- RegAllocPBQP.h ------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the PBQPBuilder interface, for classes which build PBQP -// instances to represent register allocation problems, and the RegAllocPBQP -// interface. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_REGALLOCPBQP_H -#define LLVM_CODEGEN_REGALLOCPBQP_H - -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/PBQP/CostAllocator.h" -#include "llvm/CodeGen/PBQP/ReductionRules.h" -#include "llvm/CodeGen/PBQPRAConstraint.h" -#include "llvm/Support/ErrorHandling.h" -#include - -namespace llvm { - -class raw_ostream; - -namespace PBQP { -namespace RegAlloc { - -/// @brief Spill option index. -inline unsigned getSpillOptionIdx() { return 0; } - -/// \brief Metadata to speed allocatability test. -/// -/// Keeps track of the number of infinities in each row and column. -class MatrixMetadata { -private: - MatrixMetadata(const MatrixMetadata&); - void operator=(const MatrixMetadata&); -public: - MatrixMetadata(const Matrix& M) - : WorstRow(0), WorstCol(0), - UnsafeRows(new bool[M.getRows() - 1]()), - UnsafeCols(new bool[M.getCols() - 1]()) { - - unsigned* ColCounts = new unsigned[M.getCols() - 1](); - - for (unsigned i = 1; i < M.getRows(); ++i) { - unsigned RowCount = 0; - for (unsigned j = 1; j < M.getCols(); ++j) { - if (M[i][j] == std::numeric_limits::infinity()) { - ++RowCount; - ++ColCounts[j - 1]; - UnsafeRows[i - 1] = true; - UnsafeCols[j - 1] = true; - } - } - WorstRow = std::max(WorstRow, RowCount); - } - unsigned WorstColCountForCurRow = - *std::max_element(ColCounts, ColCounts + M.getCols() - 1); - WorstCol = std::max(WorstCol, WorstColCountForCurRow); - delete[] ColCounts; - } - - unsigned getWorstRow() const { return WorstRow; } - unsigned getWorstCol() const { return WorstCol; } - const bool* getUnsafeRows() const { return UnsafeRows.get(); } - const bool* getUnsafeCols() const { return UnsafeCols.get(); } - -private: - unsigned WorstRow, WorstCol; - std::unique_ptr UnsafeRows; - std::unique_ptr UnsafeCols; -}; - -/// \brief Holds a vector of the allowed physical regs for a vreg. -class AllowedRegVector { - friend hash_code hash_value(const AllowedRegVector &); -public: - - AllowedRegVector() : NumOpts(0), Opts(nullptr) {} - - AllowedRegVector(const std::vector &OptVec) - : NumOpts(OptVec.size()), Opts(new unsigned[NumOpts]) { - std::copy(OptVec.begin(), OptVec.end(), Opts.get()); - } - - AllowedRegVector(const AllowedRegVector &Other) - : NumOpts(Other.NumOpts), Opts(new unsigned[NumOpts]) { - std::copy(Other.Opts.get(), Other.Opts.get() + NumOpts, Opts.get()); - } - - AllowedRegVector(AllowedRegVector &&Other) - : NumOpts(std::move(Other.NumOpts)), Opts(std::move(Other.Opts)) {} - - AllowedRegVector& operator=(const AllowedRegVector &Other) { - NumOpts = Other.NumOpts; - Opts.reset(new unsigned[NumOpts]); - std::copy(Other.Opts.get(), Other.Opts.get() + NumOpts, Opts.get()); - return *this; - } - - AllowedRegVector& operator=(AllowedRegVector &&Other) { - NumOpts = std::move(Other.NumOpts); - Opts = std::move(Other.Opts); - return *this; - } - - unsigned size() const { return NumOpts; } - unsigned operator[](size_t I) const { return Opts[I]; } - - bool operator==(const AllowedRegVector &Other) const { - if (NumOpts != Other.NumOpts) - return false; - return std::equal(Opts.get(), Opts.get() + NumOpts, Other.Opts.get()); - } - - bool operator!=(const AllowedRegVector &Other) const { - return !(*this == Other); - } - -private: - unsigned NumOpts; - std::unique_ptr Opts; -}; - -inline hash_code hash_value(const AllowedRegVector &OptRegs) { - unsigned *OStart = OptRegs.Opts.get(); - unsigned *OEnd = OptRegs.Opts.get() + OptRegs.NumOpts; - return hash_combine(OptRegs.NumOpts, - hash_combine_range(OStart, OEnd)); -} - -/// \brief Holds graph-level metadata relevant to PBQP RA problems. -class GraphMetadata { -private: - typedef ValuePool AllowedRegVecPool; -public: - - typedef AllowedRegVecPool::PoolRef AllowedRegVecRef; - - GraphMetadata(MachineFunction &MF, - LiveIntervals &LIS, - MachineBlockFrequencyInfo &MBFI) - : MF(MF), LIS(LIS), MBFI(MBFI) {} - - MachineFunction &MF; - LiveIntervals &LIS; - MachineBlockFrequencyInfo &MBFI; - - void setNodeIdForVReg(unsigned VReg, GraphBase::NodeId NId) { - VRegToNodeId[VReg] = NId; - } - - GraphBase::NodeId getNodeIdForVReg(unsigned VReg) const { - auto VRegItr = VRegToNodeId.find(VReg); - if (VRegItr == VRegToNodeId.end()) - return GraphBase::invalidNodeId(); - return VRegItr->second; - } - - void eraseNodeIdForVReg(unsigned VReg) { - VRegToNodeId.erase(VReg); - } - - AllowedRegVecRef getAllowedRegs(AllowedRegVector Allowed) { - return AllowedRegVecs.getValue(std::move(Allowed)); - } - -private: - DenseMap VRegToNodeId; - AllowedRegVecPool AllowedRegVecs; -}; - -/// \brief Holds solver state and other metadata relevant to each PBQP RA node. -class NodeMetadata { -public: - typedef RegAlloc::AllowedRegVector AllowedRegVector; - - // The node's reduction state. The order in this enum is important, - // as it is assumed nodes can only progress up (i.e. towards being - // optimally reducible) when reducing the graph. - typedef enum { - Unprocessed, - NotProvablyAllocatable, - ConservativelyAllocatable, - OptimallyReducible - } ReductionState; - - NodeMetadata() - : RS(Unprocessed), NumOpts(0), DeniedOpts(0), OptUnsafeEdges(nullptr), - VReg(0) -#ifndef NDEBUG - , everConservativelyAllocatable(false) -#endif - {} - - // FIXME: Re-implementing default behavior to work around MSVC. Remove once - // MSVC synthesizes move constructors properly. - NodeMetadata(const NodeMetadata &Other) - : RS(Other.RS), NumOpts(Other.NumOpts), DeniedOpts(Other.DeniedOpts), - OptUnsafeEdges(new unsigned[NumOpts]), VReg(Other.VReg), - AllowedRegs(Other.AllowedRegs) -#ifndef NDEBUG - , everConservativelyAllocatable(Other.everConservativelyAllocatable) -#endif - { - if (NumOpts > 0) { - std::copy(&Other.OptUnsafeEdges[0], &Other.OptUnsafeEdges[NumOpts], - &OptUnsafeEdges[0]); - } - } - - // FIXME: Re-implementing default behavior to work around MSVC. Remove once - // MSVC synthesizes move constructors properly. - NodeMetadata(NodeMetadata &&Other) - : RS(Other.RS), NumOpts(Other.NumOpts), DeniedOpts(Other.DeniedOpts), - OptUnsafeEdges(std::move(Other.OptUnsafeEdges)), VReg(Other.VReg), - AllowedRegs(std::move(Other.AllowedRegs)) -#ifndef NDEBUG - , everConservativelyAllocatable(Other.everConservativelyAllocatable) -#endif - {} - - // FIXME: Re-implementing default behavior to work around MSVC. Remove once - // MSVC synthesizes move constructors properly. - NodeMetadata& operator=(const NodeMetadata &Other) { - RS = Other.RS; - NumOpts = Other.NumOpts; - DeniedOpts = Other.DeniedOpts; - OptUnsafeEdges.reset(new unsigned[NumOpts]); - std::copy(Other.OptUnsafeEdges.get(), Other.OptUnsafeEdges.get() + NumOpts, - OptUnsafeEdges.get()); - VReg = Other.VReg; - AllowedRegs = Other.AllowedRegs; -#ifndef NDEBUG - everConservativelyAllocatable = Other.everConservativelyAllocatable; -#endif - return *this; - } - - // FIXME: Re-implementing default behavior to work around MSVC. Remove once - // MSVC synthesizes move constructors properly. - NodeMetadata& operator=(NodeMetadata &&Other) { - RS = Other.RS; - NumOpts = Other.NumOpts; - DeniedOpts = Other.DeniedOpts; - OptUnsafeEdges = std::move(Other.OptUnsafeEdges); - VReg = Other.VReg; - AllowedRegs = std::move(Other.AllowedRegs); -#ifndef NDEBUG - everConservativelyAllocatable = Other.everConservativelyAllocatable; -#endif - return *this; - } - - void setVReg(unsigned VReg) { this->VReg = VReg; } - unsigned getVReg() const { return VReg; } - - void setAllowedRegs(GraphMetadata::AllowedRegVecRef AllowedRegs) { - this->AllowedRegs = std::move(AllowedRegs); - } - const AllowedRegVector& getAllowedRegs() const { return *AllowedRegs; } - - void setup(const Vector& Costs) { - NumOpts = Costs.getLength() - 1; - OptUnsafeEdges = std::unique_ptr(new unsigned[NumOpts]()); - } - - ReductionState getReductionState() const { return RS; } - void setReductionState(ReductionState RS) { - assert(RS >= this->RS && "A node's reduction state can not be downgraded"); - this->RS = RS; - -#ifndef NDEBUG - // Remember this state to assert later that a non-infinite register - // option was available. - if (RS == ConservativelyAllocatable) - everConservativelyAllocatable = true; -#endif - } - - - void handleAddEdge(const MatrixMetadata& MD, bool Transpose) { - DeniedOpts += Transpose ? MD.getWorstRow() : MD.getWorstCol(); - const bool* UnsafeOpts = - Transpose ? MD.getUnsafeCols() : MD.getUnsafeRows(); - for (unsigned i = 0; i < NumOpts; ++i) - OptUnsafeEdges[i] += UnsafeOpts[i]; - } - - void handleRemoveEdge(const MatrixMetadata& MD, bool Transpose) { - DeniedOpts -= Transpose ? MD.getWorstRow() : MD.getWorstCol(); - const bool* UnsafeOpts = - Transpose ? MD.getUnsafeCols() : MD.getUnsafeRows(); - for (unsigned i = 0; i < NumOpts; ++i) - OptUnsafeEdges[i] -= UnsafeOpts[i]; - } - - bool isConservativelyAllocatable() const { - return (DeniedOpts < NumOpts) || - (std::find(&OptUnsafeEdges[0], &OptUnsafeEdges[NumOpts], 0) != - &OptUnsafeEdges[NumOpts]); - } - -#ifndef NDEBUG - bool wasConservativelyAllocatable() const { - return everConservativelyAllocatable; - } -#endif - -private: - ReductionState RS; - unsigned NumOpts; - unsigned DeniedOpts; - std::unique_ptr OptUnsafeEdges; - unsigned VReg; - GraphMetadata::AllowedRegVecRef AllowedRegs; - -#ifndef NDEBUG - bool everConservativelyAllocatable; -#endif -}; - -class RegAllocSolverImpl { -private: - typedef MDMatrix RAMatrix; -public: - typedef PBQP::Vector RawVector; - typedef PBQP::Matrix RawMatrix; - typedef PBQP::Vector Vector; - typedef RAMatrix Matrix; - typedef PBQP::PoolCostAllocator CostAllocator; - - typedef GraphBase::NodeId NodeId; - typedef GraphBase::EdgeId EdgeId; - - typedef RegAlloc::NodeMetadata NodeMetadata; - struct EdgeMetadata { }; - typedef RegAlloc::GraphMetadata GraphMetadata; - - typedef PBQP::Graph Graph; - - RegAllocSolverImpl(Graph &G) : G(G) {} - - Solution solve() { - G.setSolver(*this); - Solution S; - setup(); - S = backpropagate(G, reduce()); - G.unsetSolver(); - return S; - } - - void handleAddNode(NodeId NId) { - assert(G.getNodeCosts(NId).getLength() > 1 && - "PBQP Graph should not contain single or zero-option nodes"); - G.getNodeMetadata(NId).setup(G.getNodeCosts(NId)); - } - void handleRemoveNode(NodeId NId) {} - void handleSetNodeCosts(NodeId NId, const Vector& newCosts) {} - - void handleAddEdge(EdgeId EId) { - handleReconnectEdge(EId, G.getEdgeNode1Id(EId)); - handleReconnectEdge(EId, G.getEdgeNode2Id(EId)); - } - - void handleRemoveEdge(EdgeId EId) { - handleDisconnectEdge(EId, G.getEdgeNode1Id(EId)); - handleDisconnectEdge(EId, G.getEdgeNode2Id(EId)); - } - - void handleDisconnectEdge(EdgeId EId, NodeId NId) { - NodeMetadata& NMd = G.getNodeMetadata(NId); - const MatrixMetadata& MMd = G.getEdgeCosts(EId).getMetadata(); - NMd.handleRemoveEdge(MMd, NId == G.getEdgeNode2Id(EId)); - promote(NId, NMd); - } - - void handleReconnectEdge(EdgeId EId, NodeId NId) { - NodeMetadata& NMd = G.getNodeMetadata(NId); - const MatrixMetadata& MMd = G.getEdgeCosts(EId).getMetadata(); - NMd.handleAddEdge(MMd, NId == G.getEdgeNode2Id(EId)); - } - - void handleUpdateCosts(EdgeId EId, const Matrix& NewCosts) { - NodeId N1Id = G.getEdgeNode1Id(EId); - NodeId N2Id = G.getEdgeNode2Id(EId); - NodeMetadata& N1Md = G.getNodeMetadata(N1Id); - NodeMetadata& N2Md = G.getNodeMetadata(N2Id); - bool Transpose = N1Id != G.getEdgeNode1Id(EId); - - // Metadata are computed incrementally. First, update them - // by removing the old cost. - const MatrixMetadata& OldMMd = G.getEdgeCosts(EId).getMetadata(); - N1Md.handleRemoveEdge(OldMMd, Transpose); - N2Md.handleRemoveEdge(OldMMd, !Transpose); - - // And update now the metadata with the new cost. - const MatrixMetadata& MMd = NewCosts.getMetadata(); - N1Md.handleAddEdge(MMd, Transpose); - N2Md.handleAddEdge(MMd, !Transpose); - - // As the metadata may have changed with the update, the nodes may have - // become ConservativelyAllocatable or OptimallyReducible. - promote(N1Id, N1Md); - promote(N2Id, N2Md); - } - -private: - - void promote(NodeId NId, NodeMetadata& NMd) { - if (G.getNodeDegree(NId) == 3) { - // This node is becoming optimally reducible. - moveToOptimallyReducibleNodes(NId); - } else if (NMd.getReductionState() == - NodeMetadata::NotProvablyAllocatable && - NMd.isConservativelyAllocatable()) { - // This node just became conservatively allocatable. - moveToConservativelyAllocatableNodes(NId); - } - } - - void removeFromCurrentSet(NodeId NId) { - switch (G.getNodeMetadata(NId).getReductionState()) { - case NodeMetadata::Unprocessed: break; - case NodeMetadata::OptimallyReducible: - assert(OptimallyReducibleNodes.find(NId) != - OptimallyReducibleNodes.end() && - "Node not in optimally reducible set."); - OptimallyReducibleNodes.erase(NId); - break; - case NodeMetadata::ConservativelyAllocatable: - assert(ConservativelyAllocatableNodes.find(NId) != - ConservativelyAllocatableNodes.end() && - "Node not in conservatively allocatable set."); - ConservativelyAllocatableNodes.erase(NId); - break; - case NodeMetadata::NotProvablyAllocatable: - assert(NotProvablyAllocatableNodes.find(NId) != - NotProvablyAllocatableNodes.end() && - "Node not in not-provably-allocatable set."); - NotProvablyAllocatableNodes.erase(NId); - break; - } - } - - void moveToOptimallyReducibleNodes(NodeId NId) { - removeFromCurrentSet(NId); - OptimallyReducibleNodes.insert(NId); - G.getNodeMetadata(NId).setReductionState( - NodeMetadata::OptimallyReducible); - } - - void moveToConservativelyAllocatableNodes(NodeId NId) { - removeFromCurrentSet(NId); - ConservativelyAllocatableNodes.insert(NId); - G.getNodeMetadata(NId).setReductionState( - NodeMetadata::ConservativelyAllocatable); - } - - void moveToNotProvablyAllocatableNodes(NodeId NId) { - removeFromCurrentSet(NId); - NotProvablyAllocatableNodes.insert(NId); - G.getNodeMetadata(NId).setReductionState( - NodeMetadata::NotProvablyAllocatable); - } - - void setup() { - // Set up worklists. - for (auto NId : G.nodeIds()) { - if (G.getNodeDegree(NId) < 3) - moveToOptimallyReducibleNodes(NId); - else if (G.getNodeMetadata(NId).isConservativelyAllocatable()) - moveToConservativelyAllocatableNodes(NId); - else - moveToNotProvablyAllocatableNodes(NId); - } - } - - // Compute a reduction order for the graph by iteratively applying PBQP - // reduction rules. Locally optimal rules are applied whenever possible (R0, - // R1, R2). If no locally-optimal rules apply then any conservatively - // allocatable node is reduced. Finally, if no conservatively allocatable - // node exists then the node with the lowest spill-cost:degree ratio is - // selected. - std::vector reduce() { - assert(!G.empty() && "Cannot reduce empty graph."); - - typedef GraphBase::NodeId NodeId; - std::vector NodeStack; - - // Consume worklists. - while (true) { - if (!OptimallyReducibleNodes.empty()) { - NodeSet::iterator NItr = OptimallyReducibleNodes.begin(); - NodeId NId = *NItr; - OptimallyReducibleNodes.erase(NItr); - NodeStack.push_back(NId); - switch (G.getNodeDegree(NId)) { - case 0: - break; - case 1: - applyR1(G, NId); - break; - case 2: - applyR2(G, NId); - break; - default: llvm_unreachable("Not an optimally reducible node."); - } - } else if (!ConservativelyAllocatableNodes.empty()) { - // Conservatively allocatable nodes will never spill. For now just - // take the first node in the set and push it on the stack. When we - // start optimizing more heavily for register preferencing, it may - // would be better to push nodes with lower 'expected' or worst-case - // register costs first (since early nodes are the most - // constrained). - NodeSet::iterator NItr = ConservativelyAllocatableNodes.begin(); - NodeId NId = *NItr; - ConservativelyAllocatableNodes.erase(NItr); - NodeStack.push_back(NId); - G.disconnectAllNeighborsFromNode(NId); - - } else if (!NotProvablyAllocatableNodes.empty()) { - NodeSet::iterator NItr = - std::min_element(NotProvablyAllocatableNodes.begin(), - NotProvablyAllocatableNodes.end(), - SpillCostComparator(G)); - NodeId NId = *NItr; - NotProvablyAllocatableNodes.erase(NItr); - NodeStack.push_back(NId); - G.disconnectAllNeighborsFromNode(NId); - } else - break; - } - - return NodeStack; - } - - class SpillCostComparator { - public: - SpillCostComparator(const Graph& G) : G(G) {} - bool operator()(NodeId N1Id, NodeId N2Id) { - PBQPNum N1SC = G.getNodeCosts(N1Id)[0]; - PBQPNum N2SC = G.getNodeCosts(N2Id)[0]; - if (N1SC == N2SC) - return G.getNodeDegree(N1Id) < G.getNodeDegree(N2Id); - return N1SC < N2SC; - } - private: - const Graph& G; - }; - - Graph& G; - typedef std::set NodeSet; - NodeSet OptimallyReducibleNodes; - NodeSet ConservativelyAllocatableNodes; - NodeSet NotProvablyAllocatableNodes; -}; - -class PBQPRAGraph : public PBQP::Graph { -private: - typedef PBQP::Graph BaseT; -public: - PBQPRAGraph(GraphMetadata Metadata) : BaseT(Metadata) {} - - /// @brief Dump this graph to dbgs(). - void dump() const; - - /// @brief Dump this graph to an output stream. - /// @param OS Output stream to print on. - void dump(raw_ostream &OS) const; - - /// @brief Print a representation of this graph in DOT format. - /// @param OS Output stream to print on. - void printDot(raw_ostream &OS) const; -}; - -inline Solution solve(PBQPRAGraph& G) { - if (G.empty()) - return Solution(); - RegAllocSolverImpl RegAllocSolver(G); - return RegAllocSolver.solve(); -} - -} // namespace RegAlloc -} // namespace PBQP - -/// @brief Create a PBQP register allocator instance. -FunctionPass * -createPBQPRegisterAllocator(char *customPassID = nullptr); - -} // namespace llvm - -#endif /* LLVM_CODEGEN_REGALLOCPBQP_H */ diff --git a/llvm/include/llvm/CodeGen/RegAllocRegistry.h b/llvm/include/llvm/CodeGen/RegAllocRegistry.h deleted file mode 100644 index 5c7e9999..00000000 --- a/llvm/include/llvm/CodeGen/RegAllocRegistry.h +++ /dev/null @@ -1,63 +0,0 @@ -//===-- llvm/CodeGen/RegAllocRegistry.h -------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the implementation for register allocator function -// pass registry (RegisterRegAlloc). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_REGALLOCREGISTRY_H -#define LLVM_CODEGEN_REGALLOCREGISTRY_H - -#include "llvm/CodeGen/MachinePassRegistry.h" - -namespace llvm { - -//===----------------------------------------------------------------------===// -/// -/// RegisterRegAlloc class - Track the registration of register allocators. -/// -//===----------------------------------------------------------------------===// -class RegisterRegAlloc : public MachinePassRegistryNode { - -public: - - typedef FunctionPass *(*FunctionPassCtor)(); - - static MachinePassRegistry Registry; - - RegisterRegAlloc(const char *N, const char *D, FunctionPassCtor C) - : MachinePassRegistryNode(N, D, (MachinePassCtor)C) { - Registry.Add(this); - } - ~RegisterRegAlloc() { Registry.Remove(this); } - - // Accessors. - // - RegisterRegAlloc *getNext() const { - return (RegisterRegAlloc *)MachinePassRegistryNode::getNext(); - } - static RegisterRegAlloc *getList() { - return (RegisterRegAlloc *)Registry.getList(); - } - static FunctionPassCtor getDefault() { - return (FunctionPassCtor)Registry.getDefault(); - } - static void setDefault(FunctionPassCtor C) { - Registry.setDefault((MachinePassCtor)C); - } - static void setListener(MachinePassRegistryListener *L) { - Registry.setListener(L); - } -}; - -} // end namespace llvm - - -#endif diff --git a/llvm/include/llvm/CodeGen/RegisterClassInfo.h b/llvm/include/llvm/CodeGen/RegisterClassInfo.h deleted file mode 100644 index d784dfbd..00000000 --- a/llvm/include/llvm/CodeGen/RegisterClassInfo.h +++ /dev/null @@ -1,145 +0,0 @@ -//===-- RegisterClassInfo.h - Dynamic Register Class Info -*- C++ -*-------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the RegisterClassInfo class which provides dynamic -// information about target register classes. Callee saved and reserved -// registers depends on calling conventions and other dynamic information, so -// some things cannot be determined statically. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_REGISTERCLASSINFO_H -#define LLVM_CODEGEN_REGISTERCLASSINFO_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/BitVector.h" -#include "llvm/Target/TargetRegisterInfo.h" - -namespace llvm { - -class RegisterClassInfo { - struct RCInfo { - unsigned Tag; - unsigned NumRegs; - bool ProperSubClass; - uint8_t MinCost; - uint16_t LastCostChange; - std::unique_ptr Order; - - RCInfo() - : Tag(0), NumRegs(0), ProperSubClass(false), MinCost(0), - LastCostChange(0) {} - - operator ArrayRef() const { - return makeArrayRef(Order.get(), NumRegs); - } - }; - - // Brief cached information for each register class. - std::unique_ptr RegClass; - - // Tag changes whenever cached information needs to be recomputed. An RCInfo - // entry is valid when its tag matches. - unsigned Tag; - - const MachineFunction *MF; - const TargetRegisterInfo *TRI; - - // Callee saved registers of last MF. Assumed to be valid until the next - // runOnFunction() call. - const MCPhysReg *CalleeSaved; - - // Map register number to CalleeSaved index + 1; - SmallVector CSRNum; - - // Reserved registers in the current MF. - BitVector Reserved; - - std::unique_ptr PSetLimits; - - // Compute all information about RC. - void compute(const TargetRegisterClass *RC) const; - - // Return an up-to-date RCInfo for RC. - const RCInfo &get(const TargetRegisterClass *RC) const { - const RCInfo &RCI = RegClass[RC->getID()]; - if (Tag != RCI.Tag) - compute(RC); - return RCI; - } - -public: - RegisterClassInfo(); - - /// runOnFunction - Prepare to answer questions about MF. This must be called - /// before any other methods are used. - void runOnMachineFunction(const MachineFunction &MF); - - /// getNumAllocatableRegs - Returns the number of actually allocatable - /// registers in RC in the current function. - unsigned getNumAllocatableRegs(const TargetRegisterClass *RC) const { - return get(RC).NumRegs; - } - - /// getOrder - Returns the preferred allocation order for RC. The order - /// contains no reserved registers, and registers that alias callee saved - /// registers come last. - ArrayRef getOrder(const TargetRegisterClass *RC) const { - return get(RC); - } - - /// isProperSubClass - Returns true if RC has a legal super-class with more - /// allocatable registers. - /// - /// Register classes like GR32_NOSP are not proper sub-classes because %esp - /// is not allocatable. Similarly, tGPR is not a proper sub-class in Thumb - /// mode because the GPR super-class is not legal. - bool isProperSubClass(const TargetRegisterClass *RC) const { - return get(RC).ProperSubClass; - } - - /// getLastCalleeSavedAlias - Returns the last callee saved register that - /// overlaps PhysReg, or 0 if Reg doesn't overlap a CSR. - unsigned getLastCalleeSavedAlias(unsigned PhysReg) const { - assert(TargetRegisterInfo::isPhysicalRegister(PhysReg)); - if (unsigned N = CSRNum[PhysReg]) - return CalleeSaved[N-1]; - return 0; - } - - /// Get the minimum register cost in RC's allocation order. - /// This is the smallest value returned by TRI->getCostPerUse(Reg) for all - /// the registers in getOrder(RC). - unsigned getMinCost(const TargetRegisterClass *RC) { - return get(RC).MinCost; - } - - /// Get the position of the last cost change in getOrder(RC). - /// - /// All registers in getOrder(RC).slice(getLastCostChange(RC)) will have the - /// same cost according to TRI->getCostPerUse(). - unsigned getLastCostChange(const TargetRegisterClass *RC) { - return get(RC).LastCostChange; - } - - /// Get the register unit limit for the given pressure set index. - /// - /// RegisterClassInfo adjusts this limit for reserved registers. - unsigned getRegPressureSetLimit(unsigned Idx) const { - if (!PSetLimits[Idx]) - PSetLimits[Idx] = computePSetLimit(Idx); - return PSetLimits[Idx]; - } - -protected: - unsigned computePSetLimit(unsigned Idx) const; -}; -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/RegisterPressure.h b/llvm/include/llvm/CodeGen/RegisterPressure.h deleted file mode 100644 index aaddac40..00000000 --- a/llvm/include/llvm/CodeGen/RegisterPressure.h +++ /dev/null @@ -1,560 +0,0 @@ -//===-- RegisterPressure.h - Dynamic Register Pressure -*- C++ -*-------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the RegisterPressure class which can be used to track -// MachineInstr level register pressure. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_REGISTERPRESSURE_H -#define LLVM_CODEGEN_REGISTERPRESSURE_H - -#include "llvm/ADT/SparseSet.h" -#include "llvm/CodeGen/SlotIndexes.h" -#include "llvm/Target/TargetRegisterInfo.h" - -namespace llvm { - -class LiveIntervals; -class LiveRange; -class RegisterClassInfo; -class MachineInstr; - -struct RegisterMaskPair { - unsigned RegUnit; ///< Virtual register or register unit. - LaneBitmask LaneMask; - - RegisterMaskPair(unsigned RegUnit, LaneBitmask LaneMask) - : RegUnit(RegUnit), LaneMask(LaneMask) {} -}; - -/// Base class for register pressure results. -struct RegisterPressure { - /// Map of max reg pressure indexed by pressure set ID, not class ID. - std::vector MaxSetPressure; - - /// List of live in virtual registers or physical register units. - SmallVector LiveInRegs; - SmallVector LiveOutRegs; - - void dump(const TargetRegisterInfo *TRI) const; -}; - -/// RegisterPressure computed within a region of instructions delimited by -/// TopIdx and BottomIdx. During pressure computation, the maximum pressure per -/// register pressure set is increased. Once pressure within a region is fully -/// computed, the live-in and live-out sets are recorded. -/// -/// This is preferable to RegionPressure when LiveIntervals are available, -/// because delimiting regions by SlotIndex is more robust and convenient than -/// holding block iterators. The block contents can change without invalidating -/// the pressure result. -struct IntervalPressure : RegisterPressure { - /// Record the boundary of the region being tracked. - SlotIndex TopIdx; - SlotIndex BottomIdx; - - void reset(); - - void openTop(SlotIndex NextTop); - - void openBottom(SlotIndex PrevBottom); -}; - -/// RegisterPressure computed within a region of instructions delimited by -/// TopPos and BottomPos. This is a less precise version of IntervalPressure for -/// use when LiveIntervals are unavailable. -struct RegionPressure : RegisterPressure { - /// Record the boundary of the region being tracked. - MachineBasicBlock::const_iterator TopPos; - MachineBasicBlock::const_iterator BottomPos; - - void reset(); - - void openTop(MachineBasicBlock::const_iterator PrevTop); - - void openBottom(MachineBasicBlock::const_iterator PrevBottom); -}; - -/// Capture a change in pressure for a single pressure set. UnitInc may be -/// expressed in terms of upward or downward pressure depending on the client -/// and will be dynamically adjusted for current liveness. -/// -/// Pressure increments are tiny, typically 1-2 units, and this is only for -/// heuristics, so we don't check UnitInc overflow. Instead, we may have a -/// higher level assert that pressure is consistent within a region. We also -/// effectively ignore dead defs which don't affect heuristics much. -class PressureChange { - uint16_t PSetID; // ID+1. 0=Invalid. - int16_t UnitInc; -public: - PressureChange(): PSetID(0), UnitInc(0) {} - PressureChange(unsigned id): PSetID(id+1), UnitInc(0) { - assert(id < UINT16_MAX && "PSetID overflow."); - } - - bool isValid() const { return PSetID > 0; } - - unsigned getPSet() const { - assert(isValid() && "invalid PressureChange"); - return PSetID - 1; - } - // If PSetID is invalid, return UINT16_MAX to give it lowest priority. - unsigned getPSetOrMax() const { return (PSetID - 1) & UINT16_MAX; } - - int getUnitInc() const { return UnitInc; } - - void setUnitInc(int Inc) { UnitInc = Inc; } - - bool operator==(const PressureChange &RHS) const { - return PSetID == RHS.PSetID && UnitInc == RHS.UnitInc; - } -}; - -template <> struct isPodLike { - static const bool value = true; -}; - -/// List of PressureChanges in order of increasing, unique PSetID. -/// -/// Use a small fixed number, because we can fit more PressureChanges in an -/// empty SmallVector than ever need to be tracked per register class. If more -/// PSets are affected, then we only track the most constrained. -class PressureDiff { - // The initial design was for MaxPSets=4, but that requires PSet partitions, - // which are not yet implemented. (PSet partitions are equivalent PSets given - // the register classes actually in use within the scheduling region.) - enum { MaxPSets = 16 }; - - PressureChange PressureChanges[MaxPSets]; - - typedef PressureChange* iterator; - iterator nonconst_begin() { return &PressureChanges[0]; } - iterator nonconst_end() { return &PressureChanges[MaxPSets]; } - -public: - typedef const PressureChange* const_iterator; - const_iterator begin() const { return &PressureChanges[0]; } - const_iterator end() const { return &PressureChanges[MaxPSets]; } - - void addPressureChange(unsigned RegUnit, bool IsDec, - const MachineRegisterInfo *MRI); - - LLVM_DUMP_METHOD void dump(const TargetRegisterInfo &TRI) const; -}; - -/// List of registers defined and used by a machine instruction. -class RegisterOperands { -public: - /// List of virtual registers and register units read by the instruction. - SmallVector Uses; - /// \brief List of virtual registers and register units defined by the - /// instruction which are not dead. - SmallVector Defs; - /// \brief List of virtual registers and register units defined by the - /// instruction but dead. - SmallVector DeadDefs; - - /// Analyze the given instruction \p MI and fill in the Uses, Defs and - /// DeadDefs list based on the MachineOperand flags. - void collect(const MachineInstr &MI, const TargetRegisterInfo &TRI, - const MachineRegisterInfo &MRI, bool TrackLaneMasks, - bool IgnoreDead); - - /// Use liveness information to find dead defs not marked with a dead flag - /// and move them to the DeadDefs vector. - void detectDeadDefs(const MachineInstr &MI, const LiveIntervals &LIS); - - /// Use liveness information to find out which uses/defs are partially - /// undefined/dead and adjust the RegisterMaskPairs accordingly. - /// If \p AddFlagsMI is given then missing read-undef and dead flags will be - /// added to the instruction. - void adjustLaneLiveness(const LiveIntervals &LIS, - const MachineRegisterInfo &MRI, SlotIndex Pos, - MachineInstr *AddFlagsMI = nullptr); -}; - -/// Array of PressureDiffs. -class PressureDiffs { - PressureDiff *PDiffArray; - unsigned Size; - unsigned Max; -public: - PressureDiffs(): PDiffArray(nullptr), Size(0), Max(0) {} - ~PressureDiffs() { free(PDiffArray); } - - void clear() { Size = 0; } - - void init(unsigned N); - - PressureDiff &operator[](unsigned Idx) { - assert(Idx < Size && "PressureDiff index out of bounds"); - return PDiffArray[Idx]; - } - const PressureDiff &operator[](unsigned Idx) const { - return const_cast(this)->operator[](Idx); - } - /// \brief Record pressure difference induced by the given operand list to - /// node with index \p Idx. - void addInstruction(unsigned Idx, const RegisterOperands &RegOpers, - const MachineRegisterInfo &MRI); -}; - -/// Store the effects of a change in pressure on things that MI scheduler cares -/// about. -/// -/// Excess records the value of the largest difference in register units beyond -/// the target's pressure limits across the affected pressure sets, where -/// largest is defined as the absolute value of the difference. Negative -/// ExcessUnits indicates a reduction in pressure that had already exceeded the -/// target's limits. -/// -/// CriticalMax records the largest increase in the tracker's max pressure that -/// exceeds the critical limit for some pressure set determined by the client. -/// -/// CurrentMax records the largest increase in the tracker's max pressure that -/// exceeds the current limit for some pressure set determined by the client. -struct RegPressureDelta { - PressureChange Excess; - PressureChange CriticalMax; - PressureChange CurrentMax; - - RegPressureDelta() {} - - bool operator==(const RegPressureDelta &RHS) const { - return Excess == RHS.Excess && CriticalMax == RHS.CriticalMax - && CurrentMax == RHS.CurrentMax; - } - bool operator!=(const RegPressureDelta &RHS) const { - return !operator==(RHS); - } -}; - -/// A set of live virtual registers and physical register units. -/// -/// This is a wrapper around a SparseSet which deals with mapping register unit -/// and virtual register indexes to an index usable by the sparse set. -class LiveRegSet { -private: - struct IndexMaskPair { - unsigned Index; - LaneBitmask LaneMask; - - IndexMaskPair(unsigned Index, LaneBitmask LaneMask) - : Index(Index), LaneMask(LaneMask) {} - - unsigned getSparseSetIndex() const { - return Index; - } - }; - - typedef SparseSet RegSet; - RegSet Regs; - unsigned NumRegUnits; - - unsigned getSparseIndexFromReg(unsigned Reg) const { - if (TargetRegisterInfo::isVirtualRegister(Reg)) - return TargetRegisterInfo::virtReg2Index(Reg) + NumRegUnits; - assert(Reg < NumRegUnits); - return Reg; - } - unsigned getRegFromSparseIndex(unsigned SparseIndex) const { - if (SparseIndex >= NumRegUnits) - return TargetRegisterInfo::index2VirtReg(SparseIndex-NumRegUnits); - return SparseIndex; - } - -public: - void clear(); - void init(const MachineRegisterInfo &MRI); - - LaneBitmask contains(unsigned Reg) const { - unsigned SparseIndex = getSparseIndexFromReg(Reg); - RegSet::const_iterator I = Regs.find(SparseIndex); - if (I == Regs.end()) - return 0; - return I->LaneMask; - } - - /// Mark the \p Pair.LaneMask lanes of \p Pair.Reg as live. - /// Returns the previously live lanes of \p Pair.Reg. - LaneBitmask insert(RegisterMaskPair Pair) { - unsigned SparseIndex = getSparseIndexFromReg(Pair.RegUnit); - auto InsertRes = Regs.insert(IndexMaskPair(SparseIndex, Pair.LaneMask)); - if (!InsertRes.second) { - unsigned PrevMask = InsertRes.first->LaneMask; - InsertRes.first->LaneMask |= Pair.LaneMask; - return PrevMask; - } - return 0; - } - - /// Clears the \p Pair.LaneMask lanes of \p Pair.Reg (mark them as dead). - /// Returns the previously live lanes of \p Pair.Reg. - LaneBitmask erase(RegisterMaskPair Pair) { - unsigned SparseIndex = getSparseIndexFromReg(Pair.RegUnit); - RegSet::iterator I = Regs.find(SparseIndex); - if (I == Regs.end()) - return 0; - unsigned PrevMask = I->LaneMask; - I->LaneMask &= ~Pair.LaneMask; - return PrevMask; - } - - size_t size() const { - return Regs.size(); - } - - template - void appendTo(ContainerT &To) const { - for (const IndexMaskPair &P : Regs) { - unsigned Reg = getRegFromSparseIndex(P.Index); - if (P.LaneMask != 0) - To.push_back(RegisterMaskPair(Reg, P.LaneMask)); - } - } -}; - -/// Track the current register pressure at some position in the instruction -/// stream, and remember the high water mark within the region traversed. This -/// does not automatically consider live-through ranges. The client may -/// independently adjust for global liveness. -/// -/// Each RegPressureTracker only works within a MachineBasicBlock. Pressure can -/// be tracked across a larger region by storing a RegisterPressure result at -/// each block boundary and explicitly adjusting pressure to account for block -/// live-in and live-out register sets. -/// -/// RegPressureTracker holds a reference to a RegisterPressure result that it -/// computes incrementally. During downward tracking, P.BottomIdx or P.BottomPos -/// is invalid until it reaches the end of the block or closeRegion() is -/// explicitly called. Similarly, P.TopIdx is invalid during upward -/// tracking. Changing direction has the side effect of closing region, and -/// traversing past TopIdx or BottomIdx reopens it. -class RegPressureTracker { - const MachineFunction *MF; - const TargetRegisterInfo *TRI; - const RegisterClassInfo *RCI; - const MachineRegisterInfo *MRI; - const LiveIntervals *LIS; - - /// We currently only allow pressure tracking within a block. - const MachineBasicBlock *MBB; - - /// Track the max pressure within the region traversed so far. - RegisterPressure &P; - - /// Run in two modes dependending on whether constructed with IntervalPressure - /// or RegisterPressure. If requireIntervals is false, LIS are ignored. - bool RequireIntervals; - - /// True if UntiedDefs will be populated. - bool TrackUntiedDefs; - - /// True if lanemasks should be tracked. - bool TrackLaneMasks; - - /// Register pressure corresponds to liveness before this instruction - /// iterator. It may point to the end of the block or a DebugValue rather than - /// an instruction. - MachineBasicBlock::const_iterator CurrPos; - - /// Pressure map indexed by pressure set ID, not class ID. - std::vector CurrSetPressure; - - /// Set of live registers. - LiveRegSet LiveRegs; - - /// Set of vreg defs that start a live range. - SparseSet UntiedDefs; - /// Live-through pressure. - std::vector LiveThruPressure; - -public: - RegPressureTracker(IntervalPressure &rp) : - MF(nullptr), TRI(nullptr), RCI(nullptr), LIS(nullptr), MBB(nullptr), P(rp), - RequireIntervals(true), TrackUntiedDefs(false), TrackLaneMasks(false) {} - - RegPressureTracker(RegionPressure &rp) : - MF(nullptr), TRI(nullptr), RCI(nullptr), LIS(nullptr), MBB(nullptr), P(rp), - RequireIntervals(false), TrackUntiedDefs(false), TrackLaneMasks(false) {} - - void reset(); - - void init(const MachineFunction *mf, const RegisterClassInfo *rci, - const LiveIntervals *lis, const MachineBasicBlock *mbb, - MachineBasicBlock::const_iterator pos, - bool TrackLaneMasks, bool TrackUntiedDefs); - - /// Force liveness of virtual registers or physical register - /// units. Particularly useful to initialize the livein/out state of the - /// tracker before the first call to advance/recede. - void addLiveRegs(ArrayRef Regs); - - /// Get the MI position corresponding to this register pressure. - MachineBasicBlock::const_iterator getPos() const { return CurrPos; } - - // Reset the MI position corresponding to the register pressure. This allows - // schedulers to move instructions above the RegPressureTracker's - // CurrPos. Since the pressure is computed before CurrPos, the iterator - // position changes while pressure does not. - void setPos(MachineBasicBlock::const_iterator Pos) { CurrPos = Pos; } - - /// Recede across the previous instruction. - void recede(SmallVectorImpl *LiveUses = nullptr); - - /// Recede across the previous instruction. - /// This "low-level" variant assumes that recedeSkipDebugValues() was - /// called previously and takes precomputed RegisterOperands for the - /// instruction. - void recede(const RegisterOperands &RegOpers, - SmallVectorImpl *LiveUses = nullptr); - - /// Recede until we find an instruction which is not a DebugValue. - void recedeSkipDebugValues(); - - /// Advance across the current instruction. - void advance(); - - /// Advance across the current instruction. - /// This is a "low-level" variant of advance() which takes precomputed - /// RegisterOperands of the instruction. - void advance(const RegisterOperands &RegOpers); - - /// Finalize the region boundaries and recored live ins and live outs. - void closeRegion(); - - /// Initialize the LiveThru pressure set based on the untied defs found in - /// RPTracker. - void initLiveThru(const RegPressureTracker &RPTracker); - - /// Copy an existing live thru pressure result. - void initLiveThru(ArrayRef PressureSet) { - LiveThruPressure.assign(PressureSet.begin(), PressureSet.end()); - } - - ArrayRef getLiveThru() const { return LiveThruPressure; } - - /// Get the resulting register pressure over the traversed region. - /// This result is complete if closeRegion() was explicitly invoked. - RegisterPressure &getPressure() { return P; } - const RegisterPressure &getPressure() const { return P; } - - /// Get the register set pressure at the current position, which may be less - /// than the pressure across the traversed region. - const std::vector &getRegSetPressureAtPos() const { - return CurrSetPressure; - } - - bool isTopClosed() const; - bool isBottomClosed() const; - - void closeTop(); - void closeBottom(); - - /// Consider the pressure increase caused by traversing this instruction - /// bottom-up. Find the pressure set with the most change beyond its pressure - /// limit based on the tracker's current pressure, and record the number of - /// excess register units of that pressure set introduced by this instruction. - void getMaxUpwardPressureDelta(const MachineInstr *MI, - PressureDiff *PDiff, - RegPressureDelta &Delta, - ArrayRef CriticalPSets, - ArrayRef MaxPressureLimit); - - void getUpwardPressureDelta(const MachineInstr *MI, - /*const*/ PressureDiff &PDiff, - RegPressureDelta &Delta, - ArrayRef CriticalPSets, - ArrayRef MaxPressureLimit) const; - - /// Consider the pressure increase caused by traversing this instruction - /// top-down. Find the pressure set with the most change beyond its pressure - /// limit based on the tracker's current pressure, and record the number of - /// excess register units of that pressure set introduced by this instruction. - void getMaxDownwardPressureDelta(const MachineInstr *MI, - RegPressureDelta &Delta, - ArrayRef CriticalPSets, - ArrayRef MaxPressureLimit); - - /// Find the pressure set with the most change beyond its pressure limit after - /// traversing this instruction either upward or downward depending on the - /// closed end of the current region. - void getMaxPressureDelta(const MachineInstr *MI, - RegPressureDelta &Delta, - ArrayRef CriticalPSets, - ArrayRef MaxPressureLimit) { - if (isTopClosed()) - return getMaxDownwardPressureDelta(MI, Delta, CriticalPSets, - MaxPressureLimit); - - assert(isBottomClosed() && "Uninitialized pressure tracker"); - return getMaxUpwardPressureDelta(MI, nullptr, Delta, CriticalPSets, - MaxPressureLimit); - } - - /// Get the pressure of each PSet after traversing this instruction bottom-up. - void getUpwardPressure(const MachineInstr *MI, - std::vector &PressureResult, - std::vector &MaxPressureResult); - - /// Get the pressure of each PSet after traversing this instruction top-down. - void getDownwardPressure(const MachineInstr *MI, - std::vector &PressureResult, - std::vector &MaxPressureResult); - - void getPressureAfterInst(const MachineInstr *MI, - std::vector &PressureResult, - std::vector &MaxPressureResult) { - if (isTopClosed()) - return getUpwardPressure(MI, PressureResult, MaxPressureResult); - - assert(isBottomClosed() && "Uninitialized pressure tracker"); - return getDownwardPressure(MI, PressureResult, MaxPressureResult); - } - - bool hasUntiedDef(unsigned VirtReg) const { - return UntiedDefs.count(VirtReg); - } - - void dump() const; - -protected: - /// Add Reg to the live out set and increase max pressure. - void discoverLiveOut(RegisterMaskPair Pair); - /// Add Reg to the live in set and increase max pressure. - void discoverLiveIn(RegisterMaskPair Pair); - - /// \brief Get the SlotIndex for the first nondebug instruction including or - /// after the current position. - SlotIndex getCurrSlot() const; - - void increaseRegPressure(unsigned RegUnit, LaneBitmask PreviousMask, - LaneBitmask NewMask); - void decreaseRegPressure(unsigned RegUnit, LaneBitmask PreviousMask, - LaneBitmask NewMask); - - void bumpDeadDefs(ArrayRef DeadDefs); - - void bumpUpwardPressure(const MachineInstr *MI); - void bumpDownwardPressure(const MachineInstr *MI); - - void discoverLiveInOrOut(RegisterMaskPair Pair, - SmallVectorImpl &LiveInOrOut); - - LaneBitmask getLastUsedLanes(unsigned RegUnit, SlotIndex Pos) const; - LaneBitmask getLiveLanesAt(unsigned RegUnit, SlotIndex Pos) const; - LaneBitmask getLiveThroughAt(unsigned RegUnit, SlotIndex Pos) const; -}; - -void dumpRegSetPressure(ArrayRef SetPressure, - const TargetRegisterInfo *TRI); -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/RegisterScavenging.h b/llvm/include/llvm/CodeGen/RegisterScavenging.h deleted file mode 100644 index efe1a3c6..00000000 --- a/llvm/include/llvm/CodeGen/RegisterScavenging.h +++ /dev/null @@ -1,187 +0,0 @@ -//===-- RegisterScavenging.h - Machine register scavenging ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// \file -/// This file declares the machine register scavenger class. It can provide -/// information such as unused register at any point in a machine basic block. -/// It also provides a mechanism to make registers available by evicting them -/// to spill slots. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_REGISTERSCAVENGING_H -#define LLVM_CODEGEN_REGISTERSCAVENGING_H - -#include "llvm/ADT/BitVector.h" -#include "llvm/CodeGen/MachineBasicBlock.h" -#include "llvm/CodeGen/MachineRegisterInfo.h" - -namespace llvm { - -class MachineRegisterInfo; -class TargetRegisterInfo; -class TargetInstrInfo; -class TargetRegisterClass; - -class RegScavenger { - const TargetRegisterInfo *TRI; - const TargetInstrInfo *TII; - MachineRegisterInfo* MRI; - MachineBasicBlock *MBB; - MachineBasicBlock::iterator MBBI; - unsigned NumRegUnits; - - /// True if RegScavenger is currently tracking the liveness of registers. - bool Tracking; - - /// Information on scavenged registers (held in a spill slot). - struct ScavengedInfo { - ScavengedInfo(int FI = -1) : FrameIndex(FI), Reg(0), Restore(nullptr) {} - - /// A spill slot used for scavenging a register post register allocation. - int FrameIndex; - - /// If non-zero, the specific register is currently being - /// scavenged. That is, it is spilled to this scavenging stack slot. - unsigned Reg; - - /// The instruction that restores the scavenged register from stack. - const MachineInstr *Restore; - }; - - /// A vector of information on scavenged registers. - SmallVector Scavenged; - - /// The current state of each reg unit immediately before MBBI. - /// One bit per register unit. If bit is not set it means any - /// register containing that register unit is currently being used. - BitVector RegUnitsAvailable; - - // These BitVectors are only used internally to forward(). They are members - // to avoid frequent reallocations. - BitVector KillRegUnits, DefRegUnits; - BitVector TmpRegUnits; - -public: - RegScavenger() - : MBB(nullptr), NumRegUnits(0), Tracking(false) {} - - /// Start tracking liveness from the begin of basic block \p MBB. - void enterBasicBlock(MachineBasicBlock &MBB); - - /// Move the internal MBB iterator and update register states. - void forward(); - - /// Move the internal MBB iterator and update register states until - /// it has processed the specific iterator. - void forward(MachineBasicBlock::iterator I) { - if (!Tracking && MBB->begin() != I) forward(); - while (MBBI != I) forward(); - } - - /// Invert the behavior of forward() on the current instruction (undo the - /// changes to the available registers made by forward()). - void unprocess(); - - /// Unprocess instructions until you reach the provided iterator. - void unprocess(MachineBasicBlock::iterator I) { - while (MBBI != I) unprocess(); - } - - /// Move the internal MBB iterator but do not update register states. - void skipTo(MachineBasicBlock::iterator I) { - if (I == MachineBasicBlock::iterator(nullptr)) - Tracking = false; - MBBI = I; - } - - MachineBasicBlock::iterator getCurrentPosition() const { return MBBI; } - - /// Return if a specific register is currently used. - bool isRegUsed(unsigned Reg, bool includeReserved = true) const; - - /// Return all available registers in the register class in Mask. - BitVector getRegsAvailable(const TargetRegisterClass *RC); - - /// Find an unused register of the specified register class. - /// Return 0 if none is found. - unsigned FindUnusedReg(const TargetRegisterClass *RegClass) const; - - /// Add a scavenging frame index. - void addScavengingFrameIndex(int FI) { - Scavenged.push_back(ScavengedInfo(FI)); - } - - /// Query whether a frame index is a scavenging frame index. - bool isScavengingFrameIndex(int FI) const { - for (SmallVectorImpl::const_iterator I = Scavenged.begin(), - IE = Scavenged.end(); I != IE; ++I) - if (I->FrameIndex == FI) - return true; - - return false; - } - - /// Get an array of scavenging frame indices. - void getScavengingFrameIndices(SmallVectorImpl &A) const { - for (SmallVectorImpl::const_iterator I = Scavenged.begin(), - IE = Scavenged.end(); I != IE; ++I) - if (I->FrameIndex >= 0) - A.push_back(I->FrameIndex); - } - - /// Make a register of the specific register class - /// available and do the appropriate bookkeeping. SPAdj is the stack - /// adjustment due to call frame, it's passed along to eliminateFrameIndex(). - /// Returns the scavenged register. - unsigned scavengeRegister(const TargetRegisterClass *RegClass, - MachineBasicBlock::iterator I, int SPAdj); - unsigned scavengeRegister(const TargetRegisterClass *RegClass, int SPAdj) { - return scavengeRegister(RegClass, MBBI, SPAdj); - } - - /// Tell the scavenger a register is used. - void setRegUsed(unsigned Reg, LaneBitmask LaneMask = ~0u); -private: - /// Returns true if a register is reserved. It is never "unused". - bool isReserved(unsigned Reg) const { return MRI->isReserved(Reg); } - - /// setUsed / setUnused - Mark the state of one or a number of register units. - /// - void setUsed(BitVector &RegUnits) { - RegUnitsAvailable.reset(RegUnits); - } - void setUnused(BitVector &RegUnits) { - RegUnitsAvailable |= RegUnits; - } - - /// Processes the current instruction and fill the KillRegUnits and - /// DefRegUnits bit vectors. - void determineKillsAndDefs(); - - /// Add all Reg Units that Reg contains to BV. - void addRegUnits(BitVector &BV, unsigned Reg); - - /// Return the candidate register that is unused for the longest after - /// StartMI. UseMI is set to the instruction where the search stopped. - /// - /// No more than InstrLimit instructions are inspected. - unsigned findSurvivorReg(MachineBasicBlock::iterator StartMI, - BitVector &Candidates, - unsigned InstrLimit, - MachineBasicBlock::iterator &UseMI); - - /// Allow resetting register state info for multiple - /// passes over/within the same function. - void initRegState(); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/RegisterUsageInfo.h b/llvm/include/llvm/CodeGen/RegisterUsageInfo.h deleted file mode 100644 index 3f88032c..00000000 --- a/llvm/include/llvm/CodeGen/RegisterUsageInfo.h +++ /dev/null @@ -1,75 +0,0 @@ -//==- RegisterUsageInfo.h - Register Usage Informartion Storage -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// This pass is required to take advantage of the interprocedural register -/// allocation infrastructure. -/// -/// This pass is simple immutable pass which keeps RegMasks (calculated based on -/// actual register allocation) for functions in a module and provides simple -/// API to query this information. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_PHYSICALREGISTERUSAGEINFO_H -#define LLVM_CODEGEN_PHYSICALREGISTERUSAGEINFO_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/Pass.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { - -class PhysicalRegisterUsageInfo : public ImmutablePass { - virtual void anchor(); - -public: - static char ID; - - PhysicalRegisterUsageInfo() : ImmutablePass(ID) { - PassRegistry &Registry = *PassRegistry::getPassRegistry(); - initializePhysicalRegisterUsageInfoPass(Registry); - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - } - - /// To set TargetMachine *, which is used to print - /// analysis when command line option -print-regusage is used. - void setTargetMachine(const TargetMachine *TM_) { TM = TM_; } - - bool doInitialization(Module &M) override; - - bool doFinalization(Module &M) override; - - /// To store RegMask for given Function *. - void storeUpdateRegUsageInfo(const Function *FP, - std::vector RegMask); - - /// To query stored RegMask for given Function *, it will return nullptr if - /// function is not known. - const std::vector *getRegUsageInfo(const Function *FP); - - void print(raw_ostream &OS, const Module *M = nullptr) const override; - -private: - /// A Dense map from Function * to RegMask. - /// In RegMask 0 means register used (clobbered) by function. - /// and 1 means content of register will be preserved around function call. - DenseMap> RegMasks; - - const TargetMachine *TM; -}; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h b/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h deleted file mode 100644 index 9c8f5f48..00000000 --- a/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h +++ /dev/null @@ -1,136 +0,0 @@ -//===----- ResourcePriorityQueue.h - A DFA-oriented priority queue -------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the ResourcePriorityQueue class, which is a -// SchedulingPriorityQueue that schedules using DFA state to -// reduce the length of the critical path through the basic block -// on VLIW platforms. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_RESOURCEPRIORITYQUEUE_H -#define LLVM_CODEGEN_RESOURCEPRIORITYQUEUE_H - -#include "llvm/CodeGen/DFAPacketizer.h" -#include "llvm/CodeGen/ScheduleDAG.h" -#include "llvm/CodeGen/SelectionDAGISel.h" -#include "llvm/MC/MCInstrItineraries.h" -#include "llvm/Target/TargetInstrInfo.h" -#include "llvm/Target/TargetRegisterInfo.h" - -namespace llvm { - class ResourcePriorityQueue; - - /// Sorting functions for the Available queue. - struct resource_sort : public std::binary_function { - ResourcePriorityQueue *PQ; - explicit resource_sort(ResourcePriorityQueue *pq) : PQ(pq) {} - - bool operator()(const SUnit* left, const SUnit* right) const; - }; - - class ResourcePriorityQueue : public SchedulingPriorityQueue { - /// SUnits - The SUnits for the current graph. - std::vector *SUnits; - - /// NumNodesSolelyBlocking - This vector contains, for every node in the - /// Queue, the number of nodes that the node is the sole unscheduled - /// predecessor for. This is used as a tie-breaker heuristic for better - /// mobility. - std::vector NumNodesSolelyBlocking; - - /// Queue - The queue. - std::vector Queue; - - /// RegPressure - Tracking current reg pressure per register class. - /// - std::vector RegPressure; - - /// RegLimit - Tracking the number of allocatable registers per register - /// class. - std::vector RegLimit; - - resource_sort Picker; - const TargetRegisterInfo *TRI; - const TargetLowering *TLI; - const TargetInstrInfo *TII; - const InstrItineraryData* InstrItins; - /// ResourcesModel - Represents VLIW state. - /// Not limited to VLIW targets per say, but assumes - /// definition of DFA by a target. - std::unique_ptr ResourcesModel; - - /// Resource model - packet/bundle model. Purely - /// internal at the time. - std::vector Packet; - - /// Heuristics for estimating register pressure. - unsigned ParallelLiveRanges; - int HorizontalVerticalBalance; - - public: - ResourcePriorityQueue(SelectionDAGISel *IS); - - bool isBottomUp() const override { return false; } - - void initNodes(std::vector &sunits) override; - - void addNode(const SUnit *SU) override { - NumNodesSolelyBlocking.resize(SUnits->size(), 0); - } - - void updateNode(const SUnit *SU) override {} - - void releaseState() override { - SUnits = nullptr; - } - - unsigned getLatency(unsigned NodeNum) const { - assert(NodeNum < (*SUnits).size()); - return (*SUnits)[NodeNum].getHeight(); - } - - unsigned getNumSolelyBlockNodes(unsigned NodeNum) const { - assert(NodeNum < NumNodesSolelyBlocking.size()); - return NumNodesSolelyBlocking[NodeNum]; - } - - /// Single cost function reflecting benefit of scheduling SU - /// in the current cycle. - int SUSchedulingCost (SUnit *SU); - - /// InitNumRegDefsLeft - Determine the # of regs defined by this node. - /// - void initNumRegDefsLeft(SUnit *SU); - void updateNumRegDefsLeft(SUnit *SU); - int regPressureDelta(SUnit *SU, bool RawPressure = false); - int rawRegPressureDelta (SUnit *SU, unsigned RCId); - - bool empty() const override { return Queue.empty(); } - - void push(SUnit *U) override; - - SUnit *pop() override; - - void remove(SUnit *SU) override; - - /// scheduledNode - Main resource tracking point. - void scheduledNode(SUnit *Node) override; - bool isResourceAvailable(SUnit *SU); - void reserveResources(SUnit *SU); - -private: - void adjustPriorityOfUnscheduledPreds(SUnit *SU); - SUnit *getSingleUnscheduledPred(SUnit *SU); - unsigned numberRCValPredInSU (SUnit *SU, unsigned RCId); - unsigned numberRCValSuccInSU (SUnit *SU, unsigned RCId); - }; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/RuntimeLibcalls.h b/llvm/include/llvm/CodeGen/RuntimeLibcalls.h deleted file mode 100644 index 16d305c7..00000000 --- a/llvm/include/llvm/CodeGen/RuntimeLibcalls.h +++ /dev/null @@ -1,509 +0,0 @@ -//===-- CodeGen/RuntimeLibcalls.h - Runtime Library Calls -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the enum representing the list of runtime library calls -// the backend may emit during code generation, and also some helper functions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_RUNTIMELIBCALLS_H -#define LLVM_CODEGEN_RUNTIMELIBCALLS_H - -#include "llvm/CodeGen/ValueTypes.h" - -namespace llvm { -namespace RTLIB { - /// RTLIB::Libcall enum - This enum defines all of the runtime library calls - /// the backend can emit. The various long double types cannot be merged, - /// because 80-bit library functions use "xf" and 128-bit use "tf". - /// - /// When adding PPCF128 functions here, note that their names generally need - /// to be overridden for Darwin with the xxx$LDBL128 form. See - /// PPCISelLowering.cpp. - /// - enum Libcall { - // Integer - SHL_I16, - SHL_I32, - SHL_I64, - SHL_I128, - SRL_I16, - SRL_I32, - SRL_I64, - SRL_I128, - SRA_I16, - SRA_I32, - SRA_I64, - SRA_I128, - MUL_I8, - MUL_I16, - MUL_I32, - MUL_I64, - MUL_I128, - MULO_I32, - MULO_I64, - MULO_I128, - SDIV_I8, - SDIV_I16, - SDIV_I32, - SDIV_I64, - SDIV_I128, - UDIV_I8, - UDIV_I16, - UDIV_I32, - UDIV_I64, - UDIV_I128, - SREM_I8, - SREM_I16, - SREM_I32, - SREM_I64, - SREM_I128, - UREM_I8, - UREM_I16, - UREM_I32, - UREM_I64, - UREM_I128, - SDIVREM_I8, - SDIVREM_I16, - SDIVREM_I32, - SDIVREM_I64, - SDIVREM_I128, - UDIVREM_I8, - UDIVREM_I16, - UDIVREM_I32, - UDIVREM_I64, - UDIVREM_I128, - NEG_I32, - NEG_I64, - - // FLOATING POINT - ADD_F32, - ADD_F64, - ADD_F80, - ADD_F128, - ADD_PPCF128, - SUB_F32, - SUB_F64, - SUB_F80, - SUB_F128, - SUB_PPCF128, - MUL_F32, - MUL_F64, - MUL_F80, - MUL_F128, - MUL_PPCF128, - DIV_F32, - DIV_F64, - DIV_F80, - DIV_F128, - DIV_PPCF128, - REM_F32, - REM_F64, - REM_F80, - REM_F128, - REM_PPCF128, - FMA_F32, - FMA_F64, - FMA_F80, - FMA_F128, - FMA_PPCF128, - POWI_F32, - POWI_F64, - POWI_F80, - POWI_F128, - POWI_PPCF128, - SQRT_F32, - SQRT_F64, - SQRT_F80, - SQRT_F128, - SQRT_PPCF128, - LOG_F32, - LOG_F64, - LOG_F80, - LOG_F128, - LOG_PPCF128, - LOG2_F32, - LOG2_F64, - LOG2_F80, - LOG2_F128, - LOG2_PPCF128, - LOG10_F32, - LOG10_F64, - LOG10_F80, - LOG10_F128, - LOG10_PPCF128, - EXP_F32, - EXP_F64, - EXP_F80, - EXP_F128, - EXP_PPCF128, - EXP2_F32, - EXP2_F64, - EXP2_F80, - EXP2_F128, - EXP2_PPCF128, - SIN_F32, - SIN_F64, - SIN_F80, - SIN_F128, - SIN_PPCF128, - COS_F32, - COS_F64, - COS_F80, - COS_F128, - COS_PPCF128, - SINCOS_F32, - SINCOS_F64, - SINCOS_F80, - SINCOS_F128, - SINCOS_PPCF128, - POW_F32, - POW_F64, - POW_F80, - POW_F128, - POW_PPCF128, - CEIL_F32, - CEIL_F64, - CEIL_F80, - CEIL_F128, - CEIL_PPCF128, - TRUNC_F32, - TRUNC_F64, - TRUNC_F80, - TRUNC_F128, - TRUNC_PPCF128, - RINT_F32, - RINT_F64, - RINT_F80, - RINT_F128, - RINT_PPCF128, - NEARBYINT_F32, - NEARBYINT_F64, - NEARBYINT_F80, - NEARBYINT_F128, - NEARBYINT_PPCF128, - ROUND_F32, - ROUND_F64, - ROUND_F80, - ROUND_F128, - ROUND_PPCF128, - FLOOR_F32, - FLOOR_F64, - FLOOR_F80, - FLOOR_F128, - FLOOR_PPCF128, - COPYSIGN_F32, - COPYSIGN_F64, - COPYSIGN_F80, - COPYSIGN_F128, - COPYSIGN_PPCF128, - FMIN_F32, - FMIN_F64, - FMIN_F80, - FMIN_F128, - FMIN_PPCF128, - FMAX_F32, - FMAX_F64, - FMAX_F80, - FMAX_F128, - FMAX_PPCF128, - - // CONVERSION - FPEXT_F32_PPCF128, - FPEXT_F64_PPCF128, - FPEXT_F64_F128, - FPEXT_F32_F128, - FPEXT_F32_F64, - FPEXT_F16_F32, - FPROUND_F32_F16, - FPROUND_F64_F16, - FPROUND_F80_F16, - FPROUND_F128_F16, - FPROUND_PPCF128_F16, - FPROUND_F64_F32, - FPROUND_F80_F32, - FPROUND_F128_F32, - FPROUND_PPCF128_F32, - FPROUND_F80_F64, - FPROUND_F128_F64, - FPROUND_PPCF128_F64, - FPTOSINT_F32_I32, - FPTOSINT_F32_I64, - FPTOSINT_F32_I128, - FPTOSINT_F64_I32, - FPTOSINT_F64_I64, - FPTOSINT_F64_I128, - FPTOSINT_F80_I32, - FPTOSINT_F80_I64, - FPTOSINT_F80_I128, - FPTOSINT_F128_I32, - FPTOSINT_F128_I64, - FPTOSINT_F128_I128, - FPTOSINT_PPCF128_I32, - FPTOSINT_PPCF128_I64, - FPTOSINT_PPCF128_I128, - FPTOUINT_F32_I32, - FPTOUINT_F32_I64, - FPTOUINT_F32_I128, - FPTOUINT_F64_I32, - FPTOUINT_F64_I64, - FPTOUINT_F64_I128, - FPTOUINT_F80_I32, - FPTOUINT_F80_I64, - FPTOUINT_F80_I128, - FPTOUINT_F128_I32, - FPTOUINT_F128_I64, - FPTOUINT_F128_I128, - FPTOUINT_PPCF128_I32, - FPTOUINT_PPCF128_I64, - FPTOUINT_PPCF128_I128, - SINTTOFP_I32_F32, - SINTTOFP_I32_F64, - SINTTOFP_I32_F80, - SINTTOFP_I32_F128, - SINTTOFP_I32_PPCF128, - SINTTOFP_I64_F32, - SINTTOFP_I64_F64, - SINTTOFP_I64_F80, - SINTTOFP_I64_F128, - SINTTOFP_I64_PPCF128, - SINTTOFP_I128_F32, - SINTTOFP_I128_F64, - SINTTOFP_I128_F80, - SINTTOFP_I128_F128, - SINTTOFP_I128_PPCF128, - UINTTOFP_I32_F32, - UINTTOFP_I32_F64, - UINTTOFP_I32_F80, - UINTTOFP_I32_F128, - UINTTOFP_I32_PPCF128, - UINTTOFP_I64_F32, - UINTTOFP_I64_F64, - UINTTOFP_I64_F80, - UINTTOFP_I64_F128, - UINTTOFP_I64_PPCF128, - UINTTOFP_I128_F32, - UINTTOFP_I128_F64, - UINTTOFP_I128_F80, - UINTTOFP_I128_F128, - UINTTOFP_I128_PPCF128, - - // COMPARISON - OEQ_F32, - OEQ_F64, - OEQ_F128, - OEQ_PPCF128, - UNE_F32, - UNE_F64, - UNE_F128, - UNE_PPCF128, - OGE_F32, - OGE_F64, - OGE_F128, - OGE_PPCF128, - OLT_F32, - OLT_F64, - OLT_F128, - OLT_PPCF128, - OLE_F32, - OLE_F64, - OLE_F128, - OLE_PPCF128, - OGT_F32, - OGT_F64, - OGT_F128, - OGT_PPCF128, - UO_F32, - UO_F64, - UO_F128, - UO_PPCF128, - O_F32, - O_F64, - O_F128, - O_PPCF128, - - // MEMORY - MEMCPY, - MEMSET, - MEMMOVE, - - // EXCEPTION HANDLING - UNWIND_RESUME, - - // Note: there's two sets of atomics libcalls; see - // for more info on the - // difference between them. - - // Atomic '__sync_*' libcalls. - SYNC_VAL_COMPARE_AND_SWAP_1, - SYNC_VAL_COMPARE_AND_SWAP_2, - SYNC_VAL_COMPARE_AND_SWAP_4, - SYNC_VAL_COMPARE_AND_SWAP_8, - SYNC_VAL_COMPARE_AND_SWAP_16, - SYNC_LOCK_TEST_AND_SET_1, - SYNC_LOCK_TEST_AND_SET_2, - SYNC_LOCK_TEST_AND_SET_4, - SYNC_LOCK_TEST_AND_SET_8, - SYNC_LOCK_TEST_AND_SET_16, - SYNC_FETCH_AND_ADD_1, - SYNC_FETCH_AND_ADD_2, - SYNC_FETCH_AND_ADD_4, - SYNC_FETCH_AND_ADD_8, - SYNC_FETCH_AND_ADD_16, - SYNC_FETCH_AND_SUB_1, - SYNC_FETCH_AND_SUB_2, - SYNC_FETCH_AND_SUB_4, - SYNC_FETCH_AND_SUB_8, - SYNC_FETCH_AND_SUB_16, - SYNC_FETCH_AND_AND_1, - SYNC_FETCH_AND_AND_2, - SYNC_FETCH_AND_AND_4, - SYNC_FETCH_AND_AND_8, - SYNC_FETCH_AND_AND_16, - SYNC_FETCH_AND_OR_1, - SYNC_FETCH_AND_OR_2, - SYNC_FETCH_AND_OR_4, - SYNC_FETCH_AND_OR_8, - SYNC_FETCH_AND_OR_16, - SYNC_FETCH_AND_XOR_1, - SYNC_FETCH_AND_XOR_2, - SYNC_FETCH_AND_XOR_4, - SYNC_FETCH_AND_XOR_8, - SYNC_FETCH_AND_XOR_16, - SYNC_FETCH_AND_NAND_1, - SYNC_FETCH_AND_NAND_2, - SYNC_FETCH_AND_NAND_4, - SYNC_FETCH_AND_NAND_8, - SYNC_FETCH_AND_NAND_16, - SYNC_FETCH_AND_MAX_1, - SYNC_FETCH_AND_MAX_2, - SYNC_FETCH_AND_MAX_4, - SYNC_FETCH_AND_MAX_8, - SYNC_FETCH_AND_MAX_16, - SYNC_FETCH_AND_UMAX_1, - SYNC_FETCH_AND_UMAX_2, - SYNC_FETCH_AND_UMAX_4, - SYNC_FETCH_AND_UMAX_8, - SYNC_FETCH_AND_UMAX_16, - SYNC_FETCH_AND_MIN_1, - SYNC_FETCH_AND_MIN_2, - SYNC_FETCH_AND_MIN_4, - SYNC_FETCH_AND_MIN_8, - SYNC_FETCH_AND_MIN_16, - SYNC_FETCH_AND_UMIN_1, - SYNC_FETCH_AND_UMIN_2, - SYNC_FETCH_AND_UMIN_4, - SYNC_FETCH_AND_UMIN_8, - SYNC_FETCH_AND_UMIN_16, - - // Atomic '__atomic_*' libcalls. - ATOMIC_LOAD, - ATOMIC_LOAD_1, - ATOMIC_LOAD_2, - ATOMIC_LOAD_4, - ATOMIC_LOAD_8, - ATOMIC_LOAD_16, - - ATOMIC_STORE, - ATOMIC_STORE_1, - ATOMIC_STORE_2, - ATOMIC_STORE_4, - ATOMIC_STORE_8, - ATOMIC_STORE_16, - - ATOMIC_EXCHANGE, - ATOMIC_EXCHANGE_1, - ATOMIC_EXCHANGE_2, - ATOMIC_EXCHANGE_4, - ATOMIC_EXCHANGE_8, - ATOMIC_EXCHANGE_16, - - ATOMIC_COMPARE_EXCHANGE, - ATOMIC_COMPARE_EXCHANGE_1, - ATOMIC_COMPARE_EXCHANGE_2, - ATOMIC_COMPARE_EXCHANGE_4, - ATOMIC_COMPARE_EXCHANGE_8, - ATOMIC_COMPARE_EXCHANGE_16, - - ATOMIC_FETCH_ADD_1, - ATOMIC_FETCH_ADD_2, - ATOMIC_FETCH_ADD_4, - ATOMIC_FETCH_ADD_8, - ATOMIC_FETCH_ADD_16, - - ATOMIC_FETCH_SUB_1, - ATOMIC_FETCH_SUB_2, - ATOMIC_FETCH_SUB_4, - ATOMIC_FETCH_SUB_8, - ATOMIC_FETCH_SUB_16, - - ATOMIC_FETCH_AND_1, - ATOMIC_FETCH_AND_2, - ATOMIC_FETCH_AND_4, - ATOMIC_FETCH_AND_8, - ATOMIC_FETCH_AND_16, - - ATOMIC_FETCH_OR_1, - ATOMIC_FETCH_OR_2, - ATOMIC_FETCH_OR_4, - ATOMIC_FETCH_OR_8, - ATOMIC_FETCH_OR_16, - - ATOMIC_FETCH_XOR_1, - ATOMIC_FETCH_XOR_2, - ATOMIC_FETCH_XOR_4, - ATOMIC_FETCH_XOR_8, - ATOMIC_FETCH_XOR_16, - - ATOMIC_FETCH_NAND_1, - ATOMIC_FETCH_NAND_2, - ATOMIC_FETCH_NAND_4, - ATOMIC_FETCH_NAND_8, - ATOMIC_FETCH_NAND_16, - - // Stack Protector Fail. - STACKPROTECTOR_CHECK_FAIL, - - // Deoptimization. - DEOPTIMIZE, - - UNKNOWN_LIBCALL - }; - - /// getFPEXT - Return the FPEXT_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFPEXT(EVT OpVT, EVT RetVT); - - /// getFPROUND - Return the FPROUND_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFPROUND(EVT OpVT, EVT RetVT); - - /// getFPTOSINT - Return the FPTOSINT_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFPTOSINT(EVT OpVT, EVT RetVT); - - /// getFPTOUINT - Return the FPTOUINT_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getFPTOUINT(EVT OpVT, EVT RetVT); - - /// getSINTTOFP - Return the SINTTOFP_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getSINTTOFP(EVT OpVT, EVT RetVT); - - /// getUINTTOFP - Return the UINTTOFP_*_* value for the given types, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getUINTTOFP(EVT OpVT, EVT RetVT); - - /// Return the SYNC_FETCH_AND_* value for the given opcode and type, or - /// UNKNOWN_LIBCALL if there is none. - Libcall getSYNC(unsigned Opc, MVT VT); -} -} - -#endif diff --git a/llvm/include/llvm/CodeGen/ScheduleDAG.h b/llvm/include/llvm/CodeGen/ScheduleDAG.h deleted file mode 100644 index 6469cabd..00000000 --- a/llvm/include/llvm/CodeGen/ScheduleDAG.h +++ /dev/null @@ -1,771 +0,0 @@ -//===------- llvm/CodeGen/ScheduleDAG.h - Common Base Class------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the ScheduleDAG class, which is used as the common -// base class for instruction schedulers. This encapsulates the scheduling DAG, -// which is shared between SelectionDAG and MachineInstr scheduling. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SCHEDULEDAG_H -#define LLVM_CODEGEN_SCHEDULEDAG_H - -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/CodeGen/MachineInstr.h" -#include "llvm/Target/TargetLowering.h" - -namespace llvm { - class SUnit; - class MachineConstantPool; - class MachineFunction; - class MachineRegisterInfo; - class MachineInstr; - struct MCSchedClassDesc; - class TargetRegisterInfo; - class ScheduleDAG; - class SDNode; - class TargetInstrInfo; - class MCInstrDesc; - class TargetMachine; - class TargetRegisterClass; - template class GraphWriter; - - /// SDep - Scheduling dependency. This represents one direction of an - /// edge in the scheduling DAG. - class SDep { - public: - /// Kind - These are the different kinds of scheduling dependencies. - enum Kind { - Data, ///< Regular data dependence (aka true-dependence). - Anti, ///< A register anti-dependedence (aka WAR). - Output, ///< A register output-dependence (aka WAW). - Order ///< Any other ordering dependency. - }; - - // Strong dependencies must be respected by the scheduler. Artificial - // dependencies may be removed only if they are redundant with another - // strong depedence. - // - // Weak dependencies may be violated by the scheduling strategy, but only if - // the strategy can prove it is correct to do so. - // - // Strong OrderKinds must occur before "Weak". - // Weak OrderKinds must occur after "Weak". - enum OrderKind { - Barrier, ///< An unknown scheduling barrier. - MayAliasMem, ///< Nonvolatile load/Store instructions that may alias. - MustAliasMem, ///< Nonvolatile load/Store instructions that must alias. - Artificial, ///< Arbitrary strong DAG edge (no real dependence). - Weak, ///< Arbitrary weak DAG edge. - Cluster ///< Weak DAG edge linking a chain of clustered instrs. - }; - - private: - /// Dep - A pointer to the depending/depended-on SUnit, and an enum - /// indicating the kind of the dependency. - PointerIntPair Dep; - - /// Contents - A union discriminated by the dependence kind. - union { - /// Reg - For Data, Anti, and Output dependencies, the associated - /// register. For Data dependencies that don't currently have a register - /// assigned, this is set to zero. - unsigned Reg; - - /// Order - Additional information about Order dependencies. - unsigned OrdKind; // enum OrderKind - } Contents; - - /// Latency - The time associated with this edge. Often this is just - /// the value of the Latency field of the predecessor, however advanced - /// models may provide additional information about specific edges. - unsigned Latency; - - public: - /// SDep - Construct a null SDep. This is only for use by container - /// classes which require default constructors. SUnits may not - /// have null SDep edges. - SDep() : Dep(nullptr, Data) {} - - /// SDep - Construct an SDep with the specified values. - SDep(SUnit *S, Kind kind, unsigned Reg) - : Dep(S, kind), Contents() { - switch (kind) { - default: - llvm_unreachable("Reg given for non-register dependence!"); - case Anti: - case Output: - assert(Reg != 0 && - "SDep::Anti and SDep::Output must use a non-zero Reg!"); - Contents.Reg = Reg; - Latency = 0; - break; - case Data: - Contents.Reg = Reg; - Latency = 1; - break; - } - } - SDep(SUnit *S, OrderKind kind) - : Dep(S, Order), Contents(), Latency(0) { - Contents.OrdKind = kind; - } - - /// Return true if the specified SDep is equivalent except for latency. - bool overlaps(const SDep &Other) const; - - bool operator==(const SDep &Other) const { - return overlaps(Other) && Latency == Other.Latency; - } - - bool operator!=(const SDep &Other) const { - return !operator==(Other); - } - - /// getLatency - Return the latency value for this edge, which roughly - /// means the minimum number of cycles that must elapse between the - /// predecessor and the successor, given that they have this edge - /// between them. - unsigned getLatency() const { - return Latency; - } - - /// setLatency - Set the latency for this edge. - void setLatency(unsigned Lat) { - Latency = Lat; - } - - //// getSUnit - Return the SUnit to which this edge points. - SUnit *getSUnit() const; - - //// setSUnit - Assign the SUnit to which this edge points. - void setSUnit(SUnit *SU); - - /// getKind - Return an enum value representing the kind of the dependence. - Kind getKind() const; - - /// isCtrl - Shorthand for getKind() != SDep::Data. - bool isCtrl() const { - return getKind() != Data; - } - - /// isNormalMemory - Test if this is an Order dependence between two - /// memory accesses where both sides of the dependence access memory - /// in non-volatile and fully modeled ways. - bool isNormalMemory() const { - return getKind() == Order && (Contents.OrdKind == MayAliasMem - || Contents.OrdKind == MustAliasMem); - } - - /// isBarrier - Test if this is an Order dependence that is marked - /// as a barrier. - bool isBarrier() const { - return getKind() == Order && Contents.OrdKind == Barrier; - } - - /// isNormalMemoryOrBarrier - Test if this is could be any kind of memory - /// dependence. - bool isNormalMemoryOrBarrier() const { - return (isNormalMemory() || isBarrier()); - } - - /// isMustAlias - Test if this is an Order dependence that is marked - /// as "must alias", meaning that the SUnits at either end of the edge - /// have a memory dependence on a known memory location. - bool isMustAlias() const { - return getKind() == Order && Contents.OrdKind == MustAliasMem; - } - - /// isWeak - Test if this a weak dependence. Weak dependencies are - /// considered DAG edges for height computation and other heuristics, but do - /// not force ordering. Breaking a weak edge may require the scheduler to - /// compensate, for example by inserting a copy. - bool isWeak() const { - return getKind() == Order && Contents.OrdKind >= Weak; - } - - /// isArtificial - Test if this is an Order dependence that is marked - /// as "artificial", meaning it isn't necessary for correctness. - bool isArtificial() const { - return getKind() == Order && Contents.OrdKind == Artificial; - } - - /// isCluster - Test if this is an Order dependence that is marked - /// as "cluster", meaning it is artificial and wants to be adjacent. - bool isCluster() const { - return getKind() == Order && Contents.OrdKind == Cluster; - } - - /// isAssignedRegDep - Test if this is a Data dependence that is - /// associated with a register. - bool isAssignedRegDep() const { - return getKind() == Data && Contents.Reg != 0; - } - - /// getReg - Return the register associated with this edge. This is - /// only valid on Data, Anti, and Output edges. On Data edges, this - /// value may be zero, meaning there is no associated register. - unsigned getReg() const { - assert((getKind() == Data || getKind() == Anti || getKind() == Output) && - "getReg called on non-register dependence edge!"); - return Contents.Reg; - } - - /// setReg - Assign the associated register for this edge. This is - /// only valid on Data, Anti, and Output edges. On Anti and Output - /// edges, this value must not be zero. On Data edges, the value may - /// be zero, which would mean that no specific register is associated - /// with this edge. - void setReg(unsigned Reg) { - assert((getKind() == Data || getKind() == Anti || getKind() == Output) && - "setReg called on non-register dependence edge!"); - assert((getKind() != Anti || Reg != 0) && - "SDep::Anti edge cannot use the zero register!"); - assert((getKind() != Output || Reg != 0) && - "SDep::Output edge cannot use the zero register!"); - Contents.Reg = Reg; - } - }; - - template <> - struct isPodLike { static const bool value = true; }; - - /// SUnit - Scheduling unit. This is a node in the scheduling DAG. - class SUnit { - private: - enum : unsigned { BoundaryID = ~0u }; - - SDNode *Node; // Representative node. - MachineInstr *Instr; // Alternatively, a MachineInstr. - public: - SUnit *OrigNode; // If not this, the node from which - // this node was cloned. - // (SD scheduling only) - - const MCSchedClassDesc *SchedClass; // NULL or resolved SchedClass. - - // Preds/Succs - The SUnits before/after us in the graph. - SmallVector Preds; // All sunit predecessors. - SmallVector Succs; // All sunit successors. - - typedef SmallVectorImpl::iterator pred_iterator; - typedef SmallVectorImpl::iterator succ_iterator; - typedef SmallVectorImpl::const_iterator const_pred_iterator; - typedef SmallVectorImpl::const_iterator const_succ_iterator; - - unsigned NodeNum; // Entry # of node in the node vector. - unsigned NodeQueueId; // Queue id of node. - unsigned NumPreds; // # of SDep::Data preds. - unsigned NumSuccs; // # of SDep::Data sucss. - unsigned NumPredsLeft; // # of preds not scheduled. - unsigned NumSuccsLeft; // # of succs not scheduled. - unsigned WeakPredsLeft; // # of weak preds not scheduled. - unsigned WeakSuccsLeft; // # of weak succs not scheduled. - unsigned short NumRegDefsLeft; // # of reg defs with no scheduled use. - unsigned short Latency; // Node latency. - bool isVRegCycle : 1; // May use and def the same vreg. - bool isCall : 1; // Is a function call. - bool isCallOp : 1; // Is a function call operand. - bool isTwoAddress : 1; // Is a two-address instruction. - bool isCommutable : 1; // Is a commutable instruction. - bool hasPhysRegUses : 1; // Has physreg uses. - bool hasPhysRegDefs : 1; // Has physreg defs that are being used. - bool hasPhysRegClobbers : 1; // Has any physreg defs, used or not. - bool isPending : 1; // True once pending. - bool isAvailable : 1; // True once available. - bool isScheduled : 1; // True once scheduled. - bool isScheduleHigh : 1; // True if preferable to schedule high. - bool isScheduleLow : 1; // True if preferable to schedule low. - bool isCloned : 1; // True if this node has been cloned. - bool isUnbuffered : 1; // Uses an unbuffered resource. - bool hasReservedResource : 1; // Uses a reserved resource. - Sched::Preference SchedulingPref; // Scheduling preference. - - private: - bool isDepthCurrent : 1; // True if Depth is current. - bool isHeightCurrent : 1; // True if Height is current. - unsigned Depth; // Node depth. - unsigned Height; // Node height. - public: - unsigned TopReadyCycle; // Cycle relative to start when node is ready. - unsigned BotReadyCycle; // Cycle relative to end when node is ready. - - const TargetRegisterClass *CopyDstRC; // Is a special copy node if not null. - const TargetRegisterClass *CopySrcRC; - - /// SUnit - Construct an SUnit for pre-regalloc scheduling to represent - /// an SDNode and any nodes flagged to it. - SUnit(SDNode *node, unsigned nodenum) - : Node(node), Instr(nullptr), OrigNode(nullptr), SchedClass(nullptr), - NodeNum(nodenum), NodeQueueId(0), NumPreds(0), NumSuccs(0), - NumPredsLeft(0), NumSuccsLeft(0), WeakPredsLeft(0), WeakSuccsLeft(0), - NumRegDefsLeft(0), Latency(0), isVRegCycle(false), isCall(false), - isCallOp(false), isTwoAddress(false), isCommutable(false), - hasPhysRegUses(false), hasPhysRegDefs(false), hasPhysRegClobbers(false), - isPending(false), isAvailable(false), isScheduled(false), - isScheduleHigh(false), isScheduleLow(false), isCloned(false), - isUnbuffered(false), hasReservedResource(false), - SchedulingPref(Sched::None), isDepthCurrent(false), - isHeightCurrent(false), Depth(0), Height(0), TopReadyCycle(0), - BotReadyCycle(0), CopyDstRC(nullptr), CopySrcRC(nullptr) {} - - /// SUnit - Construct an SUnit for post-regalloc scheduling to represent - /// a MachineInstr. - SUnit(MachineInstr *instr, unsigned nodenum) - : Node(nullptr), Instr(instr), OrigNode(nullptr), SchedClass(nullptr), - NodeNum(nodenum), NodeQueueId(0), NumPreds(0), NumSuccs(0), - NumPredsLeft(0), NumSuccsLeft(0), WeakPredsLeft(0), WeakSuccsLeft(0), - NumRegDefsLeft(0), Latency(0), isVRegCycle(false), isCall(false), - isCallOp(false), isTwoAddress(false), isCommutable(false), - hasPhysRegUses(false), hasPhysRegDefs(false), hasPhysRegClobbers(false), - isPending(false), isAvailable(false), isScheduled(false), - isScheduleHigh(false), isScheduleLow(false), isCloned(false), - isUnbuffered(false), hasReservedResource(false), - SchedulingPref(Sched::None), isDepthCurrent(false), - isHeightCurrent(false), Depth(0), Height(0), TopReadyCycle(0), - BotReadyCycle(0), CopyDstRC(nullptr), CopySrcRC(nullptr) {} - - /// SUnit - Construct a placeholder SUnit. - SUnit() - : Node(nullptr), Instr(nullptr), OrigNode(nullptr), SchedClass(nullptr), - NodeNum(BoundaryID), NodeQueueId(0), NumPreds(0), NumSuccs(0), - NumPredsLeft(0), NumSuccsLeft(0), WeakPredsLeft(0), WeakSuccsLeft(0), - NumRegDefsLeft(0), Latency(0), isVRegCycle(false), isCall(false), - isCallOp(false), isTwoAddress(false), isCommutable(false), - hasPhysRegUses(false), hasPhysRegDefs(false), hasPhysRegClobbers(false), - isPending(false), isAvailable(false), isScheduled(false), - isScheduleHigh(false), isScheduleLow(false), isCloned(false), - isUnbuffered(false), hasReservedResource(false), - SchedulingPref(Sched::None), isDepthCurrent(false), - isHeightCurrent(false), Depth(0), Height(0), TopReadyCycle(0), - BotReadyCycle(0), CopyDstRC(nullptr), CopySrcRC(nullptr) {} - - /// \brief Boundary nodes are placeholders for the boundary of the - /// scheduling region. - /// - /// BoundaryNodes can have DAG edges, including Data edges, but they do not - /// correspond to schedulable entities (e.g. instructions) and do not have a - /// valid ID. Consequently, always check for boundary nodes before accessing - /// an assoicative data structure keyed on node ID. - bool isBoundaryNode() const { return NodeNum == BoundaryID; } - - /// setNode - Assign the representative SDNode for this SUnit. - /// This may be used during pre-regalloc scheduling. - void setNode(SDNode *N) { - assert(!Instr && "Setting SDNode of SUnit with MachineInstr!"); - Node = N; - } - - /// getNode - Return the representative SDNode for this SUnit. - /// This may be used during pre-regalloc scheduling. - SDNode *getNode() const { - assert(!Instr && "Reading SDNode of SUnit with MachineInstr!"); - return Node; - } - - /// isInstr - Return true if this SUnit refers to a machine instruction as - /// opposed to an SDNode. - bool isInstr() const { return Instr; } - - /// setInstr - Assign the instruction for the SUnit. - /// This may be used during post-regalloc scheduling. - void setInstr(MachineInstr *MI) { - assert(!Node && "Setting MachineInstr of SUnit with SDNode!"); - Instr = MI; - } - - /// getInstr - Return the representative MachineInstr for this SUnit. - /// This may be used during post-regalloc scheduling. - MachineInstr *getInstr() const { - assert(!Node && "Reading MachineInstr of SUnit with SDNode!"); - return Instr; - } - - /// addPred - This adds the specified edge as a pred of the current node if - /// not already. It also adds the current node as a successor of the - /// specified node. - bool addPred(const SDep &D, bool Required = true); - - /// addPredBarrier - This adds a barrier edge to SU by calling - /// addPred(), with latency 0 generally or latency 1 for a store - /// followed by a load. - bool addPredBarrier(SUnit *SU) { - SDep Dep(SU, SDep::Barrier); - unsigned TrueMemOrderLatency = - ((SU->getInstr()->mayStore() && this->getInstr()->mayLoad()) ? 1 : 0); - Dep.setLatency(TrueMemOrderLatency); - return addPred(Dep); - } - - /// removePred - This removes the specified edge as a pred of the current - /// node if it exists. It also removes the current node as a successor of - /// the specified node. - void removePred(const SDep &D); - - /// getDepth - Return the depth of this node, which is the length of the - /// maximum path up to any node which has no predecessors. - unsigned getDepth() const { - if (!isDepthCurrent) - const_cast(this)->ComputeDepth(); - return Depth; - } - - /// getHeight - Return the height of this node, which is the length of the - /// maximum path down to any node which has no successors. - unsigned getHeight() const { - if (!isHeightCurrent) - const_cast(this)->ComputeHeight(); - return Height; - } - - /// setDepthToAtLeast - If NewDepth is greater than this node's - /// depth value, set it to be the new depth value. This also - /// recursively marks successor nodes dirty. - void setDepthToAtLeast(unsigned NewDepth); - - /// setDepthToAtLeast - If NewDepth is greater than this node's - /// depth value, set it to be the new height value. This also - /// recursively marks predecessor nodes dirty. - void setHeightToAtLeast(unsigned NewHeight); - - /// setDepthDirty - Set a flag in this node to indicate that its - /// stored Depth value will require recomputation the next time - /// getDepth() is called. - void setDepthDirty(); - - /// setHeightDirty - Set a flag in this node to indicate that its - /// stored Height value will require recomputation the next time - /// getHeight() is called. - void setHeightDirty(); - - /// isPred - Test if node N is a predecessor of this node. - bool isPred(SUnit *N) { - for (unsigned i = 0, e = (unsigned)Preds.size(); i != e; ++i) - if (Preds[i].getSUnit() == N) - return true; - return false; - } - - /// isSucc - Test if node N is a successor of this node. - bool isSucc(SUnit *N) { - for (unsigned i = 0, e = (unsigned)Succs.size(); i != e; ++i) - if (Succs[i].getSUnit() == N) - return true; - return false; - } - - bool isTopReady() const { - return NumPredsLeft == 0; - } - bool isBottomReady() const { - return NumSuccsLeft == 0; - } - - /// \brief Order this node's predecessor edges such that the critical path - /// edge occurs first. - void biasCriticalPath(); - - void dump(const ScheduleDAG *G) const; - void dumpAll(const ScheduleDAG *G) const; - void print(raw_ostream &O, const ScheduleDAG *G) const; - - private: - void ComputeDepth(); - void ComputeHeight(); - }; - - /// Return true if the specified SDep is equivalent except for latency. - inline bool SDep::overlaps(const SDep &Other) const { - if (Dep != Other.Dep) - return false; - switch (Dep.getInt()) { - case Data: - case Anti: - case Output: - return Contents.Reg == Other.Contents.Reg; - case Order: - return Contents.OrdKind == Other.Contents.OrdKind; - } - llvm_unreachable("Invalid dependency kind!"); - } - - //// getSUnit - Return the SUnit to which this edge points. - inline SUnit *SDep::getSUnit() const { return Dep.getPointer(); } - - //// setSUnit - Assign the SUnit to which this edge points. - inline void SDep::setSUnit(SUnit *SU) { Dep.setPointer(SU); } - - /// getKind - Return an enum value representing the kind of the dependence. - inline SDep::Kind SDep::getKind() const { return Dep.getInt(); } - - //===--------------------------------------------------------------------===// - /// SchedulingPriorityQueue - This interface is used to plug different - /// priorities computation algorithms into the list scheduler. It implements - /// the interface of a standard priority queue, where nodes are inserted in - /// arbitrary order and returned in priority order. The computation of the - /// priority and the representation of the queue are totally up to the - /// implementation to decide. - /// - class SchedulingPriorityQueue { - virtual void anchor(); - unsigned CurCycle; - bool HasReadyFilter; - public: - SchedulingPriorityQueue(bool rf = false): - CurCycle(0), HasReadyFilter(rf) {} - virtual ~SchedulingPriorityQueue() {} - - virtual bool isBottomUp() const = 0; - - virtual void initNodes(std::vector &SUnits) = 0; - virtual void addNode(const SUnit *SU) = 0; - virtual void updateNode(const SUnit *SU) = 0; - virtual void releaseState() = 0; - - virtual bool empty() const = 0; - - bool hasReadyFilter() const { return HasReadyFilter; } - - virtual bool tracksRegPressure() const { return false; } - - virtual bool isReady(SUnit *) const { - assert(!HasReadyFilter && "The ready filter must override isReady()"); - return true; - } - virtual void push(SUnit *U) = 0; - - void push_all(const std::vector &Nodes) { - for (std::vector::const_iterator I = Nodes.begin(), - E = Nodes.end(); I != E; ++I) - push(*I); - } - - virtual SUnit *pop() = 0; - - virtual void remove(SUnit *SU) = 0; - - virtual void dump(ScheduleDAG *) const {} - - /// scheduledNode - As each node is scheduled, this method is invoked. This - /// allows the priority function to adjust the priority of related - /// unscheduled nodes, for example. - /// - virtual void scheduledNode(SUnit *) {} - - virtual void unscheduledNode(SUnit *) {} - - void setCurCycle(unsigned Cycle) { - CurCycle = Cycle; - } - - unsigned getCurCycle() const { - return CurCycle; - } - }; - - class ScheduleDAG { - public: - const TargetMachine &TM; // Target processor - const TargetInstrInfo *TII; // Target instruction information - const TargetRegisterInfo *TRI; // Target processor register info - MachineFunction &MF; // Machine function - MachineRegisterInfo &MRI; // Virtual/real register map - std::vector SUnits; // The scheduling units. - SUnit EntrySU; // Special node for the region entry. - SUnit ExitSU; // Special node for the region exit. - -#ifdef NDEBUG - static const bool StressSched = false; -#else - bool StressSched; -#endif - - explicit ScheduleDAG(MachineFunction &mf); - - virtual ~ScheduleDAG(); - - /// clearDAG - clear the DAG state (between regions). - void clearDAG(); - - /// getInstrDesc - Return the MCInstrDesc of this SUnit. - /// Return NULL for SDNodes without a machine opcode. - const MCInstrDesc *getInstrDesc(const SUnit *SU) const { - if (SU->isInstr()) return &SU->getInstr()->getDesc(); - return getNodeDesc(SU->getNode()); - } - - /// viewGraph - Pop up a GraphViz/gv window with the ScheduleDAG rendered - /// using 'dot'. - /// - virtual void viewGraph(const Twine &Name, const Twine &Title); - virtual void viewGraph(); - - virtual void dumpNode(const SUnit *SU) const = 0; - - /// getGraphNodeLabel - Return a label for an SUnit node in a visualization - /// of the ScheduleDAG. - virtual std::string getGraphNodeLabel(const SUnit *SU) const = 0; - - /// getDAGLabel - Return a label for the region of code covered by the DAG. - virtual std::string getDAGName() const = 0; - - /// addCustomGraphFeatures - Add custom features for a visualization of - /// the ScheduleDAG. - virtual void addCustomGraphFeatures(GraphWriter &) const {} - -#ifndef NDEBUG - /// VerifyScheduledDAG - Verify that all SUnits were scheduled and that - /// their state is consistent. Return the number of scheduled SUnits. - unsigned VerifyScheduledDAG(bool isBottomUp); -#endif - - private: - // Return the MCInstrDesc of this SDNode or NULL. - const MCInstrDesc *getNodeDesc(const SDNode *Node) const; - }; - - class SUnitIterator : public std::iterator { - SUnit *Node; - unsigned Operand; - - SUnitIterator(SUnit *N, unsigned Op) : Node(N), Operand(Op) {} - public: - bool operator==(const SUnitIterator& x) const { - return Operand == x.Operand; - } - bool operator!=(const SUnitIterator& x) const { return !operator==(x); } - - pointer operator*() const { - return Node->Preds[Operand].getSUnit(); - } - pointer operator->() const { return operator*(); } - - SUnitIterator& operator++() { // Preincrement - ++Operand; - return *this; - } - SUnitIterator operator++(int) { // Postincrement - SUnitIterator tmp = *this; ++*this; return tmp; - } - - static SUnitIterator begin(SUnit *N) { return SUnitIterator(N, 0); } - static SUnitIterator end (SUnit *N) { - return SUnitIterator(N, (unsigned)N->Preds.size()); - } - - unsigned getOperand() const { return Operand; } - const SUnit *getNode() const { return Node; } - /// isCtrlDep - Test if this is not an SDep::Data dependence. - bool isCtrlDep() const { - return getSDep().isCtrl(); - } - bool isArtificialDep() const { - return getSDep().isArtificial(); - } - const SDep &getSDep() const { - return Node->Preds[Operand]; - } - }; - - template <> struct GraphTraits { - typedef SUnit NodeType; - typedef SUnitIterator ChildIteratorType; - static inline NodeType *getEntryNode(SUnit *N) { return N; } - static inline ChildIteratorType child_begin(NodeType *N) { - return SUnitIterator::begin(N); - } - static inline ChildIteratorType child_end(NodeType *N) { - return SUnitIterator::end(N); - } - }; - - template <> struct GraphTraits : public GraphTraits { - typedef std::vector::iterator nodes_iterator; - static nodes_iterator nodes_begin(ScheduleDAG *G) { - return G->SUnits.begin(); - } - static nodes_iterator nodes_end(ScheduleDAG *G) { - return G->SUnits.end(); - } - }; - - /// ScheduleDAGTopologicalSort is a class that computes a topological - /// ordering for SUnits and provides methods for dynamically updating - /// the ordering as new edges are added. - /// - /// This allows a very fast implementation of IsReachable, for example. - /// - class ScheduleDAGTopologicalSort { - /// SUnits - A reference to the ScheduleDAG's SUnits. - std::vector &SUnits; - SUnit *ExitSU; - - /// Index2Node - Maps topological index to the node number. - std::vector Index2Node; - /// Node2Index - Maps the node number to its topological index. - std::vector Node2Index; - /// Visited - a set of nodes visited during a DFS traversal. - BitVector Visited; - - /// DFS - make a DFS traversal and mark all nodes affected by the - /// edge insertion. These nodes will later get new topological indexes - /// by means of the Shift method. - void DFS(const SUnit *SU, int UpperBound, bool& HasLoop); - - /// Shift - reassign topological indexes for the nodes in the DAG - /// to preserve the topological ordering. - void Shift(BitVector& Visited, int LowerBound, int UpperBound); - - /// Allocate - assign the topological index to the node n. - void Allocate(int n, int index); - - public: - ScheduleDAGTopologicalSort(std::vector &SUnits, SUnit *ExitSU); - - /// InitDAGTopologicalSorting - create the initial topological - /// ordering from the DAG to be scheduled. - void InitDAGTopologicalSorting(); - - /// IsReachable - Checks if SU is reachable from TargetSU. - bool IsReachable(const SUnit *SU, const SUnit *TargetSU); - - /// WillCreateCycle - Return true if addPred(TargetSU, SU) creates a cycle. - bool WillCreateCycle(SUnit *TargetSU, SUnit *SU); - - /// AddPred - Updates the topological ordering to accommodate an edge - /// to be added from SUnit X to SUnit Y. - void AddPred(SUnit *Y, SUnit *X); - - /// RemovePred - Updates the topological ordering to accommodate an - /// an edge to be removed from the specified node N from the predecessors - /// of the current node M. - void RemovePred(SUnit *M, SUnit *N); - - typedef std::vector::iterator iterator; - typedef std::vector::const_iterator const_iterator; - iterator begin() { return Index2Node.begin(); } - const_iterator begin() const { return Index2Node.begin(); } - iterator end() { return Index2Node.end(); } - const_iterator end() const { return Index2Node.end(); } - - typedef std::vector::reverse_iterator reverse_iterator; - typedef std::vector::const_reverse_iterator const_reverse_iterator; - reverse_iterator rbegin() { return Index2Node.rbegin(); } - const_reverse_iterator rbegin() const { return Index2Node.rbegin(); } - reverse_iterator rend() { return Index2Node.rend(); } - const_reverse_iterator rend() const { return Index2Node.rend(); } - }; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h b/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h deleted file mode 100644 index 12124ecc..00000000 --- a/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h +++ /dev/null @@ -1,361 +0,0 @@ -//==- ScheduleDAGInstrs.h - MachineInstr Scheduling --------------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the ScheduleDAGInstrs class, which implements -// scheduling for a MachineInstr-based dependency graph. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SCHEDULEDAGINSTRS_H -#define LLVM_CODEGEN_SCHEDULEDAGINSTRS_H - -#include "llvm/ADT/MapVector.h" -#include "llvm/ADT/SparseMultiSet.h" -#include "llvm/ADT/SparseSet.h" -#include "llvm/CodeGen/ScheduleDAG.h" -#include "llvm/CodeGen/TargetSchedule.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include - -namespace llvm { - class MachineFrameInfo; - class MachineLoopInfo; - class MachineDominatorTree; - class RegPressureTracker; - class PressureDiffs; - - /// An individual mapping from virtual register number to SUnit. - struct VReg2SUnit { - unsigned VirtReg; - LaneBitmask LaneMask; - SUnit *SU; - - VReg2SUnit(unsigned VReg, LaneBitmask LaneMask, SUnit *SU) - : VirtReg(VReg), LaneMask(LaneMask), SU(SU) {} - - unsigned getSparseSetIndex() const { - return TargetRegisterInfo::virtReg2Index(VirtReg); - } - }; - - /// Mapping from virtual register to SUnit including an operand index. - struct VReg2SUnitOperIdx : public VReg2SUnit { - unsigned OperandIndex; - - VReg2SUnitOperIdx(unsigned VReg, LaneBitmask LaneMask, - unsigned OperandIndex, SUnit *SU) - : VReg2SUnit(VReg, LaneMask, SU), OperandIndex(OperandIndex) {} - }; - - /// Record a physical register access. - /// For non-data-dependent uses, OpIdx == -1. - struct PhysRegSUOper { - SUnit *SU; - int OpIdx; - unsigned Reg; - - PhysRegSUOper(SUnit *su, int op, unsigned R): SU(su), OpIdx(op), Reg(R) {} - - unsigned getSparseSetIndex() const { return Reg; } - }; - - /// Use a SparseMultiSet to track physical registers. Storage is only - /// allocated once for the pass. It can be cleared in constant time and reused - /// without any frees. - typedef SparseMultiSet, uint16_t> - Reg2SUnitsMap; - - /// Use SparseSet as a SparseMap by relying on the fact that it never - /// compares ValueT's, only unsigned keys. This allows the set to be cleared - /// between scheduling regions in constant time as long as ValueT does not - /// require a destructor. - typedef SparseSet VReg2SUnitMap; - - /// Track local uses of virtual registers. These uses are gathered by the DAG - /// builder and may be consulted by the scheduler to avoid iterating an entire - /// vreg use list. - typedef SparseMultiSet VReg2SUnitMultiMap; - - typedef SparseMultiSet - VReg2SUnitOperIdxMultiMap; - - typedef PointerUnion ValueType; - struct UnderlyingObject : PointerIntPair { - UnderlyingObject(ValueType V, bool MayAlias) - : PointerIntPair(V, MayAlias) {} - ValueType getValue() const { return getPointer(); } - bool mayAlias() const { return getInt(); } - }; - typedef SmallVector UnderlyingObjectsVector; - - /// ScheduleDAGInstrs - A ScheduleDAG subclass for scheduling lists of - /// MachineInstrs. - class ScheduleDAGInstrs : public ScheduleDAG { - protected: - const MachineLoopInfo *MLI; - const MachineFrameInfo *MFI; - - /// TargetSchedModel provides an interface to the machine model. - TargetSchedModel SchedModel; - - /// True if the DAG builder should remove kill flags (in preparation for - /// rescheduling). - bool RemoveKillFlags; - - /// The standard DAG builder does not normally include terminators as DAG - /// nodes because it does not create the necessary dependencies to prevent - /// reordering. A specialized scheduler can override - /// TargetInstrInfo::isSchedulingBoundary then enable this flag to indicate - /// it has taken responsibility for scheduling the terminator correctly. - bool CanHandleTerminators; - - /// Whether lane masks should get tracked. - bool TrackLaneMasks; - - /// State specific to the current scheduling region. - /// ------------------------------------------------ - - /// The block in which to insert instructions - MachineBasicBlock *BB; - - /// The beginning of the range to be scheduled. - MachineBasicBlock::iterator RegionBegin; - - /// The end of the range to be scheduled. - MachineBasicBlock::iterator RegionEnd; - - /// Instructions in this region (distance(RegionBegin, RegionEnd)). - unsigned NumRegionInstrs; - - /// After calling BuildSchedGraph, each machine instruction in the current - /// scheduling region is mapped to an SUnit. - DenseMap MISUnitMap; - - /// After calling BuildSchedGraph, each vreg used in the scheduling region - /// is mapped to a set of SUnits. These include all local vreg uses, not - /// just the uses for a singly defined vreg. - VReg2SUnitMultiMap VRegUses; - - /// State internal to DAG building. - /// ------------------------------- - - /// Defs, Uses - Remember where defs and uses of each register are as we - /// iterate upward through the instructions. This is allocated here instead - /// of inside BuildSchedGraph to avoid the need for it to be initialized and - /// destructed for each block. - Reg2SUnitsMap Defs; - Reg2SUnitsMap Uses; - - /// Tracks the last instruction(s) in this region defining each virtual - /// register. There may be multiple current definitions for a register with - /// disjunct lanemasks. - VReg2SUnitMultiMap CurrentVRegDefs; - /// Tracks the last instructions in this region using each virtual register. - VReg2SUnitOperIdxMultiMap CurrentVRegUses; - - AliasAnalysis *AAForDep; - - /// Remember a generic side-effecting instruction as we proceed. - /// No other SU ever gets scheduled around it (except in the special - /// case of a huge region that gets reduced). - SUnit *BarrierChain; - - public: - - /// A list of SUnits, used in Value2SUsMap, during DAG construction. - /// Note: to gain speed it might be worth investigating an optimized - /// implementation of this data structure, such as a singly linked list - /// with a memory pool (SmallVector was tried but slow and SparseSet is not - /// applicable). - typedef std::list SUList; - protected: - /// A map from ValueType to SUList, used during DAG construction, - /// as a means of remembering which SUs depend on which memory - /// locations. - class Value2SUsMap; - - /// Remove in FIFO order some SUs from huge maps. - void reduceHugeMemNodeMaps(Value2SUsMap &stores, - Value2SUsMap &loads, unsigned N); - - /// Add a chain edge between SUa and SUb, but only if both AliasAnalysis - /// and Target fail to deny the dependency. - void addChainDependency(SUnit *SUa, SUnit *SUb, - unsigned Latency = 0); - - /// Add dependencies as needed from all SUs in list to SU. - void addChainDependencies(SUnit *SU, SUList &sus, unsigned Latency) { - for (auto *su : sus) - addChainDependency(SU, su, Latency); - } - - /// Add dependencies as needed from all SUs in map, to SU. - void addChainDependencies(SUnit *SU, Value2SUsMap &Val2SUsMap); - - /// Add dependencies as needed to SU, from all SUs mapped to V. - void addChainDependencies(SUnit *SU, Value2SUsMap &Val2SUsMap, - ValueType V); - - /// Add barrier chain edges from all SUs in map, and then clear - /// the map. This is equivalent to insertBarrierChain(), but - /// optimized for the common case where the new BarrierChain (a - /// global memory object) has a higher NodeNum than all SUs in - /// map. It is assumed BarrierChain has been set before calling - /// this. - void addBarrierChain(Value2SUsMap &map); - - /// Insert a barrier chain in a huge region, far below current - /// SU. Add barrier chain edges from all SUs in map with higher - /// NodeNums than this new BarrierChain, and remove them from - /// map. It is assumed BarrierChain has been set before calling - /// this. - void insertBarrierChain(Value2SUsMap &map); - - /// For an unanalyzable memory access, this Value is used in maps. - UndefValue *UnknownValue; - - /// DbgValues - Remember instruction that precedes DBG_VALUE. - /// These are generated by buildSchedGraph but persist so they can be - /// referenced when emitting the final schedule. - typedef std::vector > - DbgValueVector; - DbgValueVector DbgValues; - MachineInstr *FirstDbgValue; - - /// Set of live physical registers for updating kill flags. - BitVector LiveRegs; - - public: - explicit ScheduleDAGInstrs(MachineFunction &mf, - const MachineLoopInfo *mli, - bool RemoveKillFlags = false); - - ~ScheduleDAGInstrs() override {} - - /// \brief Get the machine model for instruction scheduling. - const TargetSchedModel *getSchedModel() const { return &SchedModel; } - - /// \brief Resolve and cache a resolved scheduling class for an SUnit. - const MCSchedClassDesc *getSchedClass(SUnit *SU) const { - if (!SU->SchedClass && SchedModel.hasInstrSchedModel()) - SU->SchedClass = SchedModel.resolveSchedClass(SU->getInstr()); - return SU->SchedClass; - } - - /// begin - Return an iterator to the top of the current scheduling region. - MachineBasicBlock::iterator begin() const { return RegionBegin; } - - /// end - Return an iterator to the bottom of the current scheduling region. - MachineBasicBlock::iterator end() const { return RegionEnd; } - - /// newSUnit - Creates a new SUnit and return a ptr to it. - SUnit *newSUnit(MachineInstr *MI); - - /// getSUnit - Return an existing SUnit for this MI, or NULL. - SUnit *getSUnit(MachineInstr *MI) const; - - /// startBlock - Prepare to perform scheduling in the given block. - virtual void startBlock(MachineBasicBlock *BB); - - /// finishBlock - Clean up after scheduling in the given block. - virtual void finishBlock(); - - /// Initialize the scheduler state for the next scheduling region. - virtual void enterRegion(MachineBasicBlock *bb, - MachineBasicBlock::iterator begin, - MachineBasicBlock::iterator end, - unsigned regioninstrs); - - /// Notify that the scheduler has finished scheduling the current region. - virtual void exitRegion(); - - /// buildSchedGraph - Build SUnits from the MachineBasicBlock that we are - /// input. - void buildSchedGraph(AliasAnalysis *AA, - RegPressureTracker *RPTracker = nullptr, - PressureDiffs *PDiffs = nullptr, - LiveIntervals *LIS = nullptr, - bool TrackLaneMasks = false); - - /// addSchedBarrierDeps - Add dependencies from instructions in the current - /// list of instructions being scheduled to scheduling barrier. We want to - /// make sure instructions which define registers that are either used by - /// the terminator or are live-out are properly scheduled. This is - /// especially important when the definition latency of the return value(s) - /// are too high to be hidden by the branch or when the liveout registers - /// used by instructions in the fallthrough block. - void addSchedBarrierDeps(); - - /// schedule - Order nodes according to selected style, filling - /// in the Sequence member. - /// - /// Typically, a scheduling algorithm will implement schedule() without - /// overriding enterRegion() or exitRegion(). - virtual void schedule() = 0; - - /// finalizeSchedule - Allow targets to perform final scheduling actions at - /// the level of the whole MachineFunction. By default does nothing. - virtual void finalizeSchedule() {} - - void dumpNode(const SUnit *SU) const override; - - /// Return a label for a DAG node that points to an instruction. - std::string getGraphNodeLabel(const SUnit *SU) const override; - - /// Return a label for the region of code covered by the DAG. - std::string getDAGName() const override; - - /// \brief Fix register kill flags that scheduling has made invalid. - void fixupKills(MachineBasicBlock *MBB); - protected: - void initSUnits(); - void addPhysRegDataDeps(SUnit *SU, unsigned OperIdx); - void addPhysRegDeps(SUnit *SU, unsigned OperIdx); - void addVRegDefDeps(SUnit *SU, unsigned OperIdx); - void addVRegUseDeps(SUnit *SU, unsigned OperIdx); - - /// \brief PostRA helper for rewriting kill flags. - void startBlockForKills(MachineBasicBlock *BB); - - /// \brief Toggle a register operand kill flag. - /// - /// Other adjustments may be made to the instruction if necessary. Return - /// true if the operand has been deleted, false if not. - bool toggleKillFlag(MachineInstr *MI, MachineOperand &MO); - - /// Returns a mask for which lanes get read/written by the given (register) - /// machine operand. - LaneBitmask getLaneMaskForMO(const MachineOperand &MO) const; - - void collectVRegUses(SUnit *SU); - }; - - /// newSUnit - Creates a new SUnit and return a ptr to it. - inline SUnit *ScheduleDAGInstrs::newSUnit(MachineInstr *MI) { -#ifndef NDEBUG - const SUnit *Addr = SUnits.empty() ? nullptr : &SUnits[0]; -#endif - SUnits.emplace_back(MI, (unsigned)SUnits.size()); - assert((Addr == nullptr || Addr == &SUnits[0]) && - "SUnits std::vector reallocated on the fly!"); - SUnits.back().OrigNode = &SUnits.back(); - return &SUnits.back(); - } - - /// getSUnit - Return an existing SUnit for this MI, or NULL. - inline SUnit *ScheduleDAGInstrs::getSUnit(MachineInstr *MI) const { - DenseMap::const_iterator I = MISUnitMap.find(MI); - if (I == MISUnitMap.end()) - return nullptr; - return I->second; - } -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/ScheduleDAGMutation.h b/llvm/include/llvm/CodeGen/ScheduleDAGMutation.h deleted file mode 100644 index 02fe2294..00000000 --- a/llvm/include/llvm/CodeGen/ScheduleDAGMutation.h +++ /dev/null @@ -1,31 +0,0 @@ -//==- ScheduleDAGMutation.h - MachineInstr Scheduling ------------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the ScheduleDAGMutation class, which represents -// a target-specific mutation of the dependency graph for scheduling. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SCHEDULEDAGMUTATION_H -#define LLVM_CODEGEN_SCHEDULEDAGMUTATION_H - -namespace llvm { - class ScheduleDAGInstrs; - - /// Mutate the DAG as a postpass after normal DAG building. - class ScheduleDAGMutation { - virtual void anchor(); - public: - virtual ~ScheduleDAGMutation() {} - - virtual void apply(ScheduleDAGInstrs *DAG) = 0; - }; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/ScheduleDFS.h b/llvm/include/llvm/CodeGen/ScheduleDFS.h deleted file mode 100644 index b2108ad3..00000000 --- a/llvm/include/llvm/CodeGen/ScheduleDFS.h +++ /dev/null @@ -1,194 +0,0 @@ -//===- ScheduleDAGILP.h - ILP metric for ScheduleDAGInstrs ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Definition of an ILP metric for machine level instruction scheduling. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SCHEDULEDFS_H -#define LLVM_CODEGEN_SCHEDULEDFS_H - -#include "llvm/CodeGen/ScheduleDAG.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -class raw_ostream; -class IntEqClasses; -class ScheduleDAGInstrs; -class SUnit; - -/// \brief Represent the ILP of the subDAG rooted at a DAG node. -/// -/// ILPValues summarize the DAG subtree rooted at each node. ILPValues are -/// valid for all nodes regardless of their subtree membership. -/// -/// When computed using bottom-up DFS, this metric assumes that the DAG is a -/// forest of trees with roots at the bottom of the schedule branching upward. -struct ILPValue { - unsigned InstrCount; - /// Length may either correspond to depth or height, depending on direction, - /// and cycles or nodes depending on context. - unsigned Length; - - ILPValue(unsigned count, unsigned length): - InstrCount(count), Length(length) {} - - // Order by the ILP metric's value. - bool operator<(ILPValue RHS) const { - return (uint64_t)InstrCount * RHS.Length - < (uint64_t)Length * RHS.InstrCount; - } - bool operator>(ILPValue RHS) const { - return RHS < *this; - } - bool operator<=(ILPValue RHS) const { - return (uint64_t)InstrCount * RHS.Length - <= (uint64_t)Length * RHS.InstrCount; - } - bool operator>=(ILPValue RHS) const { - return RHS <= *this; - } - - void print(raw_ostream &OS) const; - - void dump() const; -}; - -/// \brief Compute the values of each DAG node for various metrics during DFS. -class SchedDFSResult { - friend class SchedDFSImpl; - - static const unsigned InvalidSubtreeID = ~0u; - - /// \brief Per-SUnit data computed during DFS for various metrics. - /// - /// A node's SubtreeID is set to itself when it is visited to indicate that it - /// is the root of a subtree. Later it is set to its parent to indicate an - /// interior node. Finally, it is set to a representative subtree ID during - /// finalization. - struct NodeData { - unsigned InstrCount; - unsigned SubtreeID; - - NodeData(): InstrCount(0), SubtreeID(InvalidSubtreeID) {} - }; - - /// \brief Per-Subtree data computed during DFS. - struct TreeData { - unsigned ParentTreeID; - unsigned SubInstrCount; - - TreeData(): ParentTreeID(InvalidSubtreeID), SubInstrCount(0) {} - }; - - /// \brief Record a connection between subtrees and the connection level. - struct Connection { - unsigned TreeID; - unsigned Level; - - Connection(unsigned tree, unsigned level): TreeID(tree), Level(level) {} - }; - - bool IsBottomUp; - unsigned SubtreeLimit; - /// DFS results for each SUnit in this DAG. - std::vector DFSNodeData; - - // Store per-tree data indexed on tree ID, - SmallVector DFSTreeData; - - // For each subtree discovered during DFS, record its connections to other - // subtrees. - std::vector > SubtreeConnections; - - /// Cache the current connection level of each subtree. - /// This mutable array is updated during scheduling. - std::vector SubtreeConnectLevels; - -public: - SchedDFSResult(bool IsBU, unsigned lim) - : IsBottomUp(IsBU), SubtreeLimit(lim) {} - - /// \brief Get the node cutoff before subtrees are considered significant. - unsigned getSubtreeLimit() const { return SubtreeLimit; } - - /// \brief Return true if this DFSResult is uninitialized. - /// - /// resize() initializes DFSResult, while compute() populates it. - bool empty() const { return DFSNodeData.empty(); } - - /// \brief Clear the results. - void clear() { - DFSNodeData.clear(); - DFSTreeData.clear(); - SubtreeConnections.clear(); - SubtreeConnectLevels.clear(); - } - - /// \brief Initialize the result data with the size of the DAG. - void resize(unsigned NumSUnits) { - DFSNodeData.resize(NumSUnits); - } - - /// \brief Compute various metrics for the DAG with given roots. - void compute(ArrayRef SUnits); - - /// \brief Get the number of instructions in the given subtree and its - /// children. - unsigned getNumInstrs(const SUnit *SU) const { - return DFSNodeData[SU->NodeNum].InstrCount; - } - - /// \brief Get the number of instructions in the given subtree not including - /// children. - unsigned getNumSubInstrs(unsigned SubtreeID) const { - return DFSTreeData[SubtreeID].SubInstrCount; - } - - /// \brief Get the ILP value for a DAG node. - /// - /// A leaf node has an ILP of 1/1. - ILPValue getILP(const SUnit *SU) const { - return ILPValue(DFSNodeData[SU->NodeNum].InstrCount, 1 + SU->getDepth()); - } - - /// \brief The number of subtrees detected in this DAG. - unsigned getNumSubtrees() const { return SubtreeConnectLevels.size(); } - - /// \brief Get the ID of the subtree the given DAG node belongs to. - /// - /// For convenience, if DFSResults have not been computed yet, give everything - /// tree ID 0. - unsigned getSubtreeID(const SUnit *SU) const { - if (empty()) - return 0; - assert(SU->NodeNum < DFSNodeData.size() && "New Node"); - return DFSNodeData[SU->NodeNum].SubtreeID; - } - - /// \brief Get the connection level of a subtree. - /// - /// For bottom-up trees, the connection level is the latency depth (in cycles) - /// of the deepest connection to another subtree. - unsigned getSubtreeLevel(unsigned SubtreeID) const { - return SubtreeConnectLevels[SubtreeID]; - } - - /// \brief Scheduler callback to update SubtreeConnectLevels when a tree is - /// initially scheduled. - void scheduleTree(unsigned SubtreeID); -}; - -raw_ostream &operator<<(raw_ostream &OS, const ILPValue &Val); - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/ScheduleHazardRecognizer.h b/llvm/include/llvm/CodeGen/ScheduleHazardRecognizer.h deleted file mode 100644 index 214be279..00000000 --- a/llvm/include/llvm/CodeGen/ScheduleHazardRecognizer.h +++ /dev/null @@ -1,122 +0,0 @@ -//=- llvm/CodeGen/ScheduleHazardRecognizer.h - Scheduling Support -*- C++ -*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the ScheduleHazardRecognizer class, which implements -// hazard-avoidance heuristics for scheduling. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SCHEDULEHAZARDRECOGNIZER_H -#define LLVM_CODEGEN_SCHEDULEHAZARDRECOGNIZER_H - -namespace llvm { - -class MachineInstr; -class SUnit; - -/// HazardRecognizer - This determines whether or not an instruction can be -/// issued this cycle, and whether or not a noop needs to be inserted to handle -/// the hazard. -class ScheduleHazardRecognizer { -protected: - /// MaxLookAhead - Indicate the number of cycles in the scoreboard - /// state. Important to restore the state after backtracking. Additionally, - /// MaxLookAhead=0 identifies a fake recognizer, allowing the client to - /// bypass virtual calls. Currently the PostRA scheduler ignores it. - unsigned MaxLookAhead; - -public: - ScheduleHazardRecognizer(): MaxLookAhead(0) {} - virtual ~ScheduleHazardRecognizer(); - - enum HazardType { - NoHazard, // This instruction can be emitted at this cycle. - Hazard, // This instruction can't be emitted at this cycle. - NoopHazard // This instruction can't be emitted, and needs noops. - }; - - unsigned getMaxLookAhead() const { return MaxLookAhead; } - - bool isEnabled() const { return MaxLookAhead != 0; } - - /// atIssueLimit - Return true if no more instructions may be issued in this - /// cycle. - /// - /// FIXME: remove this once MachineScheduler is the only client. - virtual bool atIssueLimit() const { return false; } - - /// getHazardType - Return the hazard type of emitting this node. There are - /// three possible results. Either: - /// * NoHazard: it is legal to issue this instruction on this cycle. - /// * Hazard: issuing this instruction would stall the machine. If some - /// other instruction is available, issue it first. - /// * NoopHazard: issuing this instruction would break the program. If - /// some other instruction can be issued, do so, otherwise issue a noop. - virtual HazardType getHazardType(SUnit *m, int Stalls = 0) { - return NoHazard; - } - - /// Reset - This callback is invoked when a new block of - /// instructions is about to be schedule. The hazard state should be - /// set to an initialized state. - virtual void Reset() {} - - /// EmitInstruction - This callback is invoked when an instruction is - /// emitted, to advance the hazard state. - virtual void EmitInstruction(SUnit *) {} - - /// This overload will be used when the hazard recognizer is being used - /// by a non-scheduling pass, which does not use SUnits. - virtual void EmitInstruction(MachineInstr *) {} - - /// PreEmitNoops - This callback is invoked prior to emitting an instruction. - /// It should return the number of noops to emit prior to the provided - /// instruction. - /// Note: This is only used during PostRA scheduling. EmitNoop is not called - /// for these noops. - virtual unsigned PreEmitNoops(SUnit *) { - return 0; - } - - /// This overload will be used when the hazard recognizer is being used - /// by a non-scheduling pass, which does not use SUnits. - virtual unsigned PreEmitNoops(MachineInstr *) { - return 0; - } - - /// ShouldPreferAnother - This callback may be invoked if getHazardType - /// returns NoHazard. If, even though there is no hazard, it would be better to - /// schedule another available instruction, this callback should return true. - virtual bool ShouldPreferAnother(SUnit *) { - return false; - } - - /// AdvanceCycle - This callback is invoked whenever the next top-down - /// instruction to be scheduled cannot issue in the current cycle, either - /// because of latency or resource conflicts. This should increment the - /// internal state of the hazard recognizer so that previously "Hazard" - /// instructions will now not be hazards. - virtual void AdvanceCycle() {} - - /// RecedeCycle - This callback is invoked whenever the next bottom-up - /// instruction to be scheduled cannot issue in the current cycle, either - /// because of latency or resource conflicts. - virtual void RecedeCycle() {} - - /// EmitNoop - This callback is invoked when a noop was added to the - /// instruction stream. - virtual void EmitNoop() { - // Default implementation: count it as a cycle. - AdvanceCycle(); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/CodeGen/SchedulerRegistry.h b/llvm/include/llvm/CodeGen/SchedulerRegistry.h deleted file mode 100644 index a7a62276..00000000 --- a/llvm/include/llvm/CodeGen/SchedulerRegistry.h +++ /dev/null @@ -1,106 +0,0 @@ -//===-- llvm/CodeGen/SchedulerRegistry.h ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the implementation for instruction scheduler function -// pass registry (RegisterScheduler). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SCHEDULERREGISTRY_H -#define LLVM_CODEGEN_SCHEDULERREGISTRY_H - -#include "llvm/CodeGen/MachinePassRegistry.h" -#include "llvm/Target/TargetMachine.h" - -namespace llvm { - -//===----------------------------------------------------------------------===// -/// -/// RegisterScheduler class - Track the registration of instruction schedulers. -/// -//===----------------------------------------------------------------------===// - -class SelectionDAGISel; -class ScheduleDAGSDNodes; -class SelectionDAG; -class MachineBasicBlock; - -class RegisterScheduler : public MachinePassRegistryNode { -public: - typedef ScheduleDAGSDNodes *(*FunctionPassCtor)(SelectionDAGISel*, - CodeGenOpt::Level); - - static MachinePassRegistry Registry; - - RegisterScheduler(const char *N, const char *D, FunctionPassCtor C) - : MachinePassRegistryNode(N, D, (MachinePassCtor)C) - { Registry.Add(this); } - ~RegisterScheduler() { Registry.Remove(this); } - - - // Accessors. - // - RegisterScheduler *getNext() const { - return (RegisterScheduler *)MachinePassRegistryNode::getNext(); - } - static RegisterScheduler *getList() { - return (RegisterScheduler *)Registry.getList(); - } - static void setListener(MachinePassRegistryListener *L) { - Registry.setListener(L); - } -}; - -/// createBURRListDAGScheduler - This creates a bottom up register usage -/// reduction list scheduler. -ScheduleDAGSDNodes *createBURRListDAGScheduler(SelectionDAGISel *IS, - CodeGenOpt::Level OptLevel); - -/// createBURRListDAGScheduler - This creates a bottom up list scheduler that -/// schedules nodes in source code order when possible. -ScheduleDAGSDNodes *createSourceListDAGScheduler(SelectionDAGISel *IS, - CodeGenOpt::Level OptLevel); - -/// createHybridListDAGScheduler - This creates a bottom up register pressure -/// aware list scheduler that make use of latency information to avoid stalls -/// for long latency instructions in low register pressure mode. In high -/// register pressure mode it schedules to reduce register pressure. -ScheduleDAGSDNodes *createHybridListDAGScheduler(SelectionDAGISel *IS, - CodeGenOpt::Level); - -/// createILPListDAGScheduler - This creates a bottom up register pressure -/// aware list scheduler that tries to increase instruction level parallelism -/// in low register pressure mode. In high register pressure mode it schedules -/// to reduce register pressure. -ScheduleDAGSDNodes *createILPListDAGScheduler(SelectionDAGISel *IS, - CodeGenOpt::Level); - -/// createFastDAGScheduler - This creates a "fast" scheduler. -/// -ScheduleDAGSDNodes *createFastDAGScheduler(SelectionDAGISel *IS, - CodeGenOpt::Level OptLevel); - -/// createVLIWDAGScheduler - Scheduler for VLIW targets. This creates top down -/// DFA driven list scheduler with clustering heuristic to control -/// register pressure. -ScheduleDAGSDNodes *createVLIWDAGScheduler(SelectionDAGISel *IS, - CodeGenOpt::Level OptLevel); -/// createDefaultScheduler - This creates an instruction scheduler appropriate -/// for the target. -ScheduleDAGSDNodes *createDefaultScheduler(SelectionDAGISel *IS, - CodeGenOpt::Level OptLevel); - -/// createDAGLinearizer - This creates a "no-scheduling" scheduler which -/// linearize the DAG using topological order. -ScheduleDAGSDNodes *createDAGLinearizer(SelectionDAGISel *IS, - CodeGenOpt::Level OptLevel); - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h b/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h deleted file mode 100644 index e0c30fe4..00000000 --- a/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h +++ /dev/null @@ -1,124 +0,0 @@ -//=- llvm/CodeGen/ScoreboardHazardRecognizer.h - Schedule Support -*- C++ -*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the ScoreboardHazardRecognizer class, which -// encapsulates hazard-avoidance heuristics for scheduling, based on the -// scheduling itineraries specified for the target. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SCOREBOARDHAZARDRECOGNIZER_H -#define LLVM_CODEGEN_SCOREBOARDHAZARDRECOGNIZER_H - -#include "llvm/CodeGen/ScheduleHazardRecognizer.h" -#include "llvm/Support/DataTypes.h" -#include -#include - -namespace llvm { - -class InstrItineraryData; -class ScheduleDAG; -class SUnit; - -class ScoreboardHazardRecognizer : public ScheduleHazardRecognizer { - // Scoreboard to track function unit usage. Scoreboard[0] is a - // mask of the FUs in use in the cycle currently being - // schedule. Scoreboard[1] is a mask for the next cycle. The - // Scoreboard is used as a circular buffer with the current cycle - // indicated by Head. - // - // Scoreboard always counts cycles in forward execution order. If used by a - // bottom-up scheduler, then the scoreboard cycles are the inverse of the - // scheduler's cycles. - class Scoreboard { - unsigned *Data; - - // The maximum number of cycles monitored by the Scoreboard. This - // value is determined based on the target itineraries to ensure - // that all hazards can be tracked. - size_t Depth; - // Indices into the Scoreboard that represent the current cycle. - size_t Head; - public: - Scoreboard():Data(nullptr), Depth(0), Head(0) { } - ~Scoreboard() { - delete[] Data; - } - - size_t getDepth() const { return Depth; } - unsigned& operator[](size_t idx) const { - // Depth is expected to be a power-of-2. - assert(Depth && !(Depth & (Depth - 1)) && - "Scoreboard was not initialized properly!"); - - return Data[(Head + idx) & (Depth-1)]; - } - - void reset(size_t d = 1) { - if (!Data) { - Depth = d; - Data = new unsigned[Depth]; - } - - memset(Data, 0, Depth * sizeof(Data[0])); - Head = 0; - } - - void advance() { - Head = (Head + 1) & (Depth-1); - } - - void recede() { - Head = (Head - 1) & (Depth-1); - } - - // Print the scoreboard. - void dump() const; - }; - - // Support for tracing ScoreboardHazardRecognizer as a component within - // another module. - const char *DebugType; - - // Itinerary data for the target. - const InstrItineraryData *ItinData; - - const ScheduleDAG *DAG; - - /// IssueWidth - Max issue per cycle. 0=Unknown. - unsigned IssueWidth; - - /// IssueCount - Count instructions issued in this cycle. - unsigned IssueCount; - - Scoreboard ReservedScoreboard; - Scoreboard RequiredScoreboard; - -public: - ScoreboardHazardRecognizer(const InstrItineraryData *ItinData, - const ScheduleDAG *DAG, - const char *ParentDebugType = ""); - - /// atIssueLimit - Return true if no more instructions may be issued in this - /// cycle. - bool atIssueLimit() const override; - - // Stalls provides an cycle offset at which SU will be scheduled. It will be - // negative for bottom-up scheduling. - HazardType getHazardType(SUnit *SU, int Stalls) override; - void Reset() override; - void EmitInstruction(SUnit *SU) override; - void AdvanceCycle() override; - void RecedeCycle() override; -}; - -} - -#endif //!LLVM_CODEGEN_SCOREBOARDHAZARDRECOGNIZER_H diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h deleted file mode 100644 index 29cce873..00000000 --- a/llvm/include/llvm/CodeGen/SelectionDAG.h +++ /dev/null @@ -1,1438 +0,0 @@ -//===-- llvm/CodeGen/SelectionDAG.h - InstSelection DAG ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the SelectionDAG class, and transitively defines the -// SDNode class and subclasses. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SELECTIONDAG_H -#define LLVM_CODEGEN_SELECTIONDAG_H - -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/SetVector.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/ilist.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/CodeGen/DAGCombine.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/SelectionDAGNodes.h" -#include "llvm/Support/ArrayRecycler.h" -#include "llvm/Support/RecyclingAllocator.h" -#include "llvm/Target/TargetMachine.h" -#include -#include -#include -#include - -namespace llvm { - -class MachineConstantPoolValue; -class MachineFunction; -class MDNode; -class SDDbgValue; -class TargetLowering; -class SelectionDAGTargetInfo; - -class SDVTListNode : public FoldingSetNode { - friend struct FoldingSetTrait; - /// A reference to an Interned FoldingSetNodeID for this node. - /// The Allocator in SelectionDAG holds the data. - /// SDVTList contains all types which are frequently accessed in SelectionDAG. - /// The size of this list is not expected to be big so it won't introduce - /// a memory penalty. - FoldingSetNodeIDRef FastID; - const EVT *VTs; - unsigned int NumVTs; - /// The hash value for SDVTList is fixed, so cache it to avoid - /// hash calculation. - unsigned HashValue; -public: - SDVTListNode(const FoldingSetNodeIDRef ID, const EVT *VT, unsigned int Num) : - FastID(ID), VTs(VT), NumVTs(Num) { - HashValue = ID.ComputeHash(); - } - SDVTList getSDVTList() { - SDVTList result = {VTs, NumVTs}; - return result; - } -}; - -/// Specialize FoldingSetTrait for SDVTListNode -/// to avoid computing temp FoldingSetNodeID and hash value. -template<> struct FoldingSetTrait : DefaultFoldingSetTrait { - static void Profile(const SDVTListNode &X, FoldingSetNodeID& ID) { - ID = X.FastID; - } - static bool Equals(const SDVTListNode &X, const FoldingSetNodeID &ID, - unsigned IDHash, FoldingSetNodeID &TempID) { - if (X.HashValue != IDHash) - return false; - return ID == X.FastID; - } - static unsigned ComputeHash(const SDVTListNode &X, FoldingSetNodeID &TempID) { - return X.HashValue; - } -}; - -template<> struct ilist_traits : public ilist_default_traits { -private: - mutable ilist_half_node Sentinel; -public: - SDNode *createSentinel() const { - return static_cast(&Sentinel); - } - static void destroySentinel(SDNode *) {} - - SDNode *provideInitialHead() const { return createSentinel(); } - SDNode *ensureHead(SDNode*) const { return createSentinel(); } - static void noteHead(SDNode*, SDNode*) {} - - static void deleteNode(SDNode *) { - llvm_unreachable("ilist_traits shouldn't see a deleteNode call!"); - } -private: - static void createNode(const SDNode &); -}; - -/// Keeps track of dbg_value information through SDISel. We do -/// not build SDNodes for these so as not to perturb the generated code; -/// instead the info is kept off to the side in this structure. Each SDNode may -/// have one or more associated dbg_value entries. This information is kept in -/// DbgValMap. -/// Byval parameters are handled separately because they don't use alloca's, -/// which busts the normal mechanism. There is good reason for handling all -/// parameters separately: they may not have code generated for them, they -/// should always go at the beginning of the function regardless of other code -/// motion, and debug info for them is potentially useful even if the parameter -/// is unused. Right now only byval parameters are handled separately. -class SDDbgInfo { - BumpPtrAllocator Alloc; - SmallVector DbgValues; - SmallVector ByvalParmDbgValues; - typedef DenseMap > DbgValMapType; - DbgValMapType DbgValMap; - - void operator=(const SDDbgInfo&) = delete; - SDDbgInfo(const SDDbgInfo&) = delete; -public: - SDDbgInfo() {} - - void add(SDDbgValue *V, const SDNode *Node, bool isParameter) { - if (isParameter) { - ByvalParmDbgValues.push_back(V); - } else DbgValues.push_back(V); - if (Node) - DbgValMap[Node].push_back(V); - } - - /// \brief Invalidate all DbgValues attached to the node and remove - /// it from the Node-to-DbgValues map. - void erase(const SDNode *Node); - - void clear() { - DbgValMap.clear(); - DbgValues.clear(); - ByvalParmDbgValues.clear(); - Alloc.Reset(); - } - - BumpPtrAllocator &getAlloc() { return Alloc; } - - bool empty() const { - return DbgValues.empty() && ByvalParmDbgValues.empty(); - } - - ArrayRef getSDDbgValues(const SDNode *Node) { - DbgValMapType::iterator I = DbgValMap.find(Node); - if (I != DbgValMap.end()) - return I->second; - return ArrayRef(); - } - - typedef SmallVectorImpl::iterator DbgIterator; - DbgIterator DbgBegin() { return DbgValues.begin(); } - DbgIterator DbgEnd() { return DbgValues.end(); } - DbgIterator ByvalParmDbgBegin() { return ByvalParmDbgValues.begin(); } - DbgIterator ByvalParmDbgEnd() { return ByvalParmDbgValues.end(); } -}; - -class SelectionDAG; -void checkForCycles(const SelectionDAG *DAG, bool force = false); - -/// This is used to represent a portion of an LLVM function in a low-level -/// Data Dependence DAG representation suitable for instruction selection. -/// This DAG is constructed as the first step of instruction selection in order -/// to allow implementation of machine specific optimizations -/// and code simplifications. -/// -/// The representation used by the SelectionDAG is a target-independent -/// representation, which has some similarities to the GCC RTL representation, -/// but is significantly more simple, powerful, and is a graph form instead of a -/// linear form. -/// -class SelectionDAG { - const TargetMachine &TM; - const SelectionDAGTargetInfo *TSI; - const TargetLowering *TLI; - MachineFunction *MF; - LLVMContext *Context; - CodeGenOpt::Level OptLevel; - - /// The starting token. - SDNode EntryNode; - - /// The root of the entire DAG. - SDValue Root; - - /// A linked list of nodes in the current DAG. - ilist AllNodes; - - /// The AllocatorType for allocating SDNodes. We use - /// pool allocation with recycling. - typedef RecyclingAllocator::Alignment> - NodeAllocatorType; - - /// Pool allocation for nodes. - NodeAllocatorType NodeAllocator; - - /// This structure is used to memoize nodes, automatically performing - /// CSE with existing nodes when a duplicate is requested. - FoldingSet CSEMap; - - /// Pool allocation for machine-opcode SDNode operands. - BumpPtrAllocator OperandAllocator; - ArrayRecycler OperandRecycler; - - /// Pool allocation for misc. objects that are created once per SelectionDAG. - BumpPtrAllocator Allocator; - - /// Tracks dbg_value information through SDISel. - SDDbgInfo *DbgInfo; - - uint16_t NextPersistentId = 0; - -public: - /// Clients of various APIs that cause global effects on - /// the DAG can optionally implement this interface. This allows the clients - /// to handle the various sorts of updates that happen. - /// - /// A DAGUpdateListener automatically registers itself with DAG when it is - /// constructed, and removes itself when destroyed in RAII fashion. - struct DAGUpdateListener { - DAGUpdateListener *const Next; - SelectionDAG &DAG; - - explicit DAGUpdateListener(SelectionDAG &D) - : Next(D.UpdateListeners), DAG(D) { - DAG.UpdateListeners = this; - } - - virtual ~DAGUpdateListener() { - assert(DAG.UpdateListeners == this && - "DAGUpdateListeners must be destroyed in LIFO order"); - DAG.UpdateListeners = Next; - } - - /// The node N that was deleted and, if E is not null, an - /// equivalent node E that replaced it. - virtual void NodeDeleted(SDNode *N, SDNode *E); - - /// The node N that was updated. - virtual void NodeUpdated(SDNode *N); - }; - - struct DAGNodeDeletedListener : public DAGUpdateListener { - std::function Callback; - DAGNodeDeletedListener(SelectionDAG &DAG, - std::function Callback) - : DAGUpdateListener(DAG), Callback(Callback) {} - void NodeDeleted(SDNode *N, SDNode *E) override { Callback(N, E); } - }; - - /// When true, additional steps are taken to - /// ensure that getConstant() and similar functions return DAG nodes that - /// have legal types. This is important after type legalization since - /// any illegally typed nodes generated after this point will not experience - /// type legalization. - bool NewNodesMustHaveLegalTypes; - -private: - /// DAGUpdateListener is a friend so it can manipulate the listener stack. - friend struct DAGUpdateListener; - - /// Linked list of registered DAGUpdateListener instances. - /// This stack is maintained by DAGUpdateListener RAII. - DAGUpdateListener *UpdateListeners; - - /// Implementation of setSubgraphColor. - /// Return whether we had to truncate the search. - bool setSubgraphColorHelper(SDNode *N, const char *Color, - DenseSet &visited, - int level, bool &printed); - - template - SDNodeT *newSDNode(ArgTypes &&... Args) { - return new (NodeAllocator.template Allocate()) - SDNodeT(std::forward(Args)...); - } - - void createOperands(SDNode *Node, ArrayRef Vals) { - assert(!Node->OperandList && "Node already has operands"); - SDUse *Ops = OperandRecycler.allocate( - ArrayRecycler::Capacity::get(Vals.size()), OperandAllocator); - - for (unsigned I = 0; I != Vals.size(); ++I) { - Ops[I].setUser(Node); - Ops[I].setInitial(Vals[I]); - } - Node->NumOperands = Vals.size(); - Node->OperandList = Ops; - checkForCycles(Node); - } - - void removeOperands(SDNode *Node) { - if (!Node->OperandList) - return; - OperandRecycler.deallocate( - ArrayRecycler::Capacity::get(Node->NumOperands), - Node->OperandList); - Node->NumOperands = 0; - Node->OperandList = nullptr; - } - - void operator=(const SelectionDAG&) = delete; - SelectionDAG(const SelectionDAG&) = delete; - -public: - explicit SelectionDAG(const TargetMachine &TM, llvm::CodeGenOpt::Level); - ~SelectionDAG(); - - /// Prepare this SelectionDAG to process code in the given MachineFunction. - void init(MachineFunction &mf); - - /// Clear state and free memory necessary to make this - /// SelectionDAG ready to process a new block. - void clear(); - - MachineFunction &getMachineFunction() const { return *MF; } - const DataLayout &getDataLayout() const { return MF->getDataLayout(); } - const TargetMachine &getTarget() const { return TM; } - const TargetSubtargetInfo &getSubtarget() const { return MF->getSubtarget(); } - const TargetLowering &getTargetLoweringInfo() const { return *TLI; } - const SelectionDAGTargetInfo &getSelectionDAGInfo() const { return *TSI; } - LLVMContext *getContext() const {return Context; } - - /// Pop up a GraphViz/gv window with the DAG rendered using 'dot'. - void viewGraph(const std::string &Title); - void viewGraph(); - -#ifndef NDEBUG - std::map NodeGraphAttrs; -#endif - - /// Clear all previously defined node graph attributes. - /// Intended to be used from a debugging tool (eg. gdb). - void clearGraphAttrs(); - - /// Set graph attributes for a node. (eg. "color=red".) - void setGraphAttrs(const SDNode *N, const char *Attrs); - - /// Get graph attributes for a node. (eg. "color=red".) - /// Used from getNodeAttributes. - const std::string getGraphAttrs(const SDNode *N) const; - - /// Convenience for setting node color attribute. - void setGraphColor(const SDNode *N, const char *Color); - - /// Convenience for setting subgraph color attribute. - void setSubgraphColor(SDNode *N, const char *Color); - - typedef ilist::const_iterator allnodes_const_iterator; - allnodes_const_iterator allnodes_begin() const { return AllNodes.begin(); } - allnodes_const_iterator allnodes_end() const { return AllNodes.end(); } - typedef ilist::iterator allnodes_iterator; - allnodes_iterator allnodes_begin() { return AllNodes.begin(); } - allnodes_iterator allnodes_end() { return AllNodes.end(); } - ilist::size_type allnodes_size() const { - return AllNodes.size(); - } - - iterator_range allnodes() { - return make_range(allnodes_begin(), allnodes_end()); - } - iterator_range allnodes() const { - return make_range(allnodes_begin(), allnodes_end()); - } - - /// Return the root tag of the SelectionDAG. - const SDValue &getRoot() const { return Root; } - - /// Return the token chain corresponding to the entry of the function. - SDValue getEntryNode() const { - return SDValue(const_cast(&EntryNode), 0); - } - - /// Set the current root tag of the SelectionDAG. - /// - const SDValue &setRoot(SDValue N) { - assert((!N.getNode() || N.getValueType() == MVT::Other) && - "DAG root value is not a chain!"); - if (N.getNode()) - checkForCycles(N.getNode(), this); - Root = N; - if (N.getNode()) - checkForCycles(this); - return Root; - } - - /// This iterates over the nodes in the SelectionDAG, folding - /// certain types of nodes together, or eliminating superfluous nodes. The - /// Level argument controls whether Combine is allowed to produce nodes and - /// types that are illegal on the target. - void Combine(CombineLevel Level, AliasAnalysis &AA, - CodeGenOpt::Level OptLevel); - - /// This transforms the SelectionDAG into a SelectionDAG that - /// only uses types natively supported by the target. - /// Returns "true" if it made any changes. - /// - /// Note that this is an involved process that may invalidate pointers into - /// the graph. - bool LegalizeTypes(); - - /// This transforms the SelectionDAG into a SelectionDAG that is - /// compatible with the target instruction selector, as indicated by the - /// TargetLowering object. - /// - /// Note that this is an involved process that may invalidate pointers into - /// the graph. - void Legalize(); - - /// \brief Transforms a SelectionDAG node and any operands to it into a node - /// that is compatible with the target instruction selector, as indicated by - /// the TargetLowering object. - /// - /// \returns true if \c N is a valid, legal node after calling this. - /// - /// This essentially runs a single recursive walk of the \c Legalize process - /// over the given node (and its operands). This can be used to incrementally - /// legalize the DAG. All of the nodes which are directly replaced, - /// potentially including N, are added to the output parameter \c - /// UpdatedNodes so that the delta to the DAG can be understood by the - /// caller. - /// - /// When this returns false, N has been legalized in a way that make the - /// pointer passed in no longer valid. It may have even been deleted from the - /// DAG, and so it shouldn't be used further. When this returns true, the - /// N passed in is a legal node, and can be immediately processed as such. - /// This may still have done some work on the DAG, and will still populate - /// UpdatedNodes with any new nodes replacing those originally in the DAG. - bool LegalizeOp(SDNode *N, SmallSetVector &UpdatedNodes); - - /// This transforms the SelectionDAG into a SelectionDAG - /// that only uses vector math operations supported by the target. This is - /// necessary as a separate step from Legalize because unrolling a vector - /// operation can introduce illegal types, which requires running - /// LegalizeTypes again. - /// - /// This returns true if it made any changes; in that case, LegalizeTypes - /// is called again before Legalize. - /// - /// Note that this is an involved process that may invalidate pointers into - /// the graph. - bool LegalizeVectors(); - - /// This method deletes all unreachable nodes in the SelectionDAG. - void RemoveDeadNodes(); - - /// Remove the specified node from the system. This node must - /// have no referrers. - void DeleteNode(SDNode *N); - - /// Return an SDVTList that represents the list of values specified. - SDVTList getVTList(EVT VT); - SDVTList getVTList(EVT VT1, EVT VT2); - SDVTList getVTList(EVT VT1, EVT VT2, EVT VT3); - SDVTList getVTList(EVT VT1, EVT VT2, EVT VT3, EVT VT4); - SDVTList getVTList(ArrayRef VTs); - - //===--------------------------------------------------------------------===// - // Node creation methods. - // - - /// \brief Create a ConstantSDNode wrapping a constant value. - /// If VT is a vector type, the constant is splatted into a BUILD_VECTOR. - /// - /// If only legal types can be produced, this does the necessary - /// transformations (e.g., if the vector element type is illegal). - /// @{ - SDValue getConstant(uint64_t Val, const SDLoc &DL, EVT VT, - bool isTarget = false, bool isOpaque = false); - SDValue getConstant(const APInt &Val, const SDLoc &DL, EVT VT, - bool isTarget = false, bool isOpaque = false); - SDValue getConstant(const ConstantInt &Val, const SDLoc &DL, EVT VT, - bool isTarget = false, bool isOpaque = false); - SDValue getIntPtrConstant(uint64_t Val, const SDLoc &DL, - bool isTarget = false); - SDValue getTargetConstant(uint64_t Val, const SDLoc &DL, EVT VT, - bool isOpaque = false) { - return getConstant(Val, DL, VT, true, isOpaque); - } - SDValue getTargetConstant(const APInt &Val, const SDLoc &DL, EVT VT, - bool isOpaque = false) { - return getConstant(Val, DL, VT, true, isOpaque); - } - SDValue getTargetConstant(const ConstantInt &Val, const SDLoc &DL, EVT VT, - bool isOpaque = false) { - return getConstant(Val, DL, VT, true, isOpaque); - } - /// @} - - /// \brief Create a ConstantFPSDNode wrapping a constant value. - /// If VT is a vector type, the constant is splatted into a BUILD_VECTOR. - /// - /// If only legal types can be produced, this does the necessary - /// transformations (e.g., if the vector element type is illegal). - /// The forms that take a double should only be used for simple constants - /// that can be exactly represented in VT. No checks are made. - /// @{ - SDValue getConstantFP(double Val, const SDLoc &DL, EVT VT, - bool isTarget = false); - SDValue getConstantFP(const APFloat &Val, const SDLoc &DL, EVT VT, - bool isTarget = false); - SDValue getConstantFP(const ConstantFP &CF, const SDLoc &DL, EVT VT, - bool isTarget = false); - SDValue getTargetConstantFP(double Val, const SDLoc &DL, EVT VT) { - return getConstantFP(Val, DL, VT, true); - } - SDValue getTargetConstantFP(const APFloat &Val, const SDLoc &DL, EVT VT) { - return getConstantFP(Val, DL, VT, true); - } - SDValue getTargetConstantFP(const ConstantFP &Val, const SDLoc &DL, EVT VT) { - return getConstantFP(Val, DL, VT, true); - } - /// @} - - SDValue getGlobalAddress(const GlobalValue *GV, const SDLoc &DL, EVT VT, - int64_t offset = 0, bool isTargetGA = false, - unsigned char TargetFlags = 0); - SDValue getTargetGlobalAddress(const GlobalValue *GV, const SDLoc &DL, EVT VT, - int64_t offset = 0, - unsigned char TargetFlags = 0) { - return getGlobalAddress(GV, DL, VT, offset, true, TargetFlags); - } - SDValue getFrameIndex(int FI, EVT VT, bool isTarget = false); - SDValue getTargetFrameIndex(int FI, EVT VT) { - return getFrameIndex(FI, VT, true); - } - SDValue getJumpTable(int JTI, EVT VT, bool isTarget = false, - unsigned char TargetFlags = 0); - SDValue getTargetJumpTable(int JTI, EVT VT, unsigned char TargetFlags = 0) { - return getJumpTable(JTI, VT, true, TargetFlags); - } - SDValue getConstantPool(const Constant *C, EVT VT, - unsigned Align = 0, int Offs = 0, bool isT=false, - unsigned char TargetFlags = 0); - SDValue getTargetConstantPool(const Constant *C, EVT VT, - unsigned Align = 0, int Offset = 0, - unsigned char TargetFlags = 0) { - return getConstantPool(C, VT, Align, Offset, true, TargetFlags); - } - SDValue getConstantPool(MachineConstantPoolValue *C, EVT VT, - unsigned Align = 0, int Offs = 0, bool isT=false, - unsigned char TargetFlags = 0); - SDValue getTargetConstantPool(MachineConstantPoolValue *C, - EVT VT, unsigned Align = 0, - int Offset = 0, unsigned char TargetFlags=0) { - return getConstantPool(C, VT, Align, Offset, true, TargetFlags); - } - SDValue getTargetIndex(int Index, EVT VT, int64_t Offset = 0, - unsigned char TargetFlags = 0); - // When generating a branch to a BB, we don't in general know enough - // to provide debug info for the BB at that time, so keep this one around. - SDValue getBasicBlock(MachineBasicBlock *MBB); - SDValue getBasicBlock(MachineBasicBlock *MBB, SDLoc dl); - SDValue getExternalSymbol(const char *Sym, EVT VT); - SDValue getExternalSymbol(const char *Sym, const SDLoc &dl, EVT VT); - SDValue getTargetExternalSymbol(const char *Sym, EVT VT, - unsigned char TargetFlags = 0); - SDValue getMCSymbol(MCSymbol *Sym, EVT VT); - - SDValue getValueType(EVT); - SDValue getRegister(unsigned Reg, EVT VT); - SDValue getRegisterMask(const uint32_t *RegMask); - SDValue getEHLabel(const SDLoc &dl, SDValue Root, MCSymbol *Label); - SDValue getBlockAddress(const BlockAddress *BA, EVT VT, - int64_t Offset = 0, bool isTarget = false, - unsigned char TargetFlags = 0); - SDValue getTargetBlockAddress(const BlockAddress *BA, EVT VT, - int64_t Offset = 0, - unsigned char TargetFlags = 0) { - return getBlockAddress(BA, VT, Offset, true, TargetFlags); - } - - SDValue getCopyToReg(SDValue Chain, const SDLoc &dl, unsigned Reg, - SDValue N) { - return getNode(ISD::CopyToReg, dl, MVT::Other, Chain, - getRegister(Reg, N.getValueType()), N); - } - - // This version of the getCopyToReg method takes an extra operand, which - // indicates that there is potentially an incoming glue value (if Glue is not - // null) and that there should be a glue result. - SDValue getCopyToReg(SDValue Chain, const SDLoc &dl, unsigned Reg, SDValue N, - SDValue Glue) { - SDVTList VTs = getVTList(MVT::Other, MVT::Glue); - SDValue Ops[] = { Chain, getRegister(Reg, N.getValueType()), N, Glue }; - return getNode(ISD::CopyToReg, dl, VTs, - makeArrayRef(Ops, Glue.getNode() ? 4 : 3)); - } - - // Similar to last getCopyToReg() except parameter Reg is a SDValue - SDValue getCopyToReg(SDValue Chain, const SDLoc &dl, SDValue Reg, SDValue N, - SDValue Glue) { - SDVTList VTs = getVTList(MVT::Other, MVT::Glue); - SDValue Ops[] = { Chain, Reg, N, Glue }; - return getNode(ISD::CopyToReg, dl, VTs, - makeArrayRef(Ops, Glue.getNode() ? 4 : 3)); - } - - SDValue getCopyFromReg(SDValue Chain, const SDLoc &dl, unsigned Reg, EVT VT) { - SDVTList VTs = getVTList(VT, MVT::Other); - SDValue Ops[] = { Chain, getRegister(Reg, VT) }; - return getNode(ISD::CopyFromReg, dl, VTs, Ops); - } - - // This version of the getCopyFromReg method takes an extra operand, which - // indicates that there is potentially an incoming glue value (if Glue is not - // null) and that there should be a glue result. - SDValue getCopyFromReg(SDValue Chain, const SDLoc &dl, unsigned Reg, EVT VT, - SDValue Glue) { - SDVTList VTs = getVTList(VT, MVT::Other, MVT::Glue); - SDValue Ops[] = { Chain, getRegister(Reg, VT), Glue }; - return getNode(ISD::CopyFromReg, dl, VTs, - makeArrayRef(Ops, Glue.getNode() ? 3 : 2)); - } - - SDValue getCondCode(ISD::CondCode Cond); - - /// Returns the ConvertRndSat Note: Avoid using this node because it may - /// disappear in the future and most targets don't support it. - SDValue getConvertRndSat(EVT VT, const SDLoc &dl, SDValue Val, SDValue DTy, - SDValue STy, SDValue Rnd, SDValue Sat, - ISD::CvtCode Code); - - /// Return an ISD::VECTOR_SHUFFLE node. The number of elements in VT, - /// which must be a vector type, must match the number of mask elements - /// NumElts. An integer mask element equal to -1 is treated as undefined. - SDValue getVectorShuffle(EVT VT, const SDLoc &dl, SDValue N1, SDValue N2, - ArrayRef Mask); - - /// Return an ISD::BUILD_VECTOR node. The number of elements in VT, - /// which must be a vector type, must match the number of operands in Ops. - /// The operands must have the same type as (or, for integers, a type wider - /// than) VT's element type. - SDValue getBuildVector(EVT VT, const SDLoc &DL, ArrayRef Ops) { - // VerifySDNode (via InsertNode) checks BUILD_VECTOR later. - return getNode(ISD::BUILD_VECTOR, DL, VT, Ops); - } - - /// Return a splat ISD::BUILD_VECTOR node, consisting of Op splatted to all - /// elements. VT must be a vector type. Op's type must be the same as (or, - /// for integers, a type wider than) VT's element type. - SDValue getSplatBuildVector(EVT VT, const SDLoc &DL, SDValue Op) { - // VerifySDNode (via InsertNode) checks BUILD_VECTOR later. - if (Op.getOpcode() == ISD::UNDEF) { - assert((VT.getVectorElementType() == Op.getValueType() || - (VT.isInteger() && - VT.getVectorElementType().bitsLE(Op.getValueType()))) && - "A splatted value must have a width equal or (for integers) " - "greater than the vector element type!"); - return getNode(ISD::UNDEF, SDLoc(), VT); - } - - SmallVector Ops(VT.getVectorNumElements(), Op); - return getNode(ISD::BUILD_VECTOR, DL, VT, Ops); - } - - /// Return a splat ISD::BUILD_VECTOR node, but with Op's SDLoc. - SDValue getSplatBuildVector(EVT VT, SDValue Op) { - return getSplatBuildVector(VT, SDLoc(Op), Op); - } - - /// \brief Returns an ISD::VECTOR_SHUFFLE node semantically equivalent to - /// the shuffle node in input but with swapped operands. - /// - /// Example: shuffle A, B, <0,5,2,7> -> shuffle B, A, <4,1,6,3> - SDValue getCommutedVectorShuffle(const ShuffleVectorSDNode &SV); - - /// Convert Op, which must be of integer type, to the - /// integer type VT, by either any-extending or truncating it. - SDValue getAnyExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT); - - /// Convert Op, which must be of integer type, to the - /// integer type VT, by either sign-extending or truncating it. - SDValue getSExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT); - - /// Convert Op, which must be of integer type, to the - /// integer type VT, by either zero-extending or truncating it. - SDValue getZExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT); - - /// Return the expression required to zero extend the Op - /// value assuming it was the smaller SrcTy value. - SDValue getZeroExtendInReg(SDValue Op, const SDLoc &DL, EVT SrcTy); - - /// Return an operation which will any-extend the low lanes of the operand - /// into the specified vector type. For example, - /// this can convert a v16i8 into a v4i32 by any-extending the low four - /// lanes of the operand from i8 to i32. - SDValue getAnyExtendVectorInReg(SDValue Op, const SDLoc &DL, EVT VT); - - /// Return an operation which will sign extend the low lanes of the operand - /// into the specified vector type. For example, - /// this can convert a v16i8 into a v4i32 by sign extending the low four - /// lanes of the operand from i8 to i32. - SDValue getSignExtendVectorInReg(SDValue Op, const SDLoc &DL, EVT VT); - - /// Return an operation which will zero extend the low lanes of the operand - /// into the specified vector type. For example, - /// this can convert a v16i8 into a v4i32 by zero extending the low four - /// lanes of the operand from i8 to i32. - SDValue getZeroExtendVectorInReg(SDValue Op, const SDLoc &DL, EVT VT); - - /// Convert Op, which must be of integer type, to the integer type VT, - /// by using an extension appropriate for the target's - /// BooleanContent for type OpVT or truncating it. - SDValue getBoolExtOrTrunc(SDValue Op, const SDLoc &SL, EVT VT, EVT OpVT); - - /// Create a bitwise NOT operation as (XOR Val, -1). - SDValue getNOT(const SDLoc &DL, SDValue Val, EVT VT); - - /// \brief Create a logical NOT operation as (XOR Val, BooleanOne). - SDValue getLogicalNOT(const SDLoc &DL, SDValue Val, EVT VT); - - /// Return a new CALLSEQ_START node, which always must have a glue result - /// (to ensure it's not CSE'd). CALLSEQ_START does not have a useful SDLoc. - SDValue getCALLSEQ_START(SDValue Chain, SDValue Op, const SDLoc &DL) { - SDVTList VTs = getVTList(MVT::Other, MVT::Glue); - SDValue Ops[] = { Chain, Op }; - return getNode(ISD::CALLSEQ_START, DL, VTs, Ops); - } - - /// Return a new CALLSEQ_END node, which always must have a - /// glue result (to ensure it's not CSE'd). - /// CALLSEQ_END does not have a useful SDLoc. - SDValue getCALLSEQ_END(SDValue Chain, SDValue Op1, SDValue Op2, - SDValue InGlue, const SDLoc &DL) { - SDVTList NodeTys = getVTList(MVT::Other, MVT::Glue); - SmallVector Ops; - Ops.push_back(Chain); - Ops.push_back(Op1); - Ops.push_back(Op2); - if (InGlue.getNode()) - Ops.push_back(InGlue); - return getNode(ISD::CALLSEQ_END, DL, NodeTys, Ops); - } - - /// Return an UNDEF node. UNDEF does not have a useful SDLoc. - SDValue getUNDEF(EVT VT) { - return getNode(ISD::UNDEF, SDLoc(), VT); - } - - /// Return a GLOBAL_OFFSET_TABLE node. This does not have a useful SDLoc. - SDValue getGLOBAL_OFFSET_TABLE(EVT VT) { - return getNode(ISD::GLOBAL_OFFSET_TABLE, SDLoc(), VT); - } - - /// Gets or creates the specified node. - /// - SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, - ArrayRef Ops); - SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, - ArrayRef Ops, const SDNodeFlags *Flags = nullptr); - SDValue getNode(unsigned Opcode, const SDLoc &DL, ArrayRef ResultTys, - ArrayRef Ops); - SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTs, - ArrayRef Ops); - - // Specialize based on number of operands. - SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT); - SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, SDValue N); - SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, SDValue N1, - SDValue N2, const SDNodeFlags *Flags = nullptr); - SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, SDValue N1, - SDValue N2, SDValue N3); - SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, SDValue N1, - SDValue N2, SDValue N3, SDValue N4); - SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, SDValue N1, - SDValue N2, SDValue N3, SDValue N4, SDValue N5); - - // Specialize again based on number of operands for nodes with a VTList - // rather than a single VT. - SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTs); - SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTs, SDValue N); - SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTs, SDValue N1, - SDValue N2); - SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTs, SDValue N1, - SDValue N2, SDValue N3); - SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTs, SDValue N1, - SDValue N2, SDValue N3, SDValue N4); - SDValue getNode(unsigned Opcode, const SDLoc &DL, SDVTList VTs, SDValue N1, - SDValue N2, SDValue N3, SDValue N4, SDValue N5); - - /// Compute a TokenFactor to force all the incoming stack arguments to be - /// loaded from the stack. This is used in tail call lowering to protect - /// stack arguments from being clobbered. - SDValue getStackArgumentTokenFactor(SDValue Chain); - - SDValue getMemcpy(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, bool isVol, bool AlwaysInline, - bool isTailCall, MachinePointerInfo DstPtrInfo, - MachinePointerInfo SrcPtrInfo); - - SDValue getMemmove(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, bool isVol, bool isTailCall, - MachinePointerInfo DstPtrInfo, - MachinePointerInfo SrcPtrInfo); - - SDValue getMemset(SDValue Chain, const SDLoc &dl, SDValue Dst, SDValue Src, - SDValue Size, unsigned Align, bool isVol, bool isTailCall, - MachinePointerInfo DstPtrInfo); - - /// Helper function to make it easier to build SetCC's if you just - /// have an ISD::CondCode instead of an SDValue. - /// - SDValue getSetCC(const SDLoc &DL, EVT VT, SDValue LHS, SDValue RHS, - ISD::CondCode Cond) { - assert(LHS.getValueType().isVector() == RHS.getValueType().isVector() && - "Cannot compare scalars to vectors"); - assert(LHS.getValueType().isVector() == VT.isVector() && - "Cannot compare scalars to vectors"); - assert(Cond != ISD::SETCC_INVALID && - "Cannot create a setCC of an invalid node."); - return getNode(ISD::SETCC, DL, VT, LHS, RHS, getCondCode(Cond)); - } - - /// Helper function to make it easier to build Select's if you just - /// have operands and don't want to check for vector. - SDValue getSelect(const SDLoc &DL, EVT VT, SDValue Cond, SDValue LHS, - SDValue RHS) { - assert(LHS.getValueType() == RHS.getValueType() && - "Cannot use select on differing types"); - assert(VT.isVector() == LHS.getValueType().isVector() && - "Cannot mix vectors and scalars"); - return getNode(Cond.getValueType().isVector() ? ISD::VSELECT : ISD::SELECT, DL, VT, - Cond, LHS, RHS); - } - - /// Helper function to make it easier to build SelectCC's if you - /// just have an ISD::CondCode instead of an SDValue. - /// - SDValue getSelectCC(const SDLoc &DL, SDValue LHS, SDValue RHS, SDValue True, - SDValue False, ISD::CondCode Cond) { - return getNode(ISD::SELECT_CC, DL, True.getValueType(), - LHS, RHS, True, False, getCondCode(Cond)); - } - - /// VAArg produces a result and token chain, and takes a pointer - /// and a source value as input. - SDValue getVAArg(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, - SDValue SV, unsigned Align); - - /// Gets a node for an atomic cmpxchg op. There are two - /// valid Opcodes. ISD::ATOMIC_CMO_SWAP produces the value loaded and a - /// chain result. ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS produces the value loaded, - /// a success flag (initially i1), and a chain. - SDValue getAtomicCmpSwap(unsigned Opcode, const SDLoc &dl, EVT MemVT, - SDVTList VTs, SDValue Chain, SDValue Ptr, - SDValue Cmp, SDValue Swp, MachinePointerInfo PtrInfo, - unsigned Alignment, AtomicOrdering SuccessOrdering, - AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope); - SDValue getAtomicCmpSwap(unsigned Opcode, const SDLoc &dl, EVT MemVT, - SDVTList VTs, SDValue Chain, SDValue Ptr, - SDValue Cmp, SDValue Swp, MachineMemOperand *MMO, - AtomicOrdering SuccessOrdering, - AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope); - - /// Gets a node for an atomic op, produces result (if relevant) - /// and chain and takes 2 operands. - SDValue getAtomic(unsigned Opcode, const SDLoc &dl, EVT MemVT, SDValue Chain, - SDValue Ptr, SDValue Val, const Value *PtrVal, - unsigned Alignment, AtomicOrdering Ordering, - SynchronizationScope SynchScope); - SDValue getAtomic(unsigned Opcode, const SDLoc &dl, EVT MemVT, SDValue Chain, - SDValue Ptr, SDValue Val, MachineMemOperand *MMO, - AtomicOrdering Ordering, SynchronizationScope SynchScope); - - /// Gets a node for an atomic op, produces result and chain and - /// takes 1 operand. - SDValue getAtomic(unsigned Opcode, const SDLoc &dl, EVT MemVT, EVT VT, - SDValue Chain, SDValue Ptr, MachineMemOperand *MMO, - AtomicOrdering Ordering, SynchronizationScope SynchScope); - - /// Gets a node for an atomic op, produces result and chain and takes N - /// operands. - SDValue getAtomic(unsigned Opcode, const SDLoc &dl, EVT MemVT, - SDVTList VTList, ArrayRef Ops, - MachineMemOperand *MMO, AtomicOrdering SuccessOrdering, - AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope); - SDValue getAtomic(unsigned Opcode, const SDLoc &dl, EVT MemVT, - SDVTList VTList, ArrayRef Ops, - MachineMemOperand *MMO, AtomicOrdering Ordering, - SynchronizationScope SynchScope); - - /// Creates a MemIntrinsicNode that may produce a - /// result and takes a list of operands. Opcode may be INTRINSIC_VOID, - /// INTRINSIC_W_CHAIN, or a target-specific opcode with a value not - /// less than FIRST_TARGET_MEMORY_OPCODE. - SDValue getMemIntrinsicNode(unsigned Opcode, const SDLoc &dl, SDVTList VTList, - ArrayRef Ops, EVT MemVT, - MachinePointerInfo PtrInfo, unsigned Align = 0, - bool Vol = false, bool ReadMem = true, - bool WriteMem = true, unsigned Size = 0); - - SDValue getMemIntrinsicNode(unsigned Opcode, const SDLoc &dl, SDVTList VTList, - ArrayRef Ops, EVT MemVT, - MachineMemOperand *MMO); - - /// Create a MERGE_VALUES node from the given operands. - SDValue getMergeValues(ArrayRef Ops, const SDLoc &dl); - - /// Loads are not normal binary operators: their result type is not - /// determined by their operands, and they produce a value AND a token chain. - /// - /// This function will set the MOLoad flag on MMOFlags, but you can set it if - /// you want. The MOStore flag must not be set. - SDValue getLoad(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, - MachinePointerInfo PtrInfo, unsigned Alignment = 0, - MachineMemOperand::Flags MMOFlags = MachineMemOperand::MONone, - const AAMDNodes &AAInfo = AAMDNodes(), - const MDNode *Ranges = nullptr); - SDValue getLoad(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, - MachineMemOperand *MMO); - SDValue - getExtLoad(ISD::LoadExtType ExtType, const SDLoc &dl, EVT VT, SDValue Chain, - SDValue Ptr, MachinePointerInfo PtrInfo, EVT MemVT, - unsigned Alignment = 0, - MachineMemOperand::Flags MMOFlags = MachineMemOperand::MONone, - const AAMDNodes &AAInfo = AAMDNodes()); - SDValue getExtLoad(ISD::LoadExtType ExtType, const SDLoc &dl, EVT VT, - SDValue Chain, SDValue Ptr, EVT MemVT, - MachineMemOperand *MMO); - SDValue getIndexedLoad(SDValue OrigLoad, const SDLoc &dl, SDValue Base, - SDValue Offset, ISD::MemIndexedMode AM); - SDValue getLoad(ISD::MemIndexedMode AM, ISD::LoadExtType ExtType, EVT VT, - const SDLoc &dl, SDValue Chain, SDValue Ptr, SDValue Offset, - MachinePointerInfo PtrInfo, EVT MemVT, unsigned Alignment = 0, - MachineMemOperand::Flags MMOFlags = MachineMemOperand::MONone, - const AAMDNodes &AAInfo = AAMDNodes(), - const MDNode *Ranges = nullptr); - SDValue getLoad(ISD::MemIndexedMode AM, ISD::LoadExtType ExtType, EVT VT, - const SDLoc &dl, SDValue Chain, SDValue Ptr, SDValue Offset, - EVT MemVT, MachineMemOperand *MMO); - - /// Helper function to build ISD::STORE nodes. - /// - /// This function will set the MOStore flag on MMOFlags, but you can set it if - /// you want. The MOLoad and MOInvariant flags must not be set. - SDValue - getStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, - MachinePointerInfo PtrInfo, unsigned Alignment = 0, - MachineMemOperand::Flags MMOFlags = MachineMemOperand::MONone, - const AAMDNodes &AAInfo = AAMDNodes()); - SDValue getStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, - MachineMemOperand *MMO); - SDValue - getTruncStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, - MachinePointerInfo PtrInfo, EVT TVT, unsigned Alignment = 0, - MachineMemOperand::Flags MMOFlags = MachineMemOperand::MONone, - const AAMDNodes &AAInfo = AAMDNodes()); - SDValue getTruncStore(SDValue Chain, const SDLoc &dl, SDValue Val, - SDValue Ptr, EVT TVT, MachineMemOperand *MMO); - SDValue getIndexedStore(SDValue OrigStoe, const SDLoc &dl, SDValue Base, - SDValue Offset, ISD::MemIndexedMode AM); - - /// Returns sum of the base pointer and offset. - SDValue getMemBasePlusOffset(SDValue Base, unsigned Offset, const SDLoc &DL); - - SDValue getMaskedLoad(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, - SDValue Mask, SDValue Src0, EVT MemVT, - MachineMemOperand *MMO, ISD::LoadExtType); - SDValue getMaskedStore(SDValue Chain, const SDLoc &dl, SDValue Val, - SDValue Ptr, SDValue Mask, EVT MemVT, - MachineMemOperand *MMO, bool IsTrunc); - SDValue getMaskedGather(SDVTList VTs, EVT VT, const SDLoc &dl, - ArrayRef Ops, MachineMemOperand *MMO); - SDValue getMaskedScatter(SDVTList VTs, EVT VT, const SDLoc &dl, - ArrayRef Ops, MachineMemOperand *MMO); - /// Construct a node to track a Value* through the backend. - SDValue getSrcValue(const Value *v); - - /// Return an MDNodeSDNode which holds an MDNode. - SDValue getMDNode(const MDNode *MD); - - /// Return a bitcast using the SDLoc of the value operand, and casting to the - /// provided type. Use getNode to set a custom SDLoc. - SDValue getBitcast(EVT VT, SDValue V); - - /// Return an AddrSpaceCastSDNode. - SDValue getAddrSpaceCast(const SDLoc &dl, EVT VT, SDValue Ptr, unsigned SrcAS, - unsigned DestAS); - - /// Return the specified value casted to - /// the target's desired shift amount type. - SDValue getShiftAmountOperand(EVT LHSTy, SDValue Op); - - /// Expand the specified \c ISD::VAARG node as the Legalize pass would. - SDValue expandVAArg(SDNode *Node); - - /// Expand the specified \c ISD::VACOPY node as the Legalize pass would. - SDValue expandVACopy(SDNode *Node); - - /// *Mutate* the specified node in-place to have the - /// specified operands. If the resultant node already exists in the DAG, - /// this does not modify the specified node, instead it returns the node that - /// already exists. If the resultant node does not exist in the DAG, the - /// input node is returned. As a degenerate case, if you specify the same - /// input operands as the node already has, the input node is returned. - SDNode *UpdateNodeOperands(SDNode *N, SDValue Op); - SDNode *UpdateNodeOperands(SDNode *N, SDValue Op1, SDValue Op2); - SDNode *UpdateNodeOperands(SDNode *N, SDValue Op1, SDValue Op2, - SDValue Op3); - SDNode *UpdateNodeOperands(SDNode *N, SDValue Op1, SDValue Op2, - SDValue Op3, SDValue Op4); - SDNode *UpdateNodeOperands(SDNode *N, SDValue Op1, SDValue Op2, - SDValue Op3, SDValue Op4, SDValue Op5); - SDNode *UpdateNodeOperands(SDNode *N, ArrayRef Ops); - - /// These are used for target selectors to *mutate* the - /// specified node to have the specified return type, Target opcode, and - /// operands. Note that target opcodes are stored as - /// ~TargetOpcode in the node opcode field. The resultant node is returned. - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT, SDValue Op1); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT, - SDValue Op1, SDValue Op2); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT, - SDValue Op1, SDValue Op2, SDValue Op3); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT, - ArrayRef Ops); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT1, EVT VT2); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT1, - EVT VT2, ArrayRef Ops); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT1, - EVT VT2, EVT VT3, ArrayRef Ops); - SDNode *SelectNodeTo(SDNode *N, unsigned MachineOpc, EVT VT1, - EVT VT2, EVT VT3, EVT VT4, ArrayRef Ops); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT1, - EVT VT2, SDValue Op1); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT1, - EVT VT2, SDValue Op1, SDValue Op2); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT1, - EVT VT2, SDValue Op1, SDValue Op2, SDValue Op3); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, EVT VT1, - EVT VT2, EVT VT3, SDValue Op1, SDValue Op2, SDValue Op3); - SDNode *SelectNodeTo(SDNode *N, unsigned TargetOpc, SDVTList VTs, - ArrayRef Ops); - - /// This *mutates* the specified node to have the specified - /// return type, opcode, and operands. - SDNode *MorphNodeTo(SDNode *N, unsigned Opc, SDVTList VTs, - ArrayRef Ops); - - /// These are used for target selectors to create a new node - /// with specified return type(s), MachineInstr opcode, and operands. - /// - /// Note that getMachineNode returns the resultant node. If there is already - /// a node of the specified opcode and operands, it returns that node instead - /// of the current one. - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT, - SDValue Op1); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT, - SDValue Op1, SDValue Op2); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT, - SDValue Op1, SDValue Op2, SDValue Op3); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT, - ArrayRef Ops); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2, SDValue Op1); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2, SDValue Op1, SDValue Op2); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2, SDValue Op1, SDValue Op2, SDValue Op3); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2, ArrayRef Ops); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2, EVT VT3, SDValue Op1, SDValue Op2); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2, EVT VT3, SDValue Op1, SDValue Op2, - SDValue Op3); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2, EVT VT3, ArrayRef Ops); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, EVT VT1, - EVT VT2, EVT VT3, EVT VT4, - ArrayRef Ops); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, - ArrayRef ResultTys, ArrayRef Ops); - MachineSDNode *getMachineNode(unsigned Opcode, const SDLoc &dl, SDVTList VTs, - ArrayRef Ops); - - /// A convenience function for creating TargetInstrInfo::EXTRACT_SUBREG nodes. - SDValue getTargetExtractSubreg(int SRIdx, const SDLoc &DL, EVT VT, - SDValue Operand); - - /// A convenience function for creating TargetInstrInfo::INSERT_SUBREG nodes. - SDValue getTargetInsertSubreg(int SRIdx, const SDLoc &DL, EVT VT, - SDValue Operand, SDValue Subreg); - - /// Get the specified node if it's already available, or else return NULL. - SDNode *getNodeIfExists(unsigned Opcode, SDVTList VTs, ArrayRef Ops, - const SDNodeFlags *Flags = nullptr); - - /// Creates a SDDbgValue node. - SDDbgValue *getDbgValue(MDNode *Var, MDNode *Expr, SDNode *N, unsigned R, - bool IsIndirect, uint64_t Off, const DebugLoc &DL, - unsigned O); - - /// Constant - SDDbgValue *getConstantDbgValue(MDNode *Var, MDNode *Expr, const Value *C, - uint64_t Off, const DebugLoc &DL, unsigned O); - - /// FrameIndex - SDDbgValue *getFrameIndexDbgValue(MDNode *Var, MDNode *Expr, unsigned FI, - uint64_t Off, const DebugLoc &DL, - unsigned O); - - /// Remove the specified node from the system. If any of its - /// operands then becomes dead, remove them as well. Inform UpdateListener - /// for each node deleted. - void RemoveDeadNode(SDNode *N); - - /// This method deletes the unreachable nodes in the - /// given list, and any nodes that become unreachable as a result. - void RemoveDeadNodes(SmallVectorImpl &DeadNodes); - - /// Modify anything using 'From' to use 'To' instead. - /// This can cause recursive merging of nodes in the DAG. Use the first - /// version if 'From' is known to have a single result, use the second - /// if you have two nodes with identical results (or if 'To' has a superset - /// of the results of 'From'), use the third otherwise. - /// - /// These methods all take an optional UpdateListener, which (if not null) is - /// informed about nodes that are deleted and modified due to recursive - /// changes in the dag. - /// - /// These functions only replace all existing uses. It's possible that as - /// these replacements are being performed, CSE may cause the From node - /// to be given new uses. These new uses of From are left in place, and - /// not automatically transferred to To. - /// - void ReplaceAllUsesWith(SDValue From, SDValue Op); - void ReplaceAllUsesWith(SDNode *From, SDNode *To); - void ReplaceAllUsesWith(SDNode *From, const SDValue *To); - - /// Replace any uses of From with To, leaving - /// uses of other values produced by From.Val alone. - void ReplaceAllUsesOfValueWith(SDValue From, SDValue To); - - /// Like ReplaceAllUsesOfValueWith, but for multiple values at once. - /// This correctly handles the case where - /// there is an overlap between the From values and the To values. - void ReplaceAllUsesOfValuesWith(const SDValue *From, const SDValue *To, - unsigned Num); - - /// Topological-sort the AllNodes list and a - /// assign a unique node id for each node in the DAG based on their - /// topological order. Returns the number of nodes. - unsigned AssignTopologicalOrder(); - - /// Move node N in the AllNodes list to be immediately - /// before the given iterator Position. This may be used to update the - /// topological ordering when the list of nodes is modified. - void RepositionNode(allnodes_iterator Position, SDNode *N) { - AllNodes.insert(Position, AllNodes.remove(N)); - } - - /// Returns true if the opcode is a commutative binary operation. - static bool isCommutativeBinOp(unsigned Opcode) { - // FIXME: This should get its info from the td file, so that we can include - // target info. - switch (Opcode) { - case ISD::ADD: - case ISD::SMIN: - case ISD::SMAX: - case ISD::UMIN: - case ISD::UMAX: - case ISD::MUL: - case ISD::MULHU: - case ISD::MULHS: - case ISD::SMUL_LOHI: - case ISD::UMUL_LOHI: - case ISD::FADD: - case ISD::FMUL: - case ISD::AND: - case ISD::OR: - case ISD::XOR: - case ISD::SADDO: - case ISD::UADDO: - case ISD::ADDC: - case ISD::ADDE: - case ISD::FMINNUM: - case ISD::FMAXNUM: - case ISD::FMINNAN: - case ISD::FMAXNAN: - return true; - default: return false; - } - } - - /// Returns an APFloat semantics tag appropriate for the given type. If VT is - /// a vector type, the element semantics are returned. - static const fltSemantics &EVTToAPFloatSemantics(EVT VT) { - switch (VT.getScalarType().getSimpleVT().SimpleTy) { - default: llvm_unreachable("Unknown FP format"); - case MVT::f16: return APFloat::IEEEhalf; - case MVT::f32: return APFloat::IEEEsingle; - case MVT::f64: return APFloat::IEEEdouble; - case MVT::f80: return APFloat::x87DoubleExtended; - case MVT::f128: return APFloat::IEEEquad; - case MVT::ppcf128: return APFloat::PPCDoubleDouble; - } - } - - /// Add a dbg_value SDNode. If SD is non-null that means the - /// value is produced by SD. - void AddDbgValue(SDDbgValue *DB, SDNode *SD, bool isParameter); - - /// Get the debug values which reference the given SDNode. - ArrayRef GetDbgValues(const SDNode* SD) { - return DbgInfo->getSDDbgValues(SD); - } - -private: - /// Transfer SDDbgValues. Called via ReplaceAllUses{OfValue}?With - void TransferDbgValues(SDValue From, SDValue To); - -public: - /// Return true if there are any SDDbgValue nodes associated - /// with this SelectionDAG. - bool hasDebugValues() const { return !DbgInfo->empty(); } - - SDDbgInfo::DbgIterator DbgBegin() { return DbgInfo->DbgBegin(); } - SDDbgInfo::DbgIterator DbgEnd() { return DbgInfo->DbgEnd(); } - SDDbgInfo::DbgIterator ByvalParmDbgBegin() { - return DbgInfo->ByvalParmDbgBegin(); - } - SDDbgInfo::DbgIterator ByvalParmDbgEnd() { - return DbgInfo->ByvalParmDbgEnd(); - } - - void dump() const; - - /// Create a stack temporary, suitable for holding the specified value type. - /// If minAlign is specified, the slot size will have at least that alignment. - SDValue CreateStackTemporary(EVT VT, unsigned minAlign = 1); - - /// Create a stack temporary suitable for holding either of the specified - /// value types. - SDValue CreateStackTemporary(EVT VT1, EVT VT2); - - SDValue FoldSymbolOffset(unsigned Opcode, EVT VT, - const GlobalAddressSDNode *GA, - const SDNode *N2); - - SDValue FoldConstantArithmetic(unsigned Opcode, const SDLoc &DL, EVT VT, - SDNode *Cst1, SDNode *Cst2); - - SDValue FoldConstantArithmetic(unsigned Opcode, const SDLoc &DL, EVT VT, - const ConstantSDNode *Cst1, - const ConstantSDNode *Cst2); - - SDValue FoldConstantVectorArithmetic(unsigned Opcode, const SDLoc &DL, EVT VT, - ArrayRef Ops, - const SDNodeFlags *Flags = nullptr); - - /// Constant fold a setcc to true or false. - SDValue FoldSetCC(EVT VT, SDValue N1, SDValue N2, ISD::CondCode Cond, - const SDLoc &dl); - - /// Return true if the sign bit of Op is known to be zero. - /// We use this predicate to simplify operations downstream. - bool SignBitIsZero(SDValue Op, unsigned Depth = 0) const; - - /// Return true if 'Op & Mask' is known to be zero. We - /// use this predicate to simplify operations downstream. Op and Mask are - /// known to be the same type. - bool MaskedValueIsZero(SDValue Op, const APInt &Mask, unsigned Depth = 0) - const; - - /// Determine which bits of Op are known to be either zero or one and return - /// them in the KnownZero/KnownOne bitsets. Targets can implement the - /// computeKnownBitsForTargetNode method in the TargetLowering class to allow - /// target nodes to be understood. - void computeKnownBits(SDValue Op, APInt &KnownZero, APInt &KnownOne, - unsigned Depth = 0) const; - - /// Test if the given value is known to have exactly one bit set. This differs - /// from computeKnownBits in that it doesn't necessarily determine which bit - /// is set. - bool isKnownToBeAPowerOfTwo(SDValue Val) const; - - /// Return the number of times the sign bit of the register is replicated into - /// the other bits. We know that at least 1 bit is always equal to the sign - /// bit (itself), but other cases can give us information. For example, - /// immediately after an "SRA X, 2", we know that the top 3 bits are all equal - /// to each other, so we return 3. Targets can implement the - /// ComputeNumSignBitsForTarget method in the TargetLowering class to allow - /// target nodes to be understood. - unsigned ComputeNumSignBits(SDValue Op, unsigned Depth = 0) const; - - /// Return true if the specified operand is an ISD::ADD with a ConstantSDNode - /// on the right-hand side, or if it is an ISD::OR with a ConstantSDNode that - /// is guaranteed to have the same semantics as an ADD. This handles the - /// equivalence: - /// X|Cst == X+Cst iff X&Cst = 0. - bool isBaseWithConstantOffset(SDValue Op) const; - - /// Test whether the given SDValue is known to never be NaN. - bool isKnownNeverNaN(SDValue Op) const; - - /// Test whether the given SDValue is known to never be positive or negative - /// zero. - bool isKnownNeverZero(SDValue Op) const; - - /// Test whether two SDValues are known to compare equal. This - /// is true if they are the same value, or if one is negative zero and the - /// other positive zero. - bool isEqualTo(SDValue A, SDValue B) const; - - /// Return true if A and B have no common bits set. As an example, this can - /// allow an 'add' to be transformed into an 'or'. - bool haveNoCommonBitsSet(SDValue A, SDValue B) const; - - /// Utility function used by legalize and lowering to - /// "unroll" a vector operation by splitting out the scalars and operating - /// on each element individually. If the ResNE is 0, fully unroll the vector - /// op. If ResNE is less than the width of the vector op, unroll up to ResNE. - /// If the ResNE is greater than the width of the vector op, unroll the - /// vector op and fill the end of the resulting vector with UNDEFS. - SDValue UnrollVectorOp(SDNode *N, unsigned ResNE = 0); - - /// Return true if loads are next to each other and can be - /// merged. Check that both are nonvolatile and if LD is loading - /// 'Bytes' bytes from a location that is 'Dist' units away from the - /// location that the 'Base' load is loading from. - bool areNonVolatileConsecutiveLoads(LoadSDNode *LD, LoadSDNode *Base, - unsigned Bytes, int Dist) const; - - /// Infer alignment of a load / store address. Return 0 if - /// it cannot be inferred. - unsigned InferPtrAlignment(SDValue Ptr) const; - - /// Compute the VTs needed for the low/hi parts of a type - /// which is split (or expanded) into two not necessarily identical pieces. - std::pair GetSplitDestVTs(const EVT &VT) const; - - /// Split the vector with EXTRACT_SUBVECTOR using the provides - /// VTs and return the low/high part. - std::pair SplitVector(const SDValue &N, const SDLoc &DL, - const EVT &LoVT, const EVT &HiVT); - - /// Split the vector with EXTRACT_SUBVECTOR and return the low/high part. - std::pair SplitVector(const SDValue &N, const SDLoc &DL) { - EVT LoVT, HiVT; - std::tie(LoVT, HiVT) = GetSplitDestVTs(N.getValueType()); - return SplitVector(N, DL, LoVT, HiVT); - } - - /// Split the node's operand with EXTRACT_SUBVECTOR and - /// return the low/high part. - std::pair SplitVectorOperand(const SDNode *N, unsigned OpNo) - { - return SplitVector(N->getOperand(OpNo), SDLoc(N)); - } - - /// Append the extracted elements from Start to Count out of the vector Op - /// in Args. If Count is 0, all of the elements will be extracted. - void ExtractVectorElements(SDValue Op, SmallVectorImpl &Args, - unsigned Start = 0, unsigned Count = 0); - - /// Compute the default alignment value for the given type. - unsigned getEVTAlignment(EVT MemoryVT) const; - - /// Test whether the given value is a constant int or similar node. - SDNode *isConstantIntBuildVectorOrConstantInt(SDValue N); - -private: - void InsertNode(SDNode *N); - bool RemoveNodeFromCSEMaps(SDNode *N); - void AddModifiedNodeToCSEMaps(SDNode *N); - SDNode *FindModifiedNodeSlot(SDNode *N, SDValue Op, void *&InsertPos); - SDNode *FindModifiedNodeSlot(SDNode *N, SDValue Op1, SDValue Op2, - void *&InsertPos); - SDNode *FindModifiedNodeSlot(SDNode *N, ArrayRef Ops, - void *&InsertPos); - SDNode *UpdadeSDLocOnMergedSDNode(SDNode *N, const SDLoc &loc); - - void DeleteNodeNotInCSEMaps(SDNode *N); - void DeallocateNode(SDNode *N); - - void allnodes_clear(); - - SDNode *GetBinarySDNode(unsigned Opcode, const SDLoc &DL, SDVTList VTs, - SDValue N1, SDValue N2, - const SDNodeFlags *Flags = nullptr); - - /// Look up the node specified by ID in CSEMap. If it exists, return it. If - /// not, return the insertion token that will make insertion faster. This - /// overload is for nodes other than Constant or ConstantFP, use the other one - /// for those. - SDNode *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos); - - /// Look up the node specified by ID in CSEMap. If it exists, return it. If - /// not, return the insertion token that will make insertion faster. Performs - /// additional processing for constant nodes. - SDNode *FindNodeOrInsertPos(const FoldingSetNodeID &ID, const SDLoc &DL, - void *&InsertPos); - - /// List of non-single value types. - FoldingSet VTListMap; - - /// Maps to auto-CSE operations. - std::vector CondCodeNodes; - - std::vector ValueTypeNodes; - std::map ExtendedValueTypeNodes; - StringMap ExternalSymbols; - - std::map,SDNode*> TargetExternalSymbols; - DenseMap MCSymbols; -}; - -template <> struct GraphTraits : public GraphTraits { - typedef SelectionDAG::allnodes_iterator nodes_iterator; - static nodes_iterator nodes_begin(SelectionDAG *G) { - return G->allnodes_begin(); - } - static nodes_iterator nodes_end(SelectionDAG *G) { - return G->allnodes_end(); - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/SelectionDAGISel.h b/llvm/include/llvm/CodeGen/SelectionDAGISel.h deleted file mode 100644 index 7f4549d3..00000000 --- a/llvm/include/llvm/CodeGen/SelectionDAGISel.h +++ /dev/null @@ -1,314 +0,0 @@ -//===-- llvm/CodeGen/SelectionDAGISel.h - Common Base Class------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the SelectionDAGISel class, which is used as the common -// base class for SelectionDAG-based instruction selectors. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SELECTIONDAGISEL_H -#define LLVM_CODEGEN_SELECTIONDAGISEL_H - -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/SelectionDAG.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/Pass.h" -#include "llvm/Target/TargetSubtargetInfo.h" - -namespace llvm { - class FastISel; - class SelectionDAGBuilder; - class SDValue; - class MachineRegisterInfo; - class MachineBasicBlock; - class MachineFunction; - class MachineInstr; - class TargetLowering; - class TargetLibraryInfo; - class FunctionLoweringInfo; - class ScheduleHazardRecognizer; - class GCFunctionInfo; - class ScheduleDAGSDNodes; - class LoadInst; - -/// SelectionDAGISel - This is the common base class used for SelectionDAG-based -/// pattern-matching instruction selectors. -class SelectionDAGISel : public MachineFunctionPass { -public: - TargetMachine &TM; - const TargetLibraryInfo *LibInfo; - FunctionLoweringInfo *FuncInfo; - MachineFunction *MF; - MachineRegisterInfo *RegInfo; - SelectionDAG *CurDAG; - SelectionDAGBuilder *SDB; - AliasAnalysis *AA; - GCFunctionInfo *GFI; - CodeGenOpt::Level OptLevel; - const TargetInstrInfo *TII; - const TargetLowering *TLI; - - static char ID; - - explicit SelectionDAGISel(TargetMachine &tm, - CodeGenOpt::Level OL = CodeGenOpt::Default); - ~SelectionDAGISel() override; - - const TargetLowering *getTargetLowering() const { return TLI; } - - void getAnalysisUsage(AnalysisUsage &AU) const override; - - bool runOnMachineFunction(MachineFunction &MF) override; - - virtual void EmitFunctionEntryCode() {} - - /// PreprocessISelDAG - This hook allows targets to hack on the graph before - /// instruction selection starts. - virtual void PreprocessISelDAG() {} - - /// PostprocessISelDAG() - This hook allows the target to hack on the graph - /// right after selection. - virtual void PostprocessISelDAG() {} - - /// Main hook for targets to transform nodes into machine nodes. - virtual void Select(SDNode *N) = 0; - - /// SelectInlineAsmMemoryOperand - Select the specified address as a target - /// addressing mode, according to the specified constraint. If this does - /// not match or is not implemented, return true. The resultant operands - /// (which will appear in the machine instruction) should be added to the - /// OutOps vector. - virtual bool SelectInlineAsmMemoryOperand(const SDValue &Op, - unsigned ConstraintID, - std::vector &OutOps) { - return true; - } - - /// IsProfitableToFold - Returns true if it's profitable to fold the specific - /// operand node N of U during instruction selection that starts at Root. - virtual bool IsProfitableToFold(SDValue N, SDNode *U, SDNode *Root) const; - - /// IsLegalToFold - Returns true if the specific operand node N of - /// U can be folded during instruction selection that starts at Root. - /// FIXME: This is a static member function because the MSP430/X86 - /// targets, which uses it during isel. This could become a proper member. - static bool IsLegalToFold(SDValue N, SDNode *U, SDNode *Root, - CodeGenOpt::Level OptLevel, - bool IgnoreChains = false); - - // Opcodes used by the DAG state machine: - enum BuiltinOpcodes { - OPC_Scope, - OPC_RecordNode, - OPC_RecordChild0, OPC_RecordChild1, OPC_RecordChild2, OPC_RecordChild3, - OPC_RecordChild4, OPC_RecordChild5, OPC_RecordChild6, OPC_RecordChild7, - OPC_RecordMemRef, - OPC_CaptureGlueInput, - OPC_MoveChild, - OPC_MoveChild0, OPC_MoveChild1, OPC_MoveChild2, OPC_MoveChild3, - OPC_MoveChild4, OPC_MoveChild5, OPC_MoveChild6, OPC_MoveChild7, - OPC_MoveParent, - OPC_CheckSame, - OPC_CheckChild0Same, OPC_CheckChild1Same, - OPC_CheckChild2Same, OPC_CheckChild3Same, - OPC_CheckPatternPredicate, - OPC_CheckPredicate, - OPC_CheckOpcode, - OPC_SwitchOpcode, - OPC_CheckType, - OPC_SwitchType, - OPC_CheckChild0Type, OPC_CheckChild1Type, OPC_CheckChild2Type, - OPC_CheckChild3Type, OPC_CheckChild4Type, OPC_CheckChild5Type, - OPC_CheckChild6Type, OPC_CheckChild7Type, - OPC_CheckInteger, - OPC_CheckChild0Integer, OPC_CheckChild1Integer, OPC_CheckChild2Integer, - OPC_CheckChild3Integer, OPC_CheckChild4Integer, - OPC_CheckCondCode, - OPC_CheckValueType, - OPC_CheckComplexPat, - OPC_CheckAndImm, OPC_CheckOrImm, - OPC_CheckFoldableChainNode, - - OPC_EmitInteger, - OPC_EmitRegister, - OPC_EmitRegister2, - OPC_EmitConvertToTarget, - OPC_EmitMergeInputChains, - OPC_EmitMergeInputChains1_0, - OPC_EmitMergeInputChains1_1, - OPC_EmitMergeInputChains1_2, - OPC_EmitCopyToReg, - OPC_EmitNodeXForm, - OPC_EmitNode, - // Space-optimized forms that implicitly encode number of result VTs. - OPC_EmitNode0, OPC_EmitNode1, OPC_EmitNode2, - OPC_MorphNodeTo, - // Space-optimized forms that implicitly encode number of result VTs. - OPC_MorphNodeTo0, OPC_MorphNodeTo1, OPC_MorphNodeTo2, - OPC_CompleteMatch - }; - - enum { - OPFL_None = 0, // Node has no chain or glue input and isn't variadic. - OPFL_Chain = 1, // Node has a chain input. - OPFL_GlueInput = 2, // Node has a glue input. - OPFL_GlueOutput = 4, // Node has a glue output. - OPFL_MemRefs = 8, // Node gets accumulated MemRefs. - OPFL_Variadic0 = 1<<4, // Node is variadic, root has 0 fixed inputs. - OPFL_Variadic1 = 2<<4, // Node is variadic, root has 1 fixed inputs. - OPFL_Variadic2 = 3<<4, // Node is variadic, root has 2 fixed inputs. - OPFL_Variadic3 = 4<<4, // Node is variadic, root has 3 fixed inputs. - OPFL_Variadic4 = 5<<4, // Node is variadic, root has 4 fixed inputs. - OPFL_Variadic5 = 6<<4, // Node is variadic, root has 5 fixed inputs. - OPFL_Variadic6 = 7<<4, // Node is variadic, root has 6 fixed inputs. - - OPFL_VariadicInfo = OPFL_Variadic6 - }; - - /// getNumFixedFromVariadicInfo - Transform an EmitNode flags word into the - /// number of fixed arity values that should be skipped when copying from the - /// root. - static inline int getNumFixedFromVariadicInfo(unsigned Flags) { - return ((Flags&OPFL_VariadicInfo) >> 4)-1; - } - - -protected: - /// DAGSize - Size of DAG being instruction selected. - /// - unsigned DAGSize; - - /// ReplaceUses - replace all uses of the old node F with the use - /// of the new node T. - void ReplaceUses(SDValue F, SDValue T) { - CurDAG->ReplaceAllUsesOfValueWith(F, T); - } - - /// ReplaceUses - replace all uses of the old nodes F with the use - /// of the new nodes T. - void ReplaceUses(const SDValue *F, const SDValue *T, unsigned Num) { - CurDAG->ReplaceAllUsesOfValuesWith(F, T, Num); - } - - /// ReplaceUses - replace all uses of the old node F with the use - /// of the new node T. - void ReplaceUses(SDNode *F, SDNode *T) { - CurDAG->ReplaceAllUsesWith(F, T); - } - - /// Replace all uses of \c F with \c T, then remove \c F from the DAG. - void ReplaceNode(SDNode *F, SDNode *T) { - CurDAG->ReplaceAllUsesWith(F, T); - CurDAG->RemoveDeadNode(F); - } - - /// SelectInlineAsmMemoryOperands - Calls to this are automatically generated - /// by tblgen. Others should not call it. - void SelectInlineAsmMemoryOperands(std::vector &Ops, - const SDLoc &DL); - -public: - // Calls to these predicates are generated by tblgen. - bool CheckAndMask(SDValue LHS, ConstantSDNode *RHS, - int64_t DesiredMaskS) const; - bool CheckOrMask(SDValue LHS, ConstantSDNode *RHS, - int64_t DesiredMaskS) const; - - - /// CheckPatternPredicate - This function is generated by tblgen in the - /// target. It runs the specified pattern predicate and returns true if it - /// succeeds or false if it fails. The number is a private implementation - /// detail to the code tblgen produces. - virtual bool CheckPatternPredicate(unsigned PredNo) const { - llvm_unreachable("Tblgen should generate the implementation of this!"); - } - - /// CheckNodePredicate - This function is generated by tblgen in the target. - /// It runs node predicate number PredNo and returns true if it succeeds or - /// false if it fails. The number is a private implementation - /// detail to the code tblgen produces. - virtual bool CheckNodePredicate(SDNode *N, unsigned PredNo) const { - llvm_unreachable("Tblgen should generate the implementation of this!"); - } - - virtual bool CheckComplexPattern(SDNode *Root, SDNode *Parent, SDValue N, - unsigned PatternNo, - SmallVectorImpl > &Result) { - llvm_unreachable("Tblgen should generate the implementation of this!"); - } - - virtual SDValue RunSDNodeXForm(SDValue V, unsigned XFormNo) { - llvm_unreachable("Tblgen should generate this!"); - } - - void SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable, - unsigned TableSize); - - /// \brief Return true if complex patterns for this target can mutate the - /// DAG. - virtual bool ComplexPatternFuncMutatesDAG() const { - return false; - } - -private: - - // Calls to these functions are generated by tblgen. - void Select_INLINEASM(SDNode *N); - void Select_READ_REGISTER(SDNode *N); - void Select_WRITE_REGISTER(SDNode *N); - void Select_UNDEF(SDNode *N); - void CannotYetSelect(SDNode *N); - -private: - void DoInstructionSelection(); - SDNode *MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTs, - ArrayRef Ops, unsigned EmitNodeInfo); - - /// Prepares the landing pad to take incoming values or do other EH - /// personality specific tasks. Returns true if the block should be - /// instruction selected, false if no code should be emitted for it. - bool PrepareEHLandingPad(); - - /// \brief Perform instruction selection on all basic blocks in the function. - void SelectAllBasicBlocks(const Function &Fn); - - /// \brief Perform instruction selection on a single basic block, for - /// instructions between \p Begin and \p End. \p HadTailCall will be set - /// to true if a call in the block was translated as a tail call. - void SelectBasicBlock(BasicBlock::const_iterator Begin, - BasicBlock::const_iterator End, - bool &HadTailCall); - void FinishBasicBlock(); - - void CodeGenAndEmitDAG(); - - /// \brief Generate instructions for lowering the incoming arguments of the - /// given function. - void LowerArguments(const Function &F); - - void ComputeLiveOutVRegInfo(); - - /// Create the scheduler. If a specific scheduler was specified - /// via the SchedulerRegistry, use it, otherwise select the - /// one preferred by the target. - /// - ScheduleDAGSDNodes *CreateScheduler(); - - /// OpcodeOffset - This is a cache used to dispatch efficiently into isel - /// state machines that start with a OPC_SwitchOpcode node. - std::vector OpcodeOffset; - - void UpdateChains(SDNode *NodeToMatch, SDValue InputChain, - const SmallVectorImpl &ChainNodesMatched, - bool isMorphNodeTo); -}; - -} - -#endif /* LLVM_CODEGEN_SELECTIONDAGISEL_H */ diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h deleted file mode 100644 index cfcc4117..00000000 --- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h +++ /dev/null @@ -1,2145 +0,0 @@ -//===-- llvm/CodeGen/SelectionDAGNodes.h - SelectionDAG Nodes ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the SDNode class and derived classes, which are used to -// represent the nodes and operations present in a SelectionDAG. These nodes -// and operations are machine code level operations, with some similarities to -// the GCC RTL representation. -// -// Clients should include the SelectionDAG.h file instead of this file directly. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H -#define LLVM_CODEGEN_SELECTIONDAGNODES_H - -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/FoldingSet.h" -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/CodeGen/ISDOpcodes.h" -#include "llvm/CodeGen/MachineMemOperand.h" -#include "llvm/CodeGen/ValueTypes.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/IR/Instructions.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/MathExtras.h" -#include - -namespace llvm { - -class SelectionDAG; -class GlobalValue; -class MachineBasicBlock; -class MachineConstantPoolValue; -class SDNode; -class HandleSDNode; -class Value; -class MCSymbol; -template struct DenseMapInfo; -template struct simplify_type; -template struct ilist_traits; - -void checkForCycles(const SDNode *N, const SelectionDAG *DAG = nullptr, - bool force = false); - -/// This represents a list of ValueType's that has been intern'd by -/// a SelectionDAG. Instances of this simple value class are returned by -/// SelectionDAG::getVTList(...). -/// -struct SDVTList { - const EVT *VTs; - unsigned int NumVTs; -}; - -namespace ISD { - /// Node predicates - - /// If N is a BUILD_VECTOR node whose elements are all the same constant or - /// undefined, return true and return the constant value in \p SplatValue. - bool isConstantSplatVector(const SDNode *N, APInt &SplatValue); - - /// Return true if the specified node is a BUILD_VECTOR where all of the - /// elements are ~0 or undef. - bool isBuildVectorAllOnes(const SDNode *N); - - /// Return true if the specified node is a BUILD_VECTOR where all of the - /// elements are 0 or undef. - bool isBuildVectorAllZeros(const SDNode *N); - - /// Return true if the specified node is a BUILD_VECTOR node of all - /// ConstantSDNode or undef. - bool isBuildVectorOfConstantSDNodes(const SDNode *N); - - /// Return true if the specified node is a BUILD_VECTOR node of all - /// ConstantFPSDNode or undef. - bool isBuildVectorOfConstantFPSDNodes(const SDNode *N); - - /// Return true if the node has at least one operand and all operands of the - /// specified node are ISD::UNDEF. - bool allOperandsUndef(const SDNode *N); -} // end llvm:ISD namespace - -//===----------------------------------------------------------------------===// -/// Unlike LLVM values, Selection DAG nodes may return multiple -/// values as the result of a computation. Many nodes return multiple values, -/// from loads (which define a token and a return value) to ADDC (which returns -/// a result and a carry value), to calls (which may return an arbitrary number -/// of values). -/// -/// As such, each use of a SelectionDAG computation must indicate the node that -/// computes it as well as which return value to use from that node. This pair -/// of information is represented with the SDValue value type. -/// -class SDValue { - friend struct DenseMapInfo; - - SDNode *Node; // The node defining the value we are using. - unsigned ResNo; // Which return value of the node we are using. -public: - SDValue() : Node(nullptr), ResNo(0) {} - SDValue(SDNode *node, unsigned resno); - - /// get the index which selects a specific result in the SDNode - unsigned getResNo() const { return ResNo; } - - /// get the SDNode which holds the desired result - SDNode *getNode() const { return Node; } - - /// set the SDNode - void setNode(SDNode *N) { Node = N; } - - inline SDNode *operator->() const { return Node; } - - bool operator==(const SDValue &O) const { - return Node == O.Node && ResNo == O.ResNo; - } - bool operator!=(const SDValue &O) const { - return !operator==(O); - } - bool operator<(const SDValue &O) const { - return std::tie(Node, ResNo) < std::tie(O.Node, O.ResNo); - } - explicit operator bool() const { - return Node != nullptr; - } - - SDValue getValue(unsigned R) const { - return SDValue(Node, R); - } - - /// Return true if this node is an operand of N. - bool isOperandOf(const SDNode *N) const; - - /// Return the ValueType of the referenced return value. - inline EVT getValueType() const; - - /// Return the simple ValueType of the referenced return value. - MVT getSimpleValueType() const { - return getValueType().getSimpleVT(); - } - - /// Returns the size of the value in bits. - unsigned getValueSizeInBits() const { - return getValueType().getSizeInBits(); - } - - unsigned getScalarValueSizeInBits() const { - return getValueType().getScalarType().getSizeInBits(); - } - - // Forwarding methods - These forward to the corresponding methods in SDNode. - inline unsigned getOpcode() const; - inline unsigned getNumOperands() const; - inline const SDValue &getOperand(unsigned i) const; - inline uint64_t getConstantOperandVal(unsigned i) const; - inline bool isTargetMemoryOpcode() const; - inline bool isTargetOpcode() const; - inline bool isMachineOpcode() const; - inline bool isUndef() const; - inline unsigned getMachineOpcode() const; - inline const DebugLoc &getDebugLoc() const; - inline void dump() const; - inline void dumpr() const; - - /// Return true if this operand (which must be a chain) reaches the - /// specified operand without crossing any side-effecting instructions. - /// In practice, this looks through token factors and non-volatile loads. - /// In order to remain efficient, this only - /// looks a couple of nodes in, it does not do an exhaustive search. - bool reachesChainWithoutSideEffects(SDValue Dest, - unsigned Depth = 2) const; - - /// Return true if there are no nodes using value ResNo of Node. - inline bool use_empty() const; - - /// Return true if there is exactly one node using value ResNo of Node. - inline bool hasOneUse() const; -}; - - -template<> struct DenseMapInfo { - static inline SDValue getEmptyKey() { - SDValue V; - V.ResNo = -1U; - return V; - } - static inline SDValue getTombstoneKey() { - SDValue V; - V.ResNo = -2U; - return V; - } - static unsigned getHashValue(const SDValue &Val) { - return ((unsigned)((uintptr_t)Val.getNode() >> 4) ^ - (unsigned)((uintptr_t)Val.getNode() >> 9)) + Val.getResNo(); - } - static bool isEqual(const SDValue &LHS, const SDValue &RHS) { - return LHS == RHS; - } -}; -template <> struct isPodLike { static const bool value = true; }; - - -/// Allow casting operators to work directly on -/// SDValues as if they were SDNode*'s. -template<> struct simplify_type { - typedef SDNode* SimpleType; - static SimpleType getSimplifiedValue(SDValue &Val) { - return Val.getNode(); - } -}; -template<> struct simplify_type { - typedef /*const*/ SDNode* SimpleType; - static SimpleType getSimplifiedValue(const SDValue &Val) { - return Val.getNode(); - } -}; - -/// Represents a use of a SDNode. This class holds an SDValue, -/// which records the SDNode being used and the result number, a -/// pointer to the SDNode using the value, and Next and Prev pointers, -/// which link together all the uses of an SDNode. -/// -class SDUse { - /// Val - The value being used. - SDValue Val; - /// User - The user of this value. - SDNode *User; - /// Prev, Next - Pointers to the uses list of the SDNode referred by - /// this operand. - SDUse **Prev, *Next; - - SDUse(const SDUse &U) = delete; - void operator=(const SDUse &U) = delete; - -public: - SDUse() : Val(), User(nullptr), Prev(nullptr), Next(nullptr) {} - - /// Normally SDUse will just implicitly convert to an SDValue that it holds. - operator const SDValue&() const { return Val; } - - /// If implicit conversion to SDValue doesn't work, the get() method returns - /// the SDValue. - const SDValue &get() const { return Val; } - - /// This returns the SDNode that contains this Use. - SDNode *getUser() { return User; } - - /// Get the next SDUse in the use list. - SDUse *getNext() const { return Next; } - - /// Convenience function for get().getNode(). - SDNode *getNode() const { return Val.getNode(); } - /// Convenience function for get().getResNo(). - unsigned getResNo() const { return Val.getResNo(); } - /// Convenience function for get().getValueType(). - EVT getValueType() const { return Val.getValueType(); } - - /// Convenience function for get().operator== - bool operator==(const SDValue &V) const { - return Val == V; - } - - /// Convenience function for get().operator!= - bool operator!=(const SDValue &V) const { - return Val != V; - } - - /// Convenience function for get().operator< - bool operator<(const SDValue &V) const { - return Val < V; - } - -private: - friend class SelectionDAG; - friend class SDNode; - // TODO: unfriend HandleSDNode once we fix its operand handling. - friend class HandleSDNode; - - void setUser(SDNode *p) { User = p; } - - /// Remove this use from its existing use list, assign it the - /// given value, and add it to the new value's node's use list. - inline void set(const SDValue &V); - /// Like set, but only supports initializing a newly-allocated - /// SDUse with a non-null value. - inline void setInitial(const SDValue &V); - /// Like set, but only sets the Node portion of the value, - /// leaving the ResNo portion unmodified. - inline void setNode(SDNode *N); - - void addToList(SDUse **List) { - Next = *List; - if (Next) Next->Prev = &Next; - Prev = List; - *List = this; - } - - void removeFromList() { - *Prev = Next; - if (Next) Next->Prev = Prev; - } -}; - -/// simplify_type specializations - Allow casting operators to work directly on -/// SDValues as if they were SDNode*'s. -template<> struct simplify_type { - typedef SDNode* SimpleType; - static SimpleType getSimplifiedValue(SDUse &Val) { - return Val.getNode(); - } -}; - -/// These are IR-level optimization flags that may be propagated to SDNodes. -/// TODO: This data structure should be shared by the IR optimizer and the -/// the backend. -struct SDNodeFlags { -private: - bool NoUnsignedWrap : 1; - bool NoSignedWrap : 1; - bool Exact : 1; - bool UnsafeAlgebra : 1; - bool NoNaNs : 1; - bool NoInfs : 1; - bool NoSignedZeros : 1; - bool AllowReciprocal : 1; - bool VectorReduction : 1; - -public: - /// Default constructor turns off all optimization flags. - SDNodeFlags() { - NoUnsignedWrap = false; - NoSignedWrap = false; - Exact = false; - UnsafeAlgebra = false; - NoNaNs = false; - NoInfs = false; - NoSignedZeros = false; - AllowReciprocal = false; - VectorReduction = false; - } - - // These are mutators for each flag. - void setNoUnsignedWrap(bool b) { NoUnsignedWrap = b; } - void setNoSignedWrap(bool b) { NoSignedWrap = b; } - void setExact(bool b) { Exact = b; } - void setUnsafeAlgebra(bool b) { UnsafeAlgebra = b; } - void setNoNaNs(bool b) { NoNaNs = b; } - void setNoInfs(bool b) { NoInfs = b; } - void setNoSignedZeros(bool b) { NoSignedZeros = b; } - void setAllowReciprocal(bool b) { AllowReciprocal = b; } - void setVectorReduction(bool b) { VectorReduction = b; } - - // These are accessors for each flag. - bool hasNoUnsignedWrap() const { return NoUnsignedWrap; } - bool hasNoSignedWrap() const { return NoSignedWrap; } - bool hasExact() const { return Exact; } - bool hasUnsafeAlgebra() const { return UnsafeAlgebra; } - bool hasNoNaNs() const { return NoNaNs; } - bool hasNoInfs() const { return NoInfs; } - bool hasNoSignedZeros() const { return NoSignedZeros; } - bool hasAllowReciprocal() const { return AllowReciprocal; } - bool hasVectorReduction() const { return VectorReduction; } - - /// Return a raw encoding of the flags. - /// This function should only be used to add data to the NodeID value. - unsigned getRawFlags() const { - return (NoUnsignedWrap << 0) | (NoSignedWrap << 1) | (Exact << 2) | - (UnsafeAlgebra << 3) | (NoNaNs << 4) | (NoInfs << 5) | - (NoSignedZeros << 6) | (AllowReciprocal << 7); - } - - /// Clear any flags in this flag set that aren't also set in Flags. - void intersectWith(const SDNodeFlags *Flags) { - NoUnsignedWrap &= Flags->NoUnsignedWrap; - NoSignedWrap &= Flags->NoSignedWrap; - Exact &= Flags->Exact; - UnsafeAlgebra &= Flags->UnsafeAlgebra; - NoNaNs &= Flags->NoNaNs; - NoInfs &= Flags->NoInfs; - NoSignedZeros &= Flags->NoSignedZeros; - AllowReciprocal &= Flags->AllowReciprocal; - } -}; - -/// Represents one node in the SelectionDAG. -/// -class SDNode : public FoldingSetNode, public ilist_node { -private: - /// The operation that this node performs. - int16_t NodeType; - - /// This tracks whether this node has one or more dbg_value - /// nodes corresponding to it. - uint16_t HasDebugValue : 1; - -protected: - /// This member is defined by this class, but is not used for - /// anything. Subclasses can use it to hold whatever state they find useful. - /// This field is initialized to zero by the ctor. - uint16_t SubclassData : 15; - -private: - /// Unique id per SDNode in the DAG. - int NodeId; - - /// The values that are used by this operation. - SDUse *OperandList; - - /// The types of the values this node defines. SDNode's may - /// define multiple values simultaneously. - const EVT *ValueList; - - /// List of uses for this SDNode. - SDUse *UseList; - - /// The number of entries in the Operand/Value list. - unsigned short NumOperands, NumValues; - - // The ordering of the SDNodes. It roughly corresponds to the ordering of the - // original LLVM instructions. - // This is used for turning off scheduling, because we'll forgo - // the normal scheduling algorithms and output the instructions according to - // this ordering. - unsigned IROrder; - - /// Source line information. - DebugLoc debugLoc; - - /// Return a pointer to the specified value type. - static const EVT *getValueTypeList(EVT VT); - - friend class SelectionDAG; - friend struct ilist_traits; - // TODO: unfriend HandleSDNode once we fix its operand handling. - friend class HandleSDNode; - -public: - /// Unique and persistent id per SDNode in the DAG. - /// Used for debug printing. - uint16_t PersistentId; - - //===--------------------------------------------------------------------===// - // Accessors - // - - /// Return the SelectionDAG opcode value for this node. For - /// pre-isel nodes (those for which isMachineOpcode returns false), these - /// are the opcode values in the ISD and ISD namespaces. For - /// post-isel opcodes, see getMachineOpcode. - unsigned getOpcode() const { return (unsigned short)NodeType; } - - /// Test if this node has a target-specific opcode (in the - /// \ISD namespace). - bool isTargetOpcode() const { return NodeType >= ISD::BUILTIN_OP_END; } - - /// Test if this node has a target-specific - /// memory-referencing opcode (in the \ISD namespace and - /// greater than FIRST_TARGET_MEMORY_OPCODE). - bool isTargetMemoryOpcode() const { - return NodeType >= ISD::FIRST_TARGET_MEMORY_OPCODE; - } - - /// Return true if the type of the node type undefined. - bool isUndef() const { return NodeType == ISD::UNDEF; } - - /// Test if this node is a memory intrinsic (with valid pointer information). - /// INTRINSIC_W_CHAIN and INTRINSIC_VOID nodes are sometimes created for - /// non-memory intrinsics (with chains) that are not really instances of - /// MemSDNode. For such nodes, we need some extra state to determine the - /// proper classof relationship. - bool isMemIntrinsic() const { - return (NodeType == ISD::INTRINSIC_W_CHAIN || - NodeType == ISD::INTRINSIC_VOID) && ((SubclassData >> 13) & 1); - } - - /// Test if this node has a post-isel opcode, directly - /// corresponding to a MachineInstr opcode. - bool isMachineOpcode() const { return NodeType < 0; } - - /// This may only be called if isMachineOpcode returns - /// true. It returns the MachineInstr opcode value that the node's opcode - /// corresponds to. - unsigned getMachineOpcode() const { - assert(isMachineOpcode() && "Not a MachineInstr opcode!"); - return ~NodeType; - } - - /// Get this bit. - bool getHasDebugValue() const { return HasDebugValue; } - - /// Set this bit. - void setHasDebugValue(bool b) { HasDebugValue = b; } - - /// Return true if there are no uses of this node. - bool use_empty() const { return UseList == nullptr; } - - /// Return true if there is exactly one use of this node. - bool hasOneUse() const { - return !use_empty() && std::next(use_begin()) == use_end(); - } - - /// Return the number of uses of this node. This method takes - /// time proportional to the number of uses. - size_t use_size() const { return std::distance(use_begin(), use_end()); } - - /// Return the unique node id. - int getNodeId() const { return NodeId; } - - /// Set unique node id. - void setNodeId(int Id) { NodeId = Id; } - - /// Return the node ordering. - unsigned getIROrder() const { return IROrder; } - - /// Set the node ordering. - void setIROrder(unsigned Order) { IROrder = Order; } - - /// Return the source location info. - const DebugLoc &getDebugLoc() const { return debugLoc; } - - /// Set source location info. Try to avoid this, putting - /// it in the constructor is preferable. - void setDebugLoc(DebugLoc dl) { debugLoc = std::move(dl); } - - /// This class provides iterator support for SDUse - /// operands that use a specific SDNode. - class use_iterator - : public std::iterator { - SDUse *Op; - explicit use_iterator(SDUse *op) : Op(op) { - } - friend class SDNode; - public: - typedef std::iterator::reference reference; - typedef std::iterator::pointer pointer; - - use_iterator(const use_iterator &I) : Op(I.Op) {} - use_iterator() : Op(nullptr) {} - - bool operator==(const use_iterator &x) const { - return Op == x.Op; - } - bool operator!=(const use_iterator &x) const { - return !operator==(x); - } - - /// Return true if this iterator is at the end of uses list. - bool atEnd() const { return Op == nullptr; } - - // Iterator traversal: forward iteration only. - use_iterator &operator++() { // Preincrement - assert(Op && "Cannot increment end iterator!"); - Op = Op->getNext(); - return *this; - } - - use_iterator operator++(int) { // Postincrement - use_iterator tmp = *this; ++*this; return tmp; - } - - /// Retrieve a pointer to the current user node. - SDNode *operator*() const { - assert(Op && "Cannot dereference end iterator!"); - return Op->getUser(); - } - - SDNode *operator->() const { return operator*(); } - - SDUse &getUse() const { return *Op; } - - /// Retrieve the operand # of this use in its user. - unsigned getOperandNo() const { - assert(Op && "Cannot dereference end iterator!"); - return (unsigned)(Op - Op->getUser()->OperandList); - } - }; - - /// Provide iteration support to walk over all uses of an SDNode. - use_iterator use_begin() const { - return use_iterator(UseList); - } - - static use_iterator use_end() { return use_iterator(nullptr); } - - inline iterator_range uses() { - return make_range(use_begin(), use_end()); - } - inline iterator_range uses() const { - return make_range(use_begin(), use_end()); - } - - /// Return true if there are exactly NUSES uses of the indicated value. - /// This method ignores uses of other values defined by this operation. - bool hasNUsesOfValue(unsigned NUses, unsigned Value) const; - - /// Return true if there are any use of the indicated value. - /// This method ignores uses of other values defined by this operation. - bool hasAnyUseOfValue(unsigned Value) const; - - /// Return true if this node is the only use of N. - bool isOnlyUserOf(const SDNode *N) const; - - /// Return true if this node is an operand of N. - bool isOperandOf(const SDNode *N) const; - - /// Return true if this node is a predecessor of N. - /// NOTE: Implemented on top of hasPredecessor and every bit as - /// expensive. Use carefully. - bool isPredecessorOf(const SDNode *N) const { - return N->hasPredecessor(this); - } - - /// Return true if N is a predecessor of this node. - /// N is either an operand of this node, or can be reached by recursively - /// traversing up the operands. - /// NOTE: This is an expensive method. Use it carefully. - bool hasPredecessor(const SDNode *N) const; - - /// Returns true if N is a predecessor of any node in Worklist. This - /// helper keeps Visited and Worklist sets externally to allow unions - /// searches to be performed in parallel, caching of results across - /// queries and incremental addition to Worklist. Stops early if N is - /// found but will resume. Remember to clear Visited and Worklists - /// if DAG changes. - static bool hasPredecessorHelper(const SDNode *N, - SmallPtrSetImpl &Visited, - SmallVectorImpl &Worklist) { - if (Visited.count(N)) - return true; - while (!Worklist.empty()) { - const SDNode *M = Worklist.pop_back_val(); - bool Found = false; - for (const SDValue &OpV : M->op_values()) { - SDNode *Op = OpV.getNode(); - if (Visited.insert(Op).second) - Worklist.push_back(Op); - if (Op == N) - Found = true; - } - if (Found) - return true; - } - return false; - } - - /// Return the number of values used by this operation. - unsigned getNumOperands() const { return NumOperands; } - - /// Helper method returns the integer value of a ConstantSDNode operand. - uint64_t getConstantOperandVal(unsigned Num) const; - - const SDValue &getOperand(unsigned Num) const { - assert(Num < NumOperands && "Invalid child # of SDNode!"); - return OperandList[Num]; - } - - typedef SDUse* op_iterator; - op_iterator op_begin() const { return OperandList; } - op_iterator op_end() const { return OperandList+NumOperands; } - ArrayRef ops() const { return makeArrayRef(op_begin(), op_end()); } - - /// Iterator for directly iterating over the operand SDValue's. - struct value_op_iterator - : iterator_adaptor_base { - explicit value_op_iterator(SDUse *U = nullptr) - : iterator_adaptor_base(U) {} - - const SDValue &operator*() const { return I->get(); } - }; - - iterator_range op_values() const { - return make_range(value_op_iterator(op_begin()), - value_op_iterator(op_end())); - } - - SDVTList getVTList() const { - SDVTList X = { ValueList, NumValues }; - return X; - } - - /// If this node has a glue operand, return the node - /// to which the glue operand points. Otherwise return NULL. - SDNode *getGluedNode() const { - if (getNumOperands() != 0 && - getOperand(getNumOperands()-1).getValueType() == MVT::Glue) - return getOperand(getNumOperands()-1).getNode(); - return nullptr; - } - - /// If this node has a glue value with a user, return - /// the user (there is at most one). Otherwise return NULL. - SDNode *getGluedUser() const { - for (use_iterator UI = use_begin(), UE = use_end(); UI != UE; ++UI) - if (UI.getUse().get().getValueType() == MVT::Glue) - return *UI; - return nullptr; - } - - /// This could be defined as a virtual function and implemented more simply - /// and directly, but it is not to avoid creating a vtable for this class. - const SDNodeFlags *getFlags() const; - - /// Clear any flags in this node that aren't also set in Flags. - void intersectFlagsWith(const SDNodeFlags *Flags); - - /// Return the number of values defined/returned by this operator. - unsigned getNumValues() const { return NumValues; } - - /// Return the type of a specified result. - EVT getValueType(unsigned ResNo) const { - assert(ResNo < NumValues && "Illegal result number!"); - return ValueList[ResNo]; - } - - /// Return the type of a specified result as a simple type. - MVT getSimpleValueType(unsigned ResNo) const { - return getValueType(ResNo).getSimpleVT(); - } - - /// Returns MVT::getSizeInBits(getValueType(ResNo)). - unsigned getValueSizeInBits(unsigned ResNo) const { - return getValueType(ResNo).getSizeInBits(); - } - - typedef const EVT* value_iterator; - value_iterator value_begin() const { return ValueList; } - value_iterator value_end() const { return ValueList+NumValues; } - - /// Return the opcode of this operation for printing. - std::string getOperationName(const SelectionDAG *G = nullptr) const; - static const char* getIndexedModeName(ISD::MemIndexedMode AM); - void print_types(raw_ostream &OS, const SelectionDAG *G) const; - void print_details(raw_ostream &OS, const SelectionDAG *G) const; - void print(raw_ostream &OS, const SelectionDAG *G = nullptr) const; - void printr(raw_ostream &OS, const SelectionDAG *G = nullptr) const; - - /// Print a SelectionDAG node and all children down to - /// the leaves. The given SelectionDAG allows target-specific nodes - /// to be printed in human-readable form. Unlike printr, this will - /// print the whole DAG, including children that appear multiple - /// times. - /// - void printrFull(raw_ostream &O, const SelectionDAG *G = nullptr) const; - - /// Print a SelectionDAG node and children up to - /// depth "depth." The given SelectionDAG allows target-specific - /// nodes to be printed in human-readable form. Unlike printr, this - /// will print children that appear multiple times wherever they are - /// used. - /// - void printrWithDepth(raw_ostream &O, const SelectionDAG *G = nullptr, - unsigned depth = 100) const; - - - /// Dump this node, for debugging. - void dump() const; - - /// Dump (recursively) this node and its use-def subgraph. - void dumpr() const; - - /// Dump this node, for debugging. - /// The given SelectionDAG allows target-specific nodes to be printed - /// in human-readable form. - void dump(const SelectionDAG *G) const; - - /// Dump (recursively) this node and its use-def subgraph. - /// The given SelectionDAG allows target-specific nodes to be printed - /// in human-readable form. - void dumpr(const SelectionDAG *G) const; - - /// printrFull to dbgs(). The given SelectionDAG allows - /// target-specific nodes to be printed in human-readable form. - /// Unlike dumpr, this will print the whole DAG, including children - /// that appear multiple times. - void dumprFull(const SelectionDAG *G = nullptr) const; - - /// printrWithDepth to dbgs(). The given - /// SelectionDAG allows target-specific nodes to be printed in - /// human-readable form. Unlike dumpr, this will print children - /// that appear multiple times wherever they are used. - /// - void dumprWithDepth(const SelectionDAG *G = nullptr, - unsigned depth = 100) const; - - /// Gather unique data for the node. - void Profile(FoldingSetNodeID &ID) const; - - /// This method should only be used by the SDUse class. - void addUse(SDUse &U) { U.addToList(&UseList); } - -protected: - static SDVTList getSDVTList(EVT VT) { - SDVTList Ret = { getValueTypeList(VT), 1 }; - return Ret; - } - - /// Create an SDNode. - /// - /// SDNodes are created without any operands, and never own the operand - /// storage. To add operands, see SelectionDAG::createOperands. - SDNode(unsigned Opc, unsigned Order, DebugLoc dl, SDVTList VTs) - : NodeType(Opc), HasDebugValue(false), SubclassData(0), NodeId(-1), - OperandList(nullptr), ValueList(VTs.VTs), UseList(nullptr), - NumOperands(0), NumValues(VTs.NumVTs), IROrder(Order), - debugLoc(std::move(dl)) { - assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor"); - assert(NumValues == VTs.NumVTs && - "NumValues wasn't wide enough for its operands!"); - } - - /// Release the operands and set this node to have zero operands. - void DropOperands(); -}; - -/// Wrapper class for IR location info (IR ordering and DebugLoc) to be passed -/// into SDNode creation functions. -/// When an SDNode is created from the DAGBuilder, the DebugLoc is extracted -/// from the original Instruction, and IROrder is the ordinal position of -/// the instruction. -/// When an SDNode is created after the DAG is being built, both DebugLoc and -/// the IROrder are propagated from the original SDNode. -/// So SDLoc class provides two constructors besides the default one, one to -/// be used by the DAGBuilder, the other to be used by others. -class SDLoc { -private: - DebugLoc DL; - int IROrder = 0; - -public: - SDLoc() = default; - SDLoc(const SDNode *N) : DL(N->getDebugLoc()), IROrder(N->getIROrder()) {} - SDLoc(const SDValue V) : SDLoc(V.getNode()) {} - SDLoc(const Instruction *I, int Order) : IROrder(Order) { - assert(Order >= 0 && "bad IROrder"); - if (I) - DL = I->getDebugLoc(); - } - unsigned getIROrder() const { return IROrder; } - const DebugLoc &getDebugLoc() const { return DL; } -}; - - -// Define inline functions from the SDValue class. - -inline SDValue::SDValue(SDNode *node, unsigned resno) - : Node(node), ResNo(resno) { - assert((!Node || ResNo < Node->getNumValues()) && - "Invalid result number for the given node!"); - assert(ResNo < -2U && "Cannot use result numbers reserved for DenseMaps."); -} - -inline unsigned SDValue::getOpcode() const { - return Node->getOpcode(); -} -inline EVT SDValue::getValueType() const { - return Node->getValueType(ResNo); -} -inline unsigned SDValue::getNumOperands() const { - return Node->getNumOperands(); -} -inline const SDValue &SDValue::getOperand(unsigned i) const { - return Node->getOperand(i); -} -inline uint64_t SDValue::getConstantOperandVal(unsigned i) const { - return Node->getConstantOperandVal(i); -} -inline bool SDValue::isTargetOpcode() const { - return Node->isTargetOpcode(); -} -inline bool SDValue::isTargetMemoryOpcode() const { - return Node->isTargetMemoryOpcode(); -} -inline bool SDValue::isMachineOpcode() const { - return Node->isMachineOpcode(); -} -inline unsigned SDValue::getMachineOpcode() const { - return Node->getMachineOpcode(); -} -inline bool SDValue::isUndef() const { - return Node->isUndef(); -} -inline bool SDValue::use_empty() const { - return !Node->hasAnyUseOfValue(ResNo); -} -inline bool SDValue::hasOneUse() const { - return Node->hasNUsesOfValue(1, ResNo); -} -inline const DebugLoc &SDValue::getDebugLoc() const { - return Node->getDebugLoc(); -} -inline void SDValue::dump() const { - return Node->dump(); -} -inline void SDValue::dumpr() const { - return Node->dumpr(); -} -// Define inline functions from the SDUse class. - -inline void SDUse::set(const SDValue &V) { - if (Val.getNode()) removeFromList(); - Val = V; - if (V.getNode()) V.getNode()->addUse(*this); -} - -inline void SDUse::setInitial(const SDValue &V) { - Val = V; - V.getNode()->addUse(*this); -} - -inline void SDUse::setNode(SDNode *N) { - if (Val.getNode()) removeFromList(); - Val.setNode(N); - if (N) N->addUse(*this); -} - -/// Returns true if the opcode is a binary operation with flags. -static bool isBinOpWithFlags(unsigned Opcode) { - switch (Opcode) { - case ISD::SDIV: - case ISD::UDIV: - case ISD::SRA: - case ISD::SRL: - case ISD::MUL: - case ISD::ADD: - case ISD::SUB: - case ISD::SHL: - case ISD::FADD: - case ISD::FDIV: - case ISD::FMUL: - case ISD::FREM: - case ISD::FSUB: - return true; - default: - return false; - } -} - -/// This class is an extension of BinarySDNode -/// used from those opcodes that have associated extra flags. -class BinaryWithFlagsSDNode : public SDNode { -public: - SDNodeFlags Flags; - BinaryWithFlagsSDNode(unsigned Opc, unsigned Order, const DebugLoc &dl, - SDVTList VTs, const SDNodeFlags &NodeFlags) - : SDNode(Opc, Order, dl, VTs), Flags(NodeFlags) {} - static bool classof(const SDNode *N) { - return isBinOpWithFlags(N->getOpcode()); - } -}; - -/// This class is used to form a handle around another node that -/// is persistent and is updated across invocations of replaceAllUsesWith on its -/// operand. This node should be directly created by end-users and not added to -/// the AllNodes list. -class HandleSDNode : public SDNode { - SDUse Op; -public: - explicit HandleSDNode(SDValue X) - : SDNode(ISD::HANDLENODE, 0, DebugLoc(), getSDVTList(MVT::Other)) { - // HandleSDNodes are never inserted into the DAG, so they won't be - // auto-numbered. Use ID 65535 as a sentinel. - PersistentId = 0xffff; - - // Manually set up the operand list. This node type is special in that it's - // always stack allocated and SelectionDAG does not manage its operands. - // TODO: This should either (a) not be in the SDNode hierarchy, or (b) not - // be so special. - Op.setUser(this); - Op.setInitial(X); - NumOperands = 1; - OperandList = &Op; - } - ~HandleSDNode(); - const SDValue &getValue() const { return Op; } -}; - -class AddrSpaceCastSDNode : public SDNode { -private: - unsigned SrcAddrSpace; - unsigned DestAddrSpace; - -public: - AddrSpaceCastSDNode(unsigned Order, const DebugLoc &dl, EVT VT, - unsigned SrcAS, unsigned DestAS); - - unsigned getSrcAddressSpace() const { return SrcAddrSpace; } - unsigned getDestAddressSpace() const { return DestAddrSpace; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::ADDRSPACECAST; - } -}; - -/// This is an abstract virtual class for memory operations. -class MemSDNode : public SDNode { -private: - // VT of in-memory value. - EVT MemoryVT; - -protected: - /// Memory reference information. - MachineMemOperand *MMO; - -public: - MemSDNode(unsigned Opc, unsigned Order, const DebugLoc &dl, SDVTList VTs, - EVT MemoryVT, MachineMemOperand *MMO); - - bool readMem() const { return MMO->isLoad(); } - bool writeMem() const { return MMO->isStore(); } - - /// Returns alignment and volatility of the memory access - unsigned getOriginalAlignment() const { - return MMO->getBaseAlignment(); - } - unsigned getAlignment() const { - return MMO->getAlignment(); - } - - /// Return the SubclassData value, which contains an - /// encoding of the volatile flag, as well as bits used by subclasses. This - /// function should only be used to compute a FoldingSetNodeID value. - unsigned getRawSubclassData() const { - return SubclassData; - } - - // We access subclass data here so that we can check consistency - // with MachineMemOperand information. - bool isVolatile() const { return (SubclassData >> 5) & 1; } - bool isNonTemporal() const { return (SubclassData >> 6) & 1; } - bool isInvariant() const { return (SubclassData >> 7) & 1; } - - AtomicOrdering getOrdering() const { - return AtomicOrdering((SubclassData >> 8) & 15); - } - SynchronizationScope getSynchScope() const { - return SynchronizationScope((SubclassData >> 12) & 1); - } - - // Returns the offset from the location of the access. - int64_t getSrcValueOffset() const { return MMO->getOffset(); } - - /// Returns the AA info that describes the dereference. - AAMDNodes getAAInfo() const { return MMO->getAAInfo(); } - - /// Returns the Ranges that describes the dereference. - const MDNode *getRanges() const { return MMO->getRanges(); } - - /// Return the type of the in-memory value. - EVT getMemoryVT() const { return MemoryVT; } - - /// Return a MachineMemOperand object describing the memory - /// reference performed by operation. - MachineMemOperand *getMemOperand() const { return MMO; } - - const MachinePointerInfo &getPointerInfo() const { - return MMO->getPointerInfo(); - } - - /// Return the address space for the associated pointer - unsigned getAddressSpace() const { - return getPointerInfo().getAddrSpace(); - } - - /// Update this MemSDNode's MachineMemOperand information - /// to reflect the alignment of NewMMO, if it has a greater alignment. - /// This must only be used when the new alignment applies to all users of - /// this MachineMemOperand. - void refineAlignment(const MachineMemOperand *NewMMO) { - MMO->refineAlignment(NewMMO); - } - - const SDValue &getChain() const { return getOperand(0); } - const SDValue &getBasePtr() const { - return getOperand(getOpcode() == ISD::STORE ? 2 : 1); - } - - // Methods to support isa and dyn_cast - static bool classof(const SDNode *N) { - // For some targets, we lower some target intrinsics to a MemIntrinsicNode - // with either an intrinsic or a target opcode. - return N->getOpcode() == ISD::LOAD || - N->getOpcode() == ISD::STORE || - N->getOpcode() == ISD::PREFETCH || - N->getOpcode() == ISD::ATOMIC_CMP_SWAP || - N->getOpcode() == ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS || - N->getOpcode() == ISD::ATOMIC_SWAP || - N->getOpcode() == ISD::ATOMIC_LOAD_ADD || - N->getOpcode() == ISD::ATOMIC_LOAD_SUB || - N->getOpcode() == ISD::ATOMIC_LOAD_AND || - N->getOpcode() == ISD::ATOMIC_LOAD_OR || - N->getOpcode() == ISD::ATOMIC_LOAD_XOR || - N->getOpcode() == ISD::ATOMIC_LOAD_NAND || - N->getOpcode() == ISD::ATOMIC_LOAD_MIN || - N->getOpcode() == ISD::ATOMIC_LOAD_MAX || - N->getOpcode() == ISD::ATOMIC_LOAD_UMIN || - N->getOpcode() == ISD::ATOMIC_LOAD_UMAX || - N->getOpcode() == ISD::ATOMIC_LOAD || - N->getOpcode() == ISD::ATOMIC_STORE || - N->getOpcode() == ISD::MLOAD || - N->getOpcode() == ISD::MSTORE || - N->getOpcode() == ISD::MGATHER || - N->getOpcode() == ISD::MSCATTER || - N->isMemIntrinsic() || - N->isTargetMemoryOpcode(); - } -}; - -/// This is an SDNode representing atomic operations. -class AtomicSDNode : public MemSDNode { - /// For cmpxchg instructions, the ordering requirements when a store does not - /// occur. - AtomicOrdering FailureOrdering; - - void InitAtomic(AtomicOrdering SuccessOrdering, - AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope) { - // This must match encodeMemSDNodeFlags() in SelectionDAG.cpp. - assert((AtomicOrdering)((unsigned)SuccessOrdering & 15) == - SuccessOrdering && - "Ordering may not require more than 4 bits!"); - assert((AtomicOrdering)((unsigned)FailureOrdering & 15) == - FailureOrdering && - "Ordering may not require more than 4 bits!"); - assert((SynchScope & 1) == SynchScope && - "SynchScope may not require more than 1 bit!"); - SubclassData |= (unsigned)SuccessOrdering << 8; - SubclassData |= SynchScope << 12; - this->FailureOrdering = FailureOrdering; - assert(getSuccessOrdering() == SuccessOrdering && - "Ordering encoding error!"); - assert(getFailureOrdering() == FailureOrdering && - "Ordering encoding error!"); - assert(getSynchScope() == SynchScope && "Synch-scope encoding error!"); - } - -public: - AtomicSDNode(unsigned Opc, unsigned Order, const DebugLoc &dl, SDVTList VTL, - EVT MemVT, MachineMemOperand *MMO, - AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope) - : MemSDNode(Opc, Order, dl, VTL, MemVT, MMO) { - InitAtomic(SuccessOrdering, FailureOrdering, SynchScope); - } - - const SDValue &getBasePtr() const { return getOperand(1); } - const SDValue &getVal() const { return getOperand(2); } - - AtomicOrdering getSuccessOrdering() const { - return getOrdering(); - } - - // Not quite enough room in SubclassData for everything, so failure gets its - // own field. - AtomicOrdering getFailureOrdering() const { - return FailureOrdering; - } - - bool isCompareAndSwap() const { - unsigned Op = getOpcode(); - return Op == ISD::ATOMIC_CMP_SWAP || Op == ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS; - } - - // Methods to support isa and dyn_cast - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::ATOMIC_CMP_SWAP || - N->getOpcode() == ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS || - N->getOpcode() == ISD::ATOMIC_SWAP || - N->getOpcode() == ISD::ATOMIC_LOAD_ADD || - N->getOpcode() == ISD::ATOMIC_LOAD_SUB || - N->getOpcode() == ISD::ATOMIC_LOAD_AND || - N->getOpcode() == ISD::ATOMIC_LOAD_OR || - N->getOpcode() == ISD::ATOMIC_LOAD_XOR || - N->getOpcode() == ISD::ATOMIC_LOAD_NAND || - N->getOpcode() == ISD::ATOMIC_LOAD_MIN || - N->getOpcode() == ISD::ATOMIC_LOAD_MAX || - N->getOpcode() == ISD::ATOMIC_LOAD_UMIN || - N->getOpcode() == ISD::ATOMIC_LOAD_UMAX || - N->getOpcode() == ISD::ATOMIC_LOAD || - N->getOpcode() == ISD::ATOMIC_STORE; - } -}; - -/// This SDNode is used for target intrinsics that touch -/// memory and need an associated MachineMemOperand. Its opcode may be -/// INTRINSIC_VOID, INTRINSIC_W_CHAIN, PREFETCH, or a target-specific opcode -/// with a value not less than FIRST_TARGET_MEMORY_OPCODE. -class MemIntrinsicSDNode : public MemSDNode { -public: - MemIntrinsicSDNode(unsigned Opc, unsigned Order, const DebugLoc &dl, - SDVTList VTs, EVT MemoryVT, MachineMemOperand *MMO) - : MemSDNode(Opc, Order, dl, VTs, MemoryVT, MMO) { - SubclassData |= 1u << 13; - } - - // Methods to support isa and dyn_cast - static bool classof(const SDNode *N) { - // We lower some target intrinsics to their target opcode - // early a node with a target opcode can be of this class - return N->isMemIntrinsic() || - N->getOpcode() == ISD::PREFETCH || - N->isTargetMemoryOpcode(); - } -}; - -/// This SDNode is used to implement the code generator -/// support for the llvm IR shufflevector instruction. It combines elements -/// from two input vectors into a new input vector, with the selection and -/// ordering of elements determined by an array of integers, referred to as -/// the shuffle mask. For input vectors of width N, mask indices of 0..N-1 -/// refer to elements from the LHS input, and indices from N to 2N-1 the RHS. -/// An index of -1 is treated as undef, such that the code generator may put -/// any value in the corresponding element of the result. -class ShuffleVectorSDNode : public SDNode { - // The memory for Mask is owned by the SelectionDAG's OperandAllocator, and - // is freed when the SelectionDAG object is destroyed. - const int *Mask; -protected: - friend class SelectionDAG; - ShuffleVectorSDNode(EVT VT, unsigned Order, const DebugLoc &dl, const int *M) - : SDNode(ISD::VECTOR_SHUFFLE, Order, dl, getSDVTList(VT)), Mask(M) {} - -public: - ArrayRef getMask() const { - EVT VT = getValueType(0); - return makeArrayRef(Mask, VT.getVectorNumElements()); - } - int getMaskElt(unsigned Idx) const { - assert(Idx < getValueType(0).getVectorNumElements() && "Idx out of range!"); - return Mask[Idx]; - } - - bool isSplat() const { return isSplatMask(Mask, getValueType(0)); } - int getSplatIndex() const { - assert(isSplat() && "Cannot get splat index for non-splat!"); - EVT VT = getValueType(0); - for (unsigned i = 0, e = VT.getVectorNumElements(); i != e; ++i) { - if (Mask[i] >= 0) - return Mask[i]; - } - llvm_unreachable("Splat with all undef indices?"); - } - static bool isSplatMask(const int *Mask, EVT VT); - - /// Change values in a shuffle permute mask assuming - /// the two vector operands have swapped position. - static void commuteMask(MutableArrayRef Mask) { - unsigned NumElems = Mask.size(); - for (unsigned i = 0; i != NumElems; ++i) { - int idx = Mask[i]; - if (idx < 0) - continue; - else if (idx < (int)NumElems) - Mask[i] = idx + NumElems; - else - Mask[i] = idx - NumElems; - } - } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::VECTOR_SHUFFLE; - } -}; - -class ConstantSDNode : public SDNode { - const ConstantInt *Value; - friend class SelectionDAG; - ConstantSDNode(bool isTarget, bool isOpaque, const ConstantInt *val, - const DebugLoc &DL, EVT VT) - : SDNode(isTarget ? ISD::TargetConstant : ISD::Constant, 0, DL, - getSDVTList(VT)), - Value(val) { - SubclassData |= (uint16_t)isOpaque; - } -public: - - const ConstantInt *getConstantIntValue() const { return Value; } - const APInt &getAPIntValue() const { return Value->getValue(); } - uint64_t getZExtValue() const { return Value->getZExtValue(); } - int64_t getSExtValue() const { return Value->getSExtValue(); } - - bool isOne() const { return Value->isOne(); } - bool isNullValue() const { return Value->isNullValue(); } - bool isAllOnesValue() const { return Value->isAllOnesValue(); } - - bool isOpaque() const { return SubclassData & 1; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::Constant || - N->getOpcode() == ISD::TargetConstant; - } -}; - -class ConstantFPSDNode : public SDNode { - const ConstantFP *Value; - friend class SelectionDAG; - ConstantFPSDNode(bool isTarget, const ConstantFP *val, const DebugLoc &DL, - EVT VT) - : SDNode(isTarget ? ISD::TargetConstantFP : ISD::ConstantFP, 0, DL, - getSDVTList(VT)), - Value(val) {} - -public: - - const APFloat& getValueAPF() const { return Value->getValueAPF(); } - const ConstantFP *getConstantFPValue() const { return Value; } - - /// Return true if the value is positive or negative zero. - bool isZero() const { return Value->isZero(); } - - /// Return true if the value is a NaN. - bool isNaN() const { return Value->isNaN(); } - - /// Return true if the value is an infinity - bool isInfinity() const { return Value->isInfinity(); } - - /// Return true if the value is negative. - bool isNegative() const { return Value->isNegative(); } - - /// We don't rely on operator== working on double values, as - /// it returns true for things that are clearly not equal, like -0.0 and 0.0. - /// As such, this method can be used to do an exact bit-for-bit comparison of - /// two floating point values. - - /// We leave the version with the double argument here because it's just so - /// convenient to write "2.0" and the like. Without this function we'd - /// have to duplicate its logic everywhere it's called. - bool isExactlyValue(double V) const { - bool ignored; - APFloat Tmp(V); - Tmp.convert(Value->getValueAPF().getSemantics(), - APFloat::rmNearestTiesToEven, &ignored); - return isExactlyValue(Tmp); - } - bool isExactlyValue(const APFloat& V) const; - - static bool isValueValidForType(EVT VT, const APFloat& Val); - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::ConstantFP || - N->getOpcode() == ISD::TargetConstantFP; - } -}; - -/// Returns true if \p V is a constant integer zero. -bool isNullConstant(SDValue V); -/// Returns true if \p V is an FP constant with a value of positive zero. -bool isNullFPConstant(SDValue V); -/// Returns true if \p V is an integer constant with all bits set. -bool isAllOnesConstant(SDValue V); -/// Returns true if \p V is a constant integer one. -bool isOneConstant(SDValue V); -/// Returns true if \p V is a bitwise not operation. Assumes that an all ones -/// constant is canonicalized to be operand 1. -bool isBitwiseNot(SDValue V); - -class GlobalAddressSDNode : public SDNode { - const GlobalValue *TheGlobal; - int64_t Offset; - unsigned char TargetFlags; - friend class SelectionDAG; - GlobalAddressSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL, - const GlobalValue *GA, EVT VT, int64_t o, - unsigned char TargetFlags); - -public: - - const GlobalValue *getGlobal() const { return TheGlobal; } - int64_t getOffset() const { return Offset; } - unsigned char getTargetFlags() const { return TargetFlags; } - // Return the address space this GlobalAddress belongs to. - unsigned getAddressSpace() const; - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::GlobalAddress || - N->getOpcode() == ISD::TargetGlobalAddress || - N->getOpcode() == ISD::GlobalTLSAddress || - N->getOpcode() == ISD::TargetGlobalTLSAddress; - } -}; - -class FrameIndexSDNode : public SDNode { - int FI; - friend class SelectionDAG; - FrameIndexSDNode(int fi, EVT VT, bool isTarg) - : SDNode(isTarg ? ISD::TargetFrameIndex : ISD::FrameIndex, - 0, DebugLoc(), getSDVTList(VT)), FI(fi) { - } -public: - - int getIndex() const { return FI; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::FrameIndex || - N->getOpcode() == ISD::TargetFrameIndex; - } -}; - -class JumpTableSDNode : public SDNode { - int JTI; - unsigned char TargetFlags; - friend class SelectionDAG; - JumpTableSDNode(int jti, EVT VT, bool isTarg, unsigned char TF) - : SDNode(isTarg ? ISD::TargetJumpTable : ISD::JumpTable, - 0, DebugLoc(), getSDVTList(VT)), JTI(jti), TargetFlags(TF) { - } -public: - - int getIndex() const { return JTI; } - unsigned char getTargetFlags() const { return TargetFlags; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::JumpTable || - N->getOpcode() == ISD::TargetJumpTable; - } -}; - -class ConstantPoolSDNode : public SDNode { - union { - const Constant *ConstVal; - MachineConstantPoolValue *MachineCPVal; - } Val; - int Offset; // It's a MachineConstantPoolValue if top bit is set. - unsigned Alignment; // Minimum alignment requirement of CP (not log2 value). - unsigned char TargetFlags; - friend class SelectionDAG; - ConstantPoolSDNode(bool isTarget, const Constant *c, EVT VT, int o, - unsigned Align, unsigned char TF) - : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0, - DebugLoc(), getSDVTList(VT)), Offset(o), Alignment(Align), - TargetFlags(TF) { - assert(Offset >= 0 && "Offset is too large"); - Val.ConstVal = c; - } - ConstantPoolSDNode(bool isTarget, MachineConstantPoolValue *v, - EVT VT, int o, unsigned Align, unsigned char TF) - : SDNode(isTarget ? ISD::TargetConstantPool : ISD::ConstantPool, 0, - DebugLoc(), getSDVTList(VT)), Offset(o), Alignment(Align), - TargetFlags(TF) { - assert(Offset >= 0 && "Offset is too large"); - Val.MachineCPVal = v; - Offset |= 1 << (sizeof(unsigned)*CHAR_BIT-1); - } -public: - - bool isMachineConstantPoolEntry() const { - return Offset < 0; - } - - const Constant *getConstVal() const { - assert(!isMachineConstantPoolEntry() && "Wrong constantpool type"); - return Val.ConstVal; - } - - MachineConstantPoolValue *getMachineCPVal() const { - assert(isMachineConstantPoolEntry() && "Wrong constantpool type"); - return Val.MachineCPVal; - } - - int getOffset() const { - return Offset & ~(1 << (sizeof(unsigned)*CHAR_BIT-1)); - } - - // Return the alignment of this constant pool object, which is either 0 (for - // default alignment) or the desired value. - unsigned getAlignment() const { return Alignment; } - unsigned char getTargetFlags() const { return TargetFlags; } - - Type *getType() const; - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::ConstantPool || - N->getOpcode() == ISD::TargetConstantPool; - } -}; - -/// Completely target-dependent object reference. -class TargetIndexSDNode : public SDNode { - unsigned char TargetFlags; - int Index; - int64_t Offset; - friend class SelectionDAG; -public: - - TargetIndexSDNode(int Idx, EVT VT, int64_t Ofs, unsigned char TF) - : SDNode(ISD::TargetIndex, 0, DebugLoc(), getSDVTList(VT)), - TargetFlags(TF), Index(Idx), Offset(Ofs) {} -public: - - unsigned char getTargetFlags() const { return TargetFlags; } - int getIndex() const { return Index; } - int64_t getOffset() const { return Offset; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::TargetIndex; - } -}; - -class BasicBlockSDNode : public SDNode { - MachineBasicBlock *MBB; - friend class SelectionDAG; - /// Debug info is meaningful and potentially useful here, but we create - /// blocks out of order when they're jumped to, which makes it a bit - /// harder. Let's see if we need it first. - explicit BasicBlockSDNode(MachineBasicBlock *mbb) - : SDNode(ISD::BasicBlock, 0, DebugLoc(), getSDVTList(MVT::Other)), MBB(mbb) - {} -public: - - MachineBasicBlock *getBasicBlock() const { return MBB; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::BasicBlock; - } -}; - -/// A "pseudo-class" with methods for operating on BUILD_VECTORs. -class BuildVectorSDNode : public SDNode { - // These are constructed as SDNodes and then cast to BuildVectorSDNodes. - explicit BuildVectorSDNode() = delete; -public: - /// Check if this is a constant splat, and if so, find the - /// smallest element size that splats the vector. If MinSplatBits is - /// nonzero, the element size must be at least that large. Note that the - /// splat element may be the entire vector (i.e., a one element vector). - /// Returns the splat element value in SplatValue. Any undefined bits in - /// that value are zero, and the corresponding bits in the SplatUndef mask - /// are set. The SplatBitSize value is set to the splat element size in - /// bits. HasAnyUndefs is set to true if any bits in the vector are - /// undefined. isBigEndian describes the endianness of the target. - bool isConstantSplat(APInt &SplatValue, APInt &SplatUndef, - unsigned &SplatBitSize, bool &HasAnyUndefs, - unsigned MinSplatBits = 0, - bool isBigEndian = false) const; - - /// \brief Returns the splatted value or a null value if this is not a splat. - /// - /// If passed a non-null UndefElements bitvector, it will resize it to match - /// the vector width and set the bits where elements are undef. - SDValue getSplatValue(BitVector *UndefElements = nullptr) const; - - /// \brief Returns the splatted constant or null if this is not a constant - /// splat. - /// - /// If passed a non-null UndefElements bitvector, it will resize it to match - /// the vector width and set the bits where elements are undef. - ConstantSDNode * - getConstantSplatNode(BitVector *UndefElements = nullptr) const; - - /// \brief Returns the splatted constant FP or null if this is not a constant - /// FP splat. - /// - /// If passed a non-null UndefElements bitvector, it will resize it to match - /// the vector width and set the bits where elements are undef. - ConstantFPSDNode * - getConstantFPSplatNode(BitVector *UndefElements = nullptr) const; - - /// \brief If this is a constant FP splat and the splatted constant FP is an - /// exact power or 2, return the log base 2 integer value. Otherwise, - /// return -1. - /// - /// The BitWidth specifies the necessary bit precision. - int32_t getConstantFPSplatPow2ToLog2Int(BitVector *UndefElements, - uint32_t BitWidth) const; - - bool isConstant() const; - - static inline bool classof(const SDNode *N) { - return N->getOpcode() == ISD::BUILD_VECTOR; - } -}; - -/// An SDNode that holds an arbitrary LLVM IR Value. This is -/// used when the SelectionDAG needs to make a simple reference to something -/// in the LLVM IR representation. -/// -class SrcValueSDNode : public SDNode { - const Value *V; - friend class SelectionDAG; - /// Create a SrcValue for a general value. - explicit SrcValueSDNode(const Value *v) - : SDNode(ISD::SRCVALUE, 0, DebugLoc(), getSDVTList(MVT::Other)), V(v) {} - -public: - /// Return the contained Value. - const Value *getValue() const { return V; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::SRCVALUE; - } -}; - -class MDNodeSDNode : public SDNode { - const MDNode *MD; - friend class SelectionDAG; - explicit MDNodeSDNode(const MDNode *md) - : SDNode(ISD::MDNODE_SDNODE, 0, DebugLoc(), getSDVTList(MVT::Other)), MD(md) - {} -public: - - const MDNode *getMD() const { return MD; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::MDNODE_SDNODE; - } -}; - -class RegisterSDNode : public SDNode { - unsigned Reg; - friend class SelectionDAG; - RegisterSDNode(unsigned reg, EVT VT) - : SDNode(ISD::Register, 0, DebugLoc(), getSDVTList(VT)), Reg(reg) { - } -public: - - unsigned getReg() const { return Reg; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::Register; - } -}; - -class RegisterMaskSDNode : public SDNode { - // The memory for RegMask is not owned by the node. - const uint32_t *RegMask; - friend class SelectionDAG; - RegisterMaskSDNode(const uint32_t *mask) - : SDNode(ISD::RegisterMask, 0, DebugLoc(), getSDVTList(MVT::Untyped)), - RegMask(mask) {} -public: - - const uint32_t *getRegMask() const { return RegMask; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::RegisterMask; - } -}; - -class BlockAddressSDNode : public SDNode { - const BlockAddress *BA; - int64_t Offset; - unsigned char TargetFlags; - friend class SelectionDAG; - BlockAddressSDNode(unsigned NodeTy, EVT VT, const BlockAddress *ba, - int64_t o, unsigned char Flags) - : SDNode(NodeTy, 0, DebugLoc(), getSDVTList(VT)), - BA(ba), Offset(o), TargetFlags(Flags) { - } -public: - const BlockAddress *getBlockAddress() const { return BA; } - int64_t getOffset() const { return Offset; } - unsigned char getTargetFlags() const { return TargetFlags; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::BlockAddress || - N->getOpcode() == ISD::TargetBlockAddress; - } -}; - -class EHLabelSDNode : public SDNode { - MCSymbol *Label; - friend class SelectionDAG; - EHLabelSDNode(unsigned Order, const DebugLoc &dl, MCSymbol *L) - : SDNode(ISD::EH_LABEL, Order, dl, getSDVTList(MVT::Other)), Label(L) {} - -public: - MCSymbol *getLabel() const { return Label; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::EH_LABEL; - } -}; - -class ExternalSymbolSDNode : public SDNode { - const char *Symbol; - unsigned char TargetFlags; - - friend class SelectionDAG; - ExternalSymbolSDNode(bool isTarget, const char *Sym, unsigned char TF, EVT VT) - : SDNode(isTarget ? ISD::TargetExternalSymbol : ISD::ExternalSymbol, - 0, DebugLoc(), getSDVTList(VT)), Symbol(Sym), TargetFlags(TF) { - } -public: - - const char *getSymbol() const { return Symbol; } - unsigned char getTargetFlags() const { return TargetFlags; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::ExternalSymbol || - N->getOpcode() == ISD::TargetExternalSymbol; - } -}; - -class MCSymbolSDNode : public SDNode { - MCSymbol *Symbol; - - friend class SelectionDAG; - MCSymbolSDNode(MCSymbol *Symbol, EVT VT) - : SDNode(ISD::MCSymbol, 0, DebugLoc(), getSDVTList(VT)), Symbol(Symbol) {} - -public: - MCSymbol *getMCSymbol() const { return Symbol; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::MCSymbol; - } -}; - -class CondCodeSDNode : public SDNode { - ISD::CondCode Condition; - friend class SelectionDAG; - explicit CondCodeSDNode(ISD::CondCode Cond) - : SDNode(ISD::CONDCODE, 0, DebugLoc(), getSDVTList(MVT::Other)), - Condition(Cond) { - } -public: - - ISD::CondCode get() const { return Condition; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::CONDCODE; - } -}; - -/// NOTE: avoid using this node as this may disappear in the -/// future and most targets don't support it. -class CvtRndSatSDNode : public SDNode { - ISD::CvtCode CvtCode; - friend class SelectionDAG; - explicit CvtRndSatSDNode(EVT VT, unsigned Order, const DebugLoc &dl, - ISD::CvtCode Code) - : SDNode(ISD::CONVERT_RNDSAT, Order, dl, getSDVTList(VT)), CvtCode(Code) { - } - -public: - ISD::CvtCode getCvtCode() const { return CvtCode; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::CONVERT_RNDSAT; - } -}; - -/// This class is used to represent EVT's, which are used -/// to parameterize some operations. -class VTSDNode : public SDNode { - EVT ValueType; - friend class SelectionDAG; - explicit VTSDNode(EVT VT) - : SDNode(ISD::VALUETYPE, 0, DebugLoc(), getSDVTList(MVT::Other)), - ValueType(VT) { - } -public: - - EVT getVT() const { return ValueType; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::VALUETYPE; - } -}; - -/// Base class for LoadSDNode and StoreSDNode -class LSBaseSDNode : public MemSDNode { -public: - LSBaseSDNode(ISD::NodeType NodeTy, unsigned Order, const DebugLoc &dl, - SDVTList VTs, ISD::MemIndexedMode AM, EVT MemVT, - MachineMemOperand *MMO) - : MemSDNode(NodeTy, Order, dl, VTs, MemVT, MMO) { - SubclassData |= AM << 2; - assert(getAddressingMode() == AM && "MemIndexedMode encoding error!"); - } - - const SDValue &getOffset() const { - return getOperand(getOpcode() == ISD::LOAD ? 2 : 3); - } - - /// Return the addressing mode for this load or store: - /// unindexed, pre-inc, pre-dec, post-inc, or post-dec. - ISD::MemIndexedMode getAddressingMode() const { - return ISD::MemIndexedMode((SubclassData >> 2) & 7); - } - - /// Return true if this is a pre/post inc/dec load/store. - bool isIndexed() const { return getAddressingMode() != ISD::UNINDEXED; } - - /// Return true if this is NOT a pre/post inc/dec load/store. - bool isUnindexed() const { return getAddressingMode() == ISD::UNINDEXED; } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::LOAD || - N->getOpcode() == ISD::STORE; - } -}; - -/// This class is used to represent ISD::LOAD nodes. -class LoadSDNode : public LSBaseSDNode { - friend class SelectionDAG; - LoadSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, - ISD::MemIndexedMode AM, ISD::LoadExtType ETy, EVT MemVT, - MachineMemOperand *MMO) - : LSBaseSDNode(ISD::LOAD, Order, dl, VTs, AM, MemVT, MMO) { - SubclassData |= (unsigned short)ETy; - assert(getExtensionType() == ETy && "LoadExtType encoding error!"); - assert(readMem() && "Load MachineMemOperand is not a load!"); - assert(!writeMem() && "Load MachineMemOperand is a store!"); - } -public: - - /// Return whether this is a plain node, - /// or one of the varieties of value-extending loads. - ISD::LoadExtType getExtensionType() const { - return ISD::LoadExtType(SubclassData & 3); - } - - const SDValue &getBasePtr() const { return getOperand(1); } - const SDValue &getOffset() const { return getOperand(2); } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::LOAD; - } -}; - -/// This class is used to represent ISD::STORE nodes. -class StoreSDNode : public LSBaseSDNode { - friend class SelectionDAG; - StoreSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, - ISD::MemIndexedMode AM, bool isTrunc, EVT MemVT, - MachineMemOperand *MMO) - : LSBaseSDNode(ISD::STORE, Order, dl, VTs, AM, MemVT, MMO) { - SubclassData |= (unsigned short)isTrunc; - assert(isTruncatingStore() == isTrunc && "isTrunc encoding error!"); - assert(!readMem() && "Store MachineMemOperand is a load!"); - assert(writeMem() && "Store MachineMemOperand is not a store!"); - } -public: - - /// Return true if the op does a truncation before store. - /// For integers this is the same as doing a TRUNCATE and storing the result. - /// For floats, it is the same as doing an FP_ROUND and storing the result. - bool isTruncatingStore() const { return SubclassData & 1; } - - const SDValue &getValue() const { return getOperand(1); } - const SDValue &getBasePtr() const { return getOperand(2); } - const SDValue &getOffset() const { return getOperand(3); } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::STORE; - } -}; - -/// This base class is used to represent MLOAD and MSTORE nodes -class MaskedLoadStoreSDNode : public MemSDNode { -public: - friend class SelectionDAG; - MaskedLoadStoreSDNode(ISD::NodeType NodeTy, unsigned Order, - const DebugLoc &dl, SDVTList VTs, EVT MemVT, - MachineMemOperand *MMO) - : MemSDNode(NodeTy, Order, dl, VTs, MemVT, MMO) {} - - // In the both nodes address is Op1, mask is Op2: - // MaskedLoadSDNode (Chain, ptr, mask, src0), src0 is a passthru value - // MaskedStoreSDNode (Chain, ptr, mask, data) - // Mask is a vector of i1 elements - const SDValue &getBasePtr() const { return getOperand(1); } - const SDValue &getMask() const { return getOperand(2); } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::MLOAD || - N->getOpcode() == ISD::MSTORE; - } -}; - -/// This class is used to represent an MLOAD node -class MaskedLoadSDNode : public MaskedLoadStoreSDNode { -public: - friend class SelectionDAG; - MaskedLoadSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, - ISD::LoadExtType ETy, EVT MemVT, MachineMemOperand *MMO) - : MaskedLoadStoreSDNode(ISD::MLOAD, Order, dl, VTs, MemVT, MMO) { - SubclassData |= (unsigned short)ETy; - } - - ISD::LoadExtType getExtensionType() const { - return ISD::LoadExtType(SubclassData & 3); - } - const SDValue &getSrc0() const { return getOperand(3); } - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::MLOAD; - } -}; - -/// This class is used to represent an MSTORE node -class MaskedStoreSDNode : public MaskedLoadStoreSDNode { - -public: - friend class SelectionDAG; - MaskedStoreSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, - bool isTrunc, EVT MemVT, MachineMemOperand *MMO) - : MaskedLoadStoreSDNode(ISD::MSTORE, Order, dl, VTs, MemVT, MMO) { - SubclassData |= (unsigned short)isTrunc; - } - /// Return true if the op does a truncation before store. - /// For integers this is the same as doing a TRUNCATE and storing the result. - /// For floats, it is the same as doing an FP_ROUND and storing the result. - bool isTruncatingStore() const { return SubclassData & 1; } - - const SDValue &getValue() const { return getOperand(3); } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::MSTORE; - } -}; - -/// This is a base class used to represent -/// MGATHER and MSCATTER nodes -/// -class MaskedGatherScatterSDNode : public MemSDNode { -public: - friend class SelectionDAG; - MaskedGatherScatterSDNode(ISD::NodeType NodeTy, unsigned Order, - const DebugLoc &dl, SDVTList VTs, EVT MemVT, - MachineMemOperand *MMO) - : MemSDNode(NodeTy, Order, dl, VTs, MemVT, MMO) {} - - // In the both nodes address is Op1, mask is Op2: - // MaskedGatherSDNode (Chain, src0, mask, base, index), src0 is a passthru value - // MaskedScatterSDNode (Chain, value, mask, base, index) - // Mask is a vector of i1 elements - const SDValue &getBasePtr() const { return getOperand(3); } - const SDValue &getIndex() const { return getOperand(4); } - const SDValue &getMask() const { return getOperand(2); } - const SDValue &getValue() const { return getOperand(1); } - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::MGATHER || - N->getOpcode() == ISD::MSCATTER; - } -}; - -/// This class is used to represent an MGATHER node -/// -class MaskedGatherSDNode : public MaskedGatherScatterSDNode { -public: - friend class SelectionDAG; - MaskedGatherSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, - EVT MemVT, MachineMemOperand *MMO) - : MaskedGatherScatterSDNode(ISD::MGATHER, Order, dl, VTs, MemVT, MMO) {} - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::MGATHER; - } -}; - -/// This class is used to represent an MSCATTER node -/// -class MaskedScatterSDNode : public MaskedGatherScatterSDNode { - -public: - friend class SelectionDAG; - MaskedScatterSDNode(unsigned Order, const DebugLoc &dl, SDVTList VTs, - EVT MemVT, MachineMemOperand *MMO) - : MaskedGatherScatterSDNode(ISD::MSCATTER, Order, dl, VTs, MemVT, MMO) {} - - static bool classof(const SDNode *N) { - return N->getOpcode() == ISD::MSCATTER; - } -}; - -/// An SDNode that represents everything that will be needed -/// to construct a MachineInstr. These nodes are created during the -/// instruction selection proper phase. -class MachineSDNode : public SDNode { -public: - typedef MachineMemOperand **mmo_iterator; - -private: - friend class SelectionDAG; - MachineSDNode(unsigned Opc, unsigned Order, const DebugLoc &DL, SDVTList VTs) - : SDNode(Opc, Order, DL, VTs), MemRefs(nullptr), MemRefsEnd(nullptr) {} - - /// Memory reference descriptions for this instruction. - mmo_iterator MemRefs; - mmo_iterator MemRefsEnd; - -public: - mmo_iterator memoperands_begin() const { return MemRefs; } - mmo_iterator memoperands_end() const { return MemRefsEnd; } - bool memoperands_empty() const { return MemRefsEnd == MemRefs; } - - /// Assign this MachineSDNodes's memory reference descriptor - /// list. This does not transfer ownership. - void setMemRefs(mmo_iterator NewMemRefs, mmo_iterator NewMemRefsEnd) { - for (mmo_iterator MMI = NewMemRefs, MME = NewMemRefsEnd; MMI != MME; ++MMI) - assert(*MMI && "Null mem ref detected!"); - MemRefs = NewMemRefs; - MemRefsEnd = NewMemRefsEnd; - } - - static bool classof(const SDNode *N) { - return N->isMachineOpcode(); - } -}; - -class SDNodeIterator : public std::iterator { - const SDNode *Node; - unsigned Operand; - - SDNodeIterator(const SDNode *N, unsigned Op) : Node(N), Operand(Op) {} -public: - bool operator==(const SDNodeIterator& x) const { - return Operand == x.Operand; - } - bool operator!=(const SDNodeIterator& x) const { return !operator==(x); } - - pointer operator*() const { - return Node->getOperand(Operand).getNode(); - } - pointer operator->() const { return operator*(); } - - SDNodeIterator& operator++() { // Preincrement - ++Operand; - return *this; - } - SDNodeIterator operator++(int) { // Postincrement - SDNodeIterator tmp = *this; ++*this; return tmp; - } - size_t operator-(SDNodeIterator Other) const { - assert(Node == Other.Node && - "Cannot compare iterators of two different nodes!"); - return Operand - Other.Operand; - } - - static SDNodeIterator begin(const SDNode *N) { return SDNodeIterator(N, 0); } - static SDNodeIterator end (const SDNode *N) { - return SDNodeIterator(N, N->getNumOperands()); - } - - unsigned getOperand() const { return Operand; } - const SDNode *getNode() const { return Node; } -}; - -template <> struct GraphTraits { - typedef SDNode NodeType; - typedef SDNodeIterator ChildIteratorType; - static inline NodeType *getEntryNode(SDNode *N) { return N; } - static inline ChildIteratorType child_begin(NodeType *N) { - return SDNodeIterator::begin(N); - } - static inline ChildIteratorType child_end(NodeType *N) { - return SDNodeIterator::end(N); - } -}; - -/// A representation of the largest SDNode, for use in sizeof(). -/// -/// This needs to be a union because the largest node differs on 32 bit systems -/// with 4 and 8 byte pointer alignment, respectively. -typedef AlignedCharArrayUnion - LargestSDNode; - -/// The SDNode class with the greatest alignment requirement. -typedef GlobalAddressSDNode MostAlignedSDNode; - -namespace ISD { - /// Returns true if the specified node is a non-extending and unindexed load. - inline bool isNormalLoad(const SDNode *N) { - const LoadSDNode *Ld = dyn_cast(N); - return Ld && Ld->getExtensionType() == ISD::NON_EXTLOAD && - Ld->getAddressingMode() == ISD::UNINDEXED; - } - - /// Returns true if the specified node is a non-extending load. - inline bool isNON_EXTLoad(const SDNode *N) { - return isa(N) && - cast(N)->getExtensionType() == ISD::NON_EXTLOAD; - } - - /// Returns true if the specified node is a EXTLOAD. - inline bool isEXTLoad(const SDNode *N) { - return isa(N) && - cast(N)->getExtensionType() == ISD::EXTLOAD; - } - - /// Returns true if the specified node is a SEXTLOAD. - inline bool isSEXTLoad(const SDNode *N) { - return isa(N) && - cast(N)->getExtensionType() == ISD::SEXTLOAD; - } - - /// Returns true if the specified node is a ZEXTLOAD. - inline bool isZEXTLoad(const SDNode *N) { - return isa(N) && - cast(N)->getExtensionType() == ISD::ZEXTLOAD; - } - - /// Returns true if the specified node is an unindexed load. - inline bool isUNINDEXEDLoad(const SDNode *N) { - return isa(N) && - cast(N)->getAddressingMode() == ISD::UNINDEXED; - } - - /// Returns true if the specified node is a non-truncating - /// and unindexed store. - inline bool isNormalStore(const SDNode *N) { - const StoreSDNode *St = dyn_cast(N); - return St && !St->isTruncatingStore() && - St->getAddressingMode() == ISD::UNINDEXED; - } - - /// Returns true if the specified node is a non-truncating store. - inline bool isNON_TRUNCStore(const SDNode *N) { - return isa(N) && !cast(N)->isTruncatingStore(); - } - - /// Returns true if the specified node is a truncating store. - inline bool isTRUNCStore(const SDNode *N) { - return isa(N) && cast(N)->isTruncatingStore(); - } - - /// Returns true if the specified node is an unindexed store. - inline bool isUNINDEXEDStore(const SDNode *N) { - return isa(N) && - cast(N)->getAddressingMode() == ISD::UNINDEXED; - } -} - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h b/llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h deleted file mode 100644 index ac5092af..00000000 --- a/llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h +++ /dev/null @@ -1,156 +0,0 @@ -//==-- llvm/CodeGen/SelectionDAGTargetInfo.h - SelectionDAG Info -*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the SelectionDAGTargetInfo class, which targets can -// subclass to parameterize the SelectionDAG lowering and instruction -// selection process. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SELECTIONDAGTARGETINFO_H -#define LLVM_CODEGEN_SELECTIONDAGTARGETINFO_H - -#include "llvm/CodeGen/SelectionDAGNodes.h" -#include "llvm/Support/CodeGen.h" - -namespace llvm { - -//===----------------------------------------------------------------------===// -/// Targets can subclass this to parameterize the -/// SelectionDAG lowering and instruction selection process. -/// -class SelectionDAGTargetInfo { - SelectionDAGTargetInfo(const SelectionDAGTargetInfo &) = delete; - void operator=(const SelectionDAGTargetInfo &) = delete; - -public: - explicit SelectionDAGTargetInfo() = default; - virtual ~SelectionDAGTargetInfo(); - - /// Emit target-specific code that performs a memcpy. - /// This can be used by targets to provide code sequences for cases - /// that don't fit the target's parameters for simple loads/stores and can be - /// more efficient than using a library call. This function can return a null - /// SDValue if the target declines to use custom code and a different - /// lowering strategy should be used. - /// - /// If AlwaysInline is true, the size is constant and the target should not - /// emit any calls and is strongly encouraged to attempt to emit inline code - /// even if it is beyond the usual threshold because this intrinsic is being - /// expanded in a place where calls are not feasible (e.g. within the prologue - /// for another call). If the target chooses to decline an AlwaysInline - /// request here, legalize will resort to using simple loads and stores. - virtual SDValue EmitTargetCodeForMemcpy(SelectionDAG &DAG, const SDLoc &dl, - SDValue Chain, SDValue Op1, - SDValue Op2, SDValue Op3, - unsigned Align, bool isVolatile, - bool AlwaysInline, - MachinePointerInfo DstPtrInfo, - MachinePointerInfo SrcPtrInfo) const { - return SDValue(); - } - - /// Emit target-specific code that performs a memmove. - /// This can be used by targets to provide code sequences for cases - /// that don't fit the target's parameters for simple loads/stores and can be - /// more efficient than using a library call. This function can return a null - /// SDValue if the target declines to use custom code and a different - /// lowering strategy should be used. - virtual SDValue EmitTargetCodeForMemmove( - SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, SDValue Op1, - SDValue Op2, SDValue Op3, unsigned Align, bool isVolatile, - MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) const { - return SDValue(); - } - - /// Emit target-specific code that performs a memset. - /// This can be used by targets to provide code sequences for cases - /// that don't fit the target's parameters for simple stores and can be more - /// efficient than using a library call. This function can return a null - /// SDValue if the target declines to use custom code and a different - /// lowering strategy should be used. - virtual SDValue EmitTargetCodeForMemset(SelectionDAG &DAG, const SDLoc &dl, - SDValue Chain, SDValue Op1, - SDValue Op2, SDValue Op3, - unsigned Align, bool isVolatile, - MachinePointerInfo DstPtrInfo) const { - return SDValue(); - } - - /// Emit target-specific code that performs a memcmp, in cases where that is - /// faster than a libcall. The first returned SDValue is the result of the - /// memcmp and the second is the chain. Both SDValues can be null if a normal - /// libcall should be used. - virtual std::pair - EmitTargetCodeForMemcmp(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, - SDValue Op1, SDValue Op2, SDValue Op3, - MachinePointerInfo Op1PtrInfo, - MachinePointerInfo Op2PtrInfo) const { - return std::make_pair(SDValue(), SDValue()); - } - - /// Emit target-specific code that performs a memchr, in cases where that is - /// faster than a libcall. The first returned SDValue is the result of the - /// memchr and the second is the chain. Both SDValues can be null if a normal - /// libcall should be used. - virtual std::pair - EmitTargetCodeForMemchr(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, - SDValue Src, SDValue Char, SDValue Length, - MachinePointerInfo SrcPtrInfo) const { - return std::make_pair(SDValue(), SDValue()); - } - - /// Emit target-specific code that performs a strcpy or stpcpy, in cases - /// where that is faster than a libcall. - /// The first returned SDValue is the result of the copy (the start - /// of the destination string for strcpy, a pointer to the null terminator - /// for stpcpy) and the second is the chain. Both SDValues can be null - /// if a normal libcall should be used. - virtual std::pair - EmitTargetCodeForStrcpy(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, - SDValue Dest, SDValue Src, - MachinePointerInfo DestPtrInfo, - MachinePointerInfo SrcPtrInfo, bool isStpcpy) const { - return std::make_pair(SDValue(), SDValue()); - } - - /// Emit target-specific code that performs a strcmp, in cases where that is - /// faster than a libcall. - /// The first returned SDValue is the result of the strcmp and the second is - /// the chain. Both SDValues can be null if a normal libcall should be used. - virtual std::pair - EmitTargetCodeForStrcmp(SelectionDAG &DAG, const SDLoc &dl, SDValue Chain, - SDValue Op1, SDValue Op2, - MachinePointerInfo Op1PtrInfo, - MachinePointerInfo Op2PtrInfo) const { - return std::make_pair(SDValue(), SDValue()); - } - - virtual std::pair - EmitTargetCodeForStrlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, - SDValue Src, MachinePointerInfo SrcPtrInfo) const { - return std::make_pair(SDValue(), SDValue()); - } - - virtual std::pair - EmitTargetCodeForStrnlen(SelectionDAG &DAG, const SDLoc &DL, SDValue Chain, - SDValue Src, SDValue MaxLength, - MachinePointerInfo SrcPtrInfo) const { - return std::make_pair(SDValue(), SDValue()); - } - // Return true when the decision to generate FMA's (or FMS, FMLA etc) rather - // than FMUL and ADD is delegated to the machine combiner. - virtual bool generateFMAsInMachineCombiner(CodeGenOpt::Level OptLevel) const { - return false; - } -}; - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h deleted file mode 100644 index afb0288b..00000000 --- a/llvm/include/llvm/CodeGen/SlotIndexes.h +++ /dev/null @@ -1,719 +0,0 @@ -//===- llvm/CodeGen/SlotIndexes.h - Slot indexes representation -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements SlotIndex and related classes. The purpose of SlotIndex -// is to describe a position at which a register can become live, or cease to -// be live. -// -// SlotIndex is mostly a proxy for entries of the SlotIndexList, a class which -// is held is LiveIntervals and provides the real numbering. This allows -// LiveIntervals to perform largely transparent renumbering. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_SLOTINDEXES_H -#define LLVM_CODEGEN_SLOTINDEXES_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/IntervalMap.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/ilist.h" -#include "llvm/CodeGen/MachineFunction.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/CodeGen/MachineInstrBundle.h" -#include "llvm/Support/Allocator.h" - -namespace llvm { - - /// This class represents an entry in the slot index list held in the - /// SlotIndexes pass. It should not be used directly. See the - /// SlotIndex & SlotIndexes classes for the public interface to this - /// information. - class IndexListEntry : public ilist_node { - MachineInstr *mi; - unsigned index; - - public: - - IndexListEntry(MachineInstr *mi, unsigned index) : mi(mi), index(index) {} - - MachineInstr* getInstr() const { return mi; } - void setInstr(MachineInstr *mi) { - this->mi = mi; - } - - unsigned getIndex() const { return index; } - void setIndex(unsigned index) { - this->index = index; - } - -#ifdef EXPENSIVE_CHECKS - // When EXPENSIVE_CHECKS is defined, "erased" index list entries will - // actually be moved to a "graveyard" list, and have their pointers - // poisoned, so that dangling SlotIndex access can be reliably detected. - void setPoison() { - intptr_t tmp = reinterpret_cast(mi); - assert(((tmp & 0x1) == 0x0) && "Pointer already poisoned?"); - tmp |= 0x1; - mi = reinterpret_cast(tmp); - } - - bool isPoisoned() const { return (reinterpret_cast(mi) & 0x1) == 0x1; } -#endif // EXPENSIVE_CHECKS - }; - - template <> - struct ilist_traits : public ilist_default_traits { - private: - mutable ilist_half_node Sentinel; - public: - IndexListEntry *createSentinel() const { - return static_cast(&Sentinel); - } - void destroySentinel(IndexListEntry *) const {} - - IndexListEntry *provideInitialHead() const { return createSentinel(); } - IndexListEntry *ensureHead(IndexListEntry*) const { return createSentinel(); } - static void noteHead(IndexListEntry*, IndexListEntry*) {} - void deleteNode(IndexListEntry *N) {} - - private: - void createNode(const IndexListEntry &); - }; - - /// SlotIndex - An opaque wrapper around machine indexes. - class SlotIndex { - friend class SlotIndexes; - - enum Slot { - /// Basic block boundary. Used for live ranges entering and leaving a - /// block without being live in the layout neighbor. Also used as the - /// def slot of PHI-defs. - Slot_Block, - - /// Early-clobber register use/def slot. A live range defined at - /// Slot_EarlyClobber interferes with normal live ranges killed at - /// Slot_Register. Also used as the kill slot for live ranges tied to an - /// early-clobber def. - Slot_EarlyClobber, - - /// Normal register use/def slot. Normal instructions kill and define - /// register live ranges at this slot. - Slot_Register, - - /// Dead def kill point. Kill slot for a live range that is defined by - /// the same instruction (Slot_Register or Slot_EarlyClobber), but isn't - /// used anywhere. - Slot_Dead, - - Slot_Count - }; - - PointerIntPair lie; - - SlotIndex(IndexListEntry *entry, unsigned slot) - : lie(entry, slot) {} - - IndexListEntry* listEntry() const { - assert(isValid() && "Attempt to compare reserved index."); -#ifdef EXPENSIVE_CHECKS - assert(!lie.getPointer()->isPoisoned() && - "Attempt to access deleted list-entry."); -#endif // EXPENSIVE_CHECKS - return lie.getPointer(); - } - - unsigned getIndex() const { - return listEntry()->getIndex() | getSlot(); - } - - /// Returns the slot for this SlotIndex. - Slot getSlot() const { - return static_cast(lie.getInt()); - } - - public: - enum { - /// The default distance between instructions as returned by distance(). - /// This may vary as instructions are inserted and removed. - InstrDist = 4 * Slot_Count - }; - - /// Construct an invalid index. - SlotIndex() : lie(nullptr, 0) {} - - // Construct a new slot index from the given one, and set the slot. - SlotIndex(const SlotIndex &li, Slot s) : lie(li.listEntry(), unsigned(s)) { - assert(lie.getPointer() != nullptr && - "Attempt to construct index with 0 pointer."); - } - - /// Returns true if this is a valid index. Invalid indices do - /// not point into an index table, and cannot be compared. - bool isValid() const { - return lie.getPointer(); - } - - /// Return true for a valid index. - explicit operator bool() const { return isValid(); } - - /// Print this index to the given raw_ostream. - void print(raw_ostream &os) const; - - /// Dump this index to stderr. - void dump() const; - - /// Compare two SlotIndex objects for equality. - bool operator==(SlotIndex other) const { - return lie == other.lie; - } - /// Compare two SlotIndex objects for inequality. - bool operator!=(SlotIndex other) const { - return lie != other.lie; - } - - /// Compare two SlotIndex objects. Return true if the first index - /// is strictly lower than the second. - bool operator<(SlotIndex other) const { - return getIndex() < other.getIndex(); - } - /// Compare two SlotIndex objects. Return true if the first index - /// is lower than, or equal to, the second. - bool operator<=(SlotIndex other) const { - return getIndex() <= other.getIndex(); - } - - /// Compare two SlotIndex objects. Return true if the first index - /// is greater than the second. - bool operator>(SlotIndex other) const { - return getIndex() > other.getIndex(); - } - - /// Compare two SlotIndex objects. Return true if the first index - /// is greater than, or equal to, the second. - bool operator>=(SlotIndex other) const { - return getIndex() >= other.getIndex(); - } - - /// isSameInstr - Return true if A and B refer to the same instruction. - static bool isSameInstr(SlotIndex A, SlotIndex B) { - return A.lie.getPointer() == B.lie.getPointer(); - } - - /// isEarlierInstr - Return true if A refers to an instruction earlier than - /// B. This is equivalent to A < B && !isSameInstr(A, B). - static bool isEarlierInstr(SlotIndex A, SlotIndex B) { - return A.listEntry()->getIndex() < B.listEntry()->getIndex(); - } - - /// Return true if A refers to the same instruction as B or an earlier one. - /// This is equivalent to !isEarlierInstr(B, A). - static bool isEarlierEqualInstr(SlotIndex A, SlotIndex B) { - return !isEarlierInstr(B, A); - } - - /// Return the distance from this index to the given one. - int distance(SlotIndex other) const { - return other.getIndex() - getIndex(); - } - - /// Return the scaled distance from this index to the given one, where all - /// slots on the same instruction have zero distance. - int getInstrDistance(SlotIndex other) const { - return (other.listEntry()->getIndex() - listEntry()->getIndex()) - / Slot_Count; - } - - /// isBlock - Returns true if this is a block boundary slot. - bool isBlock() const { return getSlot() == Slot_Block; } - - /// isEarlyClobber - Returns true if this is an early-clobber slot. - bool isEarlyClobber() const { return getSlot() == Slot_EarlyClobber; } - - /// isRegister - Returns true if this is a normal register use/def slot. - /// Note that early-clobber slots may also be used for uses and defs. - bool isRegister() const { return getSlot() == Slot_Register; } - - /// isDead - Returns true if this is a dead def kill slot. - bool isDead() const { return getSlot() == Slot_Dead; } - - /// Returns the base index for associated with this index. The base index - /// is the one associated with the Slot_Block slot for the instruction - /// pointed to by this index. - SlotIndex getBaseIndex() const { - return SlotIndex(listEntry(), Slot_Block); - } - - /// Returns the boundary index for associated with this index. The boundary - /// index is the one associated with the Slot_Block slot for the instruction - /// pointed to by this index. - SlotIndex getBoundaryIndex() const { - return SlotIndex(listEntry(), Slot_Dead); - } - - /// Returns the register use/def slot in the current instruction for a - /// normal or early-clobber def. - SlotIndex getRegSlot(bool EC = false) const { - return SlotIndex(listEntry(), EC ? Slot_EarlyClobber : Slot_Register); - } - - /// Returns the dead def kill slot for the current instruction. - SlotIndex getDeadSlot() const { - return SlotIndex(listEntry(), Slot_Dead); - } - - /// Returns the next slot in the index list. This could be either the - /// next slot for the instruction pointed to by this index or, if this - /// index is a STORE, the first slot for the next instruction. - /// WARNING: This method is considerably more expensive than the methods - /// that return specific slots (getUseIndex(), etc). If you can - please - /// use one of those methods. - SlotIndex getNextSlot() const { - Slot s = getSlot(); - if (s == Slot_Dead) { - return SlotIndex(&*++listEntry()->getIterator(), Slot_Block); - } - return SlotIndex(listEntry(), s + 1); - } - - /// Returns the next index. This is the index corresponding to the this - /// index's slot, but for the next instruction. - SlotIndex getNextIndex() const { - return SlotIndex(&*++listEntry()->getIterator(), getSlot()); - } - - /// Returns the previous slot in the index list. This could be either the - /// previous slot for the instruction pointed to by this index or, if this - /// index is a Slot_Block, the last slot for the previous instruction. - /// WARNING: This method is considerably more expensive than the methods - /// that return specific slots (getUseIndex(), etc). If you can - please - /// use one of those methods. - SlotIndex getPrevSlot() const { - Slot s = getSlot(); - if (s == Slot_Block) { - return SlotIndex(&*--listEntry()->getIterator(), Slot_Dead); - } - return SlotIndex(listEntry(), s - 1); - } - - /// Returns the previous index. This is the index corresponding to this - /// index's slot, but for the previous instruction. - SlotIndex getPrevIndex() const { - return SlotIndex(&*--listEntry()->getIterator(), getSlot()); - } - }; - - template <> struct isPodLike { static const bool value = true; }; - - inline raw_ostream& operator<<(raw_ostream &os, SlotIndex li) { - li.print(os); - return os; - } - - typedef std::pair IdxMBBPair; - - inline bool operator<(SlotIndex V, const IdxMBBPair &IM) { - return V < IM.first; - } - - inline bool operator<(const IdxMBBPair &IM, SlotIndex V) { - return IM.first < V; - } - - struct Idx2MBBCompare { - bool operator()(const IdxMBBPair &LHS, const IdxMBBPair &RHS) const { - return LHS.first < RHS.first; - } - }; - - /// SlotIndexes pass. - /// - /// This pass assigns indexes to each instruction. - class SlotIndexes : public MachineFunctionPass { - private: - // IndexListEntry allocator. - BumpPtrAllocator ileAllocator; - - typedef ilist IndexList; - IndexList indexList; - -#ifdef EXPENSIVE_CHECKS - IndexList graveyardList; -#endif // EXPENSIVE_CHECKS - - MachineFunction *mf; - - typedef DenseMap Mi2IndexMap; - Mi2IndexMap mi2iMap; - - /// MBBRanges - Map MBB number to (start, stop) indexes. - SmallVector, 8> MBBRanges; - - /// Idx2MBBMap - Sorted list of pairs of index of first instruction - /// and MBB id. - SmallVector idx2MBBMap; - - IndexListEntry* createEntry(MachineInstr *mi, unsigned index) { - IndexListEntry *entry = - static_cast( - ileAllocator.Allocate(sizeof(IndexListEntry), - alignOf())); - - new (entry) IndexListEntry(mi, index); - - return entry; - } - - /// Renumber locally after inserting curItr. - void renumberIndexes(IndexList::iterator curItr); - - public: - static char ID; - - SlotIndexes() : MachineFunctionPass(ID) { - initializeSlotIndexesPass(*PassRegistry::getPassRegistry()); - } - - ~SlotIndexes() override { - // The indexList's nodes are all allocated in the BumpPtrAllocator. - indexList.clearAndLeakNodesUnsafely(); - } - - void getAnalysisUsage(AnalysisUsage &au) const override; - void releaseMemory() override; - - bool runOnMachineFunction(MachineFunction &fn) override; - - /// Dump the indexes. - void dump() const; - - /// Renumber the index list, providing space for new instructions. - void renumberIndexes(); - - /// Repair indexes after adding and removing instructions. - void repairIndexesInRange(MachineBasicBlock *MBB, - MachineBasicBlock::iterator Begin, - MachineBasicBlock::iterator End); - - /// Returns the zero index for this analysis. - SlotIndex getZeroIndex() { - assert(indexList.front().getIndex() == 0 && "First index is not 0?"); - return SlotIndex(&indexList.front(), 0); - } - - /// Returns the base index of the last slot in this analysis. - SlotIndex getLastIndex() { - return SlotIndex(&indexList.back(), 0); - } - - /// Returns true if the given machine instr is mapped to an index, - /// otherwise returns false. - bool hasIndex(const MachineInstr &instr) const { - return mi2iMap.count(&instr); - } - - /// Returns the base index for the given instruction. - SlotIndex getInstructionIndex(const MachineInstr &MI) const { - // Instructions inside a bundle have the same number as the bundle itself. - Mi2IndexMap::const_iterator itr = mi2iMap.find(&getBundleStart(MI)); - assert(itr != mi2iMap.end() && "Instruction not found in maps."); - return itr->second; - } - - /// Returns the instruction for the given index, or null if the given - /// index has no instruction associated with it. - MachineInstr* getInstructionFromIndex(SlotIndex index) const { - return index.isValid() ? index.listEntry()->getInstr() : nullptr; - } - - /// Returns the next non-null index, if one exists. - /// Otherwise returns getLastIndex(). - SlotIndex getNextNonNullIndex(SlotIndex Index) { - IndexList::iterator I = Index.listEntry()->getIterator(); - IndexList::iterator E = indexList.end(); - while (++I != E) - if (I->getInstr()) - return SlotIndex(&*I, Index.getSlot()); - // We reached the end of the function. - return getLastIndex(); - } - - /// getIndexBefore - Returns the index of the last indexed instruction - /// before MI, or the start index of its basic block. - /// MI is not required to have an index. - SlotIndex getIndexBefore(const MachineInstr &MI) const { - const MachineBasicBlock *MBB = MI.getParent(); - assert(MBB && "MI must be inserted inna basic block"); - MachineBasicBlock::const_iterator I = MI, B = MBB->begin(); - for (;;) { - if (I == B) - return getMBBStartIdx(MBB); - --I; - Mi2IndexMap::const_iterator MapItr = mi2iMap.find(&*I); - if (MapItr != mi2iMap.end()) - return MapItr->second; - } - } - - /// getIndexAfter - Returns the index of the first indexed instruction - /// after MI, or the end index of its basic block. - /// MI is not required to have an index. - SlotIndex getIndexAfter(const MachineInstr &MI) const { - const MachineBasicBlock *MBB = MI.getParent(); - assert(MBB && "MI must be inserted inna basic block"); - MachineBasicBlock::const_iterator I = MI, E = MBB->end(); - for (;;) { - ++I; - if (I == E) - return getMBBEndIdx(MBB); - Mi2IndexMap::const_iterator MapItr = mi2iMap.find(&*I); - if (MapItr != mi2iMap.end()) - return MapItr->second; - } - } - - /// Return the (start,end) range of the given basic block number. - const std::pair & - getMBBRange(unsigned Num) const { - return MBBRanges[Num]; - } - - /// Return the (start,end) range of the given basic block. - const std::pair & - getMBBRange(const MachineBasicBlock *MBB) const { - return getMBBRange(MBB->getNumber()); - } - - /// Returns the first index in the given basic block number. - SlotIndex getMBBStartIdx(unsigned Num) const { - return getMBBRange(Num).first; - } - - /// Returns the first index in the given basic block. - SlotIndex getMBBStartIdx(const MachineBasicBlock *mbb) const { - return getMBBRange(mbb).first; - } - - /// Returns the last index in the given basic block number. - SlotIndex getMBBEndIdx(unsigned Num) const { - return getMBBRange(Num).second; - } - - /// Returns the last index in the given basic block. - SlotIndex getMBBEndIdx(const MachineBasicBlock *mbb) const { - return getMBBRange(mbb).second; - } - - /// Iterator over the idx2MBBMap (sorted pairs of slot index of basic block - /// begin and basic block) - typedef SmallVectorImpl::const_iterator MBBIndexIterator; - /// Move iterator to the next IdxMBBPair where the SlotIndex is greater or - /// equal to \p To. - MBBIndexIterator advanceMBBIndex(MBBIndexIterator I, SlotIndex To) const { - return std::lower_bound(I, idx2MBBMap.end(), To); - } - /// Get an iterator pointing to the IdxMBBPair with the biggest SlotIndex - /// that is greater or equal to \p Idx. - MBBIndexIterator findMBBIndex(SlotIndex Idx) const { - return advanceMBBIndex(idx2MBBMap.begin(), Idx); - } - /// Returns an iterator for the begin of the idx2MBBMap. - MBBIndexIterator MBBIndexBegin() const { - return idx2MBBMap.begin(); - } - /// Return an iterator for the end of the idx2MBBMap. - MBBIndexIterator MBBIndexEnd() const { - return idx2MBBMap.end(); - } - - /// Returns the basic block which the given index falls in. - MachineBasicBlock* getMBBFromIndex(SlotIndex index) const { - if (MachineInstr *MI = getInstructionFromIndex(index)) - return MI->getParent(); - - MBBIndexIterator I = findMBBIndex(index); - // Take the pair containing the index - MBBIndexIterator J = - ((I != MBBIndexEnd() && I->first > index) || - (I == MBBIndexEnd() && !idx2MBBMap.empty())) ? std::prev(I) : I; - - assert(J != MBBIndexEnd() && J->first <= index && - index < getMBBEndIdx(J->second) && - "index does not correspond to an MBB"); - return J->second; - } - - /// Returns the MBB covering the given range, or null if the range covers - /// more than one basic block. - MachineBasicBlock* getMBBCoveringRange(SlotIndex start, SlotIndex end) const { - - assert(start < end && "Backwards ranges not allowed."); - MBBIndexIterator itr = findMBBIndex(start); - if (itr == MBBIndexEnd()) { - itr = std::prev(itr); - return itr->second; - } - - // Check that we don't cross the boundary into this block. - if (itr->first < end) - return nullptr; - - itr = std::prev(itr); - - if (itr->first <= start) - return itr->second; - - return nullptr; - } - - /// Insert the given machine instruction into the mapping. Returns the - /// assigned index. - /// If Late is set and there are null indexes between mi's neighboring - /// instructions, create the new index after the null indexes instead of - /// before them. - SlotIndex insertMachineInstrInMaps(MachineInstr &MI, bool Late = false) { - assert(!MI.isInsideBundle() && - "Instructions inside bundles should use bundle start's slot."); - assert(mi2iMap.find(&MI) == mi2iMap.end() && "Instr already indexed."); - // Numbering DBG_VALUE instructions could cause code generation to be - // affected by debug information. - assert(!MI.isDebugValue() && "Cannot number DBG_VALUE instructions."); - - assert(MI.getParent() != nullptr && "Instr must be added to function."); - - // Get the entries where MI should be inserted. - IndexList::iterator prevItr, nextItr; - if (Late) { - // Insert MI's index immediately before the following instruction. - nextItr = getIndexAfter(MI).listEntry()->getIterator(); - prevItr = std::prev(nextItr); - } else { - // Insert MI's index immediately after the preceding instruction. - prevItr = getIndexBefore(MI).listEntry()->getIterator(); - nextItr = std::next(prevItr); - } - - // Get a number for the new instr, or 0 if there's no room currently. - // In the latter case we'll force a renumber later. - unsigned dist = ((nextItr->getIndex() - prevItr->getIndex())/2) & ~3u; - unsigned newNumber = prevItr->getIndex() + dist; - - // Insert a new list entry for MI. - IndexList::iterator newItr = - indexList.insert(nextItr, createEntry(&MI, newNumber)); - - // Renumber locally if we need to. - if (dist == 0) - renumberIndexes(newItr); - - SlotIndex newIndex(&*newItr, SlotIndex::Slot_Block); - mi2iMap.insert(std::make_pair(&MI, newIndex)); - return newIndex; - } - - /// Remove the given machine instruction from the mapping. - void removeMachineInstrFromMaps(MachineInstr &MI) { - // remove index -> MachineInstr and - // MachineInstr -> index mappings - Mi2IndexMap::iterator mi2iItr = mi2iMap.find(&MI); - if (mi2iItr != mi2iMap.end()) { - IndexListEntry *miEntry(mi2iItr->second.listEntry()); - assert(miEntry->getInstr() == &MI && "Instruction indexes broken."); - // FIXME: Eventually we want to actually delete these indexes. - miEntry->setInstr(nullptr); - mi2iMap.erase(mi2iItr); - } - } - - /// ReplaceMachineInstrInMaps - Replacing a machine instr with a new one in - /// maps used by register allocator. - void replaceMachineInstrInMaps(MachineInstr &MI, MachineInstr &NewMI) { - Mi2IndexMap::iterator mi2iItr = mi2iMap.find(&MI); - if (mi2iItr == mi2iMap.end()) - return; - SlotIndex replaceBaseIndex = mi2iItr->second; - IndexListEntry *miEntry(replaceBaseIndex.listEntry()); - assert(miEntry->getInstr() == &MI && - "Mismatched instruction in index tables."); - miEntry->setInstr(&NewMI); - mi2iMap.erase(mi2iItr); - mi2iMap.insert(std::make_pair(&NewMI, replaceBaseIndex)); - } - - /// Add the given MachineBasicBlock into the maps. - void insertMBBInMaps(MachineBasicBlock *mbb) { - MachineFunction::iterator nextMBB = - std::next(MachineFunction::iterator(mbb)); - - IndexListEntry *startEntry = nullptr; - IndexListEntry *endEntry = nullptr; - IndexList::iterator newItr; - if (nextMBB == mbb->getParent()->end()) { - startEntry = &indexList.back(); - endEntry = createEntry(nullptr, 0); - newItr = indexList.insertAfter(startEntry->getIterator(), endEntry); - } else { - startEntry = createEntry(nullptr, 0); - endEntry = getMBBStartIdx(&*nextMBB).listEntry(); - newItr = indexList.insert(endEntry->getIterator(), startEntry); - } - - SlotIndex startIdx(startEntry, SlotIndex::Slot_Block); - SlotIndex endIdx(endEntry, SlotIndex::Slot_Block); - - MachineFunction::iterator prevMBB(mbb); - assert(prevMBB != mbb->getParent()->end() && - "Can't insert a new block at the beginning of a function."); - --prevMBB; - MBBRanges[prevMBB->getNumber()].second = startIdx; - - assert(unsigned(mbb->getNumber()) == MBBRanges.size() && - "Blocks must be added in order"); - MBBRanges.push_back(std::make_pair(startIdx, endIdx)); - idx2MBBMap.push_back(IdxMBBPair(startIdx, mbb)); - - renumberIndexes(newItr); - std::sort(idx2MBBMap.begin(), idx2MBBMap.end(), Idx2MBBCompare()); - } - - /// \brief Free the resources that were required to maintain a SlotIndex. - /// - /// Once an index is no longer needed (for instance because the instruction - /// at that index has been moved), the resources required to maintain the - /// index can be relinquished to reduce memory use and improve renumbering - /// performance. Any remaining SlotIndex objects that point to the same - /// index are left 'dangling' (much the same as a dangling pointer to a - /// freed object) and should not be accessed, except to destruct them. - /// - /// Like dangling pointers, access to dangling SlotIndexes can cause - /// painful-to-track-down bugs, especially if the memory for the index - /// previously pointed to has been re-used. To detect dangling SlotIndex - /// bugs, build with EXPENSIVE_CHECKS=1. This will cause "erased" indexes to - /// be retained in a graveyard instead of being freed. Operations on indexes - /// in the graveyard will trigger an assertion. - void eraseIndex(SlotIndex index) { - IndexListEntry *entry = index.listEntry(); -#ifdef EXPENSIVE_CHECKS - indexList.remove(entry); - graveyardList.push_back(entry); - entry->setPoison(); -#else - indexList.erase(entry); -#endif - } - }; - - // Specialize IntervalMapInfo for half-open slot index intervals. - template <> - struct IntervalMapInfo : IntervalMapHalfOpenInfo { - }; - -} // end namespace llvm - -#endif // LLVM_CODEGEN_SLOTINDEXES_H diff --git a/llvm/include/llvm/CodeGen/StackMaps.h b/llvm/include/llvm/CodeGen/StackMaps.h deleted file mode 100644 index 918848f6..00000000 --- a/llvm/include/llvm/CodeGen/StackMaps.h +++ /dev/null @@ -1,255 +0,0 @@ -//===------------------- StackMaps.h - StackMaps ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_STACKMAPS_H -#define LLVM_CODEGEN_STACKMAPS_H - -#include "llvm/ADT/MapVector.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/CodeGen/MachineInstr.h" -#include "llvm/MC/MCSymbol.h" -#include - -namespace llvm { - -class AsmPrinter; -class MCExpr; -class MCStreamer; - -/// \brief MI-level patchpoint operands. -/// -/// MI patchpoint operations take the form: -/// [], , , , , , ... -/// -/// IR patchpoint intrinsics do not have the operand because calling -/// convention is part of the subclass data. -/// -/// SD patchpoint nodes do not have a def operand because it is part of the -/// SDValue. -/// -/// Patchpoints following the anyregcc convention are handled specially. For -/// these, the stack map also records the location of the return value and -/// arguments. -class PatchPointOpers { -public: - /// Enumerate the meta operands. - enum { IDPos, NBytesPos, TargetPos, NArgPos, CCPos, MetaEnd }; - -private: - const MachineInstr *MI; - bool HasDef; - bool IsAnyReg; - -public: - explicit PatchPointOpers(const MachineInstr *MI); - - bool isAnyReg() const { return IsAnyReg; } - bool hasDef() const { return HasDef; } - - unsigned getMetaIdx(unsigned Pos = 0) const { - assert(Pos < MetaEnd && "Meta operand index out of range."); - return (HasDef ? 1 : 0) + Pos; - } - - const MachineOperand &getMetaOper(unsigned Pos) { - return MI->getOperand(getMetaIdx(Pos)); - } - - unsigned getArgIdx() const { return getMetaIdx() + MetaEnd; } - - /// Get the operand index of the variable list of non-argument operands. - /// These hold the "live state". - unsigned getVarIdx() const { - return getMetaIdx() + MetaEnd + - MI->getOperand(getMetaIdx(NArgPos)).getImm(); - } - - /// Get the index at which stack map locations will be recorded. - /// Arguments are not recorded unless the anyregcc convention is used. - unsigned getStackMapStartIdx() const { - if (IsAnyReg) - return getArgIdx(); - return getVarIdx(); - } - - /// \brief Get the next scratch register operand index. - unsigned getNextScratchIdx(unsigned StartIdx = 0) const; -}; - -/// MI-level Statepoint operands -/// -/// Statepoint operands take the form: -/// , , , , -/// [call arguments], , , -/// , , -/// , , [other args], -/// [gc values] -class StatepointOpers { -private: - // These values are aboolute offsets into the operands of the statepoint - // instruction. - enum { IDPos, NBytesPos, NCallArgsPos, CallTargetPos, MetaEnd }; - - // These values are relative offests from the start of the statepoint meta - // arguments (i.e. the end of the call arguments). - enum { CCOffset = 1, FlagsOffset = 3, NumVMSArgsOffset = 5 }; - -public: - explicit StatepointOpers(const MachineInstr *MI) : MI(MI) {} - - /// Get starting index of non call related arguments - /// (calling convention, statepoint flags, vm state and gc state). - unsigned getVarIdx() const { - return MI->getOperand(NCallArgsPos).getImm() + MetaEnd; - } - - /// Return the ID for the given statepoint. - uint64_t getID() const { return MI->getOperand(IDPos).getImm(); } - - /// Return the number of patchable bytes the given statepoint should emit. - uint32_t getNumPatchBytes() const { - return MI->getOperand(NBytesPos).getImm(); - } - - /// Returns the target of the underlying call. - const MachineOperand &getCallTarget() const { - return MI->getOperand(CallTargetPos); - } - -private: - const MachineInstr *MI; -}; - -class StackMaps { -public: - struct Location { - enum LocationType { - Unprocessed, - Register, - Direct, - Indirect, - Constant, - ConstantIndex - }; - LocationType Type; - unsigned Size; - unsigned Reg; - int64_t Offset; - Location() : Type(Unprocessed), Size(0), Reg(0), Offset(0) {} - Location(LocationType Type, unsigned Size, unsigned Reg, int64_t Offset) - : Type(Type), Size(Size), Reg(Reg), Offset(Offset) {} - }; - - struct LiveOutReg { - unsigned short Reg; - unsigned short DwarfRegNum; - unsigned short Size; - - LiveOutReg() : Reg(0), DwarfRegNum(0), Size(0) {} - LiveOutReg(unsigned short Reg, unsigned short DwarfRegNum, - unsigned short Size) - : Reg(Reg), DwarfRegNum(DwarfRegNum), Size(Size) {} - }; - - // OpTypes are used to encode information about the following logical - // operand (which may consist of several MachineOperands) for the - // OpParser. - typedef enum { DirectMemRefOp, IndirectMemRefOp, ConstantOp } OpType; - - StackMaps(AsmPrinter &AP); - - void reset() { - CSInfos.clear(); - ConstPool.clear(); - FnStackSize.clear(); - } - - /// \brief Generate a stackmap record for a stackmap instruction. - /// - /// MI must be a raw STACKMAP, not a PATCHPOINT. - void recordStackMap(const MachineInstr &MI); - - /// \brief Generate a stackmap record for a patchpoint instruction. - void recordPatchPoint(const MachineInstr &MI); - - /// \brief Generate a stackmap record for a statepoint instruction. - void recordStatepoint(const MachineInstr &MI); - - /// If there is any stack map data, create a stack map section and serialize - /// the map info into it. This clears the stack map data structures - /// afterwards. - void serializeToStackMapSection(); - -private: - static const char *WSMP; - typedef SmallVector LocationVec; - typedef SmallVector LiveOutVec; - typedef MapVector ConstantPool; - typedef MapVector FnStackSizeMap; - - struct CallsiteInfo { - const MCExpr *CSOffsetExpr; - uint64_t ID; - LocationVec Locations; - LiveOutVec LiveOuts; - CallsiteInfo() : CSOffsetExpr(nullptr), ID(0) {} - CallsiteInfo(const MCExpr *CSOffsetExpr, uint64_t ID, - LocationVec &&Locations, LiveOutVec &&LiveOuts) - : CSOffsetExpr(CSOffsetExpr), ID(ID), Locations(std::move(Locations)), - LiveOuts(std::move(LiveOuts)) {} - }; - - typedef std::vector CallsiteInfoList; - - AsmPrinter &AP; - CallsiteInfoList CSInfos; - ConstantPool ConstPool; - FnStackSizeMap FnStackSize; - - MachineInstr::const_mop_iterator - parseOperand(MachineInstr::const_mop_iterator MOI, - MachineInstr::const_mop_iterator MOE, LocationVec &Locs, - LiveOutVec &LiveOuts) const; - - /// \brief Create a live-out register record for the given register @p Reg. - LiveOutReg createLiveOutReg(unsigned Reg, - const TargetRegisterInfo *TRI) const; - - /// \brief Parse the register live-out mask and return a vector of live-out - /// registers that need to be recorded in the stackmap. - LiveOutVec parseRegisterLiveOutMask(const uint32_t *Mask) const; - - /// This should be called by the MC lowering code _immediately_ before - /// lowering the MI to an MCInst. It records where the operands for the - /// instruction are stored, and outputs a label to record the offset of - /// the call from the start of the text section. In special cases (e.g. AnyReg - /// calling convention) the return register is also recorded if requested. - void recordStackMapOpers(const MachineInstr &MI, uint64_t ID, - MachineInstr::const_mop_iterator MOI, - MachineInstr::const_mop_iterator MOE, - bool recordResult = false); - - /// \brief Emit the stackmap header. - void emitStackmapHeader(MCStreamer &OS); - - /// \brief Emit the function frame record for each function. - void emitFunctionFrameRecords(MCStreamer &OS); - - /// \brief Emit the constant pool. - void emitConstantPoolEntries(MCStreamer &OS); - - /// \brief Emit the callsite info for each stackmap/patchpoint intrinsic call. - void emitCallsiteEntries(MCStreamer &OS); - - void print(raw_ostream &OS); - void debug() { print(dbgs()); } -}; -} - -#endif diff --git a/llvm/include/llvm/CodeGen/StackProtector.h b/llvm/include/llvm/CodeGen/StackProtector.h deleted file mode 100644 index 1b3c0eb4..00000000 --- a/llvm/include/llvm/CodeGen/StackProtector.h +++ /dev/null @@ -1,139 +0,0 @@ -//===-- StackProtector.h - Stack Protector Insertion ----------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This pass inserts stack protectors into functions which need them. A variable -// with a random value in it is stored onto the stack before the local variables -// are allocated. Upon exiting the block, the stored value is checked. If it's -// changed, then there was some sort of violation and the program aborts. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_STACKPROTECTOR_H -#define LLVM_CODEGEN_STACKPROTECTOR_H - -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/Triple.h" -#include "llvm/IR/Dominators.h" -#include "llvm/IR/ValueMap.h" -#include "llvm/Pass.h" -#include "llvm/Target/TargetLowering.h" - -namespace llvm { -class Function; -class Module; -class PHINode; - -class StackProtector : public FunctionPass { -public: - /// SSPLayoutKind. Stack Smashing Protection (SSP) rules require that - /// vulnerable stack allocations are located close the stack protector. - enum SSPLayoutKind { - SSPLK_None, ///< Did not trigger a stack protector. No effect on data - ///< layout. - SSPLK_LargeArray, ///< Array or nested array >= SSP-buffer-size. Closest - ///< to the stack protector. - SSPLK_SmallArray, ///< Array or nested array < SSP-buffer-size. 2nd closest - ///< to the stack protector. - SSPLK_AddrOf ///< The address of this allocation is exposed and - ///< triggered protection. 3rd closest to the protector. - }; - - /// A mapping of AllocaInsts to their required SSP layout. - typedef ValueMap SSPLayoutMap; - -private: - const TargetMachine *TM; - - /// TLI - Keep a pointer of a TargetLowering to consult for determining - /// target type sizes. - const TargetLoweringBase *TLI; - const Triple Trip; - - Function *F; - Module *M; - - DominatorTree *DT; - - /// Layout - Mapping of allocations to the required SSPLayoutKind. - /// StackProtector analysis will update this map when determining if an - /// AllocaInst triggers a stack protector. - SSPLayoutMap Layout; - - /// \brief The minimum size of buffers that will receive stack smashing - /// protection when -fstack-protection is used. - unsigned SSPBufferSize; - - /// VisitedPHIs - The set of PHI nodes visited when determining - /// if a variable's reference has been taken. This set - /// is maintained to ensure we don't visit the same PHI node multiple - /// times. - SmallPtrSet VisitedPHIs; - - // A prologue is generated. - bool HasPrologue = false; - - // IR checking code is generated. - bool HasIRCheck = false; - - /// InsertStackProtectors - Insert code into the prologue and epilogue of - /// the function. - /// - /// - The prologue code loads and stores the stack guard onto the stack. - /// - The epilogue checks the value stored in the prologue against the - /// original value. It calls __stack_chk_fail if they differ. - bool InsertStackProtectors(); - - /// CreateFailBB - Create a basic block to jump to when the stack protector - /// check fails. - BasicBlock *CreateFailBB(); - - /// ContainsProtectableArray - Check whether the type either is an array or - /// contains an array of sufficient size so that we need stack protectors - /// for it. - /// \param [out] IsLarge is set to true if a protectable array is found and - /// it is "large" ( >= ssp-buffer-size). In the case of a structure with - /// multiple arrays, this gets set if any of them is large. - bool ContainsProtectableArray(Type *Ty, bool &IsLarge, bool Strong = false, - bool InStruct = false) const; - - /// \brief Check whether a stack allocation has its address taken. - bool HasAddressTaken(const Instruction *AI); - - /// RequiresStackProtector - Check whether or not this function needs a - /// stack protector based upon the stack protector level. - bool RequiresStackProtector(); - -public: - static char ID; // Pass identification, replacement for typeid. - StackProtector() - : FunctionPass(ID), TM(nullptr), TLI(nullptr), SSPBufferSize(0) { - initializeStackProtectorPass(*PassRegistry::getPassRegistry()); - } - StackProtector(const TargetMachine *TM) - : FunctionPass(ID), TM(TM), TLI(nullptr), Trip(TM->getTargetTriple()), - SSPBufferSize(8) { - initializeStackProtectorPass(*PassRegistry::getPassRegistry()); - } - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addPreserved(); - } - - SSPLayoutKind getSSPLayout(const AllocaInst *AI) const; - - // Return true if StackProtector is supposed to be handled by SelectionDAG. - bool shouldEmitSDCheck(const BasicBlock &BB) const; - - void adjustForColoring(const AllocaInst *From, const AllocaInst *To); - - bool runOnFunction(Function &Fn) override; -}; -} // end namespace llvm - -#endif // LLVM_CODEGEN_STACKPROTECTOR_H diff --git a/llvm/include/llvm/CodeGen/TailDuplicator.h b/llvm/include/llvm/CodeGen/TailDuplicator.h deleted file mode 100644 index 8e651994..00000000 --- a/llvm/include/llvm/CodeGen/TailDuplicator.h +++ /dev/null @@ -1,92 +0,0 @@ -//===-- llvm/CodeGen/TailDuplicator.h ---------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the TailDuplicator class. Used by the -// TailDuplication pass, and MachineBlockPlacement. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_TAILDUPLICATOR_H -#define LLVM_CODEGEN_TAILDUPLICATOR_H - -#include "llvm/CodeGen/MachineBranchProbabilityInfo.h" -#include "llvm/CodeGen/MachineModuleInfo.h" -#include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/CodeGen/MachineSSAUpdater.h" -#include "llvm/CodeGen/RegisterScavenging.h" -#include "llvm/Target/TargetInstrInfo.h" -#include "llvm/Target/TargetRegisterInfo.h" -#include "llvm/Target/TargetSubtargetInfo.h" - -namespace llvm { - -/// Utility class to perform tail duplication. -class TailDuplicator { - const TargetInstrInfo *TII; - const TargetRegisterInfo *TRI; - const MachineBranchProbabilityInfo *MBPI; - const MachineModuleInfo *MMI; - MachineRegisterInfo *MRI; - bool PreRegAlloc; - - // A list of virtual registers for which to update SSA form. - SmallVector SSAUpdateVRs; - - // For each virtual register in SSAUpdateVals keep a list of source virtual - // registers. - typedef std::vector> AvailableValsTy; - - DenseMap SSAUpdateVals; - -public: - void initMF(MachineFunction &MF, const MachineModuleInfo *MMI, - const MachineBranchProbabilityInfo *MBPI); - bool tailDuplicateBlocks(MachineFunction &MF); - static bool isSimpleBB(MachineBasicBlock *TailBB); - bool shouldTailDuplicate(const MachineFunction &MF, bool IsSimple, - MachineBasicBlock &TailBB); - bool tailDuplicateAndUpdate(MachineFunction &MF, bool IsSimple, - MachineBasicBlock *MBB); - -private: - typedef TargetInstrInfo::RegSubRegPair RegSubRegPair; - - void addSSAUpdateEntry(unsigned OrigReg, unsigned NewReg, - MachineBasicBlock *BB); - void processPHI(MachineInstr *MI, MachineBasicBlock *TailBB, - MachineBasicBlock *PredBB, - DenseMap &LocalVRMap, - SmallVectorImpl> &Copies, - const DenseSet &UsedByPhi, bool Remove); - void duplicateInstruction(MachineInstr *MI, MachineBasicBlock *TailBB, - MachineBasicBlock *PredBB, MachineFunction &MF, - DenseMap &LocalVRMap, - const DenseSet &UsedByPhi); - void updateSuccessorsPHIs(MachineBasicBlock *FromBB, bool isDead, - SmallVectorImpl &TDBBs, - SmallSetVector &Succs); - bool canCompletelyDuplicateBB(MachineBasicBlock &BB); - bool duplicateSimpleBB(MachineBasicBlock *TailBB, - SmallVectorImpl &TDBBs, - const DenseSet &RegsUsedByPhi, - SmallVectorImpl &Copies); - bool tailDuplicate(MachineFunction &MF, bool IsSimple, - MachineBasicBlock *TailBB, - SmallVectorImpl &TDBBs, - SmallVectorImpl &Copies); - void appendCopies(MachineBasicBlock *MBB, - SmallVectorImpl> &CopyInfos, - SmallVectorImpl &Copies); - - void removeDeadBlock(MachineBasicBlock *MBB); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h b/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h deleted file mode 100644 index c856435f..00000000 --- a/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h +++ /dev/null @@ -1,179 +0,0 @@ -//==-- llvm/CodeGen/TargetLoweringObjectFileImpl.h - Object Info -*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements classes used to handle lowerings specific to common -// object file formats. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H -#define LLVM_CODEGEN_TARGETLOWERINGOBJECTFILEIMPL_H - -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/SectionKind.h" -#include "llvm/Target/TargetLoweringObjectFile.h" - -namespace llvm { - class MachineModuleInfo; - class Mangler; - class MCAsmInfo; - class MCSection; - class MCSectionMachO; - class MCSymbol; - class MCContext; - class GlobalValue; - class TargetMachine; - - -class TargetLoweringObjectFileELF : public TargetLoweringObjectFile { - bool UseInitArray; - mutable unsigned NextUniqueID = 0; - -protected: - MCSymbolRefExpr::VariantKind PLTRelativeVariantKind = - MCSymbolRefExpr::VK_None; - -public: - TargetLoweringObjectFileELF() : UseInitArray(false) {} - - ~TargetLoweringObjectFileELF() override {} - - void emitPersonalityValue(MCStreamer &Streamer, const DataLayout &TM, - const MCSymbol *Sym) const override; - - /// Given a constant with the SectionKind, return a section that it should be - /// placed in. - MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind, - const Constant *C, - unsigned &Align) const override; - - MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, - const TargetMachine &TM) const override; - - MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, - const TargetMachine &TM) const override; - - MCSection *getSectionForJumpTable(const Function &F, Mangler &Mang, - const TargetMachine &TM) const override; - - bool shouldPutJumpTableInFunctionSection(bool UsesLabelDifference, - const Function &F) const override; - - /// Return an MCExpr to use for a reference to the specified type info global - /// variable from exception handling information. - const MCExpr * - getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, - Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI, - MCStreamer &Streamer) const override; - - // The symbol that gets passed to .cfi_personality. - MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, - const TargetMachine &TM, - MachineModuleInfo *MMI) const override; - - void InitializeELF(bool UseInitArray_); - MCSection *getStaticCtorSection(unsigned Priority, - const MCSymbol *KeySym) const override; - MCSection *getStaticDtorSection(unsigned Priority, - const MCSymbol *KeySym) const override; - - const MCExpr *lowerRelativeReference(const GlobalValue *LHS, - const GlobalValue *RHS, Mangler &Mang, - const TargetMachine &TM) const override; -}; - - - -class TargetLoweringObjectFileMachO : public TargetLoweringObjectFile { -public: - ~TargetLoweringObjectFileMachO() override {} - TargetLoweringObjectFileMachO(); - - /// Emit the module flags that specify the garbage collection information. - void emitModuleFlags(MCStreamer &Streamer, - ArrayRef ModuleFlags, - Mangler &Mang, const TargetMachine &TM) const override; - - MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, - const TargetMachine &TM) const override; - - MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, - const TargetMachine &TM) const override; - - MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind, - const Constant *C, - unsigned &Align) const override; - - /// The mach-o version of this method defaults to returning a stub reference. - const MCExpr * - getTTypeGlobalReference(const GlobalValue *GV, unsigned Encoding, - Mangler &Mang, const TargetMachine &TM, - MachineModuleInfo *MMI, - MCStreamer &Streamer) const override; - - // The symbol that gets passed to .cfi_personality. - MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang, - const TargetMachine &TM, - MachineModuleInfo *MMI) const override; - - /// Get MachO PC relative GOT entry relocation - const MCExpr *getIndirectSymViaGOTPCRel(const MCSymbol *Sym, - const MCValue &MV, int64_t Offset, - MachineModuleInfo *MMI, - MCStreamer &Streamer) const override; - - void getNameWithPrefix(SmallVectorImpl &OutName, const GlobalValue *GV, - Mangler &Mang, const TargetMachine &TM) const override; -}; - - - -class TargetLoweringObjectFileCOFF : public TargetLoweringObjectFile { - mutable unsigned NextUniqueID = 0; - -public: - ~TargetLoweringObjectFileCOFF() override {} - - MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, - const TargetMachine &TM) const override; - - MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, - Mangler &Mang, - const TargetMachine &TM) const override; - - void getNameWithPrefix(SmallVectorImpl &OutName, const GlobalValue *GV, - Mangler &Mang, const TargetMachine &TM) const override; - - MCSection *getSectionForJumpTable(const Function &F, Mangler &Mang, - const TargetMachine &TM) const override; - - /// Emit Obj-C garbage collection and linker options. Only linker option - /// emission is implemented for COFF. - void emitModuleFlags(MCStreamer &Streamer, - ArrayRef ModuleFlags, - Mangler &Mang, const TargetMachine &TM) const override; - - MCSection *getStaticCtorSection(unsigned Priority, - const MCSymbol *KeySym) const override; - MCSection *getStaticDtorSection(unsigned Priority, - const MCSymbol *KeySym) const override; - - void emitLinkerFlagsForGlobal(raw_ostream &OS, const GlobalValue *GV, - const Mangler &Mang) const override; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/TargetPassConfig.h b/llvm/include/llvm/CodeGen/TargetPassConfig.h deleted file mode 100644 index 9309655a..00000000 --- a/llvm/include/llvm/CodeGen/TargetPassConfig.h +++ /dev/null @@ -1,376 +0,0 @@ -//===-- TargetPassConfig.h - Code Generation pass options -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// Target-Independent Code Generator Pass Configuration Options pass. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_TARGETPASSCONFIG_H -#define LLVM_CODEGEN_TARGETPASSCONFIG_H - -#include "llvm/Pass.h" -#include "llvm/Support/CodeGen.h" -#include - -namespace llvm { - -class PassConfigImpl; -class ScheduleDAGInstrs; -class TargetMachine; -struct MachineSchedContext; - -// The old pass manager infrastructure is hidden in a legacy namespace now. -namespace legacy { -class PassManagerBase; -} -using legacy::PassManagerBase; - -/// Discriminated union of Pass ID types. -/// -/// The PassConfig API prefers dealing with IDs because they are safer and more -/// efficient. IDs decouple configuration from instantiation. This way, when a -/// pass is overriden, it isn't unnecessarily instantiated. It is also unsafe to -/// refer to a Pass pointer after adding it to a pass manager, which deletes -/// redundant pass instances. -/// -/// However, it is convient to directly instantiate target passes with -/// non-default ctors. These often don't have a registered PassInfo. Rather than -/// force all target passes to implement the pass registry boilerplate, allow -/// the PassConfig API to handle either type. -/// -/// AnalysisID is sadly char*, so PointerIntPair won't work. -class IdentifyingPassPtr { - union { - AnalysisID ID; - Pass *P; - }; - bool IsInstance; -public: - IdentifyingPassPtr() : P(nullptr), IsInstance(false) {} - IdentifyingPassPtr(AnalysisID IDPtr) : ID(IDPtr), IsInstance(false) {} - IdentifyingPassPtr(Pass *InstancePtr) : P(InstancePtr), IsInstance(true) {} - - bool isValid() const { return P; } - bool isInstance() const { return IsInstance; } - - AnalysisID getID() const { - assert(!IsInstance && "Not a Pass ID"); - return ID; - } - Pass *getInstance() const { - assert(IsInstance && "Not a Pass Instance"); - return P; - } -}; - -template <> struct isPodLike { - static const bool value = true; -}; - -/// Target-Independent Code Generator Pass Configuration Options. -/// -/// This is an ImmutablePass solely for the purpose of exposing CodeGen options -/// to the internals of other CodeGen passes. -class TargetPassConfig : public ImmutablePass { -public: - /// Pseudo Pass IDs. These are defined within TargetPassConfig because they - /// are unregistered pass IDs. They are only useful for use with - /// TargetPassConfig APIs to identify multiple occurrences of the same pass. - /// - - /// EarlyTailDuplicate - A clone of the TailDuplicate pass that runs early - /// during codegen, on SSA form. - static char EarlyTailDuplicateID; - - /// PostRAMachineLICM - A clone of the LICM pass that runs during late machine - /// optimization after regalloc. - static char PostRAMachineLICMID; - -private: - PassManagerBase *PM; - AnalysisID StartBefore, StartAfter; - AnalysisID StopAfter; - bool Started; - bool Stopped; - bool AddingMachinePasses; - -protected: - TargetMachine *TM; - PassConfigImpl *Impl; // Internal data structures - bool Initialized; // Flagged after all passes are configured. - - // Target Pass Options - // Targets provide a default setting, user flags override. - // - bool DisableVerify; - - /// Default setting for -enable-tail-merge on this target. - bool EnableTailMerge; - -public: - TargetPassConfig(TargetMachine *tm, PassManagerBase &pm); - // Dummy constructor. - TargetPassConfig(); - - ~TargetPassConfig() override; - - static char ID; - - /// Get the right type of TargetMachine for this target. - template TMC &getTM() const { - return *static_cast(TM); - } - - // - void setInitialized() { Initialized = true; } - - CodeGenOpt::Level getOptLevel() const; - - /// Set the StartAfter, StartBefore and StopAfter passes to allow running only - /// a portion of the normal code-gen pass sequence. - /// - /// If the StartAfter and StartBefore pass ID is zero, then compilation will - /// begin at the normal point; otherwise, clear the Started flag to indicate - /// that passes should not be added until the starting pass is seen. If the - /// Stop pass ID is zero, then compilation will continue to the end. - /// - /// This function expects that at least one of the StartAfter or the - /// StartBefore pass IDs is null. - void setStartStopPasses(AnalysisID StartBefore, AnalysisID StartAfter, - AnalysisID StopAfter) { - if (StartAfter) - assert(!StartBefore && "Start after and start before passes are given"); - this->StartBefore = StartBefore; - this->StartAfter = StartAfter; - this->StopAfter = StopAfter; - Started = (StartAfter == nullptr) && (StartBefore == nullptr); - } - - void setDisableVerify(bool Disable) { setOpt(DisableVerify, Disable); } - - bool getEnableTailMerge() const { return EnableTailMerge; } - void setEnableTailMerge(bool Enable) { setOpt(EnableTailMerge, Enable); } - - /// Allow the target to override a specific pass without overriding the pass - /// pipeline. When passes are added to the standard pipeline at the - /// point where StandardID is expected, add TargetID in its place. - void substitutePass(AnalysisID StandardID, IdentifyingPassPtr TargetID); - - /// Insert InsertedPassID pass after TargetPassID pass. - void insertPass(AnalysisID TargetPassID, IdentifyingPassPtr InsertedPassID, - bool VerifyAfter = true, bool PrintAfter = true); - - /// Allow the target to enable a specific standard pass by default. - void enablePass(AnalysisID PassID) { substitutePass(PassID, PassID); } - - /// Allow the target to disable a specific standard pass by default. - void disablePass(AnalysisID PassID) { - substitutePass(PassID, IdentifyingPassPtr()); - } - - /// Return the pass substituted for StandardID by the target. - /// If no substitution exists, return StandardID. - IdentifyingPassPtr getPassSubstitution(AnalysisID StandardID) const; - - /// Return true if the pass has been substituted by the target or - /// overridden on the command line. - bool isPassSubstitutedOrOverridden(AnalysisID ID) const; - - /// Return true if the optimized regalloc pipeline is enabled. - bool getOptimizeRegAlloc() const; - - /// Return true if shrink wrapping is enabled. - bool getEnableShrinkWrap() const; - - /// Return true if the default global register allocator is in use and - /// has not be overriden on the command line with '-regalloc=...' - bool usingDefaultRegAlloc() const; - - /// Add common target configurable passes that perform LLVM IR to IR - /// transforms following machine independent optimization. - virtual void addIRPasses(); - - /// Add passes to lower exception handling for the code generator. - void addPassesToHandleExceptions(); - - /// Add pass to prepare the LLVM IR for code generation. This should be done - /// before exception handling preparation passes. - virtual void addCodeGenPrepare(); - - /// Add common passes that perform LLVM IR to IR transforms in preparation for - /// instruction selection. - virtual void addISelPrepare(); - - /// addInstSelector - This method should install an instruction selector pass, - /// which converts from LLVM code to machine instructions. - virtual bool addInstSelector() { - return true; - } - - /// This method should install an IR translator pass, which converts from - /// LLVM code to machine instructions with possibly generic opcodes. - virtual bool addIRTranslator() { return true; } - - /// This method may be implemented by targets that want to run passes - /// immediately before the register bank selection. - virtual void addPreRegBankSelect() {} - - /// This method should install a register bank selector pass, which - /// assigns register banks to virtual registers without a register - /// class or register banks. - virtual bool addRegBankSelect() { return true; } - - /// Add the complete, standard set of LLVM CodeGen passes. - /// Fully developed targets will not generally override this. - virtual void addMachinePasses(); - - /// Create an instance of ScheduleDAGInstrs to be run within the standard - /// MachineScheduler pass for this function and target at the current - /// optimization level. - /// - /// This can also be used to plug a new MachineSchedStrategy into an instance - /// of the standard ScheduleDAGMI: - /// return new ScheduleDAGMI(C, make_unique(C), /*RemoveKillFlags=*/false) - /// - /// Return NULL to select the default (generic) machine scheduler. - virtual ScheduleDAGInstrs * - createMachineScheduler(MachineSchedContext *C) const { - return nullptr; - } - - /// Similar to createMachineScheduler but used when postRA machine scheduling - /// is enabled. - virtual ScheduleDAGInstrs * - createPostMachineScheduler(MachineSchedContext *C) const { - return nullptr; - } - - /// printAndVerify - Add a pass to dump then verify the machine function, if - /// those steps are enabled. - /// - void printAndVerify(const std::string &Banner); - - /// Add a pass to print the machine function if printing is enabled. - void addPrintPass(const std::string &Banner); - - /// Add a pass to perform basic verification of the machine function if - /// verification is enabled. - void addVerifyPass(const std::string &Banner); - -protected: - // Helper to verify the analysis is really immutable. - void setOpt(bool &Opt, bool Val); - - /// Methods with trivial inline returns are convenient points in the common - /// codegen pass pipeline where targets may insert passes. Methods with - /// out-of-line standard implementations are major CodeGen stages called by - /// addMachinePasses. Some targets may override major stages when inserting - /// passes is insufficient, but maintaining overriden stages is more work. - /// - - /// addPreISelPasses - This method should add any "last minute" LLVM->LLVM - /// passes (which are run just before instruction selector). - virtual bool addPreISel() { - return true; - } - - /// addMachineSSAOptimization - Add standard passes that optimize machine - /// instructions in SSA form. - virtual void addMachineSSAOptimization(); - - /// Add passes that optimize instruction level parallelism for out-of-order - /// targets. These passes are run while the machine code is still in SSA - /// form, so they can use MachineTraceMetrics to control their heuristics. - /// - /// All passes added here should preserve the MachineDominatorTree, - /// MachineLoopInfo, and MachineTraceMetrics analyses. - virtual bool addILPOpts() { - return false; - } - - /// This method may be implemented by targets that want to run passes - /// immediately before register allocation. - virtual void addPreRegAlloc() { } - - /// createTargetRegisterAllocator - Create the register allocator pass for - /// this target at the current optimization level. - virtual FunctionPass *createTargetRegisterAllocator(bool Optimized); - - /// addFastRegAlloc - Add the minimum set of target-independent passes that - /// are required for fast register allocation. - virtual void addFastRegAlloc(FunctionPass *RegAllocPass); - - /// addOptimizedRegAlloc - Add passes related to register allocation. - /// LLVMTargetMachine provides standard regalloc passes for most targets. - virtual void addOptimizedRegAlloc(FunctionPass *RegAllocPass); - - /// addPreRewrite - Add passes to the optimized register allocation pipeline - /// after register allocation is complete, but before virtual registers are - /// rewritten to physical registers. - /// - /// These passes must preserve VirtRegMap and LiveIntervals, and when running - /// after RABasic or RAGreedy, they should take advantage of LiveRegMatrix. - /// When these passes run, VirtRegMap contains legal physreg assignments for - /// all virtual registers. - virtual bool addPreRewrite() { - return false; - } - - /// This method may be implemented by targets that want to run passes after - /// register allocation pass pipeline but before prolog-epilog insertion. - virtual void addPostRegAlloc() { } - - /// Add passes that optimize machine instructions after register allocation. - virtual void addMachineLateOptimization(); - - /// This method may be implemented by targets that want to run passes after - /// prolog-epilog insertion and before the second instruction scheduling pass. - virtual void addPreSched2() { } - - /// addGCPasses - Add late codegen passes that analyze code for garbage - /// collection. This should return true if GC info should be printed after - /// these passes. - virtual bool addGCPasses(); - - /// Add standard basic block placement passes. - virtual void addBlockPlacement(); - - /// This pass may be implemented by targets that want to run passes - /// immediately before machine code is emitted. - virtual void addPreEmitPass() { } - - /// Utilities for targets to add passes to the pass manager. - /// - - /// Add a CodeGen pass at this point in the pipeline after checking overrides. - /// Return the pass that was added, or zero if no pass was added. - /// @p printAfter if true and adding a machine function pass add an extra - /// machine printer pass afterwards - /// @p verifyAfter if true and adding a machine function pass add an extra - /// machine verification pass afterwards. - AnalysisID addPass(AnalysisID PassID, bool verifyAfter = true, - bool printAfter = true); - - /// Add a pass to the PassManager if that pass is supposed to be run, as - /// determined by the StartAfter and StopAfter options. Takes ownership of the - /// pass. - /// @p printAfter if true and adding a machine function pass add an extra - /// machine printer pass afterwards - /// @p verifyAfter if true and adding a machine function pass add an extra - /// machine verification pass afterwards. - void addPass(Pass *P, bool verifyAfter = true, bool printAfter = true); - - /// addMachinePasses helper to create the target-selected or overriden - /// regalloc pass. - FunctionPass *createRegAllocPass(bool Optimized); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/TargetSchedule.h b/llvm/include/llvm/CodeGen/TargetSchedule.h deleted file mode 100644 index 81054aba..00000000 --- a/llvm/include/llvm/CodeGen/TargetSchedule.h +++ /dev/null @@ -1,190 +0,0 @@ -//===-- llvm/CodeGen/TargetSchedule.h - Sched Machine Model -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a wrapper around MCSchedModel that allows the interface to -// benefit from information currently only available in TargetInstrInfo. -// Ideally, the scheduling interface would be fully defined in the MC layer. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_TARGETSCHEDULE_H -#define LLVM_CODEGEN_TARGETSCHEDULE_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/MC/MCInstrItineraries.h" -#include "llvm/MC/MCSchedule.h" -#include "llvm/Target/TargetSubtargetInfo.h" - -namespace llvm { - -class TargetRegisterInfo; -class TargetSubtargetInfo; -class TargetInstrInfo; -class MachineInstr; - -/// Provide an instruction scheduling machine model to CodeGen passes. -class TargetSchedModel { - // For efficiency, hold a copy of the statically defined MCSchedModel for this - // processor. - MCSchedModel SchedModel; - InstrItineraryData InstrItins; - const TargetSubtargetInfo *STI; - const TargetInstrInfo *TII; - - SmallVector ResourceFactors; - unsigned MicroOpFactor; // Multiply to normalize microops to resource units. - unsigned ResourceLCM; // Resource units per cycle. Latency normalization factor. - - unsigned computeInstrLatency(const MCSchedClassDesc &SCDesc) const; - -public: - TargetSchedModel(): SchedModel(MCSchedModel::GetDefaultSchedModel()), STI(nullptr), TII(nullptr) {} - - /// \brief Initialize the machine model for instruction scheduling. - /// - /// The machine model API keeps a copy of the top-level MCSchedModel table - /// indices and may query TargetSubtargetInfo and TargetInstrInfo to resolve - /// dynamic properties. - void init(const MCSchedModel &sm, const TargetSubtargetInfo *sti, - const TargetInstrInfo *tii); - - /// Return the MCSchedClassDesc for this instruction. - const MCSchedClassDesc *resolveSchedClass(const MachineInstr *MI) const; - - /// \brief TargetInstrInfo getter. - const TargetInstrInfo *getInstrInfo() const { return TII; } - - /// \brief Return true if this machine model includes an instruction-level - /// scheduling model. - /// - /// This is more detailed than the course grain IssueWidth and default - /// latency properties, but separate from the per-cycle itinerary data. - bool hasInstrSchedModel() const; - - const MCSchedModel *getMCSchedModel() const { return &SchedModel; } - - /// \brief Return true if this machine model includes cycle-to-cycle itinerary - /// data. - /// - /// This models scheduling at each stage in the processor pipeline. - bool hasInstrItineraries() const; - - const InstrItineraryData *getInstrItineraries() const { - if (hasInstrItineraries()) - return &InstrItins; - return nullptr; - } - - /// \brief Return true if this machine model includes an instruction-level - /// scheduling model or cycle-to-cycle itinerary data. - bool hasInstrSchedModelOrItineraries() const { - return hasInstrSchedModel() || hasInstrItineraries(); - } - - /// \brief Identify the processor corresponding to the current subtarget. - unsigned getProcessorID() const { return SchedModel.getProcessorID(); } - - /// \brief Maximum number of micro-ops that may be scheduled per cycle. - unsigned getIssueWidth() const { return SchedModel.IssueWidth; } - - /// \brief Return the number of issue slots required for this MI. - unsigned getNumMicroOps(const MachineInstr *MI, - const MCSchedClassDesc *SC = nullptr) const; - - /// \brief Get the number of kinds of resources for this target. - unsigned getNumProcResourceKinds() const { - return SchedModel.getNumProcResourceKinds(); - } - - /// \brief Get a processor resource by ID for convenience. - const MCProcResourceDesc *getProcResource(unsigned PIdx) const { - return SchedModel.getProcResource(PIdx); - } - -#ifndef NDEBUG - const char *getResourceName(unsigned PIdx) const { - if (!PIdx) - return "MOps"; - return SchedModel.getProcResource(PIdx)->Name; - } -#endif - - typedef const MCWriteProcResEntry *ProcResIter; - - // \brief Get an iterator into the processor resources consumed by this - // scheduling class. - ProcResIter getWriteProcResBegin(const MCSchedClassDesc *SC) const { - // The subtarget holds a single resource table for all processors. - return STI->getWriteProcResBegin(SC); - } - ProcResIter getWriteProcResEnd(const MCSchedClassDesc *SC) const { - return STI->getWriteProcResEnd(SC); - } - - /// \brief Multiply the number of units consumed for a resource by this factor - /// to normalize it relative to other resources. - unsigned getResourceFactor(unsigned ResIdx) const { - return ResourceFactors[ResIdx]; - } - - /// \brief Multiply number of micro-ops by this factor to normalize it - /// relative to other resources. - unsigned getMicroOpFactor() const { - return MicroOpFactor; - } - - /// \brief Multiply cycle count by this factor to normalize it relative to - /// other resources. This is the number of resource units per cycle. - unsigned getLatencyFactor() const { - return ResourceLCM; - } - - /// \brief Number of micro-ops that may be buffered for OOO execution. - unsigned getMicroOpBufferSize() const { return SchedModel.MicroOpBufferSize; } - - /// \brief Number of resource units that may be buffered for OOO execution. - /// \return The buffer size in resource units or -1 for unlimited. - int getResourceBufferSize(unsigned PIdx) const { - return SchedModel.getProcResource(PIdx)->BufferSize; - } - - /// \brief Compute operand latency based on the available machine model. - /// - /// Compute and return the latency of the given data dependent def and use - /// when the operand indices are already known. UseMI may be NULL for an - /// unknown user. - unsigned computeOperandLatency(const MachineInstr *DefMI, unsigned DefOperIdx, - const MachineInstr *UseMI, unsigned UseOperIdx) - const; - - /// \brief Compute the instruction latency based on the available machine - /// model. - /// - /// Compute and return the expected latency of this instruction independent of - /// a particular use. computeOperandLatency is the preferred API, but this is - /// occasionally useful to help estimate instruction cost. - /// - /// If UseDefaultDefLatency is false and no new machine sched model is - /// present this method falls back to TII->getInstrLatency with an empty - /// instruction itinerary (this is so we preserve the previous behavior of the - /// if converter after moving it to TargetSchedModel). - unsigned computeInstrLatency(const MachineInstr *MI, - bool UseDefaultDefLatency = true) const; - unsigned computeInstrLatency(unsigned Opcode) const; - - /// \brief Output dependency latency of a pair of defs of the same register. - /// - /// This is typically one cycle. - unsigned computeOutputLatency(const MachineInstr *DefMI, unsigned DefIdx, - const MachineInstr *DepMI) const; -}; - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/CodeGen/UnreachableBlockElim.h b/llvm/include/llvm/CodeGen/UnreachableBlockElim.h deleted file mode 100644 index 3e7afd4c..00000000 --- a/llvm/include/llvm/CodeGen/UnreachableBlockElim.h +++ /dev/null @@ -1,37 +0,0 @@ -//===-- UnreachableBlockElim.h - Remove unreachable blocks for codegen --===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This pass is an extremely simple version of the SimplifyCFG pass. Its sole -// job is to delete LLVM basic blocks that are not reachable from the entry -// node. To do this, it performs a simple depth first traversal of the CFG, -// then deletes any unvisited nodes. -// -// Note that this pass is really a hack. In particular, the instruction -// selectors for various targets should just not generate code for unreachable -// blocks. Until LLVM has a more systematic way of defining instruction -// selectors, however, we cannot really expect them to handle additional -// complexity. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_CODEGEN_UNREACHABLEBLOCKELIM_H -#define LLVM_LIB_CODEGEN_UNREACHABLEBLOCKELIM_H - -#include "llvm/IR/PassManager.h" - -namespace llvm { - -class UnreachableBlockElimPass - : public PassInfoMixin { -public: - PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); -}; -} // end namespace llvm - -#endif // LLVM_LIB_CODEGEN_UNREACHABLEBLOCKELIM_H diff --git a/llvm/include/llvm/CodeGen/ValueTypes.h b/llvm/include/llvm/CodeGen/ValueTypes.h deleted file mode 100644 index 524a9080..00000000 --- a/llvm/include/llvm/CodeGen/ValueTypes.h +++ /dev/null @@ -1,392 +0,0 @@ -//===- CodeGen/ValueTypes.h - Low-Level Target independ. types --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the set of low-level target independent types which various -// values in the code generator are. This allows the target specific behavior -// of instructions to be described to target independent passes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_VALUETYPES_H -#define LLVM_CODEGEN_VALUETYPES_H - -#include "llvm/CodeGen/MachineValueType.h" -#include -#include - -namespace llvm { - - class LLVMContext; - class Type; - - /// EVT - Extended Value Type. Capable of holding value types which are not - /// native for any processor (such as the i12345 type), as well as the types - /// a MVT can represent. - struct EVT { - private: - MVT V; - Type *LLVMTy; - - public: - LLVM_CONSTEXPR EVT() : V(MVT::INVALID_SIMPLE_VALUE_TYPE), LLVMTy(nullptr) {} - LLVM_CONSTEXPR EVT(MVT::SimpleValueType SVT) : V(SVT), LLVMTy(nullptr) {} - LLVM_CONSTEXPR EVT(MVT S) : V(S), LLVMTy(nullptr) {} - - bool operator==(EVT VT) const { - return !(*this != VT); - } - bool operator!=(EVT VT) const { - if (V.SimpleTy != VT.V.SimpleTy) - return true; - if (V.SimpleTy < 0) - return LLVMTy != VT.LLVMTy; - return false; - } - - /// getFloatingPointVT - Returns the EVT that represents a floating point - /// type with the given number of bits. There are two floating point types - /// with 128 bits - this returns f128 rather than ppcf128. - static EVT getFloatingPointVT(unsigned BitWidth) { - return MVT::getFloatingPointVT(BitWidth); - } - - /// getIntegerVT - Returns the EVT that represents an integer with the given - /// number of bits. - static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth) { - MVT M = MVT::getIntegerVT(BitWidth); - if (M.SimpleTy >= 0) - return M; - return getExtendedIntegerVT(Context, BitWidth); - } - - /// getVectorVT - Returns the EVT that represents a vector NumElements in - /// length, where each element is of type VT. - static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements) { - MVT M = MVT::getVectorVT(VT.V, NumElements); - if (M.SimpleTy >= 0) - return M; - return getExtendedVectorVT(Context, VT, NumElements); - } - - /// changeVectorElementTypeToInteger - Return a vector with the same number - /// of elements as this vector, but with the element type converted to an - /// integer type with the same bitwidth. - EVT changeVectorElementTypeToInteger() const { - if (!isSimple()) - return changeExtendedVectorElementTypeToInteger(); - MVT EltTy = getSimpleVT().getVectorElementType(); - unsigned BitWidth = EltTy.getSizeInBits(); - MVT IntTy = MVT::getIntegerVT(BitWidth); - MVT VecTy = MVT::getVectorVT(IntTy, getVectorNumElements()); - assert(VecTy.SimpleTy >= 0 && - "Simple vector VT not representable by simple integer vector VT!"); - return VecTy; - } - - /// Return the type converted to an equivalently sized integer or vector - /// with integer element type. Similar to changeVectorElementTypeToInteger, - /// but also handles scalars. - EVT changeTypeToInteger() { - if (isVector()) - return changeVectorElementTypeToInteger(); - - if (isSimple()) - return MVT::getIntegerVT(getSizeInBits()); - - return changeExtendedTypeToInteger(); - } - - /// isSimple - Test if the given EVT is simple (as opposed to being - /// extended). - bool isSimple() const { - return V.SimpleTy >= 0; - } - - /// isExtended - Test if the given EVT is extended (as opposed to - /// being simple). - bool isExtended() const { - return !isSimple(); - } - - /// isFloatingPoint - Return true if this is a FP, or a vector FP type. - bool isFloatingPoint() const { - return isSimple() ? V.isFloatingPoint() : isExtendedFloatingPoint(); - } - - /// isInteger - Return true if this is an integer, or a vector integer type. - bool isInteger() const { - return isSimple() ? V.isInteger() : isExtendedInteger(); - } - - /// isScalarInteger - Return true if this is an integer, but not a vector. - bool isScalarInteger() const { - return isSimple() ? V.isScalarInteger() : isExtendedScalarInteger(); - } - - /// isVector - Return true if this is a vector value type. - bool isVector() const { - return isSimple() ? V.isVector() : isExtendedVector(); - } - - /// is16BitVector - Return true if this is a 16-bit vector type. - bool is16BitVector() const { - return isSimple() ? V.is16BitVector() : isExtended16BitVector(); - } - - /// is32BitVector - Return true if this is a 32-bit vector type. - bool is32BitVector() const { - return isSimple() ? V.is32BitVector() : isExtended32BitVector(); - } - - /// is64BitVector - Return true if this is a 64-bit vector type. - bool is64BitVector() const { - return isSimple() ? V.is64BitVector() : isExtended64BitVector(); - } - - /// is128BitVector - Return true if this is a 128-bit vector type. - bool is128BitVector() const { - return isSimple() ? V.is128BitVector() : isExtended128BitVector(); - } - - /// is256BitVector - Return true if this is a 256-bit vector type. - bool is256BitVector() const { - return isSimple() ? V.is256BitVector() : isExtended256BitVector(); - } - - /// is512BitVector - Return true if this is a 512-bit vector type. - bool is512BitVector() const { - return isSimple() ? V.is512BitVector() : isExtended512BitVector(); - } - - /// is1024BitVector - Return true if this is a 1024-bit vector type. - bool is1024BitVector() const { - return isSimple() ? V.is1024BitVector() : isExtended1024BitVector(); - } - - /// is2048BitVector - Return true if this is a 2048-bit vector type. - bool is2048BitVector() const { - return isSimple() ? V.is2048BitVector() : isExtended2048BitVector(); - } - - /// isOverloaded - Return true if this is an overloaded type for TableGen. - bool isOverloaded() const { - return (V==MVT::iAny || V==MVT::fAny || V==MVT::vAny || V==MVT::iPTRAny); - } - - /// isByteSized - Return true if the bit size is a multiple of 8. - bool isByteSized() const { - return (getSizeInBits() & 7) == 0; - } - - /// isRound - Return true if the size is a power-of-two number of bytes. - bool isRound() const { - unsigned BitSize = getSizeInBits(); - return BitSize >= 8 && !(BitSize & (BitSize - 1)); - } - - /// bitsEq - Return true if this has the same number of bits as VT. - bool bitsEq(EVT VT) const { - if (EVT::operator==(VT)) return true; - return getSizeInBits() == VT.getSizeInBits(); - } - - /// bitsGT - Return true if this has more bits than VT. - bool bitsGT(EVT VT) const { - if (EVT::operator==(VT)) return false; - return getSizeInBits() > VT.getSizeInBits(); - } - - /// bitsGE - Return true if this has no less bits than VT. - bool bitsGE(EVT VT) const { - if (EVT::operator==(VT)) return true; - return getSizeInBits() >= VT.getSizeInBits(); - } - - /// bitsLT - Return true if this has less bits than VT. - bool bitsLT(EVT VT) const { - if (EVT::operator==(VT)) return false; - return getSizeInBits() < VT.getSizeInBits(); - } - - /// bitsLE - Return true if this has no more bits than VT. - bool bitsLE(EVT VT) const { - if (EVT::operator==(VT)) return true; - return getSizeInBits() <= VT.getSizeInBits(); - } - - - /// getSimpleVT - Return the SimpleValueType held in the specified - /// simple EVT. - MVT getSimpleVT() const { - assert(isSimple() && "Expected a SimpleValueType!"); - return V; - } - - /// getScalarType - If this is a vector type, return the element type, - /// otherwise return this. - EVT getScalarType() const { - return isVector() ? getVectorElementType() : *this; - } - - /// getVectorElementType - Given a vector type, return the type of - /// each element. - EVT getVectorElementType() const { - assert(isVector() && "Invalid vector type!"); - if (isSimple()) - return V.getVectorElementType(); - return getExtendedVectorElementType(); - } - - /// getVectorNumElements - Given a vector type, return the number of - /// elements it contains. - unsigned getVectorNumElements() const { - assert(isVector() && "Invalid vector type!"); - if (isSimple()) - return V.getVectorNumElements(); - return getExtendedVectorNumElements(); - } - - /// getSizeInBits - Return the size of the specified value type in bits. - unsigned getSizeInBits() const { - if (isSimple()) - return V.getSizeInBits(); - return getExtendedSizeInBits(); - } - - unsigned getScalarSizeInBits() const { - return getScalarType().getSizeInBits(); - } - - /// getStoreSize - Return the number of bytes overwritten by a store - /// of the specified value type. - unsigned getStoreSize() const { - return (getSizeInBits() + 7) / 8; - } - - /// getStoreSizeInBits - Return the number of bits overwritten by a store - /// of the specified value type. - unsigned getStoreSizeInBits() const { - return getStoreSize() * 8; - } - - /// getRoundIntegerType - Rounds the bit-width of the given integer EVT up - /// to the nearest power of two (and at least to eight), and returns the - /// integer EVT with that number of bits. - EVT getRoundIntegerType(LLVMContext &Context) const { - assert(isInteger() && !isVector() && "Invalid integer type!"); - unsigned BitWidth = getSizeInBits(); - if (BitWidth <= 8) - return EVT(MVT::i8); - return getIntegerVT(Context, 1 << Log2_32_Ceil(BitWidth)); - } - - /// getHalfSizedIntegerVT - Finds the smallest simple value type that is - /// greater than or equal to half the width of this EVT. If no simple - /// value type can be found, an extended integer value type of half the - /// size (rounded up) is returned. - EVT getHalfSizedIntegerVT(LLVMContext &Context) const { - assert(isInteger() && !isVector() && "Invalid integer type!"); - unsigned EVTSize = getSizeInBits(); - for (unsigned IntVT = MVT::FIRST_INTEGER_VALUETYPE; - IntVT <= MVT::LAST_INTEGER_VALUETYPE; ++IntVT) { - EVT HalfVT = EVT((MVT::SimpleValueType)IntVT); - if (HalfVT.getSizeInBits() * 2 >= EVTSize) - return HalfVT; - } - return getIntegerVT(Context, (EVTSize + 1) / 2); - } - - /// \brief Return a VT for an integer vector type with the size of the - /// elements doubled. The typed returned may be an extended type. - EVT widenIntegerVectorElementType(LLVMContext &Context) const { - EVT EltVT = getVectorElementType(); - EltVT = EVT::getIntegerVT(Context, 2 * EltVT.getSizeInBits()); - return EVT::getVectorVT(Context, EltVT, getVectorNumElements()); - } - - /// isPow2VectorType - Returns true if the given vector is a power of 2. - bool isPow2VectorType() const { - unsigned NElts = getVectorNumElements(); - return !(NElts & (NElts - 1)); - } - - /// getPow2VectorType - Widens the length of the given vector EVT up to - /// the nearest power of 2 and returns that type. - EVT getPow2VectorType(LLVMContext &Context) const { - if (!isPow2VectorType()) { - unsigned NElts = getVectorNumElements(); - unsigned Pow2NElts = 1 << Log2_32_Ceil(NElts); - return EVT::getVectorVT(Context, getVectorElementType(), Pow2NElts); - } - else { - return *this; - } - } - - /// getEVTString - This function returns value type as a string, - /// e.g. "i32". - std::string getEVTString() const; - - /// getTypeForEVT - This method returns an LLVM type corresponding to the - /// specified EVT. For integer types, this returns an unsigned type. Note - /// that this will abort for types that cannot be represented. - Type *getTypeForEVT(LLVMContext &Context) const; - - /// getEVT - Return the value type corresponding to the specified type. - /// This returns all pointers as iPTR. If HandleUnknown is true, unknown - /// types are returned as Other, otherwise they are invalid. - static EVT getEVT(Type *Ty, bool HandleUnknown = false); - - intptr_t getRawBits() const { - if (isSimple()) - return V.SimpleTy; - else - return (intptr_t)(LLVMTy); - } - - /// compareRawBits - A meaningless but well-behaved order, useful for - /// constructing containers. - struct compareRawBits { - bool operator()(EVT L, EVT R) const { - if (L.V.SimpleTy == R.V.SimpleTy) - return L.LLVMTy < R.LLVMTy; - else - return L.V.SimpleTy < R.V.SimpleTy; - } - }; - - private: - // Methods for handling the Extended-type case in functions above. - // These are all out-of-line to prevent users of this header file - // from having a dependency on Type.h. - EVT changeExtendedTypeToInteger() const; - EVT changeExtendedVectorElementTypeToInteger() const; - static EVT getExtendedIntegerVT(LLVMContext &C, unsigned BitWidth); - static EVT getExtendedVectorVT(LLVMContext &C, EVT VT, - unsigned NumElements); - bool isExtendedFloatingPoint() const LLVM_READONLY; - bool isExtendedInteger() const LLVM_READONLY; - bool isExtendedScalarInteger() const LLVM_READONLY; - bool isExtendedVector() const LLVM_READONLY; - bool isExtended16BitVector() const LLVM_READONLY; - bool isExtended32BitVector() const LLVM_READONLY; - bool isExtended64BitVector() const LLVM_READONLY; - bool isExtended128BitVector() const LLVM_READONLY; - bool isExtended256BitVector() const LLVM_READONLY; - bool isExtended512BitVector() const LLVM_READONLY; - bool isExtended1024BitVector() const LLVM_READONLY; - bool isExtended2048BitVector() const LLVM_READONLY; - EVT getExtendedVectorElementType() const; - unsigned getExtendedVectorNumElements() const LLVM_READONLY; - unsigned getExtendedSizeInBits() const LLVM_READONLY; - }; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/ValueTypes.td b/llvm/include/llvm/CodeGen/ValueTypes.td deleted file mode 100644 index f7b1661d..00000000 --- a/llvm/include/llvm/CodeGen/ValueTypes.td +++ /dev/null @@ -1,119 +0,0 @@ -//===- ValueTypes.td - ValueType definitions ---------------*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Value types - These values correspond to the register types defined in the -// ValueTypes.h file. If you update anything here, you must update it there as -// well! -// -//===----------------------------------------------------------------------===// - -class ValueType { - string Namespace = "MVT"; - int Size = size; - int Value = value; -} - -def OtherVT: ValueType<0 , 0>; // "Other" value -def i1 : ValueType<1 , 1>; // One bit boolean value -def i8 : ValueType<8 , 2>; // 8-bit integer value -def i16 : ValueType<16 , 3>; // 16-bit integer value -def i32 : ValueType<32 , 4>; // 32-bit integer value -def i64 : ValueType<64 , 5>; // 64-bit integer value -def i128 : ValueType<128, 6>; // 128-bit integer value -def f16 : ValueType<16 , 7>; // 16-bit floating point value -def f32 : ValueType<32 , 8>; // 32-bit floating point value -def f64 : ValueType<64 , 9>; // 64-bit floating point value -def f80 : ValueType<80 , 10>; // 80-bit floating point value -def f128 : ValueType<128, 11>; // 128-bit floating point value -def ppcf128: ValueType<128, 12>; // PPC 128-bit floating point value - -def v2i1 : ValueType<2 , 13>; // 2 x i1 vector value -def v4i1 : ValueType<4 , 14>; // 4 x i1 vector value -def v8i1 : ValueType<8 , 15>; // 8 x i1 vector value -def v16i1 : ValueType<16, 16>; // 16 x i1 vector value -def v32i1 : ValueType<32 , 17>; // 32 x i1 vector value -def v64i1 : ValueType<64 , 18>; // 64 x i1 vector value -def v512i1 : ValueType<512, 19>; // 512 x i1 vector value -def v1024i1: ValueType<1024,20>; //1024 x i1 vector value - -def v1i8 : ValueType<16, 21>; // 1 x i8 vector value -def v2i8 : ValueType<16 , 22>; // 2 x i8 vector value -def v4i8 : ValueType<32 , 23>; // 4 x i8 vector value -def v8i8 : ValueType<64 , 24>; // 8 x i8 vector value -def v16i8 : ValueType<128, 25>; // 16 x i8 vector value -def v32i8 : ValueType<256, 26>; // 32 x i8 vector value -def v64i8 : ValueType<512, 27>; // 64 x i8 vector value -def v128i8 : ValueType<1024,28>; //128 x i8 vector value -def v256i8 : ValueType<2048,29>; //256 x i8 vector value - -def v1i16 : ValueType<16 , 30>; // 1 x i16 vector value -def v2i16 : ValueType<32 , 31>; // 2 x i16 vector value -def v4i16 : ValueType<64 , 32>; // 4 x i16 vector value -def v8i16 : ValueType<128, 33>; // 8 x i16 vector value -def v16i16 : ValueType<256, 34>; // 16 x i16 vector value -def v32i16 : ValueType<512, 35>; // 32 x i16 vector value -def v64i16 : ValueType<1024,36>; // 64 x i16 vector value -def v128i16: ValueType<2048,37>; //128 x i16 vector value - -def v1i32 : ValueType<32 , 38>; // 1 x i32 vector value -def v2i32 : ValueType<64 , 39>; // 2 x i32 vector value -def v4i32 : ValueType<128, 40>; // 4 x i32 vector value -def v8i32 : ValueType<256, 41>; // 8 x i32 vector value -def v16i32 : ValueType<512, 42>; // 16 x i32 vector value -def v32i32 : ValueType<1024,43>; // 32 x i32 vector value -def v64i32 : ValueType<2048,44>; // 32 x i32 vector value - -def v1i64 : ValueType<64 , 45>; // 1 x i64 vector value -def v2i64 : ValueType<128, 46>; // 2 x i64 vector value -def v4i64 : ValueType<256, 47>; // 4 x i64 vector value -def v8i64 : ValueType<512, 48>; // 8 x i64 vector value -def v16i64 : ValueType<1024,49>; // 16 x i64 vector value -def v32i64 : ValueType<2048,50>; // 32 x i64 vector value - -def v1i128 : ValueType<128, 51>; // 1 x i128 vector value - -def v2f16 : ValueType<32 , 52>; // 2 x f16 vector value -def v4f16 : ValueType<64 , 53>; // 4 x f16 vector value -def v8f16 : ValueType<128, 54>; // 8 x f16 vector value -def v1f32 : ValueType<32 , 55>; // 1 x f32 vector value -def v2f32 : ValueType<64 , 56>; // 2 x f32 vector value -def v4f32 : ValueType<128, 57>; // 4 x f32 vector value -def v8f32 : ValueType<256, 58>; // 8 x f32 vector value -def v16f32 : ValueType<512, 59>; // 16 x f32 vector value -def v1f64 : ValueType<64, 60>; // 1 x f64 vector value -def v2f64 : ValueType<128, 61>; // 2 x f64 vector value -def v4f64 : ValueType<256, 62>; // 4 x f64 vector value -def v8f64 : ValueType<512, 63>; // 8 x f64 vector value - - -def x86mmx : ValueType<64 , 64>; // X86 MMX value -def FlagVT : ValueType<0 , 65>; // Pre-RA sched glue -def isVoid : ValueType<0 , 66>; // Produces no value -def untyped: ValueType<8 , 67>; // Produces an untyped value -def token : ValueType<0 , 120>; // TokenTy -def MetadataVT: ValueType<0, 121>; // Metadata - -// Pseudo valuetype mapped to the current pointer size to any address space. -// Should only be used in TableGen. -def iPTRAny : ValueType<0, 122>; - -// Pseudo valuetype to represent "vector of any size" -def vAny : ValueType<0 , 123>; - -// Pseudo valuetype to represent "float of any format" -def fAny : ValueType<0 , 124>; - -// Pseudo valuetype to represent "integer of any bit width" -def iAny : ValueType<0 , 125>; - -// Pseudo valuetype mapped to the current pointer size. -def iPTR : ValueType<0 , 126>; - -// Pseudo valuetype to represent "any type of any size". -def Any : ValueType<0 , 127>; diff --git a/llvm/include/llvm/CodeGen/VirtRegMap.h b/llvm/include/llvm/CodeGen/VirtRegMap.h deleted file mode 100644 index d7e92094..00000000 --- a/llvm/include/llvm/CodeGen/VirtRegMap.h +++ /dev/null @@ -1,190 +0,0 @@ -//===-- llvm/CodeGen/VirtRegMap.h - Virtual Register Map -*- C++ -*--------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements a virtual register map. This maps virtual registers to -// physical registers and virtual registers to stack slots. It is created and -// updated by a register allocator and then used by a machine code rewriter that -// adds spill code and rewrites virtual into physical register references. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_VIRTREGMAP_H -#define LLVM_CODEGEN_VIRTREGMAP_H - -#include "llvm/ADT/IndexedMap.h" -#include "llvm/CodeGen/MachineFunctionPass.h" -#include "llvm/Target/TargetRegisterInfo.h" - -namespace llvm { - class MachineInstr; - class MachineFunction; - class MachineRegisterInfo; - class TargetInstrInfo; - class raw_ostream; - class SlotIndexes; - - class VirtRegMap : public MachineFunctionPass { - public: - enum { - NO_PHYS_REG = 0, - NO_STACK_SLOT = (1L << 30)-1, - MAX_STACK_SLOT = (1L << 18)-1 - }; - - private: - MachineRegisterInfo *MRI; - const TargetInstrInfo *TII; - const TargetRegisterInfo *TRI; - MachineFunction *MF; - - /// Virt2PhysMap - This is a virtual to physical register - /// mapping. Each virtual register is required to have an entry in - /// it; even spilled virtual registers (the register mapped to a - /// spilled register is the temporary used to load it from the - /// stack). - IndexedMap Virt2PhysMap; - - /// Virt2StackSlotMap - This is virtual register to stack slot - /// mapping. Each spilled virtual register has an entry in it - /// which corresponds to the stack slot this register is spilled - /// at. - IndexedMap Virt2StackSlotMap; - - /// Virt2SplitMap - This is virtual register to splitted virtual register - /// mapping. - IndexedMap Virt2SplitMap; - - /// createSpillSlot - Allocate a spill slot for RC from MFI. - unsigned createSpillSlot(const TargetRegisterClass *RC); - - VirtRegMap(const VirtRegMap&) = delete; - void operator=(const VirtRegMap&) = delete; - - public: - static char ID; - VirtRegMap() : MachineFunctionPass(ID), Virt2PhysMap(NO_PHYS_REG), - Virt2StackSlotMap(NO_STACK_SLOT), Virt2SplitMap(0) { } - bool runOnMachineFunction(MachineFunction &MF) override; - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - MachineFunctionPass::getAnalysisUsage(AU); - } - - MachineFunction &getMachineFunction() const { - assert(MF && "getMachineFunction called before runOnMachineFunction"); - return *MF; - } - - MachineRegisterInfo &getRegInfo() const { return *MRI; } - const TargetRegisterInfo &getTargetRegInfo() const { return *TRI; } - - void grow(); - - /// @brief returns true if the specified virtual register is - /// mapped to a physical register - bool hasPhys(unsigned virtReg) const { - return getPhys(virtReg) != NO_PHYS_REG; - } - - /// @brief returns the physical register mapped to the specified - /// virtual register - unsigned getPhys(unsigned virtReg) const { - assert(TargetRegisterInfo::isVirtualRegister(virtReg)); - return Virt2PhysMap[virtReg]; - } - - /// @brief creates a mapping for the specified virtual register to - /// the specified physical register - void assignVirt2Phys(unsigned virtReg, unsigned physReg) { - assert(TargetRegisterInfo::isVirtualRegister(virtReg) && - TargetRegisterInfo::isPhysicalRegister(physReg)); - assert(Virt2PhysMap[virtReg] == NO_PHYS_REG && - "attempt to assign physical register to already mapped " - "virtual register"); - Virt2PhysMap[virtReg] = physReg; - } - - /// @brief clears the specified virtual register's, physical - /// register mapping - void clearVirt(unsigned virtReg) { - assert(TargetRegisterInfo::isVirtualRegister(virtReg)); - assert(Virt2PhysMap[virtReg] != NO_PHYS_REG && - "attempt to clear a not assigned virtual register"); - Virt2PhysMap[virtReg] = NO_PHYS_REG; - } - - /// @brief clears all virtual to physical register mappings - void clearAllVirt() { - Virt2PhysMap.clear(); - grow(); - } - - /// @brief returns true if VirtReg is assigned to its preferred physreg. - bool hasPreferredPhys(unsigned VirtReg); - - /// @brief returns true if VirtReg has a known preferred register. - /// This returns false if VirtReg has a preference that is a virtual - /// register that hasn't been assigned yet. - bool hasKnownPreference(unsigned VirtReg); - - /// @brief records virtReg is a split live interval from SReg. - void setIsSplitFromReg(unsigned virtReg, unsigned SReg) { - Virt2SplitMap[virtReg] = SReg; - } - - /// @brief returns the live interval virtReg is split from. - unsigned getPreSplitReg(unsigned virtReg) const { - return Virt2SplitMap[virtReg]; - } - - /// getOriginal - Return the original virtual register that VirtReg descends - /// from through splitting. - /// A register that was not created by splitting is its own original. - /// This operation is idempotent. - unsigned getOriginal(unsigned VirtReg) const { - unsigned Orig = getPreSplitReg(VirtReg); - return Orig ? Orig : VirtReg; - } - - /// @brief returns true if the specified virtual register is not - /// mapped to a stack slot or rematerialized. - bool isAssignedReg(unsigned virtReg) const { - if (getStackSlot(virtReg) == NO_STACK_SLOT) - return true; - // Split register can be assigned a physical register as well as a - // stack slot or remat id. - return (Virt2SplitMap[virtReg] && Virt2PhysMap[virtReg] != NO_PHYS_REG); - } - - /// @brief returns the stack slot mapped to the specified virtual - /// register - int getStackSlot(unsigned virtReg) const { - assert(TargetRegisterInfo::isVirtualRegister(virtReg)); - return Virt2StackSlotMap[virtReg]; - } - - /// @brief create a mapping for the specifed virtual register to - /// the next available stack slot - int assignVirt2StackSlot(unsigned virtReg); - /// @brief create a mapping for the specified virtual register to - /// the specified stack slot - void assignVirt2StackSlot(unsigned virtReg, int frameIndex); - - void print(raw_ostream &OS, const Module* M = nullptr) const override; - void dump() const; - }; - - inline raw_ostream &operator<<(raw_ostream &OS, const VirtRegMap &VRM) { - VRM.print(OS); - return OS; - } -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/CodeGen/WinEHFuncInfo.h b/llvm/include/llvm/CodeGen/WinEHFuncInfo.h deleted file mode 100644 index dd730495..00000000 --- a/llvm/include/llvm/CodeGen/WinEHFuncInfo.h +++ /dev/null @@ -1,129 +0,0 @@ -//===-- llvm/CodeGen/WinEHFuncInfo.h ----------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Data structures and associated state for Windows exception handling schemes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_CODEGEN_WINEHFUNCINFO_H -#define LLVM_CODEGEN_WINEHFUNCINFO_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/PointerUnion.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/TinyPtrVector.h" -#include "llvm/IR/Instructions.h" - -namespace llvm { -class AllocaInst; -class BasicBlock; -class CatchReturnInst; -class Constant; -class Function; -class GlobalVariable; -class InvokeInst; -class IntrinsicInst; -class LandingPadInst; -class MCExpr; -class MCSymbol; -class MachineBasicBlock; -class Value; - -// The following structs respresent the .xdata tables for various -// Windows-related EH personalities. - -typedef PointerUnion MBBOrBasicBlock; - -struct CxxUnwindMapEntry { - int ToState; - MBBOrBasicBlock Cleanup; -}; - -/// Similar to CxxUnwindMapEntry, but supports SEH filters. -struct SEHUnwindMapEntry { - /// If unwinding continues through this handler, transition to the handler at - /// this state. This indexes into SEHUnwindMap. - int ToState = -1; - - bool IsFinally = false; - - /// Holds the filter expression function. - const Function *Filter = nullptr; - - /// Holds the __except or __finally basic block. - MBBOrBasicBlock Handler; -}; - -struct WinEHHandlerType { - int Adjectives; - /// The CatchObj starts out life as an LLVM alloca and is eventually turned - /// frame index. - union { - const AllocaInst *Alloca; - int FrameIndex; - } CatchObj = {}; - GlobalVariable *TypeDescriptor; - MBBOrBasicBlock Handler; -}; - -struct WinEHTryBlockMapEntry { - int TryLow = -1; - int TryHigh = -1; - int CatchHigh = -1; - SmallVector HandlerArray; -}; - -enum class ClrHandlerType { Catch, Finally, Fault, Filter }; - -struct ClrEHUnwindMapEntry { - MBBOrBasicBlock Handler; - uint32_t TypeToken; - int HandlerParentState; ///< Outer handler enclosing this entry's handler - int TryParentState; ///< Outer try region enclosing this entry's try region, - ///< treating later catches on same try as "outer" - ClrHandlerType HandlerType; -}; - -struct WinEHFuncInfo { - DenseMap EHPadStateMap; - DenseMap FuncletBaseStateMap; - DenseMap InvokeStateMap; - DenseMap> LabelToStateMap; - SmallVector CxxUnwindMap; - SmallVector TryBlockMap; - SmallVector SEHUnwindMap; - SmallVector ClrEHUnwindMap; - int UnwindHelpFrameIdx = INT_MAX; - int PSPSymFrameIdx = INT_MAX; - - int getLastStateNumber() const { return CxxUnwindMap.size() - 1; } - - void addIPToStateRange(const InvokeInst *II, MCSymbol *InvokeBegin, - MCSymbol *InvokeEnd); - - int EHRegNodeFrameIndex = INT_MAX; - int EHRegNodeEndOffset = INT_MAX; - int EHGuardFrameIndex = INT_MAX; - int SEHSetFrameOffset = INT_MAX; - - WinEHFuncInfo(); -}; - -/// Analyze the IR in ParentFn and it's handlers to build WinEHFuncInfo, which -/// describes the state numbers and tables used by __CxxFrameHandler3. This -/// analysis assumes that WinEHPrepare has already been run. -void calculateWinCXXEHStateNumbers(const Function *ParentFn, - WinEHFuncInfo &FuncInfo); - -void calculateSEHStateNumbers(const Function *ParentFn, - WinEHFuncInfo &FuncInfo); - -void calculateClrEHStateNumbers(const Function *Fn, WinEHFuncInfo &FuncInfo); -} -#endif // LLVM_CODEGEN_WINEHFUNCINFO_H diff --git a/llvm/include/llvm/Config/AsmParsers.def b/llvm/include/llvm/Config/AsmParsers.def deleted file mode 100644 index 2afa327e..00000000 --- a/llvm/include/llvm/Config/AsmParsers.def +++ /dev/null @@ -1,31 +0,0 @@ -/*===- llvm/Config/AsmParsers.def - LLVM Assembly Parsers -------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file enumerates all of the assembly-language parsers *| -|* supported by this build of LLVM. Clients of this file should define *| -|* the LLVM_ASM_PARSER macro to be a function-like macro with a *| -|* single parameter (the name of the target whose assembly can be *| -|* generated); including this file will then enumerate all of the *| -|* targets with assembly parsers. *| -|* *| -|* The set of targets supported by LLVM is generated at configuration *| -|* time, at which point this header is generated. Do not modify this *| -|* header directly. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_ASM_PARSER -# error Please define the macro LLVM_ASM_PARSER(TargetName) -#endif - -LLVM_ASM_PARSER(X86) -LLVM_ASM_PARSER(ARM) - - -#undef LLVM_ASM_PARSER diff --git a/llvm/include/llvm/Config/AsmPrinters.def b/llvm/include/llvm/Config/AsmPrinters.def deleted file mode 100644 index cf78b9cb..00000000 --- a/llvm/include/llvm/Config/AsmPrinters.def +++ /dev/null @@ -1,31 +0,0 @@ -/*===- llvm/Config/AsmPrinters.def - LLVM Assembly Printers -----*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file enumerates all of the assembly-language printers *| -|* supported by this build of LLVM. Clients of this file should define *| -|* the LLVM_ASM_PRINTER macro to be a function-like macro with a *| -|* single parameter (the name of the target whose assembly can be *| -|* generated); including this file will then enumerate all of the *| -|* targets with assembly printers. *| -|* *| -|* The set of targets supported by LLVM is generated at configuration *| -|* time, at which point this header is generated. Do not modify this *| -|* header directly. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_ASM_PRINTER -# error Please define the macro LLVM_ASM_PRINTER(TargetName) -#endif - -LLVM_ASM_PRINTER(X86) -LLVM_ASM_PRINTER(ARM) - - -#undef LLVM_ASM_PRINTER diff --git a/llvm/include/llvm/Config/Disassemblers.def b/llvm/include/llvm/Config/Disassemblers.def deleted file mode 100644 index 0f2bf949..00000000 --- a/llvm/include/llvm/Config/Disassemblers.def +++ /dev/null @@ -1,31 +0,0 @@ -/*===- llvm/Config/Disassemblers.def - LLVM Assembly Parsers ----*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file enumerates all of the assembly-language parsers *| -|* supported by this build of LLVM. Clients of this file should define *| -|* the LLVM_DISASSEMBLER macro to be a function-like macro with a *| -|* single parameter (the name of the target whose assembly can be *| -|* generated); including this file will then enumerate all of the *| -|* targets with assembly parsers. *| -|* *| -|* The set of targets supported by LLVM is generated at configuration *| -|* time, at which point this header is generated. Do not modify this *| -|* header directly. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_DISASSEMBLER -# error Please define the macro LLVM_DISASSEMBLER(TargetName) -#endif - -LLVM_DISASSEMBLER(X86) -LLVM_DISASSEMBLER(ARM) - - -#undef LLVM_DISASSEMBLER diff --git a/llvm/include/llvm/Config/Targets.def b/llvm/include/llvm/Config/Targets.def deleted file mode 100644 index e3daeb72..00000000 --- a/llvm/include/llvm/Config/Targets.def +++ /dev/null @@ -1,30 +0,0 @@ -/*===- llvm/Config/Targets.def - LLVM Target Architectures ------*- C++ -*-===*\ -|* *| -|* The LLVM Compiler Infrastructure *| -|* *| -|* This file is distributed under the University of Illinois Open Source *| -|* License. See LICENSE.TXT for details. *| -|* *| -|*===----------------------------------------------------------------------===*| -|* *| -|* This file enumerates all of the target architectures supported by *| -|* this build of LLVM. Clients of this file should define the *| -|* LLVM_TARGET macro to be a function-like macro with a single *| -|* parameter (the name of the target); including this file will then *| -|* enumerate all of the targets. *| -|* *| -|* The set of targets supported by LLVM is generated at configuration *| -|* time, at which point this header is generated. Do not modify this *| -|* header directly. *| -|* *| -\*===----------------------------------------------------------------------===*/ - -#ifndef LLVM_TARGET -# error Please define the macro LLVM_TARGET(TargetName) -#endif - -LLVM_TARGET(X86) -LLVM_TARGET(ARM) - - -#undef LLVM_TARGET diff --git a/llvm/include/llvm/Config/llvm-config.h b/llvm/include/llvm/Config/llvm-config.h deleted file mode 100644 index 2b4aa476..00000000 --- a/llvm/include/llvm/Config/llvm-config.h +++ /dev/null @@ -1,108 +0,0 @@ -/*===------- llvm/Config/llvm-config.h - llvm configuration -------*- C -*-===*/ -/* */ -/* The LLVM Compiler Infrastructure */ -/* */ -/* This file is distributed under the University of Illinois Open Source */ -/* License. See LICENSE.TXT for details. */ -/* */ -/*===----------------------------------------------------------------------===*/ - -/* This file enumerates variables from the LLVM configuration so that they - can be in exported headers and won't override package specific directives. - This is a C header that can be included in the llvm-c headers. */ - -#ifndef LLVM_CONFIG_H -#define LLVM_CONFIG_H - -/* Installation directory for binary executables */ -/* #undef LLVM_BINDIR */ - -/* Time at which LLVM was configured */ -/* #undef LLVM_CONFIGTIME */ - -/* Installation directory for data files */ -/* #undef LLVM_DATADIR */ - -/* Target triple LLVM will generate code for by default */ -#define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-apple-darwin16.3.0" - -/* Installation directory for documentation */ -/* #undef LLVM_DOCSDIR */ - -/* Define if LLVM is built with asserts and checks that change the layout of - client-visible data structures. */ -/* #undef LLVM_ENABLE_ABI_BREAKING_CHECKS */ - -/* Define if threads enabled */ -#define LLVM_ENABLE_THREADS 1 - -/* Installation directory for config files */ -/* #undef LLVM_ETCDIR */ - -/* Has gcc/MSVC atomic intrinsics */ -#define LLVM_HAS_ATOMICS 1 - -/* Host triple LLVM will be executed on */ -#define LLVM_HOST_TRIPLE "x86_64-apple-darwin16.3.0" - -/* Installation directory for include files */ -/* #undef LLVM_INCLUDEDIR */ - -/* Installation directory for .info files */ -/* #undef LLVM_INFODIR */ - -/* Installation directory for man pages */ -/* #undef LLVM_MANDIR */ - -/* LLVM architecture name for the native architecture, if available */ -#define LLVM_NATIVE_ARCH X86 - -/* LLVM name for the native AsmParser init function, if available */ -#define LLVM_NATIVE_ASMPARSER LLVMInitializeX86AsmParser - -/* LLVM name for the native AsmPrinter init function, if available */ -#define LLVM_NATIVE_ASMPRINTER LLVMInitializeX86AsmPrinter - -/* LLVM name for the native Disassembler init function, if available */ -#define LLVM_NATIVE_DISASSEMBLER LLVMInitializeX86Disassembler - -/* LLVM name for the native Target init function, if available */ -#define LLVM_NATIVE_TARGET LLVMInitializeX86Target - -/* LLVM name for the native TargetInfo init function, if available */ -#define LLVM_NATIVE_TARGETINFO LLVMInitializeX86TargetInfo - -/* LLVM name for the native target MC init function, if available */ -#define LLVM_NATIVE_TARGETMC LLVMInitializeX86TargetMC - -/* Define if this is Unixish platform */ -#define LLVM_ON_UNIX 1 - -/* Define if this is Win32ish platform */ -/* #undef LLVM_ON_WIN32 */ - -/* Installation prefix directory */ -#define LLVM_PREFIX "/usr/local" - -/* Define if we have the Intel JIT API runtime support library */ -/* #undef LLVM_USE_INTEL_JITEVENTS */ - -/* Define if we have the oprofile JIT-support library */ -/* #undef LLVM_USE_OPROFILE */ - -/* Major version of the LLVM API */ -#define LLVM_VERSION_MAJOR 3 - -/* Minor version of the LLVM API */ -#define LLVM_VERSION_MINOR 9 - -/* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 1 - -/* LLVM version string */ -#define LLVM_VERSION_STRING "3.9.1" - -/* Define if we link Polly to the tools */ -/* #undef LINK_POLLY_INTO_TOOLS */ - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/ByteStream.h b/llvm/include/llvm/DebugInfo/CodeView/ByteStream.h deleted file mode 100644 index f398c937..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/ByteStream.h +++ /dev/null @@ -1,58 +0,0 @@ -//===- ByteStream.h - Reads stream data from a byte sequence ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_BYTESTREAM_H -#define LLVM_DEBUGINFO_CODEVIEW_BYTESTREAM_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/CodeView/StreamInterface.h" -#include "llvm/Support/Error.h" -#include -#include -#include - -namespace llvm { -namespace codeview { -class StreamReader; - -template class ByteStream : public StreamInterface { - typedef typename std::conditional, - ArrayRef>::type ArrayType; - -public: - ByteStream() {} - explicit ByteStream(ArrayType Data) : Data(Data) {} - ~ByteStream() override {} - - Error readBytes(uint32_t Offset, uint32_t Size, - ArrayRef &Buffer) const override; - Error readLongestContiguousChunk(uint32_t Offset, - ArrayRef &Buffer) const override; - - Error writeBytes(uint32_t Offset, ArrayRef Buffer) const override; - - uint32_t getLength() const override; - - Error commit() const override; - - ArrayRef data() const { return Data; } - StringRef str() const; - -private: - ArrayType Data; -}; - -extern template class ByteStream; -extern template class ByteStream; - -} // end namespace pdb -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_BYTESTREAM_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/CVRecord.h b/llvm/include/llvm/DebugInfo/CodeView/CVRecord.h deleted file mode 100644 index dba359fc..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/CVRecord.h +++ /dev/null @@ -1,56 +0,0 @@ -//===- RecordIterator.h -----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_RECORDITERATOR_H -#define LLVM_DEBUGINFO_CODEVIEW_RECORDITERATOR_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/DebugInfo/CodeView/RecordSerialization.h" -#include "llvm/DebugInfo/CodeView/StreamInterface.h" -#include "llvm/DebugInfo/CodeView/StreamReader.h" -#include "llvm/Support/Endian.h" - -namespace llvm { -namespace codeview { - -template struct CVRecord { - uint32_t Length; - Kind Type; - ArrayRef Data; - ArrayRef RawData; -}; - -template struct VarStreamArrayExtractor> { - Error operator()(StreamRef Stream, uint32_t &Len, - CVRecord &Item) const { - const RecordPrefix *Prefix = nullptr; - StreamReader Reader(Stream); - uint32_t Offset = Reader.getOffset(); - - if (auto EC = Reader.readObject(Prefix)) - return EC; - Item.Length = Prefix->RecordLen; - if (Item.Length < 2) - return make_error(cv_error_code::corrupt_record); - Item.Type = static_cast(uint16_t(Prefix->RecordKind)); - - Reader.setOffset(Offset); - if (auto EC = - Reader.readBytes(Item.RawData, Item.Length + sizeof(uint16_t))) - return EC; - Item.Data = Item.RawData.slice(sizeof(RecordPrefix)); - Len = Prefix->RecordLen + 2; - return Error::success(); - } -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def b/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def deleted file mode 100644 index 32813d86..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def +++ /dev/null @@ -1,258 +0,0 @@ -//===-- CVLeafTypes.def - All CodeView leaf types ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// See LEAF_ENUM_e in cvinfo.h. This should match the constants there. -// -//===----------------------------------------------------------------------===// - -#ifndef CV_SYMBOL -#define CV_SYMBOL(ename, value) -#endif - -#ifndef SYMBOL_RECORD -#define SYMBOL_RECORD(lf_ename, value, name) CV_SYMBOL(lf_ename, value) -#endif - -#ifndef SYMBOL_RECORD_ALIAS -#define SYMBOL_RECORD_ALIAS(lf_ename, value, name, alias_name) \ - SYMBOL_RECORD(lf_ename, value, name) -#endif - -// 16 bit symbol types. Not very useful, provided only for reference. -CV_SYMBOL(S_COMPILE , 0x0001) -CV_SYMBOL(S_REGISTER_16t , 0x0002) -CV_SYMBOL(S_CONSTANT_16t , 0x0003) -CV_SYMBOL(S_UDT_16t , 0x0004) -CV_SYMBOL(S_SSEARCH , 0x0005) -CV_SYMBOL(S_SKIP , 0x0007) -CV_SYMBOL(S_CVRESERVE , 0x0008) -CV_SYMBOL(S_OBJNAME_ST , 0x0009) -CV_SYMBOL(S_ENDARG , 0x000a) -CV_SYMBOL(S_COBOLUDT_16t , 0x000b) -CV_SYMBOL(S_MANYREG_16t , 0x000c) -CV_SYMBOL(S_RETURN , 0x000d) -CV_SYMBOL(S_ENTRYTHIS , 0x000e) -CV_SYMBOL(S_BPREL16 , 0x0100) -CV_SYMBOL(S_LDATA16 , 0x0101) -CV_SYMBOL(S_GDATA16 , 0x0102) -CV_SYMBOL(S_PUB16 , 0x0103) -CV_SYMBOL(S_LPROC16 , 0x0104) -CV_SYMBOL(S_GPROC16 , 0x0105) -CV_SYMBOL(S_THUNK16 , 0x0106) -CV_SYMBOL(S_BLOCK16 , 0x0107) -CV_SYMBOL(S_WITH16 , 0x0108) -CV_SYMBOL(S_LABEL16 , 0x0109) -CV_SYMBOL(S_CEXMODEL16 , 0x010a) -CV_SYMBOL(S_VFTABLE16 , 0x010b) -CV_SYMBOL(S_REGREL16 , 0x010c) -CV_SYMBOL(S_BPREL32_16t , 0x0200) -CV_SYMBOL(S_LDATA32_16t , 0x0201) -CV_SYMBOL(S_GDATA32_16t , 0x0202) -CV_SYMBOL(S_PUB32_16t , 0x0203) -CV_SYMBOL(S_LPROC32_16t , 0x0204) -CV_SYMBOL(S_GPROC32_16t , 0x0205) -CV_SYMBOL(S_THUNK32_ST , 0x0206) -CV_SYMBOL(S_BLOCK32_ST , 0x0207) -CV_SYMBOL(S_WITH32_ST , 0x0208) -CV_SYMBOL(S_LABEL32_ST , 0x0209) -CV_SYMBOL(S_CEXMODEL32 , 0x020a) -CV_SYMBOL(S_VFTABLE32_16t , 0x020b) -CV_SYMBOL(S_REGREL32_16t , 0x020c) -CV_SYMBOL(S_LTHREAD32_16t , 0x020d) -CV_SYMBOL(S_GTHREAD32_16t , 0x020e) -CV_SYMBOL(S_SLINK32 , 0x020f) -CV_SYMBOL(S_LPROCMIPS_16t , 0x0300) -CV_SYMBOL(S_GPROCMIPS_16t , 0x0301) -CV_SYMBOL(S_PROCREF_ST , 0x0400) -CV_SYMBOL(S_DATAREF_ST , 0x0401) -CV_SYMBOL(S_ALIGN , 0x0402) -CV_SYMBOL(S_LPROCREF_ST , 0x0403) -CV_SYMBOL(S_OEM , 0x0404) - -// All post 16 bit symbol types have the 0x1000 bit set. -CV_SYMBOL(S_TI16_MAX , 0x1000) - -// Mostly unused "start" symbol types. -CV_SYMBOL(S_REGISTER_ST , 0x1001) -CV_SYMBOL(S_CONSTANT_ST , 0x1002) -CV_SYMBOL(S_UDT_ST , 0x1003) -CV_SYMBOL(S_COBOLUDT_ST , 0x1004) -CV_SYMBOL(S_MANYREG_ST , 0x1005) -CV_SYMBOL(S_BPREL32_ST , 0x1006) -CV_SYMBOL(S_LDATA32_ST , 0x1007) -CV_SYMBOL(S_GDATA32_ST , 0x1008) -CV_SYMBOL(S_PUB32_ST , 0x1009) -CV_SYMBOL(S_LPROC32_ST , 0x100a) -CV_SYMBOL(S_GPROC32_ST , 0x100b) -CV_SYMBOL(S_VFTABLE32 , 0x100c) -CV_SYMBOL(S_REGREL32_ST , 0x100d) -CV_SYMBOL(S_LTHREAD32_ST , 0x100e) -CV_SYMBOL(S_GTHREAD32_ST , 0x100f) -CV_SYMBOL(S_LPROCMIPS_ST , 0x1010) -CV_SYMBOL(S_GPROCMIPS_ST , 0x1011) - -CV_SYMBOL(S_COMPILE2_ST , 0x1013) -CV_SYMBOL(S_MANYREG2_ST , 0x1014) -CV_SYMBOL(S_LPROCIA64_ST , 0x1015) -CV_SYMBOL(S_GPROCIA64_ST , 0x1016) -CV_SYMBOL(S_LOCALSLOT_ST , 0x1017) -CV_SYMBOL(S_PARAMSLOT_ST , 0x1018) -CV_SYMBOL(S_ANNOTATION , 0x1019) -CV_SYMBOL(S_GMANPROC_ST , 0x101a) -CV_SYMBOL(S_LMANPROC_ST , 0x101b) -CV_SYMBOL(S_RESERVED1 , 0x101c) -CV_SYMBOL(S_RESERVED2 , 0x101d) -CV_SYMBOL(S_RESERVED3 , 0x101e) -CV_SYMBOL(S_RESERVED4 , 0x101f) -CV_SYMBOL(S_LMANDATA_ST , 0x1020) -CV_SYMBOL(S_GMANDATA_ST , 0x1021) -CV_SYMBOL(S_MANFRAMEREL_ST, 0x1022) -CV_SYMBOL(S_MANREGISTER_ST, 0x1023) -CV_SYMBOL(S_MANSLOT_ST , 0x1024) -CV_SYMBOL(S_MANMANYREG_ST , 0x1025) -CV_SYMBOL(S_MANREGREL_ST , 0x1026) -CV_SYMBOL(S_MANMANYREG2_ST, 0x1027) -CV_SYMBOL(S_MANTYPREF , 0x1028) -CV_SYMBOL(S_UNAMESPACE_ST , 0x1029) - -// End of S_*_ST symbols, which do not appear to be generated by modern -// compilers. -CV_SYMBOL(S_ST_MAX , 0x1100) - - -CV_SYMBOL(S_WITH32 , 0x1104) -CV_SYMBOL(S_MANYREG , 0x110a) -CV_SYMBOL(S_LPROCMIPS , 0x1114) -CV_SYMBOL(S_GPROCMIPS , 0x1115) -CV_SYMBOL(S_MANYREG2 , 0x1117) -CV_SYMBOL(S_LPROCIA64 , 0x1118) -CV_SYMBOL(S_GPROCIA64 , 0x1119) -CV_SYMBOL(S_LOCALSLOT , 0x111a) -CV_SYMBOL(S_PARAMSLOT , 0x111b) - -// Managed code symbols. -CV_SYMBOL(S_MANFRAMEREL , 0x111e) -CV_SYMBOL(S_MANREGISTER , 0x111f) -CV_SYMBOL(S_MANSLOT , 0x1120) -CV_SYMBOL(S_MANMANYREG , 0x1121) -CV_SYMBOL(S_MANREGREL , 0x1122) -CV_SYMBOL(S_MANMANYREG2 , 0x1123) -CV_SYMBOL(S_UNAMESPACE , 0x1124) -CV_SYMBOL(S_DATAREF , 0x1126) -CV_SYMBOL(S_ANNOTATIONREF , 0x1128) -CV_SYMBOL(S_TOKENREF , 0x1129) -CV_SYMBOL(S_GMANPROC , 0x112a) -CV_SYMBOL(S_LMANPROC , 0x112b) -CV_SYMBOL(S_ATTR_FRAMEREL , 0x112e) -CV_SYMBOL(S_ATTR_REGISTER , 0x112f) -CV_SYMBOL(S_ATTR_REGREL , 0x1130) -CV_SYMBOL(S_ATTR_MANYREG , 0x1131) - - -CV_SYMBOL(S_SEPCODE , 0x1132) -CV_SYMBOL(S_LOCAL_2005 , 0x1133) -CV_SYMBOL(S_DEFRANGE_2005 , 0x1134) -CV_SYMBOL(S_DEFRANGE2_2005, 0x1135) -CV_SYMBOL(S_DISCARDED , 0x113b) - -// Current symbol types for most procedures as of this writing. -CV_SYMBOL(S_LPROCMIPS_ID , 0x1148) -CV_SYMBOL(S_GPROCMIPS_ID , 0x1149) -CV_SYMBOL(S_LPROCIA64_ID , 0x114a) -CV_SYMBOL(S_GPROCIA64_ID , 0x114b) - -CV_SYMBOL(S_DEFRANGE_HLSL , 0x1150) -CV_SYMBOL(S_GDATA_HLSL , 0x1151) -CV_SYMBOL(S_LDATA_HLSL , 0x1152) -CV_SYMBOL(S_LOCAL_DPC_GROUPSHARED, 0x1154) -CV_SYMBOL(S_DEFRANGE_DPC_PTR_TAG, 0x1157) -CV_SYMBOL(S_DPC_SYM_TAG_MAP, 0x1158) -CV_SYMBOL(S_ARMSWITCHTABLE , 0x1159) -CV_SYMBOL(S_POGODATA , 0x115c) -CV_SYMBOL(S_INLINESITE2 , 0x115d) -CV_SYMBOL(S_MOD_TYPEREF , 0x115f) -CV_SYMBOL(S_REF_MINIPDB , 0x1160) -CV_SYMBOL(S_PDBMAP , 0x1161) -CV_SYMBOL(S_GDATA_HLSL32 , 0x1162) -CV_SYMBOL(S_LDATA_HLSL32 , 0x1163) -CV_SYMBOL(S_GDATA_HLSL32_EX, 0x1164) -CV_SYMBOL(S_LDATA_HLSL32_EX, 0x1165) - -// Known symbol types -SYMBOL_RECORD(S_END , 0x0006, ScopeEndSym) -SYMBOL_RECORD_ALIAS(S_INLINESITE_END , 0x114e, InlineSiteEnd, ScopeEndSym) -SYMBOL_RECORD_ALIAS(S_PROC_ID_END , 0x114f, ProcEnd, ScopeEndSym) - -SYMBOL_RECORD(S_THUNK32 , 0x1102, Thunk32Sym) -SYMBOL_RECORD(S_TRAMPOLINE , 0x112c, TrampolineSym) -SYMBOL_RECORD(S_SECTION , 0x1136, SectionSym) -SYMBOL_RECORD(S_COFFGROUP , 0x1137, CoffGroupSym) -SYMBOL_RECORD(S_EXPORT , 0x1138, ExportSym) - -SYMBOL_RECORD(S_LPROC32 , 0x110f, ProcSym) -SYMBOL_RECORD_ALIAS(S_GPROC32 , 0x1110, GlobalProcSym, ProcSym) -SYMBOL_RECORD_ALIAS(S_LPROC32_ID , 0x1146, ProcIdSym, ProcSym) -SYMBOL_RECORD_ALIAS(S_GPROC32_ID , 0x1147, GlobalProcIdSym, ProcSym) -SYMBOL_RECORD_ALIAS(S_LPROC32_DPC , 0x1155, DPCProcSym, ProcSym) -SYMBOL_RECORD_ALIAS(S_LPROC32_DPC_ID , 0x1156, DPCProcIdSym, ProcSym) - -SYMBOL_RECORD(S_REGISTER , 0x1106, RegisterSym) -SYMBOL_RECORD(S_PUB32 , 0x110e, PublicSym32) - -SYMBOL_RECORD(S_PROCREF , 0x1125, ProcRefSym) -SYMBOL_RECORD_ALIAS(S_LPROCREF, 0x1127, LocalProcRef, ProcRefSym) - - -SYMBOL_RECORD(S_ENVBLOCK , 0x113d, EnvBlockSym) - -SYMBOL_RECORD(S_INLINESITE , 0x114d, InlineSiteSym) -SYMBOL_RECORD(S_LOCAL , 0x113e, LocalSym) -SYMBOL_RECORD(S_DEFRANGE , 0x113f, DefRangeSym) -SYMBOL_RECORD(S_DEFRANGE_SUBFIELD, 0x1140, DefRangeSubfieldSym) -SYMBOL_RECORD(S_DEFRANGE_REGISTER, 0x1141, DefRangeRegisterSym) -SYMBOL_RECORD(S_DEFRANGE_FRAMEPOINTER_REL, 0x1142, DefRangeFramePointerRelSym) -SYMBOL_RECORD(S_DEFRANGE_SUBFIELD_REGISTER, 0x1143, DefRangeSubfieldRegisterSym) -SYMBOL_RECORD(S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE, 0x1144, DefRangeFramePointerRelFullScopeSym) -SYMBOL_RECORD(S_DEFRANGE_REGISTER_REL, 0x1145, DefRangeRegisterRelSym) -SYMBOL_RECORD(S_BLOCK32 , 0x1103, BlockSym) -SYMBOL_RECORD(S_LABEL32 , 0x1105, LabelSym) -SYMBOL_RECORD(S_OBJNAME , 0x1101, ObjNameSym) -SYMBOL_RECORD(S_COMPILE2 , 0x1116, Compile2Sym) -SYMBOL_RECORD(S_COMPILE3 , 0x113c, Compile3Sym) -SYMBOL_RECORD(S_FRAMEPROC , 0x1012, FrameProcSym) -SYMBOL_RECORD(S_CALLSITEINFO , 0x1139, CallSiteInfoSym) -SYMBOL_RECORD(S_FILESTATIC , 0x1153, FileStaticSym) -SYMBOL_RECORD(S_HEAPALLOCSITE , 0x115e, HeapAllocationSiteSym) -SYMBOL_RECORD(S_FRAMECOOKIE , 0x113a, FrameCookieSym) - -SYMBOL_RECORD(S_CALLEES , 0x115a, CallerSym) -SYMBOL_RECORD_ALIAS(S_CALLERS , 0x115b, CalleeSym, CallerSym) - -SYMBOL_RECORD(S_UDT , 0x1108, UDTSym) -SYMBOL_RECORD_ALIAS(S_COBOLUDT , 0x1109, CobolUDT, UDTSym) - -SYMBOL_RECORD(S_BUILDINFO , 0x114c, BuildInfoSym) -SYMBOL_RECORD(S_BPREL32 , 0x110b, BPRelativeSym) -SYMBOL_RECORD(S_REGREL32 , 0x1111, RegRelativeSym) - -SYMBOL_RECORD(S_CONSTANT , 0x1107, ConstantSym) -SYMBOL_RECORD_ALIAS(S_MANCONSTANT , 0x112d, ManagedConstant, ConstantSym) - -SYMBOL_RECORD(S_LDATA32 , 0x110c, DataSym) -SYMBOL_RECORD_ALIAS(S_GDATA32 , 0x110d, GlobalData, DataSym) -SYMBOL_RECORD_ALIAS(S_LMANDATA , 0x111c, ManagedLocalData, DataSym) -SYMBOL_RECORD_ALIAS(S_GMANDATA , 0x111d, ManagedGlobalData, DataSym) - -SYMBOL_RECORD(S_LTHREAD32 , 0x1112, ThreadLocalDataSym) -SYMBOL_RECORD_ALIAS(S_GTHREAD32 , 0x1113, GlobalTLS, ThreadLocalDataSym) - - -#undef CV_SYMBOL -#undef SYMBOL_RECORD -#undef SYMBOL_RECORD_ALIAS diff --git a/llvm/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h b/llvm/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h deleted file mode 100644 index 7c88956c..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h +++ /dev/null @@ -1,103 +0,0 @@ -//===- CVSymbolVisitor.h ----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H -#define LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H - -#include "llvm/DebugInfo/CodeView/CVRecord.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/SymbolRecord.h" -#include "llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h" -#include "llvm/Support/ErrorOr.h" - -namespace llvm { -namespace codeview { - -template class CVSymbolVisitor { -public: - CVSymbolVisitor(SymbolVisitorDelegate *Delegate) : Delegate(Delegate) {} - - bool hadError() const { return HadError; } - - template - bool consumeObject(ArrayRef &Data, const T *&Res) { - if (Data.size() < sizeof(*Res)) { - HadError = true; - return false; - } - Res = reinterpret_cast(Data.data()); - Data = Data.drop_front(sizeof(*Res)); - return true; - } - -/// Actions to take on known symbols. By default, they do nothing. Visit methods -/// for member records take the FieldData by non-const reference and are -/// expected to consume the trailing bytes used by the field. -/// FIXME: Make the visitor interpret the trailing bytes so that clients don't -/// need to. -#define SYMBOL_RECORD(EnumName, EnumVal, Name) \ - void visit##Name(SymbolRecordKind Kind, Name &Record) {} -#define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) -#include "CVSymbolTypes.def" - - void visitSymbolRecord(const CVRecord &Record) { - ArrayRef Data = Record.Data; - auto *DerivedThis = static_cast(this); - DerivedThis->visitSymbolBegin(Record.Type, Data); - uint32_t RecordOffset = Delegate ? Delegate->getRecordOffset(Data) : 0; - switch (Record.Type) { - default: - DerivedThis->visitUnknownSymbol(Record.Type, Data); - break; -#define SYMBOL_RECORD(EnumName, EnumVal, Name) \ - case EnumName: { \ - SymbolRecordKind RK = static_cast(EnumName); \ - auto Result = Name::deserialize(RK, RecordOffset, Data); \ - if (Result.getError()) \ - return parseError(); \ - DerivedThis->visit##Name(Record.Type, *Result); \ - break; \ - } -#define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \ - SYMBOL_RECORD(EnumVal, EnumVal, AliasName) -#include "CVSymbolTypes.def" - } - DerivedThis->visitSymbolEnd(Record.Type, Record.Data); - } - - /// Visits the symbol records in Data. Sets the error flag on parse failures. - void visitSymbolStream(const CVSymbolArray &Symbols) { - for (const auto &I : Symbols) { - visitSymbolRecord(I); - if (hadError()) - break; - } - } - - /// Action to take on unknown symbols. By default, they are ignored. - void visitUnknownSymbol(SymbolKind Kind, ArrayRef Data) {} - - /// Paired begin/end actions for all symbols. Receives all record data, - /// including the fixed-length record prefix. - void visitSymbolBegin(SymbolKind Leaf, ArrayRef RecordData) {} - void visitSymbolEnd(SymbolKind Leaf, ArrayRef OriginalSymData) {} - - /// Helper for returning from a void function when the stream is corrupted. - void parseError() { HadError = true; } - -private: - SymbolVisitorDelegate *Delegate; - /// Whether a symbol stream parsing error was encountered. - bool HadError = false; -}; - -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_CVSYMBOLVISITOR_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h b/llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h deleted file mode 100644 index 930ac693..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h +++ /dev/null @@ -1,44 +0,0 @@ -//===- CVTypeVisitor.h ------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H -#define LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H - -#include "llvm/DebugInfo/CodeView/CVRecord.h" -#include "llvm/DebugInfo/CodeView/TypeRecord.h" -#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h" -#include "llvm/Support/Error.h" - -namespace llvm { -namespace codeview { - -class CVTypeVisitor { -public: - explicit CVTypeVisitor(TypeVisitorCallbacks &Callbacks); - - Error visitTypeRecord(const CVRecord &Record); - - /// Visits the type records in Data. Sets the error flag on parse failures. - Error visitTypeStream(const CVTypeArray &Types); - - Error skipPadding(ArrayRef &Data); - - /// Visits individual member records of a field list record. Member records do - /// not describe their own length, and need special handling. - Error visitFieldList(const CVRecord &Record); - -private: - /// The interface to the class that gets notified of each visitation. - TypeVisitorCallbacks &Callbacks; -}; - -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_CVTYPEVISITOR_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/CodeView.h b/llvm/include/llvm/DebugInfo/CodeView/CodeView.h deleted file mode 100644 index 1ee203b4..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/CodeView.h +++ /dev/null @@ -1,550 +0,0 @@ -//===- CodeView.h -----------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_CODEVIEW_H -#define LLVM_DEBUGINFO_CODEVIEW_CODEVIEW_H - -#include -#include - -namespace llvm { -namespace codeview { - -/// Distinguishes individual records in .debug$T section or PDB type stream. The -/// documentation and headers talk about this as the "leaf" type. -enum class TypeRecordKind : uint16_t { -#define TYPE_RECORD(lf_ename, value, name) name = value, -#include "TypeRecords.def" - // FIXME: Add serialization support - FieldList = 0x1203, -}; - -/// Duplicate copy of the above enum, but using the official CV names. Useful -/// for reference purposes and when dealing with unknown record types. -enum TypeLeafKind : uint16_t { -#define CV_TYPE(name, val) name = val, -#include "TypeRecords.def" -}; - -/// Distinguishes individual records in the Symbols subsection of a .debug$S -/// section. Equivalent to SYM_ENUM_e in cvinfo.h. -enum class SymbolRecordKind : uint16_t { -#define SYMBOL_RECORD(lf_ename, value, name) name = value, -#include "CVSymbolTypes.def" -}; - -/// Duplicate copy of the above enum, but using the official CV names. Useful -/// for reference purposes and when dealing with unknown record types. -enum SymbolKind : uint16_t { -#define CV_SYMBOL(name, val) name = val, -#include "CVSymbolTypes.def" -}; - -#define CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(Class) \ - inline Class operator|(Class a, Class b) { \ - return static_cast( \ - static_cast::type>(a) | \ - static_cast::type>(b)); \ - } \ - inline Class operator&(Class a, Class b) { \ - return static_cast( \ - static_cast::type>(a) & \ - static_cast::type>(b)); \ - } \ - inline Class operator~(Class a) { \ - return static_cast( \ - ~static_cast::type>(a)); \ - } \ - inline Class &operator|=(Class &a, Class b) { \ - a = a | b; \ - return a; \ - } \ - inline Class &operator&=(Class &a, Class b) { \ - a = a & b; \ - return a; \ - } - -/// These values correspond to the CV_CPU_TYPE_e enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx -enum class CPUType : uint16_t { - Intel8080 = 0x0, - Intel8086 = 0x1, - Intel80286 = 0x2, - Intel80386 = 0x3, - Intel80486 = 0x4, - Pentium = 0x5, - PentiumPro = 0x6, - Pentium3 = 0x7, - MIPS = 0x10, - MIPS16 = 0x11, - MIPS32 = 0x12, - MIPS64 = 0x13, - MIPSI = 0x14, - MIPSII = 0x15, - MIPSIII = 0x16, - MIPSIV = 0x17, - MIPSV = 0x18, - M68000 = 0x20, - M68010 = 0x21, - M68020 = 0x22, - M68030 = 0x23, - M68040 = 0x24, - Alpha = 0x30, - Alpha21164 = 0x31, - Alpha21164A = 0x32, - Alpha21264 = 0x33, - Alpha21364 = 0x34, - PPC601 = 0x40, - PPC603 = 0x41, - PPC604 = 0x42, - PPC620 = 0x43, - PPCFP = 0x44, - PPCBE = 0x45, - SH3 = 0x50, - SH3E = 0x51, - SH3DSP = 0x52, - SH4 = 0x53, - SHMedia = 0x54, - ARM3 = 0x60, - ARM4 = 0x61, - ARM4T = 0x62, - ARM5 = 0x63, - ARM5T = 0x64, - ARM6 = 0x65, - ARM_XMAC = 0x66, - ARM_WMMX = 0x67, - ARM7 = 0x68, - Omni = 0x70, - Ia64 = 0x80, - Ia64_2 = 0x81, - CEE = 0x90, - AM33 = 0xa0, - M32R = 0xb0, - TriCore = 0xc0, - X64 = 0xd0, - EBC = 0xe0, - Thumb = 0xf0, - ARMNT = 0xf4, - D3D11_Shader = 0x100, -}; - -/// These values correspond to the CV_CFL_LANG enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/bw3aekw6.aspx -enum SourceLanguage : uint8_t { - C = 0x00, - Cpp = 0x01, - Fortran = 0x02, - Masm = 0x03, - Pascal = 0x04, - Basic = 0x05, - Cobol = 0x06, - Link = 0x07, - Cvtres = 0x08, - Cvtpgd = 0x09, - CSharp = 0x0a, - VB = 0x0b, - ILAsm = 0x0c, - Java = 0x0d, - JScript = 0x0e, - MSIL = 0x0f, - HLSL = 0x10 -}; - -/// These values correspond to the CV_call_e enumeration, and are documented -/// at the following locations: -/// https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx -/// https://msdn.microsoft.com/en-us/library/windows/desktop/ms680207(v=vs.85).aspx -/// -enum class CallingConvention : uint8_t { - NearC = 0x00, // near right to left push, caller pops stack - FarC = 0x01, // far right to left push, caller pops stack - NearPascal = 0x02, // near left to right push, callee pops stack - FarPascal = 0x03, // far left to right push, callee pops stack - NearFast = 0x04, // near left to right push with regs, callee pops stack - FarFast = 0x05, // far left to right push with regs, callee pops stack - NearStdCall = 0x07, // near standard call - FarStdCall = 0x08, // far standard call - NearSysCall = 0x09, // near sys call - FarSysCall = 0x0a, // far sys call - ThisCall = 0x0b, // this call (this passed in register) - MipsCall = 0x0c, // Mips call - Generic = 0x0d, // Generic call sequence - AlphaCall = 0x0e, // Alpha call - PpcCall = 0x0f, // PPC call - SHCall = 0x10, // Hitachi SuperH call - ArmCall = 0x11, // ARM call - AM33Call = 0x12, // AM33 call - TriCall = 0x13, // TriCore Call - SH5Call = 0x14, // Hitachi SuperH-5 call - M32RCall = 0x15, // M32R Call - ClrCall = 0x16, // clr call - Inline = - 0x17, // Marker for routines always inlined and thus lacking a convention - NearVector = 0x18 // near left to right push with regs, callee pops stack -}; - -enum class ClassOptions : uint16_t { - None = 0x0000, - Packed = 0x0001, - HasConstructorOrDestructor = 0x0002, - HasOverloadedOperator = 0x0004, - Nested = 0x0008, - ContainsNestedClass = 0x0010, - HasOverloadedAssignmentOperator = 0x0020, - HasConversionOperator = 0x0040, - ForwardReference = 0x0080, - Scoped = 0x0100, - HasUniqueName = 0x0200, - Sealed = 0x0400, - Intrinsic = 0x2000 -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ClassOptions) - -enum class FrameProcedureOptions : uint32_t { - None = 0x00000000, - HasAlloca = 0x00000001, - HasSetJmp = 0x00000002, - HasLongJmp = 0x00000004, - HasInlineAssembly = 0x00000008, - HasExceptionHandling = 0x00000010, - MarkedInline = 0x00000020, - HasStructuredExceptionHandling = 0x00000040, - Naked = 0x00000080, - SecurityChecks = 0x00000100, - AsynchronousExceptionHandling = 0x00000200, - NoStackOrderingForSecurityChecks = 0x00000400, - Inlined = 0x00000800, - StrictSecurityChecks = 0x00001000, - SafeBuffers = 0x00002000, - ProfileGuidedOptimization = 0x00040000, - ValidProfileCounts = 0x00080000, - OptimizedForSpeed = 0x00100000, - GuardCfg = 0x00200000, - GuardCfw = 0x00400000 -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(FrameProcedureOptions) - -enum class FunctionOptions : uint8_t { - None = 0x00, - CxxReturnUdt = 0x01, - Constructor = 0x02, - ConstructorWithVirtualBases = 0x04 -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(FunctionOptions) - -enum class HfaKind : uint8_t { - None = 0x00, - Float = 0x01, - Double = 0x02, - Other = 0x03 -}; - -/// Source-level access specifier. (CV_access_e) -enum class MemberAccess : uint8_t { - None = 0, - Private = 1, - Protected = 2, - Public = 3 -}; - -/// Part of member attribute flags. (CV_methodprop_e) -enum class MethodKind : uint8_t { - Vanilla = 0x00, - Virtual = 0x01, - Static = 0x02, - Friend = 0x03, - IntroducingVirtual = 0x04, - PureVirtual = 0x05, - PureIntroducingVirtual = 0x06 -}; - -/// Equivalent to CV_fldattr_t bitfield. -enum class MethodOptions : uint16_t { - None = 0x0000, - AccessMask = 0x0003, - MethodKindMask = 0x001c, - Pseudo = 0x0020, - NoInherit = 0x0040, - NoConstruct = 0x0080, - CompilerGenerated = 0x0100, - Sealed = 0x0200 -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(MethodOptions) - -/// Equivalent to CV_modifier_t. -enum class ModifierOptions : uint16_t { - None = 0x0000, - Const = 0x0001, - Volatile = 0x0002, - Unaligned = 0x0004 -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ModifierOptions) - -enum class ModuleSubstreamKind : uint32_t { - None = 0, - Symbols = 0xf1, - Lines = 0xf2, - StringTable = 0xf3, - FileChecksums = 0xf4, - FrameData = 0xf5, - InlineeLines = 0xf6, - CrossScopeImports = 0xf7, - CrossScopeExports = 0xf8, - - // These appear to relate to .Net assembly info. - ILLines = 0xf9, - FuncMDTokenMap = 0xfa, - TypeMDTokenMap = 0xfb, - MergedAssemblyInput = 0xfc, - - CoffSymbolRVA = 0xfd, -}; - -/// Equivalent to CV_ptrtype_e. -enum class PointerKind : uint8_t { - Near16 = 0x00, // 16 bit pointer - Far16 = 0x01, // 16:16 far pointer - Huge16 = 0x02, // 16:16 huge pointer - BasedOnSegment = 0x03, // based on segment - BasedOnValue = 0x04, // based on value of base - BasedOnSegmentValue = 0x05, // based on segment value of base - BasedOnAddress = 0x06, // based on address of base - BasedOnSegmentAddress = 0x07, // based on segment address of base - BasedOnType = 0x08, // based on type - BasedOnSelf = 0x09, // based on self - Near32 = 0x0a, // 32 bit pointer - Far32 = 0x0b, // 16:32 pointer - Near64 = 0x0c // 64 bit pointer -}; - -/// Equivalent to CV_ptrmode_e. -enum class PointerMode : uint8_t { - Pointer = 0x00, // "normal" pointer - LValueReference = 0x01, // "old" reference - PointerToDataMember = 0x02, // pointer to data member - PointerToMemberFunction = 0x03, // pointer to member function - RValueReference = 0x04 // r-value reference -}; - -/// Equivalent to misc lfPointerAttr bitfields. -enum class PointerOptions : uint32_t { - None = 0x00000000, - Flat32 = 0x00000100, - Volatile = 0x00000200, - Const = 0x00000400, - Unaligned = 0x00000800, - Restrict = 0x00001000, - WinRTSmartPointer = 0x00080000 -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(PointerOptions) - -/// Equivalent to CV_pmtype_e. -enum class PointerToMemberRepresentation : uint16_t { - Unknown = 0x00, // not specified (pre VC8) - SingleInheritanceData = 0x01, // member data, single inheritance - MultipleInheritanceData = 0x02, // member data, multiple inheritance - VirtualInheritanceData = 0x03, // member data, virtual inheritance - GeneralData = 0x04, // member data, most general - SingleInheritanceFunction = 0x05, // member function, single inheritance - MultipleInheritanceFunction = 0x06, // member function, multiple inheritance - VirtualInheritanceFunction = 0x07, // member function, virtual inheritance - GeneralFunction = 0x08 // member function, most general -}; - -enum class VFTableSlotKind : uint8_t { - Near16 = 0x00, - Far16 = 0x01, - This = 0x02, - Outer = 0x03, - Meta = 0x04, - Near = 0x05, - Far = 0x06 -}; - -enum class WindowsRTClassKind : uint8_t { - None = 0x00, - RefClass = 0x01, - ValueClass = 0x02, - Interface = 0x03 -}; - -/// Corresponds to CV_LVARFLAGS bitfield. -enum class LocalSymFlags : uint16_t { - None = 0, - IsParameter = 1 << 0, - IsAddressTaken = 1 << 1, - IsCompilerGenerated = 1 << 2, - IsAggregate = 1 << 3, - IsAggregated = 1 << 4, - IsAliased = 1 << 5, - IsAlias = 1 << 6, - IsReturnValue = 1 << 7, - IsOptimizedOut = 1 << 8, - IsEnregisteredGlobal = 1 << 9, - IsEnregisteredStatic = 1 << 10, -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(LocalSymFlags) - -/// Corresponds to the CV_PROCFLAGS bitfield. -enum class ProcSymFlags : uint8_t { - None = 0, - HasFP = 1 << 0, - HasIRET = 1 << 1, - HasFRET = 1 << 2, - IsNoReturn = 1 << 3, - IsUnreachable = 1 << 4, - HasCustomCallingConv = 1 << 5, - IsNoInline = 1 << 6, - HasOptimizedDebugInfo = 1 << 7, -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ProcSymFlags) - -/// Corresponds to COMPILESYM2::Flags bitfield. -enum class CompileSym2Flags : uint32_t { - EC = 1 << 8, - NoDbgInfo = 1 << 9, - LTCG = 1 << 10, - NoDataAlign = 1 << 11, - ManagedPresent = 1 << 12, - SecurityChecks = 1 << 13, - HotPatch = 1 << 14, - CVTCIL = 1 << 15, - MSILModule = 1 << 16, -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(CompileSym2Flags) - -/// Corresponds to COMPILESYM3::Flags bitfield. -enum class CompileSym3Flags : uint32_t { - EC = 1 << 8, - NoDbgInfo = 1 << 9, - LTCG = 1 << 10, - NoDataAlign = 1 << 11, - ManagedPresent = 1 << 12, - SecurityChecks = 1 << 13, - HotPatch = 1 << 14, - CVTCIL = 1 << 15, - MSILModule = 1 << 16, - Sdl = 1 << 17, - PGO = 1 << 18, - Exp = 1 << 19, -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(CompileSym3Flags) - -enum class ExportFlags : uint16_t { - IsConstant = 1 << 0, - IsData = 1 << 1, - IsPrivate = 1 << 2, - HasNoName = 1 << 3, - HasExplicitOrdinal = 1 << 4, - IsForwarder = 1 << 5 -}; -CV_DEFINE_ENUM_CLASS_FLAGS_OPERATORS(ExportFlags) - -// Corresponds to BinaryAnnotationOpcode enum. -enum class BinaryAnnotationsOpCode : uint32_t { - Invalid, - CodeOffset, - ChangeCodeOffsetBase, - ChangeCodeOffset, - ChangeCodeLength, - ChangeFile, - ChangeLineOffset, - ChangeLineEndDelta, - ChangeRangeKind, - ChangeColumnStart, - ChangeColumnEndDelta, - ChangeCodeOffsetAndLineOffset, - ChangeCodeLengthAndCodeOffset, - ChangeColumnEnd, -}; - -// Corresponds to CV_cookietype_e enum. -enum class FrameCookieKind : uint8_t { - Copy, - XorStackPointer, - XorFramePointer, - XorR13, -}; - -// Corresponds to CV_HREG_e enum. -enum class RegisterId : uint16_t { - Unknown = 0, - VFrame = 30006, - AL = 1, - CL = 2, - DL = 3, - BL = 4, - AH = 5, - CH = 6, - DH = 7, - BH = 8, - AX = 9, - CX = 10, - DX = 11, - BX = 12, - SP = 13, - BP = 14, - SI = 15, - DI = 16, - EAX = 17, - ECX = 18, - EDX = 19, - EBX = 20, - ESP = 21, - EBP = 22, - ESI = 23, - EDI = 24, - ES = 25, - CS = 26, - SS = 27, - DS = 28, - FS = 29, - GS = 30, - IP = 31, - RAX = 328, - RBX = 329, - RCX = 330, - RDX = 331, - RSI = 332, - RDI = 333, - RBP = 334, - RSP = 335, - R8 = 336, - R9 = 337, - R10 = 338, - R11 = 339, - R12 = 340, - R13 = 341, - R14 = 342, - R15 = 343, -}; - -/// These values correspond to the THUNK_ORDINAL enumeration. -enum class ThunkOrdinal { - Standard, - ThisAdjustor, - Vcall, - Pcode, - UnknownLoad, - TrampIncremental, - BranchIsland -}; - -enum class TrampolineType { TrampIncremental, BranchIsland }; - -// These values correspond to the CV_SourceChksum_t enumeration. -enum class FileChecksumKind : uint8_t { None, MD5, SHA1, SHA256 }; - -enum LineFlags : uint32_t { - HaveColumns = 1, // CV_LINES_HAVE_COLUMNS -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h b/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h deleted file mode 100644 index 69ff29aa..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h +++ /dev/null @@ -1,44 +0,0 @@ -//===- CodeViewError.h - Error extensions for CodeView ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_CODEVIEW_CODEVIEWERROR_H -#define LLVM_DEBUGINFO_PDB_CODEVIEW_CODEVIEWERROR_H - -#include "llvm/Support/Error.h" - -#include - -namespace llvm { -namespace codeview { -enum class cv_error_code { - unspecified = 1, - insufficient_buffer, - operation_unsupported, - corrupt_record, -}; - -/// Base class for errors originating when parsing raw PDB files -class CodeViewError : public ErrorInfo { -public: - static char ID; - CodeViewError(cv_error_code C); - CodeViewError(const std::string &Context); - CodeViewError(cv_error_code C, const std::string &Context); - - void log(raw_ostream &OS) const override; - const std::string &getErrorMessage() const; - std::error_code convertToErrorCode() const override; - -private: - std::string ErrMsg; - cv_error_code Code; -}; -} -} -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/CodeViewOStream.h b/llvm/include/llvm/DebugInfo/CodeView/CodeViewOStream.h deleted file mode 100644 index 14d057a2..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/CodeViewOStream.h +++ /dev/null @@ -1,39 +0,0 @@ -//===- CodeViewOStream.h ----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_CODEVIEWOSTREAM_H -#define LLVM_DEBUGINFO_CODEVIEW_CODEVIEWOSTREAM_H - -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/TypeIndex.h" - -namespace llvm { -namespace codeview { - -template class CodeViewOStream { -private: - CodeViewOStream(const CodeViewOStream &) = delete; - CodeViewOStream &operator=(const CodeViewOStream &) = delete; - -public: - typedef typename Writer::LabelType LabelType; - -public: - explicit CodeViewOStream(Writer &W); - -private: - uint64_t size() const { return W.tell(); } - -private: - Writer &W; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/EnumTables.h b/llvm/include/llvm/DebugInfo/CodeView/EnumTables.h deleted file mode 100644 index 021288e5..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/EnumTables.h +++ /dev/null @@ -1,42 +0,0 @@ -//===- EnumTables.h Enum to string conversion tables ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_ENUMTABLES_H -#define LLVM_DEBUGINFO_CODEVIEW_ENUMTABLES_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/Support/COFF.h" -#include "llvm/Support/ScopedPrinter.h" - -#include - -namespace llvm { -namespace codeview { -ArrayRef> getSymbolTypeNames(); -ArrayRef> getRegisterNames(); -ArrayRef> getProcSymFlagNames(); -ArrayRef> getLocalFlagNames(); -ArrayRef> getFrameCookieKindNames(); -ArrayRef> getSourceLanguageNames(); -ArrayRef> getCompileSym2FlagNames(); -ArrayRef> getCompileSym3FlagNames(); -ArrayRef> getFileChecksumNames(); -ArrayRef> getCPUTypeNames(); -ArrayRef> getFrameProcSymFlagNames(); -ArrayRef> getExportSymFlagNames(); -ArrayRef> getModuleSubstreamKindNames(); -ArrayRef> getThunkOrdinalNames(); -ArrayRef> getTrampolineNames(); -ArrayRef> -getImageSectionCharacteristicNames(); -} // namespace codeview -} // namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_ENUMTABLES_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/FieldListRecordBuilder.h b/llvm/include/llvm/DebugInfo/CodeView/FieldListRecordBuilder.h deleted file mode 100644 index 75a07515..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/FieldListRecordBuilder.h +++ /dev/null @@ -1,65 +0,0 @@ -//===- FieldListRecordBuilder.h ---------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_FIELDLISTRECORDBUILDER_H -#define LLVM_DEBUGINFO_CODEVIEW_FIELDLISTRECORDBUILDER_H - -#include "llvm/DebugInfo/CodeView/ListRecordBuilder.h" -#include "llvm/DebugInfo/CodeView/TypeRecord.h" - -namespace llvm { -namespace codeview { - -class MethodInfo { -public: - MethodInfo() : Access(), Kind(), Options(), Type(), VTableSlotOffset(-1) {} - - MethodInfo(MemberAccess Access, MethodKind Kind, MethodOptions Options, - TypeIndex Type, int32_t VTableSlotOffset) - : Access(Access), Kind(Kind), Options(Options), Type(Type), - VTableSlotOffset(VTableSlotOffset) {} - - MemberAccess getAccess() const { return Access; } - MethodKind getKind() const { return Kind; } - MethodOptions getOptions() const { return Options; } - TypeIndex getType() const { return Type; } - int32_t getVTableSlotOffset() const { return VTableSlotOffset; } - -private: - MemberAccess Access; - MethodKind Kind; - MethodOptions Options; - TypeIndex Type; - int32_t VTableSlotOffset; -}; - -class FieldListRecordBuilder : public ListRecordBuilder { -private: - FieldListRecordBuilder(const FieldListRecordBuilder &) = delete; - void operator=(const FieldListRecordBuilder &) = delete; - -public: - FieldListRecordBuilder(); - - void reset() { ListRecordBuilder::reset(); } - - void writeBaseClass(const BaseClassRecord &Record); - void writeEnumerator(const EnumeratorRecord &Record); - void writeDataMember(const DataMemberRecord &Record); - void writeOneMethod(const OneMethodRecord &Record); - void writeOverloadedMethod(const OverloadedMethodRecord &Record); - void writeNestedType(const NestedTypeRecord &Record); - void writeStaticDataMember(const StaticDataMemberRecord &Record); - void writeVirtualBaseClass(const VirtualBaseClassRecord &Record); - void writeVFPtr(const VFPtrRecord &Type); -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/FunctionId.h b/llvm/include/llvm/DebugInfo/CodeView/FunctionId.h deleted file mode 100644 index 1af3da81..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/FunctionId.h +++ /dev/null @@ -1,56 +0,0 @@ -//===- FunctionId.h ---------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_FUNCTIONID_H -#define LLVM_DEBUGINFO_CODEVIEW_FUNCTIONID_H - -#include - -namespace llvm { -namespace codeview { - -class FunctionId { -public: - FunctionId() : Index(0) {} - - explicit FunctionId(uint32_t Index) : Index(Index) {} - - uint32_t getIndex() const { return Index; } - -private: - uint32_t Index; -}; - -inline bool operator==(const FunctionId &A, const FunctionId &B) { - return A.getIndex() == B.getIndex(); -} - -inline bool operator!=(const FunctionId &A, const FunctionId &B) { - return A.getIndex() != B.getIndex(); -} - -inline bool operator<(const FunctionId &A, const FunctionId &B) { - return A.getIndex() < B.getIndex(); -} - -inline bool operator<=(const FunctionId &A, const FunctionId &B) { - return A.getIndex() <= B.getIndex(); -} - -inline bool operator>(const FunctionId &A, const FunctionId &B) { - return A.getIndex() > B.getIndex(); -} - -inline bool operator>=(const FunctionId &A, const FunctionId &B) { - return A.getIndex() >= B.getIndex(); -} -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/Line.h b/llvm/include/llvm/DebugInfo/CodeView/Line.h deleted file mode 100644 index 975b503f..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/Line.h +++ /dev/null @@ -1,154 +0,0 @@ -//===- Line.h ---------------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_LINE_H -#define LLVM_DEBUGINFO_CODEVIEW_LINE_H - -#include "llvm/DebugInfo/CodeView/TypeIndex.h" -#include "llvm/Support/Endian.h" -#include - -namespace llvm { -namespace codeview { - -using llvm::support::ulittle32_t; - -class LineInfo { -public: - enum : uint32_t { - AlwaysStepIntoLineNumber = 0xfeefee, - NeverStepIntoLineNumber = 0xf00f00 - }; - - enum : int { EndLineDeltaShift = 24 }; - - enum : uint32_t { - StartLineMask = 0x00ffffff, - EndLineDeltaMask = 0x7f000000, - StatementFlag = 0x80000000u - }; - - LineInfo(uint32_t StartLine, uint32_t EndLine, bool IsStatement); - LineInfo(uint32_t LineData) : LineData(LineData) {} - - uint32_t getStartLine() const { return LineData & StartLineMask; } - - uint32_t getLineDelta() const { - return (LineData & EndLineDeltaMask) >> EndLineDeltaShift; - } - - uint32_t getEndLine() const { return getStartLine() + getLineDelta(); } - - bool isStatement() const { return (LineData & StatementFlag) != 0; } - - uint32_t getRawData() const { return LineData; } - - bool isAlwaysStepInto() const { - return getStartLine() == AlwaysStepIntoLineNumber; - } - - bool isNeverStepInto() const { - return getStartLine() == NeverStepIntoLineNumber; - } - -private: - uint32_t LineData; -}; - -class ColumnInfo { -private: - static const uint32_t StartColumnMask = 0x0000ffffu; - static const uint32_t EndColumnMask = 0xffff0000u; - static const int EndColumnShift = 16; - -public: - ColumnInfo(uint16_t StartColumn, uint16_t EndColumn) { - ColumnData = - (static_cast(StartColumn) & StartColumnMask) | - ((static_cast(EndColumn) << EndColumnShift) & EndColumnMask); - } - - uint16_t getStartColumn() const { - return static_cast(ColumnData & StartColumnMask); - } - - uint16_t getEndColumn() const { - return static_cast((ColumnData & EndColumnMask) >> - EndColumnShift); - } - - uint32_t getRawData() const { return ColumnData; } - -private: - uint32_t ColumnData; -}; - -class Line { -private: - int32_t CodeOffset; - LineInfo LineInf; - ColumnInfo ColumnInf; - -public: - Line(int32_t CodeOffset, uint32_t StartLine, uint32_t EndLine, - uint16_t StartColumn, uint16_t EndColumn, bool IsStatement) - : CodeOffset(CodeOffset), LineInf(StartLine, EndLine, IsStatement), - ColumnInf(StartColumn, EndColumn) {} - - Line(int32_t CodeOffset, LineInfo LineInf, ColumnInfo ColumnInf) - : CodeOffset(CodeOffset), LineInf(LineInf), ColumnInf(ColumnInf) {} - - LineInfo getLineInfo() const { return LineInf; } - - ColumnInfo getColumnInfo() const { return ColumnInf; } - - int32_t getCodeOffset() const { return CodeOffset; } - - uint32_t getStartLine() const { return LineInf.getStartLine(); } - - uint32_t getLineDelta() const { return LineInf.getLineDelta(); } - - uint32_t getEndLine() const { return LineInf.getEndLine(); } - - uint16_t getStartColumn() const { return ColumnInf.getStartColumn(); } - - uint16_t getEndColumn() const { return ColumnInf.getEndColumn(); } - - bool isStatement() const { return LineInf.isStatement(); } - - bool isAlwaysStepInto() const { return LineInf.isAlwaysStepInto(); } - - bool isNeverStepInto() const { return LineInf.isNeverStepInto(); } -}; - -enum class InlineeLinesSignature : uint32_t { - Normal, // CV_INLINEE_SOURCE_LINE_SIGNATURE - ExtraFiles // CV_INLINEE_SOURCE_LINE_SIGNATURE_EX -}; - -struct InlineeSourceLine { - TypeIndex Inlinee; // ID of the function that was inlined. - ulittle32_t FileID; // Offset into FileChecksums subsection. - ulittle32_t SourceLineNum; // First line of inlined code. - // If extra files present: - // ulittle32_t ExtraFileCount; - // ulittle32_t Files[]; -}; - -struct FileChecksum { - ulittle32_t FileNameOffset; // Byte offset of filename in global string table. - uint8_t ChecksumSize; // Number of bytes of checksum. - uint8_t ChecksumKind; // FileChecksumKind - // Checksum bytes follow. -}; - -} // namespace codeview -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/ListRecordBuilder.h b/llvm/include/llvm/DebugInfo/CodeView/ListRecordBuilder.h deleted file mode 100644 index 00bf03d4..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/ListRecordBuilder.h +++ /dev/null @@ -1,65 +0,0 @@ -//===- ListRecordBuilder.h --------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_LISTRECORDBUILDER_H -#define LLVM_DEBUGINFO_CODEVIEW_LISTRECORDBUILDER_H - -#include "llvm/DebugInfo/CodeView/TypeRecordBuilder.h" - -namespace llvm { -namespace codeview { -class TypeTableBuilder; - -class ListRecordBuilder { -private: - ListRecordBuilder(const ListRecordBuilder &) = delete; - ListRecordBuilder &operator=(const ListRecordBuilder &) = delete; - -protected: - const int MethodKindShift = 2; - - explicit ListRecordBuilder(TypeRecordKind Kind); - -public: - llvm::StringRef str() { return Builder.str(); } - - void reset() { - Builder.reset(Kind); - ContinuationOffsets.clear(); - SubrecordStart = 0; - } - - void writeListContinuation(const ListContinuationRecord &R); - - /// Writes this list record as a possible sequence of records. - TypeIndex writeListRecord(TypeTableBuilder &Table); - -protected: - void finishSubRecord(); - - TypeRecordBuilder &getBuilder() { return Builder; } - -private: - size_t getLastContinuationStart() const { - return ContinuationOffsets.empty() ? 0 : ContinuationOffsets.back(); - } - size_t getLastContinuationEnd() const { return Builder.size(); } - size_t getLastContinuationSize() const { - return getLastContinuationEnd() - getLastContinuationStart(); - } - - TypeRecordKind Kind; - TypeRecordBuilder Builder; - SmallVector ContinuationOffsets; - size_t SubrecordStart = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/MemoryTypeTableBuilder.h b/llvm/include/llvm/DebugInfo/CodeView/MemoryTypeTableBuilder.h deleted file mode 100644 index 002f885c..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/MemoryTypeTableBuilder.h +++ /dev/null @@ -1,48 +0,0 @@ -//===- MemoryTypeTableBuilder.h ---------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_MEMORYTYPETABLEBUILDER_H -#define LLVM_DEBUGINFO_CODEVIEW_MEMORYTYPETABLEBUILDER_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/CodeView/TypeTableBuilder.h" -#include - -namespace llvm { -namespace codeview { - -class MemoryTypeTableBuilder : public TypeTableBuilder { -public: - MemoryTypeTableBuilder() {} - - bool empty() const { return Records.empty(); } - - template void ForEachRecord(TFunc Func) { - uint32_t Index = TypeIndex::FirstNonSimpleIndex; - - for (StringRef R : Records) { - Func(TypeIndex(Index), R); - ++Index; - } - } - -protected: - TypeIndex writeRecord(llvm::StringRef Data) override; - -private: - std::vector Records; - BumpPtrAllocator RecordStorage; - DenseMap HashedRecords; -}; - -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_MEMORYTYPETABLEBUILDER_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/MethodListRecordBuilder.h b/llvm/include/llvm/DebugInfo/CodeView/MethodListRecordBuilder.h deleted file mode 100644 index faa404d4..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/MethodListRecordBuilder.h +++ /dev/null @@ -1,35 +0,0 @@ -//===- MethodListRecordBuilder.h --------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_METHODLISTRECORDBUILDER_H -#define LLVM_DEBUGINFO_CODEVIEW_METHODLISTRECORDBUILDER_H - -#include "llvm/DebugInfo/CodeView/ListRecordBuilder.h" - -namespace llvm { -namespace codeview { - -class MethodInfo; - -class MethodListRecordBuilder : public ListRecordBuilder { -private: - MethodListRecordBuilder(const MethodListRecordBuilder &) = delete; - MethodListRecordBuilder &operator=(const MethodListRecordBuilder &) = delete; - -public: - MethodListRecordBuilder(); - - void writeMethod(MemberAccess Access, MethodKind Kind, MethodOptions Options, - TypeIndex Type, int32_t VTableSlotOffset); - void writeMethod(const MethodInfo &Method); -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstream.h b/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstream.h deleted file mode 100644 index 6affac80..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstream.h +++ /dev/null @@ -1,87 +0,0 @@ -//===- ModuleSubstream.h ----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULESUBSTREAM_H -#define LLVM_DEBUGINFO_CODEVIEW_MODULESUBSTREAM_H - -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamRef.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -namespace llvm { -namespace codeview { - -// Corresponds to the `CV_DebugSSubsectionHeader_t` structure. -struct ModuleSubsectionHeader { - support::ulittle32_t Kind; // codeview::ModuleSubstreamKind enum - support::ulittle32_t Length; // number of bytes occupied by this record. -}; - -// Corresponds to the `CV_DebugSLinesHeader_t` structure. -struct LineSubstreamHeader { - support::ulittle32_t RelocOffset; // Code offset of line contribution. - support::ulittle16_t RelocSegment; // Code segment of line contribution. - support::ulittle16_t Flags; // See LineFlags enumeration. - support::ulittle32_t CodeSize; // Code size of this line contribution. -}; - -// Corresponds to the `CV_DebugSLinesFileBlockHeader_t` structure. -struct LineFileBlockHeader { - support::ulittle32_t NameIndex; // Index in DBI name buffer of filename. - support::ulittle32_t NumLines; // Number of lines - support::ulittle32_t BlockSize; // Code size of block, in bytes. - // The following two variable length arrays appear immediately after the - // header. The structure definitions follow. - // LineNumberEntry Lines[NumLines]; - // ColumnNumberEntry Columns[NumLines]; -}; - -// Corresponds to `CV_Line_t` structure -struct LineNumberEntry { - support::ulittle32_t Offset; // Offset to start of code bytes for line number - support::ulittle32_t Flags; // Start:24, End:7, IsStatement:1 -}; - -// Corresponds to `CV_Column_t` structure -struct ColumnNumberEntry { - support::ulittle16_t StartColumn; - support::ulittle16_t EndColumn; -}; - -class ModuleSubstream { -public: - ModuleSubstream(); - ModuleSubstream(ModuleSubstreamKind Kind, StreamRef Data); - static Error initialize(StreamRef Stream, ModuleSubstream &Info); - uint32_t getRecordLength() const; - ModuleSubstreamKind getSubstreamKind() const; - StreamRef getRecordData() const; - -private: - ModuleSubstreamKind Kind; - StreamRef Data; -}; - -template <> struct VarStreamArrayExtractor { - Error operator()(StreamRef Stream, uint32_t &Length, - ModuleSubstream &Info) const { - if (auto EC = ModuleSubstream::initialize(Stream, Info)) - return EC; - Length = Info.getRecordLength(); - return Error::success(); - } -}; - -typedef VarStreamArray ModuleSubstreamArray; -} -} - -#endif // LLVM_DEBUGINFO_CODEVIEW_MODULESUBSTREAM_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h b/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h deleted file mode 100644 index 6df23090..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h +++ /dev/null @@ -1,121 +0,0 @@ -//===- ModuleSubstreamVisitor.h ---------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_MODULESUBSTREAMVISITOR_H -#define LLVM_DEBUGINFO_CODEVIEW_MODULESUBSTREAMVISITOR_H - -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/CodeViewError.h" -#include "llvm/DebugInfo/CodeView/Line.h" -#include "llvm/DebugInfo/CodeView/ModuleSubstream.h" -#include "llvm/DebugInfo/CodeView/StreamReader.h" -#include "llvm/DebugInfo/CodeView/StreamRef.h" - -namespace llvm { -namespace codeview { - -struct LineColumnEntry { - support::ulittle32_t NameIndex; - FixedStreamArray LineNumbers; - FixedStreamArray Columns; -}; - -template <> class VarStreamArrayExtractor { -public: - VarStreamArrayExtractor(const LineSubstreamHeader *Header) : Header(Header) {} - - Error operator()(StreamRef Stream, uint32_t &Len, - LineColumnEntry &Item) const { - const LineFileBlockHeader *BlockHeader; - StreamReader Reader(Stream); - if (auto EC = Reader.readObject(BlockHeader)) - return EC; - bool HasColumn = Header->Flags & LineFlags::HaveColumns; - uint32_t LineInfoSize = - BlockHeader->NumLines * - (sizeof(LineNumberEntry) + (HasColumn ? sizeof(ColumnNumberEntry) : 0)); - if (BlockHeader->BlockSize < sizeof(LineFileBlockHeader)) - return make_error(cv_error_code::corrupt_record, - "Invalid line block record size"); - uint32_t Size = BlockHeader->BlockSize - sizeof(LineFileBlockHeader); - if (LineInfoSize > Size) - return make_error(cv_error_code::corrupt_record, - "Invalid line block record size"); - // The value recorded in BlockHeader->BlockSize includes the size of - // LineFileBlockHeader. - Len = BlockHeader->BlockSize; - Item.NameIndex = BlockHeader->NameIndex; - if (auto EC = Reader.readArray(Item.LineNumbers, BlockHeader->NumLines)) - return EC; - if (HasColumn) { - if (auto EC = Reader.readArray(Item.Columns, BlockHeader->NumLines)) - return EC; - } - return Error::success(); - } - -private: - const LineSubstreamHeader *Header; -}; - -struct FileChecksumEntry { - uint32_t FileNameOffset; // Byte offset of filename in global stringtable. - FileChecksumKind Kind; // The type of checksum. - ArrayRef Checksum; // The bytes of the checksum. -}; - -template <> class VarStreamArrayExtractor { -public: - Error operator()(StreamRef Stream, uint32_t &Len, - FileChecksumEntry &Item) const { - const FileChecksum *Header; - StreamReader Reader(Stream); - if (auto EC = Reader.readObject(Header)) - return EC; - Item.FileNameOffset = Header->FileNameOffset; - Item.Kind = static_cast(Header->ChecksumKind); - if (auto EC = Reader.readBytes(Item.Checksum, Header->ChecksumSize)) - return EC; - Len = sizeof(FileChecksum) + Header->ChecksumSize; - return Error::success(); - } -}; - -typedef VarStreamArray LineInfoArray; -typedef VarStreamArray FileChecksumArray; - -class IModuleSubstreamVisitor { -public: - virtual ~IModuleSubstreamVisitor() {} - - virtual Error visitUnknown(ModuleSubstreamKind Kind, StreamRef Data) = 0; - virtual Error visitSymbols(StreamRef Data); - virtual Error visitLines(StreamRef Data, const LineSubstreamHeader *Header, - const LineInfoArray &Lines); - virtual Error visitStringTable(StreamRef Data); - virtual Error visitFileChecksums(StreamRef Data, - const FileChecksumArray &Checksums); - virtual Error visitFrameData(StreamRef Data); - virtual Error visitInlineeLines(StreamRef Data); - virtual Error visitCrossScopeImports(StreamRef Data); - virtual Error visitCrossScopeExports(StreamRef Data); - virtual Error visitILLines(StreamRef Data); - virtual Error visitFuncMDTokenMap(StreamRef Data); - virtual Error visitTypeMDTokenMap(StreamRef Data); - virtual Error visitMergedAssemblyInput(StreamRef Data); - virtual Error visitCoffSymbolRVA(StreamRef Data); -}; - -Error visitModuleSubstream(const ModuleSubstream &R, - IModuleSubstreamVisitor &V); - -} // namespace codeview -} // namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_MODULESUBSTREAMVISITOR_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/RecordSerialization.h b/llvm/include/llvm/DebugInfo/CodeView/RecordSerialization.h deleted file mode 100644 index 84179f5f..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/RecordSerialization.h +++ /dev/null @@ -1,278 +0,0 @@ -//===- RecordSerialization.h ------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_RECORDSERIALIZATION_H -#define LLVM_DEBUGINFO_CODEVIEW_RECORDSERIALIZATION_H - -#include "llvm/ADT/APSInt.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Endian.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include -#include - -namespace llvm { -namespace codeview { -using llvm::support::little32_t; -using llvm::support::ulittle16_t; -using llvm::support::ulittle32_t; - -struct RecordPrefix { - ulittle16_t RecordLen; // Record length, starting from &Leaf. - ulittle16_t RecordKind; // Record kind enum (SymRecordKind or TypeRecordKind) -}; - -/// Reinterpret a byte array as an array of characters. Does not interpret as -/// a C string, as StringRef has several helpers (split) that make that easy. -StringRef getBytesAsCharacters(ArrayRef LeafData); -StringRef getBytesAsCString(ArrayRef LeafData); - -/// Consumes sizeof(T) bytes from the given byte sequence. Returns an error if -/// there are not enough bytes remaining. Reinterprets the consumed bytes as a -/// T object and points 'Res' at them. -template -inline std::error_code consumeObject(U &Data, const T *&Res) { - if (Data.size() < sizeof(*Res)) - return std::make_error_code(std::errc::illegal_byte_sequence); - Res = reinterpret_cast(Data.data()); - Data = Data.drop_front(sizeof(*Res)); - return std::error_code(); -} - -inline std::error_code consume(ArrayRef &Data) { - return std::error_code(); -} - -/// Decodes a numeric "leaf" value. These are integer literals encountered in -/// the type stream. If the value is positive and less than LF_NUMERIC (1 << -/// 15), it is emitted directly in Data. Otherwise, it has a tag like LF_CHAR -/// that indicates the bitwidth and sign of the numeric data. -std::error_code consume(ArrayRef &Data, APSInt &Num); -std::error_code consume(StringRef &Data, APSInt &Num); - -/// Decodes a numeric leaf value that is known to be a particular type. -std::error_code consume_numeric(ArrayRef &Data, uint64_t &Value); - -/// Decodes signed and unsigned fixed-length integers. -std::error_code consume(ArrayRef &Data, uint32_t &Item); -std::error_code consume(StringRef &Data, uint32_t &Item); -std::error_code consume(ArrayRef &Data, int32_t &Item); - -/// Decodes a null terminated string. -std::error_code consume(ArrayRef &Data, StringRef &Item); - -/// Decodes an arbitrary object whose layout matches that of the underlying -/// byte sequence, and returns a pointer to the object. -template -std::error_code consume(ArrayRef &Data, T *&Item) { - return consumeObject(Data, Item); -} - -template struct serialize_conditional_impl { - serialize_conditional_impl(T &Item, U Func) : Item(Item), Func(Func) {} - - std::error_code deserialize(ArrayRef &Data) const { - if (!Func()) - return std::error_code(); - return consume(Data, Item); - } - - T &Item; - U Func; -}; - -template -serialize_conditional_impl serialize_conditional(T &Item, U Func) { - return serialize_conditional_impl(Item, Func); -} - -template struct serialize_array_impl { - serialize_array_impl(ArrayRef &Item, U Func) : Item(Item), Func(Func) {} - - std::error_code deserialize(ArrayRef &Data) const { - uint32_t N = Func(); - if (N == 0) - return std::error_code(); - - uint32_t Size = sizeof(T) * N; - - if (Size / sizeof(T) != N) - return std::make_error_code(std::errc::illegal_byte_sequence); - - if (Data.size() < Size) - return std::make_error_code(std::errc::illegal_byte_sequence); - - Item = ArrayRef(reinterpret_cast(Data.data()), N); - Data = Data.drop_front(Size); - return std::error_code(); - } - - ArrayRef &Item; - U Func; -}; - -template struct serialize_vector_tail_impl { - serialize_vector_tail_impl(std::vector &Item) : Item(Item) {} - - std::error_code deserialize(ArrayRef &Data) const { - T Field; - // Stop when we run out of bytes or we hit record padding bytes. - while (!Data.empty() && Data.front() < LF_PAD0) { - if (auto EC = consume(Data, Field)) - return EC; - Item.push_back(Field); - } - return std::error_code(); - } - - std::vector &Item; -}; - -struct serialize_null_term_string_array_impl { - serialize_null_term_string_array_impl(std::vector &Item) - : Item(Item) {} - - std::error_code deserialize(ArrayRef &Data) const { - if (Data.empty()) - return std::make_error_code(std::errc::illegal_byte_sequence); - - StringRef Field; - // Stop when we run out of bytes or we hit record padding bytes. - while (Data.front() != 0) { - if (auto EC = consume(Data, Field)) - return EC; - Item.push_back(Field); - if (Data.empty()) - return std::make_error_code(std::errc::illegal_byte_sequence); - } - Data = Data.drop_front(1); - return std::error_code(); - } - - std::vector &Item; -}; - -template struct serialize_arrayref_tail_impl { - serialize_arrayref_tail_impl(ArrayRef &Item) : Item(Item) {} - - std::error_code deserialize(ArrayRef &Data) const { - uint32_t Count = Data.size() / sizeof(T); - Item = ArrayRef(reinterpret_cast(Data.begin()), Count); - return std::error_code(); - } - - ArrayRef &Item; -}; - -template struct serialize_numeric_impl { - serialize_numeric_impl(T &Item) : Item(Item) {} - - std::error_code deserialize(ArrayRef &Data) const { - return consume_numeric(Data, Item); - } - - T &Item; -}; - -template -serialize_array_impl serialize_array(ArrayRef &Item, U Func) { - return serialize_array_impl(Item, Func); -} - -inline serialize_null_term_string_array_impl -serialize_null_term_string_array(std::vector &Item) { - return serialize_null_term_string_array_impl(Item); -} - -template -serialize_vector_tail_impl serialize_array_tail(std::vector &Item) { - return serialize_vector_tail_impl(Item); -} - -template -serialize_arrayref_tail_impl serialize_array_tail(ArrayRef &Item) { - return serialize_arrayref_tail_impl(Item); -} - -template serialize_numeric_impl serialize_numeric(T &Item) { - return serialize_numeric_impl(Item); -} - -// This field is only present in the byte record if the condition is true. The -// condition is evaluated lazily, so it can depend on items that were -// deserialized -// earlier. -#define CV_CONDITIONAL_FIELD(I, C) \ - serialize_conditional(I, [&]() { return !!(C); }) - -// This is an array of N items, where N is evaluated lazily, so it can refer -// to a field deserialized earlier. -#define CV_ARRAY_FIELD_N(I, N) serialize_array(I, [&]() { return N; }) - -// This is an array that exhausts the remainder of the input buffer. -#define CV_ARRAY_FIELD_TAIL(I) serialize_array_tail(I) - -// This is an array that consumes null terminated strings until a double null -// is encountered. -#define CV_STRING_ARRAY_NULL_TERM(I) serialize_null_term_string_array(I) - -#define CV_NUMERIC_FIELD(I) serialize_numeric(I) - -template -std::error_code consume(ArrayRef &Data, - const serialize_conditional_impl &Item) { - return Item.deserialize(Data); -} - -template -std::error_code consume(ArrayRef &Data, - const serialize_array_impl &Item) { - return Item.deserialize(Data); -} - -inline std::error_code -consume(ArrayRef &Data, - const serialize_null_term_string_array_impl &Item) { - return Item.deserialize(Data); -} - -template -std::error_code consume(ArrayRef &Data, - const serialize_vector_tail_impl &Item) { - return Item.deserialize(Data); -} - -template -std::error_code consume(ArrayRef &Data, - const serialize_arrayref_tail_impl &Item) { - return Item.deserialize(Data); -} - -template -std::error_code consume(ArrayRef &Data, - const serialize_numeric_impl &Item) { - return Item.deserialize(Data); -} - -template -std::error_code consume(ArrayRef &Data, T &&X, U &&Y, - Args &&... Rest) { - if (auto EC = consume(Data, X)) - return EC; - return consume(Data, Y, std::forward(Rest)...); -} - -#define CV_DESERIALIZE(...) \ - if (auto EC = consume(__VA_ARGS__)) \ - return EC; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h b/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h deleted file mode 100644 index 0b9349aa..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h +++ /dev/null @@ -1,275 +0,0 @@ -//===- StreamArray.h - Array backed by an arbitrary stream ----------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_STREAMARRAY_H -#define LLVM_DEBUGINFO_CODEVIEW_STREAMARRAY_H - -#include "llvm/DebugInfo/CodeView/StreamRef.h" -#include "llvm/Support/Error.h" - -#include -#include - -namespace llvm { -namespace codeview { - -/// VarStreamArrayExtractor is intended to be specialized to provide customized -/// extraction logic. On input it receives a StreamRef pointing to the -/// beginning of the next record, but where the length of the record is not yet -/// known. Upon completion, it should return an appropriate Error instance if -/// a record could not be extracted, or if one could be extracted it should -/// return success and set Len to the number of bytes this record occupied in -/// the underlying stream, and it should fill out the fields of the value type -/// Item appropriately to represent the current record. -/// -/// You can specialize this template for your own custom value types to avoid -/// having to specify a second template argument to VarStreamArray (documented -/// below). -template struct VarStreamArrayExtractor { - // Method intentionally deleted. You must provide an explicit specialization - // with the following method implemented. - Error operator()(StreamRef Stream, uint32_t &Len, T &Item) const = delete; -}; - -/// VarStreamArray represents an array of variable length records backed by a -/// stream. This could be a contiguous sequence of bytes in memory, it could -/// be a file on disk, or it could be a PDB stream where bytes are stored as -/// discontiguous blocks in a file. Usually it is desirable to treat arrays -/// as contiguous blocks of memory, but doing so with large PDB files, for -/// example, could mean allocating huge amounts of memory just to allow -/// re-ordering of stream data to be contiguous before iterating over it. By -/// abstracting this out, we need not duplicate this memory, and we can -/// iterate over arrays in arbitrarily formatted streams. Elements are parsed -/// lazily on iteration, so there is no upfront cost associated with building -/// a VarStreamArray, no matter how large it may be. -/// -/// You create a VarStreamArray by specifying a ValueType and an Extractor type. -/// If you do not specify an Extractor type, it expects you to specialize -/// VarStreamArrayExtractor for your ValueType. -/// -/// By default an Extractor is default constructed in the class, but in some -/// cases you might find it useful for an Extractor to maintain state across -/// extractions. In this case you can provide your own Extractor through a -/// secondary constructor. The following examples show various ways of -/// creating a VarStreamArray. -/// -/// // Will use VarStreamArrayExtractor as the extractor. -/// VarStreamArray MyTypeArray; -/// -/// // Will use a default-constructed MyExtractor as the extractor. -/// VarStreamArray MyTypeArray2; -/// -/// // Will use the specific instance of MyExtractor provided. -/// // MyExtractor need not be default-constructible in this case. -/// MyExtractor E(SomeContext); -/// VarStreamArray MyTypeArray3(E); -/// -template class VarStreamArrayIterator; - -template > -class VarStreamArray { - friend class VarStreamArrayIterator; - -public: - typedef VarStreamArrayIterator Iterator; - - VarStreamArray() {} - explicit VarStreamArray(const Extractor &E) : E(E) {} - - explicit VarStreamArray(StreamRef Stream) : Stream(Stream) {} - VarStreamArray(StreamRef Stream, const Extractor &E) : Stream(Stream), E(E) {} - - VarStreamArray(const VarStreamArray &Other) - : Stream(Other.Stream), E(Other.E) {} - - Iterator begin(bool *HadError = nullptr) const { - return Iterator(*this, E, HadError); - } - - Iterator end() const { return Iterator(E); } - - const Extractor &getExtractor() const { return E; } - - StreamRef getUnderlyingStream() const { return Stream; } - -private: - StreamRef Stream; - Extractor E; -}; - -template class VarStreamArrayIterator { - typedef VarStreamArrayIterator IterType; - typedef VarStreamArray ArrayType; - -public: - VarStreamArrayIterator(const ArrayType &Array, const Extractor &E, - bool *HadError = nullptr) - : IterRef(Array.Stream), Array(&Array), HadError(HadError), Extract(E) { - if (IterRef.getLength() == 0) - moveToEnd(); - else { - auto EC = Extract(IterRef, ThisLen, ThisValue); - if (EC) { - consumeError(std::move(EC)); - markError(); - } - } - } - VarStreamArrayIterator() {} - explicit VarStreamArrayIterator(const Extractor &E) : Extract(E) {} - ~VarStreamArrayIterator() {} - - bool operator==(const IterType &R) const { - if (Array && R.Array) { - // Both have a valid array, make sure they're same. - assert(Array == R.Array); - return IterRef == R.IterRef; - } - - // Both iterators are at the end. - if (!Array && !R.Array) - return true; - - // One is not at the end and one is. - return false; - } - - bool operator!=(const IterType &R) { return !(*this == R); } - - const ValueType &operator*() const { - assert(Array && !HasError); - return ThisValue; - } - - IterType &operator++() { - // We are done with the current record, discard it so that we are - // positioned at the next record. - IterRef = IterRef.drop_front(ThisLen); - if (IterRef.getLength() == 0) { - // There is nothing after the current record, we must make this an end - // iterator. - moveToEnd(); - } else { - // There is some data after the current record. - auto EC = Extract(IterRef, ThisLen, ThisValue); - if (EC) { - consumeError(std::move(EC)); - markError(); - } else if (ThisLen == 0) { - // An empty record? Make this an end iterator. - moveToEnd(); - } - } - return *this; - } - - IterType operator++(int) { - IterType Original = *this; - ++*this; - return Original; - } - -private: - void moveToEnd() { - Array = nullptr; - ThisLen = 0; - } - void markError() { - moveToEnd(); - HasError = true; - if (HadError != nullptr) - *HadError = true; - } - - ValueType ThisValue; - StreamRef IterRef; - const ArrayType *Array{nullptr}; - uint32_t ThisLen{0}; - bool HasError{false}; - bool *HadError{nullptr}; - Extractor Extract; -}; - -template class FixedStreamArrayIterator; - -template class FixedStreamArray { - friend class FixedStreamArrayIterator; - -public: - FixedStreamArray() : Stream() {} - FixedStreamArray(StreamRef Stream) : Stream(Stream) { - assert(Stream.getLength() % sizeof(T) == 0); - } - - const T &operator[](uint32_t Index) const { - assert(Index < size()); - uint32_t Off = Index * sizeof(T); - ArrayRef Data; - if (auto EC = Stream.readBytes(Off, sizeof(T), Data)) { - assert(false && "Unexpected failure reading from stream"); - // This should never happen since we asserted that the stream length was - // an exact multiple of the element size. - consumeError(std::move(EC)); - } - return *reinterpret_cast(Data.data()); - } - - uint32_t size() const { return Stream.getLength() / sizeof(T); } - - FixedStreamArrayIterator begin() const { - return FixedStreamArrayIterator(*this, 0); - } - FixedStreamArrayIterator end() const { - return FixedStreamArrayIterator(*this, size()); - } - - StreamRef getUnderlyingStream() const { return Stream; } - -private: - StreamRef Stream; -}; - -template class FixedStreamArrayIterator { -public: - FixedStreamArrayIterator(const FixedStreamArray &Array, uint32_t Index) - : Array(Array), Index(Index) {} - - bool operator==(const FixedStreamArrayIterator &R) { - assert(&Array == &R.Array); - return Index == R.Index; - } - - bool operator!=(const FixedStreamArrayIterator &R) { - return !(*this == R); - } - - const T &operator*() const { return Array[Index]; } - - FixedStreamArrayIterator &operator++() { - assert(Index < Array.size()); - ++Index; - return *this; - } - - FixedStreamArrayIterator operator++(int) { - FixedStreamArrayIterator Original = *this; - ++*this; - return Original; - } - -private: - const FixedStreamArray &Array; - uint32_t Index; -}; - -} // namespace codeview -} // namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_STREAMARRAY_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/StreamInterface.h b/llvm/include/llvm/DebugInfo/CodeView/StreamInterface.h deleted file mode 100644 index 241aec45..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/StreamInterface.h +++ /dev/null @@ -1,55 +0,0 @@ -//===- StreamInterface.h - Base interface for a stream of data --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_STREAMINTERFACE_H -#define LLVM_DEBUGINFO_CODEVIEW_STREAMINTERFACE_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/Support/Error.h" -#include - -namespace llvm { -namespace codeview { - -/// StreamInterface abstracts the notion of a data stream. This way, an -/// implementation could implement trivial reading from a contiguous memory -/// buffer or, as in the case of PDB files, reading from a set of possibly -/// discontiguous blocks. The implementation is required to return references -/// to stable memory, so if this is not possible (for example in the case of -/// a PDB file with discontiguous blocks, it must keep its own pool of temp -/// storage. -class StreamInterface { -public: - virtual ~StreamInterface() {} - - // Given an offset into the stream and a number of bytes, attempt to read - // the bytes and set the output ArrayRef to point to a reference into the - // stream, without copying any data. - virtual Error readBytes(uint32_t Offset, uint32_t Size, - ArrayRef &Buffer) const = 0; - - // Given an offset into the stream, read as much as possible without copying - // any data. - virtual Error readLongestContiguousChunk(uint32_t Offset, - ArrayRef &Buffer) const = 0; - - // Attempt to write the given bytes into the stream at the desired offset. - // This will always necessitate a copy. Cannot shrink or grow the stream, - // only writes into existing allocated space. - virtual Error writeBytes(uint32_t Offset, ArrayRef Data) const = 0; - - virtual uint32_t getLength() const = 0; - - virtual Error commit() const = 0; -}; - -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_STREAMINTERFACE_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/StreamReader.h b/llvm/include/llvm/DebugInfo/CodeView/StreamReader.h deleted file mode 100644 index 2f497c2c..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/StreamReader.h +++ /dev/null @@ -1,111 +0,0 @@ -//===- StreamReader.h - Reads bytes and objects from a stream ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_STREAMREADER_H -#define LLVM_DEBUGINFO_CODEVIEW_STREAMREADER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/DebugInfo/CodeView/CodeViewError.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamInterface.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -#include - -namespace llvm { -namespace codeview { - -class StreamRef; - -class StreamReader { -public: - StreamReader(StreamRef Stream); - - Error readLongestContiguousChunk(ArrayRef &Buffer); - Error readBytes(ArrayRef &Buffer, uint32_t Size); - Error readInteger(uint16_t &Dest); - Error readInteger(uint32_t &Dest); - Error readZeroString(StringRef &Dest); - Error readFixedString(StringRef &Dest, uint32_t Length); - Error readStreamRef(StreamRef &Ref); - Error readStreamRef(StreamRef &Ref, uint32_t Length); - - template Error readEnum(T &Dest) { - typename std::underlying_type::type N; - if (auto EC = readInteger(N)) - return EC; - Dest = static_cast(N); - return Error::success(); - } - - template Error readObject(const T *&Dest) { - ArrayRef Buffer; - if (auto EC = readBytes(Buffer, sizeof(T))) - return EC; - Dest = reinterpret_cast(Buffer.data()); - return Error::success(); - } - - template - Error readArray(ArrayRef &Array, uint32_t NumElements) { - ArrayRef Bytes; - if (NumElements == 0) { - Array = ArrayRef(); - return Error::success(); - } - - if (NumElements > UINT32_MAX/sizeof(T)) - return make_error(cv_error_code::insufficient_buffer); - - if (auto EC = readBytes(Bytes, NumElements * sizeof(T))) - return EC; - Array = ArrayRef(reinterpret_cast(Bytes.data()), NumElements); - return Error::success(); - } - - template - Error readArray(VarStreamArray &Array, uint32_t Size) { - StreamRef S; - if (auto EC = readStreamRef(S, Size)) - return EC; - Array = VarStreamArray(S, Array.getExtractor()); - return Error::success(); - } - - template - Error readArray(FixedStreamArray &Array, uint32_t NumItems) { - if (NumItems == 0) { - Array = FixedStreamArray(); - return Error::success(); - } - uint32_t Length = NumItems * sizeof(T); - if (Length / sizeof(T) != NumItems) - return make_error(cv_error_code::corrupt_record); - if (Offset + Length > Stream.getLength()) - return make_error(cv_error_code::insufficient_buffer); - StreamRef View = Stream.slice(Offset, Length); - Array = FixedStreamArray(View); - Offset += Length; - return Error::success(); - } - - void setOffset(uint32_t Off) { Offset = Off; } - uint32_t getOffset() const { return Offset; } - uint32_t getLength() const { return Stream.getLength(); } - uint32_t bytesRemaining() const { return getLength() - getOffset(); } - -private: - StreamRef Stream; - uint32_t Offset; -}; -} // namespace codeview -} // namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_STREAMREADER_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/StreamRef.h b/llvm/include/llvm/DebugInfo/CodeView/StreamRef.h deleted file mode 100644 index a4f244a3..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/StreamRef.h +++ /dev/null @@ -1,104 +0,0 @@ -//===- StreamRef.h - A copyable reference to a stream -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_STREAMREF_H -#define LLVM_DEBUGINFO_CODEVIEW_STREAMREF_H - -#include "llvm/DebugInfo/CodeView/CodeViewError.h" -#include "llvm/DebugInfo/CodeView/StreamInterface.h" - -namespace llvm { -namespace codeview { - -class StreamRef { -public: - StreamRef() : Stream(nullptr), ViewOffset(0), Length(0) {} - StreamRef(const StreamInterface &Stream) - : Stream(&Stream), ViewOffset(0), Length(Stream.getLength()) {} - StreamRef(const StreamInterface &Stream, uint32_t Offset, uint32_t Length) - : Stream(&Stream), ViewOffset(Offset), Length(Length) {} - - // Use StreamRef.slice() instead. - StreamRef(const StreamRef &S, uint32_t Offset, uint32_t Length) = delete; - - Error readBytes(uint32_t Offset, uint32_t Size, - ArrayRef &Buffer) const { - if (ViewOffset + Offset < Offset) - return make_error(cv_error_code::insufficient_buffer); - if (Size + Offset > Length) - return make_error(cv_error_code::insufficient_buffer); - return Stream->readBytes(ViewOffset + Offset, Size, Buffer); - } - - // Given an offset into the stream, read as much as possible without copying - // any data. - Error readLongestContiguousChunk(uint32_t Offset, - ArrayRef &Buffer) const { - if (Offset >= Length) - return make_error(cv_error_code::insufficient_buffer); - - if (auto EC = Stream->readLongestContiguousChunk(Offset, Buffer)) - return EC; - // This StreamRef might refer to a smaller window over a larger stream. In - // that case we will have read out more bytes than we should return, because - // we should not read past the end of the current view. - uint32_t MaxLength = Length - Offset; - if (Buffer.size() > MaxLength) - Buffer = Buffer.slice(0, MaxLength); - return Error::success(); - } - - Error writeBytes(uint32_t Offset, ArrayRef Data) const { - if (Data.size() + Offset > Length) - return make_error(cv_error_code::insufficient_buffer); - return Stream->writeBytes(ViewOffset + Offset, Data); - } - - uint32_t getLength() const { return Length; } - - Error commit() const { return Stream->commit(); } - - StreamRef drop_front(uint32_t N) const { - if (!Stream) - return StreamRef(); - - N = std::min(N, Length); - return StreamRef(*Stream, ViewOffset + N, Length - N); - } - - StreamRef keep_front(uint32_t N) const { - if (!Stream) - return StreamRef(); - N = std::min(N, Length); - return StreamRef(*Stream, ViewOffset, N); - } - - StreamRef slice(uint32_t Offset, uint32_t Len) const { - return drop_front(Offset).keep_front(Len); - } - - bool operator==(const StreamRef &Other) const { - if (Stream != Other.Stream) - return false; - if (ViewOffset != Other.ViewOffset) - return false; - if (Length != Other.Length) - return false; - return true; - } - -private: - const StreamInterface *Stream; - uint32_t ViewOffset; - uint32_t Length; -}; -} -} - -#endif // LLVM_DEBUGINFO_CODEVIEW_STREAMREF_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/StreamWriter.h b/llvm/include/llvm/DebugInfo/CodeView/StreamWriter.h deleted file mode 100644 index 4d393d2e..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/StreamWriter.h +++ /dev/null @@ -1,86 +0,0 @@ -//===- StreamWriter.h - Writes bytes and objects to a stream ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_STREAMWRITER_H -#define LLVM_DEBUGINFO_CODEVIEW_STREAMWRITER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/DebugInfo/CodeView/CodeViewError.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamInterface.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -#include - -namespace llvm { -namespace codeview { - -class StreamRef; - -class StreamWriter { -public: - StreamWriter(StreamRef Stream); - - Error writeBytes(ArrayRef Buffer); - Error writeInteger(uint16_t Dest); - Error writeInteger(uint32_t Dest); - Error writeZeroString(StringRef Str); - Error writeFixedString(StringRef Str); - Error writeStreamRef(StreamRef Ref); - Error writeStreamRef(StreamRef Ref, uint32_t Size); - - template Error writeEnum(T Num) { - return writeInteger( - static_cast::type>(Num)); - } - - template Error writeObject(const T &Obj) { - static_assert(!std::is_pointer::value, - "writeObject should not be used with pointers, to write " - "the pointed-to value dereference the pointer before calling " - "writeObject"); - return writeBytes( - ArrayRef(reinterpret_cast(&Obj), sizeof(T))); - } - - template Error writeArray(ArrayRef Array) { - if (Array.size() == 0) - return Error::success(); - - if (Array.size() > UINT32_MAX / sizeof(T)) - return make_error(cv_error_code::insufficient_buffer); - - return writeBytes( - ArrayRef(reinterpret_cast(Array.data()), - Array.size() * sizeof(T))); - } - - template - Error writeArray(VarStreamArray Array) { - return writeStreamRef(Array.getUnderlyingStream()); - } - - template Error writeArray(FixedStreamArray Array) { - return writeStreamRef(Array.getUnderlyingStream()); - } - - void setOffset(uint32_t Off) { Offset = Off; } - uint32_t getOffset() const { return Offset; } - uint32_t getLength() const { return Stream.getLength(); } - uint32_t bytesRemaining() const { return getLength() - getOffset(); } - -private: - StreamRef Stream; - uint32_t Offset; -}; -} // namespace codeview -} // namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_STREAMREADER_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/SymbolDumpDelegate.h b/llvm/include/llvm/DebugInfo/CodeView/SymbolDumpDelegate.h deleted file mode 100644 index 30b0a404..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/SymbolDumpDelegate.h +++ /dev/null @@ -1,37 +0,0 @@ -//===-- SymbolDumpDelegate.h ------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLDUMPDELEGATE_H -#define LLVM_DEBUGINFO_CODEVIEW_SYMBOLDUMPDELEGATE_H - -#include "SymbolVisitorDelegate.h" - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" - -#include - -namespace llvm { - -namespace codeview { - -class SymbolDumpDelegate : public SymbolVisitorDelegate { -public: - virtual ~SymbolDumpDelegate() {} - - virtual void printRelocatedField(StringRef Label, uint32_t RelocOffset, - uint32_t Offset, - StringRef *RelocSym = nullptr) = 0; - virtual void printBinaryBlockWithRelocs(StringRef Label, - ArrayRef Block) = 0; -}; -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLDUMPDELEGATE_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/SymbolDumper.h b/llvm/include/llvm/DebugInfo/CodeView/SymbolDumper.h deleted file mode 100644 index 648e40f5..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/SymbolDumper.h +++ /dev/null @@ -1,54 +0,0 @@ -//===-- SymbolDumper.h - CodeView symbol info dumper ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLDUMPER_H -#define LLVM_DEBUGINFO_CODEVIEW_SYMBOLDUMPER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/DebugInfo/CodeView/SymbolDumpDelegate.h" -#include "llvm/DebugInfo/CodeView/SymbolRecord.h" -#include "llvm/DebugInfo/CodeView/TypeIndex.h" - -namespace llvm { -class ScopedPrinter; - -namespace codeview { -class CVTypeDumper; - -/// Dumper for CodeView symbol streams found in COFF object files and PDB files. -class CVSymbolDumper { -public: - CVSymbolDumper(ScopedPrinter &W, CVTypeDumper &CVTD, - std::unique_ptr ObjDelegate, - bool PrintRecordBytes) - : W(W), CVTD(CVTD), ObjDelegate(std::move(ObjDelegate)), - PrintRecordBytes(PrintRecordBytes) {} - - /// Dumps one type record. Returns false if there was a type parsing error, - /// and true otherwise. This should be called in order, since the dumper - /// maintains state about previous records which are necessary for cross - /// type references. - bool dump(const CVRecord &Record); - - /// Dumps the type records in Data. Returns false if there was a type stream - /// parse error, and true otherwise. - bool dump(const CVSymbolArray &Symbols); - -private: - ScopedPrinter &W; - CVTypeDumper &CVTD; - std::unique_ptr ObjDelegate; - - bool PrintRecordBytes; -}; -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLDUMPER_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h b/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h deleted file mode 100644 index 77e894fb..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h +++ /dev/null @@ -1,1452 +0,0 @@ -//===- SymbolRecord.h -------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORD_H -#define LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORD_H - -#include "llvm/ADT/APSInt.h" -#include "llvm/ADT/Optional.h" -#include "llvm/DebugInfo/CodeView/CVRecord.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/RecordSerialization.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamInterface.h" -#include "llvm/DebugInfo/CodeView/TypeIndex.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -namespace llvm { -namespace codeview { - -using llvm::support::ulittle16_t; -using llvm::support::ulittle32_t; -using llvm::support::little32_t; - -class SymbolRecord { -protected: - explicit SymbolRecord(SymbolRecordKind Kind) : Kind(Kind) {} - -public: - SymbolRecordKind getKind() const { return Kind; } - -private: - SymbolRecordKind Kind; -}; - -// S_GPROC32, S_LPROC32, S_GPROC32_ID, S_LPROC32_ID, S_LPROC32_DPC or -// S_LPROC32_DPC_ID -class ProcSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t PtrParent; - ulittle32_t PtrEnd; - ulittle32_t PtrNext; - ulittle32_t CodeSize; - ulittle32_t DbgStart; - ulittle32_t DbgEnd; - TypeIndex FunctionType; - ulittle32_t CodeOffset; - ulittle16_t Segment; - uint8_t Flags; // ProcSymFlags enum - // Name: The null-terminated name follows. - }; - - ProcSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H, - StringRef Name) - : SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H), Name(Name) { - } - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return ProcSym(Kind, RecordOffset, H, Name); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, CodeOffset); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_THUNK32 -class Thunk32Sym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Parent; - ulittle32_t End; - ulittle32_t Next; - ulittle32_t Off; - ulittle16_t Seg; - ulittle16_t Len; - uint8_t Ord; // ThunkOrdinal enumeration - // Name: The null-terminated name follows. - // Variant portion of thunk - }; - - Thunk32Sym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H, - StringRef Name, ArrayRef VariantData) - : SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H), Name(Name), - VariantData(VariantData) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - ArrayRef VariantData; - - CV_DESERIALIZE(Data, H, Name, CV_ARRAY_FIELD_TAIL(VariantData)); - - return Thunk32Sym(Kind, RecordOffset, H, Name, VariantData); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; - ArrayRef VariantData; -}; - -// S_TRAMPOLINE -class TrampolineSym : public SymbolRecord { -public: - struct Hdr { - ulittle16_t Type; // TrampolineType enum - ulittle16_t Size; - ulittle32_t ThunkOff; - ulittle32_t TargetOff; - ulittle16_t ThunkSection; - ulittle16_t TargetSection; - }; - - TrampolineSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H) - : SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - - CV_DESERIALIZE(Data, H); - - return TrampolineSym(Kind, RecordOffset, H); - } - - uint32_t RecordOffset; - Hdr Header; -}; - -// S_SECTION -class SectionSym : public SymbolRecord { -public: - struct Hdr { - ulittle16_t SectionNumber; - uint8_t Alignment; - uint8_t Reserved; // Must be 0 - ulittle32_t Rva; - ulittle32_t Length; - ulittle32_t Characteristics; - // Name: The null-terminated name follows. - }; - - SectionSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H, - StringRef Name) - : SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H), Name(Name) { - } - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - - CV_DESERIALIZE(Data, H, Name); - - return SectionSym(Kind, RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_COFFGROUP -class CoffGroupSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Size; - ulittle32_t Characteristics; - ulittle32_t Offset; - ulittle16_t Segment; - // Name: The null-terminated name follows. - }; - - CoffGroupSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *H, - StringRef Name) - : SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*H), Name(Name) { - } - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - - CV_DESERIALIZE(Data, H, Name); - - return CoffGroupSym(Kind, RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -class ScopeEndSym : public SymbolRecord { -public: - ScopeEndSym(SymbolRecordKind Kind, uint32_t RecordOffset) - : SymbolRecord(Kind), RecordOffset(RecordOffset) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - return ScopeEndSym(Kind, RecordOffset); - } - uint32_t RecordOffset; -}; - -class CallerSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Count; - }; - - CallerSym(SymbolRecordKind Kind, uint32_t RecordOffset, const Hdr *Header, - ArrayRef Indices) - : SymbolRecord(Kind), RecordOffset(RecordOffset), Header(*Header), - Indices(Indices) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *Header; - ArrayRef Indices; - - CV_DESERIALIZE(Data, Header, CV_ARRAY_FIELD_N(Indices, Header->Count)); - - return CallerSym(Kind, RecordOffset, Header, Indices); - } - - uint32_t RecordOffset; - Hdr Header; - ArrayRef Indices; -}; - -struct BinaryAnnotationIterator { - struct AnnotationData { - BinaryAnnotationsOpCode OpCode; - StringRef Name; - uint32_t U1; - uint32_t U2; - int32_t S1; - }; - - BinaryAnnotationIterator(ArrayRef Annotations) : Data(Annotations) {} - BinaryAnnotationIterator() {} - BinaryAnnotationIterator(const BinaryAnnotationIterator &Other) - : Data(Other.Data) {} - - bool operator==(BinaryAnnotationIterator Other) const { - return Data == Other.Data; - } - - bool operator!=(BinaryAnnotationIterator Other) const { - return !(*this == Other); - } - - BinaryAnnotationIterator &operator=(const BinaryAnnotationIterator Other) { - Data = Other.Data; - return *this; - } - - BinaryAnnotationIterator &operator++() { - if (!ParseCurrentAnnotation()) { - *this = BinaryAnnotationIterator(); - return *this; - } - Data = Next; - Next = ArrayRef(); - Current.reset(); - return *this; - } - - BinaryAnnotationIterator operator++(int) { - BinaryAnnotationIterator Orig(*this); - ++(*this); - return Orig; - } - - const AnnotationData &operator*() { - ParseCurrentAnnotation(); - return Current.getValue(); - } - -private: - static uint32_t GetCompressedAnnotation(ArrayRef &Annotations) { - if (Annotations.empty()) - return -1; - - uint8_t FirstByte = Annotations.front(); - Annotations = Annotations.drop_front(); - - if ((FirstByte & 0x80) == 0x00) - return FirstByte; - - if (Annotations.empty()) - return -1; - - uint8_t SecondByte = Annotations.front(); - Annotations = Annotations.drop_front(); - - if ((FirstByte & 0xC0) == 0x80) - return ((FirstByte & 0x3F) << 8) | SecondByte; - - if (Annotations.empty()) - return -1; - - uint8_t ThirdByte = Annotations.front(); - Annotations = Annotations.drop_front(); - - if (Annotations.empty()) - return -1; - - uint8_t FourthByte = Annotations.front(); - Annotations = Annotations.drop_front(); - - if ((FirstByte & 0xE0) == 0xC0) - return ((FirstByte & 0x1F) << 24) | (SecondByte << 16) | - (ThirdByte << 8) | FourthByte; - - return -1; - }; - - static int32_t DecodeSignedOperand(uint32_t Operand) { - if (Operand & 1) - return -(Operand >> 1); - return Operand >> 1; - }; - - static int32_t DecodeSignedOperand(ArrayRef &Annotations) { - return DecodeSignedOperand(GetCompressedAnnotation(Annotations)); - }; - - bool ParseCurrentAnnotation() { - if (Current.hasValue()) - return true; - - Next = Data; - uint32_t Op = GetCompressedAnnotation(Next); - AnnotationData Result; - Result.OpCode = static_cast(Op); - switch (Result.OpCode) { - case BinaryAnnotationsOpCode::Invalid: - Result.Name = "Invalid"; - Next = ArrayRef(); - break; - case BinaryAnnotationsOpCode::CodeOffset: - Result.Name = "CodeOffset"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeCodeOffsetBase: - Result.Name = "ChangeCodeOffsetBase"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeCodeOffset: - Result.Name = "ChangeCodeOffset"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeCodeLength: - Result.Name = "ChangeCodeLength"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeFile: - Result.Name = "ChangeFile"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeLineEndDelta: - Result.Name = "ChangeLineEndDelta"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeRangeKind: - Result.Name = "ChangeRangeKind"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeColumnStart: - Result.Name = "ChangeColumnStart"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeColumnEnd: - Result.Name = "ChangeColumnEnd"; - Result.U1 = GetCompressedAnnotation(Next); - break; - case BinaryAnnotationsOpCode::ChangeLineOffset: - Result.Name = "ChangeLineOffset"; - Result.S1 = DecodeSignedOperand(Next); - break; - case BinaryAnnotationsOpCode::ChangeColumnEndDelta: - Result.Name = "ChangeColumnEndDelta"; - Result.S1 = DecodeSignedOperand(Next); - break; - case BinaryAnnotationsOpCode::ChangeCodeOffsetAndLineOffset: { - Result.Name = "ChangeCodeOffsetAndLineOffset"; - uint32_t Annotation = GetCompressedAnnotation(Next); - Result.S1 = DecodeSignedOperand(Annotation >> 4); - Result.U1 = Annotation & 0xf; - break; - } - case BinaryAnnotationsOpCode::ChangeCodeLengthAndCodeOffset: { - Result.Name = "ChangeCodeLengthAndCodeOffset"; - Result.U1 = GetCompressedAnnotation(Next); - Result.U2 = GetCompressedAnnotation(Next); - break; - } - } - Current = Result; - return true; - } - - Optional Current; - ArrayRef Data; - ArrayRef Next; -}; - -// S_INLINESITE -class InlineSiteSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t PtrParent; - ulittle32_t PtrEnd; - TypeIndex Inlinee; - // BinaryAnnotations - }; - - InlineSiteSym(uint32_t RecordOffset, const Hdr *H, - ArrayRef Annotations) - : SymbolRecord(SymbolRecordKind::InlineSiteSym), - RecordOffset(RecordOffset), Header(*H), Annotations(Annotations) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - ArrayRef Annotations; - CV_DESERIALIZE(Data, H, CV_ARRAY_FIELD_TAIL(Annotations)); - - return InlineSiteSym(RecordOffset, H, Annotations); - } - - llvm::iterator_range annotations() const { - return llvm::make_range(BinaryAnnotationIterator(Annotations), - BinaryAnnotationIterator()); - } - - uint32_t RecordOffset; - Hdr Header; - -private: - ArrayRef Annotations; -}; - -// S_PUB32 -class PublicSym32 : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Index; // Type index, or Metadata token if a managed symbol - ulittle32_t Off; - ulittle16_t Seg; - // Name: The null-terminated name follows. - }; - - PublicSym32(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::PublicSym32), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return PublicSym32(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_REGISTER -class RegisterSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Index; // Type index or Metadata token - ulittle16_t Register; // RegisterId enumeration - // Name: The null-terminated name follows. - }; - - RegisterSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::RegisterSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return RegisterSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_PROCREF, S_LPROCREF -class ProcRefSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t SumName; // SUC of the name (?) - ulittle32_t SymOffset; // Offset of actual symbol in $$Symbols - ulittle16_t Mod; // Module containing the actual symbol - // Name: The null-terminated name follows. - }; - - ProcRefSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::ProcRefSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return ProcRefSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_LOCAL -class LocalSym : public SymbolRecord { -public: - struct Hdr { - TypeIndex Type; - ulittle16_t Flags; // LocalSymFlags enum - // Name: The null-terminated name follows. - }; - - LocalSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::LocalSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return LocalSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -struct LocalVariableAddrRange { - ulittle32_t OffsetStart; - ulittle16_t ISectStart; - ulittle16_t Range; -}; - -struct LocalVariableAddrGap { - ulittle16_t GapStartOffset; - ulittle16_t Range; -}; - -enum : uint16_t { MaxDefRange = 0xf000 }; - -// S_DEFRANGE -class DefRangeSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Program; - LocalVariableAddrRange Range; - // LocalVariableAddrGap Gaps[]; - }; - - DefRangeSym(uint32_t RecordOffset, const Hdr *H, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeSym), RecordOffset(RecordOffset), - Header(*H), Gaps(Gaps) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - ArrayRef Gaps; - CV_DESERIALIZE(Data, H, CV_ARRAY_FIELD_TAIL(Gaps)); - - return DefRangeSym(RecordOffset, H, Gaps); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, Range); - } - - uint32_t RecordOffset; - Hdr Header; - ArrayRef Gaps; -}; - -// S_DEFRANGE_SUBFIELD -class DefRangeSubfieldSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Program; - ulittle16_t OffsetInParent; - LocalVariableAddrRange Range; - // LocalVariableAddrGap Gaps[]; - }; - DefRangeSubfieldSym(uint32_t RecordOffset, const Hdr *H, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeSubfieldSym), - RecordOffset(RecordOffset), Header(*H), Gaps(Gaps) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - ArrayRef Gaps; - CV_DESERIALIZE(Data, H, CV_ARRAY_FIELD_TAIL(Gaps)); - - return DefRangeSubfieldSym(RecordOffset, H, Gaps); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, Range); - } - - uint32_t RecordOffset; - Hdr Header; - ArrayRef Gaps; -}; - -// S_DEFRANGE_REGISTER -class DefRangeRegisterSym : public SymbolRecord { -public: - struct Hdr { - ulittle16_t Register; - ulittle16_t MayHaveNoName; - LocalVariableAddrRange Range; - // LocalVariableAddrGap Gaps[]; - }; - - DefRangeRegisterSym(uint32_t RecordOffset, const Hdr *H, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeRegisterSym), - RecordOffset(RecordOffset), Header(*H), Gaps(Gaps) {} - - DefRangeRegisterSym(uint16_t Register, uint16_t MayHaveNoName, - uint32_t OffsetStart, uint16_t ISectStart, uint16_t Range, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeRegisterSym), RecordOffset(0), - Gaps(Gaps) { - Header.Register = Register; - Header.MayHaveNoName = MayHaveNoName; - Header.Range.OffsetStart = OffsetStart; - Header.Range.ISectStart = ISectStart; - Header.Range.Range = Range; - } - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - ArrayRef Gaps; - CV_DESERIALIZE(Data, H, CV_ARRAY_FIELD_TAIL(Gaps)); - - return DefRangeRegisterSym(RecordOffset, H, Gaps); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, Range); - } - - uint32_t RecordOffset; - Hdr Header; - ArrayRef Gaps; -}; - -// S_DEFRANGE_SUBFIELD_REGISTER -class DefRangeSubfieldRegisterSym : public SymbolRecord { -public: - struct Hdr { - ulittle16_t Register; // Register to which the variable is relative - ulittle16_t MayHaveNoName; - ulittle32_t OffsetInParent; - LocalVariableAddrRange Range; - // LocalVariableAddrGap Gaps[]; - }; - - DefRangeSubfieldRegisterSym(uint32_t RecordOffset, const Hdr *H, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeSubfieldRegisterSym), - RecordOffset(RecordOffset), Header(*H), Gaps(Gaps) {} - - DefRangeSubfieldRegisterSym(uint16_t Register, uint16_t MayHaveNoName, - uint32_t OffsetInParent, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeSubfieldRegisterSym), - RecordOffset(0), Gaps(Gaps) { - Header.Register = Register; - Header.MayHaveNoName = MayHaveNoName; - Header.OffsetInParent = OffsetInParent; - } - - static ErrorOr - deserialize(SymbolRecordKind Kind, uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - ArrayRef Gaps; - CV_DESERIALIZE(Data, H, CV_ARRAY_FIELD_TAIL(Gaps)); - - return DefRangeSubfieldRegisterSym(RecordOffset, H, Gaps); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, Range); - } - - uint32_t RecordOffset; - Hdr Header; - ArrayRef Gaps; -}; - -// S_DEFRANGE_FRAMEPOINTER_REL -class DefRangeFramePointerRelSym : public SymbolRecord { -public: - struct Hdr { - little32_t Offset; // Offset from the frame pointer register - LocalVariableAddrRange Range; - // LocalVariableAddrGap Gaps[]; - }; - - DefRangeFramePointerRelSym(uint32_t RecordOffset, const Hdr *H, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeFramePointerRelSym), - RecordOffset(RecordOffset), Header(*H), Gaps(Gaps) {} - - static ErrorOr - deserialize(SymbolRecordKind Kind, uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - ArrayRef Gaps; - CV_DESERIALIZE(Data, H, CV_ARRAY_FIELD_TAIL(Gaps)); - - return DefRangeFramePointerRelSym(RecordOffset, H, Gaps); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, Range); - } - - uint32_t RecordOffset; - Hdr Header; - ArrayRef Gaps; -}; - -// S_DEFRANGE_REGISTER_REL -class DefRangeRegisterRelSym : public SymbolRecord { -public: - struct Hdr { - ulittle16_t BaseRegister; - ulittle16_t Flags; - little32_t BasePointerOffset; - LocalVariableAddrRange Range; - // LocalVariableAddrGap Gaps[]; - }; - - DefRangeRegisterRelSym(uint32_t RecordOffset, const Hdr *H, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeRegisterRelSym), - RecordOffset(RecordOffset), Header(*H), Gaps(Gaps) {} - - DefRangeRegisterRelSym(uint16_t BaseRegister, uint16_t Flags, - int32_t BasePointerOffset, uint32_t OffsetStart, - uint16_t ISectStart, uint16_t Range, - ArrayRef Gaps) - : SymbolRecord(SymbolRecordKind::DefRangeRegisterRelSym), RecordOffset(0), - Gaps(Gaps) { - Header.BaseRegister = BaseRegister; - Header.Flags = Flags; - Header.BasePointerOffset = BasePointerOffset; - Header.Range.OffsetStart = OffsetStart; - Header.Range.ISectStart = ISectStart; - Header.Range.Range = Range; - } - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - ArrayRef Gaps; - CV_DESERIALIZE(Data, H, CV_ARRAY_FIELD_TAIL(Gaps)); - - return DefRangeRegisterRelSym(RecordOffset, H, Gaps); - } - - bool hasSpilledUDTMember() const { return Header.Flags & 1; } - uint16_t offsetInParent() const { return Header.Flags >> 4; } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, Range); - } - - uint32_t RecordOffset; - Hdr Header; - ArrayRef Gaps; -}; - -// S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE -class DefRangeFramePointerRelFullScopeSym : public SymbolRecord { -public: - struct Hdr { - little32_t Offset; // Offset from the frame pointer register - }; - - DefRangeFramePointerRelFullScopeSym(uint32_t RecordOffset, const Hdr *H) - : SymbolRecord(SymbolRecordKind::DefRangeFramePointerRelFullScopeSym), - RecordOffset(RecordOffset), Header(*H) {} - - static ErrorOr - deserialize(SymbolRecordKind Kind, uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - CV_DESERIALIZE(Data, H); - - return DefRangeFramePointerRelFullScopeSym(RecordOffset, H); - } - - uint32_t RecordOffset; - Hdr Header; -}; - -// S_BLOCK32 -class BlockSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t PtrParent; - ulittle32_t PtrEnd; - ulittle32_t CodeSize; - ulittle32_t CodeOffset; - ulittle16_t Segment; - // Name: The null-terminated name follows. - }; - - BlockSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::BlockSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return BlockSym(RecordOffset, H, Name); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, CodeOffset); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_LABEL32 -class LabelSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t CodeOffset; - ulittle16_t Segment; - uint8_t Flags; // CV_PROCFLAGS - // Name: The null-terminated name follows. - }; - - LabelSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::LabelSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return LabelSym(RecordOffset, H, Name); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, CodeOffset); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_OBJNAME -class ObjNameSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Signature; - // Name: The null-terminated name follows. - }; - - ObjNameSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::ObjNameSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return ObjNameSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_ENVBLOCK -class EnvBlockSym : public SymbolRecord { -public: - struct Hdr { - uint8_t Reserved; - // Sequence of zero terminated strings. - }; - - EnvBlockSym(uint32_t RecordOffset, const Hdr *H, - const std::vector &Fields) - : SymbolRecord(SymbolRecordKind::EnvBlockSym), RecordOffset(RecordOffset), - Header(*H), Fields(Fields) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - std::vector Fields; - CV_DESERIALIZE(Data, H, CV_STRING_ARRAY_NULL_TERM(Fields)); - - return EnvBlockSym(RecordOffset, H, Fields); - } - - uint32_t RecordOffset; - Hdr Header; - std::vector Fields; -}; - -// S_EXPORT -class ExportSym : public SymbolRecord { -public: - struct Hdr { - ulittle16_t Ordinal; - ulittle16_t Flags; // ExportFlags - // Name: The null-terminated name follows. - }; - - ExportSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::ExportSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return ExportSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_FILESTATIC -class FileStaticSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Index; // Type Index - ulittle32_t ModFilenameOffset; // Index of mod filename in string table - ulittle16_t Flags; // LocalSymFlags enum - // Name: The null-terminated name follows. - }; - - FileStaticSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::FileStaticSym), - RecordOffset(RecordOffset), Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return FileStaticSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_COMPILE2 -class Compile2Sym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t flags; // CompileSym2Flags enum - uint8_t getLanguage() const { return flags & 0xFF; } - unsigned short Machine; // CPUType enum - unsigned short VersionFrontendMajor; - unsigned short VersionFrontendMinor; - unsigned short VersionFrontendBuild; - unsigned short VersionBackendMajor; - unsigned short VersionBackendMinor; - unsigned short VersionBackendBuild; - // Version: The null-terminated version string follows. - // Optional block of zero terminated strings terminated with a double zero. - }; - - Compile2Sym(uint32_t RecordOffset, const Hdr *H, StringRef Version) - : SymbolRecord(SymbolRecordKind::Compile2Sym), RecordOffset(RecordOffset), - Header(*H), Version(Version) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Version; - CV_DESERIALIZE(Data, H, Version); - - return Compile2Sym(RecordOffset, H, Version); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Version; -}; - -// S_COMPILE3 -class Compile3Sym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t flags; // CompileSym3Flags enum - uint8_t getLanguage() const { return flags & 0xff; } - ulittle16_t Machine; // CPUType enum - ulittle16_t VersionFrontendMajor; - ulittle16_t VersionFrontendMinor; - ulittle16_t VersionFrontendBuild; - ulittle16_t VersionFrontendQFE; - ulittle16_t VersionBackendMajor; - ulittle16_t VersionBackendMinor; - ulittle16_t VersionBackendBuild; - ulittle16_t VersionBackendQFE; - // VersionString: The null-terminated version string follows. - }; - - Compile3Sym(uint32_t RecordOffset, const Hdr *H, StringRef Version) - : SymbolRecord(SymbolRecordKind::Compile3Sym), RecordOffset(RecordOffset), - Header(*H), Version(Version) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Version; - CV_DESERIALIZE(Data, H, Version); - - return Compile3Sym(RecordOffset, H, Version); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Version; -}; - -// S_FRAMEPROC -class FrameProcSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t TotalFrameBytes; - ulittle32_t PaddingFrameBytes; - ulittle32_t OffsetToPadding; - ulittle32_t BytesOfCalleeSavedRegisters; - ulittle32_t OffsetOfExceptionHandler; - ulittle16_t SectionIdOfExceptionHandler; - ulittle32_t Flags; - }; - - FrameProcSym(uint32_t RecordOffset, const Hdr *H) - : SymbolRecord(SymbolRecordKind::FrameProcSym), - RecordOffset(RecordOffset), Header(*H) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - CV_DESERIALIZE(Data, H); - - return FrameProcSym(RecordOffset, H); - } - - uint32_t RecordOffset; - Hdr Header; -}; - -// S_CALLSITEINFO -class CallSiteInfoSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t CodeOffset; - ulittle16_t Segment; - ulittle16_t Reserved; - TypeIndex Type; - }; - - CallSiteInfoSym(uint32_t RecordOffset, const Hdr *H) - : SymbolRecord(SymbolRecordKind::CallSiteInfoSym), - RecordOffset(RecordOffset), Header(*H) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - CV_DESERIALIZE(Data, H); - - return CallSiteInfoSym(RecordOffset, H); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, CodeOffset); - } - - uint32_t RecordOffset; - Hdr Header; -}; - -// S_HEAPALLOCSITE -class HeapAllocationSiteSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t CodeOffset; - ulittle16_t Segment; - ulittle16_t CallInstructionSize; - TypeIndex Type; - }; - - HeapAllocationSiteSym(uint32_t RecordOffset, const Hdr *H) - : SymbolRecord(SymbolRecordKind::HeapAllocationSiteSym), - RecordOffset(RecordOffset), Header(*H) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - CV_DESERIALIZE(Data, H); - - return HeapAllocationSiteSym(RecordOffset, H); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, CodeOffset); - } - - uint32_t RecordOffset; - Hdr Header; -}; - -// S_FRAMECOOKIE -class FrameCookieSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t CodeOffset; - ulittle16_t Register; - uint8_t CookieKind; - uint8_t Flags; - }; - - FrameCookieSym(uint32_t RecordOffset, const Hdr *H) - : SymbolRecord(SymbolRecordKind::FrameCookieSym), - RecordOffset(RecordOffset), Header(*H) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - CV_DESERIALIZE(Data, H); - - return FrameCookieSym(RecordOffset, H); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, CodeOffset); - } - - uint32_t RecordOffset; - Hdr Header; -}; - -// S_UDT, S_COBOLUDT -class UDTSym : public SymbolRecord { -public: - struct Hdr { - TypeIndex Type; // Type of the UDT - // Name: The null-terminated name follows. - }; - - UDTSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::UDTSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return UDTSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_BUILDINFO -class BuildInfoSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t BuildId; - }; - - BuildInfoSym(uint32_t RecordOffset, const Hdr *H) - : SymbolRecord(SymbolRecordKind::BuildInfoSym), - RecordOffset(RecordOffset), Header(*H) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - CV_DESERIALIZE(Data, H); - - return BuildInfoSym(RecordOffset, H); - } - - uint32_t RecordOffset; - Hdr Header; -}; - -// S_BPREL32 -class BPRelativeSym : public SymbolRecord { -public: - struct Hdr { - little32_t Offset; // Offset from the base pointer register - TypeIndex Type; // Type of the variable - // Name: The null-terminated name follows. - }; - - BPRelativeSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::BPRelativeSym), - RecordOffset(RecordOffset), Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return BPRelativeSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_REGREL32 -class RegRelativeSym : public SymbolRecord { -public: - struct Hdr { - ulittle32_t Offset; // Offset from the register - TypeIndex Type; // Type of the variable - ulittle16_t Register; // Register to which the variable is relative - // Name: The null-terminated name follows. - }; - - RegRelativeSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::RegRelativeSym), - RecordOffset(RecordOffset), Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return RegRelativeSym(RecordOffset, H, Name); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_CONSTANT, S_MANCONSTANT -class ConstantSym : public SymbolRecord { -public: - struct Hdr { - TypeIndex Type; - // Value: The value of the constant. - // Name: The null-terminated name follows. - }; - - ConstantSym(uint32_t RecordOffset, const Hdr *H, const APSInt &Value, - StringRef Name) - : SymbolRecord(SymbolRecordKind::ConstantSym), RecordOffset(RecordOffset), - Header(*H), Value(Value), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - APSInt Value; - StringRef Name; - CV_DESERIALIZE(Data, H, Value, Name); - - return ConstantSym(RecordOffset, H, Value, Name); - } - - uint32_t RecordOffset; - Hdr Header; - APSInt Value; - StringRef Name; -}; - -// S_LDATA32, S_GDATA32, S_LMANDATA, S_GMANDATA -class DataSym : public SymbolRecord { -public: - struct Hdr { - TypeIndex Type; - ulittle32_t DataOffset; - ulittle16_t Segment; - // Name: The null-terminated name follows. - }; - - DataSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::DataSym), RecordOffset(RecordOffset), - Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return DataSym(RecordOffset, H, Name); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, DataOffset); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -// S_LTHREAD32, S_GTHREAD32 -class ThreadLocalDataSym : public SymbolRecord { -public: - struct Hdr { - TypeIndex Type; - ulittle32_t DataOffset; - ulittle16_t Segment; - // Name: The null-terminated name follows. - }; - - ThreadLocalDataSym(uint32_t RecordOffset, const Hdr *H, StringRef Name) - : SymbolRecord(SymbolRecordKind::ThreadLocalDataSym), - RecordOffset(RecordOffset), Header(*H), Name(Name) {} - - static ErrorOr deserialize(SymbolRecordKind Kind, - uint32_t RecordOffset, - ArrayRef &Data) { - const Hdr *H = nullptr; - StringRef Name; - CV_DESERIALIZE(Data, H, Name); - - return ThreadLocalDataSym(RecordOffset, H, Name); - } - - uint32_t getRelocationOffset() const { - return RecordOffset + offsetof(Hdr, DataOffset); - } - - uint32_t RecordOffset; - Hdr Header; - StringRef Name; -}; - -typedef CVRecord CVSymbol; -typedef VarStreamArray CVSymbolArray; - -} // namespace codeview -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h b/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h deleted file mode 100644 index a4965168..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h +++ /dev/null @@ -1,33 +0,0 @@ -//===-- SymbolVisitorDelegate.h ---------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORDELEGATE_H -#define LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORDELEGATE_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" - -#include - -namespace llvm { - -namespace codeview { - -class SymbolVisitorDelegate { -public: - virtual ~SymbolVisitorDelegate() {} - - virtual uint32_t getRecordOffset(ArrayRef Record) = 0; - virtual StringRef getFileNameForFileOffset(uint32_t FileOffset) = 0; - virtual StringRef getStringTable() = 0; -}; -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLVISITORDELEGATE_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeDumper.h b/llvm/include/llvm/DebugInfo/CodeView/TypeDumper.h deleted file mode 100644 index ca79ab07..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeDumper.h +++ /dev/null @@ -1,105 +0,0 @@ -//===-- TypeDumper.h - CodeView type info dumper ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEDUMPER_H -#define LLVM_DEBUGINFO_CODEVIEW_TYPEDUMPER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/DebugInfo/CodeView/TypeIndex.h" -#include "llvm/DebugInfo/CodeView/TypeRecord.h" -#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h" - -namespace llvm { -class ScopedPrinter; - -namespace codeview { - -/// Dumper for CodeView type streams found in COFF object files and PDB files. -class CVTypeDumper : public TypeVisitorCallbacks { -public: - CVTypeDumper(ScopedPrinter *W, bool PrintRecordBytes) - : W(W), PrintRecordBytes(PrintRecordBytes) {} - - StringRef getTypeName(TypeIndex TI); - void printTypeIndex(StringRef FieldName, TypeIndex TI); - - /// Dumps one type record. Returns false if there was a type parsing error, - /// and true otherwise. This should be called in order, since the dumper - /// maintains state about previous records which are necessary for cross - /// type references. - Error dump(const CVRecord &Record); - - /// Dumps the type records in Types. Returns false if there was a type stream - /// parse error, and true otherwise. - Error dump(const CVTypeArray &Types); - - /// Dumps the type records in Data. Returns false if there was a type stream - /// parse error, and true otherwise. Use this method instead of the - /// CVTypeArray overload when type records are laid out contiguously in - /// memory. - Error dump(ArrayRef Data); - - /// Gets the type index for the next type record. - unsigned getNextTypeIndex() const { - return 0x1000 + CVUDTNames.size(); - } - - /// Records the name of a type, and reserves its type index. - void recordType(StringRef Name) { CVUDTNames.push_back(Name); } - - /// Saves the name in a StringSet and creates a stable StringRef. - StringRef saveName(StringRef TypeName) { - return TypeNames.insert(TypeName).first->getKey(); - } - - void setPrinter(ScopedPrinter *P); - ScopedPrinter *getPrinter() { return W; } - - /// Action to take on unknown types. By default, they are ignored. - Error visitUnknownType(const CVRecord &Record) override; - Error visitUnknownMember(const CVRecord &Record) override; - - /// Paired begin/end actions for all types. Receives all record data, - /// including the fixed-length record prefix. - Error visitTypeBegin(const CVRecord &Record) override; - Error visitTypeEnd(const CVRecord &Record) override; - -#define TYPE_RECORD(EnumName, EnumVal, Name) \ - Error visit##Name(Name##Record &Record) override; -#define MEMBER_RECORD(EnumName, EnumVal, Name) \ - TYPE_RECORD(EnumName, EnumVal, Name) -#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) -#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) -#include "TypeRecords.def" - -private: - void printMemberAttributes(MemberAttributes Attrs); - void printMemberAttributes(MemberAccess Access, MethodKind Kind, - MethodOptions Options); - - ScopedPrinter *W; - - bool PrintRecordBytes = false; - - /// Name of the current type. Only valid before visitTypeEnd. - StringRef Name; - - /// All user defined type records in .debug$T live in here. Type indices - /// greater than 0x1000 are user defined. Subtract 0x1000 from the index to - /// index into this vector. - SmallVector CVUDTNames; - - StringSet<> TypeNames; -}; - -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_TYPEDUMPER_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeIndex.h b/llvm/include/llvm/DebugInfo/CodeView/TypeIndex.h deleted file mode 100644 index c2ebf384..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeIndex.h +++ /dev/null @@ -1,192 +0,0 @@ -//===- TypeIndex.h ----------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEINDEX_H -#define LLVM_DEBUGINFO_CODEVIEW_TYPEINDEX_H - -#include "llvm/Support/Endian.h" -#include -#include - -namespace llvm { -namespace codeview { - -enum class SimpleTypeKind : uint32_t { - None = 0x0000, // uncharacterized type (no type) - Void = 0x0003, // void - NotTranslated = 0x0007, // type not translated by cvpack - HResult = 0x0008, // OLE/COM HRESULT - - SignedCharacter = 0x0010, // 8 bit signed - UnsignedCharacter = 0x0020, // 8 bit unsigned - NarrowCharacter = 0x0070, // really a char - WideCharacter = 0x0071, // wide char - Character16 = 0x007a, // char16_t - Character32 = 0x007b, // char32_t - - SByte = 0x0068, // 8 bit signed int - Byte = 0x0069, // 8 bit unsigned int - Int16Short = 0x0011, // 16 bit signed - UInt16Short = 0x0021, // 16 bit unsigned - Int16 = 0x0072, // 16 bit signed int - UInt16 = 0x0073, // 16 bit unsigned int - Int32Long = 0x0012, // 32 bit signed - UInt32Long = 0x0022, // 32 bit unsigned - Int32 = 0x0074, // 32 bit signed int - UInt32 = 0x0075, // 32 bit unsigned int - Int64Quad = 0x0013, // 64 bit signed - UInt64Quad = 0x0023, // 64 bit unsigned - Int64 = 0x0076, // 64 bit signed int - UInt64 = 0x0077, // 64 bit unsigned int - Int128Oct = 0x0014, // 128 bit signed int - UInt128Oct = 0x0024, // 128 bit unsigned int - Int128 = 0x0078, // 128 bit signed int - UInt128 = 0x0079, // 128 bit unsigned int - - Float16 = 0x0046, // 16 bit real - Float32 = 0x0040, // 32 bit real - Float32PartialPrecision = 0x0045, // 32 bit PP real - Float48 = 0x0044, // 48 bit real - Float64 = 0x0041, // 64 bit real - Float80 = 0x0042, // 80 bit real - Float128 = 0x0043, // 128 bit real - - Complex16 = 0x0056, // 16 bit complex - Complex32 = 0x0050, // 32 bit complex - Complex32PartialPrecision = 0x0055, // 32 bit PP complex - Complex48 = 0x0054, // 48 bit complex - Complex64 = 0x0051, // 64 bit complex - Complex80 = 0x0052, // 80 bit complex - Complex128 = 0x0053, // 128 bit complex - - Boolean8 = 0x0030, // 8 bit boolean - Boolean16 = 0x0031, // 16 bit boolean - Boolean32 = 0x0032, // 32 bit boolean - Boolean64 = 0x0033, // 64 bit boolean - Boolean128 = 0x0034, // 128 bit boolean -}; - -enum class SimpleTypeMode : uint32_t { - Direct = 0x00000000, // Not a pointer - NearPointer = 0x00000100, // Near pointer - FarPointer = 0x00000200, // Far pointer - HugePointer = 0x00000300, // Huge pointer - NearPointer32 = 0x00000400, // 32 bit near pointer - FarPointer32 = 0x00000500, // 32 bit far pointer - NearPointer64 = 0x00000600, // 64 bit near pointer - NearPointer128 = 0x00000700 // 128 bit near pointer -}; - -/// A 32-bit type reference. Types are indexed by their order of appearance in -/// .debug$T plus 0x1000. Type indices less than 0x1000 are "simple" types, -/// composed of a SimpleTypeMode byte followed by a SimpleTypeKind byte. -class TypeIndex { -public: - static const uint32_t FirstNonSimpleIndex = 0x1000; - static const uint32_t SimpleKindMask = 0x000000ff; - static const uint32_t SimpleModeMask = 0x00000700; - -public: - TypeIndex() : Index(0) {} - explicit TypeIndex(uint32_t Index) : Index(Index) {} - explicit TypeIndex(SimpleTypeKind Kind) - : Index(static_cast(Kind)) {} - TypeIndex(SimpleTypeKind Kind, SimpleTypeMode Mode) - : Index(static_cast(Kind) | static_cast(Mode)) {} - - uint32_t getIndex() const { return Index; } - bool isSimple() const { return Index < FirstNonSimpleIndex; } - - bool isNoneType() const { return *this == None(); } - - SimpleTypeKind getSimpleKind() const { - assert(isSimple()); - return static_cast(Index & SimpleKindMask); - } - - SimpleTypeMode getSimpleMode() const { - assert(isSimple()); - return static_cast(Index & SimpleModeMask); - } - - static TypeIndex None() { return TypeIndex(SimpleTypeKind::None); } - static TypeIndex Void() { return TypeIndex(SimpleTypeKind::Void); } - static TypeIndex VoidPointer32() { - return TypeIndex(SimpleTypeKind::Void, SimpleTypeMode::NearPointer32); - } - static TypeIndex VoidPointer64() { - return TypeIndex(SimpleTypeKind::Void, SimpleTypeMode::NearPointer64); - } - - static TypeIndex SignedCharacter() { - return TypeIndex(SimpleTypeKind::SignedCharacter); - } - static TypeIndex UnsignedCharacter() { - return TypeIndex(SimpleTypeKind::UnsignedCharacter); - } - static TypeIndex NarrowCharacter() { - return TypeIndex(SimpleTypeKind::NarrowCharacter); - } - static TypeIndex WideCharacter() { - return TypeIndex(SimpleTypeKind::WideCharacter); - } - static TypeIndex Int16Short() { - return TypeIndex(SimpleTypeKind::Int16Short); - } - static TypeIndex UInt16Short() { - return TypeIndex(SimpleTypeKind::UInt16Short); - } - static TypeIndex Int32() { return TypeIndex(SimpleTypeKind::Int32); } - static TypeIndex UInt32() { return TypeIndex(SimpleTypeKind::UInt32); } - static TypeIndex Int32Long() { return TypeIndex(SimpleTypeKind::Int32Long); } - static TypeIndex UInt32Long() { - return TypeIndex(SimpleTypeKind::UInt32Long); - } - static TypeIndex Int64() { return TypeIndex(SimpleTypeKind::Int64); } - static TypeIndex UInt64() { return TypeIndex(SimpleTypeKind::UInt64); } - static TypeIndex Int64Quad() { return TypeIndex(SimpleTypeKind::Int64Quad); } - static TypeIndex UInt64Quad() { - return TypeIndex(SimpleTypeKind::UInt64Quad); - } - - static TypeIndex Float32() { return TypeIndex(SimpleTypeKind::Float32); } - static TypeIndex Float64() { return TypeIndex(SimpleTypeKind::Float64); } - - friend inline bool operator==(const TypeIndex &A, const TypeIndex &B) { - return A.getIndex() == B.getIndex(); - } - - friend inline bool operator!=(const TypeIndex &A, const TypeIndex &B) { - return A.getIndex() != B.getIndex(); - } - - friend inline bool operator<(const TypeIndex &A, const TypeIndex &B) { - return A.getIndex() < B.getIndex(); - } - - friend inline bool operator<=(const TypeIndex &A, const TypeIndex &B) { - return A.getIndex() <= B.getIndex(); - } - - friend inline bool operator>(const TypeIndex &A, const TypeIndex &B) { - return A.getIndex() > B.getIndex(); - } - - friend inline bool operator>=(const TypeIndex &A, const TypeIndex &B) { - return A.getIndex() >= B.getIndex(); - } - -private: - support::ulittle32_t Index; -}; - -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h b/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h deleted file mode 100644 index 42751fbd..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h +++ /dev/null @@ -1,1202 +0,0 @@ -//===- TypeRecord.h ---------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H -#define LLVM_DEBUGINFO_CODEVIEW_TYPERECORD_H - -#include "llvm/ADT/APSInt.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/CodeView/CVRecord.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/TypeIndex.h" -#include "llvm/Support/ErrorOr.h" -#include -#include - -namespace llvm { -namespace codeview { - -using llvm::support::little32_t; -using llvm::support::ulittle16_t; -using llvm::support::ulittle32_t; - -/// Equvalent to CV_fldattr_t in cvinfo.h. -struct MemberAttributes { - ulittle16_t Attrs; - enum { - MethodKindShift = 2, - }; - - /// Get the access specifier. Valid for any kind of member. - MemberAccess getAccess() const { - return MemberAccess(unsigned(Attrs) & unsigned(MethodOptions::AccessMask)); - } - - /// Indicates if a method is defined with friend, virtual, static, etc. - MethodKind getMethodKind() const { - return MethodKind( - (unsigned(Attrs) & unsigned(MethodOptions::MethodKindMask)) >> - MethodKindShift); - } - - /// Get the flags that are not included in access control or method - /// properties. - MethodOptions getFlags() const { - return MethodOptions( - unsigned(Attrs) & - ~unsigned(MethodOptions::AccessMask | MethodOptions::MethodKindMask)); - } - - /// Is this method virtual. - bool isVirtual() const { - auto MP = getMethodKind(); - return MP != MethodKind::Vanilla && MP != MethodKind::Friend && - MP != MethodKind::Static; - } - - /// Does this member introduce a new virtual method. - bool isIntroducedVirtual() const { - auto MP = getMethodKind(); - return MP == MethodKind::IntroducingVirtual || - MP == MethodKind::PureIntroducingVirtual; - } -}; - -// Does not correspond to any tag, this is the tail of an LF_POINTER record -// if it represents a member pointer. -class MemberPointerInfo { -public: - MemberPointerInfo() {} - - MemberPointerInfo(TypeIndex ContainingType, - PointerToMemberRepresentation Representation) - : ContainingType(ContainingType), Representation(Representation) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(ArrayRef &Data); - - TypeIndex getContainingType() const { return ContainingType; } - PointerToMemberRepresentation getRepresentation() const { - return Representation; - } - -private: - struct Layout { - TypeIndex ClassType; - ulittle16_t Representation; // PointerToMemberRepresentation - }; - - TypeIndex ContainingType; - PointerToMemberRepresentation Representation; -}; - -class TypeRecord { -protected: - explicit TypeRecord(TypeRecordKind Kind) : Kind(Kind) {} - -public: - TypeRecordKind getKind() const { return Kind; } - -private: - TypeRecordKind Kind; -}; - -// LF_MODIFIER -class ModifierRecord : public TypeRecord { -public: - ModifierRecord(TypeIndex ModifiedType, ModifierOptions Modifiers) - : TypeRecord(TypeRecordKind::Modifier), ModifiedType(ModifiedType), - Modifiers(Modifiers) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getModifiedType() const { return ModifiedType; } - ModifierOptions getModifiers() const { return Modifiers; } - -private: - struct Layout { - TypeIndex ModifiedType; - ulittle16_t Modifiers; // ModifierOptions - }; - - TypeIndex ModifiedType; - ModifierOptions Modifiers; -}; - -// LF_PROCEDURE -class ProcedureRecord : public TypeRecord { -public: - ProcedureRecord(TypeIndex ReturnType, CallingConvention CallConv, - FunctionOptions Options, uint16_t ParameterCount, - TypeIndex ArgumentList) - : TypeRecord(TypeRecordKind::Procedure), ReturnType(ReturnType), - CallConv(CallConv), Options(Options), ParameterCount(ParameterCount), - ArgumentList(ArgumentList) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - static uint32_t getLayoutSize() { return 2 + sizeof(Layout); } - - TypeIndex getReturnType() const { return ReturnType; } - CallingConvention getCallConv() const { return CallConv; } - FunctionOptions getOptions() const { return Options; } - uint16_t getParameterCount() const { return ParameterCount; } - TypeIndex getArgumentList() const { return ArgumentList; } - -private: - struct Layout { - TypeIndex ReturnType; - CallingConvention CallConv; - FunctionOptions Options; - ulittle16_t NumParameters; - TypeIndex ArgListType; - }; - - TypeIndex ReturnType; - CallingConvention CallConv; - FunctionOptions Options; - uint16_t ParameterCount; - TypeIndex ArgumentList; -}; - -// LF_MFUNCTION -class MemberFunctionRecord : public TypeRecord { -public: - MemberFunctionRecord(TypeIndex ReturnType, TypeIndex ClassType, - TypeIndex ThisType, CallingConvention CallConv, - FunctionOptions Options, uint16_t ParameterCount, - TypeIndex ArgumentList, int32_t ThisPointerAdjustment) - : TypeRecord(TypeRecordKind::MemberFunction), ReturnType(ReturnType), - ClassType(ClassType), ThisType(ThisType), CallConv(CallConv), - Options(Options), ParameterCount(ParameterCount), - ArgumentList(ArgumentList), - ThisPointerAdjustment(ThisPointerAdjustment) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getReturnType() const { return ReturnType; } - TypeIndex getClassType() const { return ClassType; } - TypeIndex getThisType() const { return ThisType; } - CallingConvention getCallConv() const { return CallConv; } - FunctionOptions getOptions() const { return Options; } - uint16_t getParameterCount() const { return ParameterCount; } - TypeIndex getArgumentList() const { return ArgumentList; } - int32_t getThisPointerAdjustment() const { return ThisPointerAdjustment; } - -private: - struct Layout { - TypeIndex ReturnType; - TypeIndex ClassType; - TypeIndex ThisType; - CallingConvention CallConv; - FunctionOptions Options; - ulittle16_t NumParameters; - TypeIndex ArgListType; - little32_t ThisAdjustment; - }; - - TypeIndex ReturnType; - TypeIndex ClassType; - TypeIndex ThisType; - CallingConvention CallConv; - FunctionOptions Options; - uint16_t ParameterCount; - TypeIndex ArgumentList; - int32_t ThisPointerAdjustment; -}; - -// LF_MFUNC_ID -class MemberFuncIdRecord : public TypeRecord { -public: - MemberFuncIdRecord(TypeIndex ClassType, TypeIndex FunctionType, - StringRef Name) - : TypeRecord(TypeRecordKind::MemberFuncId), ClassType(ClassType), - FunctionType(FunctionType), Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - TypeIndex getClassType() const { return ClassType; } - TypeIndex getFunctionType() const { return FunctionType; } - StringRef getName() const { return Name; } - -private: - struct Layout { - TypeIndex ClassType; - TypeIndex FunctionType; - // Name: The null-terminated name follows. - }; - TypeIndex ClassType; - TypeIndex FunctionType; - StringRef Name; -}; - -// LF_ARGLIST, LF_SUBSTR_LIST -class ArgListRecord : public TypeRecord { -public: - ArgListRecord(TypeRecordKind Kind, ArrayRef Indices) - : TypeRecord(Kind), StringIndices(Indices) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - ArrayRef getIndices() const { return StringIndices; } - - static uint32_t getLayoutSize() { return 2 + sizeof(Layout); } - -private: - struct Layout { - ulittle32_t NumArgs; // Number of arguments - // ArgTypes[]: Type indicies of arguments - }; - - std::vector StringIndices; -}; - -// LF_POINTER -class PointerRecord : public TypeRecord { -public: - static const uint32_t PointerKindShift = 0; - static const uint32_t PointerKindMask = 0x1F; - - static const uint32_t PointerModeShift = 5; - static const uint32_t PointerModeMask = 0x07; - - static const uint32_t PointerSizeShift = 13; - static const uint32_t PointerSizeMask = 0xFF; - - PointerRecord(TypeIndex ReferentType, PointerKind Kind, PointerMode Mode, - PointerOptions Options, uint8_t Size) - : PointerRecord(ReferentType, Kind, Mode, Options, Size, - MemberPointerInfo()) {} - - PointerRecord(TypeIndex ReferentType, PointerKind Kind, PointerMode Mode, - PointerOptions Options, uint8_t Size, - const MemberPointerInfo &Member) - : TypeRecord(TypeRecordKind::Pointer), ReferentType(ReferentType), - PtrKind(Kind), Mode(Mode), Options(Options), Size(Size), - MemberInfo(Member) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getReferentType() const { return ReferentType; } - PointerKind getPointerKind() const { return PtrKind; } - PointerMode getMode() const { return Mode; } - PointerOptions getOptions() const { return Options; } - uint8_t getSize() const { return Size; } - MemberPointerInfo getMemberInfo() const { return MemberInfo; } - - bool isPointerToMember() const { - return Mode == PointerMode::PointerToDataMember || - Mode == PointerMode::PointerToMemberFunction; - } - bool isFlat() const { - return !!(uint32_t(Options) & uint32_t(PointerOptions::Flat32)); - } - bool isConst() const { - return !!(uint32_t(Options) & uint32_t(PointerOptions::Const)); - } - bool isVolatile() const { - return !!(uint32_t(Options) & uint32_t(PointerOptions::Volatile)); - } - bool isUnaligned() const { - return !!(uint32_t(Options) & uint32_t(PointerOptions::Unaligned)); - } - -private: - struct Layout { - TypeIndex PointeeType; - ulittle32_t Attrs; // pointer attributes - // if pointer to member: - // PointerToMemberTail - PointerKind getPtrKind() const { - return PointerKind(Attrs & PointerKindMask); - } - PointerMode getPtrMode() const { - return PointerMode((Attrs >> PointerModeShift) & PointerModeMask); - } - uint8_t getPtrSize() const { - return (Attrs >> PointerSizeShift) & PointerSizeMask; - } - bool isFlat() const { return Attrs & (1 << 8); } - bool isVolatile() const { return Attrs & (1 << 9); } - bool isConst() const { return Attrs & (1 << 10); } - bool isUnaligned() const { return Attrs & (1 << 11); } - - bool isPointerToDataMember() const { - return getPtrMode() == PointerMode::PointerToDataMember; - } - bool isPointerToMemberFunction() const { - return getPtrMode() == PointerMode::PointerToMemberFunction; - } - bool isPointerToMember() const { - return isPointerToMemberFunction() || isPointerToDataMember(); - } - }; - - TypeIndex ReferentType; - PointerKind PtrKind; - PointerMode Mode; - PointerOptions Options; - uint8_t Size; - MemberPointerInfo MemberInfo; -}; - -// LF_NESTTYPE -class NestedTypeRecord : public TypeRecord { -public: - NestedTypeRecord(TypeIndex Type, StringRef Name) - : TypeRecord(TypeRecordKind::NestedType), Type(Type), Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getNestedType() const { return Type; } - StringRef getName() const { return Name; } - -private: - struct Layout { - ulittle16_t Pad0; // Should be zero - TypeIndex Type; // Type index of nested type - // Name: Null-terminated string - }; - - TypeIndex Type; - StringRef Name; -}; - -// LF_ARRAY -class ArrayRecord : public TypeRecord { -public: - ArrayRecord(TypeIndex ElementType, TypeIndex IndexType, uint64_t Size, - StringRef Name) - : TypeRecord(TypeRecordKind::Array), ElementType(ElementType), - IndexType(IndexType), Size(Size), Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getElementType() const { return ElementType; } - TypeIndex getIndexType() const { return IndexType; } - uint64_t getSize() const { return Size; } - llvm::StringRef getName() const { return Name; } - -private: - struct Layout { - TypeIndex ElementType; - TypeIndex IndexType; - // SizeOf: LF_NUMERIC encoded size in bytes. Not element count! - // Name: The null-terminated name follows. - }; - - TypeIndex ElementType; - TypeIndex IndexType; - uint64_t Size; - llvm::StringRef Name; -}; - -class TagRecord : public TypeRecord { -protected: - TagRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, - TypeIndex FieldList, StringRef Name, StringRef UniqueName) - : TypeRecord(Kind), MemberCount(MemberCount), Options(Options), - FieldList(FieldList), Name(Name), UniqueName(UniqueName) {} - -public: - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static const int HfaKindShift = 11; - static const int HfaKindMask = 0x1800; - static const int WinRTKindShift = 14; - static const int WinRTKindMask = 0xC000; - - uint16_t getMemberCount() const { return MemberCount; } - ClassOptions getOptions() const { return Options; } - TypeIndex getFieldList() const { return FieldList; } - StringRef getName() const { return Name; } - StringRef getUniqueName() const { return UniqueName; } - -private: - uint16_t MemberCount; - ClassOptions Options; - TypeIndex FieldList; - StringRef Name; - StringRef UniqueName; -}; - -// LF_CLASS, LF_STRUCTURE, LF_INTERFACE -class ClassRecord : public TagRecord { -public: - ClassRecord(TypeRecordKind Kind, uint16_t MemberCount, ClassOptions Options, - HfaKind Hfa, WindowsRTClassKind WinRTKind, TypeIndex FieldList, - TypeIndex DerivationList, TypeIndex VTableShape, uint64_t Size, - StringRef Name, StringRef UniqueName) - : TagRecord(Kind, MemberCount, Options, FieldList, Name, UniqueName), - Hfa(Hfa), WinRTKind(WinRTKind), DerivationList(DerivationList), - VTableShape(VTableShape), Size(Size) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - HfaKind getHfa() const { return Hfa; } - WindowsRTClassKind getWinRTKind() const { return WinRTKind; } - TypeIndex getDerivationList() const { return DerivationList; } - TypeIndex getVTableShape() const { return VTableShape; } - uint64_t getSize() const { return Size; } - -private: - struct Layout { - ulittle16_t MemberCount; // Number of members in FieldList. - ulittle16_t Properties; // ClassOptions bitset - TypeIndex FieldList; // LF_FIELDLIST: List of all kinds of members - TypeIndex DerivedFrom; // LF_DERIVED: List of known derived classes - TypeIndex VShape; // LF_VTSHAPE: Shape of the vftable - // SizeOf: The 'sizeof' the UDT in bytes is encoded as an LF_NUMERIC - // integer. - // Name: The null-terminated name follows. - - bool hasUniqueName() const { - return Properties & uint16_t(ClassOptions::HasUniqueName); - } - }; - - HfaKind Hfa; - WindowsRTClassKind WinRTKind; - TypeIndex DerivationList; - TypeIndex VTableShape; - uint64_t Size; -}; - -// LF_UNION -struct UnionRecord : public TagRecord { - UnionRecord(uint16_t MemberCount, ClassOptions Options, HfaKind Hfa, - TypeIndex FieldList, uint64_t Size, StringRef Name, - StringRef UniqueName) - : TagRecord(TypeRecordKind::Union, MemberCount, Options, FieldList, Name, - UniqueName), - Hfa(Hfa), Size(Size) {} - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - HfaKind getHfa() const { return Hfa; } - uint64_t getSize() const { return Size; } - -private: - struct Layout { - ulittle16_t MemberCount; // Number of members in FieldList. - ulittle16_t Properties; // ClassOptions bitset - TypeIndex FieldList; // LF_FIELDLIST: List of all kinds of members - // SizeOf: The 'sizeof' the UDT in bytes is encoded as an LF_NUMERIC - // integer. - // Name: The null-terminated name follows. - - bool hasUniqueName() const { - return Properties & uint16_t(ClassOptions::HasUniqueName); - } - }; - - HfaKind Hfa; - uint64_t Size; -}; - -// LF_ENUM -class EnumRecord : public TagRecord { -public: - EnumRecord(uint16_t MemberCount, ClassOptions Options, TypeIndex FieldList, - StringRef Name, StringRef UniqueName, TypeIndex UnderlyingType) - : TagRecord(TypeRecordKind::Enum, MemberCount, Options, FieldList, Name, - UniqueName), - UnderlyingType(UnderlyingType) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getUnderlyingType() const { return UnderlyingType; } - -private: - struct Layout { - ulittle16_t NumEnumerators; // Number of enumerators - ulittle16_t Properties; - TypeIndex UnderlyingType; - TypeIndex FieldListType; - // Name: The null-terminated name follows. - - bool hasUniqueName() const { - return Properties & uint16_t(ClassOptions::HasUniqueName); - } - }; - - TypeIndex UnderlyingType; -}; - -// LF_BITFIELD -class BitFieldRecord : public TypeRecord { -public: - BitFieldRecord(TypeIndex Type, uint8_t BitSize, uint8_t BitOffset) - : TypeRecord(TypeRecordKind::BitField), Type(Type), BitSize(BitSize), - BitOffset(BitOffset) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getType() const { return Type; } - uint8_t getBitOffset() const { return BitOffset; } - uint8_t getBitSize() const { return BitSize; } - -private: - struct Layout { - TypeIndex Type; - uint8_t BitSize; - uint8_t BitOffset; - }; - - TypeIndex Type; - uint8_t BitSize; - uint8_t BitOffset; -}; - -// LF_VTSHAPE -class VFTableShapeRecord : public TypeRecord { -public: - explicit VFTableShapeRecord(ArrayRef Slots) - : TypeRecord(TypeRecordKind::VFTableShape), SlotsRef(Slots) {} - explicit VFTableShapeRecord(std::vector Slots) - : TypeRecord(TypeRecordKind::VFTableShape), Slots(std::move(Slots)) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - ArrayRef getSlots() const { - if (!SlotsRef.empty()) - return SlotsRef; - return Slots; - } - uint32_t getEntryCount() const { return getSlots().size(); } - -private: - struct Layout { - // Number of vftable entries. Each method may have more than one entry due - // to - // things like covariant return types. - ulittle16_t VFEntryCount; - // Descriptors[]: 4-bit virtual method descriptors of type CV_VTS_desc_e. - }; - -private: - ArrayRef SlotsRef; - std::vector Slots; -}; - -// LF_TYPESERVER2 -class TypeServer2Record : public TypeRecord { -public: - TypeServer2Record(StringRef Guid, uint32_t Age, StringRef Name) - : TypeRecord(TypeRecordKind::TypeServer2), Guid(Guid), Age(Age), - Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - StringRef getGuid() const { return Guid; } - - uint32_t getAge() const { return Age; } - - StringRef getName() const { return Name; } - -private: - struct Layout { - char Guid[16]; // GUID - ulittle32_t Age; - // Name: Name of the PDB as a null-terminated string - }; - - StringRef Guid; - uint32_t Age; - StringRef Name; -}; - -// LF_STRING_ID -class StringIdRecord : public TypeRecord { -public: - StringIdRecord(TypeIndex Id, StringRef String) - : TypeRecord(TypeRecordKind::StringId), Id(Id), String(String) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getId() const { return Id; } - - StringRef getString() const { return String; } - -private: - struct Layout { - TypeIndex id; - // Name: Name of the PDB as a null-terminated string - }; - - TypeIndex Id; - StringRef String; -}; - -// LF_FUNC_ID -class FuncIdRecord : public TypeRecord { -public: - FuncIdRecord(TypeIndex ParentScope, TypeIndex FunctionType, StringRef Name) - : TypeRecord(TypeRecordKind::FuncId), ParentScope(ParentScope), - FunctionType(FunctionType), Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getParentScope() const { return ParentScope; } - - TypeIndex getFunctionType() const { return FunctionType; } - - StringRef getName() const { return Name; } - -private: - struct Layout { - TypeIndex ParentScope; - TypeIndex FunctionType; - // Name: The null-terminated name follows. - }; - - TypeIndex ParentScope; - TypeIndex FunctionType; - StringRef Name; -}; - -// LF_UDT_SRC_LINE -class UdtSourceLineRecord : public TypeRecord { -public: - UdtSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, uint32_t LineNumber) - : TypeRecord(TypeRecordKind::UdtSourceLine), UDT(UDT), - SourceFile(SourceFile), LineNumber(LineNumber) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getUDT() const { return UDT; } - TypeIndex getSourceFile() const { return SourceFile; } - uint32_t getLineNumber() const { return LineNumber; } - -private: - struct Layout { - TypeIndex UDT; // The user-defined type - TypeIndex SourceFile; // StringID containing the source filename - ulittle32_t LineNumber; - }; - - TypeIndex UDT; - TypeIndex SourceFile; - uint32_t LineNumber; -}; - -// LF_UDT_MOD_SRC_LINE -class UdtModSourceLineRecord : public TypeRecord { -public: - UdtModSourceLineRecord(TypeIndex UDT, TypeIndex SourceFile, - uint32_t LineNumber, uint16_t Module) - : TypeRecord(TypeRecordKind::UdtSourceLine), UDT(UDT), - SourceFile(SourceFile), LineNumber(LineNumber), Module(Module) {} - - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data) { - const Layout *L = nullptr; - CV_DESERIALIZE(Data, L); - - return UdtModSourceLineRecord(L->UDT, L->SourceFile, L->LineNumber, - L->Module); - } - - TypeIndex getUDT() const { return UDT; } - TypeIndex getSourceFile() const { return SourceFile; } - uint32_t getLineNumber() const { return LineNumber; } - uint16_t getModule() const { return Module; } - -private: - struct Layout { - TypeIndex UDT; // The user-defined type - TypeIndex SourceFile; // StringID containing the source filename - ulittle32_t LineNumber; - ulittle16_t Module; // Module that contributes this UDT definition - }; - - TypeIndex UDT; - TypeIndex SourceFile; - uint32_t LineNumber; - uint16_t Module; -}; - -// LF_BUILDINFO -class BuildInfoRecord : public TypeRecord { -public: - BuildInfoRecord(ArrayRef ArgIndices) - : TypeRecord(TypeRecordKind::BuildInfo), - ArgIndices(ArgIndices.begin(), ArgIndices.end()) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - ArrayRef getArgs() const { return ArgIndices; } - -private: - struct Layout { - ulittle16_t NumArgs; // Number of arguments - // ArgTypes[]: Type indicies of arguments - }; - SmallVector ArgIndices; -}; - -// LF_VFTABLE -class VFTableRecord : public TypeRecord { -public: - VFTableRecord(TypeIndex CompleteClass, TypeIndex OverriddenVFTable, - uint32_t VFPtrOffset, StringRef Name, - ArrayRef Methods) - : TypeRecord(TypeRecordKind::VFTable), - CompleteClass(CompleteClass), OverriddenVFTable(OverriddenVFTable), - VFPtrOffset(VFPtrOffset), Name(Name), MethodNamesRef(Methods) {} - VFTableRecord(TypeIndex CompleteClass, TypeIndex OverriddenVFTable, - uint32_t VFPtrOffset, StringRef Name, - const std::vector &Methods) - : TypeRecord(TypeRecordKind::VFTable), - CompleteClass(CompleteClass), OverriddenVFTable(OverriddenVFTable), - VFPtrOffset(VFPtrOffset), Name(Name), MethodNames(Methods) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getCompleteClass() const { return CompleteClass; } - TypeIndex getOverriddenVTable() const { return OverriddenVFTable; } - uint32_t getVFPtrOffset() const { return VFPtrOffset; } - StringRef getName() const { return Name; } - ArrayRef getMethodNames() const { - if (!MethodNamesRef.empty()) - return MethodNamesRef; - return MethodNames; - } - -private: - struct Layout { - TypeIndex CompleteClass; // Class that owns this vftable. - TypeIndex OverriddenVFTable; // VFTable that this overrides. - ulittle32_t VFPtrOffset; // VFPtr offset in CompleteClass - ulittle32_t NamesLen; // Length of subsequent names array in bytes. - // Names: A sequence of null-terminated strings. First string is vftable - // names. - }; - - TypeIndex CompleteClass; - TypeIndex OverriddenVFTable; - ulittle32_t VFPtrOffset; - StringRef Name; - ArrayRef MethodNamesRef; - std::vector MethodNames; -}; - -// LF_ONEMETHOD -class OneMethodRecord : public TypeRecord { -public: - OneMethodRecord(TypeIndex Type, MethodKind Kind, MethodOptions Options, - MemberAccess Access, int32_t VFTableOffset, StringRef Name) - : TypeRecord(TypeRecordKind::OneMethod), Type(Type), Kind(Kind), - Options(Options), Access(Access), VFTableOffset(VFTableOffset), - Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getType() const { return Type; } - MethodKind getKind() const { return Kind; } - MethodOptions getOptions() const { return Options; } - MemberAccess getAccess() const { return Access; } - int32_t getVFTableOffset() const { return VFTableOffset; } - StringRef getName() const { return Name; } - - bool isIntroducingVirtual() const { - return Kind == MethodKind::IntroducingVirtual || - Kind == MethodKind::PureIntroducingVirtual; - } - -private: - struct Layout { - MemberAttributes Attrs; - TypeIndex Type; - // If is introduced virtual method: - // VFTableOffset: int32_t offset in vftable - // Name: Null-terminated string - }; - - TypeIndex Type; - MethodKind Kind; - MethodOptions Options; - MemberAccess Access; - int32_t VFTableOffset; - StringRef Name; -}; - -// LF_METHODLIST -class MethodOverloadListRecord : public TypeRecord { -public: - MethodOverloadListRecord(ArrayRef Methods) - : TypeRecord(TypeRecordKind::MethodOverloadList), Methods(Methods) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - ArrayRef getMethods() const { return Methods; } - -private: - struct Layout { - MemberAttributes Attrs; - ulittle16_t Padding; - - TypeIndex Type; - // If is introduced virtual method: - // VFTableOffset: int32_t offset in vftable - }; - - std::vector Methods; -}; - -/// For method overload sets. LF_METHOD -class OverloadedMethodRecord : public TypeRecord { -public: - OverloadedMethodRecord(uint16_t NumOverloads, TypeIndex MethodList, - StringRef Name) - : TypeRecord(TypeRecordKind::OverloadedMethod), - NumOverloads(NumOverloads), MethodList(MethodList), Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - uint16_t getNumOverloads() const { return NumOverloads; } - TypeIndex getMethodList() const { return MethodList; } - StringRef getName() const { return Name; } - -private: - struct Layout { - ulittle16_t MethodCount; // Size of overload set - TypeIndex MethList; // Type index of methods in overload set - // Name: Null-terminated string - }; - - uint16_t NumOverloads; - TypeIndex MethodList; - StringRef Name; -}; - -// LF_MEMBER -class DataMemberRecord : public TypeRecord { -public: - DataMemberRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset, - StringRef Name) - : TypeRecord(TypeRecordKind::DataMember), Access(Access), Type(Type), - FieldOffset(Offset), Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - MemberAccess getAccess() const { return Access; } - TypeIndex getType() const { return Type; } - uint64_t getFieldOffset() const { return FieldOffset; } - StringRef getName() const { return Name; } - -private: - struct Layout { - MemberAttributes Attrs; // Access control attributes, etc - TypeIndex Type; - // FieldOffset: LF_NUMERIC encoded byte offset - // Name: Null-terminated string - }; - - MemberAccess Access; - TypeIndex Type; - uint64_t FieldOffset; - StringRef Name; -}; - -// LF_STMEMBER -class StaticDataMemberRecord : public TypeRecord { -public: - StaticDataMemberRecord(MemberAccess Access, TypeIndex Type, StringRef Name) - : TypeRecord(TypeRecordKind::StaticDataMember), Access(Access), - Type(Type), Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - MemberAccess getAccess() const { return Access; } - TypeIndex getType() const { return Type; } - StringRef getName() const { return Name; } - -private: - struct Layout { - MemberAttributes Attrs; // Access control attributes, etc - TypeIndex Type; - // Name: Null-terminated string - }; - - MemberAccess Access; - TypeIndex Type; - StringRef Name; -}; - -// LF_ENUMERATE -class EnumeratorRecord : public TypeRecord { -public: - EnumeratorRecord(MemberAccess Access, APSInt Value, StringRef Name) - : TypeRecord(TypeRecordKind::Enumerator), Access(Access), - Value(std::move(Value)), Name(Name) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - MemberAccess getAccess() const { return Access; } - APSInt getValue() const { return Value; } - StringRef getName() const { return Name; } - -private: - struct Layout { - MemberAttributes Attrs; // Access control attributes, etc - // EnumValue: LF_NUMERIC encoded enumerator value - // Name: Null-terminated string - }; - - MemberAccess Access; - APSInt Value; - StringRef Name; -}; - -// LF_VFUNCTAB -class VFPtrRecord : public TypeRecord { -public: - VFPtrRecord(TypeIndex Type) - : TypeRecord(TypeRecordKind::VFPtr), Type(Type) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - TypeIndex getType() const { return Type; } - -private: - struct Layout { - ulittle16_t Pad0; - TypeIndex Type; // Type of vfptr - }; - TypeIndex Type; -}; - -// LF_BCLASS, LF_BINTERFACE -class BaseClassRecord : public TypeRecord { -public: - BaseClassRecord(MemberAccess Access, TypeIndex Type, uint64_t Offset) - : TypeRecord(TypeRecordKind::BaseClass), Access(Access), Type(Type), - Offset(Offset) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - MemberAccess getAccess() const { return Access; } - TypeIndex getBaseType() const { return Type; } - uint64_t getBaseOffset() const { return Offset; } - -private: - struct Layout { - MemberAttributes Attrs; // Access control attributes, etc - TypeIndex BaseType; // Base class type - // BaseOffset: LF_NUMERIC encoded byte offset of base from derived. - }; - MemberAccess Access; - TypeIndex Type; - uint64_t Offset; -}; - -// LF_VBCLASS, LF_IVBCLASS -class VirtualBaseClassRecord : public TypeRecord { -public: - VirtualBaseClassRecord(MemberAccess Access, TypeIndex BaseType, - TypeIndex VBPtrType, uint64_t Offset, uint64_t Index) - : TypeRecord(TypeRecordKind::VirtualBaseClass), Access(Access), - BaseType(BaseType), VBPtrType(VBPtrType), VBPtrOffset(Offset), - VTableIndex(Index) {} - - /// Rewrite member type indices with IndexMap. Returns false if a type index - /// is not in the map. - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - - MemberAccess getAccess() const { return Access; } - TypeIndex getBaseType() const { return BaseType; } - TypeIndex getVBPtrType() const { return VBPtrType; } - uint64_t getVBPtrOffset() const { return VBPtrOffset; } - uint64_t getVTableIndex() const { return VTableIndex; } - -private: - struct Layout { - MemberAttributes Attrs; // Access control attributes, etc. - TypeIndex BaseType; // Base class type - TypeIndex VBPtrType; // Virtual base pointer type - // VBPtrOffset: Offset of vbptr from vfptr encoded as LF_NUMERIC. - // VBTableIndex: Index of vbase within vbtable encoded as LF_NUMERIC. - }; - MemberAccess Access; - TypeIndex BaseType; - TypeIndex VBPtrType; - uint64_t VBPtrOffset; - uint64_t VTableIndex; -}; - -/// LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records -/// together. The first will end in an LF_INDEX record that points to the next. -class ListContinuationRecord : public TypeRecord { -public: - ListContinuationRecord(TypeIndex ContinuationIndex) - : TypeRecord(TypeRecordKind::ListContinuation), - ContinuationIndex(ContinuationIndex) {} - - TypeIndex getContinuationIndex() const { return ContinuationIndex; } - - bool remapTypeIndices(ArrayRef IndexMap); - - static ErrorOr deserialize(TypeRecordKind Kind, - ArrayRef &Data); - -private: - struct Layout { - ulittle16_t Pad0; - TypeIndex ContinuationIndex; - }; - TypeIndex ContinuationIndex; -}; - -typedef CVRecord CVType; -typedef VarStreamArray CVTypeArray; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h b/llvm/include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h deleted file mode 100644 index eb7993ba..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h +++ /dev/null @@ -1,70 +0,0 @@ -//===- TypeRecordBuilder.h --------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPERECORDBUILDER_H -#define LLVM_DEBUGINFO_CODEVIEW_TYPERECORDBUILDER_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/TypeIndex.h" -#include "llvm/DebugInfo/CodeView/TypeRecord.h" -#include "llvm/Support/EndianStream.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { -namespace codeview { - -class TypeRecordBuilder { -private: - TypeRecordBuilder(const TypeRecordBuilder &) = delete; - TypeRecordBuilder &operator=(const TypeRecordBuilder &) = delete; - -public: - explicit TypeRecordBuilder(TypeRecordKind Kind); - - void writeUInt8(uint8_t Value); - void writeInt16(int16_t Value); - void writeUInt16(uint16_t Value); - void writeInt32(int32_t Value); - void writeUInt32(uint32_t Value); - void writeInt64(int64_t Value); - void writeUInt64(uint64_t Value); - void writeTypeIndex(TypeIndex TypeInd); - void writeTypeRecordKind(TypeRecordKind Kind); - void writeEncodedInteger(int64_t Value); - void writeEncodedSignedInteger(int64_t Value); - void writeEncodedUnsignedInteger(uint64_t Value); - void writeNullTerminatedString(StringRef Value); - void writeGuid(StringRef Guid); - void writeBytes(StringRef Value) { Stream << Value; } - - llvm::StringRef str(); - - uint64_t size() const { return Stream.tell(); } - - void truncate(uint64_t Size) { - // This works because raw_svector_ostream is not buffered. - assert(Size < Buffer.size()); - Buffer.resize(Size); - } - - void reset(TypeRecordKind K) { - Buffer.clear(); - writeTypeRecordKind(K); - } - -private: - llvm::SmallVector Buffer; - llvm::raw_svector_ostream Stream; - llvm::support::endian::Writer Writer; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeRecords.def b/llvm/include/llvm/DebugInfo/CodeView/TypeRecords.def deleted file mode 100644 index 0959f4bf..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeRecords.def +++ /dev/null @@ -1,252 +0,0 @@ - -//===-- CVLeafTypes.def - All CodeView leaf types ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// See LEAF_ENUM_e in cvinfo.h. This should match the constants there. -// -//===----------------------------------------------------------------------===// - -// If the type is known, then we have a record describing it in TypeRecord.h. - -#ifndef CV_TYPE -#define CV_TYPE(lf_ename, value) -#endif - -// If the type is known, then we have a record describing it in TypeRecord.h. -#ifndef TYPE_RECORD -#define TYPE_RECORD(lf_ename, value, name) CV_TYPE(lf_ename, value) -#endif - -#ifndef TYPE_RECORD_ALIAS -#define TYPE_RECORD_ALIAS(lf_ename, value, name, alias_name) \ - TYPE_RECORD(lf_ename, value, name) -#endif - -#ifndef MEMBER_RECORD -#define MEMBER_RECORD(lf_ename, value, name) TYPE_RECORD(lf_ename, value, name) -#endif - -#ifndef MEMBER_RECORD_ALIAS -#define MEMBER_RECORD_ALIAS(lf_ename, value, name, alias_name) \ - MEMBER_RECORD(lf_ename, value, name) -#endif - -TYPE_RECORD(LF_POINTER, 0x1002, Pointer) -TYPE_RECORD(LF_MODIFIER, 0x1001, Modifier) -TYPE_RECORD(LF_PROCEDURE, 0x1008, Procedure) -TYPE_RECORD(LF_MFUNCTION, 0x1009, MemberFunction) -TYPE_RECORD(LF_ARGLIST, 0x1201, ArgList) - -TYPE_RECORD(LF_ARRAY, 0x1503, Array) -TYPE_RECORD(LF_CLASS, 0x1504, Class) -TYPE_RECORD_ALIAS(LF_STRUCTURE, 0x1505, Struct, Class) -TYPE_RECORD_ALIAS(LF_INTERFACE, 0x1519, Interface, Class) -TYPE_RECORD(LF_UNION, 0x1506, Union) -TYPE_RECORD(LF_ENUM, 0x1507, Enum) -TYPE_RECORD(LF_TYPESERVER2, 0x1515, TypeServer2) -TYPE_RECORD(LF_VFTABLE, 0x151d, VFTable) -TYPE_RECORD(LF_VTSHAPE, 0x000a, VFTableShape) - -TYPE_RECORD(LF_BITFIELD, 0x1205, BitField) - -// Member type records. These are generally not length prefixed, and appear -// inside of a field list record. -MEMBER_RECORD(LF_BCLASS, 0x1400, BaseClass) -MEMBER_RECORD_ALIAS(LF_BINTERFACE, 0x151a, BaseInterface, BaseClass) - -MEMBER_RECORD(LF_VBCLASS, 0x1401, VirtualBaseClass) -MEMBER_RECORD_ALIAS(LF_IVBCLASS, 0x1402, IndirectVirtualBaseClass, - VirtualBaseClass) - -MEMBER_RECORD(LF_VFUNCTAB, 0x1409, VFPtr) -MEMBER_RECORD(LF_STMEMBER, 0x150e, StaticDataMember) -MEMBER_RECORD(LF_METHOD, 0x150f, OverloadedMethod) -MEMBER_RECORD(LF_MEMBER, 0x150d, DataMember) -MEMBER_RECORD(LF_NESTTYPE, 0x1510, NestedType) -MEMBER_RECORD(LF_ONEMETHOD, 0x1511, OneMethod) -MEMBER_RECORD(LF_ENUMERATE, 0x1502, Enumerator) -MEMBER_RECORD(LF_INDEX, 0x1404, ListContinuation) - -// ID leaf records. Subsequent leaf types may be referenced from .debug$S. -TYPE_RECORD(LF_FUNC_ID, 0x1601, FuncId) -TYPE_RECORD(LF_MFUNC_ID, 0x1602, MemberFuncId) -TYPE_RECORD(LF_BUILDINFO, 0x1603, BuildInfo) -// FIXME: We reuse the structure of ArgListRecord for substring lists, but it -// makes for confusing dumper output. -TYPE_RECORD_ALIAS(LF_SUBSTR_LIST, 0x1604, StringList, ArgList) -TYPE_RECORD(LF_STRING_ID, 0x1605, StringId) -TYPE_RECORD(LF_UDT_SRC_LINE, 0x1606, UdtSourceLine) -TYPE_RECORD(LF_UDT_MOD_SRC_LINE, 0x1607, UdtModSourceLine) - - -TYPE_RECORD(LF_METHODLIST, 0x1206, MethodOverloadList) - - -// 16 bit type records. -CV_TYPE(LF_MODIFIER_16t, 0x0001) -CV_TYPE(LF_POINTER_16t, 0x0002) -CV_TYPE(LF_ARRAY_16t, 0x0003) -CV_TYPE(LF_CLASS_16t, 0x0004) -CV_TYPE(LF_STRUCTURE_16t, 0x0005) -CV_TYPE(LF_UNION_16t, 0x0006) -CV_TYPE(LF_ENUM_16t, 0x0007) -CV_TYPE(LF_PROCEDURE_16t, 0x0008) -CV_TYPE(LF_MFUNCTION_16t, 0x0009) -CV_TYPE(LF_COBOL0_16t, 0x000b) -CV_TYPE(LF_COBOL1, 0x000c) -CV_TYPE(LF_BARRAY_16t, 0x000d) -CV_TYPE(LF_LABEL, 0x000e) -CV_TYPE(LF_NULLLEAF, 0x000f) // LF_NULL -CV_TYPE(LF_NOTTRAN, 0x0010) -CV_TYPE(LF_DIMARRAY_16t, 0x0011) -CV_TYPE(LF_VFTPATH_16t, 0x0012) -CV_TYPE(LF_PRECOMP_16t, 0x0013) -CV_TYPE(LF_ENDPRECOMP, 0x0014) -CV_TYPE(LF_OEM_16t, 0x0015) -CV_TYPE(LF_TYPESERVER_ST, 0x0016) - -CV_TYPE(LF_SKIP_16t, 0x0200) -CV_TYPE(LF_ARGLIST_16t, 0x0201) -CV_TYPE(LF_DEFARG_16t, 0x0202) -CV_TYPE(LF_LIST, 0x0203) -CV_TYPE(LF_FIELDLIST_16t, 0x0204) -CV_TYPE(LF_DERIVED_16t, 0x0205) -CV_TYPE(LF_BITFIELD_16t, 0x0206) -CV_TYPE(LF_METHODLIST_16t, 0x0207) -CV_TYPE(LF_DIMCONU_16t, 0x0208) -CV_TYPE(LF_DIMCONLU_16t, 0x0209) -CV_TYPE(LF_DIMVARU_16t, 0x020a) -CV_TYPE(LF_DIMVARLU_16t, 0x020b) -CV_TYPE(LF_REFSYM, 0x020c) - -// 16 bit member types. Generally not length prefixed. -CV_TYPE(LF_BCLASS_16t, 0x0400) -CV_TYPE(LF_VBCLASS_16t, 0x0401) -CV_TYPE(LF_IVBCLASS_16t, 0x0402) -CV_TYPE(LF_ENUMERATE_ST, 0x0403) -CV_TYPE(LF_FRIENDFCN_16t, 0x0404) -CV_TYPE(LF_INDEX_16t, 0x0405) -CV_TYPE(LF_MEMBER_16t, 0x0406) -CV_TYPE(LF_STMEMBER_16t, 0x0407) -CV_TYPE(LF_METHOD_16t, 0x0408) -CV_TYPE(LF_NESTTYPE_16t, 0x0409) -CV_TYPE(LF_VFUNCTAB_16t, 0x040a) -CV_TYPE(LF_FRIENDCLS_16t, 0x040b) -CV_TYPE(LF_ONEMETHOD_16t, 0x040c) -CV_TYPE(LF_VFUNCOFF_16t, 0x040d) - -CV_TYPE(LF_TI16_MAX, 0x1000) - -CV_TYPE(LF_ARRAY_ST, 0x1003) -CV_TYPE(LF_CLASS_ST, 0x1004) -CV_TYPE(LF_STRUCTURE_ST, 0x1005) -CV_TYPE(LF_UNION_ST, 0x1006) -CV_TYPE(LF_ENUM_ST, 0x1007) -CV_TYPE(LF_COBOL0, 0x100a) -CV_TYPE(LF_BARRAY, 0x100b) -CV_TYPE(LF_DIMARRAY_ST, 0x100c) -CV_TYPE(LF_VFTPATH, 0x100d) -CV_TYPE(LF_PRECOMP_ST, 0x100e) -CV_TYPE(LF_OEM, 0x100f) -CV_TYPE(LF_ALIAS_ST, 0x1010) -CV_TYPE(LF_OEM2, 0x1011) - -CV_TYPE(LF_SKIP, 0x1200) -CV_TYPE(LF_DEFARG_ST, 0x1202) -CV_TYPE(LF_FIELDLIST, 0x1203) -CV_TYPE(LF_DERIVED, 0x1204) -CV_TYPE(LF_DIMCONU, 0x1207) -CV_TYPE(LF_DIMCONLU, 0x1208) -CV_TYPE(LF_DIMVARU, 0x1209) -CV_TYPE(LF_DIMVARLU, 0x120a) - -// Member type records. These are generally not length prefixed, and appear -// inside of a field list record. -CV_TYPE(LF_FRIENDFCN_ST, 0x1403) -CV_TYPE(LF_MEMBER_ST, 0x1405) -CV_TYPE(LF_STMEMBER_ST, 0x1406) -CV_TYPE(LF_METHOD_ST, 0x1407) -CV_TYPE(LF_NESTTYPE_ST, 0x1408) -CV_TYPE(LF_FRIENDCLS, 0x140a) -CV_TYPE(LF_ONEMETHOD_ST, 0x140b) -CV_TYPE(LF_VFUNCOFF, 0x140c) -CV_TYPE(LF_NESTTYPEEX_ST, 0x140d) -CV_TYPE(LF_MEMBERMODIFY_ST, 0x140e) -CV_TYPE(LF_MANAGED_ST, 0x140f) - -CV_TYPE(LF_ST_MAX, 0x1500) -CV_TYPE(LF_TYPESERVER, 0x1501) -CV_TYPE(LF_DIMARRAY, 0x1508) -CV_TYPE(LF_PRECOMP, 0x1509) -CV_TYPE(LF_ALIAS, 0x150a) -CV_TYPE(LF_DEFARG, 0x150b) -CV_TYPE(LF_FRIENDFCN, 0x150c) -CV_TYPE(LF_NESTTYPEEX, 0x1512) -CV_TYPE(LF_MEMBERMODIFY, 0x1513) -CV_TYPE(LF_MANAGED, 0x1514) -CV_TYPE(LF_STRIDED_ARRAY, 0x1516) -CV_TYPE(LF_HLSL, 0x1517) -CV_TYPE(LF_MODIFIER_EX, 0x1518) -CV_TYPE(LF_VECTOR, 0x151b) -CV_TYPE(LF_MATRIX, 0x151c) - -// ID leaf records. Subsequent leaf types may be referenced from .debug$S. - -// Numeric leaf types. These are generally contained in other records, and not -// encountered in the main type stream. - -CV_TYPE(LF_NUMERIC, 0x8000) -CV_TYPE(LF_CHAR, 0x8000) -CV_TYPE(LF_SHORT, 0x8001) -CV_TYPE(LF_USHORT, 0x8002) -CV_TYPE(LF_LONG, 0x8003) -CV_TYPE(LF_ULONG, 0x8004) -CV_TYPE(LF_REAL32, 0x8005) -CV_TYPE(LF_REAL64, 0x8006) -CV_TYPE(LF_REAL80, 0x8007) -CV_TYPE(LF_REAL128, 0x8008) -CV_TYPE(LF_QUADWORD, 0x8009) -CV_TYPE(LF_UQUADWORD, 0x800a) -CV_TYPE(LF_REAL48, 0x800b) -CV_TYPE(LF_COMPLEX32, 0x800c) -CV_TYPE(LF_COMPLEX64, 0x800d) -CV_TYPE(LF_COMPLEX80, 0x800e) -CV_TYPE(LF_COMPLEX128, 0x800f) -CV_TYPE(LF_VARSTRING, 0x8010) -CV_TYPE(LF_OCTWORD, 0x8017) -CV_TYPE(LF_UOCTWORD, 0x8018) -CV_TYPE(LF_DECIMAL, 0x8019) -CV_TYPE(LF_DATE, 0x801a) -CV_TYPE(LF_UTF8STRING, 0x801b) -CV_TYPE(LF_REAL16, 0x801c) - -// Padding bytes. These are emitted into alignment bytes in the type stream. - -CV_TYPE(LF_PAD0, 0xf0) -CV_TYPE(LF_PAD1, 0xf1) -CV_TYPE(LF_PAD2, 0xf2) -CV_TYPE(LF_PAD3, 0xf3) -CV_TYPE(LF_PAD4, 0xf4) -CV_TYPE(LF_PAD5, 0xf5) -CV_TYPE(LF_PAD6, 0xf6) -CV_TYPE(LF_PAD7, 0xf7) -CV_TYPE(LF_PAD8, 0xf8) -CV_TYPE(LF_PAD9, 0xf9) -CV_TYPE(LF_PAD10, 0xfa) -CV_TYPE(LF_PAD11, 0xfb) -CV_TYPE(LF_PAD12, 0xfc) -CV_TYPE(LF_PAD13, 0xfd) -CV_TYPE(LF_PAD14, 0xfe) -CV_TYPE(LF_PAD15, 0xff) - -#undef CV_TYPE -#undef TYPE_RECORD -#undef TYPE_RECORD_ALIAS -#undef MEMBER_RECORD -#undef MEMBER_RECORD_ALIAS diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h b/llvm/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h deleted file mode 100644 index af396c79..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h +++ /dev/null @@ -1,26 +0,0 @@ -//===- TypeStreamMerger.h ---------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPESTREAMMERGER_H -#define LLVM_DEBUGINFO_CODEVIEW_TYPESTREAMMERGER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/DebugInfo/CodeView/TypeTableBuilder.h" - -namespace llvm { -namespace codeview { - -/// Merges one type stream into another. Returns true on success. -bool mergeTypeStreams(TypeTableBuilder &DestStream, const CVTypeArray &Types); - -} // end namespace codeview -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_CODEVIEW_TYPESTREAMMERGER_H diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeSymbolEmitter.h b/llvm/include/llvm/DebugInfo/CodeView/TypeSymbolEmitter.h deleted file mode 100644 index dfba83d6..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeSymbolEmitter.h +++ /dev/null @@ -1,38 +0,0 @@ -//===- TypeSymbolEmitter.h --------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPESYMBOLEMITTER_H -#define LLVM_DEBUGINFO_CODEVIEW_TYPESYMBOLEMITTER_H - -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/TypeIndex.h" - -namespace llvm { -class StringRef; - -namespace codeview { - -class TypeSymbolEmitter { -private: - TypeSymbolEmitter(const TypeSymbolEmitter &) = delete; - TypeSymbolEmitter &operator=(const TypeSymbolEmitter &) = delete; - -protected: - TypeSymbolEmitter() {} - -public: - virtual ~TypeSymbolEmitter() {} - -public: - virtual void writeUserDefinedType(TypeIndex TI, StringRef Name) = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h b/llvm/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h deleted file mode 100644 index 5b2aa618..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h +++ /dev/null @@ -1,70 +0,0 @@ -//===- TypeTableBuilder.h ---------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPETABLEBUILDER_H -#define LLVM_DEBUGINFO_CODEVIEW_TYPETABLEBUILDER_H - -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/TypeIndex.h" -#include "llvm/DebugInfo/CodeView/TypeRecord.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { - -class StringRef; - -namespace codeview { - -class FieldListRecordBuilder; -class MethodListRecordBuilder; -class TypeRecordBuilder; - -class TypeTableBuilder { -private: - TypeTableBuilder(const TypeTableBuilder &) = delete; - TypeTableBuilder &operator=(const TypeTableBuilder &) = delete; - -protected: - TypeTableBuilder(); - -public: - virtual ~TypeTableBuilder(); - -public: - TypeIndex writeModifier(const ModifierRecord &Record); - TypeIndex writeProcedure(const ProcedureRecord &Record); - TypeIndex writeMemberFunction(const MemberFunctionRecord &Record); - TypeIndex writeArgList(const ArgListRecord &Record); - TypeIndex writePointer(const PointerRecord &Record); - TypeIndex writeArray(const ArrayRecord &Record); - TypeIndex writeClass(const ClassRecord &Record); - TypeIndex writeUnion(const UnionRecord &Record); - TypeIndex writeEnum(const EnumRecord &Record); - TypeIndex writeBitField(const BitFieldRecord &Record); - TypeIndex writeVFTableShape(const VFTableShapeRecord &Record); - TypeIndex writeStringId(const StringIdRecord &Record); - TypeIndex writeVFTable(const VFTableRecord &Record); - TypeIndex writeUdtSourceLine(const UdtSourceLineRecord &Record); - TypeIndex writeUdtModSourceLine(const UdtModSourceLineRecord &Record); - TypeIndex writeFuncId(const FuncIdRecord &Record); - TypeIndex writeMemberFuncId(const MemberFuncIdRecord &Record); - TypeIndex writeBuildInfo(const BuildInfoRecord &Record); - TypeIndex writeMethodOverloadList(const MethodOverloadListRecord &Record); - TypeIndex writeTypeServer2(const TypeServer2Record &Record); - - TypeIndex writeFieldList(FieldListRecordBuilder &FieldList); - - TypeIndex writeRecord(TypeRecordBuilder &builder); - - virtual TypeIndex writeRecord(llvm::StringRef record) = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h b/llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h deleted file mode 100644 index 310847ec..00000000 --- a/llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h +++ /dev/null @@ -1,63 +0,0 @@ -//===- TypeVisitorCallbacks.h -----------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEVISITORCALLBACKS_H -#define LLVM_DEBUGINFO_CODEVIEW_TYPEVISITORCALLBACKS_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/DebugInfo/CodeView/CVRecord.h" -#include "llvm/DebugInfo/CodeView/TypeRecord.h" -#include "llvm/Support/Error.h" - -namespace llvm { -namespace codeview { -class TypeVisitorCallbacks { - friend class CVTypeVisitor; - -public: - virtual ~TypeVisitorCallbacks() {} - - /// Action to take on unknown types. By default, they are ignored. - virtual Error visitUnknownType(const CVRecord &Record) { - return Error::success(); - } - virtual Error visitUnknownMember(const CVRecord &Record) { - return Error::success(); - } - - /// Paired begin/end actions for all types. Receives all record data, - /// including the fixed-length record prefix. - virtual Error visitTypeBegin(const CVRecord &Record) { - return Error::success(); - } - virtual Error visitTypeEnd(const CVRecord &Record) { - return Error::success(); - } - - virtual Error visitFieldListBegin(const CVRecord &Record) { - return Error::success(); - } - - virtual Error visitFieldListEnd(const CVRecord &Record) { - return Error::success(); - } - -#define TYPE_RECORD(EnumName, EnumVal, Name) \ - virtual Error visit##Name(Name##Record &Record) { return Error::success(); } -#define MEMBER_RECORD(EnumName, EnumVal, Name) \ - TYPE_RECORD(EnumName, EnumVal, Name) -#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) -#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) -#include "TypeRecords.def" -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DIContext.h b/llvm/include/llvm/DebugInfo/DIContext.h deleted file mode 100644 index 2f883719..00000000 --- a/llvm/include/llvm/DebugInfo/DIContext.h +++ /dev/null @@ -1,197 +0,0 @@ -//===-- DIContext.h ---------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines DIContext, an abstract data structure that holds -// debug information data. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_DICONTEXT_H -#define LLVM_DEBUGINFO_DICONTEXT_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Support/Casting.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -class raw_ostream; - -/// DILineInfo - a format-neutral container for source line information. -struct DILineInfo { - std::string FileName; - std::string FunctionName; - uint32_t Line; - uint32_t Column; - - DILineInfo() - : FileName(""), FunctionName(""), Line(0), Column(0) {} - - bool operator==(const DILineInfo &RHS) const { - return Line == RHS.Line && Column == RHS.Column && - FileName == RHS.FileName && FunctionName == RHS.FunctionName; - } - bool operator!=(const DILineInfo &RHS) const { - return !(*this == RHS); - } -}; - -typedef SmallVector, 16> DILineInfoTable; - -/// DIInliningInfo - a format-neutral container for inlined code description. -class DIInliningInfo { - SmallVector Frames; - public: - DIInliningInfo() {} - DILineInfo getFrame(unsigned Index) const { - assert(Index < Frames.size()); - return Frames[Index]; - } - DILineInfo *getMutableFrame(unsigned Index) { - assert(Index < Frames.size()); - return &Frames[Index]; - } - uint32_t getNumberOfFrames() const { - return Frames.size(); - } - void addFrame(const DILineInfo &Frame) { - Frames.push_back(Frame); - } -}; - -/// DIGlobal - container for description of a global variable. -struct DIGlobal { - std::string Name; - uint64_t Start; - uint64_t Size; - - DIGlobal() : Name(""), Start(0), Size(0) {} -}; - -/// A DINameKind is passed to name search methods to specify a -/// preference regarding the type of name resolution the caller wants. -enum class DINameKind { None, ShortName, LinkageName }; - -/// DILineInfoSpecifier - controls which fields of DILineInfo container -/// should be filled with data. -struct DILineInfoSpecifier { - enum class FileLineInfoKind { None, Default, AbsoluteFilePath }; - typedef DINameKind FunctionNameKind; - - FileLineInfoKind FLIKind; - FunctionNameKind FNKind; - - DILineInfoSpecifier(FileLineInfoKind FLIKind = FileLineInfoKind::Default, - FunctionNameKind FNKind = FunctionNameKind::None) - : FLIKind(FLIKind), FNKind(FNKind) {} -}; - -/// Selects which debug sections get dumped. -enum DIDumpType { - DIDT_Null, - DIDT_All, - DIDT_Abbrev, - DIDT_AbbrevDwo, - DIDT_Aranges, - DIDT_Frames, - DIDT_Info, - DIDT_InfoDwo, - DIDT_Types, - DIDT_TypesDwo, - DIDT_Line, - DIDT_LineDwo, - DIDT_Loc, - DIDT_LocDwo, - DIDT_Macro, - DIDT_Ranges, - DIDT_Pubnames, - DIDT_Pubtypes, - DIDT_GnuPubnames, - DIDT_GnuPubtypes, - DIDT_Str, - DIDT_StrDwo, - DIDT_StrOffsetsDwo, - DIDT_AppleNames, - DIDT_AppleTypes, - DIDT_AppleNamespaces, - DIDT_AppleObjC, - DIDT_CUIndex, - DIDT_TUIndex, -}; - -class DIContext { -public: - enum DIContextKind { - CK_DWARF, - CK_PDB - }; - DIContextKind getKind() const { return Kind; } - - DIContext(DIContextKind K) : Kind(K) {} - virtual ~DIContext() {} - - virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All, - bool DumpEH = false) = 0; - - virtual DILineInfo getLineInfoForAddress(uint64_t Address, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) = 0; - virtual DILineInfoTable getLineInfoForAddressRange(uint64_t Address, - uint64_t Size, DILineInfoSpecifier Specifier = DILineInfoSpecifier()) = 0; - virtual DIInliningInfo getInliningInfoForAddress(uint64_t Address, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) = 0; -private: - const DIContextKind Kind; -}; - -/// An inferface for inquiring the load address of a loaded object file -/// to be used by the DIContext implementations when applying relocations -/// on the fly. -class LoadedObjectInfo { -protected: - LoadedObjectInfo(const LoadedObjectInfo &) = default; - LoadedObjectInfo() = default; - -public: - virtual ~LoadedObjectInfo() = default; - - /// Obtain the Load Address of a section by SectionRef. - /// - /// Calculate the address of the given section. - /// The section need not be present in the local address space. The addresses - /// need to be consistent with the addresses used to query the DIContext and - /// the output of this function should be deterministic, i.e. repeated calls with - /// the same Sec should give the same address. - virtual uint64_t getSectionLoadAddress(const object::SectionRef &Sec) const = 0; - - /// If conveniently available, return the content of the given Section. - /// - /// When the section is available in the local address space, in relocated (loaded) - /// form, e.g. because it was relocated by a JIT for execution, this function - /// should provide the contents of said section in `Data`. If the loaded section - /// is not available, or the cost of retrieving it would be prohibitive, this - /// function should return false. In that case, relocations will be read from the - /// local (unrelocated) object file and applied on the fly. Note that this method - /// is used purely for optimzation purposes in the common case of JITting in the - /// local address space, so returning false should always be correct. - virtual bool getLoadedSectionContents(const object::SectionRef &Sec, - StringRef &Data) const { - return false; - } - - /// Obtain a copy of this LoadedObjectInfo. - /// - /// The caller is responsible for deallocation once the copy is no longer required. - virtual std::unique_ptr clone() const = 0; -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h deleted file mode 100644 index 6ab5d5ce..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h +++ /dev/null @@ -1,62 +0,0 @@ -//===-- DWARFAbbreviationDeclaration.h --------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFABBREVIATIONDECLARATION_H -#define LLVM_LIB_DEBUGINFO_DWARFABBREVIATIONDECLARATION_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/DataExtractor.h" - -namespace llvm { - -class raw_ostream; - -class DWARFAbbreviationDeclaration { -public: - struct AttributeSpec { - AttributeSpec(uint16_t Attr, uint16_t Form) : Attr(Attr), Form(Form) {} - uint16_t Attr; - uint16_t Form; - }; - typedef SmallVector AttributeSpecVector; - - DWARFAbbreviationDeclaration(); - - uint32_t getCode() const { return Code; } - uint32_t getTag() const { return Tag; } - bool hasChildren() const { return HasChildren; } - - typedef iterator_range - attr_iterator_range; - - attr_iterator_range attributes() const { - return attr_iterator_range(AttributeSpecs.begin(), AttributeSpecs.end()); - } - - uint16_t getFormByIndex(uint32_t idx) const { - return idx < AttributeSpecs.size() ? AttributeSpecs[idx].Form : 0; - } - - uint32_t findAttributeIndex(uint16_t attr) const; - bool extract(DataExtractor Data, uint32_t* OffsetPtr); - void dump(raw_ostream &OS) const; - -private: - void clear(); - - uint32_t Code; - uint32_t Tag; - bool HasChildren; - - AttributeSpecVector AttributeSpecs; -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h deleted file mode 100644 index 47dbf5fd..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h +++ /dev/null @@ -1,54 +0,0 @@ -//===--- DWARFAcceleratorTable.h --------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFACCELERATORTABLE_H -#define LLVM_LIB_DEBUGINFO_DWARFACCELERATORTABLE_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/DebugInfo/DWARF/DWARFFormValue.h" -#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h" -#include - -namespace llvm { - -class DWARFAcceleratorTable { - - struct Header { - uint32_t Magic; - uint16_t Version; - uint16_t HashFunction; - uint32_t NumBuckets; - uint32_t NumHashes; - uint32_t HeaderDataLength; - }; - - struct HeaderData { - typedef uint16_t AtomType; - typedef uint16_t Form; - uint32_t DIEOffsetBase; - SmallVector, 3> Atoms; - }; - - struct Header Hdr; - struct HeaderData HdrData; - DataExtractor AccelSection; - DataExtractor StringSection; - const RelocAddrMap& Relocs; -public: - DWARFAcceleratorTable(DataExtractor AccelSection, DataExtractor StringSection, - const RelocAddrMap &Relocs) - : AccelSection(AccelSection), StringSection(StringSection), Relocs(Relocs) {} - - bool extract(); - void dump(raw_ostream &OS) const; -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h deleted file mode 100644 index bba3abe6..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h +++ /dev/null @@ -1,34 +0,0 @@ -//===-- DWARFCompileUnit.h --------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFCOMPILEUNIT_H -#define LLVM_LIB_DEBUGINFO_DWARFCOMPILEUNIT_H - -#include "llvm/DebugInfo/DWARF/DWARFUnit.h" - -namespace llvm { - -class DWARFCompileUnit : public DWARFUnit { -public: - DWARFCompileUnit(DWARFContext &Context, const DWARFSection &Section, - const DWARFDebugAbbrev *DA, StringRef RS, StringRef SS, - StringRef SOS, StringRef AOS, StringRef LS, bool LE, - bool IsDWO, const DWARFUnitSectionBase &UnitSection, - const DWARFUnitIndex::Entry *Entry) - : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LS, LE, IsDWO, - UnitSection, Entry) {} - void dump(raw_ostream &OS); - static const DWARFSectionKind Section = DW_SECT_INFO; - // VTable anchor. - ~DWARFCompileUnit() override; -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h deleted file mode 100644 index 741a31cb..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h +++ /dev/null @@ -1,326 +0,0 @@ -//===-- DWARFContext.h ------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===/ - -#ifndef LLVM_LIB_DEBUGINFO_DWARFCONTEXT_H -#define LLVM_LIB_DEBUGINFO_DWARFCONTEXT_H - -#include "llvm/ADT/MapVector.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/DebugInfo/DIContext.h" -#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugAranges.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugFrame.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugMacro.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h" -#include "llvm/DebugInfo/DWARF/DWARFSection.h" -#include "llvm/DebugInfo/DWARF/DWARFTypeUnit.h" - -namespace llvm { - -// In place of applying the relocations to the data we've read from disk we use -// a separate mapping table to the side and checking that at locations in the -// dwarf where we expect relocated values. This adds a bit of complexity to the -// dwarf parsing/extraction at the benefit of not allocating memory for the -// entire size of the debug info sections. -typedef DenseMap > RelocAddrMap; - -/// DWARFContext -/// This data structure is the top level entity that deals with dwarf debug -/// information parsing. The actual data is supplied through pure virtual -/// methods that a concrete implementation provides. -class DWARFContext : public DIContext { - - DWARFUnitSection CUs; - std::deque> TUs; - std::unique_ptr CUIndex; - std::unique_ptr TUIndex; - std::unique_ptr Abbrev; - std::unique_ptr Loc; - std::unique_ptr Aranges; - std::unique_ptr Line; - std::unique_ptr DebugFrame; - std::unique_ptr EHFrame; - std::unique_ptr Macro; - - DWARFUnitSection DWOCUs; - std::deque> DWOTUs; - std::unique_ptr AbbrevDWO; - std::unique_ptr LocDWO; - - DWARFContext(DWARFContext &) = delete; - DWARFContext &operator=(DWARFContext &) = delete; - - /// Read compile units from the debug_info section (if necessary) - /// and store them in CUs. - void parseCompileUnits(); - - /// Read type units from the debug_types sections (if necessary) - /// and store them in TUs. - void parseTypeUnits(); - - /// Read compile units from the debug_info.dwo section (if necessary) - /// and store them in DWOCUs. - void parseDWOCompileUnits(); - - /// Read type units from the debug_types.dwo section (if necessary) - /// and store them in DWOTUs. - void parseDWOTypeUnits(); - -public: - DWARFContext() : DIContext(CK_DWARF) {} - - static bool classof(const DIContext *DICtx) { - return DICtx->getKind() == CK_DWARF; - } - - void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All, - bool DumpEH = false) override; - - typedef DWARFUnitSection::iterator_range cu_iterator_range; - typedef DWARFUnitSection::iterator_range tu_iterator_range; - typedef iterator_range tu_section_iterator_range; - - /// Get compile units in this context. - cu_iterator_range compile_units() { - parseCompileUnits(); - return cu_iterator_range(CUs.begin(), CUs.end()); - } - - /// Get type units in this context. - tu_section_iterator_range type_unit_sections() { - parseTypeUnits(); - return tu_section_iterator_range(TUs.begin(), TUs.end()); - } - - /// Get compile units in the DWO context. - cu_iterator_range dwo_compile_units() { - parseDWOCompileUnits(); - return cu_iterator_range(DWOCUs.begin(), DWOCUs.end()); - } - - /// Get type units in the DWO context. - tu_section_iterator_range dwo_type_unit_sections() { - parseDWOTypeUnits(); - return tu_section_iterator_range(DWOTUs.begin(), DWOTUs.end()); - } - - /// Get the number of compile units in this context. - unsigned getNumCompileUnits() { - parseCompileUnits(); - return CUs.size(); - } - - /// Get the number of compile units in this context. - unsigned getNumTypeUnits() { - parseTypeUnits(); - return TUs.size(); - } - - /// Get the number of compile units in the DWO context. - unsigned getNumDWOCompileUnits() { - parseDWOCompileUnits(); - return DWOCUs.size(); - } - - /// Get the number of compile units in the DWO context. - unsigned getNumDWOTypeUnits() { - parseDWOTypeUnits(); - return DWOTUs.size(); - } - - /// Get the compile unit at the specified index for this compile unit. - DWARFCompileUnit *getCompileUnitAtIndex(unsigned index) { - parseCompileUnits(); - return CUs[index].get(); - } - - /// Get the compile unit at the specified index for the DWO compile units. - DWARFCompileUnit *getDWOCompileUnitAtIndex(unsigned index) { - parseDWOCompileUnits(); - return DWOCUs[index].get(); - } - - const DWARFUnitIndex &getCUIndex(); - const DWARFUnitIndex &getTUIndex(); - - /// Get a pointer to the parsed DebugAbbrev object. - const DWARFDebugAbbrev *getDebugAbbrev(); - - /// Get a pointer to the parsed DebugLoc object. - const DWARFDebugLoc *getDebugLoc(); - - /// Get a pointer to the parsed dwo abbreviations object. - const DWARFDebugAbbrev *getDebugAbbrevDWO(); - - /// Get a pointer to the parsed DebugLoc object. - const DWARFDebugLocDWO *getDebugLocDWO(); - - /// Get a pointer to the parsed DebugAranges object. - const DWARFDebugAranges *getDebugAranges(); - - /// Get a pointer to the parsed frame information object. - const DWARFDebugFrame *getDebugFrame(); - - /// Get a pointer to the parsed eh frame information object. - const DWARFDebugFrame *getEHFrame(); - - /// Get a pointer to the parsed DebugMacro object. - const DWARFDebugMacro *getDebugMacro(); - - /// Get a pointer to a parsed line table corresponding to a compile unit. - const DWARFDebugLine::LineTable *getLineTableForUnit(DWARFUnit *cu); - - DILineInfo getLineInfoForAddress(uint64_t Address, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; - DILineInfoTable getLineInfoForAddressRange(uint64_t Address, uint64_t Size, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; - DIInliningInfo getInliningInfoForAddress(uint64_t Address, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; - - virtual bool isLittleEndian() const = 0; - virtual uint8_t getAddressSize() const = 0; - virtual const DWARFSection &getInfoSection() = 0; - typedef MapVector> TypeSectionMap; - virtual const TypeSectionMap &getTypesSections() = 0; - virtual StringRef getAbbrevSection() = 0; - virtual const DWARFSection &getLocSection() = 0; - virtual StringRef getARangeSection() = 0; - virtual StringRef getDebugFrameSection() = 0; - virtual StringRef getEHFrameSection() = 0; - virtual const DWARFSection &getLineSection() = 0; - virtual StringRef getStringSection() = 0; - virtual StringRef getRangeSection() = 0; - virtual StringRef getMacinfoSection() = 0; - virtual StringRef getPubNamesSection() = 0; - virtual StringRef getPubTypesSection() = 0; - virtual StringRef getGnuPubNamesSection() = 0; - virtual StringRef getGnuPubTypesSection() = 0; - - // Sections for DWARF5 split dwarf proposal. - virtual const DWARFSection &getInfoDWOSection() = 0; - virtual const TypeSectionMap &getTypesDWOSections() = 0; - virtual StringRef getAbbrevDWOSection() = 0; - virtual const DWARFSection &getLineDWOSection() = 0; - virtual const DWARFSection &getLocDWOSection() = 0; - virtual StringRef getStringDWOSection() = 0; - virtual StringRef getStringOffsetDWOSection() = 0; - virtual StringRef getRangeDWOSection() = 0; - virtual StringRef getAddrSection() = 0; - virtual const DWARFSection& getAppleNamesSection() = 0; - virtual const DWARFSection& getAppleTypesSection() = 0; - virtual const DWARFSection& getAppleNamespacesSection() = 0; - virtual const DWARFSection& getAppleObjCSection() = 0; - virtual StringRef getCUIndexSection() = 0; - virtual StringRef getTUIndexSection() = 0; - - static bool isSupportedVersion(unsigned version) { - return version == 2 || version == 3 || version == 4 || version == 5; - } -private: - /// Return the compile unit that includes an offset (relative to .debug_info). - DWARFCompileUnit *getCompileUnitForOffset(uint32_t Offset); - - /// Return the compile unit which contains instruction with provided - /// address. - DWARFCompileUnit *getCompileUnitForAddress(uint64_t Address); -}; - -/// DWARFContextInMemory is the simplest possible implementation of a -/// DWARFContext. It assumes all content is available in memory and stores -/// pointers to it. -class DWARFContextInMemory : public DWARFContext { - virtual void anchor(); - bool IsLittleEndian; - uint8_t AddressSize; - DWARFSection InfoSection; - TypeSectionMap TypesSections; - StringRef AbbrevSection; - DWARFSection LocSection; - StringRef ARangeSection; - StringRef DebugFrameSection; - StringRef EHFrameSection; - DWARFSection LineSection; - StringRef StringSection; - StringRef RangeSection; - StringRef MacinfoSection; - StringRef PubNamesSection; - StringRef PubTypesSection; - StringRef GnuPubNamesSection; - StringRef GnuPubTypesSection; - - // Sections for DWARF5 split dwarf proposal. - DWARFSection InfoDWOSection; - TypeSectionMap TypesDWOSections; - StringRef AbbrevDWOSection; - DWARFSection LineDWOSection; - DWARFSection LocDWOSection; - StringRef StringDWOSection; - StringRef StringOffsetDWOSection; - StringRef RangeDWOSection; - StringRef AddrSection; - DWARFSection AppleNamesSection; - DWARFSection AppleTypesSection; - DWARFSection AppleNamespacesSection; - DWARFSection AppleObjCSection; - StringRef CUIndexSection; - StringRef TUIndexSection; - - SmallVector, 4> UncompressedSections; - -public: - DWARFContextInMemory(const object::ObjectFile &Obj, - const LoadedObjectInfo *L = nullptr); - bool isLittleEndian() const override { return IsLittleEndian; } - uint8_t getAddressSize() const override { return AddressSize; } - const DWARFSection &getInfoSection() override { return InfoSection; } - const TypeSectionMap &getTypesSections() override { return TypesSections; } - StringRef getAbbrevSection() override { return AbbrevSection; } - const DWARFSection &getLocSection() override { return LocSection; } - StringRef getARangeSection() override { return ARangeSection; } - StringRef getDebugFrameSection() override { return DebugFrameSection; } - StringRef getEHFrameSection() override { return EHFrameSection; } - const DWARFSection &getLineSection() override { return LineSection; } - StringRef getStringSection() override { return StringSection; } - StringRef getRangeSection() override { return RangeSection; } - StringRef getMacinfoSection() override { return MacinfoSection; } - StringRef getPubNamesSection() override { return PubNamesSection; } - StringRef getPubTypesSection() override { return PubTypesSection; } - StringRef getGnuPubNamesSection() override { return GnuPubNamesSection; } - StringRef getGnuPubTypesSection() override { return GnuPubTypesSection; } - const DWARFSection& getAppleNamesSection() override { return AppleNamesSection; } - const DWARFSection& getAppleTypesSection() override { return AppleTypesSection; } - const DWARFSection& getAppleNamespacesSection() override { return AppleNamespacesSection; } - const DWARFSection& getAppleObjCSection() override { return AppleObjCSection; } - - // Sections for DWARF5 split dwarf proposal. - const DWARFSection &getInfoDWOSection() override { return InfoDWOSection; } - const TypeSectionMap &getTypesDWOSections() override { - return TypesDWOSections; - } - StringRef getAbbrevDWOSection() override { return AbbrevDWOSection; } - const DWARFSection &getLineDWOSection() override { return LineDWOSection; } - const DWARFSection &getLocDWOSection() override { return LocDWOSection; } - StringRef getStringDWOSection() override { return StringDWOSection; } - StringRef getStringOffsetDWOSection() override { - return StringOffsetDWOSection; - } - StringRef getRangeDWOSection() override { return RangeDWOSection; } - StringRef getAddrSection() override { - return AddrSection; - } - StringRef getCUIndexSection() override { return CUIndexSection; } - StringRef getTUIndexSection() override { return TUIndexSection; } -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h deleted file mode 100644 index 67c4a2bb..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h +++ /dev/null @@ -1,62 +0,0 @@ -//===-- DWARFDebugAbbrev.h --------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGABBREV_H -#define LLVM_LIB_DEBUGINFO_DWARFDEBUGABBREV_H - -#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h" -#include -#include - -namespace llvm { - -class DWARFAbbreviationDeclarationSet { - uint32_t Offset; - /// Code of the first abbreviation, if all abbreviations in the set have - /// consecutive codes. UINT32_MAX otherwise. - uint32_t FirstAbbrCode; - std::vector Decls; - -public: - DWARFAbbreviationDeclarationSet(); - - uint32_t getOffset() const { return Offset; } - void dump(raw_ostream &OS) const; - bool extract(DataExtractor Data, uint32_t *OffsetPtr); - - const DWARFAbbreviationDeclaration * - getAbbreviationDeclaration(uint32_t AbbrCode) const; - -private: - void clear(); -}; - -class DWARFDebugAbbrev { - typedef std::map - DWARFAbbreviationDeclarationSetMap; - - DWARFAbbreviationDeclarationSetMap AbbrDeclSets; - mutable DWARFAbbreviationDeclarationSetMap::const_iterator PrevAbbrOffsetPos; - -public: - DWARFDebugAbbrev(); - - const DWARFAbbreviationDeclarationSet * - getAbbreviationDeclarationSet(uint64_t CUAbbrOffset) const; - - void dump(raw_ostream &OS) const; - void extract(DataExtractor Data); - -private: - void clear(); -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h deleted file mode 100644 index 837a8e63..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h +++ /dev/null @@ -1,70 +0,0 @@ -//===-- DWARFDebugArangeSet.h -----------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGARANGESET_H -#define LLVM_LIB_DEBUGINFO_DWARFDEBUGARANGESET_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/Support/DataExtractor.h" -#include - -namespace llvm { - -class raw_ostream; - -class DWARFDebugArangeSet { -public: - struct Header { - // The total length of the entries for that set, not including the length - // field itself. - uint32_t Length; - // The offset from the beginning of the .debug_info section of the - // compilation unit entry referenced by the table. - uint32_t CuOffset; - // The DWARF version number. - uint16_t Version; - // The size in bytes of an address on the target architecture. For segmented - // addressing, this is the size of the offset portion of the address. - uint8_t AddrSize; - // The size in bytes of a segment descriptor on the target architecture. - // If the target system uses a flat address space, this value is 0. - uint8_t SegSize; - }; - - struct Descriptor { - uint64_t Address; - uint64_t Length; - uint64_t getEndAddress() const { return Address + Length; } - }; - -private: - typedef std::vector DescriptorColl; - typedef iterator_range desc_iterator_range; - - uint32_t Offset; - Header HeaderData; - DescriptorColl ArangeDescriptors; - -public: - DWARFDebugArangeSet() { clear(); } - void clear(); - bool extract(DataExtractor data, uint32_t *offset_ptr); - void dump(raw_ostream &OS) const; - - uint32_t getCompileUnitDIEOffset() const { return HeaderData.CuOffset; } - - desc_iterator_range descriptors() const { - return desc_iterator_range(ArangeDescriptors.begin(), - ArangeDescriptors.end()); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h deleted file mode 100644 index 791f010a..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h +++ /dev/null @@ -1,87 +0,0 @@ -//===-- DWARFDebugAranges.h -------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGARANGES_H -#define LLVM_LIB_DEBUGINFO_DWARFDEBUGARANGES_H - -#include "llvm/ADT/DenseSet.h" -#include "llvm/Support/DataExtractor.h" -#include - -namespace llvm { - -class DWARFContext; - -class DWARFDebugAranges { -public: - void generate(DWARFContext *CTX); - uint32_t findAddress(uint64_t Address) const; - -private: - void clear(); - void extract(DataExtractor DebugArangesData); - - // Call appendRange multiple times and then call construct. - void appendRange(uint32_t CUOffset, uint64_t LowPC, uint64_t HighPC); - void construct(); - - struct Range { - explicit Range(uint64_t LowPC = -1ULL, uint64_t HighPC = -1ULL, - uint32_t CUOffset = -1U) - : LowPC(LowPC), Length(HighPC - LowPC), CUOffset(CUOffset) {} - - void setHighPC(uint64_t HighPC) { - if (HighPC == -1ULL || HighPC <= LowPC) - Length = 0; - else - Length = HighPC - LowPC; - } - uint64_t HighPC() const { - if (Length) - return LowPC + Length; - return -1ULL; - } - - bool containsAddress(uint64_t Address) const { - return LowPC <= Address && Address < HighPC(); - } - bool operator<(const Range &other) const { - return LowPC < other.LowPC; - } - - uint64_t LowPC; // Start of address range. - uint32_t Length; // End of address range (not including this address). - uint32_t CUOffset; // Offset of the compile unit or die. - }; - - struct RangeEndpoint { - uint64_t Address; - uint32_t CUOffset; - bool IsRangeStart; - - RangeEndpoint(uint64_t Address, uint32_t CUOffset, bool IsRangeStart) - : Address(Address), CUOffset(CUOffset), IsRangeStart(IsRangeStart) {} - - bool operator<(const RangeEndpoint &Other) const { - return Address < Other.Address; - } - }; - - - typedef std::vector RangeColl; - typedef RangeColl::const_iterator RangeCollIterator; - - std::vector Endpoints; - RangeColl Aranges; - DenseSet ParsedCUOffsets; -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h deleted file mode 100644 index cd76c909..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h +++ /dev/null @@ -1,45 +0,0 @@ -//===-- DWARFDebugFrame.h - Parsing of .debug_frame -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGFRAME_H -#define LLVM_LIB_DEBUGINFO_DWARFDEBUGFRAME_H - -#include "llvm/Support/DataExtractor.h" -#include "llvm/Support/raw_ostream.h" -#include -#include - -namespace llvm { - -class FrameEntry; - -/// \brief A parsed .debug_frame or .eh_frame section -/// -class DWARFDebugFrame { - // True if this is parsing an eh_frame section. - bool IsEH; -public: - DWARFDebugFrame(bool IsEH); - ~DWARFDebugFrame(); - - /// \brief Dump the section data into the given stream. - void dump(raw_ostream &OS) const; - - /// \brief Parse the section from raw data. - /// data is assumed to be pointing to the beginning of the section. - void parse(DataExtractor Data); - -private: - std::vector> Entries; -}; - - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h deleted file mode 100644 index f29d5fe9..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h +++ /dev/null @@ -1,160 +0,0 @@ -//===-- DWARFDebugInfoEntry.h -----------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGINFOENTRY_H -#define LLVM_LIB_DEBUGINFO_DWARFDEBUGINFOENTRY_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/DebugInfo/DIContext.h" -#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - -class DWARFDebugAranges; -class DWARFCompileUnit; -class DWARFUnit; -class DWARFContext; -class DWARFFormValue; -struct DWARFDebugInfoEntryInlinedChain; - -/// DWARFDebugInfoEntryMinimal - A DIE with only the minimum required data. -class DWARFDebugInfoEntryMinimal { - /// Offset within the .debug_info of the start of this entry. - uint32_t Offset; - - /// How many to add to "this" to get the sibling. - uint32_t SiblingIdx; - - const DWARFAbbreviationDeclaration *AbbrevDecl; -public: - DWARFDebugInfoEntryMinimal() - : Offset(0), SiblingIdx(0), AbbrevDecl(nullptr) {} - - void dump(raw_ostream &OS, DWARFUnit *u, unsigned recurseDepth, - unsigned indent = 0) const; - void dumpAttribute(raw_ostream &OS, DWARFUnit *u, uint32_t *offset_ptr, - uint16_t attr, uint16_t form, unsigned indent = 0) const; - - /// Extracts a debug info entry, which is a child of a given unit, - /// starting at a given offset. If DIE can't be extracted, returns false and - /// doesn't change OffsetPtr. - bool extractFast(const DWARFUnit *U, uint32_t *OffsetPtr); - - uint32_t getTag() const { return AbbrevDecl ? AbbrevDecl->getTag() : 0; } - bool isNULL() const { return AbbrevDecl == nullptr; } - - /// Returns true if DIE represents a subprogram (not inlined). - bool isSubprogramDIE() const; - /// Returns true if DIE represents a subprogram or an inlined - /// subroutine. - bool isSubroutineDIE() const; - - uint32_t getOffset() const { return Offset; } - bool hasChildren() const { return !isNULL() && AbbrevDecl->hasChildren(); } - - // We know we are kept in a vector of contiguous entries, so we know - // our sibling will be some index after "this". - const DWARFDebugInfoEntryMinimal *getSibling() const { - return SiblingIdx > 0 ? this + SiblingIdx : nullptr; - } - - // We know we are kept in a vector of contiguous entries, so we know - // we don't need to store our child pointer, if we have a child it will - // be the next entry in the list... - const DWARFDebugInfoEntryMinimal *getFirstChild() const { - return hasChildren() ? this + 1 : nullptr; - } - - void setSibling(const DWARFDebugInfoEntryMinimal *Sibling) { - if (Sibling) { - // We know we are kept in a vector of contiguous entries, so we know - // our sibling will be some index after "this". - SiblingIdx = Sibling - this; - } else - SiblingIdx = 0; - } - - const DWARFAbbreviationDeclaration *getAbbreviationDeclarationPtr() const { - return AbbrevDecl; - } - - bool getAttributeValue(const DWARFUnit *U, const uint16_t Attr, - DWARFFormValue &FormValue) const; - - const char *getAttributeValueAsString(const DWARFUnit *U, const uint16_t Attr, - const char *FailValue) const; - - uint64_t getAttributeValueAsAddress(const DWARFUnit *U, const uint16_t Attr, - uint64_t FailValue) const; - - uint64_t getAttributeValueAsUnsignedConstant(const DWARFUnit *U, - const uint16_t Attr, - uint64_t FailValue) const; - - uint64_t getAttributeValueAsReference(const DWARFUnit *U, const uint16_t Attr, - uint64_t FailValue) const; - - uint64_t getAttributeValueAsSectionOffset(const DWARFUnit *U, - const uint16_t Attr, - uint64_t FailValue) const; - - uint64_t getRangesBaseAttribute(const DWARFUnit *U, uint64_t FailValue) const; - - /// Retrieves DW_AT_low_pc and DW_AT_high_pc from CU. - /// Returns true if both attributes are present. - bool getLowAndHighPC(const DWARFUnit *U, uint64_t &LowPC, - uint64_t &HighPC) const; - - DWARFAddressRangesVector getAddressRanges(const DWARFUnit *U) const; - - void collectChildrenAddressRanges(const DWARFUnit *U, - DWARFAddressRangesVector &Ranges) const; - - bool addressRangeContainsAddress(const DWARFUnit *U, - const uint64_t Address) const; - - /// If a DIE represents a subprogram (or inlined subroutine), - /// returns its mangled name (or short name, if mangled is missing). - /// This name may be fetched from specification or abstract origin - /// for this subprogram. Returns null if no name is found. - const char *getSubroutineName(const DWARFUnit *U, DINameKind Kind) const; - - /// Return the DIE name resolving DW_AT_sepcification or - /// DW_AT_abstract_origin references if necessary. - /// Returns null if no name is found. - const char *getName(const DWARFUnit *U, DINameKind Kind) const; - - /// Retrieves values of DW_AT_call_file, DW_AT_call_line and - /// DW_AT_call_column from DIE (or zeroes if they are missing). - void getCallerFrame(const DWARFUnit *U, uint32_t &CallFile, - uint32_t &CallLine, uint32_t &CallColumn) const; - - /// Get inlined chain for a given address, rooted at the current DIE. - /// Returns empty chain if address is not contained in address range - /// of current DIE. - DWARFDebugInfoEntryInlinedChain - getInlinedChainForAddress(const DWARFUnit *U, const uint64_t Address) const; -}; - -/// DWARFDebugInfoEntryInlinedChain - represents a chain of inlined_subroutine -/// DIEs, (possibly ending with subprogram DIE), all of which are contained -/// in some concrete inlined instance tree. Address range for each DIE -/// (except the last DIE) in this chain is contained in address -/// range for next DIE in the chain. -struct DWARFDebugInfoEntryInlinedChain { - DWARFDebugInfoEntryInlinedChain() : U(nullptr) {} - SmallVector DIEs; - const DWARFUnit *U; -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h deleted file mode 100644 index 760950b7..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h +++ /dev/null @@ -1,252 +0,0 @@ -//===-- DWARFDebugLine.h ----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGLINE_H -#define LLVM_LIB_DEBUGINFO_DWARFDEBUGLINE_H - -#include "llvm/DebugInfo/DIContext.h" -#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h" -#include "llvm/Support/DataExtractor.h" -#include -#include -#include - -namespace llvm { - -class raw_ostream; - -class DWARFDebugLine { -public: - DWARFDebugLine(const RelocAddrMap* LineInfoRelocMap) : RelocMap(LineInfoRelocMap) {} - struct FileNameEntry { - FileNameEntry() : Name(nullptr), DirIdx(0), ModTime(0), Length(0) {} - - const char *Name; - uint64_t DirIdx; - uint64_t ModTime; - uint64_t Length; - }; - - struct Prologue { - Prologue(); - - // The size in bytes of the statement information for this compilation unit - // (not including the total_length field itself). - uint64_t TotalLength; - // Version identifier for the statement information format. - uint16_t Version; - // The number of bytes following the prologue_length field to the beginning - // of the first byte of the statement program itself. - uint64_t PrologueLength; - // The size in bytes of the smallest target machine instruction. Statement - // program opcodes that alter the address register first multiply their - // operands by this value. - uint8_t MinInstLength; - // The maximum number of individual operations that may be encoded in an - // instruction. - uint8_t MaxOpsPerInst; - // The initial value of theis_stmtregister. - uint8_t DefaultIsStmt; - // This parameter affects the meaning of the special opcodes. See below. - int8_t LineBase; - // This parameter affects the meaning of the special opcodes. See below. - uint8_t LineRange; - // The number assigned to the first special opcode. - uint8_t OpcodeBase; - std::vector StandardOpcodeLengths; - std::vector IncludeDirectories; - std::vector FileNames; - - bool IsDWARF64; - uint32_t sizeofTotalLength() const { - return IsDWARF64 ? 12 : 4; - } - uint32_t sizeofPrologueLength() const { - return IsDWARF64 ? 8 : 4; - } - - // Length of the prologue in bytes. - uint32_t getLength() const { - return PrologueLength + sizeofTotalLength() + sizeof(Version) + - sizeofPrologueLength(); - } - // Length of the line table data in bytes (not including the prologue). - uint32_t getStatementTableLength() const { - return TotalLength + sizeofTotalLength() - getLength(); - } - int32_t getMaxLineIncrementForSpecialOpcode() const { - return LineBase + (int8_t)LineRange - 1; - } - - void clear(); - void dump(raw_ostream &OS) const; - bool parse(DataExtractor debug_line_data, uint32_t *offset_ptr); - }; - - // Standard .debug_line state machine structure. - struct Row { - explicit Row(bool default_is_stmt = false); - - /// Called after a row is appended to the matrix. - void postAppend(); - void reset(bool default_is_stmt); - void dump(raw_ostream &OS) const; - - static bool orderByAddress(const Row& LHS, const Row& RHS) { - return LHS.Address < RHS.Address; - } - - // The program-counter value corresponding to a machine instruction - // generated by the compiler. - uint64_t Address; - // An unsigned integer indicating a source line number. Lines are numbered - // beginning at 1. The compiler may emit the value 0 in cases where an - // instruction cannot be attributed to any source line. - uint32_t Line; - // An unsigned integer indicating a column number within a source line. - // Columns are numbered beginning at 1. The value 0 is reserved to indicate - // that a statement begins at the 'left edge' of the line. - uint16_t Column; - // An unsigned integer indicating the identity of the source file - // corresponding to a machine instruction. - uint16_t File; - // An unsigned integer whose value encodes the applicable instruction set - // architecture for the current instruction. - uint8_t Isa; - // An unsigned integer representing the DWARF path discriminator value - // for this location. - uint32_t Discriminator; - // A boolean indicating that the current instruction is the beginning of a - // statement. - uint8_t IsStmt:1, - // A boolean indicating that the current instruction is the - // beginning of a basic block. - BasicBlock:1, - // A boolean indicating that the current address is that of the - // first byte after the end of a sequence of target machine - // instructions. - EndSequence:1, - // A boolean indicating that the current address is one (of possibly - // many) where execution should be suspended for an entry breakpoint - // of a function. - PrologueEnd:1, - // A boolean indicating that the current address is one (of possibly - // many) where execution should be suspended for an exit breakpoint - // of a function. - EpilogueBegin:1; - }; - - // Represents a series of contiguous machine instructions. Line table for each - // compilation unit may consist of multiple sequences, which are not - // guaranteed to be in the order of ascending instruction address. - struct Sequence { - // Sequence describes instructions at address range [LowPC, HighPC) - // and is described by line table rows [FirstRowIndex, LastRowIndex). - uint64_t LowPC; - uint64_t HighPC; - unsigned FirstRowIndex; - unsigned LastRowIndex; - bool Empty; - - Sequence(); - void reset(); - - static bool orderByLowPC(const Sequence& LHS, const Sequence& RHS) { - return LHS.LowPC < RHS.LowPC; - } - bool isValid() const { - return !Empty && (LowPC < HighPC) && (FirstRowIndex < LastRowIndex); - } - bool containsPC(uint64_t pc) const { - return (LowPC <= pc && pc < HighPC); - } - }; - - struct LineTable { - LineTable(); - - // Represents an invalid row - const uint32_t UnknownRowIndex = UINT32_MAX; - - void appendRow(const DWARFDebugLine::Row &R) { - Rows.push_back(R); - } - void appendSequence(const DWARFDebugLine::Sequence &S) { - Sequences.push_back(S); - } - - // Returns the index of the row with file/line info for a given address, - // or UnknownRowIndex if there is no such row. - uint32_t lookupAddress(uint64_t address) const; - - bool lookupAddressRange(uint64_t address, uint64_t size, - std::vector &result) const; - - // Extracts filename by its index in filename table in prologue. - // Returns true on success. - bool getFileNameByIndex(uint64_t FileIndex, const char *CompDir, - DILineInfoSpecifier::FileLineInfoKind Kind, - std::string &Result) const; - - // Fills the Result argument with the file and line information - // corresponding to Address. Returns true on success. - bool getFileLineInfoForAddress(uint64_t Address, const char *CompDir, - DILineInfoSpecifier::FileLineInfoKind Kind, - DILineInfo &Result) const; - - void dump(raw_ostream &OS) const; - void clear(); - - /// Parse prologue and all rows. - bool parse(DataExtractor debug_line_data, const RelocAddrMap *RMap, - uint32_t *offset_ptr); - - struct Prologue Prologue; - typedef std::vector RowVector; - typedef RowVector::const_iterator RowIter; - typedef std::vector SequenceVector; - typedef SequenceVector::const_iterator SequenceIter; - RowVector Rows; - SequenceVector Sequences; - - private: - uint32_t findRowInSeq(const DWARFDebugLine::Sequence &seq, - uint64_t address) const; - }; - - const LineTable *getLineTable(uint32_t offset) const; - const LineTable *getOrParseLineTable(DataExtractor debug_line_data, - uint32_t offset); - -private: - struct ParsingState { - ParsingState(struct LineTable *LT); - - void resetRowAndSequence(); - void appendRowToMatrix(uint32_t offset); - - // Line table we're currently parsing. - struct LineTable *LineTable; - // The row number that starts at zero for the prologue, and increases for - // each row added to the matrix. - unsigned RowNumber; - struct Row Row; - struct Sequence Sequence; - }; - - typedef std::map LineTableMapTy; - typedef LineTableMapTy::iterator LineTableIter; - typedef LineTableMapTy::const_iterator LineTableConstIter; - - const RelocAddrMap *RelocMap; - LineTableMapTy LineTableMap; -}; -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h deleted file mode 100644 index bd44c2e5..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h +++ /dev/null @@ -1,81 +0,0 @@ -//===-- DWARFDebugLoc.h -----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGLOC_H -#define LLVM_LIB_DEBUGINFO_DWARFDEBUGLOC_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h" -#include "llvm/Support/DataExtractor.h" - -namespace llvm { - -class raw_ostream; - -class DWARFDebugLoc { - /// A single location within a location list. - struct Entry { - /// The beginning address of the instruction range. - uint64_t Begin; - /// The ending address of the instruction range. - uint64_t End; - /// The location of the variable within the specified range. - SmallVector Loc; - }; - - /// A list of locations that contain one variable. - struct LocationList { - /// The beginning offset where this location list is stored in the debug_loc - /// section. - unsigned Offset; - /// All the locations in which the variable is stored. - SmallVector Entries; - }; - - typedef SmallVector LocationLists; - - /// A list of all the variables in the debug_loc section, each one describing - /// the locations in which the variable is stored. - LocationLists Locations; - - /// A map used to resolve binary relocations. - const RelocAddrMap &RelocMap; - -public: - DWARFDebugLoc(const RelocAddrMap &LocRelocMap) : RelocMap(LocRelocMap) {} - /// Print the location lists found within the debug_loc section. - void dump(raw_ostream &OS) const; - /// Parse the debug_loc section accessible via the 'data' parameter using the - /// specified address size to interpret the address ranges. - void parse(DataExtractor data, unsigned AddressSize); -}; - -class DWARFDebugLocDWO { - struct Entry { - uint64_t Start; - uint32_t Length; - SmallVector Loc; - }; - - struct LocationList { - unsigned Offset; - SmallVector Entries; - }; - - typedef SmallVector LocationLists; - - LocationLists Locations; - -public: - void parse(DataExtractor data); - void dump(raw_ostream &OS) const; -}; -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h deleted file mode 100644 index d13c7f55..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h +++ /dev/null @@ -1,58 +0,0 @@ -//===-- DWARFDebugMacro.h ---------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H -#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGMACRO_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/DataExtractor.h" -#include "llvm/Support/Dwarf.h" - -namespace llvm { - -class raw_ostream; - -class DWARFDebugMacro { - /// A single macro entry within a macro list. - struct Entry { - /// The type of the macro entry. - uint32_t Type; - union { - /// The source line where the macro is defined. - uint64_t Line; - /// Vendor extension constant value. - uint64_t ExtConstant; - }; - - union { - /// The string (name, value) of the macro entry. - const char *MacroStr; - // An unsigned integer indicating the identity of the source file. - uint64_t File; - /// Vendor extension string. - const char *ExtStr; - }; - }; - - typedef SmallVector MacroList; - - /// A list of all the macro entries in the debug_macinfo section. - MacroList Macros; - -public: - DWARFDebugMacro() {} - /// Print the macro list found within the debug_macinfo section. - void dump(raw_ostream &OS) const; - /// Parse the debug_macinfo section accessible via the 'data' parameter. - void parse(DataExtractor data); -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h deleted file mode 100644 index c930bd60..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h +++ /dev/null @@ -1,79 +0,0 @@ -//===-- DWARFDebugRangeList.h -----------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFDEBUGRANGELIST_H -#define LLVM_LIB_DEBUGINFO_DWARFDEBUGRANGELIST_H - -#include "llvm/Support/DataExtractor.h" -#include - -namespace llvm { - -class raw_ostream; - -/// DWARFAddressRangesVector - represents a set of absolute address ranges. -typedef std::vector> DWARFAddressRangesVector; - -class DWARFDebugRangeList { -public: - struct RangeListEntry { - // A beginning address offset. This address offset has the size of an - // address and is relative to the applicable base address of the - // compilation unit referencing this range list. It marks the beginning - // of an address range. - uint64_t StartAddress; - // An ending address offset. This address offset again has the size of - // an address and is relative to the applicable base address of the - // compilation unit referencing this range list. It marks the first - // address past the end of the address range. The ending address must - // be greater than or equal to the beginning address. - uint64_t EndAddress; - // The end of any given range list is marked by an end of list entry, - // which consists of a 0 for the beginning address offset - // and a 0 for the ending address offset. - bool isEndOfListEntry() const { - return (StartAddress == 0) && (EndAddress == 0); - } - // A base address selection entry consists of: - // 1. The value of the largest representable address offset - // (for example, 0xffffffff when the size of an address is 32 bits). - // 2. An address, which defines the appropriate base address for - // use in interpreting the beginning and ending address offsets of - // subsequent entries of the location list. - bool isBaseAddressSelectionEntry(uint8_t AddressSize) const { - assert(AddressSize == 4 || AddressSize == 8); - if (AddressSize == 4) - return StartAddress == -1U; - else - return StartAddress == -1ULL; - } - }; - -private: - // Offset in .debug_ranges section. - uint32_t Offset; - uint8_t AddressSize; - std::vector Entries; - -public: - DWARFDebugRangeList() { clear(); } - void clear(); - void dump(raw_ostream &OS) const; - bool extract(DataExtractor data, uint32_t *offset_ptr); - const std::vector &getEntries() { return Entries; } - - /// getAbsoluteRanges - Returns absolute address ranges defined by this range - /// list. Has to be passed base address of the compile unit referencing this - /// range list. - DWARFAddressRangesVector getAbsoluteRanges(uint64_t BaseAddress) const; -}; - -} // namespace llvm - -#endif // LLVM_DEBUGINFO_DWARFDEBUGRANGELIST_H diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h deleted file mode 100644 index b2f750dd..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h +++ /dev/null @@ -1,99 +0,0 @@ -//===-- DWARFFormValue.h ----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_DWARFFORMVALUE_H -#define LLVM_DEBUGINFO_DWARFFORMVALUE_H - -#include "llvm/ADT/Optional.h" -#include "llvm/Support/DataExtractor.h" - -namespace llvm { - -template class ArrayRef; -class DWARFUnit; -class raw_ostream; - -class DWARFFormValue { -public: - enum FormClass { - FC_Unknown, - FC_Address, - FC_Block, - FC_Constant, - FC_String, - FC_Flag, - FC_Reference, - FC_Indirect, - FC_SectionOffset, - FC_Exprloc - }; - -private: - struct ValueType { - ValueType() : data(nullptr) { - uval = 0; - } - - union { - uint64_t uval; - int64_t sval; - const char* cstr; - }; - const uint8_t* data; - }; - - uint16_t Form; // Form for this value. - ValueType Value; // Contains all data for the form. - -public: - DWARFFormValue(uint16_t Form = 0) : Form(Form) {} - uint16_t getForm() const { return Form; } - bool isFormClass(FormClass FC) const; - - void dump(raw_ostream &OS, const DWARFUnit *U) const; - - /// \brief extracts a value in data at offset *offset_ptr. - /// - /// The passed DWARFUnit is allowed to be nullptr, in which - /// case no relocation processing will be performed and some - /// kind of forms that depend on Unit information are disallowed. - /// \returns whether the extraction succeeded. - bool extractValue(DataExtractor data, uint32_t *offset_ptr, - const DWARFUnit *u); - bool isInlinedCStr() const { - return Value.data != nullptr && Value.data == (const uint8_t*)Value.cstr; - } - - /// getAsFoo functions below return the extracted value as Foo if only - /// DWARFFormValue has form class is suitable for representing Foo. - Optional getAsReference(const DWARFUnit *U) const; - Optional getAsUnsignedConstant() const; - Optional getAsSignedConstant() const; - Optional getAsCString(const DWARFUnit *U) const; - Optional getAsAddress(const DWARFUnit *U) const; - Optional getAsSectionOffset() const; - Optional> getAsBlock() const; - - bool skipValue(DataExtractor debug_info_data, uint32_t *offset_ptr, - const DWARFUnit *u) const; - static bool skipValue(uint16_t form, DataExtractor debug_info_data, - uint32_t *offset_ptr, const DWARFUnit *u); - static bool skipValue(uint16_t form, DataExtractor debug_info_data, - uint32_t *offset_ptr, uint16_t Version, - uint8_t AddrSize); - - static ArrayRef getFixedFormSizes(uint8_t AddrSize, - uint16_t Version); -private: - void dumpString(raw_ostream &OS, const DWARFUnit *U) const; -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h deleted file mode 100644 index d7fe3032..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFRelocMap.h +++ /dev/null @@ -1,22 +0,0 @@ -//===-- DWARFRelocMap.h -----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFRELOCMAP_H -#define LLVM_LIB_DEBUGINFO_DWARFRELOCMAP_H - -#include "llvm/ADT/DenseMap.h" - -namespace llvm { - -typedef DenseMap > RelocAddrMap; - -} // namespace llvm - -#endif - diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFSection.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFSection.h deleted file mode 100644 index 3e27b529..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFSection.h +++ /dev/null @@ -1,25 +0,0 @@ -//===-- DWARFSection.h ------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFSECTION_H -#define LLVM_LIB_DEBUGINFO_DWARFSECTION_H - -#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h" -#include "llvm/ADT/StringRef.h" - -namespace llvm { - -struct DWARFSection { - StringRef Data; - RelocAddrMap Relocs; -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h deleted file mode 100644 index a697edd3..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h +++ /dev/null @@ -1,42 +0,0 @@ -//===-- DWARFTypeUnit.h -----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFTYPEUNIT_H -#define LLVM_LIB_DEBUGINFO_DWARFTYPEUNIT_H - -#include "llvm/DebugInfo/DWARF/DWARFUnit.h" - -namespace llvm { - -class DWARFTypeUnit : public DWARFUnit { -private: - uint64_t TypeHash; - uint32_t TypeOffset; -public: - DWARFTypeUnit(DWARFContext &Context, const DWARFSection &Section, - const DWARFDebugAbbrev *DA, StringRef RS, StringRef SS, - StringRef SOS, StringRef AOS, StringRef LS, bool LE, bool IsDWO, - const DWARFUnitSectionBase &UnitSection, - const DWARFUnitIndex::Entry *Entry) - : DWARFUnit(Context, Section, DA, RS, SS, SOS, AOS, LS, LE, IsDWO, - UnitSection, Entry) {} - uint32_t getHeaderSize() const override { - return DWARFUnit::getHeaderSize() + 12; - } - void dump(raw_ostream &OS); - static const DWARFSectionKind Section = DW_SECT_TYPES; - -protected: - bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) override; -}; - -} - -#endif - diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h deleted file mode 100644 index 9c3fe3be..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h +++ /dev/null @@ -1,297 +0,0 @@ -//===-- DWARFUnit.h ---------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFUNIT_H -#define LLVM_LIB_DEBUGINFO_DWARFUNIT_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h" -#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h" -#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h" -#include "llvm/DebugInfo/DWARF/DWARFSection.h" -#include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h" -#include - -namespace llvm { - -namespace object { -class ObjectFile; -} - -class DWARFContext; -class DWARFDebugAbbrev; -class DWARFUnit; -class StringRef; -class raw_ostream; - -/// Base class for all DWARFUnitSection classes. This provides the -/// functionality common to all unit types. -class DWARFUnitSectionBase { -public: - /// Returns the Unit that contains the given section offset in the - /// same section this Unit originated from. - virtual DWARFUnit *getUnitForOffset(uint32_t Offset) const = 0; - - void parse(DWARFContext &C, const DWARFSection &Section); - void parseDWO(DWARFContext &C, const DWARFSection &DWOSection, - DWARFUnitIndex *Index = nullptr); - -protected: - virtual void parseImpl(DWARFContext &Context, const DWARFSection &Section, - const DWARFDebugAbbrev *DA, StringRef RS, StringRef SS, - StringRef SOS, StringRef AOS, StringRef LS, - bool isLittleEndian, bool isDWO) = 0; - - ~DWARFUnitSectionBase() = default; -}; - -const DWARFUnitIndex &getDWARFUnitIndex(DWARFContext &Context, - DWARFSectionKind Kind); - -/// Concrete instance of DWARFUnitSection, specialized for one Unit type. -template -class DWARFUnitSection final : public SmallVector, 1>, - public DWARFUnitSectionBase { - bool Parsed = false; - -public: - typedef llvm::SmallVectorImpl> UnitVector; - typedef typename UnitVector::iterator iterator; - typedef llvm::iterator_range iterator_range; - - UnitType *getUnitForOffset(uint32_t Offset) const override { - auto *CU = std::upper_bound( - this->begin(), this->end(), Offset, - [](uint32_t LHS, const std::unique_ptr &RHS) { - return LHS < RHS->getNextUnitOffset(); - }); - if (CU != this->end()) - return CU->get(); - return nullptr; - } - -private: - void parseImpl(DWARFContext &Context, const DWARFSection &Section, - const DWARFDebugAbbrev *DA, StringRef RS, StringRef SS, - StringRef SOS, StringRef AOS, StringRef LS, bool LE, - bool IsDWO) override { - if (Parsed) - return; - const auto &Index = getDWARFUnitIndex(Context, UnitType::Section); - DataExtractor Data(Section.Data, LE, 0); - uint32_t Offset = 0; - while (Data.isValidOffset(Offset)) { - auto U = llvm::make_unique(Context, Section, DA, RS, SS, SOS, - AOS, LS, LE, IsDWO, *this, - Index.getFromOffset(Offset)); - if (!U->extract(Data, &Offset)) - break; - this->push_back(std::move(U)); - Offset = this->back()->getNextUnitOffset(); - } - Parsed = true; - } -}; - -class DWARFUnit { - DWARFContext &Context; - // Section containing this DWARFUnit. - const DWARFSection &InfoSection; - - const DWARFDebugAbbrev *Abbrev; - StringRef RangeSection; - uint32_t RangeSectionBase; - StringRef LineSection; - StringRef StringSection; - StringRef StringOffsetSection; - StringRef AddrOffsetSection; - uint32_t AddrOffsetSectionBase; - bool isLittleEndian; - bool isDWO; - const DWARFUnitSectionBase &UnitSection; - - uint32_t Offset; - uint32_t Length; - uint16_t Version; - const DWARFAbbreviationDeclarationSet *Abbrevs; - uint8_t AddrSize; - uint64_t BaseAddr; - // The compile unit debug information entry items. - std::vector DieArray; - - class DWOHolder { - object::OwningBinary DWOFile; - std::unique_ptr DWOContext; - DWARFUnit *DWOU; - public: - DWOHolder(StringRef DWOPath); - DWARFUnit *getUnit() const { return DWOU; } - }; - std::unique_ptr DWO; - - const DWARFUnitIndex::Entry *IndexEntry; - -protected: - virtual bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr); - /// Size in bytes of the unit header. - virtual uint32_t getHeaderSize() const { return 11; } - -public: - DWARFUnit(DWARFContext &Context, const DWARFSection &Section, - const DWARFDebugAbbrev *DA, StringRef RS, StringRef SS, - StringRef SOS, StringRef AOS, StringRef LS, bool LE, bool IsDWO, - const DWARFUnitSectionBase &UnitSection, - const DWARFUnitIndex::Entry *IndexEntry = nullptr); - - virtual ~DWARFUnit(); - - DWARFContext& getContext() const { return Context; } - - StringRef getLineSection() const { return LineSection; } - StringRef getStringSection() const { return StringSection; } - StringRef getStringOffsetSection() const { return StringOffsetSection; } - void setAddrOffsetSection(StringRef AOS, uint32_t Base) { - AddrOffsetSection = AOS; - AddrOffsetSectionBase = Base; - } - void setRangesSection(StringRef RS, uint32_t Base) { - RangeSection = RS; - RangeSectionBase = Base; - } - - bool getAddrOffsetSectionItem(uint32_t Index, uint64_t &Result) const; - // FIXME: Result should be uint64_t in DWARF64. - bool getStringOffsetSectionItem(uint32_t Index, uint32_t &Result) const; - - DataExtractor getDebugInfoExtractor() const { - return DataExtractor(InfoSection.Data, isLittleEndian, AddrSize); - } - DataExtractor getStringExtractor() const { - return DataExtractor(StringSection, false, 0); - } - - const RelocAddrMap *getRelocMap() const { return &InfoSection.Relocs; } - - bool extract(DataExtractor debug_info, uint32_t* offset_ptr); - - /// extractRangeList - extracts the range list referenced by this compile - /// unit from .debug_ranges section. Returns true on success. - /// Requires that compile unit is already extracted. - bool extractRangeList(uint32_t RangeListOffset, - DWARFDebugRangeList &RangeList) const; - void clear(); - uint32_t getOffset() const { return Offset; } - uint32_t getNextUnitOffset() const { return Offset + Length + 4; } - uint32_t getLength() const { return Length; } - uint16_t getVersion() const { return Version; } - const DWARFAbbreviationDeclarationSet *getAbbreviations() const { - return Abbrevs; - } - uint8_t getAddressByteSize() const { return AddrSize; } - uint64_t getBaseAddress() const { return BaseAddr; } - - void setBaseAddress(uint64_t base_addr) { - BaseAddr = base_addr; - } - - const DWARFDebugInfoEntryMinimal *getUnitDIE(bool ExtractUnitDIEOnly = true) { - extractDIEsIfNeeded(ExtractUnitDIEOnly); - return DieArray.empty() ? nullptr : &DieArray[0]; - } - - const char *getCompilationDir(); - uint64_t getDWOId(); - - void collectAddressRanges(DWARFAddressRangesVector &CURanges); - - /// getInlinedChainForAddress - fetches inlined chain for a given address. - /// Returns empty chain if there is no subprogram containing address. The - /// chain is valid as long as parsed compile unit DIEs are not cleared. - DWARFDebugInfoEntryInlinedChain getInlinedChainForAddress(uint64_t Address); - - /// getUnitSection - Return the DWARFUnitSection containing this unit. - const DWARFUnitSectionBase &getUnitSection() const { return UnitSection; } - - /// \brief Returns the number of DIEs in the unit. Parses the unit - /// if necessary. - unsigned getNumDIEs() { - extractDIEsIfNeeded(false); - return DieArray.size(); - } - - /// \brief Return the index of a DIE inside the unit's DIE vector. - /// - /// It is illegal to call this method with a DIE that hasn't be - /// created by this unit. In other word, it's illegal to call this - /// method on a DIE that isn't accessible by following - /// children/sibling links starting from this unit's getUnitDIE(). - uint32_t getDIEIndex(const DWARFDebugInfoEntryMinimal *DIE) { - assert(!DieArray.empty() && DIE >= &DieArray[0] && - DIE < &DieArray[0] + DieArray.size()); - return DIE - &DieArray[0]; - } - - /// \brief Return the DIE object at the given index. - const DWARFDebugInfoEntryMinimal *getDIEAtIndex(unsigned Index) const { - assert(Index < DieArray.size()); - return &DieArray[Index]; - } - - /// \brief Return the DIE object for a given offset inside the - /// unit's DIE vector. - /// - /// The unit needs to have its DIEs extracted for this method to work. - const DWARFDebugInfoEntryMinimal *getDIEForOffset(uint32_t Offset) const { - assert(!DieArray.empty()); - auto it = std::lower_bound( - DieArray.begin(), DieArray.end(), Offset, - [](const DWARFDebugInfoEntryMinimal &LHS, uint32_t Offset) { - return LHS.getOffset() < Offset; - }); - return it == DieArray.end() ? nullptr : &*it; - } - - uint32_t getLineTableOffset() const { - if (IndexEntry) - if (const auto *Contrib = IndexEntry->getOffset(DW_SECT_LINE)) - return Contrib->Offset; - return 0; - } - -private: - /// Size in bytes of the .debug_info data associated with this compile unit. - size_t getDebugInfoSize() const { return Length + 4 - getHeaderSize(); } - - /// extractDIEsIfNeeded - Parses a compile unit and indexes its DIEs if it - /// hasn't already been done. Returns the number of DIEs parsed at this call. - size_t extractDIEsIfNeeded(bool CUDieOnly); - /// extractDIEsToVector - Appends all parsed DIEs to a vector. - void extractDIEsToVector(bool AppendCUDie, bool AppendNonCUDIEs, - std::vector &DIEs) const; - /// setDIERelations - We read in all of the DIE entries into our flat list - /// of DIE entries and now we need to go back through all of them and set the - /// parent, sibling and child pointers for quick DIE navigation. - void setDIERelations(); - /// clearDIEs - Clear parsed DIEs to keep memory usage low. - void clearDIEs(bool KeepCUDie); - - /// parseDWO - Parses .dwo file for current compile unit. Returns true if - /// it was actually constructed. - bool parseDWO(); - - /// getSubprogramForAddress - Returns subprogram DIE with address range - /// encompassing the provided address. The pointer is alive as long as parsed - /// compile unit DIEs are not cleared. - const DWARFDebugInfoEntryMinimal *getSubprogramForAddress(uint64_t Address); -}; - -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h deleted file mode 100644 index 9f051cd7..00000000 --- a/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h +++ /dev/null @@ -1,92 +0,0 @@ -//===-- DWARFUnitIndex.h --------------------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIB_DEBUGINFO_DWARFUNITINDEX_H -#define LLVM_LIB_DEBUGINFO_DWARFUNITINDEX_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/Support/DataExtractor.h" -#include "llvm/Support/Format.h" -#include "llvm/Support/raw_ostream.h" -#include - -namespace llvm { - -enum DWARFSectionKind { - DW_SECT_INFO = 1, - DW_SECT_TYPES, - DW_SECT_ABBREV, - DW_SECT_LINE, - DW_SECT_LOC, - DW_SECT_STR_OFFSETS, - DW_SECT_MACINFO, - DW_SECT_MACRO, -}; - -class DWARFUnitIndex { - struct Header { - uint32_t Version; - uint32_t NumColumns; - uint32_t NumUnits; - uint32_t NumBuckets = 0; - - bool parse(DataExtractor IndexData, uint32_t *OffsetPtr); - void dump(raw_ostream &OS) const; - }; - -public: - class Entry { - public: - struct SectionContribution { - uint32_t Offset; - uint32_t Length; - }; - - private: - const DWARFUnitIndex *Index; - uint64_t Signature; - std::unique_ptr Contributions; - friend class DWARFUnitIndex; - - public: - const SectionContribution *getOffset(DWARFSectionKind Sec) const; - const SectionContribution *getOffset() const; - const SectionContribution *getOffsets() const { - return Contributions.get(); - } - uint64_t getSignature() const { return Signature; } - }; - -private: - struct Header Header; - - DWARFSectionKind InfoColumnKind; - int InfoColumn = -1; - std::unique_ptr ColumnKinds; - std::unique_ptr Rows; - - static StringRef getColumnHeader(DWARFSectionKind DS); - bool parseImpl(DataExtractor IndexData); - -public: - bool parse(DataExtractor IndexData); - DWARFUnitIndex(DWARFSectionKind InfoColumnKind) - : InfoColumnKind(InfoColumnKind) {} - void dump(raw_ostream &OS) const; - const Entry *getFromOffset(uint32_t Offset) const; - ArrayRef getColumnKinds() const { - return makeArrayRef(ColumnKinds.get(), Header.NumColumns); - } - ArrayRef getRows() const { - return makeArrayRef(Rows.get(), Header.NumBuckets); - } -}; -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h b/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h deleted file mode 100644 index 50f5c40b..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h +++ /dev/null @@ -1,61 +0,0 @@ -//===- ConcreteSymbolEnumerator.h -------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_CONCRETESYMBOLENUMERATOR_H -#define LLVM_DEBUGINFO_PDB_CONCRETESYMBOLENUMERATOR_H - -#include "IPDBEnumChildren.h" -#include "llvm/Support/Casting.h" -#include - -namespace llvm { -namespace pdb { - -template -class ConcreteSymbolEnumerator : public IPDBEnumChildren { -public: - ConcreteSymbolEnumerator(std::unique_ptr SymbolEnumerator) - : Enumerator(std::move(SymbolEnumerator)) {} - - ~ConcreteSymbolEnumerator() override {} - - uint32_t getChildCount() const override { - return Enumerator->getChildCount(); - } - - std::unique_ptr getChildAtIndex(uint32_t Index) const override { - std::unique_ptr Child = Enumerator->getChildAtIndex(Index); - return make_concrete_child(std::move(Child)); - } - - std::unique_ptr getNext() override { - std::unique_ptr Child = Enumerator->getNext(); - return make_concrete_child(std::move(Child)); - } - - void reset() override { Enumerator->reset(); } - - ConcreteSymbolEnumerator *clone() const override { - std::unique_ptr WrappedClone(Enumerator->clone()); - return new ConcreteSymbolEnumerator(std::move(WrappedClone)); - } - -private: - std::unique_ptr - make_concrete_child(std::unique_ptr Child) const { - ChildType *ConcreteChild = dyn_cast_or_null(Child.release()); - return std::unique_ptr(ConcreteChild); - } - - std::unique_ptr Enumerator; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h deleted file mode 100644 index 930bea60..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h +++ /dev/null @@ -1,35 +0,0 @@ -//===- DIADataStream.h - DIA implementation of IPDBDataStream ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIADATASTREAM_H -#define LLVM_DEBUGINFO_PDB_DIA_DIADATASTREAM_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBDataStream.h" - -namespace llvm { -namespace pdb { -class DIADataStream : public IPDBDataStream { -public: - explicit DIADataStream(CComPtr DiaStreamData); - - uint32_t getRecordCount() const override; - std::string getName() const override; - llvm::Optional getItemAtIndex(uint32_t Index) const override; - bool getNext(RecordType &Record) override; - void reset() override; - DIADataStream *clone() const override; - -private: - CComPtr StreamData; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h deleted file mode 100644 index 941e16a3..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h +++ /dev/null @@ -1,37 +0,0 @@ -//==- DIAEnumDebugStreams.h - DIA Debug Stream Enumerator impl ---*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIAENUMDEBUGSTREAMS_H -#define LLVM_DEBUGINFO_PDB_DIA_DIAENUMDEBUGSTREAMS_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" - -namespace llvm { -namespace pdb { - -class IPDBDataStream; - -class DIAEnumDebugStreams : public IPDBEnumChildren { -public: - explicit DIAEnumDebugStreams(CComPtr DiaEnumerator); - - uint32_t getChildCount() const override; - ChildTypePtr getChildAtIndex(uint32_t Index) const override; - ChildTypePtr getNext() override; - void reset() override; - DIAEnumDebugStreams *clone() const override; - -private: - CComPtr Enumerator; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h deleted file mode 100644 index 106b84ce..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h +++ /dev/null @@ -1,36 +0,0 @@ -//==- DIAEnumLineNumbers.h - DIA Line Number Enumerator impl -----*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIAENUMLINENUMBERS_H -#define LLVM_DEBUGINFO_PDB_DIA_DIAENUMLINENUMBERS_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" - -namespace llvm { -namespace pdb { -class IPDBLineNumber; - -class DIAEnumLineNumbers : public IPDBEnumChildren { -public: - explicit DIAEnumLineNumbers(CComPtr DiaEnumerator); - - uint32_t getChildCount() const override; - ChildTypePtr getChildAtIndex(uint32_t Index) const override; - ChildTypePtr getNext() override; - void reset() override; - DIAEnumLineNumbers *clone() const override; - -private: - CComPtr Enumerator; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h deleted file mode 100644 index 6c00d6a5..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h +++ /dev/null @@ -1,38 +0,0 @@ -//==- DIAEnumSourceFiles.h - DIA Source File Enumerator impl -----*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIAENUMSOURCEFILES_H -#define LLVM_DEBUGINFO_PDB_DIA_DIAENUMSOURCEFILES_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" - -namespace llvm { -namespace pdb { -class DIASession; - -class DIAEnumSourceFiles : public IPDBEnumChildren { -public: - explicit DIAEnumSourceFiles(const DIASession &PDBSession, - CComPtr DiaEnumerator); - - uint32_t getChildCount() const override; - ChildTypePtr getChildAtIndex(uint32_t Index) const override; - ChildTypePtr getNext() override; - void reset() override; - DIAEnumSourceFiles *clone() const override; - -private: - const DIASession &Session; - CComPtr Enumerator; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h deleted file mode 100644 index b206ff59..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h +++ /dev/null @@ -1,38 +0,0 @@ -//==- DIAEnumSymbols.h - DIA Symbol Enumerator impl --------------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIAENUMSYMBOLS_H -#define LLVM_DEBUGINFO_PDB_DIA_DIAENUMSYMBOLS_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h" - -namespace llvm { -namespace pdb { -class DIASession; - -class DIAEnumSymbols : public IPDBEnumChildren { -public: - explicit DIAEnumSymbols(const DIASession &Session, - CComPtr DiaEnumerator); - - uint32_t getChildCount() const override; - std::unique_ptr getChildAtIndex(uint32_t Index) const override; - std::unique_ptr getNext() override; - void reset() override; - DIAEnumSymbols *clone() const override; - -private: - const DIASession &Session; - CComPtr Enumerator; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h deleted file mode 100644 index f198d07e..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h +++ /dev/null @@ -1,46 +0,0 @@ -//===- DIAError.h - Error extensions for PDB DIA implementation -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIAERROR_H -#define LLVM_DEBUGINFO_PDB_DIA_DIAERROR_H - -#include "llvm/Support/Error.h" - -#include - -namespace llvm { -namespace pdb { -enum class dia_error_code { - unspecified = 1, - could_not_create_impl, - invalid_file_format, - invalid_parameter, - already_loaded, - debug_info_mismatch, -}; - -/// Base class for errors originating in DIA SDK, e.g. COM calls -class DIAError : public ErrorInfo { -public: - static char ID; - DIAError(dia_error_code C); - DIAError(const std::string &Context); - DIAError(dia_error_code C, const std::string &Context); - - void log(raw_ostream &OS) const override; - const std::string &getErrorMessage() const; - std::error_code convertToErrorCode() const override; - -private: - std::string ErrMsg; - dia_error_code Code; -}; -} -} -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h deleted file mode 100644 index a59e3a19..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h +++ /dev/null @@ -1,40 +0,0 @@ -//===- DIALineNumber.h - DIA implementation of IPDBLineNumber ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIALINENUMBER_H -#define LLVM_DEBUGINFO_PDB_DIA_DIALINENUMBER_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBLineNumber.h" - -namespace llvm { -namespace pdb { -class DIALineNumber : public IPDBLineNumber { -public: - explicit DIALineNumber(CComPtr DiaLineNumber); - - uint32_t getLineNumber() const override; - uint32_t getLineNumberEnd() const override; - uint32_t getColumnNumber() const override; - uint32_t getColumnNumberEnd() const override; - uint32_t getAddressSection() const override; - uint32_t getAddressOffset() const override; - uint32_t getRelativeVirtualAddress() const override; - uint64_t getVirtualAddress() const override; - uint32_t getLength() const override; - uint32_t getSourceFileId() const override; - uint32_t getCompilandId() const override; - bool isStatement() const override; - -private: - CComPtr LineNumber; -}; -} -} -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h deleted file mode 100644 index 1e40c46f..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h +++ /dev/null @@ -1,208 +0,0 @@ -//===- DIARawSymbol.h - DIA implementation of IPDBRawSymbol ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIARAWSYMBOL_H -#define LLVM_DEBUGINFO_PDB_DIA_DIARAWSYMBOL_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" - -namespace llvm { -namespace pdb { -class DIASession; -class DIARawSymbol : public IPDBRawSymbol { -public: - DIARawSymbol(const DIASession &PDBSession, CComPtr DiaSymbol); - - void dump(raw_ostream &OS, int Indent) const override; - - CComPtr getDiaSymbol() const { return Symbol; } - - std::unique_ptr - findChildren(PDB_SymType Type) const override; - std::unique_ptr - findChildren(PDB_SymType Type, StringRef Name, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr - findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, - uint32_t RVA) const override; - std::unique_ptr - findInlineFramesByRVA(uint32_t RVA) const override; - - void getDataBytes(llvm::SmallVector &bytes) const override; - void getFrontEndVersion(VersionInfo &Version) const override; - void getBackEndVersion(VersionInfo &Version) const override; - PDB_MemberAccess getAccess() const override; - uint32_t getAddressOffset() const override; - uint32_t getAddressSection() const override; - uint32_t getAge() const override; - uint32_t getArrayIndexTypeId() const override; - uint32_t getBaseDataOffset() const override; - uint32_t getBaseDataSlot() const override; - uint32_t getBaseSymbolId() const override; - PDB_BuiltinType getBuiltinType() const override; - uint32_t getBitPosition() const override; - PDB_CallingConv getCallingConvention() const override; - uint32_t getClassParentId() const override; - std::string getCompilerName() const override; - uint32_t getCount() const override; - uint32_t getCountLiveRanges() const override; - PDB_Lang getLanguage() const override; - uint32_t getLexicalParentId() const override; - std::string getLibraryName() const override; - uint32_t getLiveRangeStartAddressOffset() const override; - uint32_t getLiveRangeStartAddressSection() const override; - uint32_t getLiveRangeStartRelativeVirtualAddress() const override; - codeview::RegisterId getLocalBasePointerRegisterId() const override; - uint32_t getLowerBoundId() const override; - uint32_t getMemorySpaceKind() const override; - std::string getName() const override; - uint32_t getNumberOfAcceleratorPointerTags() const override; - uint32_t getNumberOfColumns() const override; - uint32_t getNumberOfModifiers() const override; - uint32_t getNumberOfRegisterIndices() const override; - uint32_t getNumberOfRows() const override; - std::string getObjectFileName() const override; - uint32_t getOemId() const override; - uint32_t getOemSymbolId() const override; - uint32_t getOffsetInUdt() const override; - PDB_Cpu getPlatform() const override; - uint32_t getRank() const override; - codeview::RegisterId getRegisterId() const override; - uint32_t getRegisterType() const override; - uint32_t getRelativeVirtualAddress() const override; - uint32_t getSamplerSlot() const override; - uint32_t getSignature() const override; - uint32_t getSizeInUdt() const override; - uint32_t getSlot() const override; - std::string getSourceFileName() const override; - uint32_t getStride() const override; - uint32_t getSubTypeId() const override; - std::string getSymbolsFileName() const override; - uint32_t getSymIndexId() const override; - uint32_t getTargetOffset() const override; - uint32_t getTargetRelativeVirtualAddress() const override; - uint64_t getTargetVirtualAddress() const override; - uint32_t getTargetSection() const override; - uint32_t getTextureSlot() const override; - uint32_t getTimeStamp() const override; - uint32_t getToken() const override; - uint32_t getTypeId() const override; - uint32_t getUavSlot() const override; - std::string getUndecoratedName() const override; - uint32_t getUnmodifiedTypeId() const override; - uint32_t getUpperBoundId() const override; - Variant getValue() const override; - uint32_t getVirtualBaseDispIndex() const override; - uint32_t getVirtualBaseOffset() const override; - uint32_t getVirtualTableShapeId() const override; - PDB_DataKind getDataKind() const override; - PDB_SymType getSymTag() const override; - PDB_UniqueId getGuid() const override; - int32_t getOffset() const override; - int32_t getThisAdjust() const override; - int32_t getVirtualBasePointerOffset() const override; - PDB_LocType getLocationType() const override; - PDB_Machine getMachineType() const override; - codeview::ThunkOrdinal getThunkOrdinal() const override; - uint64_t getLength() const override; - uint64_t getLiveRangeLength() const override; - uint64_t getVirtualAddress() const override; - PDB_UdtType getUdtKind() const override; - bool hasConstructor() const override; - bool hasCustomCallingConvention() const override; - bool hasFarReturn() const override; - bool isCode() const override; - bool isCompilerGenerated() const override; - bool isConstType() const override; - bool isEditAndContinueEnabled() const override; - bool isFunction() const override; - bool getAddressTaken() const override; - bool getNoStackOrdering() const override; - bool hasAlloca() const override; - bool hasAssignmentOperator() const override; - bool hasCTypes() const override; - bool hasCastOperator() const override; - bool hasDebugInfo() const override; - bool hasEH() const override; - bool hasEHa() const override; - bool hasInlAsm() const override; - bool hasInlineAttribute() const override; - bool hasInterruptReturn() const override; - bool hasFramePointer() const override; - bool hasLongJump() const override; - bool hasManagedCode() const override; - bool hasNestedTypes() const override; - bool hasNoInlineAttribute() const override; - bool hasNoReturnAttribute() const override; - bool hasOptimizedCodeDebugInfo() const override; - bool hasOverloadedOperator() const override; - bool hasSEH() const override; - bool hasSecurityChecks() const override; - bool hasSetJump() const override; - bool hasStrictGSCheck() const override; - bool isAcceleratorGroupSharedLocal() const override; - bool isAcceleratorPointerTagLiveRange() const override; - bool isAcceleratorStubFunction() const override; - bool isAggregated() const override; - bool isIntroVirtualFunction() const override; - bool isCVTCIL() const override; - bool isConstructorVirtualBase() const override; - bool isCxxReturnUdt() const override; - bool isDataAligned() const override; - bool isHLSLData() const override; - bool isHotpatchable() const override; - bool isIndirectVirtualBaseClass() const override; - bool isInterfaceUdt() const override; - bool isIntrinsic() const override; - bool isLTCG() const override; - bool isLocationControlFlowDependent() const override; - bool isMSILNetmodule() const override; - bool isMatrixRowMajor() const override; - bool isManagedCode() const override; - bool isMSILCode() const override; - bool isMultipleInheritance() const override; - bool isNaked() const override; - bool isNested() const override; - bool isOptimizedAway() const override; - bool isPacked() const override; - bool isPointerBasedOnSymbolValue() const override; - bool isPointerToDataMember() const override; - bool isPointerToMemberFunction() const override; - bool isPureVirtual() const override; - bool isRValueReference() const override; - bool isRefUdt() const override; - bool isReference() const override; - bool isRestrictedType() const override; - bool isReturnValue() const override; - bool isSafeBuffers() const override; - bool isScoped() const override; - bool isSdl() const override; - bool isSingleInheritance() const override; - bool isSplitted() const override; - bool isStatic() const override; - bool hasPrivateSymbols() const override; - bool isUnalignedType() const override; - bool isUnreached() const override; - bool isValueUdt() const override; - bool isVirtual() const override; - bool isVirtualBaseClass() const override; - bool isVirtualInheritance() const override; - bool isVolatileType() const override; - bool wasInlined() const override; - std::string getUnused() const override; - -private: - const DIASession &Session; - CComPtr Symbol; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h deleted file mode 100644 index 3f581863..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h +++ /dev/null @@ -1,72 +0,0 @@ -//===- DIASession.h - DIA implementation of IPDBSession ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIASESSION_H -#define LLVM_DEBUGINFO_PDB_DIA_DIASESSION_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBSession.h" -#include "llvm/Support/Error.h" - -#include - -namespace llvm { -class StringRef; - -namespace pdb { -class DIASession : public IPDBSession { -public: - explicit DIASession(CComPtr DiaSession); - - static Error createFromPdb(StringRef Path, - std::unique_ptr &Session); - static Error createFromExe(StringRef Path, - std::unique_ptr &Session); - - uint64_t getLoadAddress() const override; - void setLoadAddress(uint64_t Address) override; - std::unique_ptr getGlobalScope() const override; - std::unique_ptr getSymbolById(uint32_t SymbolId) const override; - - std::unique_ptr - findSymbolByAddress(uint64_t Address, PDB_SymType Type) const override; - - std::unique_ptr - findLineNumbers(const PDBSymbolCompiland &Compiland, - const IPDBSourceFile &File) const override; - std::unique_ptr - findLineNumbersByAddress(uint64_t Address, uint32_t Length) const override; - - std::unique_ptr - findSourceFiles(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr - findOneSourceFile(const PDBSymbolCompiland *Compiland, - llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr> - findCompilandsForSourceFile(llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr - findOneCompilandForSourceFile(llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr getAllSourceFiles() const override; - std::unique_ptr getSourceFilesForCompiland( - const PDBSymbolCompiland &Compiland) const override; - std::unique_ptr - getSourceFileById(uint32_t FileId) const override; - - std::unique_ptr getDebugStreams() const override; - -private: - CComPtr Session; -}; -} -} -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h deleted file mode 100644 index 1088ea54..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h +++ /dev/null @@ -1,41 +0,0 @@ -//===- DIASourceFile.h - DIA implementation of IPDBSourceFile ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIASOURCEFILE_H -#define LLVM_DEBUGINFO_PDB_DIA_DIASOURCEFILE_H - -#include "DIASupport.h" -#include "llvm/DebugInfo/PDB/IPDBSourceFile.h" - -namespace llvm { -namespace pdb { -class DIASession; - -class DIASourceFile : public IPDBSourceFile { -public: - explicit DIASourceFile(const DIASession &Session, - CComPtr DiaSourceFile); - - std::string getFileName() const override; - uint32_t getUniqueId() const override; - std::string getChecksum() const override; - PDB_Checksum getChecksumType() const override; - std::unique_ptr> - getCompilands() const override; - - CComPtr getDiaFile() const { return SourceFile; } - -private: - const DIASession &Session; - CComPtr SourceFile; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h deleted file mode 100644 index 3b4a3482..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h +++ /dev/null @@ -1,44 +0,0 @@ -//===- DIASupport.h - Common header includes for DIA ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// Common defines and header includes for all LLVMDebugInfoPDBDIA. The -// definitions here configure the necessary #defines and include system headers -// in the proper order for using DIA. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H -#define LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H - -// Require at least Vista -#define NTDDI_VERSION NTDDI_VISTA -#define _WIN32_WINNT _WIN32_WINNT_VISTA -#define WINVER _WIN32_WINNT_VISTA -#ifndef NOMINMAX -#define NOMINMAX -#endif - -// llvm/Support/Debug.h unconditionally #defines DEBUG as a macro. -// DIA headers #define it if it is not already defined, so we have -// an order of includes problem. The real fix is to make LLVM use -// something less generic than DEBUG, such as LLVM_DEBUG(), but it's -// fairly prevalent. So for now, we save the definition state and -// restore it. -#pragma push_macro("DEBUG") - -// atlbase.h has to come before windows.h -#include -#include - -// DIA headers must come after windows headers. -#include -#include -#include - -#pragma pop_macro("DEBUG") - -#endif // LLVM_DEBUGINFO_PDB_DIA_DIASUPPORT_H diff --git a/llvm/include/llvm/DebugInfo/PDB/GenericError.h b/llvm/include/llvm/DebugInfo/PDB/GenericError.h deleted file mode 100644 index 959c2616..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/GenericError.h +++ /dev/null @@ -1,42 +0,0 @@ -//===- Error.h - system_error extensions for PDB ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_ERROR_H -#define LLVM_DEBUGINFO_PDB_ERROR_H - -#include "llvm/Support/Error.h" - -namespace llvm { -namespace pdb { - -enum class generic_error_code { - invalid_path = 1, - dia_sdk_not_present, - unspecified, -}; - -/// Base class for errors originating when parsing raw PDB files -class GenericError : public ErrorInfo { -public: - static char ID; - GenericError(generic_error_code C); - GenericError(const std::string &Context); - GenericError(generic_error_code C, const std::string &Context); - - void log(raw_ostream &OS) const override; - const std::string &getErrorMessage() const; - std::error_code convertToErrorCode() const override; - -private: - std::string ErrMsg; - generic_error_code Code; -}; -} -} -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h b/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h deleted file mode 100644 index 9594dc15..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h +++ /dev/null @@ -1,39 +0,0 @@ -//===- IPDBDataStream.h - base interface for child enumerator -*- C++ ---*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H -#define LLVM_DEBUGINFO_PDB_IPDBDATASTREAM_H - -#include "PDBTypes.h" -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/SmallVector.h" - -namespace llvm { -namespace pdb { - -/// IPDBDataStream defines an interface used to represent a stream consisting -/// of a name and a series of records whose formats depend on the particular -/// stream type. -class IPDBDataStream { -public: - typedef llvm::SmallVector RecordType; - - virtual ~IPDBDataStream(); - - virtual uint32_t getRecordCount() const = 0; - virtual std::string getName() const = 0; - virtual llvm::Optional getItemAtIndex(uint32_t Index) const = 0; - virtual bool getNext(RecordType &Record) = 0; - virtual void reset() = 0; - virtual IPDBDataStream *clone() const = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h b/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h deleted file mode 100644 index 8e9f6f88..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h +++ /dev/null @@ -1,35 +0,0 @@ -//===- IPDBEnumChildren.h - base interface for child enumerator -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H -#define LLVM_DEBUGINFO_PDB_IPDBENUMCHILDREN_H - -#include "PDBTypes.h" -#include - -namespace llvm { -namespace pdb { - -template class IPDBEnumChildren { -public: - typedef std::unique_ptr ChildTypePtr; - typedef IPDBEnumChildren MyType; - - virtual ~IPDBEnumChildren() {} - - virtual uint32_t getChildCount() const = 0; - virtual ChildTypePtr getChildAtIndex(uint32_t Index) const = 0; - virtual ChildTypePtr getNext() = 0; - virtual void reset() = 0; - virtual MyType *clone() const = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBLineNumber.h b/llvm/include/llvm/DebugInfo/PDB/IPDBLineNumber.h deleted file mode 100644 index e20080f2..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/IPDBLineNumber.h +++ /dev/null @@ -1,37 +0,0 @@ -//===- IPDBLineNumber.h - base interface for PDB line no. info ---*- C++-*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_IPDBLINENUMBER_H -#define LLVM_DEBUGINFO_PDB_IPDBLINENUMBER_H - -#include "PDBTypes.h" - -namespace llvm { -namespace pdb { -class IPDBLineNumber { -public: - virtual ~IPDBLineNumber(); - - virtual uint32_t getLineNumber() const = 0; - virtual uint32_t getLineNumberEnd() const = 0; - virtual uint32_t getColumnNumber() const = 0; - virtual uint32_t getColumnNumberEnd() const = 0; - virtual uint32_t getAddressSection() const = 0; - virtual uint32_t getAddressOffset() const = 0; - virtual uint32_t getRelativeVirtualAddress() const = 0; - virtual uint64_t getVirtualAddress() const = 0; - virtual uint32_t getLength() const = 0; - virtual uint32_t getSourceFileId() const = 0; - virtual uint32_t getCompilandId() const = 0; - virtual bool isStatement() const = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h b/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h deleted file mode 100644 index 49866b8b..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h +++ /dev/null @@ -1,214 +0,0 @@ -//===- IPDBRawSymbol.h - base interface for PDB symbol types ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_IPDBRAWSYMBOL_H -#define LLVM_DEBUGINFO_PDB_IPDBRAWSYMBOL_H - -#include "PDBTypes.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include - -namespace llvm { -class raw_ostream; - -namespace pdb { - -/// IPDBRawSymbol defines an interface used to represent an arbitrary symbol. -/// It exposes a monolithic interface consisting of accessors for the union of -/// all properties that are valid for any symbol type. This interface is then -/// wrapped by a concrete class which exposes only those set of methods valid -/// for this particular symbol type. See PDBSymbol.h for more details. -class IPDBRawSymbol { -public: - virtual ~IPDBRawSymbol(); - - virtual void dump(raw_ostream &OS, int Indent) const = 0; - - virtual std::unique_ptr - findChildren(PDB_SymType Type) const = 0; - - virtual std::unique_ptr - findChildren(PDB_SymType Type, StringRef Name, - PDB_NameSearchFlags Flags) const = 0; - virtual std::unique_ptr - findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, - uint32_t RVA) const = 0; - virtual std::unique_ptr - findInlineFramesByRVA(uint32_t RVA) const = 0; - - virtual void getDataBytes(llvm::SmallVector &bytes) const = 0; - virtual void getBackEndVersion(VersionInfo &Version) const = 0; - virtual PDB_MemberAccess getAccess() const = 0; - virtual uint32_t getAddressOffset() const = 0; - virtual uint32_t getAddressSection() const = 0; - virtual uint32_t getAge() const = 0; - virtual uint32_t getArrayIndexTypeId() const = 0; - virtual uint32_t getBaseDataOffset() const = 0; - virtual uint32_t getBaseDataSlot() const = 0; - virtual uint32_t getBaseSymbolId() const = 0; - virtual PDB_BuiltinType getBuiltinType() const = 0; - virtual uint32_t getBitPosition() const = 0; - virtual PDB_CallingConv getCallingConvention() const = 0; - virtual uint32_t getClassParentId() const = 0; - virtual std::string getCompilerName() const = 0; - virtual uint32_t getCount() const = 0; - virtual uint32_t getCountLiveRanges() const = 0; - virtual void getFrontEndVersion(VersionInfo &Version) const = 0; - virtual PDB_Lang getLanguage() const = 0; - virtual uint32_t getLexicalParentId() const = 0; - virtual std::string getLibraryName() const = 0; - virtual uint32_t getLiveRangeStartAddressOffset() const = 0; - virtual uint32_t getLiveRangeStartAddressSection() const = 0; - virtual uint32_t getLiveRangeStartRelativeVirtualAddress() const = 0; - virtual codeview::RegisterId getLocalBasePointerRegisterId() const = 0; - virtual uint32_t getLowerBoundId() const = 0; - virtual uint32_t getMemorySpaceKind() const = 0; - virtual std::string getName() const = 0; - virtual uint32_t getNumberOfAcceleratorPointerTags() const = 0; - virtual uint32_t getNumberOfColumns() const = 0; - virtual uint32_t getNumberOfModifiers() const = 0; - virtual uint32_t getNumberOfRegisterIndices() const = 0; - virtual uint32_t getNumberOfRows() const = 0; - virtual std::string getObjectFileName() const = 0; - virtual uint32_t getOemId() const = 0; - virtual uint32_t getOemSymbolId() const = 0; - virtual uint32_t getOffsetInUdt() const = 0; - virtual PDB_Cpu getPlatform() const = 0; - virtual uint32_t getRank() const = 0; - virtual codeview::RegisterId getRegisterId() const = 0; - virtual uint32_t getRegisterType() const = 0; - virtual uint32_t getRelativeVirtualAddress() const = 0; - virtual uint32_t getSamplerSlot() const = 0; - virtual uint32_t getSignature() const = 0; - virtual uint32_t getSizeInUdt() const = 0; - virtual uint32_t getSlot() const = 0; - virtual std::string getSourceFileName() const = 0; - virtual uint32_t getStride() const = 0; - virtual uint32_t getSubTypeId() const = 0; - virtual std::string getSymbolsFileName() const = 0; - virtual uint32_t getSymIndexId() const = 0; - virtual uint32_t getTargetOffset() const = 0; - virtual uint32_t getTargetRelativeVirtualAddress() const = 0; - virtual uint64_t getTargetVirtualAddress() const = 0; - virtual uint32_t getTargetSection() const = 0; - virtual uint32_t getTextureSlot() const = 0; - virtual uint32_t getTimeStamp() const = 0; - virtual uint32_t getToken() const = 0; - virtual uint32_t getTypeId() const = 0; - virtual uint32_t getUavSlot() const = 0; - virtual std::string getUndecoratedName() const = 0; - virtual uint32_t getUnmodifiedTypeId() const = 0; - virtual uint32_t getUpperBoundId() const = 0; - virtual Variant getValue() const = 0; - virtual uint32_t getVirtualBaseDispIndex() const = 0; - virtual uint32_t getVirtualBaseOffset() const = 0; - virtual uint32_t getVirtualTableShapeId() const = 0; - virtual PDB_DataKind getDataKind() const = 0; - virtual PDB_SymType getSymTag() const = 0; - virtual PDB_UniqueId getGuid() const = 0; - virtual int32_t getOffset() const = 0; - virtual int32_t getThisAdjust() const = 0; - virtual int32_t getVirtualBasePointerOffset() const = 0; - virtual PDB_LocType getLocationType() const = 0; - virtual PDB_Machine getMachineType() const = 0; - virtual codeview::ThunkOrdinal getThunkOrdinal() const = 0; - virtual uint64_t getLength() const = 0; - virtual uint64_t getLiveRangeLength() const = 0; - virtual uint64_t getVirtualAddress() const = 0; - virtual PDB_UdtType getUdtKind() const = 0; - virtual bool hasConstructor() const = 0; - virtual bool hasCustomCallingConvention() const = 0; - virtual bool hasFarReturn() const = 0; - virtual bool isCode() const = 0; - virtual bool isCompilerGenerated() const = 0; - virtual bool isConstType() const = 0; - virtual bool isEditAndContinueEnabled() const = 0; - virtual bool isFunction() const = 0; - virtual bool getAddressTaken() const = 0; - virtual bool getNoStackOrdering() const = 0; - virtual bool hasAlloca() const = 0; - virtual bool hasAssignmentOperator() const = 0; - virtual bool hasCTypes() const = 0; - virtual bool hasCastOperator() const = 0; - virtual bool hasDebugInfo() const = 0; - virtual bool hasEH() const = 0; - virtual bool hasEHa() const = 0; - virtual bool hasFramePointer() const = 0; - virtual bool hasInlAsm() const = 0; - virtual bool hasInlineAttribute() const = 0; - virtual bool hasInterruptReturn() const = 0; - virtual bool hasLongJump() const = 0; - virtual bool hasManagedCode() const = 0; - virtual bool hasNestedTypes() const = 0; - virtual bool hasNoInlineAttribute() const = 0; - virtual bool hasNoReturnAttribute() const = 0; - virtual bool hasOptimizedCodeDebugInfo() const = 0; - virtual bool hasOverloadedOperator() const = 0; - virtual bool hasSEH() const = 0; - virtual bool hasSecurityChecks() const = 0; - virtual bool hasSetJump() const = 0; - virtual bool hasStrictGSCheck() const = 0; - virtual bool isAcceleratorGroupSharedLocal() const = 0; - virtual bool isAcceleratorPointerTagLiveRange() const = 0; - virtual bool isAcceleratorStubFunction() const = 0; - virtual bool isAggregated() const = 0; - virtual bool isIntroVirtualFunction() const = 0; - virtual bool isCVTCIL() const = 0; - virtual bool isConstructorVirtualBase() const = 0; - virtual bool isCxxReturnUdt() const = 0; - virtual bool isDataAligned() const = 0; - virtual bool isHLSLData() const = 0; - virtual bool isHotpatchable() const = 0; - virtual bool isIndirectVirtualBaseClass() const = 0; - virtual bool isInterfaceUdt() const = 0; - virtual bool isIntrinsic() const = 0; - virtual bool isLTCG() const = 0; - virtual bool isLocationControlFlowDependent() const = 0; - virtual bool isMSILNetmodule() const = 0; - virtual bool isMatrixRowMajor() const = 0; - virtual bool isManagedCode() const = 0; - virtual bool isMSILCode() const = 0; - virtual bool isMultipleInheritance() const = 0; - virtual bool isNaked() const = 0; - virtual bool isNested() const = 0; - virtual bool isOptimizedAway() const = 0; - virtual bool isPacked() const = 0; - virtual bool isPointerBasedOnSymbolValue() const = 0; - virtual bool isPointerToDataMember() const = 0; - virtual bool isPointerToMemberFunction() const = 0; - virtual bool isPureVirtual() const = 0; - virtual bool isRValueReference() const = 0; - virtual bool isRefUdt() const = 0; - virtual bool isReference() const = 0; - virtual bool isRestrictedType() const = 0; - virtual bool isReturnValue() const = 0; - virtual bool isSafeBuffers() const = 0; - virtual bool isScoped() const = 0; - virtual bool isSdl() const = 0; - virtual bool isSingleInheritance() const = 0; - virtual bool isSplitted() const = 0; - virtual bool isStatic() const = 0; - virtual bool hasPrivateSymbols() const = 0; - virtual bool isUnalignedType() const = 0; - virtual bool isUnreached() const = 0; - virtual bool isValueUdt() const = 0; - virtual bool isVirtual() const = 0; - virtual bool isVirtualBaseClass() const = 0; - virtual bool isVirtualInheritance() const = 0; - virtual bool isVolatileType() const = 0; - virtual bool wasInlined() const = 0; - virtual std::string getUnused() const = 0; -}; - -} // namespace pdb -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h b/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h deleted file mode 100644 index 3d2c37ef..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h +++ /dev/null @@ -1,81 +0,0 @@ -//===- IPDBSession.h - base interface for a PDB symbol context --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_IPDBSESSION_H -#define LLVM_DEBUGINFO_PDB_IPDBSESSION_H - -#include "PDBTypes.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Casting.h" -#include - -namespace llvm { -namespace pdb { -class PDBSymbolCompiland; -class PDBSymbolExe; - -/// IPDBSession defines an interface used to provide a context for querying -/// debug information from a debug data source (for example, a PDB). -class IPDBSession { -public: - virtual ~IPDBSession(); - - virtual uint64_t getLoadAddress() const = 0; - virtual void setLoadAddress(uint64_t Address) = 0; - virtual std::unique_ptr getGlobalScope() const = 0; - virtual std::unique_ptr getSymbolById(uint32_t SymbolId) const = 0; - - template - std::unique_ptr getConcreteSymbolById(uint32_t SymbolId) const { - auto Symbol(getSymbolById(SymbolId)); - if (!Symbol) - return nullptr; - - T *ConcreteSymbol = dyn_cast(Symbol.get()); - if (!ConcreteSymbol) - return nullptr; - Symbol.release(); - return std::unique_ptr(ConcreteSymbol); - } - - virtual std::unique_ptr - findSymbolByAddress(uint64_t Address, PDB_SymType Type) const = 0; - - virtual std::unique_ptr - findLineNumbers(const PDBSymbolCompiland &Compiland, - const IPDBSourceFile &File) const = 0; - virtual std::unique_ptr - findLineNumbersByAddress(uint64_t Address, uint32_t Length) const = 0; - - virtual std::unique_ptr - findSourceFiles(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const = 0; - virtual std::unique_ptr - findOneSourceFile(const PDBSymbolCompiland *Compiland, - llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const = 0; - virtual std::unique_ptr> - findCompilandsForSourceFile(llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const = 0; - virtual std::unique_ptr - findOneCompilandForSourceFile(llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const = 0; - - virtual std::unique_ptr getAllSourceFiles() const = 0; - virtual std::unique_ptr - getSourceFilesForCompiland(const PDBSymbolCompiland &Compiland) const = 0; - virtual std::unique_ptr - getSourceFileById(uint32_t FileId) const = 0; - - virtual std::unique_ptr getDebugStreams() const = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h b/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h deleted file mode 100644 index 3676c403..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h +++ /dev/null @@ -1,40 +0,0 @@ -//===- IPDBSourceFile.h - base interface for a PDB source file --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_IPDBSOURCEFILE_H -#define LLVM_DEBUGINFO_PDB_IPDBSOURCEFILE_H - -#include "PDBTypes.h" -#include -#include - -namespace llvm { -class raw_ostream; - -namespace pdb { - -/// IPDBSourceFile defines an interface used to represent source files whose -/// information are stored in the PDB. -class IPDBSourceFile { -public: - virtual ~IPDBSourceFile(); - - void dump(raw_ostream &OS, int Indent) const; - - virtual std::string getFileName() const = 0; - virtual uint32_t getUniqueId() const = 0; - virtual std::string getChecksum() const = 0; - virtual PDB_Checksum getChecksumType() const = 0; - virtual std::unique_ptr> - getCompilands() const = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/PDB.h b/llvm/include/llvm/DebugInfo/PDB/PDB.h deleted file mode 100644 index 1f5a066b..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDB.h +++ /dev/null @@ -1,30 +0,0 @@ -//===- PDB.h - base header file for creating a PDB reader -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDB_H -#define LLVM_DEBUGINFO_PDB_PDB_H - -#include "PDBTypes.h" -#include "llvm/Support/Error.h" -#include -#include - -namespace llvm { -class StringRef; - -namespace pdb { - -Error loadDataForPDB(PDB_ReaderType Type, StringRef Path, - std::unique_ptr &Session); - -Error loadDataForEXE(PDB_ReaderType Type, StringRef Path, - std::unique_ptr &Session); -} -} -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBContext.h b/llvm/include/llvm/DebugInfo/PDB/PDBContext.h deleted file mode 100644 index 836e3924..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBContext.h +++ /dev/null @@ -1,62 +0,0 @@ -//===-- PDBContext.h --------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===/ - -#ifndef LLVM_DEBUGINFO_PDB_PDBCONTEXT_H -#define LLVM_DEBUGINFO_PDB_PDBCONTEXT_H - -#include "llvm/DebugInfo/DIContext.h" -#include "llvm/DebugInfo/PDB/IPDBSession.h" - -namespace llvm { - -namespace object { -class COFFObjectFile; - } - - namespace pdb { - /// PDBContext - /// This data structure is the top level entity that deals with PDB debug - /// information parsing. This data structure exists only when there is a - /// need for a transparent interface to different debug information formats - /// (e.g. PDB and DWARF). More control and power over the debug information - /// access can be had by using the PDB interfaces directly. - class PDBContext : public DIContext { - - PDBContext(PDBContext &) = delete; - PDBContext &operator=(PDBContext &) = delete; - - public: - PDBContext(const object::COFFObjectFile &Object, - std::unique_ptr PDBSession); - - static bool classof(const DIContext *DICtx) { - return DICtx->getKind() == CK_PDB; - } - - void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All, - bool DumpEH = false) override; - - DILineInfo getLineInfoForAddress( - uint64_t Address, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; - DILineInfoTable getLineInfoForAddressRange( - uint64_t Address, uint64_t Size, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; - DIInliningInfo getInliningInfoForAddress( - uint64_t Address, - DILineInfoSpecifier Specifier = DILineInfoSpecifier()) override; - - private: - std::string getFunctionName(uint64_t Address, DINameKind NameKind) const; - std::unique_ptr Session; - }; - } -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h b/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h deleted file mode 100644 index 5a7422d9..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h +++ /dev/null @@ -1,43 +0,0 @@ -//===- PDBExtras.h - helper functions and classes for PDBs -------*- C++-*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBEXTRAS_H -#define LLVM_DEBUGINFO_PDB_PDBEXTRAS_H - -#include "PDBTypes.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include "llvm/Support/raw_ostream.h" -#include - -namespace llvm { - -namespace pdb { -typedef std::unordered_map TagStats; - -raw_ostream &operator<<(raw_ostream &OS, const PDB_VariantType &Value); -raw_ostream &operator<<(raw_ostream &OS, const PDB_CallingConv &Conv); -raw_ostream &operator<<(raw_ostream &OS, const PDB_DataKind &Data); -raw_ostream &operator<<(raw_ostream &OS, const codeview::RegisterId &Reg); -raw_ostream &operator<<(raw_ostream &OS, const PDB_LocType &Loc); -raw_ostream &operator<<(raw_ostream &OS, const codeview::ThunkOrdinal &Thunk); -raw_ostream &operator<<(raw_ostream &OS, const PDB_Checksum &Checksum); -raw_ostream &operator<<(raw_ostream &OS, const PDB_Lang &Lang); -raw_ostream &operator<<(raw_ostream &OS, const PDB_SymType &Tag); -raw_ostream &operator<<(raw_ostream &OS, const PDB_MemberAccess &Access); -raw_ostream &operator<<(raw_ostream &OS, const PDB_UdtType &Type); -raw_ostream &operator<<(raw_ostream &OS, const PDB_UniqueId &Id); -raw_ostream &operator<<(raw_ostream &OS, const PDB_Machine &Machine); - -raw_ostream &operator<<(raw_ostream &OS, const Variant &Value); -raw_ostream &operator<<(raw_ostream &OS, const VersionInfo &Version); -raw_ostream &operator<<(raw_ostream &OS, const TagStats &Stats); -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymDumper.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymDumper.h deleted file mode 100644 index 095c33cf..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymDumper.h +++ /dev/null @@ -1,63 +0,0 @@ -//===- PDBSymDumper.h - base interface for PDB symbol dumper *- C++ -----*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMDUMPER_H -#define LLVM_DEBUGINFO_PDB_PDBSYMDUMPER_H - -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymDumper { -public: - PDBSymDumper(bool ShouldRequireImpl); - virtual ~PDBSymDumper(); - - virtual void dump(const PDBSymbolAnnotation &Symbol); - virtual void dump(const PDBSymbolBlock &Symbol); - virtual void dump(const PDBSymbolCompiland &Symbol); - virtual void dump(const PDBSymbolCompilandDetails &Symbol); - virtual void dump(const PDBSymbolCompilandEnv &Symbol); - virtual void dump(const PDBSymbolCustom &Symbol); - virtual void dump(const PDBSymbolData &Symbol); - virtual void dump(const PDBSymbolExe &Symbol); - virtual void dump(const PDBSymbolFunc &Symbol); - virtual void dump(const PDBSymbolFuncDebugEnd &Symbol); - virtual void dump(const PDBSymbolFuncDebugStart &Symbol); - virtual void dump(const PDBSymbolLabel &Symbol); - virtual void dump(const PDBSymbolPublicSymbol &Symbol); - virtual void dump(const PDBSymbolThunk &Symbol); - virtual void dump(const PDBSymbolTypeArray &Symbol); - virtual void dump(const PDBSymbolTypeBaseClass &Symbol); - virtual void dump(const PDBSymbolTypeBuiltin &Symbol); - virtual void dump(const PDBSymbolTypeCustom &Symbol); - virtual void dump(const PDBSymbolTypeDimension &Symbol); - virtual void dump(const PDBSymbolTypeEnum &Symbol); - virtual void dump(const PDBSymbolTypeFriend &Symbol); - virtual void dump(const PDBSymbolTypeFunctionArg &Symbol); - virtual void dump(const PDBSymbolTypeFunctionSig &Symbol); - virtual void dump(const PDBSymbolTypeManaged &Symbol); - virtual void dump(const PDBSymbolTypePointer &Symbol); - virtual void dump(const PDBSymbolTypeTypedef &Symbol); - virtual void dump(const PDBSymbolTypeUDT &Symbol); - virtual void dump(const PDBSymbolTypeVTable &Symbol); - virtual void dump(const PDBSymbolTypeVTableShape &Symbol); - virtual void dump(const PDBSymbolUnknown &Symbol); - virtual void dump(const PDBSymbolUsingNamespace &Symbol); - -private: - bool RequireImpl; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h deleted file mode 100644 index bf511880..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h +++ /dev/null @@ -1,101 +0,0 @@ -//===- PDBSymbol.h - base class for user-facing symbol types -----*- C++-*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_IPDBSYMBOL_H -#define LLVM_DEBUGINFO_PDB_IPDBSYMBOL_H - -#include "ConcreteSymbolEnumerator.h" -#include "IPDBRawSymbol.h" -#include "PDBExtras.h" -#include "PDBTypes.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Casting.h" - -#define FORWARD_SYMBOL_METHOD(MethodName) \ - auto MethodName() const->decltype(RawSymbol->MethodName()) { \ - return RawSymbol->MethodName(); \ - } - -namespace llvm { - -class StringRef; -class raw_ostream; - -namespace pdb { -class IPDBRawSymbol; - -#define DECLARE_PDB_SYMBOL_CONCRETE_TYPE(TagValue) \ - static const PDB_SymType Tag = TagValue; \ - static bool classof(const PDBSymbol *S) { return S->getSymTag() == Tag; } - -/// PDBSymbol defines the base of the inheritance hierarchy for concrete symbol -/// types (e.g. functions, executables, vtables, etc). All concrete symbol -/// types inherit from PDBSymbol and expose the exact set of methods that are -/// valid for that particular symbol type, as described in the Microsoft -/// reference "Lexical and Class Hierarchy of Symbol Types": -/// https://msdn.microsoft.com/en-us/library/370hs6k4.aspx -class PDBSymbol { -protected: - PDBSymbol(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - -public: - static std::unique_ptr - create(const IPDBSession &PDBSession, std::unique_ptr Symbol); - - virtual ~PDBSymbol(); - - /// Dumps the contents of a symbol a raw_ostream. By default this will just - /// call dump() on the underlying RawSymbol, which allows us to discover - /// unknown properties, but individual implementations of PDBSymbol may - /// override the behavior to only dump known fields. - virtual void dump(PDBSymDumper &Dumper) const = 0; - void defaultDump(raw_ostream &OS, int Indent) const; - - PDB_SymType getSymTag() const; - uint32_t getSymIndexId() const; - - template std::unique_ptr findOneChild() const { - auto Enumerator(findAllChildren()); - return Enumerator->getNext(); - } - - template - std::unique_ptr> findAllChildren() const { - auto BaseIter = RawSymbol->findChildren(T::Tag); - return llvm::make_unique>(std::move(BaseIter)); - } - std::unique_ptr findAllChildren(PDB_SymType Type) const; - std::unique_ptr findAllChildren() const; - - std::unique_ptr - findChildren(PDB_SymType Type, StringRef Name, - PDB_NameSearchFlags Flags) const; - std::unique_ptr findChildrenByRVA(PDB_SymType Type, - StringRef Name, - PDB_NameSearchFlags Flags, - uint32_t RVA) const; - std::unique_ptr findInlineFramesByRVA(uint32_t RVA) const; - - const IPDBRawSymbol &getRawSymbol() const { return *RawSymbol; } - IPDBRawSymbol &getRawSymbol() { return *RawSymbol; } - - const IPDBSession &getSession() const { return Session; } - - std::unique_ptr getChildStats(TagStats &Stats) const; - -protected: - const IPDBSession &Session; - const std::unique_ptr RawSymbol; -}; - -} // namespace llvm -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h deleted file mode 100644 index 3169146e..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h +++ /dev/null @@ -1,39 +0,0 @@ -//===- PDBSymbolAnnotation.h - Accessors for querying PDB annotations ---*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLANNOTATION_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLANNOTATION_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolAnnotation : public PDBSymbol { -public: - PDBSymbolAnnotation(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Annotation) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(getDataKind) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - // FORWARD_SYMBOL_METHOD(getValue) - FORWARD_SYMBOL_METHOD(getVirtualAddress) -}; -} -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLANNOTATION_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h deleted file mode 100644 index d0ff62ca..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h +++ /dev/null @@ -1,42 +0,0 @@ -//===- PDBSymbolBlock.h - Accessors for querying PDB blocks -------------*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLBLOCK_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLBLOCK_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; - -namespace pdb { - -class PDBSymbolBlock : public PDBSymbol { -public: - PDBSymbolBlock(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Block) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getLocationType) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getVirtualAddress) -}; -} -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLBLOCK_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h deleted file mode 100644 index f1983b3f..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h +++ /dev/null @@ -1,41 +0,0 @@ -//===- PDBSymbolCompiland.h - Accessors for querying PDB compilands -----*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILAND_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILAND_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" -#include - -namespace llvm { - -class raw_ostream; - -namespace pdb { - -class PDBSymbolCompiland : public PDBSymbol { -public: - PDBSymbolCompiland(const IPDBSession &PDBSession, - std::unique_ptr CompilandSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Compiland) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getLibraryName) - FORWARD_SYMBOL_METHOD(getName) - - std::string getSourceFileName() const; -}; -} -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILAND_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h deleted file mode 100644 index bb4a78f6..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h +++ /dev/null @@ -1,57 +0,0 @@ -//===- PDBSymbolCompilandDetails.h - PDB compiland details ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDDETAILS_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDDETAILS_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolCompilandDetails : public PDBSymbol { -public: - PDBSymbolCompilandDetails(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CompilandDetails) - - void dump(PDBSymDumper &Dumper) const override; - - void getFrontEndVersion(VersionInfo &Version) const { - RawSymbol->getFrontEndVersion(Version); - } - - void getBackEndVersion(VersionInfo &Version) const { - RawSymbol->getBackEndVersion(Version); - } - - FORWARD_SYMBOL_METHOD(getCompilerName) - FORWARD_SYMBOL_METHOD(isEditAndContinueEnabled) - FORWARD_SYMBOL_METHOD(hasDebugInfo) - FORWARD_SYMBOL_METHOD(hasManagedCode) - FORWARD_SYMBOL_METHOD(hasSecurityChecks) - FORWARD_SYMBOL_METHOD(isCVTCIL) - FORWARD_SYMBOL_METHOD(isDataAligned) - FORWARD_SYMBOL_METHOD(isHotpatchable) - FORWARD_SYMBOL_METHOD(isLTCG) - FORWARD_SYMBOL_METHOD(isMSILNetmodule) - FORWARD_SYMBOL_METHOD(getLanguage) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getPlatform) - FORWARD_SYMBOL_METHOD(getSourceFileName) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBFUNCTION_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h deleted file mode 100644 index a71a0ba2..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h +++ /dev/null @@ -1,37 +0,0 @@ -//===- PDBSymbolCompilandEnv.h - compiland environment variables *- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDENV_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDENV_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { -class PDBSymbolCompilandEnv : public PDBSymbol { -public: - PDBSymbolCompilandEnv(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CompilandEnv) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getName) - std::string getValue() const; -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCOMPILANDENV_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h deleted file mode 100644 index 54f08940..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h +++ /dev/null @@ -1,40 +0,0 @@ -//===- PDBSymbolCustom.h - compiler-specific types --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" -#include "llvm/ADT/SmallVector.h" - -namespace llvm { - -class raw_ostream; - -namespace pdb { -/// PDBSymbolCustom represents symbols that are compiler-specific and do not -/// fit anywhere else in the lexical hierarchy. -/// https://msdn.microsoft.com/en-us/library/d88sf09h.aspx -class PDBSymbolCustom : public PDBSymbol { -public: - PDBSymbolCustom(const IPDBSession &PDBSession, - std::unique_ptr CustomSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Custom) - - void dump(PDBSymDumper &Dumper) const override; - - void getDataBytes(llvm::SmallVector &bytes); -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLCUSTOM_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h deleted file mode 100644 index 36f32ab5..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h +++ /dev/null @@ -1,63 +0,0 @@ -//===- PDBSymbolData.h - PDB data (e.g. variable) accessors -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLDATA_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLDATA_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; - -namespace pdb { - -class PDBSymbolData : public PDBSymbol { -public: - PDBSymbolData(const IPDBSession &PDBSession, - std::unique_ptr DataSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Data) - - std::unique_ptr getType() const; - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAccess) - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(getAddressTaken) - FORWARD_SYMBOL_METHOD(getBitPosition) - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(isCompilerGenerated) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(getDataKind) - FORWARD_SYMBOL_METHOD(isAggregated) - FORWARD_SYMBOL_METHOD(isSplitted) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getLocationType) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(getOffset) - FORWARD_SYMBOL_METHOD(getRegisterId) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getSlot) - FORWARD_SYMBOL_METHOD(getToken) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(getValue) - FORWARD_SYMBOL_METHOD(getVirtualAddress) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLDATA_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h deleted file mode 100644 index 5b3f50d1..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h +++ /dev/null @@ -1,47 +0,0 @@ -//===- PDBSymbolExe.h - Accessors for querying executables in a PDB ----*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; - -namespace pdb { - -class PDBSymbolExe : public PDBSymbol { -public: - PDBSymbolExe(const IPDBSession &PDBSession, - std::unique_ptr ExeSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Exe) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAge) - FORWARD_SYMBOL_METHOD(getGuid) - FORWARD_SYMBOL_METHOD(hasCTypes) - FORWARD_SYMBOL_METHOD(hasPrivateSymbols) - FORWARD_SYMBOL_METHOD(getMachineType) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(getSignature) - FORWARD_SYMBOL_METHOD(getSymbolsFileName) - -private: - void dumpChildren(raw_ostream &OS, StringRef Label, PDB_SymType ChildType, - int Indent) const; -}; -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLEXE_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h deleted file mode 100644 index 7170bcbe..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h +++ /dev/null @@ -1,82 +0,0 @@ -//===- PDBSymbolFunc.h - class representing a function instance -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; - -namespace pdb { - -class PDBSymbolFunc : public PDBSymbol { -public: - PDBSymbolFunc(const IPDBSession &PDBSession, - std::unique_ptr FuncSymbol); - - void dump(PDBSymDumper &Dumper) const override; - - std::unique_ptr getSignature() const; - std::unique_ptr getClassParent() const; - std::unique_ptr> getArguments() const; - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Function) - - FORWARD_SYMBOL_METHOD(getAccess) - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(isCompilerGenerated) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(hasCustomCallingConvention) - FORWARD_SYMBOL_METHOD(hasFarReturn) - FORWARD_SYMBOL_METHOD(hasAlloca) - FORWARD_SYMBOL_METHOD(hasEH) - FORWARD_SYMBOL_METHOD(hasEHa) - FORWARD_SYMBOL_METHOD(hasInlAsm) - FORWARD_SYMBOL_METHOD(hasLongJump) - FORWARD_SYMBOL_METHOD(hasSEH) - FORWARD_SYMBOL_METHOD(hasSecurityChecks) - FORWARD_SYMBOL_METHOD(hasSetJump) - FORWARD_SYMBOL_METHOD(hasInterruptReturn) - FORWARD_SYMBOL_METHOD(isIntroVirtualFunction) - FORWARD_SYMBOL_METHOD(hasInlineAttribute) - FORWARD_SYMBOL_METHOD(isNaked) - FORWARD_SYMBOL_METHOD(isStatic) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getLocalBasePointerRegisterId) - FORWARD_SYMBOL_METHOD(getLocationType) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(hasFramePointer) - FORWARD_SYMBOL_METHOD(hasNoInlineAttribute) - FORWARD_SYMBOL_METHOD(hasNoReturnAttribute) - FORWARD_SYMBOL_METHOD(isUnreached) - FORWARD_SYMBOL_METHOD(getNoStackOrdering) - FORWARD_SYMBOL_METHOD(hasOptimizedCodeDebugInfo) - FORWARD_SYMBOL_METHOD(isPureVirtual) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getToken) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(getUndecoratedName) - FORWARD_SYMBOL_METHOD(isVirtual) - FORWARD_SYMBOL_METHOD(getVirtualAddress) - FORWARD_SYMBOL_METHOD(getVirtualBaseOffset) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h deleted file mode 100644 index 46438950..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h +++ /dev/null @@ -1,51 +0,0 @@ -//===- PDBSymbolFuncDebugEnd.h - function end bounds info -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGEND_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGEND_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; - -namespace pdb { - -class PDBSymbolFuncDebugEnd : public PDBSymbol { -public: - PDBSymbolFuncDebugEnd(const IPDBSession &PDBSession, - std::unique_ptr FuncDebugEndSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FuncDebugEnd) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(hasCustomCallingConvention) - FORWARD_SYMBOL_METHOD(hasFarReturn) - FORWARD_SYMBOL_METHOD(hasInterruptReturn) - FORWARD_SYMBOL_METHOD(isStatic) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getLocationType) - FORWARD_SYMBOL_METHOD(hasNoInlineAttribute) - FORWARD_SYMBOL_METHOD(hasNoReturnAttribute) - FORWARD_SYMBOL_METHOD(isUnreached) - FORWARD_SYMBOL_METHOD(getOffset) - FORWARD_SYMBOL_METHOD(hasOptimizedCodeDebugInfo) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getVirtualAddress) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGEND_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h deleted file mode 100644 index c2e3dd39..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h +++ /dev/null @@ -1,50 +0,0 @@ -//===- PDBSymbolFuncDebugStart.h - function start bounds info ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGSTART_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGSTART_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolFuncDebugStart : public PDBSymbol { -public: - PDBSymbolFuncDebugStart(const IPDBSession &PDBSession, - std::unique_ptr FuncDebugStartSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FuncDebugStart) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(hasCustomCallingConvention) - FORWARD_SYMBOL_METHOD(hasFarReturn) - FORWARD_SYMBOL_METHOD(hasInterruptReturn) - FORWARD_SYMBOL_METHOD(isStatic) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getLocationType) - FORWARD_SYMBOL_METHOD(hasNoInlineAttribute) - FORWARD_SYMBOL_METHOD(hasNoReturnAttribute) - FORWARD_SYMBOL_METHOD(isUnreached) - FORWARD_SYMBOL_METHOD(getOffset) - FORWARD_SYMBOL_METHOD(hasOptimizedCodeDebugInfo) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getVirtualAddress) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNCDEBUGSTART_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h deleted file mode 100644 index 3aeae10b..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h +++ /dev/null @@ -1,50 +0,0 @@ -//===- PDBSymbolLabel.h - label info ----------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLLABEL_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLLABEL_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolLabel : public PDBSymbol { -public: - PDBSymbolLabel(const IPDBSession &PDBSession, - std::unique_ptr LabelSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Label) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(hasCustomCallingConvention) - FORWARD_SYMBOL_METHOD(hasFarReturn) - FORWARD_SYMBOL_METHOD(hasInterruptReturn) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getLocationType) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(hasNoInlineAttribute) - FORWARD_SYMBOL_METHOD(hasNoReturnAttribute) - FORWARD_SYMBOL_METHOD(isUnreached) - FORWARD_SYMBOL_METHOD(getOffset) - FORWARD_SYMBOL_METHOD(hasOptimizedCodeDebugInfo) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getVirtualAddress) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLLABEL_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h deleted file mode 100644 index be073444..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h +++ /dev/null @@ -1,48 +0,0 @@ -//===- PDBSymbolPublicSymbol.h - public symbol info -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLPUBLICSYMBOL_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLPUBLICSYMBOL_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolPublicSymbol : public PDBSymbol { -public: - PDBSymbolPublicSymbol(const IPDBSession &PDBSession, - std::unique_ptr PublicSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::PublicSymbol) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(isCode) - FORWARD_SYMBOL_METHOD(isFunction) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getLocationType) - FORWARD_SYMBOL_METHOD(isManagedCode) - FORWARD_SYMBOL_METHOD(isMSILCode) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getVirtualAddress) - FORWARD_SYMBOL_METHOD(getUndecoratedName) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLPUBLICSYMBOL_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h deleted file mode 100644 index 63f7a09f..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h +++ /dev/null @@ -1,57 +0,0 @@ -//===- PDBSymbolThunk.h - Support for querying PDB thunks ---------------*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolThunk : public PDBSymbol { -public: - PDBSymbolThunk(const IPDBSession &PDBSession, - std::unique_ptr ThunkSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Thunk) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAccess) - FORWARD_SYMBOL_METHOD(getAddressOffset) - FORWARD_SYMBOL_METHOD(getAddressSection) - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(isIntroVirtualFunction) - FORWARD_SYMBOL_METHOD(isStatic) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(isPureVirtual) - FORWARD_SYMBOL_METHOD(getRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getTargetOffset) - FORWARD_SYMBOL_METHOD(getTargetRelativeVirtualAddress) - FORWARD_SYMBOL_METHOD(getTargetVirtualAddress) - FORWARD_SYMBOL_METHOD(getTargetSection) - FORWARD_SYMBOL_METHOD(getThunkOrdinal) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(isVirtual) - FORWARD_SYMBOL_METHOD(getVirtualAddress) - FORWARD_SYMBOL_METHOD(getVirtualBaseOffset) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTHUNK_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h deleted file mode 100644 index 57db0366..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h +++ /dev/null @@ -1,46 +0,0 @@ -//===- PDBSymbolTypeArray.h - array type information ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEARRAY_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEARRAY_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeArray : public PDBSymbol { -public: - PDBSymbolTypeArray(const IPDBSession &PDBSession, - std::unique_ptr ArrayTypeSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::ArrayType) - - std::unique_ptr getElementType() const; - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getArrayIndexTypeId) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(getCount) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getRank) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEARRAY_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h deleted file mode 100644 index aaa3ab79..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h +++ /dev/null @@ -1,61 +0,0 @@ -//===- PDBSymbolTypeBaseClass.h - base class type information ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBASECLASS_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBASECLASS_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeBaseClass : public PDBSymbol { -public: - PDBSymbolTypeBaseClass(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::BaseClass) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getAccess) - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(hasConstructor) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(hasAssignmentOperator) - FORWARD_SYMBOL_METHOD(hasCastOperator) - FORWARD_SYMBOL_METHOD(hasNestedTypes) - FORWARD_SYMBOL_METHOD(isIndirectVirtualBaseClass) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(isNested) - FORWARD_SYMBOL_METHOD(getOffset) - FORWARD_SYMBOL_METHOD(hasOverloadedOperator) - FORWARD_SYMBOL_METHOD(isPacked) - FORWARD_SYMBOL_METHOD(isScoped) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(getUdtKind) - FORWARD_SYMBOL_METHOD(isUnalignedType) - - FORWARD_SYMBOL_METHOD(isVirtualBaseClass) - FORWARD_SYMBOL_METHOD(getVirtualBaseDispIndex) - FORWARD_SYMBOL_METHOD(getVirtualBasePointerOffset) - // FORWARD_SYMBOL_METHOD(getVirtualBaseTableType) - FORWARD_SYMBOL_METHOD(getVirtualTableShapeId) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBASECLASS_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h deleted file mode 100644 index c8f59f1f..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h +++ /dev/null @@ -1,41 +0,0 @@ -//===- PDBSymbolTypeBuiltin.h - builtin type information --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBUILTIN_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBUILTIN_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeBuiltin : public PDBSymbol { -public: - PDBSymbolTypeBuiltin(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::BuiltinType) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getBuiltinType) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEBUILTIN_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h deleted file mode 100644 index 199b3f8b..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h +++ /dev/null @@ -1,37 +0,0 @@ -//===- PDBSymbolTypeCustom.h - custom compiler type information -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPECUSTOM_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPECUSTOM_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeCustom : public PDBSymbol { -public: - PDBSymbolTypeCustom(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::CustomType) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getOemId) - FORWARD_SYMBOL_METHOD(getOemSymbolId) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPECUSTOM_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h deleted file mode 100644 index e635eb5b..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h +++ /dev/null @@ -1,37 +0,0 @@ -//===- PDBSymbolTypeDimension.h - array dimension type info -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEDIMENSION_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEDIMENSION_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeDimension : public PDBSymbol { -public: - PDBSymbolTypeDimension(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Dimension) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getLowerBoundId) - FORWARD_SYMBOL_METHOD(getUpperBoundId) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEDIMENSION_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h deleted file mode 100644 index ade2887b..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h +++ /dev/null @@ -1,56 +0,0 @@ -//===- PDBSymbolTypeEnum.h - enum type info ---------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEENUM_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEENUM_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeEnum : public PDBSymbol { -public: - PDBSymbolTypeEnum(const IPDBSession &PDBSession, - std::unique_ptr EnumTypeSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Enum) - - void dump(PDBSymDumper &Dumper) const override; - - std::unique_ptr getClassParent() const; - std::unique_ptr getUnderlyingType() const; - - FORWARD_SYMBOL_METHOD(getBuiltinType) - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(getUnmodifiedTypeId) - FORWARD_SYMBOL_METHOD(hasConstructor) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(hasAssignmentOperator) - FORWARD_SYMBOL_METHOD(hasCastOperator) - FORWARD_SYMBOL_METHOD(hasNestedTypes) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(isNested) - FORWARD_SYMBOL_METHOD(hasOverloadedOperator) - FORWARD_SYMBOL_METHOD(isPacked) - FORWARD_SYMBOL_METHOD(isScoped) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEENUM_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h deleted file mode 100644 index 196d149e..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h +++ /dev/null @@ -1,38 +0,0 @@ -//===- PDBSymbolTypeFriend.h - friend type info -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFRIEND_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFRIEND_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeFriend : public PDBSymbol { -public: - PDBSymbolTypeFriend(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Friend) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(getTypeId) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFRIEND_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h deleted file mode 100644 index 5561341d..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h +++ /dev/null @@ -1,38 +0,0 @@ -//===- PDBSymbolTypeFunctionArg.h - function arg type info ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONARG_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONARG_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeFunctionArg : public PDBSymbol { -public: - PDBSymbolTypeFunctionArg(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FunctionArg) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getTypeId) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONARG_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h deleted file mode 100644 index 516011ff..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h +++ /dev/null @@ -1,51 +0,0 @@ -//===- PDBSymbolTypeFunctionSig.h - function signature type info *- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONSIG_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONSIG_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeFunctionSig : public PDBSymbol { -public: - PDBSymbolTypeFunctionSig(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::FunctionSig) - - std::unique_ptr getReturnType() const; - std::unique_ptr getArguments() const; - std::unique_ptr getClassParent() const; - - void dump(PDBSymDumper &Dumper) const override; - void dumpArgList(raw_ostream &OS) const; - - FORWARD_SYMBOL_METHOD(getCallingConvention) - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(getUnmodifiedTypeId) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(getCount) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - // FORWARD_SYMBOL_METHOD(getObjectPointerType) - FORWARD_SYMBOL_METHOD(getThisAdjust) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEFUNCTIONSIG_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h deleted file mode 100644 index 31cf5363..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h +++ /dev/null @@ -1,36 +0,0 @@ -//===- PDBSymbolTypeManaged.h - managed type info ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEMANAGED_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEMANAGED_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeManaged : public PDBSymbol { -public: - PDBSymbolTypeManaged(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::ManagedType) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getName) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEMANAGED_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h deleted file mode 100644 index 7a57272a..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h +++ /dev/null @@ -1,44 +0,0 @@ -//===- PDBSymbolTypePointer.h - pointer type info ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEPOINTER_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEPOINTER_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypePointer : public PDBSymbol { -public: - PDBSymbolTypePointer(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::PointerType) - - std::unique_ptr getPointeeType() const; - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(isReference) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEPOINTER_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h deleted file mode 100644 index 5ed4f8d2..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h +++ /dev/null @@ -1,55 +0,0 @@ -//===- PDBSymbolTypeTypedef.h - typedef type info ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPETYPEDEF_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPETYPEDEF_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeTypedef : public PDBSymbol { -public: - PDBSymbolTypeTypedef(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::Typedef) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getBuiltinType) - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(hasConstructor) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(hasAssignmentOperator) - FORWARD_SYMBOL_METHOD(hasCastOperator) - FORWARD_SYMBOL_METHOD(hasNestedTypes) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(isNested) - FORWARD_SYMBOL_METHOD(hasOverloadedOperator) - FORWARD_SYMBOL_METHOD(isPacked) - FORWARD_SYMBOL_METHOD(isReference) - FORWARD_SYMBOL_METHOD(isScoped) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(getUdtKind) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(getVirtualTableShapeId) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPETYPEDEF_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h deleted file mode 100644 index 1874dfef..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h +++ /dev/null @@ -1,52 +0,0 @@ -//===- PDBSymbolTypeUDT.h - UDT type info -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEUDT_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEUDT_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; - -namespace pdb { -class PDBSymbolTypeUDT : public PDBSymbol { -public: - PDBSymbolTypeUDT(const IPDBSession &PDBSession, - std::unique_ptr UDTSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::UDT) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(getUnmodifiedTypeId) - FORWARD_SYMBOL_METHOD(hasConstructor) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(hasAssignmentOperator) - FORWARD_SYMBOL_METHOD(hasCastOperator) - FORWARD_SYMBOL_METHOD(hasNestedTypes) - FORWARD_SYMBOL_METHOD(getLength) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getName) - FORWARD_SYMBOL_METHOD(isNested) - FORWARD_SYMBOL_METHOD(hasOverloadedOperator) - FORWARD_SYMBOL_METHOD(isPacked) - FORWARD_SYMBOL_METHOD(isScoped) - FORWARD_SYMBOL_METHOD(getUdtKind) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(getVirtualTableShapeId) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; -} -} // namespace llvm - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEUDT_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h deleted file mode 100644 index baf7ab79..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h +++ /dev/null @@ -1,41 +0,0 @@ -//===- PDBSymbolTypeVTable.h - VTable type info -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLE_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLE_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeVTable : public PDBSymbol { -public: - PDBSymbolTypeVTable(const IPDBSession &PDBSession, - std::unique_ptr VtblSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::VTable) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getClassParentId) - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getTypeId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLE_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h deleted file mode 100644 index 431fc1ac..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h +++ /dev/null @@ -1,40 +0,0 @@ -//===- PDBSymbolTypeVTableShape.h - VTable shape info -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLESHAPE_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLESHAPE_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolTypeVTableShape : public PDBSymbol { -public: - PDBSymbolTypeVTableShape(const IPDBSession &PDBSession, - std::unique_ptr VtblShapeSymbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::VTableShape) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(isConstType) - FORWARD_SYMBOL_METHOD(getCount) - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(isUnalignedType) - FORWARD_SYMBOL_METHOD(isVolatileType) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLTYPEVTABLESHAPE_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h deleted file mode 100644 index de43e47b..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h +++ /dev/null @@ -1,36 +0,0 @@ -//===- PDBSymbolUnknown.h - unknown symbol type -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLUNKNOWN_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLUNKNOWN_H - -#include "PDBSymbol.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolUnknown : public PDBSymbol { -public: - PDBSymbolUnknown(const IPDBSession &PDBSession, - std::unique_ptr UnknownSymbol); - - void dump(PDBSymDumper &Dumper) const override; - - static bool classof(const PDBSymbol *S) { - return (S->getSymTag() == PDB_SymType::None || - S->getSymTag() >= PDB_SymType::Max); - } -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLUNKNOWN_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h b/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h deleted file mode 100644 index a273fe15..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h +++ /dev/null @@ -1,37 +0,0 @@ -//===- PDBSymbolUsingNamespace.h - using namespace info ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOLUSINGNAMESPACE_H -#define LLVM_DEBUGINFO_PDB_PDBSYMBOLUSINGNAMESPACE_H - -#include "PDBSymbol.h" -#include "PDBTypes.h" - -namespace llvm { - -class raw_ostream; -namespace pdb { - -class PDBSymbolUsingNamespace : public PDBSymbol { -public: - PDBSymbolUsingNamespace(const IPDBSession &PDBSession, - std::unique_ptr Symbol); - - DECLARE_PDB_SYMBOL_CONCRETE_TYPE(PDB_SymType::UsingNamespace) - - void dump(PDBSymDumper &Dumper) const override; - - FORWARD_SYMBOL_METHOD(getLexicalParentId) - FORWARD_SYMBOL_METHOD(getName) -}; - -} // namespace llvm -} - -#endif // LLVM_DEBUGINFO_PDB_PDBSYMBOLUSINGNAMESPACE_H diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h b/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h deleted file mode 100644 index a9325a43..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h +++ /dev/null @@ -1,367 +0,0 @@ -//===- PDBTypes.h - Defines enums for various fields contained in PDB ---*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_PDBTYPES_H -#define LLVM_DEBUGINFO_PDB_PDBTYPES_H - -#include "llvm/Config/llvm-config.h" -#include "llvm/DebugInfo/CodeView/CodeView.h" -#include -#include -#include - -namespace llvm { -namespace pdb { - -class PDBSymDumper; -class PDBSymbol; - -class IPDBDataStream; -template class IPDBEnumChildren; -class IPDBLineNumber; -class IPDBRawSymbol; -class IPDBSession; -class IPDBSourceFile; - -typedef IPDBEnumChildren IPDBEnumSymbols; -typedef IPDBEnumChildren IPDBEnumSourceFiles; -typedef IPDBEnumChildren IPDBEnumDataStreams; -typedef IPDBEnumChildren IPDBEnumLineNumbers; - -class PDBSymbolExe; -class PDBSymbolCompiland; -class PDBSymbolCompilandDetails; -class PDBSymbolCompilandEnv; -class PDBSymbolFunc; -class PDBSymbolBlock; -class PDBSymbolData; -class PDBSymbolAnnotation; -class PDBSymbolLabel; -class PDBSymbolPublicSymbol; -class PDBSymbolTypeUDT; -class PDBSymbolTypeEnum; -class PDBSymbolTypeFunctionSig; -class PDBSymbolTypePointer; -class PDBSymbolTypeArray; -class PDBSymbolTypeBuiltin; -class PDBSymbolTypeTypedef; -class PDBSymbolTypeBaseClass; -class PDBSymbolTypeFriend; -class PDBSymbolTypeFunctionArg; -class PDBSymbolFuncDebugStart; -class PDBSymbolFuncDebugEnd; -class PDBSymbolUsingNamespace; -class PDBSymbolTypeVTableShape; -class PDBSymbolTypeVTable; -class PDBSymbolCustom; -class PDBSymbolThunk; -class PDBSymbolTypeCustom; -class PDBSymbolTypeManaged; -class PDBSymbolTypeDimension; -class PDBSymbolUnknown; - -/// Specifies which PDB reader implementation is to be used. Only a value -/// of PDB_ReaderType::DIA is supported. -enum class PDB_ReaderType { - DIA = 0, - Raw = 1, -}; - -/// Defines a 128-bit unique identifier. This maps to a GUID on Windows, but -/// is abstracted here for the purposes of non-Windows platforms that don't have -/// the GUID structure defined. -struct PDB_UniqueId { - char Guid[16]; -}; - -/// An enumeration indicating the type of data contained in this table. -enum class PDB_TableType { - Symbols, - SourceFiles, - LineNumbers, - SectionContribs, - Segments, - InjectedSources, - FrameData -}; - -/// Defines flags used for enumerating child symbols. This corresponds to the -/// NameSearchOptions enumeration which is documented here: -/// https://msdn.microsoft.com/en-us/library/yat28ads.aspx -enum PDB_NameSearchFlags { - NS_Default = 0x0, - NS_CaseSensitive = 0x1, - NS_CaseInsensitive = 0x2, - NS_FileNameExtMatch = 0x4, - NS_Regex = 0x8, - NS_UndecoratedName = 0x10 -}; - -/// Specifies the hash algorithm that a source file from a PDB was hashed with. -/// This corresponds to the CV_SourceChksum_t enumeration and are documented -/// here: https://msdn.microsoft.com/en-us/library/e96az21x.aspx -enum class PDB_Checksum { None = 0, MD5 = 1, SHA1 = 2 }; - -/// These values correspond to the CV_CPU_TYPE_e enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx -typedef codeview::CPUType PDB_Cpu; - -enum class PDB_Machine { - Invalid = 0xffff, - Unknown = 0x0, - Am33 = 0x13, - Amd64 = 0x8664, - Arm = 0x1C0, - ArmNT = 0x1C4, - Ebc = 0xEBC, - x86 = 0x14C, - Ia64 = 0x200, - M32R = 0x9041, - Mips16 = 0x266, - MipsFpu = 0x366, - MipsFpu16 = 0x466, - PowerPC = 0x1F0, - PowerPCFP = 0x1F1, - R4000 = 0x166, - SH3 = 0x1A2, - SH3DSP = 0x1A3, - SH4 = 0x1A6, - SH5 = 0x1A8, - Thumb = 0x1C2, - WceMipsV2 = 0x169 -}; - -/// These values correspond to the CV_call_e enumeration, and are documented -/// at the following locations: -/// https://msdn.microsoft.com/en-us/library/b2fc64ek.aspx -/// https://msdn.microsoft.com/en-us/library/windows/desktop/ms680207(v=vs.85).aspx -/// -typedef codeview::CallingConvention PDB_CallingConv; - -/// These values correspond to the CV_CFL_LANG enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/bw3aekw6.aspx -typedef codeview::SourceLanguage PDB_Lang; - -/// These values correspond to the DataKind enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/b2x2t313.aspx -enum class PDB_DataKind { - Unknown, - Local, - StaticLocal, - Param, - ObjectPtr, - FileStatic, - Global, - Member, - StaticMember, - Constant -}; - -/// These values correspond to the SymTagEnum enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/bkedss5f.aspx -enum class PDB_SymType { - None, - Exe, - Compiland, - CompilandDetails, - CompilandEnv, - Function, - Block, - Data, - Annotation, - Label, - PublicSymbol, - UDT, - Enum, - FunctionSig, - PointerType, - ArrayType, - BuiltinType, - Typedef, - BaseClass, - Friend, - FunctionArg, - FuncDebugStart, - FuncDebugEnd, - UsingNamespace, - VTableShape, - VTable, - Custom, - Thunk, - CustomType, - ManagedType, - Dimension, - Max -}; - -/// These values correspond to the LocationType enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/f57kaez3.aspx -enum class PDB_LocType { - Null, - Static, - TLS, - RegRel, - ThisRel, - Enregistered, - BitField, - Slot, - IlRel, - MetaData, - Constant, - Max -}; - -/// These values correspond to the UdtKind enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/wcstk66t.aspx -enum class PDB_UdtType { Struct, Class, Union, Interface }; - -/// These values correspond to the StackFrameTypeEnum enumeration, and are -/// documented here: https://msdn.microsoft.com/en-us/library/bc5207xw.aspx. -enum class PDB_StackFrameType { FPO, KernelTrap, KernelTSS, EBP, FrameData }; - -/// These values correspond to the StackFrameTypeEnum enumeration, and are -/// documented here: https://msdn.microsoft.com/en-us/library/bc5207xw.aspx. -enum class PDB_MemoryType { Code, Data, Stack, HeapCode }; - -/// These values correspond to the Basictype enumeration, and are documented -/// here: https://msdn.microsoft.com/en-us/library/4szdtzc3.aspx -enum class PDB_BuiltinType { - None = 0, - Void = 1, - Char = 2, - WCharT = 3, - Int = 6, - UInt = 7, - Float = 8, - BCD = 9, - Bool = 10, - Long = 13, - ULong = 14, - Currency = 25, - Date = 26, - Variant = 27, - Complex = 28, - Bitfield = 29, - BSTR = 30, - HResult = 31 -}; - -enum class PDB_MemberAccess { Private = 1, Protected = 2, Public = 3 }; - -struct VersionInfo { - uint32_t Major; - uint32_t Minor; - uint32_t Build; - uint32_t QFE; -}; - -enum PDB_VariantType { - Empty, - Unknown, - Int8, - Int16, - Int32, - Int64, - Single, - Double, - UInt8, - UInt16, - UInt32, - UInt64, - Bool, - String -}; - -struct Variant { - Variant() : Type(PDB_VariantType::Empty) {} - - Variant(const Variant &Other) : Type(PDB_VariantType::Empty) { - *this = Other; - } - - ~Variant() { - if (Type == PDB_VariantType::String) - delete[] Value.String; - } - - PDB_VariantType Type; - union { - bool Bool; - int8_t Int8; - int16_t Int16; - int32_t Int32; - int64_t Int64; - float Single; - double Double; - uint8_t UInt8; - uint16_t UInt16; - uint32_t UInt32; - uint64_t UInt64; - char *String; - } Value; - -#define VARIANT_EQUAL_CASE(Enum) \ - case PDB_VariantType::Enum: \ - return Value.Enum == Other.Value.Enum; - - bool operator==(const Variant &Other) const { - if (Type != Other.Type) - return false; - switch (Type) { - VARIANT_EQUAL_CASE(Bool) - VARIANT_EQUAL_CASE(Int8) - VARIANT_EQUAL_CASE(Int16) - VARIANT_EQUAL_CASE(Int32) - VARIANT_EQUAL_CASE(Int64) - VARIANT_EQUAL_CASE(Single) - VARIANT_EQUAL_CASE(Double) - VARIANT_EQUAL_CASE(UInt8) - VARIANT_EQUAL_CASE(UInt16) - VARIANT_EQUAL_CASE(UInt32) - VARIANT_EQUAL_CASE(UInt64) - VARIANT_EQUAL_CASE(String) - default: - return true; - } - } - -#undef VARIANT_EQUAL_CASE - - bool operator!=(const Variant &Other) const { return !(*this == Other); } - Variant &operator=(const Variant &Other) { - if (this == &Other) - return *this; - if (Type == PDB_VariantType::String) - delete[] Value.String; - Type = Other.Type; - Value = Other.Value; - if (Other.Type == PDB_VariantType::String && - Other.Value.String != nullptr) { - Value.String = new char[strlen(Other.Value.String) + 1]; - ::strcpy(Value.String, Other.Value.String); - } - return *this; - } -}; - -} // end namespace llvm -} - -namespace std { -template <> struct hash { - typedef llvm::pdb::PDB_SymType argument_type; - typedef std::size_t result_type; - - result_type operator()(const argument_type &Arg) const { - return std::hash()(static_cast(Arg)); - } -}; -} // end namespace std - -#endif // LLVM_DEBUGINFO_PDB_PDBTYPES_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/DbiStream.h b/llvm/include/llvm/DebugInfo/PDB/Raw/DbiStream.h deleted file mode 100644 index 6ab3c806..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/DbiStream.h +++ /dev/null @@ -1,149 +0,0 @@ -//===- DbiStream.h - PDB Dbi Stream (Stream 3) Access -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBDBISTREAM_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBDBISTREAM_H - -#include "llvm/DebugInfo/CodeView/ModuleSubstream.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamRef.h" -#include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h" -#include "llvm/DebugInfo/PDB/Raw/ModInfo.h" -#include "llvm/DebugInfo/PDB/Raw/NameHashTable.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -namespace llvm { -namespace object { -struct FpoData; -struct coff_section; -} - -namespace pdb { -class DbiStreamBuilder; -class PDBFile; -class ISectionContribVisitor; - -class DbiStream { - friend class DbiStreamBuilder; - - struct HeaderInfo { - support::little32_t VersionSignature; - support::ulittle32_t VersionHeader; - support::ulittle32_t Age; // Should match InfoStream. - support::ulittle16_t GlobalSymbolStreamIndex; // Global symbol stream # - support::ulittle16_t BuildNumber; // See DbiBuildNo structure. - support::ulittle16_t PublicSymbolStreamIndex; // Public symbols stream # - support::ulittle16_t PdbDllVersion; // version of mspdbNNN.dll - support::ulittle16_t SymRecordStreamIndex; // Symbol records stream # - support::ulittle16_t PdbDllRbld; // rbld number of mspdbNNN.dll - support::little32_t ModiSubstreamSize; // Size of module info stream - support::little32_t SecContrSubstreamSize; // Size of sec. contrib stream - support::little32_t SectionMapSize; // Size of sec. map substream - support::little32_t FileInfoSize; // Size of file info substream - support::little32_t TypeServerSize; // Size of type server map - support::ulittle32_t MFCTypeServerIndex; // Index of MFC Type Server - support::little32_t OptionalDbgHdrSize; // Size of DbgHeader info - support::little32_t ECSubstreamSize; // Size of EC stream (what is EC?) - support::ulittle16_t Flags; // See DbiFlags enum. - support::ulittle16_t MachineType; // See PDB_MachineType enum. - - support::ulittle32_t Reserved; // Pad to 64 bytes - }; - -public: - DbiStream(PDBFile &File, std::unique_ptr Stream); - ~DbiStream(); - Error reload(); - - PdbRaw_DbiVer getDbiVersion() const; - uint32_t getAge() const; - uint16_t getPublicSymbolStreamIndex() const; - uint16_t getGlobalSymbolStreamIndex() const; - - uint16_t getFlags() const; - bool isIncrementallyLinked() const; - bool hasCTypes() const; - bool isStripped() const; - - uint16_t getBuildNumber() const; - uint16_t getBuildMajorVersion() const; - uint16_t getBuildMinorVersion() const; - - uint16_t getPdbDllRbld() const; - uint32_t getPdbDllVersion() const; - - uint32_t getSymRecordStreamIndex() const; - - PDB_Machine getMachineType() const; - - enum { InvalidStreamIndex = 0xffff }; - - /// If the given stream type is present, returns its stream index. If it is - /// not present, returns InvalidStreamIndex. - uint32_t getDebugStreamIndex(DbgHeaderType Type) const; - - ArrayRef modules() const; - - Expected getFileNameForIndex(uint32_t Index) const; - - codeview::FixedStreamArray getSectionHeaders(); - - codeview::FixedStreamArray getFpoRecords(); - - codeview::FixedStreamArray getSectionMap() const; - void visitSectionContributions(ISectionContribVisitor &Visitor) const; - - Error commit(); - -private: - Error initializeSectionContributionData(); - Error initializeSectionHeadersData(); - Error initializeSectionMapData(); - Error initializeFileInfo(); - Error initializeFpoRecords(); - - PDBFile &Pdb; - std::unique_ptr Stream; - - std::vector ModuleInfos; - NameHashTable ECNames; - - codeview::StreamRef ModInfoSubstream; - codeview::StreamRef SecContrSubstream; - codeview::StreamRef SecMapSubstream; - codeview::StreamRef FileInfoSubstream; - codeview::StreamRef TypeServerMapSubstream; - codeview::StreamRef ECSubstream; - - codeview::StreamRef NamesBuffer; - - codeview::FixedStreamArray DbgStreams; - - PdbRaw_DbiSecContribVer SectionContribVersion; - codeview::FixedStreamArray SectionContribs; - codeview::FixedStreamArray SectionContribs2; - codeview::FixedStreamArray SectionMap; - codeview::FixedStreamArray FileNameOffsets; - - std::unique_ptr SectionHeaderStream; - codeview::FixedStreamArray SectionHeaders; - - std::unique_ptr FpoStream; - codeview::FixedStreamArray FpoRecords; - - const HeaderInfo *Header; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h b/llvm/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h deleted file mode 100644 index 2c7350f3..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h +++ /dev/null @@ -1,56 +0,0 @@ -//===- DbiStreamBuilder.h - PDB Dbi Stream Creation -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBDBISTREAMBUILDER_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBDBISTREAMBUILDER_H - -#include "llvm/ADT/Optional.h" -#include "llvm/Support/Error.h" - -#include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" - -namespace llvm { -namespace pdb { -class DbiStream; -class PDBFile; - -class DbiStreamBuilder { -public: - DbiStreamBuilder(); - - DbiStreamBuilder(const DbiStreamBuilder &) = delete; - DbiStreamBuilder &operator=(const DbiStreamBuilder &) = delete; - - void setVersionHeader(PdbRaw_DbiVer V); - void setAge(uint32_t A); - void setBuildNumber(uint16_t B); - void setPdbDllVersion(uint16_t V); - void setPdbDllRbld(uint16_t R); - void setFlags(uint16_t F); - void setMachineType(PDB_Machine M); - - uint32_t calculateSerializedLength() const; - - Expected> build(PDBFile &File); - -private: - Optional VerHeader; - uint32_t Age; - uint16_t BuildNumber; - uint16_t PdbDllVersion; - uint16_t PdbDllRbld; - uint16_t Flags; - PDB_Machine MachineType; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/DirectoryStreamData.h b/llvm/include/llvm/DebugInfo/PDB/Raw/DirectoryStreamData.h deleted file mode 100644 index 0f354315..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/DirectoryStreamData.h +++ /dev/null @@ -1,37 +0,0 @@ -//===- DirectoryStreamData.h ---------------------------------- *- C++ --*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_DIRECTORYSTREAMDATA_H -#define LLVM_DEBUGINFO_PDB_RAW_DIRECTORYSTREAMDATA_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/DebugInfo/PDB/Raw/IPDBStreamData.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/Support/Endian.h" - -namespace llvm { -namespace pdb { -class IPDBFile; - -class DirectoryStreamData : public IPDBStreamData { -public: - DirectoryStreamData(const PDBFile &File) : File(File) {} - - virtual uint32_t getLength() { return File.getNumDirectoryBytes(); } - virtual llvm::ArrayRef getStreamBlocks() { - return File.getDirectoryBlockArray(); - } - -private: - const PDBFile &File; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/EnumTables.h b/llvm/include/llvm/DebugInfo/PDB/Raw/EnumTables.h deleted file mode 100644 index c0184456..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/EnumTables.h +++ /dev/null @@ -1,22 +0,0 @@ -//===- EnumTables.h - Enum to string conversion tables ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_ENUMTABLES_H -#define LLVM_DEBUGINFO_PDB_RAW_ENUMTABLES_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/Support/ScopedPrinter.h" - -namespace llvm { -namespace pdb { -ArrayRef> getOMFSegMapDescFlagNames(); -} -} - -#endif // LLVM_DEBUGINFO_PDB_RAW_ENUMTABLES_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/Hash.h b/llvm/include/llvm/DebugInfo/PDB/Raw/Hash.h deleted file mode 100644 index 0340554d..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/Hash.h +++ /dev/null @@ -1,25 +0,0 @@ -//===- Hash.h - PDB hash functions ------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_HASH_H -#define LLVM_DEBUGINFO_PDB_RAW_HASH_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" -#include - -namespace llvm { -namespace pdb { -uint32_t hashStringV1(StringRef Str); -uint32_t hashStringV2(StringRef Str); -uint32_t hashBufferV8(ArrayRef Data); -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/IPDBFile.h b/llvm/include/llvm/DebugInfo/PDB/Raw/IPDBFile.h deleted file mode 100644 index fccea2ac..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/IPDBFile.h +++ /dev/null @@ -1,44 +0,0 @@ -//===- IPDBFile.h - Abstract base class for a PDB file ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_IPDBFILE_H -#define LLVM_DEBUGINFO_PDB_RAW_IPDBFILE_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -#include - -namespace llvm { -namespace pdb { - -class IPDBFile { -public: - virtual ~IPDBFile() {} - - virtual uint32_t getBlockSize() const = 0; - virtual uint32_t getBlockCount() const = 0; - - virtual uint32_t getNumStreams() const = 0; - virtual uint32_t getStreamByteSize(uint32_t StreamIndex) const = 0; - virtual ArrayRef - getStreamBlockList(uint32_t StreamIndex) const = 0; - - virtual Expected> getBlockData(uint32_t BlockIndex, - uint32_t NumBytes) const = 0; - virtual Error setBlockData(uint32_t BlockIndex, uint32_t Offset, - ArrayRef Data) const = 0; -}; -} -} - -#endif // LLVM_DEBUGINFO_PDB_RAW_IPDBFILE_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/IPDBStreamData.h b/llvm/include/llvm/DebugInfo/PDB/Raw/IPDBStreamData.h deleted file mode 100644 index ab3c9f77..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/IPDBStreamData.h +++ /dev/null @@ -1,38 +0,0 @@ -//===- IPDBStreamData.h - Base interface for PDB Stream Data ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_IPDBSTREAMDATA_H -#define LLVM_DEBUGINFO_PDB_RAW_IPDBSTREAMDATA_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/Support/Endian.h" - -namespace llvm { -namespace pdb { -/// IPDBStream abstracts the notion of PDB stream data. Although we already -/// have another stream abstraction (namely in the form of StreamInterface -/// and MappedBlockStream), they assume that the stream data is referenced -/// the same way. Namely, by looking in the directory to get the list of -/// stream blocks, and by looking in the array of stream lengths to get the -/// length. This breaks down for the directory itself, however, since its -/// length and list of blocks are stored elsewhere. By abstracting the -/// notion of stream data further, we can use a MappedBlockStream to read -/// from the directory itself, or from an indexed stream which references -/// the directory. -class IPDBStreamData { -public: - virtual ~IPDBStreamData() {} - - virtual uint32_t getLength() = 0; - virtual ArrayRef getStreamBlocks() = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h b/llvm/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h deleted file mode 100644 index 355a25a3..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/ISectionContribVisitor.h +++ /dev/null @@ -1,28 +0,0 @@ -//===- ISectionContribVisitor.h ---------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_ISECTIONCONTRIBVISITOR_H -#define LLVM_DEBUGINFO_PDB_RAW_ISECTIONCONTRIBVISITOR_H - -namespace llvm { -namespace pdb { -struct SectionContrib; -struct SectionContrib2; - -class ISectionContribVisitor { -public: - virtual ~ISectionContribVisitor() {} - - virtual void visit(const SectionContrib &C) = 0; - virtual void visit(const SectionContrib2 &C) = 0; -}; -} // namespace pdb -} // namespace llvm - -#endif // LLVM_DEBUGINFO_PDB_RAW_ISECTIONCONTRIBVISITOR_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/IndexedStreamData.h b/llvm/include/llvm/DebugInfo/PDB/Raw/IndexedStreamData.h deleted file mode 100644 index 30563bc5..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/IndexedStreamData.h +++ /dev/null @@ -1,34 +0,0 @@ -//===- IndexedStreamData.h - Standard PDB Stream Data -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_INDEXEDSTREAMDATA_H -#define LLVM_DEBUGINFO_PDB_RAW_INDEXEDSTREAMDATA_H - -#include "llvm/DebugInfo/PDB/Raw/IPDBStreamData.h" - -namespace llvm { -namespace pdb { -class IPDBFile; - -class IndexedStreamData : public IPDBStreamData { -public: - IndexedStreamData(uint32_t StreamIdx, const IPDBFile &File); - virtual ~IndexedStreamData() {} - - uint32_t getLength() override; - ArrayRef getStreamBlocks() override; - -private: - uint32_t StreamIdx; - const IPDBFile &File; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/InfoStream.h b/llvm/include/llvm/DebugInfo/PDB/Raw/InfoStream.h deleted file mode 100644 index 1980bec7..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/InfoStream.h +++ /dev/null @@ -1,77 +0,0 @@ -//===- InfoStream.h - PDB Info Stream (Stream 1) Access ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAM_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAM_H - -#include "llvm/ADT/StringMap.h" -#include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h" -#include "llvm/DebugInfo/PDB/Raw/NameMap.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" - -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -namespace llvm { -namespace pdb { -class InfoStreamBuilder; -class PDBFile; - -class InfoStream { - friend class InfoStreamBuilder; - - struct HeaderInfo { - support::ulittle32_t Version; - support::ulittle32_t Signature; - support::ulittle32_t Age; - PDB_UniqueId Guid; - }; - -public: - InfoStream(std::unique_ptr Stream); - - Error reload(); - Error commit(); - - PdbRaw_ImplVer getVersion() const; - uint32_t getSignature() const; - uint32_t getAge() const; - PDB_UniqueId getGuid() const; - - uint32_t getNamedStreamIndex(llvm::StringRef Name) const; - iterator_range> named_streams() const; - -private: - std::unique_ptr Stream; - - // PDB file format version. We only support VC70. See the enumeration - // `PdbRaw_ImplVer` for the other possible values. - uint32_t Version; - - // A 32-bit signature unique across all PDBs. This is generated with - // a call to time() when the PDB is written, but obviously this is not - // universally unique. - uint32_t Signature; - - // The number of times the PDB has been written. Might also be used to - // ensure that the PDB matches the executable. - uint32_t Age; - - // Due to the aforementioned limitations with `Signature`, this is a new - // signature present on VC70 and higher PDBs which is guaranteed to be - // universally unique. - PDB_UniqueId Guid; - - NameMap NamedStreams; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h b/llvm/include/llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h deleted file mode 100644 index e9869bb2..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/InfoStreamBuilder.h +++ /dev/null @@ -1,53 +0,0 @@ -//===- InfoStreamBuilder.h - PDB Info Stream Creation -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAMBUILDER_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBINFOSTREAMBUILDER_H - -#include "llvm/ADT/Optional.h" -#include "llvm/Support/Error.h" - -#include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/NameMapBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" - -namespace llvm { -namespace pdb { -class PDBFile; - -class InfoStreamBuilder { -public: - InfoStreamBuilder(); - InfoStreamBuilder(const InfoStreamBuilder &) = delete; - InfoStreamBuilder &operator=(const InfoStreamBuilder &) = delete; - - void setVersion(PdbRaw_ImplVer V); - void setSignature(uint32_t S); - void setAge(uint32_t A); - void setGuid(PDB_UniqueId G); - - NameMapBuilder &getNamedStreamsBuilder(); - - uint32_t calculateSerializedLength() const; - - Expected> build(PDBFile &File); - -private: - Optional Ver; - Optional Sig; - Optional Age; - Optional Guid; - - NameMapBuilder NamedStreams; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/MappedBlockStream.h b/llvm/include/llvm/DebugInfo/PDB/Raw/MappedBlockStream.h deleted file mode 100644 index 36424c0d..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/MappedBlockStream.h +++ /dev/null @@ -1,68 +0,0 @@ -//===- MappedBlockStream.h - Reads stream data from a PDBFile ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_MAPPEDBLOCKSTREAM_H -#define LLVM_DEBUGINFO_PDB_RAW_MAPPEDBLOCKSTREAM_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/DebugInfo/CodeView/StreamInterface.h" -#include "llvm/DebugInfo/PDB/Raw/IPDBStreamData.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" -#include -#include - -namespace llvm { -namespace pdb { - -class IPDBFile; -class PDBFile; - -class MappedBlockStream : public codeview::StreamInterface { -public: - Error readBytes(uint32_t Offset, uint32_t Size, - ArrayRef &Buffer) const override; - Error readLongestContiguousChunk(uint32_t Offset, - ArrayRef &Buffer) const override; - Error writeBytes(uint32_t Offset, ArrayRef Buffer) const override; - - uint32_t getLength() const override; - Error commit() const override; - - uint32_t getNumBytesCopied() const; - - static Expected> - createIndexedStream(uint32_t StreamIdx, const IPDBFile &File); - static Expected> - createDirectoryStream(const PDBFile &File); - - llvm::BumpPtrAllocator &getAllocator() { return Pool; } - -protected: - MappedBlockStream(std::unique_ptr Data, const IPDBFile &File); - - Error readBytes(uint32_t Offset, MutableArrayRef Buffer) const; - bool tryReadContiguously(uint32_t Offset, uint32_t Size, - ArrayRef &Buffer) const; - - const IPDBFile &Pdb; - std::unique_ptr Data; - - typedef MutableArrayRef CacheEntry; - mutable llvm::BumpPtrAllocator Pool; - mutable DenseMap> CacheMap; -}; - -} // end namespace pdb -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_PDB_RAW_MAPPEDBLOCKSTREAM_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/ModInfo.h b/llvm/include/llvm/DebugInfo/PDB/Raw/ModInfo.h deleted file mode 100644 index b8da0bfa..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/ModInfo.h +++ /dev/null @@ -1,79 +0,0 @@ -//===- ModInfo.h - PDB module information -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_MODINFO_H -#define LLVM_DEBUGINFO_PDB_RAW_MODINFO_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamRef.h" -#include -#include - -namespace llvm { -namespace pdb { - -class ModInfo { -private: - struct FileLayout; - -public: - ModInfo(); - ModInfo(const ModInfo &Info); - ~ModInfo(); - - static Error initialize(codeview::StreamRef Stream, ModInfo &Info); - - bool hasECInfo() const; - uint16_t getTypeServerIndex() const; - uint16_t getModuleStreamIndex() const; - uint32_t getSymbolDebugInfoByteSize() const; - uint32_t getLineInfoByteSize() const; - uint32_t getC13LineInfoByteSize() const; - uint32_t getNumberOfFiles() const; - uint32_t getSourceFileNameIndex() const; - uint32_t getPdbFilePathNameIndex() const; - - StringRef getModuleName() const; - StringRef getObjFileName() const; - - uint32_t getRecordLength() const; - -private: - StringRef ModuleName; - StringRef ObjFileName; - const FileLayout *Layout; -}; - -struct ModuleInfoEx { - ModuleInfoEx(const ModInfo &Info) : Info(Info) {} - ModuleInfoEx(const ModuleInfoEx &Ex) - : Info(Ex.Info), SourceFiles(Ex.SourceFiles) {} - - ModInfo Info; - std::vector SourceFiles; -}; - -} // end namespace pdb - -namespace codeview { -template <> struct VarStreamArrayExtractor { - Error operator()(StreamRef Stream, uint32_t &Length, - pdb::ModInfo &Info) const { - if (auto EC = pdb::ModInfo::initialize(Stream, Info)) - return EC; - Length = Info.getRecordLength(); - return Error::success(); - } -}; -} - -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_PDB_RAW_MODINFO_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/ModStream.h b/llvm/include/llvm/DebugInfo/PDB/Raw/ModStream.h deleted file mode 100644 index d22962cc..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/ModStream.h +++ /dev/null @@ -1,57 +0,0 @@ -//===- ModStream.h - PDB Module Info Stream Access ------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_MODSTREAM_H -#define LLVM_DEBUGINFO_PDB_RAW_MODSTREAM_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/DebugInfo/CodeView/CVRecord.h" -#include "llvm/DebugInfo/CodeView/ModuleSubstream.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamRef.h" -#include "llvm/DebugInfo/CodeView/SymbolRecord.h" -#include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h" -#include "llvm/Support/Error.h" - -namespace llvm { -namespace pdb { -class PDBFile; -class ModInfo; - -class ModStream { -public: - ModStream(const ModInfo &Module, std::unique_ptr Stream); - ~ModStream(); - - Error reload(); - - iterator_range - symbols(bool *HadError) const; - - iterator_range - lines(bool *HadError) const; - - Error commit(); - -private: - const ModInfo &Mod; - - std::unique_ptr Stream; - - codeview::CVSymbolArray SymbolsSubstream; - codeview::StreamRef LinesSubstream; - codeview::StreamRef C13LinesSubstream; - codeview::StreamRef GlobalRefsSubstream; - - codeview::ModuleSubstreamArray LineInfo; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/MsfBuilder.h b/llvm/include/llvm/DebugInfo/PDB/Raw/MsfBuilder.h deleted file mode 100644 index 92d9bc04..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/MsfBuilder.h +++ /dev/null @@ -1,141 +0,0 @@ -//===- MSFBuilder.h - MSF Directory & Metadata Builder ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_MSFBUILDER_H -#define LLVM_DEBUGINFO_PDB_RAW_MSFBUILDER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/BitVector.h" - -#include "llvm/DebugInfo/PDB/Raw/MsfCommon.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" - -#include "llvm/Support/Allocator.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -#include -#include - -namespace llvm { -namespace pdb { -class MsfBuilder { -public: - /// \brief Create a new `MsfBuilder`. - /// - /// \param BlockSize The internal block size used by the PDB file. See - /// isValidBlockSize() for a list of valid block sizes. - /// - /// \param MinBlockCount Causes the builder to reserve up front space for - /// at least `MinBlockCount` blocks. This is useful when using `MsfBuilder` - /// to read an existing PDB that you want to write back out later. The - /// original PDB file's SuperBlock contains the exact number of blocks used - /// by the file, so is a good hint as to how many blocks the new PDB file - /// will contain. Furthermore, it is actually necessary in this case. To - /// preserve stability of the file's layout, it is helpful to try to keep - /// all streams mapped to their original block numbers. To ensure that this - /// is possible, space for all blocks must be allocated beforehand so that - /// streams can be assigned to them. - /// - /// \param CanGrow If true, any operation which results in an attempt to - /// locate a free block when all available blocks have been exhausted will - /// allocate a new block, thereby growing the size of the final PDB file. - /// When false, any such attempt will result in an error. This is especially - /// useful in testing scenarios when you know your test isn't going to do - /// anything to increase the size of the file, so having an Error returned if - /// it were to happen would catch a programming error - /// - /// \returns an llvm::Error representing whether the operation succeeded or - /// failed. Currently the only way this can fail is if an invalid block size - /// is specified, or `MinBlockCount` does not leave enough room for the - /// mandatory reserved blocks required by an MSF file. - static Expected create(BumpPtrAllocator &Allocator, - uint32_t BlockSize, - uint32_t MinBlockCount = 0, - bool CanGrow = true); - - /// Request the block map to be at a specific block address. This is useful - /// when editing a PDB and you want the layout to be as stable as possible. - Error setBlockMapAddr(uint32_t Addr); - Error setDirectoryBlocksHint(ArrayRef DirBlocks); - void setFreePageMap(uint32_t Fpm); - void setUnknown1(uint32_t Unk1); - - /// Add a stream to the MSF file with the given size, occupying the given - /// list of blocks. This is useful when reading a PDB file and you want a - /// particular stream to occupy the original set of blocks. If the given - /// blocks are already allocated, or if the number of blocks specified is - /// incorrect for the given stream size, this function will return an Error. - Error addStream(uint32_t Size, ArrayRef Blocks); - - /// Add a stream to the MSF file with the given size, occupying any available - /// blocks that the builder decides to use. This is useful when building a - /// new PDB file from scratch and you don't care what blocks a stream occupies - /// but you just want it to work. - Error addStream(uint32_t Size); - - /// Update the size of an existing stream. This will allocate or deallocate - /// blocks as needed to match the requested size. This can fail if `CanGrow` - /// was set to false when initializing the `MsfBuilder`. - Error setStreamSize(uint32_t Idx, uint32_t Size); - - /// Get the total number of streams in the MSF layout. This should return 1 - /// for every call to `addStream`. - uint32_t getNumStreams() const; - - /// Get the size of a stream by index. - uint32_t getStreamSize(uint32_t StreamIdx) const; - - /// Get the list of blocks allocated to a particular stream. - ArrayRef getStreamBlocks(uint32_t StreamIdx) const; - - /// Get the total number of blocks that will be allocated to actual data in - /// this MSF file. - uint32_t getNumUsedBlocks() const; - - /// Get the total number of blocks that exist in the MSF file but are not - /// allocated to any valid data. - uint32_t getNumFreeBlocks() const; - - /// Get the total number of blocks in the MSF file. In practice this is equal - /// to `getNumUsedBlocks() + getNumFreeBlocks()`. - uint32_t getTotalBlockCount() const; - - /// Check whether a particular block is allocated or free. - bool isBlockFree(uint32_t Idx) const; - - /// Finalize the layout and build the headers and structures that describe the - /// MSF layout and can be written directly to the MSF file. - Expected build(); - -private: - MsfBuilder(uint32_t BlockSize, uint32_t MinBlockCount, bool CanGrow, - BumpPtrAllocator &Allocator); - - Error allocateBlocks(uint32_t NumBlocks, MutableArrayRef Blocks); - uint32_t computeDirectoryByteSize() const; - - typedef std::vector BlockList; - - BumpPtrAllocator &Allocator; - - bool IsGrowable; - uint32_t FreePageMap; - uint32_t Unknown1; - uint32_t BlockSize; - uint32_t MininumBlocks; - uint32_t BlockMapAddr; - BitVector FreeBlocks; - std::vector DirectoryBlocks; - std::vector> StreamData; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/MsfCommon.h b/llvm/include/llvm/DebugInfo/PDB/Raw/MsfCommon.h deleted file mode 100644 index 2f6a6986..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/MsfCommon.h +++ /dev/null @@ -1,90 +0,0 @@ -//===- MsfCommon.h - Common types and functions for MSF files ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_MSFCOMMON_H -#define LLVM_DEBUGINFO_PDB_RAW_MSFCOMMON_H - -#include "llvm/ADT/ArrayRef.h" - -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" -#include "llvm/Support/MathExtras.h" - -#include - -namespace llvm { -namespace pdb { -namespace msf { -static const char Magic[] = {'M', 'i', 'c', 'r', 'o', 's', 'o', 'f', - 't', ' ', 'C', '/', 'C', '+', '+', ' ', - 'M', 'S', 'F', ' ', '7', '.', '0', '0', - '\r', '\n', '\x1a', 'D', 'S', '\0', '\0', '\0'}; - -// The superblock is overlaid at the beginning of the file (offset 0). -// It starts with a magic header and is followed by information which -// describes the layout of the file system. -struct SuperBlock { - char MagicBytes[sizeof(Magic)]; - // The file system is split into a variable number of fixed size elements. - // These elements are referred to as blocks. The size of a block may vary - // from system to system. - support::ulittle32_t BlockSize; - // The index of the free block map. - support::ulittle32_t FreeBlockMapBlock; - // This contains the number of blocks resident in the file system. In - // practice, NumBlocks * BlockSize is equivalent to the size of the PDB - // file. - support::ulittle32_t NumBlocks; - // This contains the number of bytes which make up the directory. - support::ulittle32_t NumDirectoryBytes; - // This field's purpose is not yet known. - support::ulittle32_t Unknown1; - // This contains the block # of the block map. - support::ulittle32_t BlockMapAddr; -}; - -struct Layout { - SuperBlock *SB; - ArrayRef DirectoryBlocks; - ArrayRef StreamSizes; - std::vector> StreamMap; -}; - -inline bool isValidBlockSize(uint32_t Size) { - switch (Size) { - case 512: - case 1024: - case 2048: - case 4096: - return true; - } - return false; -} - -// Super Block, Fpm0, Fpm1, and Block Map -inline uint32_t getMinimumBlockCount() { return 4; } - -// Super Block, Fpm0, and Fpm1 are reserved. The Block Map, although required -// need not be at block 3. -inline uint32_t getFirstUnreservedBlock() { return 3; } - -inline uint64_t bytesToBlocks(uint64_t NumBytes, uint64_t BlockSize) { - return alignTo(NumBytes, BlockSize) / BlockSize; -} - -inline uint64_t blockToOffset(uint64_t BlockNumber, uint64_t BlockSize) { - return BlockNumber * BlockSize; -} - -Error validateSuperBlock(const SuperBlock &SB); -} -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/NameHashTable.h b/llvm/include/llvm/DebugInfo/PDB/Raw/NameHashTable.h deleted file mode 100644 index c9e060a3..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/NameHashTable.h +++ /dev/null @@ -1,54 +0,0 @@ -//===- NameHashTable.h - PDB Name Hash Table --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_NAMEHASHTABLE_H -#define LLVM_DEBUGINFO_PDB_RAW_NAMEHASHTABLE_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamRef.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" -#include -#include - -namespace llvm { -namespace codeview { -class StreamReader; -} -namespace pdb { - -class NameHashTable { -public: - NameHashTable(); - - Error load(codeview::StreamReader &Stream); - - uint32_t getNameCount() const { return NameCount; } - uint32_t getHashVersion() const { return HashVersion; } - uint32_t getSignature() const { return Signature; } - - StringRef getStringForID(uint32_t ID) const; - uint32_t getIDForString(StringRef Str) const; - - codeview::FixedStreamArray name_ids() const; - -private: - codeview::StreamRef NamesBuffer; - codeview::FixedStreamArray IDs; - uint32_t Signature; - uint32_t HashVersion; - uint32_t NameCount; -}; - -} // end namespace pdb -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_PDB_RAW_NAMEHASHTABLE_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/NameMap.h b/llvm/include/llvm/DebugInfo/PDB/Raw/NameMap.h deleted file mode 100644 index 8a9b0d18..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/NameMap.h +++ /dev/null @@ -1,45 +0,0 @@ -//===- NameMap.h - PDB Name Map ---------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBNAMEMAP_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBNAMEMAP_H - -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Error.h" -#include - -namespace llvm { -namespace codeview { -class StreamReader; -class StreamWriter; -} -namespace pdb { -class NameMapBuilder; -class NameMap { - friend NameMapBuilder; - -public: - NameMap(); - - Error load(codeview::StreamReader &Stream); - Error commit(codeview::StreamWriter &Writer); - - bool tryGetValue(StringRef Name, uint32_t &Value) const; - - iterator_range> entries() const; - -private: - StringMap Mapping; -}; - -} // end namespace pdb -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_PDB_RAW_PDBNAMEMAP_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/NameMapBuilder.h b/llvm/include/llvm/DebugInfo/PDB/Raw/NameMapBuilder.h deleted file mode 100644 index bf49bfd9..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/NameMapBuilder.h +++ /dev/null @@ -1,41 +0,0 @@ -//===- NameMapBuilder.h - PDB Name Map Builder ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBNAMEMAPBUILDER_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBNAMEMAPBUILDER_H - -#include "llvm/ADT/StringMap.h" -#include "llvm/Support/Error.h" - -#include -#include - -namespace llvm { -namespace pdb { -class NameMap; - -class NameMapBuilder { -public: - NameMapBuilder(); - - void addMapping(StringRef Name, uint32_t Mapping); - - Expected> build(); - - uint32_t calculateSerializedLength() const; - -private: - StringMap Map; - uint32_t StringDataBytes = 0; -}; - -} // end namespace pdb -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_PDB_RAW_PDBNAMEMAPBUILDER_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/PDBFile.h b/llvm/include/llvm/DebugInfo/PDB/Raw/PDBFile.h deleted file mode 100644 index f4d7eb47..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/PDBFile.h +++ /dev/null @@ -1,113 +0,0 @@ -//===- PDBFile.h - Low level interface to a PDB file ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBFILE_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBFILE_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamInterface.h" -#include "llvm/DebugInfo/PDB/Raw/IPDBFile.h" -#include "llvm/DebugInfo/PDB/Raw/MsfCommon.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" -#include "llvm/Support/MathExtras.h" - -#include - -namespace llvm { - -namespace codeview { -class StreamInterface; -} - -namespace pdb { -class DbiStream; -class InfoStream; -class MappedBlockStream; -class NameHashTable; -class PDBFileBuilder; -class PublicsStream; -class SymbolStream; -class TpiStream; - -class PDBFile : public IPDBFile { - friend PDBFileBuilder; - -public: - explicit PDBFile(std::unique_ptr PdbFileBuffer); - ~PDBFile() override; - - uint32_t getFreeBlockMapBlock() const; - uint32_t getUnknown1() const; - - uint32_t getBlockSize() const override; - uint32_t getBlockCount() const override; - uint32_t getNumDirectoryBytes() const; - uint32_t getBlockMapIndex() const; - uint32_t getNumDirectoryBlocks() const; - uint64_t getBlockMapOffset() const; - - uint32_t getNumStreams() const override; - uint32_t getStreamByteSize(uint32_t StreamIndex) const override; - ArrayRef - getStreamBlockList(uint32_t StreamIndex) const override; - uint32_t getFileSize() const; - - Expected> getBlockData(uint32_t BlockIndex, - uint32_t NumBytes) const override; - Error setBlockData(uint32_t BlockIndex, uint32_t Offset, - ArrayRef Data) const override; - - ArrayRef getStreamSizes() const { return StreamSizes; } - ArrayRef> getStreamMap() const { - return StreamMap; - } - - ArrayRef getDirectoryBlockArray() const; - - Error parseFileHeaders(); - Error parseStreamData(); - - Expected getPDBInfoStream(); - Expected getPDBDbiStream(); - Expected getPDBTpiStream(); - Expected getPDBIpiStream(); - Expected getPDBPublicsStream(); - Expected getPDBSymbolStream(); - Expected getStringTable(); - - Error commit(); - -private: - Error setSuperBlock(const msf::SuperBlock *Block); - - BumpPtrAllocator Allocator; - - std::unique_ptr Buffer; - const msf::SuperBlock *SB; - ArrayRef StreamSizes; - ArrayRef DirectoryBlocks; - std::vector> StreamMap; - - std::unique_ptr Info; - std::unique_ptr Dbi; - std::unique_ptr Tpi; - std::unique_ptr Ipi; - std::unique_ptr Publics; - std::unique_ptr Symbols; - std::unique_ptr DirectoryStream; - std::unique_ptr StringTableStream; - std::unique_ptr StringTable; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h b/llvm/include/llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h deleted file mode 100644 index 47c755b4..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/PDBFileBuilder.h +++ /dev/null @@ -1,59 +0,0 @@ -//===- PDBFileBuilder.h - PDB File Creation ---------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBFILEBUILDER_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBFILEBUILDER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/Optional.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" - -#include "llvm/DebugInfo/PDB/Raw/MsfBuilder.h" -#include "llvm/DebugInfo/PDB/Raw/PDBFile.h" - -#include -#include - -namespace llvm { -namespace codeview { -class StreamInterface; -} -namespace pdb { -class DbiStreamBuilder; -class InfoStreamBuilder; -class PDBFile; - -class PDBFileBuilder { -public: - explicit PDBFileBuilder( - std::unique_ptr FileBuffer); - PDBFileBuilder(const PDBFileBuilder &) = delete; - PDBFileBuilder &operator=(const PDBFileBuilder &) = delete; - - Error initialize(const msf::SuperBlock &Super); - - MsfBuilder &getMsfBuilder(); - InfoStreamBuilder &getInfoBuilder(); - DbiStreamBuilder &getDbiBuilder(); - - Expected> build(); - -private: - std::unique_ptr Info; - std::unique_ptr Dbi; - - std::unique_ptr File; - std::unique_ptr Msf; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/PublicsStream.h b/llvm/include/llvm/DebugInfo/PDB/Raw/PublicsStream.h deleted file mode 100644 index f5bfb0ed..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/PublicsStream.h +++ /dev/null @@ -1,74 +0,0 @@ -//===- PublicsStream.h - PDB Public Symbol Stream -------- ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PUBLICSSTREAM_H -#define LLVM_DEBUGINFO_PDB_RAW_PUBLICSSTREAM_H - -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/SymbolRecord.h" -#include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" - -#include "llvm/Support/Error.h" - -namespace llvm { -namespace pdb { -class DbiStream; -class PDBFile; - -class PublicsStream { - struct GSIHashHeader; - struct HeaderInfo; - -public: - PublicsStream(PDBFile &File, std::unique_ptr Stream); - ~PublicsStream(); - Error reload(); - - uint32_t getSymHash() const; - uint32_t getAddrMap() const; - uint32_t getNumBuckets() const { return NumBuckets; } - iterator_range - getSymbols(bool *HadError) const; - codeview::FixedStreamArray getHashBuckets() const { - return HashBuckets; - } - codeview::FixedStreamArray getAddressMap() const { - return AddressMap; - } - codeview::FixedStreamArray getThunkMap() const { - return ThunkMap; - } - codeview::FixedStreamArray getSectionOffsets() const { - return SectionOffsets; - } - - Error commit(); - -private: - PDBFile &Pdb; - - std::unique_ptr Stream; - uint32_t NumBuckets = 0; - ArrayRef Bitmap; - codeview::FixedStreamArray HashRecords; - codeview::FixedStreamArray HashBuckets; - codeview::FixedStreamArray AddressMap; - codeview::FixedStreamArray ThunkMap; - codeview::FixedStreamArray SectionOffsets; - - const HeaderInfo *Header; - const GSIHashHeader *HashHdr; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/RawConstants.h b/llvm/include/llvm/DebugInfo/PDB/Raw/RawConstants.h deleted file mode 100644 index 8daaf478..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/RawConstants.h +++ /dev/null @@ -1,94 +0,0 @@ -//===- RawConstants.h -------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBRAWCONSTANTS_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBRAWCONSTANTS_H - -#include "llvm/DebugInfo/CodeView/CodeView.h" - -#include - -namespace llvm { -namespace pdb { - -enum PdbRaw_ImplVer : uint32_t { - PdbImplVC2 = 19941610, - PdbImplVC4 = 19950623, - PdbImplVC41 = 19950814, - PdbImplVC50 = 19960307, - PdbImplVC98 = 19970604, - PdbImplVC70Dep = 19990604, // deprecated - PdbImplVC70 = 20000404, - PdbImplVC80 = 20030901, - PdbImplVC110 = 20091201, - PdbImplVC140 = 20140508, -}; - -enum PdbRaw_DbiVer : uint32_t { - PdbDbiVC41 = 930803, - PdbDbiV50 = 19960307, - PdbDbiV60 = 19970606, - PdbDbiV70 = 19990903, - PdbDbiV110 = 20091201 -}; - -enum PdbRaw_TpiVer : uint32_t { - PdbTpiV40 = 19950410, - PdbTpiV41 = 19951122, - PdbTpiV50 = 19961031, - PdbTpiV70 = 19990903, - PdbTpiV80 = 20040203, -}; - -enum PdbRaw_DbiSecContribVer : uint32_t { - DbiSecContribVer60 = 0xeffe0000 + 19970605, - DbiSecContribV2 = 0xeffe0000 + 20140516 -}; - -enum SpecialStream : uint32_t { - // Stream 0 contains the copy of previous version of the MSF directory. - // We are not currently using it, but technically if we find the main - // MSF is corrupted, we could fallback to it. - OldMSFDirectory = 0, - - StreamPDB = 1, - StreamTPI = 2, - StreamDBI = 3, - StreamIPI = 4, -}; - -enum class DbgHeaderType : uint16_t { - FPO, - Exception, - Fixup, - OmapToSrc, - OmapFromSrc, - SectionHdr, - TokenRidMap, - Xdata, - Pdata, - NewFPO, - SectionHdrOrig, - Max -}; - -enum class OMFSegDescFlags : uint16_t { - Read = 1 << 0, // Segment is readable. - Write = 1 << 1, // Segment is writable. - Execute = 1 << 2, // Segment is executable. - AddressIs32Bit = 1 << 3, // Descriptor describes a 32-bit linear address. - IsSelector = 1 << 8, // Frame represents a selector. - IsAbsoluteAddress = 1 << 9, // Frame represents an absolute address. - IsGroup = 1 << 10 // If set, descriptor represents a group. -}; - -} // end namespace pdb -} // end namespace llvm - -#endif // LLVM_DEBUGINFO_PDB_RAW_PDBRAWCONSTANTS_H diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/RawError.h b/llvm/include/llvm/DebugInfo/PDB/Raw/RawError.h deleted file mode 100644 index b0687cdd..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/RawError.h +++ /dev/null @@ -1,49 +0,0 @@ -//===- RawError.h - Error extensions for raw PDB implementation -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_RAWERROR_H -#define LLVM_DEBUGINFO_PDB_RAW_RAWERROR_H - -#include "llvm/Support/Error.h" - -#include - -namespace llvm { -namespace pdb { -enum class raw_error_code { - unspecified = 1, - feature_unsupported, - corrupt_file, - insufficient_buffer, - no_stream, - index_out_of_bounds, - invalid_block_address, - not_writable, - invalid_tpi_hash, -}; - -/// Base class for errors originating when parsing raw PDB files -class RawError : public ErrorInfo { -public: - static char ID; - RawError(raw_error_code C); - RawError(const std::string &Context); - RawError(raw_error_code C, const std::string &Context); - - void log(raw_ostream &OS) const override; - const std::string &getErrorMessage() const; - std::error_code convertToErrorCode() const override; - -private: - std::string ErrMsg; - raw_error_code Code; -}; -} -} -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/RawSession.h b/llvm/include/llvm/DebugInfo/PDB/Raw/RawSession.h deleted file mode 100644 index 73d281ea..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/RawSession.h +++ /dev/null @@ -1,75 +0,0 @@ -//===- RawSession.h - Native implementation of IPDBSession ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_RAWSESSION_H -#define LLVM_DEBUGINFO_PDB_RAW_RAWSESSION_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/DebugInfo/PDB/IPDBSession.h" -#include "llvm/Support/Error.h" - -namespace llvm { -namespace pdb { -class PDBFile; - -class RawSession : public IPDBSession { -public: - explicit RawSession(std::unique_ptr PdbFile); - ~RawSession() override; - - static Error createFromPdb(StringRef Path, - std::unique_ptr &Session); - static Error createFromExe(StringRef Path, - std::unique_ptr &Session); - - uint64_t getLoadAddress() const override; - void setLoadAddress(uint64_t Address) override; - std::unique_ptr getGlobalScope() const override; - std::unique_ptr getSymbolById(uint32_t SymbolId) const override; - - std::unique_ptr - findSymbolByAddress(uint64_t Address, PDB_SymType Type) const override; - - std::unique_ptr - findLineNumbers(const PDBSymbolCompiland &Compiland, - const IPDBSourceFile &File) const override; - std::unique_ptr - findLineNumbersByAddress(uint64_t Address, uint32_t Length) const override; - - std::unique_ptr - findSourceFiles(const PDBSymbolCompiland *Compiland, llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr - findOneSourceFile(const PDBSymbolCompiland *Compiland, - llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr> - findCompilandsForSourceFile(llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr - findOneCompilandForSourceFile(llvm::StringRef Pattern, - PDB_NameSearchFlags Flags) const override; - std::unique_ptr getAllSourceFiles() const override; - std::unique_ptr getSourceFilesForCompiland( - const PDBSymbolCompiland &Compiland) const override; - std::unique_ptr - getSourceFileById(uint32_t FileId) const override; - - std::unique_ptr getDebugStreams() const override; - - PDBFile &getPDBFile() { return *Pdb; } - const PDBFile &getPDBFile() const { return *Pdb; } - -private: - std::unique_ptr Pdb; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/RawTypes.h b/llvm/include/llvm/DebugInfo/PDB/Raw/RawTypes.h deleted file mode 100644 index afcfe940..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/RawTypes.h +++ /dev/null @@ -1,86 +0,0 @@ -//===- RawTypes.h -----------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_RAWTYPES_H -#define LLVM_DEBUGINFO_PDB_RAW_RAWTYPES_H - -#include "llvm/DebugInfo/CodeView/TypeRecord.h" -#include "llvm/Support/Endian.h" - -namespace llvm { -namespace pdb { -// This struct is defined as "SO" in langapi/include/pdb.h. -struct SectionOffset { - support::ulittle32_t Off; - support::ulittle16_t Isect; - char Padding[2]; -}; - -// This is HRFile. -struct PSHashRecord { - support::ulittle32_t Off; // Offset in the symbol record stream - support::ulittle32_t CRef; -}; - -// This struct is defined as `SC` in include/dbicommon.h -struct SectionContrib { - support::ulittle16_t ISect; - char Padding[2]; - support::little32_t Off; - support::little32_t Size; - support::ulittle32_t Characteristics; - support::ulittle16_t Imod; - char Padding2[2]; - support::ulittle32_t DataCrc; - support::ulittle32_t RelocCrc; -}; - -// This struct is defined as `SC2` in include/dbicommon.h -struct SectionContrib2 { - // To guarantee SectionContrib2 is standard layout, we cannot use inheritance. - SectionContrib Base; - support::ulittle32_t ISectCoff; -}; - -// This corresponds to the `OMFSegMap` structure. -struct SecMapHeader { - support::ulittle16_t SecCount; // Number of segment descriptors in table - support::ulittle16_t SecCountLog; // Number of logical segment descriptors -}; - -// This corresponds to the `OMFSegMapDesc` structure. The definition is not -// present in the reference implementation, but the layout is derived from -// code that accesses the fields. -struct SecMapEntry { - support::ulittle16_t Flags; // Descriptor flags. See OMFSegDescFlags - support::ulittle16_t Ovl; // Logical overlay number. - support::ulittle16_t Group; // Group index into descriptor array. - support::ulittle16_t Frame; - support::ulittle16_t SecName; // Byte index of the segment or group name - // in the sstSegName table, or 0xFFFF. - support::ulittle16_t ClassName; // Byte index of the class name in the - // sstSegName table, or 0xFFFF. - support::ulittle32_t Offset; // Byte offset of the logical segment - // within the specified physical segment. - // If group is set in flags, offset is the - // offset of the group. - support::ulittle32_t SecByteLength; // Byte count of the segment or group. -}; - -// Used for serialized hash table in TPI stream. -// In the reference, it is an array of TI and cbOff pair. -struct TypeIndexOffset { - codeview::TypeIndex Type; - support::ulittle32_t Offset; -}; - -} // namespace pdb -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/SymbolStream.h b/llvm/include/llvm/DebugInfo/PDB/Raw/SymbolStream.h deleted file mode 100644 index 685a2341..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/SymbolStream.h +++ /dev/null @@ -1,41 +0,0 @@ -//===- SymbolStream.cpp - PDB Symbol Stream Access --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBSYMBOLSTREAM_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBSYMBOLSTREAM_H - -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/SymbolRecord.h" -#include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h" - -#include "llvm/Support/Error.h" - -namespace llvm { -namespace pdb { -class PDBFile; - -class SymbolStream { -public: - SymbolStream(std::unique_ptr Stream); - ~SymbolStream(); - Error reload(); - - iterator_range - getSymbols(bool *HadError) const; - - Error commit(); - -private: - codeview::CVSymbolArray SymbolRecords; - std::unique_ptr Stream; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h b/llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h deleted file mode 100644 index 4f36d70a..00000000 --- a/llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h +++ /dev/null @@ -1,72 +0,0 @@ -//===- TpiStream.cpp - PDB Type Info (TPI) Stream 2 Access ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_PDB_RAW_PDBTPISTREAM_H -#define LLVM_DEBUGINFO_PDB_RAW_PDBTPISTREAM_H - -#include "llvm/DebugInfo/CodeView/StreamArray.h" -#include "llvm/DebugInfo/CodeView/StreamRef.h" -#include "llvm/DebugInfo/CodeView/TypeRecord.h" -#include "llvm/DebugInfo/PDB/PDBTypes.h" -#include "llvm/DebugInfo/PDB/Raw/MappedBlockStream.h" -#include "llvm/DebugInfo/PDB/Raw/RawConstants.h" -#include "llvm/DebugInfo/PDB/Raw/RawTypes.h" -#include "llvm/Support/raw_ostream.h" - -#include "llvm/Support/Error.h" - -namespace llvm { -namespace pdb { -class PDBFile; - -class TpiStream { - struct HeaderInfo; - -public: - TpiStream(const PDBFile &File, std::unique_ptr Stream); - ~TpiStream(); - Error reload(); - - PdbRaw_TpiVer getTpiVersion() const; - - uint32_t TypeIndexBegin() const; - uint32_t TypeIndexEnd() const; - uint32_t NumTypeRecords() const; - uint16_t getTypeHashStreamIndex() const; - uint16_t getTypeHashStreamAuxIndex() const; - - uint32_t getHashKeySize() const; - uint32_t NumHashBuckets() const; - codeview::FixedStreamArray getHashValues() const; - codeview::FixedStreamArray getTypeIndexOffsets() const; - codeview::FixedStreamArray getHashAdjustments() const; - - iterator_range types(bool *HadError) const; - - Error commit(); - -private: - Error verifyHashValues(); - - const PDBFile &Pdb; - std::unique_ptr Stream; - - codeview::CVTypeArray TypeRecords; - - std::unique_ptr HashStream; - codeview::FixedStreamArray HashValues; - codeview::FixedStreamArray TypeIndexOffsets; - codeview::FixedStreamArray HashAdjustments; - - const HeaderInfo *Header; -}; -} -} - -#endif diff --git a/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h b/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h deleted file mode 100644 index 49f86eae..00000000 --- a/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h +++ /dev/null @@ -1,50 +0,0 @@ -//===- llvm/DebugInfo/Symbolize/DIPrinter.h ---------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the DIPrinter class, which is responsible for printing -// structures defined in DebugInfo/DIContext.h -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_DEBUGINFO_SYMBOLIZE_DIPRINTER_H -#define LLVM_DEBUGINFO_SYMBOLIZE_DIPRINTER_H - -#include "llvm/Support/raw_ostream.h" - -namespace llvm { -struct DILineInfo; -class DIInliningInfo; -struct DIGlobal; - -namespace symbolize { - -class DIPrinter { - raw_ostream &OS; - bool PrintFunctionNames; - bool PrintPretty; - int PrintSourceContext; - - void print(const DILineInfo &Info, bool Inlined); - void printContext(const std::string &FileName, int64_t Line); - -public: - DIPrinter(raw_ostream &OS, bool PrintFunctionNames = true, - bool PrintPretty = false, int PrintSourceContext = 0) - : OS(OS), PrintFunctionNames(PrintFunctionNames), - PrintPretty(PrintPretty), PrintSourceContext(PrintSourceContext) {} - - DIPrinter &operator<<(const DILineInfo &Info); - DIPrinter &operator<<(const DIInliningInfo &Info); - DIPrinter &operator<<(const DIGlobal &Global); -}; -} -} - -#endif - diff --git a/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h b/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h deleted file mode 100644 index e0bec6f6..00000000 --- a/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h +++ /dev/null @@ -1,51 +0,0 @@ -//===-- SymbolizableModule.h ------------------------------------ C++ -----===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the SymbolizableModule interface. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H -#define LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H - -#include "llvm/DebugInfo/DIContext.h" - -namespace llvm { -namespace object { -class ObjectFile; -} -} - -namespace llvm { -namespace symbolize { - -using FunctionNameKind = DILineInfoSpecifier::FunctionNameKind; - -class SymbolizableModule { -public: - virtual ~SymbolizableModule() {} - virtual DILineInfo symbolizeCode(uint64_t ModuleOffset, - FunctionNameKind FNKind, - bool UseSymbolTable) const = 0; - virtual DIInliningInfo symbolizeInlinedCode(uint64_t ModuleOffset, - FunctionNameKind FNKind, - bool UseSymbolTable) const = 0; - virtual DIGlobal symbolizeData(uint64_t ModuleOffset) const = 0; - - // Return true if this is a 32-bit x86 PE COFF module. - virtual bool isWin32Module() const = 0; - - // Returns the preferred base of the module, i.e. where the loader would place - // it in memory assuming there were no conflicts. - virtual uint64_t getModulePreferredBase() const = 0; -}; - -} // namespace symbolize -} // namespace llvm - -#endif // LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZABLEMODULE_H diff --git a/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h b/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h deleted file mode 100644 index 9253adf7..00000000 --- a/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h +++ /dev/null @@ -1,111 +0,0 @@ -//===-- Symbolize.h --------------------------------------------- C++ -----===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Header for LLVM symbolization library. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZE_H -#define LLVM_DEBUGINFO_SYMBOLIZE_SYMBOLIZE_H - -#include "llvm/DebugInfo/Symbolize/SymbolizableModule.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Support/ErrorOr.h" -#include -#include -#include -#include - -namespace llvm { -namespace symbolize { - -using namespace object; -using FunctionNameKind = DILineInfoSpecifier::FunctionNameKind; - -class LLVMSymbolizer { -public: - struct Options { - FunctionNameKind PrintFunctions; - bool UseSymbolTable : 1; - bool Demangle : 1; - bool RelativeAddresses : 1; - std::string DefaultArch; - std::vector DsymHints; - Options(FunctionNameKind PrintFunctions = FunctionNameKind::LinkageName, - bool UseSymbolTable = true, bool Demangle = true, - bool RelativeAddresses = false, std::string DefaultArch = "") - : PrintFunctions(PrintFunctions), UseSymbolTable(UseSymbolTable), - Demangle(Demangle), RelativeAddresses(RelativeAddresses), - DefaultArch(std::move(DefaultArch)) {} - }; - - LLVMSymbolizer(const Options &Opts = Options()) : Opts(Opts) {} - ~LLVMSymbolizer() { - flush(); - } - - Expected symbolizeCode(const std::string &ModuleName, - uint64_t ModuleOffset); - Expected symbolizeInlinedCode(const std::string &ModuleName, - uint64_t ModuleOffset); - Expected symbolizeData(const std::string &ModuleName, - uint64_t ModuleOffset); - void flush(); - static std::string DemangleName(const std::string &Name, - const SymbolizableModule *ModInfo); - -private: - // Bundles together object file with code/data and object file with - // corresponding debug info. These objects can be the same. - typedef std::pair ObjectPair; - - /// Returns a SymbolizableModule or an error if loading debug info failed. - /// Only one attempt is made to load a module, and errors during loading are - /// only reported once. Subsequent calls to get module info for a module that - /// failed to load will return nullptr. - Expected - getOrCreateModuleInfo(const std::string &ModuleName); - - ObjectFile *lookUpDsymFile(const std::string &Path, - const MachOObjectFile *ExeObj, - const std::string &ArchName); - ObjectFile *lookUpDebuglinkObject(const std::string &Path, - const ObjectFile *Obj, - const std::string &ArchName); - - /// \brief Returns pair of pointers to object and debug object. - Expected getOrCreateObjectPair(const std::string &Path, - const std::string &ArchName); - - /// \brief Return a pointer to object file at specified path, for a specified - /// architecture (e.g. if path refers to a Mach-O universal binary, only one - /// object file from it will be returned). - Expected getOrCreateObject(const std::string &Path, - const std::string &ArchName); - - std::map> Modules; - - /// \brief Contains cached results of getOrCreateObjectPair(). - std::map, ObjectPair> - ObjectPairForPathArch; - - /// \brief Contains parsed binary for each path, or parsing error. - std::map> BinaryForPath; - - /// \brief Parsed object file for path/architecture pair, where "path" refers - /// to Mach-O universal binary. - std::map, std::unique_ptr> - ObjectForUBPathAndArch; - - Options Opts; -}; - -} // namespace symbolize -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h deleted file mode 100644 index ab13028b..00000000 --- a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h +++ /dev/null @@ -1,649 +0,0 @@ -//===- ExecutionEngine.h - Abstract Execution Engine Interface --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the abstract interface that implements execution support -// for LLVM. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_EXECUTIONENGINE_H -#define LLVM_EXECUTIONENGINE_EXECUTIONENGINE_H - -#include "RuntimeDyld.h" -#include "llvm-c/ExecutionEngine.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/IR/ValueMap.h" -#include "llvm/Object/Binary.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/Mutex.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetOptions.h" -#include -#include -#include -#include - -namespace llvm { - -struct GenericValue; -class Constant; -class DataLayout; -class ExecutionEngine; -class Function; -class GlobalVariable; -class GlobalValue; -class JITEventListener; -class MachineCodeInfo; -class MCJITMemoryManager; -class MutexGuard; -class ObjectCache; -class RTDyldMemoryManager; -class Triple; -class Type; - -namespace object { - class Archive; - class ObjectFile; -} - -/// \brief Helper class for helping synchronize access to the global address map -/// table. Access to this class should be serialized under a mutex. -class ExecutionEngineState { -public: - typedef StringMap GlobalAddressMapTy; - -private: - - /// GlobalAddressMap - A mapping between LLVM global symbol names values and - /// their actualized version... - GlobalAddressMapTy GlobalAddressMap; - - /// GlobalAddressReverseMap - This is the reverse mapping of GlobalAddressMap, - /// used to convert raw addresses into the LLVM global value that is emitted - /// at the address. This map is not computed unless getGlobalValueAtAddress - /// is called at some point. - std::map GlobalAddressReverseMap; - -public: - - GlobalAddressMapTy &getGlobalAddressMap() { - return GlobalAddressMap; - } - - std::map &getGlobalAddressReverseMap() { - return GlobalAddressReverseMap; - } - - /// \brief Erase an entry from the mapping table. - /// - /// \returns The address that \p ToUnmap was happed to. - uint64_t RemoveMapping(StringRef Name); -}; - -using FunctionCreator = std::function; - -/// \brief Abstract interface for implementation execution of LLVM modules, -/// designed to support both interpreter and just-in-time (JIT) compiler -/// implementations. -class ExecutionEngine { - /// The state object holding the global address mapping, which must be - /// accessed synchronously. - // - // FIXME: There is no particular need the entire map needs to be - // synchronized. Wouldn't a reader-writer design be better here? - ExecutionEngineState EEState; - - /// The target data for the platform for which execution is being performed. - /// - /// Note: the DataLayout is LLVMContext specific because it has an - /// internal cache based on type pointers. It makes unsafe to reuse the - /// ExecutionEngine across context, we don't enforce this rule but undefined - /// behavior can occurs if the user tries to do it. - const DataLayout DL; - - /// Whether lazy JIT compilation is enabled. - bool CompilingLazily; - - /// Whether JIT compilation of external global variables is allowed. - bool GVCompilationDisabled; - - /// Whether the JIT should perform lookups of external symbols (e.g., - /// using dlsym). - bool SymbolSearchingDisabled; - - /// Whether the JIT should verify IR modules during compilation. - bool VerifyModules; - - friend class EngineBuilder; // To allow access to JITCtor and InterpCtor. - -protected: - /// The list of Modules that we are JIT'ing from. We use a SmallVector to - /// optimize for the case where there is only one module. - SmallVector, 1> Modules; - - /// getMemoryforGV - Allocate memory for a global variable. - virtual char *getMemoryForGV(const GlobalVariable *GV); - - static ExecutionEngine *(*MCJITCtor)( - std::unique_ptr M, - std::string *ErrorStr, - std::shared_ptr MM, - std::shared_ptr SR, - std::unique_ptr TM); - - static ExecutionEngine *(*OrcMCJITReplacementCtor)( - std::string *ErrorStr, - std::shared_ptr MM, - std::shared_ptr SR, - std::unique_ptr TM); - - static ExecutionEngine *(*InterpCtor)(std::unique_ptr M, - std::string *ErrorStr); - - /// LazyFunctionCreator - If an unknown function is needed, this function - /// pointer is invoked to create it. If this returns null, the JIT will - /// abort. - FunctionCreator LazyFunctionCreator; - - /// getMangledName - Get mangled name. - std::string getMangledName(const GlobalValue *GV); - -public: - /// lock - This lock protects the ExecutionEngine and MCJIT classes. It must - /// be held while changing the internal state of any of those classes. - sys::Mutex lock; - - //===--------------------------------------------------------------------===// - // ExecutionEngine Startup - //===--------------------------------------------------------------------===// - - virtual ~ExecutionEngine(); - - /// Add a Module to the list of modules that we can JIT from. - virtual void addModule(std::unique_ptr M) { - Modules.push_back(std::move(M)); - } - - /// addObjectFile - Add an ObjectFile to the execution engine. - /// - /// This method is only supported by MCJIT. MCJIT will immediately load the - /// object into memory and adds its symbols to the list used to resolve - /// external symbols while preparing other objects for execution. - /// - /// Objects added using this function will not be made executable until - /// needed by another object. - /// - /// MCJIT will take ownership of the ObjectFile. - virtual void addObjectFile(std::unique_ptr O); - virtual void addObjectFile(object::OwningBinary O); - - /// addArchive - Add an Archive to the execution engine. - /// - /// This method is only supported by MCJIT. MCJIT will use the archive to - /// resolve external symbols in objects it is loading. If a symbol is found - /// in the Archive the contained object file will be extracted (in memory) - /// and loaded for possible execution. - virtual void addArchive(object::OwningBinary A); - - //===--------------------------------------------------------------------===// - - const DataLayout &getDataLayout() const { return DL; } - - /// removeModule - Remove a Module from the list of modules. Returns true if - /// M is found. - virtual bool removeModule(Module *M); - - /// FindFunctionNamed - Search all of the active modules to find the function that - /// defines FnName. This is very slow operation and shouldn't be used for - /// general code. - virtual Function *FindFunctionNamed(const char *FnName); - - /// FindGlobalVariableNamed - Search all of the active modules to find the global variable - /// that defines Name. This is very slow operation and shouldn't be used for - /// general code. - virtual GlobalVariable *FindGlobalVariableNamed(const char *Name, bool AllowInternal = false); - - /// runFunction - Execute the specified function with the specified arguments, - /// and return the result. - virtual GenericValue runFunction(Function *F, - ArrayRef ArgValues) = 0; - - /// getPointerToNamedFunction - This method returns the address of the - /// specified function by using the dlsym function call. As such it is only - /// useful for resolving library symbols, not code generated symbols. - /// - /// If AbortOnFailure is false and no function with the given name is - /// found, this function silently returns a null pointer. Otherwise, - /// it prints a message to stderr and aborts. - /// - /// This function is deprecated for the MCJIT execution engine. - virtual void *getPointerToNamedFunction(StringRef Name, - bool AbortOnFailure = true) = 0; - - /// mapSectionAddress - map a section to its target address space value. - /// Map the address of a JIT section as returned from the memory manager - /// to the address in the target process as the running code will see it. - /// This is the address which will be used for relocation resolution. - virtual void mapSectionAddress(const void *LocalAddress, - uint64_t TargetAddress) { - llvm_unreachable("Re-mapping of section addresses not supported with this " - "EE!"); - } - - /// generateCodeForModule - Run code generation for the specified module and - /// load it into memory. - /// - /// When this function has completed, all code and data for the specified - /// module, and any module on which this module depends, will be generated - /// and loaded into memory, but relocations will not yet have been applied - /// and all memory will be readable and writable but not executable. - /// - /// This function is primarily useful when generating code for an external - /// target, allowing the client an opportunity to remap section addresses - /// before relocations are applied. Clients that intend to execute code - /// locally can use the getFunctionAddress call, which will generate code - /// and apply final preparations all in one step. - /// - /// This method has no effect for the interpeter. - virtual void generateCodeForModule(Module *M) {} - - /// finalizeObject - ensure the module is fully processed and is usable. - /// - /// It is the user-level function for completing the process of making the - /// object usable for execution. It should be called after sections within an - /// object have been relocated using mapSectionAddress. When this method is - /// called the MCJIT execution engine will reapply relocations for a loaded - /// object. This method has no effect for the interpeter. - virtual void finalizeObject() {} - - /// runStaticConstructorsDestructors - This method is used to execute all of - /// the static constructors or destructors for a program. - /// - /// \param isDtors - Run the destructors instead of constructors. - virtual void runStaticConstructorsDestructors(bool isDtors); - - /// This method is used to execute all of the static constructors or - /// destructors for a particular module. - /// - /// \param isDtors - Run the destructors instead of constructors. - void runStaticConstructorsDestructors(Module &module, bool isDtors); - - - /// runFunctionAsMain - This is a helper function which wraps runFunction to - /// handle the common task of starting up main with the specified argc, argv, - /// and envp parameters. - int runFunctionAsMain(Function *Fn, const std::vector &argv, - const char * const * envp); - - - /// addGlobalMapping - Tell the execution engine that the specified global is - /// at the specified location. This is used internally as functions are JIT'd - /// and as global variables are laid out in memory. It can and should also be - /// used by clients of the EE that want to have an LLVM global overlay - /// existing data in memory. Values to be mapped should be named, and have - /// external or weak linkage. Mappings are automatically removed when their - /// GlobalValue is destroyed. - void addGlobalMapping(const GlobalValue *GV, void *Addr); - void addGlobalMapping(StringRef Name, uint64_t Addr); - - /// clearAllGlobalMappings - Clear all global mappings and start over again, - /// for use in dynamic compilation scenarios to move globals. - void clearAllGlobalMappings(); - - /// clearGlobalMappingsFromModule - Clear all global mappings that came from a - /// particular module, because it has been removed from the JIT. - void clearGlobalMappingsFromModule(Module *M); - - /// updateGlobalMapping - Replace an existing mapping for GV with a new - /// address. This updates both maps as required. If "Addr" is null, the - /// entry for the global is removed from the mappings. This returns the old - /// value of the pointer, or null if it was not in the map. - uint64_t updateGlobalMapping(const GlobalValue *GV, void *Addr); - uint64_t updateGlobalMapping(StringRef Name, uint64_t Addr); - - /// getAddressToGlobalIfAvailable - This returns the address of the specified - /// global symbol. - uint64_t getAddressToGlobalIfAvailable(StringRef S); - - /// getPointerToGlobalIfAvailable - This returns the address of the specified - /// global value if it is has already been codegen'd, otherwise it returns - /// null. - void *getPointerToGlobalIfAvailable(StringRef S); - void *getPointerToGlobalIfAvailable(const GlobalValue *GV); - - /// getPointerToGlobal - This returns the address of the specified global - /// value. This may involve code generation if it's a function. - /// - /// This function is deprecated for the MCJIT execution engine. Use - /// getGlobalValueAddress instead. - void *getPointerToGlobal(const GlobalValue *GV); - - /// getPointerToFunction - The different EE's represent function bodies in - /// different ways. They should each implement this to say what a function - /// pointer should look like. When F is destroyed, the ExecutionEngine will - /// remove its global mapping and free any machine code. Be sure no threads - /// are running inside F when that happens. - /// - /// This function is deprecated for the MCJIT execution engine. Use - /// getFunctionAddress instead. - virtual void *getPointerToFunction(Function *F) = 0; - - /// getPointerToFunctionOrStub - If the specified function has been - /// code-gen'd, return a pointer to the function. If not, compile it, or use - /// a stub to implement lazy compilation if available. See - /// getPointerToFunction for the requirements on destroying F. - /// - /// This function is deprecated for the MCJIT execution engine. Use - /// getFunctionAddress instead. - virtual void *getPointerToFunctionOrStub(Function *F) { - // Default implementation, just codegen the function. - return getPointerToFunction(F); - } - - /// getGlobalValueAddress - Return the address of the specified global - /// value. This may involve code generation. - /// - /// This function should not be called with the interpreter engine. - virtual uint64_t getGlobalValueAddress(const std::string &Name) { - // Default implementation for the interpreter. MCJIT will override this. - // JIT and interpreter clients should use getPointerToGlobal instead. - return 0; - } - - /// getFunctionAddress - Return the address of the specified function. - /// This may involve code generation. - virtual uint64_t getFunctionAddress(const std::string &Name) { - // Default implementation for the interpreter. MCJIT will override this. - // Interpreter clients should use getPointerToFunction instead. - return 0; - } - - /// getGlobalValueAtAddress - Return the LLVM global value object that starts - /// at the specified address. - /// - const GlobalValue *getGlobalValueAtAddress(void *Addr); - - /// StoreValueToMemory - Stores the data in Val of type Ty at address Ptr. - /// Ptr is the address of the memory at which to store Val, cast to - /// GenericValue *. It is not a pointer to a GenericValue containing the - /// address at which to store Val. - void StoreValueToMemory(const GenericValue &Val, GenericValue *Ptr, - Type *Ty); - - void InitializeMemory(const Constant *Init, void *Addr); - - /// getOrEmitGlobalVariable - Return the address of the specified global - /// variable, possibly emitting it to memory if needed. This is used by the - /// Emitter. - /// - /// This function is deprecated for the MCJIT execution engine. Use - /// getGlobalValueAddress instead. - virtual void *getOrEmitGlobalVariable(const GlobalVariable *GV) { - return getPointerToGlobal((const GlobalValue *)GV); - } - - /// Registers a listener to be called back on various events within - /// the JIT. See JITEventListener.h for more details. Does not - /// take ownership of the argument. The argument may be NULL, in - /// which case these functions do nothing. - virtual void RegisterJITEventListener(JITEventListener *) {} - virtual void UnregisterJITEventListener(JITEventListener *) {} - - /// Sets the pre-compiled object cache. The ownership of the ObjectCache is - /// not changed. Supported by MCJIT but not the interpreter. - virtual void setObjectCache(ObjectCache *) { - llvm_unreachable("No support for an object cache"); - } - - /// setProcessAllSections (MCJIT Only): By default, only sections that are - /// "required for execution" are passed to the RTDyldMemoryManager, and other - /// sections are discarded. Passing 'true' to this method will cause - /// RuntimeDyld to pass all sections to its RTDyldMemoryManager regardless - /// of whether they are "required to execute" in the usual sense. - /// - /// Rationale: Some MCJIT clients want to be able to inspect metadata - /// sections (e.g. Dwarf, Stack-maps) to enable functionality or analyze - /// performance. Passing these sections to the memory manager allows the - /// client to make policy about the relevant sections, rather than having - /// MCJIT do it. - virtual void setProcessAllSections(bool ProcessAllSections) { - llvm_unreachable("No support for ProcessAllSections option"); - } - - /// Return the target machine (if available). - virtual TargetMachine *getTargetMachine() { return nullptr; } - - /// DisableLazyCompilation - When lazy compilation is off (the default), the - /// JIT will eagerly compile every function reachable from the argument to - /// getPointerToFunction. If lazy compilation is turned on, the JIT will only - /// compile the one function and emit stubs to compile the rest when they're - /// first called. If lazy compilation is turned off again while some lazy - /// stubs are still around, and one of those stubs is called, the program will - /// abort. - /// - /// In order to safely compile lazily in a threaded program, the user must - /// ensure that 1) only one thread at a time can call any particular lazy - /// stub, and 2) any thread modifying LLVM IR must hold the JIT's lock - /// (ExecutionEngine::lock) or otherwise ensure that no other thread calls a - /// lazy stub. See http://llvm.org/PR5184 for details. - void DisableLazyCompilation(bool Disabled = true) { - CompilingLazily = !Disabled; - } - bool isCompilingLazily() const { - return CompilingLazily; - } - - /// DisableGVCompilation - If called, the JIT will abort if it's asked to - /// allocate space and populate a GlobalVariable that is not internal to - /// the module. - void DisableGVCompilation(bool Disabled = true) { - GVCompilationDisabled = Disabled; - } - bool isGVCompilationDisabled() const { - return GVCompilationDisabled; - } - - /// DisableSymbolSearching - If called, the JIT will not try to lookup unknown - /// symbols with dlsym. A client can still use InstallLazyFunctionCreator to - /// resolve symbols in a custom way. - void DisableSymbolSearching(bool Disabled = true) { - SymbolSearchingDisabled = Disabled; - } - bool isSymbolSearchingDisabled() const { - return SymbolSearchingDisabled; - } - - /// Enable/Disable IR module verification. - /// - /// Note: Module verification is enabled by default in Debug builds, and - /// disabled by default in Release. Use this method to override the default. - void setVerifyModules(bool Verify) { - VerifyModules = Verify; - } - bool getVerifyModules() const { - return VerifyModules; - } - - /// InstallLazyFunctionCreator - If an unknown function is needed, the - /// specified function pointer is invoked to create it. If it returns null, - /// the JIT will abort. - void InstallLazyFunctionCreator(FunctionCreator C) { - LazyFunctionCreator = std::move(C); - } - -protected: - ExecutionEngine(DataLayout DL) : DL(std::move(DL)) {} - explicit ExecutionEngine(DataLayout DL, std::unique_ptr M); - explicit ExecutionEngine(std::unique_ptr M); - - void emitGlobals(); - - void EmitGlobalVariable(const GlobalVariable *GV); - - GenericValue getConstantValue(const Constant *C); - void LoadValueFromMemory(GenericValue &Result, GenericValue *Ptr, - Type *Ty); - -private: - void Init(std::unique_ptr M); -}; - -namespace EngineKind { - // These are actually bitmasks that get or-ed together. - enum Kind { - JIT = 0x1, - Interpreter = 0x2 - }; - const static Kind Either = (Kind)(JIT | Interpreter); -} - -/// Builder class for ExecutionEngines. Use this by stack-allocating a builder, -/// chaining the various set* methods, and terminating it with a .create() -/// call. -class EngineBuilder { -private: - std::unique_ptr M; - EngineKind::Kind WhichEngine; - std::string *ErrorStr; - CodeGenOpt::Level OptLevel; - std::shared_ptr MemMgr; - std::shared_ptr Resolver; - TargetOptions Options; - Optional RelocModel; - CodeModel::Model CMModel; - std::string MArch; - std::string MCPU; - SmallVector MAttrs; - bool VerifyModules; - bool UseOrcMCJITReplacement; - -public: - /// Default constructor for EngineBuilder. - EngineBuilder(); - - /// Constructor for EngineBuilder. - EngineBuilder(std::unique_ptr M); - - // Out-of-line since we don't have the def'n of RTDyldMemoryManager here. - ~EngineBuilder(); - - /// setEngineKind - Controls whether the user wants the interpreter, the JIT, - /// or whichever engine works. This option defaults to EngineKind::Either. - EngineBuilder &setEngineKind(EngineKind::Kind w) { - WhichEngine = w; - return *this; - } - - /// setMCJITMemoryManager - Sets the MCJIT memory manager to use. This allows - /// clients to customize their memory allocation policies for the MCJIT. This - /// is only appropriate for the MCJIT; setting this and configuring the builder - /// to create anything other than MCJIT will cause a runtime error. If create() - /// is called and is successful, the created engine takes ownership of the - /// memory manager. This option defaults to NULL. - EngineBuilder &setMCJITMemoryManager(std::unique_ptr mcjmm); - - EngineBuilder& - setMemoryManager(std::unique_ptr MM); - - EngineBuilder& - setSymbolResolver(std::unique_ptr SR); - - /// setErrorStr - Set the error string to write to on error. This option - /// defaults to NULL. - EngineBuilder &setErrorStr(std::string *e) { - ErrorStr = e; - return *this; - } - - /// setOptLevel - Set the optimization level for the JIT. This option - /// defaults to CodeGenOpt::Default. - EngineBuilder &setOptLevel(CodeGenOpt::Level l) { - OptLevel = l; - return *this; - } - - /// setTargetOptions - Set the target options that the ExecutionEngine - /// target is using. Defaults to TargetOptions(). - EngineBuilder &setTargetOptions(const TargetOptions &Opts) { - Options = Opts; - return *this; - } - - /// setRelocationModel - Set the relocation model that the ExecutionEngine - /// target is using. Defaults to target specific default "Reloc::Default". - EngineBuilder &setRelocationModel(Reloc::Model RM) { - RelocModel = RM; - return *this; - } - - /// setCodeModel - Set the CodeModel that the ExecutionEngine target - /// data is using. Defaults to target specific default - /// "CodeModel::JITDefault". - EngineBuilder &setCodeModel(CodeModel::Model M) { - CMModel = M; - return *this; - } - - /// setMArch - Override the architecture set by the Module's triple. - EngineBuilder &setMArch(StringRef march) { - MArch.assign(march.begin(), march.end()); - return *this; - } - - /// setMCPU - Target a specific cpu type. - EngineBuilder &setMCPU(StringRef mcpu) { - MCPU.assign(mcpu.begin(), mcpu.end()); - return *this; - } - - /// setVerifyModules - Set whether the JIT implementation should verify - /// IR modules during compilation. - EngineBuilder &setVerifyModules(bool Verify) { - VerifyModules = Verify; - return *this; - } - - /// setMAttrs - Set cpu-specific attributes. - template - EngineBuilder &setMAttrs(const StringSequence &mattrs) { - MAttrs.clear(); - MAttrs.append(mattrs.begin(), mattrs.end()); - return *this; - } - - // \brief Use OrcMCJITReplacement instead of MCJIT. Off by default. - void setUseOrcMCJITReplacement(bool UseOrcMCJITReplacement) { - this->UseOrcMCJITReplacement = UseOrcMCJITReplacement; - } - - TargetMachine *selectTarget(); - - /// selectTarget - Pick a target either via -march or by guessing the native - /// arch. Add any CPU features specified via -mcpu or -mattr. - TargetMachine *selectTarget(const Triple &TargetTriple, - StringRef MArch, - StringRef MCPU, - const SmallVectorImpl& MAttrs); - - ExecutionEngine *create() { - return create(selectTarget()); - } - - ExecutionEngine *create(TargetMachine *TM); -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ExecutionEngine, LLVMExecutionEngineRef) - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/GenericValue.h b/llvm/include/llvm/ExecutionEngine/GenericValue.h deleted file mode 100644 index 53774551..00000000 --- a/llvm/include/llvm/ExecutionEngine/GenericValue.h +++ /dev/null @@ -1,54 +0,0 @@ -//===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// The GenericValue class is used to represent an LLVM value of arbitrary type. -// -//===----------------------------------------------------------------------===// - - -#ifndef LLVM_EXECUTIONENGINE_GENERICVALUE_H -#define LLVM_EXECUTIONENGINE_GENERICVALUE_H - -#include "llvm/ADT/APInt.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -typedef void* PointerTy; -class APInt; - -struct GenericValue { - struct IntPair { - unsigned int first; - unsigned int second; - }; - union { - double DoubleVal; - float FloatVal; - PointerTy PointerVal; - struct IntPair UIntPairVal; - unsigned char Untyped[8]; - }; - APInt IntVal; // also used for long doubles. - // For aggregate data types. - std::vector AggregateVal; - - // to make code faster, set GenericValue to zero could be omitted, but it is - // potentially can cause problems, since GenericValue to store garbage - // instead of zero. - GenericValue() : IntVal(1,0) {UIntPairVal.first = 0; UIntPairVal.second = 0;} - explicit GenericValue(void *V) : PointerVal(V), IntVal(1,0) { } -}; - -inline GenericValue PTOGV(void *P) { return GenericValue(P); } -inline void* GVTOP(const GenericValue &GV) { return GV.PointerVal; } - -} // End llvm namespace. -#endif diff --git a/llvm/include/llvm/ExecutionEngine/Interpreter.h b/llvm/include/llvm/ExecutionEngine/Interpreter.h deleted file mode 100644 index a1470784..00000000 --- a/llvm/include/llvm/ExecutionEngine/Interpreter.h +++ /dev/null @@ -1,28 +0,0 @@ -//===-- Interpreter.h - Abstract Execution Engine Interface -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file forces the interpreter to link in on certain operating systems. -// (Windows). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_INTERPRETER_H -#define LLVM_EXECUTIONENGINE_INTERPRETER_H - -#include "llvm/ExecutionEngine/ExecutionEngine.h" - -extern "C" void LLVMLinkInInterpreter(); - -namespace { - struct ForceInterpreterLinking { - ForceInterpreterLinking() { LLVMLinkInInterpreter(); } - } ForceInterpreterLinking; -} - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/JITEventListener.h b/llvm/include/llvm/ExecutionEngine/JITEventListener.h deleted file mode 100644 index be7c0448..00000000 --- a/llvm/include/llvm/ExecutionEngine/JITEventListener.h +++ /dev/null @@ -1,122 +0,0 @@ -//===- JITEventListener.h - Exposes events from JIT compilation -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the JITEventListener interface, which lets users get -// callbacks when significant events happen during the JIT compilation process. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_JITEVENTLISTENER_H -#define LLVM_EXECUTIONENGINE_JITEVENTLISTENER_H - -#include "RuntimeDyld.h" -#include "llvm/Config/llvm-config.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { -class Function; -class MachineFunction; -class OProfileWrapper; -class IntelJITEventsWrapper; - -namespace object { - class ObjectFile; -} - -/// JITEvent_EmittedFunctionDetails - Helper struct for containing information -/// about a generated machine code function. -struct JITEvent_EmittedFunctionDetails { - struct LineStart { - /// The address at which the current line changes. - uintptr_t Address; - - /// The new location information. These can be translated to DebugLocTuples - /// using MF->getDebugLocTuple(). - DebugLoc Loc; - }; - - /// The machine function the struct contains information for. - const MachineFunction *MF; - - /// The list of line boundary information, sorted by address. - std::vector LineStarts; -}; - -/// JITEventListener - Abstract interface for use by the JIT to notify clients -/// about significant events during compilation. For example, to notify -/// profilers and debuggers that need to know where functions have been emitted. -/// -/// The default implementation of each method does nothing. -class JITEventListener { -public: - typedef JITEvent_EmittedFunctionDetails EmittedFunctionDetails; - -public: - JITEventListener() {} - virtual ~JITEventListener() {} - - /// NotifyObjectEmitted - Called after an object has been successfully - /// emitted to memory. NotifyFunctionEmitted will not be called for - /// individual functions in the object. - /// - /// ELF-specific information - /// The ObjectImage contains the generated object image - /// with section headers updated to reflect the address at which sections - /// were loaded and with relocations performed in-place on debug sections. - virtual void NotifyObjectEmitted(const object::ObjectFile &Obj, - const RuntimeDyld::LoadedObjectInfo &L) {} - - /// NotifyFreeingObject - Called just before the memory associated with - /// a previously emitted object is released. - virtual void NotifyFreeingObject(const object::ObjectFile &Obj) {} - - // Get a pointe to the GDB debugger registration listener. - static JITEventListener *createGDBRegistrationListener(); - -#if defined(LLVM_USE_INTEL_JITEVENTS) && LLVM_USE_INTEL_JITEVENTS - // Construct an IntelJITEventListener - static JITEventListener *createIntelJITEventListener(); - - // Construct an IntelJITEventListener with a test Intel JIT API implementation - static JITEventListener *createIntelJITEventListener( - IntelJITEventsWrapper* AlternativeImpl); -#else - static JITEventListener *createIntelJITEventListener() { return nullptr; } - - static JITEventListener *createIntelJITEventListener( - IntelJITEventsWrapper* AlternativeImpl) { - return nullptr; - } -#endif // USE_INTEL_JITEVENTS - -#if defined(LLVM_USE_OPROFILE) && LLVM_USE_OPROFILE - // Construct an OProfileJITEventListener - static JITEventListener *createOProfileJITEventListener(); - - // Construct an OProfileJITEventListener with a test opagent implementation - static JITEventListener *createOProfileJITEventListener( - OProfileWrapper* AlternativeImpl); -#else - - static JITEventListener *createOProfileJITEventListener() { return nullptr; } - - static JITEventListener *createOProfileJITEventListener( - OProfileWrapper* AlternativeImpl) { - return nullptr; - } -#endif // USE_OPROFILE -private: - virtual void anchor(); -}; - -} // end namespace llvm. - -#endif // defined LLVM_EXECUTIONENGINE_JITEVENTLISTENER_H diff --git a/llvm/include/llvm/ExecutionEngine/JITSymbolFlags.h b/llvm/include/llvm/ExecutionEngine/JITSymbolFlags.h deleted file mode 100644 index 7e1d57da..00000000 --- a/llvm/include/llvm/ExecutionEngine/JITSymbolFlags.h +++ /dev/null @@ -1,91 +0,0 @@ -//===------ JITSymbolFlags.h - Flags for symbols in the JIT -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Symbol flags for symbols in the JIT (e.g. weak, exported). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_JITSYMBOLFLAGS_H -#define LLVM_EXECUTIONENGINE_JITSYMBOLFLAGS_H - -#include "llvm/IR/GlobalValue.h" -#include "llvm/Object/SymbolicFile.h" - -namespace llvm { - -/// @brief Flags for symbols in the JIT. -enum class JITSymbolFlags : char { - None = 0, - Weak = 1U << 0, - Exported = 1U << 1 -}; - -inline JITSymbolFlags operator|(JITSymbolFlags LHS, JITSymbolFlags RHS) { - typedef std::underlying_type::type UT; - return static_cast( - static_cast(LHS) | static_cast(RHS)); -} - -inline JITSymbolFlags& operator |=(JITSymbolFlags &LHS, JITSymbolFlags RHS) { - LHS = LHS | RHS; - return LHS; -} - -inline JITSymbolFlags operator&(JITSymbolFlags LHS, JITSymbolFlags RHS) { - typedef std::underlying_type::type UT; - return static_cast( - static_cast(LHS) & static_cast(RHS)); -} - -inline JITSymbolFlags& operator &=(JITSymbolFlags &LHS, JITSymbolFlags RHS) { - LHS = LHS & RHS; - return LHS; -} - -/// @brief Base class for symbols in the JIT. -class JITSymbolBase { -public: - JITSymbolBase(JITSymbolFlags Flags) : Flags(Flags) {} - - JITSymbolFlags getFlags() const { return Flags; } - - bool isWeak() const { - return (Flags & JITSymbolFlags::Weak) == JITSymbolFlags::Weak; - } - - bool isExported() const { - return (Flags & JITSymbolFlags::Exported) == JITSymbolFlags::Exported; - } - - static JITSymbolFlags flagsFromGlobalValue(const GlobalValue &GV) { - JITSymbolFlags Flags = JITSymbolFlags::None; - if (GV.hasWeakLinkage()) - Flags |= JITSymbolFlags::Weak; - if (!GV.hasLocalLinkage() && !GV.hasHiddenVisibility()) - Flags |= JITSymbolFlags::Exported; - return Flags; - } - - static JITSymbolFlags - flagsFromObjectSymbol(const object::BasicSymbolRef &Symbol) { - JITSymbolFlags Flags = JITSymbolFlags::None; - if (Symbol.getFlags() & object::BasicSymbolRef::SF_Weak) - Flags |= JITSymbolFlags::Weak; - if (Symbol.getFlags() & object::BasicSymbolRef::SF_Exported) - Flags |= JITSymbolFlags::Exported; - return Flags; - } - -private: - JITSymbolFlags Flags; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/MCJIT.h b/llvm/include/llvm/ExecutionEngine/MCJIT.h deleted file mode 100644 index 66ddb7cd..00000000 --- a/llvm/include/llvm/ExecutionEngine/MCJIT.h +++ /dev/null @@ -1,38 +0,0 @@ -//===-- MCJIT.h - MC-Based Just-In-Time Execution Engine --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file forces the MCJIT to link in on certain operating systems. -// (Windows). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_MCJIT_H -#define LLVM_EXECUTIONENGINE_MCJIT_H - -#include "llvm/ExecutionEngine/ExecutionEngine.h" -#include - -extern "C" void LLVMLinkInMCJIT(); - -namespace { - struct ForceMCJITLinking { - ForceMCJITLinking() { - // We must reference MCJIT in such a way that compilers will not - // delete it all as dead code, even with whole program optimization, - // yet is effectively a NO-OP. As the compiler isn't smart enough - // to know that getenv() never returns -1, this will do the job. - if (std::getenv("bar") != (char*) -1) - return; - - LLVMLinkInMCJIT(); - } - } ForceMCJITLinking; -} - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/OProfileWrapper.h b/llvm/include/llvm/ExecutionEngine/OProfileWrapper.h deleted file mode 100644 index 05da594a..00000000 --- a/llvm/include/llvm/ExecutionEngine/OProfileWrapper.h +++ /dev/null @@ -1,124 +0,0 @@ -//===-- OProfileWrapper.h - OProfile JIT API Wrapper ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// This file defines a OProfileWrapper object that detects if the oprofile -// daemon is running, and provides wrappers for opagent functions used to -// communicate with the oprofile JIT interface. The dynamic library libopagent -// does not need to be linked directly as this object lazily loads the library -// when the first op_ function is called. -// -// See http://oprofile.sourceforge.net/doc/devel/jit-interface.html for the -// definition of the interface. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_OPROFILEWRAPPER_H -#define LLVM_EXECUTIONENGINE_OPROFILEWRAPPER_H - -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - - -class OProfileWrapper { - typedef op_agent_t (*op_open_agent_ptr_t)(); - typedef int (*op_close_agent_ptr_t)(op_agent_t); - typedef int (*op_write_native_code_ptr_t)(op_agent_t, - const char*, - uint64_t, - void const*, - const unsigned int); - typedef int (*op_write_debug_line_info_ptr_t)(op_agent_t, - void const*, - size_t, - struct debug_line_info const*); - typedef int (*op_unload_native_code_ptr_t)(op_agent_t, uint64_t); - - // Also used for op_minor_version function which has the same signature - typedef int (*op_major_version_ptr_t)(); - - // This is not a part of the opagent API, but is useful nonetheless - typedef bool (*IsOProfileRunningPtrT)(); - - - op_agent_t Agent; - op_open_agent_ptr_t OpenAgentFunc; - op_close_agent_ptr_t CloseAgentFunc; - op_write_native_code_ptr_t WriteNativeCodeFunc; - op_write_debug_line_info_ptr_t WriteDebugLineInfoFunc; - op_unload_native_code_ptr_t UnloadNativeCodeFunc; - op_major_version_ptr_t MajorVersionFunc; - op_major_version_ptr_t MinorVersionFunc; - IsOProfileRunningPtrT IsOProfileRunningFunc; - - bool Initialized; - -public: - OProfileWrapper(); - - // For testing with a mock opagent implementation, skips the dynamic load and - // the function resolution. - OProfileWrapper(op_open_agent_ptr_t OpenAgentImpl, - op_close_agent_ptr_t CloseAgentImpl, - op_write_native_code_ptr_t WriteNativeCodeImpl, - op_write_debug_line_info_ptr_t WriteDebugLineInfoImpl, - op_unload_native_code_ptr_t UnloadNativeCodeImpl, - op_major_version_ptr_t MajorVersionImpl, - op_major_version_ptr_t MinorVersionImpl, - IsOProfileRunningPtrT MockIsOProfileRunningImpl = 0) - : OpenAgentFunc(OpenAgentImpl), - CloseAgentFunc(CloseAgentImpl), - WriteNativeCodeFunc(WriteNativeCodeImpl), - WriteDebugLineInfoFunc(WriteDebugLineInfoImpl), - UnloadNativeCodeFunc(UnloadNativeCodeImpl), - MajorVersionFunc(MajorVersionImpl), - MinorVersionFunc(MinorVersionImpl), - IsOProfileRunningFunc(MockIsOProfileRunningImpl), - Initialized(true) - { - } - - // Calls op_open_agent in the oprofile JIT library and saves the returned - // op_agent_t handle internally so it can be used when calling all the other - // op_* functions. Callers of this class do not need to keep track of - // op_agent_t objects. - bool op_open_agent(); - - int op_close_agent(); - int op_write_native_code(const char* name, - uint64_t addr, - void const* code, - const unsigned int size); - int op_write_debug_line_info(void const* code, - size_t num_entries, - struct debug_line_info const* info); - int op_unload_native_code(uint64_t addr); - int op_major_version(); - int op_minor_version(); - - // Returns true if the oprofiled process is running, the opagent library is - // loaded and a connection to the agent has been established, and false - // otherwise. - bool isAgentAvailable(); - -private: - // Loads the libopagent library and initializes this wrapper if the oprofile - // daemon is running - bool initialize(); - - // Searches /proc for the oprofile daemon and returns true if the process if - // found, or false otherwise. - bool checkForOProfileProcEntry(); - - bool isOProfileRunning(); -}; - -} // namespace llvm - -#endif // LLVM_EXECUTIONENGINE_OPROFILEWRAPPER_H diff --git a/llvm/include/llvm/ExecutionEngine/ObjectCache.h b/llvm/include/llvm/ExecutionEngine/ObjectCache.h deleted file mode 100644 index cc01a4e5..00000000 --- a/llvm/include/llvm/ExecutionEngine/ObjectCache.h +++ /dev/null @@ -1,40 +0,0 @@ -//===-- ObjectCache.h - Class definition for the ObjectCache -----C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_OBJECTCACHE_H -#define LLVM_EXECUTIONENGINE_OBJECTCACHE_H - -#include "llvm/Support/MemoryBuffer.h" - -namespace llvm { - -class Module; - -/// This is the base ObjectCache type which can be provided to an -/// ExecutionEngine for the purpose of avoiding compilation for Modules that -/// have already been compiled and an object file is available. -class ObjectCache { - virtual void anchor(); -public: - ObjectCache() { } - - virtual ~ObjectCache() { } - - /// notifyObjectCompiled - Provides a pointer to compiled code for Module M. - virtual void notifyObjectCompiled(const Module *M, MemoryBufferRef Obj) = 0; - - /// Returns a pointer to a newly allocated MemoryBuffer that contains the - /// object which corresponds with Module M, or 0 if an object is not - /// available. - virtual std::unique_ptr getObject(const Module* M) = 0; -}; - -} - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h b/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h deleted file mode 100644 index b0756115..00000000 --- a/llvm/include/llvm/ExecutionEngine/ObjectMemoryBuffer.h +++ /dev/null @@ -1,63 +0,0 @@ -//===- ObjectMemoryBuffer.h - SmallVector-backed MemoryBuffrer -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares a wrapper class to hold the memory into which an -// object will be generated. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_OBJECTMEMORYBUFFER_H -#define LLVM_EXECUTIONENGINE_OBJECTMEMORYBUFFER_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { - -/// \brief SmallVector-backed MemoryBuffer instance. -/// -/// This class enables efficient construction of MemoryBuffers from SmallVector -/// instances. This is useful for MCJIT and Orc, where object files are streamed -/// into SmallVectors, then inspected using ObjectFile (which takes a -/// MemoryBuffer). -class ObjectMemoryBuffer : public MemoryBuffer { -public: - - /// \brief Construct an ObjectMemoryBuffer from the given SmallVector r-value. - /// - /// FIXME: It'd be nice for this to be a non-templated constructor taking a - /// SmallVectorImpl here instead of a templated one taking a SmallVector, - /// but SmallVector's move-construction/assignment currently only take - /// SmallVectors. If/when that is fixed we can simplify this constructor and - /// the following one. - ObjectMemoryBuffer(SmallVectorImpl &&SV) - : SV(std::move(SV)), BufferName("") { - init(this->SV.begin(), this->SV.end(), false); - } - - /// \brief Construct a named ObjectMemoryBuffer from the given SmallVector - /// r-value and StringRef. - ObjectMemoryBuffer(SmallVectorImpl &&SV, StringRef Name) - : SV(std::move(SV)), BufferName(Name) { - init(this->SV.begin(), this->SV.end(), false); - } - - const char* getBufferIdentifier() const override { return BufferName.c_str(); } - - BufferKind getBufferKind() const override { return MemoryBuffer_Malloc; } - -private: - SmallVector SV; - std::string BufferName; -}; - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h deleted file mode 100644 index ef88dd03..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h +++ /dev/null @@ -1,515 +0,0 @@ -//===- CompileOnDemandLayer.h - Compile each function on demand -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// JIT layer for breaking up modules and inserting callbacks to allow -// individual functions to be compiled on demand. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H -#define LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H - -#include "IndirectionUtils.h" -#include "LambdaResolver.h" -#include "LogicalDylib.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Debug.h" -#include "llvm/Transforms/Utils/Cloning.h" -#include -#include -#include -#include - -namespace llvm { -namespace orc { - -/// @brief Compile-on-demand layer. -/// -/// When a module is added to this layer a stub is created for each of its -/// function definitions. The stubs and other global values are immediately -/// added to the layer below. When a stub is called it triggers the extraction -/// of the function body from the original module. The extracted body is then -/// compiled and executed. -template -class CompileOnDemandLayer { -private: - - template - class LambdaMaterializer final : public ValueMaterializer { - public: - LambdaMaterializer(MaterializerFtor M) : M(std::move(M)) {} - Value *materialize(Value *V) final { return M(V); } - - private: - MaterializerFtor M; - }; - - template - LambdaMaterializer - createLambdaMaterializer(MaterializerFtor M) { - return LambdaMaterializer(std::move(M)); - } - - typedef typename BaseLayerT::ModuleSetHandleT BaseLayerModuleSetHandleT; - - // Provide type-erasure for the Modules and MemoryManagers. - template - class ResourceOwner { - public: - ResourceOwner() = default; - ResourceOwner(const ResourceOwner&) = delete; - ResourceOwner& operator=(const ResourceOwner&) = delete; - virtual ~ResourceOwner() { } - virtual ResourceT& getResource() const = 0; - }; - - template - class ResourceOwnerImpl : public ResourceOwner { - public: - ResourceOwnerImpl(ResourcePtrT ResourcePtr) - : ResourcePtr(std::move(ResourcePtr)) {} - ResourceT& getResource() const override { return *ResourcePtr; } - private: - ResourcePtrT ResourcePtr; - }; - - template - std::unique_ptr> - wrapOwnership(ResourcePtrT ResourcePtr) { - typedef ResourceOwnerImpl RO; - return llvm::make_unique(std::move(ResourcePtr)); - } - - struct LogicalModuleResources { - std::unique_ptr> SourceModule; - std::set StubsToClone; - std::unique_ptr StubsMgr; - - LogicalModuleResources() = default; - - // Explicit move constructor to make MSVC happy. - LogicalModuleResources(LogicalModuleResources &&Other) - : SourceModule(std::move(Other.SourceModule)), - StubsToClone(std::move(Other.StubsToClone)), - StubsMgr(std::move(Other.StubsMgr)) {} - - // Explicit move assignment to make MSVC happy. - LogicalModuleResources& operator=(LogicalModuleResources &&Other) { - SourceModule = std::move(Other.SourceModule); - StubsToClone = std::move(Other.StubsToClone); - StubsMgr = std::move(Other.StubsMgr); - return *this; - } - - JITSymbol findSymbol(StringRef Name, bool ExportedSymbolsOnly) { - if (Name.endswith("$stub_ptr") && !ExportedSymbolsOnly) { - assert(!ExportedSymbolsOnly && "Stubs are never exported"); - return StubsMgr->findPointer(Name.drop_back(9)); - } - return StubsMgr->findStub(Name, ExportedSymbolsOnly); - } - - }; - - struct LogicalDylibResources { - typedef std::function - SymbolResolverFtor; - - typedef std::function, - std::unique_ptr)> - ModuleAdderFtor; - - LogicalDylibResources() = default; - - // Explicit move constructor to make MSVC happy. - LogicalDylibResources(LogicalDylibResources &&Other) - : ExternalSymbolResolver(std::move(Other.ExternalSymbolResolver)), - MemMgr(std::move(Other.MemMgr)), - ModuleAdder(std::move(Other.ModuleAdder)) {} - - // Explicit move assignment operator to make MSVC happy. - LogicalDylibResources& operator=(LogicalDylibResources &&Other) { - ExternalSymbolResolver = std::move(Other.ExternalSymbolResolver); - MemMgr = std::move(Other.MemMgr); - ModuleAdder = std::move(Other.ModuleAdder); - return *this; - } - - std::unique_ptr ExternalSymbolResolver; - std::unique_ptr> MemMgr; - ModuleAdderFtor ModuleAdder; - }; - - typedef LogicalDylib CODLogicalDylib; - - typedef typename CODLogicalDylib::LogicalModuleHandle LogicalModuleHandle; - typedef std::list LogicalDylibList; - -public: - - /// @brief Handle to a set of loaded modules. - typedef typename LogicalDylibList::iterator ModuleSetHandleT; - - /// @brief Module partitioning functor. - typedef std::function(Function&)> PartitioningFtor; - - /// @brief Builder for IndirectStubsManagers. - typedef std::function()> - IndirectStubsManagerBuilderT; - - /// @brief Construct a compile-on-demand layer instance. - CompileOnDemandLayer(BaseLayerT &BaseLayer, PartitioningFtor Partition, - CompileCallbackMgrT &CallbackMgr, - IndirectStubsManagerBuilderT CreateIndirectStubsManager, - bool CloneStubsIntoPartitions = true) - : BaseLayer(BaseLayer), Partition(std::move(Partition)), - CompileCallbackMgr(CallbackMgr), - CreateIndirectStubsManager(std::move(CreateIndirectStubsManager)), - CloneStubsIntoPartitions(CloneStubsIntoPartitions) {} - - /// @brief Add a module to the compile-on-demand layer. - template - ModuleSetHandleT addModuleSet(ModuleSetT Ms, - MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) { - - LogicalDylibs.push_back(CODLogicalDylib(BaseLayer)); - auto &LDResources = LogicalDylibs.back().getDylibResources(); - - LDResources.ExternalSymbolResolver = std::move(Resolver); - - auto &MemMgrRef = *MemMgr; - LDResources.MemMgr = - wrapOwnership(std::move(MemMgr)); - - LDResources.ModuleAdder = - [&MemMgrRef](BaseLayerT &B, std::unique_ptr M, - std::unique_ptr R) { - std::vector> Ms; - Ms.push_back(std::move(M)); - return B.addModuleSet(std::move(Ms), &MemMgrRef, std::move(R)); - }; - - // Process each of the modules in this module set. - for (auto &M : Ms) - addLogicalModule(LogicalDylibs.back(), std::move(M)); - - return std::prev(LogicalDylibs.end()); - } - - /// @brief Remove the module represented by the given handle. - /// - /// This will remove all modules in the layers below that were derived from - /// the module represented by H. - void removeModuleSet(ModuleSetHandleT H) { - LogicalDylibs.erase(H); - } - - /// @brief Search for the given named symbol. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it exists. - JITSymbol findSymbol(StringRef Name, bool ExportedSymbolsOnly) { - for (auto LDI = LogicalDylibs.begin(), LDE = LogicalDylibs.end(); - LDI != LDE; ++LDI) - if (auto Symbol = findSymbolIn(LDI, Name, ExportedSymbolsOnly)) - return Symbol; - return BaseLayer.findSymbol(Name, ExportedSymbolsOnly); - } - - /// @brief Get the address of a symbol provided by this layer, or some layer - /// below this one. - JITSymbol findSymbolIn(ModuleSetHandleT H, const std::string &Name, - bool ExportedSymbolsOnly) { - return H->findSymbol(Name, ExportedSymbolsOnly); - } - -private: - - template - void addLogicalModule(CODLogicalDylib &LD, ModulePtrT SrcMPtr) { - - // Bump the linkage and rename any anonymous/privote members in SrcM to - // ensure that everything will resolve properly after we partition SrcM. - makeAllSymbolsExternallyAccessible(*SrcMPtr); - - // Create a logical module handle for SrcM within the logical dylib. - auto LMH = LD.createLogicalModule(); - auto &LMResources = LD.getLogicalModuleResources(LMH); - - LMResources.SourceModule = wrapOwnership(std::move(SrcMPtr)); - - Module &SrcM = LMResources.SourceModule->getResource(); - - // Create stub functions. - const DataLayout &DL = SrcM.getDataLayout(); - { - typename IndirectStubsMgrT::StubInitsMap StubInits; - for (auto &F : SrcM) { - // Skip declarations. - if (F.isDeclaration()) - continue; - - // Record all functions defined by this module. - if (CloneStubsIntoPartitions) - LMResources.StubsToClone.insert(&F); - - // Create a callback, associate it with the stub for the function, - // and set the compile action to compile the partition containing the - // function. - auto CCInfo = CompileCallbackMgr.getCompileCallback(); - StubInits[mangle(F.getName(), DL)] = - std::make_pair(CCInfo.getAddress(), - JITSymbolBase::flagsFromGlobalValue(F)); - CCInfo.setCompileAction([this, &LD, LMH, &F]() { - return this->extractAndCompile(LD, LMH, F); - }); - } - - LMResources.StubsMgr = CreateIndirectStubsManager(); - auto EC = LMResources.StubsMgr->createStubs(StubInits); - (void)EC; - // FIXME: This should be propagated back to the user. Stub creation may - // fail for remote JITs. - assert(!EC && "Error generating stubs"); - } - - // If this module doesn't contain any globals or aliases we can bail out - // early and avoid the overhead of creating and managing an empty globals - // module. - if (SrcM.global_empty() && SrcM.alias_empty()) - return; - - // Create the GlobalValues module. - auto GVsM = llvm::make_unique((SrcM.getName() + ".globals").str(), - SrcM.getContext()); - GVsM->setDataLayout(DL); - - ValueToValueMapTy VMap; - - // Clone global variable decls. - for (auto &GV : SrcM.globals()) - if (!GV.isDeclaration() && !VMap.count(&GV)) - cloneGlobalVariableDecl(*GVsM, GV, &VMap); - - // And the aliases. - for (auto &A : SrcM.aliases()) - if (!VMap.count(&A)) - cloneGlobalAliasDecl(*GVsM, A, VMap); - - // Now we need to clone the GV and alias initializers. - - // Initializers may refer to functions declared (but not defined) in this - // module. Build a materializer to clone decls on demand. - auto Materializer = createLambdaMaterializer( - [this, &GVsM, &LMResources](Value *V) -> Value* { - if (auto *F = dyn_cast(V)) { - // Decls in the original module just get cloned. - if (F->isDeclaration()) - return cloneFunctionDecl(*GVsM, *F); - - // Definitions in the original module (which we have emitted stubs - // for at this point) get turned into a constant alias to the stub - // instead. - const DataLayout &DL = GVsM->getDataLayout(); - std::string FName = mangle(F->getName(), DL); - auto StubSym = LMResources.StubsMgr->findStub(FName, false); - unsigned PtrBitWidth = DL.getPointerTypeSizeInBits(F->getType()); - ConstantInt *StubAddr = - ConstantInt::get(GVsM->getContext(), - APInt(PtrBitWidth, StubSym.getAddress())); - Constant *Init = ConstantExpr::getCast(Instruction::IntToPtr, - StubAddr, F->getType()); - return GlobalAlias::create(F->getFunctionType(), - F->getType()->getAddressSpace(), - F->getLinkage(), F->getName(), - Init, GVsM.get()); - } - // else.... - return nullptr; - }); - - // Clone the global variable initializers. - for (auto &GV : SrcM.globals()) - if (!GV.isDeclaration()) - moveGlobalVariableInitializer(GV, VMap, &Materializer); - - // Clone the global alias initializers. - for (auto &A : SrcM.aliases()) { - auto *NewA = cast(VMap[&A]); - assert(NewA && "Alias not cloned?"); - Value *Init = MapValue(A.getAliasee(), VMap, RF_None, nullptr, - &Materializer); - NewA->setAliasee(cast(Init)); - } - - // Build a resolver for the globals module and add it to the base layer. - auto GVsResolver = createLambdaResolver( - [&LD, LMH](const std::string &Name) { - auto &LMResources = LD.getLogicalModuleResources(LMH); - if (auto Sym = LMResources.StubsMgr->findStub(Name, false)) - return Sym.toRuntimeDyldSymbol(); - auto &LDResolver = LD.getDylibResources().ExternalSymbolResolver; - return LDResolver->findSymbolInLogicalDylib(Name); - }, - [&LD](const std::string &Name) { - auto &LDResolver = LD.getDylibResources().ExternalSymbolResolver; - return LDResolver->findSymbol(Name); - }); - - auto GVsH = LD.getDylibResources().ModuleAdder(BaseLayer, std::move(GVsM), - std::move(GVsResolver)); - LD.addToLogicalModule(LMH, GVsH); - } - - static std::string mangle(StringRef Name, const DataLayout &DL) { - std::string MangledName; - { - raw_string_ostream MangledNameStream(MangledName); - Mangler::getNameWithPrefix(MangledNameStream, Name, DL); - } - return MangledName; - } - - TargetAddress extractAndCompile(CODLogicalDylib &LD, - LogicalModuleHandle LMH, - Function &F) { - auto &LMResources = LD.getLogicalModuleResources(LMH); - Module &SrcM = LMResources.SourceModule->getResource(); - - // If F is a declaration we must already have compiled it. - if (F.isDeclaration()) - return 0; - - // Grab the name of the function being called here. - std::string CalledFnName = mangle(F.getName(), SrcM.getDataLayout()); - - auto Part = Partition(F); - auto PartH = emitPartition(LD, LMH, Part); - - TargetAddress CalledAddr = 0; - for (auto *SubF : Part) { - std::string FnName = mangle(SubF->getName(), SrcM.getDataLayout()); - auto FnBodySym = BaseLayer.findSymbolIn(PartH, FnName, false); - assert(FnBodySym && "Couldn't find function body."); - - TargetAddress FnBodyAddr = FnBodySym.getAddress(); - - // If this is the function we're calling record the address so we can - // return it from this function. - if (SubF == &F) - CalledAddr = FnBodyAddr; - - // Update the function body pointer for the stub. - if (auto EC = LMResources.StubsMgr->updatePointer(FnName, FnBodyAddr)) - return 0; - } - - return CalledAddr; - } - - template - BaseLayerModuleSetHandleT emitPartition(CODLogicalDylib &LD, - LogicalModuleHandle LMH, - const PartitionT &Part) { - auto &LMResources = LD.getLogicalModuleResources(LMH); - Module &SrcM = LMResources.SourceModule->getResource(); - - // Create the module. - std::string NewName = SrcM.getName(); - for (auto *F : Part) { - NewName += "."; - NewName += F->getName(); - } - - auto M = llvm::make_unique(NewName, SrcM.getContext()); - M->setDataLayout(SrcM.getDataLayout()); - ValueToValueMapTy VMap; - - auto Materializer = createLambdaMaterializer([this, &LMResources, &M, - &VMap](Value *V) -> Value * { - if (auto *GV = dyn_cast(V)) - return cloneGlobalVariableDecl(*M, *GV); - - if (auto *F = dyn_cast(V)) { - // Check whether we want to clone an available_externally definition. - if (!LMResources.StubsToClone.count(F)) - return cloneFunctionDecl(*M, *F); - - // Ok - we want an inlinable stub. For that to work we need a decl - // for the stub pointer. - auto *StubPtr = createImplPointer(*F->getType(), *M, - F->getName() + "$stub_ptr", nullptr); - auto *ClonedF = cloneFunctionDecl(*M, *F); - makeStub(*ClonedF, *StubPtr); - ClonedF->setLinkage(GlobalValue::AvailableExternallyLinkage); - ClonedF->addFnAttr(Attribute::AlwaysInline); - return ClonedF; - } - - if (auto *A = dyn_cast(V)) { - auto *Ty = A->getValueType(); - if (Ty->isFunctionTy()) - return Function::Create(cast(Ty), - GlobalValue::ExternalLinkage, A->getName(), - M.get()); - - return new GlobalVariable(*M, Ty, false, GlobalValue::ExternalLinkage, - nullptr, A->getName(), nullptr, - GlobalValue::NotThreadLocal, - A->getType()->getAddressSpace()); - } - - return nullptr; - }); - - // Create decls in the new module. - for (auto *F : Part) - cloneFunctionDecl(*M, *F, &VMap); - - // Move the function bodies. - for (auto *F : Part) - moveFunctionBody(*F, VMap, &Materializer); - - // Create memory manager and symbol resolver. - auto Resolver = createLambdaResolver( - [this, &LD, LMH](const std::string &Name) { - if (auto Sym = LD.findSymbolInternally(LMH, Name)) - return Sym.toRuntimeDyldSymbol(); - auto &LDResolver = LD.getDylibResources().ExternalSymbolResolver; - return LDResolver->findSymbolInLogicalDylib(Name); - }, - [this, &LD](const std::string &Name) { - auto &LDResolver = LD.getDylibResources().ExternalSymbolResolver; - return LDResolver->findSymbol(Name); - }); - - return LD.getDylibResources().ModuleAdder(BaseLayer, std::move(M), - std::move(Resolver)); - } - - BaseLayerT &BaseLayer; - PartitioningFtor Partition; - CompileCallbackMgrT &CompileCallbackMgr; - IndirectStubsManagerBuilderT CreateIndirectStubsManager; - - LogicalDylibList LogicalDylibs; - bool CloneStubsIntoPartitions; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_COMPILEONDEMANDLAYER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h deleted file mode 100644 index ce0864fb..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h +++ /dev/null @@ -1,62 +0,0 @@ -//===-- CompileUtils.h - Utilities for compiling IR in the JIT --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Contains utilities for compiling IR to object files. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_COMPILEUTILS_H -#define LLVM_EXECUTIONENGINE_ORC_COMPILEUTILS_H - -#include "llvm/ExecutionEngine/ObjectMemoryBuffer.h" -#include "llvm/IR/LegacyPassManager.h" -#include "llvm/MC/MCContext.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Target/TargetMachine.h" - -namespace llvm { -namespace orc { - -/// @brief Simple compile functor: Takes a single IR module and returns an -/// ObjectFile. -class SimpleCompiler { -public: - /// @brief Construct a simple compile functor with the given target. - SimpleCompiler(TargetMachine &TM) : TM(TM) {} - - /// @brief Compile a Module to an ObjectFile. - object::OwningBinary operator()(Module &M) const { - SmallVector ObjBufferSV; - raw_svector_ostream ObjStream(ObjBufferSV); - - legacy::PassManager PM; - MCContext *Ctx; - if (TM.addPassesToEmitMC(PM, Ctx, ObjStream)) - llvm_unreachable("Target does not support MC emission."); - PM.run(M); - std::unique_ptr ObjBuffer( - new ObjectMemoryBuffer(std::move(ObjBufferSV))); - Expected> Obj = - object::ObjectFile::createObjectFile(ObjBuffer->getMemBufferRef()); - typedef object::OwningBinary OwningObj; - if (Obj) - return OwningObj(std::move(*Obj), std::move(ObjBuffer)); - // TODO: Actually report errors helpfully. - consumeError(Obj.takeError()); - return OwningObj(nullptr, nullptr); - } - -private: - TargetMachine &TM; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_COMPILEUTILS_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h deleted file mode 100644 index c10508cc..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h +++ /dev/null @@ -1,182 +0,0 @@ -//===-- ExecutionUtils.h - Utilities for executing code in Orc --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Contains utilities for executing code in Orc. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_EXECUTIONUTILS_H -#define LLVM_EXECUTIONENGINE_ORC_EXECUTIONUTILS_H - -#include "JITSymbol.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" -#include - -namespace llvm { - -class ConstantArray; -class GlobalVariable; -class Function; -class Module; -class Value; - -namespace orc { - -/// @brief This iterator provides a convenient way to iterate over the elements -/// of an llvm.global_ctors/llvm.global_dtors instance. -/// -/// The easiest way to get hold of instances of this class is to use the -/// getConstructors/getDestructors functions. -class CtorDtorIterator { -public: - - /// @brief Accessor for an element of the global_ctors/global_dtors array. - /// - /// This class provides a read-only view of the element with any casts on - /// the function stripped away. - struct Element { - Element(unsigned Priority, const Function *Func, const Value *Data) - : Priority(Priority), Func(Func), Data(Data) {} - - unsigned Priority; - const Function *Func; - const Value *Data; - }; - - /// @brief Construct an iterator instance. If End is true then this iterator - /// acts as the end of the range, otherwise it is the beginning. - CtorDtorIterator(const GlobalVariable *GV, bool End); - - /// @brief Test iterators for equality. - bool operator==(const CtorDtorIterator &Other) const; - - /// @brief Test iterators for inequality. - bool operator!=(const CtorDtorIterator &Other) const; - - /// @brief Pre-increment iterator. - CtorDtorIterator& operator++(); - - /// @brief Post-increment iterator. - CtorDtorIterator operator++(int); - - /// @brief Dereference iterator. The resulting value provides a read-only view - /// of this element of the global_ctors/global_dtors list. - Element operator*() const; - -private: - const ConstantArray *InitList; - unsigned I; -}; - -/// @brief Create an iterator range over the entries of the llvm.global_ctors -/// array. -iterator_range getConstructors(const Module &M); - -/// @brief Create an iterator range over the entries of the llvm.global_ctors -/// array. -iterator_range getDestructors(const Module &M); - -/// @brief Convenience class for recording constructor/destructor names for -/// later execution. -template -class CtorDtorRunner { -public: - - /// @brief Construct a CtorDtorRunner for the given range using the given - /// name mangling function. - CtorDtorRunner(std::vector CtorDtorNames, - typename JITLayerT::ModuleSetHandleT H) - : CtorDtorNames(std::move(CtorDtorNames)), H(H) {} - - /// @brief Run the recorded constructors/destructors through the given JIT - /// layer. - bool runViaLayer(JITLayerT &JITLayer) const { - typedef void (*CtorDtorTy)(); - - bool Error = false; - for (const auto &CtorDtorName : CtorDtorNames) - if (auto CtorDtorSym = JITLayer.findSymbolIn(H, CtorDtorName, false)) { - CtorDtorTy CtorDtor = - reinterpret_cast( - static_cast(CtorDtorSym.getAddress())); - CtorDtor(); - } else - Error = true; - return !Error; - } - -private: - std::vector CtorDtorNames; - typename JITLayerT::ModuleSetHandleT H; -}; - -/// @brief Support class for static dtor execution. For hosted (in-process) JITs -/// only! -/// -/// If a __cxa_atexit function isn't found C++ programs that use static -/// destructors will fail to link. However, we don't want to use the host -/// process's __cxa_atexit, because it will schedule JIT'd destructors to run -/// after the JIT has been torn down, which is no good. This class makes it easy -/// to override __cxa_atexit (and the related __dso_handle). -/// -/// To use, clients should manually call searchOverrides from their symbol -/// resolver. This should generally be done after attempting symbol resolution -/// inside the JIT, but before searching the host process's symbol table. When -/// the client determines that destructors should be run (generally at JIT -/// teardown or after a return from main), the runDestructors method should be -/// called. -class LocalCXXRuntimeOverrides { -public: - - /// Create a runtime-overrides class. - template - LocalCXXRuntimeOverrides(const MangleFtorT &Mangle) { - addOverride(Mangle("__dso_handle"), toTargetAddress(&DSOHandleOverride)); - addOverride(Mangle("__cxa_atexit"), toTargetAddress(&CXAAtExitOverride)); - } - - /// Search overrided symbols. - RuntimeDyld::SymbolInfo searchOverrides(const std::string &Name) { - auto I = CXXRuntimeOverrides.find(Name); - if (I != CXXRuntimeOverrides.end()) - return RuntimeDyld::SymbolInfo(I->second, JITSymbolFlags::Exported); - return nullptr; - } - - /// Run any destructors recorded by the overriden __cxa_atexit function - /// (CXAAtExitOverride). - void runDestructors(); - -private: - - template - TargetAddress toTargetAddress(PtrTy* P) { - return static_cast(reinterpret_cast(P)); - } - - void addOverride(const std::string &Name, TargetAddress Addr) { - CXXRuntimeOverrides.insert(std::make_pair(Name, Addr)); - } - - StringMap CXXRuntimeOverrides; - - typedef void (*DestructorPtr)(void*); - typedef std::pair CXXDestructorDataPair; - typedef std::vector CXXDestructorDataPairList; - CXXDestructorDataPairList DSOHandleOverride; - static int CXAAtExitOverride(DestructorPtr Destructor, void *Arg, - void *DSOHandle); -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_EXECUTIONUTILS_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h deleted file mode 100644 index 9fa222c3..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h +++ /dev/null @@ -1,108 +0,0 @@ -//===---- GlobalMappingLayer.h - Run all IR through a functor ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Convenience layer for injecting symbols that will appear in calls to -// findSymbol. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_GLOBALMAPPINGLAYER_H -#define LLVM_EXECUTIONENGINE_ORC_GLOBALMAPPINGLAYER_H - -#include "JITSymbol.h" -#include - -namespace llvm { -namespace orc { - -/// @brief Global mapping layer. -/// -/// This layer overrides the findSymbol method to first search a local symbol -/// table that the client can define. It can be used to inject new symbol -/// mappings into the JIT. Beware, however: symbols within a single IR module or -/// object file will still resolve locally (via RuntimeDyld's symbol table) - -/// such internal references cannot be overriden via this layer. -template -class GlobalMappingLayer { -public: - /// @brief Handle to a set of added modules. - typedef typename BaseLayerT::ModuleSetHandleT ModuleSetHandleT; - - /// @brief Construct an GlobalMappingLayer with the given BaseLayer - GlobalMappingLayer(BaseLayerT &BaseLayer) : BaseLayer(BaseLayer) {} - - /// @brief Add the given module set to the JIT. - /// @return A handle for the added modules. - template - ModuleSetHandleT addModuleSet(ModuleSetT Ms, - MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) { - return BaseLayer.addModuleSet(std::move(Ms), std::move(MemMgr), - std::move(Resolver)); - } - - /// @brief Remove the module set associated with the handle H. - void removeModuleSet(ModuleSetHandleT H) { BaseLayer.removeModuleSet(H); } - - /// @brief Manually set the address to return for the given symbol. - void setGlobalMapping(const std::string &Name, TargetAddress Addr) { - SymbolTable[Name] = Addr; - } - - /// @brief Remove the given symbol from the global mapping. - void eraseGlobalMapping(const std::string &Name) { - SymbolTable.erase(Name); - } - - /// @brief Search for the given named symbol. - /// - /// This method will first search the local symbol table, returning - /// any symbol found there. If the symbol is not found in the local - /// table then this call will be passed through to the base layer. - /// - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it exists. - JITSymbol findSymbol(const std::string &Name, bool ExportedSymbolsOnly) { - auto I = SymbolTable.find(Name); - if (I != SymbolTable.end()) - return JITSymbol(I->second, JITSymbolFlags::Exported); - return BaseLayer.findSymbol(Name, ExportedSymbolsOnly); - } - - /// @brief Get the address of the given symbol in the context of the set of - /// modules represented by the handle H. This call is forwarded to the - /// base layer's implementation. - /// @param H The handle for the module set to search in. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it is found in the - /// given module set. - JITSymbol findSymbolIn(ModuleSetHandleT H, const std::string &Name, - bool ExportedSymbolsOnly) { - return BaseLayer.findSymbolIn(H, Name, ExportedSymbolsOnly); - } - - /// @brief Immediately emit and finalize the module set represented by the - /// given handle. - /// @param H Handle for module set to emit/finalize. - void emitAndFinalize(ModuleSetHandleT H) { - BaseLayer.emitAndFinalize(H); - } - -private: - BaseLayerT &BaseLayer; - std::map SymbolTable; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_GLOBALMAPPINGLAYER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h deleted file mode 100644 index e6ce18a4..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h +++ /dev/null @@ -1,147 +0,0 @@ -//===------ IRCompileLayer.h -- Eagerly compile IR for JIT ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Contains the definition for a basic, eagerly compiling layer of the JIT. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_IRCOMPILELAYER_H -#define LLVM_EXECUTIONENGINE_ORC_IRCOMPILELAYER_H - -#include "JITSymbol.h" -#include "llvm/ExecutionEngine/ObjectCache.h" -#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" -#include "llvm/Object/ObjectFile.h" -#include - -namespace llvm { -namespace orc { - -/// @brief Eager IR compiling layer. -/// -/// This layer accepts sets of LLVM IR Modules (via addModuleSet). It -/// immediately compiles each IR module to an object file (each IR Module is -/// compiled separately). The resulting set of object files is then added to -/// the layer below, which must implement the object layer concept. -template class IRCompileLayer { -public: - typedef std::function(Module &)> - CompileFtor; - -private: - typedef typename BaseLayerT::ObjSetHandleT ObjSetHandleT; - -public: - /// @brief Handle to a set of compiled modules. - typedef ObjSetHandleT ModuleSetHandleT; - - /// @brief Construct an IRCompileLayer with the given BaseLayer, which must - /// implement the ObjectLayer concept. - IRCompileLayer(BaseLayerT &BaseLayer, CompileFtor Compile) - : BaseLayer(BaseLayer), Compile(std::move(Compile)), ObjCache(nullptr) {} - - /// @brief Set an ObjectCache to query before compiling. - void setObjectCache(ObjectCache *NewCache) { ObjCache = NewCache; } - - /// @brief Compile each module in the given module set, then add the resulting - /// set of objects to the base layer along with the memory manager and - /// symbol resolver. - /// - /// @return A handle for the added modules. - template - ModuleSetHandleT addModuleSet(ModuleSetT Ms, - MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) { - std::vector>> - Objects; - - for (const auto &M : Ms) { - auto Object = - llvm::make_unique>(); - - if (ObjCache) - *Object = tryToLoadFromObjectCache(*M); - - if (!Object->getBinary()) { - *Object = Compile(*M); - if (ObjCache) - ObjCache->notifyObjectCompiled(&*M, - Object->getBinary()->getMemoryBufferRef()); - } - - Objects.push_back(std::move(Object)); - } - - ModuleSetHandleT H = - BaseLayer.addObjectSet(std::move(Objects), std::move(MemMgr), - std::move(Resolver)); - - return H; - } - - /// @brief Remove the module set associated with the handle H. - void removeModuleSet(ModuleSetHandleT H) { BaseLayer.removeObjectSet(H); } - - /// @brief Search for the given named symbol. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it exists. - JITSymbol findSymbol(const std::string &Name, bool ExportedSymbolsOnly) { - return BaseLayer.findSymbol(Name, ExportedSymbolsOnly); - } - - /// @brief Get the address of the given symbol in the context of the set of - /// compiled modules represented by the handle H. This call is - /// forwarded to the base layer's implementation. - /// @param H The handle for the module set to search in. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it is found in the - /// given module set. - JITSymbol findSymbolIn(ModuleSetHandleT H, const std::string &Name, - bool ExportedSymbolsOnly) { - return BaseLayer.findSymbolIn(H, Name, ExportedSymbolsOnly); - } - - /// @brief Immediately emit and finalize the moduleOB set represented by the - /// given handle. - /// @param H Handle for module set to emit/finalize. - void emitAndFinalize(ModuleSetHandleT H) { - BaseLayer.emitAndFinalize(H); - } - -private: - object::OwningBinary - tryToLoadFromObjectCache(const Module &M) { - std::unique_ptr ObjBuffer = ObjCache->getObject(&M); - if (!ObjBuffer) - return object::OwningBinary(); - - Expected> Obj = - object::ObjectFile::createObjectFile(ObjBuffer->getMemBufferRef()); - if (!Obj) { - // TODO: Actually report errors helpfully. - consumeError(Obj.takeError()); - return object::OwningBinary(); - } - - return object::OwningBinary(std::move(*Obj), - std::move(ObjBuffer)); - } - - BaseLayerT &BaseLayer; - CompileFtor Compile; - ObjectCache *ObjCache; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_IRCOMPILINGLAYER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h deleted file mode 100644 index 4dabb9a4..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h +++ /dev/null @@ -1,101 +0,0 @@ -//===----- IRTransformLayer.h - Run all IR through a functor ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Run all IR passed in through a user supplied functor. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_IRTRANSFORMLAYER_H -#define LLVM_EXECUTIONENGINE_ORC_IRTRANSFORMLAYER_H - -#include "JITSymbol.h" - -namespace llvm { -namespace orc { - -/// @brief IR mutating layer. -/// -/// This layer accepts sets of LLVM IR Modules (via addModuleSet). It -/// immediately applies the user supplied functor to each module, then adds -/// the set of transformed modules to the layer below. -template -class IRTransformLayer { -public: - /// @brief Handle to a set of added modules. - typedef typename BaseLayerT::ModuleSetHandleT ModuleSetHandleT; - - /// @brief Construct an IRTransformLayer with the given BaseLayer - IRTransformLayer(BaseLayerT &BaseLayer, - TransformFtor Transform = TransformFtor()) - : BaseLayer(BaseLayer), Transform(std::move(Transform)) {} - - /// @brief Apply the transform functor to each module in the module set, then - /// add the resulting set of modules to the base layer, along with the - /// memory manager and symbol resolver. - /// - /// @return A handle for the added modules. - template - ModuleSetHandleT addModuleSet(ModuleSetT Ms, - MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) { - - for (auto I = Ms.begin(), E = Ms.end(); I != E; ++I) - *I = Transform(std::move(*I)); - - return BaseLayer.addModuleSet(std::move(Ms), std::move(MemMgr), - std::move(Resolver)); - } - - /// @brief Remove the module set associated with the handle H. - void removeModuleSet(ModuleSetHandleT H) { BaseLayer.removeModuleSet(H); } - - /// @brief Search for the given named symbol. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it exists. - JITSymbol findSymbol(const std::string &Name, bool ExportedSymbolsOnly) { - return BaseLayer.findSymbol(Name, ExportedSymbolsOnly); - } - - /// @brief Get the address of the given symbol in the context of the set of - /// modules represented by the handle H. This call is forwarded to the - /// base layer's implementation. - /// @param H The handle for the module set to search in. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it is found in the - /// given module set. - JITSymbol findSymbolIn(ModuleSetHandleT H, const std::string &Name, - bool ExportedSymbolsOnly) { - return BaseLayer.findSymbolIn(H, Name, ExportedSymbolsOnly); - } - - /// @brief Immediately emit and finalize the module set represented by the - /// given handle. - /// @param H Handle for module set to emit/finalize. - void emitAndFinalize(ModuleSetHandleT H) { - BaseLayer.emitAndFinalize(H); - } - - /// @brief Access the transform functor directly. - TransformFtor& getTransform() { return Transform; } - - /// @brief Access the mumate functor directly. - const TransformFtor& getTransform() const { return Transform; } - -private: - BaseLayerT &BaseLayer; - TransformFtor Transform; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_IRTRANSFORMLAYER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h deleted file mode 100644 index 51172c51..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h +++ /dev/null @@ -1,420 +0,0 @@ -//===-- IndirectionUtils.h - Utilities for adding indirections --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Contains utilities for adding indirections and breaking up modules. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_INDIRECTIONUTILS_H -#define LLVM_EXECUTIONENGINE_ORC_INDIRECTIONUTILS_H - -#include "JITSymbol.h" -#include "LambdaResolver.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" -#include "llvm/IR/IRBuilder.h" -#include "llvm/IR/Mangler.h" -#include "llvm/IR/Module.h" -#include "llvm/Support/Process.h" -#include "llvm/Transforms/Utils/ValueMapper.h" - -namespace llvm { -namespace orc { - -/// @brief Target-independent base class for compile callback management. -class JITCompileCallbackManager { -public: - typedef std::function CompileFtor; - - /// @brief Handle to a newly created compile callback. Can be used to get an - /// IR constant representing the address of the trampoline, and to set - /// the compile action for the callback. - class CompileCallbackInfo { - public: - CompileCallbackInfo(TargetAddress Addr, CompileFtor &Compile) - : Addr(Addr), Compile(Compile) {} - - TargetAddress getAddress() const { return Addr; } - void setCompileAction(CompileFtor Compile) { - this->Compile = std::move(Compile); - } - - private: - TargetAddress Addr; - CompileFtor &Compile; - }; - - /// @brief Construct a JITCompileCallbackManager. - /// @param ErrorHandlerAddress The address of an error handler in the target - /// process to be used if a compile callback fails. - JITCompileCallbackManager(TargetAddress ErrorHandlerAddress) - : ErrorHandlerAddress(ErrorHandlerAddress) {} - - virtual ~JITCompileCallbackManager() {} - - /// @brief Execute the callback for the given trampoline id. Called by the JIT - /// to compile functions on demand. - TargetAddress executeCompileCallback(TargetAddress TrampolineAddr) { - auto I = ActiveTrampolines.find(TrampolineAddr); - // FIXME: Also raise an error in the Orc error-handler when we finally have - // one. - if (I == ActiveTrampolines.end()) - return ErrorHandlerAddress; - - // Found a callback handler. Yank this trampoline out of the active list and - // put it back in the available trampolines list, then try to run the - // handler's compile and update actions. - // Moving the trampoline ID back to the available list first means there's - // at - // least one available trampoline if the compile action triggers a request - // for - // a new one. - auto Compile = std::move(I->second); - ActiveTrampolines.erase(I); - AvailableTrampolines.push_back(TrampolineAddr); - - if (auto Addr = Compile()) - return Addr; - - return ErrorHandlerAddress; - } - - /// @brief Reserve a compile callback. - CompileCallbackInfo getCompileCallback() { - TargetAddress TrampolineAddr = getAvailableTrampolineAddr(); - auto &Compile = this->ActiveTrampolines[TrampolineAddr]; - return CompileCallbackInfo(TrampolineAddr, Compile); - } - - /// @brief Get a CompileCallbackInfo for an existing callback. - CompileCallbackInfo getCompileCallbackInfo(TargetAddress TrampolineAddr) { - auto I = ActiveTrampolines.find(TrampolineAddr); - assert(I != ActiveTrampolines.end() && "Not an active trampoline."); - return CompileCallbackInfo(I->first, I->second); - } - - /// @brief Release a compile callback. - /// - /// Note: Callbacks are auto-released after they execute. This method should - /// only be called to manually release a callback that is not going to - /// execute. - void releaseCompileCallback(TargetAddress TrampolineAddr) { - auto I = ActiveTrampolines.find(TrampolineAddr); - assert(I != ActiveTrampolines.end() && "Not an active trampoline."); - ActiveTrampolines.erase(I); - AvailableTrampolines.push_back(TrampolineAddr); - } - -protected: - TargetAddress ErrorHandlerAddress; - - typedef std::map TrampolineMapT; - TrampolineMapT ActiveTrampolines; - std::vector AvailableTrampolines; - -private: - TargetAddress getAvailableTrampolineAddr() { - if (this->AvailableTrampolines.empty()) - grow(); - assert(!this->AvailableTrampolines.empty() && - "Failed to grow available trampolines."); - TargetAddress TrampolineAddr = this->AvailableTrampolines.back(); - this->AvailableTrampolines.pop_back(); - return TrampolineAddr; - } - - // Create new trampolines - to be implemented in subclasses. - virtual void grow() = 0; - - virtual void anchor(); -}; - -/// @brief Manage compile callbacks for in-process JITs. -template -class LocalJITCompileCallbackManager : public JITCompileCallbackManager { -public: - /// @brief Construct a InProcessJITCompileCallbackManager. - /// @param ErrorHandlerAddress The address of an error handler in the target - /// process to be used if a compile callback fails. - LocalJITCompileCallbackManager(TargetAddress ErrorHandlerAddress) - : JITCompileCallbackManager(ErrorHandlerAddress) { - - /// Set up the resolver block. - std::error_code EC; - ResolverBlock = sys::OwningMemoryBlock(sys::Memory::allocateMappedMemory( - TargetT::ResolverCodeSize, nullptr, - sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC)); - assert(!EC && "Failed to allocate resolver block"); - - TargetT::writeResolverCode(static_cast(ResolverBlock.base()), - &reenter, this); - - EC = sys::Memory::protectMappedMemory(ResolverBlock.getMemoryBlock(), - sys::Memory::MF_READ | - sys::Memory::MF_EXEC); - assert(!EC && "Failed to mprotect resolver block"); - } - -private: - static TargetAddress reenter(void *CCMgr, void *TrampolineId) { - JITCompileCallbackManager *Mgr = - static_cast(CCMgr); - return Mgr->executeCompileCallback( - static_cast(reinterpret_cast(TrampolineId))); - } - - void grow() override { - assert(this->AvailableTrampolines.empty() && "Growing prematurely?"); - - std::error_code EC; - auto TrampolineBlock = - sys::OwningMemoryBlock(sys::Memory::allocateMappedMemory( - sys::Process::getPageSize(), nullptr, - sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC)); - assert(!EC && "Failed to allocate trampoline block"); - - unsigned NumTrampolines = - (sys::Process::getPageSize() - TargetT::PointerSize) / - TargetT::TrampolineSize; - - uint8_t *TrampolineMem = static_cast(TrampolineBlock.base()); - TargetT::writeTrampolines(TrampolineMem, ResolverBlock.base(), - NumTrampolines); - - for (unsigned I = 0; I < NumTrampolines; ++I) - this->AvailableTrampolines.push_back( - static_cast(reinterpret_cast( - TrampolineMem + (I * TargetT::TrampolineSize)))); - - EC = sys::Memory::protectMappedMemory(TrampolineBlock.getMemoryBlock(), - sys::Memory::MF_READ | - sys::Memory::MF_EXEC); - assert(!EC && "Failed to mprotect trampoline block"); - - TrampolineBlocks.push_back(std::move(TrampolineBlock)); - } - - sys::OwningMemoryBlock ResolverBlock; - std::vector TrampolineBlocks; -}; - -/// @brief Base class for managing collections of named indirect stubs. -class IndirectStubsManager { -public: - /// @brief Map type for initializing the manager. See init. - typedef StringMap> StubInitsMap; - - virtual ~IndirectStubsManager() {} - - /// @brief Create a single stub with the given name, target address and flags. - virtual Error createStub(StringRef StubName, TargetAddress StubAddr, - JITSymbolFlags StubFlags) = 0; - - /// @brief Create StubInits.size() stubs with the given names, target - /// addresses, and flags. - virtual Error createStubs(const StubInitsMap &StubInits) = 0; - - /// @brief Find the stub with the given name. If ExportedStubsOnly is true, - /// this will only return a result if the stub's flags indicate that it - /// is exported. - virtual JITSymbol findStub(StringRef Name, bool ExportedStubsOnly) = 0; - - /// @brief Find the implementation-pointer for the stub. - virtual JITSymbol findPointer(StringRef Name) = 0; - - /// @brief Change the value of the implementation pointer for the stub. - virtual Error updatePointer(StringRef Name, TargetAddress NewAddr) = 0; - -private: - virtual void anchor(); -}; - -/// @brief IndirectStubsManager implementation for the host architecture, e.g. -/// OrcX86_64. (See OrcArchitectureSupport.h). -template -class LocalIndirectStubsManager : public IndirectStubsManager { -public: - Error createStub(StringRef StubName, TargetAddress StubAddr, - JITSymbolFlags StubFlags) override { - if (auto Err = reserveStubs(1)) - return Err; - - createStubInternal(StubName, StubAddr, StubFlags); - - return Error::success(); - } - - Error createStubs(const StubInitsMap &StubInits) override { - if (auto Err = reserveStubs(StubInits.size())) - return Err; - - for (auto &Entry : StubInits) - createStubInternal(Entry.first(), Entry.second.first, - Entry.second.second); - - return Error::success(); - } - - JITSymbol findStub(StringRef Name, bool ExportedStubsOnly) override { - auto I = StubIndexes.find(Name); - if (I == StubIndexes.end()) - return nullptr; - auto Key = I->second.first; - void *StubAddr = IndirectStubsInfos[Key.first].getStub(Key.second); - assert(StubAddr && "Missing stub address"); - auto StubTargetAddr = - static_cast(reinterpret_cast(StubAddr)); - auto StubSymbol = JITSymbol(StubTargetAddr, I->second.second); - if (ExportedStubsOnly && !StubSymbol.isExported()) - return nullptr; - return StubSymbol; - } - - JITSymbol findPointer(StringRef Name) override { - auto I = StubIndexes.find(Name); - if (I == StubIndexes.end()) - return nullptr; - auto Key = I->second.first; - void *PtrAddr = IndirectStubsInfos[Key.first].getPtr(Key.second); - assert(PtrAddr && "Missing pointer address"); - auto PtrTargetAddr = - static_cast(reinterpret_cast(PtrAddr)); - return JITSymbol(PtrTargetAddr, I->second.second); - } - - Error updatePointer(StringRef Name, TargetAddress NewAddr) override { - auto I = StubIndexes.find(Name); - assert(I != StubIndexes.end() && "No stub pointer for symbol"); - auto Key = I->second.first; - *IndirectStubsInfos[Key.first].getPtr(Key.second) = - reinterpret_cast(static_cast(NewAddr)); - return Error::success(); - } - -private: - Error reserveStubs(unsigned NumStubs) { - if (NumStubs <= FreeStubs.size()) - return Error::success(); - - unsigned NewStubsRequired = NumStubs - FreeStubs.size(); - unsigned NewBlockId = IndirectStubsInfos.size(); - typename TargetT::IndirectStubsInfo ISI; - if (auto Err = - TargetT::emitIndirectStubsBlock(ISI, NewStubsRequired, nullptr)) - return Err; - for (unsigned I = 0; I < ISI.getNumStubs(); ++I) - FreeStubs.push_back(std::make_pair(NewBlockId, I)); - IndirectStubsInfos.push_back(std::move(ISI)); - return Error::success(); - } - - void createStubInternal(StringRef StubName, TargetAddress InitAddr, - JITSymbolFlags StubFlags) { - auto Key = FreeStubs.back(); - FreeStubs.pop_back(); - *IndirectStubsInfos[Key.first].getPtr(Key.second) = - reinterpret_cast(static_cast(InitAddr)); - StubIndexes[StubName] = std::make_pair(Key, StubFlags); - } - - std::vector IndirectStubsInfos; - typedef std::pair StubKey; - std::vector FreeStubs; - StringMap> StubIndexes; -}; - -/// @brief Create a local compile callback manager. -/// -/// The given target triple will determine the ABI, and the given -/// ErrorHandlerAddress will be used by the resulting compile callback -/// manager if a compile callback fails. -std::unique_ptr -createLocalCompileCallbackManager(const Triple &T, - TargetAddress ErrorHandlerAddress); - -/// @brief Create a local indriect stubs manager builder. -/// -/// The given target triple will determine the ABI. -std::function()> -createLocalIndirectStubsManagerBuilder(const Triple &T); - -/// @brief Build a function pointer of FunctionType with the given constant -/// address. -/// -/// Usage example: Turn a trampoline address into a function pointer constant -/// for use in a stub. -Constant *createIRTypedAddress(FunctionType &FT, TargetAddress Addr); - -/// @brief Create a function pointer with the given type, name, and initializer -/// in the given Module. -GlobalVariable *createImplPointer(PointerType &PT, Module &M, const Twine &Name, - Constant *Initializer); - -/// @brief Turn a function declaration into a stub function that makes an -/// indirect call using the given function pointer. -void makeStub(Function &F, Value &ImplPointer); - -/// @brief Raise linkage types and rename as necessary to ensure that all -/// symbols are accessible for other modules. -/// -/// This should be called before partitioning a module to ensure that the -/// partitions retain access to each other's symbols. -void makeAllSymbolsExternallyAccessible(Module &M); - -/// @brief Clone a function declaration into a new module. -/// -/// This function can be used as the first step towards creating a callback -/// stub (see makeStub), or moving a function body (see moveFunctionBody). -/// -/// If the VMap argument is non-null, a mapping will be added between F and -/// the new declaration, and between each of F's arguments and the new -/// declaration's arguments. This map can then be passed in to moveFunction to -/// move the function body if required. Note: When moving functions between -/// modules with these utilities, all decls should be cloned (and added to a -/// single VMap) before any bodies are moved. This will ensure that references -/// between functions all refer to the versions in the new module. -Function *cloneFunctionDecl(Module &Dst, const Function &F, - ValueToValueMapTy *VMap = nullptr); - -/// @brief Move the body of function 'F' to a cloned function declaration in a -/// different module (See related cloneFunctionDecl). -/// -/// If the target function declaration is not supplied via the NewF parameter -/// then it will be looked up via the VMap. -/// -/// This will delete the body of function 'F' from its original parent module, -/// but leave its declaration. -void moveFunctionBody(Function &OrigF, ValueToValueMapTy &VMap, - ValueMaterializer *Materializer = nullptr, - Function *NewF = nullptr); - -/// @brief Clone a global variable declaration into a new module. -GlobalVariable *cloneGlobalVariableDecl(Module &Dst, const GlobalVariable &GV, - ValueToValueMapTy *VMap = nullptr); - -/// @brief Move global variable GV from its parent module to cloned global -/// declaration in a different module. -/// -/// If the target global declaration is not supplied via the NewGV parameter -/// then it will be looked up via the VMap. -/// -/// This will delete the initializer of GV from its original parent module, -/// but leave its declaration. -void moveGlobalVariableInitializer(GlobalVariable &OrigGV, - ValueToValueMapTy &VMap, - ValueMaterializer *Materializer = nullptr, - GlobalVariable *NewGV = nullptr); - -/// @brief Clone -GlobalAlias *cloneGlobalAliasDecl(Module &Dst, const GlobalAlias &OrigA, - ValueToValueMapTy &VMap); - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_INDIRECTIONUTILS_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/JITSymbol.h b/llvm/include/llvm/ExecutionEngine/Orc/JITSymbol.h deleted file mode 100644 index 464417e4..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/JITSymbol.h +++ /dev/null @@ -1,87 +0,0 @@ -//===----------- JITSymbol.h - JIT symbol abstraction -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Abstraction for target process addresses. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_JITSYMBOL_H -#define LLVM_EXECUTIONENGINE_ORC_JITSYMBOL_H - -#include "llvm/ExecutionEngine/JITSymbolFlags.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" -#include "llvm/Support/DataTypes.h" -#include -#include - -namespace llvm { -namespace orc { - -/// @brief Represents an address in the target process's address space. -typedef uint64_t TargetAddress; - -/// @brief Represents a symbol in the JIT. -class JITSymbol : public JITSymbolBase { -public: - - typedef std::function GetAddressFtor; - - /// @brief Create a 'null' symbol that represents failure to find a symbol - /// definition. - JITSymbol(std::nullptr_t) - : JITSymbolBase(JITSymbolFlags::None), CachedAddr(0) {} - - /// @brief Create a symbol for a definition with a known address. - JITSymbol(TargetAddress Addr, JITSymbolFlags Flags) - : JITSymbolBase(Flags), CachedAddr(Addr) {} - - /// @brief Create a symbol for a definition that doesn't have a known address - /// yet. - /// @param GetAddress A functor to materialize a definition (fixing the - /// address) on demand. - /// - /// This constructor allows a JIT layer to provide a reference to a symbol - /// definition without actually materializing the definition up front. The - /// user can materialize the definition at any time by calling the getAddress - /// method. - JITSymbol(GetAddressFtor GetAddress, JITSymbolFlags Flags) - : JITSymbolBase(Flags), GetAddress(std::move(GetAddress)), CachedAddr(0) {} - - /// @brief Create a JITSymbol from a RuntimeDyld::SymbolInfo. - JITSymbol(const RuntimeDyld::SymbolInfo &Sym) - : JITSymbolBase(Sym.getFlags()), CachedAddr(Sym.getAddress()) {} - - /// @brief Returns true if the symbol exists, false otherwise. - explicit operator bool() const { return CachedAddr || GetAddress; } - - /// @brief Get the address of the symbol in the target address space. Returns - /// '0' if the symbol does not exist. - TargetAddress getAddress() { - if (GetAddress) { - CachedAddr = GetAddress(); - assert(CachedAddr && "Symbol could not be materialized."); - GetAddress = nullptr; - } - return CachedAddr; - } - - /// @brief Convert this JITSymbol to a RuntimeDyld::SymbolInfo. - RuntimeDyld::SymbolInfo toRuntimeDyldSymbol() { - return RuntimeDyld::SymbolInfo(getAddress(), getFlags()); - } - -private: - GetAddressFtor GetAddress; - TargetAddress CachedAddr; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_JITSYMBOL_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/LambdaResolver.h b/llvm/include/llvm/ExecutionEngine/Orc/LambdaResolver.h deleted file mode 100644 index a42b9d5c..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/LambdaResolver.h +++ /dev/null @@ -1,61 +0,0 @@ -//===-- LambdaResolverMM - Redirect symbol lookup via a functor -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Defines a RuntimeDyld::SymbolResolver subclass that uses a user-supplied -// functor for symbol resolution. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_LAMBDARESOLVER_H -#define LLVM_EXECUTIONENGINE_ORC_LAMBDARESOLVER_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/ExecutionEngine/RuntimeDyld.h" -#include - -namespace llvm { -namespace orc { - -template -class LambdaResolver : public RuntimeDyld::SymbolResolver { -public: - - LambdaResolver(DylibLookupFtorT DylibLookupFtor, - ExternalLookupFtorT ExternalLookupFtor) - : DylibLookupFtor(DylibLookupFtor), - ExternalLookupFtor(ExternalLookupFtor) {} - - RuntimeDyld::SymbolInfo - findSymbolInLogicalDylib(const std::string &Name) final { - return DylibLookupFtor(Name); - } - - RuntimeDyld::SymbolInfo findSymbol(const std::string &Name) final { - return ExternalLookupFtor(Name); - } - -private: - DylibLookupFtorT DylibLookupFtor; - ExternalLookupFtorT ExternalLookupFtor; -}; - -template -std::unique_ptr> -createLambdaResolver(DylibLookupFtorT DylibLookupFtor, - ExternalLookupFtorT ExternalLookupFtor) { - typedef LambdaResolver LR; - return make_unique(std::move(DylibLookupFtor), - std::move(ExternalLookupFtor)); -} - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_LAMBDARESOLVER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h deleted file mode 100644 index c5fb6b84..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h +++ /dev/null @@ -1,299 +0,0 @@ -//===- LazyEmittingLayer.h - Lazily emit IR to lower JIT layers -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Contains the definition for a lazy-emitting layer for the JIT. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_LAZYEMITTINGLAYER_H -#define LLVM_EXECUTIONENGINE_ORC_LAZYEMITTINGLAYER_H - -#include "JITSymbol.h" -#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" -#include "llvm/IR/GlobalValue.h" -#include "llvm/IR/Mangler.h" -#include "llvm/IR/Module.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringMap.h" -#include - -namespace llvm { -namespace orc { - -/// @brief Lazy-emitting IR layer. -/// -/// This layer accepts sets of LLVM IR Modules (via addModuleSet), but does -/// not immediately emit them the layer below. Instead, emissing to the base -/// layer is deferred until the first time the client requests the address -/// (via JITSymbol::getAddress) for a symbol contained in this layer. -template class LazyEmittingLayer { -public: - typedef typename BaseLayerT::ModuleSetHandleT BaseLayerHandleT; - -private: - class EmissionDeferredSet { - public: - EmissionDeferredSet() : EmitState(NotEmitted) {} - virtual ~EmissionDeferredSet() {} - - JITSymbol find(StringRef Name, bool ExportedSymbolsOnly, BaseLayerT &B) { - switch (EmitState) { - case NotEmitted: - if (auto GV = searchGVs(Name, ExportedSymbolsOnly)) { - // Create a std::string version of Name to capture here - the argument - // (a StringRef) may go away before the lambda is executed. - // FIXME: Use capture-init when we move to C++14. - std::string PName = Name; - JITSymbolFlags Flags = JITSymbolBase::flagsFromGlobalValue(*GV); - auto GetAddress = - [this, ExportedSymbolsOnly, PName, &B]() -> TargetAddress { - if (this->EmitState == Emitting) - return 0; - else if (this->EmitState == NotEmitted) { - this->EmitState = Emitting; - Handle = this->emitToBaseLayer(B); - this->EmitState = Emitted; - } - auto Sym = B.findSymbolIn(Handle, PName, ExportedSymbolsOnly); - return Sym.getAddress(); - }; - return JITSymbol(std::move(GetAddress), Flags); - } else - return nullptr; - case Emitting: - // Calling "emit" can trigger a recursive call to 'find' (e.g. to check - // for pre-existing definitions of common-symbol), but any symbol in - // this module would already have been found internally (in the - // RuntimeDyld that did the lookup), so just return a nullptr here. - return nullptr; - case Emitted: - return B.findSymbolIn(Handle, Name, ExportedSymbolsOnly); - } - llvm_unreachable("Invalid emit-state."); - } - - void removeModulesFromBaseLayer(BaseLayerT &BaseLayer) { - if (EmitState != NotEmitted) - BaseLayer.removeModuleSet(Handle); - } - - void emitAndFinalize(BaseLayerT &BaseLayer) { - assert(EmitState != Emitting && - "Cannot emitAndFinalize while already emitting"); - if (EmitState == NotEmitted) { - EmitState = Emitting; - Handle = emitToBaseLayer(BaseLayer); - EmitState = Emitted; - } - BaseLayer.emitAndFinalize(Handle); - } - - template - static std::unique_ptr - create(BaseLayerT &B, ModuleSetT Ms, MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver); - - protected: - virtual const GlobalValue* searchGVs(StringRef Name, - bool ExportedSymbolsOnly) const = 0; - virtual BaseLayerHandleT emitToBaseLayer(BaseLayerT &BaseLayer) = 0; - - private: - enum { NotEmitted, Emitting, Emitted } EmitState; - BaseLayerHandleT Handle; - }; - - template - class EmissionDeferredSetImpl : public EmissionDeferredSet { - public: - EmissionDeferredSetImpl(ModuleSetT Ms, - MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) - : Ms(std::move(Ms)), MemMgr(std::move(MemMgr)), - Resolver(std::move(Resolver)) {} - - protected: - - const GlobalValue* searchGVs(StringRef Name, - bool ExportedSymbolsOnly) const override { - // FIXME: We could clean all this up if we had a way to reliably demangle - // names: We could just demangle name and search, rather than - // mangling everything else. - - // If we have already built the mangled name set then just search it. - if (MangledSymbols) { - auto VI = MangledSymbols->find(Name); - if (VI == MangledSymbols->end()) - return nullptr; - auto GV = VI->second; - if (!ExportedSymbolsOnly || GV->hasDefaultVisibility()) - return GV; - return nullptr; - } - - // If we haven't built the mangled name set yet, try to build it. As an - // optimization this will leave MangledNames set to nullptr if we find - // Name in the process of building the set. - return buildMangledSymbols(Name, ExportedSymbolsOnly); - } - - BaseLayerHandleT emitToBaseLayer(BaseLayerT &BaseLayer) override { - // We don't need the mangled names set any more: Once we've emitted this - // to the base layer we'll just look for symbols there. - MangledSymbols.reset(); - return BaseLayer.addModuleSet(std::move(Ms), std::move(MemMgr), - std::move(Resolver)); - } - - private: - // If the mangled name of the given GlobalValue matches the given search - // name (and its visibility conforms to the ExportedSymbolsOnly flag) then - // return the symbol. Otherwise, add the mangled name to the Names map and - // return nullptr. - const GlobalValue* addGlobalValue(StringMap &Names, - const GlobalValue &GV, - const Mangler &Mang, StringRef SearchName, - bool ExportedSymbolsOnly) const { - // Modules don't "provide" decls or common symbols. - if (GV.isDeclaration() || GV.hasCommonLinkage()) - return nullptr; - - // Mangle the GV name. - std::string MangledName; - { - raw_string_ostream MangledNameStream(MangledName); - Mang.getNameWithPrefix(MangledNameStream, &GV, false); - } - - // Check whether this is the name we were searching for, and if it is then - // bail out early. - if (MangledName == SearchName) - if (!ExportedSymbolsOnly || GV.hasDefaultVisibility()) - return &GV; - - // Otherwise add this to the map for later. - Names[MangledName] = &GV; - return nullptr; - } - - // Build the MangledSymbols map. Bails out early (with MangledSymbols left set - // to nullptr) if the given SearchName is found while building the map. - const GlobalValue* buildMangledSymbols(StringRef SearchName, - bool ExportedSymbolsOnly) const { - assert(!MangledSymbols && "Mangled symbols map already exists?"); - - auto Symbols = llvm::make_unique>(); - - for (const auto &M : Ms) { - Mangler Mang; - - for (const auto &GO : M->global_objects()) - if (auto GV = addGlobalValue(*Symbols, GO, Mang, SearchName, - ExportedSymbolsOnly)) - return GV; - } - - MangledSymbols = std::move(Symbols); - return nullptr; - } - - ModuleSetT Ms; - MemoryManagerPtrT MemMgr; - SymbolResolverPtrT Resolver; - mutable std::unique_ptr> MangledSymbols; - }; - - typedef std::list> ModuleSetListT; - - BaseLayerT &BaseLayer; - ModuleSetListT ModuleSetList; - -public: - /// @brief Handle to a set of loaded modules. - typedef typename ModuleSetListT::iterator ModuleSetHandleT; - - /// @brief Construct a lazy emitting layer. - LazyEmittingLayer(BaseLayerT &BaseLayer) : BaseLayer(BaseLayer) {} - - /// @brief Add the given set of modules to the lazy emitting layer. - template - ModuleSetHandleT addModuleSet(ModuleSetT Ms, - MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) { - return ModuleSetList.insert( - ModuleSetList.end(), - EmissionDeferredSet::create(BaseLayer, std::move(Ms), std::move(MemMgr), - std::move(Resolver))); - } - - /// @brief Remove the module set represented by the given handle. - /// - /// This method will free the memory associated with the given module set, - /// both in this layer, and the base layer. - void removeModuleSet(ModuleSetHandleT H) { - (*H)->removeModulesFromBaseLayer(BaseLayer); - ModuleSetList.erase(H); - } - - /// @brief Search for the given named symbol. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it exists. - JITSymbol findSymbol(const std::string &Name, bool ExportedSymbolsOnly) { - // Look for the symbol among existing definitions. - if (auto Symbol = BaseLayer.findSymbol(Name, ExportedSymbolsOnly)) - return Symbol; - - // If not found then search the deferred sets. If any of these contain a - // definition of 'Name' then they will return a JITSymbol that will emit - // the corresponding module when the symbol address is requested. - for (auto &DeferredSet : ModuleSetList) - if (auto Symbol = DeferredSet->find(Name, ExportedSymbolsOnly, BaseLayer)) - return Symbol; - - // If no definition found anywhere return a null symbol. - return nullptr; - } - - /// @brief Get the address of the given symbol in the context of the set of - /// compiled modules represented by the handle H. - JITSymbol findSymbolIn(ModuleSetHandleT H, const std::string &Name, - bool ExportedSymbolsOnly) { - return (*H)->find(Name, ExportedSymbolsOnly, BaseLayer); - } - - /// @brief Immediately emit and finalize the moduleOB set represented by the - /// given handle. - /// @param H Handle for module set to emit/finalize. - void emitAndFinalize(ModuleSetHandleT H) { - (*H)->emitAndFinalize(BaseLayer); - } - -}; - -template -template -std::unique_ptr::EmissionDeferredSet> -LazyEmittingLayer::EmissionDeferredSet::create( - BaseLayerT &B, ModuleSetT Ms, MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) { - typedef EmissionDeferredSetImpl - EDS; - return llvm::make_unique(std::move(Ms), std::move(MemMgr), - std::move(Resolver)); -} - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_LAZYEMITTINGLAYER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/LogicalDylib.h b/llvm/include/llvm/ExecutionEngine/Orc/LogicalDylib.h deleted file mode 100644 index 883fa9ea..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/LogicalDylib.h +++ /dev/null @@ -1,135 +0,0 @@ -//===--- LogicalDylib.h - Simulates dylib-style symbol lookup ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Simulates symbol resolution inside a dylib. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_LOGICALDYLIB_H -#define LLVM_EXECUTIONENGINE_ORC_LOGICALDYLIB_H - -#include "llvm/ExecutionEngine/Orc/JITSymbol.h" -#include -#include - -namespace llvm { -namespace orc { - -template -class LogicalDylib { -public: - typedef typename BaseLayerT::ModuleSetHandleT BaseLayerModuleSetHandleT; -private: - - typedef std::vector BaseLayerHandleList; - - struct LogicalModule { - // Make this move-only to ensure they don't get duplicated across moves of - // LogicalDylib or anything like that. - LogicalModule(LogicalModule &&RHS) - : Resources(std::move(RHS.Resources)), - BaseLayerHandles(std::move(RHS.BaseLayerHandles)) {} - LogicalModule() = default; - LogicalModuleResources Resources; - BaseLayerHandleList BaseLayerHandles; - }; - typedef std::vector LogicalModuleList; - -public: - - typedef typename BaseLayerHandleList::iterator BaseLayerHandleIterator; - typedef typename LogicalModuleList::iterator LogicalModuleHandle; - - LogicalDylib(BaseLayerT &BaseLayer) : BaseLayer(BaseLayer) {} - - ~LogicalDylib() { - for (auto &LM : LogicalModules) - for (auto BLH : LM.BaseLayerHandles) - BaseLayer.removeModuleSet(BLH); - } - - // If possible, remove this and ~LogicalDylib once the work in the dtor is - // moved to members (eg: self-unregistering base layer handles). - LogicalDylib(LogicalDylib &&RHS) - : BaseLayer(std::move(RHS.BaseLayer)), - LogicalModules(std::move(RHS.LogicalModules)), - DylibResources(std::move(RHS.DylibResources)) {} - - LogicalModuleHandle createLogicalModule() { - LogicalModules.push_back(LogicalModule()); - return std::prev(LogicalModules.end()); - } - - void addToLogicalModule(LogicalModuleHandle LMH, - BaseLayerModuleSetHandleT BaseLayerHandle) { - LMH->BaseLayerHandles.push_back(BaseLayerHandle); - } - - LogicalModuleResources& getLogicalModuleResources(LogicalModuleHandle LMH) { - return LMH->Resources; - } - - BaseLayerHandleIterator moduleHandlesBegin(LogicalModuleHandle LMH) { - return LMH->BaseLayerHandles.begin(); - } - - BaseLayerHandleIterator moduleHandlesEnd(LogicalModuleHandle LMH) { - return LMH->BaseLayerHandles.end(); - } - - JITSymbol findSymbolInLogicalModule(LogicalModuleHandle LMH, - const std::string &Name, - bool ExportedSymbolsOnly) { - - if (auto StubSym = LMH->Resources.findSymbol(Name, ExportedSymbolsOnly)) - return StubSym; - - for (auto BLH : LMH->BaseLayerHandles) - if (auto Symbol = BaseLayer.findSymbolIn(BLH, Name, ExportedSymbolsOnly)) - return Symbol; - return nullptr; - } - - JITSymbol findSymbolInternally(LogicalModuleHandle LMH, - const std::string &Name) { - if (auto Symbol = findSymbolInLogicalModule(LMH, Name, false)) - return Symbol; - - for (auto LMI = LogicalModules.begin(), LME = LogicalModules.end(); - LMI != LME; ++LMI) { - if (LMI != LMH) - if (auto Symbol = findSymbolInLogicalModule(LMI, Name, false)) - return Symbol; - } - - return nullptr; - } - - JITSymbol findSymbol(const std::string &Name, bool ExportedSymbolsOnly) { - for (auto LMI = LogicalModules.begin(), LME = LogicalModules.end(); - LMI != LME; ++LMI) - if (auto Sym = findSymbolInLogicalModule(LMI, Name, ExportedSymbolsOnly)) - return Sym; - return nullptr; - } - - LogicalDylibResources& getDylibResources() { return DylibResources; } - -protected: - BaseLayerT BaseLayer; - LogicalModuleList LogicalModules; - LogicalDylibResources DylibResources; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_LOGICALDYLIB_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/NullResolver.h b/llvm/include/llvm/ExecutionEngine/Orc/NullResolver.h deleted file mode 100644 index 1560c6d8..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/NullResolver.h +++ /dev/null @@ -1,36 +0,0 @@ -//===------ NullResolver.h - Reject symbol lookup requests ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Defines a RuntimeDyld::SymbolResolver subclass that rejects all symbol -// resolution requests, for clients that have no cross-object fixups. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H -#define LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H - -#include "llvm/ExecutionEngine/RuntimeDyld.h" - -namespace llvm { -namespace orc { - -/// SymbolResolver impliementation that rejects all resolution requests. -/// Useful for clients that have no cross-object fixups. -class NullResolver : public RuntimeDyld::SymbolResolver { -public: - RuntimeDyld::SymbolInfo findSymbol(const std::string &Name) final; - - RuntimeDyld::SymbolInfo - findSymbolInLogicalDylib(const std::string &Name) final; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_NULLRESOLVER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h deleted file mode 100644 index a7798d8b..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h +++ /dev/null @@ -1,357 +0,0 @@ -//===- ObjectLinkingLayer.h - Add object files to a JIT process -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Contains the definition for the object layer of the JIT. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_OBJECTLINKINGLAYER_H -#define LLVM_EXECUTIONENGINE_ORC_OBJECTLINKINGLAYER_H - -#include "JITSymbol.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/SectionMemoryManager.h" -#include -#include - -namespace llvm { -namespace orc { - -class ObjectLinkingLayerBase { -protected: - /// @brief Holds a set of objects to be allocated/linked as a unit in the JIT. - /// - /// An instance of this class will be created for each set of objects added - /// via JITObjectLayer::addObjectSet. Deleting the instance (via - /// removeObjectSet) frees its memory, removing all symbol definitions that - /// had been provided by this instance. Higher level layers are responsible - /// for taking any action required to handle the missing symbols. - class LinkedObjectSet { - LinkedObjectSet(const LinkedObjectSet&) = delete; - void operator=(const LinkedObjectSet&) = delete; - public: - LinkedObjectSet() = default; - virtual ~LinkedObjectSet() {} - - virtual void finalize() = 0; - - virtual JITSymbol::GetAddressFtor - getSymbolMaterializer(std::string Name) = 0; - - virtual void mapSectionAddress(const void *LocalAddress, - TargetAddress TargetAddr) const = 0; - - JITSymbol getSymbol(StringRef Name, bool ExportedSymbolsOnly) { - auto SymEntry = SymbolTable.find(Name); - if (SymEntry == SymbolTable.end()) - return nullptr; - if (!SymEntry->second.isExported() && ExportedSymbolsOnly) - return nullptr; - if (!Finalized) - return JITSymbol(getSymbolMaterializer(Name), - SymEntry->second.getFlags()); - return JITSymbol(SymEntry->second); - } - protected: - StringMap SymbolTable; - bool Finalized = false; - }; - - typedef std::list> LinkedObjectSetListT; - -public: - /// @brief Handle to a set of loaded objects. - typedef LinkedObjectSetListT::iterator ObjSetHandleT; -}; - - -/// @brief Default (no-op) action to perform when loading objects. -class DoNothingOnNotifyLoaded { -public: - template - void operator()(ObjectLinkingLayerBase::ObjSetHandleT, const ObjSetT &, - const LoadResult &) {} -}; - -/// @brief Bare bones object linking layer. -/// -/// This class is intended to be used as the base layer for a JIT. It allows -/// object files to be loaded into memory, linked, and the addresses of their -/// symbols queried. All objects added to this layer can see each other's -/// symbols. -template -class ObjectLinkingLayer : public ObjectLinkingLayerBase { -public: - - /// @brief Functor for receiving finalization notifications. - typedef std::function NotifyFinalizedFtor; - -private: - - template - class ConcreteLinkedObjectSet : public LinkedObjectSet { - public: - ConcreteLinkedObjectSet(ObjSetT Objects, MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver, - FinalizerFtor Finalizer, - bool ProcessAllSections) - : MemMgr(std::move(MemMgr)), - PFC(llvm::make_unique(std::move(Objects), - std::move(Resolver), - std::move(Finalizer), - ProcessAllSections)) { - buildInitialSymbolTable(PFC->Objects); - } - - void setHandle(ObjSetHandleT H) { - PFC->Handle = H; - } - - void finalize() override { - assert(PFC && "mapSectionAddress called on finalized LinkedObjectSet"); - - RuntimeDyld RTDyld(*MemMgr, *PFC->Resolver); - RTDyld.setProcessAllSections(PFC->ProcessAllSections); - PFC->RTDyld = &RTDyld; - - PFC->Finalizer(PFC->Handle, RTDyld, std::move(PFC->Objects), - [&]() { - this->updateSymbolTable(RTDyld); - this->Finalized = true; - }); - - // Release resources. - PFC = nullptr; - } - - JITSymbol::GetAddressFtor getSymbolMaterializer(std::string Name) override { - return - [this, Name]() { - // The symbol may be materialized between the creation of this lambda - // and its execution, so we need to double check. - if (!this->Finalized) - this->finalize(); - return this->getSymbol(Name, false).getAddress(); - }; - } - - void mapSectionAddress(const void *LocalAddress, - TargetAddress TargetAddr) const override { - assert(PFC && "mapSectionAddress called on finalized LinkedObjectSet"); - assert(PFC->RTDyld && "mapSectionAddress called on raw LinkedObjectSet"); - PFC->RTDyld->mapSectionAddress(LocalAddress, TargetAddr); - } - - private: - - void buildInitialSymbolTable(const ObjSetT &Objects) { - for (const auto &Obj : Objects) - for (auto &Symbol : getObject(*Obj).symbols()) { - if (Symbol.getFlags() & object::SymbolRef::SF_Undefined) - continue; - Expected SymbolName = Symbol.getName(); - // FIXME: Raise an error for bad symbols. - if (!SymbolName) { - consumeError(SymbolName.takeError()); - continue; - } - auto Flags = JITSymbol::flagsFromObjectSymbol(Symbol); - SymbolTable.insert( - std::make_pair(*SymbolName, RuntimeDyld::SymbolInfo(0, Flags))); - } - } - - void updateSymbolTable(const RuntimeDyld &RTDyld) { - for (auto &SymEntry : SymbolTable) - SymEntry.second = RTDyld.getSymbol(SymEntry.first()); - } - - // Contains the information needed prior to finalization: the object files, - // memory manager, resolver, and flags needed for RuntimeDyld. - struct PreFinalizeContents { - PreFinalizeContents(ObjSetT Objects, SymbolResolverPtrT Resolver, - FinalizerFtor Finalizer, bool ProcessAllSections) - : Objects(std::move(Objects)), Resolver(std::move(Resolver)), - Finalizer(std::move(Finalizer)), - ProcessAllSections(ProcessAllSections) {} - - ObjSetT Objects; - SymbolResolverPtrT Resolver; - FinalizerFtor Finalizer; - bool ProcessAllSections; - ObjSetHandleT Handle; - RuntimeDyld *RTDyld; - }; - - MemoryManagerPtrT MemMgr; - std::unique_ptr PFC; - }; - - template - std::unique_ptr< - ConcreteLinkedObjectSet> - createLinkedObjectSet(ObjSetT Objects, MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver, - FinalizerFtor Finalizer, - bool ProcessAllSections) { - typedef ConcreteLinkedObjectSet LOS; - return llvm::make_unique(std::move(Objects), std::move(MemMgr), - std::move(Resolver), std::move(Finalizer), - ProcessAllSections); - } - -public: - - /// @brief LoadedObjectInfo list. Contains a list of owning pointers to - /// RuntimeDyld::LoadedObjectInfo instances. - typedef std::vector> - LoadedObjInfoList; - - /// @brief Construct an ObjectLinkingLayer with the given NotifyLoaded, - /// and NotifyFinalized functors. - ObjectLinkingLayer( - NotifyLoadedFtor NotifyLoaded = NotifyLoadedFtor(), - NotifyFinalizedFtor NotifyFinalized = NotifyFinalizedFtor()) - : NotifyLoaded(std::move(NotifyLoaded)), - NotifyFinalized(std::move(NotifyFinalized)), - ProcessAllSections(false) {} - - /// @brief Set the 'ProcessAllSections' flag. - /// - /// If set to true, all sections in each object file will be allocated using - /// the memory manager, rather than just the sections required for execution. - /// - /// This is kludgy, and may be removed in the future. - void setProcessAllSections(bool ProcessAllSections) { - this->ProcessAllSections = ProcessAllSections; - } - - /// @brief Add a set of objects (or archives) that will be treated as a unit - /// for the purposes of symbol lookup and memory management. - /// - /// @return A handle that can be used to refer to the loaded objects (for - /// symbol searching, finalization, freeing memory, etc.). - template - ObjSetHandleT addObjectSet(ObjSetT Objects, - MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) { - - auto Finalizer = [&](ObjSetHandleT H, RuntimeDyld &RTDyld, - const ObjSetT &Objs, - std::function LOSHandleLoad) { - LoadedObjInfoList LoadedObjInfos; - - for (auto &Obj : Objs) - LoadedObjInfos.push_back(RTDyld.loadObject(this->getObject(*Obj))); - - LOSHandleLoad(); - - this->NotifyLoaded(H, Objs, LoadedObjInfos); - - RTDyld.finalizeWithMemoryManagerLocking(); - - if (this->NotifyFinalized) - this->NotifyFinalized(H); - }; - - auto LOS = - createLinkedObjectSet(std::move(Objects), std::move(MemMgr), - std::move(Resolver), std::move(Finalizer), - ProcessAllSections); - // LOS is an owning-ptr. Keep a non-owning one so that we can set the handle - // below. - auto *LOSPtr = LOS.get(); - - ObjSetHandleT Handle = LinkedObjSetList.insert(LinkedObjSetList.end(), - std::move(LOS)); - LOSPtr->setHandle(Handle); - - return Handle; - } - - /// @brief Remove the set of objects associated with handle H. - /// - /// All memory allocated for the objects will be freed, and the sections and - /// symbols they provided will no longer be available. No attempt is made to - /// re-emit the missing symbols, and any use of these symbols (directly or - /// indirectly) will result in undefined behavior. If dependence tracking is - /// required to detect or resolve such issues it should be added at a higher - /// layer. - void removeObjectSet(ObjSetHandleT H) { - // How do we invalidate the symbols in H? - LinkedObjSetList.erase(H); - } - - /// @brief Search for the given named symbol. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it exists. - JITSymbol findSymbol(StringRef Name, bool ExportedSymbolsOnly) { - for (auto I = LinkedObjSetList.begin(), E = LinkedObjSetList.end(); I != E; - ++I) - if (auto Symbol = findSymbolIn(I, Name, ExportedSymbolsOnly)) - return Symbol; - - return nullptr; - } - - /// @brief Search for the given named symbol in the context of the set of - /// loaded objects represented by the handle H. - /// @param H The handle for the object set to search in. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it is found in the - /// given object set. - JITSymbol findSymbolIn(ObjSetHandleT H, StringRef Name, - bool ExportedSymbolsOnly) { - return (*H)->getSymbol(Name, ExportedSymbolsOnly); - } - - /// @brief Map section addresses for the objects associated with the handle H. - void mapSectionAddress(ObjSetHandleT H, const void *LocalAddress, - TargetAddress TargetAddr) { - (*H)->mapSectionAddress(LocalAddress, TargetAddr); - } - - /// @brief Immediately emit and finalize the object set represented by the - /// given handle. - /// @param H Handle for object set to emit/finalize. - void emitAndFinalize(ObjSetHandleT H) { - (*H)->finalize(); - } - -private: - - static const object::ObjectFile& getObject(const object::ObjectFile &Obj) { - return Obj; - } - - template - static const object::ObjectFile& - getObject(const object::OwningBinary &Obj) { - return *Obj.getBinary(); - } - - LinkedObjectSetListT LinkedObjSetList; - NotifyLoadedFtor NotifyLoaded; - NotifyFinalizedFtor NotifyFinalized; - bool ProcessAllSections; -}; - -} // End namespace orc. -} // End namespace llvm - -#endif // LLVM_EXECUTIONENGINE_ORC_OBJECTLINKINGLAYER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h b/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h deleted file mode 100644 index 2ffe71c9..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h +++ /dev/null @@ -1,104 +0,0 @@ -//===- ObjectTransformLayer.h - Run all objects through functor -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Run all objects passed in through a user supplied functor. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_OBJECTTRANSFORMLAYER_H -#define LLVM_EXECUTIONENGINE_ORC_OBJECTTRANSFORMLAYER_H - -#include "JITSymbol.h" - -namespace llvm { -namespace orc { - -/// @brief Object mutating layer. -/// -/// This layer accepts sets of ObjectFiles (via addObjectSet). It -/// immediately applies the user supplied functor to each object, then adds -/// the set of transformed objects to the layer below. -template -class ObjectTransformLayer { -public: - /// @brief Handle to a set of added objects. - typedef typename BaseLayerT::ObjSetHandleT ObjSetHandleT; - - /// @brief Construct an ObjectTransformLayer with the given BaseLayer - ObjectTransformLayer(BaseLayerT &BaseLayer, - TransformFtor Transform = TransformFtor()) - : BaseLayer(BaseLayer), Transform(std::move(Transform)) {} - - /// @brief Apply the transform functor to each object in the object set, then - /// add the resulting set of objects to the base layer, along with the - /// memory manager and symbol resolver. - /// - /// @return A handle for the added objects. - template - ObjSetHandleT addObjectSet(ObjSetT Objects, MemoryManagerPtrT MemMgr, - SymbolResolverPtrT Resolver) { - - for (auto I = Objects.begin(), E = Objects.end(); I != E; ++I) - *I = Transform(std::move(*I)); - - return BaseLayer.addObjectSet(std::move(Objects), std::move(MemMgr), - std::move(Resolver)); - } - - /// @brief Remove the object set associated with the handle H. - void removeObjectSet(ObjSetHandleT H) { BaseLayer.removeObjectSet(H); } - - /// @brief Search for the given named symbol. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it exists. - JITSymbol findSymbol(const std::string &Name, bool ExportedSymbolsOnly) { - return BaseLayer.findSymbol(Name, ExportedSymbolsOnly); - } - - /// @brief Get the address of the given symbol in the context of the set of - /// objects represented by the handle H. This call is forwarded to the - /// base layer's implementation. - /// @param H The handle for the object set to search in. - /// @param Name The name of the symbol to search for. - /// @param ExportedSymbolsOnly If true, search only for exported symbols. - /// @return A handle for the given named symbol, if it is found in the - /// given object set. - JITSymbol findSymbolIn(ObjSetHandleT H, const std::string &Name, - bool ExportedSymbolsOnly) { - return BaseLayer.findSymbolIn(H, Name, ExportedSymbolsOnly); - } - - /// @brief Immediately emit and finalize the object set represented by the - /// given handle. - /// @param H Handle for object set to emit/finalize. - void emitAndFinalize(ObjSetHandleT H) { BaseLayer.emitAndFinalize(H); } - - /// @brief Map section addresses for the objects associated with the handle H. - void mapSectionAddress(ObjSetHandleT H, const void *LocalAddress, - TargetAddress TargetAddr) { - BaseLayer.mapSectionAddress(H, LocalAddress, TargetAddr); - } - - /// @brief Access the transform functor directly. - TransformFtor &getTransform() { return Transform; } - - /// @brief Access the mumate functor directly. - const TransformFtor &getTransform() const { return Transform; } - -private: - BaseLayerT &BaseLayer; - TransformFtor Transform; -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_OBJECTTRANSFORMLAYER_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h deleted file mode 100644 index 4a8d0b0b..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h +++ /dev/null @@ -1,232 +0,0 @@ -//===-------------- OrcABISupport.h - ABI support code ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// ABI specific code for Orc, e.g. callback assembly. -// -// ABI classes should be part of the JIT *target* process, not the host -// process (except where you're doing hosted JITing and the two are one and the -// same). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_ORCABISUPPORT_H -#define LLVM_EXECUTIONENGINE_ORC_ORCABISUPPORT_H - -#include "IndirectionUtils.h" -#include "llvm/Support/Memory.h" -#include "llvm/Support/Process.h" - -namespace llvm { -namespace orc { - -/// Generic ORC ABI support. -/// -/// This class can be substituted as the target architecure support class for -/// ORC templates that require one (e.g. IndirectStubsManagers). It does not -/// support lazy JITing however, and any attempt to use that functionality -/// will result in execution of an llvm_unreachable. -class OrcGenericABI { -public: - static const unsigned PointerSize = sizeof(uintptr_t); - static const unsigned TrampolineSize = 1; - static const unsigned ResolverCodeSize = 1; - - typedef TargetAddress (*JITReentryFn)(void *CallbackMgr, void *TrampolineId); - - static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, - void *CallbackMgr) { - llvm_unreachable("writeResolverCode is not supported by the generic host " - "support class"); - } - - static void writeTrampolines(uint8_t *TrampolineMem, void *ResolverAddr, - unsigned NumTrampolines) { - llvm_unreachable("writeTrampolines is not supported by the generic host " - "support class"); - } - - class IndirectStubsInfo { - public: - const static unsigned StubSize = 1; - unsigned getNumStubs() const { llvm_unreachable("Not supported"); } - void *getStub(unsigned Idx) const { llvm_unreachable("Not supported"); } - void **getPtr(unsigned Idx) const { llvm_unreachable("Not supported"); } - }; - - static Error emitIndirectStubsBlock(IndirectStubsInfo &StubsInfo, - unsigned MinStubs, void *InitialPtrVal) { - llvm_unreachable("emitIndirectStubsBlock is not supported by the generic " - "host support class"); - } -}; - -/// @brief Provide information about stub blocks generated by the -/// makeIndirectStubsBlock function. -template class GenericIndirectStubsInfo { -public: - const static unsigned StubSize = StubSizeVal; - - GenericIndirectStubsInfo() : NumStubs(0) {} - GenericIndirectStubsInfo(unsigned NumStubs, sys::OwningMemoryBlock StubsMem) - : NumStubs(NumStubs), StubsMem(std::move(StubsMem)) {} - GenericIndirectStubsInfo(GenericIndirectStubsInfo &&Other) - : NumStubs(Other.NumStubs), StubsMem(std::move(Other.StubsMem)) { - Other.NumStubs = 0; - } - GenericIndirectStubsInfo &operator=(GenericIndirectStubsInfo &&Other) { - NumStubs = Other.NumStubs; - Other.NumStubs = 0; - StubsMem = std::move(Other.StubsMem); - return *this; - } - - /// @brief Number of stubs in this block. - unsigned getNumStubs() const { return NumStubs; } - - /// @brief Get a pointer to the stub at the given index, which must be in - /// the range 0 .. getNumStubs() - 1. - void *getStub(unsigned Idx) const { - return static_cast(StubsMem.base()) + Idx * StubSize; - } - - /// @brief Get a pointer to the implementation-pointer at the given index, - /// which must be in the range 0 .. getNumStubs() - 1. - void **getPtr(unsigned Idx) const { - char *PtrsBase = static_cast(StubsMem.base()) + NumStubs * StubSize; - return reinterpret_cast(PtrsBase) + Idx; - } - -private: - unsigned NumStubs; - sys::OwningMemoryBlock StubsMem; -}; - -class OrcAArch64 { -public: - static const unsigned PointerSize = 8; - static const unsigned TrampolineSize = 12; - static const unsigned ResolverCodeSize = 0x120; - - typedef GenericIndirectStubsInfo<8> IndirectStubsInfo; - - typedef TargetAddress (*JITReentryFn)(void *CallbackMgr, void *TrampolineId); - - /// @brief Write the resolver code into the given memory. The user is be - /// responsible for allocating the memory and setting permissions. - static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, - void *CallbackMgr); - - /// @brief Write the requsted number of trampolines into the given memory, - /// which must be big enough to hold 1 pointer, plus NumTrampolines - /// trampolines. - static void writeTrampolines(uint8_t *TrampolineMem, void *ResolverAddr, - unsigned NumTrampolines); - - /// @brief Emit at least MinStubs worth of indirect call stubs, rounded out to - /// the nearest page size. - /// - /// E.g. Asking for 4 stubs on x86-64, where stubs are 8-bytes, with 4k - /// pages will return a block of 512 stubs (4096 / 8 = 512). Asking for 513 - /// will return a block of 1024 (2-pages worth). - static Error emitIndirectStubsBlock(IndirectStubsInfo &StubsInfo, - unsigned MinStubs, void *InitialPtrVal); -}; - -/// @brief X86_64 code that's common to all ABIs. -/// -/// X86_64 supports lazy JITing. -class OrcX86_64_Base { -public: - static const unsigned PointerSize = 8; - static const unsigned TrampolineSize = 8; - - typedef GenericIndirectStubsInfo<8> IndirectStubsInfo; - - /// @brief Write the requsted number of trampolines into the given memory, - /// which must be big enough to hold 1 pointer, plus NumTrampolines - /// trampolines. - static void writeTrampolines(uint8_t *TrampolineMem, void *ResolverAddr, - unsigned NumTrampolines); - - /// @brief Emit at least MinStubs worth of indirect call stubs, rounded out to - /// the nearest page size. - /// - /// E.g. Asking for 4 stubs on x86-64, where stubs are 8-bytes, with 4k - /// pages will return a block of 512 stubs (4096 / 8 = 512). Asking for 513 - /// will return a block of 1024 (2-pages worth). - static Error emitIndirectStubsBlock(IndirectStubsInfo &StubsInfo, - unsigned MinStubs, void *InitialPtrVal); -}; - -/// @brief X86_64 support for SysV ABI (Linux, MacOSX). -/// -/// X86_64_SysV supports lazy JITing. -class OrcX86_64_SysV : public OrcX86_64_Base { -public: - static const unsigned ResolverCodeSize = 0x6C; - typedef TargetAddress(*JITReentryFn)(void *CallbackMgr, void *TrampolineId); - - /// @brief Write the resolver code into the given memory. The user is be - /// responsible for allocating the memory and setting permissions. - static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, - void *CallbackMgr); -}; - -/// @brief X86_64 support for Win32. -/// -/// X86_64_Win32 supports lazy JITing. -class OrcX86_64_Win32 : public OrcX86_64_Base { -public: - static const unsigned ResolverCodeSize = 0x74; - typedef TargetAddress(*JITReentryFn)(void *CallbackMgr, void *TrampolineId); - - /// @brief Write the resolver code into the given memory. The user is be - /// responsible for allocating the memory and setting permissions. - static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, - void *CallbackMgr); -}; - -/// @brief I386 support. -/// -/// I386 supports lazy JITing. -class OrcI386 { -public: - static const unsigned PointerSize = 4; - static const unsigned TrampolineSize = 8; - static const unsigned ResolverCodeSize = 0x4a; - - typedef GenericIndirectStubsInfo<8> IndirectStubsInfo; - - typedef TargetAddress (*JITReentryFn)(void *CallbackMgr, void *TrampolineId); - - /// @brief Write the resolver code into the given memory. The user is be - /// responsible for allocating the memory and setting permissions. - static void writeResolverCode(uint8_t *ResolveMem, JITReentryFn Reentry, - void *CallbackMgr); - - /// @brief Write the requsted number of trampolines into the given memory, - /// which must be big enough to hold 1 pointer, plus NumTrampolines - /// trampolines. - static void writeTrampolines(uint8_t *TrampolineMem, void *ResolverAddr, - unsigned NumTrampolines); - - /// @brief Emit at least MinStubs worth of indirect call stubs, rounded out to - /// the nearest page size. - /// - /// E.g. Asking for 4 stubs on i386, where stubs are 8-bytes, with 4k - /// pages will return a block of 512 stubs (4096 / 8 = 512). Asking for 513 - /// will return a block of 1024 (2-pages worth). - static Error emitIndirectStubsBlock(IndirectStubsInfo &StubsInfo, - unsigned MinStubs, void *InitialPtrVal); -}; - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_ORCABISUPPORT_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcError.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcError.h deleted file mode 100644 index 1b3f25fa..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/OrcError.h +++ /dev/null @@ -1,39 +0,0 @@ -//===------ OrcError.h - Reject symbol lookup requests ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Define an error category, error codes, and helper utilities for Orc. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_ORCERROR_H -#define LLVM_EXECUTIONENGINE_ORC_ORCERROR_H - -#include "llvm/Support/Error.h" -#include - -namespace llvm { -namespace orc { - -enum class OrcErrorCode : int { - // RPC Errors - RemoteAllocatorDoesNotExist = 1, - RemoteAllocatorIdAlreadyInUse, - RemoteMProtectAddrUnrecognized, - RemoteIndirectStubsOwnerDoesNotExist, - RemoteIndirectStubsOwnerIdAlreadyInUse, - UnexpectedRPCCall, - UnexpectedRPCResponse, -}; - -Error orcError(OrcErrorCode ErrCode); - -} // End namespace orc. -} // End namespace llvm. - -#endif // LLVM_EXECUTIONENGINE_ORC_ORCERROR_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h deleted file mode 100644 index 5c867e7e..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h +++ /dev/null @@ -1,826 +0,0 @@ -//===---- OrcRemoteTargetClient.h - Orc Remote-target Client ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the OrcRemoteTargetClient class and helpers. This class -// can be used to communicate over an RPCChannel with an OrcRemoteTargetServer -// instance to support remote-JITing. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETCLIENT_H -#define LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETCLIENT_H - -#include "IndirectionUtils.h" -#include "OrcRemoteTargetRPCAPI.h" -#include - -#define DEBUG_TYPE "orc-remote" - -namespace llvm { -namespace orc { -namespace remote { - -/// This class provides utilities (including memory manager, indirect stubs -/// manager, and compile callback manager types) that support remote JITing -/// in ORC. -/// -/// Each of the utility classes talks to a JIT server (an instance of the -/// OrcRemoteTargetServer class) via an RPC system (see RPCUtils.h) to carry out -/// its actions. -template -class OrcRemoteTargetClient : public OrcRemoteTargetRPCAPI { -public: - // FIXME: Remove move/copy ops once MSVC supports synthesizing move ops. - - OrcRemoteTargetClient(const OrcRemoteTargetClient &) = delete; - OrcRemoteTargetClient &operator=(const OrcRemoteTargetClient &) = delete; - - OrcRemoteTargetClient(OrcRemoteTargetClient &&Other) - : Channel(Other.Channel), ExistingError(std::move(Other.ExistingError)), - RemoteTargetTriple(std::move(Other.RemoteTargetTriple)), - RemotePointerSize(std::move(Other.RemotePointerSize)), - RemotePageSize(std::move(Other.RemotePageSize)), - RemoteTrampolineSize(std::move(Other.RemoteTrampolineSize)), - RemoteIndirectStubSize(std::move(Other.RemoteIndirectStubSize)), - AllocatorIds(std::move(Other.AllocatorIds)), - IndirectStubOwnerIds(std::move(Other.IndirectStubOwnerIds)) {} - - OrcRemoteTargetClient &operator=(OrcRemoteTargetClient &&) = delete; - - /// Remote memory manager. - class RCMemoryManager : public RuntimeDyld::MemoryManager { - public: - RCMemoryManager(OrcRemoteTargetClient &Client, ResourceIdMgr::ResourceId Id) - : Client(Client), Id(Id) { - DEBUG(dbgs() << "Created remote allocator " << Id << "\n"); - } - - RCMemoryManager(RCMemoryManager &&Other) - : Client(std::move(Other.Client)), Id(std::move(Other.Id)), - Unmapped(std::move(Other.Unmapped)), - Unfinalized(std::move(Other.Unfinalized)) {} - - RCMemoryManager operator=(RCMemoryManager &&Other) { - Client = std::move(Other.Client); - Id = std::move(Other.Id); - Unmapped = std::move(Other.Unmapped); - Unfinalized = std::move(Other.Unfinalized); - return *this; - } - - ~RCMemoryManager() override { - Client.destroyRemoteAllocator(Id); - DEBUG(dbgs() << "Destroyed remote allocator " << Id << "\n"); - } - - uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, - StringRef SectionName) override { - Unmapped.back().CodeAllocs.emplace_back(Size, Alignment); - uint8_t *Alloc = reinterpret_cast( - Unmapped.back().CodeAllocs.back().getLocalAddress()); - DEBUG(dbgs() << "Allocator " << Id << " allocated code for " - << SectionName << ": " << Alloc << " (" << Size - << " bytes, alignment " << Alignment << ")\n"); - return Alloc; - } - - uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, StringRef SectionName, - bool IsReadOnly) override { - if (IsReadOnly) { - Unmapped.back().RODataAllocs.emplace_back(Size, Alignment); - uint8_t *Alloc = reinterpret_cast( - Unmapped.back().RODataAllocs.back().getLocalAddress()); - DEBUG(dbgs() << "Allocator " << Id << " allocated ro-data for " - << SectionName << ": " << Alloc << " (" << Size - << " bytes, alignment " << Alignment << ")\n"); - return Alloc; - } // else... - - Unmapped.back().RWDataAllocs.emplace_back(Size, Alignment); - uint8_t *Alloc = reinterpret_cast( - Unmapped.back().RWDataAllocs.back().getLocalAddress()); - DEBUG(dbgs() << "Allocator " << Id << " allocated rw-data for " - << SectionName << ": " << Alloc << " (" << Size - << " bytes, alignment " << Alignment << ")\n"); - return Alloc; - } - - void reserveAllocationSpace(uintptr_t CodeSize, uint32_t CodeAlign, - uintptr_t RODataSize, uint32_t RODataAlign, - uintptr_t RWDataSize, - uint32_t RWDataAlign) override { - Unmapped.push_back(ObjectAllocs()); - - DEBUG(dbgs() << "Allocator " << Id << " reserved:\n"); - - if (CodeSize != 0) { - if (auto AddrOrErr = Client.reserveMem(Id, CodeSize, CodeAlign)) - Unmapped.back().RemoteCodeAddr = *AddrOrErr; - else { - // FIXME; Add error to poll. - assert(!AddrOrErr.takeError() && "Failed reserving remote memory."); - } - - DEBUG(dbgs() << " code: " - << format("0x%016x", Unmapped.back().RemoteCodeAddr) - << " (" << CodeSize << " bytes, alignment " << CodeAlign - << ")\n"); - } - - if (RODataSize != 0) { - if (auto AddrOrErr = Client.reserveMem(Id, RODataSize, RODataAlign)) - Unmapped.back().RemoteRODataAddr = *AddrOrErr; - else { - // FIXME; Add error to poll. - assert(!AddrOrErr.takeError() && "Failed reserving remote memory."); - } - - DEBUG(dbgs() << " ro-data: " - << format("0x%016x", Unmapped.back().RemoteRODataAddr) - << " (" << RODataSize << " bytes, alignment " - << RODataAlign << ")\n"); - } - - if (RWDataSize != 0) { - if (auto AddrOrErr = Client.reserveMem(Id, RWDataSize, RWDataAlign)) - Unmapped.back().RemoteRWDataAddr = *AddrOrErr; - else { - // FIXME; Add error to poll. - assert(!AddrOrErr.takeError() && "Failed reserving remote memory."); - } - - DEBUG(dbgs() << " rw-data: " - << format("0x%016x", Unmapped.back().RemoteRWDataAddr) - << " (" << RWDataSize << " bytes, alignment " - << RWDataAlign << ")\n"); - } - } - - bool needsToReserveAllocationSpace() override { return true; } - - void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, - size_t Size) override { - UnfinalizedEHFrames.push_back( - std::make_pair(LoadAddr, static_cast(Size))); - } - - void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, - size_t Size) override { - auto Err = Client.deregisterEHFrames(LoadAddr, Size); - // FIXME: Add error poll. - assert(!Err && "Failed to register remote EH frames."); - (void)Err; - } - - void notifyObjectLoaded(RuntimeDyld &Dyld, - const object::ObjectFile &Obj) override { - DEBUG(dbgs() << "Allocator " << Id << " applied mappings:\n"); - for (auto &ObjAllocs : Unmapped) { - { - TargetAddress NextCodeAddr = ObjAllocs.RemoteCodeAddr; - for (auto &Alloc : ObjAllocs.CodeAllocs) { - NextCodeAddr = alignTo(NextCodeAddr, Alloc.getAlign()); - Dyld.mapSectionAddress(Alloc.getLocalAddress(), NextCodeAddr); - DEBUG(dbgs() << " code: " - << static_cast(Alloc.getLocalAddress()) - << " -> " << format("0x%016x", NextCodeAddr) << "\n"); - Alloc.setRemoteAddress(NextCodeAddr); - NextCodeAddr += Alloc.getSize(); - } - } - { - TargetAddress NextRODataAddr = ObjAllocs.RemoteRODataAddr; - for (auto &Alloc : ObjAllocs.RODataAllocs) { - NextRODataAddr = alignTo(NextRODataAddr, Alloc.getAlign()); - Dyld.mapSectionAddress(Alloc.getLocalAddress(), NextRODataAddr); - DEBUG(dbgs() << " ro-data: " - << static_cast(Alloc.getLocalAddress()) - << " -> " << format("0x%016x", NextRODataAddr) - << "\n"); - Alloc.setRemoteAddress(NextRODataAddr); - NextRODataAddr += Alloc.getSize(); - } - } - { - TargetAddress NextRWDataAddr = ObjAllocs.RemoteRWDataAddr; - for (auto &Alloc : ObjAllocs.RWDataAllocs) { - NextRWDataAddr = alignTo(NextRWDataAddr, Alloc.getAlign()); - Dyld.mapSectionAddress(Alloc.getLocalAddress(), NextRWDataAddr); - DEBUG(dbgs() << " rw-data: " - << static_cast(Alloc.getLocalAddress()) - << " -> " << format("0x%016x", NextRWDataAddr) - << "\n"); - Alloc.setRemoteAddress(NextRWDataAddr); - NextRWDataAddr += Alloc.getSize(); - } - } - Unfinalized.push_back(std::move(ObjAllocs)); - } - Unmapped.clear(); - } - - bool finalizeMemory(std::string *ErrMsg = nullptr) override { - DEBUG(dbgs() << "Allocator " << Id << " finalizing:\n"); - - for (auto &ObjAllocs : Unfinalized) { - - for (auto &Alloc : ObjAllocs.CodeAllocs) { - DEBUG(dbgs() << " copying code: " - << static_cast(Alloc.getLocalAddress()) << " -> " - << format("0x%016x", Alloc.getRemoteAddress()) << " (" - << Alloc.getSize() << " bytes)\n"); - if (auto Err = - Client.writeMem(Alloc.getRemoteAddress(), - Alloc.getLocalAddress(), Alloc.getSize())) { - // FIXME: Replace this once finalizeMemory can return an Error. - handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) { - if (ErrMsg) { - raw_string_ostream ErrOut(*ErrMsg); - EIB.log(ErrOut); - } - }); - return true; - } - } - - if (ObjAllocs.RemoteCodeAddr) { - DEBUG(dbgs() << " setting R-X permissions on code block: " - << format("0x%016x", ObjAllocs.RemoteCodeAddr) << "\n"); - if (auto Err = Client.setProtections(Id, ObjAllocs.RemoteCodeAddr, - sys::Memory::MF_READ | - sys::Memory::MF_EXEC)) { - // FIXME: Replace this once finalizeMemory can return an Error. - handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) { - if (ErrMsg) { - raw_string_ostream ErrOut(*ErrMsg); - EIB.log(ErrOut); - } - }); - return true; - } - } - - for (auto &Alloc : ObjAllocs.RODataAllocs) { - DEBUG(dbgs() << " copying ro-data: " - << static_cast(Alloc.getLocalAddress()) << " -> " - << format("0x%016x", Alloc.getRemoteAddress()) << " (" - << Alloc.getSize() << " bytes)\n"); - if (auto Err = - Client.writeMem(Alloc.getRemoteAddress(), - Alloc.getLocalAddress(), Alloc.getSize())) { - // FIXME: Replace this once finalizeMemory can return an Error. - handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) { - if (ErrMsg) { - raw_string_ostream ErrOut(*ErrMsg); - EIB.log(ErrOut); - } - }); - return true; - } - } - - if (ObjAllocs.RemoteRODataAddr) { - DEBUG(dbgs() << " setting R-- permissions on ro-data block: " - << format("0x%016x", ObjAllocs.RemoteRODataAddr) - << "\n"); - if (auto Err = Client.setProtections(Id, ObjAllocs.RemoteRODataAddr, - sys::Memory::MF_READ)) { - // FIXME: Replace this once finalizeMemory can return an Error. - handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) { - if (ErrMsg) { - raw_string_ostream ErrOut(*ErrMsg); - EIB.log(ErrOut); - } - }); - return false; - } - } - - for (auto &Alloc : ObjAllocs.RWDataAllocs) { - DEBUG(dbgs() << " copying rw-data: " - << static_cast(Alloc.getLocalAddress()) << " -> " - << format("0x%016x", Alloc.getRemoteAddress()) << " (" - << Alloc.getSize() << " bytes)\n"); - if (auto Err = - Client.writeMem(Alloc.getRemoteAddress(), - Alloc.getLocalAddress(), Alloc.getSize())) { - // FIXME: Replace this once finalizeMemory can return an Error. - handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) { - if (ErrMsg) { - raw_string_ostream ErrOut(*ErrMsg); - EIB.log(ErrOut); - } - }); - return false; - } - } - - if (ObjAllocs.RemoteRWDataAddr) { - DEBUG(dbgs() << " setting RW- permissions on rw-data block: " - << format("0x%016x", ObjAllocs.RemoteRWDataAddr) - << "\n"); - if (auto Err = Client.setProtections(Id, ObjAllocs.RemoteRWDataAddr, - sys::Memory::MF_READ | - sys::Memory::MF_WRITE)) { - // FIXME: Replace this once finalizeMemory can return an Error. - handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) { - if (ErrMsg) { - raw_string_ostream ErrOut(*ErrMsg); - EIB.log(ErrOut); - } - }); - return false; - } - } - } - Unfinalized.clear(); - - for (auto &EHFrame : UnfinalizedEHFrames) { - if (auto Err = Client.registerEHFrames(EHFrame.first, EHFrame.second)) { - // FIXME: Replace this once finalizeMemory can return an Error. - handleAllErrors(std::move(Err), [&](ErrorInfoBase &EIB) { - if (ErrMsg) { - raw_string_ostream ErrOut(*ErrMsg); - EIB.log(ErrOut); - } - }); - return false; - } - } - UnfinalizedEHFrames.clear(); - - return false; - } - - private: - class Alloc { - public: - Alloc(uint64_t Size, unsigned Align) - : Size(Size), Align(Align), Contents(new char[Size + Align - 1]) {} - - Alloc(Alloc &&Other) - : Size(std::move(Other.Size)), Align(std::move(Other.Align)), - Contents(std::move(Other.Contents)), - RemoteAddr(std::move(Other.RemoteAddr)) {} - - Alloc &operator=(Alloc &&Other) { - Size = std::move(Other.Size); - Align = std::move(Other.Align); - Contents = std::move(Other.Contents); - RemoteAddr = std::move(Other.RemoteAddr); - return *this; - } - - uint64_t getSize() const { return Size; } - - unsigned getAlign() const { return Align; } - - char *getLocalAddress() const { - uintptr_t LocalAddr = reinterpret_cast(Contents.get()); - LocalAddr = alignTo(LocalAddr, Align); - return reinterpret_cast(LocalAddr); - } - - void setRemoteAddress(TargetAddress RemoteAddr) { - this->RemoteAddr = RemoteAddr; - } - - TargetAddress getRemoteAddress() const { return RemoteAddr; } - - private: - uint64_t Size; - unsigned Align; - std::unique_ptr Contents; - TargetAddress RemoteAddr = 0; - }; - - struct ObjectAllocs { - ObjectAllocs() = default; - - ObjectAllocs(ObjectAllocs &&Other) - : RemoteCodeAddr(std::move(Other.RemoteCodeAddr)), - RemoteRODataAddr(std::move(Other.RemoteRODataAddr)), - RemoteRWDataAddr(std::move(Other.RemoteRWDataAddr)), - CodeAllocs(std::move(Other.CodeAllocs)), - RODataAllocs(std::move(Other.RODataAllocs)), - RWDataAllocs(std::move(Other.RWDataAllocs)) {} - - ObjectAllocs &operator=(ObjectAllocs &&Other) { - RemoteCodeAddr = std::move(Other.RemoteCodeAddr); - RemoteRODataAddr = std::move(Other.RemoteRODataAddr); - RemoteRWDataAddr = std::move(Other.RemoteRWDataAddr); - CodeAllocs = std::move(Other.CodeAllocs); - RODataAllocs = std::move(Other.RODataAllocs); - RWDataAllocs = std::move(Other.RWDataAllocs); - return *this; - } - - TargetAddress RemoteCodeAddr = 0; - TargetAddress RemoteRODataAddr = 0; - TargetAddress RemoteRWDataAddr = 0; - std::vector CodeAllocs, RODataAllocs, RWDataAllocs; - }; - - OrcRemoteTargetClient &Client; - ResourceIdMgr::ResourceId Id; - std::vector Unmapped; - std::vector Unfinalized; - std::vector> UnfinalizedEHFrames; - }; - - /// Remote indirect stubs manager. - class RCIndirectStubsManager : public IndirectStubsManager { - public: - RCIndirectStubsManager(OrcRemoteTargetClient &Remote, - ResourceIdMgr::ResourceId Id) - : Remote(Remote), Id(Id) {} - - ~RCIndirectStubsManager() override { - if (auto Err = Remote.destroyIndirectStubsManager(Id)) { - // FIXME: Thread this error back to clients. - consumeError(std::move(Err)); - } - } - - Error createStub(StringRef StubName, TargetAddress StubAddr, - JITSymbolFlags StubFlags) override { - if (auto Err = reserveStubs(1)) - return Err; - - return createStubInternal(StubName, StubAddr, StubFlags); - } - - Error createStubs(const StubInitsMap &StubInits) override { - if (auto Err = reserveStubs(StubInits.size())) - return Err; - - for (auto &Entry : StubInits) - if (auto Err = createStubInternal(Entry.first(), Entry.second.first, - Entry.second.second)) - return Err; - - return Error::success(); - } - - JITSymbol findStub(StringRef Name, bool ExportedStubsOnly) override { - auto I = StubIndexes.find(Name); - if (I == StubIndexes.end()) - return nullptr; - auto Key = I->second.first; - auto Flags = I->second.second; - auto StubSymbol = JITSymbol(getStubAddr(Key), Flags); - if (ExportedStubsOnly && !StubSymbol.isExported()) - return nullptr; - return StubSymbol; - } - - JITSymbol findPointer(StringRef Name) override { - auto I = StubIndexes.find(Name); - if (I == StubIndexes.end()) - return nullptr; - auto Key = I->second.first; - auto Flags = I->second.second; - return JITSymbol(getPtrAddr(Key), Flags); - } - - Error updatePointer(StringRef Name, TargetAddress NewAddr) override { - auto I = StubIndexes.find(Name); - assert(I != StubIndexes.end() && "No stub pointer for symbol"); - auto Key = I->second.first; - return Remote.writePointer(getPtrAddr(Key), NewAddr); - } - - private: - struct RemoteIndirectStubsInfo { - TargetAddress StubBase; - TargetAddress PtrBase; - unsigned NumStubs; - }; - - OrcRemoteTargetClient &Remote; - ResourceIdMgr::ResourceId Id; - std::vector RemoteIndirectStubsInfos; - typedef std::pair StubKey; - std::vector FreeStubs; - StringMap> StubIndexes; - - Error reserveStubs(unsigned NumStubs) { - if (NumStubs <= FreeStubs.size()) - return Error::success(); - - unsigned NewStubsRequired = NumStubs - FreeStubs.size(); - TargetAddress StubBase; - TargetAddress PtrBase; - unsigned NumStubsEmitted; - - if (auto StubInfoOrErr = Remote.emitIndirectStubs(Id, NewStubsRequired)) - std::tie(StubBase, PtrBase, NumStubsEmitted) = *StubInfoOrErr; - else - return StubInfoOrErr.takeError(); - - unsigned NewBlockId = RemoteIndirectStubsInfos.size(); - RemoteIndirectStubsInfos.push_back({StubBase, PtrBase, NumStubsEmitted}); - - for (unsigned I = 0; I < NumStubsEmitted; ++I) - FreeStubs.push_back(std::make_pair(NewBlockId, I)); - - return Error::success(); - } - - Error createStubInternal(StringRef StubName, TargetAddress InitAddr, - JITSymbolFlags StubFlags) { - auto Key = FreeStubs.back(); - FreeStubs.pop_back(); - StubIndexes[StubName] = std::make_pair(Key, StubFlags); - return Remote.writePointer(getPtrAddr(Key), InitAddr); - } - - TargetAddress getStubAddr(StubKey K) { - assert(RemoteIndirectStubsInfos[K.first].StubBase != 0 && - "Missing stub address"); - return RemoteIndirectStubsInfos[K.first].StubBase + - K.second * Remote.getIndirectStubSize(); - } - - TargetAddress getPtrAddr(StubKey K) { - assert(RemoteIndirectStubsInfos[K.first].PtrBase != 0 && - "Missing pointer address"); - return RemoteIndirectStubsInfos[K.first].PtrBase + - K.second * Remote.getPointerSize(); - } - }; - - /// Remote compile callback manager. - class RCCompileCallbackManager : public JITCompileCallbackManager { - public: - RCCompileCallbackManager(TargetAddress ErrorHandlerAddress, - OrcRemoteTargetClient &Remote) - : JITCompileCallbackManager(ErrorHandlerAddress), Remote(Remote) {} - - private: - void grow() override { - TargetAddress BlockAddr = 0; - uint32_t NumTrampolines = 0; - if (auto TrampolineInfoOrErr = Remote.emitTrampolineBlock()) - std::tie(BlockAddr, NumTrampolines) = *TrampolineInfoOrErr; - else { - // FIXME: Return error. - llvm_unreachable("Failed to create trampolines"); - } - - uint32_t TrampolineSize = Remote.getTrampolineSize(); - for (unsigned I = 0; I < NumTrampolines; ++I) - this->AvailableTrampolines.push_back(BlockAddr + (I * TrampolineSize)); - } - - OrcRemoteTargetClient &Remote; - }; - - /// Create an OrcRemoteTargetClient. - /// Channel is the ChannelT instance to communicate on. It is assumed that - /// the channel is ready to be read from and written to. - static Expected Create(ChannelT &Channel) { - Error Err; - OrcRemoteTargetClient H(Channel, Err); - if (Err) - return std::move(Err); - return Expected(std::move(H)); - } - - /// Call the int(void) function at the given address in the target and return - /// its result. - Expected callIntVoid(TargetAddress Addr) { - DEBUG(dbgs() << "Calling int(*)(void) " << format("0x%016x", Addr) << "\n"); - - auto Listen = [&](RPCChannel &C, uint32_t Id) { - return listenForCompileRequests(C, Id); - }; - return callSTHandling(Channel, Listen, Addr); - } - - /// Call the int(int, char*[]) function at the given address in the target and - /// return its result. - Expected callMain(TargetAddress Addr, - const std::vector &Args) { - DEBUG(dbgs() << "Calling int(*)(int, char*[]) " << format("0x%016x", Addr) - << "\n"); - - auto Listen = [&](RPCChannel &C, uint32_t Id) { - return listenForCompileRequests(C, Id); - }; - return callSTHandling(Channel, Listen, Addr, Args); - } - - /// Call the void() function at the given address in the target and wait for - /// it to finish. - Error callVoidVoid(TargetAddress Addr) { - DEBUG(dbgs() << "Calling void(*)(void) " << format("0x%016x", Addr) - << "\n"); - - auto Listen = [&](RPCChannel &C, uint32_t Id) { - return listenForCompileRequests(C, Id); - }; - return callSTHandling(Channel, Listen, Addr); - } - - /// Create an RCMemoryManager which will allocate its memory on the remote - /// target. - Error createRemoteMemoryManager(std::unique_ptr &MM) { - assert(!MM && "MemoryManager should be null before creation."); - - auto Id = AllocatorIds.getNext(); - if (auto Err = callST(Channel, Id)) - return Err; - MM = llvm::make_unique(*this, Id); - return Error::success(); - } - - /// Create an RCIndirectStubsManager that will allocate stubs on the remote - /// target. - Error createIndirectStubsManager(std::unique_ptr &I) { - assert(!I && "Indirect stubs manager should be null before creation."); - auto Id = IndirectStubOwnerIds.getNext(); - if (auto Err = callST(Channel, Id)) - return Err; - I = llvm::make_unique(*this, Id); - return Error::success(); - } - - Expected - enableCompileCallbacks(TargetAddress ErrorHandlerAddress) { - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); - - // Emit the resolver block on the JIT server. - if (auto Err = callST(Channel)) - return std::move(Err); - - // Create the callback manager. - CallbackManager.emplace(ErrorHandlerAddress, *this); - RCCompileCallbackManager &Mgr = *CallbackManager; - return Mgr; - } - - /// Search for symbols in the remote process. Note: This should be used by - /// symbol resolvers *after* they've searched the local symbol table in the - /// JIT stack. - Expected getSymbolAddress(StringRef Name) { - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); - - return callST(Channel, Name); - } - - /// Get the triple for the remote target. - const std::string &getTargetTriple() const { return RemoteTargetTriple; } - - Error terminateSession() { return callST(Channel); } - -private: - OrcRemoteTargetClient(ChannelT &Channel, Error &Err) : Channel(Channel) { - ErrorAsOutParameter EAO(Err); - if (auto RIOrErr = callST(Channel)) { - std::tie(RemoteTargetTriple, RemotePointerSize, RemotePageSize, - RemoteTrampolineSize, RemoteIndirectStubSize) = *RIOrErr; - Err = Error::success(); - } else { - Err = joinErrors(RIOrErr.takeError(), std::move(ExistingError)); - } - } - - Error deregisterEHFrames(TargetAddress Addr, uint32_t Size) { - return callST(Channel, Addr, Size); - } - - void destroyRemoteAllocator(ResourceIdMgr::ResourceId Id) { - if (auto Err = callST(Channel, Id)) { - // FIXME: This will be triggered by a removeModuleSet call: Propagate - // error return up through that. - llvm_unreachable("Failed to destroy remote allocator."); - AllocatorIds.release(Id); - } - } - - Error destroyIndirectStubsManager(ResourceIdMgr::ResourceId Id) { - IndirectStubOwnerIds.release(Id); - return callST(Channel, Id); - } - - Expected> - emitIndirectStubs(ResourceIdMgr::ResourceId Id, uint32_t NumStubsRequired) { - return callST(Channel, Id, NumStubsRequired); - } - - Expected> emitTrampolineBlock() { - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); - - return callST(Channel); - } - - uint32_t getIndirectStubSize() const { return RemoteIndirectStubSize; } - uint32_t getPageSize() const { return RemotePageSize; } - uint32_t getPointerSize() const { return RemotePointerSize; } - - uint32_t getTrampolineSize() const { return RemoteTrampolineSize; } - - Error listenForCompileRequests(RPCChannel &C, uint32_t &Id) { - assert(CallbackManager && - "No calback manager. enableCompileCallbacks must be called first"); - - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); - - // FIXME: CompileCallback could be an anonymous lambda defined at the use - // site below, but that triggers a GCC 4.7 ICE. When we move off - // GCC 4.7, tidy this up. - auto CompileCallback = - [this](TargetAddress Addr) -> Expected { - return this->CallbackManager->executeCompileCallback(Addr); - }; - - if (Id == RequestCompileId) { - if (auto Err = handle(C, CompileCallback)) - return Err; - return Error::success(); - } - // else - return orcError(OrcErrorCode::UnexpectedRPCCall); - } - - Expected> readMem(char *Dst, TargetAddress Src, - uint64_t Size) { - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); - - return callST(Channel, Src, Size); - } - - Error registerEHFrames(TargetAddress &RAddr, uint32_t Size) { - return callST(Channel, RAddr, Size); - } - - Expected reserveMem(ResourceIdMgr::ResourceId Id, - uint64_t Size, uint32_t Align) { - - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); - - return callST(Channel, Id, Size, Align); - } - - Error setProtections(ResourceIdMgr::ResourceId Id, - TargetAddress RemoteSegAddr, unsigned ProtFlags) { - return callST(Channel, Id, RemoteSegAddr, ProtFlags); - } - - Error writeMem(TargetAddress Addr, const char *Src, uint64_t Size) { - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); - - return callST(Channel, DirectBufferWriter(Src, Addr, Size)); - } - - Error writePointer(TargetAddress Addr, TargetAddress PtrVal) { - // Check for an 'out-of-band' error, e.g. from an MM destructor. - if (ExistingError) - return std::move(ExistingError); - - return callST(Channel, Addr, PtrVal); - } - - static Error doNothing() { return Error::success(); } - - ChannelT &Channel; - Error ExistingError; - std::string RemoteTargetTriple; - uint32_t RemotePointerSize = 0; - uint32_t RemotePageSize = 0; - uint32_t RemoteTrampolineSize = 0; - uint32_t RemoteIndirectStubSize = 0; - ResourceIdMgr AllocatorIds, IndirectStubOwnerIds; - Optional CallbackManager; -}; - -} // end namespace remote -} // end namespace orc -} // end namespace llvm - -#undef DEBUG_TYPE - -#endif // LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETCLIENT_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h deleted file mode 100644 index 74d85152..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h +++ /dev/null @@ -1,206 +0,0 @@ -//===--- OrcRemoteTargetRPCAPI.h - Orc Remote-target RPC API ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the Orc remote-target RPC API. It should not be used -// directly, but is used by the RemoteTargetClient and RemoteTargetServer -// classes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETRPCAPI_H -#define LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETRPCAPI_H - -#include "JITSymbol.h" -#include "RPCChannel.h" -#include "RPCUtils.h" - -namespace llvm { -namespace orc { -namespace remote { - -class DirectBufferWriter { -public: - DirectBufferWriter() = default; - DirectBufferWriter(const char *Src, TargetAddress Dst, uint64_t Size) - : Src(Src), Dst(Dst), Size(Size) {} - - const char *getSrc() const { return Src; } - TargetAddress getDst() const { return Dst; } - uint64_t getSize() const { return Size; } - -private: - const char *Src; - TargetAddress Dst; - uint64_t Size; -}; - -inline Error serialize(RPCChannel &C, const DirectBufferWriter &DBW) { - if (auto EC = serialize(C, DBW.getDst())) - return EC; - if (auto EC = serialize(C, DBW.getSize())) - return EC; - return C.appendBytes(DBW.getSrc(), DBW.getSize()); -} - -inline Error deserialize(RPCChannel &C, DirectBufferWriter &DBW) { - TargetAddress Dst; - if (auto EC = deserialize(C, Dst)) - return EC; - uint64_t Size; - if (auto EC = deserialize(C, Size)) - return EC; - char *Addr = reinterpret_cast(static_cast(Dst)); - - DBW = DirectBufferWriter(0, Dst, Size); - - return C.readBytes(Addr, Size); -} - -class OrcRemoteTargetRPCAPI : public RPC { -protected: - class ResourceIdMgr { - public: - typedef uint64_t ResourceId; - static const ResourceId InvalidId = ~0U; - - ResourceId getNext() { - if (!FreeIds.empty()) { - ResourceId I = FreeIds.back(); - FreeIds.pop_back(); - return I; - } - return NextId++; - } - void release(ResourceId I) { FreeIds.push_back(I); } - - private: - ResourceId NextId = 0; - std::vector FreeIds; - }; - -public: - // FIXME: Remove constructors once MSVC supports synthesizing move-ops. - OrcRemoteTargetRPCAPI() = default; - OrcRemoteTargetRPCAPI(const OrcRemoteTargetRPCAPI &) = delete; - OrcRemoteTargetRPCAPI &operator=(const OrcRemoteTargetRPCAPI &) = delete; - - OrcRemoteTargetRPCAPI(OrcRemoteTargetRPCAPI &&) {} - OrcRemoteTargetRPCAPI &operator=(OrcRemoteTargetRPCAPI &&) { return *this; } - - enum JITFuncId : uint32_t { - InvalidId = RPCFunctionIdTraits::InvalidId, - CallIntVoidId = RPCFunctionIdTraits::FirstValidId, - CallMainId, - CallVoidVoidId, - CreateRemoteAllocatorId, - CreateIndirectStubsOwnerId, - DeregisterEHFramesId, - DestroyRemoteAllocatorId, - DestroyIndirectStubsOwnerId, - EmitIndirectStubsId, - EmitResolverBlockId, - EmitTrampolineBlockId, - GetSymbolAddressId, - GetRemoteInfoId, - ReadMemId, - RegisterEHFramesId, - ReserveMemId, - RequestCompileId, - SetProtectionsId, - TerminateSessionId, - WriteMemId, - WritePtrId - }; - - static const char *getJITFuncIdName(JITFuncId Id); - - typedef Function CallIntVoid; - - typedef Function Args)> - CallMain; - - typedef Function CallVoidVoid; - - typedef Function - CreateRemoteAllocator; - - typedef Function - CreateIndirectStubsOwner; - - typedef Function - DeregisterEHFrames; - - typedef Function - DestroyRemoteAllocator; - - typedef Function - DestroyIndirectStubsOwner; - - /// EmitIndirectStubs result is (StubsBase, PtrsBase, NumStubsEmitted). - typedef Function( - ResourceIdMgr::ResourceId StubsOwnerID, - uint32_t NumStubsRequired)> - EmitIndirectStubs; - - typedef Function EmitResolverBlock; - - /// EmitTrampolineBlock result is (BlockAddr, NumTrampolines). - typedef Function()> - EmitTrampolineBlock; - - typedef Function - GetSymbolAddress; - - /// GetRemoteInfo result is (Triple, PointerSize, PageSize, TrampolineSize, - /// IndirectStubsSize). - typedef Function()> - GetRemoteInfo; - - typedef Function(TargetAddress Src, uint64_t Size)> - ReadMem; - - typedef Function - RegisterEHFrames; - - typedef Function - ReserveMem; - - typedef Function - RequestCompile; - - typedef Function - SetProtections; - - typedef Function TerminateSession; - - typedef Function WriteMem; - - typedef Function - WritePtr; -}; - -} // end namespace remote -} // end namespace orc -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h deleted file mode 100644 index bf4299c6..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h +++ /dev/null @@ -1,451 +0,0 @@ -//===---- OrcRemoteTargetServer.h - Orc Remote-target Server ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the OrcRemoteTargetServer class. It can be used to build a -// JIT server that can execute code sent from an OrcRemoteTargetClient. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETSERVER_H -#define LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETSERVER_H - -#include "OrcRemoteTargetRPCAPI.h" -#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/Format.h" -#include "llvm/Support/Process.h" -#include "llvm/Support/raw_ostream.h" -#include - -#define DEBUG_TYPE "orc-remote" - -namespace llvm { -namespace orc { -namespace remote { - -template -class OrcRemoteTargetServer : public OrcRemoteTargetRPCAPI { -public: - typedef std::function - SymbolLookupFtor; - - typedef std::function - EHFrameRegistrationFtor; - - OrcRemoteTargetServer(ChannelT &Channel, SymbolLookupFtor SymbolLookup, - EHFrameRegistrationFtor EHFramesRegister, - EHFrameRegistrationFtor EHFramesDeregister) - : Channel(Channel), SymbolLookup(std::move(SymbolLookup)), - EHFramesRegister(std::move(EHFramesRegister)), - EHFramesDeregister(std::move(EHFramesDeregister)) {} - - // FIXME: Remove move/copy ops once MSVC supports synthesizing move ops. - OrcRemoteTargetServer(const OrcRemoteTargetServer &) = delete; - OrcRemoteTargetServer &operator=(const OrcRemoteTargetServer &) = delete; - - OrcRemoteTargetServer(OrcRemoteTargetServer &&Other) - : Channel(Other.Channel), SymbolLookup(std::move(Other.SymbolLookup)), - EHFramesRegister(std::move(Other.EHFramesRegister)), - EHFramesDeregister(std::move(Other.EHFramesDeregister)) {} - - OrcRemoteTargetServer &operator=(OrcRemoteTargetServer &&) = delete; - - Error handleKnownFunction(JITFuncId Id) { - typedef OrcRemoteTargetServer ThisT; - - DEBUG(dbgs() << "Handling known proc: " << getJITFuncIdName(Id) << "\n"); - - switch (Id) { - case CallIntVoidId: - return handle(Channel, *this, &ThisT::handleCallIntVoid); - case CallMainId: - return handle(Channel, *this, &ThisT::handleCallMain); - case CallVoidVoidId: - return handle(Channel, *this, &ThisT::handleCallVoidVoid); - case CreateRemoteAllocatorId: - return handle(Channel, *this, - &ThisT::handleCreateRemoteAllocator); - case CreateIndirectStubsOwnerId: - return handle( - Channel, *this, &ThisT::handleCreateIndirectStubsOwner); - case DeregisterEHFramesId: - return handle(Channel, *this, - &ThisT::handleDeregisterEHFrames); - case DestroyRemoteAllocatorId: - return handle( - Channel, *this, &ThisT::handleDestroyRemoteAllocator); - case DestroyIndirectStubsOwnerId: - return handle( - Channel, *this, &ThisT::handleDestroyIndirectStubsOwner); - case EmitIndirectStubsId: - return handle(Channel, *this, - &ThisT::handleEmitIndirectStubs); - case EmitResolverBlockId: - return handle(Channel, *this, - &ThisT::handleEmitResolverBlock); - case EmitTrampolineBlockId: - return handle(Channel, *this, - &ThisT::handleEmitTrampolineBlock); - case GetSymbolAddressId: - return handle(Channel, *this, - &ThisT::handleGetSymbolAddress); - case GetRemoteInfoId: - return handle(Channel, *this, &ThisT::handleGetRemoteInfo); - case ReadMemId: - return handle(Channel, *this, &ThisT::handleReadMem); - case RegisterEHFramesId: - return handle(Channel, *this, - &ThisT::handleRegisterEHFrames); - case ReserveMemId: - return handle(Channel, *this, &ThisT::handleReserveMem); - case SetProtectionsId: - return handle(Channel, *this, - &ThisT::handleSetProtections); - case WriteMemId: - return handle(Channel, *this, &ThisT::handleWriteMem); - case WritePtrId: - return handle(Channel, *this, &ThisT::handleWritePtr); - default: - return orcError(OrcErrorCode::UnexpectedRPCCall); - } - - llvm_unreachable("Unhandled JIT RPC procedure Id."); - } - - Expected requestCompile(TargetAddress TrampolineAddr) { - auto Listen = [&](RPCChannel &C, uint32_t Id) { - return handleKnownFunction(static_cast(Id)); - }; - - return callSTHandling(Channel, Listen, TrampolineAddr); - } - - Error handleTerminateSession() { - return handle(Channel, []() { return Error::success(); }); - } - -private: - struct Allocator { - Allocator() = default; - Allocator(Allocator &&Other) : Allocs(std::move(Other.Allocs)) {} - Allocator &operator=(Allocator &&Other) { - Allocs = std::move(Other.Allocs); - return *this; - } - - ~Allocator() { - for (auto &Alloc : Allocs) - sys::Memory::releaseMappedMemory(Alloc.second); - } - - Error allocate(void *&Addr, size_t Size, uint32_t Align) { - std::error_code EC; - sys::MemoryBlock MB = sys::Memory::allocateMappedMemory( - Size, nullptr, sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC); - if (EC) - return errorCodeToError(EC); - - Addr = MB.base(); - assert(Allocs.find(MB.base()) == Allocs.end() && "Duplicate alloc"); - Allocs[MB.base()] = std::move(MB); - return Error::success(); - } - - Error setProtections(void *block, unsigned Flags) { - auto I = Allocs.find(block); - if (I == Allocs.end()) - return orcError(OrcErrorCode::RemoteMProtectAddrUnrecognized); - return errorCodeToError( - sys::Memory::protectMappedMemory(I->second, Flags)); - } - - private: - std::map Allocs; - }; - - static Error doNothing() { return Error::success(); } - - static TargetAddress reenter(void *JITTargetAddr, void *TrampolineAddr) { - auto T = static_cast(JITTargetAddr); - auto AddrOrErr = T->requestCompile(static_cast( - reinterpret_cast(TrampolineAddr))); - // FIXME: Allow customizable failure substitution functions. - assert(AddrOrErr && "Compile request failed"); - return *AddrOrErr; - } - - Expected handleCallIntVoid(TargetAddress Addr) { - typedef int (*IntVoidFnTy)(); - IntVoidFnTy Fn = - reinterpret_cast(static_cast(Addr)); - - DEBUG(dbgs() << " Calling " << format("0x%016x", Addr) << "\n"); - int Result = Fn(); - DEBUG(dbgs() << " Result = " << Result << "\n"); - - return Result; - } - - Expected handleCallMain(TargetAddress Addr, - std::vector Args) { - typedef int (*MainFnTy)(int, const char *[]); - - MainFnTy Fn = reinterpret_cast(static_cast(Addr)); - int ArgC = Args.size() + 1; - int Idx = 1; - std::unique_ptr ArgV(new const char *[ArgC + 1]); - ArgV[0] = ""; - for (auto &Arg : Args) - ArgV[Idx++] = Arg.c_str(); - - DEBUG(dbgs() << " Calling " << format("0x%016x", Addr) << "\n"); - int Result = Fn(ArgC, ArgV.get()); - DEBUG(dbgs() << " Result = " << Result << "\n"); - - return Result; - } - - Error handleCallVoidVoid(TargetAddress Addr) { - typedef void (*VoidVoidFnTy)(); - VoidVoidFnTy Fn = - reinterpret_cast(static_cast(Addr)); - - DEBUG(dbgs() << " Calling " << format("0x%016x", Addr) << "\n"); - Fn(); - DEBUG(dbgs() << " Complete.\n"); - - return Error::success(); - } - - Error handleCreateRemoteAllocator(ResourceIdMgr::ResourceId Id) { - auto I = Allocators.find(Id); - if (I != Allocators.end()) - return orcError(OrcErrorCode::RemoteAllocatorIdAlreadyInUse); - DEBUG(dbgs() << " Created allocator " << Id << "\n"); - Allocators[Id] = Allocator(); - return Error::success(); - } - - Error handleCreateIndirectStubsOwner(ResourceIdMgr::ResourceId Id) { - auto I = IndirectStubsOwners.find(Id); - if (I != IndirectStubsOwners.end()) - return orcError(OrcErrorCode::RemoteIndirectStubsOwnerIdAlreadyInUse); - DEBUG(dbgs() << " Create indirect stubs owner " << Id << "\n"); - IndirectStubsOwners[Id] = ISBlockOwnerList(); - return Error::success(); - } - - Error handleDeregisterEHFrames(TargetAddress TAddr, uint32_t Size) { - uint8_t *Addr = reinterpret_cast(static_cast(TAddr)); - DEBUG(dbgs() << " Registering EH frames at " << format("0x%016x", TAddr) - << ", Size = " << Size << " bytes\n"); - EHFramesDeregister(Addr, Size); - return Error::success(); - } - - Error handleDestroyRemoteAllocator(ResourceIdMgr::ResourceId Id) { - auto I = Allocators.find(Id); - if (I == Allocators.end()) - return orcError(OrcErrorCode::RemoteAllocatorDoesNotExist); - Allocators.erase(I); - DEBUG(dbgs() << " Destroyed allocator " << Id << "\n"); - return Error::success(); - } - - Error handleDestroyIndirectStubsOwner(ResourceIdMgr::ResourceId Id) { - auto I = IndirectStubsOwners.find(Id); - if (I == IndirectStubsOwners.end()) - return orcError(OrcErrorCode::RemoteIndirectStubsOwnerDoesNotExist); - IndirectStubsOwners.erase(I); - return Error::success(); - } - - Expected> - handleEmitIndirectStubs(ResourceIdMgr::ResourceId Id, - uint32_t NumStubsRequired) { - DEBUG(dbgs() << " ISMgr " << Id << " request " << NumStubsRequired - << " stubs.\n"); - - auto StubOwnerItr = IndirectStubsOwners.find(Id); - if (StubOwnerItr == IndirectStubsOwners.end()) - return orcError(OrcErrorCode::RemoteIndirectStubsOwnerDoesNotExist); - - typename TargetT::IndirectStubsInfo IS; - if (auto Err = - TargetT::emitIndirectStubsBlock(IS, NumStubsRequired, nullptr)) - return std::move(Err); - - TargetAddress StubsBase = - static_cast(reinterpret_cast(IS.getStub(0))); - TargetAddress PtrsBase = - static_cast(reinterpret_cast(IS.getPtr(0))); - uint32_t NumStubsEmitted = IS.getNumStubs(); - - auto &BlockList = StubOwnerItr->second; - BlockList.push_back(std::move(IS)); - - return std::make_tuple(StubsBase, PtrsBase, NumStubsEmitted); - } - - Error handleEmitResolverBlock() { - std::error_code EC; - ResolverBlock = sys::OwningMemoryBlock(sys::Memory::allocateMappedMemory( - TargetT::ResolverCodeSize, nullptr, - sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC)); - if (EC) - return errorCodeToError(EC); - - TargetT::writeResolverCode(static_cast(ResolverBlock.base()), - &reenter, this); - - return errorCodeToError(sys::Memory::protectMappedMemory( - ResolverBlock.getMemoryBlock(), - sys::Memory::MF_READ | sys::Memory::MF_EXEC)); - } - - Expected> handleEmitTrampolineBlock() { - std::error_code EC; - auto TrampolineBlock = - sys::OwningMemoryBlock(sys::Memory::allocateMappedMemory( - sys::Process::getPageSize(), nullptr, - sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC)); - if (EC) - return errorCodeToError(EC); - - uint32_t NumTrampolines = - (sys::Process::getPageSize() - TargetT::PointerSize) / - TargetT::TrampolineSize; - - uint8_t *TrampolineMem = static_cast(TrampolineBlock.base()); - TargetT::writeTrampolines(TrampolineMem, ResolverBlock.base(), - NumTrampolines); - - EC = sys::Memory::protectMappedMemory(TrampolineBlock.getMemoryBlock(), - sys::Memory::MF_READ | - sys::Memory::MF_EXEC); - - TrampolineBlocks.push_back(std::move(TrampolineBlock)); - - auto TrampolineBaseAddr = - static_cast(reinterpret_cast(TrampolineMem)); - - return std::make_tuple(TrampolineBaseAddr, NumTrampolines); - } - - Expected handleGetSymbolAddress(const std::string &Name) { - TargetAddress Addr = SymbolLookup(Name); - DEBUG(dbgs() << " Symbol '" << Name << "' = " << format("0x%016x", Addr) - << "\n"); - return Addr; - } - - Expected> - handleGetRemoteInfo() { - std::string ProcessTriple = sys::getProcessTriple(); - uint32_t PointerSize = TargetT::PointerSize; - uint32_t PageSize = sys::Process::getPageSize(); - uint32_t TrampolineSize = TargetT::TrampolineSize; - uint32_t IndirectStubSize = TargetT::IndirectStubsInfo::StubSize; - DEBUG(dbgs() << " Remote info:\n" - << " triple = '" << ProcessTriple << "'\n" - << " pointer size = " << PointerSize << "\n" - << " page size = " << PageSize << "\n" - << " trampoline size = " << TrampolineSize << "\n" - << " indirect stub size = " << IndirectStubSize << "\n"); - return std::make_tuple(ProcessTriple, PointerSize, PageSize, TrampolineSize, - IndirectStubSize); - } - - Expected> handleReadMem(TargetAddress RSrc, uint64_t Size) { - char *Src = reinterpret_cast(static_cast(RSrc)); - - DEBUG(dbgs() << " Reading " << Size << " bytes from " - << format("0x%016x", RSrc) << "\n"); - - std::vector Buffer; - Buffer.resize(Size); - for (char *P = Src; Size != 0; --Size) - Buffer.push_back(*P++); - - return Buffer; - } - - Error handleRegisterEHFrames(TargetAddress TAddr, uint32_t Size) { - uint8_t *Addr = reinterpret_cast(static_cast(TAddr)); - DEBUG(dbgs() << " Registering EH frames at " << format("0x%016x", TAddr) - << ", Size = " << Size << " bytes\n"); - EHFramesRegister(Addr, Size); - return Error::success(); - } - - Expected handleReserveMem(ResourceIdMgr::ResourceId Id, - uint64_t Size, uint32_t Align) { - auto I = Allocators.find(Id); - if (I == Allocators.end()) - return orcError(OrcErrorCode::RemoteAllocatorDoesNotExist); - auto &Allocator = I->second; - void *LocalAllocAddr = nullptr; - if (auto Err = Allocator.allocate(LocalAllocAddr, Size, Align)) - return std::move(Err); - - DEBUG(dbgs() << " Allocator " << Id << " reserved " << LocalAllocAddr - << " (" << Size << " bytes, alignment " << Align << ")\n"); - - TargetAddress AllocAddr = - static_cast(reinterpret_cast(LocalAllocAddr)); - - return AllocAddr; - } - - Error handleSetProtections(ResourceIdMgr::ResourceId Id, TargetAddress Addr, - uint32_t Flags) { - auto I = Allocators.find(Id); - if (I == Allocators.end()) - return orcError(OrcErrorCode::RemoteAllocatorDoesNotExist); - auto &Allocator = I->second; - void *LocalAddr = reinterpret_cast(static_cast(Addr)); - DEBUG(dbgs() << " Allocator " << Id << " set permissions on " << LocalAddr - << " to " << (Flags & sys::Memory::MF_READ ? 'R' : '-') - << (Flags & sys::Memory::MF_WRITE ? 'W' : '-') - << (Flags & sys::Memory::MF_EXEC ? 'X' : '-') << "\n"); - return Allocator.setProtections(LocalAddr, Flags); - } - - Error handleWriteMem(DirectBufferWriter DBW) { - DEBUG(dbgs() << " Writing " << DBW.getSize() << " bytes to " - << format("0x%016x", DBW.getDst()) << "\n"); - return Error::success(); - } - - Error handleWritePtr(TargetAddress Addr, TargetAddress PtrVal) { - DEBUG(dbgs() << " Writing pointer *" << format("0x%016x", Addr) << " = " - << format("0x%016x", PtrVal) << "\n"); - uintptr_t *Ptr = - reinterpret_cast(static_cast(Addr)); - *Ptr = static_cast(PtrVal); - return Error::success(); - } - - ChannelT &Channel; - SymbolLookupFtor SymbolLookup; - EHFrameRegistrationFtor EHFramesRegister, EHFramesDeregister; - std::map Allocators; - typedef std::vector ISBlockOwnerList; - std::map IndirectStubsOwners; - sys::OwningMemoryBlock ResolverBlock; - std::vector TrampolineBlocks; -}; - -} // end namespace remote -} // end namespace orc -} // end namespace llvm - -#undef DEBUG_TYPE - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCChannel.h b/llvm/include/llvm/ExecutionEngine/Orc/RPCChannel.h deleted file mode 100644 index c569e3cf..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/RPCChannel.h +++ /dev/null @@ -1,249 +0,0 @@ -//===- llvm/ExecutionEngine/Orc/RPCChannel.h --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_RPCCHANNEL_H -#define LLVM_EXECUTIONENGINE_ORC_RPCCHANNEL_H - -#include "OrcError.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" -#include -#include -#include -#include -#include -#include - -namespace llvm { -namespace orc { -namespace remote { - -/// Interface for byte-streams to be used with RPC. -class RPCChannel { -public: - virtual ~RPCChannel() {} - - /// Read Size bytes from the stream into *Dst. - virtual Error readBytes(char *Dst, unsigned Size) = 0; - - /// Read size bytes from *Src and append them to the stream. - virtual Error appendBytes(const char *Src, unsigned Size) = 0; - - /// Flush the stream if possible. - virtual Error send() = 0; - - /// Get the lock for stream reading. - std::mutex &getReadLock() { return readLock; } - - /// Get the lock for stream writing. - std::mutex &getWriteLock() { return writeLock; } - -private: - std::mutex readLock, writeLock; -}; - -/// Notify the channel that we're starting a message send. -/// Locks the channel for writing. -inline Error startSendMessage(RPCChannel &C) { - C.getWriteLock().lock(); - return Error::success(); -} - -/// Notify the channel that we're ending a message send. -/// Unlocks the channel for writing. -inline Error endSendMessage(RPCChannel &C) { - C.getWriteLock().unlock(); - return Error::success(); -} - -/// Notify the channel that we're starting a message receive. -/// Locks the channel for reading. -inline Error startReceiveMessage(RPCChannel &C) { - C.getReadLock().lock(); - return Error::success(); -} - -/// Notify the channel that we're ending a message receive. -/// Unlocks the channel for reading. -inline Error endReceiveMessage(RPCChannel &C) { - C.getReadLock().unlock(); - return Error::success(); -} - -/// RPC channel serialization for a variadic list of arguments. -template -Error serializeSeq(RPCChannel &C, const T &Arg, const Ts &... Args) { - if (auto Err = serialize(C, Arg)) - return Err; - return serializeSeq(C, Args...); -} - -/// RPC channel serialization for an (empty) variadic list of arguments. -inline Error serializeSeq(RPCChannel &C) { return Error::success(); } - -/// RPC channel deserialization for a variadic list of arguments. -template -Error deserializeSeq(RPCChannel &C, T &Arg, Ts &... Args) { - if (auto Err = deserialize(C, Arg)) - return Err; - return deserializeSeq(C, Args...); -} - -/// RPC channel serialization for an (empty) variadic list of arguments. -inline Error deserializeSeq(RPCChannel &C) { return Error::success(); } - -/// RPC channel serialization for integer primitives. -template -typename std::enable_if< - std::is_same::value || std::is_same::value || - std::is_same::value || std::is_same::value || - std::is_same::value || std::is_same::value || - std::is_same::value || std::is_same::value, - Error>::type -serialize(RPCChannel &C, T V) { - support::endian::byte_swap(V); - return C.appendBytes(reinterpret_cast(&V), sizeof(T)); -} - -/// RPC channel deserialization for integer primitives. -template -typename std::enable_if< - std::is_same::value || std::is_same::value || - std::is_same::value || std::is_same::value || - std::is_same::value || std::is_same::value || - std::is_same::value || std::is_same::value, - Error>::type -deserialize(RPCChannel &C, T &V) { - if (auto Err = C.readBytes(reinterpret_cast(&V), sizeof(T))) - return Err; - support::endian::byte_swap(V); - return Error::success(); -} - -/// RPC channel serialization for enums. -template -typename std::enable_if::value, Error>::type -serialize(RPCChannel &C, T V) { - return serialize(C, static_cast::type>(V)); -} - -/// RPC channel deserialization for enums. -template -typename std::enable_if::value, Error>::type -deserialize(RPCChannel &C, T &V) { - typename std::underlying_type::type Tmp; - Error Err = deserialize(C, Tmp); - V = static_cast(Tmp); - return Err; -} - -/// RPC channel serialization for bools. -inline Error serialize(RPCChannel &C, bool V) { - uint8_t VN = V ? 1 : 0; - return C.appendBytes(reinterpret_cast(&VN), 1); -} - -/// RPC channel deserialization for bools. -inline Error deserialize(RPCChannel &C, bool &V) { - uint8_t VN = 0; - if (auto Err = C.readBytes(reinterpret_cast(&VN), 1)) - return Err; - - V = (VN != 0); - return Error::success(); -} - -/// RPC channel serialization for StringRefs. -/// Note: There is no corresponding deseralization for this, as StringRef -/// doesn't own its memory and so can't hold the deserialized data. -inline Error serialize(RPCChannel &C, StringRef S) { - if (auto Err = serialize(C, static_cast(S.size()))) - return Err; - return C.appendBytes((const char *)S.bytes_begin(), S.size()); -} - -/// RPC channel serialization for std::strings. -inline Error serialize(RPCChannel &C, const std::string &S) { - return serialize(C, StringRef(S)); -} - -/// RPC channel deserialization for std::strings. -inline Error deserialize(RPCChannel &C, std::string &S) { - uint64_t Count; - if (auto Err = deserialize(C, Count)) - return Err; - S.resize(Count); - return C.readBytes(&S[0], Count); -} - -// Serialization helper for std::tuple. -template -inline Error serializeTupleHelper(RPCChannel &C, const TupleT &V, - llvm::index_sequence _) { - return serializeSeq(C, std::get(V)...); -} - -/// RPC channel serialization for std::tuple. -template -inline Error serialize(RPCChannel &C, const std::tuple &V) { - return serializeTupleHelper(C, V, llvm::index_sequence_for()); -} - -// Serialization helper for std::tuple. -template -inline Error deserializeTupleHelper(RPCChannel &C, TupleT &V, - llvm::index_sequence _) { - return deserializeSeq(C, std::get(V)...); -} - -/// RPC channel deserialization for std::tuple. -template -inline Error deserialize(RPCChannel &C, std::tuple &V) { - return deserializeTupleHelper(C, V, llvm::index_sequence_for()); -} - -/// RPC channel serialization for ArrayRef. -template Error serialize(RPCChannel &C, const ArrayRef &A) { - if (auto Err = serialize(C, static_cast(A.size()))) - return Err; - - for (const auto &E : A) - if (auto Err = serialize(C, E)) - return Err; - - return Error::success(); -} - -/// RPC channel serialization for std::array. -template Error serialize(RPCChannel &C, const std::vector &V) { - return serialize(C, ArrayRef(V)); -} - -/// RPC channel deserialization for std::array. -template Error deserialize(RPCChannel &C, std::vector &V) { - uint64_t Count = 0; - if (auto Err = deserialize(C, Count)) - return Err; - - V.resize(Count); - for (auto &E : V) - if (auto Err = deserialize(C, E)) - return Err; - - return Error::success(); -} - -} // end namespace remote -} // end namespace orc -} // end namespace llvm - -#endif // LLVM_EXECUTIONENGINE_ORC_RPCCHANNEL_H diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h deleted file mode 100644 index 966a4968..00000000 --- a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h +++ /dev/null @@ -1,694 +0,0 @@ -//===----- RPCUTils.h - Basic tilities for building RPC APIs ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Basic utilities for building RPC APIs. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORC_RPCUTILS_H -#define LLVM_EXECUTIONENGINE_ORC_RPCUTILS_H - -#include -#include - -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ExecutionEngine/Orc/OrcError.h" - -#ifdef _MSC_VER -// concrt.h depends on eh.h for __uncaught_exception declaration -// even if we disable exceptions. -#include - -// Disable warnings from ppltasks.h transitively included by . -#pragma warning(push) -#pragma warning(disable : 4530) -#pragma warning(disable : 4062) -#endif - -#include - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -namespace llvm { -namespace orc { -namespace remote { - -/// Describes reserved RPC Function Ids. -/// -/// The default implementation will serve for integer and enum function id -/// types. If you want to use a custom type as your FunctionId you can -/// specialize this class and provide unique values for InvalidId, -/// ResponseId and FirstValidId. - -template class RPCFunctionIdTraits { -public: - static const T InvalidId = static_cast(0); - static const T ResponseId = static_cast(1); - static const T FirstValidId = static_cast(2); -}; - -// Base class containing utilities that require partial specialization. -// These cannot be included in RPC, as template class members cannot be -// partially specialized. -class RPCBase { -protected: - // RPC Function description type. - // - // This class provides the information and operations needed to support the - // RPC primitive operations (call, expect, etc) for a given function. It - // is specialized for void and non-void functions to deal with the differences - // betwen the two. Both specializations have the same interface: - // - // Id - The function's unique identifier. - // OptionalReturn - The return type for asyncronous calls. - // ErrorReturn - The return type for synchronous calls. - // optionalToErrorReturn - Conversion from a valid OptionalReturn to an - // ErrorReturn. - // readResult - Deserialize a result from a channel. - // abandon - Abandon a promised (asynchronous) result. - // respond - Retun a result on the channel. - template - class FunctionHelper {}; - - // RPC Function description specialization for non-void functions. - template - class FunctionHelper { - public: - static_assert(FuncId != RPCFunctionIdTraits::InvalidId && - FuncId != RPCFunctionIdTraits::ResponseId, - "Cannot define custom function with InvalidId or ResponseId. " - "Please use RPCFunctionTraits::FirstValidId."); - - static const FunctionIdT Id = FuncId; - - typedef Optional OptionalReturn; - - typedef Expected ErrorReturn; - - static ErrorReturn optionalToErrorReturn(OptionalReturn &&V) { - assert(V && "Return value not available"); - return std::move(*V); - } - - template - static Error readResult(ChannelT &C, std::promise &P) { - RetT Val; - auto Err = deserialize(C, Val); - auto Err2 = endReceiveMessage(C); - Err = joinErrors(std::move(Err), std::move(Err2)); - - if (Err) { - P.set_value(OptionalReturn()); - return Err; - } - P.set_value(std::move(Val)); - return Error::success(); - } - - static void abandon(std::promise &P) { - P.set_value(OptionalReturn()); - } - - template - static Error respond(ChannelT &C, SequenceNumberT SeqNo, - ErrorReturn &Result) { - FunctionIdT ResponseId = RPCFunctionIdTraits::ResponseId; - - // If the handler returned an error then bail out with that. - if (!Result) - return Result.takeError(); - - // Otherwise open a new message on the channel and send the result. - if (auto Err = startSendMessage(C)) - return Err; - if (auto Err = serializeSeq(C, ResponseId, SeqNo, *Result)) - return Err; - return endSendMessage(C); - } - }; - - // RPC Function description specialization for void functions. - template - class FunctionHelper { - public: - static_assert(FuncId != RPCFunctionIdTraits::InvalidId && - FuncId != RPCFunctionIdTraits::ResponseId, - "Cannot define custom function with InvalidId or ResponseId. " - "Please use RPCFunctionTraits::FirstValidId."); - - static const FunctionIdT Id = FuncId; - - typedef bool OptionalReturn; - typedef Error ErrorReturn; - - static ErrorReturn optionalToErrorReturn(OptionalReturn &&V) { - assert(V && "Return value not available"); - return Error::success(); - } - - template - static Error readResult(ChannelT &C, std::promise &P) { - // Void functions don't have anything to deserialize, so we're good. - P.set_value(true); - return endReceiveMessage(C); - } - - static void abandon(std::promise &P) { P.set_value(false); } - - template - static Error respond(ChannelT &C, SequenceNumberT SeqNo, - ErrorReturn &Result) { - const FunctionIdT ResponseId = - RPCFunctionIdTraits::ResponseId; - - // If the handler returned an error then bail out with that. - if (Result) - return std::move(Result); - - // Otherwise open a new message on the channel and send the result. - if (auto Err = startSendMessage(C)) - return Err; - if (auto Err = serializeSeq(C, ResponseId, SeqNo)) - return Err; - return endSendMessage(C); - } - }; - - // Helper for the call primitive. - template - class CallHelper; - - template - class CallHelper> { - public: - static Error call(ChannelT &C, SequenceNumberT SeqNo, - const ArgTs &... Args) { - if (auto Err = startSendMessage(C)) - return Err; - if (auto Err = serializeSeq(C, FuncId, SeqNo, Args...)) - return Err; - return endSendMessage(C); - } - }; - - // Helper for handle primitive. - template - class HandlerHelper; - - template - class HandlerHelper> { - public: - template - static Error handle(ChannelT &C, HandlerT Handler) { - return readAndHandle(C, Handler, llvm::index_sequence_for()); - } - - private: - typedef FunctionHelper Func; - - template - static Error readAndHandle(ChannelT &C, HandlerT Handler, - llvm::index_sequence _) { - std::tuple RPCArgs; - SequenceNumberT SeqNo; - // GCC 4.7 and 4.8 incorrectly issue a -Wunused-but-set-variable warning - // for RPCArgs. Void cast RPCArgs to work around this for now. - // FIXME: Remove this workaround once we can assume a working GCC version. - (void)RPCArgs; - if (auto Err = deserializeSeq(C, SeqNo, std::get(RPCArgs)...)) - return Err; - - // We've deserialized the arguments, so unlock the channel for reading - // before we call the handler. This allows recursive RPC calls. - if (auto Err = endReceiveMessage(C)) - return Err; - - // Run the handler and get the result. - auto Result = Handler(std::get(RPCArgs)...); - - // Return the result to the client. - return Func::template respond(C, SeqNo, - Result); - } - }; - - // Helper for wrapping member functions up as functors. - template - class MemberFnWrapper { - public: - typedef RetT (ClassT::*MethodT)(ArgTs...); - MemberFnWrapper(ClassT &Instance, MethodT Method) - : Instance(Instance), Method(Method) {} - RetT operator()(ArgTs &... Args) { return (Instance.*Method)(Args...); } - - private: - ClassT &Instance; - MethodT Method; - }; - - // Helper that provides a Functor for deserializing arguments. - template class ReadArgs { - public: - Error operator()() { return Error::success(); } - }; - - template - class ReadArgs : public ReadArgs { - public: - ReadArgs(ArgT &Arg, ArgTs &... Args) - : ReadArgs(Args...), Arg(Arg) {} - - Error operator()(ArgT &ArgVal, ArgTs &... ArgVals) { - this->Arg = std::move(ArgVal); - return ReadArgs::operator()(ArgVals...); - } - - private: - ArgT &Arg; - }; -}; - -/// Contains primitive utilities for defining, calling and handling calls to -/// remote procedures. ChannelT is a bidirectional stream conforming to the -/// RPCChannel interface (see RPCChannel.h), and FunctionIdT is a procedure -/// identifier type that must be serializable on ChannelT. -/// -/// These utilities support the construction of very primitive RPC utilities. -/// Their intent is to ensure correct serialization and deserialization of -/// procedure arguments, and to keep the client and server's view of the API in -/// sync. -/// -/// These utilities do not support return values. These can be handled by -/// declaring a corresponding '.*Response' procedure and expecting it after a -/// call). They also do not support versioning: the client and server *must* be -/// compiled with the same procedure definitions. -/// -/// -/// -/// Overview (see comments individual types/methods for details): -/// -/// Function : -/// -/// associates a unique serializable id with an argument list. -/// -/// -/// call(Channel, Args...) : -/// -/// Calls the remote procedure 'Func' by serializing Func's id followed by its -/// arguments and sending the resulting bytes to 'Channel'. -/// -/// -/// handle(Channel, : -/// -/// Handles a call to 'Func' by deserializing its arguments and calling the -/// given functor. This assumes that the id for 'Func' has already been -/// deserialized. -/// -/// expect(Channel, : -/// -/// The same as 'handle', except that the procedure id should not have been -/// read yet. Expect will deserialize the id and assert that it matches Func's -/// id. If it does not, and unexpected RPC call error is returned. -template -class RPC : public RPCBase { -public: - /// RPC default constructor. - RPC() = default; - - /// RPC instances cannot be copied. - RPC(const RPC &) = delete; - - /// RPC instances cannot be copied. - RPC &operator=(const RPC &) = delete; - - /// RPC move constructor. - // FIXME: Remove once MSVC can synthesize move ops. - RPC(RPC &&Other) - : SequenceNumberMgr(std::move(Other.SequenceNumberMgr)), - OutstandingResults(std::move(Other.OutstandingResults)) {} - - /// RPC move assignment. - // FIXME: Remove once MSVC can synthesize move ops. - RPC &operator=(RPC &&Other) { - SequenceNumberMgr = std::move(Other.SequenceNumberMgr); - OutstandingResults = std::move(Other.OutstandingResults); - return *this; - } - - /// Utility class for defining/referring to RPC procedures. - /// - /// Typedefs of this utility are used when calling/handling remote procedures. - /// - /// FuncId should be a unique value of FunctionIdT (i.e. not used with any - /// other Function typedef in the RPC API being defined. - /// - /// the template argument Ts... gives the argument list for the remote - /// procedure. - /// - /// E.g. - /// - /// typedef Function<0, bool> Func1; - /// typedef Function<1, std::string, std::vector> Func2; - /// - /// if (auto Err = call(Channel, true)) - /// /* handle Err */; - /// - /// if (auto Err = expect(Channel, - /// [](std::string &S, std::vector &V) { - /// // Stuff. - /// return Error::success(); - /// }) - /// /* handle Err */; - /// - template - using Function = FunctionHelper; - - /// Return type for asynchronous call primitives. - template - using AsyncCallResult = std::future; - - /// Return type for asynchronous call-with-seq primitives. - template - using AsyncCallWithSeqResult = - std::pair, SequenceNumberT>; - - /// Serialize Args... to channel C, but do not call C.send(). - /// - /// Returns an error (on serialization failure) or a pair of: - /// (1) A future Optional (or future for void functions), and - /// (2) A sequence number. - /// - /// This utility function is primarily used for single-threaded mode support, - /// where the sequence number can be used to wait for the corresponding - /// result. In multi-threaded mode the appendCallAsync method, which does not - /// return the sequence numeber, should be preferred. - template - Expected> - appendCallAsyncWithSeq(ChannelT &C, const ArgTs &... Args) { - auto SeqNo = SequenceNumberMgr.getSequenceNumber(); - std::promise Promise; - auto Result = Promise.get_future(); - OutstandingResults[SeqNo] = - createOutstandingResult(std::move(Promise)); - - if (auto Err = CallHelper::call(C, SeqNo, - Args...)) { - abandonOutstandingResults(); - return std::move(Err); - } else - return AsyncCallWithSeqResult(std::move(Result), SeqNo); - } - - /// The same as appendCallAsyncWithSeq, except that it calls C.send() to - /// flush the channel after serializing the call. - template - Expected> - callAsyncWithSeq(ChannelT &C, const ArgTs &... Args) { - auto Result = appendCallAsyncWithSeq(C, Args...); - if (!Result) - return Result; - if (auto Err = C.send()) { - abandonOutstandingResults(); - return std::move(Err); - } - return Result; - } - - /// Serialize Args... to channel C, but do not call send. - /// Returns an error if serialization fails, otherwise returns a - /// std::future> (or a future for void functions). - template - Expected> appendCallAsync(ChannelT &C, - const ArgTs &... Args) { - auto ResAndSeqOrErr = appendCallAsyncWithSeq(C, Args...); - if (ResAndSeqOrErr) - return std::move(ResAndSeqOrErr->first); - return ResAndSeqOrErr.getError(); - } - - /// The same as appendCallAsync, except that it calls C.send to flush the - /// channel after serializing the call. - template - Expected> callAsync(ChannelT &C, - const ArgTs &... Args) { - auto ResAndSeqOrErr = callAsyncWithSeq(C, Args...); - if (ResAndSeqOrErr) - return std::move(ResAndSeqOrErr->first); - return ResAndSeqOrErr.getError(); - } - - /// This can be used in single-threaded mode. - template - typename Func::ErrorReturn - callSTHandling(ChannelT &C, HandleFtor &HandleOther, const ArgTs &... Args) { - if (auto ResultAndSeqNoOrErr = callAsyncWithSeq(C, Args...)) { - auto &ResultAndSeqNo = *ResultAndSeqNoOrErr; - if (auto Err = waitForResult(C, ResultAndSeqNo.second, HandleOther)) - return std::move(Err); - return Func::optionalToErrorReturn(ResultAndSeqNo.first.get()); - } else - return ResultAndSeqNoOrErr.takeError(); - } - - // This can be used in single-threaded mode. - template - typename Func::ErrorReturn callST(ChannelT &C, const ArgTs &... Args) { - return callSTHandling(C, handleNone, Args...); - } - - /// Start receiving a new function call. - /// - /// Calls startReceiveMessage on the channel, then deserializes a FunctionId - /// into Id. - Error startReceivingFunction(ChannelT &C, FunctionIdT &Id) { - if (auto Err = startReceiveMessage(C)) - return Err; - - return deserialize(C, Id); - } - - /// Deserialize args for Func from C and call Handler. The signature of - /// handler must conform to 'Error(Args...)' where Args... matches - /// the arguments used in the Func typedef. - template - static Error handle(ChannelT &C, HandlerT Handler) { - return HandlerHelper::handle(C, Handler); - } - - /// Helper version of 'handle' for calling member functions. - template - static Error handle(ChannelT &C, ClassT &Instance, - RetT (ClassT::*HandlerMethod)(ArgTs...)) { - return handle( - C, MemberFnWrapper(Instance, HandlerMethod)); - } - - /// Deserialize a FunctionIdT from C and verify it matches the id for Func. - /// If the id does match, deserialize the arguments and call the handler - /// (similarly to handle). - /// If the id does not match, return an unexpect RPC call error and do not - /// deserialize any further bytes. - template - Error expect(ChannelT &C, HandlerT Handler) { - FunctionIdT FuncId; - if (auto Err = startReceivingFunction(C, FuncId)) - return std::move(Err); - if (FuncId != Func::Id) - return orcError(OrcErrorCode::UnexpectedRPCCall); - return handle(C, Handler); - } - - /// Helper version of expect for calling member functions. - template - static Error expect(ChannelT &C, ClassT &Instance, - Error (ClassT::*HandlerMethod)(ArgTs...)) { - return expect( - C, MemberFnWrapper(Instance, HandlerMethod)); - } - - /// Helper for handling setter procedures - this method returns a functor that - /// sets the variables referred to by Args... to values deserialized from the - /// channel. - /// E.g. - /// - /// typedef Function<0, bool, int> Func1; - /// - /// ... - /// bool B; - /// int I; - /// if (auto Err = expect(Channel, readArgs(B, I))) - /// /* Handle Args */ ; - /// - template - static ReadArgs readArgs(ArgTs &... Args) { - return ReadArgs(Args...); - } - - /// Read a response from Channel. - /// This should be called from the receive loop to retrieve results. - Error handleResponse(ChannelT &C, SequenceNumberT *SeqNoRet = nullptr) { - SequenceNumberT SeqNo; - if (auto Err = deserialize(C, SeqNo)) { - abandonOutstandingResults(); - return Err; - } - - if (SeqNoRet) - *SeqNoRet = SeqNo; - - auto I = OutstandingResults.find(SeqNo); - if (I == OutstandingResults.end()) { - abandonOutstandingResults(); - return orcError(OrcErrorCode::UnexpectedRPCResponse); - } - - if (auto Err = I->second->readResult(C)) { - abandonOutstandingResults(); - // FIXME: Release sequence numbers? - return Err; - } - - OutstandingResults.erase(I); - SequenceNumberMgr.releaseSequenceNumber(SeqNo); - - return Error::success(); - } - - // Loop waiting for a result with the given sequence number. - // This can be used as a receive loop if the user doesn't have a default. - template - Error waitForResult(ChannelT &C, SequenceNumberT TgtSeqNo, - HandleOtherFtor &HandleOther = handleNone) { - bool GotTgtResult = false; - - while (!GotTgtResult) { - FunctionIdT Id = RPCFunctionIdTraits::InvalidId; - if (auto Err = startReceivingFunction(C, Id)) - return Err; - if (Id == RPCFunctionIdTraits::ResponseId) { - SequenceNumberT SeqNo; - if (auto Err = handleResponse(C, &SeqNo)) - return Err; - GotTgtResult = (SeqNo == TgtSeqNo); - } else if (auto Err = HandleOther(C, Id)) - return Err; - } - - return Error::success(); - } - - // Default handler for 'other' (non-response) functions when waiting for a - // result from the channel. - static Error handleNone(ChannelT &, FunctionIdT) { - return orcError(OrcErrorCode::UnexpectedRPCCall); - }; - -private: - // Manage sequence numbers. - class SequenceNumberManager { - public: - SequenceNumberManager() = default; - - SequenceNumberManager(const SequenceNumberManager &) = delete; - SequenceNumberManager &operator=(const SequenceNumberManager &) = delete; - - SequenceNumberManager(SequenceNumberManager &&Other) - : NextSequenceNumber(std::move(Other.NextSequenceNumber)), - FreeSequenceNumbers(std::move(Other.FreeSequenceNumbers)) {} - - SequenceNumberManager &operator=(SequenceNumberManager &&Other) { - NextSequenceNumber = std::move(Other.NextSequenceNumber); - FreeSequenceNumbers = std::move(Other.FreeSequenceNumbers); - } - - void reset() { - std::lock_guard Lock(SeqNoLock); - NextSequenceNumber = 0; - FreeSequenceNumbers.clear(); - } - - SequenceNumberT getSequenceNumber() { - std::lock_guard Lock(SeqNoLock); - if (FreeSequenceNumbers.empty()) - return NextSequenceNumber++; - auto SequenceNumber = FreeSequenceNumbers.back(); - FreeSequenceNumbers.pop_back(); - return SequenceNumber; - } - - void releaseSequenceNumber(SequenceNumberT SequenceNumber) { - std::lock_guard Lock(SeqNoLock); - FreeSequenceNumbers.push_back(SequenceNumber); - } - - private: - std::mutex SeqNoLock; - SequenceNumberT NextSequenceNumber = 0; - std::vector FreeSequenceNumbers; - }; - - // Base class for results that haven't been returned from the other end of the - // RPC connection yet. - class OutstandingResult { - public: - virtual ~OutstandingResult() {} - virtual Error readResult(ChannelT &C) = 0; - virtual void abandon() = 0; - }; - - // Outstanding results for a specific function. - template - class OutstandingResultImpl : public OutstandingResult { - private: - public: - OutstandingResultImpl(std::promise &&P) - : P(std::move(P)) {} - - Error readResult(ChannelT &C) override { return Func::readResult(C, P); } - - void abandon() override { Func::abandon(P); } - - private: - std::promise P; - }; - - // Create an outstanding result for the given function. - template - std::unique_ptr - createOutstandingResult(std::promise &&P) { - return llvm::make_unique>(std::move(P)); - } - - // Abandon all outstanding results. - void abandonOutstandingResults() { - for (auto &KV : OutstandingResults) - KV.second->abandon(); - OutstandingResults.clear(); - SequenceNumberMgr.reset(); - } - - SequenceNumberManager SequenceNumberMgr; - std::map> - OutstandingResults; -}; - -} // end namespace remote -} // end namespace orc -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/OrcMCJITReplacement.h b/llvm/include/llvm/ExecutionEngine/OrcMCJITReplacement.h deleted file mode 100644 index 4cd5648b..00000000 --- a/llvm/include/llvm/ExecutionEngine/OrcMCJITReplacement.h +++ /dev/null @@ -1,38 +0,0 @@ -//===---- OrcMCJITReplacement.h - Orc-based MCJIT replacement ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file forces OrcMCJITReplacement to link in on certain operating systems. -// (Windows). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_ORCMCJITREPLACEMENT_H -#define LLVM_EXECUTIONENGINE_ORCMCJITREPLACEMENT_H - -#include "llvm/ExecutionEngine/ExecutionEngine.h" -#include - -extern "C" void LLVMLinkInOrcMCJITReplacement(); - -namespace { - struct ForceOrcMCJITReplacementLinking { - ForceOrcMCJITReplacementLinking() { - // We must reference OrcMCJITReplacement in such a way that compilers will - // not delete it all as dead code, even with whole program optimization, - // yet is effectively a NO-OP. As the compiler isn't smart enough to know - // that getenv() never returns -1, this will do the job. - if (std::getenv("bar") != (char*) -1) - return; - - LLVMLinkInOrcMCJITReplacement(); - } - } ForceOrcMCJITReplacementLinking; -} - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h b/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h deleted file mode 100644 index 9451fa57..00000000 --- a/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h +++ /dev/null @@ -1,150 +0,0 @@ -//===-- RTDyldMemoryManager.cpp - Memory manager for MC-JIT -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Interface of the runtime dynamic memory manager base class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_RTDYLDMEMORYMANAGER_H -#define LLVM_EXECUTIONENGINE_RTDYLDMEMORYMANAGER_H - -#include "RuntimeDyld.h" -#include "llvm-c/ExecutionEngine.h" -#include "llvm/Support/CBindingWrapping.h" -#include "llvm/Support/Memory.h" - -namespace llvm { - -class ExecutionEngine; - - namespace object { - class ObjectFile; - } - -class MCJITMemoryManager : public RuntimeDyld::MemoryManager { -public: - - // Don't hide the notifyObjectLoaded method from RuntimeDyld::MemoryManager. - using RuntimeDyld::MemoryManager::notifyObjectLoaded; - - /// This method is called after an object has been loaded into memory but - /// before relocations are applied to the loaded sections. The object load - /// may have been initiated by MCJIT to resolve an external symbol for another - /// object that is being finalized. In that case, the object about which - /// the memory manager is being notified will be finalized immediately after - /// the memory manager returns from this call. - /// - /// Memory managers which are preparing code for execution in an external - /// address space can use this call to remap the section addresses for the - /// newly loaded object. - virtual void notifyObjectLoaded(ExecutionEngine *EE, - const object::ObjectFile &) {} -}; - -// RuntimeDyld clients often want to handle the memory management of -// what gets placed where. For JIT clients, this is the subset of -// JITMemoryManager required for dynamic loading of binaries. -// -// FIXME: As the RuntimeDyld fills out, additional routines will be needed -// for the varying types of objects to be allocated. -class RTDyldMemoryManager : public MCJITMemoryManager, - public RuntimeDyld::SymbolResolver { - RTDyldMemoryManager(const RTDyldMemoryManager&) = delete; - void operator=(const RTDyldMemoryManager&) = delete; -public: - RTDyldMemoryManager() {} - ~RTDyldMemoryManager() override; - - /// Register EH frames in the current process. - static void registerEHFramesInProcess(uint8_t *Addr, size_t Size); - - /// Deregister EH frames in the current proces. - static void deregisterEHFramesInProcess(uint8_t *Addr, size_t Size); - - void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override { - registerEHFramesInProcess(Addr, Size); - } - - void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override { - deregisterEHFramesInProcess(Addr, Size); - } - - /// This method returns the address of the specified function or variable in - /// the current process. - static uint64_t getSymbolAddressInProcess(const std::string &Name); - - /// Legacy symbol lookup - DEPRECATED! Please override findSymbol instead. - /// - /// This method returns the address of the specified function or variable. - /// It is used to resolve symbols during module linking. - virtual uint64_t getSymbolAddress(const std::string &Name) { - return getSymbolAddressInProcess(Name); - } - - /// This method returns a RuntimeDyld::SymbolInfo for the specified function - /// or variable. It is used to resolve symbols during module linking. - /// - /// By default this falls back on the legacy lookup method: - /// 'getSymbolAddress'. The address returned by getSymbolAddress is treated as - /// a strong, exported symbol, consistent with historical treatment by - /// RuntimeDyld. - /// - /// Clients writing custom RTDyldMemoryManagers are encouraged to override - /// this method and return a SymbolInfo with the flags set correctly. This is - /// necessary for RuntimeDyld to correctly handle weak and non-exported symbols. - RuntimeDyld::SymbolInfo findSymbol(const std::string &Name) override { - return RuntimeDyld::SymbolInfo(getSymbolAddress(Name), - JITSymbolFlags::Exported); - } - - /// Legacy symbol lookup -- DEPRECATED! Please override - /// findSymbolInLogicalDylib instead. - /// - /// Default to treating all modules as separate. - virtual uint64_t getSymbolAddressInLogicalDylib(const std::string &Name) { - return 0; - } - - /// Default to treating all modules as separate. - /// - /// By default this falls back on the legacy lookup method: - /// 'getSymbolAddressInLogicalDylib'. The address returned by - /// getSymbolAddressInLogicalDylib is treated as a strong, exported symbol, - /// consistent with historical treatment by RuntimeDyld. - /// - /// Clients writing custom RTDyldMemoryManagers are encouraged to override - /// this method and return a SymbolInfo with the flags set correctly. This is - /// necessary for RuntimeDyld to correctly handle weak and non-exported symbols. - RuntimeDyld::SymbolInfo - findSymbolInLogicalDylib(const std::string &Name) override { - return RuntimeDyld::SymbolInfo(getSymbolAddressInLogicalDylib(Name), - JITSymbolFlags::Exported); - } - - /// This method returns the address of the specified function. As such it is - /// only useful for resolving library symbols, not code generated symbols. - /// - /// If \p AbortOnFailure is false and no function with the given name is - /// found, this function returns a null pointer. Otherwise, it prints a - /// message to stderr and aborts. - /// - /// This function is deprecated for memory managers to be used with - /// MCJIT or RuntimeDyld. Use getSymbolAddress instead. - virtual void *getPointerToNamedFunction(const std::string &Name, - bool AbortOnFailure = true); -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_SIMPLE_CONVERSION_FUNCTIONS( - RTDyldMemoryManager, LLVMMCJITMemoryManagerRef) - -} // namespace llvm - - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h b/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h deleted file mode 100644 index bd485de9..00000000 --- a/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h +++ /dev/null @@ -1,305 +0,0 @@ -//===-- RuntimeDyld.h - Run-time dynamic linker for MC-JIT ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Interface for the runtime dynamic linker facilities of the MC-JIT. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_RUNTIMEDYLD_H -#define LLVM_EXECUTIONENGINE_RUNTIMEDYLD_H - -#include "JITSymbolFlags.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/DebugInfo/DIContext.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Support/Memory.h" -#include -#include -#include - -namespace llvm { - -class StringRef; - -namespace object { - class ObjectFile; - template class OwningBinary; -} - -/// Base class for errors originating in RuntimeDyld, e.g. missing relocation -/// support. -class RuntimeDyldError : public ErrorInfo { -public: - static char ID; - RuntimeDyldError(std::string ErrMsg) : ErrMsg(std::move(ErrMsg)) {} - void log(raw_ostream &OS) const override; - const std::string &getErrorMessage() const { return ErrMsg; } - std::error_code convertToErrorCode() const override; -private: - std::string ErrMsg; -}; - -class RuntimeDyldImpl; -class RuntimeDyldCheckerImpl; - -class RuntimeDyld { - friend class RuntimeDyldCheckerImpl; - - RuntimeDyld(const RuntimeDyld &) = delete; - void operator=(const RuntimeDyld &) = delete; - -protected: - // Change the address associated with a section when resolving relocations. - // Any relocations already associated with the symbol will be re-resolved. - void reassignSectionAddress(unsigned SectionID, uint64_t Addr); -public: - - /// \brief Information about a named symbol. - class SymbolInfo : public JITSymbolBase { - public: - SymbolInfo(std::nullptr_t) : JITSymbolBase(JITSymbolFlags::None), Address(0) {} - SymbolInfo(uint64_t Address, JITSymbolFlags Flags) - : JITSymbolBase(Flags), Address(Address) {} - explicit operator bool() const { return Address != 0; } - uint64_t getAddress() const { return Address; } - private: - uint64_t Address; - }; - - /// \brief Information about the loaded object. - class LoadedObjectInfo : public llvm::LoadedObjectInfo { - friend class RuntimeDyldImpl; - public: - typedef std::map ObjSectionToIDMap; - - LoadedObjectInfo(RuntimeDyldImpl &RTDyld, ObjSectionToIDMap ObjSecToIDMap) - : RTDyld(RTDyld), ObjSecToIDMap(std::move(ObjSecToIDMap)) {} - - virtual object::OwningBinary - getObjectForDebug(const object::ObjectFile &Obj) const = 0; - - uint64_t - getSectionLoadAddress(const object::SectionRef &Sec) const override; - - protected: - virtual void anchor(); - - RuntimeDyldImpl &RTDyld; - ObjSectionToIDMap ObjSecToIDMap; - }; - - template struct LoadedObjectInfoHelper : LoadedObjectInfo { - protected: - LoadedObjectInfoHelper(const LoadedObjectInfoHelper &) = default; - LoadedObjectInfoHelper() = default; - - public: - LoadedObjectInfoHelper(RuntimeDyldImpl &RTDyld, - LoadedObjectInfo::ObjSectionToIDMap ObjSecToIDMap) - : LoadedObjectInfo(RTDyld, std::move(ObjSecToIDMap)) {} - std::unique_ptr clone() const override { - return llvm::make_unique(static_cast(*this)); - } - }; - - /// \brief Memory Management. - class MemoryManager { - friend class RuntimeDyld; - public: - MemoryManager() : FinalizationLocked(false) {} - virtual ~MemoryManager() {} - - /// Allocate a memory block of (at least) the given size suitable for - /// executable code. The SectionID is a unique identifier assigned by the - /// RuntimeDyld instance, and optionally recorded by the memory manager to - /// access a loaded section. - virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, - StringRef SectionName) = 0; - - /// Allocate a memory block of (at least) the given size suitable for data. - /// The SectionID is a unique identifier assigned by the JIT engine, and - /// optionally recorded by the memory manager to access a loaded section. - virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, - StringRef SectionName, - bool IsReadOnly) = 0; - - /// Inform the memory manager about the total amount of memory required to - /// allocate all sections to be loaded: - /// \p CodeSize - the total size of all code sections - /// \p DataSizeRO - the total size of all read-only data sections - /// \p DataSizeRW - the total size of all read-write data sections - /// - /// Note that by default the callback is disabled. To enable it - /// redefine the method needsToReserveAllocationSpace to return true. - virtual void reserveAllocationSpace(uintptr_t CodeSize, uint32_t CodeAlign, - uintptr_t RODataSize, - uint32_t RODataAlign, - uintptr_t RWDataSize, - uint32_t RWDataAlign) {} - - /// Override to return true to enable the reserveAllocationSpace callback. - virtual bool needsToReserveAllocationSpace() { return false; } - - /// Register the EH frames with the runtime so that c++ exceptions work. - /// - /// \p Addr parameter provides the local address of the EH frame section - /// data, while \p LoadAddr provides the address of the data in the target - /// address space. If the section has not been remapped (which will usually - /// be the case for local execution) these two values will be the same. - virtual void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, - size_t Size) = 0; - virtual void deregisterEHFrames(uint8_t *addr, uint64_t LoadAddr, - size_t Size) = 0; - - /// This method is called when object loading is complete and section page - /// permissions can be applied. It is up to the memory manager implementation - /// to decide whether or not to act on this method. The memory manager will - /// typically allocate all sections as read-write and then apply specific - /// permissions when this method is called. Code sections cannot be executed - /// until this function has been called. In addition, any cache coherency - /// operations needed to reliably use the memory are also performed. - /// - /// Returns true if an error occurred, false otherwise. - virtual bool finalizeMemory(std::string *ErrMsg = nullptr) = 0; - - /// This method is called after an object has been loaded into memory but - /// before relocations are applied to the loaded sections. - /// - /// Memory managers which are preparing code for execution in an external - /// address space can use this call to remap the section addresses for the - /// newly loaded object. - /// - /// For clients that do not need access to an ExecutionEngine instance this - /// method should be preferred to its cousin - /// MCJITMemoryManager::notifyObjectLoaded as this method is compatible with - /// ORC JIT stacks. - virtual void notifyObjectLoaded(RuntimeDyld &RTDyld, - const object::ObjectFile &Obj) {} - - private: - virtual void anchor(); - bool FinalizationLocked; - }; - - /// \brief Symbol resolution. - class SymbolResolver { - public: - virtual ~SymbolResolver() {} - - /// This method returns the address of the specified symbol if it exists - /// within the logical dynamic library represented by this - /// RTDyldMemoryManager. Unlike findSymbol, queries through this - /// interface should return addresses for hidden symbols. - /// - /// This is of particular importance for the Orc JIT APIs, which support lazy - /// compilation by breaking up modules: Each of those broken out modules - /// must be able to resolve hidden symbols provided by the others. Clients - /// writing memory managers for MCJIT can usually ignore this method. - /// - /// This method will be queried by RuntimeDyld when checking for previous - /// definitions of common symbols. - virtual SymbolInfo findSymbolInLogicalDylib(const std::string &Name) = 0; - - /// This method returns the address of the specified function or variable. - /// It is used to resolve symbols during module linking. - /// - /// If the returned symbol's address is equal to ~0ULL then RuntimeDyld will - /// skip all relocations for that symbol, and the client will be responsible - /// for handling them manually. - virtual SymbolInfo findSymbol(const std::string &Name) = 0; - - private: - virtual void anchor(); - }; - - /// \brief Construct a RuntimeDyld instance. - RuntimeDyld(MemoryManager &MemMgr, SymbolResolver &Resolver); - ~RuntimeDyld(); - - /// Add the referenced object file to the list of objects to be loaded and - /// relocated. - std::unique_ptr loadObject(const object::ObjectFile &O); - - /// Get the address of our local copy of the symbol. This may or may not - /// be the address used for relocation (clients can copy the data around - /// and resolve relocatons based on where they put it). - void *getSymbolLocalAddress(StringRef Name) const; - - /// Get the target address and flags for the named symbol. - /// This address is the one used for relocation. - SymbolInfo getSymbol(StringRef Name) const; - - /// Resolve the relocations for all symbols we currently know about. - void resolveRelocations(); - - /// Map a section to its target address space value. - /// Map the address of a JIT section as returned from the memory manager - /// to the address in the target process as the running code will see it. - /// This is the address which will be used for relocation resolution. - void mapSectionAddress(const void *LocalAddress, uint64_t TargetAddress); - - /// Register any EH frame sections that have been loaded but not previously - /// registered with the memory manager. Note, RuntimeDyld is responsible - /// for identifying the EH frame and calling the memory manager with the - /// EH frame section data. However, the memory manager itself will handle - /// the actual target-specific EH frame registration. - void registerEHFrames(); - - void deregisterEHFrames(); - - bool hasError(); - StringRef getErrorString(); - - /// By default, only sections that are "required for execution" are passed to - /// the RTDyldMemoryManager, and other sections are discarded. Passing 'true' - /// to this method will cause RuntimeDyld to pass all sections to its - /// memory manager regardless of whether they are "required to execute" in the - /// usual sense. This is useful for inspecting metadata sections that may not - /// contain relocations, E.g. Debug info, stackmaps. - /// - /// Must be called before the first object file is loaded. - void setProcessAllSections(bool ProcessAllSections) { - assert(!Dyld && "setProcessAllSections must be called before loadObject."); - this->ProcessAllSections = ProcessAllSections; - } - - /// Perform all actions needed to make the code owned by this RuntimeDyld - /// instance executable: - /// - /// 1) Apply relocations. - /// 2) Register EH frames. - /// 3) Update memory permissions*. - /// - /// * Finalization is potentially recursive**, and the 3rd step will only be - /// applied by the outermost call to finalize. This allows different - /// RuntimeDyld instances to share a memory manager without the innermost - /// finalization locking the memory and causing relocation fixup errors in - /// outer instances. - /// - /// ** Recursive finalization occurs when one RuntimeDyld instances needs the - /// address of a symbol owned by some other instance in order to apply - /// relocations. - /// - void finalizeWithMemoryManagerLocking(); - -private: - // RuntimeDyldImpl is the actual class. RuntimeDyld is just the public - // interface. - std::unique_ptr Dyld; - MemoryManager &MemMgr; - SymbolResolver &Resolver; - bool ProcessAllSections; - RuntimeDyldCheckerImpl *Checker; -}; - -} // end namespace llvm - -#endif // LLVM_EXECUTIONENGINE_RUNTIMEDYLD_H diff --git a/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h b/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h deleted file mode 100644 index f5f52b5d..00000000 --- a/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h +++ /dev/null @@ -1,106 +0,0 @@ -//===---- RuntimeDyldChecker.h - RuntimeDyld tester framework -----*- C++ -*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_RUNTIMEDYLDCHECKER_H -#define LLVM_EXECUTIONENGINE_RUNTIMEDYLDCHECKER_H - -#include -#include -#include -#include - -namespace llvm { - -class StringRef; -class MCDisassembler; -class MemoryBuffer; -class MCInstPrinter; -class RuntimeDyld; -class RuntimeDyldCheckerImpl; -class raw_ostream; - -/// \brief RuntimeDyld invariant checker for verifying that RuntimeDyld has -/// correctly applied relocations. -/// -/// The RuntimeDyldChecker class evaluates expressions against an attached -/// RuntimeDyld instance to verify that relocations have been applied -/// correctly. -/// -/// The expression language supports basic pointer arithmetic and bit-masking, -/// and has limited disassembler integration for accessing instruction -/// operands and the next PC (program counter) address for each instruction. -/// -/// The language syntax is: -/// -/// check = expr '=' expr -/// -/// expr = binary_expr -/// | sliceable_expr -/// -/// sliceable_expr = '*{' number '}' load_addr_expr [slice] -/// | '(' expr ')' [slice] -/// | ident_expr [slice] -/// | number [slice] -/// -/// slice = '[' high-bit-index ':' low-bit-index ']' -/// -/// load_addr_expr = symbol -/// | '(' symbol '+' number ')' -/// | '(' symbol '-' number ')' -/// -/// ident_expr = 'decode_operand' '(' symbol ',' operand-index ')' -/// | 'next_pc' '(' symbol ')' -/// | 'stub_addr' '(' file-name ',' section-name ',' symbol ')' -/// | symbol -/// -/// binary_expr = expr '+' expr -/// | expr '-' expr -/// | expr '&' expr -/// | expr '|' expr -/// | expr '<<' expr -/// | expr '>>' expr -/// -class RuntimeDyldChecker { -public: - RuntimeDyldChecker(RuntimeDyld &RTDyld, MCDisassembler *Disassembler, - MCInstPrinter *InstPrinter, raw_ostream &ErrStream); - ~RuntimeDyldChecker(); - - // \brief Get the associated RTDyld instance. - RuntimeDyld& getRTDyld(); - - // \brief Get the associated RTDyld instance. - const RuntimeDyld& getRTDyld() const; - - /// \brief Check a single expression against the attached RuntimeDyld - /// instance. - bool check(StringRef CheckExpr) const; - - /// \brief Scan the given memory buffer for lines beginning with the string - /// in RulePrefix. The remainder of the line is passed to the check - /// method to be evaluated as an expression. - bool checkAllRulesInBuffer(StringRef RulePrefix, MemoryBuffer *MemBuf) const; - - /// \brief Returns the address of the requested section (or an error message - /// in the second element of the pair if the address cannot be found). - /// - /// if 'LocalAddress' is true, this returns the address of the section - /// within the linker's memory. If 'LocalAddress' is false it returns the - /// address within the target process (i.e. the load address). - std::pair getSectionAddr(StringRef FileName, - StringRef SectionName, - bool LocalAddress); - -private: - std::unique_ptr Impl; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h b/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h deleted file mode 100644 index 7bb96eb8..00000000 --- a/llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h +++ /dev/null @@ -1,123 +0,0 @@ -//===- SectionMemoryManager.h - Memory manager for MCJIT/RtDyld -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of a section-based memory manager used by -// the MCJIT execution engine and RuntimeDyld. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_SECTIONMEMORYMANAGER_H -#define LLVM_EXECUTIONENGINE_SECTIONMEMORYMANAGER_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ExecutionEngine/RTDyldMemoryManager.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/Memory.h" - -namespace llvm { -/// This is a simple memory manager which implements the methods called by -/// the RuntimeDyld class to allocate memory for section-based loading of -/// objects, usually those generated by the MCJIT execution engine. -/// -/// This memory manager allocates all section memory as read-write. The -/// RuntimeDyld will copy JITed section memory into these allocated blocks -/// and perform any necessary linking and relocations. -/// -/// Any client using this memory manager MUST ensure that section-specific -/// page permissions have been applied before attempting to execute functions -/// in the JITed object. Permissions can be applied either by calling -/// MCJIT::finalizeObject or by calling SectionMemoryManager::finalizeMemory -/// directly. Clients of MCJIT should call MCJIT::finalizeObject. -class SectionMemoryManager : public RTDyldMemoryManager { - SectionMemoryManager(const SectionMemoryManager&) = delete; - void operator=(const SectionMemoryManager&) = delete; - -public: - SectionMemoryManager() { } - ~SectionMemoryManager() override; - - /// \brief Allocates a memory block of (at least) the given size suitable for - /// executable code. - /// - /// The value of \p Alignment must be a power of two. If \p Alignment is zero - /// a default alignment of 16 will be used. - uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, - StringRef SectionName) override; - - /// \brief Allocates a memory block of (at least) the given size suitable for - /// executable code. - /// - /// The value of \p Alignment must be a power of two. If \p Alignment is zero - /// a default alignment of 16 will be used. - uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, StringRef SectionName, - bool isReadOnly) override; - - /// \brief Update section-specific memory permissions and other attributes. - /// - /// This method is called when object loading is complete and section page - /// permissions can be applied. It is up to the memory manager implementation - /// to decide whether or not to act on this method. The memory manager will - /// typically allocate all sections as read-write and then apply specific - /// permissions when this method is called. Code sections cannot be executed - /// until this function has been called. In addition, any cache coherency - /// operations needed to reliably use the memory are also performed. - /// - /// \returns true if an error occurred, false otherwise. - bool finalizeMemory(std::string *ErrMsg = nullptr) override; - - /// \brief Invalidate instruction cache for code sections. - /// - /// Some platforms with separate data cache and instruction cache require - /// explicit cache flush, otherwise JIT code manipulations (like resolved - /// relocations) will get to the data cache but not to the instruction cache. - /// - /// This method is called from finalizeMemory. - virtual void invalidateInstructionCache(); - -private: - struct FreeMemBlock { - // The actual block of free memory - sys::MemoryBlock Free; - // If there is a pending allocation from the same reservation right before - // this block, store it's index in PendingMem, to be able to update the - // pending region if part of this block is allocated, rather than having to - // create a new one - unsigned PendingPrefixIndex; - }; - - struct MemoryGroup { - // PendingMem contains all blocks of memory (subblocks of AllocatedMem) - // which have not yet had their permissions applied, but have been given - // out to the user. FreeMem contains all block of memory, which have - // neither had their permissions applied, nor been given out to the user. - SmallVector PendingMem; - SmallVector FreeMem; - - // All memory blocks that have been requested from the system - SmallVector AllocatedMem; - - sys::MemoryBlock Near; - }; - - uint8_t *allocateSection(MemoryGroup &MemGroup, uintptr_t Size, - unsigned Alignment); - - std::error_code applyMemoryGroupPermissions(MemoryGroup &MemGroup, - unsigned Permissions); - - MemoryGroup CodeMem; - MemoryGroup RWDataMem; - MemoryGroup RODataMem; -}; - -} - -#endif // LLVM_EXECUTION_ENGINE_SECTION_MEMORY_MANAGER_H diff --git a/llvm/include/llvm/IR/Argument.h b/llvm/include/llvm/IR/Argument.h deleted file mode 100644 index d8b280a6..00000000 --- a/llvm/include/llvm/IR/Argument.h +++ /dev/null @@ -1,152 +0,0 @@ -//===-- llvm/Argument.h - Definition of the Argument class ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the Argument class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_ARGUMENT_H -#define LLVM_IR_ARGUMENT_H - -#include "llvm/ADT/Twine.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/IR/Attributes.h" -#include "llvm/IR/Value.h" - -namespace llvm { - -template class SymbolTableListTraits; - -/// \brief LLVM Argument representation -/// -/// This class represents an incoming formal argument to a Function. A formal -/// argument, since it is ``formal'', does not contain an actual value but -/// instead represents the type, argument number, and attributes of an argument -/// for a specific function. When used in the body of said function, the -/// argument of course represents the value of the actual argument that the -/// function was called with. -class Argument : public Value, public ilist_node { - virtual void anchor(); - Function *Parent; - - friend class SymbolTableListTraits; - void setParent(Function *parent); - -public: - /// \brief Constructor. - /// - /// If \p F is specified, the argument is inserted at the end of the argument - /// list for \p F. - explicit Argument(Type *Ty, const Twine &Name = "", Function *F = nullptr); - - inline const Function *getParent() const { return Parent; } - inline Function *getParent() { return Parent; } - - /// \brief Return the index of this formal argument in its containing - /// function. - /// - /// For example in "void foo(int a, float b)" a is 0 and b is 1. - unsigned getArgNo() const; - - /// \brief Return true if this argument has the nonnull attribute on it in - /// its containing function. Also returns true if at least one byte is known - /// to be dereferenceable and the pointer is in addrspace(0). - bool hasNonNullAttr() const; - - /// \brief If this argument has the dereferenceable attribute on it in its - /// containing function, return the number of bytes known to be - /// dereferenceable. Otherwise, zero is returned. - uint64_t getDereferenceableBytes() const; - - /// \brief If this argument has the dereferenceable_or_null attribute on - /// it in its containing function, return the number of bytes known to be - /// dereferenceable. Otherwise, zero is returned. - uint64_t getDereferenceableOrNullBytes() const; - - /// \brief Return true if this argument has the byval attribute on it in its - /// containing function. - bool hasByValAttr() const; - - /// \brief Return true if this argument has the swiftself attribute. - bool hasSwiftSelfAttr() const; - - /// \brief Return true if this argument has the swifterror attribute. - bool hasSwiftErrorAttr() const; - - /// \brief Return true if this argument has the byval attribute or inalloca - /// attribute on it in its containing function. These attributes both - /// represent arguments being passed by value. - bool hasByValOrInAllocaAttr() const; - - /// \brief If this is a byval or inalloca argument, return its alignment. - unsigned getParamAlignment() const; - - /// \brief Return true if this argument has the nest attribute on it in its - /// containing function. - bool hasNestAttr() const; - - /// \brief Return true if this argument has the noalias attribute on it in its - /// containing function. - bool hasNoAliasAttr() const; - - /// \brief Return true if this argument has the nocapture attribute on it in - /// its containing function. - bool hasNoCaptureAttr() const; - - /// \brief Return true if this argument has the sret attribute on it in its - /// containing function. - bool hasStructRetAttr() const; - - /// \brief Return true if this argument has the returned attribute on it in - /// its containing function. - bool hasReturnedAttr() const; - - /// \brief Return true if this argument has the readonly or readnone attribute - /// on it in its containing function. - bool onlyReadsMemory() const; - - /// \brief Return true if this argument has the inalloca attribute on it in - /// its containing function. - bool hasInAllocaAttr() const; - - /// \brief Return true if this argument has the zext attribute on it in its - /// containing function. - bool hasZExtAttr() const; - - /// \brief Return true if this argument has the sext attribute on it in its - /// containing function. - bool hasSExtAttr() const; - - /// \brief Add a Attribute to an argument. - void addAttr(AttributeSet AS); - - void addAttr(Attribute::AttrKind Kind) { - addAttr(AttributeSet::get(getContext(), getArgNo() + 1, Kind)); - } - - /// \brief Remove a Attribute from an argument. - void removeAttr(AttributeSet AS); - - void removeAttr(Attribute::AttrKind Kind) { - removeAttr(AttributeSet::get(getContext(), getArgNo() + 1, Kind)); - } - - /// \brief Checks if an argument has a given attribute. - bool hasAttribute(Attribute::AttrKind Kind) const; - - /// \brief Method for support type inquiry through isa, cast, and - /// dyn_cast. - static inline bool classof(const Value *V) { - return V->getValueID() == ArgumentVal; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/AssemblyAnnotationWriter.h b/llvm/include/llvm/IR/AssemblyAnnotationWriter.h deleted file mode 100644 index 6e1f5c43..00000000 --- a/llvm/include/llvm/IR/AssemblyAnnotationWriter.h +++ /dev/null @@ -1,62 +0,0 @@ -//===-- AssemblyAnnotationWriter.h - Annotation .ll files -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Clients of the assembly writer can use this interface to add their own -// special-purpose annotations to LLVM assembly language printouts. Note that -// the assembly parser won't be able to parse these, in general, so -// implementations are advised to print stuff as LLVM comments. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_ASSEMBLYANNOTATIONWRITER_H -#define LLVM_IR_ASSEMBLYANNOTATIONWRITER_H - -namespace llvm { - -class Function; -class BasicBlock; -class Instruction; -class Value; -class formatted_raw_ostream; - -class AssemblyAnnotationWriter { -public: - virtual ~AssemblyAnnotationWriter(); - - /// emitFunctionAnnot - This may be implemented to emit a string right before - /// the start of a function. - virtual void emitFunctionAnnot(const Function *, - formatted_raw_ostream &) {} - - /// emitBasicBlockStartAnnot - This may be implemented to emit a string right - /// after the basic block label, but before the first instruction in the - /// block. - virtual void emitBasicBlockStartAnnot(const BasicBlock *, - formatted_raw_ostream &) { - } - - /// emitBasicBlockEndAnnot - This may be implemented to emit a string right - /// after the basic block. - virtual void emitBasicBlockEndAnnot(const BasicBlock *, - formatted_raw_ostream &) { - } - - /// emitInstructionAnnot - This may be implemented to emit a string right - /// before an instruction is emitted. - virtual void emitInstructionAnnot(const Instruction *, - formatted_raw_ostream &) {} - - /// printInfoComment - This may be implemented to emit a comment to the - /// right of an instruction or global value. - virtual void printInfoComment(const Value &, formatted_raw_ostream &) {} -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h deleted file mode 100644 index 5ef03715..00000000 --- a/llvm/include/llvm/IR/Attributes.h +++ /dev/null @@ -1,612 +0,0 @@ -//===-- llvm/Attributes.h - Container for Attributes ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// \brief This file contains the simple types necessary to represent the -/// attributes associated with functions and their calls. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_ATTRIBUTES_H -#define LLVM_IR_ATTRIBUTES_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/FoldingSet.h" -#include "llvm/ADT/Optional.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/PointerLikeTypeTraits.h" -#include "llvm-c/Types.h" -#include -#include -#include -#include - -namespace llvm { - -class AttrBuilder; -class AttributeImpl; -class AttributeSetImpl; -class AttributeSetNode; -class Constant; -template struct DenseMapInfo; -class Function; -class LLVMContext; -class Type; - -//===----------------------------------------------------------------------===// -/// \class -/// \brief Functions, function parameters, and return types can have attributes -/// to indicate how they should be treated by optimizations and code -/// generation. This class represents one of those attributes. It's light-weight -/// and should be passed around by-value. -class Attribute { -public: - /// This enumeration lists the attributes that can be associated with - /// parameters, function results, or the function itself. - /// - /// Note: The `uwtable' attribute is about the ABI or the user mandating an - /// entry in the unwind table. The `nounwind' attribute is about an exception - /// passing by the function. - /// - /// In a theoretical system that uses tables for profiling and SjLj for - /// exceptions, they would be fully independent. In a normal system that uses - /// tables for both, the semantics are: - /// - /// nil = Needs an entry because an exception might pass by. - /// nounwind = No need for an entry - /// uwtable = Needs an entry because the ABI says so and because - /// an exception might pass by. - /// uwtable + nounwind = Needs an entry because the ABI says so. - - enum AttrKind { - // IR-Level Attributes - None, ///< No attributes have been set - #define GET_ATTR_ENUM - #include "llvm/IR/Attributes.inc" - EndAttrKinds ///< Sentinal value useful for loops - }; - -private: - AttributeImpl *pImpl; - Attribute(AttributeImpl *A) : pImpl(A) {} - -public: - Attribute() : pImpl(nullptr) {} - - //===--------------------------------------------------------------------===// - // Attribute Construction - //===--------------------------------------------------------------------===// - - /// \brief Return a uniquified Attribute object. - static Attribute get(LLVMContext &Context, AttrKind Kind, uint64_t Val = 0); - static Attribute get(LLVMContext &Context, StringRef Kind, - StringRef Val = StringRef()); - - /// \brief Return a uniquified Attribute object that has the specific - /// alignment set. - static Attribute getWithAlignment(LLVMContext &Context, uint64_t Align); - static Attribute getWithStackAlignment(LLVMContext &Context, uint64_t Align); - static Attribute getWithDereferenceableBytes(LLVMContext &Context, - uint64_t Bytes); - static Attribute getWithDereferenceableOrNullBytes(LLVMContext &Context, - uint64_t Bytes); - static Attribute getWithAllocSizeArgs(LLVMContext &Context, - unsigned ElemSizeArg, - const Optional &NumElemsArg); - - //===--------------------------------------------------------------------===// - // Attribute Accessors - //===--------------------------------------------------------------------===// - - /// \brief Return true if the attribute is an Attribute::AttrKind type. - bool isEnumAttribute() const; - - /// \brief Return true if the attribute is an integer attribute. - bool isIntAttribute() const; - - /// \brief Return true if the attribute is a string (target-dependent) - /// attribute. - bool isStringAttribute() const; - - /// \brief Return true if the attribute is present. - bool hasAttribute(AttrKind Val) const; - - /// \brief Return true if the target-dependent attribute is present. - bool hasAttribute(StringRef Val) const; - - /// \brief Return the attribute's kind as an enum (Attribute::AttrKind). This - /// requires the attribute to be an enum or integer attribute. - Attribute::AttrKind getKindAsEnum() const; - - /// \brief Return the attribute's value as an integer. This requires that the - /// attribute be an integer attribute. - uint64_t getValueAsInt() const; - - /// \brief Return the attribute's kind as a string. This requires the - /// attribute to be a string attribute. - StringRef getKindAsString() const; - - /// \brief Return the attribute's value as a string. This requires the - /// attribute to be a string attribute. - StringRef getValueAsString() const; - - /// \brief Returns the alignment field of an attribute as a byte alignment - /// value. - unsigned getAlignment() const; - - /// \brief Returns the stack alignment field of an attribute as a byte - /// alignment value. - unsigned getStackAlignment() const; - - /// \brief Returns the number of dereferenceable bytes from the - /// dereferenceable attribute. - uint64_t getDereferenceableBytes() const; - - /// \brief Returns the number of dereferenceable_or_null bytes from the - /// dereferenceable_or_null attribute. - uint64_t getDereferenceableOrNullBytes() const; - - /// Returns the argument numbers for the allocsize attribute (or pair(0, 0) - /// if not known). - std::pair> getAllocSizeArgs() const; - - /// \brief The Attribute is converted to a string of equivalent mnemonic. This - /// is, presumably, for writing out the mnemonics for the assembly writer. - std::string getAsString(bool InAttrGrp = false) const; - - /// \brief Equality and non-equality operators. - bool operator==(Attribute A) const { return pImpl == A.pImpl; } - bool operator!=(Attribute A) const { return pImpl != A.pImpl; } - - /// \brief Less-than operator. Useful for sorting the attributes list. - bool operator<(Attribute A) const; - - void Profile(FoldingSetNodeID &ID) const { - ID.AddPointer(pImpl); - } - - /// \brief Return a raw pointer that uniquely identifies this attribute. - void *getRawPointer() const { - return pImpl; - } - - /// \brief Get an attribute from a raw pointer created by getRawPointer. - static Attribute fromRawPointer(void *RawPtr) { - return Attribute(reinterpret_cast(RawPtr)); - } -}; - -// Specialized opaque value conversions. -inline LLVMAttributeRef wrap(Attribute Attr) { - return reinterpret_cast(Attr.getRawPointer()); -} - -// Specialized opaque value conversions. -inline Attribute unwrap(LLVMAttributeRef Attr) { - return Attribute::fromRawPointer(Attr); -} - -//===----------------------------------------------------------------------===// -/// \class -/// \brief This class holds the attributes for a function, its return value, and -/// its parameters. You access the attributes for each of them via an index into -/// the AttributeSet object. The function attributes are at index -/// `AttributeSet::FunctionIndex', the return value is at index -/// `AttributeSet::ReturnIndex', and the attributes for the parameters start at -/// index `1'. -class AttributeSet { -public: - enum AttrIndex : unsigned { - ReturnIndex = 0U, - FunctionIndex = ~0U - }; - -private: - friend class AttrBuilder; - friend class AttributeSetImpl; - friend class AttributeSetNode; - template friend struct DenseMapInfo; - - /// \brief The attributes that we are managing. This can be null to represent - /// the empty attributes list. - AttributeSetImpl *pImpl; - - /// \brief The attributes for the specified index are returned. - AttributeSetNode *getAttributes(unsigned Index) const; - - /// \brief Create an AttributeSet with the specified parameters in it. - static AttributeSet get(LLVMContext &C, - ArrayRef > Attrs); - static AttributeSet get(LLVMContext &C, - ArrayRef > Attrs); - - static AttributeSet getImpl(LLVMContext &C, - ArrayRef > Attrs); - - explicit AttributeSet(AttributeSetImpl *LI) : pImpl(LI) {} - -public: - AttributeSet() : pImpl(nullptr) {} - - //===--------------------------------------------------------------------===// - // AttributeSet Construction and Mutation - //===--------------------------------------------------------------------===// - - /// \brief Return an AttributeSet with the specified parameters in it. - static AttributeSet get(LLVMContext &C, ArrayRef Attrs); - static AttributeSet get(LLVMContext &C, unsigned Index, - ArrayRef Kinds); - static AttributeSet get(LLVMContext &C, unsigned Index, - ArrayRef Kind); - static AttributeSet get(LLVMContext &C, unsigned Index, const AttrBuilder &B); - - /// \brief Add an attribute to the attribute set at the given index. Because - /// attribute sets are immutable, this returns a new set. - AttributeSet addAttribute(LLVMContext &C, unsigned Index, - Attribute::AttrKind Kind) const; - - /// \brief Add an attribute to the attribute set at the given index. Because - /// attribute sets are immutable, this returns a new set. - AttributeSet addAttribute(LLVMContext &C, unsigned Index, StringRef Kind, - StringRef Value = StringRef()) const; - - /// Add an attribute to the attribute set at the given indices. Because - /// attribute sets are immutable, this returns a new set. - AttributeSet addAttribute(LLVMContext &C, ArrayRef Indices, - Attribute A) const; - - /// \brief Add attributes to the attribute set at the given index. Because - /// attribute sets are immutable, this returns a new set. - AttributeSet addAttributes(LLVMContext &C, unsigned Index, - AttributeSet Attrs) const; - - /// \brief Remove the specified attribute at the specified index from this - /// attribute list. Because attribute lists are immutable, this returns the - /// new list. - AttributeSet removeAttribute(LLVMContext &C, unsigned Index, - Attribute::AttrKind Kind) const; - - /// \brief Remove the specified attribute at the specified index from this - /// attribute list. Because attribute lists are immutable, this returns the - /// new list. - AttributeSet removeAttribute(LLVMContext &C, unsigned Index, - StringRef Kind) const; - - /// \brief Remove the specified attributes at the specified index from this - /// attribute list. Because attribute lists are immutable, this returns the - /// new list. - AttributeSet removeAttributes(LLVMContext &C, unsigned Index, - AttributeSet Attrs) const; - - /// \brief Remove the specified attributes at the specified index from this - /// attribute list. Because attribute lists are immutable, this returns the - /// new list. - AttributeSet removeAttributes(LLVMContext &C, unsigned Index, - const AttrBuilder &Attrs) const; - - /// \brief Add the dereferenceable attribute to the attribute set at the given - /// index. Because attribute sets are immutable, this returns a new set. - AttributeSet addDereferenceableAttr(LLVMContext &C, unsigned Index, - uint64_t Bytes) const; - - /// \brief Add the dereferenceable_or_null attribute to the attribute set at - /// the given index. Because attribute sets are immutable, this returns a new - /// set. - AttributeSet addDereferenceableOrNullAttr(LLVMContext &C, unsigned Index, - uint64_t Bytes) const; - - /// Add the allocsize attribute to the attribute set at the given index. - /// Because attribute sets are immutable, this returns a new set. - AttributeSet addAllocSizeAttr(LLVMContext &C, unsigned Index, - unsigned ElemSizeArg, - const Optional &NumElemsArg); - - //===--------------------------------------------------------------------===// - // AttributeSet Accessors - //===--------------------------------------------------------------------===// - - /// \brief Retrieve the LLVM context. - LLVMContext &getContext() const; - - /// \brief The attributes for the specified index are returned. - AttributeSet getParamAttributes(unsigned Index) const; - - /// \brief The attributes for the ret value are returned. - AttributeSet getRetAttributes() const; - - /// \brief The function attributes are returned. - AttributeSet getFnAttributes() const; - - /// \brief Return true if the attribute exists at the given index. - bool hasAttribute(unsigned Index, Attribute::AttrKind Kind) const; - - /// \brief Return true if the attribute exists at the given index. - bool hasAttribute(unsigned Index, StringRef Kind) const; - - /// \brief Return true if attribute exists at the given index. - bool hasAttributes(unsigned Index) const; - - /// \brief Equivalent to hasAttribute(AttributeSet::FunctionIndex, Kind) but - /// may be faster. - bool hasFnAttribute(Attribute::AttrKind Kind) const; - - /// \brief Return true if the specified attribute is set for at least one - /// parameter or for the return value. If Index is not nullptr, the index - /// of a parameter with the specified attribute is provided. - bool hasAttrSomewhere(Attribute::AttrKind Kind, - unsigned *Index = nullptr) const; - - /// \brief Return the attribute object that exists at the given index. - Attribute getAttribute(unsigned Index, Attribute::AttrKind Kind) const; - - /// \brief Return the attribute object that exists at the given index. - Attribute getAttribute(unsigned Index, StringRef Kind) const; - - /// \brief Return the alignment for the specified function parameter. - unsigned getParamAlignment(unsigned Index) const; - - /// \brief Get the stack alignment. - unsigned getStackAlignment(unsigned Index) const; - - /// \brief Get the number of dereferenceable bytes (or zero if unknown). - uint64_t getDereferenceableBytes(unsigned Index) const; - - /// \brief Get the number of dereferenceable_or_null bytes (or zero if - /// unknown). - uint64_t getDereferenceableOrNullBytes(unsigned Index) const; - - /// Get the allocsize argument numbers (or pair(0, 0) if unknown). - std::pair> - getAllocSizeArgs(unsigned Index) const; - - /// \brief Return the attributes at the index as a string. - std::string getAsString(unsigned Index, bool InAttrGrp = false) const; - - typedef ArrayRef::iterator iterator; - - iterator begin(unsigned Slot) const; - iterator end(unsigned Slot) const; - - /// operator==/!= - Provide equality predicates. - bool operator==(const AttributeSet &RHS) const { - return pImpl == RHS.pImpl; - } - bool operator!=(const AttributeSet &RHS) const { - return pImpl != RHS.pImpl; - } - - //===--------------------------------------------------------------------===// - // AttributeSet Introspection - //===--------------------------------------------------------------------===// - - // FIXME: Remove this. - uint64_t Raw(unsigned Index) const; - - /// \brief Return a raw pointer that uniquely identifies this attribute list. - void *getRawPointer() const { - return pImpl; - } - - /// \brief Return true if there are no attributes. - bool isEmpty() const { - return getNumSlots() == 0; - } - - /// \brief Return the number of slots used in this attribute list. This is - /// the number of arguments that have an attribute set on them (including the - /// function itself). - unsigned getNumSlots() const; - - /// \brief Return the index for the given slot. - unsigned getSlotIndex(unsigned Slot) const; - - /// \brief Return the attributes at the given slot. - AttributeSet getSlotAttributes(unsigned Slot) const; - - void dump() const; -}; - -//===----------------------------------------------------------------------===// -/// \class -/// \brief Provide DenseMapInfo for AttributeSet. -template<> struct DenseMapInfo { - static inline AttributeSet getEmptyKey() { - uintptr_t Val = static_cast(-1); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; - return AttributeSet(reinterpret_cast(Val)); - } - static inline AttributeSet getTombstoneKey() { - uintptr_t Val = static_cast(-2); - Val <<= PointerLikeTypeTraits::NumLowBitsAvailable; - return AttributeSet(reinterpret_cast(Val)); - } - static unsigned getHashValue(AttributeSet AS) { - return (unsigned((uintptr_t)AS.pImpl) >> 4) ^ - (unsigned((uintptr_t)AS.pImpl) >> 9); - } - static bool isEqual(AttributeSet LHS, AttributeSet RHS) { return LHS == RHS; } -}; - -//===----------------------------------------------------------------------===// -/// \class -/// \brief This class is used in conjunction with the Attribute::get method to -/// create an Attribute object. The object itself is uniquified. The Builder's -/// value, however, is not. So this can be used as a quick way to test for -/// equality, presence of attributes, etc. -class AttrBuilder { - std::bitset Attrs; - std::map TargetDepAttrs; - uint64_t Alignment; - uint64_t StackAlignment; - uint64_t DerefBytes; - uint64_t DerefOrNullBytes; - uint64_t AllocSizeArgs; - -public: - AttrBuilder() - : Attrs(0), Alignment(0), StackAlignment(0), DerefBytes(0), - DerefOrNullBytes(0), AllocSizeArgs(0) {} - explicit AttrBuilder(uint64_t Val) - : Attrs(0), Alignment(0), StackAlignment(0), DerefBytes(0), - DerefOrNullBytes(0), AllocSizeArgs(0) { - addRawValue(Val); - } - AttrBuilder(const Attribute &A) - : Attrs(0), Alignment(0), StackAlignment(0), DerefBytes(0), - DerefOrNullBytes(0), AllocSizeArgs(0) { - addAttribute(A); - } - AttrBuilder(AttributeSet AS, unsigned Idx); - - void clear(); - - /// \brief Add an attribute to the builder. - AttrBuilder &addAttribute(Attribute::AttrKind Val); - - /// \brief Add the Attribute object to the builder. - AttrBuilder &addAttribute(Attribute A); - - /// \brief Add the target-dependent attribute to the builder. - AttrBuilder &addAttribute(StringRef A, StringRef V = StringRef()); - - /// \brief Remove an attribute from the builder. - AttrBuilder &removeAttribute(Attribute::AttrKind Val); - - /// \brief Remove the attributes from the builder. - AttrBuilder &removeAttributes(AttributeSet A, uint64_t Index); - - /// \brief Remove the target-dependent attribute to the builder. - AttrBuilder &removeAttribute(StringRef A); - - /// \brief Add the attributes from the builder. - AttrBuilder &merge(const AttrBuilder &B); - - /// \brief Remove the attributes from the builder. - AttrBuilder &remove(const AttrBuilder &B); - - /// \brief Return true if the builder has any attribute that's in the - /// specified builder. - bool overlaps(const AttrBuilder &B) const; - - /// \brief Return true if the builder has the specified attribute. - bool contains(Attribute::AttrKind A) const { - assert((unsigned)A < Attribute::EndAttrKinds && "Attribute out of range!"); - return Attrs[A]; - } - - /// \brief Return true if the builder has the specified target-dependent - /// attribute. - bool contains(StringRef A) const; - - /// \brief Return true if the builder has IR-level attributes. - bool hasAttributes() const; - - /// \brief Return true if the builder has any attribute that's in the - /// specified attribute. - bool hasAttributes(AttributeSet A, uint64_t Index) const; - - /// \brief Return true if the builder has an alignment attribute. - bool hasAlignmentAttr() const; - - /// \brief Retrieve the alignment attribute, if it exists. - uint64_t getAlignment() const { return Alignment; } - - /// \brief Retrieve the stack alignment attribute, if it exists. - uint64_t getStackAlignment() const { return StackAlignment; } - - /// \brief Retrieve the number of dereferenceable bytes, if the - /// dereferenceable attribute exists (zero is returned otherwise). - uint64_t getDereferenceableBytes() const { return DerefBytes; } - - /// \brief Retrieve the number of dereferenceable_or_null bytes, if the - /// dereferenceable_or_null attribute exists (zero is returned otherwise). - uint64_t getDereferenceableOrNullBytes() const { return DerefOrNullBytes; } - - /// Retrieve the allocsize args, if the allocsize attribute exists. If it - /// doesn't exist, pair(0, 0) is returned. - std::pair> getAllocSizeArgs() const; - - /// \brief This turns an int alignment (which must be a power of 2) into the - /// form used internally in Attribute. - AttrBuilder &addAlignmentAttr(unsigned Align); - - /// \brief This turns an int stack alignment (which must be a power of 2) into - /// the form used internally in Attribute. - AttrBuilder &addStackAlignmentAttr(unsigned Align); - - /// \brief This turns the number of dereferenceable bytes into the form used - /// internally in Attribute. - AttrBuilder &addDereferenceableAttr(uint64_t Bytes); - - /// \brief This turns the number of dereferenceable_or_null bytes into the - /// form used internally in Attribute. - AttrBuilder &addDereferenceableOrNullAttr(uint64_t Bytes); - - /// This turns one (or two) ints into the form used internally in Attribute. - AttrBuilder &addAllocSizeAttr(unsigned ElemSizeArg, - const Optional &NumElemsArg); - - /// Add an allocsize attribute, using the representation returned by - /// Attribute.getIntValue(). - AttrBuilder &addAllocSizeAttrFromRawRepr(uint64_t RawAllocSizeRepr); - - /// \brief Return true if the builder contains no target-independent - /// attributes. - bool empty() const { return Attrs.none(); } - - // Iterators for target-dependent attributes. - typedef std::pair td_type; - typedef std::map::iterator td_iterator; - typedef std::map::const_iterator td_const_iterator; - typedef llvm::iterator_range td_range; - typedef llvm::iterator_range td_const_range; - - td_iterator td_begin() { return TargetDepAttrs.begin(); } - td_iterator td_end() { return TargetDepAttrs.end(); } - - td_const_iterator td_begin() const { return TargetDepAttrs.begin(); } - td_const_iterator td_end() const { return TargetDepAttrs.end(); } - - td_range td_attrs() { return td_range(td_begin(), td_end()); } - td_const_range td_attrs() const { - return td_const_range(td_begin(), td_end()); - } - - bool td_empty() const { return TargetDepAttrs.empty(); } - - bool operator==(const AttrBuilder &B); - bool operator!=(const AttrBuilder &B) { - return !(*this == B); - } - - // FIXME: Remove this in 4.0. - - /// \brief Add the raw value to the internal representation. - AttrBuilder &addRawValue(uint64_t Val); -}; - -namespace AttributeFuncs { - -/// \brief Which attributes cannot be applied to a type. -AttrBuilder typeIncompatible(Type *Ty); - -/// \returns Return true if the two functions have compatible target-independent -/// attributes for inlining purposes. -bool areInlineCompatible(const Function &Caller, const Function &Callee); - -/// \brief Merge caller's and callee's attributes. -void mergeAttributesForInlining(Function &Caller, const Function &Callee); - -} // end AttributeFuncs namespace - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Attributes.inc b/llvm/include/llvm/IR/Attributes.inc deleted file mode 100644 index 3653bdb2..00000000 --- a/llvm/include/llvm/IR/Attributes.inc +++ /dev/null @@ -1,458 +0,0 @@ -#ifdef GET_ATTR_ENUM -#undef GET_ATTR_ENUM -Alignment, -AllocSize, -AlwaysInline, -ArgMemOnly, -Builtin, -ByVal, -Cold, -Convergent, -Dereferenceable, -DereferenceableOrNull, -InAlloca, -InReg, -InaccessibleMemOnly, -InaccessibleMemOrArgMemOnly, -InlineHint, -JumpTable, -MinSize, -Naked, -Nest, -NoAlias, -NoBuiltin, -NoCapture, -NoDuplicate, -NoImplicitFloat, -NoInline, -NoRecurse, -NoRedZone, -NoReturn, -NoUnwind, -NonLazyBind, -NonNull, -OptimizeForSize, -OptimizeNone, -ReadNone, -ReadOnly, -Returned, -ReturnsTwice, -SExt, -SafeStack, -SanitizeAddress, -SanitizeMemory, -SanitizeThread, -StackAlignment, -StackProtect, -StackProtectReq, -StackProtectStrong, -StructRet, -SwiftError, -SwiftSelf, -UWTable, -WriteOnly, -ZExt, -#endif -#ifdef GET_ATTR_KIND_FROM_NAME -#undef GET_ATTR_KIND_FROM_NAME -static Attribute::AttrKind getAttrKindFromName(StringRef AttrName) { - return StringSwitch(AttrName) - .Case("align", Attribute::Alignment) - .Case("allocsize", Attribute::AllocSize) - .Case("alwaysinline", Attribute::AlwaysInline) - .Case("argmemonly", Attribute::ArgMemOnly) - .Case("builtin", Attribute::Builtin) - .Case("byval", Attribute::ByVal) - .Case("cold", Attribute::Cold) - .Case("convergent", Attribute::Convergent) - .Case("dereferenceable", Attribute::Dereferenceable) - .Case("dereferenceable_or_null", Attribute::DereferenceableOrNull) - .Case("inalloca", Attribute::InAlloca) - .Case("inreg", Attribute::InReg) - .Case("inaccessiblememonly", Attribute::InaccessibleMemOnly) - .Case("inaccessiblemem_or_argmemonly", Attribute::InaccessibleMemOrArgMemOnly) - .Case("inlinehint", Attribute::InlineHint) - .Case("jumptable", Attribute::JumpTable) - .Case("minsize", Attribute::MinSize) - .Case("naked", Attribute::Naked) - .Case("nest", Attribute::Nest) - .Case("noalias", Attribute::NoAlias) - .Case("nobuiltin", Attribute::NoBuiltin) - .Case("nocapture", Attribute::NoCapture) - .Case("noduplicate", Attribute::NoDuplicate) - .Case("noimplicitfloat", Attribute::NoImplicitFloat) - .Case("noinline", Attribute::NoInline) - .Case("norecurse", Attribute::NoRecurse) - .Case("noredzone", Attribute::NoRedZone) - .Case("noreturn", Attribute::NoReturn) - .Case("nounwind", Attribute::NoUnwind) - .Case("nonlazybind", Attribute::NonLazyBind) - .Case("nonnull", Attribute::NonNull) - .Case("optsize", Attribute::OptimizeForSize) - .Case("optnone", Attribute::OptimizeNone) - .Case("readnone", Attribute::ReadNone) - .Case("readonly", Attribute::ReadOnly) - .Case("returned", Attribute::Returned) - .Case("returns_twice", Attribute::ReturnsTwice) - .Case("signext", Attribute::SExt) - .Case("safestack", Attribute::SafeStack) - .Case("sanitize_address", Attribute::SanitizeAddress) - .Case("sanitize_memory", Attribute::SanitizeMemory) - .Case("sanitize_thread", Attribute::SanitizeThread) - .Case("alignstack", Attribute::StackAlignment) - .Case("ssp", Attribute::StackProtect) - .Case("sspreq", Attribute::StackProtectReq) - .Case("sspstrong", Attribute::StackProtectStrong) - .Case("sret", Attribute::StructRet) - .Case("swifterror", Attribute::SwiftError) - .Case("swiftself", Attribute::SwiftSelf) - .Case("uwtable", Attribute::UWTable) - .Case("writeonly", Attribute::WriteOnly) - .Case("zeroext", Attribute::ZExt) - .Default(Attribute::None); -} - -#endif -#ifdef GET_ATTR_COMPAT_FUNC -#undef GET_ATTR_COMPAT_FUNC -struct EnumAttr { - static bool isSet(const Function &Fn, - Attribute::AttrKind Kind) { - return Fn.hasFnAttribute(Kind); - } - - static void set(Function &Fn, - Attribute::AttrKind Kind, bool Val) { - if (Val) - Fn.addFnAttr(Kind); - else - Fn.removeFnAttr(Kind); - } -}; - -struct StrBoolAttr { - static bool isSet(const Function &Fn, - StringRef Kind) { - auto A = Fn.getFnAttribute(Kind); - return A.getValueAsString().equals("true"); - } - - static void set(Function &Fn, - StringRef Kind, bool Val) { - Fn.addFnAttr(Kind, Val ? "true" : "false"); - } -}; - -// EnumAttr classes -struct AlignmentAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::Alignment; - } -}; -struct AllocSizeAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::AllocSize; - } -}; -struct AlwaysInlineAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::AlwaysInline; - } -}; -struct ArgMemOnlyAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::ArgMemOnly; - } -}; -struct BuiltinAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::Builtin; - } -}; -struct ByValAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::ByVal; - } -}; -struct ColdAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::Cold; - } -}; -struct ConvergentAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::Convergent; - } -}; -struct DereferenceableAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::Dereferenceable; - } -}; -struct DereferenceableOrNullAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::DereferenceableOrNull; - } -}; -struct InAllocaAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::InAlloca; - } -}; -struct InRegAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::InReg; - } -}; -struct InaccessibleMemOnlyAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::InaccessibleMemOnly; - } -}; -struct InaccessibleMemOrArgMemOnlyAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::InaccessibleMemOrArgMemOnly; - } -}; -struct InlineHintAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::InlineHint; - } -}; -struct JumpTableAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::JumpTable; - } -}; -struct MinSizeAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::MinSize; - } -}; -struct NakedAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::Naked; - } -}; -struct NestAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::Nest; - } -}; -struct NoAliasAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoAlias; - } -}; -struct NoBuiltinAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoBuiltin; - } -}; -struct NoCaptureAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoCapture; - } -}; -struct NoDuplicateAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoDuplicate; - } -}; -struct NoImplicitFloatAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoImplicitFloat; - } -}; -struct NoInlineAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoInline; - } -}; -struct NoRecurseAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoRecurse; - } -}; -struct NoRedZoneAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoRedZone; - } -}; -struct NoReturnAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoReturn; - } -}; -struct NoUnwindAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NoUnwind; - } -}; -struct NonLazyBindAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NonLazyBind; - } -}; -struct NonNullAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::NonNull; - } -}; -struct OptimizeForSizeAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::OptimizeForSize; - } -}; -struct OptimizeNoneAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::OptimizeNone; - } -}; -struct ReadNoneAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::ReadNone; - } -}; -struct ReadOnlyAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::ReadOnly; - } -}; -struct ReturnedAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::Returned; - } -}; -struct ReturnsTwiceAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::ReturnsTwice; - } -}; -struct SExtAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::SExt; - } -}; -struct SafeStackAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::SafeStack; - } -}; -struct SanitizeAddressAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::SanitizeAddress; - } -}; -struct SanitizeMemoryAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::SanitizeMemory; - } -}; -struct SanitizeThreadAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::SanitizeThread; - } -}; -struct StackAlignmentAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::StackAlignment; - } -}; -struct StackProtectAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::StackProtect; - } -}; -struct StackProtectReqAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::StackProtectReq; - } -}; -struct StackProtectStrongAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::StackProtectStrong; - } -}; -struct StructRetAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::StructRet; - } -}; -struct SwiftErrorAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::SwiftError; - } -}; -struct SwiftSelfAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::SwiftSelf; - } -}; -struct UWTableAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::UWTable; - } -}; -struct WriteOnlyAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::WriteOnly; - } -}; -struct ZExtAttr : EnumAttr { - static enum Attribute::AttrKind getKind() { - return llvm::Attribute::ZExt; - } -}; - -// StrBoolAttr classes -struct LessPreciseFPMADAttr : StrBoolAttr { - static const char *getKind() { - return "less-precise-fpmad"; - } -}; -struct NoInfsFPMathAttr : StrBoolAttr { - static const char *getKind() { - return "no-infs-fp-math"; - } -}; -struct NoJumpTablesAttr : StrBoolAttr { - static const char *getKind() { - return "no-jump-tables"; - } -}; -struct NoNansFPMathAttr : StrBoolAttr { - static const char *getKind() { - return "no-nans-fp-math"; - } -}; -struct UnsafeFPMathAttr : StrBoolAttr { - static const char *getKind() { - return "unsafe-fp-math"; - } -}; - -static inline bool hasCompatibleFnAttrs(const Function &Caller, - const Function &Callee) { - bool Ret = true; - - Ret &= isEqual(Caller, Callee); - Ret &= isEqual(Caller, Callee); - Ret &= isEqual(Caller, Callee); - Ret &= isEqual(Caller, Callee); - - return Ret; -} - -static inline void mergeFnAttrs(Function &Caller, - const Function &Callee) { - adjustCallerSSPLevel(Caller, Callee); - setAND(Caller, Callee); - setAND(Caller, Callee); - setAND(Caller, Callee); - setAND(Caller, Callee); - setOR(Caller, Callee); - setOR(Caller, Callee); -} - -#endif diff --git a/llvm/include/llvm/IR/Attributes.td b/llvm/include/llvm/IR/Attributes.td deleted file mode 100644 index 7b63638a..00000000 --- a/llvm/include/llvm/IR/Attributes.td +++ /dev/null @@ -1,213 +0,0 @@ -/// Attribute base class. -class Attr { - // String representation of this attribute in the IR. - string AttrString = S; -} - -/// Enum attribute. -class EnumAttr : Attr; - -/// StringBool attribute. -class StrBoolAttr : Attr; - -/// Target-independent enum attributes. - -/// Alignment of parameter (5 bits) stored as log2 of alignment with +1 bias. -/// 0 means unaligned (different from align(1)). -def Alignment : EnumAttr<"align">; - -/// The result of the function is guaranteed to point to a number of bytes that -/// we can determine if we know the value of the function's arguments. -def AllocSize : EnumAttr<"allocsize">; - -/// inline=always. -def AlwaysInline : EnumAttr<"alwaysinline">; - -/// Function can access memory only using pointers based on its arguments. -def ArgMemOnly : EnumAttr<"argmemonly">; - -/// Callee is recognized as a builtin, despite nobuiltin attribute on its -/// declaration. -def Builtin : EnumAttr<"builtin">; - -/// Pass structure by value. -def ByVal : EnumAttr<"byval">; - -/// Marks function as being in a cold path. -def Cold : EnumAttr<"cold">; - -/// Can only be moved to control-equivalent blocks. -def Convergent : EnumAttr<"convergent">; - -/// Pointer is known to be dereferenceable. -def Dereferenceable : EnumAttr<"dereferenceable">; - -/// Pointer is either null or dereferenceable. -def DereferenceableOrNull : EnumAttr<"dereferenceable_or_null">; - -/// Function may only access memory that is inaccessible from IR. -def InaccessibleMemOnly : EnumAttr<"inaccessiblememonly">; - -/// Function may only access memory that is either inaccessible from the IR, -/// or pointed to by its pointer arguments. -def InaccessibleMemOrArgMemOnly : EnumAttr<"inaccessiblemem_or_argmemonly">; - -/// Pass structure in an alloca. -def InAlloca : EnumAttr<"inalloca">; - -/// Source said inlining was desirable. -def InlineHint : EnumAttr<"inlinehint">; - -/// Force argument to be passed in register. -def InReg : EnumAttr<"inreg">; - -/// Build jump-instruction tables and replace refs. -def JumpTable : EnumAttr<"jumptable">; - -/// Function must be optimized for size first. -def MinSize : EnumAttr<"minsize">; - -/// Naked function. -def Naked : EnumAttr<"naked">; - -/// Nested function static chain. -def Nest : EnumAttr<"nest">; - -/// Considered to not alias after call. -def NoAlias : EnumAttr<"noalias">; - -/// Callee isn't recognized as a builtin. -def NoBuiltin : EnumAttr<"nobuiltin">; - -/// Function creates no aliases of pointer. -def NoCapture : EnumAttr<"nocapture">; - -/// Call cannot be duplicated. -def NoDuplicate : EnumAttr<"noduplicate">; - -/// Disable implicit floating point insts. -def NoImplicitFloat : EnumAttr<"noimplicitfloat">; - -/// inline=never. -def NoInline : EnumAttr<"noinline">; - -/// Function is called early and/or often, so lazy binding isn't worthwhile. -def NonLazyBind : EnumAttr<"nonlazybind">; - -/// Pointer is known to be not null. -def NonNull : EnumAttr<"nonnull">; - -/// The function does not recurse. -def NoRecurse : EnumAttr<"norecurse">; - -/// Disable redzone. -def NoRedZone : EnumAttr<"noredzone">; - -/// Mark the function as not returning. -def NoReturn : EnumAttr<"noreturn">; - -/// Function doesn't unwind stack. -def NoUnwind : EnumAttr<"nounwind">; - -/// opt_size. -def OptimizeForSize : EnumAttr<"optsize">; - -/// Function must not be optimized. -def OptimizeNone : EnumAttr<"optnone">; - -/// Function does not access memory. -def ReadNone : EnumAttr<"readnone">; - -/// Function only reads from memory. -def ReadOnly : EnumAttr<"readonly">; - -/// Return value is always equal to this argument. -def Returned : EnumAttr<"returned">; - -/// Function can return twice. -def ReturnsTwice : EnumAttr<"returns_twice">; - -/// Safe Stack protection. -def SafeStack : EnumAttr<"safestack">; - -/// Sign extended before/after call. -def SExt : EnumAttr<"signext">; - -/// Alignment of stack for function (3 bits) stored as log2 of alignment with -/// +1 bias 0 means unaligned (different from alignstack=(1)). -def StackAlignment : EnumAttr<"alignstack">; - -/// Stack protection. -def StackProtect : EnumAttr<"ssp">; - -/// Stack protection required. -def StackProtectReq : EnumAttr<"sspreq">; - -/// Strong Stack protection. -def StackProtectStrong : EnumAttr<"sspstrong">; - -/// Hidden pointer to structure to return. -def StructRet : EnumAttr<"sret">; - -/// AddressSanitizer is on. -def SanitizeAddress : EnumAttr<"sanitize_address">; - -/// ThreadSanitizer is on. -def SanitizeThread : EnumAttr<"sanitize_thread">; - -/// MemorySanitizer is on. -def SanitizeMemory : EnumAttr<"sanitize_memory">; - -/// Argument is swift error. -def SwiftError : EnumAttr<"swifterror">; - -/// Argument is swift self/context. -def SwiftSelf : EnumAttr<"swiftself">; - -/// Function must be in a unwind table. -def UWTable : EnumAttr<"uwtable">; - -/// Function only writes to memory. -def WriteOnly : EnumAttr<"writeonly">; - -/// Zero extended before/after call. -def ZExt : EnumAttr<"zeroext">; - -/// Target-independent string attributes. -def LessPreciseFPMAD : StrBoolAttr<"less-precise-fpmad">; -def NoInfsFPMath : StrBoolAttr<"no-infs-fp-math">; -def NoNansFPMath : StrBoolAttr<"no-nans-fp-math">; -def UnsafeFPMath : StrBoolAttr<"unsafe-fp-math">; -def NoJumpTables : StrBoolAttr<"no-jump-tables">; - -class CompatRule { - // The name of the function called to check the attribute of the caller and - // callee and decide whether inlining should be allowed. The function's - // signature must match "bool(const Function&, const Function &)", where the - // first parameter is the reference to the caller and the second parameter is - // the reference to the callee. It must return false if the attributes of the - // caller and callee are incompatible, and true otherwise. - string CompatFunc = F; -} - -def : CompatRule<"isEqual">; -def : CompatRule<"isEqual">; -def : CompatRule<"isEqual">; -def : CompatRule<"isEqual">; - -class MergeRule { - // The name of the function called to merge the attributes of the caller and - // callee. The function's signature must match - // "void(Function&, const Function &)", where the first parameter is the - // reference to the caller and the second parameter is the reference to the - // callee. - string MergeFunc = F; -} - -def : MergeRule<"setAND">; -def : MergeRule<"setAND">; -def : MergeRule<"setAND">; -def : MergeRule<"setAND">; -def : MergeRule<"setOR">; -def : MergeRule<"setOR">; -def : MergeRule<"adjustCallerSSPLevel">; diff --git a/llvm/include/llvm/IR/AutoUpgrade.h b/llvm/include/llvm/IR/AutoUpgrade.h deleted file mode 100644 index 9eb35868..00000000 --- a/llvm/include/llvm/IR/AutoUpgrade.h +++ /dev/null @@ -1,82 +0,0 @@ -//===- AutoUpgrade.h - AutoUpgrade Helpers ----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// These functions are implemented by lib/IR/AutoUpgrade.cpp. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_AUTOUPGRADE_H -#define LLVM_IR_AUTOUPGRADE_H - -#include "llvm/ADT/StringRef.h" - -namespace llvm { - class CallInst; - class Constant; - class Function; - class Instruction; - class MDNode; - class Module; - class GlobalVariable; - class Type; - class Value; - - /// This is a more granular function that simply checks an intrinsic function - /// for upgrading, and returns true if it requires upgrading. It may return - /// null in NewFn if the all calls to the original intrinsic function - /// should be transformed to non-function-call instructions. - bool UpgradeIntrinsicFunction(Function *F, Function *&NewFn); - - /// This is the complement to the above, replacing a specific call to an - /// intrinsic function with a call to the specified new function. - void UpgradeIntrinsicCall(CallInst *CI, Function *NewFn); - - /// This is an auto-upgrade hook for any old intrinsic function syntaxes - /// which need to have both the function updated as well as all calls updated - /// to the new function. This should only be run in a post-processing fashion - /// so that it can update all calls to the old function. - void UpgradeCallsToIntrinsic(Function* F); - - /// This checks for global variables which should be upgraded. It returns true - /// if it requires upgrading. - bool UpgradeGlobalVariable(GlobalVariable *GV); - - /// This checks for module flags which should be upgraded. It returns true if - /// module is modified. - bool UpgradeModuleFlags(Module &M); - - /// If the TBAA tag for the given instruction uses the scalar TBAA format, - /// we upgrade it to the struct-path aware TBAA format. - void UpgradeInstWithTBAATag(Instruction *I); - - /// This is an auto-upgrade for bitcast between pointers with different - /// address spaces: the instruction is replaced by a pair ptrtoint+inttoptr. - Instruction *UpgradeBitCastInst(unsigned Opc, Value *V, Type *DestTy, - Instruction *&Temp); - - /// This is an auto-upgrade for bitcast constant expression between pointers - /// with different address spaces: the instruction is replaced by a pair - /// ptrtoint+inttoptr. - Value *UpgradeBitCastExpr(unsigned Opc, Constant *C, Type *DestTy); - - /// Check the debug info version number, if it is out-dated, drop the debug - /// info. Return true if module is modified. - bool UpgradeDebugInfo(Module &M); - - /// Check whether a string looks like an old loop attachment tag. - inline bool mayBeOldLoopAttachmentTag(StringRef Name) { - return Name.startswith("llvm.vectorizer."); - } - - /// Upgrade the loop attachment metadata node. - MDNode *upgradeInstructionLoopAttachment(MDNode &N); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/BasicBlock.h b/llvm/include/llvm/IR/BasicBlock.h deleted file mode 100644 index e7daf6ee..00000000 --- a/llvm/include/llvm/IR/BasicBlock.h +++ /dev/null @@ -1,349 +0,0 @@ -//===-- llvm/BasicBlock.h - Represent a basic block in the VM ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the BasicBlock class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_BASICBLOCK_H -#define LLVM_IR_BASICBLOCK_H - -#include "llvm/ADT/Twine.h" -#include "llvm/ADT/ilist.h" -#include "llvm/IR/Instruction.h" -#include "llvm/IR/SymbolTableListTraits.h" -#include "llvm/Support/CBindingWrapping.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - -class CallInst; -class LandingPadInst; -class TerminatorInst; -class LLVMContext; -class BlockAddress; -class Function; - -template <> -struct SymbolTableListSentinelTraits - : public ilist_half_embedded_sentinel_traits {}; - -/// \brief LLVM Basic Block Representation -/// -/// This represents a single basic block in LLVM. A basic block is simply a -/// container of instructions that execute sequentially. Basic blocks are Values -/// because they are referenced by instructions such as branches and switch -/// tables. The type of a BasicBlock is "Type::LabelTy" because the basic block -/// represents a label to which a branch can jump. -/// -/// A well formed basic block is formed of a list of non-terminating -/// instructions followed by a single TerminatorInst instruction. -/// TerminatorInst's may not occur in the middle of basic blocks, and must -/// terminate the blocks. The BasicBlock class allows malformed basic blocks to -/// occur because it may be useful in the intermediate stage of constructing or -/// modifying a program. However, the verifier will ensure that basic blocks -/// are "well formed". -class BasicBlock : public Value, // Basic blocks are data objects also - public ilist_node_with_parent { - friend class BlockAddress; -public: - typedef SymbolTableList InstListType; - -private: - InstListType InstList; - Function *Parent; - - void setParent(Function *parent); - friend class SymbolTableListTraits; - - BasicBlock(const BasicBlock &) = delete; - void operator=(const BasicBlock &) = delete; - - /// \brief Constructor. - /// - /// If the function parameter is specified, the basic block is automatically - /// inserted at either the end of the function (if InsertBefore is null), or - /// before the specified basic block. - explicit BasicBlock(LLVMContext &C, const Twine &Name = "", - Function *Parent = nullptr, - BasicBlock *InsertBefore = nullptr); -public: - /// \brief Get the context in which this basic block lives. - LLVMContext &getContext() const; - - /// Instruction iterators... - typedef InstListType::iterator iterator; - typedef InstListType::const_iterator const_iterator; - typedef InstListType::reverse_iterator reverse_iterator; - typedef InstListType::const_reverse_iterator const_reverse_iterator; - - /// \brief Creates a new BasicBlock. - /// - /// If the Parent parameter is specified, the basic block is automatically - /// inserted at either the end of the function (if InsertBefore is 0), or - /// before the specified basic block. - static BasicBlock *Create(LLVMContext &Context, const Twine &Name = "", - Function *Parent = nullptr, - BasicBlock *InsertBefore = nullptr) { - return new BasicBlock(Context, Name, Parent, InsertBefore); - } - ~BasicBlock() override; - - /// \brief Return the enclosing method, or null if none. - const Function *getParent() const { return Parent; } - Function *getParent() { return Parent; } - - /// \brief Return the module owning the function this basic block belongs to, - /// or nullptr it the function does not have a module. - /// - /// Note: this is undefined behavior if the block does not have a parent. - const Module *getModule() const; - Module *getModule(); - - /// \brief Returns the terminator instruction if the block is well formed or - /// null if the block is not well formed. - TerminatorInst *getTerminator(); - const TerminatorInst *getTerminator() const; - - /// \brief Returns the call instruction calling @llvm.experimental.deoptimize - /// prior to the terminating return instruction of this basic block, if such a - /// call is present. Otherwise, returns null. - CallInst *getTerminatingDeoptimizeCall(); - const CallInst *getTerminatingDeoptimizeCall() const { - return const_cast(this)->getTerminatingDeoptimizeCall(); - } - - /// \brief Returns the call instruction marked 'musttail' prior to the - /// terminating return instruction of this basic block, if such a call is - /// present. Otherwise, returns null. - CallInst *getTerminatingMustTailCall(); - const CallInst *getTerminatingMustTailCall() const { - return const_cast(this)->getTerminatingMustTailCall(); - } - - /// \brief Returns a pointer to the first instruction in this block that is - /// not a PHINode instruction. - /// - /// When adding instructions to the beginning of the basic block, they should - /// be added before the returned value, not before the first instruction, - /// which might be PHI. Returns 0 is there's no non-PHI instruction. - Instruction* getFirstNonPHI(); - const Instruction* getFirstNonPHI() const { - return const_cast(this)->getFirstNonPHI(); - } - - /// \brief Returns a pointer to the first instruction in this block that is not - /// a PHINode or a debug intrinsic. - Instruction* getFirstNonPHIOrDbg(); - const Instruction* getFirstNonPHIOrDbg() const { - return const_cast(this)->getFirstNonPHIOrDbg(); - } - - /// \brief Returns a pointer to the first instruction in this block that is not - /// a PHINode, a debug intrinsic, or a lifetime intrinsic. - Instruction* getFirstNonPHIOrDbgOrLifetime(); - const Instruction* getFirstNonPHIOrDbgOrLifetime() const { - return const_cast(this)->getFirstNonPHIOrDbgOrLifetime(); - } - - /// \brief Returns an iterator to the first instruction in this block that is - /// suitable for inserting a non-PHI instruction. - /// - /// In particular, it skips all PHIs and LandingPad instructions. - iterator getFirstInsertionPt(); - const_iterator getFirstInsertionPt() const { - return const_cast(this)->getFirstInsertionPt(); - } - - /// \brief Unlink 'this' from the containing function, but do not delete it. - void removeFromParent(); - - /// \brief Unlink 'this' from the containing function and delete it. - /// - // \returns an iterator pointing to the element after the erased one. - SymbolTableList::iterator eraseFromParent(); - - /// \brief Unlink this basic block from its current function and insert it - /// into the function that \p MovePos lives in, right before \p MovePos. - void moveBefore(BasicBlock *MovePos); - - /// \brief Unlink this basic block from its current function and insert it - /// right after \p MovePos in the function \p MovePos lives in. - void moveAfter(BasicBlock *MovePos); - - /// \brief Insert unlinked basic block into a function. - /// - /// Inserts an unlinked basic block into \c Parent. If \c InsertBefore is - /// provided, inserts before that basic block, otherwise inserts at the end. - /// - /// \pre \a getParent() is \c nullptr. - void insertInto(Function *Parent, BasicBlock *InsertBefore = nullptr); - - /// \brief Return the predecessor of this block if it has a single predecessor - /// block. Otherwise return a null pointer. - BasicBlock *getSinglePredecessor(); - const BasicBlock *getSinglePredecessor() const { - return const_cast(this)->getSinglePredecessor(); - } - - /// \brief Return the predecessor of this block if it has a unique predecessor - /// block. Otherwise return a null pointer. - /// - /// Note that unique predecessor doesn't mean single edge, there can be - /// multiple edges from the unique predecessor to this block (for example a - /// switch statement with multiple cases having the same destination). - BasicBlock *getUniquePredecessor(); - const BasicBlock *getUniquePredecessor() const { - return const_cast(this)->getUniquePredecessor(); - } - - /// \brief Return the successor of this block if it has a single successor. - /// Otherwise return a null pointer. - /// - /// This method is analogous to getSinglePredecessor above. - BasicBlock *getSingleSuccessor(); - const BasicBlock *getSingleSuccessor() const { - return const_cast(this)->getSingleSuccessor(); - } - - /// \brief Return the successor of this block if it has a unique successor. - /// Otherwise return a null pointer. - /// - /// This method is analogous to getUniquePredecessor above. - BasicBlock *getUniqueSuccessor(); - const BasicBlock *getUniqueSuccessor() const { - return const_cast(this)->getUniqueSuccessor(); - } - - //===--------------------------------------------------------------------===// - /// Instruction iterator methods - /// - inline iterator begin() { return InstList.begin(); } - inline const_iterator begin() const { return InstList.begin(); } - inline iterator end () { return InstList.end(); } - inline const_iterator end () const { return InstList.end(); } - - inline reverse_iterator rbegin() { return InstList.rbegin(); } - inline const_reverse_iterator rbegin() const { return InstList.rbegin(); } - inline reverse_iterator rend () { return InstList.rend(); } - inline const_reverse_iterator rend () const { return InstList.rend(); } - - inline size_t size() const { return InstList.size(); } - inline bool empty() const { return InstList.empty(); } - inline const Instruction &front() const { return InstList.front(); } - inline Instruction &front() { return InstList.front(); } - inline const Instruction &back() const { return InstList.back(); } - inline Instruction &back() { return InstList.back(); } - - /// \brief Return the underlying instruction list container. - /// - /// Currently you need to access the underlying instruction list container - /// directly if you want to modify it. - const InstListType &getInstList() const { return InstList; } - InstListType &getInstList() { return InstList; } - - /// \brief Returns a pointer to a member of the instruction list. - static InstListType BasicBlock::*getSublistAccess(Instruction*) { - return &BasicBlock::InstList; - } - - /// \brief Returns a pointer to the symbol table if one exists. - ValueSymbolTable *getValueSymbolTable(); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Value *V) { - return V->getValueID() == Value::BasicBlockVal; - } - - /// \brief Cause all subinstructions to "let go" of all the references that - /// said subinstructions are maintaining. - /// - /// This allows one to 'delete' a whole class at a time, even though there may - /// be circular references... first all references are dropped, and all use - /// counts go to zero. Then everything is delete'd for real. Note that no - /// operations are valid on an object that has "dropped all references", - /// except operator delete. - void dropAllReferences(); - - /// \brief Notify the BasicBlock that the predecessor \p Pred is no longer - /// able to reach it. - /// - /// This is actually not used to update the Predecessor list, but is actually - /// used to update the PHI nodes that reside in the block. Note that this - /// should be called while the predecessor still refers to this block. - void removePredecessor(BasicBlock *Pred, bool DontDeleteUselessPHIs = false); - - bool canSplitPredecessors() const; - - /// \brief Split the basic block into two basic blocks at the specified - /// instruction. - /// - /// Note that all instructions BEFORE the specified iterator stay as part of - /// the original basic block, an unconditional branch is added to the original - /// BB, and the rest of the instructions in the BB are moved to the new BB, - /// including the old terminator. The newly formed BasicBlock is returned. - /// This function invalidates the specified iterator. - /// - /// Note that this only works on well formed basic blocks (must have a - /// terminator), and 'I' must not be the end of instruction list (which would - /// cause a degenerate basic block to be formed, having a terminator inside of - /// the basic block). - /// - /// Also note that this doesn't preserve any passes. To split blocks while - /// keeping loop information consistent, use the SplitBlock utility function. - BasicBlock *splitBasicBlock(iterator I, const Twine &BBName = ""); - BasicBlock *splitBasicBlock(Instruction *I, const Twine &BBName = "") { - return splitBasicBlock(I->getIterator(), BBName); - } - - /// \brief Returns true if there are any uses of this basic block other than - /// direct branches, switches, etc. to it. - bool hasAddressTaken() const { return getSubclassDataFromValue() != 0; } - - /// \brief Update all phi nodes in this basic block's successors to refer to - /// basic block \p New instead of to it. - void replaceSuccessorsPhiUsesWith(BasicBlock *New); - - /// \brief Return true if this basic block is an exception handling block. - bool isEHPad() const { return getFirstNonPHI()->isEHPad(); } - - /// \brief Return true if this basic block is a landing pad. - /// - /// Being a ``landing pad'' means that the basic block is the destination of - /// the 'unwind' edge of an invoke instruction. - bool isLandingPad() const; - - /// \brief Return the landingpad instruction associated with the landing pad. - LandingPadInst *getLandingPadInst(); - const LandingPadInst *getLandingPadInst() const; - -private: - /// \brief Increment the internal refcount of the number of BlockAddresses - /// referencing this BasicBlock by \p Amt. - /// - /// This is almost always 0, sometimes one possibly, but almost never 2, and - /// inconceivably 3 or more. - void AdjustBlockAddressRefCount(int Amt) { - setValueSubclassData(getSubclassDataFromValue()+Amt); - assert((int)(signed char)getSubclassDataFromValue() >= 0 && - "Refcount wrap-around"); - } - /// \brief Shadow Value::setValueSubclassData with a private forwarding method - /// so that any future subclasses cannot accidentally use it. - void setValueSubclassData(unsigned short D) { - Value::setValueSubclassData(D); - } -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_SIMPLE_CONVERSION_FUNCTIONS(BasicBlock, LLVMBasicBlockRef) - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/CFG.h b/llvm/include/llvm/IR/CFG.h deleted file mode 100644 index a256b596..00000000 --- a/llvm/include/llvm/IR/CFG.h +++ /dev/null @@ -1,269 +0,0 @@ -//===- CFG.h - Process LLVM structures as graphs ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines specializations of GraphTraits that allow Function and -// BasicBlock graphs to be treated as proper graphs for generic algorithms. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_CFG_H -#define LLVM_IR_CFG_H - -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/InstrTypes.h" - -namespace llvm { - -//===----------------------------------------------------------------------===// -// BasicBlock pred_iterator definition -//===----------------------------------------------------------------------===// - -template // Predecessor Iterator -class PredIterator : public std::iterator { - typedef std::iterator super; - typedef PredIterator Self; - USE_iterator It; - - inline void advancePastNonTerminators() { - // Loop to ignore non-terminator uses (for example BlockAddresses). - while (!It.atEnd() && !isa(*It)) - ++It; - } - -public: - typedef typename super::pointer pointer; - typedef typename super::reference reference; - - PredIterator() {} - explicit inline PredIterator(Ptr *bb) : It(bb->user_begin()) { - advancePastNonTerminators(); - } - inline PredIterator(Ptr *bb, bool) : It(bb->user_end()) {} - - inline bool operator==(const Self& x) const { return It == x.It; } - inline bool operator!=(const Self& x) const { return !operator==(x); } - - inline reference operator*() const { - assert(!It.atEnd() && "pred_iterator out of range!"); - return cast(*It)->getParent(); - } - inline pointer *operator->() const { return &operator*(); } - - inline Self& operator++() { // Preincrement - assert(!It.atEnd() && "pred_iterator out of range!"); - ++It; advancePastNonTerminators(); - return *this; - } - - inline Self operator++(int) { // Postincrement - Self tmp = *this; ++*this; return tmp; - } - - /// getOperandNo - Return the operand number in the predecessor's - /// terminator of the successor. - unsigned getOperandNo() const { - return It.getOperandNo(); - } - - /// getUse - Return the operand Use in the predecessor's terminator - /// of the successor. - Use &getUse() const { - return It.getUse(); - } -}; - -typedef PredIterator pred_iterator; -typedef PredIterator const_pred_iterator; -typedef llvm::iterator_range pred_range; -typedef llvm::iterator_range pred_const_range; - -inline pred_iterator pred_begin(BasicBlock *BB) { return pred_iterator(BB); } -inline const_pred_iterator pred_begin(const BasicBlock *BB) { - return const_pred_iterator(BB); -} -inline pred_iterator pred_end(BasicBlock *BB) { return pred_iterator(BB, true);} -inline const_pred_iterator pred_end(const BasicBlock *BB) { - return const_pred_iterator(BB, true); -} -inline bool pred_empty(const BasicBlock *BB) { - return pred_begin(BB) == pred_end(BB); -} -inline pred_range predecessors(BasicBlock *BB) { - return pred_range(pred_begin(BB), pred_end(BB)); -} -inline pred_const_range predecessors(const BasicBlock *BB) { - return pred_const_range(pred_begin(BB), pred_end(BB)); -} - -//===----------------------------------------------------------------------===// -// BasicBlock succ_iterator helpers -//===----------------------------------------------------------------------===// - -typedef TerminatorInst::SuccIterator - succ_iterator; -typedef TerminatorInst::SuccIterator - succ_const_iterator; -typedef llvm::iterator_range succ_range; -typedef llvm::iterator_range succ_const_range; - -inline succ_iterator succ_begin(BasicBlock *BB) { - return succ_iterator(BB->getTerminator()); -} -inline succ_const_iterator succ_begin(const BasicBlock *BB) { - return succ_const_iterator(BB->getTerminator()); -} -inline succ_iterator succ_end(BasicBlock *BB) { - return succ_iterator(BB->getTerminator(), true); -} -inline succ_const_iterator succ_end(const BasicBlock *BB) { - return succ_const_iterator(BB->getTerminator(), true); -} -inline bool succ_empty(const BasicBlock *BB) { - return succ_begin(BB) == succ_end(BB); -} -inline succ_range successors(BasicBlock *BB) { - return succ_range(succ_begin(BB), succ_end(BB)); -} -inline succ_const_range successors(const BasicBlock *BB) { - return succ_const_range(succ_begin(BB), succ_end(BB)); -} - -template -struct isPodLike> { - static const bool value = isPodLike::value; -}; - - - -//===--------------------------------------------------------------------===// -// GraphTraits specializations for basic block graphs (CFGs) -//===--------------------------------------------------------------------===// - -// Provide specializations of GraphTraits to be able to treat a function as a -// graph of basic blocks... - -template <> struct GraphTraits { - typedef BasicBlock NodeType; - typedef BasicBlock *NodeRef; - typedef succ_iterator ChildIteratorType; - - static NodeType *getEntryNode(BasicBlock *BB) { return BB; } - static inline ChildIteratorType child_begin(NodeType *N) { - return succ_begin(N); - } - static inline ChildIteratorType child_end(NodeType *N) { - return succ_end(N); - } -}; - -template <> struct GraphTraits { - typedef const BasicBlock NodeType; - typedef const BasicBlock *NodeRef; - typedef succ_const_iterator ChildIteratorType; - - static NodeType *getEntryNode(const BasicBlock *BB) { return BB; } - - static inline ChildIteratorType child_begin(NodeType *N) { - return succ_begin(N); - } - static inline ChildIteratorType child_end(NodeType *N) { - return succ_end(N); - } -}; - -// Provide specializations of GraphTraits to be able to treat a function as a -// graph of basic blocks... and to walk it in inverse order. Inverse order for -// a function is considered to be when traversing the predecessor edges of a BB -// instead of the successor edges. -// -template <> struct GraphTraits > { - typedef BasicBlock NodeType; - typedef BasicBlock *NodeRef; - typedef pred_iterator ChildIteratorType; - static NodeType *getEntryNode(Inverse G) { return G.Graph; } - static inline ChildIteratorType child_begin(NodeType *N) { - return pred_begin(N); - } - static inline ChildIteratorType child_end(NodeType *N) { - return pred_end(N); - } -}; - -template <> struct GraphTraits > { - typedef const BasicBlock NodeType; - typedef const BasicBlock *NodeRef; - typedef const_pred_iterator ChildIteratorType; - static NodeType *getEntryNode(Inverse G) { - return G.Graph; - } - static inline ChildIteratorType child_begin(NodeType *N) { - return pred_begin(N); - } - static inline ChildIteratorType child_end(NodeType *N) { - return pred_end(N); - } -}; - - - -//===--------------------------------------------------------------------===// -// GraphTraits specializations for function basic block graphs (CFGs) -//===--------------------------------------------------------------------===// - -// Provide specializations of GraphTraits to be able to treat a function as a -// graph of basic blocks... these are the same as the basic block iterators, -// except that the root node is implicitly the first node of the function. -// -template <> struct GraphTraits : public GraphTraits { - static NodeType *getEntryNode(Function *F) { return &F->getEntryBlock(); } - - // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - typedef Function::iterator nodes_iterator; - static nodes_iterator nodes_begin(Function *F) { return F->begin(); } - static nodes_iterator nodes_end (Function *F) { return F->end(); } - static size_t size (Function *F) { return F->size(); } -}; -template <> struct GraphTraits : - public GraphTraits { - static NodeType *getEntryNode(const Function *F) {return &F->getEntryBlock();} - - // nodes_iterator/begin/end - Allow iteration over all nodes in the graph - typedef Function::const_iterator nodes_iterator; - static nodes_iterator nodes_begin(const Function *F) { return F->begin(); } - static nodes_iterator nodes_end (const Function *F) { return F->end(); } - static size_t size (const Function *F) { return F->size(); } -}; - - -// Provide specializations of GraphTraits to be able to treat a function as a -// graph of basic blocks... and to walk it in inverse order. Inverse order for -// a function is considered to be when traversing the predecessor edges of a BB -// instead of the successor edges. -// -template <> struct GraphTraits > : - public GraphTraits > { - static NodeType *getEntryNode(Inverse G) { - return &G.Graph->getEntryBlock(); - } -}; -template <> struct GraphTraits > : - public GraphTraits > { - static NodeType *getEntryNode(Inverse G) { - return &G.Graph->getEntryBlock(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/CallSite.h b/llvm/include/llvm/IR/CallSite.h deleted file mode 100644 index 9c977aef..00000000 --- a/llvm/include/llvm/IR/CallSite.h +++ /dev/null @@ -1,635 +0,0 @@ -//===- CallSite.h - Abstract Call & Invoke instrs ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the CallSite class, which is a handy wrapper for code that -// wants to treat Call and Invoke instructions in a generic way. When in non- -// mutation context (e.g. an analysis) ImmutableCallSite should be used. -// Finally, when some degree of customization is necessary between these two -// extremes, CallSiteBase<> can be supplied with fine-tuned parameters. -// -// NOTE: These classes are supposed to have "value semantics". So they should be -// passed by value, not by reference; they should not be "new"ed or "delete"d. -// They are efficiently copyable, assignable and constructable, with cost -// equivalent to copying a pointer (notice that they have only a single data -// member). The internal representation carries a flag which indicates which of -// the two variants is enclosed. This allows for cheaper checks when various -// accessors of CallSite are employed. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_CALLSITE_H -#define LLVM_IR_CALLSITE_H - -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/Attributes.h" -#include "llvm/IR/CallingConv.h" -#include "llvm/IR/Instructions.h" - -namespace llvm { - -class CallInst; -class InvokeInst; - -template -class CallSiteBase { -protected: - PointerIntPair I; - - CallSiteBase() : I(nullptr, false) {} - CallSiteBase(CallTy *CI) : I(CI, true) { assert(CI); } - CallSiteBase(InvokeTy *II) : I(II, false) { assert(II); } - explicit CallSiteBase(ValTy *II) { *this = get(II); } - -private: - /// CallSiteBase::get - This static method is sort of like a constructor. It - /// will create an appropriate call site for a Call or Invoke instruction, but - /// it can also create a null initialized CallSiteBase object for something - /// which is NOT a call site. - /// - static CallSiteBase get(ValTy *V) { - if (InstrTy *II = dyn_cast(V)) { - if (II->getOpcode() == Instruction::Call) - return CallSiteBase(static_cast(II)); - else if (II->getOpcode() == Instruction::Invoke) - return CallSiteBase(static_cast(II)); - } - return CallSiteBase(); - } - -public: - /// isCall - true if a CallInst is enclosed. - /// Note that !isCall() does not mean it is an InvokeInst enclosed, - /// it also could signify a NULL Instruction pointer. - bool isCall() const { return I.getInt(); } - - /// isInvoke - true if a InvokeInst is enclosed. - /// - bool isInvoke() const { return getInstruction() && !I.getInt(); } - - InstrTy *getInstruction() const { return I.getPointer(); } - InstrTy *operator->() const { return I.getPointer(); } - explicit operator bool() const { return I.getPointer(); } - - /// Get the basic block containing the call site - BBTy* getParent() const { return getInstruction()->getParent(); } - - /// getCalledValue - Return the pointer to function that is being called. - /// - ValTy *getCalledValue() const { - assert(getInstruction() && "Not a call or invoke instruction!"); - return *getCallee(); - } - - /// getCalledFunction - Return the function being called if this is a direct - /// call, otherwise return null (if it's an indirect call). - /// - FunTy *getCalledFunction() const { - return dyn_cast(getCalledValue()); - } - - /// setCalledFunction - Set the callee to the specified value. - /// - void setCalledFunction(Value *V) { - assert(getInstruction() && "Not a call or invoke instruction!"); - *getCallee() = V; - } - - /// isCallee - Determine whether the passed iterator points to the - /// callee operand's Use. - bool isCallee(Value::const_user_iterator UI) const { - return isCallee(&UI.getUse()); - } - - /// Determine whether this Use is the callee operand's Use. - bool isCallee(const Use *U) const { return getCallee() == U; } - - /// \brief Determine whether the passed iterator points to an argument - /// operand. - bool isArgOperand(Value::const_user_iterator UI) const { - return isArgOperand(&UI.getUse()); - } - - /// \brief Determine whether the passed use points to an argument operand. - bool isArgOperand(const Use *U) const { - assert(getInstruction() == U->getUser()); - return arg_begin() <= U && U < arg_end(); - } - - /// \brief Determine whether the passed iterator points to a bundle operand. - bool isBundleOperand(Value::const_user_iterator UI) const { - return isBundleOperand(&UI.getUse()); - } - - /// \brief Determine whether the passed use points to a bundle operand. - bool isBundleOperand(const Use *U) const { - assert(getInstruction() == U->getUser()); - if (!hasOperandBundles()) - return false; - unsigned OperandNo = U - (*this)->op_begin(); - return getBundleOperandsStartIndex() <= OperandNo && - OperandNo < getBundleOperandsEndIndex(); - } - - /// \brief Determine whether the passed iterator points to a data operand. - bool isDataOperand(Value::const_user_iterator UI) const { - return isDataOperand(&UI.getUse()); - } - - /// \brief Determine whether the passed use points to a data operand. - bool isDataOperand(const Use *U) const { - return data_operands_begin() <= U && U < data_operands_end(); - } - - ValTy *getArgument(unsigned ArgNo) const { - assert(arg_begin() + ArgNo < arg_end() && "Argument # out of range!"); - return *(arg_begin() + ArgNo); - } - - void setArgument(unsigned ArgNo, Value* newVal) { - assert(getInstruction() && "Not a call or invoke instruction!"); - assert(arg_begin() + ArgNo < arg_end() && "Argument # out of range!"); - getInstruction()->setOperand(ArgNo, newVal); - } - - /// Given a value use iterator, returns the argument that corresponds to it. - /// Iterator must actually correspond to an argument. - unsigned getArgumentNo(Value::const_user_iterator I) const { - return getArgumentNo(&I.getUse()); - } - - /// Given a use for an argument, get the argument number that corresponds to - /// it. - unsigned getArgumentNo(const Use *U) const { - assert(getInstruction() && "Not a call or invoke instruction!"); - assert(isArgOperand(U) && "Argument # out of range!"); - return U - arg_begin(); - } - - /// arg_iterator - The type of iterator to use when looping over actual - /// arguments at this call site. - typedef IterTy arg_iterator; - - iterator_range args() const { - return make_range(arg_begin(), arg_end()); - } - bool arg_empty() const { return arg_end() == arg_begin(); } - unsigned arg_size() const { return unsigned(arg_end() - arg_begin()); } - - /// Given a value use iterator, returns the data operand that corresponds to - /// it. - /// Iterator must actually correspond to a data operand. - unsigned getDataOperandNo(Value::const_user_iterator UI) const { - return getDataOperandNo(&UI.getUse()); - } - - /// Given a use for a data operand, get the data operand number that - /// corresponds to it. - unsigned getDataOperandNo(const Use *U) const { - assert(getInstruction() && "Not a call or invoke instruction!"); - assert(isDataOperand(U) && "Data operand # out of range!"); - return U - data_operands_begin(); - } - - /// Type of iterator to use when looping over data operands at this call site - /// (see below). - typedef IterTy data_operand_iterator; - - /// data_operands_begin/data_operands_end - Return iterators iterating over - /// the call / invoke argument list and bundle operands. For invokes, this is - /// the set of instruction operands except the invoke target and the two - /// successor blocks; and for calls this is the set of instruction operands - /// except the call target. - - IterTy data_operands_begin() const { - assert(getInstruction() && "Not a call or invoke instruction!"); - return (*this)->op_begin(); - } - IterTy data_operands_end() const { - assert(getInstruction() && "Not a call or invoke instruction!"); - return (*this)->op_end() - (isCall() ? 1 : 3); - } - iterator_range data_ops() const { - return make_range(data_operands_begin(), data_operands_end()); - } - bool data_operands_empty() const { - return data_operands_end() == data_operands_begin(); - } - unsigned data_operands_size() const { - return std::distance(data_operands_begin(), data_operands_end()); - } - - /// getType - Return the type of the instruction that generated this call site - /// - Type *getType() const { return (*this)->getType(); } - - /// getCaller - Return the caller function for this call site - /// - FunTy *getCaller() const { return (*this)->getParent()->getParent(); } - - /// \brief Tests if this call site must be tail call optimized. Only a - /// CallInst can be tail call optimized. - bool isMustTailCall() const { - return isCall() && cast(getInstruction())->isMustTailCall(); - } - - /// \brief Tests if this call site is marked as a tail call. - bool isTailCall() const { - return isCall() && cast(getInstruction())->isTailCall(); - } - -#define CALLSITE_DELEGATE_GETTER(METHOD) \ - InstrTy *II = getInstruction(); \ - return isCall() \ - ? cast(II)->METHOD \ - : cast(II)->METHOD - -#define CALLSITE_DELEGATE_SETTER(METHOD) \ - InstrTy *II = getInstruction(); \ - if (isCall()) \ - cast(II)->METHOD; \ - else \ - cast(II)->METHOD - - unsigned getNumArgOperands() const { - CALLSITE_DELEGATE_GETTER(getNumArgOperands()); - } - - ValTy *getArgOperand(unsigned i) const { - CALLSITE_DELEGATE_GETTER(getArgOperand(i)); - } - - ValTy *getReturnedArgOperand() const { - CALLSITE_DELEGATE_GETTER(getReturnedArgOperand()); - } - - bool isInlineAsm() const { - if (isCall()) - return cast(getInstruction())->isInlineAsm(); - return false; - } - - /// getCallingConv/setCallingConv - get or set the calling convention of the - /// call. - CallingConv::ID getCallingConv() const { - CALLSITE_DELEGATE_GETTER(getCallingConv()); - } - void setCallingConv(CallingConv::ID CC) { - CALLSITE_DELEGATE_SETTER(setCallingConv(CC)); - } - - FunctionType *getFunctionType() const { - CALLSITE_DELEGATE_GETTER(getFunctionType()); - } - - void mutateFunctionType(FunctionType *Ty) const { - CALLSITE_DELEGATE_SETTER(mutateFunctionType(Ty)); - } - - /// getAttributes/setAttributes - get or set the parameter attributes of - /// the call. - const AttributeSet &getAttributes() const { - CALLSITE_DELEGATE_GETTER(getAttributes()); - } - void setAttributes(const AttributeSet &PAL) { - CALLSITE_DELEGATE_SETTER(setAttributes(PAL)); - } - - void addAttribute(unsigned i, Attribute::AttrKind Kind) { - CALLSITE_DELEGATE_SETTER(addAttribute(i, Kind)); - } - - void addAttribute(unsigned i, StringRef Kind, StringRef Value) { - CALLSITE_DELEGATE_SETTER(addAttribute(i, Kind, Value)); - } - - void addAttribute(unsigned i, Attribute Attr) { - CALLSITE_DELEGATE_SETTER(addAttribute(i, Attr)); - } - - void removeAttribute(unsigned i, Attribute::AttrKind Kind) { - CALLSITE_DELEGATE_SETTER(removeAttribute(i, Kind)); - } - - void removeAttribute(unsigned i, StringRef Kind) { - CALLSITE_DELEGATE_SETTER(removeAttribute(i, Kind)); - } - - void removeAttribute(unsigned i, Attribute Attr) { - CALLSITE_DELEGATE_SETTER(removeAttribute(i, Attr)); - } - - /// \brief Return true if this function has the given attribute. - bool hasFnAttr(Attribute::AttrKind Kind) const { - CALLSITE_DELEGATE_GETTER(hasFnAttr(Kind)); - } - - /// \brief Return true if this function has the given attribute. - bool hasFnAttr(StringRef Kind) const { - CALLSITE_DELEGATE_GETTER(hasFnAttr(Kind)); - } - - /// \brief Return true if the call or the callee has the given attribute. - bool paramHasAttr(unsigned i, Attribute::AttrKind Kind) const { - CALLSITE_DELEGATE_GETTER(paramHasAttr(i, Kind)); - } - - Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const { - CALLSITE_DELEGATE_GETTER(getAttribute(i, Kind)); - } - - Attribute getAttribute(unsigned i, StringRef Kind) const { - CALLSITE_DELEGATE_GETTER(getAttribute(i, Kind)); - } - - /// \brief Return true if the data operand at index \p i directly or - /// indirectly has the attribute \p A. - /// - /// Normal call or invoke arguments have per operand attributes, as specified - /// in the attribute set attached to this instruction, while operand bundle - /// operands may have some attributes implied by the type of its containing - /// operand bundle. - bool dataOperandHasImpliedAttr(unsigned i, Attribute::AttrKind Kind) const { - CALLSITE_DELEGATE_GETTER(dataOperandHasImpliedAttr(i, Kind)); - } - - /// @brief Extract the alignment for a call or parameter (0=unknown). - uint16_t getParamAlignment(uint16_t i) const { - CALLSITE_DELEGATE_GETTER(getParamAlignment(i)); - } - - /// @brief Extract the number of dereferenceable bytes for a call or - /// parameter (0=unknown). - uint64_t getDereferenceableBytes(uint16_t i) const { - CALLSITE_DELEGATE_GETTER(getDereferenceableBytes(i)); - } - - /// @brief Extract the number of dereferenceable_or_null bytes for a call or - /// parameter (0=unknown). - uint64_t getDereferenceableOrNullBytes(uint16_t i) const { - CALLSITE_DELEGATE_GETTER(getDereferenceableOrNullBytes(i)); - } - - /// @brief Determine if the parameter or return value is marked with NoAlias - /// attribute. - /// @param n The parameter to check. 1 is the first parameter, 0 is the return - bool doesNotAlias(unsigned n) const { - CALLSITE_DELEGATE_GETTER(doesNotAlias(n)); - } - - /// \brief Return true if the call should not be treated as a call to a - /// builtin. - bool isNoBuiltin() const { - CALLSITE_DELEGATE_GETTER(isNoBuiltin()); - } - - /// @brief Return true if the call should not be inlined. - bool isNoInline() const { - CALLSITE_DELEGATE_GETTER(isNoInline()); - } - void setIsNoInline(bool Value = true) { - CALLSITE_DELEGATE_SETTER(setIsNoInline(Value)); - } - - /// @brief Determine if the call does not access memory. - bool doesNotAccessMemory() const { - CALLSITE_DELEGATE_GETTER(doesNotAccessMemory()); - } - void setDoesNotAccessMemory() { - CALLSITE_DELEGATE_SETTER(setDoesNotAccessMemory()); - } - - /// @brief Determine if the call does not access or only reads memory. - bool onlyReadsMemory() const { - CALLSITE_DELEGATE_GETTER(onlyReadsMemory()); - } - void setOnlyReadsMemory() { - CALLSITE_DELEGATE_SETTER(setOnlyReadsMemory()); - } - - /// @brief Determine if the call does not access or only writes memory. - bool doesNotReadMemory() const { - CALLSITE_DELEGATE_GETTER(doesNotReadMemory()); - } - void setDoesNotReadMemory() { - CALLSITE_DELEGATE_SETTER(setDoesNotReadMemory()); - } - - /// @brief Determine if the call can access memmory only using pointers based - /// on its arguments. - bool onlyAccessesArgMemory() const { - CALLSITE_DELEGATE_GETTER(onlyAccessesArgMemory()); - } - void setOnlyAccessesArgMemory() { - CALLSITE_DELEGATE_SETTER(setOnlyAccessesArgMemory()); - } - - /// @brief Determine if the call cannot return. - bool doesNotReturn() const { - CALLSITE_DELEGATE_GETTER(doesNotReturn()); - } - void setDoesNotReturn() { - CALLSITE_DELEGATE_SETTER(setDoesNotReturn()); - } - - /// @brief Determine if the call cannot unwind. - bool doesNotThrow() const { - CALLSITE_DELEGATE_GETTER(doesNotThrow()); - } - void setDoesNotThrow() { - CALLSITE_DELEGATE_SETTER(setDoesNotThrow()); - } - - /// @brief Determine if the call can be duplicated. - bool cannotDuplicate() const { - CALLSITE_DELEGATE_GETTER(cannotDuplicate()); - } - void setCannotDuplicate() { - CALLSITE_DELEGATE_GETTER(setCannotDuplicate()); - } - - /// @brief Determine if the call is convergent. - bool isConvergent() const { - CALLSITE_DELEGATE_GETTER(isConvergent()); - } - void setConvergent() { - CALLSITE_DELEGATE_SETTER(setConvergent()); - } - void setNotConvergent() { - CALLSITE_DELEGATE_SETTER(setNotConvergent()); - } - - unsigned getNumOperandBundles() const { - CALLSITE_DELEGATE_GETTER(getNumOperandBundles()); - } - - bool hasOperandBundles() const { - CALLSITE_DELEGATE_GETTER(hasOperandBundles()); - } - - unsigned getBundleOperandsStartIndex() const { - CALLSITE_DELEGATE_GETTER(getBundleOperandsStartIndex()); - } - - unsigned getBundleOperandsEndIndex() const { - CALLSITE_DELEGATE_GETTER(getBundleOperandsEndIndex()); - } - - unsigned getNumTotalBundleOperands() const { - CALLSITE_DELEGATE_GETTER(getNumTotalBundleOperands()); - } - - OperandBundleUse getOperandBundleAt(unsigned Index) const { - CALLSITE_DELEGATE_GETTER(getOperandBundleAt(Index)); - } - - Optional getOperandBundle(StringRef Name) const { - CALLSITE_DELEGATE_GETTER(getOperandBundle(Name)); - } - - Optional getOperandBundle(uint32_t ID) const { - CALLSITE_DELEGATE_GETTER(getOperandBundle(ID)); - } - - unsigned countOperandBundlesOfType(uint32_t ID) const { - CALLSITE_DELEGATE_GETTER(countOperandBundlesOfType(ID)); - } - - IterTy arg_begin() const { - CALLSITE_DELEGATE_GETTER(arg_begin()); - } - - IterTy arg_end() const { - CALLSITE_DELEGATE_GETTER(arg_end()); - } - -#undef CALLSITE_DELEGATE_GETTER -#undef CALLSITE_DELEGATE_SETTER - - void getOperandBundlesAsDefs(SmallVectorImpl &Defs) const { - const Instruction *II = getInstruction(); - // Since this is actually a getter that "looks like" a setter, don't use the - // above macros to avoid confusion. - if (isCall()) - cast(II)->getOperandBundlesAsDefs(Defs); - else - cast(II)->getOperandBundlesAsDefs(Defs); - } - - /// @brief Determine whether this data operand is not captured. - bool doesNotCapture(unsigned OpNo) const { - return dataOperandHasImpliedAttr(OpNo + 1, Attribute::NoCapture); - } - - /// @brief Determine whether this argument is passed by value. - bool isByValArgument(unsigned ArgNo) const { - return paramHasAttr(ArgNo + 1, Attribute::ByVal); - } - - /// @brief Determine whether this argument is passed in an alloca. - bool isInAllocaArgument(unsigned ArgNo) const { - return paramHasAttr(ArgNo + 1, Attribute::InAlloca); - } - - /// @brief Determine whether this argument is passed by value or in an alloca. - bool isByValOrInAllocaArgument(unsigned ArgNo) const { - return paramHasAttr(ArgNo + 1, Attribute::ByVal) || - paramHasAttr(ArgNo + 1, Attribute::InAlloca); - } - - /// @brief Determine if there are is an inalloca argument. Only the last - /// argument can have the inalloca attribute. - bool hasInAllocaArgument() const { - return paramHasAttr(arg_size(), Attribute::InAlloca); - } - - bool doesNotAccessMemory(unsigned OpNo) const { - return dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadNone); - } - - bool onlyReadsMemory(unsigned OpNo) const { - return dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadOnly) || - dataOperandHasImpliedAttr(OpNo + 1, Attribute::ReadNone); - } - - /// @brief Return true if the return value is known to be not null. - /// This may be because it has the nonnull attribute, or because at least - /// one byte is dereferenceable and the pointer is in addrspace(0). - bool isReturnNonNull() const { - if (paramHasAttr(0, Attribute::NonNull)) - return true; - else if (getDereferenceableBytes(0) > 0 && - getType()->getPointerAddressSpace() == 0) - return true; - - return false; - } - - /// hasArgument - Returns true if this CallSite passes the given Value* as an - /// argument to the called function. - bool hasArgument(const Value *Arg) const { - for (arg_iterator AI = this->arg_begin(), E = this->arg_end(); AI != E; - ++AI) - if (AI->get() == Arg) - return true; - return false; - } - -private: - IterTy getCallee() const { - if (isCall()) // Skip Callee - return cast(getInstruction())->op_end() - 1; - else // Skip BB, BB, Callee - return cast(getInstruction())->op_end() - 3; - } -}; - -class CallSite : public CallSiteBase { -public: - CallSite() {} - CallSite(CallSiteBase B) : CallSiteBase(B) {} - CallSite(CallInst *CI) : CallSiteBase(CI) {} - CallSite(InvokeInst *II) : CallSiteBase(II) {} - explicit CallSite(Instruction *II) : CallSiteBase(II) {} - explicit CallSite(Value *V) : CallSiteBase(V) {} - - bool operator==(const CallSite &CS) const { return I == CS.I; } - bool operator!=(const CallSite &CS) const { return I != CS.I; } - bool operator<(const CallSite &CS) const { - return getInstruction() < CS.getInstruction(); - } - -private: - User::op_iterator getCallee() const; -}; - -/// ImmutableCallSite - establish a view to a call site for examination -class ImmutableCallSite : public CallSiteBase<> { -public: - ImmutableCallSite() {} - ImmutableCallSite(const CallInst *CI) : CallSiteBase(CI) {} - ImmutableCallSite(const InvokeInst *II) : CallSiteBase(II) {} - explicit ImmutableCallSite(const Instruction *II) : CallSiteBase(II) {} - explicit ImmutableCallSite(const Value *V) : CallSiteBase(V) {} - ImmutableCallSite(CallSite CS) : CallSiteBase(CS.getInstruction()) {} -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/CallingConv.h b/llvm/include/llvm/IR/CallingConv.h deleted file mode 100644 index 4987b7e9..00000000 --- a/llvm/include/llvm/IR/CallingConv.h +++ /dev/null @@ -1,203 +0,0 @@ -//===-- llvm/CallingConv.h - LLVM Calling Conventions -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines LLVM's set of calling conventions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_CALLINGCONV_H -#define LLVM_IR_CALLINGCONV_H - -namespace llvm { - -/// CallingConv Namespace - This namespace contains an enum with a value for -/// the well-known calling conventions. -/// -namespace CallingConv { - /// LLVM IR allows to use arbitrary numbers as calling convention identifiers. - typedef unsigned ID; - - /// A set of enums which specify the assigned numeric values for known llvm - /// calling conventions. - /// @brief LLVM Calling Convention Representation - enum { - /// C - The default llvm calling convention, compatible with C. This - /// convention is the only calling convention that supports varargs calls. - /// As with typical C calling conventions, the callee/caller have to - /// tolerate certain amounts of prototype mismatch. - C = 0, - - // Generic LLVM calling conventions. None of these calling conventions - // support varargs calls, and all assume that the caller and callee - // prototype exactly match. - - /// Fast - This calling convention attempts to make calls as fast as - /// possible (e.g. by passing things in registers). - Fast = 8, - - // Cold - This calling convention attempts to make code in the caller as - // efficient as possible under the assumption that the call is not commonly - // executed. As such, these calls often preserve all registers so that the - // call does not break any live ranges in the caller side. - Cold = 9, - - // GHC - Calling convention used by the Glasgow Haskell Compiler (GHC). - GHC = 10, - - // HiPE - Calling convention used by the High-Performance Erlang Compiler - // (HiPE). - HiPE = 11, - - // WebKit JS - Calling convention for stack based JavaScript calls - WebKit_JS = 12, - - // AnyReg - Calling convention for dynamic register based calls (e.g. - // stackmap and patchpoint intrinsics). - AnyReg = 13, - - // PreserveMost - Calling convention for runtime calls that preserves most - // registers. - PreserveMost = 14, - - // PreserveAll - Calling convention for runtime calls that preserves - // (almost) all registers. - PreserveAll = 15, - - // Swift - Calling convention for Swift. - Swift = 16, - - // CXX_FAST_TLS - Calling convention for access functions. - CXX_FAST_TLS = 17, - - // Target - This is the start of the target-specific calling conventions, - // e.g. fastcall and thiscall on X86. - FirstTargetCC = 64, - - /// X86_StdCall - stdcall is the calling conventions mostly used by the - /// Win32 API. It is basically the same as the C convention with the - /// difference in that the callee is responsible for popping the arguments - /// from the stack. - X86_StdCall = 64, - - /// X86_FastCall - 'fast' analog of X86_StdCall. Passes first two arguments - /// in ECX:EDX registers, others - via stack. Callee is responsible for - /// stack cleaning. - X86_FastCall = 65, - - /// ARM_APCS - ARM Procedure Calling Standard calling convention (obsolete, - /// but still used on some targets). - ARM_APCS = 66, - - /// ARM_AAPCS - ARM Architecture Procedure Calling Standard calling - /// convention (aka EABI). Soft float variant. - ARM_AAPCS = 67, - - /// ARM_AAPCS_VFP - Same as ARM_AAPCS, but uses hard floating point ABI. - ARM_AAPCS_VFP = 68, - - /// MSP430_INTR - Calling convention used for MSP430 interrupt routines. - MSP430_INTR = 69, - - /// X86_ThisCall - Similar to X86_StdCall. Passes first argument in ECX, - /// others via stack. Callee is responsible for stack cleaning. MSVC uses - /// this by default for methods in its ABI. - X86_ThisCall = 70, - - /// PTX_Kernel - Call to a PTX kernel. - /// Passes all arguments in parameter space. - PTX_Kernel = 71, - - /// PTX_Device - Call to a PTX device function. - /// Passes all arguments in register or parameter space. - PTX_Device = 72, - - /// SPIR_FUNC - Calling convention for SPIR non-kernel device functions. - /// No lowering or expansion of arguments. - /// Structures are passed as a pointer to a struct with the byval attribute. - /// Functions can only call SPIR_FUNC and SPIR_KERNEL functions. - /// Functions can only have zero or one return values. - /// Variable arguments are not allowed, except for printf. - /// How arguments/return values are lowered are not specified. - /// Functions are only visible to the devices. - SPIR_FUNC = 75, - - /// SPIR_KERNEL - Calling convention for SPIR kernel functions. - /// Inherits the restrictions of SPIR_FUNC, except - /// Cannot have non-void return values. - /// Cannot have variable arguments. - /// Can also be called by the host. - /// Is externally visible. - SPIR_KERNEL = 76, - - /// Intel_OCL_BI - Calling conventions for Intel OpenCL built-ins - Intel_OCL_BI = 77, - - /// \brief The C convention as specified in the x86-64 supplement to the - /// System V ABI, used on most non-Windows systems. - X86_64_SysV = 78, - - /// \brief The C convention as implemented on Windows/x86-64. This - /// convention differs from the more common \c X86_64_SysV convention - /// in a number of ways, most notably in that XMM registers used to pass - /// arguments are shadowed by GPRs, and vice versa. - X86_64_Win64 = 79, - - /// \brief MSVC calling convention that passes vectors and vector aggregates - /// in SSE registers. - X86_VectorCall = 80, - - /// \brief Calling convention used by HipHop Virtual Machine (HHVM) to - /// perform calls to and from translation cache, and for calling PHP - /// functions. - /// HHVM calling convention supports tail/sibling call elimination. - HHVM = 81, - - /// \brief HHVM calling convention for invoking C/C++ helpers. - HHVM_C = 82, - - /// X86_INTR - x86 hardware interrupt context. Callee may take one or two - /// parameters, where the 1st represents a pointer to hardware context frame - /// and the 2nd represents hardware error code, the presence of the later - /// depends on the interrupt vector taken. Valid for both 32- and 64-bit - /// subtargets. - X86_INTR = 83, - - /// Used for AVR interrupt routines. - AVR_INTR = 84, - - /// Calling convention used for AVR signal routines. - AVR_SIGNAL = 85, - - /// Calling convention used for special AVR rtlib functions - /// which have an "optimized" convention to preserve registers. - AVR_BUILTIN = 86, - - /// Calling convention used for Mesa vertex shaders. - AMDGPU_VS = 87, - - /// Calling convention used for Mesa geometry shaders. - AMDGPU_GS = 88, - - /// Calling convention used for Mesa pixel shaders. - AMDGPU_PS = 89, - - /// Calling convention used for Mesa compute shaders. - AMDGPU_CS = 90, - - /// Calling convention for AMDGPU code object kernels. - AMDGPU_KERNEL = 91, - - /// The highest possible calling convention ID. Must be some 2^k - 1. - MaxID = 1023 - }; -} // End CallingConv namespace - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Comdat.h b/llvm/include/llvm/IR/Comdat.h deleted file mode 100644 index 577247f2..00000000 --- a/llvm/include/llvm/IR/Comdat.h +++ /dev/null @@ -1,63 +0,0 @@ -//===-- llvm/IR/Comdat.h - Comdat definitions -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// @file -/// This file contains the declaration of the Comdat class, which represents a -/// single COMDAT in LLVM. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_COMDAT_H -#define LLVM_IR_COMDAT_H - -namespace llvm { - -class raw_ostream; -class StringRef; -template class StringMapEntry; - -// This is a Name X SelectionKind pair. The reason for having this be an -// independent object instead of just adding the name and the SelectionKind -// to a GlobalObject is that it is invalid to have two Comdats with the same -// name but different SelectionKind. This structure makes that unrepresentable. -class Comdat { -public: - enum SelectionKind { - Any, ///< The linker may choose any COMDAT. - ExactMatch, ///< The data referenced by the COMDAT must be the same. - Largest, ///< The linker will choose the largest COMDAT. - NoDuplicates, ///< No other Module may specify this COMDAT. - SameSize, ///< The data referenced by the COMDAT must be the same size. - }; - - Comdat(Comdat &&C); - SelectionKind getSelectionKind() const { return SK; } - void setSelectionKind(SelectionKind Val) { SK = Val; } - StringRef getName() const; - void print(raw_ostream &OS, bool IsForDebug = false) const; - void dump() const; - -private: - friend class Module; - Comdat(); - Comdat(const Comdat &) = delete; - - // Points to the map in Module. - StringMapEntry *Name; - SelectionKind SK; -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const Comdat &C) { - C.print(OS); - return OS; -} - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Constant.h b/llvm/include/llvm/IR/Constant.h deleted file mode 100644 index 3c5fe556..00000000 --- a/llvm/include/llvm/IR/Constant.h +++ /dev/null @@ -1,164 +0,0 @@ -//===-- llvm/Constant.h - Constant class definition -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the Constant class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_CONSTANT_H -#define LLVM_IR_CONSTANT_H - -#include "llvm/IR/User.h" - -namespace llvm { - class APInt; - - template class SmallVectorImpl; - -/// This is an important base class in LLVM. It provides the common facilities -/// of all constant values in an LLVM program. A constant is a value that is -/// immutable at runtime. Functions are constants because their address is -/// immutable. Same with global variables. -/// -/// All constants share the capabilities provided in this class. All constants -/// can have a null value. They can have an operand list. Constants can be -/// simple (integer and floating point values), complex (arrays and structures), -/// or expression based (computations yielding a constant value composed of -/// only certain operators and other constant values). -/// -/// Note that Constants are immutable (once created they never change) -/// and are fully shared by structural equivalence. This means that two -/// structurally equivalent constants will always have the same address. -/// Constants are created on demand as needed and never deleted: thus clients -/// don't have to worry about the lifetime of the objects. -/// @brief LLVM Constant Representation -class Constant : public User { - void operator=(const Constant &) = delete; - Constant(const Constant &) = delete; - void anchor() override; - -protected: - Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) - : User(ty, vty, Ops, NumOps) {} - -public: - /// Return true if this is the value that would be returned by getNullValue. - bool isNullValue() const; - - /// Returns true if the value is one. - bool isOneValue() const; - - /// Return true if this is the value that would be returned by - /// getAllOnesValue. - bool isAllOnesValue() const; - - /// Return true if the value is what would be returned by - /// getZeroValueForNegation. - bool isNegativeZeroValue() const; - - /// Return true if the value is negative zero or null value. - bool isZeroValue() const; - - /// Return true if the value is not the smallest signed value. - bool isNotMinSignedValue() const; - - /// Return true if the value is the smallest signed value. - bool isMinSignedValue() const; - - /// Return true if evaluation of this constant could trap. This is true for - /// things like constant expressions that could divide by zero. - bool canTrap() const; - - /// Return true if the value can vary between threads. - bool isThreadDependent() const; - - /// Return true if the value is dependent on a dllimport variable. - bool isDLLImportDependent() const; - - /// Return true if the constant has users other than constant expressions and - /// other dangling things. - bool isConstantUsed() const; - - /// This method classifies the entry according to whether or not it may - /// generate a relocation entry. This must be conservative, so if it might - /// codegen to a relocatable entry, it should say so. - /// - /// FIXME: This really should not be in IR. - bool needsRelocation() const; - - /// For aggregates (struct/array/vector) return the constant that corresponds - /// to the specified element if possible, or null if not. This can return null - /// if the element index is a ConstantExpr, or if 'this' is a constant expr. - Constant *getAggregateElement(unsigned Elt) const; - Constant *getAggregateElement(Constant *Elt) const; - - /// If this is a splat vector constant, meaning that all of the elements have - /// the same value, return that value. Otherwise return 0. - Constant *getSplatValue() const; - - /// If C is a constant integer then return its value, otherwise C must be a - /// vector of constant integers, all equal, and the common value is returned. - const APInt &getUniqueInteger() const; - - /// Called if some element of this constant is no longer valid. - /// At this point only other constants may be on the use_list for this - /// constant. Any constants on our Use list must also be destroy'd. The - /// implementation must be sure to remove the constant from the list of - /// available cached constants. Implementations should implement - /// destroyConstantImpl to remove constants from any pools/maps they are - /// contained it. - void destroyConstant(); - - //// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() >= ConstantFirstVal && - V->getValueID() <= ConstantLastVal; - } - - /// This method is a special form of User::replaceUsesOfWith - /// (which does not work on constants) that does work - /// on constants. Basically this method goes through the trouble of building - /// a new constant that is equivalent to the current one, with all uses of - /// From replaced with uses of To. After this construction is completed, all - /// of the users of 'this' are replaced to use the new constant, and then - /// 'this' is deleted. In general, you should not call this method, instead, - /// use Value::replaceAllUsesWith, which automatically dispatches to this - /// method as needed. - /// - void handleOperandChange(Value *, Value *); - - static Constant *getNullValue(Type* Ty); - - /// @returns the value for an integer or vector of integer constant of the - /// given type that has all its bits set to true. - /// @brief Get the all ones value - static Constant *getAllOnesValue(Type* Ty); - - /// Return the value for an integer or pointer constant, or a vector thereof, - /// with the given scalar value. - static Constant *getIntegerValue(Type *Ty, const APInt &V); - - /// If there are any dead constant users dangling off of this constant, remove - /// them. This method is useful for clients that want to check to see if a - /// global is unused, but don't want to deal with potentially dead constants - /// hanging off of the globals. - void removeDeadConstantUsers() const; - - Constant *stripPointerCasts() { - return cast(Value::stripPointerCasts()); - } - - const Constant *stripPointerCasts() const { - return const_cast(this)->stripPointerCasts(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/ConstantFolder.h b/llvm/include/llvm/IR/ConstantFolder.h deleted file mode 100644 index fb6ca3b3..00000000 --- a/llvm/include/llvm/IR/ConstantFolder.h +++ /dev/null @@ -1,245 +0,0 @@ -//===- ConstantFolder.h - Constant folding helper ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the ConstantFolder class, a helper for IRBuilder. -// It provides IRBuilder with a set of methods for creating constants -// with minimal folding. For general constant creation and folding, -// use ConstantExpr and the routines in llvm/Analysis/ConstantFolding.h. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_CONSTANTFOLDER_H -#define LLVM_IR_CONSTANTFOLDER_H - -#include "llvm/IR/Constants.h" -#include "llvm/IR/InstrTypes.h" - -namespace llvm { - -/// ConstantFolder - Create constants with minimum, target independent, folding. -class ConstantFolder { -public: - explicit ConstantFolder() {} - - //===--------------------------------------------------------------------===// - // Binary Operators - //===--------------------------------------------------------------------===// - - Constant *CreateAdd(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - return ConstantExpr::getAdd(LHS, RHS, HasNUW, HasNSW); - } - Constant *CreateFAdd(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getFAdd(LHS, RHS); - } - Constant *CreateSub(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - return ConstantExpr::getSub(LHS, RHS, HasNUW, HasNSW); - } - Constant *CreateFSub(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getFSub(LHS, RHS); - } - Constant *CreateMul(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - return ConstantExpr::getMul(LHS, RHS, HasNUW, HasNSW); - } - Constant *CreateFMul(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getFMul(LHS, RHS); - } - Constant *CreateUDiv(Constant *LHS, Constant *RHS, - bool isExact = false) const { - return ConstantExpr::getUDiv(LHS, RHS, isExact); - } - Constant *CreateSDiv(Constant *LHS, Constant *RHS, - bool isExact = false) const { - return ConstantExpr::getSDiv(LHS, RHS, isExact); - } - Constant *CreateFDiv(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getFDiv(LHS, RHS); - } - Constant *CreateURem(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getURem(LHS, RHS); - } - Constant *CreateSRem(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getSRem(LHS, RHS); - } - Constant *CreateFRem(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getFRem(LHS, RHS); - } - Constant *CreateShl(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - return ConstantExpr::getShl(LHS, RHS, HasNUW, HasNSW); - } - Constant *CreateLShr(Constant *LHS, Constant *RHS, - bool isExact = false) const { - return ConstantExpr::getLShr(LHS, RHS, isExact); - } - Constant *CreateAShr(Constant *LHS, Constant *RHS, - bool isExact = false) const { - return ConstantExpr::getAShr(LHS, RHS, isExact); - } - Constant *CreateAnd(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getAnd(LHS, RHS); - } - Constant *CreateOr(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getOr(LHS, RHS); - } - Constant *CreateXor(Constant *LHS, Constant *RHS) const { - return ConstantExpr::getXor(LHS, RHS); - } - - Constant *CreateBinOp(Instruction::BinaryOps Opc, - Constant *LHS, Constant *RHS) const { - return ConstantExpr::get(Opc, LHS, RHS); - } - - //===--------------------------------------------------------------------===// - // Unary Operators - //===--------------------------------------------------------------------===// - - Constant *CreateNeg(Constant *C, - bool HasNUW = false, bool HasNSW = false) const { - return ConstantExpr::getNeg(C, HasNUW, HasNSW); - } - Constant *CreateFNeg(Constant *C) const { - return ConstantExpr::getFNeg(C); - } - Constant *CreateNot(Constant *C) const { - return ConstantExpr::getNot(C); - } - - //===--------------------------------------------------------------------===// - // Memory Instructions - //===--------------------------------------------------------------------===// - - Constant *CreateGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return ConstantExpr::getGetElementPtr(Ty, C, IdxList); - } - Constant *CreateGetElementPtr(Type *Ty, Constant *C, Constant *Idx) const { - // This form of the function only exists to avoid ambiguous overload - // warnings about whether to convert Idx to ArrayRef or - // ArrayRef. - return ConstantExpr::getGetElementPtr(Ty, C, Idx); - } - Constant *CreateGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return ConstantExpr::getGetElementPtr(Ty, C, IdxList); - } - - Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList); - } - Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - Constant *Idx) const { - // This form of the function only exists to avoid ambiguous overload - // warnings about whether to convert Idx to ArrayRef or - // ArrayRef. - return ConstantExpr::getInBoundsGetElementPtr(Ty, C, Idx); - } - Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList); - } - - //===--------------------------------------------------------------------===// - // Cast/Conversion Operators - //===--------------------------------------------------------------------===// - - Constant *CreateCast(Instruction::CastOps Op, Constant *C, - Type *DestTy) const { - return ConstantExpr::getCast(Op, C, DestTy); - } - Constant *CreatePointerCast(Constant *C, Type *DestTy) const { - return ConstantExpr::getPointerCast(C, DestTy); - } - - Constant *CreatePointerBitCastOrAddrSpaceCast(Constant *C, - Type *DestTy) const { - return ConstantExpr::getPointerBitCastOrAddrSpaceCast(C, DestTy); - } - - Constant *CreateIntCast(Constant *C, Type *DestTy, - bool isSigned) const { - return ConstantExpr::getIntegerCast(C, DestTy, isSigned); - } - Constant *CreateFPCast(Constant *C, Type *DestTy) const { - return ConstantExpr::getFPCast(C, DestTy); - } - - Constant *CreateBitCast(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::BitCast, C, DestTy); - } - Constant *CreateIntToPtr(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::IntToPtr, C, DestTy); - } - Constant *CreatePtrToInt(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::PtrToInt, C, DestTy); - } - Constant *CreateZExtOrBitCast(Constant *C, Type *DestTy) const { - return ConstantExpr::getZExtOrBitCast(C, DestTy); - } - Constant *CreateSExtOrBitCast(Constant *C, Type *DestTy) const { - return ConstantExpr::getSExtOrBitCast(C, DestTy); - } - - Constant *CreateTruncOrBitCast(Constant *C, Type *DestTy) const { - return ConstantExpr::getTruncOrBitCast(C, DestTy); - } - - //===--------------------------------------------------------------------===// - // Compare Instructions - //===--------------------------------------------------------------------===// - - Constant *CreateICmp(CmpInst::Predicate P, Constant *LHS, - Constant *RHS) const { - return ConstantExpr::getCompare(P, LHS, RHS); - } - Constant *CreateFCmp(CmpInst::Predicate P, Constant *LHS, - Constant *RHS) const { - return ConstantExpr::getCompare(P, LHS, RHS); - } - - //===--------------------------------------------------------------------===// - // Other Instructions - //===--------------------------------------------------------------------===// - - Constant *CreateSelect(Constant *C, Constant *True, Constant *False) const { - return ConstantExpr::getSelect(C, True, False); - } - - Constant *CreateExtractElement(Constant *Vec, Constant *Idx) const { - return ConstantExpr::getExtractElement(Vec, Idx); - } - - Constant *CreateInsertElement(Constant *Vec, Constant *NewElt, - Constant *Idx) const { - return ConstantExpr::getInsertElement(Vec, NewElt, Idx); - } - - Constant *CreateShuffleVector(Constant *V1, Constant *V2, - Constant *Mask) const { - return ConstantExpr::getShuffleVector(V1, V2, Mask); - } - - Constant *CreateExtractValue(Constant *Agg, - ArrayRef IdxList) const { - return ConstantExpr::getExtractValue(Agg, IdxList); - } - - Constant *CreateInsertValue(Constant *Agg, Constant *Val, - ArrayRef IdxList) const { - return ConstantExpr::getInsertValue(Agg, Val, IdxList); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/IR/ConstantRange.h b/llvm/include/llvm/IR/ConstantRange.h deleted file mode 100644 index 9458fa9f..00000000 --- a/llvm/include/llvm/IR/ConstantRange.h +++ /dev/null @@ -1,323 +0,0 @@ -//===- ConstantRange.h - Represent a range ----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Represent a range of possible values that may occur when the program is run -// for an integral value. This keeps track of a lower and upper bound for the -// constant, which MAY wrap around the end of the numeric range. To do this, it -// keeps track of a [lower, upper) bound, which specifies an interval just like -// STL iterators. When used with boolean values, the following are important -// ranges: : -// -// [F, F) = {} = Empty set -// [T, F) = {T} -// [F, T) = {F} -// [T, T) = {F, T} = Full set -// -// The other integral ranges use min/max values for special range values. For -// example, for 8-bit types, it uses: -// [0, 0) = {} = Empty set -// [255, 255) = {0..255} = Full Set -// -// Note that ConstantRange can be used to represent either signed or -// unsigned ranges. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_CONSTANTRANGE_H -#define LLVM_IR_CONSTANTRANGE_H - -#include "llvm/ADT/APInt.h" -#include "llvm/IR/InstrTypes.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - -/// This class represents a range of values. -/// -class ConstantRange { - APInt Lower, Upper; - - // If we have move semantics, pass APInts by value and move them into place. - typedef APInt APIntMoveTy; - -public: - /// Initialize a full (the default) or empty set for the specified bit width. - /// - explicit ConstantRange(uint32_t BitWidth, bool isFullSet = true); - - /// Initialize a range to hold the single specified value. - /// - ConstantRange(APIntMoveTy Value); - - /// @brief Initialize a range of values explicitly. This will assert out if - /// Lower==Upper and Lower != Min or Max value for its type. It will also - /// assert out if the two APInt's are not the same bit width. - ConstantRange(APIntMoveTy Lower, APIntMoveTy Upper); - - /// Produce the smallest range such that all values that may satisfy the given - /// predicate with any value contained within Other is contained in the - /// returned range. Formally, this returns a superset of - /// 'union over all y in Other . { x : icmp op x y is true }'. If the exact - /// answer is not representable as a ConstantRange, the return value will be a - /// proper superset of the above. - /// - /// Example: Pred = ult and Other = i8 [2, 5) returns Result = [0, 4) - static ConstantRange makeAllowedICmpRegion(CmpInst::Predicate Pred, - const ConstantRange &Other); - - /// Produce the largest range such that all values in the returned range - /// satisfy the given predicate with all values contained within Other. - /// Formally, this returns a subset of - /// 'intersection over all y in Other . { x : icmp op x y is true }'. If the - /// exact answer is not representable as a ConstantRange, the return value - /// will be a proper subset of the above. - /// - /// Example: Pred = ult and Other = i8 [2, 5) returns [0, 2) - static ConstantRange makeSatisfyingICmpRegion(CmpInst::Predicate Pred, - const ConstantRange &Other); - - /// Produce the exact range such that all values in the returned range satisfy - /// the given predicate with any value contained within Other. Formally, this - /// returns the exact answer when the superset of 'union over all y in Other - /// is exactly same as the subset of intersection over all y in Other. - /// { x : icmp op x y is true}'. - /// - /// Example: Pred = ult and Other = i8 3 returns [0, 3) - static ConstantRange makeExactICmpRegion(CmpInst::Predicate Pred, - const APInt &Other); - - /// Return the largest range containing all X such that "X BinOpC Y" is - /// guaranteed not to wrap (overflow) for all Y in Other. - /// - /// NB! The returned set does *not* contain **all** possible values of X for - /// which "X BinOpC Y" does not wrap -- some viable values of X may be - /// missing, so you cannot use this to contrain X's range. E.g. in the last - /// example, "(-2) + 1" is both nsw and nuw (so the "X" could be -2), but (-2) - /// is not in the set returned. - /// - /// Examples: - /// typedef OverflowingBinaryOperator OBO; - /// #define MGNR makeGuaranteedNoWrapRegion - /// MGNR(Add, [i8 1, 2), OBO::NoSignedWrap) == [-128, 127) - /// MGNR(Add, [i8 1, 2), OBO::NoUnsignedWrap) == [0, -1) - /// MGNR(Add, [i8 0, 1), OBO::NoUnsignedWrap) == Full Set - /// MGNR(Add, [i8 1, 2), OBO::NoUnsignedWrap | OBO::NoSignedWrap) - /// == [0,INT_MAX) - /// MGNR(Add, [i8 -1, 6), OBO::NoSignedWrap) == [INT_MIN+1, INT_MAX-4) - static ConstantRange makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp, - const ConstantRange &Other, - unsigned NoWrapKind); - - /// Set up \p Pred and \p RHS such that - /// ConstantRange::makeExactICmpRegion(Pred, RHS) == *this. Return true if - /// successful. - bool getEquivalentICmp(CmpInst::Predicate &Pred, APInt &RHS) const; - - /// Return the lower value for this range. - /// - const APInt &getLower() const { return Lower; } - - /// Return the upper value for this range. - /// - const APInt &getUpper() const { return Upper; } - - /// Get the bit width of this ConstantRange. - /// - uint32_t getBitWidth() const { return Lower.getBitWidth(); } - - /// Return true if this set contains all of the elements possible - /// for this data-type. - /// - bool isFullSet() const; - - /// Return true if this set contains no members. - /// - bool isEmptySet() const; - - /// Return true if this set wraps around the top of the range. - /// For example: [100, 8). - /// - bool isWrappedSet() const; - - /// Return true if this set wraps around the INT_MIN of - /// its bitwidth. For example: i8 [120, 140). - /// - bool isSignWrappedSet() const; - - /// Return true if the specified value is in the set. - /// - bool contains(const APInt &Val) const; - - /// Return true if the other range is a subset of this one. - /// - bool contains(const ConstantRange &CR) const; - - /// If this set contains a single element, return it, otherwise return null. - /// - const APInt *getSingleElement() const { - if (Upper == Lower + 1) - return &Lower; - return nullptr; - } - - /// Return true if this set contains exactly one member. - /// - bool isSingleElement() const { return getSingleElement() != nullptr; } - - /// Return the number of elements in this set. - /// - APInt getSetSize() const; - - /// Return the largest unsigned value contained in the ConstantRange. - /// - APInt getUnsignedMax() const; - - /// Return the smallest unsigned value contained in the ConstantRange. - /// - APInt getUnsignedMin() const; - - /// Return the largest signed value contained in the ConstantRange. - /// - APInt getSignedMax() const; - - /// Return the smallest signed value contained in the ConstantRange. - /// - APInt getSignedMin() const; - - /// Return true if this range is equal to another range. - /// - bool operator==(const ConstantRange &CR) const { - return Lower == CR.Lower && Upper == CR.Upper; - } - bool operator!=(const ConstantRange &CR) const { - return !operator==(CR); - } - - /// Subtract the specified constant from the endpoints of this constant range. - ConstantRange subtract(const APInt &CI) const; - - /// \brief Subtract the specified range from this range (aka relative - /// complement of the sets). - ConstantRange difference(const ConstantRange &CR) const; - - /// Return the range that results from the intersection of - /// this range with another range. The resultant range is guaranteed to - /// include all elements contained in both input ranges, and to have the - /// smallest possible set size that does so. Because there may be two - /// intersections with the same set size, A.intersectWith(B) might not - /// be equal to B.intersectWith(A). - /// - ConstantRange intersectWith(const ConstantRange &CR) const; - - /// Return the range that results from the union of this range - /// with another range. The resultant range is guaranteed to include the - /// elements of both sets, but may contain more. For example, [3, 9) union - /// [12,15) is [3, 15), which includes 9, 10, and 11, which were not included - /// in either set before. - /// - ConstantRange unionWith(const ConstantRange &CR) const; - - /// Return a new range in the specified integer type, which must - /// be strictly larger than the current type. The returned range will - /// correspond to the possible range of values if the source range had been - /// zero extended to BitWidth. - ConstantRange zeroExtend(uint32_t BitWidth) const; - - /// Return a new range in the specified integer type, which must - /// be strictly larger than the current type. The returned range will - /// correspond to the possible range of values if the source range had been - /// sign extended to BitWidth. - ConstantRange signExtend(uint32_t BitWidth) const; - - /// Return a new range in the specified integer type, which must be - /// strictly smaller than the current type. The returned range will - /// correspond to the possible range of values if the source range had been - /// truncated to the specified type. - ConstantRange truncate(uint32_t BitWidth) const; - - /// Make this range have the bit width given by \p BitWidth. The - /// value is zero extended, truncated, or left alone to make it that width. - ConstantRange zextOrTrunc(uint32_t BitWidth) const; - - /// Make this range have the bit width given by \p BitWidth. The - /// value is sign extended, truncated, or left alone to make it that width. - ConstantRange sextOrTrunc(uint32_t BitWidth) const; - - /// Return a new range representing the possible values resulting - /// from an addition of a value in this range and a value in \p Other. - ConstantRange add(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from a subtraction of a value in this range and a value in \p Other. - ConstantRange sub(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from a multiplication of a value in this range and a value in \p Other, - /// treating both this and \p Other as unsigned ranges. - ConstantRange multiply(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from a signed maximum of a value in this range and a value in \p Other. - ConstantRange smax(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from an unsigned maximum of a value in this range and a value in \p Other. - ConstantRange umax(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from a signed minimum of a value in this range and a value in \p Other. - ConstantRange smin(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from an unsigned minimum of a value in this range and a value in \p Other. - ConstantRange umin(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from an unsigned division of a value in this range and a value in - /// \p Other. - ConstantRange udiv(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from a binary-and of a value in this range by a value in \p Other. - ConstantRange binaryAnd(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from a binary-or of a value in this range by a value in \p Other. - ConstantRange binaryOr(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting - /// from a left shift of a value in this range by a value in \p Other. - /// TODO: This isn't fully implemented yet. - ConstantRange shl(const ConstantRange &Other) const; - - /// Return a new range representing the possible values resulting from a - /// logical right shift of a value in this range and a value in \p Other. - ConstantRange lshr(const ConstantRange &Other) const; - - /// Return a new range that is the logical not of the current set. - /// - ConstantRange inverse() const; - - /// Print out the bounds to a stream. - /// - void print(raw_ostream &OS) const; - - /// Allow printing from a debugger easily. - /// - void dump() const; -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const ConstantRange &CR) { - CR.print(OS); - return OS; -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Constants.h b/llvm/include/llvm/IR/Constants.h deleted file mode 100644 index 2a5d14d9..00000000 --- a/llvm/include/llvm/IR/Constants.h +++ /dev/null @@ -1,1241 +0,0 @@ -//===-- llvm/Constants.h - Constant class subclass definitions --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// @file -/// This file contains the declarations for the subclasses of Constant, -/// which represent the different flavors of constant values that live in LLVM. -/// Note that Constants are immutable (once created they never change) and are -/// fully shared by structural equivalence. This means that two structurally -/// equivalent constants will always have the same address. Constants are -/// created on demand as needed and never deleted: thus clients don't have to -/// worry about the lifetime of the objects. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_CONSTANTS_H -#define LLVM_IR_CONSTANTS_H - -#include "llvm/ADT/APFloat.h" -#include "llvm/ADT/APInt.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/IR/Constant.h" -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/OperandTraits.h" - -namespace llvm { - -class ArrayType; -class IntegerType; -class StructType; -class PointerType; -class VectorType; -class SequentialType; - -struct ConstantExprKeyType; -template struct ConstantAggrKeyType; - -/// Base class for constants with no operands. -/// -/// These constants have no operands; they represent their data directly. -/// Since they can be in use by unrelated modules (and are never based on -/// GlobalValues), it never makes sense to RAUW them. -class ConstantData : public Constant { - void anchor() override; - void *operator new(size_t, unsigned) = delete; - ConstantData() = delete; - ConstantData(const ConstantData &) = delete; - - friend class Constant; - Value *handleOperandChangeImpl(Value *From, Value *To) { - llvm_unreachable("Constant data does not have operands!"); - } - -protected: - explicit ConstantData(Type *Ty, ValueTy VT) : Constant(Ty, VT, nullptr, 0) {} - void *operator new(size_t s) { return User::operator new(s, 0); } - -public: - /// Methods to support type inquiry through isa, cast, and dyn_cast. - static bool classof(const Value *V) { - return V->getValueID() >= ConstantDataFirstVal && - V->getValueID() <= ConstantDataLastVal; - } -}; - -//===----------------------------------------------------------------------===// -/// This is the shared class of boolean and integer constants. This class -/// represents both boolean and integral constants. -/// @brief Class for constant integers. -class ConstantInt final : public ConstantData { - void anchor() override; - ConstantInt(const ConstantInt &) = delete; - ConstantInt(IntegerType *Ty, const APInt& V); - APInt Val; - - friend class Constant; - void destroyConstantImpl(); - -public: - static ConstantInt *getTrue(LLVMContext &Context); - static ConstantInt *getFalse(LLVMContext &Context); - static Constant *getTrue(Type *Ty); - static Constant *getFalse(Type *Ty); - - /// If Ty is a vector type, return a Constant with a splat of the given - /// value. Otherwise return a ConstantInt for the given value. - static Constant *get(Type *Ty, uint64_t V, bool isSigned = false); - - /// Return a ConstantInt with the specified integer value for the specified - /// type. If the type is wider than 64 bits, the value will be zero-extended - /// to fit the type, unless isSigned is true, in which case the value will - /// be interpreted as a 64-bit signed integer and sign-extended to fit - /// the type. - /// @brief Get a ConstantInt for a specific value. - static ConstantInt *get(IntegerType *Ty, uint64_t V, - bool isSigned = false); - - /// Return a ConstantInt with the specified value for the specified type. The - /// value V will be canonicalized to a an unsigned APInt. Accessing it with - /// either getSExtValue() or getZExtValue() will yield a correctly sized and - /// signed value for the type Ty. - /// @brief Get a ConstantInt for a specific signed value. - static ConstantInt *getSigned(IntegerType *Ty, int64_t V); - static Constant *getSigned(Type *Ty, int64_t V); - - /// Return a ConstantInt with the specified value and an implied Type. The - /// type is the integer type that corresponds to the bit width of the value. - static ConstantInt *get(LLVMContext &Context, const APInt &V); - - /// Return a ConstantInt constructed from the string strStart with the given - /// radix. - static ConstantInt *get(IntegerType *Ty, StringRef Str, - uint8_t radix); - - /// If Ty is a vector type, return a Constant with a splat of the given - /// value. Otherwise return a ConstantInt for the given value. - static Constant *get(Type* Ty, const APInt& V); - - /// Return the constant as an APInt value reference. This allows clients to - /// obtain a copy of the value, with all its precision in tact. - /// @brief Return the constant's value. - inline const APInt &getValue() const { - return Val; - } - - /// getBitWidth - Return the bitwidth of this constant. - unsigned getBitWidth() const { return Val.getBitWidth(); } - - /// Return the constant as a 64-bit unsigned integer value after it - /// has been zero extended as appropriate for the type of this constant. Note - /// that this method can assert if the value does not fit in 64 bits. - /// @brief Return the zero extended value. - inline uint64_t getZExtValue() const { - return Val.getZExtValue(); - } - - /// Return the constant as a 64-bit integer value after it has been sign - /// extended as appropriate for the type of this constant. Note that - /// this method can assert if the value does not fit in 64 bits. - /// @brief Return the sign extended value. - inline int64_t getSExtValue() const { - return Val.getSExtValue(); - } - - /// A helper method that can be used to determine if the constant contained - /// within is equal to a constant. This only works for very small values, - /// because this is all that can be represented with all types. - /// @brief Determine if this constant's value is same as an unsigned char. - bool equalsInt(uint64_t V) const { - return Val == V; - } - - /// getType - Specialize the getType() method to always return an IntegerType, - /// which reduces the amount of casting needed in parts of the compiler. - /// - inline IntegerType *getType() const { - return cast(Value::getType()); - } - - /// This static method returns true if the type Ty is big enough to - /// represent the value V. This can be used to avoid having the get method - /// assert when V is larger than Ty can represent. Note that there are two - /// versions of this method, one for unsigned and one for signed integers. - /// Although ConstantInt canonicalizes everything to an unsigned integer, - /// the signed version avoids callers having to convert a signed quantity - /// to the appropriate unsigned type before calling the method. - /// @returns true if V is a valid value for type Ty - /// @brief Determine if the value is in range for the given type. - static bool isValueValidForType(Type *Ty, uint64_t V); - static bool isValueValidForType(Type *Ty, int64_t V); - - bool isNegative() const { return Val.isNegative(); } - - /// This is just a convenience method to make client code smaller for a - /// common code. It also correctly performs the comparison without the - /// potential for an assertion from getZExtValue(). - bool isZero() const { - return Val == 0; - } - - /// This is just a convenience method to make client code smaller for a - /// common case. It also correctly performs the comparison without the - /// potential for an assertion from getZExtValue(). - /// @brief Determine if the value is one. - bool isOne() const { - return Val == 1; - } - - /// This function will return true iff every bit in this constant is set - /// to true. - /// @returns true iff this constant's bits are all set to true. - /// @brief Determine if the value is all ones. - bool isMinusOne() const { - return Val.isAllOnesValue(); - } - - /// This function will return true iff this constant represents the largest - /// value that may be represented by the constant's type. - /// @returns true iff this is the largest value that may be represented - /// by this type. - /// @brief Determine if the value is maximal. - bool isMaxValue(bool isSigned) const { - if (isSigned) - return Val.isMaxSignedValue(); - else - return Val.isMaxValue(); - } - - /// This function will return true iff this constant represents the smallest - /// value that may be represented by this constant's type. - /// @returns true if this is the smallest value that may be represented by - /// this type. - /// @brief Determine if the value is minimal. - bool isMinValue(bool isSigned) const { - if (isSigned) - return Val.isMinSignedValue(); - else - return Val.isMinValue(); - } - - /// This function will return true iff this constant represents a value with - /// active bits bigger than 64 bits or a value greater than the given uint64_t - /// value. - /// @returns true iff this constant is greater or equal to the given number. - /// @brief Determine if the value is greater or equal to the given number. - bool uge(uint64_t Num) const { - return Val.getActiveBits() > 64 || Val.getZExtValue() >= Num; - } - - /// getLimitedValue - If the value is smaller than the specified limit, - /// return it, otherwise return the limit value. This causes the value - /// to saturate to the limit. - /// @returns the min of the value of the constant and the specified value - /// @brief Get the constant's value with a saturation limit - uint64_t getLimitedValue(uint64_t Limit = ~0ULL) const { - return Val.getLimitedValue(Limit); - } - - /// @brief Methods to support type inquiry through isa, cast, and dyn_cast. - static bool classof(const Value *V) { - return V->getValueID() == ConstantIntVal; - } -}; - - -//===----------------------------------------------------------------------===// -/// ConstantFP - Floating Point Values [float, double] -/// -class ConstantFP final : public ConstantData { - APFloat Val; - void anchor() override; - ConstantFP(const ConstantFP &) = delete; - - friend class Constant; - void destroyConstantImpl(); - - ConstantFP(Type *Ty, const APFloat& V); - -public: - /// Floating point negation must be implemented with f(x) = -0.0 - x. This - /// method returns the negative zero constant for floating point or vector - /// floating point types; for all other types, it returns the null value. - static Constant *getZeroValueForNegation(Type *Ty); - - /// This returns a ConstantFP, or a vector containing a splat of a ConstantFP, - /// for the specified value in the specified type. This should only be used - /// for simple constant values like 2.0/1.0 etc, that are known-valid both as - /// host double and as the target format. - static Constant *get(Type* Ty, double V); - static Constant *get(Type* Ty, StringRef Str); - static ConstantFP *get(LLVMContext &Context, const APFloat &V); - static Constant *getNaN(Type *Ty, bool Negative = false, unsigned type = 0); - static Constant *getNegativeZero(Type *Ty); - static Constant *getInfinity(Type *Ty, bool Negative = false); - - /// Return true if Ty is big enough to represent V. - static bool isValueValidForType(Type *Ty, const APFloat &V); - inline const APFloat &getValueAPF() const { return Val; } - - /// Return true if the value is positive or negative zero. - bool isZero() const { return Val.isZero(); } - - /// Return true if the sign bit is set. - bool isNegative() const { return Val.isNegative(); } - - /// Return true if the value is infinity - bool isInfinity() const { return Val.isInfinity(); } - - /// Return true if the value is a NaN. - bool isNaN() const { return Val.isNaN(); } - - /// We don't rely on operator== working on double values, as it returns true - /// for things that are clearly not equal, like -0.0 and 0.0. - /// As such, this method can be used to do an exact bit-for-bit comparison of - /// two floating point values. The version with a double operand is retained - /// because it's so convenient to write isExactlyValue(2.0), but please use - /// it only for simple constants. - bool isExactlyValue(const APFloat &V) const; - - bool isExactlyValue(double V) const { - bool ignored; - APFloat FV(V); - FV.convert(Val.getSemantics(), APFloat::rmNearestTiesToEven, &ignored); - return isExactlyValue(FV); - } - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == ConstantFPVal; - } -}; - -//===----------------------------------------------------------------------===// -/// All zero aggregate value -/// -class ConstantAggregateZero final : public ConstantData { - ConstantAggregateZero(const ConstantAggregateZero &) = delete; - - friend class Constant; - void destroyConstantImpl(); - - explicit ConstantAggregateZero(Type *Ty) - : ConstantData(Ty, ConstantAggregateZeroVal) {} - -public: - static ConstantAggregateZero *get(Type *Ty); - - /// If this CAZ has array or vector type, return a zero with the right element - /// type. - Constant *getSequentialElement() const; - - /// If this CAZ has struct type, return a zero with the right element type for - /// the specified element. - Constant *getStructElement(unsigned Elt) const; - - /// Return a zero of the right value for the specified GEP index if we can, - /// otherwise return null (e.g. if C is a ConstantExpr). - Constant *getElementValue(Constant *C) const; - - /// Return a zero of the right value for the specified GEP index. - Constant *getElementValue(unsigned Idx) const; - - /// Return the number of elements in the array, vector, or struct. - unsigned getNumElements() const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - /// - static bool classof(const Value *V) { - return V->getValueID() == ConstantAggregateZeroVal; - } -}; - -/// Base class for aggregate constants (with operands). -/// -/// These constants are aggregates of other constants, which are stored as -/// operands. -/// -/// Subclasses are \a ConstantStruct, \a ConstantArray, and \a -/// ConstantVector. -/// -/// \note Some subclasses of \a ConstantData are semantically aggregates -- -/// such as \a ConstantDataArray -- but are not subclasses of this because they -/// use operands. -class ConstantAggregate : public Constant { -protected: - ConstantAggregate(CompositeType *T, ValueTy VT, ArrayRef V); - -public: - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant); - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() >= ConstantAggregateFirstVal && - V->getValueID() <= ConstantAggregateLastVal; - } -}; - -template <> -struct OperandTraits - : public VariadicOperandTraits {}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantAggregate, Constant) - -//===----------------------------------------------------------------------===// -/// ConstantArray - Constant Array Declarations -/// -class ConstantArray final : public ConstantAggregate { - friend struct ConstantAggrKeyType; - friend class Constant; - void destroyConstantImpl(); - Value *handleOperandChangeImpl(Value *From, Value *To); - - ConstantArray(ArrayType *T, ArrayRef Val); - -public: - // ConstantArray accessors - static Constant *get(ArrayType *T, ArrayRef V); - -private: - static Constant *getImpl(ArrayType *T, ArrayRef V); - -public: - /// Specialize the getType() method to always return an ArrayType, - /// which reduces the amount of casting needed in parts of the compiler. - inline ArrayType *getType() const { - return cast(Value::getType()); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == ConstantArrayVal; - } -}; - -//===----------------------------------------------------------------------===// -// Constant Struct Declarations -// -class ConstantStruct final : public ConstantAggregate { - friend struct ConstantAggrKeyType; - friend class Constant; - void destroyConstantImpl(); - Value *handleOperandChangeImpl(Value *From, Value *To); - - ConstantStruct(StructType *T, ArrayRef Val); - -public: - // ConstantStruct accessors - static Constant *get(StructType *T, ArrayRef V); - static Constant *get(StructType *T, ...) LLVM_END_WITH_NULL; - - /// Return an anonymous struct that has the specified elements. - /// If the struct is possibly empty, then you must specify a context. - static Constant *getAnon(ArrayRef V, bool Packed = false) { - return get(getTypeForElements(V, Packed), V); - } - static Constant *getAnon(LLVMContext &Ctx, - ArrayRef V, bool Packed = false) { - return get(getTypeForElements(Ctx, V, Packed), V); - } - - /// Return an anonymous struct type to use for a constant with the specified - /// set of elements. The list must not be empty. - static StructType *getTypeForElements(ArrayRef V, - bool Packed = false); - /// This version of the method allows an empty list. - static StructType *getTypeForElements(LLVMContext &Ctx, - ArrayRef V, - bool Packed = false); - - /// Specialization - reduce amount of casting. - inline StructType *getType() const { - return cast(Value::getType()); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == ConstantStructVal; - } -}; - - -//===----------------------------------------------------------------------===// -/// Constant Vector Declarations -/// -class ConstantVector final : public ConstantAggregate { - friend struct ConstantAggrKeyType; - friend class Constant; - void destroyConstantImpl(); - Value *handleOperandChangeImpl(Value *From, Value *To); - - ConstantVector(VectorType *T, ArrayRef Val); - -public: - // ConstantVector accessors - static Constant *get(ArrayRef V); - -private: - static Constant *getImpl(ArrayRef V); - -public: - /// Return a ConstantVector with the specified constant in each element. - static Constant *getSplat(unsigned NumElts, Constant *Elt); - - /// Specialize the getType() method to always return a VectorType, - /// which reduces the amount of casting needed in parts of the compiler. - inline VectorType *getType() const { - return cast(Value::getType()); - } - - /// If this is a splat constant, meaning that all of the elements have the - /// same value, return that value. Otherwise return NULL. - Constant *getSplatValue() const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == ConstantVectorVal; - } -}; - -//===----------------------------------------------------------------------===// -/// A constant pointer value that points to null -/// -class ConstantPointerNull final : public ConstantData { - ConstantPointerNull(const ConstantPointerNull &) = delete; - - friend class Constant; - void destroyConstantImpl(); - - explicit ConstantPointerNull(PointerType *T) - : ConstantData(T, Value::ConstantPointerNullVal) {} - -public: - /// Static factory methods - Return objects of the specified value - static ConstantPointerNull *get(PointerType *T); - - /// Specialize the getType() method to always return an PointerType, - /// which reduces the amount of casting needed in parts of the compiler. - inline PointerType *getType() const { - return cast(Value::getType()); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == ConstantPointerNullVal; - } -}; - -//===----------------------------------------------------------------------===// -/// ConstantDataSequential - A vector or array constant whose element type is a -/// simple 1/2/4/8-byte integer or float/double, and whose elements are just -/// simple data values (i.e. ConstantInt/ConstantFP). This Constant node has no -/// operands because it stores all of the elements of the constant as densely -/// packed data, instead of as Value*'s. -/// -/// This is the common base class of ConstantDataArray and ConstantDataVector. -/// -class ConstantDataSequential : public ConstantData { - friend class LLVMContextImpl; - /// A pointer to the bytes underlying this constant (which is owned by the - /// uniquing StringMap). - const char *DataElements; - - /// This forms a link list of ConstantDataSequential nodes that have - /// the same value but different type. For example, 0,0,0,1 could be a 4 - /// element array of i8, or a 1-element array of i32. They'll both end up in - /// the same StringMap bucket, linked up. - ConstantDataSequential *Next; - ConstantDataSequential(const ConstantDataSequential &) = delete; - - friend class Constant; - void destroyConstantImpl(); - -protected: - explicit ConstantDataSequential(Type *ty, ValueTy VT, const char *Data) - : ConstantData(ty, VT), DataElements(Data), Next(nullptr) {} - ~ConstantDataSequential() override { delete Next; } - - static Constant *getImpl(StringRef Bytes, Type *Ty); - -public: - /// Return true if a ConstantDataSequential can be formed with a vector or - /// array of the specified element type. - /// ConstantDataArray only works with normal float and int types that are - /// stored densely in memory, not with things like i42 or x86_f80. - static bool isElementTypeCompatible(Type *Ty); - - /// If this is a sequential container of integers (of any size), return the - /// specified element in the low bits of a uint64_t. - uint64_t getElementAsInteger(unsigned i) const; - - /// If this is a sequential container of floating point type, return the - /// specified element as an APFloat. - APFloat getElementAsAPFloat(unsigned i) const; - - /// If this is an sequential container of floats, return the specified element - /// as a float. - float getElementAsFloat(unsigned i) const; - - /// If this is an sequential container of doubles, return the specified - /// element as a double. - double getElementAsDouble(unsigned i) const; - - /// Return a Constant for a specified index's element. - /// Note that this has to compute a new constant to return, so it isn't as - /// efficient as getElementAsInteger/Float/Double. - Constant *getElementAsConstant(unsigned i) const; - - /// Specialize the getType() method to always return a SequentialType, which - /// reduces the amount of casting needed in parts of the compiler. - inline SequentialType *getType() const { - return cast(Value::getType()); - } - - /// Return the element type of the array/vector. - Type *getElementType() const; - - /// Return the number of elements in the array or vector. - unsigned getNumElements() const; - - /// Return the size (in bytes) of each element in the array/vector. - /// The size of the elements is known to be a multiple of one byte. - uint64_t getElementByteSize() const; - - /// This method returns true if this is an array of i8. - bool isString() const; - - /// This method returns true if the array "isString", ends with a null byte, - /// and does not contains any other null bytes. - bool isCString() const; - - /// If this array is isString(), then this method returns the array as a - /// StringRef. Otherwise, it asserts out. - StringRef getAsString() const { - assert(isString() && "Not a string"); - return getRawDataValues(); - } - - /// If this array is isCString(), then this method returns the array (without - /// the trailing null byte) as a StringRef. Otherwise, it asserts out. - StringRef getAsCString() const { - assert(isCString() && "Isn't a C string"); - StringRef Str = getAsString(); - return Str.substr(0, Str.size()-1); - } - - /// Return the raw, underlying, bytes of this data. Note that this is an - /// extremely tricky thing to work with, as it exposes the host endianness of - /// the data elements. - StringRef getRawDataValues() const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == ConstantDataArrayVal || - V->getValueID() == ConstantDataVectorVal; - } -private: - const char *getElementPointer(unsigned Elt) const; -}; - -//===----------------------------------------------------------------------===// -/// An array constant whose element type is a simple 1/2/4/8-byte integer or -/// float/double, and whose elements are just simple data values -/// (i.e. ConstantInt/ConstantFP). This Constant node has no operands because it -/// stores all of the elements of the constant as densely packed data, instead -/// of as Value*'s. -class ConstantDataArray final : public ConstantDataSequential { - void *operator new(size_t, unsigned) = delete; - ConstantDataArray(const ConstantDataArray &) = delete; - void anchor() override; - friend class ConstantDataSequential; - explicit ConstantDataArray(Type *ty, const char *Data) - : ConstantDataSequential(ty, ConstantDataArrayVal, Data) {} - /// Allocate space for exactly zero operands. - void *operator new(size_t s) { - return User::operator new(s, 0); - } - -public: - /// get() constructors - Return a constant with array type with an element - /// count and element type matching the ArrayRef passed in. Note that this - /// can return a ConstantAggregateZero object. - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - - /// getFP() constructors - Return a constant with array type with an element - /// count and element type of float with precision matching the number of - /// bits in the ArrayRef passed in. (i.e. half for 16bits, float for 32bits, - /// double for 64bits) Note that this can return a ConstantAggregateZero - /// object. - static Constant *getFP(LLVMContext &Context, ArrayRef Elts); - static Constant *getFP(LLVMContext &Context, ArrayRef Elts); - static Constant *getFP(LLVMContext &Context, ArrayRef Elts); - - /// This method constructs a CDS and initializes it with a text string. - /// The default behavior (AddNull==true) causes a null terminator to - /// be placed at the end of the array (increasing the length of the string by - /// one more than the StringRef would normally indicate. Pass AddNull=false - /// to disable this behavior. - static Constant *getString(LLVMContext &Context, StringRef Initializer, - bool AddNull = true); - - /// Specialize the getType() method to always return an ArrayType, - /// which reduces the amount of casting needed in parts of the compiler. - inline ArrayType *getType() const { - return cast(Value::getType()); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == ConstantDataArrayVal; - } -}; - -//===----------------------------------------------------------------------===// -/// A vector constant whose element type is a simple 1/2/4/8-byte integer or -/// float/double, and whose elements are just simple data values -/// (i.e. ConstantInt/ConstantFP). This Constant node has no operands because it -/// stores all of the elements of the constant as densely packed data, instead -/// of as Value*'s. -class ConstantDataVector final : public ConstantDataSequential { - void *operator new(size_t, unsigned) = delete; - ConstantDataVector(const ConstantDataVector &) = delete; - void anchor() override; - friend class ConstantDataSequential; - explicit ConstantDataVector(Type *ty, const char *Data) - : ConstantDataSequential(ty, ConstantDataVectorVal, Data) {} - // allocate space for exactly zero operands. - void *operator new(size_t s) { - return User::operator new(s, 0); - } - -public: - /// get() constructors - Return a constant with vector type with an element - /// count and element type matching the ArrayRef passed in. Note that this - /// can return a ConstantAggregateZero object. - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - static Constant *get(LLVMContext &Context, ArrayRef Elts); - - /// getFP() constructors - Return a constant with vector type with an element - /// count and element type of float with the precision matching the number of - /// bits in the ArrayRef passed in. (i.e. half for 16bits, float for 32bits, - /// double for 64bits) Note that this can return a ConstantAggregateZero - /// object. - static Constant *getFP(LLVMContext &Context, ArrayRef Elts); - static Constant *getFP(LLVMContext &Context, ArrayRef Elts); - static Constant *getFP(LLVMContext &Context, ArrayRef Elts); - - /// Return a ConstantVector with the specified constant in each element. - /// The specified constant has to be a of a compatible type (i8/i16/ - /// i32/i64/float/double) and must be a ConstantFP or ConstantInt. - static Constant *getSplat(unsigned NumElts, Constant *Elt); - - /// If this is a splat constant, meaning that all of the elements have the - /// same value, return that value. Otherwise return NULL. - Constant *getSplatValue() const; - - /// Specialize the getType() method to always return a VectorType, - /// which reduces the amount of casting needed in parts of the compiler. - inline VectorType *getType() const { - return cast(Value::getType()); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == ConstantDataVectorVal; - } -}; - -//===----------------------------------------------------------------------===// -/// A constant token which is empty -/// -class ConstantTokenNone final : public ConstantData { - ConstantTokenNone(const ConstantTokenNone &) = delete; - - friend class Constant; - void destroyConstantImpl(); - - explicit ConstantTokenNone(LLVMContext &Context) - : ConstantData(Type::getTokenTy(Context), ConstantTokenNoneVal) {} - -public: - /// Return the ConstantTokenNone. - static ConstantTokenNone *get(LLVMContext &Context); - - /// @brief Methods to support type inquiry through isa, cast, and dyn_cast. - static bool classof(const Value *V) { - return V->getValueID() == ConstantTokenNoneVal; - } -}; - -/// The address of a basic block. -/// -class BlockAddress final : public Constant { - void *operator new(size_t, unsigned) = delete; - void *operator new(size_t s) { return User::operator new(s, 2); } - BlockAddress(Function *F, BasicBlock *BB); - - friend class Constant; - void destroyConstantImpl(); - Value *handleOperandChangeImpl(Value *From, Value *To); - -public: - /// Return a BlockAddress for the specified function and basic block. - static BlockAddress *get(Function *F, BasicBlock *BB); - - /// Return a BlockAddress for the specified basic block. The basic - /// block must be embedded into a function. - static BlockAddress *get(BasicBlock *BB); - - /// Lookup an existing \c BlockAddress constant for the given BasicBlock. - /// - /// \returns 0 if \c !BB->hasAddressTaken(), otherwise the \c BlockAddress. - static BlockAddress *lookup(const BasicBlock *BB); - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - Function *getFunction() const { return (Function*)Op<0>().get(); } - BasicBlock *getBasicBlock() const { return (BasicBlock*)Op<1>().get(); } - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == BlockAddressVal; - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BlockAddress, Value) - - -//===----------------------------------------------------------------------===// -/// A constant value that is initialized with an expression using -/// other constant values. -/// -/// This class uses the standard Instruction opcodes to define the various -/// constant expressions. The Opcode field for the ConstantExpr class is -/// maintained in the Value::SubclassData field. -class ConstantExpr : public Constant { - friend struct ConstantExprKeyType; - - friend class Constant; - void destroyConstantImpl(); - Value *handleOperandChangeImpl(Value *From, Value *To); - -protected: - ConstantExpr(Type *ty, unsigned Opcode, Use *Ops, unsigned NumOps) - : Constant(ty, ConstantExprVal, Ops, NumOps) { - // Operation type (an Instruction opcode) is stored as the SubclassData. - setValueSubclassData(Opcode); - } - -public: - // Static methods to construct a ConstantExpr of different kinds. Note that - // these methods may return a object that is not an instance of the - // ConstantExpr class, because they will attempt to fold the constant - // expression into something simpler if possible. - - /// getAlignOf constant expr - computes the alignment of a type in a target - /// independent way (Note: the return type is an i64). - static Constant *getAlignOf(Type *Ty); - - /// getSizeOf constant expr - computes the (alloc) size of a type (in - /// address-units, not bits) in a target independent way (Note: the return - /// type is an i64). - /// - static Constant *getSizeOf(Type *Ty); - - /// getOffsetOf constant expr - computes the offset of a struct field in a - /// target independent way (Note: the return type is an i64). - /// - static Constant *getOffsetOf(StructType *STy, unsigned FieldNo); - - /// getOffsetOf constant expr - This is a generalized form of getOffsetOf, - /// which supports any aggregate type, and any Constant index. - /// - static Constant *getOffsetOf(Type *Ty, Constant *FieldNo); - - static Constant *getNeg(Constant *C, bool HasNUW = false, bool HasNSW =false); - static Constant *getFNeg(Constant *C); - static Constant *getNot(Constant *C); - static Constant *getAdd(Constant *C1, Constant *C2, - bool HasNUW = false, bool HasNSW = false); - static Constant *getFAdd(Constant *C1, Constant *C2); - static Constant *getSub(Constant *C1, Constant *C2, - bool HasNUW = false, bool HasNSW = false); - static Constant *getFSub(Constant *C1, Constant *C2); - static Constant *getMul(Constant *C1, Constant *C2, - bool HasNUW = false, bool HasNSW = false); - static Constant *getFMul(Constant *C1, Constant *C2); - static Constant *getUDiv(Constant *C1, Constant *C2, bool isExact = false); - static Constant *getSDiv(Constant *C1, Constant *C2, bool isExact = false); - static Constant *getFDiv(Constant *C1, Constant *C2); - static Constant *getURem(Constant *C1, Constant *C2); - static Constant *getSRem(Constant *C1, Constant *C2); - static Constant *getFRem(Constant *C1, Constant *C2); - static Constant *getAnd(Constant *C1, Constant *C2); - static Constant *getOr(Constant *C1, Constant *C2); - static Constant *getXor(Constant *C1, Constant *C2); - static Constant *getShl(Constant *C1, Constant *C2, - bool HasNUW = false, bool HasNSW = false); - static Constant *getLShr(Constant *C1, Constant *C2, bool isExact = false); - static Constant *getAShr(Constant *C1, Constant *C2, bool isExact = false); - static Constant *getTrunc(Constant *C, Type *Ty, bool OnlyIfReduced = false); - static Constant *getSExt(Constant *C, Type *Ty, bool OnlyIfReduced = false); - static Constant *getZExt(Constant *C, Type *Ty, bool OnlyIfReduced = false); - static Constant *getFPTrunc(Constant *C, Type *Ty, - bool OnlyIfReduced = false); - static Constant *getFPExtend(Constant *C, Type *Ty, - bool OnlyIfReduced = false); - static Constant *getUIToFP(Constant *C, Type *Ty, bool OnlyIfReduced = false); - static Constant *getSIToFP(Constant *C, Type *Ty, bool OnlyIfReduced = false); - static Constant *getFPToUI(Constant *C, Type *Ty, bool OnlyIfReduced = false); - static Constant *getFPToSI(Constant *C, Type *Ty, bool OnlyIfReduced = false); - static Constant *getPtrToInt(Constant *C, Type *Ty, - bool OnlyIfReduced = false); - static Constant *getIntToPtr(Constant *C, Type *Ty, - bool OnlyIfReduced = false); - static Constant *getBitCast(Constant *C, Type *Ty, - bool OnlyIfReduced = false); - static Constant *getAddrSpaceCast(Constant *C, Type *Ty, - bool OnlyIfReduced = false); - - static Constant *getNSWNeg(Constant *C) { return getNeg(C, false, true); } - static Constant *getNUWNeg(Constant *C) { return getNeg(C, true, false); } - static Constant *getNSWAdd(Constant *C1, Constant *C2) { - return getAdd(C1, C2, false, true); - } - static Constant *getNUWAdd(Constant *C1, Constant *C2) { - return getAdd(C1, C2, true, false); - } - static Constant *getNSWSub(Constant *C1, Constant *C2) { - return getSub(C1, C2, false, true); - } - static Constant *getNUWSub(Constant *C1, Constant *C2) { - return getSub(C1, C2, true, false); - } - static Constant *getNSWMul(Constant *C1, Constant *C2) { - return getMul(C1, C2, false, true); - } - static Constant *getNUWMul(Constant *C1, Constant *C2) { - return getMul(C1, C2, true, false); - } - static Constant *getNSWShl(Constant *C1, Constant *C2) { - return getShl(C1, C2, false, true); - } - static Constant *getNUWShl(Constant *C1, Constant *C2) { - return getShl(C1, C2, true, false); - } - static Constant *getExactSDiv(Constant *C1, Constant *C2) { - return getSDiv(C1, C2, true); - } - static Constant *getExactUDiv(Constant *C1, Constant *C2) { - return getUDiv(C1, C2, true); - } - static Constant *getExactAShr(Constant *C1, Constant *C2) { - return getAShr(C1, C2, true); - } - static Constant *getExactLShr(Constant *C1, Constant *C2) { - return getLShr(C1, C2, true); - } - - /// Return the identity for the given binary operation, - /// i.e. a constant C such that X op C = X and C op X = X for every X. It - /// returns null if the operator doesn't have an identity. - static Constant *getBinOpIdentity(unsigned Opcode, Type *Ty); - - /// Return the absorbing element for the given binary - /// operation, i.e. a constant C such that X op C = C and C op X = C for - /// every X. For example, this returns zero for integer multiplication. - /// It returns null if the operator doesn't have an absorbing element. - static Constant *getBinOpAbsorber(unsigned Opcode, Type *Ty); - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant); - - /// \brief Convenience function for getting a Cast operation. - /// - /// \param ops The opcode for the conversion - /// \param C The constant to be converted - /// \param Ty The type to which the constant is converted - /// \param OnlyIfReduced see \a getWithOperands() docs. - static Constant *getCast(unsigned ops, Constant *C, Type *Ty, - bool OnlyIfReduced = false); - - // @brief Create a ZExt or BitCast cast constant expression - static Constant *getZExtOrBitCast( - Constant *C, ///< The constant to zext or bitcast - Type *Ty ///< The type to zext or bitcast C to - ); - - // @brief Create a SExt or BitCast cast constant expression - static Constant *getSExtOrBitCast( - Constant *C, ///< The constant to sext or bitcast - Type *Ty ///< The type to sext or bitcast C to - ); - - // @brief Create a Trunc or BitCast cast constant expression - static Constant *getTruncOrBitCast( - Constant *C, ///< The constant to trunc or bitcast - Type *Ty ///< The type to trunc or bitcast C to - ); - - /// @brief Create a BitCast, AddrSpaceCast, or a PtrToInt cast constant - /// expression. - static Constant *getPointerCast( - Constant *C, ///< The pointer value to be casted (operand 0) - Type *Ty ///< The type to which cast should be made - ); - - /// @brief Create a BitCast or AddrSpaceCast for a pointer type depending on - /// the address space. - static Constant *getPointerBitCastOrAddrSpaceCast( - Constant *C, ///< The constant to addrspacecast or bitcast - Type *Ty ///< The type to bitcast or addrspacecast C to - ); - - /// @brief Create a ZExt, Bitcast or Trunc for integer -> integer casts - static Constant *getIntegerCast( - Constant *C, ///< The integer constant to be casted - Type *Ty, ///< The integer type to cast to - bool isSigned ///< Whether C should be treated as signed or not - ); - - /// @brief Create a FPExt, Bitcast or FPTrunc for fp -> fp casts - static Constant *getFPCast( - Constant *C, ///< The integer constant to be casted - Type *Ty ///< The integer type to cast to - ); - - /// @brief Return true if this is a convert constant expression - bool isCast() const; - - /// @brief Return true if this is a compare constant expression - bool isCompare() const; - - /// @brief Return true if this is an insertvalue or extractvalue expression, - /// and the getIndices() method may be used. - bool hasIndices() const; - - /// @brief Return true if this is a getelementptr expression and all - /// the index operands are compile-time known integers within the - /// corresponding notional static array extents. Note that this is - /// not equivalant to, a subset of, or a superset of the "inbounds" - /// property. - bool isGEPWithNoNotionalOverIndexing() const; - - /// Select constant expr - /// - /// \param OnlyIfReducedTy see \a getWithOperands() docs. - static Constant *getSelect(Constant *C, Constant *V1, Constant *V2, - Type *OnlyIfReducedTy = nullptr); - - /// get - Return a binary or shift operator constant expression, - /// folding if possible. - /// - /// \param OnlyIfReducedTy see \a getWithOperands() docs. - static Constant *get(unsigned Opcode, Constant *C1, Constant *C2, - unsigned Flags = 0, Type *OnlyIfReducedTy = nullptr); - - /// \brief Return an ICmp or FCmp comparison operator constant expression. - /// - /// \param OnlyIfReduced see \a getWithOperands() docs. - static Constant *getCompare(unsigned short pred, Constant *C1, Constant *C2, - bool OnlyIfReduced = false); - - /// get* - Return some common constants without having to - /// specify the full Instruction::OPCODE identifier. - /// - static Constant *getICmp(unsigned short pred, Constant *LHS, Constant *RHS, - bool OnlyIfReduced = false); - static Constant *getFCmp(unsigned short pred, Constant *LHS, Constant *RHS, - bool OnlyIfReduced = false); - - /// Getelementptr form. Value* is only accepted for convenience; - /// all elements must be Constants. - /// - /// \param OnlyIfReducedTy see \a getWithOperands() docs. - static Constant *getGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList, - bool InBounds = false, - Type *OnlyIfReducedTy = nullptr) { - return getGetElementPtr( - Ty, C, makeArrayRef((Value * const *)IdxList.data(), IdxList.size()), - InBounds, OnlyIfReducedTy); - } - static Constant *getGetElementPtr(Type *Ty, Constant *C, Constant *Idx, - bool InBounds = false, - Type *OnlyIfReducedTy = nullptr) { - // This form of the function only exists to avoid ambiguous overload - // warnings about whether to convert Idx to ArrayRef or - // ArrayRef. - return getGetElementPtr(Ty, C, cast(Idx), InBounds, OnlyIfReducedTy); - } - static Constant *getGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList, - bool InBounds = false, - Type *OnlyIfReducedTy = nullptr); - - /// Create an "inbounds" getelementptr. See the documentation for the - /// "inbounds" flag in LangRef.html for details. - static Constant *getInBoundsGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) { - return getGetElementPtr(Ty, C, IdxList, true); - } - static Constant *getInBoundsGetElementPtr(Type *Ty, Constant *C, - Constant *Idx) { - // This form of the function only exists to avoid ambiguous overload - // warnings about whether to convert Idx to ArrayRef or - // ArrayRef. - return getGetElementPtr(Ty, C, Idx, true); - } - static Constant *getInBoundsGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) { - return getGetElementPtr(Ty, C, IdxList, true); - } - - static Constant *getExtractElement(Constant *Vec, Constant *Idx, - Type *OnlyIfReducedTy = nullptr); - static Constant *getInsertElement(Constant *Vec, Constant *Elt, Constant *Idx, - Type *OnlyIfReducedTy = nullptr); - static Constant *getShuffleVector(Constant *V1, Constant *V2, Constant *Mask, - Type *OnlyIfReducedTy = nullptr); - static Constant *getExtractValue(Constant *Agg, ArrayRef Idxs, - Type *OnlyIfReducedTy = nullptr); - static Constant *getInsertValue(Constant *Agg, Constant *Val, - ArrayRef Idxs, - Type *OnlyIfReducedTy = nullptr); - - /// Return the opcode at the root of this constant expression - unsigned getOpcode() const { return getSubclassDataFromValue(); } - - /// Return the ICMP or FCMP predicate value. Assert if this is not an ICMP or - /// FCMP constant expression. - unsigned getPredicate() const; - - /// Assert that this is an insertvalue or exactvalue - /// expression and return the list of indices. - ArrayRef getIndices() const; - - /// Return a string representation for an opcode. - const char *getOpcodeName() const; - - /// Return a constant expression identical to this one, but with the specified - /// operand set to the specified value. - Constant *getWithOperandReplaced(unsigned OpNo, Constant *Op) const; - - /// This returns the current constant expression with the operands replaced - /// with the specified values. The specified array must have the same number - /// of operands as our current one. - Constant *getWithOperands(ArrayRef Ops) const { - return getWithOperands(Ops, getType()); - } - - /// Get the current expression with the operands replaced. - /// - /// Return the current constant expression with the operands replaced with \c - /// Ops and the type with \c Ty. The new operands must have the same number - /// as the current ones. - /// - /// If \c OnlyIfReduced is \c true, nullptr will be returned unless something - /// gets constant-folded, the type changes, or the expression is otherwise - /// canonicalized. This parameter should almost always be \c false. - Constant *getWithOperands(ArrayRef Ops, Type *Ty, - bool OnlyIfReduced = false, - Type *SrcTy = nullptr) const; - - /// Returns an Instruction which implements the same operation as this - /// ConstantExpr. The instruction is not linked to any basic block. - /// - /// A better approach to this could be to have a constructor for Instruction - /// which would take a ConstantExpr parameter, but that would have spread - /// implementation details of ConstantExpr outside of Constants.cpp, which - /// would make it harder to remove ConstantExprs altogether. - Instruction *getAsInstruction(); - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == ConstantExprVal; - } - -private: - // Shadow Value::setValueSubclassData with a private forwarding method so that - // subclasses cannot accidentally use it. - void setValueSubclassData(unsigned short D) { - Value::setValueSubclassData(D); - } -}; - -template <> -struct OperandTraits : - public VariadicOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantExpr, Constant) - -//===----------------------------------------------------------------------===// -/// 'undef' values are things that do not have specified contents. -/// These are used for a variety of purposes, including global variable -/// initializers and operands to instructions. 'undef' values can occur with -/// any first-class type. -/// -/// Undef values aren't exactly constants; if they have multiple uses, they -/// can appear to have different bit patterns at each use. See -/// LangRef.html#undefvalues for details. -/// -class UndefValue final : public ConstantData { - UndefValue(const UndefValue &) = delete; - - friend class Constant; - void destroyConstantImpl(); - - explicit UndefValue(Type *T) : ConstantData(T, UndefValueVal) {} - -public: - /// Static factory methods - Return an 'undef' object of the specified type. - static UndefValue *get(Type *T); - - /// If this Undef has array or vector type, return a undef with the right - /// element type. - UndefValue *getSequentialElement() const; - - /// If this undef has struct type, return a undef with the right element type - /// for the specified element. - UndefValue *getStructElement(unsigned Elt) const; - - /// Return an undef of the right value for the specified GEP index if we can, - /// otherwise return null (e.g. if C is a ConstantExpr). - UndefValue *getElementValue(Constant *C) const; - - /// Return an undef of the right value for the specified GEP index. - UndefValue *getElementValue(unsigned Idx) const; - - /// Return the number of elements in the array, vector, or struct. - unsigned getNumElements() const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == UndefValueVal; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/DIBuilder.h b/llvm/include/llvm/IR/DIBuilder.h deleted file mode 100644 index 0f2f67f5..00000000 --- a/llvm/include/llvm/IR/DIBuilder.h +++ /dev/null @@ -1,731 +0,0 @@ -//===- DIBuilder.h - Debug Information Builder ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a DIBuilder that is useful for creating debugging -// information entries in LLVM IR form. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DIBUILDER_H -#define LLVM_IR_DIBUILDER_H - -#include "llvm/IR/DebugInfo.h" -#include "llvm/IR/TrackingMDRef.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - class BasicBlock; - class Instruction; - class Function; - class Module; - class Value; - class Constant; - class LLVMContext; - class StringRef; - template class ArrayRef; - - class DIBuilder { - Module &M; - LLVMContext &VMContext; - - DICompileUnit *CUNode; ///< The one compile unit created by this DIBuiler. - Function *DeclareFn; ///< llvm.dbg.declare - Function *ValueFn; ///< llvm.dbg.value - - SmallVector AllEnumTypes; - /// Track the RetainTypes, since they can be updated later on. - SmallVector AllRetainTypes; - SmallVector AllSubprograms; - SmallVector AllGVs; - SmallVector AllImportedModules; - - /// Track nodes that may be unresolved. - SmallVector UnresolvedNodes; - bool AllowUnresolvedNodes; - - /// Each subprogram's preserved local variables. - /// - /// Do not use a std::vector. Some versions of libc++ apparently copy - /// instead of move on grow operations, and TrackingMDRef is expensive to - /// copy. - DenseMap> PreservedVariables; - - DIBuilder(const DIBuilder &) = delete; - void operator=(const DIBuilder &) = delete; - - /// Create a temporary. - /// - /// Create an \a temporary node and track it in \a UnresolvedNodes. - void trackIfUnresolved(MDNode *N); - - public: - /// Construct a builder for a module. - /// - /// If \c AllowUnresolved, collect unresolved nodes attached to the module - /// in order to resolve cycles during \a finalize(). - explicit DIBuilder(Module &M, bool AllowUnresolved = true); - - /// Construct any deferred debug info descriptors. - void finalize(); - - /// A CompileUnit provides an anchor for all debugging - /// information generated during this instance of compilation. - /// \param Lang Source programming language, eg. dwarf::DW_LANG_C99 - /// \param File File name - /// \param Dir Directory - /// \param Producer Identify the producer of debugging information - /// and code. Usually this is a compiler - /// version string. - /// \param isOptimized A boolean flag which indicates whether optimization - /// is enabled or not. - /// \param Flags This string lists command line options. This - /// string is directly embedded in debug info - /// output which may be used by a tool - /// analyzing generated debugging information. - /// \param RV This indicates runtime version for languages like - /// Objective-C. - /// \param SplitName The name of the file that we'll split debug info - /// out into. - /// \param Kind The kind of debug information to generate. - /// \param DWOId The DWOId if this is a split skeleton compile unit. - DICompileUnit * - createCompileUnit(unsigned Lang, StringRef File, StringRef Dir, - StringRef Producer, bool isOptimized, StringRef Flags, - unsigned RV, StringRef SplitName = StringRef(), - DICompileUnit::DebugEmissionKind Kind = - DICompileUnit::DebugEmissionKind::FullDebug, - uint64_t DWOId = 0); - - /// Create a file descriptor to hold debugging information - /// for a file. - DIFile *createFile(StringRef Filename, StringRef Directory); - - /// Create a single enumerator value. - DIEnumerator *createEnumerator(StringRef Name, int64_t Val); - - /// Create a DWARF unspecified type. - DIBasicType *createUnspecifiedType(StringRef Name); - - /// Create C++11 nullptr type. - DIBasicType *createNullPtrType(); - - /// Create debugging information entry for a basic - /// type. - /// \param Name Type name. - /// \param SizeInBits Size of the type. - /// \param AlignInBits Type alignment. - /// \param Encoding DWARF encoding code, e.g. dwarf::DW_ATE_float. - DIBasicType *createBasicType(StringRef Name, uint64_t SizeInBits, - uint64_t AlignInBits, unsigned Encoding); - - /// Create debugging information entry for a qualified - /// type, e.g. 'const int'. - /// \param Tag Tag identifing type, e.g. dwarf::TAG_volatile_type - /// \param FromTy Base Type. - DIDerivedType *createQualifiedType(unsigned Tag, DIType *FromTy); - - /// Create debugging information entry for a pointer. - /// \param PointeeTy Type pointed by this pointer. - /// \param SizeInBits Size. - /// \param AlignInBits Alignment. (optional) - /// \param Name Pointer type name. (optional) - DIDerivedType *createPointerType(DIType *PointeeTy, uint64_t SizeInBits, - uint64_t AlignInBits = 0, - StringRef Name = ""); - - /// Create debugging information entry for a pointer to member. - /// \param PointeeTy Type pointed to by this pointer. - /// \param SizeInBits Size. - /// \param AlignInBits Alignment. (optional) - /// \param Class Type for which this pointer points to members of. - DIDerivedType *createMemberPointerType(DIType *PointeeTy, DIType *Class, - uint64_t SizeInBits, - uint64_t AlignInBits = 0, - unsigned Flags = 0); - - /// Create debugging information entry for a c++ - /// style reference or rvalue reference type. - DIDerivedType *createReferenceType(unsigned Tag, DIType *RTy, - uint64_t SizeInBits = 0, - uint64_t AlignInBits = 0); - - /// Create debugging information entry for a typedef. - /// \param Ty Original type. - /// \param Name Typedef name. - /// \param File File where this type is defined. - /// \param LineNo Line number. - /// \param Context The surrounding context for the typedef. - DIDerivedType *createTypedef(DIType *Ty, StringRef Name, DIFile *File, - unsigned LineNo, DIScope *Context); - - /// Create debugging information entry for a 'friend'. - DIDerivedType *createFriend(DIType *Ty, DIType *FriendTy); - - /// Create debugging information entry to establish - /// inheritance relationship between two types. - /// \param Ty Original type. - /// \param BaseTy Base type. Ty is inherits from base. - /// \param BaseOffset Base offset. - /// \param Flags Flags to describe inheritance attribute, - /// e.g. private - DIDerivedType *createInheritance(DIType *Ty, DIType *BaseTy, - uint64_t BaseOffset, unsigned Flags); - - /// Create debugging information entry for a member. - /// \param Scope Member scope. - /// \param Name Member name. - /// \param File File where this member is defined. - /// \param LineNo Line number. - /// \param SizeInBits Member size. - /// \param AlignInBits Member alignment. - /// \param OffsetInBits Member offset. - /// \param Flags Flags to encode member attribute, e.g. private - /// \param Ty Parent type. - DIDerivedType *createMemberType(DIScope *Scope, StringRef Name, - DIFile *File, unsigned LineNo, - uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, - DIType *Ty); - - /// Create debugging information entry for a bit field member. - /// \param Scope Member scope. - /// \param Name Member name. - /// \param File File where this member is defined. - /// \param LineNo Line number. - /// \param SizeInBits Member size. - /// \param AlignInBits Member alignment. - /// \param OffsetInBits Member offset. - /// \param StorageOffsetInBits Member storage offset. - /// \param Flags Flags to encode member attribute. - /// \param Ty Parent type. - DIDerivedType *createBitFieldMemberType( - DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo, - uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, - uint64_t StorageOffsetInBits, unsigned Flags, DIType *Ty); - - /// Create debugging information entry for a - /// C++ static data member. - /// \param Scope Member scope. - /// \param Name Member name. - /// \param File File where this member is declared. - /// \param LineNo Line number. - /// \param Ty Type of the static member. - /// \param Flags Flags to encode member attribute, e.g. private. - /// \param Val Const initializer of the member. - DIDerivedType *createStaticMemberType(DIScope *Scope, StringRef Name, - DIFile *File, unsigned LineNo, - DIType *Ty, unsigned Flags, - llvm::Constant *Val); - - /// Create debugging information entry for Objective-C - /// instance variable. - /// \param Name Member name. - /// \param File File where this member is defined. - /// \param LineNo Line number. - /// \param SizeInBits Member size. - /// \param AlignInBits Member alignment. - /// \param OffsetInBits Member offset. - /// \param Flags Flags to encode member attribute, e.g. private - /// \param Ty Parent type. - /// \param PropertyNode Property associated with this ivar. - DIDerivedType *createObjCIVar(StringRef Name, DIFile *File, unsigned LineNo, - uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, - DIType *Ty, MDNode *PropertyNode); - - /// Create debugging information entry for Objective-C - /// property. - /// \param Name Property name. - /// \param File File where this property is defined. - /// \param LineNumber Line number. - /// \param GetterName Name of the Objective C property getter selector. - /// \param SetterName Name of the Objective C property setter selector. - /// \param PropertyAttributes Objective C property attributes. - /// \param Ty Type. - DIObjCProperty *createObjCProperty(StringRef Name, DIFile *File, - unsigned LineNumber, - StringRef GetterName, - StringRef SetterName, - unsigned PropertyAttributes, DIType *Ty); - - /// Create debugging information entry for a class. - /// \param Scope Scope in which this class is defined. - /// \param Name class name. - /// \param File File where this member is defined. - /// \param LineNumber Line number. - /// \param SizeInBits Member size. - /// \param AlignInBits Member alignment. - /// \param OffsetInBits Member offset. - /// \param Flags Flags to encode member attribute, e.g. private - /// \param Elements class members. - /// \param VTableHolder Debug info of the base class that contains vtable - /// for this type. This is used in - /// DW_AT_containing_type. See DWARF documentation - /// for more info. - /// \param TemplateParms Template type parameters. - /// \param UniqueIdentifier A unique identifier for the class. - DICompositeType *createClassType(DIScope *Scope, StringRef Name, - DIFile *File, unsigned LineNumber, - uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, - DIType *DerivedFrom, DINodeArray Elements, - DIType *VTableHolder = nullptr, - MDNode *TemplateParms = nullptr, - StringRef UniqueIdentifier = ""); - - /// Create debugging information entry for a struct. - /// \param Scope Scope in which this struct is defined. - /// \param Name Struct name. - /// \param File File where this member is defined. - /// \param LineNumber Line number. - /// \param SizeInBits Member size. - /// \param AlignInBits Member alignment. - /// \param Flags Flags to encode member attribute, e.g. private - /// \param Elements Struct elements. - /// \param RunTimeLang Optional parameter, Objective-C runtime version. - /// \param UniqueIdentifier A unique identifier for the struct. - DICompositeType *createStructType( - DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, - uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags, - DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang = 0, - DIType *VTableHolder = nullptr, StringRef UniqueIdentifier = ""); - - /// Create debugging information entry for an union. - /// \param Scope Scope in which this union is defined. - /// \param Name Union name. - /// \param File File where this member is defined. - /// \param LineNumber Line number. - /// \param SizeInBits Member size. - /// \param AlignInBits Member alignment. - /// \param Flags Flags to encode member attribute, e.g. private - /// \param Elements Union elements. - /// \param RunTimeLang Optional parameter, Objective-C runtime version. - /// \param UniqueIdentifier A unique identifier for the union. - DICompositeType *createUnionType(DIScope *Scope, StringRef Name, - DIFile *File, unsigned LineNumber, - uint64_t SizeInBits, uint64_t AlignInBits, - unsigned Flags, DINodeArray Elements, - unsigned RunTimeLang = 0, - StringRef UniqueIdentifier = ""); - - /// Create debugging information for template - /// type parameter. - /// \param Scope Scope in which this type is defined. - /// \param Name Type parameter name. - /// \param Ty Parameter type. - DITemplateTypeParameter * - createTemplateTypeParameter(DIScope *Scope, StringRef Name, DIType *Ty); - - /// Create debugging information for template - /// value parameter. - /// \param Scope Scope in which this type is defined. - /// \param Name Value parameter name. - /// \param Ty Parameter type. - /// \param Val Constant parameter value. - DITemplateValueParameter *createTemplateValueParameter(DIScope *Scope, - StringRef Name, - DIType *Ty, - Constant *Val); - - /// Create debugging information for a template template parameter. - /// \param Scope Scope in which this type is defined. - /// \param Name Value parameter name. - /// \param Ty Parameter type. - /// \param Val The fully qualified name of the template. - DITemplateValueParameter *createTemplateTemplateParameter(DIScope *Scope, - StringRef Name, - DIType *Ty, - StringRef Val); - - /// Create debugging information for a template parameter pack. - /// \param Scope Scope in which this type is defined. - /// \param Name Value parameter name. - /// \param Ty Parameter type. - /// \param Val An array of types in the pack. - DITemplateValueParameter *createTemplateParameterPack(DIScope *Scope, - StringRef Name, - DIType *Ty, - DINodeArray Val); - - /// Create debugging information entry for an array. - /// \param Size Array size. - /// \param AlignInBits Alignment. - /// \param Ty Element type. - /// \param Subscripts Subscripts. - DICompositeType *createArrayType(uint64_t Size, uint64_t AlignInBits, - DIType *Ty, DINodeArray Subscripts); - - /// Create debugging information entry for a vector type. - /// \param Size Array size. - /// \param AlignInBits Alignment. - /// \param Ty Element type. - /// \param Subscripts Subscripts. - DICompositeType *createVectorType(uint64_t Size, uint64_t AlignInBits, - DIType *Ty, DINodeArray Subscripts); - - /// Create debugging information entry for an - /// enumeration. - /// \param Scope Scope in which this enumeration is defined. - /// \param Name Union name. - /// \param File File where this member is defined. - /// \param LineNumber Line number. - /// \param SizeInBits Member size. - /// \param AlignInBits Member alignment. - /// \param Elements Enumeration elements. - /// \param UnderlyingType Underlying type of a C++11/ObjC fixed enum. - /// \param UniqueIdentifier A unique identifier for the enum. - DICompositeType *createEnumerationType( - DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, - uint64_t SizeInBits, uint64_t AlignInBits, DINodeArray Elements, - DIType *UnderlyingType, StringRef UniqueIdentifier = ""); - - /// Create subroutine type. - /// \param ParameterTypes An array of subroutine parameter types. This - /// includes return type at 0th index. - /// \param Flags E.g.: LValueReference. - /// These flags are used to emit dwarf attributes. - /// \param CC Calling convention, e.g. dwarf::DW_CC_normal - DISubroutineType *createSubroutineType(DITypeRefArray ParameterTypes, - unsigned Flags = 0, unsigned CC = 0); - - /// Create an external type reference. - /// \param Tag Dwarf TAG. - /// \param File File in which the type is defined. - /// \param UniqueIdentifier A unique identifier for the type. - DICompositeType *createExternalTypeRef(unsigned Tag, DIFile *File, - StringRef UniqueIdentifier); - - /// Create a new DIType* with "artificial" flag set. - DIType *createArtificialType(DIType *Ty); - - /// Create a new DIType* with the "object pointer" - /// flag set. - DIType *createObjectPointerType(DIType *Ty); - - /// Create a permanent forward-declared type. - DICompositeType *createForwardDecl(unsigned Tag, StringRef Name, - DIScope *Scope, DIFile *F, unsigned Line, - unsigned RuntimeLang = 0, - uint64_t SizeInBits = 0, - uint64_t AlignInBits = 0, - StringRef UniqueIdentifier = ""); - - /// Create a temporary forward-declared type. - DICompositeType *createReplaceableCompositeType( - unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line, - unsigned RuntimeLang = 0, uint64_t SizeInBits = 0, - uint64_t AlignInBits = 0, unsigned Flags = DINode::FlagFwdDecl, - StringRef UniqueIdentifier = ""); - - /// Retain DIScope* in a module even if it is not referenced - /// through debug info anchors. - void retainType(DIScope *T); - - /// Create unspecified parameter type - /// for a subroutine type. - DIBasicType *createUnspecifiedParameter(); - - /// Get a DINodeArray, create one if required. - DINodeArray getOrCreateArray(ArrayRef Elements); - - /// Get a DITypeRefArray, create one if required. - DITypeRefArray getOrCreateTypeArray(ArrayRef Elements); - - /// Create a descriptor for a value range. This - /// implicitly uniques the values returned. - DISubrange *getOrCreateSubrange(int64_t Lo, int64_t Count); - - /// Create a new descriptor for the specified - /// variable. - /// \param Context Variable scope. - /// \param Name Name of the variable. - /// \param LinkageName Mangled name of the variable. - /// \param File File where this variable is defined. - /// \param LineNo Line number. - /// \param Ty Variable Type. - /// \param isLocalToUnit Boolean flag indicate whether this variable is - /// externally visible or not. - /// \param Val llvm::Value of the variable. - /// \param Decl Reference to the corresponding declaration. - DIGlobalVariable *createGlobalVariable(DIScope *Context, StringRef Name, - StringRef LinkageName, DIFile *File, - unsigned LineNo, DIType *Ty, - bool isLocalToUnit, - llvm::Constant *Val, - MDNode *Decl = nullptr); - - /// Identical to createGlobalVariable - /// except that the resulting DbgNode is temporary and meant to be RAUWed. - DIGlobalVariable *createTempGlobalVariableFwdDecl( - DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *File, - unsigned LineNo, DIType *Ty, bool isLocalToUnit, llvm::Constant *Val, - MDNode *Decl = nullptr); - - /// Create a new descriptor for an auto variable. This is a local variable - /// that is not a subprogram parameter. - /// - /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually - /// leads to a \a DISubprogram. - /// - /// If \c AlwaysPreserve, this variable will be referenced from its - /// containing subprogram, and will survive some optimizations. - DILocalVariable *createAutoVariable(DIScope *Scope, StringRef Name, - DIFile *File, unsigned LineNo, - DIType *Ty, - bool AlwaysPreserve = false, - unsigned Flags = 0); - - /// Create a new descriptor for a parameter variable. - /// - /// \c Scope must be a \a DILocalScope, and thus its scope chain eventually - /// leads to a \a DISubprogram. - /// - /// \c ArgNo is the index (starting from \c 1) of this variable in the - /// subprogram parameters. \c ArgNo should not conflict with other - /// parameters of the same subprogram. - /// - /// If \c AlwaysPreserve, this variable will be referenced from its - /// containing subprogram, and will survive some optimizations. - DILocalVariable *createParameterVariable(DIScope *Scope, StringRef Name, - unsigned ArgNo, DIFile *File, - unsigned LineNo, DIType *Ty, - bool AlwaysPreserve = false, - unsigned Flags = 0); - - /// Create a new descriptor for the specified - /// variable which has a complex address expression for its address. - /// \param Addr An array of complex address operations. - DIExpression *createExpression(ArrayRef Addr = None); - DIExpression *createExpression(ArrayRef Addr); - - /// Create a descriptor to describe one part - /// of aggregate variable that is fragmented across multiple Values. - /// - /// \param OffsetInBits Offset of the piece in bits. - /// \param SizeInBits Size of the piece in bits. - DIExpression *createBitPieceExpression(unsigned OffsetInBits, - unsigned SizeInBits); - - /// Create a new descriptor for the specified subprogram. - /// See comments in DISubprogram* for descriptions of these fields. - /// \param Scope Function scope. - /// \param Name Function name. - /// \param LinkageName Mangled function name. - /// \param File File where this variable is defined. - /// \param LineNo Line number. - /// \param Ty Function type. - /// \param isLocalToUnit True if this function is not externally visible. - /// \param isDefinition True if this is a function definition. - /// \param ScopeLine Set to the beginning of the scope this starts - /// \param Flags e.g. is this function prototyped or not. - /// These flags are used to emit dwarf attributes. - /// \param isOptimized True if optimization is ON. - /// \param TParams Function template parameters. - DISubprogram *createFunction(DIScope *Scope, StringRef Name, - StringRef LinkageName, DIFile *File, - unsigned LineNo, DISubroutineType *Ty, - bool isLocalToUnit, bool isDefinition, - unsigned ScopeLine, unsigned Flags = 0, - bool isOptimized = false, - DITemplateParameterArray TParams = nullptr, - DISubprogram *Decl = nullptr); - - /// Identical to createFunction, - /// except that the resulting DbgNode is meant to be RAUWed. - DISubprogram *createTempFunctionFwdDecl( - DIScope *Scope, StringRef Name, StringRef LinkageName, DIFile *File, - unsigned LineNo, DISubroutineType *Ty, bool isLocalToUnit, - bool isDefinition, unsigned ScopeLine, unsigned Flags = 0, - bool isOptimized = false, DITemplateParameterArray TParams = nullptr, - DISubprogram *Decl = nullptr); - - /// Create a new descriptor for the specified C++ method. - /// See comments in \a DISubprogram* for descriptions of these fields. - /// \param Scope Function scope. - /// \param Name Function name. - /// \param LinkageName Mangled function name. - /// \param File File where this variable is defined. - /// \param LineNo Line number. - /// \param Ty Function type. - /// \param isLocalToUnit True if this function is not externally visible.. - /// \param isDefinition True if this is a function definition. - /// \param Virtuality Attributes describing virtualness. e.g. pure - /// virtual function. - /// \param VTableIndex Index no of this method in virtual table, or -1u if - /// unrepresentable. - /// \param ThisAdjustment - /// MS ABI-specific adjustment of 'this' that occurs - /// in the prologue. - /// \param VTableHolder Type that holds vtable. - /// \param Flags e.g. is this function prototyped or not. - /// This flags are used to emit dwarf attributes. - /// \param isOptimized True if optimization is ON. - /// \param TParams Function template parameters. - DISubprogram * - createMethod(DIScope *Scope, StringRef Name, StringRef LinkageName, - DIFile *File, unsigned LineNo, DISubroutineType *Ty, - bool isLocalToUnit, bool isDefinition, unsigned Virtuality = 0, - unsigned VTableIndex = 0, int ThisAdjustment = 0, - DIType *VTableHolder = nullptr, unsigned Flags = 0, - bool isOptimized = false, - DITemplateParameterArray TParams = nullptr); - - /// This creates new descriptor for a namespace with the specified - /// parent scope. - /// \param Scope Namespace scope - /// \param Name Name of this namespace - /// \param File Source file - /// \param LineNo Line number - DINamespace *createNameSpace(DIScope *Scope, StringRef Name, DIFile *File, - unsigned LineNo); - - /// This creates new descriptor for a module with the specified - /// parent scope. - /// \param Scope Parent scope - /// \param Name Name of this module - /// \param ConfigurationMacros - /// A space-separated shell-quoted list of -D macro - /// definitions as they would appear on a command line. - /// \param IncludePath The path to the module map file. - /// \param ISysRoot The clang system root (value of -isysroot). - DIModule *createModule(DIScope *Scope, StringRef Name, - StringRef ConfigurationMacros, - StringRef IncludePath, - StringRef ISysRoot); - - /// This creates a descriptor for a lexical block with a new file - /// attached. This merely extends the existing - /// lexical block as it crosses a file. - /// \param Scope Lexical block. - /// \param File Source file. - /// \param Discriminator DWARF path discriminator value. - DILexicalBlockFile *createLexicalBlockFile(DIScope *Scope, DIFile *File, - unsigned Discriminator = 0); - - /// This creates a descriptor for a lexical block with the - /// specified parent context. - /// \param Scope Parent lexical scope. - /// \param File Source file. - /// \param Line Line number. - /// \param Col Column number. - DILexicalBlock *createLexicalBlock(DIScope *Scope, DIFile *File, - unsigned Line, unsigned Col); - - /// Create a descriptor for an imported module. - /// \param Context The scope this module is imported into - /// \param NS The namespace being imported here - /// \param Line Line number - DIImportedEntity *createImportedModule(DIScope *Context, DINamespace *NS, - unsigned Line); - - /// Create a descriptor for an imported module. - /// \param Context The scope this module is imported into - /// \param NS An aliased namespace - /// \param Line Line number - DIImportedEntity *createImportedModule(DIScope *Context, - DIImportedEntity *NS, unsigned Line); - - /// Create a descriptor for an imported module. - /// \param Context The scope this module is imported into - /// \param M The module being imported here - /// \param Line Line number - DIImportedEntity *createImportedModule(DIScope *Context, DIModule *M, - unsigned Line); - - /// Create a descriptor for an imported function. - /// \param Context The scope this module is imported into - /// \param Decl The declaration (or definition) of a function, type, or - /// variable - /// \param Line Line number - DIImportedEntity *createImportedDeclaration(DIScope *Context, DINode *Decl, - unsigned Line, - StringRef Name = ""); - - /// Insert a new llvm.dbg.declare intrinsic call. - /// \param Storage llvm::Value of the variable - /// \param VarInfo Variable's debug info descriptor. - /// \param Expr A complex location expression. - /// \param DL Debug info location. - /// \param InsertAtEnd Location for the new intrinsic. - Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo, - DIExpression *Expr, const DILocation *DL, - BasicBlock *InsertAtEnd); - - /// Insert a new llvm.dbg.declare intrinsic call. - /// \param Storage llvm::Value of the variable - /// \param VarInfo Variable's debug info descriptor. - /// \param Expr A complex location expression. - /// \param DL Debug info location. - /// \param InsertBefore Location for the new intrinsic. - Instruction *insertDeclare(llvm::Value *Storage, DILocalVariable *VarInfo, - DIExpression *Expr, const DILocation *DL, - Instruction *InsertBefore); - - /// Insert a new llvm.dbg.value intrinsic call. - /// \param Val llvm::Value of the variable - /// \param Offset Offset - /// \param VarInfo Variable's debug info descriptor. - /// \param Expr A complex location expression. - /// \param DL Debug info location. - /// \param InsertAtEnd Location for the new intrinsic. - Instruction *insertDbgValueIntrinsic(llvm::Value *Val, uint64_t Offset, - DILocalVariable *VarInfo, - DIExpression *Expr, - const DILocation *DL, - BasicBlock *InsertAtEnd); - - /// Insert a new llvm.dbg.value intrinsic call. - /// \param Val llvm::Value of the variable - /// \param Offset Offset - /// \param VarInfo Variable's debug info descriptor. - /// \param Expr A complex location expression. - /// \param DL Debug info location. - /// \param InsertBefore Location for the new intrinsic. - Instruction *insertDbgValueIntrinsic(llvm::Value *Val, uint64_t Offset, - DILocalVariable *VarInfo, - DIExpression *Expr, - const DILocation *DL, - Instruction *InsertBefore); - - /// Replace the vtable holder in the given composite type. - /// - /// If this creates a self reference, it may orphan some unresolved cycles - /// in the operands of \c T, so \a DIBuilder needs to track that. - void replaceVTableHolder(DICompositeType *&T, - DICompositeType *VTableHolder); - - /// Replace arrays on a composite type. - /// - /// If \c T is resolved, but the arrays aren't -- which can happen if \c T - /// has a self-reference -- \a DIBuilder needs to track the array to - /// resolve cycles. - void replaceArrays(DICompositeType *&T, DINodeArray Elements, - DINodeArray TParams = DINodeArray()); - - /// Replace a temporary node. - /// - /// Call \a MDNode::replaceAllUsesWith() on \c N, replacing it with \c - /// Replacement. - /// - /// If \c Replacement is the same as \c N.get(), instead call \a - /// MDNode::replaceWithUniqued(). In this case, the uniqued node could - /// have a different address, so we return the final address. - template - NodeTy *replaceTemporary(TempMDNode &&N, NodeTy *Replacement) { - if (N.get() == Replacement) - return cast(MDNode::replaceWithUniqued(std::move(N))); - - N->replaceAllUsesWith(Replacement); - return Replacement; - } - }; -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/DataLayout.h b/llvm/include/llvm/IR/DataLayout.h deleted file mode 100644 index 173121b7..00000000 --- a/llvm/include/llvm/IR/DataLayout.h +++ /dev/null @@ -1,552 +0,0 @@ -//===--------- llvm/DataLayout.h - Data size & alignment info ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines layout properties related to datatype size/offset/alignment -// information. It uses lazy annotations to cache information about how -// structure types are laid out and used. -// -// This structure should be created once, filled in if the defaults are not -// correct and then passed around by const&. None of the members functions -// require modification to the object. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DATALAYOUT_H -#define LLVM_IR_DATALAYOUT_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/Type.h" -#include "llvm/Pass.h" -#include "llvm/Support/DataTypes.h" - -// This needs to be outside of the namespace, to avoid conflict with llvm-c -// decl. -typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef; - -namespace llvm { - -class Value; -class StructType; -class StructLayout; -class Triple; -class GlobalVariable; -class LLVMContext; -template -class ArrayRef; - -/// Enum used to categorize the alignment types stored by LayoutAlignElem -enum AlignTypeEnum { - INVALID_ALIGN = 0, - INTEGER_ALIGN = 'i', - VECTOR_ALIGN = 'v', - FLOAT_ALIGN = 'f', - AGGREGATE_ALIGN = 'a' -}; - -// FIXME: Currently the DataLayout string carries a "preferred alignment" -// for types. As the DataLayout is module/global, this should likely be -// sunk down to an FTTI element that is queried rather than a global -// preference. - -/// \brief Layout alignment element. -/// -/// Stores the alignment data associated with a given alignment type (integer, -/// vector, float) and type bit width. -/// -/// \note The unusual order of elements in the structure attempts to reduce -/// padding and make the structure slightly more cache friendly. -struct LayoutAlignElem { - /// \brief Alignment type from \c AlignTypeEnum - unsigned AlignType : 8; - unsigned TypeBitWidth : 24; - unsigned ABIAlign : 16; - unsigned PrefAlign : 16; - - static LayoutAlignElem get(AlignTypeEnum align_type, unsigned abi_align, - unsigned pref_align, uint32_t bit_width); - bool operator==(const LayoutAlignElem &rhs) const; -}; - -/// \brief Layout pointer alignment element. -/// -/// Stores the alignment data associated with a given pointer and address space. -/// -/// \note The unusual order of elements in the structure attempts to reduce -/// padding and make the structure slightly more cache friendly. -struct PointerAlignElem { - unsigned ABIAlign; - unsigned PrefAlign; - uint32_t TypeByteWidth; - uint32_t AddressSpace; - - /// Initializer - static PointerAlignElem get(uint32_t AddressSpace, unsigned ABIAlign, - unsigned PrefAlign, uint32_t TypeByteWidth); - bool operator==(const PointerAlignElem &rhs) const; -}; - -/// \brief A parsed version of the target data layout string in and methods for -/// querying it. -/// -/// The target data layout string is specified *by the target* - a frontend -/// generating LLVM IR is required to generate the right target data for the -/// target being codegen'd to. -class DataLayout { -private: - /// Defaults to false. - bool BigEndian; - - unsigned StackNaturalAlign; - - enum ManglingModeT { - MM_None, - MM_ELF, - MM_MachO, - MM_WinCOFF, - MM_WinCOFFX86, - MM_Mips - }; - ManglingModeT ManglingMode; - - SmallVector LegalIntWidths; - - /// \brief Primitive type alignment data. - SmallVector Alignments; - - /// \brief The string representation used to create this DataLayout - std::string StringRepresentation; - - typedef SmallVector PointersTy; - PointersTy Pointers; - - PointersTy::const_iterator - findPointerLowerBound(uint32_t AddressSpace) const { - return const_cast(this)->findPointerLowerBound(AddressSpace); - } - - PointersTy::iterator findPointerLowerBound(uint32_t AddressSpace); - - /// This member is a signal that a requested alignment type and bit width were - /// not found in the SmallVector. - static const LayoutAlignElem InvalidAlignmentElem; - - /// This member is a signal that a requested pointer type and bit width were - /// not found in the DenseSet. - static const PointerAlignElem InvalidPointerElem; - - // The StructType -> StructLayout map. - mutable void *LayoutMap; - - void setAlignment(AlignTypeEnum align_type, unsigned abi_align, - unsigned pref_align, uint32_t bit_width); - unsigned getAlignmentInfo(AlignTypeEnum align_type, uint32_t bit_width, - bool ABIAlign, Type *Ty) const; - void setPointerAlignment(uint32_t AddrSpace, unsigned ABIAlign, - unsigned PrefAlign, uint32_t TypeByteWidth); - - /// Internal helper method that returns requested alignment for type. - unsigned getAlignment(Type *Ty, bool abi_or_pref) const; - - /// \brief Valid alignment predicate. - /// - /// Predicate that tests a LayoutAlignElem reference returned by get() against - /// InvalidAlignmentElem. - bool validAlignment(const LayoutAlignElem &align) const { - return &align != &InvalidAlignmentElem; - } - - /// \brief Valid pointer predicate. - /// - /// Predicate that tests a PointerAlignElem reference returned by get() - /// against \c InvalidPointerElem. - bool validPointer(const PointerAlignElem &align) const { - return &align != &InvalidPointerElem; - } - - /// Parses a target data specification string. Assert if the string is - /// malformed. - void parseSpecifier(StringRef LayoutDescription); - - // Free all internal data structures. - void clear(); - -public: - /// Constructs a DataLayout from a specification string. See reset(). - explicit DataLayout(StringRef LayoutDescription) : LayoutMap(nullptr) { - reset(LayoutDescription); - } - - /// Initialize target data from properties stored in the module. - explicit DataLayout(const Module *M); - - void init(const Module *M); - - DataLayout(const DataLayout &DL) : LayoutMap(nullptr) { *this = DL; } - - DataLayout &operator=(const DataLayout &DL) { - clear(); - StringRepresentation = DL.StringRepresentation; - BigEndian = DL.isBigEndian(); - StackNaturalAlign = DL.StackNaturalAlign; - ManglingMode = DL.ManglingMode; - LegalIntWidths = DL.LegalIntWidths; - Alignments = DL.Alignments; - Pointers = DL.Pointers; - return *this; - } - - bool operator==(const DataLayout &Other) const; - bool operator!=(const DataLayout &Other) const { return !(*this == Other); } - - ~DataLayout(); // Not virtual, do not subclass this class - - /// Parse a data layout string (with fallback to default values). - void reset(StringRef LayoutDescription); - - /// Layout endianness... - bool isLittleEndian() const { return !BigEndian; } - bool isBigEndian() const { return BigEndian; } - - /// \brief Returns the string representation of the DataLayout. - /// - /// This representation is in the same format accepted by the string - /// constructor above. This should not be used to compare two DataLayout as - /// different string can represent the same layout. - const std::string &getStringRepresentation() const { - return StringRepresentation; - } - - /// \brief Test if the DataLayout was constructed from an empty string. - bool isDefault() const { return StringRepresentation.empty(); } - - /// \brief Returns true if the specified type is known to be a native integer - /// type supported by the CPU. - /// - /// For example, i64 is not native on most 32-bit CPUs and i37 is not native - /// on any known one. This returns false if the integer width is not legal. - /// - /// The width is specified in bits. - bool isLegalInteger(uint64_t Width) const { - for (unsigned LegalIntWidth : LegalIntWidths) - if (LegalIntWidth == Width) - return true; - return false; - } - - bool isIllegalInteger(uint64_t Width) const { return !isLegalInteger(Width); } - - /// Returns true if the given alignment exceeds the natural stack alignment. - bool exceedsNaturalStackAlignment(unsigned Align) const { - return (StackNaturalAlign != 0) && (Align > StackNaturalAlign); - } - - unsigned getStackAlignment() const { return StackNaturalAlign; } - - bool hasMicrosoftFastStdCallMangling() const { - return ManglingMode == MM_WinCOFFX86; - } - - bool hasLinkerPrivateGlobalPrefix() const { return ManglingMode == MM_MachO; } - - const char *getLinkerPrivateGlobalPrefix() const { - if (ManglingMode == MM_MachO) - return "l"; - return ""; - } - - char getGlobalPrefix() const { - switch (ManglingMode) { - case MM_None: - case MM_ELF: - case MM_Mips: - case MM_WinCOFF: - return '\0'; - case MM_MachO: - case MM_WinCOFFX86: - return '_'; - } - llvm_unreachable("invalid mangling mode"); - } - - const char *getPrivateGlobalPrefix() const { - switch (ManglingMode) { - case MM_None: - return ""; - case MM_ELF: - return ".L"; - case MM_Mips: - return "$"; - case MM_MachO: - case MM_WinCOFF: - case MM_WinCOFFX86: - return "L"; - } - llvm_unreachable("invalid mangling mode"); - } - - static const char *getManglingComponent(const Triple &T); - - /// \brief Returns true if the specified type fits in a native integer type - /// supported by the CPU. - /// - /// For example, if the CPU only supports i32 as a native integer type, then - /// i27 fits in a legal integer type but i45 does not. - bool fitsInLegalInteger(unsigned Width) const { - for (unsigned LegalIntWidth : LegalIntWidths) - if (Width <= LegalIntWidth) - return true; - return false; - } - - /// Layout pointer alignment - /// FIXME: The defaults need to be removed once all of - /// the backends/clients are updated. - unsigned getPointerABIAlignment(unsigned AS = 0) const; - - /// Return target's alignment for stack-based pointers - /// FIXME: The defaults need to be removed once all of - /// the backends/clients are updated. - unsigned getPointerPrefAlignment(unsigned AS = 0) const; - - /// Layout pointer size - /// FIXME: The defaults need to be removed once all of - /// the backends/clients are updated. - unsigned getPointerSize(unsigned AS = 0) const; - - /// Layout pointer size, in bits - /// FIXME: The defaults need to be removed once all of - /// the backends/clients are updated. - unsigned getPointerSizeInBits(unsigned AS = 0) const { - return getPointerSize(AS) * 8; - } - - /// Layout pointer size, in bits, based on the type. If this function is - /// called with a pointer type, then the type size of the pointer is returned. - /// If this function is called with a vector of pointers, then the type size - /// of the pointer is returned. This should only be called with a pointer or - /// vector of pointers. - unsigned getPointerTypeSizeInBits(Type *) const; - - unsigned getPointerTypeSize(Type *Ty) const { - return getPointerTypeSizeInBits(Ty) / 8; - } - - /// Size examples: - /// - /// Type SizeInBits StoreSizeInBits AllocSizeInBits[*] - /// ---- ---------- --------------- --------------- - /// i1 1 8 8 - /// i8 8 8 8 - /// i19 19 24 32 - /// i32 32 32 32 - /// i100 100 104 128 - /// i128 128 128 128 - /// Float 32 32 32 - /// Double 64 64 64 - /// X86_FP80 80 80 96 - /// - /// [*] The alloc size depends on the alignment, and thus on the target. - /// These values are for x86-32 linux. - - /// \brief Returns the number of bits necessary to hold the specified type. - /// - /// For example, returns 36 for i36 and 80 for x86_fp80. The type passed must - /// have a size (Type::isSized() must return true). - uint64_t getTypeSizeInBits(Type *Ty) const; - - /// \brief Returns the maximum number of bytes that may be overwritten by - /// storing the specified type. - /// - /// For example, returns 5 for i36 and 10 for x86_fp80. - uint64_t getTypeStoreSize(Type *Ty) const { - return (getTypeSizeInBits(Ty) + 7) / 8; - } - - /// \brief Returns the maximum number of bits that may be overwritten by - /// storing the specified type; always a multiple of 8. - /// - /// For example, returns 40 for i36 and 80 for x86_fp80. - uint64_t getTypeStoreSizeInBits(Type *Ty) const { - return 8 * getTypeStoreSize(Ty); - } - - /// \brief Returns the offset in bytes between successive objects of the - /// specified type, including alignment padding. - /// - /// This is the amount that alloca reserves for this type. For example, - /// returns 12 or 16 for x86_fp80, depending on alignment. - uint64_t getTypeAllocSize(Type *Ty) const { - // Round up to the next alignment boundary. - return alignTo(getTypeStoreSize(Ty), getABITypeAlignment(Ty)); - } - - /// \brief Returns the offset in bits between successive objects of the - /// specified type, including alignment padding; always a multiple of 8. - /// - /// This is the amount that alloca reserves for this type. For example, - /// returns 96 or 128 for x86_fp80, depending on alignment. - uint64_t getTypeAllocSizeInBits(Type *Ty) const { - return 8 * getTypeAllocSize(Ty); - } - - /// \brief Returns the minimum ABI-required alignment for the specified type. - unsigned getABITypeAlignment(Type *Ty) const; - - /// \brief Returns the minimum ABI-required alignment for an integer type of - /// the specified bitwidth. - unsigned getABIIntegerTypeAlignment(unsigned BitWidth) const; - - /// \brief Returns the preferred stack/global alignment for the specified - /// type. - /// - /// This is always at least as good as the ABI alignment. - unsigned getPrefTypeAlignment(Type *Ty) const; - - /// \brief Returns the preferred alignment for the specified type, returned as - /// log2 of the value (a shift amount). - unsigned getPreferredTypeAlignmentShift(Type *Ty) const; - - /// \brief Returns an integer type with size at least as big as that of a - /// pointer in the given address space. - IntegerType *getIntPtrType(LLVMContext &C, unsigned AddressSpace = 0) const; - - /// \brief Returns an integer (vector of integer) type with size at least as - /// big as that of a pointer of the given pointer (vector of pointer) type. - Type *getIntPtrType(Type *) const; - - /// \brief Returns the smallest integer type with size at least as big as - /// Width bits. - Type *getSmallestLegalIntType(LLVMContext &C, unsigned Width = 0) const; - - /// \brief Returns the largest legal integer type, or null if none are set. - Type *getLargestLegalIntType(LLVMContext &C) const { - unsigned LargestSize = getLargestLegalIntTypeSizeInBits(); - return (LargestSize == 0) ? nullptr : Type::getIntNTy(C, LargestSize); - } - - /// \brief Returns the size of largest legal integer type size, or 0 if none - /// are set. - unsigned getLargestLegalIntTypeSizeInBits() const; - - /// \brief Returns the offset from the beginning of the type for the specified - /// indices. - /// - /// Note that this takes the element type, not the pointer type. - /// This is used to implement getelementptr. - int64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef Indices) const; - - /// \brief Returns a StructLayout object, indicating the alignment of the - /// struct, its size, and the offsets of its fields. - /// - /// Note that this information is lazily cached. - const StructLayout *getStructLayout(StructType *Ty) const; - - /// \brief Returns the preferred alignment of the specified global. - /// - /// This includes an explicitly requested alignment (if the global has one). - unsigned getPreferredAlignment(const GlobalVariable *GV) const; - - /// \brief Returns the preferred alignment of the specified global, returned - /// in log form. - /// - /// This includes an explicitly requested alignment (if the global has one). - unsigned getPreferredAlignmentLog(const GlobalVariable *GV) const; -}; - -inline DataLayout *unwrap(LLVMTargetDataRef P) { - return reinterpret_cast(P); -} - -inline LLVMTargetDataRef wrap(const DataLayout *P) { - return reinterpret_cast(const_cast(P)); -} - -/// Used to lazily calculate structure layout information for a target machine, -/// based on the DataLayout structure. -class StructLayout { - uint64_t StructSize; - unsigned StructAlignment; - unsigned IsPadded : 1; - unsigned NumElements : 31; - uint64_t MemberOffsets[1]; // variable sized array! -public: - uint64_t getSizeInBytes() const { return StructSize; } - - uint64_t getSizeInBits() const { return 8 * StructSize; } - - unsigned getAlignment() const { return StructAlignment; } - - /// Returns whether the struct has padding or not between its fields. - /// NB: Padding in nested element is not taken into account. - bool hasPadding() const { return IsPadded; } - - /// \brief Given a valid byte offset into the structure, returns the structure - /// index that contains it. - unsigned getElementContainingOffset(uint64_t Offset) const; - - uint64_t getElementOffset(unsigned Idx) const { - assert(Idx < NumElements && "Invalid element idx!"); - return MemberOffsets[Idx]; - } - - uint64_t getElementOffsetInBits(unsigned Idx) const { - return getElementOffset(Idx) * 8; - } - -private: - friend class DataLayout; // Only DataLayout can create this class - StructLayout(StructType *ST, const DataLayout &DL); -}; - -// The implementation of this method is provided inline as it is particularly -// well suited to constant folding when called on a specific Type subclass. -inline uint64_t DataLayout::getTypeSizeInBits(Type *Ty) const { - assert(Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"); - switch (Ty->getTypeID()) { - case Type::LabelTyID: - return getPointerSizeInBits(0); - case Type::PointerTyID: - return getPointerSizeInBits(Ty->getPointerAddressSpace()); - case Type::ArrayTyID: { - ArrayType *ATy = cast(Ty); - return ATy->getNumElements() * - getTypeAllocSizeInBits(ATy->getElementType()); - } - case Type::StructTyID: - // Get the layout annotation... which is lazily created on demand. - return getStructLayout(cast(Ty))->getSizeInBits(); - case Type::IntegerTyID: - return Ty->getIntegerBitWidth(); - case Type::HalfTyID: - return 16; - case Type::FloatTyID: - return 32; - case Type::DoubleTyID: - case Type::X86_MMXTyID: - return 64; - case Type::PPC_FP128TyID: - case Type::FP128TyID: - return 128; - // In memory objects this is always aligned to a higher boundary, but - // only 80 bits contain information. - case Type::X86_FP80TyID: - return 80; - case Type::VectorTyID: { - VectorType *VTy = cast(Ty); - return VTy->getNumElements() * getTypeSizeInBits(VTy->getElementType()); - } - default: - llvm_unreachable("DataLayout::getTypeSizeInBits(): Unsupported type"); - } -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/DebugInfo.h b/llvm/include/llvm/IR/DebugInfo.h deleted file mode 100644 index 97204243..00000000 --- a/llvm/include/llvm/IR/DebugInfo.h +++ /dev/null @@ -1,131 +0,0 @@ -//===- DebugInfo.h - Debug Information Helpers ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a bunch of datatypes that are useful for creating and -// walking debug info in LLVM IR form. They essentially provide wrappers around -// the information in the global variables that's needed when constructing the -// DWARF information. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DEBUGINFO_H -#define LLVM_IR_DEBUGINFO_H - -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/DebugInfoMetadata.h" -#include "llvm/Support/Casting.h" -#include "llvm/Support/Dwarf.h" -#include "llvm/Support/ErrorHandling.h" -#include - -namespace llvm { -class Module; -class DbgDeclareInst; -class DbgValueInst; -template -class DenseMap; - -/// \brief Find subprogram that is enclosing this scope. -DISubprogram *getDISubprogram(const MDNode *Scope); - -/// \brief Strip debug info in the module if it exists. -/// -/// To do this, we remove all calls to the debugger intrinsics and any named -/// metadata for debugging. We also remove debug locations for instructions. -/// Return true if module is modified. -bool StripDebugInfo(Module &M); -bool stripDebugInfo(Function &F); - -/// \brief Return Debug Info Metadata Version by checking module flags. -unsigned getDebugMetadataVersionFromModule(const Module &M); - -/// \brief Utility to find all debug info in a module. -/// -/// DebugInfoFinder tries to list all debug info MDNodes used in a module. To -/// list debug info MDNodes used by an instruction, DebugInfoFinder uses -/// processDeclare, processValue and processLocation to handle DbgDeclareInst, -/// DbgValueInst and DbgLoc attached to instructions. processModule will go -/// through all DICompileUnits in llvm.dbg.cu and list debug info MDNodes -/// used by the CUs. -class DebugInfoFinder { -public: - /// \brief Process entire module and collect debug info anchors. - void processModule(const Module &M); - - /// \brief Process DbgDeclareInst. - void processDeclare(const Module &M, const DbgDeclareInst *DDI); - /// \brief Process DbgValueInst. - void processValue(const Module &M, const DbgValueInst *DVI); - /// \brief Process debug info location. - void processLocation(const Module &M, const DILocation *Loc); - - /// \brief Clear all lists. - void reset(); - -private: - void InitializeTypeMap(const Module &M); - - void processType(DIType *DT); - void processSubprogram(DISubprogram *SP); - void processScope(DIScope *Scope); - bool addCompileUnit(DICompileUnit *CU); - bool addGlobalVariable(DIGlobalVariable *DIG); - bool addSubprogram(DISubprogram *SP); - bool addType(DIType *DT); - bool addScope(DIScope *Scope); - -public: - typedef SmallVectorImpl::const_iterator - compile_unit_iterator; - typedef SmallVectorImpl::const_iterator subprogram_iterator; - typedef SmallVectorImpl::const_iterator - global_variable_iterator; - typedef SmallVectorImpl::const_iterator type_iterator; - typedef SmallVectorImpl::const_iterator scope_iterator; - - iterator_range compile_units() const { - return make_range(CUs.begin(), CUs.end()); - } - - iterator_range subprograms() const { - return make_range(SPs.begin(), SPs.end()); - } - - iterator_range global_variables() const { - return make_range(GVs.begin(), GVs.end()); - } - - iterator_range types() const { - return make_range(TYs.begin(), TYs.end()); - } - - iterator_range scopes() const { - return make_range(Scopes.begin(), Scopes.end()); - } - - unsigned compile_unit_count() const { return CUs.size(); } - unsigned global_variable_count() const { return GVs.size(); } - unsigned subprogram_count() const { return SPs.size(); } - unsigned type_count() const { return TYs.size(); } - unsigned scope_count() const { return Scopes.size(); } - -private: - SmallVector CUs; - SmallVector SPs; - SmallVector GVs; - SmallVector TYs; - SmallVector Scopes; - SmallPtrSet NodesSeen; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/DebugInfoFlags.def b/llvm/include/llvm/IR/DebugInfoFlags.def deleted file mode 100644 index 26238c34..00000000 --- a/llvm/include/llvm/IR/DebugInfoFlags.def +++ /dev/null @@ -1,42 +0,0 @@ -//===- llvm/IR/DebugInfoFlags.def - Debug info flag definitions -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Macros for running through debug info flags. -// -//===----------------------------------------------------------------------===// - -// TODO: Add other DW-based macros. -#ifndef HANDLE_DI_FLAG -#error "Missing macro definition of HANDLE_DI_FLAG" -#endif - -HANDLE_DI_FLAG(1, Private) -HANDLE_DI_FLAG(2, Protected) -HANDLE_DI_FLAG(3, Public) -HANDLE_DI_FLAG((1 << 2), FwdDecl) -HANDLE_DI_FLAG((1 << 3), AppleBlock) -HANDLE_DI_FLAG((1 << 4), BlockByrefStruct) -HANDLE_DI_FLAG((1 << 5), Virtual) -HANDLE_DI_FLAG((1 << 6), Artificial) -HANDLE_DI_FLAG((1 << 7), Explicit) -HANDLE_DI_FLAG((1 << 8), Prototyped) -HANDLE_DI_FLAG((1 << 9), ObjcClassComplete) -HANDLE_DI_FLAG((1 << 10), ObjectPointer) -HANDLE_DI_FLAG((1 << 11), Vector) -HANDLE_DI_FLAG((1 << 12), StaticMember) -HANDLE_DI_FLAG((1 << 13), LValueReference) -HANDLE_DI_FLAG((1 << 14), RValueReference) -HANDLE_DI_FLAG((1 << 15), ExternalTypeRef) -HANDLE_DI_FLAG((1 << 16), SingleInheritance) -HANDLE_DI_FLAG((2 << 16), MultipleInheritance) -HANDLE_DI_FLAG((3 << 16), VirtualInheritance) -HANDLE_DI_FLAG((1 << 18), IntroducedVirtual) -HANDLE_DI_FLAG((1 << 19), BitField) - -#undef HANDLE_DI_FLAG diff --git a/llvm/include/llvm/IR/DebugInfoMetadata.h b/llvm/include/llvm/IR/DebugInfoMetadata.h deleted file mode 100644 index 853a94af..00000000 --- a/llvm/include/llvm/IR/DebugInfoMetadata.h +++ /dev/null @@ -1,2463 +0,0 @@ -//===- llvm/IR/DebugInfoMetadata.h - Debug info metadata --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Declarations for metadata specific to debug info. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DEBUGINFOMETADATA_H -#define LLVM_IR_DEBUGINFOMETADATA_H - -#include "llvm/IR/Metadata.h" -#include "llvm/Support/Dwarf.h" - -// Helper macros for defining get() overrides. -#define DEFINE_MDNODE_GET_UNPACK_IMPL(...) __VA_ARGS__ -#define DEFINE_MDNODE_GET_UNPACK(ARGS) DEFINE_MDNODE_GET_UNPACK_IMPL ARGS -#define DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS) \ - static CLASS *getDistinct(LLVMContext &Context, \ - DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \ - return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Distinct); \ - } \ - static Temp##CLASS getTemporary(LLVMContext &Context, \ - DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \ - return Temp##CLASS( \ - getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Temporary)); \ - } -#define DEFINE_MDNODE_GET(CLASS, FORMAL, ARGS) \ - static CLASS *get(LLVMContext &Context, DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \ - return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued); \ - } \ - static CLASS *getIfExists(LLVMContext &Context, \ - DEFINE_MDNODE_GET_UNPACK(FORMAL)) { \ - return getImpl(Context, DEFINE_MDNODE_GET_UNPACK(ARGS), Uniqued, \ - /* ShouldCreate */ false); \ - } \ - DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(CLASS, FORMAL, ARGS) - -namespace llvm { - -template class Optional; - -/// Holds a subclass of DINode. -/// -/// FIXME: This class doesn't currently make much sense. Previously it was a -/// union beteen MDString (for ODR-uniqued types) and things like DIType. To -/// support CodeView work, it wasn't deleted outright when MDString-based type -/// references were deleted; we'll soon need a similar concept for CodeView -/// DITypeIndex. -template class TypedDINodeRef { - const Metadata *MD = nullptr; - -public: - TypedDINodeRef() = default; - TypedDINodeRef(std::nullptr_t) {} - TypedDINodeRef(const T *MD) : MD(MD) {} - - explicit TypedDINodeRef(const Metadata *MD) : MD(MD) { - assert((!MD || isa(MD)) && "Expected valid type ref"); - } - - template - TypedDINodeRef( - const TypedDINodeRef &X, - typename std::enable_if::value>::type * = - nullptr) - : MD(X) {} - - operator Metadata *() const { return const_cast(MD); } - - T *resolve() const { return const_cast(cast_or_null(MD)); } - - bool operator==(const TypedDINodeRef &X) const { return MD == X.MD; } - bool operator!=(const TypedDINodeRef &X) const { return MD != X.MD; } -}; - -typedef TypedDINodeRef DINodeRef; -typedef TypedDINodeRef DIScopeRef; -typedef TypedDINodeRef DITypeRef; - -class DITypeRefArray { - const MDTuple *N = nullptr; - -public: - DITypeRefArray() = default; - DITypeRefArray(const MDTuple *N) : N(N) {} - - explicit operator bool() const { return get(); } - explicit operator MDTuple *() const { return get(); } - - MDTuple *get() const { return const_cast(N); } - MDTuple *operator->() const { return get(); } - MDTuple &operator*() const { return *get(); } - - // FIXME: Fix callers and remove condition on N. - unsigned size() const { return N ? N->getNumOperands() : 0u; } - DITypeRef operator[](unsigned I) const { return DITypeRef(N->getOperand(I)); } - - class iterator : std::iterator { - MDNode::op_iterator I = nullptr; - - public: - iterator() = default; - explicit iterator(MDNode::op_iterator I) : I(I) {} - DITypeRef operator*() const { return DITypeRef(*I); } - iterator &operator++() { - ++I; - return *this; - } - iterator operator++(int) { - iterator Temp(*this); - ++I; - return Temp; - } - bool operator==(const iterator &X) const { return I == X.I; } - bool operator!=(const iterator &X) const { return I != X.I; } - }; - - // FIXME: Fix callers and remove condition on N. - iterator begin() const { return N ? iterator(N->op_begin()) : iterator(); } - iterator end() const { return N ? iterator(N->op_end()) : iterator(); } -}; - -/// \brief Tagged DWARF-like metadata node. -/// -/// A metadata node with a DWARF tag (i.e., a constant named \c DW_TAG_*, -/// defined in llvm/Support/Dwarf.h). Called \a DINode because it's -/// potentially used for non-DWARF output. -class DINode : public MDNode { - friend class LLVMContextImpl; - friend class MDNode; - -protected: - DINode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, - ArrayRef Ops1, ArrayRef Ops2 = None) - : MDNode(C, ID, Storage, Ops1, Ops2) { - assert(Tag < 1u << 16); - SubclassData16 = Tag; - } - ~DINode() = default; - - template Ty *getOperandAs(unsigned I) const { - return cast_or_null(getOperand(I)); - } - - StringRef getStringOperand(unsigned I) const { - if (auto *S = getOperandAs(I)) - return S->getString(); - return StringRef(); - } - - static MDString *getCanonicalMDString(LLVMContext &Context, StringRef S) { - if (S.empty()) - return nullptr; - return MDString::get(Context, S); - } - - /// Allow subclasses to mutate the tag. - void setTag(unsigned Tag) { SubclassData16 = Tag; } - -public: - unsigned getTag() const { return SubclassData16; } - - /// \brief Debug info flags. - /// - /// The three accessibility flags are mutually exclusive and rolled together - /// in the first two bits. - enum DIFlags { -#define HANDLE_DI_FLAG(ID, NAME) Flag##NAME = ID, -#include "llvm/IR/DebugInfoFlags.def" - FlagAccessibility = FlagPrivate | FlagProtected | FlagPublic, - FlagPtrToMemberRep = FlagSingleInheritance | FlagMultipleInheritance | - FlagVirtualInheritance, - }; - - static unsigned getFlag(StringRef Flag); - static const char *getFlagString(unsigned Flag); - - /// \brief Split up a flags bitfield. - /// - /// Split \c Flags into \c SplitFlags, a vector of its components. Returns - /// any remaining (unrecognized) bits. - static unsigned splitFlags(unsigned Flags, - SmallVectorImpl &SplitFlags); - - static bool classof(const Metadata *MD) { - switch (MD->getMetadataID()) { - default: - return false; - case GenericDINodeKind: - case DISubrangeKind: - case DIEnumeratorKind: - case DIBasicTypeKind: - case DIDerivedTypeKind: - case DICompositeTypeKind: - case DISubroutineTypeKind: - case DIFileKind: - case DICompileUnitKind: - case DISubprogramKind: - case DILexicalBlockKind: - case DILexicalBlockFileKind: - case DINamespaceKind: - case DITemplateTypeParameterKind: - case DITemplateValueParameterKind: - case DIGlobalVariableKind: - case DILocalVariableKind: - case DIObjCPropertyKind: - case DIImportedEntityKind: - case DIModuleKind: - return true; - } - } -}; - -template struct simplify_type> { - typedef Metadata *SimpleType; - static SimpleType getSimplifiedValue(const TypedDINodeRef &MD) { - return MD; - } -}; - -template -struct simplify_type> - : simplify_type> {}; - -/// \brief Generic tagged DWARF-like metadata node. -/// -/// An un-specialized DWARF-like metadata node. The first operand is a -/// (possibly empty) null-separated \a MDString header that contains arbitrary -/// fields. The remaining operands are \a dwarf_operands(), and are pointers -/// to other metadata. -class GenericDINode : public DINode { - friend class LLVMContextImpl; - friend class MDNode; - - GenericDINode(LLVMContext &C, StorageType Storage, unsigned Hash, - unsigned Tag, ArrayRef Ops1, - ArrayRef Ops2) - : DINode(C, GenericDINodeKind, Storage, Tag, Ops1, Ops2) { - setHash(Hash); - } - ~GenericDINode() { dropAllReferences(); } - - void setHash(unsigned Hash) { SubclassData32 = Hash; } - void recalculateHash(); - - static GenericDINode *getImpl(LLVMContext &Context, unsigned Tag, - StringRef Header, ArrayRef DwarfOps, - StorageType Storage, bool ShouldCreate = true) { - return getImpl(Context, Tag, getCanonicalMDString(Context, Header), - DwarfOps, Storage, ShouldCreate); - } - - static GenericDINode *getImpl(LLVMContext &Context, unsigned Tag, - MDString *Header, ArrayRef DwarfOps, - StorageType Storage, bool ShouldCreate = true); - - TempGenericDINode cloneImpl() const { - return getTemporary( - getContext(), getTag(), getHeader(), - SmallVector(dwarf_op_begin(), dwarf_op_end())); - } - -public: - unsigned getHash() const { return SubclassData32; } - - DEFINE_MDNODE_GET(GenericDINode, (unsigned Tag, StringRef Header, - ArrayRef DwarfOps), - (Tag, Header, DwarfOps)) - DEFINE_MDNODE_GET(GenericDINode, (unsigned Tag, MDString *Header, - ArrayRef DwarfOps), - (Tag, Header, DwarfOps)) - - /// \brief Return a (temporary) clone of this. - TempGenericDINode clone() const { return cloneImpl(); } - - unsigned getTag() const { return SubclassData16; } - StringRef getHeader() const { return getStringOperand(0); } - MDString *getRawHeader() const { return getOperandAs(0); } - - op_iterator dwarf_op_begin() const { return op_begin() + 1; } - op_iterator dwarf_op_end() const { return op_end(); } - op_range dwarf_operands() const { - return op_range(dwarf_op_begin(), dwarf_op_end()); - } - - unsigned getNumDwarfOperands() const { return getNumOperands() - 1; } - const MDOperand &getDwarfOperand(unsigned I) const { - return getOperand(I + 1); - } - void replaceDwarfOperandWith(unsigned I, Metadata *New) { - replaceOperandWith(I + 1, New); - } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == GenericDINodeKind; - } -}; - -/// \brief Array subrange. -/// -/// TODO: Merge into node for DW_TAG_array_type, which should have a custom -/// type. -class DISubrange : public DINode { - friend class LLVMContextImpl; - friend class MDNode; - - int64_t Count; - int64_t LowerBound; - - DISubrange(LLVMContext &C, StorageType Storage, int64_t Count, - int64_t LowerBound) - : DINode(C, DISubrangeKind, Storage, dwarf::DW_TAG_subrange_type, None), - Count(Count), LowerBound(LowerBound) {} - ~DISubrange() = default; - - static DISubrange *getImpl(LLVMContext &Context, int64_t Count, - int64_t LowerBound, StorageType Storage, - bool ShouldCreate = true); - - TempDISubrange cloneImpl() const { - return getTemporary(getContext(), getCount(), getLowerBound()); - } - -public: - DEFINE_MDNODE_GET(DISubrange, (int64_t Count, int64_t LowerBound = 0), - (Count, LowerBound)) - - TempDISubrange clone() const { return cloneImpl(); } - - int64_t getLowerBound() const { return LowerBound; } - int64_t getCount() const { return Count; } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DISubrangeKind; - } -}; - -/// \brief Enumeration value. -/// -/// TODO: Add a pointer to the context (DW_TAG_enumeration_type) once that no -/// longer creates a type cycle. -class DIEnumerator : public DINode { - friend class LLVMContextImpl; - friend class MDNode; - - int64_t Value; - - DIEnumerator(LLVMContext &C, StorageType Storage, int64_t Value, - ArrayRef Ops) - : DINode(C, DIEnumeratorKind, Storage, dwarf::DW_TAG_enumerator, Ops), - Value(Value) {} - ~DIEnumerator() = default; - - static DIEnumerator *getImpl(LLVMContext &Context, int64_t Value, - StringRef Name, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Value, getCanonicalMDString(Context, Name), Storage, - ShouldCreate); - } - static DIEnumerator *getImpl(LLVMContext &Context, int64_t Value, - MDString *Name, StorageType Storage, - bool ShouldCreate = true); - - TempDIEnumerator cloneImpl() const { - return getTemporary(getContext(), getValue(), getName()); - } - -public: - DEFINE_MDNODE_GET(DIEnumerator, (int64_t Value, StringRef Name), - (Value, Name)) - DEFINE_MDNODE_GET(DIEnumerator, (int64_t Value, MDString *Name), - (Value, Name)) - - TempDIEnumerator clone() const { return cloneImpl(); } - - int64_t getValue() const { return Value; } - StringRef getName() const { return getStringOperand(0); } - - MDString *getRawName() const { return getOperandAs(0); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIEnumeratorKind; - } -}; - -/// \brief Base class for scope-like contexts. -/// -/// Base class for lexical scopes and types (which are also declaration -/// contexts). -/// -/// TODO: Separate the concepts of declaration contexts and lexical scopes. -class DIScope : public DINode { -protected: - DIScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, - ArrayRef Ops) - : DINode(C, ID, Storage, Tag, Ops) {} - ~DIScope() = default; - -public: - DIFile *getFile() const { return cast_or_null(getRawFile()); } - - inline StringRef getFilename() const; - inline StringRef getDirectory() const; - - StringRef getName() const; - DIScopeRef getScope() const; - - /// \brief Return the raw underlying file. - /// - /// An \a DIFile is an \a DIScope, but it doesn't point at a separate file - /// (it\em is the file). If \c this is an \a DIFile, we need to return \c - /// this. Otherwise, return the first operand, which is where all other - /// subclasses store their file pointer. - Metadata *getRawFile() const { - return isa(this) ? const_cast(this) - : static_cast(getOperand(0)); - } - - static bool classof(const Metadata *MD) { - switch (MD->getMetadataID()) { - default: - return false; - case DIBasicTypeKind: - case DIDerivedTypeKind: - case DICompositeTypeKind: - case DISubroutineTypeKind: - case DIFileKind: - case DICompileUnitKind: - case DISubprogramKind: - case DILexicalBlockKind: - case DILexicalBlockFileKind: - case DINamespaceKind: - case DIModuleKind: - return true; - } - } -}; - -/// \brief File. -/// -/// TODO: Merge with directory/file node (including users). -/// TODO: Canonicalize paths on creation. -class DIFile : public DIScope { - friend class LLVMContextImpl; - friend class MDNode; - - DIFile(LLVMContext &C, StorageType Storage, ArrayRef Ops) - : DIScope(C, DIFileKind, Storage, dwarf::DW_TAG_file_type, Ops) {} - ~DIFile() = default; - - static DIFile *getImpl(LLVMContext &Context, StringRef Filename, - StringRef Directory, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, getCanonicalMDString(Context, Filename), - getCanonicalMDString(Context, Directory), Storage, - ShouldCreate); - } - static DIFile *getImpl(LLVMContext &Context, MDString *Filename, - MDString *Directory, StorageType Storage, - bool ShouldCreate = true); - - TempDIFile cloneImpl() const { - return getTemporary(getContext(), getFilename(), getDirectory()); - } - -public: - DEFINE_MDNODE_GET(DIFile, (StringRef Filename, StringRef Directory), - (Filename, Directory)) - DEFINE_MDNODE_GET(DIFile, (MDString * Filename, MDString *Directory), - (Filename, Directory)) - - TempDIFile clone() const { return cloneImpl(); } - - StringRef getFilename() const { return getStringOperand(0); } - StringRef getDirectory() const { return getStringOperand(1); } - - MDString *getRawFilename() const { return getOperandAs(0); } - MDString *getRawDirectory() const { return getOperandAs(1); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIFileKind; - } -}; - -StringRef DIScope::getFilename() const { - if (auto *F = getFile()) - return F->getFilename(); - return ""; -} - -StringRef DIScope::getDirectory() const { - if (auto *F = getFile()) - return F->getDirectory(); - return ""; -} - -/// \brief Base class for types. -/// -/// TODO: Remove the hardcoded name and context, since many types don't use -/// them. -/// TODO: Split up flags. -class DIType : public DIScope { - unsigned Line; - unsigned Flags; - uint64_t SizeInBits; - uint64_t AlignInBits; - uint64_t OffsetInBits; - -protected: - DIType(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, - unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, ArrayRef Ops) - : DIScope(C, ID, Storage, Tag, Ops) { - init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags); - } - ~DIType() = default; - - void init(unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags) { - this->Line = Line; - this->Flags = Flags; - this->SizeInBits = SizeInBits; - this->AlignInBits = AlignInBits; - this->OffsetInBits = OffsetInBits; - } - - /// Change fields in place. - void mutate(unsigned Tag, unsigned Line, uint64_t SizeInBits, - uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags) { - assert(isDistinct() && "Only distinct nodes can mutate"); - setTag(Tag); - init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags); - } - -public: - TempDIType clone() const { - return TempDIType(cast(MDNode::clone().release())); - } - - unsigned getLine() const { return Line; } - uint64_t getSizeInBits() const { return SizeInBits; } - uint64_t getAlignInBits() const { return AlignInBits; } - uint64_t getOffsetInBits() const { return OffsetInBits; } - unsigned getFlags() const { return Flags; } - - DIScopeRef getScope() const { return DIScopeRef(getRawScope()); } - StringRef getName() const { return getStringOperand(2); } - - - Metadata *getRawScope() const { return getOperand(1); } - MDString *getRawName() const { return getOperandAs(2); } - - void setFlags(unsigned NewFlags) { - assert(!isUniqued() && "Cannot set flags on uniqued nodes"); - Flags = NewFlags; - } - - bool isPrivate() const { - return (getFlags() & FlagAccessibility) == FlagPrivate; - } - bool isProtected() const { - return (getFlags() & FlagAccessibility) == FlagProtected; - } - bool isPublic() const { - return (getFlags() & FlagAccessibility) == FlagPublic; - } - bool isForwardDecl() const { return getFlags() & FlagFwdDecl; } - bool isAppleBlockExtension() const { return getFlags() & FlagAppleBlock; } - bool isBlockByrefStruct() const { return getFlags() & FlagBlockByrefStruct; } - bool isVirtual() const { return getFlags() & FlagVirtual; } - bool isArtificial() const { return getFlags() & FlagArtificial; } - bool isObjectPointer() const { return getFlags() & FlagObjectPointer; } - bool isObjcClassComplete() const { - return getFlags() & FlagObjcClassComplete; - } - bool isVector() const { return getFlags() & FlagVector; } - bool isBitField() const { return getFlags() & FlagBitField; } - bool isStaticMember() const { return getFlags() & FlagStaticMember; } - bool isLValueReference() const { return getFlags() & FlagLValueReference; } - bool isRValueReference() const { return getFlags() & FlagRValueReference; } - bool isExternalTypeRef() const { return getFlags() & FlagExternalTypeRef; } - - static bool classof(const Metadata *MD) { - switch (MD->getMetadataID()) { - default: - return false; - case DIBasicTypeKind: - case DIDerivedTypeKind: - case DICompositeTypeKind: - case DISubroutineTypeKind: - return true; - } - } -}; - -/// \brief Basic type, like 'int' or 'float'. -/// -/// TODO: Split out DW_TAG_unspecified_type. -/// TODO: Drop unused accessors. -class DIBasicType : public DIType { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Encoding; - - DIBasicType(LLVMContext &C, StorageType Storage, unsigned Tag, - uint64_t SizeInBits, uint64_t AlignInBits, unsigned Encoding, - ArrayRef Ops) - : DIType(C, DIBasicTypeKind, Storage, Tag, 0, SizeInBits, AlignInBits, 0, - 0, Ops), - Encoding(Encoding) {} - ~DIBasicType() = default; - - static DIBasicType *getImpl(LLVMContext &Context, unsigned Tag, - StringRef Name, uint64_t SizeInBits, - uint64_t AlignInBits, unsigned Encoding, - StorageType Storage, bool ShouldCreate = true) { - return getImpl(Context, Tag, getCanonicalMDString(Context, Name), - SizeInBits, AlignInBits, Encoding, Storage, ShouldCreate); - } - static DIBasicType *getImpl(LLVMContext &Context, unsigned Tag, - MDString *Name, uint64_t SizeInBits, - uint64_t AlignInBits, unsigned Encoding, - StorageType Storage, bool ShouldCreate = true); - - TempDIBasicType cloneImpl() const { - return getTemporary(getContext(), getTag(), getName(), getSizeInBits(), - getAlignInBits(), getEncoding()); - } - -public: - DEFINE_MDNODE_GET(DIBasicType, (unsigned Tag, StringRef Name), - (Tag, Name, 0, 0, 0)) - DEFINE_MDNODE_GET(DIBasicType, - (unsigned Tag, StringRef Name, uint64_t SizeInBits, - uint64_t AlignInBits, unsigned Encoding), - (Tag, Name, SizeInBits, AlignInBits, Encoding)) - DEFINE_MDNODE_GET(DIBasicType, - (unsigned Tag, MDString *Name, uint64_t SizeInBits, - uint64_t AlignInBits, unsigned Encoding), - (Tag, Name, SizeInBits, AlignInBits, Encoding)) - - TempDIBasicType clone() const { return cloneImpl(); } - - unsigned getEncoding() const { return Encoding; } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIBasicTypeKind; - } -}; - -/// \brief Derived types. -/// -/// This includes qualified types, pointers, references, friends, typedefs, and -/// class members. -/// -/// TODO: Split out members (inheritance, fields, methods, etc.). -class DIDerivedType : public DIType { - friend class LLVMContextImpl; - friend class MDNode; - - DIDerivedType(LLVMContext &C, StorageType Storage, unsigned Tag, - unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, ArrayRef Ops) - : DIType(C, DIDerivedTypeKind, Storage, Tag, Line, SizeInBits, - AlignInBits, OffsetInBits, Flags, Ops) {} - ~DIDerivedType() = default; - - static DIDerivedType *getImpl(LLVMContext &Context, unsigned Tag, - StringRef Name, DIFile *File, unsigned Line, - DIScopeRef Scope, DITypeRef BaseType, - uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, - Metadata *ExtraData, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Tag, getCanonicalMDString(Context, Name), File, - Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits, - Flags, ExtraData, Storage, ShouldCreate); - } - static DIDerivedType *getImpl(LLVMContext &Context, unsigned Tag, - MDString *Name, Metadata *File, unsigned Line, - Metadata *Scope, Metadata *BaseType, - uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, - Metadata *ExtraData, StorageType Storage, - bool ShouldCreate = true); - - TempDIDerivedType cloneImpl() const { - return getTemporary(getContext(), getTag(), getName(), getFile(), getLine(), - getScope(), getBaseType(), getSizeInBits(), - getAlignInBits(), getOffsetInBits(), getFlags(), - getExtraData()); - } - -public: - DEFINE_MDNODE_GET(DIDerivedType, - (unsigned Tag, MDString *Name, Metadata *File, - unsigned Line, Metadata *Scope, Metadata *BaseType, - uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, - Metadata *ExtraData = nullptr), - (Tag, Name, File, Line, Scope, BaseType, SizeInBits, - AlignInBits, OffsetInBits, Flags, ExtraData)) - DEFINE_MDNODE_GET(DIDerivedType, - (unsigned Tag, StringRef Name, DIFile *File, unsigned Line, - DIScopeRef Scope, DITypeRef BaseType, uint64_t SizeInBits, - uint64_t AlignInBits, uint64_t OffsetInBits, - unsigned Flags, Metadata *ExtraData = nullptr), - (Tag, Name, File, Line, Scope, BaseType, SizeInBits, - AlignInBits, OffsetInBits, Flags, ExtraData)) - - TempDIDerivedType clone() const { return cloneImpl(); } - - //// Get the base type this is derived from. - DITypeRef getBaseType() const { return DITypeRef(getRawBaseType()); } - Metadata *getRawBaseType() const { return getOperand(3); } - - /// \brief Get extra data associated with this derived type. - /// - /// Class type for pointer-to-members, objective-c property node for ivars, - /// or global constant wrapper for static members. - /// - /// TODO: Separate out types that need this extra operand: pointer-to-member - /// types and member fields (static members and ivars). - Metadata *getExtraData() const { return getRawExtraData(); } - Metadata *getRawExtraData() const { return getOperand(4); } - - /// \brief Get casted version of extra data. - /// @{ - DITypeRef getClassType() const { - assert(getTag() == dwarf::DW_TAG_ptr_to_member_type); - return DITypeRef(getExtraData()); - } - DIObjCProperty *getObjCProperty() const { - return dyn_cast_or_null(getExtraData()); - } - Constant *getStorageOffsetInBits() const { - assert(getTag() == dwarf::DW_TAG_member && isBitField()); - if (auto *C = cast_or_null(getExtraData())) - return C->getValue(); - return nullptr; - } - Constant *getConstant() const { - assert(getTag() == dwarf::DW_TAG_member && isStaticMember()); - if (auto *C = cast_or_null(getExtraData())) - return C->getValue(); - return nullptr; - } - /// @} - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIDerivedTypeKind; - } -}; - -/// \brief Composite types. -/// -/// TODO: Detach from DerivedTypeBase (split out MDEnumType?). -/// TODO: Create a custom, unrelated node for DW_TAG_array_type. -class DICompositeType : public DIType { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned RuntimeLang; - - DICompositeType(LLVMContext &C, StorageType Storage, unsigned Tag, - unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits, - uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, - ArrayRef Ops) - : DIType(C, DICompositeTypeKind, Storage, Tag, Line, SizeInBits, - AlignInBits, OffsetInBits, Flags, Ops), - RuntimeLang(RuntimeLang) {} - ~DICompositeType() = default; - - /// Change fields in place. - void mutate(unsigned Tag, unsigned Line, unsigned RuntimeLang, - uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, - unsigned Flags) { - assert(isDistinct() && "Only distinct nodes can mutate"); - assert(getRawIdentifier() && "Only ODR-uniqued nodes should mutate"); - this->RuntimeLang = RuntimeLang; - DIType::mutate(Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags); - } - - static DICompositeType * - getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, Metadata *File, - unsigned Line, DIScopeRef Scope, DITypeRef BaseType, - uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, - uint64_t Flags, DINodeArray Elements, unsigned RuntimeLang, - DITypeRef VTableHolder, DITemplateParameterArray TemplateParams, - StringRef Identifier, StorageType Storage, bool ShouldCreate = true) { - return getImpl( - Context, Tag, getCanonicalMDString(Context, Name), File, Line, Scope, - BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements.get(), - RuntimeLang, VTableHolder, TemplateParams.get(), - getCanonicalMDString(Context, Identifier), Storage, ShouldCreate); - } - static DICompositeType * - getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File, - unsigned Line, Metadata *Scope, Metadata *BaseType, - uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits, - unsigned Flags, Metadata *Elements, unsigned RuntimeLang, - Metadata *VTableHolder, Metadata *TemplateParams, - MDString *Identifier, StorageType Storage, bool ShouldCreate = true); - - TempDICompositeType cloneImpl() const { - return getTemporary(getContext(), getTag(), getName(), getFile(), getLine(), - getScope(), getBaseType(), getSizeInBits(), - getAlignInBits(), getOffsetInBits(), getFlags(), - getElements(), getRuntimeLang(), getVTableHolder(), - getTemplateParams(), getIdentifier()); - } - -public: - DEFINE_MDNODE_GET(DICompositeType, - (unsigned Tag, StringRef Name, DIFile *File, unsigned Line, - DIScopeRef Scope, DITypeRef BaseType, uint64_t SizeInBits, - uint64_t AlignInBits, uint64_t OffsetInBits, - unsigned Flags, DINodeArray Elements, unsigned RuntimeLang, - DITypeRef VTableHolder, - DITemplateParameterArray TemplateParams = nullptr, - StringRef Identifier = ""), - (Tag, Name, File, Line, Scope, BaseType, SizeInBits, - AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, - VTableHolder, TemplateParams, Identifier)) - DEFINE_MDNODE_GET(DICompositeType, - (unsigned Tag, MDString *Name, Metadata *File, - unsigned Line, Metadata *Scope, Metadata *BaseType, - uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, Metadata *Elements, - unsigned RuntimeLang, Metadata *VTableHolder, - Metadata *TemplateParams = nullptr, - MDString *Identifier = nullptr), - (Tag, Name, File, Line, Scope, BaseType, SizeInBits, - AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, - VTableHolder, TemplateParams, Identifier)) - - TempDICompositeType clone() const { return cloneImpl(); } - - /// Get a DICompositeType with the given ODR identifier. - /// - /// If \a LLVMContext::isODRUniquingDebugTypes(), gets the mapped - /// DICompositeType for the given ODR \c Identifier. If none exists, creates - /// a new node. - /// - /// Else, returns \c nullptr. - static DICompositeType * - getODRType(LLVMContext &Context, MDString &Identifier, unsigned Tag, - MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, - Metadata *BaseType, uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, Metadata *Elements, - unsigned RuntimeLang, Metadata *VTableHolder, - Metadata *TemplateParams); - static DICompositeType *getODRTypeIfExists(LLVMContext &Context, - MDString &Identifier); - - /// Build a DICompositeType with the given ODR identifier. - /// - /// Looks up the mapped DICompositeType for the given ODR \c Identifier. If - /// it doesn't exist, creates a new one. If it does exist and \a - /// isForwardDecl(), and the new arguments would be a definition, mutates the - /// the type in place. In either case, returns the type. - /// - /// If not \a LLVMContext::isODRUniquingDebugTypes(), this function returns - /// nullptr. - static DICompositeType * - buildODRType(LLVMContext &Context, MDString &Identifier, unsigned Tag, - MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, - Metadata *BaseType, uint64_t SizeInBits, uint64_t AlignInBits, - uint64_t OffsetInBits, unsigned Flags, Metadata *Elements, - unsigned RuntimeLang, Metadata *VTableHolder, - Metadata *TemplateParams); - - DITypeRef getBaseType() const { return DITypeRef(getRawBaseType()); } - DINodeArray getElements() const { - return cast_or_null(getRawElements()); - } - DITypeRef getVTableHolder() const { return DITypeRef(getRawVTableHolder()); } - DITemplateParameterArray getTemplateParams() const { - return cast_or_null(getRawTemplateParams()); - } - StringRef getIdentifier() const { return getStringOperand(7); } - unsigned getRuntimeLang() const { return RuntimeLang; } - - Metadata *getRawBaseType() const { return getOperand(3); } - Metadata *getRawElements() const { return getOperand(4); } - Metadata *getRawVTableHolder() const { return getOperand(5); } - Metadata *getRawTemplateParams() const { return getOperand(6); } - MDString *getRawIdentifier() const { return getOperandAs(7); } - - /// \brief Replace operands. - /// - /// If this \a isUniqued() and not \a isResolved(), on a uniquing collision - /// this will be RAUW'ed and deleted. Use a \a TrackingMDRef to keep track - /// of its movement if necessary. - /// @{ - void replaceElements(DINodeArray Elements) { -#ifndef NDEBUG - for (DINode *Op : getElements()) - assert(std::find(Elements->op_begin(), Elements->op_end(), Op) && - "Lost a member during member list replacement"); -#endif - replaceOperandWith(4, Elements.get()); - } - void replaceVTableHolder(DITypeRef VTableHolder) { - replaceOperandWith(5, VTableHolder); - } - void replaceTemplateParams(DITemplateParameterArray TemplateParams) { - replaceOperandWith(6, TemplateParams.get()); - } - /// @} - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DICompositeTypeKind; - } -}; - -/// \brief Type array for a subprogram. -/// -/// TODO: Fold the array of types in directly as operands. -class DISubroutineType : public DIType { - friend class LLVMContextImpl; - friend class MDNode; - - /// The calling convention used with DW_AT_calling_convention. Actually of - /// type dwarf::CallingConvention. - uint8_t CC; - - DISubroutineType(LLVMContext &C, StorageType Storage, unsigned Flags, - uint8_t CC, ArrayRef Ops) - : DIType(C, DISubroutineTypeKind, Storage, dwarf::DW_TAG_subroutine_type, - 0, 0, 0, 0, Flags, Ops), - CC(CC) {} - ~DISubroutineType() = default; - - static DISubroutineType *getImpl(LLVMContext &Context, unsigned Flags, - uint8_t CC, DITypeRefArray TypeArray, - StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Flags, CC, TypeArray.get(), Storage, ShouldCreate); - } - static DISubroutineType *getImpl(LLVMContext &Context, unsigned Flags, - uint8_t CC, Metadata *TypeArray, - StorageType Storage, - bool ShouldCreate = true); - - TempDISubroutineType cloneImpl() const { - return getTemporary(getContext(), getFlags(), getCC(), getTypeArray()); - } - -public: - DEFINE_MDNODE_GET(DISubroutineType, - (unsigned Flags, uint8_t CC, DITypeRefArray TypeArray), - (Flags, CC, TypeArray)) - DEFINE_MDNODE_GET(DISubroutineType, - (unsigned Flags, uint8_t CC, Metadata *TypeArray), - (Flags, CC, TypeArray)) - - TempDISubroutineType clone() const { return cloneImpl(); } - - uint8_t getCC() const { return CC; } - - DITypeRefArray getTypeArray() const { - return cast_or_null(getRawTypeArray()); - } - Metadata *getRawTypeArray() const { return getOperand(3); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DISubroutineTypeKind; - } -}; - -/// \brief Compile unit. -class DICompileUnit : public DIScope { - friend class LLVMContextImpl; - friend class MDNode; -public: - enum DebugEmissionKind : unsigned { - NoDebug = 0, - FullDebug, - LineTablesOnly, - LastEmissionKind = LineTablesOnly - }; - static Optional getEmissionKind(StringRef Str); - static const char *EmissionKindString(DebugEmissionKind EK); - -private: - unsigned SourceLanguage; - bool IsOptimized; - unsigned RuntimeVersion; - unsigned EmissionKind; - uint64_t DWOId; - - DICompileUnit(LLVMContext &C, StorageType Storage, unsigned SourceLanguage, - bool IsOptimized, unsigned RuntimeVersion, - unsigned EmissionKind, uint64_t DWOId, ArrayRef Ops) - : DIScope(C, DICompileUnitKind, Storage, dwarf::DW_TAG_compile_unit, Ops), - SourceLanguage(SourceLanguage), IsOptimized(IsOptimized), - RuntimeVersion(RuntimeVersion), EmissionKind(EmissionKind), - DWOId(DWOId) { - assert(Storage != Uniqued); - } - ~DICompileUnit() = default; - - static DICompileUnit * - getImpl(LLVMContext &Context, unsigned SourceLanguage, DIFile *File, - StringRef Producer, bool IsOptimized, StringRef Flags, - unsigned RuntimeVersion, StringRef SplitDebugFilename, - unsigned EmissionKind, DICompositeTypeArray EnumTypes, - DIScopeArray RetainedTypes, DIGlobalVariableArray GlobalVariables, - DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros, - uint64_t DWOId, StorageType Storage, bool ShouldCreate = true) { - return getImpl( - Context, SourceLanguage, File, getCanonicalMDString(Context, Producer), - IsOptimized, getCanonicalMDString(Context, Flags), RuntimeVersion, - getCanonicalMDString(Context, SplitDebugFilename), EmissionKind, - EnumTypes.get(), RetainedTypes.get(), GlobalVariables.get(), - ImportedEntities.get(), Macros.get(), DWOId, Storage, ShouldCreate); - } - static DICompileUnit * - getImpl(LLVMContext &Context, unsigned SourceLanguage, Metadata *File, - MDString *Producer, bool IsOptimized, MDString *Flags, - unsigned RuntimeVersion, MDString *SplitDebugFilename, - unsigned EmissionKind, Metadata *EnumTypes, Metadata *RetainedTypes, - Metadata *GlobalVariables, Metadata *ImportedEntities, - Metadata *Macros, uint64_t DWOId, StorageType Storage, - bool ShouldCreate = true); - - TempDICompileUnit cloneImpl() const { - return getTemporary( - getContext(), getSourceLanguage(), getFile(), getProducer(), - isOptimized(), getFlags(), getRuntimeVersion(), getSplitDebugFilename(), - getEmissionKind(), getEnumTypes(), getRetainedTypes(), - getGlobalVariables(), getImportedEntities(), getMacros(), DWOId); - } - - static void get() = delete; - static void getIfExists() = delete; - -public: - DEFINE_MDNODE_GET_DISTINCT_TEMPORARY( - DICompileUnit, - (unsigned SourceLanguage, DIFile *File, StringRef Producer, - bool IsOptimized, StringRef Flags, unsigned RuntimeVersion, - StringRef SplitDebugFilename, DebugEmissionKind EmissionKind, - DICompositeTypeArray EnumTypes, DIScopeArray RetainedTypes, - DIGlobalVariableArray GlobalVariables, - DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros, - uint64_t DWOId), - (SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, - SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, - GlobalVariables, ImportedEntities, Macros, DWOId)) - DEFINE_MDNODE_GET_DISTINCT_TEMPORARY( - DICompileUnit, - (unsigned SourceLanguage, Metadata *File, MDString *Producer, - bool IsOptimized, MDString *Flags, unsigned RuntimeVersion, - MDString *SplitDebugFilename, unsigned EmissionKind, Metadata *EnumTypes, - Metadata *RetainedTypes, Metadata *GlobalVariables, - Metadata *ImportedEntities, Metadata *Macros, uint64_t DWOId), - (SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion, - SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes, - GlobalVariables, ImportedEntities, Macros, DWOId)) - - TempDICompileUnit clone() const { return cloneImpl(); } - - unsigned getSourceLanguage() const { return SourceLanguage; } - bool isOptimized() const { return IsOptimized; } - unsigned getRuntimeVersion() const { return RuntimeVersion; } - DebugEmissionKind getEmissionKind() const { - return (DebugEmissionKind)EmissionKind; - } - StringRef getProducer() const { return getStringOperand(1); } - StringRef getFlags() const { return getStringOperand(2); } - StringRef getSplitDebugFilename() const { return getStringOperand(3); } - DICompositeTypeArray getEnumTypes() const { - return cast_or_null(getRawEnumTypes()); - } - DIScopeArray getRetainedTypes() const { - return cast_or_null(getRawRetainedTypes()); - } - DIGlobalVariableArray getGlobalVariables() const { - return cast_or_null(getRawGlobalVariables()); - } - DIImportedEntityArray getImportedEntities() const { - return cast_or_null(getRawImportedEntities()); - } - DIMacroNodeArray getMacros() const { - return cast_or_null(getRawMacros()); - } - uint64_t getDWOId() const { return DWOId; } - void setDWOId(uint64_t DwoId) { DWOId = DwoId; } - - MDString *getRawProducer() const { return getOperandAs(1); } - MDString *getRawFlags() const { return getOperandAs(2); } - MDString *getRawSplitDebugFilename() const { - return getOperandAs(3); - } - Metadata *getRawEnumTypes() const { return getOperand(4); } - Metadata *getRawRetainedTypes() const { return getOperand(5); } - Metadata *getRawGlobalVariables() const { return getOperand(6); } - Metadata *getRawImportedEntities() const { return getOperand(7); } - Metadata *getRawMacros() const { return getOperand(8); } - - /// \brief Replace arrays. - /// - /// If this \a isUniqued() and not \a isResolved(), it will be RAUW'ed and - /// deleted on a uniquing collision. In practice, uniquing collisions on \a - /// DICompileUnit should be fairly rare. - /// @{ - void replaceEnumTypes(DICompositeTypeArray N) { - replaceOperandWith(4, N.get()); - } - void replaceRetainedTypes(DITypeArray N) { - replaceOperandWith(5, N.get()); - } - void replaceGlobalVariables(DIGlobalVariableArray N) { - replaceOperandWith(6, N.get()); - } - void replaceImportedEntities(DIImportedEntityArray N) { - replaceOperandWith(7, N.get()); - } - void replaceMacros(DIMacroNodeArray N) { replaceOperandWith(8, N.get()); } - /// @} - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DICompileUnitKind; - } -}; - -/// \brief A scope for locals. -/// -/// A legal scope for lexical blocks, local variables, and debug info -/// locations. Subclasses are \a DISubprogram, \a DILexicalBlock, and \a -/// DILexicalBlockFile. -class DILocalScope : public DIScope { -protected: - DILocalScope(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag, - ArrayRef Ops) - : DIScope(C, ID, Storage, Tag, Ops) {} - ~DILocalScope() = default; - -public: - /// \brief Get the subprogram for this scope. - /// - /// Return this if it's an \a DISubprogram; otherwise, look up the scope - /// chain. - DISubprogram *getSubprogram() const; - - /// Get the first non DILexicalBlockFile scope of this scope. - /// - /// Return this if it's not a \a DILexicalBlockFIle; otherwise, look up the - /// scope chain. - DILocalScope *getNonLexicalBlockFileScope() const; - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DISubprogramKind || - MD->getMetadataID() == DILexicalBlockKind || - MD->getMetadataID() == DILexicalBlockFileKind; - } -}; - -/// \brief Debug location. -/// -/// A debug location in source code, used for debug info and otherwise. -class DILocation : public MDNode { - friend class LLVMContextImpl; - friend class MDNode; - - DILocation(LLVMContext &C, StorageType Storage, unsigned Line, - unsigned Column, ArrayRef MDs); - ~DILocation() { dropAllReferences(); } - - static DILocation *getImpl(LLVMContext &Context, unsigned Line, - unsigned Column, Metadata *Scope, - Metadata *InlinedAt, StorageType Storage, - bool ShouldCreate = true); - static DILocation *getImpl(LLVMContext &Context, unsigned Line, - unsigned Column, DILocalScope *Scope, - DILocation *InlinedAt, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Line, Column, static_cast(Scope), - static_cast(InlinedAt), Storage, ShouldCreate); - } - - TempDILocation cloneImpl() const { - // Get the raw scope/inlinedAt since it is possible to invoke this on - // a DILocation containing temporary metadata. - return getTemporary(getContext(), getLine(), getColumn(), getRawScope(), - getRawInlinedAt()); - } - - // Disallow replacing operands. - void replaceOperandWith(unsigned I, Metadata *New) = delete; - -public: - DEFINE_MDNODE_GET(DILocation, - (unsigned Line, unsigned Column, Metadata *Scope, - Metadata *InlinedAt = nullptr), - (Line, Column, Scope, InlinedAt)) - DEFINE_MDNODE_GET(DILocation, - (unsigned Line, unsigned Column, DILocalScope *Scope, - DILocation *InlinedAt = nullptr), - (Line, Column, Scope, InlinedAt)) - - /// \brief Return a (temporary) clone of this. - TempDILocation clone() const { return cloneImpl(); } - - unsigned getLine() const { return SubclassData32; } - unsigned getColumn() const { return SubclassData16; } - DILocalScope *getScope() const { return cast(getRawScope()); } - DILocation *getInlinedAt() const { - return cast_or_null(getRawInlinedAt()); - } - - DIFile *getFile() const { return getScope()->getFile(); } - StringRef getFilename() const { return getScope()->getFilename(); } - StringRef getDirectory() const { return getScope()->getDirectory(); } - - /// \brief Get the scope where this is inlined. - /// - /// Walk through \a getInlinedAt() and return \a getScope() from the deepest - /// location. - DILocalScope *getInlinedAtScope() const { - if (auto *IA = getInlinedAt()) - return IA->getInlinedAtScope(); - return getScope(); - } - - /// \brief Check whether this can be discriminated from another location. - /// - /// Check \c this can be discriminated from \c RHS in a linetable entry. - /// Scope and inlined-at chains are not recorded in the linetable, so they - /// cannot be used to distinguish basic blocks. - /// - /// The current implementation is weaker than it should be, since it just - /// checks filename and line. - /// - /// FIXME: Add a check for getDiscriminator(). - /// FIXME: Add a check for getColumn(). - /// FIXME: Change the getFilename() check to getFile() (or add one for - /// getDirectory()). - bool canDiscriminate(const DILocation &RHS) const { - return getFilename() != RHS.getFilename() || getLine() != RHS.getLine(); - } - - /// \brief Get the DWARF discriminator. - /// - /// DWARF discriminators distinguish identical file locations between - /// instructions that are on different basic blocks. - inline unsigned getDiscriminator() const; - - Metadata *getRawScope() const { return getOperand(0); } - Metadata *getRawInlinedAt() const { - if (getNumOperands() == 2) - return getOperand(1); - return nullptr; - } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DILocationKind; - } -}; - -/// \brief Subprogram description. -/// -/// TODO: Remove DisplayName. It's always equal to Name. -/// TODO: Split up flags. -class DISubprogram : public DILocalScope { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Line; - unsigned ScopeLine; - unsigned VirtualIndex; - - /// In the MS ABI, the implicit 'this' parameter is adjusted in the prologue - /// of method overrides from secondary bases by this amount. It may be - /// negative. - int ThisAdjustment; - - // Virtuality can only assume three values, so we can pack - // in 2 bits (none/pure/pure_virtual). - unsigned Virtuality : 2; - - unsigned Flags : 27; - - // These are boolean flags so one bit is enough. - // MSVC starts a new container field every time the base - // type changes so we can't use 'bool' to ensure these bits - // are packed. - unsigned IsLocalToUnit : 1; - unsigned IsDefinition : 1; - unsigned IsOptimized : 1; - - DISubprogram(LLVMContext &C, StorageType Storage, unsigned Line, - unsigned ScopeLine, unsigned Virtuality, unsigned VirtualIndex, - int ThisAdjustment, unsigned Flags, bool IsLocalToUnit, - bool IsDefinition, bool IsOptimized, ArrayRef Ops) - : DILocalScope(C, DISubprogramKind, Storage, dwarf::DW_TAG_subprogram, - Ops), - Line(Line), ScopeLine(ScopeLine), VirtualIndex(VirtualIndex), - ThisAdjustment(ThisAdjustment), Virtuality(Virtuality), Flags(Flags), - IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition), - IsOptimized(IsOptimized) { - static_assert(dwarf::DW_VIRTUALITY_max < 4, "Virtuality out of range"); - assert(Virtuality < 4 && "Virtuality out of range"); - assert((Flags < (1 << 27)) && "Flags out of range"); - } - ~DISubprogram() = default; - - static DISubprogram * - getImpl(LLVMContext &Context, DIScopeRef Scope, StringRef Name, - StringRef LinkageName, DIFile *File, unsigned Line, - DISubroutineType *Type, bool IsLocalToUnit, bool IsDefinition, - unsigned ScopeLine, DITypeRef ContainingType, unsigned Virtuality, - unsigned VirtualIndex, int ThisAdjustment, unsigned Flags, - bool IsOptimized, DICompileUnit *Unit, - DITemplateParameterArray TemplateParams, DISubprogram *Declaration, - DILocalVariableArray Variables, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Scope, getCanonicalMDString(Context, Name), - getCanonicalMDString(Context, LinkageName), File, Line, Type, - IsLocalToUnit, IsDefinition, ScopeLine, ContainingType, - Virtuality, VirtualIndex, ThisAdjustment, Flags, IsOptimized, - Unit, TemplateParams.get(), Declaration, Variables.get(), - Storage, ShouldCreate); - } - static DISubprogram * - getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, - MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, - bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, - Metadata *ContainingType, unsigned Virtuality, unsigned VirtualIndex, - int ThisAdjustment, unsigned Flags, bool IsOptimized, Metadata *Unit, - Metadata *TemplateParams, Metadata *Declaration, Metadata *Variables, - StorageType Storage, bool ShouldCreate = true); - - TempDISubprogram cloneImpl() const { - return getTemporary( - getContext(), getScope(), getName(), getLinkageName(), getFile(), - getLine(), getType(), isLocalToUnit(), isDefinition(), getScopeLine(), - getContainingType(), getVirtuality(), getVirtualIndex(), - getThisAdjustment(), getFlags(), isOptimized(), getUnit(), - getTemplateParams(), getDeclaration(), getVariables()); - } - -public: - DEFINE_MDNODE_GET(DISubprogram, - (DIScopeRef Scope, StringRef Name, StringRef LinkageName, - DIFile *File, unsigned Line, DISubroutineType *Type, - bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, - DITypeRef ContainingType, unsigned Virtuality, - unsigned VirtualIndex, int ThisAdjustment, unsigned Flags, - bool IsOptimized, DICompileUnit *Unit, - DITemplateParameterArray TemplateParams = nullptr, - DISubprogram *Declaration = nullptr, - DILocalVariableArray Variables = nullptr), - (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, - IsDefinition, ScopeLine, ContainingType, Virtuality, - VirtualIndex, ThisAdjustment, Flags, IsOptimized, Unit, - TemplateParams, Declaration, Variables)) - DEFINE_MDNODE_GET( - DISubprogram, - (Metadata * Scope, MDString *Name, MDString *LinkageName, Metadata *File, - unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, - unsigned ScopeLine, Metadata *ContainingType, unsigned Virtuality, - unsigned VirtualIndex, int ThisAdjustment, unsigned Flags, - bool IsOptimized, Metadata *Unit, Metadata *TemplateParams = nullptr, - Metadata *Declaration = nullptr, Metadata *Variables = nullptr), - (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, IsDefinition, - ScopeLine, ContainingType, Virtuality, VirtualIndex, ThisAdjustment, - Flags, IsOptimized, Unit, TemplateParams, Declaration, Variables)) - - TempDISubprogram clone() const { return cloneImpl(); } - -public: - unsigned getLine() const { return Line; } - unsigned getVirtuality() const { return Virtuality; } - unsigned getVirtualIndex() const { return VirtualIndex; } - int getThisAdjustment() const { return ThisAdjustment; } - unsigned getScopeLine() const { return ScopeLine; } - unsigned getFlags() const { return Flags; } - bool isLocalToUnit() const { return IsLocalToUnit; } - bool isDefinition() const { return IsDefinition; } - bool isOptimized() const { return IsOptimized; } - - unsigned isArtificial() const { return getFlags() & FlagArtificial; } - bool isPrivate() const { - return (getFlags() & FlagAccessibility) == FlagPrivate; - } - bool isProtected() const { - return (getFlags() & FlagAccessibility) == FlagProtected; - } - bool isPublic() const { - return (getFlags() & FlagAccessibility) == FlagPublic; - } - bool isExplicit() const { return getFlags() & FlagExplicit; } - bool isPrototyped() const { return getFlags() & FlagPrototyped; } - - /// \brief Check if this is reference-qualified. - /// - /// Return true if this subprogram is a C++11 reference-qualified non-static - /// member function (void foo() &). - unsigned isLValueReference() const { - return getFlags() & FlagLValueReference; - } - - /// \brief Check if this is rvalue-reference-qualified. - /// - /// Return true if this subprogram is a C++11 rvalue-reference-qualified - /// non-static member function (void foo() &&). - unsigned isRValueReference() const { - return getFlags() & FlagRValueReference; - } - - DIScopeRef getScope() const { return DIScopeRef(getRawScope()); } - - StringRef getName() const { return getStringOperand(2); } - StringRef getDisplayName() const { return getStringOperand(3); } - StringRef getLinkageName() const { return getStringOperand(4); } - - MDString *getRawName() const { return getOperandAs(2); } - MDString *getRawLinkageName() const { return getOperandAs(4); } - - DISubroutineType *getType() const { - return cast_or_null(getRawType()); - } - DITypeRef getContainingType() const { - return DITypeRef(getRawContainingType()); - } - - DICompileUnit *getUnit() const { - return cast_or_null(getRawUnit()); - } - void replaceUnit(DICompileUnit *CU) { - replaceOperandWith(7, CU); - } - DITemplateParameterArray getTemplateParams() const { - return cast_or_null(getRawTemplateParams()); - } - DISubprogram *getDeclaration() const { - return cast_or_null(getRawDeclaration()); - } - DILocalVariableArray getVariables() const { - return cast_or_null(getRawVariables()); - } - - Metadata *getRawScope() const { return getOperand(1); } - Metadata *getRawType() const { return getOperand(5); } - Metadata *getRawContainingType() const { return getOperand(6); } - Metadata *getRawUnit() const { return getOperand(7); } - Metadata *getRawTemplateParams() const { return getOperand(8); } - Metadata *getRawDeclaration() const { return getOperand(9); } - Metadata *getRawVariables() const { return getOperand(10); } - - /// \brief Check if this subprogram describes the given function. - /// - /// FIXME: Should this be looking through bitcasts? - bool describes(const Function *F) const; - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DISubprogramKind; - } -}; - -class DILexicalBlockBase : public DILocalScope { -protected: - DILexicalBlockBase(LLVMContext &C, unsigned ID, StorageType Storage, - ArrayRef Ops) - : DILocalScope(C, ID, Storage, dwarf::DW_TAG_lexical_block, Ops) {} - ~DILexicalBlockBase() = default; - -public: - DILocalScope *getScope() const { return cast(getRawScope()); } - - Metadata *getRawScope() const { return getOperand(1); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DILexicalBlockKind || - MD->getMetadataID() == DILexicalBlockFileKind; - } -}; - -class DILexicalBlock : public DILexicalBlockBase { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Line; - uint16_t Column; - - DILexicalBlock(LLVMContext &C, StorageType Storage, unsigned Line, - unsigned Column, ArrayRef Ops) - : DILexicalBlockBase(C, DILexicalBlockKind, Storage, Ops), Line(Line), - Column(Column) { - assert(Column < (1u << 16) && "Expected 16-bit column"); - } - ~DILexicalBlock() = default; - - static DILexicalBlock *getImpl(LLVMContext &Context, DILocalScope *Scope, - DIFile *File, unsigned Line, unsigned Column, - StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, static_cast(Scope), - static_cast(File), Line, Column, Storage, - ShouldCreate); - } - - static DILexicalBlock *getImpl(LLVMContext &Context, Metadata *Scope, - Metadata *File, unsigned Line, unsigned Column, - StorageType Storage, bool ShouldCreate = true); - - TempDILexicalBlock cloneImpl() const { - return getTemporary(getContext(), getScope(), getFile(), getLine(), - getColumn()); - } - -public: - DEFINE_MDNODE_GET(DILexicalBlock, (DILocalScope * Scope, DIFile *File, - unsigned Line, unsigned Column), - (Scope, File, Line, Column)) - DEFINE_MDNODE_GET(DILexicalBlock, (Metadata * Scope, Metadata *File, - unsigned Line, unsigned Column), - (Scope, File, Line, Column)) - - TempDILexicalBlock clone() const { return cloneImpl(); } - - unsigned getLine() const { return Line; } - unsigned getColumn() const { return Column; } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DILexicalBlockKind; - } -}; - -class DILexicalBlockFile : public DILexicalBlockBase { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Discriminator; - - DILexicalBlockFile(LLVMContext &C, StorageType Storage, - unsigned Discriminator, ArrayRef Ops) - : DILexicalBlockBase(C, DILexicalBlockFileKind, Storage, Ops), - Discriminator(Discriminator) {} - ~DILexicalBlockFile() = default; - - static DILexicalBlockFile *getImpl(LLVMContext &Context, DILocalScope *Scope, - DIFile *File, unsigned Discriminator, - StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, static_cast(Scope), - static_cast(File), Discriminator, Storage, - ShouldCreate); - } - - static DILexicalBlockFile *getImpl(LLVMContext &Context, Metadata *Scope, - Metadata *File, unsigned Discriminator, - StorageType Storage, - bool ShouldCreate = true); - - TempDILexicalBlockFile cloneImpl() const { - return getTemporary(getContext(), getScope(), getFile(), - getDiscriminator()); - } - -public: - DEFINE_MDNODE_GET(DILexicalBlockFile, (DILocalScope * Scope, DIFile *File, - unsigned Discriminator), - (Scope, File, Discriminator)) - DEFINE_MDNODE_GET(DILexicalBlockFile, - (Metadata * Scope, Metadata *File, unsigned Discriminator), - (Scope, File, Discriminator)) - - TempDILexicalBlockFile clone() const { return cloneImpl(); } - - // TODO: Remove these once they're gone from DILexicalBlockBase. - unsigned getLine() const = delete; - unsigned getColumn() const = delete; - - unsigned getDiscriminator() const { return Discriminator; } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DILexicalBlockFileKind; - } -}; - -unsigned DILocation::getDiscriminator() const { - if (auto *F = dyn_cast(getScope())) - return F->getDiscriminator(); - return 0; -} - -class DINamespace : public DIScope { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Line; - - DINamespace(LLVMContext &Context, StorageType Storage, unsigned Line, - ArrayRef Ops) - : DIScope(Context, DINamespaceKind, Storage, dwarf::DW_TAG_namespace, - Ops), - Line(Line) {} - ~DINamespace() = default; - - static DINamespace *getImpl(LLVMContext &Context, DIScope *Scope, - DIFile *File, StringRef Name, unsigned Line, - StorageType Storage, bool ShouldCreate = true) { - return getImpl(Context, Scope, File, getCanonicalMDString(Context, Name), - Line, Storage, ShouldCreate); - } - static DINamespace *getImpl(LLVMContext &Context, Metadata *Scope, - Metadata *File, MDString *Name, unsigned Line, - StorageType Storage, bool ShouldCreate = true); - - TempDINamespace cloneImpl() const { - return getTemporary(getContext(), getScope(), getFile(), getName(), - getLine()); - } - -public: - DEFINE_MDNODE_GET(DINamespace, (DIScope * Scope, DIFile *File, StringRef Name, - unsigned Line), - (Scope, File, Name, Line)) - DEFINE_MDNODE_GET(DINamespace, (Metadata * Scope, Metadata *File, - MDString *Name, unsigned Line), - (Scope, File, Name, Line)) - - TempDINamespace clone() const { return cloneImpl(); } - - unsigned getLine() const { return Line; } - DIScope *getScope() const { return cast_or_null(getRawScope()); } - StringRef getName() const { return getStringOperand(2); } - - Metadata *getRawScope() const { return getOperand(1); } - MDString *getRawName() const { return getOperandAs(2); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DINamespaceKind; - } -}; - -/// \brief A (clang) module that has been imported by the compile unit. -/// -class DIModule : public DIScope { - friend class LLVMContextImpl; - friend class MDNode; - - DIModule(LLVMContext &Context, StorageType Storage, ArrayRef Ops) - : DIScope(Context, DIModuleKind, Storage, dwarf::DW_TAG_module, Ops) {} - ~DIModule() {} - - static DIModule *getImpl(LLVMContext &Context, DIScope *Scope, - StringRef Name, StringRef ConfigurationMacros, - StringRef IncludePath, StringRef ISysRoot, - StorageType Storage, bool ShouldCreate = true) { - return getImpl(Context, Scope, getCanonicalMDString(Context, Name), - getCanonicalMDString(Context, ConfigurationMacros), - getCanonicalMDString(Context, IncludePath), - getCanonicalMDString(Context, ISysRoot), - Storage, ShouldCreate); - } - static DIModule *getImpl(LLVMContext &Context, Metadata *Scope, - MDString *Name, MDString *ConfigurationMacros, - MDString *IncludePath, MDString *ISysRoot, - StorageType Storage, bool ShouldCreate = true); - - TempDIModule cloneImpl() const { - return getTemporary(getContext(), getScope(), getName(), - getConfigurationMacros(), getIncludePath(), - getISysRoot()); - } - -public: - DEFINE_MDNODE_GET(DIModule, (DIScope *Scope, StringRef Name, - StringRef ConfigurationMacros, StringRef IncludePath, - StringRef ISysRoot), - (Scope, Name, ConfigurationMacros, IncludePath, ISysRoot)) - DEFINE_MDNODE_GET(DIModule, - (Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, - MDString *IncludePath, MDString *ISysRoot), - (Scope, Name, ConfigurationMacros, IncludePath, ISysRoot)) - - TempDIModule clone() const { return cloneImpl(); } - - DIScope *getScope() const { return cast_or_null(getRawScope()); } - StringRef getName() const { return getStringOperand(1); } - StringRef getConfigurationMacros() const { return getStringOperand(2); } - StringRef getIncludePath() const { return getStringOperand(3); } - StringRef getISysRoot() const { return getStringOperand(4); } - - Metadata *getRawScope() const { return getOperand(0); } - MDString *getRawName() const { return getOperandAs(1); } - MDString *getRawConfigurationMacros() const { return getOperandAs(2); } - MDString *getRawIncludePath() const { return getOperandAs(3); } - MDString *getRawISysRoot() const { return getOperandAs(4); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIModuleKind; - } -}; - -/// \brief Base class for template parameters. -class DITemplateParameter : public DINode { -protected: - DITemplateParameter(LLVMContext &Context, unsigned ID, StorageType Storage, - unsigned Tag, ArrayRef Ops) - : DINode(Context, ID, Storage, Tag, Ops) {} - ~DITemplateParameter() = default; - -public: - StringRef getName() const { return getStringOperand(0); } - DITypeRef getType() const { return DITypeRef(getRawType()); } - - MDString *getRawName() const { return getOperandAs(0); } - Metadata *getRawType() const { return getOperand(1); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DITemplateTypeParameterKind || - MD->getMetadataID() == DITemplateValueParameterKind; - } -}; - -class DITemplateTypeParameter : public DITemplateParameter { - friend class LLVMContextImpl; - friend class MDNode; - - DITemplateTypeParameter(LLVMContext &Context, StorageType Storage, - ArrayRef Ops) - : DITemplateParameter(Context, DITemplateTypeParameterKind, Storage, - dwarf::DW_TAG_template_type_parameter, Ops) {} - ~DITemplateTypeParameter() = default; - - static DITemplateTypeParameter *getImpl(LLVMContext &Context, StringRef Name, - DITypeRef Type, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, getCanonicalMDString(Context, Name), Type, Storage, - ShouldCreate); - } - static DITemplateTypeParameter *getImpl(LLVMContext &Context, MDString *Name, - Metadata *Type, StorageType Storage, - bool ShouldCreate = true); - - TempDITemplateTypeParameter cloneImpl() const { - return getTemporary(getContext(), getName(), getType()); - } - -public: - DEFINE_MDNODE_GET(DITemplateTypeParameter, (StringRef Name, DITypeRef Type), - (Name, Type)) - DEFINE_MDNODE_GET(DITemplateTypeParameter, (MDString * Name, Metadata *Type), - (Name, Type)) - - TempDITemplateTypeParameter clone() const { return cloneImpl(); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DITemplateTypeParameterKind; - } -}; - -class DITemplateValueParameter : public DITemplateParameter { - friend class LLVMContextImpl; - friend class MDNode; - - DITemplateValueParameter(LLVMContext &Context, StorageType Storage, - unsigned Tag, ArrayRef Ops) - : DITemplateParameter(Context, DITemplateValueParameterKind, Storage, Tag, - Ops) {} - ~DITemplateValueParameter() = default; - - static DITemplateValueParameter *getImpl(LLVMContext &Context, unsigned Tag, - StringRef Name, DITypeRef Type, - Metadata *Value, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Tag, getCanonicalMDString(Context, Name), Type, - Value, Storage, ShouldCreate); - } - static DITemplateValueParameter *getImpl(LLVMContext &Context, unsigned Tag, - MDString *Name, Metadata *Type, - Metadata *Value, StorageType Storage, - bool ShouldCreate = true); - - TempDITemplateValueParameter cloneImpl() const { - return getTemporary(getContext(), getTag(), getName(), getType(), - getValue()); - } - -public: - DEFINE_MDNODE_GET(DITemplateValueParameter, (unsigned Tag, StringRef Name, - DITypeRef Type, Metadata *Value), - (Tag, Name, Type, Value)) - DEFINE_MDNODE_GET(DITemplateValueParameter, (unsigned Tag, MDString *Name, - Metadata *Type, Metadata *Value), - (Tag, Name, Type, Value)) - - TempDITemplateValueParameter clone() const { return cloneImpl(); } - - Metadata *getValue() const { return getOperand(2); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DITemplateValueParameterKind; - } -}; - -/// \brief Base class for variables. -class DIVariable : public DINode { - unsigned Line; - -protected: - DIVariable(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Line, - ArrayRef Ops) - : DINode(C, ID, Storage, dwarf::DW_TAG_variable, Ops), Line(Line) {} - ~DIVariable() = default; - -public: - unsigned getLine() const { return Line; } - DIScope *getScope() const { return cast_or_null(getRawScope()); } - StringRef getName() const { return getStringOperand(1); } - DIFile *getFile() const { return cast_or_null(getRawFile()); } - DITypeRef getType() const { return DITypeRef(getRawType()); } - - StringRef getFilename() const { - if (auto *F = getFile()) - return F->getFilename(); - return ""; - } - StringRef getDirectory() const { - if (auto *F = getFile()) - return F->getDirectory(); - return ""; - } - - Metadata *getRawScope() const { return getOperand(0); } - MDString *getRawName() const { return getOperandAs(1); } - Metadata *getRawFile() const { return getOperand(2); } - Metadata *getRawType() const { return getOperand(3); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DILocalVariableKind || - MD->getMetadataID() == DIGlobalVariableKind; - } -}; - -/// \brief Global variables. -/// -/// TODO: Remove DisplayName. It's always equal to Name. -class DIGlobalVariable : public DIVariable { - friend class LLVMContextImpl; - friend class MDNode; - - bool IsLocalToUnit; - bool IsDefinition; - - DIGlobalVariable(LLVMContext &C, StorageType Storage, unsigned Line, - bool IsLocalToUnit, bool IsDefinition, - ArrayRef Ops) - : DIVariable(C, DIGlobalVariableKind, Storage, Line, Ops), - IsLocalToUnit(IsLocalToUnit), IsDefinition(IsDefinition) {} - ~DIGlobalVariable() = default; - - static DIGlobalVariable * - getImpl(LLVMContext &Context, DIScope *Scope, StringRef Name, - StringRef LinkageName, DIFile *File, unsigned Line, DITypeRef Type, - bool IsLocalToUnit, bool IsDefinition, Constant *Variable, - DIDerivedType *StaticDataMemberDeclaration, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Scope, getCanonicalMDString(Context, Name), - getCanonicalMDString(Context, LinkageName), File, Line, Type, - IsLocalToUnit, IsDefinition, - Variable ? ConstantAsMetadata::get(Variable) : nullptr, - StaticDataMemberDeclaration, Storage, ShouldCreate); - } - static DIGlobalVariable * - getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name, - MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, - bool IsLocalToUnit, bool IsDefinition, Metadata *Variable, - Metadata *StaticDataMemberDeclaration, StorageType Storage, - bool ShouldCreate = true); - - TempDIGlobalVariable cloneImpl() const { - return getTemporary(getContext(), getScope(), getName(), getLinkageName(), - getFile(), getLine(), getType(), isLocalToUnit(), - isDefinition(), getVariable(), - getStaticDataMemberDeclaration()); - } - -public: - DEFINE_MDNODE_GET(DIGlobalVariable, - (DIScope * Scope, StringRef Name, StringRef LinkageName, - DIFile *File, unsigned Line, DITypeRef Type, - bool IsLocalToUnit, bool IsDefinition, Constant *Variable, - DIDerivedType *StaticDataMemberDeclaration), - (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, - IsDefinition, Variable, StaticDataMemberDeclaration)) - DEFINE_MDNODE_GET(DIGlobalVariable, - (Metadata * Scope, MDString *Name, MDString *LinkageName, - Metadata *File, unsigned Line, Metadata *Type, - bool IsLocalToUnit, bool IsDefinition, Metadata *Variable, - Metadata *StaticDataMemberDeclaration), - (Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, - IsDefinition, Variable, StaticDataMemberDeclaration)) - - TempDIGlobalVariable clone() const { return cloneImpl(); } - - bool isLocalToUnit() const { return IsLocalToUnit; } - bool isDefinition() const { return IsDefinition; } - StringRef getDisplayName() const { return getStringOperand(4); } - StringRef getLinkageName() const { return getStringOperand(5); } - Constant *getVariable() const { - if (auto *C = cast_or_null(getRawVariable())) - return dyn_cast(C->getValue()); - return nullptr; - } - DIDerivedType *getStaticDataMemberDeclaration() const { - return cast_or_null(getRawStaticDataMemberDeclaration()); - } - - MDString *getRawLinkageName() const { return getOperandAs(5); } - Metadata *getRawVariable() const { return getOperand(6); } - Metadata *getRawStaticDataMemberDeclaration() const { return getOperand(7); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIGlobalVariableKind; - } -}; - -/// \brief Local variable. -/// -/// TODO: Split up flags. -class DILocalVariable : public DIVariable { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Arg : 16; - unsigned Flags : 16; - - DILocalVariable(LLVMContext &C, StorageType Storage, unsigned Line, - unsigned Arg, unsigned Flags, ArrayRef Ops) - : DIVariable(C, DILocalVariableKind, Storage, Line, Ops), Arg(Arg), - Flags(Flags) { - assert(Flags < (1 << 16) && "DILocalVariable: Flags out of range"); - assert(Arg < (1 << 16) && "DILocalVariable: Arg out of range"); - } - ~DILocalVariable() = default; - - static DILocalVariable *getImpl(LLVMContext &Context, DIScope *Scope, - StringRef Name, DIFile *File, unsigned Line, - DITypeRef Type, unsigned Arg, unsigned Flags, - StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Scope, getCanonicalMDString(Context, Name), File, - Line, Type, Arg, Flags, Storage, ShouldCreate); - } - static DILocalVariable *getImpl(LLVMContext &Context, Metadata *Scope, - MDString *Name, Metadata *File, unsigned Line, - Metadata *Type, unsigned Arg, unsigned Flags, - StorageType Storage, - bool ShouldCreate = true); - - TempDILocalVariable cloneImpl() const { - return getTemporary(getContext(), getScope(), getName(), getFile(), - getLine(), getType(), getArg(), getFlags()); - } - -public: - DEFINE_MDNODE_GET(DILocalVariable, - (DILocalScope * Scope, StringRef Name, DIFile *File, - unsigned Line, DITypeRef Type, unsigned Arg, - unsigned Flags), - (Scope, Name, File, Line, Type, Arg, Flags)) - DEFINE_MDNODE_GET(DILocalVariable, - (Metadata * Scope, MDString *Name, Metadata *File, - unsigned Line, Metadata *Type, unsigned Arg, - unsigned Flags), - (Scope, Name, File, Line, Type, Arg, Flags)) - - TempDILocalVariable clone() const { return cloneImpl(); } - - /// \brief Get the local scope for this variable. - /// - /// Variables must be defined in a local scope. - DILocalScope *getScope() const { - return cast(DIVariable::getScope()); - } - - bool isParameter() const { return Arg; } - unsigned getArg() const { return Arg; } - unsigned getFlags() const { return Flags; } - - bool isArtificial() const { return getFlags() & FlagArtificial; } - bool isObjectPointer() const { return getFlags() & FlagObjectPointer; } - - /// \brief Check that a location is valid for this variable. - /// - /// Check that \c DL exists, is in the same subprogram, and has the same - /// inlined-at location as \c this. (Otherwise, it's not a valid attachment - /// to a \a DbgInfoIntrinsic.) - bool isValidLocationForIntrinsic(const DILocation *DL) const { - return DL && getScope()->getSubprogram() == DL->getScope()->getSubprogram(); - } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DILocalVariableKind; - } -}; - -/// \brief DWARF expression. -/// -/// This is (almost) a DWARF expression that modifies the location of a -/// variable or (or the location of a single piece of a variable). -/// -/// FIXME: Instead of DW_OP_plus taking an argument, this should use DW_OP_const -/// and have DW_OP_plus consume the topmost elements on the stack. -/// -/// TODO: Co-allocate the expression elements. -/// TODO: Separate from MDNode, or otherwise drop Distinct and Temporary -/// storage types. -class DIExpression : public MDNode { - friend class LLVMContextImpl; - friend class MDNode; - - std::vector Elements; - - DIExpression(LLVMContext &C, StorageType Storage, ArrayRef Elements) - : MDNode(C, DIExpressionKind, Storage, None), - Elements(Elements.begin(), Elements.end()) {} - ~DIExpression() = default; - - static DIExpression *getImpl(LLVMContext &Context, - ArrayRef Elements, StorageType Storage, - bool ShouldCreate = true); - - TempDIExpression cloneImpl() const { - return getTemporary(getContext(), getElements()); - } - -public: - DEFINE_MDNODE_GET(DIExpression, (ArrayRef Elements), (Elements)) - - TempDIExpression clone() const { return cloneImpl(); } - - ArrayRef getElements() const { return Elements; } - - unsigned getNumElements() const { return Elements.size(); } - uint64_t getElement(unsigned I) const { - assert(I < Elements.size() && "Index out of range"); - return Elements[I]; - } - - /// \brief Return whether this is a piece of an aggregate variable. - bool isBitPiece() const; - - /// \brief Return the offset of this piece in bits. - uint64_t getBitPieceOffset() const; - - /// \brief Return the size of this piece in bits. - uint64_t getBitPieceSize() const; - - typedef ArrayRef::iterator element_iterator; - element_iterator elements_begin() const { return getElements().begin(); } - element_iterator elements_end() const { return getElements().end(); } - - /// \brief A lightweight wrapper around an expression operand. - /// - /// TODO: Store arguments directly and change \a DIExpression to store a - /// range of these. - class ExprOperand { - const uint64_t *Op; - - public: - explicit ExprOperand(const uint64_t *Op) : Op(Op) {} - - const uint64_t *get() const { return Op; } - - /// \brief Get the operand code. - uint64_t getOp() const { return *Op; } - - /// \brief Get an argument to the operand. - /// - /// Never returns the operand itself. - uint64_t getArg(unsigned I) const { return Op[I + 1]; } - - unsigned getNumArgs() const { return getSize() - 1; } - - /// \brief Return the size of the operand. - /// - /// Return the number of elements in the operand (1 + args). - unsigned getSize() const; - }; - - /// \brief An iterator for expression operands. - class expr_op_iterator - : public std::iterator { - ExprOperand Op; - - public: - explicit expr_op_iterator(element_iterator I) : Op(I) {} - - element_iterator getBase() const { return Op.get(); } - const ExprOperand &operator*() const { return Op; } - const ExprOperand *operator->() const { return &Op; } - - expr_op_iterator &operator++() { - increment(); - return *this; - } - expr_op_iterator operator++(int) { - expr_op_iterator T(*this); - increment(); - return T; - } - - /// \brief Get the next iterator. - /// - /// \a std::next() doesn't work because this is technically an - /// input_iterator, but it's a perfectly valid operation. This is an - /// accessor to provide the same functionality. - expr_op_iterator getNext() const { return ++expr_op_iterator(*this); } - - bool operator==(const expr_op_iterator &X) const { - return getBase() == X.getBase(); - } - bool operator!=(const expr_op_iterator &X) const { - return getBase() != X.getBase(); - } - - private: - void increment() { Op = ExprOperand(getBase() + Op.getSize()); } - }; - - /// \brief Visit the elements via ExprOperand wrappers. - /// - /// These range iterators visit elements through \a ExprOperand wrappers. - /// This is not guaranteed to be a valid range unless \a isValid() gives \c - /// true. - /// - /// \pre \a isValid() gives \c true. - /// @{ - expr_op_iterator expr_op_begin() const { - return expr_op_iterator(elements_begin()); - } - expr_op_iterator expr_op_end() const { - return expr_op_iterator(elements_end()); - } - /// @} - - bool isValid() const; - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIExpressionKind; - } -}; - -class DIObjCProperty : public DINode { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Line; - unsigned Attributes; - - DIObjCProperty(LLVMContext &C, StorageType Storage, unsigned Line, - unsigned Attributes, ArrayRef Ops) - : DINode(C, DIObjCPropertyKind, Storage, dwarf::DW_TAG_APPLE_property, - Ops), - Line(Line), Attributes(Attributes) {} - ~DIObjCProperty() = default; - - static DIObjCProperty * - getImpl(LLVMContext &Context, StringRef Name, DIFile *File, unsigned Line, - StringRef GetterName, StringRef SetterName, unsigned Attributes, - DITypeRef Type, StorageType Storage, bool ShouldCreate = true) { - return getImpl(Context, getCanonicalMDString(Context, Name), File, Line, - getCanonicalMDString(Context, GetterName), - getCanonicalMDString(Context, SetterName), Attributes, Type, - Storage, ShouldCreate); - } - static DIObjCProperty *getImpl(LLVMContext &Context, MDString *Name, - Metadata *File, unsigned Line, - MDString *GetterName, MDString *SetterName, - unsigned Attributes, Metadata *Type, - StorageType Storage, bool ShouldCreate = true); - - TempDIObjCProperty cloneImpl() const { - return getTemporary(getContext(), getName(), getFile(), getLine(), - getGetterName(), getSetterName(), getAttributes(), - getType()); - } - -public: - DEFINE_MDNODE_GET(DIObjCProperty, - (StringRef Name, DIFile *File, unsigned Line, - StringRef GetterName, StringRef SetterName, - unsigned Attributes, DITypeRef Type), - (Name, File, Line, GetterName, SetterName, Attributes, - Type)) - DEFINE_MDNODE_GET(DIObjCProperty, - (MDString * Name, Metadata *File, unsigned Line, - MDString *GetterName, MDString *SetterName, - unsigned Attributes, Metadata *Type), - (Name, File, Line, GetterName, SetterName, Attributes, - Type)) - - TempDIObjCProperty clone() const { return cloneImpl(); } - - unsigned getLine() const { return Line; } - unsigned getAttributes() const { return Attributes; } - StringRef getName() const { return getStringOperand(0); } - DIFile *getFile() const { return cast_or_null(getRawFile()); } - StringRef getGetterName() const { return getStringOperand(2); } - StringRef getSetterName() const { return getStringOperand(3); } - DITypeRef getType() const { return DITypeRef(getRawType()); } - - StringRef getFilename() const { - if (auto *F = getFile()) - return F->getFilename(); - return ""; - } - StringRef getDirectory() const { - if (auto *F = getFile()) - return F->getDirectory(); - return ""; - } - - MDString *getRawName() const { return getOperandAs(0); } - Metadata *getRawFile() const { return getOperand(1); } - MDString *getRawGetterName() const { return getOperandAs(2); } - MDString *getRawSetterName() const { return getOperandAs(3); } - Metadata *getRawType() const { return getOperand(4); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIObjCPropertyKind; - } -}; - -/// \brief An imported module (C++ using directive or similar). -class DIImportedEntity : public DINode { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Line; - - DIImportedEntity(LLVMContext &C, StorageType Storage, unsigned Tag, - unsigned Line, ArrayRef Ops) - : DINode(C, DIImportedEntityKind, Storage, Tag, Ops), Line(Line) {} - ~DIImportedEntity() = default; - - static DIImportedEntity *getImpl(LLVMContext &Context, unsigned Tag, - DIScope *Scope, DINodeRef Entity, - unsigned Line, StringRef Name, - StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, Tag, Scope, Entity, Line, - getCanonicalMDString(Context, Name), Storage, ShouldCreate); - } - static DIImportedEntity *getImpl(LLVMContext &Context, unsigned Tag, - Metadata *Scope, Metadata *Entity, - unsigned Line, MDString *Name, - StorageType Storage, - bool ShouldCreate = true); - - TempDIImportedEntity cloneImpl() const { - return getTemporary(getContext(), getTag(), getScope(), getEntity(), - getLine(), getName()); - } - -public: - DEFINE_MDNODE_GET(DIImportedEntity, - (unsigned Tag, DIScope *Scope, DINodeRef Entity, - unsigned Line, StringRef Name = ""), - (Tag, Scope, Entity, Line, Name)) - DEFINE_MDNODE_GET(DIImportedEntity, - (unsigned Tag, Metadata *Scope, Metadata *Entity, - unsigned Line, MDString *Name), - (Tag, Scope, Entity, Line, Name)) - - TempDIImportedEntity clone() const { return cloneImpl(); } - - unsigned getLine() const { return Line; } - DIScope *getScope() const { return cast_or_null(getRawScope()); } - DINodeRef getEntity() const { return DINodeRef(getRawEntity()); } - StringRef getName() const { return getStringOperand(2); } - - Metadata *getRawScope() const { return getOperand(0); } - Metadata *getRawEntity() const { return getOperand(1); } - MDString *getRawName() const { return getOperandAs(2); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIImportedEntityKind; - } -}; - -/// \brief Macro Info DWARF-like metadata node. -/// -/// A metadata node with a DWARF macro info (i.e., a constant named -/// \c DW_MACINFO_*, defined in llvm/Support/Dwarf.h). Called \a DIMacroNode -/// because it's potentially used for non-DWARF output. -class DIMacroNode : public MDNode { - friend class LLVMContextImpl; - friend class MDNode; - -protected: - DIMacroNode(LLVMContext &C, unsigned ID, StorageType Storage, unsigned MIType, - ArrayRef Ops1, ArrayRef Ops2 = None) - : MDNode(C, ID, Storage, Ops1, Ops2) { - assert(MIType < 1u << 16); - SubclassData16 = MIType; - } - ~DIMacroNode() = default; - - template Ty *getOperandAs(unsigned I) const { - return cast_or_null(getOperand(I)); - } - - StringRef getStringOperand(unsigned I) const { - if (auto *S = getOperandAs(I)) - return S->getString(); - return StringRef(); - } - - static MDString *getCanonicalMDString(LLVMContext &Context, StringRef S) { - if (S.empty()) - return nullptr; - return MDString::get(Context, S); - } - -public: - unsigned getMacinfoType() const { return SubclassData16; } - - static bool classof(const Metadata *MD) { - switch (MD->getMetadataID()) { - default: - return false; - case DIMacroKind: - case DIMacroFileKind: - return true; - } - } -}; - -class DIMacro : public DIMacroNode { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Line; - - DIMacro(LLVMContext &C, StorageType Storage, unsigned MIType, unsigned Line, - ArrayRef Ops) - : DIMacroNode(C, DIMacroKind, Storage, MIType, Ops), Line(Line) {} - ~DIMacro() = default; - - static DIMacro *getImpl(LLVMContext &Context, unsigned MIType, unsigned Line, - StringRef Name, StringRef Value, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, MIType, Line, getCanonicalMDString(Context, Name), - getCanonicalMDString(Context, Value), Storage, ShouldCreate); - } - static DIMacro *getImpl(LLVMContext &Context, unsigned MIType, unsigned Line, - MDString *Name, MDString *Value, StorageType Storage, - bool ShouldCreate = true); - - TempDIMacro cloneImpl() const { - return getTemporary(getContext(), getMacinfoType(), getLine(), getName(), - getValue()); - } - -public: - DEFINE_MDNODE_GET(DIMacro, (unsigned MIType, unsigned Line, StringRef Name, - StringRef Value = ""), - (MIType, Line, Name, Value)) - DEFINE_MDNODE_GET(DIMacro, (unsigned MIType, unsigned Line, MDString *Name, - MDString *Value), - (MIType, Line, Name, Value)) - - TempDIMacro clone() const { return cloneImpl(); } - - unsigned getLine() const { return Line; } - - StringRef getName() const { return getStringOperand(0); } - StringRef getValue() const { return getStringOperand(1); } - - MDString *getRawName() const { return getOperandAs(0); } - MDString *getRawValue() const { return getOperandAs(1); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIMacroKind; - } -}; - -class DIMacroFile : public DIMacroNode { - friend class LLVMContextImpl; - friend class MDNode; - - unsigned Line; - - DIMacroFile(LLVMContext &C, StorageType Storage, unsigned MIType, - unsigned Line, ArrayRef Ops) - : DIMacroNode(C, DIMacroFileKind, Storage, MIType, Ops), Line(Line) {} - ~DIMacroFile() = default; - - static DIMacroFile *getImpl(LLVMContext &Context, unsigned MIType, - unsigned Line, DIFile *File, - DIMacroNodeArray Elements, StorageType Storage, - bool ShouldCreate = true) { - return getImpl(Context, MIType, Line, static_cast(File), - Elements.get(), Storage, ShouldCreate); - } - - static DIMacroFile *getImpl(LLVMContext &Context, unsigned MIType, - unsigned Line, Metadata *File, Metadata *Elements, - StorageType Storage, bool ShouldCreate = true); - - TempDIMacroFile cloneImpl() const { - return getTemporary(getContext(), getMacinfoType(), getLine(), getFile(), - getElements()); - } - -public: - DEFINE_MDNODE_GET(DIMacroFile, (unsigned MIType, unsigned Line, DIFile *File, - DIMacroNodeArray Elements), - (MIType, Line, File, Elements)) - DEFINE_MDNODE_GET(DIMacroFile, (unsigned MIType, unsigned Line, - Metadata *File, Metadata *Elements), - (MIType, Line, File, Elements)) - - TempDIMacroFile clone() const { return cloneImpl(); } - - void replaceElements(DIMacroNodeArray Elements) { -#ifndef NDEBUG - for (DIMacroNode *Op : getElements()) - assert(std::find(Elements->op_begin(), Elements->op_end(), Op) && - "Lost a macro node during macro node list replacement"); -#endif - replaceOperandWith(1, Elements.get()); - } - - unsigned getLine() const { return Line; } - DIFile *getFile() const { return cast_or_null(getRawFile()); } - - DIMacroNodeArray getElements() const { - return cast_or_null(getRawElements()); - } - - Metadata *getRawFile() const { return getOperand(0); } - Metadata *getRawElements() const { return getOperand(1); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == DIMacroFileKind; - } -}; - -} // end namespace llvm - -#undef DEFINE_MDNODE_GET_UNPACK_IMPL -#undef DEFINE_MDNODE_GET_UNPACK -#undef DEFINE_MDNODE_GET - -#endif diff --git a/llvm/include/llvm/IR/DebugLoc.h b/llvm/include/llvm/IR/DebugLoc.h deleted file mode 100644 index 8ea5875e..00000000 --- a/llvm/include/llvm/IR/DebugLoc.h +++ /dev/null @@ -1,126 +0,0 @@ -//===- DebugLoc.h - Debug Location Information ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a number of light weight data structures used -// to describe and track debug location information. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DEBUGLOC_H -#define LLVM_IR_DEBUGLOC_H - -#include "llvm/IR/TrackingMDRef.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - - class LLVMContext; - class raw_ostream; - class DILocation; - - /// \brief A debug info location. - /// - /// This class is a wrapper around a tracking reference to an \a DILocation - /// pointer. - /// - /// To avoid extra includes, \a DebugLoc doubles the \a DILocation API with a - /// one based on relatively opaque \a MDNode pointers. - class DebugLoc { - TrackingMDNodeRef Loc; - - public: - DebugLoc() {} - DebugLoc(DebugLoc &&X) : Loc(std::move(X.Loc)) {} - DebugLoc(const DebugLoc &X) : Loc(X.Loc) {} - DebugLoc &operator=(DebugLoc &&X) { - Loc = std::move(X.Loc); - return *this; - } - DebugLoc &operator=(const DebugLoc &X) { - Loc = X.Loc; - return *this; - } - - /// \brief Construct from an \a DILocation. - DebugLoc(const DILocation *L); - - /// \brief Construct from an \a MDNode. - /// - /// Note: if \c N is not an \a DILocation, a verifier check will fail, and - /// accessors will crash. However, construction from other nodes is - /// supported in order to handle forward references when reading textual - /// IR. - explicit DebugLoc(const MDNode *N); - - /// \brief Get the underlying \a DILocation. - /// - /// \pre !*this or \c isa(getAsMDNode()). - /// @{ - DILocation *get() const; - operator DILocation *() const { return get(); } - DILocation *operator->() const { return get(); } - DILocation &operator*() const { return *get(); } - /// @} - - /// \brief Check for null. - /// - /// Check for null in a way that is safe with broken debug info. Unlike - /// the conversion to \c DILocation, this doesn't require that \c Loc is of - /// the right type. Important for cases like \a llvm::StripDebugInfo() and - /// \a Instruction::hasMetadata(). - explicit operator bool() const { return Loc; } - - /// \brief Check whether this has a trivial destructor. - bool hasTrivialDestructor() const { return Loc.hasTrivialDestructor(); } - - /// \brief Create a new DebugLoc. - /// - /// Create a new DebugLoc at the specified line/col and scope/inline. This - /// forwards to \a DILocation::get(). - /// - /// If \c !Scope, returns a default-constructed \a DebugLoc. - /// - /// FIXME: Remove this. Users should use DILocation::get(). - static DebugLoc get(unsigned Line, unsigned Col, const MDNode *Scope, - const MDNode *InlinedAt = nullptr); - - unsigned getLine() const; - unsigned getCol() const; - MDNode *getScope() const; - DILocation *getInlinedAt() const; - - /// \brief Get the fully inlined-at scope for a DebugLoc. - /// - /// Gets the inlined-at scope for a DebugLoc. - MDNode *getInlinedAtScope() const; - - /// \brief Find the debug info location for the start of the function. - /// - /// Walk up the scope chain of given debug loc and find line number info - /// for the function. - /// - /// FIXME: Remove this. Users should use DILocation/DILocalScope API to - /// find the subprogram, and then DILocation::get(). - DebugLoc getFnDebugLoc() const; - - /// \brief Return \c this as a bar \a MDNode. - MDNode *getAsMDNode() const { return Loc; } - - bool operator==(const DebugLoc &DL) const { return Loc == DL.Loc; } - bool operator!=(const DebugLoc &DL) const { return Loc != DL.Loc; } - - void dump() const; - - /// \brief prints source location /path/to/file.exe:line:col @[inlined at] - void print(raw_ostream &OS) const; - }; - -} // end namespace llvm - -#endif /* LLVM_SUPPORT_DEBUGLOC_H */ diff --git a/llvm/include/llvm/IR/DerivedTypes.h b/llvm/include/llvm/IR/DerivedTypes.h deleted file mode 100644 index efd0d073..00000000 --- a/llvm/include/llvm/IR/DerivedTypes.h +++ /dev/null @@ -1,480 +0,0 @@ -//===-- llvm/DerivedTypes.h - Classes for handling data types ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declarations of classes that represent "derived -// types". These are things like "arrays of x" or "structure of x, y, z" or -// "function returning x taking (y,z) as parameters", etc... -// -// The implementations of these classes live in the Type.cpp file. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DERIVEDTYPES_H -#define LLVM_IR_DERIVEDTYPES_H - -#include "llvm/IR/Type.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - -class Value; -class APInt; -class LLVMContext; -template class ArrayRef; -class StringRef; - -/// Class to represent integer types. Note that this class is also used to -/// represent the built-in integer types: Int1Ty, Int8Ty, Int16Ty, Int32Ty and -/// Int64Ty. -/// @brief Integer representation type -class IntegerType : public Type { - friend class LLVMContextImpl; - -protected: - explicit IntegerType(LLVMContext &C, unsigned NumBits) : Type(C, IntegerTyID){ - setSubclassData(NumBits); - } - -public: - /// This enum is just used to hold constants we need for IntegerType. - enum { - MIN_INT_BITS = 1, ///< Minimum number of bits that can be specified - MAX_INT_BITS = (1<<23)-1 ///< Maximum number of bits that can be specified - ///< Note that bit width is stored in the Type classes SubclassData field - ///< which has 23 bits. This yields a maximum bit width of 8,388,607 bits. - }; - - /// This static method is the primary way of constructing an IntegerType. - /// If an IntegerType with the same NumBits value was previously instantiated, - /// that instance will be returned. Otherwise a new one will be created. Only - /// one instance with a given NumBits value is ever created. - /// @brief Get or create an IntegerType instance. - static IntegerType *get(LLVMContext &C, unsigned NumBits); - - /// @brief Get the number of bits in this IntegerType - unsigned getBitWidth() const { return getSubclassData(); } - - /// Return a bitmask with ones set for all of the bits that can be set by an - /// unsigned version of this type. This is 0xFF for i8, 0xFFFF for i16, etc. - uint64_t getBitMask() const { - return ~uint64_t(0UL) >> (64-getBitWidth()); - } - - /// Return a uint64_t with just the most significant bit set (the sign bit, if - /// the value is treated as a signed number). - uint64_t getSignBit() const { - return 1ULL << (getBitWidth()-1); - } - - /// For example, this is 0xFF for an 8 bit integer, 0xFFFF for i16, etc. - /// @returns a bit mask with ones set for all the bits of this type. - /// @brief Get a bit mask for this type. - APInt getMask() const; - - /// This method determines if the width of this IntegerType is a power-of-2 - /// in terms of 8 bit bytes. - /// @returns true if this is a power-of-2 byte width. - /// @brief Is this a power-of-2 byte-width IntegerType ? - bool isPowerOf2ByteWidth() const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Type *T) { - return T->getTypeID() == IntegerTyID; - } -}; - -unsigned Type::getIntegerBitWidth() const { - return cast(this)->getBitWidth(); -} - -/// Class to represent function types -/// -class FunctionType : public Type { - FunctionType(const FunctionType &) = delete; - const FunctionType &operator=(const FunctionType &) = delete; - FunctionType(Type *Result, ArrayRef Params, bool IsVarArgs); - -public: - /// This static method is the primary way of constructing a FunctionType. - static FunctionType *get(Type *Result, - ArrayRef Params, bool isVarArg); - - /// Create a FunctionType taking no parameters. - static FunctionType *get(Type *Result, bool isVarArg); - - /// Return true if the specified type is valid as a return type. - static bool isValidReturnType(Type *RetTy); - - /// Return true if the specified type is valid as an argument type. - static bool isValidArgumentType(Type *ArgTy); - - bool isVarArg() const { return getSubclassData()!=0; } - Type *getReturnType() const { return ContainedTys[0]; } - - typedef Type::subtype_iterator param_iterator; - param_iterator param_begin() const { return ContainedTys + 1; } - param_iterator param_end() const { return &ContainedTys[NumContainedTys]; } - ArrayRef params() const { - return makeArrayRef(param_begin(), param_end()); - } - - /// Parameter type accessors. - Type *getParamType(unsigned i) const { return ContainedTys[i+1]; } - - /// Return the number of fixed parameters this function type requires. - /// This does not consider varargs. - unsigned getNumParams() const { return NumContainedTys - 1; } - - /// Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Type *T) { - return T->getTypeID() == FunctionTyID; - } -}; -static_assert(AlignOf::Alignment >= AlignOf::Alignment, - "Alignment sufficient for objects appended to FunctionType"); - -bool Type::isFunctionVarArg() const { - return cast(this)->isVarArg(); -} - -Type *Type::getFunctionParamType(unsigned i) const { - return cast(this)->getParamType(i); -} - -unsigned Type::getFunctionNumParams() const { - return cast(this)->getNumParams(); -} - -/// Common super class of ArrayType, StructType, PointerType and VectorType. -class CompositeType : public Type { -protected: - explicit CompositeType(LLVMContext &C, TypeID tid) : Type(C, tid) {} - -public: - /// Given an index value into the type, return the type of the element. - Type *getTypeAtIndex(const Value *V) const; - Type *getTypeAtIndex(unsigned Idx) const; - bool indexValid(const Value *V) const; - bool indexValid(unsigned Idx) const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Type *T) { - return T->getTypeID() == ArrayTyID || - T->getTypeID() == StructTyID || - T->getTypeID() == PointerTyID || - T->getTypeID() == VectorTyID; - } -}; - -/// Class to represent struct types. There are two different kinds of struct -/// types: Literal structs and Identified structs. -/// -/// Literal struct types (e.g. { i32, i32 }) are uniqued structurally, and must -/// always have a body when created. You can get one of these by using one of -/// the StructType::get() forms. -/// -/// Identified structs (e.g. %foo or %42) may optionally have a name and are not -/// uniqued. The names for identified structs are managed at the LLVMContext -/// level, so there can only be a single identified struct with a given name in -/// a particular LLVMContext. Identified structs may also optionally be opaque -/// (have no body specified). You get one of these by using one of the -/// StructType::create() forms. -/// -/// Independent of what kind of struct you have, the body of a struct type are -/// laid out in memory consequtively with the elements directly one after the -/// other (if the struct is packed) or (if not packed) with padding between the -/// elements as defined by DataLayout (which is required to match what the code -/// generator for a target expects). -/// -class StructType : public CompositeType { - StructType(const StructType &) = delete; - const StructType &operator=(const StructType &) = delete; - StructType(LLVMContext &C) - : CompositeType(C, StructTyID), SymbolTableEntry(nullptr) {} - enum { - /// This is the contents of the SubClassData field. - SCDB_HasBody = 1, - SCDB_Packed = 2, - SCDB_IsLiteral = 4, - SCDB_IsSized = 8 - }; - - /// For a named struct that actually has a name, this is a pointer to the - /// symbol table entry (maintained by LLVMContext) for the struct. - /// This is null if the type is an literal struct or if it is a identified - /// type that has an empty name. - void *SymbolTableEntry; - -public: - /// This creates an identified struct. - static StructType *create(LLVMContext &Context, StringRef Name); - static StructType *create(LLVMContext &Context); - - static StructType *create(ArrayRef Elements, StringRef Name, - bool isPacked = false); - static StructType *create(ArrayRef Elements); - static StructType *create(LLVMContext &Context, ArrayRef Elements, - StringRef Name, bool isPacked = false); - static StructType *create(LLVMContext &Context, ArrayRef Elements); - static StructType *create(StringRef Name, Type *elt1, ...) LLVM_END_WITH_NULL; - - /// This static method is the primary way to create a literal StructType. - static StructType *get(LLVMContext &Context, ArrayRef Elements, - bool isPacked = false); - - /// Create an empty structure type. - static StructType *get(LLVMContext &Context, bool isPacked = false); - - /// This static method is a convenience method for creating structure types by - /// specifying the elements as arguments. Note that this method always returns - /// a non-packed struct, and requires at least one element type. - static StructType *get(Type *elt1, ...) LLVM_END_WITH_NULL; - - bool isPacked() const { return (getSubclassData() & SCDB_Packed) != 0; } - - /// Return true if this type is uniqued by structural equivalence, false if it - /// is a struct definition. - bool isLiteral() const { return (getSubclassData() & SCDB_IsLiteral) != 0; } - - /// Return true if this is a type with an identity that has no body specified - /// yet. These prints as 'opaque' in .ll files. - bool isOpaque() const { return (getSubclassData() & SCDB_HasBody) == 0; } - - /// isSized - Return true if this is a sized type. - bool isSized(SmallPtrSetImpl *Visited = nullptr) const; - - /// Return true if this is a named struct that has a non-empty name. - bool hasName() const { return SymbolTableEntry != nullptr; } - - /// Return the name for this struct type if it has an identity. - /// This may return an empty string for an unnamed struct type. Do not call - /// this on an literal type. - StringRef getName() const; - - /// Change the name of this type to the specified name, or to a name with a - /// suffix if there is a collision. Do not call this on an literal type. - void setName(StringRef Name); - - /// Specify a body for an opaque identified type. - void setBody(ArrayRef Elements, bool isPacked = false); - void setBody(Type *elt1, ...) LLVM_END_WITH_NULL; - - /// Return true if the specified type is valid as a element type. - static bool isValidElementType(Type *ElemTy); - - // Iterator access to the elements. - typedef Type::subtype_iterator element_iterator; - element_iterator element_begin() const { return ContainedTys; } - element_iterator element_end() const { return &ContainedTys[NumContainedTys];} - ArrayRef const elements() const { - return makeArrayRef(element_begin(), element_end()); - } - - /// Return true if this is layout identical to the specified struct. - bool isLayoutIdentical(StructType *Other) const; - - /// Random access to the elements - unsigned getNumElements() const { return NumContainedTys; } - Type *getElementType(unsigned N) const { - assert(N < NumContainedTys && "Element number out of range!"); - return ContainedTys[N]; - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Type *T) { - return T->getTypeID() == StructTyID; - } -}; - -StringRef Type::getStructName() const { - return cast(this)->getName(); -} - -unsigned Type::getStructNumElements() const { - return cast(this)->getNumElements(); -} - -Type *Type::getStructElementType(unsigned N) const { - return cast(this)->getElementType(N); -} - -/// This is the superclass of the array, pointer and vector type classes. -/// All of these represent "arrays" in memory. The array type represents a -/// specifically sized array, pointer types are unsized/unknown size arrays, -/// vector types represent specifically sized arrays that allow for use of SIMD -/// instructions. SequentialType holds the common features of all, which stem -/// from the fact that all three lay their components out in memory identically. -class SequentialType : public CompositeType { - Type *ContainedType; ///< Storage for the single contained type. - SequentialType(const SequentialType &) = delete; - const SequentialType &operator=(const SequentialType &) = delete; - -protected: - SequentialType(TypeID TID, Type *ElType) - : CompositeType(ElType->getContext(), TID), ContainedType(ElType) { - ContainedTys = &ContainedType; - NumContainedTys = 1; - } - -public: - Type *getElementType() const { return getSequentialElementType(); } - - /// Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Type *T) { - return T->getTypeID() == ArrayTyID || - T->getTypeID() == PointerTyID || - T->getTypeID() == VectorTyID; - } -}; - -/// Class to represent array types. -class ArrayType : public SequentialType { - uint64_t NumElements; - - ArrayType(const ArrayType &) = delete; - const ArrayType &operator=(const ArrayType &) = delete; - ArrayType(Type *ElType, uint64_t NumEl); - -public: - /// This static method is the primary way to construct an ArrayType - static ArrayType *get(Type *ElementType, uint64_t NumElements); - - /// Return true if the specified type is valid as a element type. - static bool isValidElementType(Type *ElemTy); - - uint64_t getNumElements() const { return NumElements; } - - /// Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Type *T) { - return T->getTypeID() == ArrayTyID; - } -}; - -uint64_t Type::getArrayNumElements() const { - return cast(this)->getNumElements(); -} - -/// Class to represent vector types. -class VectorType : public SequentialType { - unsigned NumElements; - - VectorType(const VectorType &) = delete; - const VectorType &operator=(const VectorType &) = delete; - VectorType(Type *ElType, unsigned NumEl); - -public: - /// This static method is the primary way to construct an VectorType. - static VectorType *get(Type *ElementType, unsigned NumElements); - - /// This static method gets a VectorType with the same number of elements as - /// the input type, and the element type is an integer type of the same width - /// as the input element type. - static VectorType *getInteger(VectorType *VTy) { - unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits(); - assert(EltBits && "Element size must be of a non-zero size"); - Type *EltTy = IntegerType::get(VTy->getContext(), EltBits); - return VectorType::get(EltTy, VTy->getNumElements()); - } - - /// This static method is like getInteger except that the element types are - /// twice as wide as the elements in the input type. - static VectorType *getExtendedElementVectorType(VectorType *VTy) { - unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits(); - Type *EltTy = IntegerType::get(VTy->getContext(), EltBits * 2); - return VectorType::get(EltTy, VTy->getNumElements()); - } - - /// This static method is like getInteger except that the element types are - /// half as wide as the elements in the input type. - static VectorType *getTruncatedElementVectorType(VectorType *VTy) { - unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits(); - assert((EltBits & 1) == 0 && - "Cannot truncate vector element with odd bit-width"); - Type *EltTy = IntegerType::get(VTy->getContext(), EltBits / 2); - return VectorType::get(EltTy, VTy->getNumElements()); - } - - /// This static method returns a VectorType with half as many elements as the - /// input type and the same element type. - static VectorType *getHalfElementsVectorType(VectorType *VTy) { - unsigned NumElts = VTy->getNumElements(); - assert ((NumElts & 1) == 0 && - "Cannot halve vector with odd number of elements."); - return VectorType::get(VTy->getElementType(), NumElts/2); - } - - /// This static method returns a VectorType with twice as many elements as the - /// input type and the same element type. - static VectorType *getDoubleElementsVectorType(VectorType *VTy) { - unsigned NumElts = VTy->getNumElements(); - return VectorType::get(VTy->getElementType(), NumElts*2); - } - - /// Return true if the specified type is valid as a element type. - static bool isValidElementType(Type *ElemTy); - - /// Return the number of elements in the Vector type. - unsigned getNumElements() const { return NumElements; } - - /// Return the number of bits in the Vector type. - /// Returns zero when the vector is a vector of pointers. - unsigned getBitWidth() const { - return NumElements * getElementType()->getPrimitiveSizeInBits(); - } - - /// Methods for support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Type *T) { - return T->getTypeID() == VectorTyID; - } -}; - -unsigned Type::getVectorNumElements() const { - return cast(this)->getNumElements(); -} - -/// Class to represent pointers. -class PointerType : public SequentialType { - PointerType(const PointerType &) = delete; - const PointerType &operator=(const PointerType &) = delete; - explicit PointerType(Type *ElType, unsigned AddrSpace); - -public: - /// This constructs a pointer to an object of the specified type in a numbered - /// address space. - static PointerType *get(Type *ElementType, unsigned AddressSpace); - - /// This constructs a pointer to an object of the specified type in the - /// generic address space (address space zero). - static PointerType *getUnqual(Type *ElementType) { - return PointerType::get(ElementType, 0); - } - - /// Return true if the specified type is valid as a element type. - static bool isValidElementType(Type *ElemTy); - - /// Return true if we can load or store from a pointer to this type. - static bool isLoadableOrStorableType(Type *ElemTy); - - /// Return the address space of the Pointer type. - inline unsigned getAddressSpace() const { return getSubclassData(); } - - /// Implement support type inquiry through isa, cast, and dyn_cast. - static inline bool classof(const Type *T) { - return T->getTypeID() == PointerTyID; - } -}; - -unsigned Type::getPointerAddressSpace() const { - return cast(getScalarType())->getAddressSpace(); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/DiagnosticInfo.h b/llvm/include/llvm/IR/DiagnosticInfo.h deleted file mode 100644 index 1c78684d..00000000 --- a/llvm/include/llvm/IR/DiagnosticInfo.h +++ /dev/null @@ -1,708 +0,0 @@ -//===- llvm/IR/DiagnosticInfo.h - Diagnostic Declaration --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the different classes involved in low level diagnostics. -// -// Diagnostics reporting is still done as part of the LLVMContext. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DIAGNOSTICINFO_H -#define LLVM_IR_DIAGNOSTICINFO_H - -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Twine.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/Support/CBindingWrapping.h" -#include "llvm-c/Types.h" -#include -#include - -namespace llvm { - -// Forward declarations. -class DiagnosticPrinter; -class Function; -class Instruction; -class LLVMContext; -class Module; -class SMDiagnostic; - -/// \brief Defines the different supported severity of a diagnostic. -enum DiagnosticSeverity : char { - DS_Error, - DS_Warning, - DS_Remark, - // A note attaches additional information to one of the previous diagnostic - // types. - DS_Note -}; - -/// \brief Defines the different supported kind of a diagnostic. -/// This enum should be extended with a new ID for each added concrete subclass. -enum DiagnosticKind { - DK_Bitcode, - DK_InlineAsm, - DK_ResourceLimit, - DK_StackSize, - DK_Linker, - DK_DebugMetadataVersion, - DK_DebugMetadataInvalid, - DK_SampleProfile, - DK_OptimizationRemark, - DK_OptimizationRemarkMissed, - DK_OptimizationRemarkAnalysis, - DK_OptimizationRemarkAnalysisFPCommute, - DK_OptimizationRemarkAnalysisAliasing, - DK_OptimizationFailure, - DK_FirstRemark = DK_OptimizationRemark, - DK_LastRemark = DK_OptimizationFailure, - DK_MIRParser, - DK_PGOProfile, - DK_Unsupported, - DK_FirstPluginKind -}; - -/// \brief Get the next available kind ID for a plugin diagnostic. -/// Each time this function is called, it returns a different number. -/// Therefore, a plugin that wants to "identify" its own classes -/// with a dynamic identifier, just have to use this method to get a new ID -/// and assign it to each of its classes. -/// The returned ID will be greater than or equal to DK_FirstPluginKind. -/// Thus, the plugin identifiers will not conflict with the -/// DiagnosticKind values. -int getNextAvailablePluginDiagnosticKind(); - -/// \brief This is the base abstract class for diagnostic reporting in -/// the backend. -/// The print method must be overloaded by the subclasses to print a -/// user-friendly message in the client of the backend (let us call it a -/// frontend). -class DiagnosticInfo { -private: - /// Kind defines the kind of report this is about. - const /* DiagnosticKind */ int Kind; - /// Severity gives the severity of the diagnostic. - const DiagnosticSeverity Severity; - -public: - DiagnosticInfo(/* DiagnosticKind */ int Kind, DiagnosticSeverity Severity) - : Kind(Kind), Severity(Severity) {} - - virtual ~DiagnosticInfo() {} - - /* DiagnosticKind */ int getKind() const { return Kind; } - DiagnosticSeverity getSeverity() const { return Severity; } - - /// Print using the given \p DP a user-friendly message. - /// This is the default message that will be printed to the user. - /// It is used when the frontend does not directly take advantage - /// of the information contained in fields of the subclasses. - /// The printed message must not end with '.' nor start with a severity - /// keyword. - virtual void print(DiagnosticPrinter &DP) const = 0; -}; - -typedef std::function DiagnosticHandlerFunction; - -/// Diagnostic information for inline asm reporting. -/// This is basically a message and an optional location. -class DiagnosticInfoInlineAsm : public DiagnosticInfo { -private: - /// Optional line information. 0 if not set. - unsigned LocCookie; - /// Message to be reported. - const Twine &MsgStr; - /// Optional origin of the problem. - const Instruction *Instr; - -public: - /// \p MsgStr is the message to be reported to the frontend. - /// This class does not copy \p MsgStr, therefore the reference must be valid - /// for the whole life time of the Diagnostic. - DiagnosticInfoInlineAsm(const Twine &MsgStr, - DiagnosticSeverity Severity = DS_Error) - : DiagnosticInfo(DK_InlineAsm, Severity), LocCookie(0), MsgStr(MsgStr), - Instr(nullptr) {} - - /// \p LocCookie if non-zero gives the line number for this report. - /// \p MsgStr gives the message. - /// This class does not copy \p MsgStr, therefore the reference must be valid - /// for the whole life time of the Diagnostic. - DiagnosticInfoInlineAsm(unsigned LocCookie, const Twine &MsgStr, - DiagnosticSeverity Severity = DS_Error) - : DiagnosticInfo(DK_InlineAsm, Severity), LocCookie(LocCookie), - MsgStr(MsgStr), Instr(nullptr) {} - - /// \p Instr gives the original instruction that triggered the diagnostic. - /// \p MsgStr gives the message. - /// This class does not copy \p MsgStr, therefore the reference must be valid - /// for the whole life time of the Diagnostic. - /// Same for \p I. - DiagnosticInfoInlineAsm(const Instruction &I, const Twine &MsgStr, - DiagnosticSeverity Severity = DS_Error); - - unsigned getLocCookie() const { return LocCookie; } - const Twine &getMsgStr() const { return MsgStr; } - const Instruction *getInstruction() const { return Instr; } - - /// \see DiagnosticInfo::print. - void print(DiagnosticPrinter &DP) const override; - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_InlineAsm; - } -}; - -/// Diagnostic information for stack size etc. reporting. -/// This is basically a function and a size. -class DiagnosticInfoResourceLimit : public DiagnosticInfo { -private: - /// The function that is concerned by this resource limit diagnostic. - const Function &Fn; - - /// Description of the resource type (e.g. stack size) - const char *ResourceName; - - /// The computed size usage - uint64_t ResourceSize; - - // Threshould passed - uint64_t ResourceLimit; - -public: - /// \p The function that is concerned by this stack size diagnostic. - /// \p The computed stack size. - DiagnosticInfoResourceLimit(const Function &Fn, - const char *ResourceName, - uint64_t ResourceSize, - DiagnosticSeverity Severity = DS_Warning, - DiagnosticKind Kind = DK_ResourceLimit, - uint64_t ResourceLimit = 0) - : DiagnosticInfo(Kind, Severity), - Fn(Fn), - ResourceName(ResourceName), - ResourceSize(ResourceSize), - ResourceLimit(ResourceLimit) {} - - const Function &getFunction() const { return Fn; } - const char *getResourceName() const { return ResourceName; } - uint64_t getResourceSize() const { return ResourceSize; } - uint64_t getResourceLimit() const { return ResourceLimit; } - - /// \see DiagnosticInfo::print. - void print(DiagnosticPrinter &DP) const override; - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_ResourceLimit || - DI->getKind() == DK_StackSize; - } -}; - -class DiagnosticInfoStackSize : public DiagnosticInfoResourceLimit { -public: - DiagnosticInfoStackSize(const Function &Fn, - uint64_t StackSize, - DiagnosticSeverity Severity = DS_Warning, - uint64_t StackLimit = 0) - : DiagnosticInfoResourceLimit(Fn, "stack size", StackSize, - Severity, DK_StackSize, StackLimit) {} - - uint64_t getStackSize() const { return getResourceSize(); } - uint64_t getStackLimit() const { return getResourceLimit(); } - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_StackSize; - } -}; - -/// Diagnostic information for debug metadata version reporting. -/// This is basically a module and a version. -class DiagnosticInfoDebugMetadataVersion : public DiagnosticInfo { -private: - /// The module that is concerned by this debug metadata version diagnostic. - const Module &M; - /// The actual metadata version. - unsigned MetadataVersion; - -public: - /// \p The module that is concerned by this debug metadata version diagnostic. - /// \p The actual metadata version. - DiagnosticInfoDebugMetadataVersion(const Module &M, unsigned MetadataVersion, - DiagnosticSeverity Severity = DS_Warning) - : DiagnosticInfo(DK_DebugMetadataVersion, Severity), M(M), - MetadataVersion(MetadataVersion) {} - - const Module &getModule() const { return M; } - unsigned getMetadataVersion() const { return MetadataVersion; } - - /// \see DiagnosticInfo::print. - void print(DiagnosticPrinter &DP) const override; - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_DebugMetadataVersion; - } -}; - -/// Diagnostic information for stripping invalid debug metadata. -class DiagnosticInfoIgnoringInvalidDebugMetadata : public DiagnosticInfo { -private: - /// The module that is concerned by this debug metadata version diagnostic. - const Module &M; - -public: - /// \p The module that is concerned by this debug metadata version diagnostic. - DiagnosticInfoIgnoringInvalidDebugMetadata( - const Module &M, DiagnosticSeverity Severity = DS_Warning) - : DiagnosticInfo(DK_DebugMetadataVersion, Severity), M(M) {} - - const Module &getModule() const { return M; } - - /// \see DiagnosticInfo::print. - void print(DiagnosticPrinter &DP) const override; - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_DebugMetadataInvalid; - } -}; - - -/// Diagnostic information for the sample profiler. -class DiagnosticInfoSampleProfile : public DiagnosticInfo { -public: - DiagnosticInfoSampleProfile(StringRef FileName, unsigned LineNum, - const Twine &Msg, - DiagnosticSeverity Severity = DS_Error) - : DiagnosticInfo(DK_SampleProfile, Severity), FileName(FileName), - LineNum(LineNum), Msg(Msg) {} - DiagnosticInfoSampleProfile(StringRef FileName, const Twine &Msg, - DiagnosticSeverity Severity = DS_Error) - : DiagnosticInfo(DK_SampleProfile, Severity), FileName(FileName), - LineNum(0), Msg(Msg) {} - DiagnosticInfoSampleProfile(const Twine &Msg, - DiagnosticSeverity Severity = DS_Error) - : DiagnosticInfo(DK_SampleProfile, Severity), LineNum(0), Msg(Msg) {} - - /// \see DiagnosticInfo::print. - void print(DiagnosticPrinter &DP) const override; - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_SampleProfile; - } - - StringRef getFileName() const { return FileName; } - unsigned getLineNum() const { return LineNum; } - const Twine &getMsg() const { return Msg; } - -private: - /// Name of the input file associated with this diagnostic. - StringRef FileName; - - /// Line number where the diagnostic occurred. If 0, no line number will - /// be emitted in the message. - unsigned LineNum; - - /// Message to report. - const Twine &Msg; -}; - -/// Diagnostic information for the PGO profiler. -class DiagnosticInfoPGOProfile : public DiagnosticInfo { -public: - DiagnosticInfoPGOProfile(const char *FileName, const Twine &Msg, - DiagnosticSeverity Severity = DS_Error) - : DiagnosticInfo(DK_PGOProfile, Severity), FileName(FileName), Msg(Msg) {} - - /// \see DiagnosticInfo::print. - void print(DiagnosticPrinter &DP) const override; - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_PGOProfile; - } - - const char *getFileName() const { return FileName; } - const Twine &getMsg() const { return Msg; } - -private: - /// Name of the input file associated with this diagnostic. - const char *FileName; - - /// Message to report. - const Twine &Msg; -}; - -/// Common features for diagnostics with an associated DebugLoc -class DiagnosticInfoWithDebugLocBase : public DiagnosticInfo { -public: - /// \p Fn is the function where the diagnostic is being emitted. \p DLoc is - /// the location information to use in the diagnostic. - DiagnosticInfoWithDebugLocBase(enum DiagnosticKind Kind, - enum DiagnosticSeverity Severity, - const Function &Fn, - const DebugLoc &DLoc) - : DiagnosticInfo(Kind, Severity), Fn(Fn), DLoc(DLoc) {} - - /// Return true if location information is available for this diagnostic. - bool isLocationAvailable() const; - - /// Return a string with the location information for this diagnostic - /// in the format "file:line:col". If location information is not available, - /// it returns ":0:0". - const std::string getLocationStr() const; - - /// Return location information for this diagnostic in three parts: - /// the source file name, line number and column. - void getLocation(StringRef *Filename, unsigned *Line, unsigned *Column) const; - - const Function &getFunction() const { return Fn; } - const DebugLoc &getDebugLoc() const { return DLoc; } - -private: - /// Function where this diagnostic is triggered. - const Function &Fn; - - /// Debug location where this diagnostic is triggered. - DebugLoc DLoc; -}; - -/// Common features for diagnostics dealing with optimization remarks. -class DiagnosticInfoOptimizationBase : public DiagnosticInfoWithDebugLocBase { -public: - /// \p PassName is the name of the pass emitting this diagnostic. - /// \p Fn is the function where the diagnostic is being emitted. \p DLoc is - /// the location information to use in the diagnostic. If line table - /// information is available, the diagnostic will include the source code - /// location. \p Msg is the message to show. Note that this class does not - /// copy this message, so this reference must be valid for the whole life time - /// of the diagnostic. - DiagnosticInfoOptimizationBase(enum DiagnosticKind Kind, - enum DiagnosticSeverity Severity, - const char *PassName, const Function &Fn, - const DebugLoc &DLoc, const Twine &Msg, - Optional Hotness = None) - : DiagnosticInfoWithDebugLocBase(Kind, Severity, Fn, DLoc), - PassName(PassName), Msg(Msg), Hotness(Hotness) {} - - /// \see DiagnosticInfo::print. - void print(DiagnosticPrinter &DP) const override; - - /// Return true if this optimization remark is enabled by one of - /// of the LLVM command line flags (-pass-remarks, -pass-remarks-missed, - /// or -pass-remarks-analysis). Note that this only handles the LLVM - /// flags. We cannot access Clang flags from here (they are handled - /// in BackendConsumer::OptimizationRemarkHandler). - virtual bool isEnabled() const = 0; - - const char *getPassName() const { return PassName; } - const Twine &getMsg() const { return Msg; } - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() >= DK_FirstRemark && - DI->getKind() <= DK_LastRemark; - } - -private: - /// Name of the pass that triggers this report. If this matches the - /// regular expression given in -Rpass=regexp, then the remark will - /// be emitted. - const char *PassName; - - /// Message to report. - const Twine &Msg; - - /// If profile information is available, this is the number of times the - /// corresponding code was executed in a profile instrumentation run. - Optional Hotness; -}; - -/// Diagnostic information for applied optimization remarks. -class DiagnosticInfoOptimizationRemark : public DiagnosticInfoOptimizationBase { -public: - /// \p PassName is the name of the pass emitting this diagnostic. If - /// this name matches the regular expression given in -Rpass=, then the - /// diagnostic will be emitted. \p Fn is the function where the diagnostic - /// is being emitted. \p DLoc is the location information to use in the - /// diagnostic. If line table information is available, the diagnostic - /// will include the source code location. \p Msg is the message to show. - /// Note that this class does not copy this message, so this reference - /// must be valid for the whole life time of the diagnostic. - DiagnosticInfoOptimizationRemark(const char *PassName, const Function &Fn, - const DebugLoc &DLoc, const Twine &Msg) - : DiagnosticInfoOptimizationBase(DK_OptimizationRemark, DS_Remark, - PassName, Fn, DLoc, Msg) {} - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_OptimizationRemark; - } - - /// \see DiagnosticInfoOptimizationBase::isEnabled. - bool isEnabled() const override; -}; - -/// Diagnostic information for missed-optimization remarks. -class DiagnosticInfoOptimizationRemarkMissed - : public DiagnosticInfoOptimizationBase { -public: - /// \p PassName is the name of the pass emitting this diagnostic. If - /// this name matches the regular expression given in -Rpass-missed=, then the - /// diagnostic will be emitted. \p Fn is the function where the diagnostic - /// is being emitted. \p DLoc is the location information to use in the - /// diagnostic. If line table information is available, the diagnostic - /// will include the source code location. \p Msg is the message to show. - /// Note that this class does not copy this message, so this reference - /// must be valid for the whole life time of the diagnostic. - DiagnosticInfoOptimizationRemarkMissed(const char *PassName, - const Function &Fn, - const DebugLoc &DLoc, const Twine &Msg, - Optional Hotness = None) - : DiagnosticInfoOptimizationBase(DK_OptimizationRemarkMissed, DS_Remark, - PassName, Fn, DLoc, Msg, Hotness) {} - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_OptimizationRemarkMissed; - } - - /// \see DiagnosticInfoOptimizationBase::isEnabled. - bool isEnabled() const override; -}; - -/// Diagnostic information for optimization analysis remarks. -class DiagnosticInfoOptimizationRemarkAnalysis - : public DiagnosticInfoOptimizationBase { -public: - /// \p PassName is the name of the pass emitting this diagnostic. If - /// this name matches the regular expression given in -Rpass-analysis=, then - /// the diagnostic will be emitted. \p Fn is the function where the diagnostic - /// is being emitted. \p DLoc is the location information to use in the - /// diagnostic. If line table information is available, the diagnostic will - /// include the source code location. \p Msg is the message to show. Note that - /// this class does not copy this message, so this reference must be valid for - /// the whole life time of the diagnostic. - DiagnosticInfoOptimizationRemarkAnalysis(const char *PassName, - const Function &Fn, - const DebugLoc &DLoc, - const Twine &Msg) - : DiagnosticInfoOptimizationBase(DK_OptimizationRemarkAnalysis, DS_Remark, - PassName, Fn, DLoc, Msg) {} - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_OptimizationRemarkAnalysis; - } - - /// \see DiagnosticInfoOptimizationBase::isEnabled. - bool isEnabled() const override; - - static const char *AlwaysPrint; - - bool shouldAlwaysPrint() const { return getPassName() == AlwaysPrint; } - -protected: - DiagnosticInfoOptimizationRemarkAnalysis(enum DiagnosticKind Kind, - const char *PassName, - const Function &Fn, - const DebugLoc &DLoc, - const Twine &Msg) - : DiagnosticInfoOptimizationBase(Kind, DS_Remark, PassName, Fn, DLoc, - Msg) {} -}; - -/// Diagnostic information for optimization analysis remarks related to -/// floating-point non-commutativity. -class DiagnosticInfoOptimizationRemarkAnalysisFPCommute - : public DiagnosticInfoOptimizationRemarkAnalysis { -public: - /// \p PassName is the name of the pass emitting this diagnostic. If - /// this name matches the regular expression given in -Rpass-analysis=, then - /// the diagnostic will be emitted. \p Fn is the function where the diagnostic - /// is being emitted. \p DLoc is the location information to use in the - /// diagnostic. If line table information is available, the diagnostic will - /// include the source code location. \p Msg is the message to show. The - /// front-end will append its own message related to options that address - /// floating-point non-commutativity. Note that this class does not copy this - /// message, so this reference must be valid for the whole life time of the - /// diagnostic. - DiagnosticInfoOptimizationRemarkAnalysisFPCommute(const char *PassName, - const Function &Fn, - const DebugLoc &DLoc, - const Twine &Msg) - : DiagnosticInfoOptimizationRemarkAnalysis( - DK_OptimizationRemarkAnalysisFPCommute, PassName, Fn, DLoc, Msg) {} - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_OptimizationRemarkAnalysisFPCommute; - } -}; - -/// Diagnostic information for optimization analysis remarks related to -/// pointer aliasing. -class DiagnosticInfoOptimizationRemarkAnalysisAliasing - : public DiagnosticInfoOptimizationRemarkAnalysis { -public: - /// \p PassName is the name of the pass emitting this diagnostic. If - /// this name matches the regular expression given in -Rpass-analysis=, then - /// the diagnostic will be emitted. \p Fn is the function where the diagnostic - /// is being emitted. \p DLoc is the location information to use in the - /// diagnostic. If line table information is available, the diagnostic will - /// include the source code location. \p Msg is the message to show. The - /// front-end will append its own message related to options that address - /// pointer aliasing legality. Note that this class does not copy this - /// message, so this reference must be valid for the whole life time of the - /// diagnostic. - DiagnosticInfoOptimizationRemarkAnalysisAliasing(const char *PassName, - const Function &Fn, - const DebugLoc &DLoc, - const Twine &Msg) - : DiagnosticInfoOptimizationRemarkAnalysis( - DK_OptimizationRemarkAnalysisAliasing, PassName, Fn, DLoc, Msg) {} - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_OptimizationRemarkAnalysisAliasing; - } -}; - -/// Diagnostic information for machine IR parser. -class DiagnosticInfoMIRParser : public DiagnosticInfo { - const SMDiagnostic &Diagnostic; - -public: - DiagnosticInfoMIRParser(DiagnosticSeverity Severity, - const SMDiagnostic &Diagnostic) - : DiagnosticInfo(DK_MIRParser, Severity), Diagnostic(Diagnostic) {} - - const SMDiagnostic &getDiagnostic() const { return Diagnostic; } - - void print(DiagnosticPrinter &DP) const override; - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_MIRParser; - } -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_SIMPLE_CONVERSION_FUNCTIONS(DiagnosticInfo, LLVMDiagnosticInfoRef) - -/// Emit an optimization-applied message. \p PassName is the name of the pass -/// emitting the message. If -Rpass= is given and \p PassName matches the -/// regular expression in -Rpass, then the remark will be emitted. \p Fn is -/// the function triggering the remark, \p DLoc is the debug location where -/// the diagnostic is generated. \p Msg is the message string to use. -void emitOptimizationRemark(LLVMContext &Ctx, const char *PassName, - const Function &Fn, const DebugLoc &DLoc, - const Twine &Msg); - -/// Emit an optimization-missed message. \p PassName is the name of the -/// pass emitting the message. If -Rpass-missed= is given and \p PassName -/// matches the regular expression in -Rpass, then the remark will be -/// emitted. \p Fn is the function triggering the remark, \p DLoc is the -/// debug location where the diagnostic is generated. \p Msg is the -/// message string to use. -void emitOptimizationRemarkMissed(LLVMContext &Ctx, const char *PassName, - const Function &Fn, const DebugLoc &DLoc, - const Twine &Msg); - -/// Emit an optimization analysis remark message. \p PassName is the name of -/// the pass emitting the message. If -Rpass-analysis= is given and \p -/// PassName matches the regular expression in -Rpass, then the remark will be -/// emitted. \p Fn is the function triggering the remark, \p DLoc is the debug -/// location where the diagnostic is generated. \p Msg is the message string -/// to use. -void emitOptimizationRemarkAnalysis(LLVMContext &Ctx, const char *PassName, - const Function &Fn, const DebugLoc &DLoc, - const Twine &Msg); - -/// Emit an optimization analysis remark related to messages about -/// floating-point non-commutativity. \p PassName is the name of the pass -/// emitting the message. If -Rpass-analysis= is given and \p PassName matches -/// the regular expression in -Rpass, then the remark will be emitted. \p Fn is -/// the function triggering the remark, \p DLoc is the debug location where the -/// diagnostic is generated. \p Msg is the message string to use. -void emitOptimizationRemarkAnalysisFPCommute(LLVMContext &Ctx, - const char *PassName, - const Function &Fn, - const DebugLoc &DLoc, - const Twine &Msg); - -/// Emit an optimization analysis remark related to messages about -/// pointer aliasing. \p PassName is the name of the pass emitting the message. -/// If -Rpass-analysis= is given and \p PassName matches the regular expression -/// in -Rpass, then the remark will be emitted. \p Fn is the function triggering -/// the remark, \p DLoc is the debug location where the diagnostic is generated. -/// \p Msg is the message string to use. -void emitOptimizationRemarkAnalysisAliasing(LLVMContext &Ctx, - const char *PassName, - const Function &Fn, - const DebugLoc &DLoc, - const Twine &Msg); - -/// Diagnostic information for optimization failures. -class DiagnosticInfoOptimizationFailure - : public DiagnosticInfoOptimizationBase { -public: - /// \p Fn is the function where the diagnostic is being emitted. \p DLoc is - /// the location information to use in the diagnostic. If line table - /// information is available, the diagnostic will include the source code - /// location. \p Msg is the message to show. Note that this class does not - /// copy this message, so this reference must be valid for the whole life time - /// of the diagnostic. - DiagnosticInfoOptimizationFailure(const Function &Fn, const DebugLoc &DLoc, - const Twine &Msg) - : DiagnosticInfoOptimizationBase(DK_OptimizationFailure, DS_Warning, - nullptr, Fn, DLoc, Msg) {} - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_OptimizationFailure; - } - - /// \see DiagnosticInfoOptimizationBase::isEnabled. - bool isEnabled() const override; -}; - -/// Diagnostic information for unsupported feature in backend. -class DiagnosticInfoUnsupported - : public DiagnosticInfoWithDebugLocBase { -private: - Twine Msg; - -public: - /// \p Fn is the function where the diagnostic is being emitted. \p DLoc is - /// the location information to use in the diagnostic. If line table - /// information is available, the diagnostic will include the source code - /// location. \p Msg is the message to show. Note that this class does not - /// copy this message, so this reference must be valid for the whole life time - /// of the diagnostic. - DiagnosticInfoUnsupported(const Function &Fn, const Twine &Msg, - DebugLoc DLoc = DebugLoc(), - DiagnosticSeverity Severity = DS_Error) - : DiagnosticInfoWithDebugLocBase(DK_Unsupported, Severity, Fn, DLoc), - Msg(Msg) {} - - static bool classof(const DiagnosticInfo *DI) { - return DI->getKind() == DK_Unsupported; - } - - const Twine &getMessage() const { return Msg; } - - void print(DiagnosticPrinter &DP) const override; -}; - -/// Emit a warning when loop vectorization is specified but fails. \p Fn is the -/// function triggering the warning, \p DLoc is the debug location where the -/// diagnostic is generated. \p Msg is the message string to use. -void emitLoopVectorizeWarning(LLVMContext &Ctx, const Function &Fn, - const DebugLoc &DLoc, const Twine &Msg); - -/// Emit a warning when loop interleaving is specified but fails. \p Fn is the -/// function triggering the warning, \p DLoc is the debug location where the -/// diagnostic is generated. \p Msg is the message string to use. -void emitLoopInterleaveWarning(LLVMContext &Ctx, const Function &Fn, - const DebugLoc &DLoc, const Twine &Msg); - -} // end namespace llvm - -#endif // LLVM_IR_DIAGNOSTICINFO_H diff --git a/llvm/include/llvm/IR/DiagnosticPrinter.h b/llvm/include/llvm/IR/DiagnosticPrinter.h deleted file mode 100644 index 1bcd7373..00000000 --- a/llvm/include/llvm/IR/DiagnosticPrinter.h +++ /dev/null @@ -1,94 +0,0 @@ -//===- llvm/Support/DiagnosticPrinter.h - Diagnostic Printer ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the main interface for printer backend diagnostic. -// -// Clients of the backend diagnostics should overload this interface based -// on their needs. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DIAGNOSTICPRINTER_H -#define LLVM_IR_DIAGNOSTICPRINTER_H - -#include - -namespace llvm { -// Forward declarations. -class Module; -class raw_ostream; -class SMDiagnostic; -class StringRef; -class Twine; -class Value; - -/// \brief Interface for custom diagnostic printing. -class DiagnosticPrinter { -public: - virtual ~DiagnosticPrinter() {} - - // Simple types. - virtual DiagnosticPrinter &operator<<(char C) = 0; - virtual DiagnosticPrinter &operator<<(unsigned char C) = 0; - virtual DiagnosticPrinter &operator<<(signed char C) = 0; - virtual DiagnosticPrinter &operator<<(StringRef Str) = 0; - virtual DiagnosticPrinter &operator<<(const char *Str) = 0; - virtual DiagnosticPrinter &operator<<(const std::string &Str) = 0; - virtual DiagnosticPrinter &operator<<(unsigned long N) = 0; - virtual DiagnosticPrinter &operator<<(long N) = 0; - virtual DiagnosticPrinter &operator<<(unsigned long long N) = 0; - virtual DiagnosticPrinter &operator<<(long long N) = 0; - virtual DiagnosticPrinter &operator<<(const void *P) = 0; - virtual DiagnosticPrinter &operator<<(unsigned int N) = 0; - virtual DiagnosticPrinter &operator<<(int N) = 0; - virtual DiagnosticPrinter &operator<<(double N) = 0; - virtual DiagnosticPrinter &operator<<(const Twine &Str) = 0; - - // IR related types. - virtual DiagnosticPrinter &operator<<(const Value &V) = 0; - virtual DiagnosticPrinter &operator<<(const Module &M) = 0; - - // Other types. - virtual DiagnosticPrinter &operator<<(const SMDiagnostic &Diag) = 0; -}; - -/// \brief Basic diagnostic printer that uses an underlying raw_ostream. -class DiagnosticPrinterRawOStream : public DiagnosticPrinter { -protected: - raw_ostream &Stream; - -public: - DiagnosticPrinterRawOStream(raw_ostream &Stream) : Stream(Stream) {} - - // Simple types. - DiagnosticPrinter &operator<<(char C) override; - DiagnosticPrinter &operator<<(unsigned char C) override; - DiagnosticPrinter &operator<<(signed char C) override; - DiagnosticPrinter &operator<<(StringRef Str) override; - DiagnosticPrinter &operator<<(const char *Str) override; - DiagnosticPrinter &operator<<(const std::string &Str) override; - DiagnosticPrinter &operator<<(unsigned long N) override; - DiagnosticPrinter &operator<<(long N) override; - DiagnosticPrinter &operator<<(unsigned long long N) override; - DiagnosticPrinter &operator<<(long long N) override; - DiagnosticPrinter &operator<<(const void *P) override; - DiagnosticPrinter &operator<<(unsigned int N) override; - DiagnosticPrinter &operator<<(int N) override; - DiagnosticPrinter &operator<<(double N) override; - DiagnosticPrinter &operator<<(const Twine &Str) override; - - // IR related types. - DiagnosticPrinter &operator<<(const Value &V) override; - DiagnosticPrinter &operator<<(const Module &M) override; - - // Other types. - DiagnosticPrinter &operator<<(const SMDiagnostic &Diag) override; -}; -} // End namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/Dominators.h b/llvm/include/llvm/IR/Dominators.h deleted file mode 100644 index f445a49b..00000000 --- a/llvm/include/llvm/IR/Dominators.h +++ /dev/null @@ -1,258 +0,0 @@ -//===- Dominators.h - Dominator Info Calculation ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the DominatorTree class, which provides fast and efficient -// dominance queries. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_DOMINATORS_H -#define LLVM_IR_DOMINATORS_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/ADT/GraphTraits.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/IR/CFG.h" -#include "llvm/IR/PassManager.h" -#include "llvm/Pass.h" -#include "llvm/Support/GenericDomTree.h" - -namespace llvm { - -class Function; -class BasicBlock; -class raw_ostream; - -extern template class DomTreeNodeBase; -extern template class DominatorTreeBase; - -extern template void Calculate( - DominatorTreeBase::NodeType> &DT, Function &F); -extern template void Calculate>( - DominatorTreeBase>::NodeType> &DT, - Function &F); - -typedef DomTreeNodeBase DomTreeNode; - -class BasicBlockEdge { - const BasicBlock *Start; - const BasicBlock *End; -public: - BasicBlockEdge(const BasicBlock *Start_, const BasicBlock *End_) : - Start(Start_), End(End_) { } - const BasicBlock *getStart() const { - return Start; - } - const BasicBlock *getEnd() const { - return End; - } - bool isSingleEdge() const; -}; - -template <> struct DenseMapInfo { - static unsigned getHashValue(const BasicBlockEdge *V); - typedef DenseMapInfo BBInfo; - static inline BasicBlockEdge getEmptyKey() { - return BasicBlockEdge(BBInfo::getEmptyKey(), BBInfo::getEmptyKey()); - } - static inline BasicBlockEdge getTombstoneKey() { - return BasicBlockEdge(BBInfo::getTombstoneKey(), BBInfo::getTombstoneKey()); - } - - static unsigned getHashValue(const BasicBlockEdge &Edge) { - return hash_combine(BBInfo::getHashValue(Edge.getStart()), - BBInfo::getHashValue(Edge.getEnd())); - } - static bool isEqual(const BasicBlockEdge &LHS, const BasicBlockEdge &RHS) { - return BBInfo::isEqual(LHS.getStart(), RHS.getStart()) && - BBInfo::isEqual(LHS.getEnd(), RHS.getEnd()); - } -}; - -/// \brief Concrete subclass of DominatorTreeBase that is used to compute a -/// normal dominator tree. -/// -/// Definition: A block is said to be forward statically reachable if there is -/// a path from the entry of the function to the block. A statically reachable -/// block may become statically unreachable during optimization. -/// -/// A forward unreachable block may appear in the dominator tree, or it may -/// not. If it does, dominance queries will return results as if all reachable -/// blocks dominate it. When asking for a Node corresponding to a potentially -/// unreachable block, calling code must handle the case where the block was -/// unreachable and the result of getNode() is nullptr. -/// -/// Generally, a block known to be unreachable when the dominator tree is -/// constructed will not be in the tree. One which becomes unreachable after -/// the dominator tree is initially constructed may still exist in the tree, -/// even if the tree is properly updated. Calling code should not rely on the -/// preceding statements; this is stated only to assist human understanding. -class DominatorTree : public DominatorTreeBase { -public: - typedef DominatorTreeBase Base; - - DominatorTree() : DominatorTreeBase(false) {} - explicit DominatorTree(Function &F) : DominatorTreeBase(false) { - recalculate(F); - } - - DominatorTree(DominatorTree &&Arg) - : Base(std::move(static_cast(Arg))) {} - DominatorTree &operator=(DominatorTree &&RHS) { - Base::operator=(std::move(static_cast(RHS))); - return *this; - } - - /// \brief Returns *false* if the other dominator tree matches this dominator - /// tree. - inline bool compare(const DominatorTree &Other) const { - const DomTreeNode *R = getRootNode(); - const DomTreeNode *OtherR = Other.getRootNode(); - - if (!R || !OtherR || R->getBlock() != OtherR->getBlock()) - return true; - - if (Base::compare(Other)) - return true; - - return false; - } - - // Ensure base-class overloads are visible. - using Base::dominates; - - /// \brief Return true if Def dominates a use in User. - /// - /// This performs the special checks necessary if Def and User are in the same - /// basic block. Note that Def doesn't dominate a use in Def itself! - bool dominates(const Instruction *Def, const Use &U) const; - bool dominates(const Instruction *Def, const Instruction *User) const; - bool dominates(const Instruction *Def, const BasicBlock *BB) const; - bool dominates(const BasicBlockEdge &BBE, const Use &U) const; - bool dominates(const BasicBlockEdge &BBE, const BasicBlock *BB) const; - - // Ensure base class overloads are visible. - using Base::isReachableFromEntry; - - /// \brief Provide an overload for a Use. - bool isReachableFromEntry(const Use &U) const; - - /// \brief Verify the correctness of the domtree by re-computing it. - /// - /// This should only be used for debugging as it aborts the program if the - /// verification fails. - void verifyDomTree() const; -}; - -//===------------------------------------- -// DominatorTree GraphTraits specializations so the DominatorTree can be -// iterable by generic graph iterators. - -template struct DomTreeGraphTraitsBase { - typedef Node NodeType; - typedef ChildIterator ChildIteratorType; - typedef df_iterator> nodes_iterator; - - static NodeType *getEntryNode(NodeType *N) { return N; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { return N->end(); } - - static nodes_iterator nodes_begin(NodeType *N) { - return df_begin(getEntryNode(N)); - } - - static nodes_iterator nodes_end(NodeType *N) { - return df_end(getEntryNode(N)); - } -}; - -template <> -struct GraphTraits - : public DomTreeGraphTraitsBase {}; - -template <> -struct GraphTraits - : public DomTreeGraphTraitsBase {}; - -template <> struct GraphTraits - : public GraphTraits { - static NodeType *getEntryNode(DominatorTree *DT) { - return DT->getRootNode(); - } - - static nodes_iterator nodes_begin(DominatorTree *N) { - return df_begin(getEntryNode(N)); - } - - static nodes_iterator nodes_end(DominatorTree *N) { - return df_end(getEntryNode(N)); - } -}; - -/// \brief Analysis pass which computes a \c DominatorTree. -class DominatorTreeAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - /// \brief Provide the result typedef for this analysis pass. - typedef DominatorTree Result; - - /// \brief Run the analysis pass over a function and produce a dominator tree. - DominatorTree run(Function &F, AnalysisManager &); -}; - -/// \brief Printer pass for the \c DominatorTree. -class DominatorTreePrinterPass - : public PassInfoMixin { - raw_ostream &OS; - -public: - explicit DominatorTreePrinterPass(raw_ostream &OS); - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -/// \brief Verifier pass for the \c DominatorTree. -struct DominatorTreeVerifierPass : PassInfoMixin { - PreservedAnalyses run(Function &F, AnalysisManager &AM); -}; - -/// \brief Legacy analysis pass which computes a \c DominatorTree. -class DominatorTreeWrapperPass : public FunctionPass { - DominatorTree DT; - -public: - static char ID; - - DominatorTreeWrapperPass() : FunctionPass(ID) { - initializeDominatorTreeWrapperPassPass(*PassRegistry::getPassRegistry()); - } - - DominatorTree &getDomTree() { return DT; } - const DominatorTree &getDomTree() const { return DT; } - - bool runOnFunction(Function &F) override; - - void verifyAnalysis() const override; - - void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.setPreservesAll(); - } - - void releaseMemory() override { DT.releaseMemory(); } - - void print(raw_ostream &OS, const Module *M = nullptr) const override; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Function.h b/llvm/include/llvm/IR/Function.h deleted file mode 100644 index d7d27e75..00000000 --- a/llvm/include/llvm/IR/Function.h +++ /dev/null @@ -1,662 +0,0 @@ -//===-- llvm/Function.h - Class to represent a single function --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the Function class, which represents a -// single function/procedure in LLVM. -// -// A function basically consists of a list of basic blocks, a list of arguments, -// and a symbol table. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_FUNCTION_H -#define LLVM_IR_FUNCTION_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/Argument.h" -#include "llvm/IR/Attributes.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/CallingConv.h" -#include "llvm/IR/GlobalObject.h" -#include "llvm/IR/OperandTraits.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { - -template class Optional; -class FunctionType; -class LLVMContext; -class DISubprogram; - -template <> -struct SymbolTableListSentinelTraits - : public ilist_half_embedded_sentinel_traits {}; - -class Function : public GlobalObject, public ilist_node { -public: - typedef SymbolTableList ArgumentListType; - typedef SymbolTableList BasicBlockListType; - - // BasicBlock iterators... - typedef BasicBlockListType::iterator iterator; - typedef BasicBlockListType::const_iterator const_iterator; - - typedef ArgumentListType::iterator arg_iterator; - typedef ArgumentListType::const_iterator const_arg_iterator; - -private: - // Important things that make up a function! - BasicBlockListType BasicBlocks; ///< The basic blocks - mutable ArgumentListType ArgumentList; ///< The formal arguments - ValueSymbolTable *SymTab; ///< Symbol table of args/instructions - AttributeSet AttributeSets; ///< Parameter attributes - - /* - * Value::SubclassData - * - * bit 0 : HasLazyArguments - * bit 1 : HasPrefixData - * bit 2 : HasPrologueData - * bit 3 : HasPersonalityFn - * bits 4-13 : CallingConvention - * bits 14 : HasGC - * bits 15 : [reserved] - */ - - /// Bits from GlobalObject::GlobalObjectSubclassData. - enum { - /// Whether this function is materializable. - IsMaterializableBit = 0, - }; - - friend class SymbolTableListTraits; - - void setParent(Module *parent); - - /// hasLazyArguments/CheckLazyArguments - The argument list of a function is - /// built on demand, so that the list isn't allocated until the first client - /// needs it. The hasLazyArguments predicate returns true if the arg list - /// hasn't been set up yet. -public: - bool hasLazyArguments() const { - return getSubclassDataFromValue() & (1<<0); - } - -private: - void CheckLazyArguments() const { - if (hasLazyArguments()) - BuildLazyArguments(); - } - void BuildLazyArguments() const; - - Function(const Function&) = delete; - void operator=(const Function&) = delete; - - /// Function ctor - If the (optional) Module argument is specified, the - /// function is automatically inserted into the end of the function list for - /// the module. - /// - Function(FunctionType *Ty, LinkageTypes Linkage, - const Twine &N = "", Module *M = nullptr); - -public: - static Function *Create(FunctionType *Ty, LinkageTypes Linkage, - const Twine &N = "", Module *M = nullptr) { - return new Function(Ty, Linkage, N, M); - } - - ~Function() override; - - /// \brief Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - Type *getReturnType() const; // Return the type of the ret val - FunctionType *getFunctionType() const; // Return the FunctionType for me - - /// getContext - Return a reference to the LLVMContext associated with this - /// function. - LLVMContext &getContext() const; - - /// isVarArg - Return true if this function takes a variable number of - /// arguments. - bool isVarArg() const; - - bool isMaterializable() const; - void setIsMaterializable(bool V); - - /// getIntrinsicID - This method returns the ID number of the specified - /// function, or Intrinsic::not_intrinsic if the function is not an - /// intrinsic, or if the pointer is null. This value is always defined to be - /// zero to allow easy checking for whether a function is intrinsic or not. - /// The particular intrinsic functions which correspond to this value are - /// defined in llvm/Intrinsics.h. - Intrinsic::ID getIntrinsicID() const LLVM_READONLY { return IntID; } - bool isIntrinsic() const { return getName().startswith("llvm."); } - - /// \brief Recalculate the ID for this function if it is an Intrinsic defined - /// in llvm/Intrinsics.h. Sets the intrinsic ID to Intrinsic::not_intrinsic - /// if the name of this function does not match an intrinsic in that header. - /// Note, this method does not need to be called directly, as it is called - /// from Value::setName() whenever the name of this function changes. - void recalculateIntrinsicID(); - - /// getCallingConv()/setCallingConv(CC) - These method get and set the - /// calling convention of this function. The enum values for the known - /// calling conventions are defined in CallingConv.h. - CallingConv::ID getCallingConv() const { - return static_cast((getSubclassDataFromValue() >> 4) & - CallingConv::MaxID); - } - void setCallingConv(CallingConv::ID CC) { - auto ID = static_cast(CC); - assert(!(ID & ~CallingConv::MaxID) && "Unsupported calling convention"); - setValueSubclassData((getSubclassDataFromValue() & 0xc00f) | (ID << 4)); - } - - /// @brief Return the attribute list for this Function. - AttributeSet getAttributes() const { return AttributeSets; } - - /// @brief Set the attribute list for this Function. - void setAttributes(AttributeSet Attrs) { AttributeSets = Attrs; } - - /// @brief Add function attributes to this function. - void addFnAttr(Attribute::AttrKind N) { - setAttributes(AttributeSets.addAttribute(getContext(), - AttributeSet::FunctionIndex, N)); - } - - /// @brief Remove function attributes from this function. - void removeFnAttr(Attribute::AttrKind Kind) { - setAttributes(AttributeSets.removeAttribute( - getContext(), AttributeSet::FunctionIndex, Kind)); - } - - /// @brief Add function attributes to this function. - void addFnAttr(StringRef Kind) { - setAttributes( - AttributeSets.addAttribute(getContext(), - AttributeSet::FunctionIndex, Kind)); - } - void addFnAttr(StringRef Kind, StringRef Value) { - setAttributes( - AttributeSets.addAttribute(getContext(), - AttributeSet::FunctionIndex, Kind, Value)); - } - - /// Set the entry count for this function. - void setEntryCount(uint64_t Count); - - /// Get the entry count for this function. - Optional getEntryCount() const; - - /// @brief Return true if the function has the attribute. - bool hasFnAttribute(Attribute::AttrKind Kind) const { - return AttributeSets.hasFnAttribute(Kind); - } - bool hasFnAttribute(StringRef Kind) const { - return AttributeSets.hasAttribute(AttributeSet::FunctionIndex, Kind); - } - - /// @brief Return the attribute for the given attribute kind. - Attribute getFnAttribute(Attribute::AttrKind Kind) const { - return getAttribute(AttributeSet::FunctionIndex, Kind); - } - Attribute getFnAttribute(StringRef Kind) const { - return getAttribute(AttributeSet::FunctionIndex, Kind); - } - - /// \brief Return the stack alignment for the function. - unsigned getFnStackAlignment() const { - if (!hasFnAttribute(Attribute::StackAlignment)) - return 0; - return AttributeSets.getStackAlignment(AttributeSet::FunctionIndex); - } - - /// hasGC/getGC/setGC/clearGC - The name of the garbage collection algorithm - /// to use during code generation. - bool hasGC() const { - return getSubclassDataFromValue() & (1<<14); - } - const std::string &getGC() const; - void setGC(std::string Str); - void clearGC(); - - /// @brief adds the attribute to the list of attributes. - void addAttribute(unsigned i, Attribute::AttrKind Kind); - - /// @brief adds the attribute to the list of attributes. - void addAttribute(unsigned i, Attribute Attr); - - /// @brief adds the attributes to the list of attributes. - void addAttributes(unsigned i, AttributeSet Attrs); - - /// @brief removes the attribute from the list of attributes. - void removeAttribute(unsigned i, Attribute::AttrKind Kind); - - /// @brief removes the attribute from the list of attributes. - void removeAttribute(unsigned i, StringRef Kind); - - /// @brief removes the attributes from the list of attributes. - void removeAttributes(unsigned i, AttributeSet Attrs); - - /// @brief check if an attributes is in the list of attributes. - bool hasAttribute(unsigned i, Attribute::AttrKind Kind) const { - return getAttributes().hasAttribute(i, Kind); - } - - Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const { - return AttributeSets.getAttribute(i, Kind); - } - - Attribute getAttribute(unsigned i, StringRef Kind) const { - return AttributeSets.getAttribute(i, Kind); - } - - /// @brief adds the dereferenceable attribute to the list of attributes. - void addDereferenceableAttr(unsigned i, uint64_t Bytes); - - /// @brief adds the dereferenceable_or_null attribute to the list of - /// attributes. - void addDereferenceableOrNullAttr(unsigned i, uint64_t Bytes); - - /// @brief Extract the alignment for a call or parameter (0=unknown). - unsigned getParamAlignment(unsigned i) const { - return AttributeSets.getParamAlignment(i); - } - - /// @brief Extract the number of dereferenceable bytes for a call or - /// parameter (0=unknown). - uint64_t getDereferenceableBytes(unsigned i) const { - return AttributeSets.getDereferenceableBytes(i); - } - - /// @brief Extract the number of dereferenceable_or_null bytes for a call or - /// parameter (0=unknown). - uint64_t getDereferenceableOrNullBytes(unsigned i) const { - return AttributeSets.getDereferenceableOrNullBytes(i); - } - - /// @brief Determine if the function does not access memory. - bool doesNotAccessMemory() const { - return hasFnAttribute(Attribute::ReadNone); - } - void setDoesNotAccessMemory() { - addFnAttr(Attribute::ReadNone); - } - - /// @brief Determine if the function does not access or only reads memory. - bool onlyReadsMemory() const { - return doesNotAccessMemory() || hasFnAttribute(Attribute::ReadOnly); - } - void setOnlyReadsMemory() { - addFnAttr(Attribute::ReadOnly); - } - - /// @brief Determine if the function does not access or only writes memory. - bool doesNotReadMemory() const { - return doesNotAccessMemory() || hasFnAttribute(Attribute::WriteOnly); - } - void setDoesNotReadMemory() { - addFnAttr(Attribute::WriteOnly); - } - - /// @brief Determine if the call can access memmory only using pointers based - /// on its arguments. - bool onlyAccessesArgMemory() const { - return hasFnAttribute(Attribute::ArgMemOnly); - } - void setOnlyAccessesArgMemory() { addFnAttr(Attribute::ArgMemOnly); } - - /// @brief Determine if the function may only access memory that is - /// inaccessible from the IR. - bool onlyAccessesInaccessibleMemory() const { - return hasFnAttribute(Attribute::InaccessibleMemOnly); - } - void setOnlyAccessesInaccessibleMemory() { - addFnAttr(Attribute::InaccessibleMemOnly); - } - - /// @brief Determine if the function may only access memory that is - // either inaccessible from the IR or pointed to by its arguments. - bool onlyAccessesInaccessibleMemOrArgMem() const { - return hasFnAttribute(Attribute::InaccessibleMemOrArgMemOnly); - } - void setOnlyAccessesInaccessibleMemOrArgMem() { - addFnAttr(Attribute::InaccessibleMemOrArgMemOnly); - } - - /// @brief Determine if the function cannot return. - bool doesNotReturn() const { - return hasFnAttribute(Attribute::NoReturn); - } - void setDoesNotReturn() { - addFnAttr(Attribute::NoReturn); - } - - /// @brief Determine if the function cannot unwind. - bool doesNotThrow() const { - return hasFnAttribute(Attribute::NoUnwind); - } - void setDoesNotThrow() { - addFnAttr(Attribute::NoUnwind); - } - - /// @brief Determine if the call cannot be duplicated. - bool cannotDuplicate() const { - return hasFnAttribute(Attribute::NoDuplicate); - } - void setCannotDuplicate() { - addFnAttr(Attribute::NoDuplicate); - } - - /// @brief Determine if the call is convergent. - bool isConvergent() const { - return hasFnAttribute(Attribute::Convergent); - } - void setConvergent() { - addFnAttr(Attribute::Convergent); - } - void setNotConvergent() { - removeFnAttr(Attribute::Convergent); - } - - /// Determine if the function is known not to recurse, directly or - /// indirectly. - bool doesNotRecurse() const { - return hasFnAttribute(Attribute::NoRecurse); - } - void setDoesNotRecurse() { - addFnAttr(Attribute::NoRecurse); - } - - /// @brief True if the ABI mandates (or the user requested) that this - /// function be in a unwind table. - bool hasUWTable() const { - return hasFnAttribute(Attribute::UWTable); - } - void setHasUWTable() { - addFnAttr(Attribute::UWTable); - } - - /// @brief True if this function needs an unwind table. - bool needsUnwindTableEntry() const { - return hasUWTable() || !doesNotThrow(); - } - - /// @brief Determine if the function returns a structure through first - /// pointer argument. - bool hasStructRetAttr() const { - return AttributeSets.hasAttribute(1, Attribute::StructRet) || - AttributeSets.hasAttribute(2, Attribute::StructRet); - } - - /// @brief Determine if the parameter or return value is marked with NoAlias - /// attribute. - /// @param n The parameter to check. 1 is the first parameter, 0 is the return - bool doesNotAlias(unsigned n) const { - return AttributeSets.hasAttribute(n, Attribute::NoAlias); - } - void setDoesNotAlias(unsigned n) { - addAttribute(n, Attribute::NoAlias); - } - - /// @brief Determine if the parameter can be captured. - /// @param n The parameter to check. 1 is the first parameter, 0 is the return - bool doesNotCapture(unsigned n) const { - return AttributeSets.hasAttribute(n, Attribute::NoCapture); - } - void setDoesNotCapture(unsigned n) { - addAttribute(n, Attribute::NoCapture); - } - - bool doesNotAccessMemory(unsigned n) const { - return AttributeSets.hasAttribute(n, Attribute::ReadNone); - } - void setDoesNotAccessMemory(unsigned n) { - addAttribute(n, Attribute::ReadNone); - } - - bool onlyReadsMemory(unsigned n) const { - return doesNotAccessMemory(n) || - AttributeSets.hasAttribute(n, Attribute::ReadOnly); - } - void setOnlyReadsMemory(unsigned n) { - addAttribute(n, Attribute::ReadOnly); - } - - /// Optimize this function for minimum size (-Oz). - bool optForMinSize() const { return hasFnAttribute(Attribute::MinSize); }; - - /// Optimize this function for size (-Os) or minimum size (-Oz). - bool optForSize() const { - return hasFnAttribute(Attribute::OptimizeForSize) || optForMinSize(); - } - - /// copyAttributesFrom - copy all additional attributes (those not needed to - /// create a Function) from the Function Src to this one. - void copyAttributesFrom(const GlobalValue *Src) override; - - /// deleteBody - This method deletes the body of the function, and converts - /// the linkage to external. - /// - void deleteBody() { - dropAllReferences(); - setLinkage(ExternalLinkage); - } - - /// removeFromParent - This method unlinks 'this' from the containing module, - /// but does not delete it. - /// - void removeFromParent() override; - - /// eraseFromParent - This method unlinks 'this' from the containing module - /// and deletes it. - /// - void eraseFromParent() override; - - /// Steal arguments from another function. - /// - /// Drop this function's arguments and splice in the ones from \c Src. - /// Requires that this has no function body. - void stealArgumentListFrom(Function &Src); - - /// Get the underlying elements of the Function... the basic block list is - /// empty for external functions. - /// - const ArgumentListType &getArgumentList() const { - CheckLazyArguments(); - return ArgumentList; - } - ArgumentListType &getArgumentList() { - CheckLazyArguments(); - return ArgumentList; - } - static ArgumentListType Function::*getSublistAccess(Argument*) { - return &Function::ArgumentList; - } - - const BasicBlockListType &getBasicBlockList() const { return BasicBlocks; } - BasicBlockListType &getBasicBlockList() { return BasicBlocks; } - static BasicBlockListType Function::*getSublistAccess(BasicBlock*) { - return &Function::BasicBlocks; - } - - const BasicBlock &getEntryBlock() const { return front(); } - BasicBlock &getEntryBlock() { return front(); } - - //===--------------------------------------------------------------------===// - // Symbol Table Accessing functions... - - /// getSymbolTable() - Return the symbol table... - /// - inline ValueSymbolTable &getValueSymbolTable() { return *SymTab; } - inline const ValueSymbolTable &getValueSymbolTable() const { return *SymTab; } - - //===--------------------------------------------------------------------===// - // BasicBlock iterator forwarding functions - // - iterator begin() { return BasicBlocks.begin(); } - const_iterator begin() const { return BasicBlocks.begin(); } - iterator end () { return BasicBlocks.end(); } - const_iterator end () const { return BasicBlocks.end(); } - - size_t size() const { return BasicBlocks.size(); } - bool empty() const { return BasicBlocks.empty(); } - const BasicBlock &front() const { return BasicBlocks.front(); } - BasicBlock &front() { return BasicBlocks.front(); } - const BasicBlock &back() const { return BasicBlocks.back(); } - BasicBlock &back() { return BasicBlocks.back(); } - -/// @name Function Argument Iteration -/// @{ - - arg_iterator arg_begin() { - CheckLazyArguments(); - return ArgumentList.begin(); - } - const_arg_iterator arg_begin() const { - CheckLazyArguments(); - return ArgumentList.begin(); - } - arg_iterator arg_end() { - CheckLazyArguments(); - return ArgumentList.end(); - } - const_arg_iterator arg_end() const { - CheckLazyArguments(); - return ArgumentList.end(); - } - - iterator_range args() { - return make_range(arg_begin(), arg_end()); - } - - iterator_range args() const { - return make_range(arg_begin(), arg_end()); - } - -/// @} - - size_t arg_size() const; - bool arg_empty() const; - - /// \brief Check whether this function has a personality function. - bool hasPersonalityFn() const { - return getSubclassDataFromValue() & (1<<3); - } - - /// \brief Get the personality function associated with this function. - Constant *getPersonalityFn() const; - void setPersonalityFn(Constant *Fn); - - /// \brief Check whether this function has prefix data. - bool hasPrefixData() const { - return getSubclassDataFromValue() & (1<<1); - } - - /// \brief Get the prefix data associated with this function. - Constant *getPrefixData() const; - void setPrefixData(Constant *PrefixData); - - /// \brief Check whether this function has prologue data. - bool hasPrologueData() const { - return getSubclassDataFromValue() & (1<<2); - } - - /// \brief Get the prologue data associated with this function. - Constant *getPrologueData() const; - void setPrologueData(Constant *PrologueData); - - /// Print the function to an output stream with an optional - /// AssemblyAnnotationWriter. - void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW = nullptr, - bool ShouldPreserveUseListOrder = false, - bool IsForDebug = false) const; - - /// viewCFG - This function is meant for use from the debugger. You can just - /// say 'call F->viewCFG()' and a ghostview window should pop up from the - /// program, displaying the CFG of the current function with the code for each - /// basic block inside. This depends on there being a 'dot' and 'gv' program - /// in your path. - /// - void viewCFG() const; - - /// viewCFGOnly - This function is meant for use from the debugger. It works - /// just like viewCFG, but it does not include the contents of basic blocks - /// into the nodes, just the label. If you are only interested in the CFG - /// this can make the graph smaller. - /// - void viewCFGOnly() const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == Value::FunctionVal; - } - - /// dropAllReferences() - This method causes all the subinstructions to "let - /// go" of all references that they are maintaining. This allows one to - /// 'delete' a whole module at a time, even though there may be circular - /// references... first all references are dropped, and all use counts go to - /// zero. Then everything is deleted for real. Note that no operations are - /// valid on an object that has "dropped all references", except operator - /// delete. - /// - /// Since no other object in the module can have references into the body of a - /// function, dropping all references deletes the entire body of the function, - /// including any contained basic blocks. - /// - void dropAllReferences(); - - /// hasAddressTaken - returns true if there are any uses of this function - /// other than direct calls or invokes to it, or blockaddress expressions. - /// Optionally passes back an offending user for diagnostic purposes. - /// - bool hasAddressTaken(const User** = nullptr) const; - - /// isDefTriviallyDead - Return true if it is trivially safe to remove - /// this function definition from the module (because it isn't externally - /// visible, does not have its address taken, and has no callers). To make - /// this more accurate, call removeDeadConstantUsers first. - bool isDefTriviallyDead() const; - - /// callsFunctionThatReturnsTwice - Return true if the function has a call to - /// setjmp or other function that gcc recognizes as "returning twice". - bool callsFunctionThatReturnsTwice() const; - - /// \brief Set the attached subprogram. - /// - /// Calls \a setMetadata() with \a LLVMContext::MD_dbg. - void setSubprogram(DISubprogram *SP); - - /// \brief Get the attached subprogram. - /// - /// Calls \a getMetadata() with \a LLVMContext::MD_dbg and casts the result - /// to \a DISubprogram. - DISubprogram *getSubprogram() const; - -private: - void allocHungoffUselist(); - template void setHungoffOperand(Constant *C); - - // Shadow Value::setValueSubclassData with a private forwarding method so that - // subclasses cannot accidentally use it. - void setValueSubclassData(unsigned short D) { - Value::setValueSubclassData(D); - } - void setValueSubclassDataBit(unsigned Bit, bool On); -}; - -template <> -struct OperandTraits : public HungoffOperandTraits<3> {}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(Function, Value) - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/GVMaterializer.h b/llvm/include/llvm/IR/GVMaterializer.h deleted file mode 100644 index 9e47722c..00000000 --- a/llvm/include/llvm/IR/GVMaterializer.h +++ /dev/null @@ -1,53 +0,0 @@ -//===- GVMaterializer.h - Interface for GV materializers --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides an abstract interface for loading a module from some -// place. This interface allows incremental or random access loading of -// functions from the file. This is useful for applications like JIT compilers -// or interprocedural optimizers that do not need the entire program in memory -// at the same time. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GVMATERIALIZER_H -#define LLVM_IR_GVMATERIALIZER_H - -#include -#include - -namespace llvm { -class Function; -class GlobalValue; -class Module; -class StructType; - -class GVMaterializer { -protected: - GVMaterializer() {} - -public: - virtual ~GVMaterializer(); - - /// Make sure the given GlobalValue is fully read. - /// - virtual std::error_code materialize(GlobalValue *GV) = 0; - - /// Make sure the entire Module has been completely read. - /// - virtual std::error_code materializeModule() = 0; - - virtual std::error_code materializeMetadata() = 0; - virtual void setStripDebugInfo() = 0; - - virtual std::vector getIdentifiedStructTypes() const = 0; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/GetElementPtrTypeIterator.h b/llvm/include/llvm/IR/GetElementPtrTypeIterator.h deleted file mode 100644 index 4953aebb..00000000 --- a/llvm/include/llvm/IR/GetElementPtrTypeIterator.h +++ /dev/null @@ -1,133 +0,0 @@ -//===- GetElementPtrTypeIterator.h ------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements an iterator for walking through the types indexed by -// getelementptr instructions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GETELEMENTPTRTYPEITERATOR_H -#define LLVM_IR_GETELEMENTPTRTYPEITERATOR_H - -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/Operator.h" -#include "llvm/IR/User.h" -#include "llvm/ADT/PointerIntPair.h" - -namespace llvm { - template - class generic_gep_type_iterator - : public std::iterator { - typedef std::iterator super; - - ItTy OpIt; - PointerIntPair CurTy; - unsigned AddrSpace; - generic_gep_type_iterator() {} - public: - - static generic_gep_type_iterator begin(Type *Ty, unsigned AddrSpace, - ItTy It) { - generic_gep_type_iterator I; - I.CurTy.setPointer(Ty); - I.CurTy.setInt(true); - I.AddrSpace = AddrSpace; - I.OpIt = It; - return I; - } - static generic_gep_type_iterator end(ItTy It) { - generic_gep_type_iterator I; - I.OpIt = It; - return I; - } - - bool operator==(const generic_gep_type_iterator& x) const { - return OpIt == x.OpIt; - } - bool operator!=(const generic_gep_type_iterator& x) const { - return !operator==(x); - } - - Type *operator*() const { - if (CurTy.getInt()) - return CurTy.getPointer()->getPointerTo(AddrSpace); - return CurTy.getPointer(); - } - - Type *getIndexedType() const { - if (CurTy.getInt()) - return CurTy.getPointer(); - CompositeType *CT = cast(CurTy.getPointer()); - return CT->getTypeAtIndex(getOperand()); - } - - // This is a non-standard operator->. It allows you to call methods on the - // current type directly. - Type *operator->() const { return operator*(); } - - Value *getOperand() const { return const_cast(&**OpIt); } - - generic_gep_type_iterator& operator++() { // Preincrement - if (CurTy.getInt()) { - CurTy.setInt(false); - } else if (CompositeType *CT = - dyn_cast(CurTy.getPointer())) { - CurTy.setPointer(CT->getTypeAtIndex(getOperand())); - } else { - CurTy.setPointer(nullptr); - } - ++OpIt; - return *this; - } - - generic_gep_type_iterator operator++(int) { // Postincrement - generic_gep_type_iterator tmp = *this; ++*this; return tmp; - } - }; - - typedef generic_gep_type_iterator<> gep_type_iterator; - - inline gep_type_iterator gep_type_begin(const User *GEP) { - auto *GEPOp = cast(GEP); - return gep_type_iterator::begin( - GEPOp->getSourceElementType(), - cast(GEPOp->getPointerOperandType()->getScalarType()) - ->getAddressSpace(), - GEP->op_begin() + 1); - } - inline gep_type_iterator gep_type_end(const User *GEP) { - return gep_type_iterator::end(GEP->op_end()); - } - inline gep_type_iterator gep_type_begin(const User &GEP) { - auto &GEPOp = cast(GEP); - return gep_type_iterator::begin( - GEPOp.getSourceElementType(), - cast(GEPOp.getPointerOperandType()->getScalarType()) - ->getAddressSpace(), - GEP.op_begin() + 1); - } - inline gep_type_iterator gep_type_end(const User &GEP) { - return gep_type_iterator::end(GEP.op_end()); - } - - template - inline generic_gep_type_iterator - gep_type_begin(Type *Op0, unsigned AS, ArrayRef A) { - return generic_gep_type_iterator::begin(Op0, AS, A.begin()); - } - - template - inline generic_gep_type_iterator - gep_type_end(Type * /*Op0*/, unsigned /*AS*/, ArrayRef A) { - return generic_gep_type_iterator::end(A.end()); - } -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/GlobalAlias.h b/llvm/include/llvm/IR/GlobalAlias.h deleted file mode 100644 index 3ae3e4a0..00000000 --- a/llvm/include/llvm/IR/GlobalAlias.h +++ /dev/null @@ -1,94 +0,0 @@ -//===-------- llvm/GlobalAlias.h - GlobalAlias class ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the GlobalAlias class, which -// represents a single function or variable alias in the IR. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GLOBALALIAS_H -#define LLVM_IR_GLOBALALIAS_H - -#include "llvm/ADT/ilist_node.h" -#include "llvm/IR/GlobalIndirectSymbol.h" - -namespace llvm { - -class Twine; -class Module; -template class SymbolTableListTraits; - -class GlobalAlias : public GlobalIndirectSymbol, - public ilist_node { - friend class SymbolTableListTraits; - void operator=(const GlobalAlias &) = delete; - GlobalAlias(const GlobalAlias &) = delete; - - void setParent(Module *parent); - - GlobalAlias(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, - const Twine &Name, Constant *Aliasee, Module *Parent); - -public: - /// If a parent module is specified, the alias is automatically inserted into - /// the end of the specified module's alias list. - static GlobalAlias *create(Type *Ty, unsigned AddressSpace, - LinkageTypes Linkage, const Twine &Name, - Constant *Aliasee, Module *Parent); - - // Without the Aliasee. - static GlobalAlias *create(Type *Ty, unsigned AddressSpace, - LinkageTypes Linkage, const Twine &Name, - Module *Parent); - - // The module is taken from the Aliasee. - static GlobalAlias *create(Type *Ty, unsigned AddressSpace, - LinkageTypes Linkage, const Twine &Name, - GlobalValue *Aliasee); - - // Type, Parent and AddressSpace taken from the Aliasee. - static GlobalAlias *create(LinkageTypes Linkage, const Twine &Name, - GlobalValue *Aliasee); - - // Linkage, Type, Parent and AddressSpace taken from the Aliasee. - static GlobalAlias *create(const Twine &Name, GlobalValue *Aliasee); - - /// removeFromParent - This method unlinks 'this' from the containing module, - /// but does not delete it. - /// - void removeFromParent() override; - - /// eraseFromParent - This method unlinks 'this' from the containing module - /// and deletes it. - /// - void eraseFromParent() override; - - /// These methods retrieve and set alias target. - void setAliasee(Constant *Aliasee); - const Constant *getAliasee() const { - return getIndirectSymbol(); - } - Constant *getAliasee() { - return getIndirectSymbol(); - } - - static bool isValidLinkage(LinkageTypes L) { - return isExternalLinkage(L) || isLocalLinkage(L) || - isWeakLinkage(L) || isLinkOnceLinkage(L); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == Value::GlobalAliasVal; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/GlobalIFunc.h b/llvm/include/llvm/IR/GlobalIFunc.h deleted file mode 100644 index 0cbe882c..00000000 --- a/llvm/include/llvm/IR/GlobalIFunc.h +++ /dev/null @@ -1,76 +0,0 @@ -//===-------- llvm/GlobalIFunc.h - GlobalIFunc class ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \brief -/// This file contains the declaration of the GlobalIFunc class, which -/// represents a single indirect function in the IR. Indirect function uses -/// ELF symbol type extension to mark that the address of a declaration should -/// be resolved at runtime by calling a resolver function. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GLOBALIFUNC_H -#define LLVM_IR_GLOBALIFUNC_H - -#include "llvm/ADT/ilist_node.h" -#include "llvm/IR/GlobalIndirectSymbol.h" - -namespace llvm { - -class Twine; -class Module; - -// Traits class for using GlobalIFunc in symbol table in Module. -template class SymbolTableListTraits; - -class GlobalIFunc final : public GlobalIndirectSymbol, - public ilist_node { - friend class SymbolTableListTraits; - void operator=(const GlobalIFunc &) = delete; - GlobalIFunc(const GlobalIFunc &) = delete; - - void setParent(Module *parent); - - GlobalIFunc(Type *Ty, unsigned AddressSpace, LinkageTypes Linkage, - const Twine &Name, Constant *Resolver, Module *Parent); - -public: - /// If a parent module is specified, the ifunc is automatically inserted into - /// the end of the specified module's ifunc list. - static GlobalIFunc *create(Type *Ty, unsigned AddressSpace, - LinkageTypes Linkage, const Twine &Name, - Constant *Resolver, Module *Parent); - - /// This method unlinks 'this' from the containing module, but does not - /// delete it. - void removeFromParent() final; - - /// This method unlinks 'this' from the containing module and deletes it. - void eraseFromParent() final; - - /// These methods retrieve and set ifunc resolver function. - void setResolver(Constant *Resolver) { - setIndirectSymbol(Resolver); - } - const Constant *getResolver() const { - return getIndirectSymbol(); - } - Constant *getResolver() { - return getIndirectSymbol(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == Value::GlobalIFuncVal; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/GlobalIndirectSymbol.h b/llvm/include/llvm/IR/GlobalIndirectSymbol.h deleted file mode 100644 index 8edb3d1d..00000000 --- a/llvm/include/llvm/IR/GlobalIndirectSymbol.h +++ /dev/null @@ -1,84 +0,0 @@ -//===- llvm/GlobalIndirectSymbol.h - GlobalIndirectSymbol class -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the GlobalIndirectSymbol class, which -// is a base class for GlobalAlias and GlobalIFunc. It contains all common code -// for aliases and ifuncs. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GLOBALINDIRECTSYMBOL_H -#define LLVM_IR_GLOBALINDIRECTSYMBOL_H - -#include "llvm/IR/GlobalValue.h" -#include "llvm/IR/OperandTraits.h" - -namespace llvm { - -class GlobalIndirectSymbol : public GlobalValue { - void operator=(const GlobalIndirectSymbol &) = delete; - GlobalIndirectSymbol(const GlobalIndirectSymbol &) = delete; - -protected: - GlobalIndirectSymbol(Type *Ty, ValueTy VTy, unsigned AddressSpace, - LinkageTypes Linkage, const Twine &Name, Constant *Symbol); - -public: - // allocate space for exactly one operand - void *operator new(size_t s) { - return User::operator new(s, 1); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant); - - /// These methods set and retrieve indirect symbol. - void setIndirectSymbol(Constant *Symbol) { - setOperand(0, Symbol); - } - const Constant *getIndirectSymbol() const { - return const_cast(this)->getIndirectSymbol(); - } - Constant *getIndirectSymbol() { - return getOperand(0); - } - - const GlobalObject *getBaseObject() const { - return const_cast(this)->getBaseObject(); - } - GlobalObject *getBaseObject() { - return dyn_cast(getIndirectSymbol()->stripInBoundsOffsets()); - } - - const GlobalObject *getBaseObject(const DataLayout &DL, APInt &Offset) const { - return const_cast(this)->getBaseObject(DL, Offset); - } - GlobalObject *getBaseObject(const DataLayout &DL, APInt &Offset) { - return dyn_cast( - getIndirectSymbol()->stripAndAccumulateInBoundsConstantOffsets(DL, - Offset)); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == Value::GlobalAliasVal || - V->getValueID() == Value::GlobalIFuncVal; - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GlobalIndirectSymbol, Constant) - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/GlobalObject.h b/llvm/include/llvm/IR/GlobalObject.h deleted file mode 100644 index 04737a04..00000000 --- a/llvm/include/llvm/IR/GlobalObject.h +++ /dev/null @@ -1,146 +0,0 @@ -//===-- llvm/GlobalObject.h - Class to represent global objects -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This represents an independent object. That is, a function or a global -// variable, but not an alias. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GLOBALOBJECT_H -#define LLVM_IR_GLOBALOBJECT_H - -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/GlobalValue.h" - -namespace llvm { -class Comdat; -class MDNode; -class Metadata; -class Module; - -class GlobalObject : public GlobalValue { - GlobalObject(const GlobalObject &) = delete; - -protected: - GlobalObject(Type *Ty, ValueTy VTy, Use *Ops, unsigned NumOps, - LinkageTypes Linkage, const Twine &Name, - unsigned AddressSpace = 0) - : GlobalValue(Ty, VTy, Ops, NumOps, Linkage, Name, AddressSpace), - ObjComdat(nullptr) { - setGlobalValueSubClassData(0); - } - - std::string Section; // Section to emit this into, empty means default - Comdat *ObjComdat; - enum { - LastAlignmentBit = 4, - HasMetadataHashEntryBit, - - GlobalObjectBits, - }; - static const unsigned GlobalObjectSubClassDataBits = - GlobalValueSubClassDataBits - GlobalObjectBits; - -private: - static const unsigned AlignmentBits = LastAlignmentBit + 1; - static const unsigned AlignmentMask = (1 << AlignmentBits) - 1; - static const unsigned GlobalObjectMask = (1 << GlobalObjectBits) - 1; - -public: - unsigned getAlignment() const { - unsigned Data = getGlobalValueSubClassData(); - unsigned AlignmentData = Data & AlignmentMask; - return (1u << AlignmentData) >> 1; - } - void setAlignment(unsigned Align); - - unsigned getGlobalObjectSubClassData() const; - void setGlobalObjectSubClassData(unsigned Val); - - bool hasSection() const { return !getSection().empty(); } - StringRef getSection() const { return Section; } - void setSection(StringRef S); - - bool hasComdat() const { return getComdat() != nullptr; } - const Comdat *getComdat() const { return ObjComdat; } - Comdat *getComdat() { return ObjComdat; } - void setComdat(Comdat *C) { ObjComdat = C; } - - /// Check if this has any metadata. - bool hasMetadata() const { return hasMetadataHashEntry(); } - - /// Get the current metadata attachments for the given kind, if any. - /// - /// These functions require that the function have at most a single attachment - /// of the given kind, and return \c nullptr if such an attachment is missing. - /// @{ - MDNode *getMetadata(unsigned KindID) const; - MDNode *getMetadata(StringRef Kind) const; - /// @} - - /// Appends all attachments with the given ID to \c MDs in insertion order. - /// If the global has no attachments with the given ID, or if ID is invalid, - /// leaves MDs unchanged. - /// @{ - void getMetadata(unsigned KindID, SmallVectorImpl &MDs) const; - void getMetadata(StringRef Kind, SmallVectorImpl &MDs) const; - /// @} - - /// Set a particular kind of metadata attachment. - /// - /// Sets the given attachment to \c MD, erasing it if \c MD is \c nullptr or - /// replacing it if it already exists. - /// @{ - void setMetadata(unsigned KindID, MDNode *MD); - void setMetadata(StringRef Kind, MDNode *MD); - /// @} - - /// Add a metadata attachment. - /// @{ - void addMetadata(unsigned KindID, MDNode &MD); - void addMetadata(StringRef Kind, MDNode &MD); - /// @} - - /// Appends all attachments for the global to \c MDs, sorting by attachment - /// ID. Attachments with the same ID appear in insertion order. - void - getAllMetadata(SmallVectorImpl> &MDs) const; - - /// Erase all metadata attachments with the given kind. - void eraseMetadata(unsigned KindID); - - /// Copy metadata from Src, adjusting offsets by Offset. - void copyMetadata(const GlobalObject *Src, unsigned Offset); - - void addTypeMetadata(unsigned Offset, Metadata *TypeID); - - void copyAttributesFrom(const GlobalValue *Src) override; - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == Value::FunctionVal || - V->getValueID() == Value::GlobalVariableVal; - } - - void clearMetadata(); - -private: - bool hasMetadataHashEntry() const { - return getGlobalValueSubClassData() & (1 << HasMetadataHashEntryBit); - } - void setHasMetadataHashEntry(bool HasEntry) { - unsigned Mask = 1 << HasMetadataHashEntryBit; - setGlobalValueSubClassData((~Mask & getGlobalValueSubClassData()) | - (HasEntry ? Mask : 0u)); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/GlobalValue.h b/llvm/include/llvm/IR/GlobalValue.h deleted file mode 100644 index 09682f7a..00000000 --- a/llvm/include/llvm/IR/GlobalValue.h +++ /dev/null @@ -1,517 +0,0 @@ -//===-- llvm/GlobalValue.h - Class to represent a global value --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file is a common base class of all globally definable objects. As such, -// it is subclassed by GlobalVariable, GlobalAlias and by Function. This is -// used because you can do certain things with these global objects that you -// can't do to anything else. For example, use the address of one as a -// constant. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GLOBALVALUE_H -#define LLVM_IR_GLOBALVALUE_H - -#include "llvm/IR/Constant.h" -#include "llvm/IR/DerivedTypes.h" -#include "llvm/Support/MD5.h" -#include - -namespace llvm { - -class Comdat; -class PointerType; -class Module; - -namespace Intrinsic { - enum ID : unsigned; -} - -class GlobalValue : public Constant { - GlobalValue(const GlobalValue &) = delete; -public: - /// @brief An enumeration for the kinds of linkage for global values. - enum LinkageTypes { - ExternalLinkage = 0,///< Externally visible function - AvailableExternallyLinkage, ///< Available for inspection, not emission. - LinkOnceAnyLinkage, ///< Keep one copy of function when linking (inline) - LinkOnceODRLinkage, ///< Same, but only replaced by something equivalent. - WeakAnyLinkage, ///< Keep one copy of named function when linking (weak) - WeakODRLinkage, ///< Same, but only replaced by something equivalent. - AppendingLinkage, ///< Special purpose, only applies to global arrays - InternalLinkage, ///< Rename collisions when linking (static functions). - PrivateLinkage, ///< Like Internal, but omit from symbol table. - ExternalWeakLinkage,///< ExternalWeak linkage description. - CommonLinkage ///< Tentative definitions. - }; - - /// @brief An enumeration for the kinds of visibility of global values. - enum VisibilityTypes { - DefaultVisibility = 0, ///< The GV is visible - HiddenVisibility, ///< The GV is hidden - ProtectedVisibility ///< The GV is protected - }; - - /// @brief Storage classes of global values for PE targets. - enum DLLStorageClassTypes { - DefaultStorageClass = 0, - DLLImportStorageClass = 1, ///< Function to be imported from DLL - DLLExportStorageClass = 2 ///< Function to be accessible from DLL. - }; - -protected: - GlobalValue(Type *Ty, ValueTy VTy, Use *Ops, unsigned NumOps, - LinkageTypes Linkage, const Twine &Name, unsigned AddressSpace) - : Constant(PointerType::get(Ty, AddressSpace), VTy, Ops, NumOps), - ValueType(Ty), Linkage(Linkage), Visibility(DefaultVisibility), - UnnamedAddrVal(unsigned(UnnamedAddr::None)), - DllStorageClass(DefaultStorageClass), ThreadLocal(NotThreadLocal), - IntID((Intrinsic::ID)0U), Parent(nullptr) { - setName(Name); - } - - Type *ValueType; - // All bitfields use unsigned as the underlying type so that MSVC will pack - // them. - unsigned Linkage : 4; // The linkage of this global - unsigned Visibility : 2; // The visibility style of this global - unsigned UnnamedAddrVal : 2; // This value's address is not significant - unsigned DllStorageClass : 2; // DLL storage class - - unsigned ThreadLocal : 3; // Is this symbol "Thread Local", if so, what is - // the desired model? - static const unsigned GlobalValueSubClassDataBits = 19; - -private: - // Give subclasses access to what otherwise would be wasted padding. - // (19 + 4 + 2 + 2 + 2 + 3) == 32. - unsigned SubClassData : GlobalValueSubClassDataBits; - - friend class Constant; - void destroyConstantImpl(); - Value *handleOperandChangeImpl(Value *From, Value *To); - - /// Returns true if the definition of this global may be replaced by a - /// differently optimized variant of the same source level function at link - /// time. - bool mayBeDerefined() const { - switch (getLinkage()) { - case WeakODRLinkage: - case LinkOnceODRLinkage: - case AvailableExternallyLinkage: - return true; - - case WeakAnyLinkage: - case LinkOnceAnyLinkage: - case CommonLinkage: - case ExternalWeakLinkage: - case ExternalLinkage: - case AppendingLinkage: - case InternalLinkage: - case PrivateLinkage: - return isInterposable(); - } - - llvm_unreachable("Fully covered switch above!"); - } - -protected: - /// \brief The intrinsic ID for this subclass (which must be a Function). - /// - /// This member is defined by this class, but not used for anything. - /// Subclasses can use it to store their intrinsic ID, if they have one. - /// - /// This is stored here to save space in Function on 64-bit hosts. - Intrinsic::ID IntID; - - unsigned getGlobalValueSubClassData() const { - return SubClassData; - } - void setGlobalValueSubClassData(unsigned V) { - assert(V < (1 << GlobalValueSubClassDataBits) && "It will not fit"); - SubClassData = V; - } - - Module *Parent; // The containing module. -public: - enum ThreadLocalMode { - NotThreadLocal = 0, - GeneralDynamicTLSModel, - LocalDynamicTLSModel, - InitialExecTLSModel, - LocalExecTLSModel - }; - - ~GlobalValue() override { - removeDeadConstantUsers(); // remove any dead constants using this. - } - - unsigned getAlignment() const; - - enum class UnnamedAddr { - None, - Local, - Global, - }; - - bool hasGlobalUnnamedAddr() const { - return getUnnamedAddr() == UnnamedAddr::Global; - } - - /// Returns true if this value's address is not significant in this module. - /// This attribute is intended to be used only by the code generator and LTO - /// to allow the linker to decide whether the global needs to be in the symbol - /// table. It should probably not be used in optimizations, as the value may - /// have uses outside the module; use hasGlobalUnnamedAddr() instead. - bool hasAtLeastLocalUnnamedAddr() const { - return getUnnamedAddr() != UnnamedAddr::None; - } - - UnnamedAddr getUnnamedAddr() const { - return UnnamedAddr(UnnamedAddrVal); - } - void setUnnamedAddr(UnnamedAddr Val) { UnnamedAddrVal = unsigned(Val); } - - static UnnamedAddr getMinUnnamedAddr(UnnamedAddr A, UnnamedAddr B) { - if (A == UnnamedAddr::None || B == UnnamedAddr::None) - return UnnamedAddr::None; - if (A == UnnamedAddr::Local || B == UnnamedAddr::Local) - return UnnamedAddr::Local; - return UnnamedAddr::Global; - } - - bool hasComdat() const { return getComdat() != nullptr; } - Comdat *getComdat(); - const Comdat *getComdat() const { - return const_cast(this)->getComdat(); - } - - VisibilityTypes getVisibility() const { return VisibilityTypes(Visibility); } - bool hasDefaultVisibility() const { return Visibility == DefaultVisibility; } - bool hasHiddenVisibility() const { return Visibility == HiddenVisibility; } - bool hasProtectedVisibility() const { - return Visibility == ProtectedVisibility; - } - void setVisibility(VisibilityTypes V) { - assert((!hasLocalLinkage() || V == DefaultVisibility) && - "local linkage requires default visibility"); - Visibility = V; - } - - /// If the value is "Thread Local", its value isn't shared by the threads. - bool isThreadLocal() const { return getThreadLocalMode() != NotThreadLocal; } - void setThreadLocal(bool Val) { - setThreadLocalMode(Val ? GeneralDynamicTLSModel : NotThreadLocal); - } - void setThreadLocalMode(ThreadLocalMode Val) { - assert(Val == NotThreadLocal || getValueID() != Value::FunctionVal); - ThreadLocal = Val; - } - ThreadLocalMode getThreadLocalMode() const { - return static_cast(ThreadLocal); - } - - DLLStorageClassTypes getDLLStorageClass() const { - return DLLStorageClassTypes(DllStorageClass); - } - bool hasDLLImportStorageClass() const { - return DllStorageClass == DLLImportStorageClass; - } - bool hasDLLExportStorageClass() const { - return DllStorageClass == DLLExportStorageClass; - } - void setDLLStorageClass(DLLStorageClassTypes C) { DllStorageClass = C; } - - bool hasSection() const { return !getSection().empty(); } - StringRef getSection() const; - - /// Global values are always pointers. - PointerType *getType() const { return cast(User::getType()); } - - Type *getValueType() const { return ValueType; } - - static LinkageTypes getLinkOnceLinkage(bool ODR) { - return ODR ? LinkOnceODRLinkage : LinkOnceAnyLinkage; - } - static LinkageTypes getWeakLinkage(bool ODR) { - return ODR ? WeakODRLinkage : WeakAnyLinkage; - } - - static bool isExternalLinkage(LinkageTypes Linkage) { - return Linkage == ExternalLinkage; - } - static bool isAvailableExternallyLinkage(LinkageTypes Linkage) { - return Linkage == AvailableExternallyLinkage; - } - static bool isLinkOnceODRLinkage(LinkageTypes Linkage) { - return Linkage == LinkOnceODRLinkage; - } - static bool isLinkOnceLinkage(LinkageTypes Linkage) { - return Linkage == LinkOnceAnyLinkage || Linkage == LinkOnceODRLinkage; - } - static bool isWeakAnyLinkage(LinkageTypes Linkage) { - return Linkage == WeakAnyLinkage; - } - static bool isWeakODRLinkage(LinkageTypes Linkage) { - return Linkage == WeakODRLinkage; - } - static bool isWeakLinkage(LinkageTypes Linkage) { - return isWeakAnyLinkage(Linkage) || isWeakODRLinkage(Linkage); - } - static bool isAppendingLinkage(LinkageTypes Linkage) { - return Linkage == AppendingLinkage; - } - static bool isInternalLinkage(LinkageTypes Linkage) { - return Linkage == InternalLinkage; - } - static bool isPrivateLinkage(LinkageTypes Linkage) { - return Linkage == PrivateLinkage; - } - static bool isLocalLinkage(LinkageTypes Linkage) { - return isInternalLinkage(Linkage) || isPrivateLinkage(Linkage); - } - static bool isExternalWeakLinkage(LinkageTypes Linkage) { - return Linkage == ExternalWeakLinkage; - } - static bool isCommonLinkage(LinkageTypes Linkage) { - return Linkage == CommonLinkage; - } - static bool isValidDeclarationLinkage(LinkageTypes Linkage) { - return isExternalWeakLinkage(Linkage) || isExternalLinkage(Linkage); - } - - /// Whether the definition of this global may be replaced by something - /// non-equivalent at link time. For example, if a function has weak linkage - /// then the code defining it may be replaced by different code. - static bool isInterposableLinkage(LinkageTypes Linkage) { - switch (Linkage) { - case WeakAnyLinkage: - case LinkOnceAnyLinkage: - case CommonLinkage: - case ExternalWeakLinkage: - return true; - - case AvailableExternallyLinkage: - case LinkOnceODRLinkage: - case WeakODRLinkage: - // The above three cannot be overridden but can be de-refined. - - case ExternalLinkage: - case AppendingLinkage: - case InternalLinkage: - case PrivateLinkage: - return false; - } - llvm_unreachable("Fully covered switch above!"); - } - - /// Whether the definition of this global may be discarded if it is not used - /// in its compilation unit. - static bool isDiscardableIfUnused(LinkageTypes Linkage) { - return isLinkOnceLinkage(Linkage) || isLocalLinkage(Linkage) || - isAvailableExternallyLinkage(Linkage); - } - - /// Whether the definition of this global may be replaced at link time. NB: - /// Using this method outside of the code generators is almost always a - /// mistake: when working at the IR level use isInterposable instead as it - /// knows about ODR semantics. - static bool isWeakForLinker(LinkageTypes Linkage) { - return Linkage == WeakAnyLinkage || Linkage == WeakODRLinkage || - Linkage == LinkOnceAnyLinkage || Linkage == LinkOnceODRLinkage || - Linkage == CommonLinkage || Linkage == ExternalWeakLinkage; - } - - /// Return true if the currently visible definition of this global (if any) is - /// exactly the definition we will see at runtime. - /// - /// Non-exact linkage types inhibits most non-inlining IPO, since a - /// differently optimized variant of the same function can have different - /// observable or undefined behavior than in the variant currently visible. - /// For instance, we could have started with - /// - /// void foo(int *v) { - /// int t = 5 / v[0]; - /// (void) t; - /// } - /// - /// and "refined" it to - /// - /// void foo(int *v) { } - /// - /// However, we cannot infer readnone for `foo`, since that would justify - /// DSE'ing a store to `v[0]` across a call to `foo`, which can cause - /// undefined behavior if the linker replaces the actual call destination with - /// the unoptimized `foo`. - /// - /// Inlining is okay across non-exact linkage types as long as they're not - /// interposable (see \c isInterposable), since in such cases the currently - /// visible variant is *a* correct implementation of the original source - /// function; it just isn't the *only* correct implementation. - bool isDefinitionExact() const { - return !mayBeDerefined(); - } - - /// Return true if this global has an exact defintion. - bool hasExactDefinition() const { - // While this computes exactly the same thing as - // isStrongDefinitionForLinker, the intended uses are different. This - // function is intended to help decide if specific inter-procedural - // transforms are correct, while isStrongDefinitionForLinker's intended use - // is in low level code generation. - return !isDeclaration() && isDefinitionExact(); - } - - /// Return true if this global's definition can be substituted with an - /// *arbitrary* definition at link time. We cannot do any IPO or inlinining - /// across interposable call edges, since the callee can be replaced with - /// something arbitrary at link time. - bool isInterposable() const { return isInterposableLinkage(getLinkage()); } - - bool hasExternalLinkage() const { return isExternalLinkage(getLinkage()); } - bool hasAvailableExternallyLinkage() const { - return isAvailableExternallyLinkage(getLinkage()); - } - bool hasLinkOnceLinkage() const { return isLinkOnceLinkage(getLinkage()); } - bool hasLinkOnceODRLinkage() const { - return isLinkOnceODRLinkage(getLinkage()); - } - bool hasWeakLinkage() const { return isWeakLinkage(getLinkage()); } - bool hasWeakAnyLinkage() const { return isWeakAnyLinkage(getLinkage()); } - bool hasWeakODRLinkage() const { return isWeakODRLinkage(getLinkage()); } - bool hasAppendingLinkage() const { return isAppendingLinkage(getLinkage()); } - bool hasInternalLinkage() const { return isInternalLinkage(getLinkage()); } - bool hasPrivateLinkage() const { return isPrivateLinkage(getLinkage()); } - bool hasLocalLinkage() const { return isLocalLinkage(getLinkage()); } - bool hasExternalWeakLinkage() const { - return isExternalWeakLinkage(getLinkage()); - } - bool hasCommonLinkage() const { return isCommonLinkage(getLinkage()); } - bool hasValidDeclarationLinkage() const { - return isValidDeclarationLinkage(getLinkage()); - } - - void setLinkage(LinkageTypes LT) { - if (isLocalLinkage(LT)) - Visibility = DefaultVisibility; - Linkage = LT; - } - LinkageTypes getLinkage() const { return LinkageTypes(Linkage); } - - bool isDiscardableIfUnused() const { - return isDiscardableIfUnused(getLinkage()); - } - - bool isWeakForLinker() const { return isWeakForLinker(getLinkage()); } - - /// Copy all additional attributes (those not needed to create a GlobalValue) - /// from the GlobalValue Src to this one. - virtual void copyAttributesFrom(const GlobalValue *Src); - - /// If special LLVM prefix that is used to inform the asm printer to not emit - /// usual symbol prefix before the symbol name is used then return linkage - /// name after skipping this special LLVM prefix. - static StringRef getRealLinkageName(StringRef Name) { - if (!Name.empty() && Name[0] == '\1') - return Name.substr(1); - return Name; - } - - /// Return the modified name for a global value suitable to be - /// used as the key for a global lookup (e.g. profile or ThinLTO). - /// The value's original name is \c Name and has linkage of type - /// \c Linkage. The value is defined in module \c FileName. - static std::string getGlobalIdentifier(StringRef Name, - GlobalValue::LinkageTypes Linkage, - StringRef FileName); - - /// Return the modified name for this global value suitable to be - /// used as the key for a global lookup (e.g. profile or ThinLTO). - std::string getGlobalIdentifier() const; - - /// Declare a type to represent a global unique identifier for a global value. - /// This is a 64 bits hash that is used by PGO and ThinLTO to have a compact - /// unique way to identify a symbol. - using GUID = uint64_t; - - /// Return a 64-bit global unique ID constructed from global value name - /// (i.e. returned by getGlobalIdentifier()). - static GUID getGUID(StringRef GlobalName) { return MD5Hash(GlobalName); } - - /// Return a 64-bit global unique ID constructed from global value name - /// (i.e. returned by getGlobalIdentifier()). - GUID getGUID() const { return getGUID(getGlobalIdentifier()); } - - /// @name Materialization - /// Materialization is used to construct functions only as they're needed. - /// This - /// is useful to reduce memory usage in LLVM or parsing work done by the - /// BitcodeReader to load the Module. - /// @{ - - /// If this function's Module is being lazily streamed in functions from disk - /// or some other source, this method can be used to check to see if the - /// function has been read in yet or not. - bool isMaterializable() const; - - /// Make sure this GlobalValue is fully read. If the module is corrupt, this - /// returns true and fills in the optional string with information about the - /// problem. If successful, this returns false. - std::error_code materialize(); - -/// @} - - /// Return true if the primary definition of this global value is outside of - /// the current translation unit. - bool isDeclaration() const; - - bool isDeclarationForLinker() const { - if (hasAvailableExternallyLinkage()) - return true; - - return isDeclaration(); - } - - /// Returns true if this global's definition will be the one chosen by the - /// linker. - /// - /// NB! Ideally this should not be used at the IR level at all. If you're - /// interested in optimization constraints implied by the linker's ability to - /// choose an implementation, prefer using \c hasExactDefinition. - bool isStrongDefinitionForLinker() const { - return !(isDeclarationForLinker() || isWeakForLinker()); - } - - // Returns true if the alignment of the value can be unilaterally - // increased. - bool canIncreaseAlignment() const; - - /// This method unlinks 'this' from the containing module, but does not delete - /// it. - virtual void removeFromParent() = 0; - - /// This method unlinks 'this' from the containing module and deletes it. - virtual void eraseFromParent() = 0; - - /// Get the module that this global value is contained inside of... - Module *getParent() { return Parent; } - const Module *getParent() const { return Parent; } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Value *V) { - return V->getValueID() == Value::FunctionVal || - V->getValueID() == Value::GlobalVariableVal || - V->getValueID() == Value::GlobalAliasVal || - V->getValueID() == Value::GlobalIFuncVal; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/GlobalVariable.h b/llvm/include/llvm/IR/GlobalVariable.h deleted file mode 100644 index ebeb6354..00000000 --- a/llvm/include/llvm/IR/GlobalVariable.h +++ /dev/null @@ -1,183 +0,0 @@ -//===-- llvm/GlobalVariable.h - GlobalVariable class ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the GlobalVariable class, which -// represents a single global variable (or constant) in the VM. -// -// Global variables are constant pointers that refer to hunks of space that are -// allocated by either the VM, or by the linker in a static compiler. A global -// variable may have an initial value, which is copied into the executables .data -// area. Global Constants are required to have initializers. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_GLOBALVARIABLE_H -#define LLVM_IR_GLOBALVARIABLE_H - -#include "llvm/ADT/Twine.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/IR/GlobalObject.h" -#include "llvm/IR/OperandTraits.h" - -namespace llvm { - -class Module; -class Constant; -template class SymbolTableListTraits; - -class GlobalVariable : public GlobalObject, public ilist_node { - friend class SymbolTableListTraits; - void *operator new(size_t, unsigned) = delete; - void operator=(const GlobalVariable &) = delete; - GlobalVariable(const GlobalVariable &) = delete; - - void setParent(Module *parent); - - bool isConstantGlobal : 1; // Is this a global constant? - bool isExternallyInitializedConstant : 1; // Is this a global whose value - // can change from its initial - // value before global - // initializers are run? -public: - // allocate space for exactly one operand - void *operator new(size_t s) { - return User::operator new(s, 1); - } - - /// GlobalVariable ctor - If a parent module is specified, the global is - /// automatically inserted into the end of the specified modules global list. - GlobalVariable(Type *Ty, bool isConstant, LinkageTypes Linkage, - Constant *Initializer = nullptr, const Twine &Name = "", - ThreadLocalMode = NotThreadLocal, unsigned AddressSpace = 0, - bool isExternallyInitialized = false); - /// GlobalVariable ctor - This creates a global and inserts it before the - /// specified other global. - GlobalVariable(Module &M, Type *Ty, bool isConstant, - LinkageTypes Linkage, Constant *Initializer, - const Twine &Name = "", GlobalVariable *InsertBefore = nullptr, - ThreadLocalMode = NotThreadLocal, unsigned AddressSpace = 0, - bool isExternallyInitialized = false); - - ~GlobalVariable() override { - dropAllReferences(); - - // FIXME: needed by operator delete - setGlobalVariableNumOperands(1); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// Definitions have initializers, declarations don't. - /// - inline bool hasInitializer() const { return !isDeclaration(); } - - /// hasDefinitiveInitializer - Whether the global variable has an initializer, - /// and any other instances of the global (this can happen due to weak - /// linkage) are guaranteed to have the same initializer. - /// - /// Note that if you want to transform a global, you must use - /// hasUniqueInitializer() instead, because of the *_odr linkage type. - /// - /// Example: - /// - /// @a = global SomeType* null - Initializer is both definitive and unique. - /// - /// @b = global weak SomeType* null - Initializer is neither definitive nor - /// unique. - /// - /// @c = global weak_odr SomeType* null - Initializer is definitive, but not - /// unique. - inline bool hasDefinitiveInitializer() const { - return hasInitializer() && - // The initializer of a global variable may change to something arbitrary - // at link time. - !isInterposable() && - // The initializer of a global variable with the externally_initialized - // marker may change at runtime before C++ initializers are evaluated. - !isExternallyInitialized(); - } - - /// hasUniqueInitializer - Whether the global variable has an initializer, and - /// any changes made to the initializer will turn up in the final executable. - inline bool hasUniqueInitializer() const { - return - // We need to be sure this is the definition that will actually be used - isStrongDefinitionForLinker() && - // It is not safe to modify initializers of global variables with the - // external_initializer marker since the value may be changed at runtime - // before C++ initializers are evaluated. - !isExternallyInitialized(); - } - - /// getInitializer - Return the initializer for this global variable. It is - /// illegal to call this method if the global is external, because we cannot - /// tell what the value is initialized to! - /// - inline const Constant *getInitializer() const { - assert(hasInitializer() && "GV doesn't have initializer!"); - return static_cast(Op<0>().get()); - } - inline Constant *getInitializer() { - assert(hasInitializer() && "GV doesn't have initializer!"); - return static_cast(Op<0>().get()); - } - /// setInitializer - Sets the initializer for this global variable, removing - /// any existing initializer if InitVal==NULL. If this GV has type T*, the - /// initializer must have type T. - void setInitializer(Constant *InitVal); - - /// If the value is a global constant, its value is immutable throughout the - /// runtime execution of the program. Assigning a value into the constant - /// leads to undefined behavior. - /// - bool isConstant() const { return isConstantGlobal; } - void setConstant(bool Val) { isConstantGlobal = Val; } - - bool isExternallyInitialized() const { - return isExternallyInitializedConstant; - } - void setExternallyInitialized(bool Val) { - isExternallyInitializedConstant = Val; - } - - /// copyAttributesFrom - copy all additional attributes (those not needed to - /// create a GlobalVariable) from the GlobalVariable Src to this one. - void copyAttributesFrom(const GlobalValue *Src) override; - - /// removeFromParent - This method unlinks 'this' from the containing module, - /// but does not delete it. - /// - void removeFromParent() override; - - /// eraseFromParent - This method unlinks 'this' from the containing module - /// and deletes it. - /// - void eraseFromParent() override; - - /// Drop all references in preparation to destroy the GlobalVariable. This - /// drops not only the reference to the initializer but also to any metadata. - void dropAllReferences(); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == Value::GlobalVariableVal; - } -}; - -template <> -struct OperandTraits : - public OptionalOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GlobalVariable, Value) - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h deleted file mode 100644 index 016e9e1d..00000000 --- a/llvm/include/llvm/IR/IRBuilder.h +++ /dev/null @@ -1,1803 +0,0 @@ -//===---- llvm/IRBuilder.h - Builder for LLVM Instructions ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the IRBuilder class, which is used as a convenient way -// to create LLVM instructions with a consistent and simplified interface. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_IRBUILDER_H -#define LLVM_IR_IRBUILDER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/None.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Twine.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/Constant.h" -#include "llvm/IR/ConstantFolder.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/DataLayout.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/InstrTypes.h" -#include "llvm/IR/Instruction.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/Operator.h" -#include "llvm/IR/Type.h" -#include "llvm/IR/Value.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Support/AtomicOrdering.h" -#include "llvm/Support/CBindingWrapping.h" -#include "llvm/Support/Casting.h" -#include "llvm-c/Types.h" -#include -#include -#include - -namespace llvm { - -class APInt; -class MDNode; -class Module; -class Use; - -/// \brief This provides the default implementation of the IRBuilder -/// 'InsertHelper' method that is called whenever an instruction is created by -/// IRBuilder and needs to be inserted. -/// -/// By default, this inserts the instruction at the insertion point. -class IRBuilderDefaultInserter { -protected: - void InsertHelper(Instruction *I, const Twine &Name, - BasicBlock *BB, BasicBlock::iterator InsertPt) const { - if (BB) BB->getInstList().insert(InsertPt, I); - I->setName(Name); - } -}; - -/// \brief Common base class shared among various IRBuilders. -class IRBuilderBase { - DebugLoc CurDbgLocation; - -protected: - BasicBlock *BB; - BasicBlock::iterator InsertPt; - LLVMContext &Context; - - MDNode *DefaultFPMathTag; - FastMathFlags FMF; - - ArrayRef DefaultOperandBundles; - -public: - IRBuilderBase(LLVMContext &context, MDNode *FPMathTag = nullptr, - ArrayRef OpBundles = None) - : Context(context), DefaultFPMathTag(FPMathTag), FMF(), - DefaultOperandBundles(OpBundles) { - ClearInsertionPoint(); - } - - //===--------------------------------------------------------------------===// - // Builder configuration methods - //===--------------------------------------------------------------------===// - - /// \brief Clear the insertion point: created instructions will not be - /// inserted into a block. - void ClearInsertionPoint() { - BB = nullptr; - InsertPt.reset(nullptr); - } - - BasicBlock *GetInsertBlock() const { return BB; } - BasicBlock::iterator GetInsertPoint() const { return InsertPt; } - LLVMContext &getContext() const { return Context; } - - /// \brief This specifies that created instructions should be appended to the - /// end of the specified block. - void SetInsertPoint(BasicBlock *TheBB) { - BB = TheBB; - InsertPt = BB->end(); - } - - /// \brief This specifies that created instructions should be inserted before - /// the specified instruction. - void SetInsertPoint(Instruction *I) { - BB = I->getParent(); - InsertPt = I->getIterator(); - assert(InsertPt != BB->end() && "Can't read debug loc from end()"); - SetCurrentDebugLocation(I->getDebugLoc()); - } - - /// \brief This specifies that created instructions should be inserted at the - /// specified point. - void SetInsertPoint(BasicBlock *TheBB, BasicBlock::iterator IP) { - BB = TheBB; - InsertPt = IP; - if (IP != TheBB->end()) - SetCurrentDebugLocation(IP->getDebugLoc()); - } - - /// \brief Set location information used by debugging information. - void SetCurrentDebugLocation(DebugLoc L) { CurDbgLocation = std::move(L); } - - /// \brief Get location information used by debugging information. - const DebugLoc &getCurrentDebugLocation() const { return CurDbgLocation; } - - /// \brief If this builder has a current debug location, set it on the - /// specified instruction. - void SetInstDebugLocation(Instruction *I) const { - if (CurDbgLocation) - I->setDebugLoc(CurDbgLocation); - } - - /// \brief Get the return type of the current function that we're emitting - /// into. - Type *getCurrentFunctionReturnType() const; - - /// InsertPoint - A saved insertion point. - class InsertPoint { - BasicBlock *Block; - BasicBlock::iterator Point; - - public: - /// \brief Creates a new insertion point which doesn't point to anything. - InsertPoint() : Block(nullptr) {} - - /// \brief Creates a new insertion point at the given location. - InsertPoint(BasicBlock *InsertBlock, BasicBlock::iterator InsertPoint) - : Block(InsertBlock), Point(InsertPoint) {} - - /// \brief Returns true if this insert point is set. - bool isSet() const { return (Block != nullptr); } - - llvm::BasicBlock *getBlock() const { return Block; } - llvm::BasicBlock::iterator getPoint() const { return Point; } - }; - - /// \brief Returns the current insert point. - InsertPoint saveIP() const { - return InsertPoint(GetInsertBlock(), GetInsertPoint()); - } - - /// \brief Returns the current insert point, clearing it in the process. - InsertPoint saveAndClearIP() { - InsertPoint IP(GetInsertBlock(), GetInsertPoint()); - ClearInsertionPoint(); - return IP; - } - - /// \brief Sets the current insert point to a previously-saved location. - void restoreIP(InsertPoint IP) { - if (IP.isSet()) - SetInsertPoint(IP.getBlock(), IP.getPoint()); - else - ClearInsertionPoint(); - } - - /// \brief Get the floating point math metadata being used. - MDNode *getDefaultFPMathTag() const { return DefaultFPMathTag; } - - /// \brief Get the flags to be applied to created floating point ops - FastMathFlags getFastMathFlags() const { return FMF; } - - /// \brief Clear the fast-math flags. - void clearFastMathFlags() { FMF.clear(); } - - /// \brief Set the floating point math metadata to be used. - void setDefaultFPMathTag(MDNode *FPMathTag) { DefaultFPMathTag = FPMathTag; } - - /// \brief Set the fast-math flags to be used with generated fp-math operators - void setFastMathFlags(FastMathFlags NewFMF) { FMF = NewFMF; } - - //===--------------------------------------------------------------------===// - // RAII helpers. - //===--------------------------------------------------------------------===// - - // \brief RAII object that stores the current insertion point and restores it - // when the object is destroyed. This includes the debug location. - class InsertPointGuard { - IRBuilderBase &Builder; - AssertingVH Block; - BasicBlock::iterator Point; - DebugLoc DbgLoc; - - InsertPointGuard(const InsertPointGuard &) = delete; - InsertPointGuard &operator=(const InsertPointGuard &) = delete; - - public: - InsertPointGuard(IRBuilderBase &B) - : Builder(B), Block(B.GetInsertBlock()), Point(B.GetInsertPoint()), - DbgLoc(B.getCurrentDebugLocation()) {} - - ~InsertPointGuard() { - Builder.restoreIP(InsertPoint(Block, Point)); - Builder.SetCurrentDebugLocation(DbgLoc); - } - }; - - // \brief RAII object that stores the current fast math settings and restores - // them when the object is destroyed. - class FastMathFlagGuard { - IRBuilderBase &Builder; - FastMathFlags FMF; - MDNode *FPMathTag; - - FastMathFlagGuard(const FastMathFlagGuard &) = delete; - FastMathFlagGuard &operator=( - const FastMathFlagGuard &) = delete; - - public: - FastMathFlagGuard(IRBuilderBase &B) - : Builder(B), FMF(B.FMF), FPMathTag(B.DefaultFPMathTag) {} - - ~FastMathFlagGuard() { - Builder.FMF = FMF; - Builder.DefaultFPMathTag = FPMathTag; - } - }; - - //===--------------------------------------------------------------------===// - // Miscellaneous creation methods. - //===--------------------------------------------------------------------===// - - /// \brief Make a new global variable with initializer type i8* - /// - /// Make a new global variable with an initializer that has array of i8 type - /// filled in with the null terminated string value specified. The new global - /// variable will be marked mergable with any others of the same contents. If - /// Name is specified, it is the name of the global variable created. - GlobalVariable *CreateGlobalString(StringRef Str, const Twine &Name = "", - unsigned AddressSpace = 0); - - /// \brief Get a constant value representing either true or false. - ConstantInt *getInt1(bool V) { - return ConstantInt::get(getInt1Ty(), V); - } - - /// \brief Get the constant value for i1 true. - ConstantInt *getTrue() { - return ConstantInt::getTrue(Context); - } - - /// \brief Get the constant value for i1 false. - ConstantInt *getFalse() { - return ConstantInt::getFalse(Context); - } - - /// \brief Get a constant 8-bit value. - ConstantInt *getInt8(uint8_t C) { - return ConstantInt::get(getInt8Ty(), C); - } - - /// \brief Get a constant 16-bit value. - ConstantInt *getInt16(uint16_t C) { - return ConstantInt::get(getInt16Ty(), C); - } - - /// \brief Get a constant 32-bit value. - ConstantInt *getInt32(uint32_t C) { - return ConstantInt::get(getInt32Ty(), C); - } - - /// \brief Get a constant 64-bit value. - ConstantInt *getInt64(uint64_t C) { - return ConstantInt::get(getInt64Ty(), C); - } - - /// \brief Get a constant N-bit value, zero extended or truncated from - /// a 64-bit value. - ConstantInt *getIntN(unsigned N, uint64_t C) { - return ConstantInt::get(getIntNTy(N), C); - } - - /// \brief Get a constant integer value. - ConstantInt *getInt(const APInt &AI) { - return ConstantInt::get(Context, AI); - } - - //===--------------------------------------------------------------------===// - // Type creation methods - //===--------------------------------------------------------------------===// - - /// \brief Fetch the type representing a single bit - IntegerType *getInt1Ty() { - return Type::getInt1Ty(Context); - } - - /// \brief Fetch the type representing an 8-bit integer. - IntegerType *getInt8Ty() { - return Type::getInt8Ty(Context); - } - - /// \brief Fetch the type representing a 16-bit integer. - IntegerType *getInt16Ty() { - return Type::getInt16Ty(Context); - } - - /// \brief Fetch the type representing a 32-bit integer. - IntegerType *getInt32Ty() { - return Type::getInt32Ty(Context); - } - - /// \brief Fetch the type representing a 64-bit integer. - IntegerType *getInt64Ty() { - return Type::getInt64Ty(Context); - } - - /// \brief Fetch the type representing a 128-bit integer. - IntegerType *getInt128Ty() { return Type::getInt128Ty(Context); } - - /// \brief Fetch the type representing an N-bit integer. - IntegerType *getIntNTy(unsigned N) { - return Type::getIntNTy(Context, N); - } - - /// \brief Fetch the type representing a 16-bit floating point value. - Type *getHalfTy() { - return Type::getHalfTy(Context); - } - - /// \brief Fetch the type representing a 32-bit floating point value. - Type *getFloatTy() { - return Type::getFloatTy(Context); - } - - /// \brief Fetch the type representing a 64-bit floating point value. - Type *getDoubleTy() { - return Type::getDoubleTy(Context); - } - - /// \brief Fetch the type representing void. - Type *getVoidTy() { - return Type::getVoidTy(Context); - } - - /// \brief Fetch the type representing a pointer to an 8-bit integer value. - PointerType *getInt8PtrTy(unsigned AddrSpace = 0) { - return Type::getInt8PtrTy(Context, AddrSpace); - } - - /// \brief Fetch the type representing a pointer to an integer value. - IntegerType *getIntPtrTy(const DataLayout &DL, unsigned AddrSpace = 0) { - return DL.getIntPtrType(Context, AddrSpace); - } - - //===--------------------------------------------------------------------===// - // Intrinsic creation methods - //===--------------------------------------------------------------------===// - - /// \brief Create and insert a memset to the specified pointer and the - /// specified value. - /// - /// If the pointer isn't an i8*, it will be converted. If a TBAA tag is - /// specified, it will be added to the instruction. Likewise with alias.scope - /// and noalias tags. - CallInst *CreateMemSet(Value *Ptr, Value *Val, uint64_t Size, unsigned Align, - bool isVolatile = false, MDNode *TBAATag = nullptr, - MDNode *ScopeTag = nullptr, - MDNode *NoAliasTag = nullptr) { - return CreateMemSet(Ptr, Val, getInt64(Size), Align, isVolatile, - TBAATag, ScopeTag, NoAliasTag); - } - - CallInst *CreateMemSet(Value *Ptr, Value *Val, Value *Size, unsigned Align, - bool isVolatile = false, MDNode *TBAATag = nullptr, - MDNode *ScopeTag = nullptr, - MDNode *NoAliasTag = nullptr); - - /// \brief Create and insert a memcpy between the specified pointers. - /// - /// If the pointers aren't i8*, they will be converted. If a TBAA tag is - /// specified, it will be added to the instruction. Likewise with alias.scope - /// and noalias tags. - CallInst *CreateMemCpy(Value *Dst, Value *Src, uint64_t Size, unsigned Align, - bool isVolatile = false, MDNode *TBAATag = nullptr, - MDNode *TBAAStructTag = nullptr, - MDNode *ScopeTag = nullptr, - MDNode *NoAliasTag = nullptr) { - return CreateMemCpy(Dst, Src, getInt64(Size), Align, isVolatile, TBAATag, - TBAAStructTag, ScopeTag, NoAliasTag); - } - - CallInst *CreateMemCpy(Value *Dst, Value *Src, Value *Size, unsigned Align, - bool isVolatile = false, MDNode *TBAATag = nullptr, - MDNode *TBAAStructTag = nullptr, - MDNode *ScopeTag = nullptr, - MDNode *NoAliasTag = nullptr); - - /// \brief Create and insert a memmove between the specified - /// pointers. - /// - /// If the pointers aren't i8*, they will be converted. If a TBAA tag is - /// specified, it will be added to the instruction. Likewise with alias.scope - /// and noalias tags. - CallInst *CreateMemMove(Value *Dst, Value *Src, uint64_t Size, unsigned Align, - bool isVolatile = false, MDNode *TBAATag = nullptr, - MDNode *ScopeTag = nullptr, - MDNode *NoAliasTag = nullptr) { - return CreateMemMove(Dst, Src, getInt64(Size), Align, isVolatile, - TBAATag, ScopeTag, NoAliasTag); - } - - CallInst *CreateMemMove(Value *Dst, Value *Src, Value *Size, unsigned Align, - bool isVolatile = false, MDNode *TBAATag = nullptr, - MDNode *ScopeTag = nullptr, - MDNode *NoAliasTag = nullptr); - - /// \brief Create a lifetime.start intrinsic. - /// - /// If the pointer isn't i8* it will be converted. - CallInst *CreateLifetimeStart(Value *Ptr, ConstantInt *Size = nullptr); - - /// \brief Create a lifetime.end intrinsic. - /// - /// If the pointer isn't i8* it will be converted. - CallInst *CreateLifetimeEnd(Value *Ptr, ConstantInt *Size = nullptr); - - /// \brief Create a call to Masked Load intrinsic - CallInst *CreateMaskedLoad(Value *Ptr, unsigned Align, Value *Mask, - Value *PassThru = nullptr, const Twine &Name = ""); - - /// \brief Create a call to Masked Store intrinsic - CallInst *CreateMaskedStore(Value *Val, Value *Ptr, unsigned Align, - Value *Mask); - - /// \brief Create a call to Masked Gather intrinsic - CallInst *CreateMaskedGather(Value *Ptrs, unsigned Align, - Value *Mask = nullptr, - Value *PassThru = nullptr, - const Twine& Name = ""); - - /// \brief Create a call to Masked Scatter intrinsic - CallInst *CreateMaskedScatter(Value *Val, Value *Ptrs, unsigned Align, - Value *Mask = nullptr); - - /// \brief Create an assume intrinsic call that allows the optimizer to - /// assume that the provided condition will be true. - CallInst *CreateAssumption(Value *Cond); - - /// \brief Create a call to the experimental.gc.statepoint intrinsic to - /// start a new statepoint sequence. - CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes, - Value *ActualCallee, - ArrayRef CallArgs, - ArrayRef DeoptArgs, - ArrayRef GCArgs, - const Twine &Name = ""); - - /// \brief Create a call to the experimental.gc.statepoint intrinsic to - /// start a new statepoint sequence. - CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes, - Value *ActualCallee, uint32_t Flags, - ArrayRef CallArgs, - ArrayRef TransitionArgs, - ArrayRef DeoptArgs, - ArrayRef GCArgs, - const Twine &Name = ""); - - // \brief Conveninence function for the common case when CallArgs are filled - // in using makeArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be - // .get()'ed to get the Value pointer. - CallInst *CreateGCStatepointCall(uint64_t ID, uint32_t NumPatchBytes, - Value *ActualCallee, ArrayRef CallArgs, - ArrayRef DeoptArgs, - ArrayRef GCArgs, - const Twine &Name = ""); - - /// brief Create an invoke to the experimental.gc.statepoint intrinsic to - /// start a new statepoint sequence. - InvokeInst * - CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes, - Value *ActualInvokee, BasicBlock *NormalDest, - BasicBlock *UnwindDest, ArrayRef InvokeArgs, - ArrayRef DeoptArgs, - ArrayRef GCArgs, const Twine &Name = ""); - - /// brief Create an invoke to the experimental.gc.statepoint intrinsic to - /// start a new statepoint sequence. - InvokeInst *CreateGCStatepointInvoke( - uint64_t ID, uint32_t NumPatchBytes, Value *ActualInvokee, - BasicBlock *NormalDest, BasicBlock *UnwindDest, uint32_t Flags, - ArrayRef InvokeArgs, ArrayRef TransitionArgs, - ArrayRef DeoptArgs, ArrayRef GCArgs, - const Twine &Name = ""); - - // Conveninence function for the common case when CallArgs are filled in using - // makeArrayRef(CS.arg_begin(), CS.arg_end()); Use needs to be .get()'ed to - // get the Value *. - InvokeInst * - CreateGCStatepointInvoke(uint64_t ID, uint32_t NumPatchBytes, - Value *ActualInvokee, BasicBlock *NormalDest, - BasicBlock *UnwindDest, ArrayRef InvokeArgs, - ArrayRef DeoptArgs, - ArrayRef GCArgs, const Twine &Name = ""); - - /// \brief Create a call to the experimental.gc.result intrinsic to extract - /// the result from a call wrapped in a statepoint. - CallInst *CreateGCResult(Instruction *Statepoint, - Type *ResultType, - const Twine &Name = ""); - - /// \brief Create a call to the experimental.gc.relocate intrinsics to - /// project the relocated value of one pointer from the statepoint. - CallInst *CreateGCRelocate(Instruction *Statepoint, - int BaseOffset, - int DerivedOffset, - Type *ResultType, - const Twine &Name = ""); - -private: - /// \brief Create a call to a masked intrinsic with given Id. - CallInst *CreateMaskedIntrinsic(Intrinsic::ID Id, ArrayRef Ops, - ArrayRef OverloadedTypes, - const Twine &Name = ""); - - Value *getCastedInt8PtrValue(Value *Ptr); -}; - -/// \brief This provides a uniform API for creating instructions and inserting -/// them into a basic block: either at the end of a BasicBlock, or at a specific -/// iterator location in a block. -/// -/// Note that the builder does not expose the full generality of LLVM -/// instructions. For access to extra instruction properties, use the mutators -/// (e.g. setVolatile) on the instructions after they have been -/// created. Convenience state exists to specify fast-math flags and fp-math -/// tags. -/// -/// The first template argument specifies a class to use for creating constants. -/// This defaults to creating minimally folded constants. The second template -/// argument allows clients to specify custom insertion hooks that are called on -/// every newly created insertion. -template -class IRBuilder : public IRBuilderBase, public Inserter { - T Folder; - -public: - IRBuilder(LLVMContext &C, const T &F, Inserter I = Inserter(), - MDNode *FPMathTag = nullptr, - ArrayRef OpBundles = None) - : IRBuilderBase(C, FPMathTag, OpBundles), Inserter(std::move(I)), - Folder(F) {} - - explicit IRBuilder(LLVMContext &C, MDNode *FPMathTag = nullptr, - ArrayRef OpBundles = None) - : IRBuilderBase(C, FPMathTag, OpBundles), Folder() {} - - explicit IRBuilder(BasicBlock *TheBB, const T &F, MDNode *FPMathTag = nullptr, - ArrayRef OpBundles = None) - : IRBuilderBase(TheBB->getContext(), FPMathTag, OpBundles), Folder(F) { - SetInsertPoint(TheBB); - } - - explicit IRBuilder(BasicBlock *TheBB, MDNode *FPMathTag = nullptr, - ArrayRef OpBundles = None) - : IRBuilderBase(TheBB->getContext(), FPMathTag, OpBundles), Folder() { - SetInsertPoint(TheBB); - } - - explicit IRBuilder(Instruction *IP, MDNode *FPMathTag = nullptr, - ArrayRef OpBundles = None) - : IRBuilderBase(IP->getContext(), FPMathTag, OpBundles), Folder() { - SetInsertPoint(IP); - } - - IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP, const T &F, - MDNode *FPMathTag = nullptr, - ArrayRef OpBundles = None) - : IRBuilderBase(TheBB->getContext(), FPMathTag, OpBundles), Folder(F) { - SetInsertPoint(TheBB, IP); - } - - IRBuilder(BasicBlock *TheBB, BasicBlock::iterator IP, - MDNode *FPMathTag = nullptr, - ArrayRef OpBundles = None) - : IRBuilderBase(TheBB->getContext(), FPMathTag, OpBundles), Folder() { - SetInsertPoint(TheBB, IP); - } - - /// \brief Get the constant folder being used. - const T &getFolder() { return Folder; } - - /// \brief Insert and return the specified instruction. - template - InstTy *Insert(InstTy *I, const Twine &Name = "") const { - this->InsertHelper(I, Name, BB, InsertPt); - this->SetInstDebugLocation(I); - return I; - } - - /// \brief No-op overload to handle constants. - Constant *Insert(Constant *C, const Twine& = "") const { - return C; - } - - //===--------------------------------------------------------------------===// - // Instruction creation methods: Terminators - //===--------------------------------------------------------------------===// - -private: - /// \brief Helper to add branch weight and unpredictable metadata onto an - /// instruction. - /// \returns The annotated instruction. - template - InstTy *addBranchMetadata(InstTy *I, MDNode *Weights, MDNode *Unpredictable) { - if (Weights) - I->setMetadata(LLVMContext::MD_prof, Weights); - if (Unpredictable) - I->setMetadata(LLVMContext::MD_unpredictable, Unpredictable); - return I; - } - -public: - /// \brief Create a 'ret void' instruction. - ReturnInst *CreateRetVoid() { - return Insert(ReturnInst::Create(Context)); - } - - /// \brief Create a 'ret ' instruction. - ReturnInst *CreateRet(Value *V) { - return Insert(ReturnInst::Create(Context, V)); - } - - /// \brief Create a sequence of N insertvalue instructions, - /// with one Value from the retVals array each, that build a aggregate - /// return value one value at a time, and a ret instruction to return - /// the resulting aggregate value. - /// - /// This is a convenience function for code that uses aggregate return values - /// as a vehicle for having multiple return values. - ReturnInst *CreateAggregateRet(Value *const *retVals, unsigned N) { - Value *V = UndefValue::get(getCurrentFunctionReturnType()); - for (unsigned i = 0; i != N; ++i) - V = CreateInsertValue(V, retVals[i], i, "mrv"); - return Insert(ReturnInst::Create(Context, V)); - } - - /// \brief Create an unconditional 'br label X' instruction. - BranchInst *CreateBr(BasicBlock *Dest) { - return Insert(BranchInst::Create(Dest)); - } - - /// \brief Create a conditional 'br Cond, TrueDest, FalseDest' - /// instruction. - BranchInst *CreateCondBr(Value *Cond, BasicBlock *True, BasicBlock *False, - MDNode *BranchWeights = nullptr, - MDNode *Unpredictable = nullptr) { - return Insert(addBranchMetadata(BranchInst::Create(True, False, Cond), - BranchWeights, Unpredictable)); - } - - /// \brief Create a switch instruction with the specified value, default dest, - /// and with a hint for the number of cases that will be added (for efficient - /// allocation). - SwitchInst *CreateSwitch(Value *V, BasicBlock *Dest, unsigned NumCases = 10, - MDNode *BranchWeights = nullptr, - MDNode *Unpredictable = nullptr) { - return Insert(addBranchMetadata(SwitchInst::Create(V, Dest, NumCases), - BranchWeights, Unpredictable)); - } - - /// \brief Create an indirect branch instruction with the specified address - /// operand, with an optional hint for the number of destinations that will be - /// added (for efficient allocation). - IndirectBrInst *CreateIndirectBr(Value *Addr, unsigned NumDests = 10) { - return Insert(IndirectBrInst::Create(Addr, NumDests)); - } - - /// \brief Create an invoke instruction. - InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest, - BasicBlock *UnwindDest, - ArrayRef Args = None, - const Twine &Name = "") { - return Insert(InvokeInst::Create(Callee, NormalDest, UnwindDest, Args), - Name); - } - InvokeInst *CreateInvoke(Value *Callee, BasicBlock *NormalDest, - BasicBlock *UnwindDest, ArrayRef Args, - ArrayRef OpBundles, - const Twine &Name = "") { - return Insert(InvokeInst::Create(Callee, NormalDest, UnwindDest, Args, - OpBundles), Name); - } - - ResumeInst *CreateResume(Value *Exn) { - return Insert(ResumeInst::Create(Exn)); - } - - CleanupReturnInst *CreateCleanupRet(CleanupPadInst *CleanupPad, - BasicBlock *UnwindBB = nullptr) { - return Insert(CleanupReturnInst::Create(CleanupPad, UnwindBB)); - } - - CatchSwitchInst *CreateCatchSwitch(Value *ParentPad, BasicBlock *UnwindBB, - unsigned NumHandlers, - const Twine &Name = "") { - return Insert(CatchSwitchInst::Create(ParentPad, UnwindBB, NumHandlers), - Name); - } - - CatchPadInst *CreateCatchPad(Value *ParentPad, ArrayRef Args, - const Twine &Name = "") { - return Insert(CatchPadInst::Create(ParentPad, Args), Name); - } - - CleanupPadInst *CreateCleanupPad(Value *ParentPad, - ArrayRef Args = None, - const Twine &Name = "") { - return Insert(CleanupPadInst::Create(ParentPad, Args), Name); - } - - CatchReturnInst *CreateCatchRet(CatchPadInst *CatchPad, BasicBlock *BB) { - return Insert(CatchReturnInst::Create(CatchPad, BB)); - } - - UnreachableInst *CreateUnreachable() { - return Insert(new UnreachableInst(Context)); - } - - //===--------------------------------------------------------------------===// - // Instruction creation methods: Binary Operators - //===--------------------------------------------------------------------===// -private: - BinaryOperator *CreateInsertNUWNSWBinOp(BinaryOperator::BinaryOps Opc, - Value *LHS, Value *RHS, - const Twine &Name, - bool HasNUW, bool HasNSW) { - BinaryOperator *BO = Insert(BinaryOperator::Create(Opc, LHS, RHS), Name); - if (HasNUW) BO->setHasNoUnsignedWrap(); - if (HasNSW) BO->setHasNoSignedWrap(); - return BO; - } - - Instruction *AddFPMathAttributes(Instruction *I, - MDNode *FPMathTag, - FastMathFlags FMF) const { - if (!FPMathTag) - FPMathTag = DefaultFPMathTag; - if (FPMathTag) - I->setMetadata(LLVMContext::MD_fpmath, FPMathTag); - I->setFastMathFlags(FMF); - return I; - } - -public: - Value *CreateAdd(Value *LHS, Value *RHS, const Twine &Name = "", - bool HasNUW = false, bool HasNSW = false) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateAdd(LC, RC, HasNUW, HasNSW), Name); - return CreateInsertNUWNSWBinOp(Instruction::Add, LHS, RHS, Name, - HasNUW, HasNSW); - } - Value *CreateNSWAdd(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateAdd(LHS, RHS, Name, false, true); - } - Value *CreateNUWAdd(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateAdd(LHS, RHS, Name, true, false); - } - Value *CreateFAdd(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateFAdd(LC, RC), Name); - return Insert(AddFPMathAttributes(BinaryOperator::CreateFAdd(LHS, RHS), - FPMathTag, FMF), Name); - } - Value *CreateSub(Value *LHS, Value *RHS, const Twine &Name = "", - bool HasNUW = false, bool HasNSW = false) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateSub(LC, RC, HasNUW, HasNSW), Name); - return CreateInsertNUWNSWBinOp(Instruction::Sub, LHS, RHS, Name, - HasNUW, HasNSW); - } - Value *CreateNSWSub(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateSub(LHS, RHS, Name, false, true); - } - Value *CreateNUWSub(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateSub(LHS, RHS, Name, true, false); - } - Value *CreateFSub(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateFSub(LC, RC), Name); - return Insert(AddFPMathAttributes(BinaryOperator::CreateFSub(LHS, RHS), - FPMathTag, FMF), Name); - } - Value *CreateMul(Value *LHS, Value *RHS, const Twine &Name = "", - bool HasNUW = false, bool HasNSW = false) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateMul(LC, RC, HasNUW, HasNSW), Name); - return CreateInsertNUWNSWBinOp(Instruction::Mul, LHS, RHS, Name, - HasNUW, HasNSW); - } - Value *CreateNSWMul(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateMul(LHS, RHS, Name, false, true); - } - Value *CreateNUWMul(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateMul(LHS, RHS, Name, true, false); - } - Value *CreateFMul(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateFMul(LC, RC), Name); - return Insert(AddFPMathAttributes(BinaryOperator::CreateFMul(LHS, RHS), - FPMathTag, FMF), Name); - } - Value *CreateUDiv(Value *LHS, Value *RHS, const Twine &Name = "", - bool isExact = false) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateUDiv(LC, RC, isExact), Name); - if (!isExact) - return Insert(BinaryOperator::CreateUDiv(LHS, RHS), Name); - return Insert(BinaryOperator::CreateExactUDiv(LHS, RHS), Name); - } - Value *CreateExactUDiv(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateUDiv(LHS, RHS, Name, true); - } - Value *CreateSDiv(Value *LHS, Value *RHS, const Twine &Name = "", - bool isExact = false) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateSDiv(LC, RC, isExact), Name); - if (!isExact) - return Insert(BinaryOperator::CreateSDiv(LHS, RHS), Name); - return Insert(BinaryOperator::CreateExactSDiv(LHS, RHS), Name); - } - Value *CreateExactSDiv(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateSDiv(LHS, RHS, Name, true); - } - Value *CreateFDiv(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateFDiv(LC, RC), Name); - return Insert(AddFPMathAttributes(BinaryOperator::CreateFDiv(LHS, RHS), - FPMathTag, FMF), Name); - } - Value *CreateURem(Value *LHS, Value *RHS, const Twine &Name = "") { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateURem(LC, RC), Name); - return Insert(BinaryOperator::CreateURem(LHS, RHS), Name); - } - Value *CreateSRem(Value *LHS, Value *RHS, const Twine &Name = "") { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateSRem(LC, RC), Name); - return Insert(BinaryOperator::CreateSRem(LHS, RHS), Name); - } - Value *CreateFRem(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateFRem(LC, RC), Name); - return Insert(AddFPMathAttributes(BinaryOperator::CreateFRem(LHS, RHS), - FPMathTag, FMF), Name); - } - - Value *CreateShl(Value *LHS, Value *RHS, const Twine &Name = "", - bool HasNUW = false, bool HasNSW = false) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateShl(LC, RC, HasNUW, HasNSW), Name); - return CreateInsertNUWNSWBinOp(Instruction::Shl, LHS, RHS, Name, - HasNUW, HasNSW); - } - Value *CreateShl(Value *LHS, const APInt &RHS, const Twine &Name = "", - bool HasNUW = false, bool HasNSW = false) { - return CreateShl(LHS, ConstantInt::get(LHS->getType(), RHS), Name, - HasNUW, HasNSW); - } - Value *CreateShl(Value *LHS, uint64_t RHS, const Twine &Name = "", - bool HasNUW = false, bool HasNSW = false) { - return CreateShl(LHS, ConstantInt::get(LHS->getType(), RHS), Name, - HasNUW, HasNSW); - } - - Value *CreateLShr(Value *LHS, Value *RHS, const Twine &Name = "", - bool isExact = false) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateLShr(LC, RC, isExact), Name); - if (!isExact) - return Insert(BinaryOperator::CreateLShr(LHS, RHS), Name); - return Insert(BinaryOperator::CreateExactLShr(LHS, RHS), Name); - } - Value *CreateLShr(Value *LHS, const APInt &RHS, const Twine &Name = "", - bool isExact = false) { - return CreateLShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact); - } - Value *CreateLShr(Value *LHS, uint64_t RHS, const Twine &Name = "", - bool isExact = false) { - return CreateLShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact); - } - - Value *CreateAShr(Value *LHS, Value *RHS, const Twine &Name = "", - bool isExact = false) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateAShr(LC, RC, isExact), Name); - if (!isExact) - return Insert(BinaryOperator::CreateAShr(LHS, RHS), Name); - return Insert(BinaryOperator::CreateExactAShr(LHS, RHS), Name); - } - Value *CreateAShr(Value *LHS, const APInt &RHS, const Twine &Name = "", - bool isExact = false) { - return CreateAShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact); - } - Value *CreateAShr(Value *LHS, uint64_t RHS, const Twine &Name = "", - bool isExact = false) { - return CreateAShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact); - } - - Value *CreateAnd(Value *LHS, Value *RHS, const Twine &Name = "") { - if (Constant *RC = dyn_cast(RHS)) { - if (isa(RC) && cast(RC)->isAllOnesValue()) - return LHS; // LHS & -1 -> LHS - if (Constant *LC = dyn_cast(LHS)) - return Insert(Folder.CreateAnd(LC, RC), Name); - } - return Insert(BinaryOperator::CreateAnd(LHS, RHS), Name); - } - Value *CreateAnd(Value *LHS, const APInt &RHS, const Twine &Name = "") { - return CreateAnd(LHS, ConstantInt::get(LHS->getType(), RHS), Name); - } - Value *CreateAnd(Value *LHS, uint64_t RHS, const Twine &Name = "") { - return CreateAnd(LHS, ConstantInt::get(LHS->getType(), RHS), Name); - } - - Value *CreateOr(Value *LHS, Value *RHS, const Twine &Name = "") { - if (Constant *RC = dyn_cast(RHS)) { - if (RC->isNullValue()) - return LHS; // LHS | 0 -> LHS - if (Constant *LC = dyn_cast(LHS)) - return Insert(Folder.CreateOr(LC, RC), Name); - } - return Insert(BinaryOperator::CreateOr(LHS, RHS), Name); - } - Value *CreateOr(Value *LHS, const APInt &RHS, const Twine &Name = "") { - return CreateOr(LHS, ConstantInt::get(LHS->getType(), RHS), Name); - } - Value *CreateOr(Value *LHS, uint64_t RHS, const Twine &Name = "") { - return CreateOr(LHS, ConstantInt::get(LHS->getType(), RHS), Name); - } - - Value *CreateXor(Value *LHS, Value *RHS, const Twine &Name = "") { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateXor(LC, RC), Name); - return Insert(BinaryOperator::CreateXor(LHS, RHS), Name); - } - Value *CreateXor(Value *LHS, const APInt &RHS, const Twine &Name = "") { - return CreateXor(LHS, ConstantInt::get(LHS->getType(), RHS), Name); - } - Value *CreateXor(Value *LHS, uint64_t RHS, const Twine &Name = "") { - return CreateXor(LHS, ConstantInt::get(LHS->getType(), RHS), Name); - } - - Value *CreateBinOp(Instruction::BinaryOps Opc, - Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateBinOp(Opc, LC, RC), Name); - llvm::Instruction *BinOp = BinaryOperator::Create(Opc, LHS, RHS); - if (isa(BinOp)) - BinOp = AddFPMathAttributes(BinOp, FPMathTag, FMF); - return Insert(BinOp, Name); - } - - Value *CreateNeg(Value *V, const Twine &Name = "", - bool HasNUW = false, bool HasNSW = false) { - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateNeg(VC, HasNUW, HasNSW), Name); - BinaryOperator *BO = Insert(BinaryOperator::CreateNeg(V), Name); - if (HasNUW) BO->setHasNoUnsignedWrap(); - if (HasNSW) BO->setHasNoSignedWrap(); - return BO; - } - Value *CreateNSWNeg(Value *V, const Twine &Name = "") { - return CreateNeg(V, Name, false, true); - } - Value *CreateNUWNeg(Value *V, const Twine &Name = "") { - return CreateNeg(V, Name, true, false); - } - Value *CreateFNeg(Value *V, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateFNeg(VC), Name); - return Insert(AddFPMathAttributes(BinaryOperator::CreateFNeg(V), - FPMathTag, FMF), Name); - } - Value *CreateNot(Value *V, const Twine &Name = "") { - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateNot(VC), Name); - return Insert(BinaryOperator::CreateNot(V), Name); - } - - //===--------------------------------------------------------------------===// - // Instruction creation methods: Memory Instructions - //===--------------------------------------------------------------------===// - - AllocaInst *CreateAlloca(Type *Ty, Value *ArraySize = nullptr, - const Twine &Name = "") { - return Insert(new AllocaInst(Ty, ArraySize), Name); - } - // \brief Provided to resolve 'CreateLoad(Ptr, "...")' correctly, instead of - // converting the string to 'bool' for the isVolatile parameter. - LoadInst *CreateLoad(Value *Ptr, const char *Name) { - return Insert(new LoadInst(Ptr), Name); - } - LoadInst *CreateLoad(Value *Ptr, const Twine &Name = "") { - return Insert(new LoadInst(Ptr), Name); - } - LoadInst *CreateLoad(Type *Ty, Value *Ptr, const Twine &Name = "") { - return Insert(new LoadInst(Ty, Ptr), Name); - } - LoadInst *CreateLoad(Value *Ptr, bool isVolatile, const Twine &Name = "") { - return Insert(new LoadInst(Ptr, nullptr, isVolatile), Name); - } - StoreInst *CreateStore(Value *Val, Value *Ptr, bool isVolatile = false) { - return Insert(new StoreInst(Val, Ptr, isVolatile)); - } - // \brief Provided to resolve 'CreateAlignedLoad(Ptr, Align, "...")' - // correctly, instead of converting the string to 'bool' for the isVolatile - // parameter. - LoadInst *CreateAlignedLoad(Value *Ptr, unsigned Align, const char *Name) { - LoadInst *LI = CreateLoad(Ptr, Name); - LI->setAlignment(Align); - return LI; - } - LoadInst *CreateAlignedLoad(Value *Ptr, unsigned Align, - const Twine &Name = "") { - LoadInst *LI = CreateLoad(Ptr, Name); - LI->setAlignment(Align); - return LI; - } - LoadInst *CreateAlignedLoad(Value *Ptr, unsigned Align, bool isVolatile, - const Twine &Name = "") { - LoadInst *LI = CreateLoad(Ptr, isVolatile, Name); - LI->setAlignment(Align); - return LI; - } - StoreInst *CreateAlignedStore(Value *Val, Value *Ptr, unsigned Align, - bool isVolatile = false) { - StoreInst *SI = CreateStore(Val, Ptr, isVolatile); - SI->setAlignment(Align); - return SI; - } - FenceInst *CreateFence(AtomicOrdering Ordering, - SynchronizationScope SynchScope = CrossThread, - const Twine &Name = "") { - return Insert(new FenceInst(Context, Ordering, SynchScope), Name); - } - AtomicCmpXchgInst * - CreateAtomicCmpXchg(Value *Ptr, Value *Cmp, Value *New, - AtomicOrdering SuccessOrdering, - AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope = CrossThread) { - return Insert(new AtomicCmpXchgInst(Ptr, Cmp, New, SuccessOrdering, - FailureOrdering, SynchScope)); - } - AtomicRMWInst *CreateAtomicRMW(AtomicRMWInst::BinOp Op, Value *Ptr, Value *Val, - AtomicOrdering Ordering, - SynchronizationScope SynchScope = CrossThread) { - return Insert(new AtomicRMWInst(Op, Ptr, Val, Ordering, SynchScope)); - } - Value *CreateGEP(Value *Ptr, ArrayRef IdxList, - const Twine &Name = "") { - return CreateGEP(nullptr, Ptr, IdxList, Name); - } - Value *CreateGEP(Type *Ty, Value *Ptr, ArrayRef IdxList, - const Twine &Name = "") { - if (Constant *PC = dyn_cast(Ptr)) { - // Every index must be constant. - size_t i, e; - for (i = 0, e = IdxList.size(); i != e; ++i) - if (!isa(IdxList[i])) - break; - if (i == e) - return Insert(Folder.CreateGetElementPtr(Ty, PC, IdxList), Name); - } - return Insert(GetElementPtrInst::Create(Ty, Ptr, IdxList), Name); - } - Value *CreateInBoundsGEP(Value *Ptr, ArrayRef IdxList, - const Twine &Name = "") { - return CreateInBoundsGEP(nullptr, Ptr, IdxList, Name); - } - Value *CreateInBoundsGEP(Type *Ty, Value *Ptr, ArrayRef IdxList, - const Twine &Name = "") { - if (Constant *PC = dyn_cast(Ptr)) { - // Every index must be constant. - size_t i, e; - for (i = 0, e = IdxList.size(); i != e; ++i) - if (!isa(IdxList[i])) - break; - if (i == e) - return Insert(Folder.CreateInBoundsGetElementPtr(Ty, PC, IdxList), - Name); - } - return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, IdxList), Name); - } - Value *CreateGEP(Value *Ptr, Value *Idx, const Twine &Name = "") { - return CreateGEP(nullptr, Ptr, Idx, Name); - } - Value *CreateGEP(Type *Ty, Value *Ptr, Value *Idx, const Twine &Name = "") { - if (Constant *PC = dyn_cast(Ptr)) - if (Constant *IC = dyn_cast(Idx)) - return Insert(Folder.CreateGetElementPtr(Ty, PC, IC), Name); - return Insert(GetElementPtrInst::Create(Ty, Ptr, Idx), Name); - } - Value *CreateInBoundsGEP(Type *Ty, Value *Ptr, Value *Idx, - const Twine &Name = "") { - if (Constant *PC = dyn_cast(Ptr)) - if (Constant *IC = dyn_cast(Idx)) - return Insert(Folder.CreateInBoundsGetElementPtr(Ty, PC, IC), Name); - return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name); - } - Value *CreateConstGEP1_32(Value *Ptr, unsigned Idx0, const Twine &Name = "") { - return CreateConstGEP1_32(nullptr, Ptr, Idx0, Name); - } - Value *CreateConstGEP1_32(Type *Ty, Value *Ptr, unsigned Idx0, - const Twine &Name = "") { - Value *Idx = ConstantInt::get(Type::getInt32Ty(Context), Idx0); - - if (Constant *PC = dyn_cast(Ptr)) - return Insert(Folder.CreateGetElementPtr(Ty, PC, Idx), Name); - - return Insert(GetElementPtrInst::Create(Ty, Ptr, Idx), Name); - } - Value *CreateConstInBoundsGEP1_32(Type *Ty, Value *Ptr, unsigned Idx0, - const Twine &Name = "") { - Value *Idx = ConstantInt::get(Type::getInt32Ty(Context), Idx0); - - if (Constant *PC = dyn_cast(Ptr)) - return Insert(Folder.CreateInBoundsGetElementPtr(Ty, PC, Idx), Name); - - return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idx), Name); - } - Value *CreateConstGEP2_32(Type *Ty, Value *Ptr, unsigned Idx0, unsigned Idx1, - const Twine &Name = "") { - Value *Idxs[] = { - ConstantInt::get(Type::getInt32Ty(Context), Idx0), - ConstantInt::get(Type::getInt32Ty(Context), Idx1) - }; - - if (Constant *PC = dyn_cast(Ptr)) - return Insert(Folder.CreateGetElementPtr(Ty, PC, Idxs), Name); - - return Insert(GetElementPtrInst::Create(Ty, Ptr, Idxs), Name); - } - Value *CreateConstInBoundsGEP2_32(Type *Ty, Value *Ptr, unsigned Idx0, - unsigned Idx1, const Twine &Name = "") { - Value *Idxs[] = { - ConstantInt::get(Type::getInt32Ty(Context), Idx0), - ConstantInt::get(Type::getInt32Ty(Context), Idx1) - }; - - if (Constant *PC = dyn_cast(Ptr)) - return Insert(Folder.CreateInBoundsGetElementPtr(Ty, PC, Idxs), Name); - - return Insert(GetElementPtrInst::CreateInBounds(Ty, Ptr, Idxs), Name); - } - Value *CreateConstGEP1_64(Value *Ptr, uint64_t Idx0, const Twine &Name = "") { - Value *Idx = ConstantInt::get(Type::getInt64Ty(Context), Idx0); - - if (Constant *PC = dyn_cast(Ptr)) - return Insert(Folder.CreateGetElementPtr(nullptr, PC, Idx), Name); - - return Insert(GetElementPtrInst::Create(nullptr, Ptr, Idx), Name); - } - Value *CreateConstInBoundsGEP1_64(Value *Ptr, uint64_t Idx0, - const Twine &Name = "") { - Value *Idx = ConstantInt::get(Type::getInt64Ty(Context), Idx0); - - if (Constant *PC = dyn_cast(Ptr)) - return Insert(Folder.CreateInBoundsGetElementPtr(nullptr, PC, Idx), Name); - - return Insert(GetElementPtrInst::CreateInBounds(nullptr, Ptr, Idx), Name); - } - Value *CreateConstGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1, - const Twine &Name = "") { - Value *Idxs[] = { - ConstantInt::get(Type::getInt64Ty(Context), Idx0), - ConstantInt::get(Type::getInt64Ty(Context), Idx1) - }; - - if (Constant *PC = dyn_cast(Ptr)) - return Insert(Folder.CreateGetElementPtr(nullptr, PC, Idxs), Name); - - return Insert(GetElementPtrInst::Create(nullptr, Ptr, Idxs), Name); - } - Value *CreateConstInBoundsGEP2_64(Value *Ptr, uint64_t Idx0, uint64_t Idx1, - const Twine &Name = "") { - Value *Idxs[] = { - ConstantInt::get(Type::getInt64Ty(Context), Idx0), - ConstantInt::get(Type::getInt64Ty(Context), Idx1) - }; - - if (Constant *PC = dyn_cast(Ptr)) - return Insert(Folder.CreateInBoundsGetElementPtr(nullptr, PC, Idxs), - Name); - - return Insert(GetElementPtrInst::CreateInBounds(nullptr, Ptr, Idxs), Name); - } - Value *CreateStructGEP(Type *Ty, Value *Ptr, unsigned Idx, - const Twine &Name = "") { - return CreateConstInBoundsGEP2_32(Ty, Ptr, 0, Idx, Name); - } - - /// \brief Same as CreateGlobalString, but return a pointer with "i8*" type - /// instead of a pointer to array of i8. - Value *CreateGlobalStringPtr(StringRef Str, const Twine &Name = "", - unsigned AddressSpace = 0) { - GlobalVariable *gv = CreateGlobalString(Str, Name, AddressSpace); - Value *zero = ConstantInt::get(Type::getInt32Ty(Context), 0); - Value *Args[] = { zero, zero }; - return CreateInBoundsGEP(gv->getValueType(), gv, Args, Name); - } - - //===--------------------------------------------------------------------===// - // Instruction creation methods: Cast/Conversion Operators - //===--------------------------------------------------------------------===// - - Value *CreateTrunc(Value *V, Type *DestTy, const Twine &Name = "") { - return CreateCast(Instruction::Trunc, V, DestTy, Name); - } - Value *CreateZExt(Value *V, Type *DestTy, const Twine &Name = "") { - return CreateCast(Instruction::ZExt, V, DestTy, Name); - } - Value *CreateSExt(Value *V, Type *DestTy, const Twine &Name = "") { - return CreateCast(Instruction::SExt, V, DestTy, Name); - } - /// \brief Create a ZExt or Trunc from the integer value V to DestTy. Return - /// the value untouched if the type of V is already DestTy. - Value *CreateZExtOrTrunc(Value *V, Type *DestTy, - const Twine &Name = "") { - assert(V->getType()->isIntOrIntVectorTy() && - DestTy->isIntOrIntVectorTy() && - "Can only zero extend/truncate integers!"); - Type *VTy = V->getType(); - if (VTy->getScalarSizeInBits() < DestTy->getScalarSizeInBits()) - return CreateZExt(V, DestTy, Name); - if (VTy->getScalarSizeInBits() > DestTy->getScalarSizeInBits()) - return CreateTrunc(V, DestTy, Name); - return V; - } - /// \brief Create a SExt or Trunc from the integer value V to DestTy. Return - /// the value untouched if the type of V is already DestTy. - Value *CreateSExtOrTrunc(Value *V, Type *DestTy, - const Twine &Name = "") { - assert(V->getType()->isIntOrIntVectorTy() && - DestTy->isIntOrIntVectorTy() && - "Can only sign extend/truncate integers!"); - Type *VTy = V->getType(); - if (VTy->getScalarSizeInBits() < DestTy->getScalarSizeInBits()) - return CreateSExt(V, DestTy, Name); - if (VTy->getScalarSizeInBits() > DestTy->getScalarSizeInBits()) - return CreateTrunc(V, DestTy, Name); - return V; - } - Value *CreateFPToUI(Value *V, Type *DestTy, const Twine &Name = ""){ - return CreateCast(Instruction::FPToUI, V, DestTy, Name); - } - Value *CreateFPToSI(Value *V, Type *DestTy, const Twine &Name = ""){ - return CreateCast(Instruction::FPToSI, V, DestTy, Name); - } - Value *CreateUIToFP(Value *V, Type *DestTy, const Twine &Name = ""){ - return CreateCast(Instruction::UIToFP, V, DestTy, Name); - } - Value *CreateSIToFP(Value *V, Type *DestTy, const Twine &Name = ""){ - return CreateCast(Instruction::SIToFP, V, DestTy, Name); - } - Value *CreateFPTrunc(Value *V, Type *DestTy, - const Twine &Name = "") { - return CreateCast(Instruction::FPTrunc, V, DestTy, Name); - } - Value *CreateFPExt(Value *V, Type *DestTy, const Twine &Name = "") { - return CreateCast(Instruction::FPExt, V, DestTy, Name); - } - Value *CreatePtrToInt(Value *V, Type *DestTy, - const Twine &Name = "") { - return CreateCast(Instruction::PtrToInt, V, DestTy, Name); - } - Value *CreateIntToPtr(Value *V, Type *DestTy, - const Twine &Name = "") { - return CreateCast(Instruction::IntToPtr, V, DestTy, Name); - } - Value *CreateBitCast(Value *V, Type *DestTy, - const Twine &Name = "") { - return CreateCast(Instruction::BitCast, V, DestTy, Name); - } - Value *CreateAddrSpaceCast(Value *V, Type *DestTy, - const Twine &Name = "") { - return CreateCast(Instruction::AddrSpaceCast, V, DestTy, Name); - } - Value *CreateZExtOrBitCast(Value *V, Type *DestTy, - const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateZExtOrBitCast(VC, DestTy), Name); - return Insert(CastInst::CreateZExtOrBitCast(V, DestTy), Name); - } - Value *CreateSExtOrBitCast(Value *V, Type *DestTy, - const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateSExtOrBitCast(VC, DestTy), Name); - return Insert(CastInst::CreateSExtOrBitCast(V, DestTy), Name); - } - Value *CreateTruncOrBitCast(Value *V, Type *DestTy, - const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateTruncOrBitCast(VC, DestTy), Name); - return Insert(CastInst::CreateTruncOrBitCast(V, DestTy), Name); - } - Value *CreateCast(Instruction::CastOps Op, Value *V, Type *DestTy, - const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateCast(Op, VC, DestTy), Name); - return Insert(CastInst::Create(Op, V, DestTy), Name); - } - Value *CreatePointerCast(Value *V, Type *DestTy, - const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreatePointerCast(VC, DestTy), Name); - return Insert(CastInst::CreatePointerCast(V, DestTy), Name); - } - - Value *CreatePointerBitCastOrAddrSpaceCast(Value *V, Type *DestTy, - const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - - if (Constant *VC = dyn_cast(V)) { - return Insert(Folder.CreatePointerBitCastOrAddrSpaceCast(VC, DestTy), - Name); - } - - return Insert(CastInst::CreatePointerBitCastOrAddrSpaceCast(V, DestTy), - Name); - } - - Value *CreateIntCast(Value *V, Type *DestTy, bool isSigned, - const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateIntCast(VC, DestTy, isSigned), Name); - return Insert(CastInst::CreateIntegerCast(V, DestTy, isSigned), Name); - } - - Value *CreateBitOrPointerCast(Value *V, Type *DestTy, - const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - if (V->getType()->getScalarType()->isPointerTy() && - DestTy->getScalarType()->isIntegerTy()) - return CreatePtrToInt(V, DestTy, Name); - if (V->getType()->getScalarType()->isIntegerTy() && - DestTy->getScalarType()->isPointerTy()) - return CreateIntToPtr(V, DestTy, Name); - - return CreateBitCast(V, DestTy, Name); - } - -private: - // \brief Provided to resolve 'CreateIntCast(Ptr, Ptr, "...")', giving a - // compile time error, instead of converting the string to bool for the - // isSigned parameter. - Value *CreateIntCast(Value *, Type *, const char *) = delete; - -public: - Value *CreateFPCast(Value *V, Type *DestTy, const Twine &Name = "") { - if (V->getType() == DestTy) - return V; - if (Constant *VC = dyn_cast(V)) - return Insert(Folder.CreateFPCast(VC, DestTy), Name); - return Insert(CastInst::CreateFPCast(V, DestTy), Name); - } - - //===--------------------------------------------------------------------===// - // Instruction creation methods: Compare Instructions - //===--------------------------------------------------------------------===// - - Value *CreateICmpEQ(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_EQ, LHS, RHS, Name); - } - Value *CreateICmpNE(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_NE, LHS, RHS, Name); - } - Value *CreateICmpUGT(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_UGT, LHS, RHS, Name); - } - Value *CreateICmpUGE(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_UGE, LHS, RHS, Name); - } - Value *CreateICmpULT(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_ULT, LHS, RHS, Name); - } - Value *CreateICmpULE(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_ULE, LHS, RHS, Name); - } - Value *CreateICmpSGT(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_SGT, LHS, RHS, Name); - } - Value *CreateICmpSGE(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_SGE, LHS, RHS, Name); - } - Value *CreateICmpSLT(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_SLT, LHS, RHS, Name); - } - Value *CreateICmpSLE(Value *LHS, Value *RHS, const Twine &Name = "") { - return CreateICmp(ICmpInst::ICMP_SLE, LHS, RHS, Name); - } - - Value *CreateFCmpOEQ(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_OEQ, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpOGT(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_OGT, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpOGE(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_OGE, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpOLT(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_OLT, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpOLE(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_OLE, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpONE(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_ONE, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpORD(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_ORD, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpUNO(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_UNO, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpUEQ(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_UEQ, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpUGT(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_UGT, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpUGE(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_UGE, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpULT(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_ULT, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpULE(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_ULE, LHS, RHS, Name, FPMathTag); - } - Value *CreateFCmpUNE(Value *LHS, Value *RHS, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - return CreateFCmp(FCmpInst::FCMP_UNE, LHS, RHS, Name, FPMathTag); - } - - Value *CreateICmp(CmpInst::Predicate P, Value *LHS, Value *RHS, - const Twine &Name = "") { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateICmp(P, LC, RC), Name); - return Insert(new ICmpInst(P, LHS, RHS), Name); - } - Value *CreateFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS, - const Twine &Name = "", MDNode *FPMathTag = nullptr) { - if (Constant *LC = dyn_cast(LHS)) - if (Constant *RC = dyn_cast(RHS)) - return Insert(Folder.CreateFCmp(P, LC, RC), Name); - return Insert(AddFPMathAttributes(new FCmpInst(P, LHS, RHS), - FPMathTag, FMF), Name); - } - - //===--------------------------------------------------------------------===// - // Instruction creation methods: Other Instructions - //===--------------------------------------------------------------------===// - - PHINode *CreatePHI(Type *Ty, unsigned NumReservedValues, - const Twine &Name = "") { - return Insert(PHINode::Create(Ty, NumReservedValues), Name); - } - - CallInst *CreateCall(Value *Callee, ArrayRef Args = None, - const Twine &Name = "", MDNode *FPMathTag = nullptr) { - PointerType *PTy = cast(Callee->getType()); - FunctionType *FTy = cast(PTy->getElementType()); - return CreateCall(FTy, Callee, Args, Name, FPMathTag); - } - - CallInst *CreateCall(llvm::FunctionType *FTy, Value *Callee, - ArrayRef Args, const Twine &Name = "", - MDNode *FPMathTag = nullptr) { - CallInst *CI = CallInst::Create(FTy, Callee, Args, DefaultOperandBundles); - if (isa(CI)) - CI = cast(AddFPMathAttributes(CI, FPMathTag, FMF)); - return Insert(CI, Name); - } - - CallInst *CreateCall(Value *Callee, ArrayRef Args, - ArrayRef OpBundles, - const Twine &Name = "", MDNode *FPMathTag = nullptr) { - CallInst *CI = CallInst::Create(Callee, Args, OpBundles); - if (isa(CI)) - CI = cast(AddFPMathAttributes(CI, FPMathTag, FMF)); - return Insert(CI, Name); - } - - CallInst *CreateCall(Function *Callee, ArrayRef Args, - const Twine &Name = "", MDNode *FPMathTag = nullptr) { - return CreateCall(Callee->getFunctionType(), Callee, Args, Name, FPMathTag); - } - - Value *CreateSelect(Value *C, Value *True, Value *False, - const Twine &Name = "", Instruction *MDFrom = nullptr) { - if (Constant *CC = dyn_cast(C)) - if (Constant *TC = dyn_cast(True)) - if (Constant *FC = dyn_cast(False)) - return Insert(Folder.CreateSelect(CC, TC, FC), Name); - - SelectInst *Sel = SelectInst::Create(C, True, False); - if (MDFrom) { - MDNode *Prof = MDFrom->getMetadata(LLVMContext::MD_prof); - MDNode *Unpred = MDFrom->getMetadata(LLVMContext::MD_unpredictable); - Sel = addBranchMetadata(Sel, Prof, Unpred); - } - return Insert(Sel, Name); - } - - VAArgInst *CreateVAArg(Value *List, Type *Ty, const Twine &Name = "") { - return Insert(new VAArgInst(List, Ty), Name); - } - - Value *CreateExtractElement(Value *Vec, Value *Idx, - const Twine &Name = "") { - if (Constant *VC = dyn_cast(Vec)) - if (Constant *IC = dyn_cast(Idx)) - return Insert(Folder.CreateExtractElement(VC, IC), Name); - return Insert(ExtractElementInst::Create(Vec, Idx), Name); - } - - Value *CreateExtractElement(Value *Vec, uint64_t Idx, - const Twine &Name = "") { - return CreateExtractElement(Vec, getInt64(Idx), Name); - } - - Value *CreateInsertElement(Value *Vec, Value *NewElt, Value *Idx, - const Twine &Name = "") { - if (Constant *VC = dyn_cast(Vec)) - if (Constant *NC = dyn_cast(NewElt)) - if (Constant *IC = dyn_cast(Idx)) - return Insert(Folder.CreateInsertElement(VC, NC, IC), Name); - return Insert(InsertElementInst::Create(Vec, NewElt, Idx), Name); - } - - Value *CreateInsertElement(Value *Vec, Value *NewElt, uint64_t Idx, - const Twine &Name = "") { - return CreateInsertElement(Vec, NewElt, getInt64(Idx), Name); - } - - Value *CreateShuffleVector(Value *V1, Value *V2, Value *Mask, - const Twine &Name = "") { - if (Constant *V1C = dyn_cast(V1)) - if (Constant *V2C = dyn_cast(V2)) - if (Constant *MC = dyn_cast(Mask)) - return Insert(Folder.CreateShuffleVector(V1C, V2C, MC), Name); - return Insert(new ShuffleVectorInst(V1, V2, Mask), Name); - } - - Value *CreateShuffleVector(Value *V1, Value *V2, ArrayRef IntMask, - const Twine &Name = "") { - Value *Mask = ConstantDataVector::get(Context, IntMask); - return CreateShuffleVector(V1, V2, Mask, Name); - } - - Value *CreateExtractValue(Value *Agg, - ArrayRef Idxs, - const Twine &Name = "") { - if (Constant *AggC = dyn_cast(Agg)) - return Insert(Folder.CreateExtractValue(AggC, Idxs), Name); - return Insert(ExtractValueInst::Create(Agg, Idxs), Name); - } - - Value *CreateInsertValue(Value *Agg, Value *Val, - ArrayRef Idxs, - const Twine &Name = "") { - if (Constant *AggC = dyn_cast(Agg)) - if (Constant *ValC = dyn_cast(Val)) - return Insert(Folder.CreateInsertValue(AggC, ValC, Idxs), Name); - return Insert(InsertValueInst::Create(Agg, Val, Idxs), Name); - } - - LandingPadInst *CreateLandingPad(Type *Ty, unsigned NumClauses, - const Twine &Name = "") { - return Insert(LandingPadInst::Create(Ty, NumClauses), Name); - } - - //===--------------------------------------------------------------------===// - // Utility creation methods - //===--------------------------------------------------------------------===// - - /// \brief Return an i1 value testing if \p Arg is null. - Value *CreateIsNull(Value *Arg, const Twine &Name = "") { - return CreateICmpEQ(Arg, Constant::getNullValue(Arg->getType()), - Name); - } - - /// \brief Return an i1 value testing if \p Arg is not null. - Value *CreateIsNotNull(Value *Arg, const Twine &Name = "") { - return CreateICmpNE(Arg, Constant::getNullValue(Arg->getType()), - Name); - } - - /// \brief Return the i64 difference between two pointer values, dividing out - /// the size of the pointed-to objects. - /// - /// This is intended to implement C-style pointer subtraction. As such, the - /// pointers must be appropriately aligned for their element types and - /// pointing into the same object. - Value *CreatePtrDiff(Value *LHS, Value *RHS, const Twine &Name = "") { - assert(LHS->getType() == RHS->getType() && - "Pointer subtraction operand types must match!"); - PointerType *ArgType = cast(LHS->getType()); - Value *LHS_int = CreatePtrToInt(LHS, Type::getInt64Ty(Context)); - Value *RHS_int = CreatePtrToInt(RHS, Type::getInt64Ty(Context)); - Value *Difference = CreateSub(LHS_int, RHS_int); - return CreateExactSDiv(Difference, - ConstantExpr::getSizeOf(ArgType->getElementType()), - Name); - } - - /// \brief Create an invariant.group.barrier intrinsic call, that stops - /// optimizer to propagate equality using invariant.group metadata. - /// If Ptr type is different from i8*, it's casted to i8* before call - /// and casted back to Ptr type after call. - Value *CreateInvariantGroupBarrier(Value *Ptr) { - Module *M = BB->getParent()->getParent(); - Function *FnInvariantGroupBarrier = Intrinsic::getDeclaration(M, - Intrinsic::invariant_group_barrier); - - Type *ArgumentAndReturnType = FnInvariantGroupBarrier->getReturnType(); - assert(ArgumentAndReturnType == - FnInvariantGroupBarrier->getFunctionType()->getParamType(0) && - "InvariantGroupBarrier should take and return the same type"); - Type *PtrType = Ptr->getType(); - - bool PtrTypeConversionNeeded = PtrType != ArgumentAndReturnType; - if (PtrTypeConversionNeeded) - Ptr = CreateBitCast(Ptr, ArgumentAndReturnType); - - CallInst *Fn = CreateCall(FnInvariantGroupBarrier, {Ptr}); - - if (PtrTypeConversionNeeded) - return CreateBitCast(Fn, PtrType); - return Fn; - } - - /// \brief Return a vector value that contains \arg V broadcasted to \p - /// NumElts elements. - Value *CreateVectorSplat(unsigned NumElts, Value *V, const Twine &Name = "") { - assert(NumElts > 0 && "Cannot splat to an empty vector!"); - - // First insert it into an undef vector so we can shuffle it. - Type *I32Ty = getInt32Ty(); - Value *Undef = UndefValue::get(VectorType::get(V->getType(), NumElts)); - V = CreateInsertElement(Undef, V, ConstantInt::get(I32Ty, 0), - Name + ".splatinsert"); - - // Shuffle the value across the desired number of elements. - Value *Zeros = ConstantAggregateZero::get(VectorType::get(I32Ty, NumElts)); - return CreateShuffleVector(V, Undef, Zeros, Name + ".splat"); - } - - /// \brief Return a value that has been extracted from a larger integer type. - Value *CreateExtractInteger(const DataLayout &DL, Value *From, - IntegerType *ExtractedTy, uint64_t Offset, - const Twine &Name) { - IntegerType *IntTy = cast(From->getType()); - assert(DL.getTypeStoreSize(ExtractedTy) + Offset <= - DL.getTypeStoreSize(IntTy) && - "Element extends past full value"); - uint64_t ShAmt = 8 * Offset; - Value *V = From; - if (DL.isBigEndian()) - ShAmt = 8 * (DL.getTypeStoreSize(IntTy) - - DL.getTypeStoreSize(ExtractedTy) - Offset); - if (ShAmt) { - V = CreateLShr(V, ShAmt, Name + ".shift"); - } - assert(ExtractedTy->getBitWidth() <= IntTy->getBitWidth() && - "Cannot extract to a larger integer!"); - if (ExtractedTy != IntTy) { - V = CreateTrunc(V, ExtractedTy, Name + ".trunc"); - } - return V; - } - - /// \brief Create an assume intrinsic call that represents an alignment - /// assumption on the provided pointer. - /// - /// An optional offset can be provided, and if it is provided, the offset - /// must be subtracted from the provided pointer to get the pointer with the - /// specified alignment. - CallInst *CreateAlignmentAssumption(const DataLayout &DL, Value *PtrValue, - unsigned Alignment, - Value *OffsetValue = nullptr) { - assert(isa(PtrValue->getType()) && - "trying to create an alignment assumption on a non-pointer?"); - - PointerType *PtrTy = cast(PtrValue->getType()); - Type *IntPtrTy = getIntPtrTy(DL, PtrTy->getAddressSpace()); - Value *PtrIntValue = CreatePtrToInt(PtrValue, IntPtrTy, "ptrint"); - - Value *Mask = ConstantInt::get(IntPtrTy, - Alignment > 0 ? Alignment - 1 : 0); - if (OffsetValue) { - bool IsOffsetZero = false; - if (ConstantInt *CI = dyn_cast(OffsetValue)) - IsOffsetZero = CI->isZero(); - - if (!IsOffsetZero) { - if (OffsetValue->getType() != IntPtrTy) - OffsetValue = CreateIntCast(OffsetValue, IntPtrTy, /*isSigned*/ true, - "offsetcast"); - PtrIntValue = CreateSub(PtrIntValue, OffsetValue, "offsetptr"); - } - } - - Value *Zero = ConstantInt::get(IntPtrTy, 0); - Value *MaskedPtr = CreateAnd(PtrIntValue, Mask, "maskedptr"); - Value *InvCond = CreateICmpEQ(MaskedPtr, Zero, "maskcond"); - - return CreateAssumption(InvCond); - } -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_SIMPLE_CONVERSION_FUNCTIONS(IRBuilder<>, LLVMBuilderRef) - -} // end namespace llvm - -#endif // LLVM_IR_IRBUILDER_H diff --git a/llvm/include/llvm/IR/IRPrintingPasses.h b/llvm/include/llvm/IR/IRPrintingPasses.h deleted file mode 100644 index bc6de19a..00000000 --- a/llvm/include/llvm/IR/IRPrintingPasses.h +++ /dev/null @@ -1,95 +0,0 @@ -//===- IRPrintingPasses.h - Passes to print out IR constructs ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This file defines passes to print out IR in various granularities. The -/// PrintModulePass pass simply prints out the entire module when it is -/// executed. The PrintFunctionPass class is designed to be pipelined with -/// other FunctionPass's, and prints out the functions of the module as they -/// are processed. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_IRPRINTINGPASSES_H -#define LLVM_IR_IRPRINTINGPASSES_H - -#include "llvm/ADT/StringRef.h" -#include - -namespace llvm { -class BasicBlockPass; -class Function; -class FunctionPass; -class Module; -class ModulePass; -class PreservedAnalyses; -class raw_ostream; -template class AnalysisManager; - -/// \brief Create and return a pass that writes the module to the specified -/// \c raw_ostream. -ModulePass *createPrintModulePass(raw_ostream &OS, - const std::string &Banner = "", - bool ShouldPreserveUseListOrder = false); - -/// \brief Create and return a pass that prints functions to the specified -/// \c raw_ostream as they are processed. -FunctionPass *createPrintFunctionPass(raw_ostream &OS, - const std::string &Banner = ""); - -/// \brief Create and return a pass that writes the BB to the specified -/// \c raw_ostream. -BasicBlockPass *createPrintBasicBlockPass(raw_ostream &OS, - const std::string &Banner = ""); - -/// Print out a name of an LLVM value without any prefixes. -/// -/// The name is surrounded with ""'s and escaped if it has any special or -/// non-printable characters in it. -void printLLVMNameWithoutPrefix(raw_ostream &OS, StringRef Name); - -/// \brief Pass for printing a Module as LLVM's text IR assembly. -/// -/// Note: This pass is for use with the new pass manager. Use the create...Pass -/// functions above to create passes for use with the legacy pass manager. -class PrintModulePass { - raw_ostream &OS; - std::string Banner; - bool ShouldPreserveUseListOrder; - -public: - PrintModulePass(); - PrintModulePass(raw_ostream &OS, const std::string &Banner = "", - bool ShouldPreserveUseListOrder = false); - - PreservedAnalyses run(Module &M, AnalysisManager &); - - static StringRef name() { return "PrintModulePass"; } -}; - -/// \brief Pass for printing a Function as LLVM's text IR assembly. -/// -/// Note: This pass is for use with the new pass manager. Use the create...Pass -/// functions above to create passes for use with the legacy pass manager. -class PrintFunctionPass { - raw_ostream &OS; - std::string Banner; - -public: - PrintFunctionPass(); - PrintFunctionPass(raw_ostream &OS, const std::string &Banner = ""); - - PreservedAnalyses run(Function &F, AnalysisManager &); - - static StringRef name() { return "PrintFunctionPass"; } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/InlineAsm.h b/llvm/include/llvm/IR/InlineAsm.h deleted file mode 100644 index 40ba830b..00000000 --- a/llvm/include/llvm/IR/InlineAsm.h +++ /dev/null @@ -1,366 +0,0 @@ -//===-- llvm/InlineAsm.h - Class to represent inline asm strings-*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This class represents the inline asm strings, which are Value*'s that are -// used as the callee operand of call instructions. InlineAsm's are uniqued -// like constants, and created via InlineAsm::get(...). -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_INLINEASM_H -#define LLVM_IR_INLINEASM_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/IR/Value.h" -#include - -namespace llvm { - -class PointerType; -class FunctionType; -class Module; - -struct InlineAsmKeyType; -template class ConstantUniqueMap; - -class InlineAsm : public Value { -public: - enum AsmDialect { - AD_ATT, - AD_Intel - }; - -private: - friend struct InlineAsmKeyType; - friend class ConstantUniqueMap; - - InlineAsm(const InlineAsm &) = delete; - void operator=(const InlineAsm&) = delete; - - std::string AsmString, Constraints; - FunctionType *FTy; - bool HasSideEffects; - bool IsAlignStack; - AsmDialect Dialect; - - InlineAsm(FunctionType *Ty, const std::string &AsmString, - const std::string &Constraints, bool hasSideEffects, - bool isAlignStack, AsmDialect asmDialect); - ~InlineAsm() override; - - /// When the ConstantUniqueMap merges two types and makes two InlineAsms - /// identical, it destroys one of them with this method. - void destroyConstant(); - -public: - /// InlineAsm::get - Return the specified uniqued inline asm string. - /// - static InlineAsm *get(FunctionType *Ty, StringRef AsmString, - StringRef Constraints, bool hasSideEffects, - bool isAlignStack = false, - AsmDialect asmDialect = AD_ATT); - - bool hasSideEffects() const { return HasSideEffects; } - bool isAlignStack() const { return IsAlignStack; } - AsmDialect getDialect() const { return Dialect; } - - /// getType - InlineAsm's are always pointers. - /// - PointerType *getType() const { - return reinterpret_cast(Value::getType()); - } - - /// getFunctionType - InlineAsm's are always pointers to functions. - /// - FunctionType *getFunctionType() const; - - const std::string &getAsmString() const { return AsmString; } - const std::string &getConstraintString() const { return Constraints; } - - /// Verify - This static method can be used by the parser to check to see if - /// the specified constraint string is legal for the type. This returns true - /// if legal, false if not. - /// - static bool Verify(FunctionType *Ty, StringRef Constraints); - - // Constraint String Parsing - enum ConstraintPrefix { - isInput, // 'x' - isOutput, // '=x' - isClobber // '~x' - }; - - typedef std::vector ConstraintCodeVector; - - struct SubConstraintInfo { - /// MatchingInput - If this is not -1, this is an output constraint where an - /// input constraint is required to match it (e.g. "0"). The value is the - /// constraint number that matches this one (for example, if this is - /// constraint #0 and constraint #4 has the value "0", this will be 4). - signed char MatchingInput; - /// Code - The constraint code, either the register name (in braces) or the - /// constraint letter/number. - ConstraintCodeVector Codes; - /// Default constructor. - SubConstraintInfo() : MatchingInput(-1) {} - }; - - typedef std::vector SubConstraintInfoVector; - struct ConstraintInfo; - typedef std::vector ConstraintInfoVector; - - struct ConstraintInfo { - /// Type - The basic type of the constraint: input/output/clobber - /// - ConstraintPrefix Type; - - /// isEarlyClobber - "&": output operand writes result before inputs are all - /// read. This is only ever set for an output operand. - bool isEarlyClobber; - - /// MatchingInput - If this is not -1, this is an output constraint where an - /// input constraint is required to match it (e.g. "0"). The value is the - /// constraint number that matches this one (for example, if this is - /// constraint #0 and constraint #4 has the value "0", this will be 4). - signed char MatchingInput; - - /// hasMatchingInput - Return true if this is an output constraint that has - /// a matching input constraint. - bool hasMatchingInput() const { return MatchingInput != -1; } - - /// isCommutative - This is set to true for a constraint that is commutative - /// with the next operand. - bool isCommutative; - - /// isIndirect - True if this operand is an indirect operand. This means - /// that the address of the source or destination is present in the call - /// instruction, instead of it being returned or passed in explicitly. This - /// is represented with a '*' in the asm string. - bool isIndirect; - - /// Code - The constraint code, either the register name (in braces) or the - /// constraint letter/number. - ConstraintCodeVector Codes; - - /// isMultipleAlternative - '|': has multiple-alternative constraints. - bool isMultipleAlternative; - - /// multipleAlternatives - If there are multiple alternative constraints, - /// this array will contain them. Otherwise it will be empty. - SubConstraintInfoVector multipleAlternatives; - - /// The currently selected alternative constraint index. - unsigned currentAlternativeIndex; - - /// Default constructor. - ConstraintInfo(); - - /// Parse - Analyze the specified string (e.g. "=*&{eax}") and fill in the - /// fields in this structure. If the constraint string is not understood, - /// return true, otherwise return false. - bool Parse(StringRef Str, ConstraintInfoVector &ConstraintsSoFar); - - /// selectAlternative - Point this constraint to the alternative constraint - /// indicated by the index. - void selectAlternative(unsigned index); - }; - - /// ParseConstraints - Split up the constraint string into the specific - /// constraints and their prefixes. If this returns an empty vector, and if - /// the constraint string itself isn't empty, there was an error parsing. - static ConstraintInfoVector ParseConstraints(StringRef ConstraintString); - - /// ParseConstraints - Parse the constraints of this inlineasm object, - /// returning them the same way that ParseConstraints(str) does. - ConstraintInfoVector ParseConstraints() const { - return ParseConstraints(Constraints); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() == Value::InlineAsmVal; - } - - // These are helper methods for dealing with flags in the INLINEASM SDNode - // in the backend. - // - // The encoding of the flag word is currently: - // Bits 2-0 - A Kind_* value indicating the kind of the operand. - // Bits 15-3 - The number of SDNode operands associated with this inline - // assembly operand. - // If bit 31 is set: - // Bit 30-16 - The operand number that this operand must match. - // When bits 2-0 are Kind_Mem, the Constraint_* value must be - // obtained from the flags for this operand number. - // Else if bits 2-0 are Kind_Mem: - // Bit 30-16 - A Constraint_* value indicating the original constraint - // code. - // Else: - // Bit 30-16 - The register class ID to use for the operand. - - enum : uint32_t { - // Fixed operands on an INLINEASM SDNode. - Op_InputChain = 0, - Op_AsmString = 1, - Op_MDNode = 2, - Op_ExtraInfo = 3, // HasSideEffects, IsAlignStack, AsmDialect. - Op_FirstOperand = 4, - - // Fixed operands on an INLINEASM MachineInstr. - MIOp_AsmString = 0, - MIOp_ExtraInfo = 1, // HasSideEffects, IsAlignStack, AsmDialect. - MIOp_FirstOperand = 2, - - // Interpretation of the MIOp_ExtraInfo bit field. - Extra_HasSideEffects = 1, - Extra_IsAlignStack = 2, - Extra_AsmDialect = 4, - Extra_MayLoad = 8, - Extra_MayStore = 16, - Extra_IsConvergent = 32, - - // Inline asm operands map to multiple SDNode / MachineInstr operands. - // The first operand is an immediate describing the asm operand, the low - // bits is the kind: - Kind_RegUse = 1, // Input register, "r". - Kind_RegDef = 2, // Output register, "=r". - Kind_RegDefEarlyClobber = 3, // Early-clobber output register, "=&r". - Kind_Clobber = 4, // Clobbered register, "~r". - Kind_Imm = 5, // Immediate. - Kind_Mem = 6, // Memory operand, "m". - - // Memory constraint codes. - // These could be tablegenerated but there's little need to do that since - // there's plenty of space in the encoding to support the union of all - // constraint codes for all targets. - Constraint_Unknown = 0, - Constraint_es, - Constraint_i, - Constraint_m, - Constraint_o, - Constraint_v, - Constraint_Q, - Constraint_R, - Constraint_S, - Constraint_T, - Constraint_Um, - Constraint_Un, - Constraint_Uq, - Constraint_Us, - Constraint_Ut, - Constraint_Uv, - Constraint_Uy, - Constraint_X, - Constraint_Z, - Constraint_ZC, - Constraint_Zy, - Constraints_Max = Constraint_Zy, - Constraints_ShiftAmount = 16, - - Flag_MatchingOperand = 0x80000000 - }; - - static unsigned getFlagWord(unsigned Kind, unsigned NumOps) { - assert(((NumOps << 3) & ~0xffff) == 0 && "Too many inline asm operands!"); - assert(Kind >= Kind_RegUse && Kind <= Kind_Mem && "Invalid Kind"); - return Kind | (NumOps << 3); - } - - static bool isRegDefKind(unsigned Flag){ return getKind(Flag) == Kind_RegDef;} - static bool isImmKind(unsigned Flag) { return getKind(Flag) == Kind_Imm; } - static bool isMemKind(unsigned Flag) { return getKind(Flag) == Kind_Mem; } - static bool isRegDefEarlyClobberKind(unsigned Flag) { - return getKind(Flag) == Kind_RegDefEarlyClobber; - } - static bool isClobberKind(unsigned Flag) { - return getKind(Flag) == Kind_Clobber; - } - - /// getFlagWordForMatchingOp - Augment an existing flag word returned by - /// getFlagWord with information indicating that this input operand is tied - /// to a previous output operand. - static unsigned getFlagWordForMatchingOp(unsigned InputFlag, - unsigned MatchedOperandNo) { - assert(MatchedOperandNo <= 0x7fff && "Too big matched operand"); - assert((InputFlag & ~0xffff) == 0 && "High bits already contain data"); - return InputFlag | Flag_MatchingOperand | (MatchedOperandNo << 16); - } - - /// getFlagWordForRegClass - Augment an existing flag word returned by - /// getFlagWord with the required register class for the following register - /// operands. - /// A tied use operand cannot have a register class, use the register class - /// from the def operand instead. - static unsigned getFlagWordForRegClass(unsigned InputFlag, unsigned RC) { - // Store RC + 1, reserve the value 0 to mean 'no register class'. - ++RC; - assert(!isImmKind(InputFlag) && "Immediates cannot have a register class"); - assert(!isMemKind(InputFlag) && "Memory operand cannot have a register class"); - assert(RC <= 0x7fff && "Too large register class ID"); - assert((InputFlag & ~0xffff) == 0 && "High bits already contain data"); - return InputFlag | (RC << 16); - } - - /// Augment an existing flag word returned by getFlagWord with the constraint - /// code for a memory constraint. - static unsigned getFlagWordForMem(unsigned InputFlag, unsigned Constraint) { - assert(isMemKind(InputFlag) && "InputFlag is not a memory constraint!"); - assert(Constraint <= 0x7fff && "Too large a memory constraint ID"); - assert(Constraint <= Constraints_Max && "Unknown constraint ID"); - assert((InputFlag & ~0xffff) == 0 && "High bits already contain data"); - return InputFlag | (Constraint << Constraints_ShiftAmount); - } - - static unsigned convertMemFlagWordToMatchingFlagWord(unsigned InputFlag) { - assert(isMemKind(InputFlag)); - return InputFlag & ~(0x7fff << Constraints_ShiftAmount); - } - - static unsigned getKind(unsigned Flags) { - return Flags & 7; - } - - static unsigned getMemoryConstraintID(unsigned Flag) { - assert(isMemKind(Flag)); - return (Flag >> Constraints_ShiftAmount) & 0x7fff; - } - - /// getNumOperandRegisters - Extract the number of registers field from the - /// inline asm operand flag. - static unsigned getNumOperandRegisters(unsigned Flag) { - return (Flag & 0xffff) >> 3; - } - - /// isUseOperandTiedToDef - Return true if the flag of the inline asm - /// operand indicates it is an use operand that's matched to a def operand. - static bool isUseOperandTiedToDef(unsigned Flag, unsigned &Idx) { - if ((Flag & Flag_MatchingOperand) == 0) - return false; - Idx = (Flag & ~Flag_MatchingOperand) >> 16; - return true; - } - - /// hasRegClassConstraint - Returns true if the flag contains a register - /// class constraint. Sets RC to the register class ID. - static bool hasRegClassConstraint(unsigned Flag, unsigned &RC) { - if (Flag & Flag_MatchingOperand) - return false; - unsigned High = Flag >> 16; - // getFlagWordForRegClass() uses 0 to mean no register class, and otherwise - // stores RC + 1. - if (!High) - return false; - RC = High - 1; - return true; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/InstIterator.h b/llvm/include/llvm/IR/InstIterator.h deleted file mode 100644 index 1baca21c..00000000 --- a/llvm/include/llvm/IR/InstIterator.h +++ /dev/null @@ -1,157 +0,0 @@ -//===- InstIterator.h - Classes for inst iteration --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains definitions of two iterators for iterating over the -// instructions in a function. This is effectively a wrapper around a two level -// iterator that can probably be genericized later. -// -// Note that this iterator gets invalidated any time that basic blocks or -// instructions are moved around. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_INSTITERATOR_H -#define LLVM_IR_INSTITERATOR_H - -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/Function.h" - -namespace llvm { - -// This class implements inst_begin() & inst_end() for -// inst_iterator and const_inst_iterator's. -// -template class InstIterator { - typedef BB_t BBty; - typedef BB_i_t BBIty; - typedef BI_t BIty; - typedef II_t IIty; - BB_t *BBs; // BasicBlocksType - BB_i_t BB; // BasicBlocksType::iterator - BI_t BI; // BasicBlock::iterator -public: - typedef std::bidirectional_iterator_tag iterator_category; - typedef IIty value_type; - typedef signed difference_type; - typedef IIty* pointer; - typedef IIty& reference; - - // Default constructor - InstIterator() {} - - // Copy constructor... - template - InstIterator(const InstIterator &II) - : BBs(II.BBs), BB(II.BB), BI(II.BI) {} - - template - InstIterator(InstIterator &II) - : BBs(II.BBs), BB(II.BB), BI(II.BI) {} - - template InstIterator(M &m) - : BBs(&m.getBasicBlockList()), BB(BBs->begin()) { // begin ctor - if (BB != BBs->end()) { - BI = BB->begin(); - advanceToNextBB(); - } - } - - template InstIterator(M &m, bool) - : BBs(&m.getBasicBlockList()), BB(BBs->end()) { // end ctor - } - - // Accessors to get at the underlying iterators... - inline BBIty &getBasicBlockIterator() { return BB; } - inline BIty &getInstructionIterator() { return BI; } - - inline reference operator*() const { return *BI; } - inline pointer operator->() const { return &operator*(); } - - inline bool operator==(const InstIterator &y) const { - return BB == y.BB && (BB == BBs->end() || BI == y.BI); - } - inline bool operator!=(const InstIterator& y) const { - return !operator==(y); - } - - InstIterator& operator++() { - ++BI; - advanceToNextBB(); - return *this; - } - inline InstIterator operator++(int) { - InstIterator tmp = *this; ++*this; return tmp; - } - - InstIterator& operator--() { - while (BB == BBs->end() || BI == BB->begin()) { - --BB; - BI = BB->end(); - } - --BI; - return *this; - } - inline InstIterator operator--(int) { - InstIterator tmp = *this; --*this; return tmp; - } - - inline bool atEnd() const { return BB == BBs->end(); } - -private: - inline void advanceToNextBB() { - // The only way that the II could be broken is if it is now pointing to - // the end() of the current BasicBlock and there are successor BBs. - while (BI == BB->end()) { - ++BB; - if (BB == BBs->end()) break; - BI = BB->begin(); - } - } -}; - -typedef InstIterator, Function::iterator, - BasicBlock::iterator, Instruction> inst_iterator; -typedef InstIterator, - Function::const_iterator, BasicBlock::const_iterator, - const Instruction> const_inst_iterator; -typedef iterator_range inst_range; -typedef iterator_range const_inst_range; - -inline inst_iterator inst_begin(Function *F) { return inst_iterator(*F); } -inline inst_iterator inst_end(Function *F) { return inst_iterator(*F, true); } -inline inst_range instructions(Function *F) { - return inst_range(inst_begin(F), inst_end(F)); -} -inline const_inst_iterator inst_begin(const Function *F) { - return const_inst_iterator(*F); -} -inline const_inst_iterator inst_end(const Function *F) { - return const_inst_iterator(*F, true); -} -inline const_inst_range instructions(const Function *F) { - return const_inst_range(inst_begin(F), inst_end(F)); -} -inline inst_iterator inst_begin(Function &F) { return inst_iterator(F); } -inline inst_iterator inst_end(Function &F) { return inst_iterator(F, true); } -inline inst_range instructions(Function &F) { - return inst_range(inst_begin(F), inst_end(F)); -} -inline const_inst_iterator inst_begin(const Function &F) { - return const_inst_iterator(F); -} -inline const_inst_iterator inst_end(const Function &F) { - return const_inst_iterator(F, true); -} -inline const_inst_range instructions(const Function &F) { - return const_inst_range(inst_begin(F), inst_end(F)); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/InstVisitor.h b/llvm/include/llvm/IR/InstVisitor.h deleted file mode 100644 index 088d3e0f..00000000 --- a/llvm/include/llvm/IR/InstVisitor.h +++ /dev/null @@ -1,295 +0,0 @@ -//===- InstVisitor.h - Instruction visitor templates ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - - -#ifndef LLVM_IR_INSTVISITOR_H -#define LLVM_IR_INSTVISITOR_H - -#include "llvm/IR/CallSite.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/IR/Module.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { - -// We operate on opaque instruction classes, so forward declare all instruction -// types now... -// -#define HANDLE_INST(NUM, OPCODE, CLASS) class CLASS; -#include "llvm/IR/Instruction.def" - -#define DELEGATE(CLASS_TO_VISIT) \ - return static_cast(this)-> \ - visit##CLASS_TO_VISIT(static_cast(I)) - - -/// @brief Base class for instruction visitors -/// -/// Instruction visitors are used when you want to perform different actions -/// for different kinds of instructions without having to use lots of casts -/// and a big switch statement (in your code, that is). -/// -/// To define your own visitor, inherit from this class, specifying your -/// new type for the 'SubClass' template parameter, and "override" visitXXX -/// functions in your class. I say "override" because this class is defined -/// in terms of statically resolved overloading, not virtual functions. -/// -/// For example, here is a visitor that counts the number of malloc -/// instructions processed: -/// -/// /// Declare the class. Note that we derive from InstVisitor instantiated -/// /// with _our new subclasses_ type. -/// /// -/// struct CountAllocaVisitor : public InstVisitor { -/// unsigned Count; -/// CountAllocaVisitor() : Count(0) {} -/// -/// void visitAllocaInst(AllocaInst &AI) { ++Count; } -/// }; -/// -/// And this class would be used like this: -/// CountAllocaVisitor CAV; -/// CAV.visit(function); -/// NumAllocas = CAV.Count; -/// -/// The defined has 'visit' methods for Instruction, and also for BasicBlock, -/// Function, and Module, which recursively process all contained instructions. -/// -/// Note that if you don't implement visitXXX for some instruction type, -/// the visitXXX method for instruction superclass will be invoked. So -/// if instructions are added in the future, they will be automatically -/// supported, if you handle one of their superclasses. -/// -/// The optional second template argument specifies the type that instruction -/// visitation functions should return. If you specify this, you *MUST* provide -/// an implementation of visitInstruction though!. -/// -/// Note that this class is specifically designed as a template to avoid -/// virtual function call overhead. Defining and using an InstVisitor is just -/// as efficient as having your own switch statement over the instruction -/// opcode. -template -class InstVisitor { - //===--------------------------------------------------------------------===// - // Interface code - This is the public interface of the InstVisitor that you - // use to visit instructions... - // - -public: - // Generic visit method - Allow visitation to all instructions in a range - template - void visit(Iterator Start, Iterator End) { - while (Start != End) - static_cast(this)->visit(*Start++); - } - - // Define visitors for functions and basic blocks... - // - void visit(Module &M) { - static_cast(this)->visitModule(M); - visit(M.begin(), M.end()); - } - void visit(Function &F) { - static_cast(this)->visitFunction(F); - visit(F.begin(), F.end()); - } - void visit(BasicBlock &BB) { - static_cast(this)->visitBasicBlock(BB); - visit(BB.begin(), BB.end()); - } - - // Forwarding functions so that the user can visit with pointers AND refs. - void visit(Module *M) { visit(*M); } - void visit(Function *F) { visit(*F); } - void visit(BasicBlock *BB) { visit(*BB); } - RetTy visit(Instruction *I) { return visit(*I); } - - // visit - Finally, code to visit an instruction... - // - RetTy visit(Instruction &I) { - switch (I.getOpcode()) { - default: llvm_unreachable("Unknown instruction type encountered!"); - // Build the switch statement using the Instruction.def file... -#define HANDLE_INST(NUM, OPCODE, CLASS) \ - case Instruction::OPCODE: return \ - static_cast(this)-> \ - visit##OPCODE(static_cast(I)); -#include "llvm/IR/Instruction.def" - } - } - - //===--------------------------------------------------------------------===// - // Visitation functions... these functions provide default fallbacks in case - // the user does not specify what to do for a particular instruction type. - // The default behavior is to generalize the instruction type to its subtype - // and try visiting the subtype. All of this should be inlined perfectly, - // because there are no virtual functions to get in the way. - // - - // When visiting a module, function or basic block directly, these methods get - // called to indicate when transitioning into a new unit. - // - void visitModule (Module &M) {} - void visitFunction (Function &F) {} - void visitBasicBlock(BasicBlock &BB) {} - - // Define instruction specific visitor functions that can be overridden to - // handle SPECIFIC instructions. These functions automatically define - // visitMul to proxy to visitBinaryOperator for instance in case the user does - // not need this generality. - // - // These functions can also implement fan-out, when a single opcode and - // instruction have multiple more specific Instruction subclasses. The Call - // instruction currently supports this. We implement that by redirecting that - // instruction to a special delegation helper. -#define HANDLE_INST(NUM, OPCODE, CLASS) \ - RetTy visit##OPCODE(CLASS &I) { \ - if (NUM == Instruction::Call) \ - return delegateCallInst(I); \ - else \ - DELEGATE(CLASS); \ - } -#include "llvm/IR/Instruction.def" - - // Specific Instruction type classes... note that all of the casts are - // necessary because we use the instruction classes as opaque types... - // - RetTy visitReturnInst(ReturnInst &I) { DELEGATE(TerminatorInst);} - RetTy visitBranchInst(BranchInst &I) { DELEGATE(TerminatorInst);} - RetTy visitSwitchInst(SwitchInst &I) { DELEGATE(TerminatorInst);} - RetTy visitIndirectBrInst(IndirectBrInst &I) { DELEGATE(TerminatorInst);} - RetTy visitResumeInst(ResumeInst &I) { DELEGATE(TerminatorInst);} - RetTy visitUnreachableInst(UnreachableInst &I) { DELEGATE(TerminatorInst);} - RetTy visitCleanupReturnInst(CleanupReturnInst &I) { DELEGATE(TerminatorInst);} - RetTy visitCatchReturnInst(CatchReturnInst &I) { DELEGATE(TerminatorInst); } - RetTy visitCatchSwitchInst(CatchSwitchInst &I) { DELEGATE(TerminatorInst);} - RetTy visitICmpInst(ICmpInst &I) { DELEGATE(CmpInst);} - RetTy visitFCmpInst(FCmpInst &I) { DELEGATE(CmpInst);} - RetTy visitAllocaInst(AllocaInst &I) { DELEGATE(UnaryInstruction);} - RetTy visitLoadInst(LoadInst &I) { DELEGATE(UnaryInstruction);} - RetTy visitStoreInst(StoreInst &I) { DELEGATE(Instruction);} - RetTy visitAtomicCmpXchgInst(AtomicCmpXchgInst &I) { DELEGATE(Instruction);} - RetTy visitAtomicRMWInst(AtomicRMWInst &I) { DELEGATE(Instruction);} - RetTy visitFenceInst(FenceInst &I) { DELEGATE(Instruction);} - RetTy visitGetElementPtrInst(GetElementPtrInst &I){ DELEGATE(Instruction);} - RetTy visitPHINode(PHINode &I) { DELEGATE(Instruction);} - RetTy visitTruncInst(TruncInst &I) { DELEGATE(CastInst);} - RetTy visitZExtInst(ZExtInst &I) { DELEGATE(CastInst);} - RetTy visitSExtInst(SExtInst &I) { DELEGATE(CastInst);} - RetTy visitFPTruncInst(FPTruncInst &I) { DELEGATE(CastInst);} - RetTy visitFPExtInst(FPExtInst &I) { DELEGATE(CastInst);} - RetTy visitFPToUIInst(FPToUIInst &I) { DELEGATE(CastInst);} - RetTy visitFPToSIInst(FPToSIInst &I) { DELEGATE(CastInst);} - RetTy visitUIToFPInst(UIToFPInst &I) { DELEGATE(CastInst);} - RetTy visitSIToFPInst(SIToFPInst &I) { DELEGATE(CastInst);} - RetTy visitPtrToIntInst(PtrToIntInst &I) { DELEGATE(CastInst);} - RetTy visitIntToPtrInst(IntToPtrInst &I) { DELEGATE(CastInst);} - RetTy visitBitCastInst(BitCastInst &I) { DELEGATE(CastInst);} - RetTy visitAddrSpaceCastInst(AddrSpaceCastInst &I) { DELEGATE(CastInst);} - RetTy visitSelectInst(SelectInst &I) { DELEGATE(Instruction);} - RetTy visitVAArgInst(VAArgInst &I) { DELEGATE(UnaryInstruction);} - RetTy visitExtractElementInst(ExtractElementInst &I) { DELEGATE(Instruction);} - RetTy visitInsertElementInst(InsertElementInst &I) { DELEGATE(Instruction);} - RetTy visitShuffleVectorInst(ShuffleVectorInst &I) { DELEGATE(Instruction);} - RetTy visitExtractValueInst(ExtractValueInst &I){ DELEGATE(UnaryInstruction);} - RetTy visitInsertValueInst(InsertValueInst &I) { DELEGATE(Instruction); } - RetTy visitLandingPadInst(LandingPadInst &I) { DELEGATE(Instruction); } - RetTy visitFuncletPadInst(FuncletPadInst &I) { DELEGATE(Instruction); } - RetTy visitCleanupPadInst(CleanupPadInst &I) { DELEGATE(FuncletPadInst); } - RetTy visitCatchPadInst(CatchPadInst &I) { DELEGATE(FuncletPadInst); } - - // Handle the special instrinsic instruction classes. - RetTy visitDbgDeclareInst(DbgDeclareInst &I) { DELEGATE(DbgInfoIntrinsic);} - RetTy visitDbgValueInst(DbgValueInst &I) { DELEGATE(DbgInfoIntrinsic);} - RetTy visitDbgInfoIntrinsic(DbgInfoIntrinsic &I) { DELEGATE(IntrinsicInst); } - RetTy visitMemSetInst(MemSetInst &I) { DELEGATE(MemIntrinsic); } - RetTy visitMemCpyInst(MemCpyInst &I) { DELEGATE(MemTransferInst); } - RetTy visitMemMoveInst(MemMoveInst &I) { DELEGATE(MemTransferInst); } - RetTy visitMemTransferInst(MemTransferInst &I) { DELEGATE(MemIntrinsic); } - RetTy visitMemIntrinsic(MemIntrinsic &I) { DELEGATE(IntrinsicInst); } - RetTy visitVAStartInst(VAStartInst &I) { DELEGATE(IntrinsicInst); } - RetTy visitVAEndInst(VAEndInst &I) { DELEGATE(IntrinsicInst); } - RetTy visitVACopyInst(VACopyInst &I) { DELEGATE(IntrinsicInst); } - RetTy visitIntrinsicInst(IntrinsicInst &I) { DELEGATE(CallInst); } - - // Call and Invoke are slightly different as they delegate first through - // a generic CallSite visitor. - RetTy visitCallInst(CallInst &I) { - return static_cast(this)->visitCallSite(&I); - } - RetTy visitInvokeInst(InvokeInst &I) { - return static_cast(this)->visitCallSite(&I); - } - - // Next level propagators: If the user does not overload a specific - // instruction type, they can overload one of these to get the whole class - // of instructions... - // - RetTy visitCastInst(CastInst &I) { DELEGATE(UnaryInstruction);} - RetTy visitBinaryOperator(BinaryOperator &I) { DELEGATE(Instruction);} - RetTy visitCmpInst(CmpInst &I) { DELEGATE(Instruction);} - RetTy visitTerminatorInst(TerminatorInst &I) { DELEGATE(Instruction);} - RetTy visitUnaryInstruction(UnaryInstruction &I){ DELEGATE(Instruction);} - - // Provide a special visitor for a 'callsite' that visits both calls and - // invokes. When unimplemented, properly delegates to either the terminator or - // regular instruction visitor. - RetTy visitCallSite(CallSite CS) { - assert(CS); - Instruction &I = *CS.getInstruction(); - if (CS.isCall()) - DELEGATE(Instruction); - - assert(CS.isInvoke()); - DELEGATE(TerminatorInst); - } - - // If the user wants a 'default' case, they can choose to override this - // function. If this function is not overloaded in the user's subclass, then - // this instruction just gets ignored. - // - // Note that you MUST override this function if your return type is not void. - // - void visitInstruction(Instruction &I) {} // Ignore unhandled instructions - -private: - // Special helper function to delegate to CallInst subclass visitors. - RetTy delegateCallInst(CallInst &I) { - if (const Function *F = I.getCalledFunction()) { - switch (F->getIntrinsicID()) { - default: DELEGATE(IntrinsicInst); - case Intrinsic::dbg_declare: DELEGATE(DbgDeclareInst); - case Intrinsic::dbg_value: DELEGATE(DbgValueInst); - case Intrinsic::memcpy: DELEGATE(MemCpyInst); - case Intrinsic::memmove: DELEGATE(MemMoveInst); - case Intrinsic::memset: DELEGATE(MemSetInst); - case Intrinsic::vastart: DELEGATE(VAStartInst); - case Intrinsic::vaend: DELEGATE(VAEndInst); - case Intrinsic::vacopy: DELEGATE(VACopyInst); - case Intrinsic::not_intrinsic: break; - } - } - DELEGATE(CallInst); - } - - // An overload that will never actually be called, it is used only from dead - // code in the dispatching from opcodes to instruction subclasses. - RetTy delegateCallInst(Instruction &I) { - llvm_unreachable("delegateCallInst called for non-CallInst"); - } -}; - -#undef DELEGATE - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h deleted file mode 100644 index 39514c56..00000000 --- a/llvm/include/llvm/IR/InstrTypes.h +++ /dev/null @@ -1,1648 +0,0 @@ -//===-- llvm/InstrTypes.h - Important Instruction subclasses ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines various meta classes of instructions that exist in the VM -// representation. Specific concrete subclasses of these may be found in the -// i*.h files... -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_INSTRTYPES_H -#define LLVM_IR_INSTRTYPES_H - -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/Twine.h" -#include "llvm/IR/Attributes.h" -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/Instruction.h" -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/OperandTraits.h" - -namespace llvm { - -class LLVMContext; - -//===----------------------------------------------------------------------===// -// TerminatorInst Class -//===----------------------------------------------------------------------===// - -/// Subclasses of this class are all able to terminate a basic -/// block. Thus, these are all the flow control type of operations. -/// -class TerminatorInst : public Instruction { -protected: - TerminatorInst(Type *Ty, Instruction::TermOps iType, - Use *Ops, unsigned NumOps, - Instruction *InsertBefore = nullptr) - : Instruction(Ty, iType, Ops, NumOps, InsertBefore) {} - - TerminatorInst(Type *Ty, Instruction::TermOps iType, - Use *Ops, unsigned NumOps, BasicBlock *InsertAtEnd) - : Instruction(Ty, iType, Ops, NumOps, InsertAtEnd) {} - - // Out of line virtual method, so the vtable, etc has a home. - ~TerminatorInst() override; - - /// Virtual methods - Terminators should overload these and provide inline - /// overrides of non-V methods. - virtual BasicBlock *getSuccessorV(unsigned idx) const = 0; - virtual unsigned getNumSuccessorsV() const = 0; - virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0; - -public: - /// Return the number of successors that this terminator has. - unsigned getNumSuccessors() const { - return getNumSuccessorsV(); - } - - /// Return the specified successor. - BasicBlock *getSuccessor(unsigned idx) const { - return getSuccessorV(idx); - } - - /// Update the specified successor to point at the provided block. - void setSuccessor(unsigned idx, BasicBlock *B) { - setSuccessorV(idx, B); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->isTerminator(); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - // \brief Returns true if this terminator relates to exception handling. - bool isExceptional() const { - switch (getOpcode()) { - case Instruction::CatchSwitch: - case Instruction::CatchRet: - case Instruction::CleanupRet: - case Instruction::Invoke: - case Instruction::Resume: - return true; - default: - return false; - } - } - - //===--------------------------------------------------------------------===// - // succ_iterator definition - //===--------------------------------------------------------------------===// - - template // Successor Iterator - class SuccIterator : public std::iterator { - typedef std::iterator - super; - - public: - typedef typename super::pointer pointer; - typedef typename super::reference reference; - - private: - Term TermInst; - unsigned idx; - typedef SuccIterator Self; - - inline bool index_is_valid(unsigned idx) { - return idx < TermInst->getNumSuccessors(); - } - - /// \brief Proxy object to allow write access in operator[] - class SuccessorProxy { - Self it; - - public: - explicit SuccessorProxy(const Self &it) : it(it) {} - - SuccessorProxy(const SuccessorProxy &) = default; - - SuccessorProxy &operator=(SuccessorProxy r) { - *this = reference(r); - return *this; - } - - SuccessorProxy &operator=(reference r) { - it.TermInst->setSuccessor(it.idx, r); - return *this; - } - - operator reference() const { return *it; } - }; - - public: - // begin iterator - explicit inline SuccIterator(Term T) : TermInst(T), idx(0) {} - // end iterator - inline SuccIterator(Term T, bool) : TermInst(T) { - if (TermInst) - idx = TermInst->getNumSuccessors(); - else - // Term == NULL happens, if a basic block is not fully constructed and - // consequently getTerminator() returns NULL. In this case we construct - // a SuccIterator which describes a basic block that has zero - // successors. - // Defining SuccIterator for incomplete and malformed CFGs is especially - // useful for debugging. - idx = 0; - } - - /// This is used to interface between code that wants to - /// operate on terminator instructions directly. - unsigned getSuccessorIndex() const { return idx; } - - inline bool operator==(const Self &x) const { return idx == x.idx; } - inline bool operator!=(const Self &x) const { return !operator==(x); } - - inline reference operator*() const { return TermInst->getSuccessor(idx); } - inline pointer operator->() const { return operator*(); } - - inline Self &operator++() { - ++idx; - return *this; - } // Preincrement - - inline Self operator++(int) { // Postincrement - Self tmp = *this; - ++*this; - return tmp; - } - - inline Self &operator--() { - --idx; - return *this; - } // Predecrement - inline Self operator--(int) { // Postdecrement - Self tmp = *this; - --*this; - return tmp; - } - - inline bool operator<(const Self &x) const { - assert(TermInst == x.TermInst && - "Cannot compare iterators of different blocks!"); - return idx < x.idx; - } - - inline bool operator<=(const Self &x) const { - assert(TermInst == x.TermInst && - "Cannot compare iterators of different blocks!"); - return idx <= x.idx; - } - inline bool operator>=(const Self &x) const { - assert(TermInst == x.TermInst && - "Cannot compare iterators of different blocks!"); - return idx >= x.idx; - } - - inline bool operator>(const Self &x) const { - assert(TermInst == x.TermInst && - "Cannot compare iterators of different blocks!"); - return idx > x.idx; - } - - inline Self &operator+=(int Right) { - unsigned new_idx = idx + Right; - assert(index_is_valid(new_idx) && "Iterator index out of bound"); - idx = new_idx; - return *this; - } - - inline Self operator+(int Right) const { - Self tmp = *this; - tmp += Right; - return tmp; - } - - inline Self &operator-=(int Right) { return operator+=(-Right); } - - inline Self operator-(int Right) const { return operator+(-Right); } - - inline int operator-(const Self &x) const { - assert(TermInst == x.TermInst && - "Cannot work on iterators of different blocks!"); - int distance = idx - x.idx; - return distance; - } - - inline SuccessorProxy operator[](int offset) { - Self tmp = *this; - tmp += offset; - return SuccessorProxy(tmp); - } - - /// Get the source BB of this iterator. - inline BB *getSource() { - assert(TermInst && "Source not available, if basic block was malformed"); - return TermInst->getParent(); - } - }; - - typedef SuccIterator succ_iterator; - typedef SuccIterator - succ_const_iterator; - typedef llvm::iterator_range succ_range; - typedef llvm::iterator_range succ_const_range; - -private: - inline succ_iterator succ_begin() { return succ_iterator(this); } - inline succ_const_iterator succ_begin() const { - return succ_const_iterator(this); - } - inline succ_iterator succ_end() { return succ_iterator(this, true); } - inline succ_const_iterator succ_end() const { - return succ_const_iterator(this, true); - } - -public: - inline succ_range successors() { - return succ_range(succ_begin(), succ_end()); - } - inline succ_const_range successors() const { - return succ_const_range(succ_begin(), succ_end()); - } -}; - -//===----------------------------------------------------------------------===// -// UnaryInstruction Class -//===----------------------------------------------------------------------===// - -class UnaryInstruction : public Instruction { - void *operator new(size_t, unsigned) = delete; - -protected: - UnaryInstruction(Type *Ty, unsigned iType, Value *V, - Instruction *IB = nullptr) - : Instruction(Ty, iType, &Op<0>(), 1, IB) { - Op<0>() = V; - } - UnaryInstruction(Type *Ty, unsigned iType, Value *V, BasicBlock *IAE) - : Instruction(Ty, iType, &Op<0>(), 1, IAE) { - Op<0>() = V; - } - -public: - // allocate space for exactly one operand - void *operator new(size_t s) { - return User::operator new(s, 1); - } - - // Out of line virtual method, so the vtable, etc has a home. - ~UnaryInstruction() override; - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Alloca || - I->getOpcode() == Instruction::Load || - I->getOpcode() == Instruction::VAArg || - I->getOpcode() == Instruction::ExtractValue || - (I->getOpcode() >= CastOpsBegin && I->getOpcode() < CastOpsEnd); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(UnaryInstruction, Value) - -//===----------------------------------------------------------------------===// -// BinaryOperator Class -//===----------------------------------------------------------------------===// - -class BinaryOperator : public Instruction { - void *operator new(size_t, unsigned) = delete; - -protected: - void init(BinaryOps iType); - BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, - const Twine &Name, Instruction *InsertBefore); - BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, - const Twine &Name, BasicBlock *InsertAtEnd); - - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - BinaryOperator *cloneImpl() const; - -public: - // allocate space for exactly two operands - void *operator new(size_t s) { - return User::operator new(s, 2); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// Construct a binary instruction, given the opcode and the two - /// operands. Optionally (if InstBefore is specified) insert the instruction - /// into a BasicBlock right before the specified instruction. The specified - /// Instruction is allowed to be a dereferenced end iterator. - /// - static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, - const Twine &Name = Twine(), - Instruction *InsertBefore = nullptr); - - /// Construct a binary instruction, given the opcode and the two - /// operands. Also automatically insert this instruction to the end of the - /// BasicBlock specified. - /// - static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, - const Twine &Name, BasicBlock *InsertAtEnd); - - /// These methods just forward to Create, and are useful when you - /// statically know what type of instruction you're going to create. These - /// helpers just save some typing. -#define HANDLE_BINARY_INST(N, OPC, CLASS) \ - static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ - const Twine &Name = "") {\ - return Create(Instruction::OPC, V1, V2, Name);\ - } -#include "llvm/IR/Instruction.def" -#define HANDLE_BINARY_INST(N, OPC, CLASS) \ - static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ - const Twine &Name, BasicBlock *BB) {\ - return Create(Instruction::OPC, V1, V2, Name, BB);\ - } -#include "llvm/IR/Instruction.def" -#define HANDLE_BINARY_INST(N, OPC, CLASS) \ - static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ - const Twine &Name, Instruction *I) {\ - return Create(Instruction::OPC, V1, V2, Name, I);\ - } -#include "llvm/IR/Instruction.def" - - static BinaryOperator *CreateWithCopiedFlags(BinaryOps Opc, - Value *V1, Value *V2, - BinaryOperator *CopyBO, - const Twine &Name = "") { - BinaryOperator *BO = Create(Opc, V1, V2, Name); - BO->copyIRFlags(CopyBO); - return BO; - } - - static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name = "") { - BinaryOperator *BO = Create(Opc, V1, V2, Name); - BO->setHasNoSignedWrap(true); - return BO; - } - static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name, BasicBlock *BB) { - BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); - BO->setHasNoSignedWrap(true); - return BO; - } - static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name, Instruction *I) { - BinaryOperator *BO = Create(Opc, V1, V2, Name, I); - BO->setHasNoSignedWrap(true); - return BO; - } - - static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name = "") { - BinaryOperator *BO = Create(Opc, V1, V2, Name); - BO->setHasNoUnsignedWrap(true); - return BO; - } - static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name, BasicBlock *BB) { - BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); - BO->setHasNoUnsignedWrap(true); - return BO; - } - static BinaryOperator *CreateNUW(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name, Instruction *I) { - BinaryOperator *BO = Create(Opc, V1, V2, Name, I); - BO->setHasNoUnsignedWrap(true); - return BO; - } - - static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name = "") { - BinaryOperator *BO = Create(Opc, V1, V2, Name); - BO->setIsExact(true); - return BO; - } - static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name, BasicBlock *BB) { - BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); - BO->setIsExact(true); - return BO; - } - static BinaryOperator *CreateExact(BinaryOps Opc, Value *V1, Value *V2, - const Twine &Name, Instruction *I) { - BinaryOperator *BO = Create(Opc, V1, V2, Name, I); - BO->setIsExact(true); - return BO; - } - -#define DEFINE_HELPERS(OPC, NUWNSWEXACT) \ - static BinaryOperator *Create##NUWNSWEXACT##OPC(Value *V1, Value *V2, \ - const Twine &Name = "") { \ - return Create##NUWNSWEXACT(Instruction::OPC, V1, V2, Name); \ - } \ - static BinaryOperator *Create##NUWNSWEXACT##OPC( \ - Value *V1, Value *V2, const Twine &Name, BasicBlock *BB) { \ - return Create##NUWNSWEXACT(Instruction::OPC, V1, V2, Name, BB); \ - } \ - static BinaryOperator *Create##NUWNSWEXACT##OPC( \ - Value *V1, Value *V2, const Twine &Name, Instruction *I) { \ - return Create##NUWNSWEXACT(Instruction::OPC, V1, V2, Name, I); \ - } - - DEFINE_HELPERS(Add, NSW) // CreateNSWAdd - DEFINE_HELPERS(Add, NUW) // CreateNUWAdd - DEFINE_HELPERS(Sub, NSW) // CreateNSWSub - DEFINE_HELPERS(Sub, NUW) // CreateNUWSub - DEFINE_HELPERS(Mul, NSW) // CreateNSWMul - DEFINE_HELPERS(Mul, NUW) // CreateNUWMul - DEFINE_HELPERS(Shl, NSW) // CreateNSWShl - DEFINE_HELPERS(Shl, NUW) // CreateNUWShl - - DEFINE_HELPERS(SDiv, Exact) // CreateExactSDiv - DEFINE_HELPERS(UDiv, Exact) // CreateExactUDiv - DEFINE_HELPERS(AShr, Exact) // CreateExactAShr - DEFINE_HELPERS(LShr, Exact) // CreateExactLShr - -#undef DEFINE_HELPERS - - /// Helper functions to construct and inspect unary operations (NEG and NOT) - /// via binary operators SUB and XOR: - /// - /// Create the NEG and NOT instructions out of SUB and XOR instructions. - /// - static BinaryOperator *CreateNeg(Value *Op, const Twine &Name = "", - Instruction *InsertBefore = nullptr); - static BinaryOperator *CreateNeg(Value *Op, const Twine &Name, - BasicBlock *InsertAtEnd); - static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name = "", - Instruction *InsertBefore = nullptr); - static BinaryOperator *CreateNSWNeg(Value *Op, const Twine &Name, - BasicBlock *InsertAtEnd); - static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name = "", - Instruction *InsertBefore = nullptr); - static BinaryOperator *CreateNUWNeg(Value *Op, const Twine &Name, - BasicBlock *InsertAtEnd); - static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name = "", - Instruction *InsertBefore = nullptr); - static BinaryOperator *CreateFNeg(Value *Op, const Twine &Name, - BasicBlock *InsertAtEnd); - static BinaryOperator *CreateNot(Value *Op, const Twine &Name = "", - Instruction *InsertBefore = nullptr); - static BinaryOperator *CreateNot(Value *Op, const Twine &Name, - BasicBlock *InsertAtEnd); - - /// Check if the given Value is a NEG, FNeg, or NOT instruction. - /// - static bool isNeg(const Value *V); - static bool isFNeg(const Value *V, bool IgnoreZeroSign=false); - static bool isNot(const Value *V); - - /// Helper functions to extract the unary argument of a NEG, FNEG or NOT - /// operation implemented via Sub, FSub, or Xor. - /// - static const Value *getNegArgument(const Value *BinOp); - static Value *getNegArgument( Value *BinOp); - static const Value *getFNegArgument(const Value *BinOp); - static Value *getFNegArgument( Value *BinOp); - static const Value *getNotArgument(const Value *BinOp); - static Value *getNotArgument( Value *BinOp); - - BinaryOps getOpcode() const { - return static_cast(Instruction::getOpcode()); - } - - /// Exchange the two operands to this instruction. - /// This instruction is safe to use on any binary instruction and - /// does not modify the semantics of the instruction. If the instruction - /// cannot be reversed (ie, it's a Div), then return true. - /// - bool swapOperands(); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->isBinaryOp(); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BinaryOperator, Value) - -//===----------------------------------------------------------------------===// -// CastInst Class -//===----------------------------------------------------------------------===// - -/// This is the base class for all instructions that perform data -/// casts. It is simply provided so that instruction category testing -/// can be performed with code like: -/// -/// if (isa(Instr)) { ... } -/// @brief Base class of casting instructions. -class CastInst : public UnaryInstruction { - void anchor() override; - -protected: - /// @brief Constructor with insert-before-instruction semantics for subclasses - CastInst(Type *Ty, unsigned iType, Value *S, - const Twine &NameStr = "", Instruction *InsertBefore = nullptr) - : UnaryInstruction(Ty, iType, S, InsertBefore) { - setName(NameStr); - } - /// @brief Constructor with insert-at-end-of-block semantics for subclasses - CastInst(Type *Ty, unsigned iType, Value *S, - const Twine &NameStr, BasicBlock *InsertAtEnd) - : UnaryInstruction(Ty, iType, S, InsertAtEnd) { - setName(NameStr); - } - -public: - /// Provides a way to construct any of the CastInst subclasses using an - /// opcode instead of the subclass's constructor. The opcode must be in the - /// CastOps category (Instruction::isCast(opcode) returns true). This - /// constructor has insert-before-instruction semantics to automatically - /// insert the new CastInst before InsertBefore (if it is non-null). - /// @brief Construct any of the CastInst subclasses - static CastInst *Create( - Instruction::CastOps, ///< The opcode of the cast instruction - Value *S, ///< The value to be casted (operand 0) - Type *Ty, ///< The type to which cast should be made - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - /// Provides a way to construct any of the CastInst subclasses using an - /// opcode instead of the subclass's constructor. The opcode must be in the - /// CastOps category. This constructor has insert-at-end-of-block semantics - /// to automatically insert the new CastInst at the end of InsertAtEnd (if - /// its non-null). - /// @brief Construct any of the CastInst subclasses - static CastInst *Create( - Instruction::CastOps, ///< The opcode for the cast instruction - Value *S, ///< The value to be casted (operand 0) - Type *Ty, ///< The type to which operand is casted - const Twine &Name, ///< The name for the instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// @brief Create a ZExt or BitCast cast instruction - static CastInst *CreateZExtOrBitCast( - Value *S, ///< The value to be casted (operand 0) - Type *Ty, ///< The type to which cast should be made - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - - /// @brief Create a ZExt or BitCast cast instruction - static CastInst *CreateZExtOrBitCast( - Value *S, ///< The value to be casted (operand 0) - Type *Ty, ///< The type to which operand is casted - const Twine &Name, ///< The name for the instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// @brief Create a SExt or BitCast cast instruction - static CastInst *CreateSExtOrBitCast( - Value *S, ///< The value to be casted (operand 0) - Type *Ty, ///< The type to which cast should be made - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - - /// @brief Create a SExt or BitCast cast instruction - static CastInst *CreateSExtOrBitCast( - Value *S, ///< The value to be casted (operand 0) - Type *Ty, ///< The type to which operand is casted - const Twine &Name, ///< The name for the instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// @brief Create a BitCast AddrSpaceCast, or a PtrToInt cast instruction. - static CastInst *CreatePointerCast( - Value *S, ///< The pointer value to be casted (operand 0) - Type *Ty, ///< The type to which operand is casted - const Twine &Name, ///< The name for the instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// @brief Create a BitCast, AddrSpaceCast or a PtrToInt cast instruction. - static CastInst *CreatePointerCast( - Value *S, ///< The pointer value to be casted (operand 0) - Type *Ty, ///< The type to which cast should be made - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - - /// @brief Create a BitCast or an AddrSpaceCast cast instruction. - static CastInst *CreatePointerBitCastOrAddrSpaceCast( - Value *S, ///< The pointer value to be casted (operand 0) - Type *Ty, ///< The type to which operand is casted - const Twine &Name, ///< The name for the instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// @brief Create a BitCast or an AddrSpaceCast cast instruction. - static CastInst *CreatePointerBitCastOrAddrSpaceCast( - Value *S, ///< The pointer value to be casted (operand 0) - Type *Ty, ///< The type to which cast should be made - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - - /// @brief Create a BitCast, a PtrToInt, or an IntToPTr cast instruction. - /// - /// If the value is a pointer type and the destination an integer type, - /// creates a PtrToInt cast. If the value is an integer type and the - /// destination a pointer type, creates an IntToPtr cast. Otherwise, creates - /// a bitcast. - static CastInst *CreateBitOrPointerCast( - Value *S, ///< The pointer value to be casted (operand 0) - Type *Ty, ///< The type to which cast should be made - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - - /// @brief Create a ZExt, BitCast, or Trunc for int -> int casts. - static CastInst *CreateIntegerCast( - Value *S, ///< The pointer value to be casted (operand 0) - Type *Ty, ///< The type to which cast should be made - bool isSigned, ///< Whether to regard S as signed or not - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - - /// @brief Create a ZExt, BitCast, or Trunc for int -> int casts. - static CastInst *CreateIntegerCast( - Value *S, ///< The integer value to be casted (operand 0) - Type *Ty, ///< The integer type to which operand is casted - bool isSigned, ///< Whether to regard S as signed or not - const Twine &Name, ///< The name for the instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// @brief Create an FPExt, BitCast, or FPTrunc for fp -> fp casts - static CastInst *CreateFPCast( - Value *S, ///< The floating point value to be casted - Type *Ty, ///< The floating point type to cast to - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - - /// @brief Create an FPExt, BitCast, or FPTrunc for fp -> fp casts - static CastInst *CreateFPCast( - Value *S, ///< The floating point value to be casted - Type *Ty, ///< The floating point type to cast to - const Twine &Name, ///< The name for the instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// @brief Create a Trunc or BitCast cast instruction - static CastInst *CreateTruncOrBitCast( - Value *S, ///< The value to be casted (operand 0) - Type *Ty, ///< The type to which cast should be made - const Twine &Name = "", ///< Name for the instruction - Instruction *InsertBefore = nullptr ///< Place to insert the instruction - ); - - /// @brief Create a Trunc or BitCast cast instruction - static CastInst *CreateTruncOrBitCast( - Value *S, ///< The value to be casted (operand 0) - Type *Ty, ///< The type to which operand is casted - const Twine &Name, ///< The name for the instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// @brief Check whether it is valid to call getCastOpcode for these types. - static bool isCastable( - Type *SrcTy, ///< The Type from which the value should be cast. - Type *DestTy ///< The Type to which the value should be cast. - ); - - /// @brief Check whether a bitcast between these types is valid - static bool isBitCastable( - Type *SrcTy, ///< The Type from which the value should be cast. - Type *DestTy ///< The Type to which the value should be cast. - ); - - /// @brief Check whether a bitcast, inttoptr, or ptrtoint cast between these - /// types is valid and a no-op. - /// - /// This ensures that any pointer<->integer cast has enough bits in the - /// integer and any other cast is a bitcast. - static bool isBitOrNoopPointerCastable( - Type *SrcTy, ///< The Type from which the value should be cast. - Type *DestTy, ///< The Type to which the value should be cast. - const DataLayout &DL); - - /// Returns the opcode necessary to cast Val into Ty using usual casting - /// rules. - /// @brief Infer the opcode for cast operand and type - static Instruction::CastOps getCastOpcode( - const Value *Val, ///< The value to cast - bool SrcIsSigned, ///< Whether to treat the source as signed - Type *Ty, ///< The Type to which the value should be casted - bool DstIsSigned ///< Whether to treate the dest. as signed - ); - - /// There are several places where we need to know if a cast instruction - /// only deals with integer source and destination types. To simplify that - /// logic, this method is provided. - /// @returns true iff the cast has only integral typed operand and dest type. - /// @brief Determine if this is an integer-only cast. - bool isIntegerCast() const; - - /// A lossless cast is one that does not alter the basic value. It implies - /// a no-op cast but is more stringent, preventing things like int->float, - /// long->double, or int->ptr. - /// @returns true iff the cast is lossless. - /// @brief Determine if this is a lossless cast. - bool isLosslessCast() const; - - /// A no-op cast is one that can be effected without changing any bits. - /// It implies that the source and destination types are the same size. The - /// IntPtrTy argument is used to make accurate determinations for casts - /// involving Integer and Pointer types. They are no-op casts if the integer - /// is the same size as the pointer. However, pointer size varies with - /// platform. Generally, the result of DataLayout::getIntPtrType() should be - /// passed in. If that's not available, use Type::Int64Ty, which will make - /// the isNoopCast call conservative. - /// @brief Determine if the described cast is a no-op cast. - static bool isNoopCast( - Instruction::CastOps Opcode, ///< Opcode of cast - Type *SrcTy, ///< SrcTy of cast - Type *DstTy, ///< DstTy of cast - Type *IntPtrTy ///< Integer type corresponding to Ptr types - ); - - /// @brief Determine if this cast is a no-op cast. - bool isNoopCast( - Type *IntPtrTy ///< Integer type corresponding to pointer - ) const; - - /// @brief Determine if this cast is a no-op cast. - /// - /// \param DL is the DataLayout to get the Int Ptr type from. - bool isNoopCast(const DataLayout &DL) const; - - /// Determine how a pair of casts can be eliminated, if they can be at all. - /// This is a helper function for both CastInst and ConstantExpr. - /// @returns 0 if the CastInst pair can't be eliminated, otherwise - /// returns Instruction::CastOps value for a cast that can replace - /// the pair, casting SrcTy to DstTy. - /// @brief Determine if a cast pair is eliminable - static unsigned isEliminableCastPair( - Instruction::CastOps firstOpcode, ///< Opcode of first cast - Instruction::CastOps secondOpcode, ///< Opcode of second cast - Type *SrcTy, ///< SrcTy of 1st cast - Type *MidTy, ///< DstTy of 1st cast & SrcTy of 2nd cast - Type *DstTy, ///< DstTy of 2nd cast - Type *SrcIntPtrTy, ///< Integer type corresponding to Ptr SrcTy, or null - Type *MidIntPtrTy, ///< Integer type corresponding to Ptr MidTy, or null - Type *DstIntPtrTy ///< Integer type corresponding to Ptr DstTy, or null - ); - - /// @brief Return the opcode of this CastInst - Instruction::CastOps getOpcode() const { - return Instruction::CastOps(Instruction::getOpcode()); - } - - /// @brief Return the source type, as a convenience - Type* getSrcTy() const { return getOperand(0)->getType(); } - /// @brief Return the destination type, as a convenience - Type* getDestTy() const { return getType(); } - - /// This method can be used to determine if a cast from S to DstTy using - /// Opcode op is valid or not. - /// @returns true iff the proposed cast is valid. - /// @brief Determine if a cast is valid without creating one. - static bool castIsValid(Instruction::CastOps op, Value *S, Type *DstTy); - - /// @brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->isCast(); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// CmpInst Class -//===----------------------------------------------------------------------===// - -/// This class is the base class for the comparison instructions. -/// @brief Abstract base class of comparison instructions. -class CmpInst : public Instruction { -public: - /// This enumeration lists the possible predicates for CmpInst subclasses. - /// Values in the range 0-31 are reserved for FCmpInst, while values in the - /// range 32-64 are reserved for ICmpInst. This is necessary to ensure the - /// predicate values are not overlapping between the classes. - /// - /// Some passes (e.g. InstCombine) depend on the bit-wise characteristics of - /// FCMP_* values. Changing the bit patterns requires a potential change to - /// those passes. - enum Predicate { - // Opcode U L G E Intuitive operation - FCMP_FALSE = 0, ///< 0 0 0 0 Always false (always folded) - FCMP_OEQ = 1, ///< 0 0 0 1 True if ordered and equal - FCMP_OGT = 2, ///< 0 0 1 0 True if ordered and greater than - FCMP_OGE = 3, ///< 0 0 1 1 True if ordered and greater than or equal - FCMP_OLT = 4, ///< 0 1 0 0 True if ordered and less than - FCMP_OLE = 5, ///< 0 1 0 1 True if ordered and less than or equal - FCMP_ONE = 6, ///< 0 1 1 0 True if ordered and operands are unequal - FCMP_ORD = 7, ///< 0 1 1 1 True if ordered (no nans) - FCMP_UNO = 8, ///< 1 0 0 0 True if unordered: isnan(X) | isnan(Y) - FCMP_UEQ = 9, ///< 1 0 0 1 True if unordered or equal - FCMP_UGT = 10, ///< 1 0 1 0 True if unordered or greater than - FCMP_UGE = 11, ///< 1 0 1 1 True if unordered, greater than, or equal - FCMP_ULT = 12, ///< 1 1 0 0 True if unordered or less than - FCMP_ULE = 13, ///< 1 1 0 1 True if unordered, less than, or equal - FCMP_UNE = 14, ///< 1 1 1 0 True if unordered or not equal - FCMP_TRUE = 15, ///< 1 1 1 1 Always true (always folded) - FIRST_FCMP_PREDICATE = FCMP_FALSE, - LAST_FCMP_PREDICATE = FCMP_TRUE, - BAD_FCMP_PREDICATE = FCMP_TRUE + 1, - ICMP_EQ = 32, ///< equal - ICMP_NE = 33, ///< not equal - ICMP_UGT = 34, ///< unsigned greater than - ICMP_UGE = 35, ///< unsigned greater or equal - ICMP_ULT = 36, ///< unsigned less than - ICMP_ULE = 37, ///< unsigned less or equal - ICMP_SGT = 38, ///< signed greater than - ICMP_SGE = 39, ///< signed greater or equal - ICMP_SLT = 40, ///< signed less than - ICMP_SLE = 41, ///< signed less or equal - FIRST_ICMP_PREDICATE = ICMP_EQ, - LAST_ICMP_PREDICATE = ICMP_SLE, - BAD_ICMP_PREDICATE = ICMP_SLE + 1 - }; - -private: - void *operator new(size_t, unsigned) = delete; - CmpInst() = delete; - -protected: - CmpInst(Type *ty, Instruction::OtherOps op, Predicate pred, - Value *LHS, Value *RHS, const Twine &Name = "", - Instruction *InsertBefore = nullptr); - - CmpInst(Type *ty, Instruction::OtherOps op, Predicate pred, - Value *LHS, Value *RHS, const Twine &Name, - BasicBlock *InsertAtEnd); - - void anchor() override; // Out of line virtual method. - -public: - // allocate space for exactly two operands - void *operator new(size_t s) { - return User::operator new(s, 2); - } - /// Construct a compare instruction, given the opcode, the predicate and - /// the two operands. Optionally (if InstBefore is specified) insert the - /// instruction into a BasicBlock right before the specified instruction. - /// The specified Instruction is allowed to be a dereferenced end iterator. - /// @brief Create a CmpInst - static CmpInst *Create(OtherOps Op, - Predicate predicate, Value *S1, - Value *S2, const Twine &Name = "", - Instruction *InsertBefore = nullptr); - - /// Construct a compare instruction, given the opcode, the predicate and the - /// two operands. Also automatically insert this instruction to the end of - /// the BasicBlock specified. - /// @brief Create a CmpInst - static CmpInst *Create(OtherOps Op, Predicate predicate, Value *S1, - Value *S2, const Twine &Name, BasicBlock *InsertAtEnd); - - /// @brief Get the opcode casted to the right type - OtherOps getOpcode() const { - return static_cast(Instruction::getOpcode()); - } - - /// @brief Return the predicate for this instruction. - Predicate getPredicate() const { - return Predicate(getSubclassDataFromInstruction()); - } - - /// @brief Set the predicate for this instruction to the specified value. - void setPredicate(Predicate P) { setInstructionSubclassData(P); } - - static bool isFPPredicate(Predicate P) { - return P >= FIRST_FCMP_PREDICATE && P <= LAST_FCMP_PREDICATE; - } - - static bool isIntPredicate(Predicate P) { - return P >= FIRST_ICMP_PREDICATE && P <= LAST_ICMP_PREDICATE; - } - - bool isFPPredicate() const { return isFPPredicate(getPredicate()); } - bool isIntPredicate() const { return isIntPredicate(getPredicate()); } - - /// For example, EQ -> NE, UGT -> ULE, SLT -> SGE, - /// OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc. - /// @returns the inverse predicate for the instruction's current predicate. - /// @brief Return the inverse of the instruction's predicate. - Predicate getInversePredicate() const { - return getInversePredicate(getPredicate()); - } - - /// For example, EQ -> NE, UGT -> ULE, SLT -> SGE, - /// OEQ -> UNE, UGT -> OLE, OLT -> UGE, etc. - /// @returns the inverse predicate for predicate provided in \p pred. - /// @brief Return the inverse of a given predicate - static Predicate getInversePredicate(Predicate pred); - - /// For example, EQ->EQ, SLE->SGE, ULT->UGT, - /// OEQ->OEQ, ULE->UGE, OLT->OGT, etc. - /// @returns the predicate that would be the result of exchanging the two - /// operands of the CmpInst instruction without changing the result - /// produced. - /// @brief Return the predicate as if the operands were swapped - Predicate getSwappedPredicate() const { - return getSwappedPredicate(getPredicate()); - } - - /// This is a static version that you can use without an instruction - /// available. - /// @brief Return the predicate as if the operands were swapped. - static Predicate getSwappedPredicate(Predicate pred); - - /// @brief Provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// This is just a convenience that dispatches to the subclasses. - /// @brief Swap the operands and adjust predicate accordingly to retain - /// the same comparison. - void swapOperands(); - - /// This is just a convenience that dispatches to the subclasses. - /// @brief Determine if this CmpInst is commutative. - bool isCommutative() const; - - /// This is just a convenience that dispatches to the subclasses. - /// @brief Determine if this is an equals/not equals predicate. - bool isEquality() const; - - /// @returns true if the comparison is signed, false otherwise. - /// @brief Determine if this instruction is using a signed comparison. - bool isSigned() const { - return isSigned(getPredicate()); - } - - /// @returns true if the comparison is unsigned, false otherwise. - /// @brief Determine if this instruction is using an unsigned comparison. - bool isUnsigned() const { - return isUnsigned(getPredicate()); - } - - /// For example, ULT->SLT, ULE->SLE, UGT->SGT, UGE->SGE, SLT->Failed assert - /// @returns the signed version of the unsigned predicate pred. - /// @brief return the signed version of a predicate - static Predicate getSignedPredicate(Predicate pred); - - /// For example, ULT->SLT, ULE->SLE, UGT->SGT, UGE->SGE, SLT->Failed assert - /// @returns the signed version of the predicate for this instruction (which - /// has to be an unsigned predicate). - /// @brief return the signed version of a predicate - Predicate getSignedPredicate() { - return getSignedPredicate(getPredicate()); - } - - /// This is just a convenience. - /// @brief Determine if this is true when both operands are the same. - bool isTrueWhenEqual() const { - return isTrueWhenEqual(getPredicate()); - } - - /// This is just a convenience. - /// @brief Determine if this is false when both operands are the same. - bool isFalseWhenEqual() const { - return isFalseWhenEqual(getPredicate()); - } - - /// @brief Determine if Pred1 implies Pred2 is true when two compares have - /// matching operands. - bool isImpliedTrueByMatchingCmp(Predicate Pred2) { - return isImpliedTrueByMatchingCmp(getPredicate(), Pred2); - } - - /// @brief Determine if Pred1 implies Pred2 is false when two compares have - /// matching operands. - bool isImpliedFalseByMatchingCmp(Predicate Pred2) { - return isImpliedFalseByMatchingCmp(getPredicate(), Pred2); - } - - /// @returns true if the predicate is unsigned, false otherwise. - /// @brief Determine if the predicate is an unsigned operation. - static bool isUnsigned(Predicate predicate); - - /// @returns true if the predicate is signed, false otherwise. - /// @brief Determine if the predicate is an signed operation. - static bool isSigned(Predicate predicate); - - /// @brief Determine if the predicate is an ordered operation. - static bool isOrdered(Predicate predicate); - - /// @brief Determine if the predicate is an unordered operation. - static bool isUnordered(Predicate predicate); - - /// Determine if the predicate is true when comparing a value with itself. - static bool isTrueWhenEqual(Predicate predicate); - - /// Determine if the predicate is false when comparing a value with itself. - static bool isFalseWhenEqual(Predicate predicate); - - /// Determine if Pred1 implies Pred2 is true when two compares have matching - /// operands. - static bool isImpliedTrueByMatchingCmp(Predicate Pred1, Predicate Pred2); - - /// Determine if Pred1 implies Pred2 is false when two compares have matching - /// operands. - static bool isImpliedFalseByMatchingCmp(Predicate Pred1, Predicate Pred2); - - /// @brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::ICmp || - I->getOpcode() == Instruction::FCmp; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - /// @brief Create a result type for fcmp/icmp - static Type* makeCmpResultType(Type* opnd_type) { - if (VectorType* vt = dyn_cast(opnd_type)) { - return VectorType::get(Type::getInt1Ty(opnd_type->getContext()), - vt->getNumElements()); - } - return Type::getInt1Ty(opnd_type->getContext()); - } - -private: - // Shadow Value::setValueSubclassData with a private forwarding method so that - // subclasses cannot accidentally use it. - void setValueSubclassData(unsigned short D) { - Value::setValueSubclassData(D); - } -}; - -// FIXME: these are redundant if CmpInst < BinaryOperator -template <> -struct OperandTraits : public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CmpInst, Value) - -//===----------------------------------------------------------------------===// -// FuncletPadInst Class -//===----------------------------------------------------------------------===// -class FuncletPadInst : public Instruction { -private: - void init(Value *ParentPad, ArrayRef Args, const Twine &NameStr); - - FuncletPadInst(const FuncletPadInst &CPI); - - explicit FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad, - ArrayRef Args, unsigned Values, - const Twine &NameStr, Instruction *InsertBefore); - explicit FuncletPadInst(Instruction::FuncletPadOps Op, Value *ParentPad, - ArrayRef Args, unsigned Values, - const Twine &NameStr, BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - friend class CatchPadInst; - friend class CleanupPadInst; - FuncletPadInst *cloneImpl() const; - -public: - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// getNumArgOperands - Return the number of funcletpad arguments. - /// - unsigned getNumArgOperands() const { return getNumOperands() - 1; } - - /// Convenience accessors - - /// \brief Return the outer EH-pad this funclet is nested within. - /// - /// Note: This returns the associated CatchSwitchInst if this FuncletPadInst - /// is a CatchPadInst. - Value *getParentPad() const { return Op<-1>(); } - void setParentPad(Value *ParentPad) { - assert(ParentPad); - Op<-1>() = ParentPad; - } - - /// getArgOperand/setArgOperand - Return/set the i-th funcletpad argument. - /// - Value *getArgOperand(unsigned i) const { return getOperand(i); } - void setArgOperand(unsigned i, Value *v) { setOperand(i, v); } - - /// arg_operands - iteration adapter for range-for loops. - op_range arg_operands() { return op_range(op_begin(), op_end() - 1); } - - /// arg_operands - iteration adapter for range-for loops. - const_op_range arg_operands() const { - return const_op_range(op_begin(), op_end() - 1); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { return I->isFuncletPad(); } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits - : public VariadicOperandTraits {}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(FuncletPadInst, Value) - -/// \brief A lightweight accessor for an operand bundle meant to be passed -/// around by value. -struct OperandBundleUse { - ArrayRef Inputs; - - OperandBundleUse() {} - explicit OperandBundleUse(StringMapEntry *Tag, ArrayRef Inputs) - : Inputs(Inputs), Tag(Tag) {} - - /// \brief Return true if the operand at index \p Idx in this operand bundle - /// has the attribute A. - bool operandHasAttr(unsigned Idx, Attribute::AttrKind A) const { - if (isDeoptOperandBundle()) - if (A == Attribute::ReadOnly || A == Attribute::NoCapture) - return Inputs[Idx]->getType()->isPointerTy(); - - // Conservative answer: no operands have any attributes. - return false; - }; - - /// \brief Return the tag of this operand bundle as a string. - StringRef getTagName() const { - return Tag->getKey(); - } - - /// \brief Return the tag of this operand bundle as an integer. - /// - /// Operand bundle tags are interned by LLVMContextImpl::getOrInsertBundleTag, - /// and this function returns the unique integer getOrInsertBundleTag - /// associated the tag of this operand bundle to. - uint32_t getTagID() const { - return Tag->getValue(); - } - - /// \brief Return true if this is a "deopt" operand bundle. - bool isDeoptOperandBundle() const { - return getTagID() == LLVMContext::OB_deopt; - } - - /// \brief Return true if this is a "funclet" operand bundle. - bool isFuncletOperandBundle() const { - return getTagID() == LLVMContext::OB_funclet; - } - -private: - /// \brief Pointer to an entry in LLVMContextImpl::getOrInsertBundleTag. - StringMapEntry *Tag; -}; - -/// \brief A container for an operand bundle being viewed as a set of values -/// rather than a set of uses. -/// -/// Unlike OperandBundleUse, OperandBundleDefT owns the memory it carries, and -/// so it is possible to create and pass around "self-contained" instances of -/// OperandBundleDef and ConstOperandBundleDef. -template class OperandBundleDefT { - std::string Tag; - std::vector Inputs; - -public: - explicit OperandBundleDefT(std::string Tag, std::vector Inputs) - : Tag(std::move(Tag)), Inputs(std::move(Inputs)) {} - explicit OperandBundleDefT(std::string Tag, ArrayRef Inputs) - : Tag(std::move(Tag)), Inputs(Inputs) {} - - explicit OperandBundleDefT(const OperandBundleUse &OBU) { - Tag = OBU.getTagName(); - Inputs.insert(Inputs.end(), OBU.Inputs.begin(), OBU.Inputs.end()); - } - - ArrayRef inputs() const { return Inputs; } - - typedef typename std::vector::const_iterator input_iterator; - size_t input_size() const { return Inputs.size(); } - input_iterator input_begin() const { return Inputs.begin(); } - input_iterator input_end() const { return Inputs.end(); } - - StringRef getTag() const { return Tag; } -}; - -typedef OperandBundleDefT OperandBundleDef; -typedef OperandBundleDefT ConstOperandBundleDef; - -/// \brief A mixin to add operand bundle functionality to llvm instruction -/// classes. -/// -/// OperandBundleUser uses the descriptor area co-allocated with the host User -/// to store some meta information about which operands are "normal" operands, -/// and which ones belong to some operand bundle. -/// -/// The layout of an operand bundle user is -/// -/// +-----------uint32_t End-------------------------------------+ -/// | | -/// | +--------uint32_t Begin--------------------+ | -/// | | | | -/// ^ ^ v v -/// |------|------|----|----|----|----|----|---------|----|---------|----|----- -/// | BOI0 | BOI1 | .. | DU | U0 | U1 | .. | BOI0_U0 | .. | BOI1_U0 | .. | Un -/// |------|------|----|----|----|----|----|---------|----|---------|----|----- -/// v v ^ ^ -/// | | | | -/// | +--------uint32_t Begin------------+ | -/// | | -/// +-----------uint32_t End-----------------------------+ -/// -/// -/// BOI0, BOI1 ... are descriptions of operand bundles in this User's use list. -/// These descriptions are installed and managed by this class, and they're all -/// instances of OperandBundleUser::BundleOpInfo. -/// -/// DU is an additional descriptor installed by User's 'operator new' to keep -/// track of the 'BOI0 ... BOIN' co-allocation. OperandBundleUser does not -/// access or modify DU in any way, it's an implementation detail private to -/// User. -/// -/// The regular Use& vector for the User starts at U0. The operand bundle uses -/// are part of the Use& vector, just like normal uses. In the diagram above, -/// the operand bundle uses start at BOI0_U0. Each instance of BundleOpInfo has -/// information about a contiguous set of uses constituting an operand bundle, -/// and the total set of operand bundle uses themselves form a contiguous set of -/// uses (i.e. there are no gaps between uses corresponding to individual -/// operand bundles). -/// -/// This class does not know the location of the set of operand bundle uses -/// within the use list -- that is decided by the User using this class via the -/// BeginIdx argument in populateBundleOperandInfos. -/// -/// Currently operand bundle users with hung-off operands are not supported. -template class OperandBundleUser { -public: - /// \brief Return the number of operand bundles associated with this User. - unsigned getNumOperandBundles() const { - return std::distance(bundle_op_info_begin(), bundle_op_info_end()); - } - - /// \brief Return true if this User has any operand bundles. - bool hasOperandBundles() const { return getNumOperandBundles() != 0; } - - /// \brief Return the index of the first bundle operand in the Use array. - unsigned getBundleOperandsStartIndex() const { - assert(hasOperandBundles() && "Don't call otherwise!"); - return bundle_op_info_begin()->Begin; - } - - /// \brief Return the index of the last bundle operand in the Use array. - unsigned getBundleOperandsEndIndex() const { - assert(hasOperandBundles() && "Don't call otherwise!"); - return bundle_op_info_end()[-1].End; - } - - /// \brief Return the total number operands (not operand bundles) used by - /// every operand bundle in this OperandBundleUser. - unsigned getNumTotalBundleOperands() const { - if (!hasOperandBundles()) - return 0; - - unsigned Begin = getBundleOperandsStartIndex(); - unsigned End = getBundleOperandsEndIndex(); - - assert(Begin <= End && "Should be!"); - return End - Begin; - } - - /// \brief Return the operand bundle at a specific index. - OperandBundleUse getOperandBundleAt(unsigned Index) const { - assert(Index < getNumOperandBundles() && "Index out of bounds!"); - return operandBundleFromBundleOpInfo(*(bundle_op_info_begin() + Index)); - } - - /// \brief Return the number of operand bundles with the tag Name attached to - /// this instruction. - unsigned countOperandBundlesOfType(StringRef Name) const { - unsigned Count = 0; - for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) - if (getOperandBundleAt(i).getTagName() == Name) - Count++; - - return Count; - } - - /// \brief Return the number of operand bundles with the tag ID attached to - /// this instruction. - unsigned countOperandBundlesOfType(uint32_t ID) const { - unsigned Count = 0; - for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) - if (getOperandBundleAt(i).getTagID() == ID) - Count++; - - return Count; - } - - /// \brief Return an operand bundle by name, if present. - /// - /// It is an error to call this for operand bundle types that may have - /// multiple instances of them on the same instruction. - Optional getOperandBundle(StringRef Name) const { - assert(countOperandBundlesOfType(Name) < 2 && "Precondition violated!"); - - for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) { - OperandBundleUse U = getOperandBundleAt(i); - if (U.getTagName() == Name) - return U; - } - - return None; - } - - /// \brief Return an operand bundle by tag ID, if present. - /// - /// It is an error to call this for operand bundle types that may have - /// multiple instances of them on the same instruction. - Optional getOperandBundle(uint32_t ID) const { - assert(countOperandBundlesOfType(ID) < 2 && "Precondition violated!"); - - for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) { - OperandBundleUse U = getOperandBundleAt(i); - if (U.getTagID() == ID) - return U; - } - - return None; - } - - /// \brief Return the list of operand bundles attached to this instruction as - /// a vector of OperandBundleDefs. - /// - /// This function copies the OperandBundeUse instances associated with this - /// OperandBundleUser to a vector of OperandBundleDefs. Note: - /// OperandBundeUses and OperandBundleDefs are non-trivially *different* - /// representations of operand bundles (see documentation above). - void getOperandBundlesAsDefs(SmallVectorImpl &Defs) const { - for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) - Defs.emplace_back(getOperandBundleAt(i)); - } - - /// \brief Return the operand bundle for the operand at index OpIdx. - /// - /// It is an error to call this with an OpIdx that does not correspond to an - /// bundle operand. - OperandBundleUse getOperandBundleForOperand(unsigned OpIdx) const { - return operandBundleFromBundleOpInfo(getBundleOpInfoForOperand(OpIdx)); - } - - /// \brief Return true if this operand bundle user has operand bundles that - /// may read from the heap. - bool hasReadingOperandBundles() const { - // Implementation note: this is a conservative implementation of operand - // bundle semantics, where *any* operand bundle forces a callsite to be at - // least readonly. - return hasOperandBundles(); - } - - /// \brief Return true if this operand bundle user has operand bundles that - /// may write to the heap. - bool hasClobberingOperandBundles() const { - for (auto &BOI : bundle_op_infos()) { - if (BOI.Tag->second == LLVMContext::OB_deopt || - BOI.Tag->second == LLVMContext::OB_funclet) - continue; - - // This instruction has an operand bundle that is not known to us. - // Assume the worst. - return true; - } - - return false; - } - - /// \brief Return true if the bundle operand at index \p OpIdx has the - /// attribute \p A. - bool bundleOperandHasAttr(unsigned OpIdx, Attribute::AttrKind A) const { - auto &BOI = getBundleOpInfoForOperand(OpIdx); - auto OBU = operandBundleFromBundleOpInfo(BOI); - return OBU.operandHasAttr(OpIdx - BOI.Begin, A); - } - - /// \brief Return true if \p Other has the same sequence of operand bundle - /// tags with the same number of operands on each one of them as this - /// OperandBundleUser. - bool hasIdenticalOperandBundleSchema( - const OperandBundleUser &Other) const { - if (getNumOperandBundles() != Other.getNumOperandBundles()) - return false; - - return std::equal(bundle_op_info_begin(), bundle_op_info_end(), - Other.bundle_op_info_begin()); - }; - - /// \brief Return true if this operand bundle user contains operand bundles - /// with tags other than those specified in \p IDs. - bool hasOperandBundlesOtherThan(ArrayRef IDs) const { - for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) { - uint32_t ID = getOperandBundleAt(i).getTagID(); - if (std::find(IDs.begin(), IDs.end(), ID) == IDs.end()) - return true; - } - return false; - } - -protected: - /// \brief Is the function attribute S disallowed by some operand bundle on - /// this operand bundle user? - bool isFnAttrDisallowedByOpBundle(StringRef S) const { - // Operand bundles only possibly disallow readnone, readonly and argmenonly - // attributes. All String attributes are fine. - return false; - } - - /// \brief Is the function attribute A disallowed by some operand bundle on - /// this operand bundle user? - bool isFnAttrDisallowedByOpBundle(Attribute::AttrKind A) const { - switch (A) { - default: - return false; - - case Attribute::ArgMemOnly: - return hasReadingOperandBundles(); - - case Attribute::ReadNone: - return hasReadingOperandBundles(); - - case Attribute::ReadOnly: - return hasClobberingOperandBundles(); - } - - llvm_unreachable("switch has a default case!"); - } - - /// \brief Used to keep track of an operand bundle. See the main comment on - /// OperandBundleUser above. - struct BundleOpInfo { - /// \brief The operand bundle tag, interned by - /// LLVMContextImpl::getOrInsertBundleTag. - StringMapEntry *Tag; - - /// \brief The index in the Use& vector where operands for this operand - /// bundle starts. - uint32_t Begin; - - /// \brief The index in the Use& vector where operands for this operand - /// bundle ends. - uint32_t End; - - bool operator==(const BundleOpInfo &Other) const { - return Tag == Other.Tag && Begin == Other.Begin && End == Other.End; - } - }; - - /// \brief Simple helper function to map a BundleOpInfo to an - /// OperandBundleUse. - OperandBundleUse - operandBundleFromBundleOpInfo(const BundleOpInfo &BOI) const { - auto op_begin = static_cast(this)->op_begin(); - ArrayRef Inputs(op_begin + BOI.Begin, op_begin + BOI.End); - return OperandBundleUse(BOI.Tag, Inputs); - } - - typedef BundleOpInfo *bundle_op_iterator; - typedef const BundleOpInfo *const_bundle_op_iterator; - - /// \brief Return the start of the list of BundleOpInfo instances associated - /// with this OperandBundleUser. - bundle_op_iterator bundle_op_info_begin() { - if (!static_cast(this)->hasDescriptor()) - return nullptr; - - uint8_t *BytesBegin = static_cast(this)->getDescriptor().begin(); - return reinterpret_cast(BytesBegin); - } - - /// \brief Return the start of the list of BundleOpInfo instances associated - /// with this OperandBundleUser. - const_bundle_op_iterator bundle_op_info_begin() const { - auto *NonConstThis = - const_cast *>(this); - return NonConstThis->bundle_op_info_begin(); - } - - /// \brief Return the end of the list of BundleOpInfo instances associated - /// with this OperandBundleUser. - bundle_op_iterator bundle_op_info_end() { - if (!static_cast(this)->hasDescriptor()) - return nullptr; - - uint8_t *BytesEnd = static_cast(this)->getDescriptor().end(); - return reinterpret_cast(BytesEnd); - } - - /// \brief Return the end of the list of BundleOpInfo instances associated - /// with this OperandBundleUser. - const_bundle_op_iterator bundle_op_info_end() const { - auto *NonConstThis = - const_cast *>(this); - return NonConstThis->bundle_op_info_end(); - } - - /// \brief Return the range [\p bundle_op_info_begin, \p bundle_op_info_end). - iterator_range bundle_op_infos() { - return make_range(bundle_op_info_begin(), bundle_op_info_end()); - } - - /// \brief Return the range [\p bundle_op_info_begin, \p bundle_op_info_end). - iterator_range bundle_op_infos() const { - return make_range(bundle_op_info_begin(), bundle_op_info_end()); - } - - /// \brief Populate the BundleOpInfo instances and the Use& vector from \p - /// Bundles. Return the op_iterator pointing to the Use& one past the last - /// last bundle operand use. - /// - /// Each \p OperandBundleDef instance is tracked by a OperandBundleInfo - /// instance allocated in this User's descriptor. - OpIteratorTy populateBundleOperandInfos(ArrayRef Bundles, - const unsigned BeginIndex) { - auto It = static_cast(this)->op_begin() + BeginIndex; - for (auto &B : Bundles) - It = std::copy(B.input_begin(), B.input_end(), It); - - auto *ContextImpl = static_cast(this)->getContext().pImpl; - auto BI = Bundles.begin(); - unsigned CurrentIndex = BeginIndex; - - for (auto &BOI : bundle_op_infos()) { - assert(BI != Bundles.end() && "Incorrect allocation?"); - - BOI.Tag = ContextImpl->getOrInsertBundleTag(BI->getTag()); - BOI.Begin = CurrentIndex; - BOI.End = CurrentIndex + BI->input_size(); - CurrentIndex = BOI.End; - BI++; - } - - assert(BI == Bundles.end() && "Incorrect allocation?"); - - return It; - } - - /// \brief Return the BundleOpInfo for the operand at index OpIdx. - /// - /// It is an error to call this with an OpIdx that does not correspond to an - /// bundle operand. - const BundleOpInfo &getBundleOpInfoForOperand(unsigned OpIdx) const { - for (auto &BOI : bundle_op_infos()) - if (BOI.Begin <= OpIdx && OpIdx < BOI.End) - return BOI; - - llvm_unreachable("Did not find operand bundle for operand!"); - } - - /// \brief Return the total number of values used in \p Bundles. - static unsigned CountBundleInputs(ArrayRef Bundles) { - unsigned Total = 0; - for (auto &B : Bundles) - Total += B.input_size(); - return Total; - } -}; - -} // end llvm namespace - -#endif // LLVM_IR_INSTRTYPES_H diff --git a/llvm/include/llvm/IR/Instruction.def b/llvm/include/llvm/IR/Instruction.def deleted file mode 100644 index 18711abb..00000000 --- a/llvm/include/llvm/IR/Instruction.def +++ /dev/null @@ -1,225 +0,0 @@ -//===-- llvm/Instruction.def - File that describes Instructions -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains descriptions of the various LLVM instructions. This is -// used as a central place for enumerating the different instructions and -// should eventually be the place to put comments about the instructions. -// -//===----------------------------------------------------------------------===// - -// NOTE: NO INCLUDE GUARD DESIRED! - -// Provide definitions of macros so that users of this file do not have to -// define everything to use it... -// -#ifndef FIRST_TERM_INST -#define FIRST_TERM_INST(num) -#endif -#ifndef HANDLE_TERM_INST -#ifndef HANDLE_INST -#define HANDLE_TERM_INST(num, opcode, Class) -#else -#define HANDLE_TERM_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class) -#endif -#endif -#ifndef LAST_TERM_INST -#define LAST_TERM_INST(num) -#endif - -#ifndef FIRST_BINARY_INST -#define FIRST_BINARY_INST(num) -#endif -#ifndef HANDLE_BINARY_INST -#ifndef HANDLE_INST -#define HANDLE_BINARY_INST(num, opcode, instclass) -#else -#define HANDLE_BINARY_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class) -#endif -#endif -#ifndef LAST_BINARY_INST -#define LAST_BINARY_INST(num) -#endif - -#ifndef FIRST_MEMORY_INST -#define FIRST_MEMORY_INST(num) -#endif -#ifndef HANDLE_MEMORY_INST -#ifndef HANDLE_INST -#define HANDLE_MEMORY_INST(num, opcode, Class) -#else -#define HANDLE_MEMORY_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class) -#endif -#endif -#ifndef LAST_MEMORY_INST -#define LAST_MEMORY_INST(num) -#endif - -#ifndef FIRST_CAST_INST -#define FIRST_CAST_INST(num) -#endif -#ifndef HANDLE_CAST_INST -#ifndef HANDLE_INST -#define HANDLE_CAST_INST(num, opcode, Class) -#else -#define HANDLE_CAST_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class) -#endif -#endif -#ifndef LAST_CAST_INST -#define LAST_CAST_INST(num) -#endif - -#ifndef FIRST_FUNCLETPAD_INST -#define FIRST_FUNCLETPAD_INST(num) -#endif -#ifndef HANDLE_FUNCLETPAD_INST -#ifndef HANDLE_INST -#define HANDLE_FUNCLETPAD_INST(num, opcode, Class) -#else -#define HANDLE_FUNCLETPAD_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class) -#endif -#endif -#ifndef LAST_FUNCLETPAD_INST -#define LAST_FUNCLETPAD_INST(num) -#endif - -#ifndef FIRST_OTHER_INST -#define FIRST_OTHER_INST(num) -#endif -#ifndef HANDLE_OTHER_INST -#ifndef HANDLE_INST -#define HANDLE_OTHER_INST(num, opcode, Class) -#else -#define HANDLE_OTHER_INST(num, opcode, Class) HANDLE_INST(num, opcode, Class) -#endif -#endif -#ifndef LAST_OTHER_INST -#define LAST_OTHER_INST(num) -#endif - -// Terminator Instructions - These instructions are used to terminate a basic -// block of the program. Every basic block must end with one of these -// instructions for it to be a well formed basic block. -// - FIRST_TERM_INST ( 1) -HANDLE_TERM_INST ( 1, Ret , ReturnInst) -HANDLE_TERM_INST ( 2, Br , BranchInst) -HANDLE_TERM_INST ( 3, Switch , SwitchInst) -HANDLE_TERM_INST ( 4, IndirectBr , IndirectBrInst) -HANDLE_TERM_INST ( 5, Invoke , InvokeInst) -HANDLE_TERM_INST ( 6, Resume , ResumeInst) -HANDLE_TERM_INST ( 7, Unreachable , UnreachableInst) -HANDLE_TERM_INST ( 8, CleanupRet , CleanupReturnInst) -HANDLE_TERM_INST ( 9, CatchRet , CatchReturnInst) -HANDLE_TERM_INST (10, CatchSwitch , CatchSwitchInst) - LAST_TERM_INST (10) - -// Standard binary operators... - FIRST_BINARY_INST(11) -HANDLE_BINARY_INST(11, Add , BinaryOperator) -HANDLE_BINARY_INST(12, FAdd , BinaryOperator) -HANDLE_BINARY_INST(13, Sub , BinaryOperator) -HANDLE_BINARY_INST(14, FSub , BinaryOperator) -HANDLE_BINARY_INST(15, Mul , BinaryOperator) -HANDLE_BINARY_INST(16, FMul , BinaryOperator) -HANDLE_BINARY_INST(17, UDiv , BinaryOperator) -HANDLE_BINARY_INST(18, SDiv , BinaryOperator) -HANDLE_BINARY_INST(19, FDiv , BinaryOperator) -HANDLE_BINARY_INST(20, URem , BinaryOperator) -HANDLE_BINARY_INST(21, SRem , BinaryOperator) -HANDLE_BINARY_INST(22, FRem , BinaryOperator) - -// Logical operators (integer operands) -HANDLE_BINARY_INST(23, Shl , BinaryOperator) // Shift left (logical) -HANDLE_BINARY_INST(24, LShr , BinaryOperator) // Shift right (logical) -HANDLE_BINARY_INST(25, AShr , BinaryOperator) // Shift right (arithmetic) -HANDLE_BINARY_INST(26, And , BinaryOperator) -HANDLE_BINARY_INST(27, Or , BinaryOperator) -HANDLE_BINARY_INST(28, Xor , BinaryOperator) - LAST_BINARY_INST(28) - -// Memory operators... - FIRST_MEMORY_INST(29) -HANDLE_MEMORY_INST(29, Alloca, AllocaInst) // Stack management -HANDLE_MEMORY_INST(30, Load , LoadInst ) // Memory manipulation instrs -HANDLE_MEMORY_INST(31, Store , StoreInst ) -HANDLE_MEMORY_INST(32, GetElementPtr, GetElementPtrInst) -HANDLE_MEMORY_INST(33, Fence , FenceInst ) -HANDLE_MEMORY_INST(34, AtomicCmpXchg , AtomicCmpXchgInst ) -HANDLE_MEMORY_INST(35, AtomicRMW , AtomicRMWInst ) - LAST_MEMORY_INST(35) - -// Cast operators ... -// NOTE: The order matters here because CastInst::isEliminableCastPair -// NOTE: (see Instructions.cpp) encodes a table based on this ordering. - FIRST_CAST_INST(36) -HANDLE_CAST_INST(36, Trunc , TruncInst ) // Truncate integers -HANDLE_CAST_INST(37, ZExt , ZExtInst ) // Zero extend integers -HANDLE_CAST_INST(38, SExt , SExtInst ) // Sign extend integers -HANDLE_CAST_INST(39, FPToUI , FPToUIInst ) // floating point -> UInt -HANDLE_CAST_INST(40, FPToSI , FPToSIInst ) // floating point -> SInt -HANDLE_CAST_INST(41, UIToFP , UIToFPInst ) // UInt -> floating point -HANDLE_CAST_INST(42, SIToFP , SIToFPInst ) // SInt -> floating point -HANDLE_CAST_INST(43, FPTrunc , FPTruncInst ) // Truncate floating point -HANDLE_CAST_INST(44, FPExt , FPExtInst ) // Extend floating point -HANDLE_CAST_INST(45, PtrToInt, PtrToIntInst) // Pointer -> Integer -HANDLE_CAST_INST(46, IntToPtr, IntToPtrInst) // Integer -> Pointer -HANDLE_CAST_INST(47, BitCast , BitCastInst ) // Type cast -HANDLE_CAST_INST(48, AddrSpaceCast, AddrSpaceCastInst) // addrspace cast - LAST_CAST_INST(48) - - FIRST_FUNCLETPAD_INST(49) -HANDLE_FUNCLETPAD_INST(49, CleanupPad, CleanupPadInst) -HANDLE_FUNCLETPAD_INST(50, CatchPad , CatchPadInst) - LAST_FUNCLETPAD_INST(50) - -// Other operators... - FIRST_OTHER_INST(51) -HANDLE_OTHER_INST(51, ICmp , ICmpInst ) // Integer comparison instruction -HANDLE_OTHER_INST(52, FCmp , FCmpInst ) // Floating point comparison instr. -HANDLE_OTHER_INST(53, PHI , PHINode ) // PHI node instruction -HANDLE_OTHER_INST(54, Call , CallInst ) // Call a function -HANDLE_OTHER_INST(55, Select , SelectInst ) // select instruction -HANDLE_OTHER_INST(56, UserOp1, Instruction) // May be used internally in a pass -HANDLE_OTHER_INST(57, UserOp2, Instruction) // Internal to passes only -HANDLE_OTHER_INST(58, VAArg , VAArgInst ) // vaarg instruction -HANDLE_OTHER_INST(59, ExtractElement, ExtractElementInst)// extract from vector -HANDLE_OTHER_INST(60, InsertElement, InsertElementInst) // insert into vector -HANDLE_OTHER_INST(61, ShuffleVector, ShuffleVectorInst) // shuffle two vectors. -HANDLE_OTHER_INST(62, ExtractValue, ExtractValueInst)// extract from aggregate -HANDLE_OTHER_INST(63, InsertValue, InsertValueInst) // insert into aggregate -HANDLE_OTHER_INST(64, LandingPad, LandingPadInst) // Landing pad instruction. - LAST_OTHER_INST(64) - -#undef FIRST_TERM_INST -#undef HANDLE_TERM_INST -#undef LAST_TERM_INST - -#undef FIRST_BINARY_INST -#undef HANDLE_BINARY_INST -#undef LAST_BINARY_INST - -#undef FIRST_MEMORY_INST -#undef HANDLE_MEMORY_INST -#undef LAST_MEMORY_INST - -#undef FIRST_CAST_INST -#undef HANDLE_CAST_INST -#undef LAST_CAST_INST - -#undef FIRST_FUNCLETPAD_INST -#undef HANDLE_FUNCLETPAD_INST -#undef LAST_FUNCLETPAD_INST - -#undef FIRST_OTHER_INST -#undef HANDLE_OTHER_INST -#undef LAST_OTHER_INST - -#ifdef HANDLE_INST -#undef HANDLE_INST -#endif diff --git a/llvm/include/llvm/IR/Instruction.h b/llvm/include/llvm/IR/Instruction.h deleted file mode 100644 index df4f8df7..00000000 --- a/llvm/include/llvm/IR/Instruction.h +++ /dev/null @@ -1,587 +0,0 @@ -//===-- llvm/Instruction.h - Instruction class definition -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the Instruction class, which is the -// base class for all of the LLVM instructions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_INSTRUCTION_H -#define LLVM_IR_INSTRUCTION_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/IR/DebugLoc.h" -#include "llvm/IR/SymbolTableListTraits.h" -#include "llvm/IR/User.h" - -namespace llvm { - -class FastMathFlags; -class LLVMContext; -class MDNode; -class BasicBlock; -struct AAMDNodes; - -template <> -struct SymbolTableListSentinelTraits - : public ilist_half_embedded_sentinel_traits {}; - -class Instruction : public User, - public ilist_node_with_parent { - void operator=(const Instruction &) = delete; - Instruction(const Instruction &) = delete; - - BasicBlock *Parent; - DebugLoc DbgLoc; // 'dbg' Metadata cache. - - enum { - /// This is a bit stored in the SubClassData field which indicates whether - /// this instruction has metadata attached to it or not. - HasMetadataBit = 1 << 15 - }; -public: - // Out of line virtual method, so the vtable, etc has a home. - ~Instruction() override; - - /// Specialize the methods defined in Value, as we know that an instruction - /// can only be used by other instructions. - Instruction *user_back() { return cast(*user_begin());} - const Instruction *user_back() const { return cast(*user_begin());} - - inline const BasicBlock *getParent() const { return Parent; } - inline BasicBlock *getParent() { return Parent; } - - /// Return the module owning the function this instruction belongs to - /// or nullptr it the function does not have a module. - /// - /// Note: this is undefined behavior if the instruction does not have a - /// parent, or the parent basic block does not have a parent function. - const Module *getModule() const; - Module *getModule(); - - /// Return the function this instruction belongs to. - /// - /// Note: it is undefined behavior to call this on an instruction not - /// currently inserted into a function. - const Function *getFunction() const; - Function *getFunction(); - - /// This method unlinks 'this' from the containing basic block, but does not - /// delete it. - void removeFromParent(); - - /// This method unlinks 'this' from the containing basic block and deletes it. - /// - /// \returns an iterator pointing to the element after the erased one - SymbolTableList::iterator eraseFromParent(); - - /// Insert an unlinked instruction into a basic block immediately before - /// the specified instruction. - void insertBefore(Instruction *InsertPos); - - /// Insert an unlinked instruction into a basic block immediately after the - /// specified instruction. - void insertAfter(Instruction *InsertPos); - - /// Unlink this instruction from its current basic block and insert it into - /// the basic block that MovePos lives in, right before MovePos. - void moveBefore(Instruction *MovePos); - - //===--------------------------------------------------------------------===// - // Subclass classification. - //===--------------------------------------------------------------------===// - - /// Returns a member of one of the enums like Instruction::Add. - unsigned getOpcode() const { return getValueID() - InstructionVal; } - - const char *getOpcodeName() const { return getOpcodeName(getOpcode()); } - bool isTerminator() const { return isTerminator(getOpcode()); } - bool isBinaryOp() const { return isBinaryOp(getOpcode()); } - bool isShift() { return isShift(getOpcode()); } - bool isCast() const { return isCast(getOpcode()); } - bool isFuncletPad() const { return isFuncletPad(getOpcode()); } - - static const char* getOpcodeName(unsigned OpCode); - - static inline bool isTerminator(unsigned OpCode) { - return OpCode >= TermOpsBegin && OpCode < TermOpsEnd; - } - - static inline bool isBinaryOp(unsigned Opcode) { - return Opcode >= BinaryOpsBegin && Opcode < BinaryOpsEnd; - } - - /// Determine if the Opcode is one of the shift instructions. - static inline bool isShift(unsigned Opcode) { - return Opcode >= Shl && Opcode <= AShr; - } - - /// Return true if this is a logical shift left or a logical shift right. - inline bool isLogicalShift() const { - return getOpcode() == Shl || getOpcode() == LShr; - } - - /// Return true if this is an arithmetic shift right. - inline bool isArithmeticShift() const { - return getOpcode() == AShr; - } - - /// Determine if the OpCode is one of the CastInst instructions. - static inline bool isCast(unsigned OpCode) { - return OpCode >= CastOpsBegin && OpCode < CastOpsEnd; - } - - /// Determine if the OpCode is one of the FuncletPadInst instructions. - static inline bool isFuncletPad(unsigned OpCode) { - return OpCode >= FuncletPadOpsBegin && OpCode < FuncletPadOpsEnd; - } - - //===--------------------------------------------------------------------===// - // Metadata manipulation. - //===--------------------------------------------------------------------===// - - /// Return true if this instruction has any metadata attached to it. - bool hasMetadata() const { return DbgLoc || hasMetadataHashEntry(); } - - /// Return true if this instruction has metadata attached to it other than a - /// debug location. - bool hasMetadataOtherThanDebugLoc() const { - return hasMetadataHashEntry(); - } - - /// Get the metadata of given kind attached to this Instruction. - /// If the metadata is not found then return null. - MDNode *getMetadata(unsigned KindID) const { - if (!hasMetadata()) return nullptr; - return getMetadataImpl(KindID); - } - - /// Get the metadata of given kind attached to this Instruction. - /// If the metadata is not found then return null. - MDNode *getMetadata(StringRef Kind) const { - if (!hasMetadata()) return nullptr; - return getMetadataImpl(Kind); - } - - /// Get all metadata attached to this Instruction. The first element of each - /// pair returned is the KindID, the second element is the metadata value. - /// This list is returned sorted by the KindID. - void - getAllMetadata(SmallVectorImpl> &MDs) const { - if (hasMetadata()) - getAllMetadataImpl(MDs); - } - - /// This does the same thing as getAllMetadata, except that it filters out the - /// debug location. - void getAllMetadataOtherThanDebugLoc( - SmallVectorImpl> &MDs) const { - if (hasMetadataOtherThanDebugLoc()) - getAllMetadataOtherThanDebugLocImpl(MDs); - } - - /// Fills the AAMDNodes structure with AA metadata from this instruction. - /// When Merge is true, the existing AA metadata is merged with that from this - /// instruction providing the most-general result. - void getAAMetadata(AAMDNodes &N, bool Merge = false) const; - - /// Set the metadata of the specified kind to the specified node. This updates - /// or replaces metadata if already present, or removes it if Node is null. - void setMetadata(unsigned KindID, MDNode *Node); - void setMetadata(StringRef Kind, MDNode *Node); - - /// Drop all unknown metadata except for debug locations. - /// @{ - /// Passes are required to drop metadata they don't understand. This is a - /// convenience method for passes to do so. - void dropUnknownNonDebugMetadata(ArrayRef KnownIDs); - void dropUnknownNonDebugMetadata() { - return dropUnknownNonDebugMetadata(None); - } - void dropUnknownNonDebugMetadata(unsigned ID1) { - return dropUnknownNonDebugMetadata(makeArrayRef(ID1)); - } - void dropUnknownNonDebugMetadata(unsigned ID1, unsigned ID2) { - unsigned IDs[] = {ID1, ID2}; - return dropUnknownNonDebugMetadata(IDs); - } - /// @} - - /// Sets the metadata on this instruction from the AAMDNodes structure. - void setAAMetadata(const AAMDNodes &N); - - /// Retrieve the raw weight values of a conditional branch or select. - /// Returns true on success with profile weights filled in. - /// Returns false if no metadata or invalid metadata was found. - bool extractProfMetadata(uint64_t &TrueVal, uint64_t &FalseVal); - - /// Retrieve total raw weight values of a branch. - /// Returns true on success with profile total weights filled in. - /// Returns false if no metadata was found. - bool extractProfTotalWeight(uint64_t &TotalVal); - - /// Set the debug location information for this instruction. - void setDebugLoc(DebugLoc Loc) { DbgLoc = std::move(Loc); } - - /// Return the debug location for this node as a DebugLoc. - const DebugLoc &getDebugLoc() const { return DbgLoc; } - - /// Set or clear the nsw flag on this instruction, which must be an operator - /// which supports this flag. See LangRef.html for the meaning of this flag. - void setHasNoUnsignedWrap(bool b = true); - - /// Set or clear the nsw flag on this instruction, which must be an operator - /// which supports this flag. See LangRef.html for the meaning of this flag. - void setHasNoSignedWrap(bool b = true); - - /// Set or clear the exact flag on this instruction, which must be an operator - /// which supports this flag. See LangRef.html for the meaning of this flag. - void setIsExact(bool b = true); - - /// Determine whether the no unsigned wrap flag is set. - bool hasNoUnsignedWrap() const; - - /// Determine whether the no signed wrap flag is set. - bool hasNoSignedWrap() const; - - /// Determine whether the exact flag is set. - bool isExact() const; - - /// Set or clear the unsafe-algebra flag on this instruction, which must be an - /// operator which supports this flag. See LangRef.html for the meaning of - /// this flag. - void setHasUnsafeAlgebra(bool B); - - /// Set or clear the no-nans flag on this instruction, which must be an - /// operator which supports this flag. See LangRef.html for the meaning of - /// this flag. - void setHasNoNaNs(bool B); - - /// Set or clear the no-infs flag on this instruction, which must be an - /// operator which supports this flag. See LangRef.html for the meaning of - /// this flag. - void setHasNoInfs(bool B); - - /// Set or clear the no-signed-zeros flag on this instruction, which must be - /// an operator which supports this flag. See LangRef.html for the meaning of - /// this flag. - void setHasNoSignedZeros(bool B); - - /// Set or clear the allow-reciprocal flag on this instruction, which must be - /// an operator which supports this flag. See LangRef.html for the meaning of - /// this flag. - void setHasAllowReciprocal(bool B); - - /// Convenience function for setting multiple fast-math flags on this - /// instruction, which must be an operator which supports these flags. See - /// LangRef.html for the meaning of these flags. - void setFastMathFlags(FastMathFlags FMF); - - /// Convenience function for transferring all fast-math flag values to this - /// instruction, which must be an operator which supports these flags. See - /// LangRef.html for the meaning of these flags. - void copyFastMathFlags(FastMathFlags FMF); - - /// Determine whether the unsafe-algebra flag is set. - bool hasUnsafeAlgebra() const; - - /// Determine whether the no-NaNs flag is set. - bool hasNoNaNs() const; - - /// Determine whether the no-infs flag is set. - bool hasNoInfs() const; - - /// Determine whether the no-signed-zeros flag is set. - bool hasNoSignedZeros() const; - - /// Determine whether the allow-reciprocal flag is set. - bool hasAllowReciprocal() const; - - /// Convenience function for getting all the fast-math flags, which must be an - /// operator which supports these flags. See LangRef.html for the meaning of - /// these flags. - FastMathFlags getFastMathFlags() const; - - /// Copy I's fast-math flags - void copyFastMathFlags(const Instruction *I); - - /// Convenience method to copy supported wrapping, exact, and fast-math flags - /// from V to this instruction. - void copyIRFlags(const Value *V); - - /// Logical 'and' of any supported wrapping, exact, and fast-math flags of - /// V and this instruction. - void andIRFlags(const Value *V); - -private: - /// Return true if we have an entry in the on-the-side metadata hash. - bool hasMetadataHashEntry() const { - return (getSubclassDataFromValue() & HasMetadataBit) != 0; - } - - // These are all implemented in Metadata.cpp. - MDNode *getMetadataImpl(unsigned KindID) const; - MDNode *getMetadataImpl(StringRef Kind) const; - void - getAllMetadataImpl(SmallVectorImpl> &) const; - void getAllMetadataOtherThanDebugLocImpl( - SmallVectorImpl> &) const; - /// Clear all hashtable-based metadata from this instruction. - void clearMetadataHashEntries(); -public: - //===--------------------------------------------------------------------===// - // Predicates and helper methods. - //===--------------------------------------------------------------------===// - - - /// Return true if the instruction is associative: - /// - /// Associative operators satisfy: x op (y op z) === (x op y) op z - /// - /// In LLVM, the Add, Mul, And, Or, and Xor operators are associative. - /// - bool isAssociative() const; - static bool isAssociative(unsigned op); - - /// Return true if the instruction is commutative: - /// - /// Commutative operators satisfy: (x op y) === (y op x) - /// - /// In LLVM, these are the associative operators, plus SetEQ and SetNE, when - /// applied to any type. - /// - bool isCommutative() const { return isCommutative(getOpcode()); } - static bool isCommutative(unsigned op); - - /// Return true if the instruction is idempotent: - /// - /// Idempotent operators satisfy: x op x === x - /// - /// In LLVM, the And and Or operators are idempotent. - /// - bool isIdempotent() const { return isIdempotent(getOpcode()); } - static bool isIdempotent(unsigned op); - - /// Return true if the instruction is nilpotent: - /// - /// Nilpotent operators satisfy: x op x === Id, - /// - /// where Id is the identity for the operator, i.e. a constant such that - /// x op Id === x and Id op x === x for all x. - /// - /// In LLVM, the Xor operator is nilpotent. - /// - bool isNilpotent() const { return isNilpotent(getOpcode()); } - static bool isNilpotent(unsigned op); - - /// Return true if this instruction may modify memory. - bool mayWriteToMemory() const; - - /// Return true if this instruction may read memory. - bool mayReadFromMemory() const; - - /// Return true if this instruction may read or write memory. - bool mayReadOrWriteMemory() const { - return mayReadFromMemory() || mayWriteToMemory(); - } - - /// Return true if this instruction has an AtomicOrdering of unordered or - /// higher. - bool isAtomic() const; - - /// Return true if this instruction may throw an exception. - bool mayThrow() const; - - /// Return true if this instruction behaves like a memory fence: it can load - /// or store to memory location without being given a memory location. - bool isFenceLike() const { - switch (getOpcode()) { - default: - return false; - // This list should be kept in sync with the list in mayWriteToMemory for - // all opcodes which don't have a memory location. - case Instruction::Fence: - case Instruction::CatchPad: - case Instruction::CatchRet: - case Instruction::Call: - case Instruction::Invoke: - return true; - } - } - - /// Return true if the instruction may have side effects. - /// - /// Note that this does not consider malloc and alloca to have side - /// effects because the newly allocated memory is completely invisible to - /// instructions which don't use the returned value. For cases where this - /// matters, isSafeToSpeculativelyExecute may be more appropriate. - bool mayHaveSideEffects() const { return mayWriteToMemory() || mayThrow(); } - - /// Return true if the instruction is a variety of EH-block. - bool isEHPad() const { - switch (getOpcode()) { - case Instruction::CatchSwitch: - case Instruction::CatchPad: - case Instruction::CleanupPad: - case Instruction::LandingPad: - return true; - default: - return false; - } - } - - /// Create a copy of 'this' instruction that is identical in all ways except - /// the following: - /// * The instruction has no parent - /// * The instruction has no name - /// - Instruction *clone() const; - - /// Return true if the specified instruction is exactly identical to the - /// current one. This means that all operands match and any extra information - /// (e.g. load is volatile) agree. - bool isIdenticalTo(const Instruction *I) const; - - /// This is like isIdenticalTo, except that it ignores the - /// SubclassOptionalData flags, which specify conditions under which the - /// instruction's result is undefined. - bool isIdenticalToWhenDefined(const Instruction *I) const; - - /// When checking for operation equivalence (using isSameOperationAs) it is - /// sometimes useful to ignore certain attributes. - enum OperationEquivalenceFlags { - /// Check for equivalence ignoring load/store alignment. - CompareIgnoringAlignment = 1<<0, - /// Check for equivalence treating a type and a vector of that type - /// as equivalent. - CompareUsingScalarTypes = 1<<1 - }; - - /// This function determines if the specified instruction executes the same - /// operation as the current one. This means that the opcodes, type, operand - /// types and any other factors affecting the operation must be the same. This - /// is similar to isIdenticalTo except the operands themselves don't have to - /// be identical. - /// @returns true if the specified instruction is the same operation as - /// the current one. - /// @brief Determine if one instruction is the same operation as another. - bool isSameOperationAs(const Instruction *I, unsigned flags = 0) const; - - /// Return true if there are any uses of this instruction in blocks other than - /// the specified block. Note that PHI nodes are considered to evaluate their - /// operands in the corresponding predecessor block. - bool isUsedOutsideOfBlock(const BasicBlock *BB) const; - - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return V->getValueID() >= Value::InstructionVal; - } - - //---------------------------------------------------------------------- - // Exported enumerations. - // - enum TermOps { // These terminate basic blocks -#define FIRST_TERM_INST(N) TermOpsBegin = N, -#define HANDLE_TERM_INST(N, OPC, CLASS) OPC = N, -#define LAST_TERM_INST(N) TermOpsEnd = N+1 -#include "llvm/IR/Instruction.def" - }; - - enum BinaryOps { -#define FIRST_BINARY_INST(N) BinaryOpsBegin = N, -#define HANDLE_BINARY_INST(N, OPC, CLASS) OPC = N, -#define LAST_BINARY_INST(N) BinaryOpsEnd = N+1 -#include "llvm/IR/Instruction.def" - }; - - enum MemoryOps { -#define FIRST_MEMORY_INST(N) MemoryOpsBegin = N, -#define HANDLE_MEMORY_INST(N, OPC, CLASS) OPC = N, -#define LAST_MEMORY_INST(N) MemoryOpsEnd = N+1 -#include "llvm/IR/Instruction.def" - }; - - enum CastOps { -#define FIRST_CAST_INST(N) CastOpsBegin = N, -#define HANDLE_CAST_INST(N, OPC, CLASS) OPC = N, -#define LAST_CAST_INST(N) CastOpsEnd = N+1 -#include "llvm/IR/Instruction.def" - }; - - enum FuncletPadOps { -#define FIRST_FUNCLETPAD_INST(N) FuncletPadOpsBegin = N, -#define HANDLE_FUNCLETPAD_INST(N, OPC, CLASS) OPC = N, -#define LAST_FUNCLETPAD_INST(N) FuncletPadOpsEnd = N+1 -#include "llvm/IR/Instruction.def" - }; - - enum OtherOps { -#define FIRST_OTHER_INST(N) OtherOpsBegin = N, -#define HANDLE_OTHER_INST(N, OPC, CLASS) OPC = N, -#define LAST_OTHER_INST(N) OtherOpsEnd = N+1 -#include "llvm/IR/Instruction.def" - }; -private: - // Shadow Value::setValueSubclassData with a private forwarding method so that - // subclasses cannot accidentally use it. - void setValueSubclassData(unsigned short D) { - Value::setValueSubclassData(D); - } - unsigned short getSubclassDataFromValue() const { - return Value::getSubclassDataFromValue(); - } - - void setHasMetadataHashEntry(bool V) { - setValueSubclassData((getSubclassDataFromValue() & ~HasMetadataBit) | - (V ? HasMetadataBit : 0)); - } - - friend class SymbolTableListTraits; - void setParent(BasicBlock *P); -protected: - // Instruction subclasses can stick up to 15 bits of stuff into the - // SubclassData field of instruction with these members. - - // Verify that only the low 15 bits are used. - void setInstructionSubclassData(unsigned short D) { - assert((D & HasMetadataBit) == 0 && "Out of range value put into field"); - setValueSubclassData((getSubclassDataFromValue() & HasMetadataBit) | D); - } - - unsigned getSubclassDataFromInstruction() const { - return getSubclassDataFromValue() & ~HasMetadataBit; - } - - Instruction(Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, - Instruction *InsertBefore = nullptr); - Instruction(Type *Ty, unsigned iType, Use *Ops, unsigned NumOps, - BasicBlock *InsertAtEnd); - -private: - /// Create a copy of this instruction. - Instruction *cloneImpl() const; -}; - -// Instruction* is only 4-byte aligned. -template<> -class PointerLikeTypeTraits { - typedef Instruction* PT; -public: - static inline void *getAsVoidPointer(PT P) { return P; } - static inline PT getFromVoidPointer(void *P) { - return static_cast(P); - } - enum { NumLowBitsAvailable = 2 }; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h deleted file mode 100644 index be077725..00000000 --- a/llvm/include/llvm/IR/Instructions.h +++ /dev/null @@ -1,4948 +0,0 @@ -//===-- llvm/Instructions.h - Instruction subclass definitions --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file exposes the class definitions of all of the subclasses of the -// Instruction class. This is meant to be an easy way to get access to all -// instruction subclasses. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_INSTRUCTIONS_H -#define LLVM_IR_INSTRUCTIONS_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/Attributes.h" -#include "llvm/IR/CallingConv.h" -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/InstrTypes.h" -#include "llvm/Support/AtomicOrdering.h" -#include "llvm/Support/ErrorHandling.h" -#include - -namespace llvm { - -class APInt; -class ConstantInt; -class ConstantRange; -class DataLayout; -class LLVMContext; - -enum SynchronizationScope { - SingleThread = 0, - CrossThread = 1 -}; - -//===----------------------------------------------------------------------===// -// AllocaInst Class -//===----------------------------------------------------------------------===// - -/// AllocaInst - an instruction to allocate memory on the stack -/// -class AllocaInst : public UnaryInstruction { - Type *AllocatedType; - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - AllocaInst *cloneImpl() const; - -public: - explicit AllocaInst(Type *Ty, Value *ArraySize = nullptr, - const Twine &Name = "", - Instruction *InsertBefore = nullptr); - AllocaInst(Type *Ty, Value *ArraySize, - const Twine &Name, BasicBlock *InsertAtEnd); - - AllocaInst(Type *Ty, const Twine &Name, Instruction *InsertBefore = nullptr); - AllocaInst(Type *Ty, const Twine &Name, BasicBlock *InsertAtEnd); - - AllocaInst(Type *Ty, Value *ArraySize, unsigned Align, - const Twine &Name = "", Instruction *InsertBefore = nullptr); - AllocaInst(Type *Ty, Value *ArraySize, unsigned Align, - const Twine &Name, BasicBlock *InsertAtEnd); - - // Out of line virtual method, so the vtable, etc. has a home. - ~AllocaInst() override; - - /// isArrayAllocation - Return true if there is an allocation size parameter - /// to the allocation instruction that is not 1. - /// - bool isArrayAllocation() const; - - /// getArraySize - Get the number of elements allocated. For a simple - /// allocation of a single element, this will return a constant 1 value. - /// - const Value *getArraySize() const { return getOperand(0); } - Value *getArraySize() { return getOperand(0); } - - /// getType - Overload to return most specific pointer type - /// - PointerType *getType() const { - return cast(Instruction::getType()); - } - - /// getAllocatedType - Return the type that is being allocated by the - /// instruction. - /// - Type *getAllocatedType() const { return AllocatedType; } - /// \brief for use only in special circumstances that need to generically - /// transform a whole instruction (eg: IR linking and vectorization). - void setAllocatedType(Type *Ty) { AllocatedType = Ty; } - - /// getAlignment - Return the alignment of the memory that is being allocated - /// by the instruction. - /// - unsigned getAlignment() const { - return (1u << (getSubclassDataFromInstruction() & 31)) >> 1; - } - void setAlignment(unsigned Align); - - /// isStaticAlloca - Return true if this alloca is in the entry block of the - /// function and is a constant size. If so, the code generator will fold it - /// into the prolog/epilog code, so it is basically free. - bool isStaticAlloca() const; - - /// \brief Return true if this alloca is used as an inalloca argument to a - /// call. Such allocas are never considered static even if they are in the - /// entry block. - bool isUsedWithInAlloca() const { - return getSubclassDataFromInstruction() & 32; - } - - /// \brief Specify whether this alloca is used to represent the arguments to - /// a call. - void setUsedWithInAlloca(bool V) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~32) | - (V ? 32 : 0)); - } - - /// \brief Return true if this alloca is used as a swifterror argument to a - /// call. - bool isSwiftError() const { - return getSubclassDataFromInstruction() & 64; - } - - /// \brief Specify whether this alloca is used to represent a swifterror. - void setSwiftError(bool V) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~64) | - (V ? 64 : 0)); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return (I->getOpcode() == Instruction::Alloca); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -//===----------------------------------------------------------------------===// -// LoadInst Class -//===----------------------------------------------------------------------===// - -/// LoadInst - an instruction for reading from memory. This uses the -/// SubclassData field in Value to store whether or not the load is volatile. -/// -class LoadInst : public UnaryInstruction { - void AssertOK(); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - LoadInst *cloneImpl() const; - -public: - LoadInst(Value *Ptr, const Twine &NameStr, Instruction *InsertBefore); - LoadInst(Value *Ptr, const Twine &NameStr, BasicBlock *InsertAtEnd); - LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile = false, - Instruction *InsertBefore = nullptr); - LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile = false, - Instruction *InsertBefore = nullptr) - : LoadInst(cast(Ptr->getType())->getElementType(), Ptr, - NameStr, isVolatile, InsertBefore) {} - LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, - BasicBlock *InsertAtEnd); - LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, - Instruction *InsertBefore = nullptr) - : LoadInst(cast(Ptr->getType())->getElementType(), Ptr, - NameStr, isVolatile, Align, InsertBefore) {} - LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, - unsigned Align, Instruction *InsertBefore = nullptr); - LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, - unsigned Align, BasicBlock *InsertAtEnd); - LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, unsigned Align, - AtomicOrdering Order, SynchronizationScope SynchScope = CrossThread, - Instruction *InsertBefore = nullptr) - : LoadInst(cast(Ptr->getType())->getElementType(), Ptr, - NameStr, isVolatile, Align, Order, SynchScope, InsertBefore) {} - LoadInst(Type *Ty, Value *Ptr, const Twine &NameStr, bool isVolatile, - unsigned Align, AtomicOrdering Order, - SynchronizationScope SynchScope = CrossThread, - Instruction *InsertBefore = nullptr); - LoadInst(Value *Ptr, const Twine &NameStr, bool isVolatile, - unsigned Align, AtomicOrdering Order, - SynchronizationScope SynchScope, - BasicBlock *InsertAtEnd); - - LoadInst(Value *Ptr, const char *NameStr, Instruction *InsertBefore); - LoadInst(Value *Ptr, const char *NameStr, BasicBlock *InsertAtEnd); - LoadInst(Type *Ty, Value *Ptr, const char *NameStr = nullptr, - bool isVolatile = false, Instruction *InsertBefore = nullptr); - explicit LoadInst(Value *Ptr, const char *NameStr = nullptr, - bool isVolatile = false, - Instruction *InsertBefore = nullptr) - : LoadInst(cast(Ptr->getType())->getElementType(), Ptr, - NameStr, isVolatile, InsertBefore) {} - LoadInst(Value *Ptr, const char *NameStr, bool isVolatile, - BasicBlock *InsertAtEnd); - - /// isVolatile - Return true if this is a load from a volatile memory - /// location. - /// - bool isVolatile() const { return getSubclassDataFromInstruction() & 1; } - - /// setVolatile - Specify whether this is a volatile load or not. - /// - void setVolatile(bool V) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | - (V ? 1 : 0)); - } - - /// getAlignment - Return the alignment of the access that is being performed - /// - unsigned getAlignment() const { - return (1 << ((getSubclassDataFromInstruction() >> 1) & 31)) >> 1; - } - - void setAlignment(unsigned Align); - - /// Returns the ordering effect of this fence. - AtomicOrdering getOrdering() const { - return AtomicOrdering((getSubclassDataFromInstruction() >> 7) & 7); - } - - /// Set the ordering constraint on this load. May not be Release or - /// AcquireRelease. - void setOrdering(AtomicOrdering Ordering) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~(7 << 7)) | - ((unsigned)Ordering << 7)); - } - - SynchronizationScope getSynchScope() const { - return SynchronizationScope((getSubclassDataFromInstruction() >> 6) & 1); - } - - /// Specify whether this load is ordered with respect to all - /// concurrently executing threads, or only with respect to signal handlers - /// executing in the same thread. - void setSynchScope(SynchronizationScope xthread) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~(1 << 6)) | - (xthread << 6)); - } - - void setAtomic(AtomicOrdering Ordering, - SynchronizationScope SynchScope = CrossThread) { - setOrdering(Ordering); - setSynchScope(SynchScope); - } - - bool isSimple() const { return !isAtomic() && !isVolatile(); } - bool isUnordered() const { - return (getOrdering() == AtomicOrdering::NotAtomic || - getOrdering() == AtomicOrdering::Unordered) && - !isVolatile(); - } - - Value *getPointerOperand() { return getOperand(0); } - const Value *getPointerOperand() const { return getOperand(0); } - static unsigned getPointerOperandIndex() { return 0U; } - - /// \brief Returns the address space of the pointer operand. - unsigned getPointerAddressSpace() const { - return getPointerOperand()->getType()->getPointerAddressSpace(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Load; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -//===----------------------------------------------------------------------===// -// StoreInst Class -//===----------------------------------------------------------------------===// - -/// StoreInst - an instruction for storing to memory -/// -class StoreInst : public Instruction { - void *operator new(size_t, unsigned) = delete; - void AssertOK(); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - StoreInst *cloneImpl() const; - -public: - // allocate space for exactly two operands - void *operator new(size_t s) { - return User::operator new(s, 2); - } - StoreInst(Value *Val, Value *Ptr, Instruction *InsertBefore); - StoreInst(Value *Val, Value *Ptr, BasicBlock *InsertAtEnd); - StoreInst(Value *Val, Value *Ptr, bool isVolatile = false, - Instruction *InsertBefore = nullptr); - StoreInst(Value *Val, Value *Ptr, bool isVolatile, BasicBlock *InsertAtEnd); - StoreInst(Value *Val, Value *Ptr, bool isVolatile, - unsigned Align, Instruction *InsertBefore = nullptr); - StoreInst(Value *Val, Value *Ptr, bool isVolatile, - unsigned Align, BasicBlock *InsertAtEnd); - StoreInst(Value *Val, Value *Ptr, bool isVolatile, - unsigned Align, AtomicOrdering Order, - SynchronizationScope SynchScope = CrossThread, - Instruction *InsertBefore = nullptr); - StoreInst(Value *Val, Value *Ptr, bool isVolatile, - unsigned Align, AtomicOrdering Order, - SynchronizationScope SynchScope, - BasicBlock *InsertAtEnd); - - /// isVolatile - Return true if this is a store to a volatile memory - /// location. - /// - bool isVolatile() const { return getSubclassDataFromInstruction() & 1; } - - /// setVolatile - Specify whether this is a volatile store or not. - /// - void setVolatile(bool V) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | - (V ? 1 : 0)); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// getAlignment - Return the alignment of the access that is being performed - /// - unsigned getAlignment() const { - return (1 << ((getSubclassDataFromInstruction() >> 1) & 31)) >> 1; - } - - void setAlignment(unsigned Align); - - /// Returns the ordering effect of this store. - AtomicOrdering getOrdering() const { - return AtomicOrdering((getSubclassDataFromInstruction() >> 7) & 7); - } - - /// Set the ordering constraint on this store. May not be Acquire or - /// AcquireRelease. - void setOrdering(AtomicOrdering Ordering) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~(7 << 7)) | - ((unsigned)Ordering << 7)); - } - - SynchronizationScope getSynchScope() const { - return SynchronizationScope((getSubclassDataFromInstruction() >> 6) & 1); - } - - /// Specify whether this store instruction is ordered with respect to all - /// concurrently executing threads, or only with respect to signal handlers - /// executing in the same thread. - void setSynchScope(SynchronizationScope xthread) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~(1 << 6)) | - (xthread << 6)); - } - - void setAtomic(AtomicOrdering Ordering, - SynchronizationScope SynchScope = CrossThread) { - setOrdering(Ordering); - setSynchScope(SynchScope); - } - - bool isSimple() const { return !isAtomic() && !isVolatile(); } - bool isUnordered() const { - return (getOrdering() == AtomicOrdering::NotAtomic || - getOrdering() == AtomicOrdering::Unordered) && - !isVolatile(); - } - - Value *getValueOperand() { return getOperand(0); } - const Value *getValueOperand() const { return getOperand(0); } - - Value *getPointerOperand() { return getOperand(1); } - const Value *getPointerOperand() const { return getOperand(1); } - static unsigned getPointerOperandIndex() { return 1U; } - - /// \brief Returns the address space of the pointer operand. - unsigned getPointerAddressSpace() const { - return getPointerOperand()->getType()->getPointerAddressSpace(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Store; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -template <> -struct OperandTraits : public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(StoreInst, Value) - -//===----------------------------------------------------------------------===// -// FenceInst Class -//===----------------------------------------------------------------------===// - -/// FenceInst - an instruction for ordering other memory operations -/// -class FenceInst : public Instruction { - void *operator new(size_t, unsigned) = delete; - void Init(AtomicOrdering Ordering, SynchronizationScope SynchScope); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - FenceInst *cloneImpl() const; - -public: - // allocate space for exactly zero operands - void *operator new(size_t s) { - return User::operator new(s, 0); - } - - // Ordering may only be Acquire, Release, AcquireRelease, or - // SequentiallyConsistent. - FenceInst(LLVMContext &C, AtomicOrdering Ordering, - SynchronizationScope SynchScope = CrossThread, - Instruction *InsertBefore = nullptr); - FenceInst(LLVMContext &C, AtomicOrdering Ordering, - SynchronizationScope SynchScope, - BasicBlock *InsertAtEnd); - - /// Returns the ordering effect of this fence. - AtomicOrdering getOrdering() const { - return AtomicOrdering(getSubclassDataFromInstruction() >> 1); - } - - /// Set the ordering constraint on this fence. May only be Acquire, Release, - /// AcquireRelease, or SequentiallyConsistent. - void setOrdering(AtomicOrdering Ordering) { - setInstructionSubclassData((getSubclassDataFromInstruction() & 1) | - ((unsigned)Ordering << 1)); - } - - SynchronizationScope getSynchScope() const { - return SynchronizationScope(getSubclassDataFromInstruction() & 1); - } - - /// Specify whether this fence orders other operations with respect to all - /// concurrently executing threads, or only with respect to signal handlers - /// executing in the same thread. - void setSynchScope(SynchronizationScope xthread) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | - xthread); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Fence; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -//===----------------------------------------------------------------------===// -// AtomicCmpXchgInst Class -//===----------------------------------------------------------------------===// - -/// AtomicCmpXchgInst - an instruction that atomically checks whether a -/// specified value is in a memory location, and, if it is, stores a new value -/// there. Returns the value that was loaded. -/// -class AtomicCmpXchgInst : public Instruction { - void *operator new(size_t, unsigned) = delete; - void Init(Value *Ptr, Value *Cmp, Value *NewVal, - AtomicOrdering SuccessOrdering, AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - AtomicCmpXchgInst *cloneImpl() const; - -public: - // allocate space for exactly three operands - void *operator new(size_t s) { - return User::operator new(s, 3); - } - AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal, - AtomicOrdering SuccessOrdering, - AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope, - Instruction *InsertBefore = nullptr); - AtomicCmpXchgInst(Value *Ptr, Value *Cmp, Value *NewVal, - AtomicOrdering SuccessOrdering, - AtomicOrdering FailureOrdering, - SynchronizationScope SynchScope, - BasicBlock *InsertAtEnd); - - /// isVolatile - Return true if this is a cmpxchg from a volatile memory - /// location. - /// - bool isVolatile() const { - return getSubclassDataFromInstruction() & 1; - } - - /// setVolatile - Specify whether this is a volatile cmpxchg. - /// - void setVolatile(bool V) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | - (unsigned)V); - } - - /// Return true if this cmpxchg may spuriously fail. - bool isWeak() const { - return getSubclassDataFromInstruction() & 0x100; - } - - void setWeak(bool IsWeak) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~0x100) | - (IsWeak << 8)); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// Set the ordering constraint on this cmpxchg. - void setSuccessOrdering(AtomicOrdering Ordering) { - assert(Ordering != AtomicOrdering::NotAtomic && - "CmpXchg instructions can only be atomic."); - setInstructionSubclassData((getSubclassDataFromInstruction() & ~0x1c) | - ((unsigned)Ordering << 2)); - } - - void setFailureOrdering(AtomicOrdering Ordering) { - assert(Ordering != AtomicOrdering::NotAtomic && - "CmpXchg instructions can only be atomic."); - setInstructionSubclassData((getSubclassDataFromInstruction() & ~0xe0) | - ((unsigned)Ordering << 5)); - } - - /// Specify whether this cmpxchg is atomic and orders other operations with - /// respect to all concurrently executing threads, or only with respect to - /// signal handlers executing in the same thread. - void setSynchScope(SynchronizationScope SynchScope) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~2) | - (SynchScope << 1)); - } - - /// Returns the ordering constraint on this cmpxchg. - AtomicOrdering getSuccessOrdering() const { - return AtomicOrdering((getSubclassDataFromInstruction() >> 2) & 7); - } - - /// Returns the ordering constraint on this cmpxchg. - AtomicOrdering getFailureOrdering() const { - return AtomicOrdering((getSubclassDataFromInstruction() >> 5) & 7); - } - - /// Returns whether this cmpxchg is atomic between threads or only within a - /// single thread. - SynchronizationScope getSynchScope() const { - return SynchronizationScope((getSubclassDataFromInstruction() & 2) >> 1); - } - - Value *getPointerOperand() { return getOperand(0); } - const Value *getPointerOperand() const { return getOperand(0); } - static unsigned getPointerOperandIndex() { return 0U; } - - Value *getCompareOperand() { return getOperand(1); } - const Value *getCompareOperand() const { return getOperand(1); } - - Value *getNewValOperand() { return getOperand(2); } - const Value *getNewValOperand() const { return getOperand(2); } - - /// \brief Returns the address space of the pointer operand. - unsigned getPointerAddressSpace() const { - return getPointerOperand()->getType()->getPointerAddressSpace(); - } - - /// \brief Returns the strongest permitted ordering on failure, given the - /// desired ordering on success. - /// - /// If the comparison in a cmpxchg operation fails, there is no atomic store - /// so release semantics cannot be provided. So this function drops explicit - /// Release requests from the AtomicOrdering. A SequentiallyConsistent - /// operation would remain SequentiallyConsistent. - static AtomicOrdering - getStrongestFailureOrdering(AtomicOrdering SuccessOrdering) { - switch (SuccessOrdering) { - default: - llvm_unreachable("invalid cmpxchg success ordering"); - case AtomicOrdering::Release: - case AtomicOrdering::Monotonic: - return AtomicOrdering::Monotonic; - case AtomicOrdering::AcquireRelease: - case AtomicOrdering::Acquire: - return AtomicOrdering::Acquire; - case AtomicOrdering::SequentiallyConsistent: - return AtomicOrdering::SequentiallyConsistent; - } - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::AtomicCmpXchg; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(AtomicCmpXchgInst, Value) - -//===----------------------------------------------------------------------===// -// AtomicRMWInst Class -//===----------------------------------------------------------------------===// - -/// AtomicRMWInst - an instruction that atomically reads a memory location, -/// combines it with another value, and then stores the result back. Returns -/// the old value. -/// -class AtomicRMWInst : public Instruction { - void *operator new(size_t, unsigned) = delete; - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - AtomicRMWInst *cloneImpl() const; - -public: - /// This enumeration lists the possible modifications atomicrmw can make. In - /// the descriptions, 'p' is the pointer to the instruction's memory location, - /// 'old' is the initial value of *p, and 'v' is the other value passed to the - /// instruction. These instructions always return 'old'. - enum BinOp { - /// *p = v - Xchg, - /// *p = old + v - Add, - /// *p = old - v - Sub, - /// *p = old & v - And, - /// *p = ~(old & v) - Nand, - /// *p = old | v - Or, - /// *p = old ^ v - Xor, - /// *p = old >signed v ? old : v - Max, - /// *p = old unsigned v ? old : v - UMax, - /// *p = old (getSubclassDataFromInstruction() >> 5); - } - - void setOperation(BinOp Operation) { - unsigned short SubclassData = getSubclassDataFromInstruction(); - setInstructionSubclassData((SubclassData & 31) | - (Operation << 5)); - } - - /// isVolatile - Return true if this is a RMW on a volatile memory location. - /// - bool isVolatile() const { - return getSubclassDataFromInstruction() & 1; - } - - /// setVolatile - Specify whether this is a volatile RMW or not. - /// - void setVolatile(bool V) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | - (unsigned)V); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// Set the ordering constraint on this RMW. - void setOrdering(AtomicOrdering Ordering) { - assert(Ordering != AtomicOrdering::NotAtomic && - "atomicrmw instructions can only be atomic."); - setInstructionSubclassData((getSubclassDataFromInstruction() & ~(7 << 2)) | - ((unsigned)Ordering << 2)); - } - - /// Specify whether this RMW orders other operations with respect to all - /// concurrently executing threads, or only with respect to signal handlers - /// executing in the same thread. - void setSynchScope(SynchronizationScope SynchScope) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~2) | - (SynchScope << 1)); - } - - /// Returns the ordering constraint on this RMW. - AtomicOrdering getOrdering() const { - return AtomicOrdering((getSubclassDataFromInstruction() >> 2) & 7); - } - - /// Returns whether this RMW is atomic between threads or only within a - /// single thread. - SynchronizationScope getSynchScope() const { - return SynchronizationScope((getSubclassDataFromInstruction() & 2) >> 1); - } - - Value *getPointerOperand() { return getOperand(0); } - const Value *getPointerOperand() const { return getOperand(0); } - static unsigned getPointerOperandIndex() { return 0U; } - - Value *getValOperand() { return getOperand(1); } - const Value *getValOperand() const { return getOperand(1); } - - /// \brief Returns the address space of the pointer operand. - unsigned getPointerAddressSpace() const { - return getPointerOperand()->getType()->getPointerAddressSpace(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::AtomicRMW; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - void Init(BinOp Operation, Value *Ptr, Value *Val, - AtomicOrdering Ordering, SynchronizationScope SynchScope); - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -template <> -struct OperandTraits - : public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(AtomicRMWInst, Value) - -//===----------------------------------------------------------------------===// -// GetElementPtrInst Class -//===----------------------------------------------------------------------===// - -// checkGEPType - Simple wrapper function to give a better assertion failure -// message on bad indexes for a gep instruction. -// -inline Type *checkGEPType(Type *Ty) { - assert(Ty && "Invalid GetElementPtrInst indices for type!"); - return Ty; -} - -/// GetElementPtrInst - an instruction for type-safe pointer arithmetic to -/// access elements of arrays and structs -/// -class GetElementPtrInst : public Instruction { - Type *SourceElementType; - Type *ResultElementType; - - void anchor() override; - - GetElementPtrInst(const GetElementPtrInst &GEPI); - void init(Value *Ptr, ArrayRef IdxList, const Twine &NameStr); - - /// Constructors - Create a getelementptr instruction with a base pointer an - /// list of indices. The first ctor can optionally insert before an existing - /// instruction, the second appends the new instruction to the specified - /// BasicBlock. - inline GetElementPtrInst(Type *PointeeType, Value *Ptr, - ArrayRef IdxList, unsigned Values, - const Twine &NameStr, Instruction *InsertBefore); - inline GetElementPtrInst(Type *PointeeType, Value *Ptr, - ArrayRef IdxList, unsigned Values, - const Twine &NameStr, BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - GetElementPtrInst *cloneImpl() const; - -public: - static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr, - ArrayRef IdxList, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - unsigned Values = 1 + unsigned(IdxList.size()); - if (!PointeeType) - PointeeType = - cast(Ptr->getType()->getScalarType())->getElementType(); - else - assert( - PointeeType == - cast(Ptr->getType()->getScalarType())->getElementType()); - return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values, - NameStr, InsertBefore); - } - static GetElementPtrInst *Create(Type *PointeeType, Value *Ptr, - ArrayRef IdxList, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { - unsigned Values = 1 + unsigned(IdxList.size()); - if (!PointeeType) - PointeeType = - cast(Ptr->getType()->getScalarType())->getElementType(); - else - assert( - PointeeType == - cast(Ptr->getType()->getScalarType())->getElementType()); - return new (Values) GetElementPtrInst(PointeeType, Ptr, IdxList, Values, - NameStr, InsertAtEnd); - } - - /// Create an "inbounds" getelementptr. See the documentation for the - /// "inbounds" flag in LangRef.html for details. - static GetElementPtrInst *CreateInBounds(Value *Ptr, - ArrayRef IdxList, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr){ - return CreateInBounds(nullptr, Ptr, IdxList, NameStr, InsertBefore); - } - static GetElementPtrInst * - CreateInBounds(Type *PointeeType, Value *Ptr, ArrayRef IdxList, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - GetElementPtrInst *GEP = - Create(PointeeType, Ptr, IdxList, NameStr, InsertBefore); - GEP->setIsInBounds(true); - return GEP; - } - static GetElementPtrInst *CreateInBounds(Value *Ptr, - ArrayRef IdxList, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { - return CreateInBounds(nullptr, Ptr, IdxList, NameStr, InsertAtEnd); - } - static GetElementPtrInst *CreateInBounds(Type *PointeeType, Value *Ptr, - ArrayRef IdxList, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { - GetElementPtrInst *GEP = - Create(PointeeType, Ptr, IdxList, NameStr, InsertAtEnd); - GEP->setIsInBounds(true); - return GEP; - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - // getType - Overload to return most specific sequential type. - SequentialType *getType() const { - return cast(Instruction::getType()); - } - - Type *getSourceElementType() const { return SourceElementType; } - - void setSourceElementType(Type *Ty) { SourceElementType = Ty; } - void setResultElementType(Type *Ty) { ResultElementType = Ty; } - - Type *getResultElementType() const { - assert(ResultElementType == - cast(getType()->getScalarType())->getElementType()); - return ResultElementType; - } - - /// \brief Returns the address space of this instruction's pointer type. - unsigned getAddressSpace() const { - // Note that this is always the same as the pointer operand's address space - // and that is cheaper to compute, so cheat here. - return getPointerAddressSpace(); - } - - /// getIndexedType - Returns the type of the element that would be loaded with - /// a load instruction with the specified parameters. - /// - /// Null is returned if the indices are invalid for the specified - /// pointer type. - /// - static Type *getIndexedType(Type *Ty, ArrayRef IdxList); - static Type *getIndexedType(Type *Ty, ArrayRef IdxList); - static Type *getIndexedType(Type *Ty, ArrayRef IdxList); - - inline op_iterator idx_begin() { return op_begin()+1; } - inline const_op_iterator idx_begin() const { return op_begin()+1; } - inline op_iterator idx_end() { return op_end(); } - inline const_op_iterator idx_end() const { return op_end(); } - - Value *getPointerOperand() { - return getOperand(0); - } - const Value *getPointerOperand() const { - return getOperand(0); - } - static unsigned getPointerOperandIndex() { - return 0U; // get index for modifying correct operand. - } - - /// getPointerOperandType - Method to return the pointer operand as a - /// PointerType. - Type *getPointerOperandType() const { - return getPointerOperand()->getType(); - } - - /// \brief Returns the address space of the pointer operand. - unsigned getPointerAddressSpace() const { - return getPointerOperandType()->getPointerAddressSpace(); - } - - /// GetGEPReturnType - Returns the pointer type returned by the GEP - /// instruction, which may be a vector of pointers. - static Type *getGEPReturnType(Value *Ptr, ArrayRef IdxList) { - return getGEPReturnType( - cast(Ptr->getType()->getScalarType())->getElementType(), - Ptr, IdxList); - } - static Type *getGEPReturnType(Type *ElTy, Value *Ptr, - ArrayRef IdxList) { - Type *PtrTy = PointerType::get(checkGEPType(getIndexedType(ElTy, IdxList)), - Ptr->getType()->getPointerAddressSpace()); - // Vector GEP - if (Ptr->getType()->isVectorTy()) { - unsigned NumElem = Ptr->getType()->getVectorNumElements(); - return VectorType::get(PtrTy, NumElem); - } - for (Value *Index : IdxList) - if (Index->getType()->isVectorTy()) { - unsigned NumElem = Index->getType()->getVectorNumElements(); - return VectorType::get(PtrTy, NumElem); - } - // Scalar GEP - return PtrTy; - } - - unsigned getNumIndices() const { // Note: always non-negative - return getNumOperands() - 1; - } - - bool hasIndices() const { - return getNumOperands() > 1; - } - - /// hasAllZeroIndices - Return true if all of the indices of this GEP are - /// zeros. If so, the result pointer and the first operand have the same - /// value, just potentially different types. - bool hasAllZeroIndices() const; - - /// hasAllConstantIndices - Return true if all of the indices of this GEP are - /// constant integers. If so, the result pointer and the first operand have - /// a constant offset between them. - bool hasAllConstantIndices() const; - - /// setIsInBounds - Set or clear the inbounds flag on this GEP instruction. - /// See LangRef.html for the meaning of inbounds on a getelementptr. - void setIsInBounds(bool b = true); - - /// isInBounds - Determine whether the GEP has the inbounds flag. - bool isInBounds() const; - - /// \brief Accumulate the constant address offset of this GEP if possible. - /// - /// This routine accepts an APInt into which it will accumulate the constant - /// offset of this GEP if the GEP is in fact constant. If the GEP is not - /// all-constant, it returns false and the value of the offset APInt is - /// undefined (it is *not* preserved!). The APInt passed into this routine - /// must be at least as wide as the IntPtr type for the address space of - /// the base GEP pointer. - bool accumulateConstantOffset(const DataLayout &DL, APInt &Offset) const; - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return (I->getOpcode() == Instruction::GetElementPtr); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : - public VariadicOperandTraits { -}; - -GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr, - ArrayRef IdxList, unsigned Values, - const Twine &NameStr, - Instruction *InsertBefore) - : Instruction(getGEPReturnType(PointeeType, Ptr, IdxList), GetElementPtr, - OperandTraits::op_end(this) - Values, - Values, InsertBefore), - SourceElementType(PointeeType), - ResultElementType(getIndexedType(PointeeType, IdxList)) { - assert(ResultElementType == - cast(getType()->getScalarType())->getElementType()); - init(Ptr, IdxList, NameStr); -} -GetElementPtrInst::GetElementPtrInst(Type *PointeeType, Value *Ptr, - ArrayRef IdxList, unsigned Values, - const Twine &NameStr, - BasicBlock *InsertAtEnd) - : Instruction(getGEPReturnType(PointeeType, Ptr, IdxList), GetElementPtr, - OperandTraits::op_end(this) - Values, - Values, InsertAtEnd), - SourceElementType(PointeeType), - ResultElementType(getIndexedType(PointeeType, IdxList)) { - assert(ResultElementType == - cast(getType()->getScalarType())->getElementType()); - init(Ptr, IdxList, NameStr); -} - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(GetElementPtrInst, Value) - -//===----------------------------------------------------------------------===// -// ICmpInst Class -//===----------------------------------------------------------------------===// - -/// This instruction compares its operands according to the predicate given -/// to the constructor. It only operates on integers or pointers. The operands -/// must be identical types. -/// \brief Represent an integer comparison operator. -class ICmpInst: public CmpInst { - void anchor() override; - - void AssertOK() { - assert(getPredicate() >= CmpInst::FIRST_ICMP_PREDICATE && - getPredicate() <= CmpInst::LAST_ICMP_PREDICATE && - "Invalid ICmp predicate value"); - assert(getOperand(0)->getType() == getOperand(1)->getType() && - "Both operands to ICmp instruction are not of the same type!"); - // Check that the operands are the right type - assert((getOperand(0)->getType()->isIntOrIntVectorTy() || - getOperand(0)->getType()->isPtrOrPtrVectorTy()) && - "Invalid operand types for ICmp instruction"); - } - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical ICmpInst - ICmpInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics. - ICmpInst( - Instruction *InsertBefore, ///< Where to insert - Predicate pred, ///< The predicate to use for the comparison - Value *LHS, ///< The left-hand-side of the expression - Value *RHS, ///< The right-hand-side of the expression - const Twine &NameStr = "" ///< Name of the instruction - ) : CmpInst(makeCmpResultType(LHS->getType()), - Instruction::ICmp, pred, LHS, RHS, NameStr, - InsertBefore) { -#ifndef NDEBUG - AssertOK(); -#endif - } - - /// \brief Constructor with insert-at-end semantics. - ICmpInst( - BasicBlock &InsertAtEnd, ///< Block to insert into. - Predicate pred, ///< The predicate to use for the comparison - Value *LHS, ///< The left-hand-side of the expression - Value *RHS, ///< The right-hand-side of the expression - const Twine &NameStr = "" ///< Name of the instruction - ) : CmpInst(makeCmpResultType(LHS->getType()), - Instruction::ICmp, pred, LHS, RHS, NameStr, - &InsertAtEnd) { -#ifndef NDEBUG - AssertOK(); -#endif - } - - /// \brief Constructor with no-insertion semantics - ICmpInst( - Predicate pred, ///< The predicate to use for the comparison - Value *LHS, ///< The left-hand-side of the expression - Value *RHS, ///< The right-hand-side of the expression - const Twine &NameStr = "" ///< Name of the instruction - ) : CmpInst(makeCmpResultType(LHS->getType()), - Instruction::ICmp, pred, LHS, RHS, NameStr) { -#ifndef NDEBUG - AssertOK(); -#endif - } - - /// For example, EQ->EQ, SLE->SLE, UGT->SGT, etc. - /// @returns the predicate that would be the result if the operand were - /// regarded as signed. - /// \brief Return the signed version of the predicate - Predicate getSignedPredicate() const { - return getSignedPredicate(getPredicate()); - } - - /// This is a static version that you can use without an instruction. - /// \brief Return the signed version of the predicate. - static Predicate getSignedPredicate(Predicate pred); - - /// For example, EQ->EQ, SLE->ULE, UGT->UGT, etc. - /// @returns the predicate that would be the result if the operand were - /// regarded as unsigned. - /// \brief Return the unsigned version of the predicate - Predicate getUnsignedPredicate() const { - return getUnsignedPredicate(getPredicate()); - } - - /// This is a static version that you can use without an instruction. - /// \brief Return the unsigned version of the predicate. - static Predicate getUnsignedPredicate(Predicate pred); - - /// isEquality - Return true if this predicate is either EQ or NE. This also - /// tests for commutativity. - static bool isEquality(Predicate P) { - return P == ICMP_EQ || P == ICMP_NE; - } - - /// isEquality - Return true if this predicate is either EQ or NE. This also - /// tests for commutativity. - bool isEquality() const { - return isEquality(getPredicate()); - } - - /// @returns true if the predicate of this ICmpInst is commutative - /// \brief Determine if this relation is commutative. - bool isCommutative() const { return isEquality(); } - - /// isRelational - Return true if the predicate is relational (not EQ or NE). - /// - bool isRelational() const { - return !isEquality(); - } - - /// isRelational - Return true if the predicate is relational (not EQ or NE). - /// - static bool isRelational(Predicate P) { - return !isEquality(P); - } - - /// Initialize a set of values that all satisfy the predicate with C. - /// \brief Make a ConstantRange for a relation with a constant value. - static ConstantRange makeConstantRange(Predicate pred, const APInt &C); - - /// Exchange the two operands to this instruction in such a way that it does - /// not modify the semantics of the instruction. The predicate value may be - /// changed to retain the same result if the predicate is order dependent - /// (e.g. ult). - /// \brief Swap operands and adjust predicate. - void swapOperands() { - setPredicate(getSwappedPredicate()); - Op<0>().swap(Op<1>()); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::ICmp; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// FCmpInst Class -//===----------------------------------------------------------------------===// - -/// This instruction compares its operands according to the predicate given -/// to the constructor. It only operates on floating point values or packed -/// vectors of floating point values. The operands must be identical types. -/// \brief Represents a floating point comparison operator. -class FCmpInst: public CmpInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical FCmpInst - FCmpInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics. - FCmpInst( - Instruction *InsertBefore, ///< Where to insert - Predicate pred, ///< The predicate to use for the comparison - Value *LHS, ///< The left-hand-side of the expression - Value *RHS, ///< The right-hand-side of the expression - const Twine &NameStr = "" ///< Name of the instruction - ) : CmpInst(makeCmpResultType(LHS->getType()), - Instruction::FCmp, pred, LHS, RHS, NameStr, - InsertBefore) { - assert(pred <= FCmpInst::LAST_FCMP_PREDICATE && - "Invalid FCmp predicate value"); - assert(getOperand(0)->getType() == getOperand(1)->getType() && - "Both operands to FCmp instruction are not of the same type!"); - // Check that the operands are the right type - assert(getOperand(0)->getType()->isFPOrFPVectorTy() && - "Invalid operand types for FCmp instruction"); - } - - /// \brief Constructor with insert-at-end semantics. - FCmpInst( - BasicBlock &InsertAtEnd, ///< Block to insert into. - Predicate pred, ///< The predicate to use for the comparison - Value *LHS, ///< The left-hand-side of the expression - Value *RHS, ///< The right-hand-side of the expression - const Twine &NameStr = "" ///< Name of the instruction - ) : CmpInst(makeCmpResultType(LHS->getType()), - Instruction::FCmp, pred, LHS, RHS, NameStr, - &InsertAtEnd) { - assert(pred <= FCmpInst::LAST_FCMP_PREDICATE && - "Invalid FCmp predicate value"); - assert(getOperand(0)->getType() == getOperand(1)->getType() && - "Both operands to FCmp instruction are not of the same type!"); - // Check that the operands are the right type - assert(getOperand(0)->getType()->isFPOrFPVectorTy() && - "Invalid operand types for FCmp instruction"); - } - - /// \brief Constructor with no-insertion semantics - FCmpInst( - Predicate pred, ///< The predicate to use for the comparison - Value *LHS, ///< The left-hand-side of the expression - Value *RHS, ///< The right-hand-side of the expression - const Twine &NameStr = "" ///< Name of the instruction - ) : CmpInst(makeCmpResultType(LHS->getType()), - Instruction::FCmp, pred, LHS, RHS, NameStr) { - assert(pred <= FCmpInst::LAST_FCMP_PREDICATE && - "Invalid FCmp predicate value"); - assert(getOperand(0)->getType() == getOperand(1)->getType() && - "Both operands to FCmp instruction are not of the same type!"); - // Check that the operands are the right type - assert(getOperand(0)->getType()->isFPOrFPVectorTy() && - "Invalid operand types for FCmp instruction"); - } - - /// @returns true if the predicate of this instruction is EQ or NE. - /// \brief Determine if this is an equality predicate. - static bool isEquality(Predicate Pred) { - return Pred == FCMP_OEQ || Pred == FCMP_ONE || Pred == FCMP_UEQ || - Pred == FCMP_UNE; - } - - /// @returns true if the predicate of this instruction is EQ or NE. - /// \brief Determine if this is an equality predicate. - bool isEquality() const { return isEquality(getPredicate()); } - - /// @returns true if the predicate of this instruction is commutative. - /// \brief Determine if this is a commutative predicate. - bool isCommutative() const { - return isEquality() || - getPredicate() == FCMP_FALSE || - getPredicate() == FCMP_TRUE || - getPredicate() == FCMP_ORD || - getPredicate() == FCMP_UNO; - } - - /// @returns true if the predicate is relational (not EQ or NE). - /// \brief Determine if this a relational predicate. - bool isRelational() const { return !isEquality(); } - - /// Exchange the two operands to this instruction in such a way that it does - /// not modify the semantics of the instruction. The predicate value may be - /// changed to retain the same result if the predicate is order dependent - /// (e.g. ult). - /// \brief Swap operands and adjust predicate. - void swapOperands() { - setPredicate(getSwappedPredicate()); - Op<0>().swap(Op<1>()); - } - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::FCmp; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -/// CallInst - This class represents a function call, abstracting a target -/// machine's calling convention. This class uses low bit of the SubClassData -/// field to indicate whether or not this is a tail call. The rest of the bits -/// hold the calling convention of the call. -/// -class CallInst : public Instruction, - public OperandBundleUser { - AttributeSet AttributeList; ///< parameter attributes for call - FunctionType *FTy; - CallInst(const CallInst &CI); - void init(Value *Func, ArrayRef Args, - ArrayRef Bundles, const Twine &NameStr) { - init(cast( - cast(Func->getType())->getElementType()), - Func, Args, Bundles, NameStr); - } - void init(FunctionType *FTy, Value *Func, ArrayRef Args, - ArrayRef Bundles, const Twine &NameStr); - void init(Value *Func, const Twine &NameStr); - - /// Construct a CallInst given a range of arguments. - /// \brief Construct a CallInst from a range of arguments - inline CallInst(FunctionType *Ty, Value *Func, ArrayRef Args, - ArrayRef Bundles, const Twine &NameStr, - Instruction *InsertBefore); - inline CallInst(Value *Func, ArrayRef Args, - ArrayRef Bundles, const Twine &NameStr, - Instruction *InsertBefore) - : CallInst(cast( - cast(Func->getType())->getElementType()), - Func, Args, Bundles, NameStr, InsertBefore) {} - - inline CallInst(Value *Func, ArrayRef Args, const Twine &NameStr, - Instruction *InsertBefore) - : CallInst(Func, Args, None, NameStr, InsertBefore) {} - - /// Construct a CallInst given a range of arguments. - /// \brief Construct a CallInst from a range of arguments - inline CallInst(Value *Func, ArrayRef Args, - ArrayRef Bundles, const Twine &NameStr, - BasicBlock *InsertAtEnd); - - explicit CallInst(Value *F, const Twine &NameStr, - Instruction *InsertBefore); - CallInst(Value *F, const Twine &NameStr, BasicBlock *InsertAtEnd); - - friend class OperandBundleUser; - bool hasDescriptor() const { return HasDescriptor; } - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - CallInst *cloneImpl() const; - -public: - static CallInst *Create(Value *Func, ArrayRef Args, - ArrayRef Bundles = None, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return Create(cast( - cast(Func->getType())->getElementType()), - Func, Args, Bundles, NameStr, InsertBefore); - } - static CallInst *Create(Value *Func, ArrayRef Args, - const Twine &NameStr, - Instruction *InsertBefore = nullptr) { - return Create(cast( - cast(Func->getType())->getElementType()), - Func, Args, None, NameStr, InsertBefore); - } - static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef Args, - const Twine &NameStr, - Instruction *InsertBefore = nullptr) { - return new (unsigned(Args.size() + 1)) - CallInst(Ty, Func, Args, None, NameStr, InsertBefore); - } - static CallInst *Create(FunctionType *Ty, Value *Func, ArrayRef Args, - ArrayRef Bundles = None, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - const unsigned TotalOps = - unsigned(Args.size()) + CountBundleInputs(Bundles) + 1; - const unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); - - return new (TotalOps, DescriptorBytes) - CallInst(Ty, Func, Args, Bundles, NameStr, InsertBefore); - } - static CallInst *Create(Value *Func, ArrayRef Args, - ArrayRef Bundles, - const Twine &NameStr, BasicBlock *InsertAtEnd) { - const unsigned TotalOps = - unsigned(Args.size()) + CountBundleInputs(Bundles) + 1; - const unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); - - return new (TotalOps, DescriptorBytes) - CallInst(Func, Args, Bundles, NameStr, InsertAtEnd); - } - static CallInst *Create(Value *Func, ArrayRef Args, - const Twine &NameStr, BasicBlock *InsertAtEnd) { - return new (unsigned(Args.size() + 1)) - CallInst(Func, Args, None, NameStr, InsertAtEnd); - } - static CallInst *Create(Value *F, const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return new(1) CallInst(F, NameStr, InsertBefore); - } - static CallInst *Create(Value *F, const Twine &NameStr, - BasicBlock *InsertAtEnd) { - return new(1) CallInst(F, NameStr, InsertAtEnd); - } - - /// \brief Create a clone of \p CI with a different set of operand bundles and - /// insert it before \p InsertPt. - /// - /// The returned call instruction is identical \p CI in every way except that - /// the operand bundles for the new instruction are set to the operand bundles - /// in \p Bundles. - static CallInst *Create(CallInst *CI, ArrayRef Bundles, - Instruction *InsertPt = nullptr); - - /// CreateMalloc - Generate the IR for a call to malloc: - /// 1. Compute the malloc call's argument as the specified type's size, - /// possibly multiplied by the array size if the array size is not - /// constant 1. - /// 2. Call malloc with that argument. - /// 3. Bitcast the result of the malloc call to the specified type. - static Instruction *CreateMalloc(Instruction *InsertBefore, - Type *IntPtrTy, Type *AllocTy, - Value *AllocSize, Value *ArraySize = nullptr, - Function* MallocF = nullptr, - const Twine &Name = ""); - static Instruction *CreateMalloc(BasicBlock *InsertAtEnd, - Type *IntPtrTy, Type *AllocTy, - Value *AllocSize, Value *ArraySize = nullptr, - Function* MallocF = nullptr, - const Twine &Name = ""); - static Instruction *CreateMalloc(Instruction *InsertBefore, - Type *IntPtrTy, Type *AllocTy, - Value *AllocSize, Value *ArraySize = nullptr, - ArrayRef Bundles = None, - Function* MallocF = nullptr, - const Twine &Name = ""); - static Instruction *CreateMalloc(BasicBlock *InsertAtEnd, - Type *IntPtrTy, Type *AllocTy, - Value *AllocSize, Value *ArraySize = nullptr, - ArrayRef Bundles = None, - Function* MallocF = nullptr, - const Twine &Name = ""); - /// CreateFree - Generate the IR for a call to the builtin free function. - static Instruction *CreateFree(Value *Source, - Instruction *InsertBefore); - static Instruction *CreateFree(Value *Source, - BasicBlock *InsertAtEnd); - static Instruction *CreateFree(Value *Source, - ArrayRef Bundles, - Instruction *InsertBefore); - static Instruction *CreateFree(Value *Source, - ArrayRef Bundles, - BasicBlock *InsertAtEnd); - - ~CallInst() override; - - FunctionType *getFunctionType() const { return FTy; } - - void mutateFunctionType(FunctionType *FTy) { - mutateType(FTy->getReturnType()); - this->FTy = FTy; - } - - // Note that 'musttail' implies 'tail'. - enum TailCallKind { TCK_None = 0, TCK_Tail = 1, TCK_MustTail = 2, - TCK_NoTail = 3 }; - TailCallKind getTailCallKind() const { - return TailCallKind(getSubclassDataFromInstruction() & 3); - } - bool isTailCall() const { - unsigned Kind = getSubclassDataFromInstruction() & 3; - return Kind == TCK_Tail || Kind == TCK_MustTail; - } - bool isMustTailCall() const { - return (getSubclassDataFromInstruction() & 3) == TCK_MustTail; - } - bool isNoTailCall() const { - return (getSubclassDataFromInstruction() & 3) == TCK_NoTail; - } - void setTailCall(bool isTC = true) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~3) | - unsigned(isTC ? TCK_Tail : TCK_None)); - } - void setTailCallKind(TailCallKind TCK) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~3) | - unsigned(TCK)); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// getNumArgOperands - Return the number of call arguments. - /// - unsigned getNumArgOperands() const { - return getNumOperands() - getNumTotalBundleOperands() - 1; - } - - /// getArgOperand/setArgOperand - Return/set the i-th call argument. - /// - Value *getArgOperand(unsigned i) const { - assert(i < getNumArgOperands() && "Out of bounds!"); - return getOperand(i); - } - void setArgOperand(unsigned i, Value *v) { - assert(i < getNumArgOperands() && "Out of bounds!"); - setOperand(i, v); - } - - /// \brief Return the iterator pointing to the beginning of the argument list. - op_iterator arg_begin() { return op_begin(); } - - /// \brief Return the iterator pointing to the end of the argument list. - op_iterator arg_end() { - // [ call args ], [ operand bundles ], callee - return op_end() - getNumTotalBundleOperands() - 1; - }; - - /// \brief Iteration adapter for range-for loops. - iterator_range arg_operands() { - return make_range(arg_begin(), arg_end()); - } - - /// \brief Return the iterator pointing to the beginning of the argument list. - const_op_iterator arg_begin() const { return op_begin(); } - - /// \brief Return the iterator pointing to the end of the argument list. - const_op_iterator arg_end() const { - // [ call args ], [ operand bundles ], callee - return op_end() - getNumTotalBundleOperands() - 1; - }; - - /// \brief Iteration adapter for range-for loops. - iterator_range arg_operands() const { - return make_range(arg_begin(), arg_end()); - } - - /// \brief Wrappers for getting the \c Use of a call argument. - const Use &getArgOperandUse(unsigned i) const { - assert(i < getNumArgOperands() && "Out of bounds!"); - return getOperandUse(i); - } - Use &getArgOperandUse(unsigned i) { - assert(i < getNumArgOperands() && "Out of bounds!"); - return getOperandUse(i); - } - - /// If one of the arguments has the 'returned' attribute, return its - /// operand value. Otherwise, return nullptr. - Value *getReturnedArgOperand() const; - - /// getCallingConv/setCallingConv - Get or set the calling convention of this - /// function call. - CallingConv::ID getCallingConv() const { - return static_cast(getSubclassDataFromInstruction() >> 2); - } - void setCallingConv(CallingConv::ID CC) { - auto ID = static_cast(CC); - assert(!(ID & ~CallingConv::MaxID) && "Unsupported calling convention"); - setInstructionSubclassData((getSubclassDataFromInstruction() & 3) | - (ID << 2)); - } - - /// getAttributes - Return the parameter attributes for this call. - /// - const AttributeSet &getAttributes() const { return AttributeList; } - - /// setAttributes - Set the parameter attributes for this call. - /// - void setAttributes(const AttributeSet &Attrs) { AttributeList = Attrs; } - - /// addAttribute - adds the attribute to the list of attributes. - void addAttribute(unsigned i, Attribute::AttrKind Kind); - - /// addAttribute - adds the attribute to the list of attributes. - void addAttribute(unsigned i, StringRef Kind, StringRef Value); - - /// addAttribute - adds the attribute to the list of attributes. - void addAttribute(unsigned i, Attribute Attr); - - /// removeAttribute - removes the attribute from the list of attributes. - void removeAttribute(unsigned i, Attribute::AttrKind Kind); - - /// removeAttribute - removes the attribute from the list of attributes. - void removeAttribute(unsigned i, StringRef Kind); - - /// removeAttribute - removes the attribute from the list of attributes. - void removeAttribute(unsigned i, Attribute Attr); - - /// \brief adds the dereferenceable attribute to the list of attributes. - void addDereferenceableAttr(unsigned i, uint64_t Bytes); - - /// \brief adds the dereferenceable_or_null attribute to the list of - /// attributes. - void addDereferenceableOrNullAttr(unsigned i, uint64_t Bytes); - - /// \brief Determine whether this call has the given attribute. - bool hasFnAttr(Attribute::AttrKind Kind) const { - assert(Kind != Attribute::NoBuiltin && - "Use CallInst::isNoBuiltin() to check for Attribute::NoBuiltin"); - return hasFnAttrImpl(Kind); - } - - /// \brief Determine whether this call has the given attribute. - bool hasFnAttr(StringRef Kind) const { - return hasFnAttrImpl(Kind); - } - - /// \brief Determine whether the call or the callee has the given attributes. - bool paramHasAttr(unsigned i, Attribute::AttrKind Kind) const; - - /// \brief Get the attribute of a given kind at a position. - Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const; - - /// \brief Get the attribute of a given kind at a position. - Attribute getAttribute(unsigned i, StringRef Kind) const; - - /// \brief Return true if the data operand at index \p i has the attribute \p - /// A. - /// - /// Data operands include call arguments and values used in operand bundles, - /// but does not include the callee operand. This routine dispatches to the - /// underlying AttributeList or the OperandBundleUser as appropriate. - /// - /// The index \p i is interpreted as - /// - /// \p i == Attribute::ReturnIndex -> the return value - /// \p i in [1, arg_size + 1) -> argument number (\p i - 1) - /// \p i in [arg_size + 1, data_operand_size + 1) -> bundle operand at index - /// (\p i - 1) in the operand list. - bool dataOperandHasImpliedAttr(unsigned i, Attribute::AttrKind Kind) const; - - /// \brief Extract the alignment for a call or parameter (0=unknown). - unsigned getParamAlignment(unsigned i) const { - return AttributeList.getParamAlignment(i); - } - - /// \brief Extract the number of dereferenceable bytes for a call or - /// parameter (0=unknown). - uint64_t getDereferenceableBytes(unsigned i) const { - return AttributeList.getDereferenceableBytes(i); - } - - /// \brief Extract the number of dereferenceable_or_null bytes for a call or - /// parameter (0=unknown). - uint64_t getDereferenceableOrNullBytes(unsigned i) const { - return AttributeList.getDereferenceableOrNullBytes(i); - } - - /// @brief Determine if the parameter or return value is marked with NoAlias - /// attribute. - /// @param n The parameter to check. 1 is the first parameter, 0 is the return - bool doesNotAlias(unsigned n) const { - return AttributeList.hasAttribute(n, Attribute::NoAlias); - } - - /// \brief Return true if the call should not be treated as a call to a - /// builtin. - bool isNoBuiltin() const { - return hasFnAttrImpl(Attribute::NoBuiltin) && - !hasFnAttrImpl(Attribute::Builtin); - } - - /// \brief Return true if the call should not be inlined. - bool isNoInline() const { return hasFnAttr(Attribute::NoInline); } - void setIsNoInline() { - addAttribute(AttributeSet::FunctionIndex, Attribute::NoInline); - } - - /// \brief Return true if the call can return twice - bool canReturnTwice() const { - return hasFnAttr(Attribute::ReturnsTwice); - } - void setCanReturnTwice() { - addAttribute(AttributeSet::FunctionIndex, Attribute::ReturnsTwice); - } - - /// \brief Determine if the call does not access memory. - bool doesNotAccessMemory() const { - return hasFnAttr(Attribute::ReadNone); - } - void setDoesNotAccessMemory() { - addAttribute(AttributeSet::FunctionIndex, Attribute::ReadNone); - } - - /// \brief Determine if the call does not access or only reads memory. - bool onlyReadsMemory() const { - return doesNotAccessMemory() || hasFnAttr(Attribute::ReadOnly); - } - void setOnlyReadsMemory() { - addAttribute(AttributeSet::FunctionIndex, Attribute::ReadOnly); - } - - /// \brief Determine if the call does not access or only writes memory. - bool doesNotReadMemory() const { - return doesNotAccessMemory() || hasFnAttr(Attribute::WriteOnly); - } - void setDoesNotReadMemory() { - addAttribute(AttributeSet::FunctionIndex, Attribute::WriteOnly); - } - - /// @brief Determine if the call can access memmory only using pointers based - /// on its arguments. - bool onlyAccessesArgMemory() const { - return hasFnAttr(Attribute::ArgMemOnly); - } - void setOnlyAccessesArgMemory() { - addAttribute(AttributeSet::FunctionIndex, Attribute::ArgMemOnly); - } - - /// \brief Determine if the call cannot return. - bool doesNotReturn() const { return hasFnAttr(Attribute::NoReturn); } - void setDoesNotReturn() { - addAttribute(AttributeSet::FunctionIndex, Attribute::NoReturn); - } - - /// \brief Determine if the call cannot unwind. - bool doesNotThrow() const { return hasFnAttr(Attribute::NoUnwind); } - void setDoesNotThrow() { - addAttribute(AttributeSet::FunctionIndex, Attribute::NoUnwind); - } - - /// \brief Determine if the call cannot be duplicated. - bool cannotDuplicate() const {return hasFnAttr(Attribute::NoDuplicate); } - void setCannotDuplicate() { - addAttribute(AttributeSet::FunctionIndex, Attribute::NoDuplicate); - } - - /// \brief Determine if the call is convergent - bool isConvergent() const { return hasFnAttr(Attribute::Convergent); } - void setConvergent() { - addAttribute(AttributeSet::FunctionIndex, Attribute::Convergent); - } - void setNotConvergent() { - removeAttribute(AttributeSet::FunctionIndex, - Attribute::get(getContext(), Attribute::Convergent)); - } - - /// \brief Determine if the call returns a structure through first - /// pointer argument. - bool hasStructRetAttr() const { - if (getNumArgOperands() == 0) - return false; - - // Be friendly and also check the callee. - return paramHasAttr(1, Attribute::StructRet); - } - - /// \brief Determine if any call argument is an aggregate passed by value. - bool hasByValArgument() const { - return AttributeList.hasAttrSomewhere(Attribute::ByVal); - } - - /// getCalledFunction - Return the function called, or null if this is an - /// indirect function invocation. - /// - Function *getCalledFunction() const { - return dyn_cast(Op<-1>()); - } - - /// getCalledValue - Get a pointer to the function that is invoked by this - /// instruction. - const Value *getCalledValue() const { return Op<-1>(); } - Value *getCalledValue() { return Op<-1>(); } - - /// setCalledFunction - Set the function called. - void setCalledFunction(Value* Fn) { - setCalledFunction( - cast(cast(Fn->getType())->getElementType()), - Fn); - } - void setCalledFunction(FunctionType *FTy, Value *Fn) { - this->FTy = FTy; - assert(FTy == cast( - cast(Fn->getType())->getElementType())); - Op<-1>() = Fn; - } - - /// isInlineAsm - Check if this call is an inline asm statement. - bool isInlineAsm() const { - return isa(Op<-1>()); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Call; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - template bool hasFnAttrImpl(AttrKind A) const { - if (AttributeList.hasAttribute(AttributeSet::FunctionIndex, A)) - return true; - - // Operand bundles override attributes on the called function, but don't - // override attributes directly present on the call instruction. - if (isFnAttrDisallowedByOpBundle(A)) - return false; - - if (const Function *F = getCalledFunction()) - return F->getAttributes().hasAttribute(AttributeSet::FunctionIndex, A); - return false; - } - - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -template <> -struct OperandTraits : public VariadicOperandTraits { -}; - -CallInst::CallInst(Value *Func, ArrayRef Args, - ArrayRef Bundles, const Twine &NameStr, - BasicBlock *InsertAtEnd) - : Instruction( - cast(cast(Func->getType()) - ->getElementType())->getReturnType(), - Instruction::Call, OperandTraits::op_end(this) - - (Args.size() + CountBundleInputs(Bundles) + 1), - unsigned(Args.size() + CountBundleInputs(Bundles) + 1), InsertAtEnd) { - init(Func, Args, Bundles, NameStr); -} - -CallInst::CallInst(FunctionType *Ty, Value *Func, ArrayRef Args, - ArrayRef Bundles, const Twine &NameStr, - Instruction *InsertBefore) - : Instruction(Ty->getReturnType(), Instruction::Call, - OperandTraits::op_end(this) - - (Args.size() + CountBundleInputs(Bundles) + 1), - unsigned(Args.size() + CountBundleInputs(Bundles) + 1), - InsertBefore) { - init(Ty, Func, Args, Bundles, NameStr); -} - -// Note: if you get compile errors about private methods then -// please update your code to use the high-level operand -// interfaces. See line 943 above. -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CallInst, Value) - -//===----------------------------------------------------------------------===// -// SelectInst Class -//===----------------------------------------------------------------------===// - -/// SelectInst - This class represents the LLVM 'select' instruction. -/// -class SelectInst : public Instruction { - void init(Value *C, Value *S1, Value *S2) { - assert(!areInvalidOperands(C, S1, S2) && "Invalid operands for select"); - Op<0>() = C; - Op<1>() = S1; - Op<2>() = S2; - } - - SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr, - Instruction *InsertBefore) - : Instruction(S1->getType(), Instruction::Select, - &Op<0>(), 3, InsertBefore) { - init(C, S1, S2); - setName(NameStr); - } - SelectInst(Value *C, Value *S1, Value *S2, const Twine &NameStr, - BasicBlock *InsertAtEnd) - : Instruction(S1->getType(), Instruction::Select, - &Op<0>(), 3, InsertAtEnd) { - init(C, S1, S2); - setName(NameStr); - } - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - SelectInst *cloneImpl() const; - -public: - static SelectInst *Create(Value *C, Value *S1, Value *S2, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return new(3) SelectInst(C, S1, S2, NameStr, InsertBefore); - } - static SelectInst *Create(Value *C, Value *S1, Value *S2, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { - return new(3) SelectInst(C, S1, S2, NameStr, InsertAtEnd); - } - - const Value *getCondition() const { return Op<0>(); } - const Value *getTrueValue() const { return Op<1>(); } - const Value *getFalseValue() const { return Op<2>(); } - Value *getCondition() { return Op<0>(); } - Value *getTrueValue() { return Op<1>(); } - Value *getFalseValue() { return Op<2>(); } - - void setCondition(Value *V) { Op<0>() = V; } - void setTrueValue(Value *V) { Op<1>() = V; } - void setFalseValue(Value *V) { Op<2>() = V; } - - /// areInvalidOperands - Return a string if the specified operands are invalid - /// for a select operation, otherwise return null. - static const char *areInvalidOperands(Value *Cond, Value *True, Value *False); - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - OtherOps getOpcode() const { - return static_cast(Instruction::getOpcode()); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Select; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SelectInst, Value) - -//===----------------------------------------------------------------------===// -// VAArgInst Class -//===----------------------------------------------------------------------===// - -/// VAArgInst - This class represents the va_arg llvm instruction, which returns -/// an argument of the specified type given a va_list and increments that list -/// -class VAArgInst : public UnaryInstruction { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - VAArgInst *cloneImpl() const; - -public: - VAArgInst(Value *List, Type *Ty, const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) - : UnaryInstruction(Ty, VAArg, List, InsertBefore) { - setName(NameStr); - } - VAArgInst(Value *List, Type *Ty, const Twine &NameStr, - BasicBlock *InsertAtEnd) - : UnaryInstruction(Ty, VAArg, List, InsertAtEnd) { - setName(NameStr); - } - - Value *getPointerOperand() { return getOperand(0); } - const Value *getPointerOperand() const { return getOperand(0); } - static unsigned getPointerOperandIndex() { return 0U; } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == VAArg; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// ExtractElementInst Class -//===----------------------------------------------------------------------===// - -/// ExtractElementInst - This instruction extracts a single (scalar) -/// element from a VectorType value -/// -class ExtractElementInst : public Instruction { - ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr = "", - Instruction *InsertBefore = nullptr); - ExtractElementInst(Value *Vec, Value *Idx, const Twine &NameStr, - BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - ExtractElementInst *cloneImpl() const; - -public: - static ExtractElementInst *Create(Value *Vec, Value *Idx, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return new(2) ExtractElementInst(Vec, Idx, NameStr, InsertBefore); - } - static ExtractElementInst *Create(Value *Vec, Value *Idx, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { - return new(2) ExtractElementInst(Vec, Idx, NameStr, InsertAtEnd); - } - - /// isValidOperands - Return true if an extractelement instruction can be - /// formed with the specified operands. - static bool isValidOperands(const Value *Vec, const Value *Idx); - - Value *getVectorOperand() { return Op<0>(); } - Value *getIndexOperand() { return Op<1>(); } - const Value *getVectorOperand() const { return Op<0>(); } - const Value *getIndexOperand() const { return Op<1>(); } - - VectorType *getVectorOperandType() const { - return cast(getVectorOperand()->getType()); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::ExtractElement; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ExtractElementInst, Value) - -//===----------------------------------------------------------------------===// -// InsertElementInst Class -//===----------------------------------------------------------------------===// - -/// InsertElementInst - This instruction inserts a single (scalar) -/// element into a VectorType value -/// -class InsertElementInst : public Instruction { - InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr); - InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const Twine &NameStr, - BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - InsertElementInst *cloneImpl() const; - -public: - static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertBefore); - } - static InsertElementInst *Create(Value *Vec, Value *NewElt, Value *Idx, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { - return new(3) InsertElementInst(Vec, NewElt, Idx, NameStr, InsertAtEnd); - } - - /// isValidOperands - Return true if an insertelement instruction can be - /// formed with the specified operands. - static bool isValidOperands(const Value *Vec, const Value *NewElt, - const Value *Idx); - - /// getType - Overload to return most specific vector type. - /// - VectorType *getType() const { - return cast(Instruction::getType()); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::InsertElement; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(InsertElementInst, Value) - -//===----------------------------------------------------------------------===// -// ShuffleVectorInst Class -//===----------------------------------------------------------------------===// - -/// ShuffleVectorInst - This instruction constructs a fixed permutation of two -/// input vectors. -/// -class ShuffleVectorInst : public Instruction { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - ShuffleVectorInst *cloneImpl() const; - -public: - // allocate space for exactly three operands - void *operator new(size_t s) { - return User::operator new(s, 3); - } - ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, - const Twine &NameStr = "", - Instruction *InsertBefor = nullptr); - ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, - const Twine &NameStr, BasicBlock *InsertAtEnd); - - /// isValidOperands - Return true if a shufflevector instruction can be - /// formed with the specified operands. - static bool isValidOperands(const Value *V1, const Value *V2, - const Value *Mask); - - /// getType - Overload to return most specific vector type. - /// - VectorType *getType() const { - return cast(Instruction::getType()); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - Constant *getMask() const { - return cast(getOperand(2)); - } - - /// getMaskValue - Return the index from the shuffle mask for the specified - /// output result. This is either -1 if the element is undef or a number less - /// than 2*numelements. - static int getMaskValue(Constant *Mask, unsigned i); - - int getMaskValue(unsigned i) const { - return getMaskValue(getMask(), i); - } - - /// getShuffleMask - Return the full mask for this instruction, where each - /// element is the element number and undef's are returned as -1. - static void getShuffleMask(Constant *Mask, SmallVectorImpl &Result); - - void getShuffleMask(SmallVectorImpl &Result) const { - return getShuffleMask(getMask(), Result); - } - - SmallVector getShuffleMask() const { - SmallVector Mask; - getShuffleMask(Mask); - return Mask; - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::ShuffleVector; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ShuffleVectorInst, Value) - -//===----------------------------------------------------------------------===// -// ExtractValueInst Class -//===----------------------------------------------------------------------===// - -/// ExtractValueInst - This instruction extracts a struct member or array -/// element value from an aggregate value. -/// -class ExtractValueInst : public UnaryInstruction { - SmallVector Indices; - - ExtractValueInst(const ExtractValueInst &EVI); - void init(ArrayRef Idxs, const Twine &NameStr); - - /// Constructors - Create a extractvalue instruction with a base aggregate - /// value and a list of indices. The first ctor can optionally insert before - /// an existing instruction, the second appends the new instruction to the - /// specified BasicBlock. - inline ExtractValueInst(Value *Agg, - ArrayRef Idxs, - const Twine &NameStr, - Instruction *InsertBefore); - inline ExtractValueInst(Value *Agg, - ArrayRef Idxs, - const Twine &NameStr, BasicBlock *InsertAtEnd); - - // allocate space for exactly one operand - void *operator new(size_t s) { return User::operator new(s, 1); } - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - ExtractValueInst *cloneImpl() const; - -public: - static ExtractValueInst *Create(Value *Agg, - ArrayRef Idxs, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return new - ExtractValueInst(Agg, Idxs, NameStr, InsertBefore); - } - static ExtractValueInst *Create(Value *Agg, - ArrayRef Idxs, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { - return new ExtractValueInst(Agg, Idxs, NameStr, InsertAtEnd); - } - - /// getIndexedType - Returns the type of the element that would be extracted - /// with an extractvalue instruction with the specified parameters. - /// - /// Null is returned if the indices are invalid for the specified type. - static Type *getIndexedType(Type *Agg, ArrayRef Idxs); - - typedef const unsigned* idx_iterator; - inline idx_iterator idx_begin() const { return Indices.begin(); } - inline idx_iterator idx_end() const { return Indices.end(); } - inline iterator_range indices() const { - return make_range(idx_begin(), idx_end()); - } - - Value *getAggregateOperand() { - return getOperand(0); - } - const Value *getAggregateOperand() const { - return getOperand(0); - } - static unsigned getAggregateOperandIndex() { - return 0U; // get index for modifying correct operand - } - - ArrayRef getIndices() const { - return Indices; - } - - unsigned getNumIndices() const { - return (unsigned)Indices.size(); - } - - bool hasIndices() const { - return true; - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::ExtractValue; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -ExtractValueInst::ExtractValueInst(Value *Agg, - ArrayRef Idxs, - const Twine &NameStr, - Instruction *InsertBefore) - : UnaryInstruction(checkGEPType(getIndexedType(Agg->getType(), Idxs)), - ExtractValue, Agg, InsertBefore) { - init(Idxs, NameStr); -} -ExtractValueInst::ExtractValueInst(Value *Agg, - ArrayRef Idxs, - const Twine &NameStr, - BasicBlock *InsertAtEnd) - : UnaryInstruction(checkGEPType(getIndexedType(Agg->getType(), Idxs)), - ExtractValue, Agg, InsertAtEnd) { - init(Idxs, NameStr); -} - -//===----------------------------------------------------------------------===// -// InsertValueInst Class -//===----------------------------------------------------------------------===// - -/// InsertValueInst - This instruction inserts a struct field of array element -/// value into an aggregate value. -/// -class InsertValueInst : public Instruction { - SmallVector Indices; - - void *operator new(size_t, unsigned) = delete; - InsertValueInst(const InsertValueInst &IVI); - void init(Value *Agg, Value *Val, ArrayRef Idxs, - const Twine &NameStr); - - /// Constructors - Create a insertvalue instruction with a base aggregate - /// value, a value to insert, and a list of indices. The first ctor can - /// optionally insert before an existing instruction, the second appends - /// the new instruction to the specified BasicBlock. - inline InsertValueInst(Value *Agg, Value *Val, - ArrayRef Idxs, - const Twine &NameStr, - Instruction *InsertBefore); - inline InsertValueInst(Value *Agg, Value *Val, - ArrayRef Idxs, - const Twine &NameStr, BasicBlock *InsertAtEnd); - - /// Constructors - These two constructors are convenience methods because one - /// and two index insertvalue instructions are so common. - InsertValueInst(Value *Agg, Value *Val, unsigned Idx, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr); - InsertValueInst(Value *Agg, Value *Val, unsigned Idx, const Twine &NameStr, - BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - InsertValueInst *cloneImpl() const; - -public: - // allocate space for exactly two operands - void *operator new(size_t s) { - return User::operator new(s, 2); - } - - static InsertValueInst *Create(Value *Agg, Value *Val, - ArrayRef Idxs, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return new InsertValueInst(Agg, Val, Idxs, NameStr, InsertBefore); - } - static InsertValueInst *Create(Value *Agg, Value *Val, - ArrayRef Idxs, - const Twine &NameStr, - BasicBlock *InsertAtEnd) { - return new InsertValueInst(Agg, Val, Idxs, NameStr, InsertAtEnd); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - typedef const unsigned* idx_iterator; - inline idx_iterator idx_begin() const { return Indices.begin(); } - inline idx_iterator idx_end() const { return Indices.end(); } - inline iterator_range indices() const { - return make_range(idx_begin(), idx_end()); - } - - Value *getAggregateOperand() { - return getOperand(0); - } - const Value *getAggregateOperand() const { - return getOperand(0); - } - static unsigned getAggregateOperandIndex() { - return 0U; // get index for modifying correct operand - } - - Value *getInsertedValueOperand() { - return getOperand(1); - } - const Value *getInsertedValueOperand() const { - return getOperand(1); - } - static unsigned getInsertedValueOperandIndex() { - return 1U; // get index for modifying correct operand - } - - ArrayRef getIndices() const { - return Indices; - } - - unsigned getNumIndices() const { - return (unsigned)Indices.size(); - } - - bool hasIndices() const { - return true; - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::InsertValue; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -InsertValueInst::InsertValueInst(Value *Agg, - Value *Val, - ArrayRef Idxs, - const Twine &NameStr, - Instruction *InsertBefore) - : Instruction(Agg->getType(), InsertValue, - OperandTraits::op_begin(this), - 2, InsertBefore) { - init(Agg, Val, Idxs, NameStr); -} -InsertValueInst::InsertValueInst(Value *Agg, - Value *Val, - ArrayRef Idxs, - const Twine &NameStr, - BasicBlock *InsertAtEnd) - : Instruction(Agg->getType(), InsertValue, - OperandTraits::op_begin(this), - 2, InsertAtEnd) { - init(Agg, Val, Idxs, NameStr); -} - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(InsertValueInst, Value) - -//===----------------------------------------------------------------------===// -// PHINode Class -//===----------------------------------------------------------------------===// - -// PHINode - The PHINode class is used to represent the magical mystical PHI -// node, that can not exist in nature, but can be synthesized in a computer -// scientist's overactive imagination. -// -class PHINode : public Instruction { - void anchor() override; - - void *operator new(size_t, unsigned) = delete; - /// ReservedSpace - The number of operands actually allocated. NumOperands is - /// the number actually in use. - unsigned ReservedSpace; - PHINode(const PHINode &PN); - // allocate space for exactly zero operands - void *operator new(size_t s) { - return User::operator new(s); - } - explicit PHINode(Type *Ty, unsigned NumReservedValues, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) - : Instruction(Ty, Instruction::PHI, nullptr, 0, InsertBefore), - ReservedSpace(NumReservedValues) { - setName(NameStr); - allocHungoffUses(ReservedSpace); - } - - PHINode(Type *Ty, unsigned NumReservedValues, const Twine &NameStr, - BasicBlock *InsertAtEnd) - : Instruction(Ty, Instruction::PHI, nullptr, 0, InsertAtEnd), - ReservedSpace(NumReservedValues) { - setName(NameStr); - allocHungoffUses(ReservedSpace); - } - -protected: - // allocHungoffUses - this is more complicated than the generic - // User::allocHungoffUses, because we have to allocate Uses for the incoming - // values and pointers to the incoming blocks, all in one allocation. - void allocHungoffUses(unsigned N) { - User::allocHungoffUses(N, /* IsPhi */ true); - } - - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - PHINode *cloneImpl() const; - -public: - /// Constructors - NumReservedValues is a hint for the number of incoming - /// edges that this phi node will have (use 0 if you really have no idea). - static PHINode *Create(Type *Ty, unsigned NumReservedValues, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return new PHINode(Ty, NumReservedValues, NameStr, InsertBefore); - } - static PHINode *Create(Type *Ty, unsigned NumReservedValues, - const Twine &NameStr, BasicBlock *InsertAtEnd) { - return new PHINode(Ty, NumReservedValues, NameStr, InsertAtEnd); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - // Block iterator interface. This provides access to the list of incoming - // basic blocks, which parallels the list of incoming values. - - typedef BasicBlock **block_iterator; - typedef BasicBlock * const *const_block_iterator; - - block_iterator block_begin() { - Use::UserRef *ref = - reinterpret_cast(op_begin() + ReservedSpace); - return reinterpret_cast(ref + 1); - } - - const_block_iterator block_begin() const { - const Use::UserRef *ref = - reinterpret_cast(op_begin() + ReservedSpace); - return reinterpret_cast(ref + 1); - } - - block_iterator block_end() { - return block_begin() + getNumOperands(); - } - - const_block_iterator block_end() const { - return block_begin() + getNumOperands(); - } - - iterator_range blocks() { - return make_range(block_begin(), block_end()); - } - - iterator_range blocks() const { - return make_range(block_begin(), block_end()); - } - - op_range incoming_values() { return operands(); } - - const_op_range incoming_values() const { return operands(); } - - /// getNumIncomingValues - Return the number of incoming edges - /// - unsigned getNumIncomingValues() const { return getNumOperands(); } - - /// getIncomingValue - Return incoming value number x - /// - Value *getIncomingValue(unsigned i) const { - return getOperand(i); - } - void setIncomingValue(unsigned i, Value *V) { - assert(V && "PHI node got a null value!"); - assert(getType() == V->getType() && - "All operands to PHI node must be the same type as the PHI node!"); - setOperand(i, V); - } - static unsigned getOperandNumForIncomingValue(unsigned i) { - return i; - } - static unsigned getIncomingValueNumForOperand(unsigned i) { - return i; - } - - /// getIncomingBlock - Return incoming basic block number @p i. - /// - BasicBlock *getIncomingBlock(unsigned i) const { - return block_begin()[i]; - } - - /// getIncomingBlock - Return incoming basic block corresponding - /// to an operand of the PHI. - /// - BasicBlock *getIncomingBlock(const Use &U) const { - assert(this == U.getUser() && "Iterator doesn't point to PHI's Uses?"); - return getIncomingBlock(unsigned(&U - op_begin())); - } - - /// getIncomingBlock - Return incoming basic block corresponding - /// to value use iterator. - /// - BasicBlock *getIncomingBlock(Value::const_user_iterator I) const { - return getIncomingBlock(I.getUse()); - } - - void setIncomingBlock(unsigned i, BasicBlock *BB) { - assert(BB && "PHI node got a null basic block!"); - block_begin()[i] = BB; - } - - /// addIncoming - Add an incoming value to the end of the PHI list - /// - void addIncoming(Value *V, BasicBlock *BB) { - if (getNumOperands() == ReservedSpace) - growOperands(); // Get more space! - // Initialize some new operands. - setNumHungOffUseOperands(getNumOperands() + 1); - setIncomingValue(getNumOperands() - 1, V); - setIncomingBlock(getNumOperands() - 1, BB); - } - - /// removeIncomingValue - Remove an incoming value. This is useful if a - /// predecessor basic block is deleted. The value removed is returned. - /// - /// If the last incoming value for a PHI node is removed (and DeletePHIIfEmpty - /// is true), the PHI node is destroyed and any uses of it are replaced with - /// dummy values. The only time there should be zero incoming values to a PHI - /// node is when the block is dead, so this strategy is sound. - /// - Value *removeIncomingValue(unsigned Idx, bool DeletePHIIfEmpty = true); - - Value *removeIncomingValue(const BasicBlock *BB, bool DeletePHIIfEmpty=true) { - int Idx = getBasicBlockIndex(BB); - assert(Idx >= 0 && "Invalid basic block argument to remove!"); - return removeIncomingValue(Idx, DeletePHIIfEmpty); - } - - /// getBasicBlockIndex - Return the first index of the specified basic - /// block in the value list for this PHI. Returns -1 if no instance. - /// - int getBasicBlockIndex(const BasicBlock *BB) const { - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - if (block_begin()[i] == BB) - return i; - return -1; - } - - Value *getIncomingValueForBlock(const BasicBlock *BB) const { - int Idx = getBasicBlockIndex(BB); - assert(Idx >= 0 && "Invalid basic block argument!"); - return getIncomingValue(Idx); - } - - /// hasConstantValue - If the specified PHI node always merges together the - /// same value, return the value, otherwise return null. - Value *hasConstantValue() const; - - /// hasConstantOrUndefValue - Whether the specified PHI node always merges - /// together the same value, assuming undefs are equal to a unique - /// non-undef value. - bool hasConstantOrUndefValue() const; - - /// Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::PHI; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - void growOperands(); -}; - -template <> -struct OperandTraits : public HungoffOperandTraits<2> { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(PHINode, Value) - -//===----------------------------------------------------------------------===// -// LandingPadInst Class -//===----------------------------------------------------------------------===// - -//===--------------------------------------------------------------------------- -/// LandingPadInst - The landingpad instruction holds all of the information -/// necessary to generate correct exception handling. The landingpad instruction -/// cannot be moved from the top of a landing pad block, which itself is -/// accessible only from the 'unwind' edge of an invoke. This uses the -/// SubclassData field in Value to store whether or not the landingpad is a -/// cleanup. -/// -class LandingPadInst : public Instruction { - /// ReservedSpace - The number of operands actually allocated. NumOperands is - /// the number actually in use. - unsigned ReservedSpace; - LandingPadInst(const LandingPadInst &LP); - -public: - enum ClauseType { Catch, Filter }; - -private: - void *operator new(size_t, unsigned) = delete; - // Allocate space for exactly zero operands. - void *operator new(size_t s) { - return User::operator new(s); - } - void growOperands(unsigned Size); - void init(unsigned NumReservedValues, const Twine &NameStr); - - explicit LandingPadInst(Type *RetTy, unsigned NumReservedValues, - const Twine &NameStr, Instruction *InsertBefore); - explicit LandingPadInst(Type *RetTy, unsigned NumReservedValues, - const Twine &NameStr, BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - LandingPadInst *cloneImpl() const; - -public: - /// Constructors - NumReservedClauses is a hint for the number of incoming - /// clauses that this landingpad will have (use 0 if you really have no idea). - static LandingPadInst *Create(Type *RetTy, unsigned NumReservedClauses, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr); - static LandingPadInst *Create(Type *RetTy, unsigned NumReservedClauses, - const Twine &NameStr, BasicBlock *InsertAtEnd); - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// isCleanup - Return 'true' if this landingpad instruction is a - /// cleanup. I.e., it should be run when unwinding even if its landing pad - /// doesn't catch the exception. - bool isCleanup() const { return getSubclassDataFromInstruction() & 1; } - - /// setCleanup - Indicate that this landingpad instruction is a cleanup. - void setCleanup(bool V) { - setInstructionSubclassData((getSubclassDataFromInstruction() & ~1) | - (V ? 1 : 0)); - } - - /// Add a catch or filter clause to the landing pad. - void addClause(Constant *ClauseVal); - - /// Get the value of the clause at index Idx. Use isCatch/isFilter to - /// determine what type of clause this is. - Constant *getClause(unsigned Idx) const { - return cast(getOperandList()[Idx]); - } - - /// isCatch - Return 'true' if the clause and index Idx is a catch clause. - bool isCatch(unsigned Idx) const { - return !isa(getOperandList()[Idx]->getType()); - } - - /// isFilter - Return 'true' if the clause and index Idx is a filter clause. - bool isFilter(unsigned Idx) const { - return isa(getOperandList()[Idx]->getType()); - } - - /// getNumClauses - Get the number of clauses for this landing pad. - unsigned getNumClauses() const { return getNumOperands(); } - - /// reserveClauses - Grow the size of the operand list to accommodate the new - /// number of clauses. - void reserveClauses(unsigned Size) { growOperands(Size); } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::LandingPad; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template <> -struct OperandTraits : public HungoffOperandTraits<1> { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(LandingPadInst, Value) - -//===----------------------------------------------------------------------===// -// ReturnInst Class -//===----------------------------------------------------------------------===// - -//===--------------------------------------------------------------------------- -/// ReturnInst - Return a value (possibly void), from a function. Execution -/// does not continue in this function any longer. -/// -class ReturnInst : public TerminatorInst { - ReturnInst(const ReturnInst &RI); - -private: - // ReturnInst constructors: - // ReturnInst() - 'ret void' instruction - // ReturnInst( null) - 'ret void' instruction - // ReturnInst(Value* X) - 'ret X' instruction - // ReturnInst( null, Inst *I) - 'ret void' instruction, insert before I - // ReturnInst(Value* X, Inst *I) - 'ret X' instruction, insert before I - // ReturnInst( null, BB *B) - 'ret void' instruction, insert @ end of B - // ReturnInst(Value* X, BB *B) - 'ret X' instruction, insert @ end of B - // - // NOTE: If the Value* passed is of type void then the constructor behaves as - // if it was passed NULL. - explicit ReturnInst(LLVMContext &C, Value *retVal = nullptr, - Instruction *InsertBefore = nullptr); - ReturnInst(LLVMContext &C, Value *retVal, BasicBlock *InsertAtEnd); - explicit ReturnInst(LLVMContext &C, BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - ReturnInst *cloneImpl() const; - -public: - static ReturnInst* Create(LLVMContext &C, Value *retVal = nullptr, - Instruction *InsertBefore = nullptr) { - return new(!!retVal) ReturnInst(C, retVal, InsertBefore); - } - static ReturnInst* Create(LLVMContext &C, Value *retVal, - BasicBlock *InsertAtEnd) { - return new(!!retVal) ReturnInst(C, retVal, InsertAtEnd); - } - static ReturnInst* Create(LLVMContext &C, BasicBlock *InsertAtEnd) { - return new(0) ReturnInst(C, InsertAtEnd); - } - ~ReturnInst() override; - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// Convenience accessor. Returns null if there is no return value. - Value *getReturnValue() const { - return getNumOperands() != 0 ? getOperand(0) : nullptr; - } - - unsigned getNumSuccessors() const { return 0; } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return (I->getOpcode() == Instruction::Ret); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned idx, BasicBlock *B) override; -}; - -template <> -struct OperandTraits : public VariadicOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ReturnInst, Value) - -//===----------------------------------------------------------------------===// -// BranchInst Class -//===----------------------------------------------------------------------===// - -//===--------------------------------------------------------------------------- -/// BranchInst - Conditional or Unconditional Branch instruction. -/// -class BranchInst : public TerminatorInst { - /// Ops list - Branches are strange. The operands are ordered: - /// [Cond, FalseDest,] TrueDest. This makes some accessors faster because - /// they don't have to check for cond/uncond branchness. These are mostly - /// accessed relative from op_end(). - BranchInst(const BranchInst &BI); - void AssertOK(); - // BranchInst constructors (where {B, T, F} are blocks, and C is a condition): - // BranchInst(BB *B) - 'br B' - // BranchInst(BB* T, BB *F, Value *C) - 'br C, T, F' - // BranchInst(BB* B, Inst *I) - 'br B' insert before I - // BranchInst(BB* T, BB *F, Value *C, Inst *I) - 'br C, T, F', insert before I - // BranchInst(BB* B, BB *I) - 'br B' insert at end - // BranchInst(BB* T, BB *F, Value *C, BB *I) - 'br C, T, F', insert at end - explicit BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore = nullptr); - BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, - Instruction *InsertBefore = nullptr); - BranchInst(BasicBlock *IfTrue, BasicBlock *InsertAtEnd); - BranchInst(BasicBlock *IfTrue, BasicBlock *IfFalse, Value *Cond, - BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - BranchInst *cloneImpl() const; - -public: - static BranchInst *Create(BasicBlock *IfTrue, - Instruction *InsertBefore = nullptr) { - return new(1) BranchInst(IfTrue, InsertBefore); - } - static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse, - Value *Cond, Instruction *InsertBefore = nullptr) { - return new(3) BranchInst(IfTrue, IfFalse, Cond, InsertBefore); - } - static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *InsertAtEnd) { - return new(1) BranchInst(IfTrue, InsertAtEnd); - } - static BranchInst *Create(BasicBlock *IfTrue, BasicBlock *IfFalse, - Value *Cond, BasicBlock *InsertAtEnd) { - return new(3) BranchInst(IfTrue, IfFalse, Cond, InsertAtEnd); - } - - /// Transparently provide more efficient getOperand methods. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - bool isUnconditional() const { return getNumOperands() == 1; } - bool isConditional() const { return getNumOperands() == 3; } - - Value *getCondition() const { - assert(isConditional() && "Cannot get condition of an uncond branch!"); - return Op<-3>(); - } - - void setCondition(Value *V) { - assert(isConditional() && "Cannot set condition of unconditional branch!"); - Op<-3>() = V; - } - - unsigned getNumSuccessors() const { return 1+isConditional(); } - - BasicBlock *getSuccessor(unsigned i) const { - assert(i < getNumSuccessors() && "Successor # out of range for Branch!"); - return cast_or_null((&Op<-1>() - i)->get()); - } - - void setSuccessor(unsigned idx, BasicBlock *NewSucc) { - assert(idx < getNumSuccessors() && "Successor # out of range for Branch!"); - *(&Op<-1>() - idx) = NewSucc; - } - - /// \brief Swap the successors of this branch instruction. - /// - /// Swaps the successors of the branch instruction. This also swaps any - /// branch weight metadata associated with the instruction so that it - /// continues to map correctly to each operand. - void swapSuccessors(); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return (I->getOpcode() == Instruction::Br); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned idx, BasicBlock *B) override; -}; - -template <> -struct OperandTraits : public VariadicOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(BranchInst, Value) - -//===----------------------------------------------------------------------===// -// SwitchInst Class -//===----------------------------------------------------------------------===// - -//===--------------------------------------------------------------------------- -/// Multiway switch -/// -class SwitchInst : public TerminatorInst { - void *operator new(size_t, unsigned) = delete; - unsigned ReservedSpace; - // Operand[0] = Value to switch on - // Operand[1] = Default basic block destination - // Operand[2n ] = Value to match - // Operand[2n+1] = BasicBlock to go to on match - SwitchInst(const SwitchInst &SI); - void init(Value *Value, BasicBlock *Default, unsigned NumReserved); - void growOperands(); - // allocate space for exactly zero operands - void *operator new(size_t s) { - return User::operator new(s); - } - /// Create a new switch instruction, specifying a value to switch on and a - /// default destination. The number of additional cases can be specified here - /// to make memory allocation more efficient. This constructor can also - /// auto-insert before another instruction. - SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases, - Instruction *InsertBefore); - - /// Create a new switch instruction, specifying a value to switch on and a - /// default destination. The number of additional cases can be specified here - /// to make memory allocation more efficient. This constructor also - /// auto-inserts at the end of the specified BasicBlock. - SwitchInst(Value *Value, BasicBlock *Default, unsigned NumCases, - BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - SwitchInst *cloneImpl() const; - -public: - // -2 - static const unsigned DefaultPseudoIndex = static_cast(~0L-1); - - template - class CaseIteratorT { - protected: - SwitchInstTy *SI; - unsigned Index; - - public: - typedef CaseIteratorT Self; - - /// Initializes case iterator for given SwitchInst and for given - /// case number. - CaseIteratorT(SwitchInstTy *SI, unsigned CaseNum) { - this->SI = SI; - Index = CaseNum; - } - - /// Initializes case iterator for given SwitchInst and for given - /// TerminatorInst's successor index. - static Self fromSuccessorIndex(SwitchInstTy *SI, unsigned SuccessorIndex) { - assert(SuccessorIndex < SI->getNumSuccessors() && - "Successor index # out of range!"); - return SuccessorIndex != 0 ? - Self(SI, SuccessorIndex - 1) : - Self(SI, DefaultPseudoIndex); - } - - /// Resolves case value for current case. - ConstantIntTy *getCaseValue() { - assert(Index < SI->getNumCases() && "Index out the number of cases."); - return reinterpret_cast(SI->getOperand(2 + Index*2)); - } - - /// Resolves successor for current case. - BasicBlockTy *getCaseSuccessor() { - assert((Index < SI->getNumCases() || - Index == DefaultPseudoIndex) && - "Index out the number of cases."); - return SI->getSuccessor(getSuccessorIndex()); - } - - /// Returns number of current case. - unsigned getCaseIndex() const { return Index; } - - /// Returns TerminatorInst's successor index for current case successor. - unsigned getSuccessorIndex() const { - assert((Index == DefaultPseudoIndex || Index < SI->getNumCases()) && - "Index out the number of cases."); - return Index != DefaultPseudoIndex ? Index + 1 : 0; - } - - Self operator++() { - // Check index correctness after increment. - // Note: Index == getNumCases() means end(). - assert(Index+1 <= SI->getNumCases() && "Index out the number of cases."); - ++Index; - return *this; - } - Self operator++(int) { - Self tmp = *this; - ++(*this); - return tmp; - } - Self operator--() { - // Check index correctness after decrement. - // Note: Index == getNumCases() means end(). - // Also allow "-1" iterator here. That will became valid after ++. - assert((Index == 0 || Index-1 <= SI->getNumCases()) && - "Index out the number of cases."); - --Index; - return *this; - } - Self operator--(int) { - Self tmp = *this; - --(*this); - return tmp; - } - bool operator==(const Self& RHS) const { - assert(RHS.SI == SI && "Incompatible operators."); - return RHS.Index == Index; - } - bool operator!=(const Self& RHS) const { - assert(RHS.SI == SI && "Incompatible operators."); - return RHS.Index != Index; - } - Self &operator*() { - return *this; - } - }; - - typedef CaseIteratorT - ConstCaseIt; - - class CaseIt : public CaseIteratorT { - - typedef CaseIteratorT ParentTy; - - public: - CaseIt(const ParentTy &Src) : ParentTy(Src) {} - CaseIt(SwitchInst *SI, unsigned CaseNum) : ParentTy(SI, CaseNum) {} - - /// Sets the new value for current case. - void setValue(ConstantInt *V) { - assert(Index < SI->getNumCases() && "Index out the number of cases."); - SI->setOperand(2 + Index*2, reinterpret_cast(V)); - } - - /// Sets the new successor for current case. - void setSuccessor(BasicBlock *S) { - SI->setSuccessor(getSuccessorIndex(), S); - } - }; - - static SwitchInst *Create(Value *Value, BasicBlock *Default, - unsigned NumCases, - Instruction *InsertBefore = nullptr) { - return new SwitchInst(Value, Default, NumCases, InsertBefore); - } - static SwitchInst *Create(Value *Value, BasicBlock *Default, - unsigned NumCases, BasicBlock *InsertAtEnd) { - return new SwitchInst(Value, Default, NumCases, InsertAtEnd); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - // Accessor Methods for Switch stmt - Value *getCondition() const { return getOperand(0); } - void setCondition(Value *V) { setOperand(0, V); } - - BasicBlock *getDefaultDest() const { - return cast(getOperand(1)); - } - - void setDefaultDest(BasicBlock *DefaultCase) { - setOperand(1, reinterpret_cast(DefaultCase)); - } - - /// Return the number of 'cases' in this switch instruction, excluding the - /// default case. - unsigned getNumCases() const { - return getNumOperands()/2 - 1; - } - - /// Returns a read/write iterator that points to the first case in the - /// SwitchInst. - CaseIt case_begin() { - return CaseIt(this, 0); - } - /// Returns a read-only iterator that points to the first case in the - /// SwitchInst. - ConstCaseIt case_begin() const { - return ConstCaseIt(this, 0); - } - - /// Returns a read/write iterator that points one past the last in the - /// SwitchInst. - CaseIt case_end() { - return CaseIt(this, getNumCases()); - } - /// Returns a read-only iterator that points one past the last in the - /// SwitchInst. - ConstCaseIt case_end() const { - return ConstCaseIt(this, getNumCases()); - } - - /// Iteration adapter for range-for loops. - iterator_range cases() { - return make_range(case_begin(), case_end()); - } - - /// Constant iteration adapter for range-for loops. - iterator_range cases() const { - return make_range(case_begin(), case_end()); - } - - /// Returns an iterator that points to the default case. - /// Note: this iterator allows to resolve successor only. Attempt - /// to resolve case value causes an assertion. - /// Also note, that increment and decrement also causes an assertion and - /// makes iterator invalid. - CaseIt case_default() { - return CaseIt(this, DefaultPseudoIndex); - } - ConstCaseIt case_default() const { - return ConstCaseIt(this, DefaultPseudoIndex); - } - - /// Search all of the case values for the specified constant. If it is - /// explicitly handled, return the case iterator of it, otherwise return - /// default case iterator to indicate that it is handled by the default - /// handler. - CaseIt findCaseValue(const ConstantInt *C) { - for (CaseIt i = case_begin(), e = case_end(); i != e; ++i) - if (i.getCaseValue() == C) - return i; - return case_default(); - } - ConstCaseIt findCaseValue(const ConstantInt *C) const { - for (ConstCaseIt i = case_begin(), e = case_end(); i != e; ++i) - if (i.getCaseValue() == C) - return i; - return case_default(); - } - - /// Finds the unique case value for a given successor. Returns null if the - /// successor is not found, not unique, or is the default case. - ConstantInt *findCaseDest(BasicBlock *BB) { - if (BB == getDefaultDest()) return nullptr; - - ConstantInt *CI = nullptr; - for (CaseIt i = case_begin(), e = case_end(); i != e; ++i) { - if (i.getCaseSuccessor() == BB) { - if (CI) return nullptr; // Multiple cases lead to BB. - else CI = i.getCaseValue(); - } - } - return CI; - } - - /// Add an entry to the switch instruction. - /// Note: - /// This action invalidates case_end(). Old case_end() iterator will - /// point to the added case. - void addCase(ConstantInt *OnVal, BasicBlock *Dest); - - /// This method removes the specified case and its successor from the switch - /// instruction. Note that this operation may reorder the remaining cases at - /// index idx and above. - /// Note: - /// This action invalidates iterators for all cases following the one removed, - /// including the case_end() iterator. - void removeCase(CaseIt i); - - unsigned getNumSuccessors() const { return getNumOperands()/2; } - BasicBlock *getSuccessor(unsigned idx) const { - assert(idx < getNumSuccessors() &&"Successor idx out of range for switch!"); - return cast(getOperand(idx*2+1)); - } - void setSuccessor(unsigned idx, BasicBlock *NewSucc) { - assert(idx < getNumSuccessors() && "Successor # out of range for switch!"); - setOperand(idx * 2 + 1, NewSucc); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Switch; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned idx, BasicBlock *B) override; -}; - -template <> -struct OperandTraits : public HungoffOperandTraits<2> { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(SwitchInst, Value) - -//===----------------------------------------------------------------------===// -// IndirectBrInst Class -//===----------------------------------------------------------------------===// - -//===--------------------------------------------------------------------------- -/// IndirectBrInst - Indirect Branch Instruction. -/// -class IndirectBrInst : public TerminatorInst { - void *operator new(size_t, unsigned) = delete; - unsigned ReservedSpace; - // Operand[0] = Value to switch on - // Operand[1] = Default basic block destination - // Operand[2n ] = Value to match - // Operand[2n+1] = BasicBlock to go to on match - IndirectBrInst(const IndirectBrInst &IBI); - void init(Value *Address, unsigned NumDests); - void growOperands(); - // allocate space for exactly zero operands - void *operator new(size_t s) { - return User::operator new(s); - } - /// IndirectBrInst ctor - Create a new indirectbr instruction, specifying an - /// Address to jump to. The number of expected destinations can be specified - /// here to make memory allocation more efficient. This constructor can also - /// autoinsert before another instruction. - IndirectBrInst(Value *Address, unsigned NumDests, Instruction *InsertBefore); - - /// IndirectBrInst ctor - Create a new indirectbr instruction, specifying an - /// Address to jump to. The number of expected destinations can be specified - /// here to make memory allocation more efficient. This constructor also - /// autoinserts at the end of the specified BasicBlock. - IndirectBrInst(Value *Address, unsigned NumDests, BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - IndirectBrInst *cloneImpl() const; - -public: - static IndirectBrInst *Create(Value *Address, unsigned NumDests, - Instruction *InsertBefore = nullptr) { - return new IndirectBrInst(Address, NumDests, InsertBefore); - } - static IndirectBrInst *Create(Value *Address, unsigned NumDests, - BasicBlock *InsertAtEnd) { - return new IndirectBrInst(Address, NumDests, InsertAtEnd); - } - - /// Provide fast operand accessors. - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - // Accessor Methods for IndirectBrInst instruction. - Value *getAddress() { return getOperand(0); } - const Value *getAddress() const { return getOperand(0); } - void setAddress(Value *V) { setOperand(0, V); } - - /// getNumDestinations - return the number of possible destinations in this - /// indirectbr instruction. - unsigned getNumDestinations() const { return getNumOperands()-1; } - - /// getDestination - Return the specified destination. - BasicBlock *getDestination(unsigned i) { return getSuccessor(i); } - const BasicBlock *getDestination(unsigned i) const { return getSuccessor(i); } - - /// addDestination - Add a destination. - /// - void addDestination(BasicBlock *Dest); - - /// removeDestination - This method removes the specified successor from the - /// indirectbr instruction. - void removeDestination(unsigned i); - - unsigned getNumSuccessors() const { return getNumOperands()-1; } - BasicBlock *getSuccessor(unsigned i) const { - return cast(getOperand(i+1)); - } - void setSuccessor(unsigned i, BasicBlock *NewSucc) { - setOperand(i + 1, NewSucc); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::IndirectBr; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned idx, BasicBlock *B) override; -}; - -template <> -struct OperandTraits : public HungoffOperandTraits<1> { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(IndirectBrInst, Value) - -//===----------------------------------------------------------------------===// -// InvokeInst Class -//===----------------------------------------------------------------------===// - -/// InvokeInst - Invoke instruction. The SubclassData field is used to hold the -/// calling convention of the call. -/// -class InvokeInst : public TerminatorInst, - public OperandBundleUser { - AttributeSet AttributeList; - FunctionType *FTy; - InvokeInst(const InvokeInst &BI); - void init(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, - ArrayRef Args, ArrayRef Bundles, - const Twine &NameStr) { - init(cast( - cast(Func->getType())->getElementType()), - Func, IfNormal, IfException, Args, Bundles, NameStr); - } - void init(FunctionType *FTy, Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - ArrayRef Bundles, const Twine &NameStr); - - /// Construct an InvokeInst given a range of arguments. - /// - /// \brief Construct an InvokeInst from a range of arguments - inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, - ArrayRef Args, ArrayRef Bundles, - unsigned Values, const Twine &NameStr, - Instruction *InsertBefore) - : InvokeInst(cast( - cast(Func->getType())->getElementType()), - Func, IfNormal, IfException, Args, Bundles, Values, NameStr, - InsertBefore) {} - - inline InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - ArrayRef Bundles, unsigned Values, - const Twine &NameStr, Instruction *InsertBefore); - /// Construct an InvokeInst given a range of arguments. - /// - /// \brief Construct an InvokeInst from a range of arguments - inline InvokeInst(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, - ArrayRef Args, ArrayRef Bundles, - unsigned Values, const Twine &NameStr, - BasicBlock *InsertAtEnd); - - friend class OperandBundleUser; - bool hasDescriptor() const { return HasDescriptor; } - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - InvokeInst *cloneImpl() const; - -public: - static InvokeInst *Create(Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - const Twine &NameStr, - Instruction *InsertBefore = nullptr) { - return Create(cast( - cast(Func->getType())->getElementType()), - Func, IfNormal, IfException, Args, None, NameStr, - InsertBefore); - } - static InvokeInst *Create(Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - ArrayRef Bundles = None, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return Create(cast( - cast(Func->getType())->getElementType()), - Func, IfNormal, IfException, Args, Bundles, NameStr, - InsertBefore); - } - static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - const Twine &NameStr, - Instruction *InsertBefore = nullptr) { - unsigned Values = unsigned(Args.size()) + 3; - return new (Values) InvokeInst(Ty, Func, IfNormal, IfException, Args, None, - Values, NameStr, InsertBefore); - } - static InvokeInst *Create(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - ArrayRef Bundles = None, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - unsigned Values = unsigned(Args.size()) + CountBundleInputs(Bundles) + 3; - unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); - - return new (Values, DescriptorBytes) - InvokeInst(Ty, Func, IfNormal, IfException, Args, Bundles, Values, - NameStr, InsertBefore); - } - static InvokeInst *Create(Value *Func, - BasicBlock *IfNormal, BasicBlock *IfException, - ArrayRef Args, const Twine &NameStr, - BasicBlock *InsertAtEnd) { - unsigned Values = unsigned(Args.size()) + 3; - return new (Values) InvokeInst(Func, IfNormal, IfException, Args, None, - Values, NameStr, InsertAtEnd); - } - static InvokeInst *Create(Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - ArrayRef Bundles, - const Twine &NameStr, BasicBlock *InsertAtEnd) { - unsigned Values = unsigned(Args.size()) + CountBundleInputs(Bundles) + 3; - unsigned DescriptorBytes = Bundles.size() * sizeof(BundleOpInfo); - - return new (Values, DescriptorBytes) - InvokeInst(Func, IfNormal, IfException, Args, Bundles, Values, NameStr, - InsertAtEnd); - } - - /// \brief Create a clone of \p II with a different set of operand bundles and - /// insert it before \p InsertPt. - /// - /// The returned invoke instruction is identical to \p II in every way except - /// that the operand bundles for the new instruction are set to the operand - /// bundles in \p Bundles. - static InvokeInst *Create(InvokeInst *II, ArrayRef Bundles, - Instruction *InsertPt = nullptr); - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - FunctionType *getFunctionType() const { return FTy; } - - void mutateFunctionType(FunctionType *FTy) { - mutateType(FTy->getReturnType()); - this->FTy = FTy; - } - - /// getNumArgOperands - Return the number of invoke arguments. - /// - unsigned getNumArgOperands() const { - return getNumOperands() - getNumTotalBundleOperands() - 3; - } - - /// getArgOperand/setArgOperand - Return/set the i-th invoke argument. - /// - Value *getArgOperand(unsigned i) const { - assert(i < getNumArgOperands() && "Out of bounds!"); - return getOperand(i); - } - void setArgOperand(unsigned i, Value *v) { - assert(i < getNumArgOperands() && "Out of bounds!"); - setOperand(i, v); - } - - /// \brief Return the iterator pointing to the beginning of the argument list. - op_iterator arg_begin() { return op_begin(); } - - /// \brief Return the iterator pointing to the end of the argument list. - op_iterator arg_end() { - // [ invoke args ], [ operand bundles ], normal dest, unwind dest, callee - return op_end() - getNumTotalBundleOperands() - 3; - }; - - /// \brief Iteration adapter for range-for loops. - iterator_range arg_operands() { - return make_range(arg_begin(), arg_end()); - } - - /// \brief Return the iterator pointing to the beginning of the argument list. - const_op_iterator arg_begin() const { return op_begin(); } - - /// \brief Return the iterator pointing to the end of the argument list. - const_op_iterator arg_end() const { - // [ invoke args ], [ operand bundles ], normal dest, unwind dest, callee - return op_end() - getNumTotalBundleOperands() - 3; - }; - - /// \brief Iteration adapter for range-for loops. - iterator_range arg_operands() const { - return make_range(arg_begin(), arg_end()); - } - - /// \brief Wrappers for getting the \c Use of a invoke argument. - const Use &getArgOperandUse(unsigned i) const { - assert(i < getNumArgOperands() && "Out of bounds!"); - return getOperandUse(i); - } - Use &getArgOperandUse(unsigned i) { - assert(i < getNumArgOperands() && "Out of bounds!"); - return getOperandUse(i); - } - - /// If one of the arguments has the 'returned' attribute, return its - /// operand value. Otherwise, return nullptr. - Value *getReturnedArgOperand() const; - - /// getCallingConv/setCallingConv - Get or set the calling convention of this - /// function call. - CallingConv::ID getCallingConv() const { - return static_cast(getSubclassDataFromInstruction()); - } - void setCallingConv(CallingConv::ID CC) { - auto ID = static_cast(CC); - assert(!(ID & ~CallingConv::MaxID) && "Unsupported calling convention"); - setInstructionSubclassData(ID); - } - - /// getAttributes - Return the parameter attributes for this invoke. - /// - const AttributeSet &getAttributes() const { return AttributeList; } - - /// setAttributes - Set the parameter attributes for this invoke. - /// - void setAttributes(const AttributeSet &Attrs) { AttributeList = Attrs; } - - /// addAttribute - adds the attribute to the list of attributes. - void addAttribute(unsigned i, Attribute::AttrKind Kind); - - /// addAttribute - adds the attribute to the list of attributes. - void addAttribute(unsigned i, Attribute Attr); - - /// removeAttribute - removes the attribute from the list of attributes. - void removeAttribute(unsigned i, Attribute::AttrKind Kind); - - /// removeAttribute - removes the attribute from the list of attributes. - void removeAttribute(unsigned i, StringRef Kind); - - /// removeAttribute - removes the attribute from the list of attributes. - void removeAttribute(unsigned i, Attribute Attr); - - /// \brief adds the dereferenceable attribute to the list of attributes. - void addDereferenceableAttr(unsigned i, uint64_t Bytes); - - /// \brief adds the dereferenceable_or_null attribute to the list of - /// attributes. - void addDereferenceableOrNullAttr(unsigned i, uint64_t Bytes); - - /// \brief Determine whether this call has the given attribute. - bool hasFnAttr(Attribute::AttrKind Kind) const { - assert(Kind != Attribute::NoBuiltin && - "Use CallInst::isNoBuiltin() to check for Attribute::NoBuiltin"); - return hasFnAttrImpl(Kind); - } - - /// \brief Determine whether this call has the given attribute. - bool hasFnAttr(StringRef Kind) const { - return hasFnAttrImpl(Kind); - } - - /// \brief Determine whether the call or the callee has the given attributes. - bool paramHasAttr(unsigned i, Attribute::AttrKind Kind) const; - - /// \brief Get the attribute of a given kind at a position. - Attribute getAttribute(unsigned i, Attribute::AttrKind Kind) const; - - /// \brief Get the attribute of a given kind at a position. - Attribute getAttribute(unsigned i, StringRef Kind) const; - - /// \brief Return true if the data operand at index \p i has the attribute \p - /// A. - /// - /// Data operands include invoke arguments and values used in operand bundles, - /// but does not include the invokee operand, or the two successor blocks. - /// This routine dispatches to the underlying AttributeList or the - /// OperandBundleUser as appropriate. - /// - /// The index \p i is interpreted as - /// - /// \p i == Attribute::ReturnIndex -> the return value - /// \p i in [1, arg_size + 1) -> argument number (\p i - 1) - /// \p i in [arg_size + 1, data_operand_size + 1) -> bundle operand at index - /// (\p i - 1) in the operand list. - bool dataOperandHasImpliedAttr(unsigned i, Attribute::AttrKind Kind) const; - - /// \brief Extract the alignment for a call or parameter (0=unknown). - unsigned getParamAlignment(unsigned i) const { - return AttributeList.getParamAlignment(i); - } - - /// \brief Extract the number of dereferenceable bytes for a call or - /// parameter (0=unknown). - uint64_t getDereferenceableBytes(unsigned i) const { - return AttributeList.getDereferenceableBytes(i); - } - - /// \brief Extract the number of dereferenceable_or_null bytes for a call or - /// parameter (0=unknown). - uint64_t getDereferenceableOrNullBytes(unsigned i) const { - return AttributeList.getDereferenceableOrNullBytes(i); - } - - /// @brief Determine if the parameter or return value is marked with NoAlias - /// attribute. - /// @param n The parameter to check. 1 is the first parameter, 0 is the return - bool doesNotAlias(unsigned n) const { - return AttributeList.hasAttribute(n, Attribute::NoAlias); - } - - /// \brief Return true if the call should not be treated as a call to a - /// builtin. - bool isNoBuiltin() const { - // We assert in hasFnAttr if one passes in Attribute::NoBuiltin, so we have - // to check it by hand. - return hasFnAttrImpl(Attribute::NoBuiltin) && - !hasFnAttrImpl(Attribute::Builtin); - } - - /// \brief Return true if the call should not be inlined. - bool isNoInline() const { return hasFnAttr(Attribute::NoInline); } - void setIsNoInline() { - addAttribute(AttributeSet::FunctionIndex, Attribute::NoInline); - } - - /// \brief Determine if the call does not access memory. - bool doesNotAccessMemory() const { - return hasFnAttr(Attribute::ReadNone); - } - void setDoesNotAccessMemory() { - addAttribute(AttributeSet::FunctionIndex, Attribute::ReadNone); - } - - /// \brief Determine if the call does not access or only reads memory. - bool onlyReadsMemory() const { - return doesNotAccessMemory() || hasFnAttr(Attribute::ReadOnly); - } - void setOnlyReadsMemory() { - addAttribute(AttributeSet::FunctionIndex, Attribute::ReadOnly); - } - - /// \brief Determine if the call does not access or only writes memory. - bool doesNotReadMemory() const { - return doesNotAccessMemory() || hasFnAttr(Attribute::WriteOnly); - } - void setDoesNotReadMemory() { - addAttribute(AttributeSet::FunctionIndex, Attribute::WriteOnly); - } - - /// @brief Determine if the call access memmory only using it's pointer - /// arguments. - bool onlyAccessesArgMemory() const { - return hasFnAttr(Attribute::ArgMemOnly); - } - void setOnlyAccessesArgMemory() { - addAttribute(AttributeSet::FunctionIndex, Attribute::ArgMemOnly); - } - - /// \brief Determine if the call cannot return. - bool doesNotReturn() const { return hasFnAttr(Attribute::NoReturn); } - void setDoesNotReturn() { - addAttribute(AttributeSet::FunctionIndex, Attribute::NoReturn); - } - - /// \brief Determine if the call cannot unwind. - bool doesNotThrow() const { return hasFnAttr(Attribute::NoUnwind); } - void setDoesNotThrow() { - addAttribute(AttributeSet::FunctionIndex, Attribute::NoUnwind); - } - - /// \brief Determine if the invoke cannot be duplicated. - bool cannotDuplicate() const {return hasFnAttr(Attribute::NoDuplicate); } - void setCannotDuplicate() { - addAttribute(AttributeSet::FunctionIndex, Attribute::NoDuplicate); - } - - /// \brief Determine if the invoke is convergent - bool isConvergent() const { return hasFnAttr(Attribute::Convergent); } - void setConvergent() { - addAttribute(AttributeSet::FunctionIndex, Attribute::Convergent); - } - void setNotConvergent() { - removeAttribute(AttributeSet::FunctionIndex, - Attribute::get(getContext(), Attribute::Convergent)); - } - - /// \brief Determine if the call returns a structure through first - /// pointer argument. - bool hasStructRetAttr() const { - if (getNumArgOperands() == 0) - return false; - - // Be friendly and also check the callee. - return paramHasAttr(1, Attribute::StructRet); - } - - /// \brief Determine if any call argument is an aggregate passed by value. - bool hasByValArgument() const { - return AttributeList.hasAttrSomewhere(Attribute::ByVal); - } - - /// getCalledFunction - Return the function called, or null if this is an - /// indirect function invocation. - /// - Function *getCalledFunction() const { - return dyn_cast(Op<-3>()); - } - - /// getCalledValue - Get a pointer to the function that is invoked by this - /// instruction - const Value *getCalledValue() const { return Op<-3>(); } - Value *getCalledValue() { return Op<-3>(); } - - /// setCalledFunction - Set the function called. - void setCalledFunction(Value* Fn) { - setCalledFunction( - cast(cast(Fn->getType())->getElementType()), - Fn); - } - void setCalledFunction(FunctionType *FTy, Value *Fn) { - this->FTy = FTy; - assert(FTy == cast( - cast(Fn->getType())->getElementType())); - Op<-3>() = Fn; - } - - // get*Dest - Return the destination basic blocks... - BasicBlock *getNormalDest() const { - return cast(Op<-2>()); - } - BasicBlock *getUnwindDest() const { - return cast(Op<-1>()); - } - void setNormalDest(BasicBlock *B) { - Op<-2>() = reinterpret_cast(B); - } - void setUnwindDest(BasicBlock *B) { - Op<-1>() = reinterpret_cast(B); - } - - /// getLandingPadInst - Get the landingpad instruction from the landing pad - /// block (the unwind destination). - LandingPadInst *getLandingPadInst() const; - - BasicBlock *getSuccessor(unsigned i) const { - assert(i < 2 && "Successor # out of range for invoke!"); - return i == 0 ? getNormalDest() : getUnwindDest(); - } - - void setSuccessor(unsigned idx, BasicBlock *NewSucc) { - assert(idx < 2 && "Successor # out of range for invoke!"); - *(&Op<-2>() + idx) = reinterpret_cast(NewSucc); - } - - unsigned getNumSuccessors() const { return 2; } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return (I->getOpcode() == Instruction::Invoke); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned idx, BasicBlock *B) override; - - template bool hasFnAttrImpl(AttrKind A) const { - if (AttributeList.hasAttribute(AttributeSet::FunctionIndex, A)) - return true; - - // Operand bundles override attributes on the called function, but don't - // override attributes directly present on the invoke instruction. - if (isFnAttrDisallowedByOpBundle(A)) - return false; - - if (const Function *F = getCalledFunction()) - return F->getAttributes().hasAttribute(AttributeSet::FunctionIndex, A); - return false; - } - - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -template <> -struct OperandTraits : public VariadicOperandTraits { -}; - -InvokeInst::InvokeInst(FunctionType *Ty, Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - ArrayRef Bundles, unsigned Values, - const Twine &NameStr, Instruction *InsertBefore) - : TerminatorInst(Ty->getReturnType(), Instruction::Invoke, - OperandTraits::op_end(this) - Values, Values, - InsertBefore) { - init(Ty, Func, IfNormal, IfException, Args, Bundles, NameStr); -} -InvokeInst::InvokeInst(Value *Func, BasicBlock *IfNormal, - BasicBlock *IfException, ArrayRef Args, - ArrayRef Bundles, unsigned Values, - const Twine &NameStr, BasicBlock *InsertAtEnd) - : TerminatorInst( - cast(cast(Func->getType()) - ->getElementType())->getReturnType(), - Instruction::Invoke, OperandTraits::op_end(this) - Values, - Values, InsertAtEnd) { - init(Func, IfNormal, IfException, Args, Bundles, NameStr); -} - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(InvokeInst, Value) - -//===----------------------------------------------------------------------===// -// ResumeInst Class -//===----------------------------------------------------------------------===// - -//===--------------------------------------------------------------------------- -/// ResumeInst - Resume the propagation of an exception. -/// -class ResumeInst : public TerminatorInst { - ResumeInst(const ResumeInst &RI); - - explicit ResumeInst(Value *Exn, Instruction *InsertBefore=nullptr); - ResumeInst(Value *Exn, BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - ResumeInst *cloneImpl() const; - -public: - static ResumeInst *Create(Value *Exn, Instruction *InsertBefore = nullptr) { - return new(1) ResumeInst(Exn, InsertBefore); - } - static ResumeInst *Create(Value *Exn, BasicBlock *InsertAtEnd) { - return new(1) ResumeInst(Exn, InsertAtEnd); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// Convenience accessor. - Value *getValue() const { return Op<0>(); } - - unsigned getNumSuccessors() const { return 0; } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Resume; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned idx, BasicBlock *B) override; -}; - -template <> -struct OperandTraits : - public FixedNumOperandTraits { -}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ResumeInst, Value) - -//===----------------------------------------------------------------------===// -// CatchSwitchInst Class -//===----------------------------------------------------------------------===// -class CatchSwitchInst : public TerminatorInst { - void *operator new(size_t, unsigned) = delete; - /// ReservedSpace - The number of operands actually allocated. NumOperands is - /// the number actually in use. - unsigned ReservedSpace; - // Operand[0] = Outer scope - // Operand[1] = Unwind block destination - // Operand[n] = BasicBlock to go to on match - CatchSwitchInst(const CatchSwitchInst &CSI); - void init(Value *ParentPad, BasicBlock *UnwindDest, unsigned NumReserved); - void growOperands(unsigned Size); - // allocate space for exactly zero operands - void *operator new(size_t s) { return User::operator new(s); } - /// CatchSwitchInst ctor - Create a new switch instruction, specifying a - /// default destination. The number of additional handlers can be specified - /// here to make memory allocation more efficient. - /// This constructor can also autoinsert before another instruction. - CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest, - unsigned NumHandlers, const Twine &NameStr, - Instruction *InsertBefore); - - /// CatchSwitchInst ctor - Create a new switch instruction, specifying a - /// default destination. The number of additional handlers can be specified - /// here to make memory allocation more efficient. - /// This constructor also autoinserts at the end of the specified BasicBlock. - CatchSwitchInst(Value *ParentPad, BasicBlock *UnwindDest, - unsigned NumHandlers, const Twine &NameStr, - BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - CatchSwitchInst *cloneImpl() const; - -public: - static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest, - unsigned NumHandlers, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - return new CatchSwitchInst(ParentPad, UnwindDest, NumHandlers, NameStr, - InsertBefore); - } - static CatchSwitchInst *Create(Value *ParentPad, BasicBlock *UnwindDest, - unsigned NumHandlers, const Twine &NameStr, - BasicBlock *InsertAtEnd) { - return new CatchSwitchInst(ParentPad, UnwindDest, NumHandlers, NameStr, - InsertAtEnd); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - // Accessor Methods for CatchSwitch stmt - Value *getParentPad() const { return getOperand(0); } - void setParentPad(Value *ParentPad) { setOperand(0, ParentPad); } - - // Accessor Methods for CatchSwitch stmt - bool hasUnwindDest() const { return getSubclassDataFromInstruction() & 1; } - bool unwindsToCaller() const { return !hasUnwindDest(); } - BasicBlock *getUnwindDest() const { - if (hasUnwindDest()) - return cast(getOperand(1)); - return nullptr; - } - void setUnwindDest(BasicBlock *UnwindDest) { - assert(UnwindDest); - assert(hasUnwindDest()); - setOperand(1, UnwindDest); - } - - /// getNumHandlers - return the number of 'handlers' in this catchswitch - /// instruction, except the default handler - unsigned getNumHandlers() const { - if (hasUnwindDest()) - return getNumOperands() - 2; - return getNumOperands() - 1; - } - -private: - static BasicBlock *handler_helper(Value *V) { return cast(V); } - static const BasicBlock *handler_helper(const Value *V) { - return cast(V); - } - -public: - typedef std::pointer_to_unary_function DerefFnTy; - typedef mapped_iterator handler_iterator; - typedef iterator_range handler_range; - - - typedef std::pointer_to_unary_function - ConstDerefFnTy; - typedef mapped_iterator const_handler_iterator; - typedef iterator_range const_handler_range; - - /// Returns an iterator that points to the first handler in CatchSwitchInst. - handler_iterator handler_begin() { - op_iterator It = op_begin() + 1; - if (hasUnwindDest()) - ++It; - return handler_iterator(It, DerefFnTy(handler_helper)); - } - /// Returns an iterator that points to the first handler in the - /// CatchSwitchInst. - const_handler_iterator handler_begin() const { - const_op_iterator It = op_begin() + 1; - if (hasUnwindDest()) - ++It; - return const_handler_iterator(It, ConstDerefFnTy(handler_helper)); - } - - /// Returns a read-only iterator that points one past the last - /// handler in the CatchSwitchInst. - handler_iterator handler_end() { - return handler_iterator(op_end(), DerefFnTy(handler_helper)); - } - /// Returns an iterator that points one past the last handler in the - /// CatchSwitchInst. - const_handler_iterator handler_end() const { - return const_handler_iterator(op_end(), ConstDerefFnTy(handler_helper)); - } - - /// handlers - iteration adapter for range-for loops. - handler_range handlers() { - return make_range(handler_begin(), handler_end()); - } - - /// handlers - iteration adapter for range-for loops. - const_handler_range handlers() const { - return make_range(handler_begin(), handler_end()); - } - - /// addHandler - Add an entry to the switch instruction... - /// Note: - /// This action invalidates handler_end(). Old handler_end() iterator will - /// point to the added handler. - void addHandler(BasicBlock *Dest); - - void removeHandler(handler_iterator HI); - - unsigned getNumSuccessors() const { return getNumOperands() - 1; } - BasicBlock *getSuccessor(unsigned Idx) const { - assert(Idx < getNumSuccessors() && - "Successor # out of range for catchswitch!"); - return cast(getOperand(Idx + 1)); - } - void setSuccessor(unsigned Idx, BasicBlock *NewSucc) { - assert(Idx < getNumSuccessors() && - "Successor # out of range for catchswitch!"); - setOperand(Idx + 1, NewSucc); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::CatchSwitch; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned Idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned Idx, BasicBlock *B) override; -}; - -template <> -struct OperandTraits : public HungoffOperandTraits<2> {}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CatchSwitchInst, Value) - -//===----------------------------------------------------------------------===// -// CleanupPadInst Class -//===----------------------------------------------------------------------===// -class CleanupPadInst : public FuncletPadInst { -private: - explicit CleanupPadInst(Value *ParentPad, ArrayRef Args, - unsigned Values, const Twine &NameStr, - Instruction *InsertBefore) - : FuncletPadInst(Instruction::CleanupPad, ParentPad, Args, Values, - NameStr, InsertBefore) {} - explicit CleanupPadInst(Value *ParentPad, ArrayRef Args, - unsigned Values, const Twine &NameStr, - BasicBlock *InsertAtEnd) - : FuncletPadInst(Instruction::CleanupPad, ParentPad, Args, Values, - NameStr, InsertAtEnd) {} - -public: - static CleanupPadInst *Create(Value *ParentPad, ArrayRef Args = None, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - unsigned Values = 1 + Args.size(); - return new (Values) - CleanupPadInst(ParentPad, Args, Values, NameStr, InsertBefore); - } - static CleanupPadInst *Create(Value *ParentPad, ArrayRef Args, - const Twine &NameStr, BasicBlock *InsertAtEnd) { - unsigned Values = 1 + Args.size(); - return new (Values) - CleanupPadInst(ParentPad, Args, Values, NameStr, InsertAtEnd); - } - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::CleanupPad; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// CatchPadInst Class -//===----------------------------------------------------------------------===// -class CatchPadInst : public FuncletPadInst { -private: - explicit CatchPadInst(Value *CatchSwitch, ArrayRef Args, - unsigned Values, const Twine &NameStr, - Instruction *InsertBefore) - : FuncletPadInst(Instruction::CatchPad, CatchSwitch, Args, Values, - NameStr, InsertBefore) {} - explicit CatchPadInst(Value *CatchSwitch, ArrayRef Args, - unsigned Values, const Twine &NameStr, - BasicBlock *InsertAtEnd) - : FuncletPadInst(Instruction::CatchPad, CatchSwitch, Args, Values, - NameStr, InsertAtEnd) {} - -public: - static CatchPadInst *Create(Value *CatchSwitch, ArrayRef Args, - const Twine &NameStr = "", - Instruction *InsertBefore = nullptr) { - unsigned Values = 1 + Args.size(); - return new (Values) - CatchPadInst(CatchSwitch, Args, Values, NameStr, InsertBefore); - } - static CatchPadInst *Create(Value *CatchSwitch, ArrayRef Args, - const Twine &NameStr, BasicBlock *InsertAtEnd) { - unsigned Values = 1 + Args.size(); - return new (Values) - CatchPadInst(CatchSwitch, Args, Values, NameStr, InsertAtEnd); - } - - /// Convenience accessors - CatchSwitchInst *getCatchSwitch() const { - return cast(Op<-1>()); - } - void setCatchSwitch(Value *CatchSwitch) { - assert(CatchSwitch); - Op<-1>() = CatchSwitch; - } - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::CatchPad; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// CatchReturnInst Class -//===----------------------------------------------------------------------===// - -class CatchReturnInst : public TerminatorInst { - CatchReturnInst(const CatchReturnInst &RI); - - void init(Value *CatchPad, BasicBlock *BB); - CatchReturnInst(Value *CatchPad, BasicBlock *BB, Instruction *InsertBefore); - CatchReturnInst(Value *CatchPad, BasicBlock *BB, BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - CatchReturnInst *cloneImpl() const; - -public: - static CatchReturnInst *Create(Value *CatchPad, BasicBlock *BB, - Instruction *InsertBefore = nullptr) { - assert(CatchPad); - assert(BB); - return new (2) CatchReturnInst(CatchPad, BB, InsertBefore); - } - static CatchReturnInst *Create(Value *CatchPad, BasicBlock *BB, - BasicBlock *InsertAtEnd) { - assert(CatchPad); - assert(BB); - return new (2) CatchReturnInst(CatchPad, BB, InsertAtEnd); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - /// Convenience accessors. - CatchPadInst *getCatchPad() const { return cast(Op<0>()); } - void setCatchPad(CatchPadInst *CatchPad) { - assert(CatchPad); - Op<0>() = CatchPad; - } - - BasicBlock *getSuccessor() const { return cast(Op<1>()); } - void setSuccessor(BasicBlock *NewSucc) { - assert(NewSucc); - Op<1>() = NewSucc; - } - unsigned getNumSuccessors() const { return 1; } - - /// Get the parentPad of this catchret's catchpad's catchswitch. - /// The successor block is implicitly a member of this funclet. - Value *getCatchSwitchParentPad() const { - return getCatchPad()->getCatchSwitch()->getParentPad(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return (I->getOpcode() == Instruction::CatchRet); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned Idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned Idx, BasicBlock *B) override; -}; - -template <> -struct OperandTraits - : public FixedNumOperandTraits {}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CatchReturnInst, Value) - -//===----------------------------------------------------------------------===// -// CleanupReturnInst Class -//===----------------------------------------------------------------------===// - -class CleanupReturnInst : public TerminatorInst { -private: - CleanupReturnInst(const CleanupReturnInst &RI); - - void init(Value *CleanupPad, BasicBlock *UnwindBB); - CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB, unsigned Values, - Instruction *InsertBefore = nullptr); - CleanupReturnInst(Value *CleanupPad, BasicBlock *UnwindBB, unsigned Values, - BasicBlock *InsertAtEnd); - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - CleanupReturnInst *cloneImpl() const; - -public: - static CleanupReturnInst *Create(Value *CleanupPad, - BasicBlock *UnwindBB = nullptr, - Instruction *InsertBefore = nullptr) { - assert(CleanupPad); - unsigned Values = 1; - if (UnwindBB) - ++Values; - return new (Values) - CleanupReturnInst(CleanupPad, UnwindBB, Values, InsertBefore); - } - static CleanupReturnInst *Create(Value *CleanupPad, BasicBlock *UnwindBB, - BasicBlock *InsertAtEnd) { - assert(CleanupPad); - unsigned Values = 1; - if (UnwindBB) - ++Values; - return new (Values) - CleanupReturnInst(CleanupPad, UnwindBB, Values, InsertAtEnd); - } - - /// Provide fast operand accessors - DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - - bool hasUnwindDest() const { return getSubclassDataFromInstruction() & 1; } - bool unwindsToCaller() const { return !hasUnwindDest(); } - - /// Convenience accessor. - CleanupPadInst *getCleanupPad() const { - return cast(Op<0>()); - } - void setCleanupPad(CleanupPadInst *CleanupPad) { - assert(CleanupPad); - Op<0>() = CleanupPad; - } - - unsigned getNumSuccessors() const { return hasUnwindDest() ? 1 : 0; } - - BasicBlock *getUnwindDest() const { - return hasUnwindDest() ? cast(Op<1>()) : nullptr; - } - void setUnwindDest(BasicBlock *NewDest) { - assert(NewDest); - assert(hasUnwindDest()); - Op<1>() = NewDest; - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return (I->getOpcode() == Instruction::CleanupRet); - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned Idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned Idx, BasicBlock *B) override; - - // Shadow Instruction::setInstructionSubclassData with a private forwarding - // method so that subclasses cannot accidentally use it. - void setInstructionSubclassData(unsigned short D) { - Instruction::setInstructionSubclassData(D); - } -}; - -template <> -struct OperandTraits - : public VariadicOperandTraits {}; - -DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CleanupReturnInst, Value) - -//===----------------------------------------------------------------------===// -// UnreachableInst Class -//===----------------------------------------------------------------------===// - -//===--------------------------------------------------------------------------- -/// UnreachableInst - This function has undefined behavior. In particular, the -/// presence of this instruction indicates some higher level knowledge that the -/// end of the block cannot be reached. -/// -class UnreachableInst : public TerminatorInst { - void *operator new(size_t, unsigned) = delete; - -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - UnreachableInst *cloneImpl() const; - -public: - // allocate space for exactly zero operands - void *operator new(size_t s) { - return User::operator new(s, 0); - } - explicit UnreachableInst(LLVMContext &C, Instruction *InsertBefore = nullptr); - explicit UnreachableInst(LLVMContext &C, BasicBlock *InsertAtEnd); - - unsigned getNumSuccessors() const { return 0; } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Unreachable; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - -private: - BasicBlock *getSuccessorV(unsigned idx) const override; - unsigned getNumSuccessorsV() const override; - void setSuccessorV(unsigned idx, BasicBlock *B) override; -}; - -//===----------------------------------------------------------------------===// -// TruncInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a truncation of integer types. -class TruncInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical TruncInst - TruncInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - TruncInst( - Value *S, ///< The value to be truncated - Type *Ty, ///< The (smaller) type to truncate to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - TruncInst( - Value *S, ///< The value to be truncated - Type *Ty, ///< The (smaller) type to truncate to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Trunc; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// ZExtInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents zero extension of integer types. -class ZExtInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical ZExtInst - ZExtInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - ZExtInst( - Value *S, ///< The value to be zero extended - Type *Ty, ///< The type to zero extend to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end semantics. - ZExtInst( - Value *S, ///< The value to be zero extended - Type *Ty, ///< The type to zero extend to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == ZExt; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// SExtInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a sign extension of integer types. -class SExtInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical SExtInst - SExtInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - SExtInst( - Value *S, ///< The value to be sign extended - Type *Ty, ///< The type to sign extend to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - SExtInst( - Value *S, ///< The value to be sign extended - Type *Ty, ///< The type to sign extend to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == SExt; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// FPTruncInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a truncation of floating point types. -class FPTruncInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical FPTruncInst - FPTruncInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - FPTruncInst( - Value *S, ///< The value to be truncated - Type *Ty, ///< The type to truncate to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-before-instruction semantics - FPTruncInst( - Value *S, ///< The value to be truncated - Type *Ty, ///< The type to truncate to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == FPTrunc; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// FPExtInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents an extension of floating point types. -class FPExtInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical FPExtInst - FPExtInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - FPExtInst( - Value *S, ///< The value to be extended - Type *Ty, ///< The type to extend to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - FPExtInst( - Value *S, ///< The value to be extended - Type *Ty, ///< The type to extend to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == FPExt; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// UIToFPInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a cast unsigned integer to floating point. -class UIToFPInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical UIToFPInst - UIToFPInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - UIToFPInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - UIToFPInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == UIToFP; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// SIToFPInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a cast from signed integer to floating point. -class SIToFPInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical SIToFPInst - SIToFPInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - SIToFPInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - SIToFPInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == SIToFP; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// FPToUIInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a cast from floating point to unsigned integer -class FPToUIInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical FPToUIInst - FPToUIInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - FPToUIInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - FPToUIInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< Where to insert the new instruction - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == FPToUI; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// FPToSIInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a cast from floating point to signed integer. -class FPToSIInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical FPToSIInst - FPToSIInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - FPToSIInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - FPToSIInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == FPToSI; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// IntToPtrInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a cast from an integer to a pointer. -class IntToPtrInst : public CastInst { -public: - /// \brief Constructor with insert-before-instruction semantics - IntToPtrInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - IntToPtrInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical IntToPtrInst - IntToPtrInst *cloneImpl() const; - - /// \brief Returns the address space of this instruction's pointer type. - unsigned getAddressSpace() const { - return getType()->getPointerAddressSpace(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == IntToPtr; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// PtrToIntInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a cast from a pointer to an integer -class PtrToIntInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical PtrToIntInst - PtrToIntInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - PtrToIntInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - PtrToIntInst( - Value *S, ///< The value to be converted - Type *Ty, ///< The type to convert to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - /// \brief Gets the pointer operand. - Value *getPointerOperand() { return getOperand(0); } - /// \brief Gets the pointer operand. - const Value *getPointerOperand() const { return getOperand(0); } - /// \brief Gets the operand index of the pointer operand. - static unsigned getPointerOperandIndex() { return 0U; } - - /// \brief Returns the address space of the pointer operand. - unsigned getPointerAddressSpace() const { - return getPointerOperand()->getType()->getPointerAddressSpace(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == PtrToInt; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// BitCastInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a no-op cast from one type to another. -class BitCastInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical BitCastInst - BitCastInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - BitCastInst( - Value *S, ///< The value to be casted - Type *Ty, ///< The type to casted to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - BitCastInst( - Value *S, ///< The value to be casted - Type *Ty, ///< The type to casted to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == BitCast; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -//===----------------------------------------------------------------------===// -// AddrSpaceCastInst Class -//===----------------------------------------------------------------------===// - -/// \brief This class represents a conversion between pointers from -/// one address space to another. -class AddrSpaceCastInst : public CastInst { -protected: - // Note: Instruction needs to be a friend here to call cloneImpl. - friend class Instruction; - /// \brief Clone an identical AddrSpaceCastInst - AddrSpaceCastInst *cloneImpl() const; - -public: - /// \brief Constructor with insert-before-instruction semantics - AddrSpaceCastInst( - Value *S, ///< The value to be casted - Type *Ty, ///< The type to casted to - const Twine &NameStr = "", ///< A name for the new instruction - Instruction *InsertBefore = nullptr ///< Where to insert the new instruction - ); - - /// \brief Constructor with insert-at-end-of-block semantics - AddrSpaceCastInst( - Value *S, ///< The value to be casted - Type *Ty, ///< The type to casted to - const Twine &NameStr, ///< A name for the new instruction - BasicBlock *InsertAtEnd ///< The block to insert the instruction into - ); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == AddrSpaceCast; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - /// \brief Gets the pointer operand. - Value *getPointerOperand() { - return getOperand(0); - } - - /// \brief Gets the pointer operand. - const Value *getPointerOperand() const { - return getOperand(0); - } - - /// \brief Gets the operand index of the pointer operand. - static unsigned getPointerOperandIndex() { - return 0U; - } - - /// \brief Returns the address space of the pointer operand. - unsigned getSrcAddressSpace() const { - return getPointerOperand()->getType()->getPointerAddressSpace(); - } - - /// \brief Returns the address space of the result. - unsigned getDestAddressSpace() const { - return getType()->getPointerAddressSpace(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/IntrinsicInst.h b/llvm/include/llvm/IR/IntrinsicInst.h deleted file mode 100644 index 52044e0a..00000000 --- a/llvm/include/llvm/IR/IntrinsicInst.h +++ /dev/null @@ -1,398 +0,0 @@ -//===-- llvm/IntrinsicInst.h - Intrinsic Instruction Wrappers ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines classes that make it really easy to deal with intrinsic -// functions with the isa/dyncast family of functions. In particular, this -// allows you to do things like: -// -// if (MemCpyInst *MCI = dyn_cast(Inst)) -// ... MCI->getDest() ... MCI->getSource() ... -// -// All intrinsic function calls are instances of the call instruction, so these -// are all subclasses of the CallInst class. Note that none of these classes -// has state or virtual methods, which is an important part of this gross/neat -// hack working. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_INTRINSICINST_H -#define LLVM_IR_INTRINSICINST_H - -#include "llvm/IR/Constants.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/IR/Metadata.h" - -namespace llvm { - /// A wrapper class for inspecting calls to intrinsic functions. - /// This allows the standard isa/dyncast/cast functionality to work with calls - /// to intrinsic functions. - class IntrinsicInst : public CallInst { - IntrinsicInst() = delete; - IntrinsicInst(const IntrinsicInst&) = delete; - void operator=(const IntrinsicInst&) = delete; - public: - /// Return the intrinsic ID of this intrinsic. - Intrinsic::ID getIntrinsicID() const { - return getCalledFunction()->getIntrinsicID(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const CallInst *I) { - if (const Function *CF = I->getCalledFunction()) - return CF->isIntrinsic(); - return false; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - /// This is the common base class for debug info intrinsics. - class DbgInfoIntrinsic : public IntrinsicInst { - public: - /// Get the location corresponding to the variable referenced by the debug - /// info intrinsic. Depending on the intrinsic, this could be the - /// variable's value or its address. - Value *getVariableLocation(bool AllowNullOp = true) const; - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntrinsicInst *I) { - switch (I->getIntrinsicID()) { - case Intrinsic::dbg_declare: - case Intrinsic::dbg_value: - return true; - default: return false; - } - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - /// This represents the llvm.dbg.declare instruction. - class DbgDeclareInst : public DbgInfoIntrinsic { - public: - Value *getAddress() const { return getVariableLocation(); } - DILocalVariable *getVariable() const { - return cast(getRawVariable()); - } - DIExpression *getExpression() const { - return cast(getRawExpression()); - } - - Metadata *getRawVariable() const { - return cast(getArgOperand(1))->getMetadata(); - } - Metadata *getRawExpression() const { - return cast(getArgOperand(2))->getMetadata(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::dbg_declare; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - /// This represents the llvm.dbg.value instruction. - class DbgValueInst : public DbgInfoIntrinsic { - public: - Value *getValue() const { - return getVariableLocation(/* AllowNullOp = */ false); - } - uint64_t getOffset() const { - return cast( - const_cast(getArgOperand(1)))->getZExtValue(); - } - DILocalVariable *getVariable() const { - return cast(getRawVariable()); - } - DIExpression *getExpression() const { - return cast(getRawExpression()); - } - - Metadata *getRawVariable() const { - return cast(getArgOperand(2))->getMetadata(); - } - Metadata *getRawExpression() const { - return cast(getArgOperand(3))->getMetadata(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::dbg_value; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - /// This is the common base class for memset/memcpy/memmove. - class MemIntrinsic : public IntrinsicInst { - public: - Value *getRawDest() const { return const_cast(getArgOperand(0)); } - const Use &getRawDestUse() const { return getArgOperandUse(0); } - Use &getRawDestUse() { return getArgOperandUse(0); } - - Value *getLength() const { return const_cast(getArgOperand(2)); } - const Use &getLengthUse() const { return getArgOperandUse(2); } - Use &getLengthUse() { return getArgOperandUse(2); } - - ConstantInt *getAlignmentCst() const { - return cast(const_cast(getArgOperand(3))); - } - - unsigned getAlignment() const { - return getAlignmentCst()->getZExtValue(); - } - - ConstantInt *getVolatileCst() const { - return cast(const_cast(getArgOperand(4))); - } - bool isVolatile() const { - return !getVolatileCst()->isZero(); - } - - unsigned getDestAddressSpace() const { - return cast(getRawDest()->getType())->getAddressSpace(); - } - - /// This is just like getRawDest, but it strips off any cast - /// instructions that feed it, giving the original input. The returned - /// value is guaranteed to be a pointer. - Value *getDest() const { return getRawDest()->stripPointerCasts(); } - - /// Set the specified arguments of the instruction. - void setDest(Value *Ptr) { - assert(getRawDest()->getType() == Ptr->getType() && - "setDest called with pointer of wrong type!"); - setArgOperand(0, Ptr); - } - - void setLength(Value *L) { - assert(getLength()->getType() == L->getType() && - "setLength called with value of wrong type!"); - setArgOperand(2, L); - } - - void setAlignment(Constant* A) { - setArgOperand(3, A); - } - - void setVolatile(Constant* V) { - setArgOperand(4, V); - } - - Type *getAlignmentType() const { - return getArgOperand(3)->getType(); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntrinsicInst *I) { - switch (I->getIntrinsicID()) { - case Intrinsic::memcpy: - case Intrinsic::memmove: - case Intrinsic::memset: - return true; - default: return false; - } - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - /// This class wraps the llvm.memset intrinsic. - class MemSetInst : public MemIntrinsic { - public: - /// Return the arguments to the instruction. - Value *getValue() const { return const_cast(getArgOperand(1)); } - const Use &getValueUse() const { return getArgOperandUse(1); } - Use &getValueUse() { return getArgOperandUse(1); } - - void setValue(Value *Val) { - assert(getValue()->getType() == Val->getType() && - "setValue called with value of wrong type!"); - setArgOperand(1, Val); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::memset; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - /// This class wraps the llvm.memcpy/memmove intrinsics. - class MemTransferInst : public MemIntrinsic { - public: - /// Return the arguments to the instruction. - Value *getRawSource() const { return const_cast(getArgOperand(1)); } - const Use &getRawSourceUse() const { return getArgOperandUse(1); } - Use &getRawSourceUse() { return getArgOperandUse(1); } - - /// This is just like getRawSource, but it strips off any cast - /// instructions that feed it, giving the original input. The returned - /// value is guaranteed to be a pointer. - Value *getSource() const { return getRawSource()->stripPointerCasts(); } - - unsigned getSourceAddressSpace() const { - return cast(getRawSource()->getType())->getAddressSpace(); - } - - void setSource(Value *Ptr) { - assert(getRawSource()->getType() == Ptr->getType() && - "setSource called with pointer of wrong type!"); - setArgOperand(1, Ptr); - } - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::memcpy || - I->getIntrinsicID() == Intrinsic::memmove; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - - /// This class wraps the llvm.memcpy intrinsic. - class MemCpyInst : public MemTransferInst { - public: - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::memcpy; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - /// This class wraps the llvm.memmove intrinsic. - class MemMoveInst : public MemTransferInst { - public: - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::memmove; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - }; - - /// This represents the llvm.va_start intrinsic. - class VAStartInst : public IntrinsicInst { - public: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::vastart; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - Value *getArgList() const { return const_cast(getArgOperand(0)); } - }; - - /// This represents the llvm.va_end intrinsic. - class VAEndInst : public IntrinsicInst { - public: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::vaend; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - Value *getArgList() const { return const_cast(getArgOperand(0)); } - }; - - /// This represents the llvm.va_copy intrinsic. - class VACopyInst : public IntrinsicInst { - public: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::vacopy; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - Value *getDest() const { return const_cast(getArgOperand(0)); } - Value *getSrc() const { return const_cast(getArgOperand(1)); } - }; - - /// This represents the llvm.instrprof_increment intrinsic. - class InstrProfIncrementInst : public IntrinsicInst { - public: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::instrprof_increment; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - GlobalVariable *getName() const { - return cast( - const_cast(getArgOperand(0))->stripPointerCasts()); - } - - ConstantInt *getHash() const { - return cast(const_cast(getArgOperand(1))); - } - - ConstantInt *getNumCounters() const { - return cast(const_cast(getArgOperand(2))); - } - - ConstantInt *getIndex() const { - return cast(const_cast(getArgOperand(3))); - } - }; - - /// This represents the llvm.instrprof_value_profile intrinsic. - class InstrProfValueProfileInst : public IntrinsicInst { - public: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::instrprof_value_profile; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - GlobalVariable *getName() const { - return cast( - const_cast(getArgOperand(0))->stripPointerCasts()); - } - - ConstantInt *getHash() const { - return cast(const_cast(getArgOperand(1))); - } - - Value *getTargetValue() const { - return cast(const_cast(getArgOperand(2))); - } - - ConstantInt *getValueKind() const { - return cast(const_cast(getArgOperand(3))); - } - - // Returns the value site index. - ConstantInt *getIndex() const { - return cast(const_cast(getArgOperand(4))); - } - }; -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/Intrinsics.gen b/llvm/include/llvm/IR/Intrinsics.gen deleted file mode 100644 index 51d0307d..00000000 --- a/llvm/include/llvm/IR/Intrinsics.gen +++ /dev/null @@ -1,34887 +0,0 @@ -/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ -|* *| -|* Intrinsic Function Source Fragment *| -|* *| -|* Automatically generated file, do not edit! *| -|* *| -\*===----------------------------------------------------------------------===*/ - -// VisualStudio defines setjmp as _setjmp -#if defined(_MSC_VER) && defined(setjmp) && \ - !defined(setjmp_undefined_for_msvc) -# pragma push_macro("setjmp") -# undef setjmp -# define setjmp_undefined_for_msvc -#endif - -// Enum values for Intrinsics.h -#ifdef GET_INTRINSIC_ENUM_VALUES - adjust_trampoline, // llvm.adjust.trampoline - annotation, // llvm.annotation - assume, // llvm.assume - bitreverse, // llvm.bitreverse - bswap, // llvm.bswap - canonicalize, // llvm.canonicalize - ceil, // llvm.ceil - clear_cache, // llvm.clear_cache - convert_from_fp16, // llvm.convert.from.fp16 - convert_to_fp16, // llvm.convert.to.fp16 - convertff, // llvm.convertff - convertfsi, // llvm.convertfsi - convertfui, // llvm.convertfui - convertsif, // llvm.convertsif - convertss, // llvm.convertss - convertsu, // llvm.convertsu - convertuif, // llvm.convertuif - convertus, // llvm.convertus - convertuu, // llvm.convertuu - copysign, // llvm.copysign - cos, // llvm.cos - ctlz, // llvm.ctlz - ctpop, // llvm.ctpop - cttz, // llvm.cttz - dbg_declare, // llvm.dbg.declare - dbg_value, // llvm.dbg.value - debugtrap, // llvm.debugtrap - donothing, // llvm.donothing - eh_dwarf_cfa, // llvm.eh.dwarf.cfa - eh_exceptioncode, // llvm.eh.exceptioncode - eh_exceptionpointer, // llvm.eh.exceptionpointer - eh_return_i32, // llvm.eh.return.i32 - eh_return_i64, // llvm.eh.return.i64 - eh_sjlj_callsite, // llvm.eh.sjlj.callsite - eh_sjlj_functioncontext, // llvm.eh.sjlj.functioncontext - eh_sjlj_longjmp, // llvm.eh.sjlj.longjmp - eh_sjlj_lsda, // llvm.eh.sjlj.lsda - eh_sjlj_setjmp, // llvm.eh.sjlj.setjmp - eh_sjlj_setup_dispatch, // llvm.eh.sjlj.setup.dispatch - eh_typeid_for, // llvm.eh.typeid.for - eh_unwind_init, // llvm.eh.unwind.init - exp, // llvm.exp - exp2, // llvm.exp2 - expect, // llvm.expect - experimental_deoptimize, // llvm.experimental.deoptimize - experimental_gc_relocate, // llvm.experimental.gc.relocate - experimental_gc_result, // llvm.experimental.gc.result - experimental_gc_statepoint, // llvm.experimental.gc.statepoint - experimental_guard, // llvm.experimental.guard - experimental_patchpoint_i64, // llvm.experimental.patchpoint.i64 - experimental_patchpoint_void, // llvm.experimental.patchpoint.void - experimental_stackmap, // llvm.experimental.stackmap - fabs, // llvm.fabs - floor, // llvm.floor - flt_rounds, // llvm.flt.rounds - fma, // llvm.fma - fmuladd, // llvm.fmuladd - frameaddress, // llvm.frameaddress - gcread, // llvm.gcread - gcroot, // llvm.gcroot - gcwrite, // llvm.gcwrite - get_dynamic_area_offset, // llvm.get.dynamic.area.offset - init_trampoline, // llvm.init.trampoline - instrprof_increment, // llvm.instrprof.increment - instrprof_value_profile, // llvm.instrprof.value.profile - invariant_end, // llvm.invariant.end - invariant_group_barrier, // llvm.invariant.group.barrier - invariant_start, // llvm.invariant.start - lifetime_end, // llvm.lifetime.end - lifetime_start, // llvm.lifetime.start - load_relative, // llvm.load.relative - localaddress, // llvm.localaddress - localescape, // llvm.localescape - localrecover, // llvm.localrecover - log, // llvm.log - log10, // llvm.log10 - log2, // llvm.log2 - longjmp, // llvm.longjmp - masked_gather, // llvm.masked.gather - masked_load, // llvm.masked.load - masked_scatter, // llvm.masked.scatter - masked_store, // llvm.masked.store - maxnum, // llvm.maxnum - memcpy, // llvm.memcpy - memmove, // llvm.memmove - memset, // llvm.memset - minnum, // llvm.minnum - nearbyint, // llvm.nearbyint - objectsize, // llvm.objectsize - pcmarker, // llvm.pcmarker - pow, // llvm.pow - powi, // llvm.powi - prefetch, // llvm.prefetch - ptr_annotation, // llvm.ptr.annotation - read_register, // llvm.read_register - readcyclecounter, // llvm.readcyclecounter - returnaddress, // llvm.returnaddress - rint, // llvm.rint - round, // llvm.round - sadd_with_overflow, // llvm.sadd.with.overflow - setjmp, // llvm.setjmp - siglongjmp, // llvm.siglongjmp - sigsetjmp, // llvm.sigsetjmp - sin, // llvm.sin - smul_with_overflow, // llvm.smul.with.overflow - sqrt, // llvm.sqrt - ssub_with_overflow, // llvm.ssub.with.overflow - stackguard, // llvm.stackguard - stackprotector, // llvm.stackprotector - stackrestore, // llvm.stackrestore - stacksave, // llvm.stacksave - thread_pointer, // llvm.thread.pointer - trap, // llvm.trap - trunc, // llvm.trunc - type_checked_load, // llvm.type.checked.load - type_test, // llvm.type.test - uadd_with_overflow, // llvm.uadd.with.overflow - umul_with_overflow, // llvm.umul.with.overflow - usub_with_overflow, // llvm.usub.with.overflow - vacopy, // llvm.va_copy - vaend, // llvm.va_end - vastart, // llvm.va_start - var_annotation, // llvm.var.annotation - write_register, // llvm.write_register - aarch64_clrex, // llvm.aarch64.clrex - aarch64_crc32b, // llvm.aarch64.crc32b - aarch64_crc32cb, // llvm.aarch64.crc32cb - aarch64_crc32ch, // llvm.aarch64.crc32ch - aarch64_crc32cw, // llvm.aarch64.crc32cw - aarch64_crc32cx, // llvm.aarch64.crc32cx - aarch64_crc32h, // llvm.aarch64.crc32h - aarch64_crc32w, // llvm.aarch64.crc32w - aarch64_crc32x, // llvm.aarch64.crc32x - aarch64_crypto_aesd, // llvm.aarch64.crypto.aesd - aarch64_crypto_aese, // llvm.aarch64.crypto.aese - aarch64_crypto_aesimc, // llvm.aarch64.crypto.aesimc - aarch64_crypto_aesmc, // llvm.aarch64.crypto.aesmc - aarch64_crypto_sha1c, // llvm.aarch64.crypto.sha1c - aarch64_crypto_sha1h, // llvm.aarch64.crypto.sha1h - aarch64_crypto_sha1m, // llvm.aarch64.crypto.sha1m - aarch64_crypto_sha1p, // llvm.aarch64.crypto.sha1p - aarch64_crypto_sha1su0, // llvm.aarch64.crypto.sha1su0 - aarch64_crypto_sha1su1, // llvm.aarch64.crypto.sha1su1 - aarch64_crypto_sha256h, // llvm.aarch64.crypto.sha256h - aarch64_crypto_sha256h2, // llvm.aarch64.crypto.sha256h2 - aarch64_crypto_sha256su0, // llvm.aarch64.crypto.sha256su0 - aarch64_crypto_sha256su1, // llvm.aarch64.crypto.sha256su1 - aarch64_dmb, // llvm.aarch64.dmb - aarch64_dsb, // llvm.aarch64.dsb - aarch64_hint, // llvm.aarch64.hint - aarch64_isb, // llvm.aarch64.isb - aarch64_ldaxp, // llvm.aarch64.ldaxp - aarch64_ldaxr, // llvm.aarch64.ldaxr - aarch64_ldxp, // llvm.aarch64.ldxp - aarch64_ldxr, // llvm.aarch64.ldxr - aarch64_neon_abs, // llvm.aarch64.neon.abs - aarch64_neon_addhn, // llvm.aarch64.neon.addhn - aarch64_neon_addp, // llvm.aarch64.neon.addp - aarch64_neon_cls, // llvm.aarch64.neon.cls - aarch64_neon_fabd, // llvm.aarch64.neon.fabd - aarch64_neon_facge, // llvm.aarch64.neon.facge - aarch64_neon_facgt, // llvm.aarch64.neon.facgt - aarch64_neon_faddv, // llvm.aarch64.neon.faddv - aarch64_neon_fcvtas, // llvm.aarch64.neon.fcvtas - aarch64_neon_fcvtau, // llvm.aarch64.neon.fcvtau - aarch64_neon_fcvtms, // llvm.aarch64.neon.fcvtms - aarch64_neon_fcvtmu, // llvm.aarch64.neon.fcvtmu - aarch64_neon_fcvtns, // llvm.aarch64.neon.fcvtns - aarch64_neon_fcvtnu, // llvm.aarch64.neon.fcvtnu - aarch64_neon_fcvtps, // llvm.aarch64.neon.fcvtps - aarch64_neon_fcvtpu, // llvm.aarch64.neon.fcvtpu - aarch64_neon_fcvtxn, // llvm.aarch64.neon.fcvtxn - aarch64_neon_fcvtzs, // llvm.aarch64.neon.fcvtzs - aarch64_neon_fcvtzu, // llvm.aarch64.neon.fcvtzu - aarch64_neon_fmax, // llvm.aarch64.neon.fmax - aarch64_neon_fmaxnm, // llvm.aarch64.neon.fmaxnm - aarch64_neon_fmaxnmp, // llvm.aarch64.neon.fmaxnmp - aarch64_neon_fmaxnmv, // llvm.aarch64.neon.fmaxnmv - aarch64_neon_fmaxp, // llvm.aarch64.neon.fmaxp - aarch64_neon_fmaxv, // llvm.aarch64.neon.fmaxv - aarch64_neon_fmin, // llvm.aarch64.neon.fmin - aarch64_neon_fminnm, // llvm.aarch64.neon.fminnm - aarch64_neon_fminnmp, // llvm.aarch64.neon.fminnmp - aarch64_neon_fminnmv, // llvm.aarch64.neon.fminnmv - aarch64_neon_fminp, // llvm.aarch64.neon.fminp - aarch64_neon_fminv, // llvm.aarch64.neon.fminv - aarch64_neon_fmulx, // llvm.aarch64.neon.fmulx - aarch64_neon_frecpe, // llvm.aarch64.neon.frecpe - aarch64_neon_frecps, // llvm.aarch64.neon.frecps - aarch64_neon_frecpx, // llvm.aarch64.neon.frecpx - aarch64_neon_frintn, // llvm.aarch64.neon.frintn - aarch64_neon_frsqrte, // llvm.aarch64.neon.frsqrte - aarch64_neon_frsqrts, // llvm.aarch64.neon.frsqrts - aarch64_neon_ld1x2, // llvm.aarch64.neon.ld1x2 - aarch64_neon_ld1x3, // llvm.aarch64.neon.ld1x3 - aarch64_neon_ld1x4, // llvm.aarch64.neon.ld1x4 - aarch64_neon_ld2, // llvm.aarch64.neon.ld2 - aarch64_neon_ld2lane, // llvm.aarch64.neon.ld2lane - aarch64_neon_ld2r, // llvm.aarch64.neon.ld2r - aarch64_neon_ld3, // llvm.aarch64.neon.ld3 - aarch64_neon_ld3lane, // llvm.aarch64.neon.ld3lane - aarch64_neon_ld3r, // llvm.aarch64.neon.ld3r - aarch64_neon_ld4, // llvm.aarch64.neon.ld4 - aarch64_neon_ld4lane, // llvm.aarch64.neon.ld4lane - aarch64_neon_ld4r, // llvm.aarch64.neon.ld4r - aarch64_neon_pmul, // llvm.aarch64.neon.pmul - aarch64_neon_pmull, // llvm.aarch64.neon.pmull - aarch64_neon_pmull64, // llvm.aarch64.neon.pmull64 - aarch64_neon_raddhn, // llvm.aarch64.neon.raddhn - aarch64_neon_rbit, // llvm.aarch64.neon.rbit - aarch64_neon_rshrn, // llvm.aarch64.neon.rshrn - aarch64_neon_rsubhn, // llvm.aarch64.neon.rsubhn - aarch64_neon_sabd, // llvm.aarch64.neon.sabd - aarch64_neon_saddlp, // llvm.aarch64.neon.saddlp - aarch64_neon_saddlv, // llvm.aarch64.neon.saddlv - aarch64_neon_saddv, // llvm.aarch64.neon.saddv - aarch64_neon_scalar_sqxtn, // llvm.aarch64.neon.scalar.sqxtn - aarch64_neon_scalar_sqxtun, // llvm.aarch64.neon.scalar.sqxtun - aarch64_neon_scalar_uqxtn, // llvm.aarch64.neon.scalar.uqxtn - aarch64_neon_shadd, // llvm.aarch64.neon.shadd - aarch64_neon_shll, // llvm.aarch64.neon.shll - aarch64_neon_shsub, // llvm.aarch64.neon.shsub - aarch64_neon_smax, // llvm.aarch64.neon.smax - aarch64_neon_smaxp, // llvm.aarch64.neon.smaxp - aarch64_neon_smaxv, // llvm.aarch64.neon.smaxv - aarch64_neon_smin, // llvm.aarch64.neon.smin - aarch64_neon_sminp, // llvm.aarch64.neon.sminp - aarch64_neon_sminv, // llvm.aarch64.neon.sminv - aarch64_neon_smull, // llvm.aarch64.neon.smull - aarch64_neon_sqabs, // llvm.aarch64.neon.sqabs - aarch64_neon_sqadd, // llvm.aarch64.neon.sqadd - aarch64_neon_sqdmulh, // llvm.aarch64.neon.sqdmulh - aarch64_neon_sqdmull, // llvm.aarch64.neon.sqdmull - aarch64_neon_sqdmulls_scalar, // llvm.aarch64.neon.sqdmulls.scalar - aarch64_neon_sqneg, // llvm.aarch64.neon.sqneg - aarch64_neon_sqrdmulh, // llvm.aarch64.neon.sqrdmulh - aarch64_neon_sqrshl, // llvm.aarch64.neon.sqrshl - aarch64_neon_sqrshrn, // llvm.aarch64.neon.sqrshrn - aarch64_neon_sqrshrun, // llvm.aarch64.neon.sqrshrun - aarch64_neon_sqshl, // llvm.aarch64.neon.sqshl - aarch64_neon_sqshlu, // llvm.aarch64.neon.sqshlu - aarch64_neon_sqshrn, // llvm.aarch64.neon.sqshrn - aarch64_neon_sqshrun, // llvm.aarch64.neon.sqshrun - aarch64_neon_sqsub, // llvm.aarch64.neon.sqsub - aarch64_neon_sqxtn, // llvm.aarch64.neon.sqxtn - aarch64_neon_sqxtun, // llvm.aarch64.neon.sqxtun - aarch64_neon_srhadd, // llvm.aarch64.neon.srhadd - aarch64_neon_srshl, // llvm.aarch64.neon.srshl - aarch64_neon_sshl, // llvm.aarch64.neon.sshl - aarch64_neon_sshll, // llvm.aarch64.neon.sshll - aarch64_neon_st1x2, // llvm.aarch64.neon.st1x2 - aarch64_neon_st1x3, // llvm.aarch64.neon.st1x3 - aarch64_neon_st1x4, // llvm.aarch64.neon.st1x4 - aarch64_neon_st2, // llvm.aarch64.neon.st2 - aarch64_neon_st2lane, // llvm.aarch64.neon.st2lane - aarch64_neon_st3, // llvm.aarch64.neon.st3 - aarch64_neon_st3lane, // llvm.aarch64.neon.st3lane - aarch64_neon_st4, // llvm.aarch64.neon.st4 - aarch64_neon_st4lane, // llvm.aarch64.neon.st4lane - aarch64_neon_subhn, // llvm.aarch64.neon.subhn - aarch64_neon_suqadd, // llvm.aarch64.neon.suqadd - aarch64_neon_tbl1, // llvm.aarch64.neon.tbl1 - aarch64_neon_tbl2, // llvm.aarch64.neon.tbl2 - aarch64_neon_tbl3, // llvm.aarch64.neon.tbl3 - aarch64_neon_tbl4, // llvm.aarch64.neon.tbl4 - aarch64_neon_tbx1, // llvm.aarch64.neon.tbx1 - aarch64_neon_tbx2, // llvm.aarch64.neon.tbx2 - aarch64_neon_tbx3, // llvm.aarch64.neon.tbx3 - aarch64_neon_tbx4, // llvm.aarch64.neon.tbx4 - aarch64_neon_uabd, // llvm.aarch64.neon.uabd - aarch64_neon_uaddlp, // llvm.aarch64.neon.uaddlp - aarch64_neon_uaddlv, // llvm.aarch64.neon.uaddlv - aarch64_neon_uaddv, // llvm.aarch64.neon.uaddv - aarch64_neon_uhadd, // llvm.aarch64.neon.uhadd - aarch64_neon_uhsub, // llvm.aarch64.neon.uhsub - aarch64_neon_umax, // llvm.aarch64.neon.umax - aarch64_neon_umaxp, // llvm.aarch64.neon.umaxp - aarch64_neon_umaxv, // llvm.aarch64.neon.umaxv - aarch64_neon_umin, // llvm.aarch64.neon.umin - aarch64_neon_uminp, // llvm.aarch64.neon.uminp - aarch64_neon_uminv, // llvm.aarch64.neon.uminv - aarch64_neon_umull, // llvm.aarch64.neon.umull - aarch64_neon_uqadd, // llvm.aarch64.neon.uqadd - aarch64_neon_uqrshl, // llvm.aarch64.neon.uqrshl - aarch64_neon_uqrshrn, // llvm.aarch64.neon.uqrshrn - aarch64_neon_uqshl, // llvm.aarch64.neon.uqshl - aarch64_neon_uqshrn, // llvm.aarch64.neon.uqshrn - aarch64_neon_uqsub, // llvm.aarch64.neon.uqsub - aarch64_neon_uqxtn, // llvm.aarch64.neon.uqxtn - aarch64_neon_urecpe, // llvm.aarch64.neon.urecpe - aarch64_neon_urhadd, // llvm.aarch64.neon.urhadd - aarch64_neon_urshl, // llvm.aarch64.neon.urshl - aarch64_neon_ursqrte, // llvm.aarch64.neon.ursqrte - aarch64_neon_ushl, // llvm.aarch64.neon.ushl - aarch64_neon_ushll, // llvm.aarch64.neon.ushll - aarch64_neon_usqadd, // llvm.aarch64.neon.usqadd - aarch64_neon_vcopy_lane, // llvm.aarch64.neon.vcopy.lane - aarch64_neon_vcvtfp2fxs, // llvm.aarch64.neon.vcvtfp2fxs - aarch64_neon_vcvtfp2fxu, // llvm.aarch64.neon.vcvtfp2fxu - aarch64_neon_vcvtfp2hf, // llvm.aarch64.neon.vcvtfp2hf - aarch64_neon_vcvtfxs2fp, // llvm.aarch64.neon.vcvtfxs2fp - aarch64_neon_vcvtfxu2fp, // llvm.aarch64.neon.vcvtfxu2fp - aarch64_neon_vcvthf2fp, // llvm.aarch64.neon.vcvthf2fp - aarch64_neon_vsli, // llvm.aarch64.neon.vsli - aarch64_neon_vsri, // llvm.aarch64.neon.vsri - aarch64_rbit, // llvm.aarch64.rbit - aarch64_sdiv, // llvm.aarch64.sdiv - aarch64_sisd_fabd, // llvm.aarch64.sisd.fabd - aarch64_sisd_fcvtxn, // llvm.aarch64.sisd.fcvtxn - aarch64_stlxp, // llvm.aarch64.stlxp - aarch64_stlxr, // llvm.aarch64.stlxr - aarch64_stxp, // llvm.aarch64.stxp - aarch64_stxr, // llvm.aarch64.stxr - aarch64_udiv, // llvm.aarch64.udiv - amdgcn_atomic_dec, // llvm.amdgcn.atomic.dec - amdgcn_atomic_inc, // llvm.amdgcn.atomic.inc - amdgcn_buffer_atomic_add, // llvm.amdgcn.buffer.atomic.add - amdgcn_buffer_atomic_and, // llvm.amdgcn.buffer.atomic.and - amdgcn_buffer_atomic_cmpswap, // llvm.amdgcn.buffer.atomic.cmpswap - amdgcn_buffer_atomic_or, // llvm.amdgcn.buffer.atomic.or - amdgcn_buffer_atomic_smax, // llvm.amdgcn.buffer.atomic.smax - amdgcn_buffer_atomic_smin, // llvm.amdgcn.buffer.atomic.smin - amdgcn_buffer_atomic_sub, // llvm.amdgcn.buffer.atomic.sub - amdgcn_buffer_atomic_swap, // llvm.amdgcn.buffer.atomic.swap - amdgcn_buffer_atomic_umax, // llvm.amdgcn.buffer.atomic.umax - amdgcn_buffer_atomic_umin, // llvm.amdgcn.buffer.atomic.umin - amdgcn_buffer_atomic_xor, // llvm.amdgcn.buffer.atomic.xor - amdgcn_buffer_load, // llvm.amdgcn.buffer.load - amdgcn_buffer_load_format, // llvm.amdgcn.buffer.load.format - amdgcn_buffer_store, // llvm.amdgcn.buffer.store - amdgcn_buffer_store_format, // llvm.amdgcn.buffer.store.format - amdgcn_buffer_wbinvl1, // llvm.amdgcn.buffer.wbinvl1 - amdgcn_buffer_wbinvl1_sc, // llvm.amdgcn.buffer.wbinvl1.sc - amdgcn_buffer_wbinvl1_vol, // llvm.amdgcn.buffer.wbinvl1.vol - amdgcn_class, // llvm.amdgcn.class - amdgcn_cos, // llvm.amdgcn.cos - amdgcn_cubeid, // llvm.amdgcn.cubeid - amdgcn_cubema, // llvm.amdgcn.cubema - amdgcn_cubesc, // llvm.amdgcn.cubesc - amdgcn_cubetc, // llvm.amdgcn.cubetc - amdgcn_dispatch_ptr, // llvm.amdgcn.dispatch.ptr - amdgcn_div_fixup, // llvm.amdgcn.div.fixup - amdgcn_div_fmas, // llvm.amdgcn.div.fmas - amdgcn_div_scale, // llvm.amdgcn.div.scale - amdgcn_ds_bpermute, // llvm.amdgcn.ds.bpermute - amdgcn_ds_permute, // llvm.amdgcn.ds.permute - amdgcn_ds_swizzle, // llvm.amdgcn.ds.swizzle - amdgcn_fract, // llvm.amdgcn.fract - amdgcn_frexp_exp, // llvm.amdgcn.frexp.exp - amdgcn_frexp_mant, // llvm.amdgcn.frexp.mant - amdgcn_groupstaticsize, // llvm.amdgcn.groupstaticsize - amdgcn_image_atomic_add, // llvm.amdgcn.image.atomic.add - amdgcn_image_atomic_and, // llvm.amdgcn.image.atomic.and - amdgcn_image_atomic_cmpswap, // llvm.amdgcn.image.atomic.cmpswap - amdgcn_image_atomic_dec, // llvm.amdgcn.image.atomic.dec - amdgcn_image_atomic_inc, // llvm.amdgcn.image.atomic.inc - amdgcn_image_atomic_or, // llvm.amdgcn.image.atomic.or - amdgcn_image_atomic_smax, // llvm.amdgcn.image.atomic.smax - amdgcn_image_atomic_smin, // llvm.amdgcn.image.atomic.smin - amdgcn_image_atomic_sub, // llvm.amdgcn.image.atomic.sub - amdgcn_image_atomic_swap, // llvm.amdgcn.image.atomic.swap - amdgcn_image_atomic_umax, // llvm.amdgcn.image.atomic.umax - amdgcn_image_atomic_umin, // llvm.amdgcn.image.atomic.umin - amdgcn_image_atomic_xor, // llvm.amdgcn.image.atomic.xor - amdgcn_image_load, // llvm.amdgcn.image.load - amdgcn_image_load_mip, // llvm.amdgcn.image.load.mip - amdgcn_image_store, // llvm.amdgcn.image.store - amdgcn_image_store_mip, // llvm.amdgcn.image.store.mip - amdgcn_implicitarg_ptr, // llvm.amdgcn.implicitarg.ptr - amdgcn_interp_p1, // llvm.amdgcn.interp.p1 - amdgcn_interp_p2, // llvm.amdgcn.interp.p2 - amdgcn_kernarg_segment_ptr, // llvm.amdgcn.kernarg.segment.ptr - amdgcn_ldexp, // llvm.amdgcn.ldexp - amdgcn_lerp, // llvm.amdgcn.lerp - amdgcn_log_clamp, // llvm.amdgcn.log.clamp - amdgcn_mbcnt_hi, // llvm.amdgcn.mbcnt.hi - amdgcn_mbcnt_lo, // llvm.amdgcn.mbcnt.lo - amdgcn_mov_dpp, // llvm.amdgcn.mov.dpp - amdgcn_ps_live, // llvm.amdgcn.ps.live - amdgcn_queue_ptr, // llvm.amdgcn.queue.ptr - amdgcn_rcp, // llvm.amdgcn.rcp - amdgcn_read_workdim, // llvm.amdgcn.read.workdim - amdgcn_rsq, // llvm.amdgcn.rsq - amdgcn_rsq_clamp, // llvm.amdgcn.rsq.clamp - amdgcn_rsq_legacy, // llvm.amdgcn.rsq.legacy - amdgcn_s_barrier, // llvm.amdgcn.s.barrier - amdgcn_s_dcache_inv, // llvm.amdgcn.s.dcache.inv - amdgcn_s_dcache_inv_vol, // llvm.amdgcn.s.dcache.inv.vol - amdgcn_s_dcache_wb, // llvm.amdgcn.s.dcache.wb - amdgcn_s_dcache_wb_vol, // llvm.amdgcn.s.dcache.wb.vol - amdgcn_s_getreg, // llvm.amdgcn.s.getreg - amdgcn_s_memrealtime, // llvm.amdgcn.s.memrealtime - amdgcn_s_memtime, // llvm.amdgcn.s.memtime - amdgcn_s_sleep, // llvm.amdgcn.s.sleep - amdgcn_s_waitcnt, // llvm.amdgcn.s.waitcnt - amdgcn_sin, // llvm.amdgcn.sin - amdgcn_trig_preop, // llvm.amdgcn.trig.preop - amdgcn_workgroup_id_x, // llvm.amdgcn.workgroup.id.x - amdgcn_workgroup_id_y, // llvm.amdgcn.workgroup.id.y - amdgcn_workgroup_id_z, // llvm.amdgcn.workgroup.id.z - amdgcn_workitem_id_x, // llvm.amdgcn.workitem.id.x - amdgcn_workitem_id_y, // llvm.amdgcn.workitem.id.y - amdgcn_workitem_id_z, // llvm.amdgcn.workitem.id.z - arm_cdp, // llvm.arm.cdp - arm_cdp2, // llvm.arm.cdp2 - arm_clrex, // llvm.arm.clrex - arm_crc32b, // llvm.arm.crc32b - arm_crc32cb, // llvm.arm.crc32cb - arm_crc32ch, // llvm.arm.crc32ch - arm_crc32cw, // llvm.arm.crc32cw - arm_crc32h, // llvm.arm.crc32h - arm_crc32w, // llvm.arm.crc32w - arm_dbg, // llvm.arm.dbg - arm_dmb, // llvm.arm.dmb - arm_dsb, // llvm.arm.dsb - arm_get_fpscr, // llvm.arm.get.fpscr - arm_hint, // llvm.arm.hint - arm_isb, // llvm.arm.isb - arm_ldaex, // llvm.arm.ldaex - arm_ldaexd, // llvm.arm.ldaexd - arm_ldc, // llvm.arm.ldc - arm_ldc2, // llvm.arm.ldc2 - arm_ldc2l, // llvm.arm.ldc2l - arm_ldcl, // llvm.arm.ldcl - arm_ldrex, // llvm.arm.ldrex - arm_ldrexd, // llvm.arm.ldrexd - arm_mcr, // llvm.arm.mcr - arm_mcr2, // llvm.arm.mcr2 - arm_mcrr, // llvm.arm.mcrr - arm_mcrr2, // llvm.arm.mcrr2 - arm_mrc, // llvm.arm.mrc - arm_mrc2, // llvm.arm.mrc2 - arm_mrrc, // llvm.arm.mrrc - arm_mrrc2, // llvm.arm.mrrc2 - arm_neon_aesd, // llvm.arm.neon.aesd - arm_neon_aese, // llvm.arm.neon.aese - arm_neon_aesimc, // llvm.arm.neon.aesimc - arm_neon_aesmc, // llvm.arm.neon.aesmc - arm_neon_sha1c, // llvm.arm.neon.sha1c - arm_neon_sha1h, // llvm.arm.neon.sha1h - arm_neon_sha1m, // llvm.arm.neon.sha1m - arm_neon_sha1p, // llvm.arm.neon.sha1p - arm_neon_sha1su0, // llvm.arm.neon.sha1su0 - arm_neon_sha1su1, // llvm.arm.neon.sha1su1 - arm_neon_sha256h, // llvm.arm.neon.sha256h - arm_neon_sha256h2, // llvm.arm.neon.sha256h2 - arm_neon_sha256su0, // llvm.arm.neon.sha256su0 - arm_neon_sha256su1, // llvm.arm.neon.sha256su1 - arm_neon_vabds, // llvm.arm.neon.vabds - arm_neon_vabdu, // llvm.arm.neon.vabdu - arm_neon_vabs, // llvm.arm.neon.vabs - arm_neon_vacge, // llvm.arm.neon.vacge - arm_neon_vacgt, // llvm.arm.neon.vacgt - arm_neon_vbsl, // llvm.arm.neon.vbsl - arm_neon_vcls, // llvm.arm.neon.vcls - arm_neon_vcvtas, // llvm.arm.neon.vcvtas - arm_neon_vcvtau, // llvm.arm.neon.vcvtau - arm_neon_vcvtfp2fxs, // llvm.arm.neon.vcvtfp2fxs - arm_neon_vcvtfp2fxu, // llvm.arm.neon.vcvtfp2fxu - arm_neon_vcvtfp2hf, // llvm.arm.neon.vcvtfp2hf - arm_neon_vcvtfxs2fp, // llvm.arm.neon.vcvtfxs2fp - arm_neon_vcvtfxu2fp, // llvm.arm.neon.vcvtfxu2fp - arm_neon_vcvthf2fp, // llvm.arm.neon.vcvthf2fp - arm_neon_vcvtms, // llvm.arm.neon.vcvtms - arm_neon_vcvtmu, // llvm.arm.neon.vcvtmu - arm_neon_vcvtns, // llvm.arm.neon.vcvtns - arm_neon_vcvtnu, // llvm.arm.neon.vcvtnu - arm_neon_vcvtps, // llvm.arm.neon.vcvtps - arm_neon_vcvtpu, // llvm.arm.neon.vcvtpu - arm_neon_vhadds, // llvm.arm.neon.vhadds - arm_neon_vhaddu, // llvm.arm.neon.vhaddu - arm_neon_vhsubs, // llvm.arm.neon.vhsubs - arm_neon_vhsubu, // llvm.arm.neon.vhsubu - arm_neon_vld1, // llvm.arm.neon.vld1 - arm_neon_vld2, // llvm.arm.neon.vld2 - arm_neon_vld2lane, // llvm.arm.neon.vld2lane - arm_neon_vld3, // llvm.arm.neon.vld3 - arm_neon_vld3lane, // llvm.arm.neon.vld3lane - arm_neon_vld4, // llvm.arm.neon.vld4 - arm_neon_vld4lane, // llvm.arm.neon.vld4lane - arm_neon_vmaxnm, // llvm.arm.neon.vmaxnm - arm_neon_vmaxs, // llvm.arm.neon.vmaxs - arm_neon_vmaxu, // llvm.arm.neon.vmaxu - arm_neon_vminnm, // llvm.arm.neon.vminnm - arm_neon_vmins, // llvm.arm.neon.vmins - arm_neon_vminu, // llvm.arm.neon.vminu - arm_neon_vmullp, // llvm.arm.neon.vmullp - arm_neon_vmulls, // llvm.arm.neon.vmulls - arm_neon_vmullu, // llvm.arm.neon.vmullu - arm_neon_vmulp, // llvm.arm.neon.vmulp - arm_neon_vpadals, // llvm.arm.neon.vpadals - arm_neon_vpadalu, // llvm.arm.neon.vpadalu - arm_neon_vpadd, // llvm.arm.neon.vpadd - arm_neon_vpaddls, // llvm.arm.neon.vpaddls - arm_neon_vpaddlu, // llvm.arm.neon.vpaddlu - arm_neon_vpmaxs, // llvm.arm.neon.vpmaxs - arm_neon_vpmaxu, // llvm.arm.neon.vpmaxu - arm_neon_vpmins, // llvm.arm.neon.vpmins - arm_neon_vpminu, // llvm.arm.neon.vpminu - arm_neon_vqabs, // llvm.arm.neon.vqabs - arm_neon_vqadds, // llvm.arm.neon.vqadds - arm_neon_vqaddu, // llvm.arm.neon.vqaddu - arm_neon_vqdmulh, // llvm.arm.neon.vqdmulh - arm_neon_vqdmull, // llvm.arm.neon.vqdmull - arm_neon_vqmovns, // llvm.arm.neon.vqmovns - arm_neon_vqmovnsu, // llvm.arm.neon.vqmovnsu - arm_neon_vqmovnu, // llvm.arm.neon.vqmovnu - arm_neon_vqneg, // llvm.arm.neon.vqneg - arm_neon_vqrdmulh, // llvm.arm.neon.vqrdmulh - arm_neon_vqrshiftns, // llvm.arm.neon.vqrshiftns - arm_neon_vqrshiftnsu, // llvm.arm.neon.vqrshiftnsu - arm_neon_vqrshiftnu, // llvm.arm.neon.vqrshiftnu - arm_neon_vqrshifts, // llvm.arm.neon.vqrshifts - arm_neon_vqrshiftu, // llvm.arm.neon.vqrshiftu - arm_neon_vqshiftns, // llvm.arm.neon.vqshiftns - arm_neon_vqshiftnsu, // llvm.arm.neon.vqshiftnsu - arm_neon_vqshiftnu, // llvm.arm.neon.vqshiftnu - arm_neon_vqshifts, // llvm.arm.neon.vqshifts - arm_neon_vqshiftsu, // llvm.arm.neon.vqshiftsu - arm_neon_vqshiftu, // llvm.arm.neon.vqshiftu - arm_neon_vqsubs, // llvm.arm.neon.vqsubs - arm_neon_vqsubu, // llvm.arm.neon.vqsubu - arm_neon_vraddhn, // llvm.arm.neon.vraddhn - arm_neon_vrecpe, // llvm.arm.neon.vrecpe - arm_neon_vrecps, // llvm.arm.neon.vrecps - arm_neon_vrhadds, // llvm.arm.neon.vrhadds - arm_neon_vrhaddu, // llvm.arm.neon.vrhaddu - arm_neon_vrinta, // llvm.arm.neon.vrinta - arm_neon_vrintm, // llvm.arm.neon.vrintm - arm_neon_vrintn, // llvm.arm.neon.vrintn - arm_neon_vrintp, // llvm.arm.neon.vrintp - arm_neon_vrintx, // llvm.arm.neon.vrintx - arm_neon_vrintz, // llvm.arm.neon.vrintz - arm_neon_vrshiftn, // llvm.arm.neon.vrshiftn - arm_neon_vrshifts, // llvm.arm.neon.vrshifts - arm_neon_vrshiftu, // llvm.arm.neon.vrshiftu - arm_neon_vrsqrte, // llvm.arm.neon.vrsqrte - arm_neon_vrsqrts, // llvm.arm.neon.vrsqrts - arm_neon_vrsubhn, // llvm.arm.neon.vrsubhn - arm_neon_vshiftins, // llvm.arm.neon.vshiftins - arm_neon_vshifts, // llvm.arm.neon.vshifts - arm_neon_vshiftu, // llvm.arm.neon.vshiftu - arm_neon_vst1, // llvm.arm.neon.vst1 - arm_neon_vst2, // llvm.arm.neon.vst2 - arm_neon_vst2lane, // llvm.arm.neon.vst2lane - arm_neon_vst3, // llvm.arm.neon.vst3 - arm_neon_vst3lane, // llvm.arm.neon.vst3lane - arm_neon_vst4, // llvm.arm.neon.vst4 - arm_neon_vst4lane, // llvm.arm.neon.vst4lane - arm_neon_vtbl1, // llvm.arm.neon.vtbl1 - arm_neon_vtbl2, // llvm.arm.neon.vtbl2 - arm_neon_vtbl3, // llvm.arm.neon.vtbl3 - arm_neon_vtbl4, // llvm.arm.neon.vtbl4 - arm_neon_vtbx1, // llvm.arm.neon.vtbx1 - arm_neon_vtbx2, // llvm.arm.neon.vtbx2 - arm_neon_vtbx3, // llvm.arm.neon.vtbx3 - arm_neon_vtbx4, // llvm.arm.neon.vtbx4 - arm_qadd, // llvm.arm.qadd - arm_qsub, // llvm.arm.qsub - arm_rbit, // llvm.arm.rbit - arm_set_fpscr, // llvm.arm.set.fpscr - arm_space, // llvm.arm.space - arm_ssat, // llvm.arm.ssat - arm_stc, // llvm.arm.stc - arm_stc2, // llvm.arm.stc2 - arm_stc2l, // llvm.arm.stc2l - arm_stcl, // llvm.arm.stcl - arm_stlex, // llvm.arm.stlex - arm_stlexd, // llvm.arm.stlexd - arm_strex, // llvm.arm.strex - arm_strexd, // llvm.arm.strexd - arm_undefined, // llvm.arm.undefined - arm_usat, // llvm.arm.usat - arm_vcvtr, // llvm.arm.vcvtr - arm_vcvtru, // llvm.arm.vcvtru - bpf_load_byte, // llvm.bpf.load.byte - bpf_load_half, // llvm.bpf.load.half - bpf_load_word, // llvm.bpf.load.word - bpf_pseudo, // llvm.bpf.pseudo - hexagon_A2_abs, // llvm.hexagon.A2.abs - hexagon_A2_absp, // llvm.hexagon.A2.absp - hexagon_A2_abssat, // llvm.hexagon.A2.abssat - hexagon_A2_add, // llvm.hexagon.A2.add - hexagon_A2_addh_h16_hh, // llvm.hexagon.A2.addh.h16.hh - hexagon_A2_addh_h16_hl, // llvm.hexagon.A2.addh.h16.hl - hexagon_A2_addh_h16_lh, // llvm.hexagon.A2.addh.h16.lh - hexagon_A2_addh_h16_ll, // llvm.hexagon.A2.addh.h16.ll - hexagon_A2_addh_h16_sat_hh, // llvm.hexagon.A2.addh.h16.sat.hh - hexagon_A2_addh_h16_sat_hl, // llvm.hexagon.A2.addh.h16.sat.hl - hexagon_A2_addh_h16_sat_lh, // llvm.hexagon.A2.addh.h16.sat.lh - hexagon_A2_addh_h16_sat_ll, // llvm.hexagon.A2.addh.h16.sat.ll - hexagon_A2_addh_l16_hl, // llvm.hexagon.A2.addh.l16.hl - hexagon_A2_addh_l16_ll, // llvm.hexagon.A2.addh.l16.ll - hexagon_A2_addh_l16_sat_hl, // llvm.hexagon.A2.addh.l16.sat.hl - hexagon_A2_addh_l16_sat_ll, // llvm.hexagon.A2.addh.l16.sat.ll - hexagon_A2_addi, // llvm.hexagon.A2.addi - hexagon_A2_addp, // llvm.hexagon.A2.addp - hexagon_A2_addpsat, // llvm.hexagon.A2.addpsat - hexagon_A2_addsat, // llvm.hexagon.A2.addsat - hexagon_A2_addsp, // llvm.hexagon.A2.addsp - hexagon_A2_and, // llvm.hexagon.A2.and - hexagon_A2_andir, // llvm.hexagon.A2.andir - hexagon_A2_andp, // llvm.hexagon.A2.andp - hexagon_A2_aslh, // llvm.hexagon.A2.aslh - hexagon_A2_asrh, // llvm.hexagon.A2.asrh - hexagon_A2_combine_hh, // llvm.hexagon.A2.combine.hh - hexagon_A2_combine_hl, // llvm.hexagon.A2.combine.hl - hexagon_A2_combine_lh, // llvm.hexagon.A2.combine.lh - hexagon_A2_combine_ll, // llvm.hexagon.A2.combine.ll - hexagon_A2_combineii, // llvm.hexagon.A2.combineii - hexagon_A2_combinew, // llvm.hexagon.A2.combinew - hexagon_A2_max, // llvm.hexagon.A2.max - hexagon_A2_maxp, // llvm.hexagon.A2.maxp - hexagon_A2_maxu, // llvm.hexagon.A2.maxu - hexagon_A2_maxup, // llvm.hexagon.A2.maxup - hexagon_A2_min, // llvm.hexagon.A2.min - hexagon_A2_minp, // llvm.hexagon.A2.minp - hexagon_A2_minu, // llvm.hexagon.A2.minu - hexagon_A2_minup, // llvm.hexagon.A2.minup - hexagon_A2_neg, // llvm.hexagon.A2.neg - hexagon_A2_negp, // llvm.hexagon.A2.negp - hexagon_A2_negsat, // llvm.hexagon.A2.negsat - hexagon_A2_not, // llvm.hexagon.A2.not - hexagon_A2_notp, // llvm.hexagon.A2.notp - hexagon_A2_or, // llvm.hexagon.A2.or - hexagon_A2_orir, // llvm.hexagon.A2.orir - hexagon_A2_orp, // llvm.hexagon.A2.orp - hexagon_A2_roundsat, // llvm.hexagon.A2.roundsat - hexagon_A2_sat, // llvm.hexagon.A2.sat - hexagon_A2_satb, // llvm.hexagon.A2.satb - hexagon_A2_sath, // llvm.hexagon.A2.sath - hexagon_A2_satub, // llvm.hexagon.A2.satub - hexagon_A2_satuh, // llvm.hexagon.A2.satuh - hexagon_A2_sub, // llvm.hexagon.A2.sub - hexagon_A2_subh_h16_hh, // llvm.hexagon.A2.subh.h16.hh - hexagon_A2_subh_h16_hl, // llvm.hexagon.A2.subh.h16.hl - hexagon_A2_subh_h16_lh, // llvm.hexagon.A2.subh.h16.lh - hexagon_A2_subh_h16_ll, // llvm.hexagon.A2.subh.h16.ll - hexagon_A2_subh_h16_sat_hh, // llvm.hexagon.A2.subh.h16.sat.hh - hexagon_A2_subh_h16_sat_hl, // llvm.hexagon.A2.subh.h16.sat.hl - hexagon_A2_subh_h16_sat_lh, // llvm.hexagon.A2.subh.h16.sat.lh - hexagon_A2_subh_h16_sat_ll, // llvm.hexagon.A2.subh.h16.sat.ll - hexagon_A2_subh_l16_hl, // llvm.hexagon.A2.subh.l16.hl - hexagon_A2_subh_l16_ll, // llvm.hexagon.A2.subh.l16.ll - hexagon_A2_subh_l16_sat_hl, // llvm.hexagon.A2.subh.l16.sat.hl - hexagon_A2_subh_l16_sat_ll, // llvm.hexagon.A2.subh.l16.sat.ll - hexagon_A2_subp, // llvm.hexagon.A2.subp - hexagon_A2_subri, // llvm.hexagon.A2.subri - hexagon_A2_subsat, // llvm.hexagon.A2.subsat - hexagon_A2_svaddh, // llvm.hexagon.A2.svaddh - hexagon_A2_svaddhs, // llvm.hexagon.A2.svaddhs - hexagon_A2_svadduhs, // llvm.hexagon.A2.svadduhs - hexagon_A2_svavgh, // llvm.hexagon.A2.svavgh - hexagon_A2_svavghs, // llvm.hexagon.A2.svavghs - hexagon_A2_svnavgh, // llvm.hexagon.A2.svnavgh - hexagon_A2_svsubh, // llvm.hexagon.A2.svsubh - hexagon_A2_svsubhs, // llvm.hexagon.A2.svsubhs - hexagon_A2_svsubuhs, // llvm.hexagon.A2.svsubuhs - hexagon_A2_swiz, // llvm.hexagon.A2.swiz - hexagon_A2_sxtb, // llvm.hexagon.A2.sxtb - hexagon_A2_sxth, // llvm.hexagon.A2.sxth - hexagon_A2_sxtw, // llvm.hexagon.A2.sxtw - hexagon_A2_tfr, // llvm.hexagon.A2.tfr - hexagon_A2_tfrih, // llvm.hexagon.A2.tfrih - hexagon_A2_tfril, // llvm.hexagon.A2.tfril - hexagon_A2_tfrp, // llvm.hexagon.A2.tfrp - hexagon_A2_tfrpi, // llvm.hexagon.A2.tfrpi - hexagon_A2_tfrsi, // llvm.hexagon.A2.tfrsi - hexagon_A2_vabsh, // llvm.hexagon.A2.vabsh - hexagon_A2_vabshsat, // llvm.hexagon.A2.vabshsat - hexagon_A2_vabsw, // llvm.hexagon.A2.vabsw - hexagon_A2_vabswsat, // llvm.hexagon.A2.vabswsat - hexagon_A2_vaddb_map, // llvm.hexagon.A2.vaddb.map - hexagon_A2_vaddh, // llvm.hexagon.A2.vaddh - hexagon_A2_vaddhs, // llvm.hexagon.A2.vaddhs - hexagon_A2_vaddub, // llvm.hexagon.A2.vaddub - hexagon_A2_vaddubs, // llvm.hexagon.A2.vaddubs - hexagon_A2_vadduhs, // llvm.hexagon.A2.vadduhs - hexagon_A2_vaddw, // llvm.hexagon.A2.vaddw - hexagon_A2_vaddws, // llvm.hexagon.A2.vaddws - hexagon_A2_vavgh, // llvm.hexagon.A2.vavgh - hexagon_A2_vavghcr, // llvm.hexagon.A2.vavghcr - hexagon_A2_vavghr, // llvm.hexagon.A2.vavghr - hexagon_A2_vavgub, // llvm.hexagon.A2.vavgub - hexagon_A2_vavgubr, // llvm.hexagon.A2.vavgubr - hexagon_A2_vavguh, // llvm.hexagon.A2.vavguh - hexagon_A2_vavguhr, // llvm.hexagon.A2.vavguhr - hexagon_A2_vavguw, // llvm.hexagon.A2.vavguw - hexagon_A2_vavguwr, // llvm.hexagon.A2.vavguwr - hexagon_A2_vavgw, // llvm.hexagon.A2.vavgw - hexagon_A2_vavgwcr, // llvm.hexagon.A2.vavgwcr - hexagon_A2_vavgwr, // llvm.hexagon.A2.vavgwr - hexagon_A2_vcmpbeq, // llvm.hexagon.A2.vcmpbeq - hexagon_A2_vcmpbgtu, // llvm.hexagon.A2.vcmpbgtu - hexagon_A2_vcmpheq, // llvm.hexagon.A2.vcmpheq - hexagon_A2_vcmphgt, // llvm.hexagon.A2.vcmphgt - hexagon_A2_vcmphgtu, // llvm.hexagon.A2.vcmphgtu - hexagon_A2_vcmpweq, // llvm.hexagon.A2.vcmpweq - hexagon_A2_vcmpwgt, // llvm.hexagon.A2.vcmpwgt - hexagon_A2_vcmpwgtu, // llvm.hexagon.A2.vcmpwgtu - hexagon_A2_vconj, // llvm.hexagon.A2.vconj - hexagon_A2_vmaxb, // llvm.hexagon.A2.vmaxb - hexagon_A2_vmaxh, // llvm.hexagon.A2.vmaxh - hexagon_A2_vmaxub, // llvm.hexagon.A2.vmaxub - hexagon_A2_vmaxuh, // llvm.hexagon.A2.vmaxuh - hexagon_A2_vmaxuw, // llvm.hexagon.A2.vmaxuw - hexagon_A2_vmaxw, // llvm.hexagon.A2.vmaxw - hexagon_A2_vminb, // llvm.hexagon.A2.vminb - hexagon_A2_vminh, // llvm.hexagon.A2.vminh - hexagon_A2_vminub, // llvm.hexagon.A2.vminub - hexagon_A2_vminuh, // llvm.hexagon.A2.vminuh - hexagon_A2_vminuw, // llvm.hexagon.A2.vminuw - hexagon_A2_vminw, // llvm.hexagon.A2.vminw - hexagon_A2_vnavgh, // llvm.hexagon.A2.vnavgh - hexagon_A2_vnavghcr, // llvm.hexagon.A2.vnavghcr - hexagon_A2_vnavghr, // llvm.hexagon.A2.vnavghr - hexagon_A2_vnavgw, // llvm.hexagon.A2.vnavgw - hexagon_A2_vnavgwcr, // llvm.hexagon.A2.vnavgwcr - hexagon_A2_vnavgwr, // llvm.hexagon.A2.vnavgwr - hexagon_A2_vraddub, // llvm.hexagon.A2.vraddub - hexagon_A2_vraddub_acc, // llvm.hexagon.A2.vraddub.acc - hexagon_A2_vrsadub, // llvm.hexagon.A2.vrsadub - hexagon_A2_vrsadub_acc, // llvm.hexagon.A2.vrsadub.acc - hexagon_A2_vsubb_map, // llvm.hexagon.A2.vsubb.map - hexagon_A2_vsubh, // llvm.hexagon.A2.vsubh - hexagon_A2_vsubhs, // llvm.hexagon.A2.vsubhs - hexagon_A2_vsubub, // llvm.hexagon.A2.vsubub - hexagon_A2_vsububs, // llvm.hexagon.A2.vsububs - hexagon_A2_vsubuhs, // llvm.hexagon.A2.vsubuhs - hexagon_A2_vsubw, // llvm.hexagon.A2.vsubw - hexagon_A2_vsubws, // llvm.hexagon.A2.vsubws - hexagon_A2_xor, // llvm.hexagon.A2.xor - hexagon_A2_xorp, // llvm.hexagon.A2.xorp - hexagon_A2_zxtb, // llvm.hexagon.A2.zxtb - hexagon_A2_zxth, // llvm.hexagon.A2.zxth - hexagon_A4_andn, // llvm.hexagon.A4.andn - hexagon_A4_andnp, // llvm.hexagon.A4.andnp - hexagon_A4_bitsplit, // llvm.hexagon.A4.bitsplit - hexagon_A4_bitspliti, // llvm.hexagon.A4.bitspliti - hexagon_A4_boundscheck, // llvm.hexagon.A4.boundscheck - hexagon_A4_cmpbeq, // llvm.hexagon.A4.cmpbeq - hexagon_A4_cmpbeqi, // llvm.hexagon.A4.cmpbeqi - hexagon_A4_cmpbgt, // llvm.hexagon.A4.cmpbgt - hexagon_A4_cmpbgti, // llvm.hexagon.A4.cmpbgti - hexagon_A4_cmpbgtu, // llvm.hexagon.A4.cmpbgtu - hexagon_A4_cmpbgtui, // llvm.hexagon.A4.cmpbgtui - hexagon_A4_cmpheq, // llvm.hexagon.A4.cmpheq - hexagon_A4_cmpheqi, // llvm.hexagon.A4.cmpheqi - hexagon_A4_cmphgt, // llvm.hexagon.A4.cmphgt - hexagon_A4_cmphgti, // llvm.hexagon.A4.cmphgti - hexagon_A4_cmphgtu, // llvm.hexagon.A4.cmphgtu - hexagon_A4_cmphgtui, // llvm.hexagon.A4.cmphgtui - hexagon_A4_combineir, // llvm.hexagon.A4.combineir - hexagon_A4_combineri, // llvm.hexagon.A4.combineri - hexagon_A4_cround_ri, // llvm.hexagon.A4.cround.ri - hexagon_A4_cround_rr, // llvm.hexagon.A4.cround.rr - hexagon_A4_modwrapu, // llvm.hexagon.A4.modwrapu - hexagon_A4_orn, // llvm.hexagon.A4.orn - hexagon_A4_ornp, // llvm.hexagon.A4.ornp - hexagon_A4_rcmpeq, // llvm.hexagon.A4.rcmpeq - hexagon_A4_rcmpeqi, // llvm.hexagon.A4.rcmpeqi - hexagon_A4_rcmpneq, // llvm.hexagon.A4.rcmpneq - hexagon_A4_rcmpneqi, // llvm.hexagon.A4.rcmpneqi - hexagon_A4_round_ri, // llvm.hexagon.A4.round.ri - hexagon_A4_round_ri_sat, // llvm.hexagon.A4.round.ri.sat - hexagon_A4_round_rr, // llvm.hexagon.A4.round.rr - hexagon_A4_round_rr_sat, // llvm.hexagon.A4.round.rr.sat - hexagon_A4_tlbmatch, // llvm.hexagon.A4.tlbmatch - hexagon_A4_vcmpbeq_any, // llvm.hexagon.A4.vcmpbeq.any - hexagon_A4_vcmpbeqi, // llvm.hexagon.A4.vcmpbeqi - hexagon_A4_vcmpbgt, // llvm.hexagon.A4.vcmpbgt - hexagon_A4_vcmpbgti, // llvm.hexagon.A4.vcmpbgti - hexagon_A4_vcmpbgtui, // llvm.hexagon.A4.vcmpbgtui - hexagon_A4_vcmpheqi, // llvm.hexagon.A4.vcmpheqi - hexagon_A4_vcmphgti, // llvm.hexagon.A4.vcmphgti - hexagon_A4_vcmphgtui, // llvm.hexagon.A4.vcmphgtui - hexagon_A4_vcmpweqi, // llvm.hexagon.A4.vcmpweqi - hexagon_A4_vcmpwgti, // llvm.hexagon.A4.vcmpwgti - hexagon_A4_vcmpwgtui, // llvm.hexagon.A4.vcmpwgtui - hexagon_A4_vrmaxh, // llvm.hexagon.A4.vrmaxh - hexagon_A4_vrmaxuh, // llvm.hexagon.A4.vrmaxuh - hexagon_A4_vrmaxuw, // llvm.hexagon.A4.vrmaxuw - hexagon_A4_vrmaxw, // llvm.hexagon.A4.vrmaxw - hexagon_A4_vrminh, // llvm.hexagon.A4.vrminh - hexagon_A4_vrminuh, // llvm.hexagon.A4.vrminuh - hexagon_A4_vrminuw, // llvm.hexagon.A4.vrminuw - hexagon_A4_vrminw, // llvm.hexagon.A4.vrminw - hexagon_A5_vaddhubs, // llvm.hexagon.A5.vaddhubs - hexagon_C2_all8, // llvm.hexagon.C2.all8 - hexagon_C2_and, // llvm.hexagon.C2.and - hexagon_C2_andn, // llvm.hexagon.C2.andn - hexagon_C2_any8, // llvm.hexagon.C2.any8 - hexagon_C2_bitsclr, // llvm.hexagon.C2.bitsclr - hexagon_C2_bitsclri, // llvm.hexagon.C2.bitsclri - hexagon_C2_bitsset, // llvm.hexagon.C2.bitsset - hexagon_C2_cmpeq, // llvm.hexagon.C2.cmpeq - hexagon_C2_cmpeqi, // llvm.hexagon.C2.cmpeqi - hexagon_C2_cmpeqp, // llvm.hexagon.C2.cmpeqp - hexagon_C2_cmpgei, // llvm.hexagon.C2.cmpgei - hexagon_C2_cmpgeui, // llvm.hexagon.C2.cmpgeui - hexagon_C2_cmpgt, // llvm.hexagon.C2.cmpgt - hexagon_C2_cmpgti, // llvm.hexagon.C2.cmpgti - hexagon_C2_cmpgtp, // llvm.hexagon.C2.cmpgtp - hexagon_C2_cmpgtu, // llvm.hexagon.C2.cmpgtu - hexagon_C2_cmpgtui, // llvm.hexagon.C2.cmpgtui - hexagon_C2_cmpgtup, // llvm.hexagon.C2.cmpgtup - hexagon_C2_cmplt, // llvm.hexagon.C2.cmplt - hexagon_C2_cmpltu, // llvm.hexagon.C2.cmpltu - hexagon_C2_mask, // llvm.hexagon.C2.mask - hexagon_C2_mux, // llvm.hexagon.C2.mux - hexagon_C2_muxii, // llvm.hexagon.C2.muxii - hexagon_C2_muxir, // llvm.hexagon.C2.muxir - hexagon_C2_muxri, // llvm.hexagon.C2.muxri - hexagon_C2_not, // llvm.hexagon.C2.not - hexagon_C2_or, // llvm.hexagon.C2.or - hexagon_C2_orn, // llvm.hexagon.C2.orn - hexagon_C2_pxfer_map, // llvm.hexagon.C2.pxfer.map - hexagon_C2_tfrpr, // llvm.hexagon.C2.tfrpr - hexagon_C2_tfrrp, // llvm.hexagon.C2.tfrrp - hexagon_C2_vitpack, // llvm.hexagon.C2.vitpack - hexagon_C2_vmux, // llvm.hexagon.C2.vmux - hexagon_C2_xor, // llvm.hexagon.C2.xor - hexagon_C4_and_and, // llvm.hexagon.C4.and.and - hexagon_C4_and_andn, // llvm.hexagon.C4.and.andn - hexagon_C4_and_or, // llvm.hexagon.C4.and.or - hexagon_C4_and_orn, // llvm.hexagon.C4.and.orn - hexagon_C4_cmplte, // llvm.hexagon.C4.cmplte - hexagon_C4_cmpltei, // llvm.hexagon.C4.cmpltei - hexagon_C4_cmplteu, // llvm.hexagon.C4.cmplteu - hexagon_C4_cmplteui, // llvm.hexagon.C4.cmplteui - hexagon_C4_cmpneq, // llvm.hexagon.C4.cmpneq - hexagon_C4_cmpneqi, // llvm.hexagon.C4.cmpneqi - hexagon_C4_fastcorner9, // llvm.hexagon.C4.fastcorner9 - hexagon_C4_fastcorner9_not, // llvm.hexagon.C4.fastcorner9.not - hexagon_C4_nbitsclr, // llvm.hexagon.C4.nbitsclr - hexagon_C4_nbitsclri, // llvm.hexagon.C4.nbitsclri - hexagon_C4_nbitsset, // llvm.hexagon.C4.nbitsset - hexagon_C4_or_and, // llvm.hexagon.C4.or.and - hexagon_C4_or_andn, // llvm.hexagon.C4.or.andn - hexagon_C4_or_or, // llvm.hexagon.C4.or.or - hexagon_C4_or_orn, // llvm.hexagon.C4.or.orn - hexagon_F2_conv_d2df, // llvm.hexagon.F2.conv.d2df - hexagon_F2_conv_d2sf, // llvm.hexagon.F2.conv.d2sf - hexagon_F2_conv_df2d, // llvm.hexagon.F2.conv.df2d - hexagon_F2_conv_df2d_chop, // llvm.hexagon.F2.conv.df2d.chop - hexagon_F2_conv_df2sf, // llvm.hexagon.F2.conv.df2sf - hexagon_F2_conv_df2ud, // llvm.hexagon.F2.conv.df2ud - hexagon_F2_conv_df2ud_chop, // llvm.hexagon.F2.conv.df2ud.chop - hexagon_F2_conv_df2uw, // llvm.hexagon.F2.conv.df2uw - hexagon_F2_conv_df2uw_chop, // llvm.hexagon.F2.conv.df2uw.chop - hexagon_F2_conv_df2w, // llvm.hexagon.F2.conv.df2w - hexagon_F2_conv_df2w_chop, // llvm.hexagon.F2.conv.df2w.chop - hexagon_F2_conv_sf2d, // llvm.hexagon.F2.conv.sf2d - hexagon_F2_conv_sf2d_chop, // llvm.hexagon.F2.conv.sf2d.chop - hexagon_F2_conv_sf2df, // llvm.hexagon.F2.conv.sf2df - hexagon_F2_conv_sf2ud, // llvm.hexagon.F2.conv.sf2ud - hexagon_F2_conv_sf2ud_chop, // llvm.hexagon.F2.conv.sf2ud.chop - hexagon_F2_conv_sf2uw, // llvm.hexagon.F2.conv.sf2uw - hexagon_F2_conv_sf2uw_chop, // llvm.hexagon.F2.conv.sf2uw.chop - hexagon_F2_conv_sf2w, // llvm.hexagon.F2.conv.sf2w - hexagon_F2_conv_sf2w_chop, // llvm.hexagon.F2.conv.sf2w.chop - hexagon_F2_conv_ud2df, // llvm.hexagon.F2.conv.ud2df - hexagon_F2_conv_ud2sf, // llvm.hexagon.F2.conv.ud2sf - hexagon_F2_conv_uw2df, // llvm.hexagon.F2.conv.uw2df - hexagon_F2_conv_uw2sf, // llvm.hexagon.F2.conv.uw2sf - hexagon_F2_conv_w2df, // llvm.hexagon.F2.conv.w2df - hexagon_F2_conv_w2sf, // llvm.hexagon.F2.conv.w2sf - hexagon_F2_dfclass, // llvm.hexagon.F2.dfclass - hexagon_F2_dfcmpeq, // llvm.hexagon.F2.dfcmpeq - hexagon_F2_dfcmpge, // llvm.hexagon.F2.dfcmpge - hexagon_F2_dfcmpgt, // llvm.hexagon.F2.dfcmpgt - hexagon_F2_dfcmpuo, // llvm.hexagon.F2.dfcmpuo - hexagon_F2_dfimm_n, // llvm.hexagon.F2.dfimm.n - hexagon_F2_dfimm_p, // llvm.hexagon.F2.dfimm.p - hexagon_F2_sfadd, // llvm.hexagon.F2.sfadd - hexagon_F2_sfclass, // llvm.hexagon.F2.sfclass - hexagon_F2_sfcmpeq, // llvm.hexagon.F2.sfcmpeq - hexagon_F2_sfcmpge, // llvm.hexagon.F2.sfcmpge - hexagon_F2_sfcmpgt, // llvm.hexagon.F2.sfcmpgt - hexagon_F2_sfcmpuo, // llvm.hexagon.F2.sfcmpuo - hexagon_F2_sffixupd, // llvm.hexagon.F2.sffixupd - hexagon_F2_sffixupn, // llvm.hexagon.F2.sffixupn - hexagon_F2_sffixupr, // llvm.hexagon.F2.sffixupr - hexagon_F2_sffma, // llvm.hexagon.F2.sffma - hexagon_F2_sffma_lib, // llvm.hexagon.F2.sffma.lib - hexagon_F2_sffma_sc, // llvm.hexagon.F2.sffma.sc - hexagon_F2_sffms, // llvm.hexagon.F2.sffms - hexagon_F2_sffms_lib, // llvm.hexagon.F2.sffms.lib - hexagon_F2_sfimm_n, // llvm.hexagon.F2.sfimm.n - hexagon_F2_sfimm_p, // llvm.hexagon.F2.sfimm.p - hexagon_F2_sfmax, // llvm.hexagon.F2.sfmax - hexagon_F2_sfmin, // llvm.hexagon.F2.sfmin - hexagon_F2_sfmpy, // llvm.hexagon.F2.sfmpy - hexagon_F2_sfsub, // llvm.hexagon.F2.sfsub - hexagon_L2_loadw_locked, // llvm.hexagon.L2.loadw.locked - hexagon_L4_loadd_locked, // llvm.hexagon.L4.loadd.locked - hexagon_M2_acci, // llvm.hexagon.M2.acci - hexagon_M2_accii, // llvm.hexagon.M2.accii - hexagon_M2_cmaci_s0, // llvm.hexagon.M2.cmaci.s0 - hexagon_M2_cmacr_s0, // llvm.hexagon.M2.cmacr.s0 - hexagon_M2_cmacs_s0, // llvm.hexagon.M2.cmacs.s0 - hexagon_M2_cmacs_s1, // llvm.hexagon.M2.cmacs.s1 - hexagon_M2_cmacsc_s0, // llvm.hexagon.M2.cmacsc.s0 - hexagon_M2_cmacsc_s1, // llvm.hexagon.M2.cmacsc.s1 - hexagon_M2_cmpyi_s0, // llvm.hexagon.M2.cmpyi.s0 - hexagon_M2_cmpyr_s0, // llvm.hexagon.M2.cmpyr.s0 - hexagon_M2_cmpyrs_s0, // llvm.hexagon.M2.cmpyrs.s0 - hexagon_M2_cmpyrs_s1, // llvm.hexagon.M2.cmpyrs.s1 - hexagon_M2_cmpyrsc_s0, // llvm.hexagon.M2.cmpyrsc.s0 - hexagon_M2_cmpyrsc_s1, // llvm.hexagon.M2.cmpyrsc.s1 - hexagon_M2_cmpys_s0, // llvm.hexagon.M2.cmpys.s0 - hexagon_M2_cmpys_s1, // llvm.hexagon.M2.cmpys.s1 - hexagon_M2_cmpysc_s0, // llvm.hexagon.M2.cmpysc.s0 - hexagon_M2_cmpysc_s1, // llvm.hexagon.M2.cmpysc.s1 - hexagon_M2_cnacs_s0, // llvm.hexagon.M2.cnacs.s0 - hexagon_M2_cnacs_s1, // llvm.hexagon.M2.cnacs.s1 - hexagon_M2_cnacsc_s0, // llvm.hexagon.M2.cnacsc.s0 - hexagon_M2_cnacsc_s1, // llvm.hexagon.M2.cnacsc.s1 - hexagon_M2_dpmpyss_acc_s0, // llvm.hexagon.M2.dpmpyss.acc.s0 - hexagon_M2_dpmpyss_nac_s0, // llvm.hexagon.M2.dpmpyss.nac.s0 - hexagon_M2_dpmpyss_rnd_s0, // llvm.hexagon.M2.dpmpyss.rnd.s0 - hexagon_M2_dpmpyss_s0, // llvm.hexagon.M2.dpmpyss.s0 - hexagon_M2_dpmpyuu_acc_s0, // llvm.hexagon.M2.dpmpyuu.acc.s0 - hexagon_M2_dpmpyuu_nac_s0, // llvm.hexagon.M2.dpmpyuu.nac.s0 - hexagon_M2_dpmpyuu_s0, // llvm.hexagon.M2.dpmpyuu.s0 - hexagon_M2_hmmpyh_rs1, // llvm.hexagon.M2.hmmpyh.rs1 - hexagon_M2_hmmpyh_s1, // llvm.hexagon.M2.hmmpyh.s1 - hexagon_M2_hmmpyl_rs1, // llvm.hexagon.M2.hmmpyl.rs1 - hexagon_M2_hmmpyl_s1, // llvm.hexagon.M2.hmmpyl.s1 - hexagon_M2_maci, // llvm.hexagon.M2.maci - hexagon_M2_macsin, // llvm.hexagon.M2.macsin - hexagon_M2_macsip, // llvm.hexagon.M2.macsip - hexagon_M2_mmachs_rs0, // llvm.hexagon.M2.mmachs.rs0 - hexagon_M2_mmachs_rs1, // llvm.hexagon.M2.mmachs.rs1 - hexagon_M2_mmachs_s0, // llvm.hexagon.M2.mmachs.s0 - hexagon_M2_mmachs_s1, // llvm.hexagon.M2.mmachs.s1 - hexagon_M2_mmacls_rs0, // llvm.hexagon.M2.mmacls.rs0 - hexagon_M2_mmacls_rs1, // llvm.hexagon.M2.mmacls.rs1 - hexagon_M2_mmacls_s0, // llvm.hexagon.M2.mmacls.s0 - hexagon_M2_mmacls_s1, // llvm.hexagon.M2.mmacls.s1 - hexagon_M2_mmacuhs_rs0, // llvm.hexagon.M2.mmacuhs.rs0 - hexagon_M2_mmacuhs_rs1, // llvm.hexagon.M2.mmacuhs.rs1 - hexagon_M2_mmacuhs_s0, // llvm.hexagon.M2.mmacuhs.s0 - hexagon_M2_mmacuhs_s1, // llvm.hexagon.M2.mmacuhs.s1 - hexagon_M2_mmaculs_rs0, // llvm.hexagon.M2.mmaculs.rs0 - hexagon_M2_mmaculs_rs1, // llvm.hexagon.M2.mmaculs.rs1 - hexagon_M2_mmaculs_s0, // llvm.hexagon.M2.mmaculs.s0 - hexagon_M2_mmaculs_s1, // llvm.hexagon.M2.mmaculs.s1 - hexagon_M2_mmpyh_rs0, // llvm.hexagon.M2.mmpyh.rs0 - hexagon_M2_mmpyh_rs1, // llvm.hexagon.M2.mmpyh.rs1 - hexagon_M2_mmpyh_s0, // llvm.hexagon.M2.mmpyh.s0 - hexagon_M2_mmpyh_s1, // llvm.hexagon.M2.mmpyh.s1 - hexagon_M2_mmpyl_rs0, // llvm.hexagon.M2.mmpyl.rs0 - hexagon_M2_mmpyl_rs1, // llvm.hexagon.M2.mmpyl.rs1 - hexagon_M2_mmpyl_s0, // llvm.hexagon.M2.mmpyl.s0 - hexagon_M2_mmpyl_s1, // llvm.hexagon.M2.mmpyl.s1 - hexagon_M2_mmpyuh_rs0, // llvm.hexagon.M2.mmpyuh.rs0 - hexagon_M2_mmpyuh_rs1, // llvm.hexagon.M2.mmpyuh.rs1 - hexagon_M2_mmpyuh_s0, // llvm.hexagon.M2.mmpyuh.s0 - hexagon_M2_mmpyuh_s1, // llvm.hexagon.M2.mmpyuh.s1 - hexagon_M2_mmpyul_rs0, // llvm.hexagon.M2.mmpyul.rs0 - hexagon_M2_mmpyul_rs1, // llvm.hexagon.M2.mmpyul.rs1 - hexagon_M2_mmpyul_s0, // llvm.hexagon.M2.mmpyul.s0 - hexagon_M2_mmpyul_s1, // llvm.hexagon.M2.mmpyul.s1 - hexagon_M2_mpy_acc_hh_s0, // llvm.hexagon.M2.mpy.acc.hh.s0 - hexagon_M2_mpy_acc_hh_s1, // llvm.hexagon.M2.mpy.acc.hh.s1 - hexagon_M2_mpy_acc_hl_s0, // llvm.hexagon.M2.mpy.acc.hl.s0 - hexagon_M2_mpy_acc_hl_s1, // llvm.hexagon.M2.mpy.acc.hl.s1 - hexagon_M2_mpy_acc_lh_s0, // llvm.hexagon.M2.mpy.acc.lh.s0 - hexagon_M2_mpy_acc_lh_s1, // llvm.hexagon.M2.mpy.acc.lh.s1 - hexagon_M2_mpy_acc_ll_s0, // llvm.hexagon.M2.mpy.acc.ll.s0 - hexagon_M2_mpy_acc_ll_s1, // llvm.hexagon.M2.mpy.acc.ll.s1 - hexagon_M2_mpy_acc_sat_hh_s0, // llvm.hexagon.M2.mpy.acc.sat.hh.s0 - hexagon_M2_mpy_acc_sat_hh_s1, // llvm.hexagon.M2.mpy.acc.sat.hh.s1 - hexagon_M2_mpy_acc_sat_hl_s0, // llvm.hexagon.M2.mpy.acc.sat.hl.s0 - hexagon_M2_mpy_acc_sat_hl_s1, // llvm.hexagon.M2.mpy.acc.sat.hl.s1 - hexagon_M2_mpy_acc_sat_lh_s0, // llvm.hexagon.M2.mpy.acc.sat.lh.s0 - hexagon_M2_mpy_acc_sat_lh_s1, // llvm.hexagon.M2.mpy.acc.sat.lh.s1 - hexagon_M2_mpy_acc_sat_ll_s0, // llvm.hexagon.M2.mpy.acc.sat.ll.s0 - hexagon_M2_mpy_acc_sat_ll_s1, // llvm.hexagon.M2.mpy.acc.sat.ll.s1 - hexagon_M2_mpy_hh_s0, // llvm.hexagon.M2.mpy.hh.s0 - hexagon_M2_mpy_hh_s1, // llvm.hexagon.M2.mpy.hh.s1 - hexagon_M2_mpy_hl_s0, // llvm.hexagon.M2.mpy.hl.s0 - hexagon_M2_mpy_hl_s1, // llvm.hexagon.M2.mpy.hl.s1 - hexagon_M2_mpy_lh_s0, // llvm.hexagon.M2.mpy.lh.s0 - hexagon_M2_mpy_lh_s1, // llvm.hexagon.M2.mpy.lh.s1 - hexagon_M2_mpy_ll_s0, // llvm.hexagon.M2.mpy.ll.s0 - hexagon_M2_mpy_ll_s1, // llvm.hexagon.M2.mpy.ll.s1 - hexagon_M2_mpy_nac_hh_s0, // llvm.hexagon.M2.mpy.nac.hh.s0 - hexagon_M2_mpy_nac_hh_s1, // llvm.hexagon.M2.mpy.nac.hh.s1 - hexagon_M2_mpy_nac_hl_s0, // llvm.hexagon.M2.mpy.nac.hl.s0 - hexagon_M2_mpy_nac_hl_s1, // llvm.hexagon.M2.mpy.nac.hl.s1 - hexagon_M2_mpy_nac_lh_s0, // llvm.hexagon.M2.mpy.nac.lh.s0 - hexagon_M2_mpy_nac_lh_s1, // llvm.hexagon.M2.mpy.nac.lh.s1 - hexagon_M2_mpy_nac_ll_s0, // llvm.hexagon.M2.mpy.nac.ll.s0 - hexagon_M2_mpy_nac_ll_s1, // llvm.hexagon.M2.mpy.nac.ll.s1 - hexagon_M2_mpy_nac_sat_hh_s0, // llvm.hexagon.M2.mpy.nac.sat.hh.s0 - hexagon_M2_mpy_nac_sat_hh_s1, // llvm.hexagon.M2.mpy.nac.sat.hh.s1 - hexagon_M2_mpy_nac_sat_hl_s0, // llvm.hexagon.M2.mpy.nac.sat.hl.s0 - hexagon_M2_mpy_nac_sat_hl_s1, // llvm.hexagon.M2.mpy.nac.sat.hl.s1 - hexagon_M2_mpy_nac_sat_lh_s0, // llvm.hexagon.M2.mpy.nac.sat.lh.s0 - hexagon_M2_mpy_nac_sat_lh_s1, // llvm.hexagon.M2.mpy.nac.sat.lh.s1 - hexagon_M2_mpy_nac_sat_ll_s0, // llvm.hexagon.M2.mpy.nac.sat.ll.s0 - hexagon_M2_mpy_nac_sat_ll_s1, // llvm.hexagon.M2.mpy.nac.sat.ll.s1 - hexagon_M2_mpy_rnd_hh_s0, // llvm.hexagon.M2.mpy.rnd.hh.s0 - hexagon_M2_mpy_rnd_hh_s1, // llvm.hexagon.M2.mpy.rnd.hh.s1 - hexagon_M2_mpy_rnd_hl_s0, // llvm.hexagon.M2.mpy.rnd.hl.s0 - hexagon_M2_mpy_rnd_hl_s1, // llvm.hexagon.M2.mpy.rnd.hl.s1 - hexagon_M2_mpy_rnd_lh_s0, // llvm.hexagon.M2.mpy.rnd.lh.s0 - hexagon_M2_mpy_rnd_lh_s1, // llvm.hexagon.M2.mpy.rnd.lh.s1 - hexagon_M2_mpy_rnd_ll_s0, // llvm.hexagon.M2.mpy.rnd.ll.s0 - hexagon_M2_mpy_rnd_ll_s1, // llvm.hexagon.M2.mpy.rnd.ll.s1 - hexagon_M2_mpy_sat_hh_s0, // llvm.hexagon.M2.mpy.sat.hh.s0 - hexagon_M2_mpy_sat_hh_s1, // llvm.hexagon.M2.mpy.sat.hh.s1 - hexagon_M2_mpy_sat_hl_s0, // llvm.hexagon.M2.mpy.sat.hl.s0 - hexagon_M2_mpy_sat_hl_s1, // llvm.hexagon.M2.mpy.sat.hl.s1 - hexagon_M2_mpy_sat_lh_s0, // llvm.hexagon.M2.mpy.sat.lh.s0 - hexagon_M2_mpy_sat_lh_s1, // llvm.hexagon.M2.mpy.sat.lh.s1 - hexagon_M2_mpy_sat_ll_s0, // llvm.hexagon.M2.mpy.sat.ll.s0 - hexagon_M2_mpy_sat_ll_s1, // llvm.hexagon.M2.mpy.sat.ll.s1 - hexagon_M2_mpy_sat_rnd_hh_s0, // llvm.hexagon.M2.mpy.sat.rnd.hh.s0 - hexagon_M2_mpy_sat_rnd_hh_s1, // llvm.hexagon.M2.mpy.sat.rnd.hh.s1 - hexagon_M2_mpy_sat_rnd_hl_s0, // llvm.hexagon.M2.mpy.sat.rnd.hl.s0 - hexagon_M2_mpy_sat_rnd_hl_s1, // llvm.hexagon.M2.mpy.sat.rnd.hl.s1 - hexagon_M2_mpy_sat_rnd_lh_s0, // llvm.hexagon.M2.mpy.sat.rnd.lh.s0 - hexagon_M2_mpy_sat_rnd_lh_s1, // llvm.hexagon.M2.mpy.sat.rnd.lh.s1 - hexagon_M2_mpy_sat_rnd_ll_s0, // llvm.hexagon.M2.mpy.sat.rnd.ll.s0 - hexagon_M2_mpy_sat_rnd_ll_s1, // llvm.hexagon.M2.mpy.sat.rnd.ll.s1 - hexagon_M2_mpy_up, // llvm.hexagon.M2.mpy.up - hexagon_M2_mpy_up_s1, // llvm.hexagon.M2.mpy.up.s1 - hexagon_M2_mpy_up_s1_sat, // llvm.hexagon.M2.mpy.up.s1.sat - hexagon_M2_mpyd_acc_hh_s0, // llvm.hexagon.M2.mpyd.acc.hh.s0 - hexagon_M2_mpyd_acc_hh_s1, // llvm.hexagon.M2.mpyd.acc.hh.s1 - hexagon_M2_mpyd_acc_hl_s0, // llvm.hexagon.M2.mpyd.acc.hl.s0 - hexagon_M2_mpyd_acc_hl_s1, // llvm.hexagon.M2.mpyd.acc.hl.s1 - hexagon_M2_mpyd_acc_lh_s0, // llvm.hexagon.M2.mpyd.acc.lh.s0 - hexagon_M2_mpyd_acc_lh_s1, // llvm.hexagon.M2.mpyd.acc.lh.s1 - hexagon_M2_mpyd_acc_ll_s0, // llvm.hexagon.M2.mpyd.acc.ll.s0 - hexagon_M2_mpyd_acc_ll_s1, // llvm.hexagon.M2.mpyd.acc.ll.s1 - hexagon_M2_mpyd_hh_s0, // llvm.hexagon.M2.mpyd.hh.s0 - hexagon_M2_mpyd_hh_s1, // llvm.hexagon.M2.mpyd.hh.s1 - hexagon_M2_mpyd_hl_s0, // llvm.hexagon.M2.mpyd.hl.s0 - hexagon_M2_mpyd_hl_s1, // llvm.hexagon.M2.mpyd.hl.s1 - hexagon_M2_mpyd_lh_s0, // llvm.hexagon.M2.mpyd.lh.s0 - hexagon_M2_mpyd_lh_s1, // llvm.hexagon.M2.mpyd.lh.s1 - hexagon_M2_mpyd_ll_s0, // llvm.hexagon.M2.mpyd.ll.s0 - hexagon_M2_mpyd_ll_s1, // llvm.hexagon.M2.mpyd.ll.s1 - hexagon_M2_mpyd_nac_hh_s0, // llvm.hexagon.M2.mpyd.nac.hh.s0 - hexagon_M2_mpyd_nac_hh_s1, // llvm.hexagon.M2.mpyd.nac.hh.s1 - hexagon_M2_mpyd_nac_hl_s0, // llvm.hexagon.M2.mpyd.nac.hl.s0 - hexagon_M2_mpyd_nac_hl_s1, // llvm.hexagon.M2.mpyd.nac.hl.s1 - hexagon_M2_mpyd_nac_lh_s0, // llvm.hexagon.M2.mpyd.nac.lh.s0 - hexagon_M2_mpyd_nac_lh_s1, // llvm.hexagon.M2.mpyd.nac.lh.s1 - hexagon_M2_mpyd_nac_ll_s0, // llvm.hexagon.M2.mpyd.nac.ll.s0 - hexagon_M2_mpyd_nac_ll_s1, // llvm.hexagon.M2.mpyd.nac.ll.s1 - hexagon_M2_mpyd_rnd_hh_s0, // llvm.hexagon.M2.mpyd.rnd.hh.s0 - hexagon_M2_mpyd_rnd_hh_s1, // llvm.hexagon.M2.mpyd.rnd.hh.s1 - hexagon_M2_mpyd_rnd_hl_s0, // llvm.hexagon.M2.mpyd.rnd.hl.s0 - hexagon_M2_mpyd_rnd_hl_s1, // llvm.hexagon.M2.mpyd.rnd.hl.s1 - hexagon_M2_mpyd_rnd_lh_s0, // llvm.hexagon.M2.mpyd.rnd.lh.s0 - hexagon_M2_mpyd_rnd_lh_s1, // llvm.hexagon.M2.mpyd.rnd.lh.s1 - hexagon_M2_mpyd_rnd_ll_s0, // llvm.hexagon.M2.mpyd.rnd.ll.s0 - hexagon_M2_mpyd_rnd_ll_s1, // llvm.hexagon.M2.mpyd.rnd.ll.s1 - hexagon_M2_mpyi, // llvm.hexagon.M2.mpyi - hexagon_M2_mpysmi, // llvm.hexagon.M2.mpysmi - hexagon_M2_mpysu_up, // llvm.hexagon.M2.mpysu.up - hexagon_M2_mpyu_acc_hh_s0, // llvm.hexagon.M2.mpyu.acc.hh.s0 - hexagon_M2_mpyu_acc_hh_s1, // llvm.hexagon.M2.mpyu.acc.hh.s1 - hexagon_M2_mpyu_acc_hl_s0, // llvm.hexagon.M2.mpyu.acc.hl.s0 - hexagon_M2_mpyu_acc_hl_s1, // llvm.hexagon.M2.mpyu.acc.hl.s1 - hexagon_M2_mpyu_acc_lh_s0, // llvm.hexagon.M2.mpyu.acc.lh.s0 - hexagon_M2_mpyu_acc_lh_s1, // llvm.hexagon.M2.mpyu.acc.lh.s1 - hexagon_M2_mpyu_acc_ll_s0, // llvm.hexagon.M2.mpyu.acc.ll.s0 - hexagon_M2_mpyu_acc_ll_s1, // llvm.hexagon.M2.mpyu.acc.ll.s1 - hexagon_M2_mpyu_hh_s0, // llvm.hexagon.M2.mpyu.hh.s0 - hexagon_M2_mpyu_hh_s1, // llvm.hexagon.M2.mpyu.hh.s1 - hexagon_M2_mpyu_hl_s0, // llvm.hexagon.M2.mpyu.hl.s0 - hexagon_M2_mpyu_hl_s1, // llvm.hexagon.M2.mpyu.hl.s1 - hexagon_M2_mpyu_lh_s0, // llvm.hexagon.M2.mpyu.lh.s0 - hexagon_M2_mpyu_lh_s1, // llvm.hexagon.M2.mpyu.lh.s1 - hexagon_M2_mpyu_ll_s0, // llvm.hexagon.M2.mpyu.ll.s0 - hexagon_M2_mpyu_ll_s1, // llvm.hexagon.M2.mpyu.ll.s1 - hexagon_M2_mpyu_nac_hh_s0, // llvm.hexagon.M2.mpyu.nac.hh.s0 - hexagon_M2_mpyu_nac_hh_s1, // llvm.hexagon.M2.mpyu.nac.hh.s1 - hexagon_M2_mpyu_nac_hl_s0, // llvm.hexagon.M2.mpyu.nac.hl.s0 - hexagon_M2_mpyu_nac_hl_s1, // llvm.hexagon.M2.mpyu.nac.hl.s1 - hexagon_M2_mpyu_nac_lh_s0, // llvm.hexagon.M2.mpyu.nac.lh.s0 - hexagon_M2_mpyu_nac_lh_s1, // llvm.hexagon.M2.mpyu.nac.lh.s1 - hexagon_M2_mpyu_nac_ll_s0, // llvm.hexagon.M2.mpyu.nac.ll.s0 - hexagon_M2_mpyu_nac_ll_s1, // llvm.hexagon.M2.mpyu.nac.ll.s1 - hexagon_M2_mpyu_up, // llvm.hexagon.M2.mpyu.up - hexagon_M2_mpyud_acc_hh_s0, // llvm.hexagon.M2.mpyud.acc.hh.s0 - hexagon_M2_mpyud_acc_hh_s1, // llvm.hexagon.M2.mpyud.acc.hh.s1 - hexagon_M2_mpyud_acc_hl_s0, // llvm.hexagon.M2.mpyud.acc.hl.s0 - hexagon_M2_mpyud_acc_hl_s1, // llvm.hexagon.M2.mpyud.acc.hl.s1 - hexagon_M2_mpyud_acc_lh_s0, // llvm.hexagon.M2.mpyud.acc.lh.s0 - hexagon_M2_mpyud_acc_lh_s1, // llvm.hexagon.M2.mpyud.acc.lh.s1 - hexagon_M2_mpyud_acc_ll_s0, // llvm.hexagon.M2.mpyud.acc.ll.s0 - hexagon_M2_mpyud_acc_ll_s1, // llvm.hexagon.M2.mpyud.acc.ll.s1 - hexagon_M2_mpyud_hh_s0, // llvm.hexagon.M2.mpyud.hh.s0 - hexagon_M2_mpyud_hh_s1, // llvm.hexagon.M2.mpyud.hh.s1 - hexagon_M2_mpyud_hl_s0, // llvm.hexagon.M2.mpyud.hl.s0 - hexagon_M2_mpyud_hl_s1, // llvm.hexagon.M2.mpyud.hl.s1 - hexagon_M2_mpyud_lh_s0, // llvm.hexagon.M2.mpyud.lh.s0 - hexagon_M2_mpyud_lh_s1, // llvm.hexagon.M2.mpyud.lh.s1 - hexagon_M2_mpyud_ll_s0, // llvm.hexagon.M2.mpyud.ll.s0 - hexagon_M2_mpyud_ll_s1, // llvm.hexagon.M2.mpyud.ll.s1 - hexagon_M2_mpyud_nac_hh_s0, // llvm.hexagon.M2.mpyud.nac.hh.s0 - hexagon_M2_mpyud_nac_hh_s1, // llvm.hexagon.M2.mpyud.nac.hh.s1 - hexagon_M2_mpyud_nac_hl_s0, // llvm.hexagon.M2.mpyud.nac.hl.s0 - hexagon_M2_mpyud_nac_hl_s1, // llvm.hexagon.M2.mpyud.nac.hl.s1 - hexagon_M2_mpyud_nac_lh_s0, // llvm.hexagon.M2.mpyud.nac.lh.s0 - hexagon_M2_mpyud_nac_lh_s1, // llvm.hexagon.M2.mpyud.nac.lh.s1 - hexagon_M2_mpyud_nac_ll_s0, // llvm.hexagon.M2.mpyud.nac.ll.s0 - hexagon_M2_mpyud_nac_ll_s1, // llvm.hexagon.M2.mpyud.nac.ll.s1 - hexagon_M2_mpyui, // llvm.hexagon.M2.mpyui - hexagon_M2_nacci, // llvm.hexagon.M2.nacci - hexagon_M2_naccii, // llvm.hexagon.M2.naccii - hexagon_M2_subacc, // llvm.hexagon.M2.subacc - hexagon_M2_vabsdiffh, // llvm.hexagon.M2.vabsdiffh - hexagon_M2_vabsdiffw, // llvm.hexagon.M2.vabsdiffw - hexagon_M2_vcmac_s0_sat_i, // llvm.hexagon.M2.vcmac.s0.sat.i - hexagon_M2_vcmac_s0_sat_r, // llvm.hexagon.M2.vcmac.s0.sat.r - hexagon_M2_vcmpy_s0_sat_i, // llvm.hexagon.M2.vcmpy.s0.sat.i - hexagon_M2_vcmpy_s0_sat_r, // llvm.hexagon.M2.vcmpy.s0.sat.r - hexagon_M2_vcmpy_s1_sat_i, // llvm.hexagon.M2.vcmpy.s1.sat.i - hexagon_M2_vcmpy_s1_sat_r, // llvm.hexagon.M2.vcmpy.s1.sat.r - hexagon_M2_vdmacs_s0, // llvm.hexagon.M2.vdmacs.s0 - hexagon_M2_vdmacs_s1, // llvm.hexagon.M2.vdmacs.s1 - hexagon_M2_vdmpyrs_s0, // llvm.hexagon.M2.vdmpyrs.s0 - hexagon_M2_vdmpyrs_s1, // llvm.hexagon.M2.vdmpyrs.s1 - hexagon_M2_vdmpys_s0, // llvm.hexagon.M2.vdmpys.s0 - hexagon_M2_vdmpys_s1, // llvm.hexagon.M2.vdmpys.s1 - hexagon_M2_vmac2, // llvm.hexagon.M2.vmac2 - hexagon_M2_vmac2es, // llvm.hexagon.M2.vmac2es - hexagon_M2_vmac2es_s0, // llvm.hexagon.M2.vmac2es.s0 - hexagon_M2_vmac2es_s1, // llvm.hexagon.M2.vmac2es.s1 - hexagon_M2_vmac2s_s0, // llvm.hexagon.M2.vmac2s.s0 - hexagon_M2_vmac2s_s1, // llvm.hexagon.M2.vmac2s.s1 - hexagon_M2_vmac2su_s0, // llvm.hexagon.M2.vmac2su.s0 - hexagon_M2_vmac2su_s1, // llvm.hexagon.M2.vmac2su.s1 - hexagon_M2_vmpy2es_s0, // llvm.hexagon.M2.vmpy2es.s0 - hexagon_M2_vmpy2es_s1, // llvm.hexagon.M2.vmpy2es.s1 - hexagon_M2_vmpy2s_s0, // llvm.hexagon.M2.vmpy2s.s0 - hexagon_M2_vmpy2s_s0pack, // llvm.hexagon.M2.vmpy2s.s0pack - hexagon_M2_vmpy2s_s1, // llvm.hexagon.M2.vmpy2s.s1 - hexagon_M2_vmpy2s_s1pack, // llvm.hexagon.M2.vmpy2s.s1pack - hexagon_M2_vmpy2su_s0, // llvm.hexagon.M2.vmpy2su.s0 - hexagon_M2_vmpy2su_s1, // llvm.hexagon.M2.vmpy2su.s1 - hexagon_M2_vraddh, // llvm.hexagon.M2.vraddh - hexagon_M2_vradduh, // llvm.hexagon.M2.vradduh - hexagon_M2_vrcmaci_s0, // llvm.hexagon.M2.vrcmaci.s0 - hexagon_M2_vrcmaci_s0c, // llvm.hexagon.M2.vrcmaci.s0c - hexagon_M2_vrcmacr_s0, // llvm.hexagon.M2.vrcmacr.s0 - hexagon_M2_vrcmacr_s0c, // llvm.hexagon.M2.vrcmacr.s0c - hexagon_M2_vrcmpyi_s0, // llvm.hexagon.M2.vrcmpyi.s0 - hexagon_M2_vrcmpyi_s0c, // llvm.hexagon.M2.vrcmpyi.s0c - hexagon_M2_vrcmpyr_s0, // llvm.hexagon.M2.vrcmpyr.s0 - hexagon_M2_vrcmpyr_s0c, // llvm.hexagon.M2.vrcmpyr.s0c - hexagon_M2_vrcmpys_acc_s1, // llvm.hexagon.M2.vrcmpys.acc.s1 - hexagon_M2_vrcmpys_s1, // llvm.hexagon.M2.vrcmpys.s1 - hexagon_M2_vrcmpys_s1rp, // llvm.hexagon.M2.vrcmpys.s1rp - hexagon_M2_vrmac_s0, // llvm.hexagon.M2.vrmac.s0 - hexagon_M2_vrmpy_s0, // llvm.hexagon.M2.vrmpy.s0 - hexagon_M2_xor_xacc, // llvm.hexagon.M2.xor.xacc - hexagon_M4_and_and, // llvm.hexagon.M4.and.and - hexagon_M4_and_andn, // llvm.hexagon.M4.and.andn - hexagon_M4_and_or, // llvm.hexagon.M4.and.or - hexagon_M4_and_xor, // llvm.hexagon.M4.and.xor - hexagon_M4_cmpyi_wh, // llvm.hexagon.M4.cmpyi.wh - hexagon_M4_cmpyi_whc, // llvm.hexagon.M4.cmpyi.whc - hexagon_M4_cmpyr_wh, // llvm.hexagon.M4.cmpyr.wh - hexagon_M4_cmpyr_whc, // llvm.hexagon.M4.cmpyr.whc - hexagon_M4_mac_up_s1_sat, // llvm.hexagon.M4.mac.up.s1.sat - hexagon_M4_mpyri_addi, // llvm.hexagon.M4.mpyri.addi - hexagon_M4_mpyri_addr, // llvm.hexagon.M4.mpyri.addr - hexagon_M4_mpyri_addr_u2, // llvm.hexagon.M4.mpyri.addr.u2 - hexagon_M4_mpyrr_addi, // llvm.hexagon.M4.mpyrr.addi - hexagon_M4_mpyrr_addr, // llvm.hexagon.M4.mpyrr.addr - hexagon_M4_nac_up_s1_sat, // llvm.hexagon.M4.nac.up.s1.sat - hexagon_M4_or_and, // llvm.hexagon.M4.or.and - hexagon_M4_or_andn, // llvm.hexagon.M4.or.andn - hexagon_M4_or_or, // llvm.hexagon.M4.or.or - hexagon_M4_or_xor, // llvm.hexagon.M4.or.xor - hexagon_M4_pmpyw, // llvm.hexagon.M4.pmpyw - hexagon_M4_pmpyw_acc, // llvm.hexagon.M4.pmpyw.acc - hexagon_M4_vpmpyh, // llvm.hexagon.M4.vpmpyh - hexagon_M4_vpmpyh_acc, // llvm.hexagon.M4.vpmpyh.acc - hexagon_M4_vrmpyeh_acc_s0, // llvm.hexagon.M4.vrmpyeh.acc.s0 - hexagon_M4_vrmpyeh_acc_s1, // llvm.hexagon.M4.vrmpyeh.acc.s1 - hexagon_M4_vrmpyeh_s0, // llvm.hexagon.M4.vrmpyeh.s0 - hexagon_M4_vrmpyeh_s1, // llvm.hexagon.M4.vrmpyeh.s1 - hexagon_M4_vrmpyoh_acc_s0, // llvm.hexagon.M4.vrmpyoh.acc.s0 - hexagon_M4_vrmpyoh_acc_s1, // llvm.hexagon.M4.vrmpyoh.acc.s1 - hexagon_M4_vrmpyoh_s0, // llvm.hexagon.M4.vrmpyoh.s0 - hexagon_M4_vrmpyoh_s1, // llvm.hexagon.M4.vrmpyoh.s1 - hexagon_M4_xor_and, // llvm.hexagon.M4.xor.and - hexagon_M4_xor_andn, // llvm.hexagon.M4.xor.andn - hexagon_M4_xor_or, // llvm.hexagon.M4.xor.or - hexagon_M4_xor_xacc, // llvm.hexagon.M4.xor.xacc - hexagon_M5_vdmacbsu, // llvm.hexagon.M5.vdmacbsu - hexagon_M5_vdmpybsu, // llvm.hexagon.M5.vdmpybsu - hexagon_M5_vmacbsu, // llvm.hexagon.M5.vmacbsu - hexagon_M5_vmacbuu, // llvm.hexagon.M5.vmacbuu - hexagon_M5_vmpybsu, // llvm.hexagon.M5.vmpybsu - hexagon_M5_vmpybuu, // llvm.hexagon.M5.vmpybuu - hexagon_M5_vrmacbsu, // llvm.hexagon.M5.vrmacbsu - hexagon_M5_vrmacbuu, // llvm.hexagon.M5.vrmacbuu - hexagon_M5_vrmpybsu, // llvm.hexagon.M5.vrmpybsu - hexagon_M5_vrmpybuu, // llvm.hexagon.M5.vrmpybuu - hexagon_M6_vabsdiffb, // llvm.hexagon.M6.vabsdiffb - hexagon_M6_vabsdiffub, // llvm.hexagon.M6.vabsdiffub - hexagon_S2_addasl_rrri, // llvm.hexagon.S2.addasl.rrri - hexagon_S2_asl_i_p, // llvm.hexagon.S2.asl.i.p - hexagon_S2_asl_i_p_acc, // llvm.hexagon.S2.asl.i.p.acc - hexagon_S2_asl_i_p_and, // llvm.hexagon.S2.asl.i.p.and - hexagon_S2_asl_i_p_nac, // llvm.hexagon.S2.asl.i.p.nac - hexagon_S2_asl_i_p_or, // llvm.hexagon.S2.asl.i.p.or - hexagon_S2_asl_i_p_xacc, // llvm.hexagon.S2.asl.i.p.xacc - hexagon_S2_asl_i_r, // llvm.hexagon.S2.asl.i.r - hexagon_S2_asl_i_r_acc, // llvm.hexagon.S2.asl.i.r.acc - hexagon_S2_asl_i_r_and, // llvm.hexagon.S2.asl.i.r.and - hexagon_S2_asl_i_r_nac, // llvm.hexagon.S2.asl.i.r.nac - hexagon_S2_asl_i_r_or, // llvm.hexagon.S2.asl.i.r.or - hexagon_S2_asl_i_r_sat, // llvm.hexagon.S2.asl.i.r.sat - hexagon_S2_asl_i_r_xacc, // llvm.hexagon.S2.asl.i.r.xacc - hexagon_S2_asl_i_vh, // llvm.hexagon.S2.asl.i.vh - hexagon_S2_asl_i_vw, // llvm.hexagon.S2.asl.i.vw - hexagon_S2_asl_r_p, // llvm.hexagon.S2.asl.r.p - hexagon_S2_asl_r_p_acc, // llvm.hexagon.S2.asl.r.p.acc - hexagon_S2_asl_r_p_and, // llvm.hexagon.S2.asl.r.p.and - hexagon_S2_asl_r_p_nac, // llvm.hexagon.S2.asl.r.p.nac - hexagon_S2_asl_r_p_or, // llvm.hexagon.S2.asl.r.p.or - hexagon_S2_asl_r_p_xor, // llvm.hexagon.S2.asl.r.p.xor - hexagon_S2_asl_r_r, // llvm.hexagon.S2.asl.r.r - hexagon_S2_asl_r_r_acc, // llvm.hexagon.S2.asl.r.r.acc - hexagon_S2_asl_r_r_and, // llvm.hexagon.S2.asl.r.r.and - hexagon_S2_asl_r_r_nac, // llvm.hexagon.S2.asl.r.r.nac - hexagon_S2_asl_r_r_or, // llvm.hexagon.S2.asl.r.r.or - hexagon_S2_asl_r_r_sat, // llvm.hexagon.S2.asl.r.r.sat - hexagon_S2_asl_r_vh, // llvm.hexagon.S2.asl.r.vh - hexagon_S2_asl_r_vw, // llvm.hexagon.S2.asl.r.vw - hexagon_S2_asr_i_p, // llvm.hexagon.S2.asr.i.p - hexagon_S2_asr_i_p_acc, // llvm.hexagon.S2.asr.i.p.acc - hexagon_S2_asr_i_p_and, // llvm.hexagon.S2.asr.i.p.and - hexagon_S2_asr_i_p_nac, // llvm.hexagon.S2.asr.i.p.nac - hexagon_S2_asr_i_p_or, // llvm.hexagon.S2.asr.i.p.or - hexagon_S2_asr_i_p_rnd, // llvm.hexagon.S2.asr.i.p.rnd - hexagon_S2_asr_i_p_rnd_goodsyntax, // llvm.hexagon.S2.asr.i.p.rnd.goodsyntax - hexagon_S2_asr_i_r, // llvm.hexagon.S2.asr.i.r - hexagon_S2_asr_i_r_acc, // llvm.hexagon.S2.asr.i.r.acc - hexagon_S2_asr_i_r_and, // llvm.hexagon.S2.asr.i.r.and - hexagon_S2_asr_i_r_nac, // llvm.hexagon.S2.asr.i.r.nac - hexagon_S2_asr_i_r_or, // llvm.hexagon.S2.asr.i.r.or - hexagon_S2_asr_i_r_rnd, // llvm.hexagon.S2.asr.i.r.rnd - hexagon_S2_asr_i_r_rnd_goodsyntax, // llvm.hexagon.S2.asr.i.r.rnd.goodsyntax - hexagon_S2_asr_i_svw_trun, // llvm.hexagon.S2.asr.i.svw.trun - hexagon_S2_asr_i_vh, // llvm.hexagon.S2.asr.i.vh - hexagon_S2_asr_i_vw, // llvm.hexagon.S2.asr.i.vw - hexagon_S2_asr_r_p, // llvm.hexagon.S2.asr.r.p - hexagon_S2_asr_r_p_acc, // llvm.hexagon.S2.asr.r.p.acc - hexagon_S2_asr_r_p_and, // llvm.hexagon.S2.asr.r.p.and - hexagon_S2_asr_r_p_nac, // llvm.hexagon.S2.asr.r.p.nac - hexagon_S2_asr_r_p_or, // llvm.hexagon.S2.asr.r.p.or - hexagon_S2_asr_r_p_xor, // llvm.hexagon.S2.asr.r.p.xor - hexagon_S2_asr_r_r, // llvm.hexagon.S2.asr.r.r - hexagon_S2_asr_r_r_acc, // llvm.hexagon.S2.asr.r.r.acc - hexagon_S2_asr_r_r_and, // llvm.hexagon.S2.asr.r.r.and - hexagon_S2_asr_r_r_nac, // llvm.hexagon.S2.asr.r.r.nac - hexagon_S2_asr_r_r_or, // llvm.hexagon.S2.asr.r.r.or - hexagon_S2_asr_r_r_sat, // llvm.hexagon.S2.asr.r.r.sat - hexagon_S2_asr_r_svw_trun, // llvm.hexagon.S2.asr.r.svw.trun - hexagon_S2_asr_r_vh, // llvm.hexagon.S2.asr.r.vh - hexagon_S2_asr_r_vw, // llvm.hexagon.S2.asr.r.vw - hexagon_S2_brev, // llvm.hexagon.S2.brev - hexagon_S2_brevp, // llvm.hexagon.S2.brevp - hexagon_S2_cabacencbin, // llvm.hexagon.S2.cabacencbin - hexagon_S2_cl0, // llvm.hexagon.S2.cl0 - hexagon_S2_cl0p, // llvm.hexagon.S2.cl0p - hexagon_S2_cl1, // llvm.hexagon.S2.cl1 - hexagon_S2_cl1p, // llvm.hexagon.S2.cl1p - hexagon_S2_clb, // llvm.hexagon.S2.clb - hexagon_S2_clbnorm, // llvm.hexagon.S2.clbnorm - hexagon_S2_clbp, // llvm.hexagon.S2.clbp - hexagon_S2_clrbit_i, // llvm.hexagon.S2.clrbit.i - hexagon_S2_clrbit_r, // llvm.hexagon.S2.clrbit.r - hexagon_S2_ct0, // llvm.hexagon.S2.ct0 - hexagon_S2_ct0p, // llvm.hexagon.S2.ct0p - hexagon_S2_ct1, // llvm.hexagon.S2.ct1 - hexagon_S2_ct1p, // llvm.hexagon.S2.ct1p - hexagon_S2_deinterleave, // llvm.hexagon.S2.deinterleave - hexagon_S2_extractu, // llvm.hexagon.S2.extractu - hexagon_S2_extractu_rp, // llvm.hexagon.S2.extractu.rp - hexagon_S2_extractup, // llvm.hexagon.S2.extractup - hexagon_S2_extractup_rp, // llvm.hexagon.S2.extractup.rp - hexagon_S2_insert, // llvm.hexagon.S2.insert - hexagon_S2_insert_rp, // llvm.hexagon.S2.insert.rp - hexagon_S2_insertp, // llvm.hexagon.S2.insertp - hexagon_S2_insertp_rp, // llvm.hexagon.S2.insertp.rp - hexagon_S2_interleave, // llvm.hexagon.S2.interleave - hexagon_S2_lfsp, // llvm.hexagon.S2.lfsp - hexagon_S2_lsl_r_p, // llvm.hexagon.S2.lsl.r.p - hexagon_S2_lsl_r_p_acc, // llvm.hexagon.S2.lsl.r.p.acc - hexagon_S2_lsl_r_p_and, // llvm.hexagon.S2.lsl.r.p.and - hexagon_S2_lsl_r_p_nac, // llvm.hexagon.S2.lsl.r.p.nac - hexagon_S2_lsl_r_p_or, // llvm.hexagon.S2.lsl.r.p.or - hexagon_S2_lsl_r_p_xor, // llvm.hexagon.S2.lsl.r.p.xor - hexagon_S2_lsl_r_r, // llvm.hexagon.S2.lsl.r.r - hexagon_S2_lsl_r_r_acc, // llvm.hexagon.S2.lsl.r.r.acc - hexagon_S2_lsl_r_r_and, // llvm.hexagon.S2.lsl.r.r.and - hexagon_S2_lsl_r_r_nac, // llvm.hexagon.S2.lsl.r.r.nac - hexagon_S2_lsl_r_r_or, // llvm.hexagon.S2.lsl.r.r.or - hexagon_S2_lsl_r_vh, // llvm.hexagon.S2.lsl.r.vh - hexagon_S2_lsl_r_vw, // llvm.hexagon.S2.lsl.r.vw - hexagon_S2_lsr_i_p, // llvm.hexagon.S2.lsr.i.p - hexagon_S2_lsr_i_p_acc, // llvm.hexagon.S2.lsr.i.p.acc - hexagon_S2_lsr_i_p_and, // llvm.hexagon.S2.lsr.i.p.and - hexagon_S2_lsr_i_p_nac, // llvm.hexagon.S2.lsr.i.p.nac - hexagon_S2_lsr_i_p_or, // llvm.hexagon.S2.lsr.i.p.or - hexagon_S2_lsr_i_p_xacc, // llvm.hexagon.S2.lsr.i.p.xacc - hexagon_S2_lsr_i_r, // llvm.hexagon.S2.lsr.i.r - hexagon_S2_lsr_i_r_acc, // llvm.hexagon.S2.lsr.i.r.acc - hexagon_S2_lsr_i_r_and, // llvm.hexagon.S2.lsr.i.r.and - hexagon_S2_lsr_i_r_nac, // llvm.hexagon.S2.lsr.i.r.nac - hexagon_S2_lsr_i_r_or, // llvm.hexagon.S2.lsr.i.r.or - hexagon_S2_lsr_i_r_xacc, // llvm.hexagon.S2.lsr.i.r.xacc - hexagon_S2_lsr_i_vh, // llvm.hexagon.S2.lsr.i.vh - hexagon_S2_lsr_i_vw, // llvm.hexagon.S2.lsr.i.vw - hexagon_S2_lsr_r_p, // llvm.hexagon.S2.lsr.r.p - hexagon_S2_lsr_r_p_acc, // llvm.hexagon.S2.lsr.r.p.acc - hexagon_S2_lsr_r_p_and, // llvm.hexagon.S2.lsr.r.p.and - hexagon_S2_lsr_r_p_nac, // llvm.hexagon.S2.lsr.r.p.nac - hexagon_S2_lsr_r_p_or, // llvm.hexagon.S2.lsr.r.p.or - hexagon_S2_lsr_r_p_xor, // llvm.hexagon.S2.lsr.r.p.xor - hexagon_S2_lsr_r_r, // llvm.hexagon.S2.lsr.r.r - hexagon_S2_lsr_r_r_acc, // llvm.hexagon.S2.lsr.r.r.acc - hexagon_S2_lsr_r_r_and, // llvm.hexagon.S2.lsr.r.r.and - hexagon_S2_lsr_r_r_nac, // llvm.hexagon.S2.lsr.r.r.nac - hexagon_S2_lsr_r_r_or, // llvm.hexagon.S2.lsr.r.r.or - hexagon_S2_lsr_r_vh, // llvm.hexagon.S2.lsr.r.vh - hexagon_S2_lsr_r_vw, // llvm.hexagon.S2.lsr.r.vw - hexagon_S2_packhl, // llvm.hexagon.S2.packhl - hexagon_S2_parityp, // llvm.hexagon.S2.parityp - hexagon_S2_setbit_i, // llvm.hexagon.S2.setbit.i - hexagon_S2_setbit_r, // llvm.hexagon.S2.setbit.r - hexagon_S2_shuffeb, // llvm.hexagon.S2.shuffeb - hexagon_S2_shuffeh, // llvm.hexagon.S2.shuffeh - hexagon_S2_shuffob, // llvm.hexagon.S2.shuffob - hexagon_S2_shuffoh, // llvm.hexagon.S2.shuffoh - hexagon_S2_storew_locked, // llvm.hexagon.S2.storew.locked - hexagon_S2_svsathb, // llvm.hexagon.S2.svsathb - hexagon_S2_svsathub, // llvm.hexagon.S2.svsathub - hexagon_S2_tableidxb_goodsyntax, // llvm.hexagon.S2.tableidxb.goodsyntax - hexagon_S2_tableidxd_goodsyntax, // llvm.hexagon.S2.tableidxd.goodsyntax - hexagon_S2_tableidxh_goodsyntax, // llvm.hexagon.S2.tableidxh.goodsyntax - hexagon_S2_tableidxw_goodsyntax, // llvm.hexagon.S2.tableidxw.goodsyntax - hexagon_S2_togglebit_i, // llvm.hexagon.S2.togglebit.i - hexagon_S2_togglebit_r, // llvm.hexagon.S2.togglebit.r - hexagon_S2_tstbit_i, // llvm.hexagon.S2.tstbit.i - hexagon_S2_tstbit_r, // llvm.hexagon.S2.tstbit.r - hexagon_S2_valignib, // llvm.hexagon.S2.valignib - hexagon_S2_valignrb, // llvm.hexagon.S2.valignrb - hexagon_S2_vcnegh, // llvm.hexagon.S2.vcnegh - hexagon_S2_vcrotate, // llvm.hexagon.S2.vcrotate - hexagon_S2_vrcnegh, // llvm.hexagon.S2.vrcnegh - hexagon_S2_vrndpackwh, // llvm.hexagon.S2.vrndpackwh - hexagon_S2_vrndpackwhs, // llvm.hexagon.S2.vrndpackwhs - hexagon_S2_vsathb, // llvm.hexagon.S2.vsathb - hexagon_S2_vsathb_nopack, // llvm.hexagon.S2.vsathb.nopack - hexagon_S2_vsathub, // llvm.hexagon.S2.vsathub - hexagon_S2_vsathub_nopack, // llvm.hexagon.S2.vsathub.nopack - hexagon_S2_vsatwh, // llvm.hexagon.S2.vsatwh - hexagon_S2_vsatwh_nopack, // llvm.hexagon.S2.vsatwh.nopack - hexagon_S2_vsatwuh, // llvm.hexagon.S2.vsatwuh - hexagon_S2_vsatwuh_nopack, // llvm.hexagon.S2.vsatwuh.nopack - hexagon_S2_vsplatrb, // llvm.hexagon.S2.vsplatrb - hexagon_S2_vsplatrh, // llvm.hexagon.S2.vsplatrh - hexagon_S2_vspliceib, // llvm.hexagon.S2.vspliceib - hexagon_S2_vsplicerb, // llvm.hexagon.S2.vsplicerb - hexagon_S2_vsxtbh, // llvm.hexagon.S2.vsxtbh - hexagon_S2_vsxthw, // llvm.hexagon.S2.vsxthw - hexagon_S2_vtrunehb, // llvm.hexagon.S2.vtrunehb - hexagon_S2_vtrunewh, // llvm.hexagon.S2.vtrunewh - hexagon_S2_vtrunohb, // llvm.hexagon.S2.vtrunohb - hexagon_S2_vtrunowh, // llvm.hexagon.S2.vtrunowh - hexagon_S2_vzxtbh, // llvm.hexagon.S2.vzxtbh - hexagon_S2_vzxthw, // llvm.hexagon.S2.vzxthw - hexagon_S4_addaddi, // llvm.hexagon.S4.addaddi - hexagon_S4_addi_asl_ri, // llvm.hexagon.S4.addi.asl.ri - hexagon_S4_addi_lsr_ri, // llvm.hexagon.S4.addi.lsr.ri - hexagon_S4_andi_asl_ri, // llvm.hexagon.S4.andi.asl.ri - hexagon_S4_andi_lsr_ri, // llvm.hexagon.S4.andi.lsr.ri - hexagon_S4_clbaddi, // llvm.hexagon.S4.clbaddi - hexagon_S4_clbpaddi, // llvm.hexagon.S4.clbpaddi - hexagon_S4_clbpnorm, // llvm.hexagon.S4.clbpnorm - hexagon_S4_extract, // llvm.hexagon.S4.extract - hexagon_S4_extract_rp, // llvm.hexagon.S4.extract.rp - hexagon_S4_extractp, // llvm.hexagon.S4.extractp - hexagon_S4_extractp_rp, // llvm.hexagon.S4.extractp.rp - hexagon_S4_lsli, // llvm.hexagon.S4.lsli - hexagon_S4_ntstbit_i, // llvm.hexagon.S4.ntstbit.i - hexagon_S4_ntstbit_r, // llvm.hexagon.S4.ntstbit.r - hexagon_S4_or_andi, // llvm.hexagon.S4.or.andi - hexagon_S4_or_andix, // llvm.hexagon.S4.or.andix - hexagon_S4_or_ori, // llvm.hexagon.S4.or.ori - hexagon_S4_ori_asl_ri, // llvm.hexagon.S4.ori.asl.ri - hexagon_S4_ori_lsr_ri, // llvm.hexagon.S4.ori.lsr.ri - hexagon_S4_parity, // llvm.hexagon.S4.parity - hexagon_S4_stored_locked, // llvm.hexagon.S4.stored.locked - hexagon_S4_subaddi, // llvm.hexagon.S4.subaddi - hexagon_S4_subi_asl_ri, // llvm.hexagon.S4.subi.asl.ri - hexagon_S4_subi_lsr_ri, // llvm.hexagon.S4.subi.lsr.ri - hexagon_S4_vrcrotate, // llvm.hexagon.S4.vrcrotate - hexagon_S4_vrcrotate_acc, // llvm.hexagon.S4.vrcrotate.acc - hexagon_S4_vxaddsubh, // llvm.hexagon.S4.vxaddsubh - hexagon_S4_vxaddsubhr, // llvm.hexagon.S4.vxaddsubhr - hexagon_S4_vxaddsubw, // llvm.hexagon.S4.vxaddsubw - hexagon_S4_vxsubaddh, // llvm.hexagon.S4.vxsubaddh - hexagon_S4_vxsubaddhr, // llvm.hexagon.S4.vxsubaddhr - hexagon_S4_vxsubaddw, // llvm.hexagon.S4.vxsubaddw - hexagon_S5_asrhub_rnd_sat_goodsyntax, // llvm.hexagon.S5.asrhub.rnd.sat.goodsyntax - hexagon_S5_asrhub_sat, // llvm.hexagon.S5.asrhub.sat - hexagon_S5_popcountp, // llvm.hexagon.S5.popcountp - hexagon_S5_vasrhrnd_goodsyntax, // llvm.hexagon.S5.vasrhrnd.goodsyntax - hexagon_S6_rol_i_p, // llvm.hexagon.S6.rol.i.p - hexagon_S6_rol_i_p_acc, // llvm.hexagon.S6.rol.i.p.acc - hexagon_S6_rol_i_p_and, // llvm.hexagon.S6.rol.i.p.and - hexagon_S6_rol_i_p_nac, // llvm.hexagon.S6.rol.i.p.nac - hexagon_S6_rol_i_p_or, // llvm.hexagon.S6.rol.i.p.or - hexagon_S6_rol_i_p_xacc, // llvm.hexagon.S6.rol.i.p.xacc - hexagon_S6_rol_i_r, // llvm.hexagon.S6.rol.i.r - hexagon_S6_rol_i_r_acc, // llvm.hexagon.S6.rol.i.r.acc - hexagon_S6_rol_i_r_and, // llvm.hexagon.S6.rol.i.r.and - hexagon_S6_rol_i_r_nac, // llvm.hexagon.S6.rol.i.r.nac - hexagon_S6_rol_i_r_or, // llvm.hexagon.S6.rol.i.r.or - hexagon_S6_rol_i_r_xacc, // llvm.hexagon.S6.rol.i.r.xacc - hexagon_S6_vsplatrbp, // llvm.hexagon.S6.vsplatrbp - hexagon_S6_vtrunehb_ppp, // llvm.hexagon.S6.vtrunehb.ppp - hexagon_S6_vtrunohb_ppp, // llvm.hexagon.S6.vtrunohb.ppp - hexagon_SI_to_SXTHI_asrh, // llvm.hexagon.SI.to.SXTHI.asrh - hexagon_V6_extractw, // llvm.hexagon.V6.extractw - hexagon_V6_extractw_128B, // llvm.hexagon.V6.extractw.128B - hexagon_V6_hi, // llvm.hexagon.V6.hi - hexagon_V6_hi_128B, // llvm.hexagon.V6.hi.128B - hexagon_V6_lo, // llvm.hexagon.V6.lo - hexagon_V6_lo_128B, // llvm.hexagon.V6.lo.128B - hexagon_V6_lvsplatw, // llvm.hexagon.V6.lvsplatw - hexagon_V6_lvsplatw_128B, // llvm.hexagon.V6.lvsplatw.128B - hexagon_V6_pred_and, // llvm.hexagon.V6.pred.and - hexagon_V6_pred_and_128B, // llvm.hexagon.V6.pred.and.128B - hexagon_V6_pred_and_n, // llvm.hexagon.V6.pred.and.n - hexagon_V6_pred_and_n_128B, // llvm.hexagon.V6.pred.and.n.128B - hexagon_V6_pred_not, // llvm.hexagon.V6.pred.not - hexagon_V6_pred_not_128B, // llvm.hexagon.V6.pred.not.128B - hexagon_V6_pred_or, // llvm.hexagon.V6.pred.or - hexagon_V6_pred_or_128B, // llvm.hexagon.V6.pred.or.128B - hexagon_V6_pred_or_n, // llvm.hexagon.V6.pred.or.n - hexagon_V6_pred_or_n_128B, // llvm.hexagon.V6.pred.or.n.128B - hexagon_V6_pred_scalar2, // llvm.hexagon.V6.pred.scalar2 - hexagon_V6_pred_scalar2_128B, // llvm.hexagon.V6.pred.scalar2.128B - hexagon_V6_pred_xor, // llvm.hexagon.V6.pred.xor - hexagon_V6_pred_xor_128B, // llvm.hexagon.V6.pred.xor.128B - hexagon_V6_vabsdiffh, // llvm.hexagon.V6.vabsdiffh - hexagon_V6_vabsdiffh_128B, // llvm.hexagon.V6.vabsdiffh.128B - hexagon_V6_vabsdiffub, // llvm.hexagon.V6.vabsdiffub - hexagon_V6_vabsdiffub_128B, // llvm.hexagon.V6.vabsdiffub.128B - hexagon_V6_vabsdiffuh, // llvm.hexagon.V6.vabsdiffuh - hexagon_V6_vabsdiffuh_128B, // llvm.hexagon.V6.vabsdiffuh.128B - hexagon_V6_vabsdiffw, // llvm.hexagon.V6.vabsdiffw - hexagon_V6_vabsdiffw_128B, // llvm.hexagon.V6.vabsdiffw.128B - hexagon_V6_vabsh, // llvm.hexagon.V6.vabsh - hexagon_V6_vabsh_128B, // llvm.hexagon.V6.vabsh.128B - hexagon_V6_vabsh_sat, // llvm.hexagon.V6.vabsh.sat - hexagon_V6_vabsh_sat_128B, // llvm.hexagon.V6.vabsh.sat.128B - hexagon_V6_vabsw, // llvm.hexagon.V6.vabsw - hexagon_V6_vabsw_128B, // llvm.hexagon.V6.vabsw.128B - hexagon_V6_vabsw_sat, // llvm.hexagon.V6.vabsw.sat - hexagon_V6_vabsw_sat_128B, // llvm.hexagon.V6.vabsw.sat.128B - hexagon_V6_vaddb, // llvm.hexagon.V6.vaddb - hexagon_V6_vaddb_128B, // llvm.hexagon.V6.vaddb.128B - hexagon_V6_vaddb_dv, // llvm.hexagon.V6.vaddb.dv - hexagon_V6_vaddb_dv_128B, // llvm.hexagon.V6.vaddb.dv.128B - hexagon_V6_vaddbnq, // llvm.hexagon.V6.vaddbnq - hexagon_V6_vaddbnq_128B, // llvm.hexagon.V6.vaddbnq.128B - hexagon_V6_vaddbq, // llvm.hexagon.V6.vaddbq - hexagon_V6_vaddbq_128B, // llvm.hexagon.V6.vaddbq.128B - hexagon_V6_vaddh, // llvm.hexagon.V6.vaddh - hexagon_V6_vaddh_128B, // llvm.hexagon.V6.vaddh.128B - hexagon_V6_vaddh_dv, // llvm.hexagon.V6.vaddh.dv - hexagon_V6_vaddh_dv_128B, // llvm.hexagon.V6.vaddh.dv.128B - hexagon_V6_vaddhnq, // llvm.hexagon.V6.vaddhnq - hexagon_V6_vaddhnq_128B, // llvm.hexagon.V6.vaddhnq.128B - hexagon_V6_vaddhq, // llvm.hexagon.V6.vaddhq - hexagon_V6_vaddhq_128B, // llvm.hexagon.V6.vaddhq.128B - hexagon_V6_vaddhsat, // llvm.hexagon.V6.vaddhsat - hexagon_V6_vaddhsat_128B, // llvm.hexagon.V6.vaddhsat.128B - hexagon_V6_vaddhsat_dv, // llvm.hexagon.V6.vaddhsat.dv - hexagon_V6_vaddhsat_dv_128B, // llvm.hexagon.V6.vaddhsat.dv.128B - hexagon_V6_vaddhw, // llvm.hexagon.V6.vaddhw - hexagon_V6_vaddhw_128B, // llvm.hexagon.V6.vaddhw.128B - hexagon_V6_vaddubh, // llvm.hexagon.V6.vaddubh - hexagon_V6_vaddubh_128B, // llvm.hexagon.V6.vaddubh.128B - hexagon_V6_vaddubsat, // llvm.hexagon.V6.vaddubsat - hexagon_V6_vaddubsat_128B, // llvm.hexagon.V6.vaddubsat.128B - hexagon_V6_vaddubsat_dv, // llvm.hexagon.V6.vaddubsat.dv - hexagon_V6_vaddubsat_dv_128B, // llvm.hexagon.V6.vaddubsat.dv.128B - hexagon_V6_vadduhsat, // llvm.hexagon.V6.vadduhsat - hexagon_V6_vadduhsat_128B, // llvm.hexagon.V6.vadduhsat.128B - hexagon_V6_vadduhsat_dv, // llvm.hexagon.V6.vadduhsat.dv - hexagon_V6_vadduhsat_dv_128B, // llvm.hexagon.V6.vadduhsat.dv.128B - hexagon_V6_vadduhw, // llvm.hexagon.V6.vadduhw - hexagon_V6_vadduhw_128B, // llvm.hexagon.V6.vadduhw.128B - hexagon_V6_vaddw, // llvm.hexagon.V6.vaddw - hexagon_V6_vaddw_128B, // llvm.hexagon.V6.vaddw.128B - hexagon_V6_vaddw_dv, // llvm.hexagon.V6.vaddw.dv - hexagon_V6_vaddw_dv_128B, // llvm.hexagon.V6.vaddw.dv.128B - hexagon_V6_vaddwnq, // llvm.hexagon.V6.vaddwnq - hexagon_V6_vaddwnq_128B, // llvm.hexagon.V6.vaddwnq.128B - hexagon_V6_vaddwq, // llvm.hexagon.V6.vaddwq - hexagon_V6_vaddwq_128B, // llvm.hexagon.V6.vaddwq.128B - hexagon_V6_vaddwsat, // llvm.hexagon.V6.vaddwsat - hexagon_V6_vaddwsat_128B, // llvm.hexagon.V6.vaddwsat.128B - hexagon_V6_vaddwsat_dv, // llvm.hexagon.V6.vaddwsat.dv - hexagon_V6_vaddwsat_dv_128B, // llvm.hexagon.V6.vaddwsat.dv.128B - hexagon_V6_valignb, // llvm.hexagon.V6.valignb - hexagon_V6_valignb_128B, // llvm.hexagon.V6.valignb.128B - hexagon_V6_valignbi, // llvm.hexagon.V6.valignbi - hexagon_V6_valignbi_128B, // llvm.hexagon.V6.valignbi.128B - hexagon_V6_vand, // llvm.hexagon.V6.vand - hexagon_V6_vand_128B, // llvm.hexagon.V6.vand.128B - hexagon_V6_vandqrt, // llvm.hexagon.V6.vandqrt - hexagon_V6_vandqrt_128B, // llvm.hexagon.V6.vandqrt.128B - hexagon_V6_vandqrt_acc, // llvm.hexagon.V6.vandqrt.acc - hexagon_V6_vandqrt_acc_128B, // llvm.hexagon.V6.vandqrt.acc.128B - hexagon_V6_vandvrt, // llvm.hexagon.V6.vandvrt - hexagon_V6_vandvrt_128B, // llvm.hexagon.V6.vandvrt.128B - hexagon_V6_vandvrt_acc, // llvm.hexagon.V6.vandvrt.acc - hexagon_V6_vandvrt_acc_128B, // llvm.hexagon.V6.vandvrt.acc.128B - hexagon_V6_vaslh, // llvm.hexagon.V6.vaslh - hexagon_V6_vaslh_128B, // llvm.hexagon.V6.vaslh.128B - hexagon_V6_vaslhv, // llvm.hexagon.V6.vaslhv - hexagon_V6_vaslhv_128B, // llvm.hexagon.V6.vaslhv.128B - hexagon_V6_vaslw, // llvm.hexagon.V6.vaslw - hexagon_V6_vaslw_128B, // llvm.hexagon.V6.vaslw.128B - hexagon_V6_vaslw_acc, // llvm.hexagon.V6.vaslw.acc - hexagon_V6_vaslw_acc_128B, // llvm.hexagon.V6.vaslw.acc.128B - hexagon_V6_vaslwv, // llvm.hexagon.V6.vaslwv - hexagon_V6_vaslwv_128B, // llvm.hexagon.V6.vaslwv.128B - hexagon_V6_vasrh, // llvm.hexagon.V6.vasrh - hexagon_V6_vasrh_128B, // llvm.hexagon.V6.vasrh.128B - hexagon_V6_vasrhbrndsat, // llvm.hexagon.V6.vasrhbrndsat - hexagon_V6_vasrhbrndsat_128B, // llvm.hexagon.V6.vasrhbrndsat.128B - hexagon_V6_vasrhubrndsat, // llvm.hexagon.V6.vasrhubrndsat - hexagon_V6_vasrhubrndsat_128B, // llvm.hexagon.V6.vasrhubrndsat.128B - hexagon_V6_vasrhubsat, // llvm.hexagon.V6.vasrhubsat - hexagon_V6_vasrhubsat_128B, // llvm.hexagon.V6.vasrhubsat.128B - hexagon_V6_vasrhv, // llvm.hexagon.V6.vasrhv - hexagon_V6_vasrhv_128B, // llvm.hexagon.V6.vasrhv.128B - hexagon_V6_vasrw, // llvm.hexagon.V6.vasrw - hexagon_V6_vasrw_128B, // llvm.hexagon.V6.vasrw.128B - hexagon_V6_vasrw_acc, // llvm.hexagon.V6.vasrw.acc - hexagon_V6_vasrw_acc_128B, // llvm.hexagon.V6.vasrw.acc.128B - hexagon_V6_vasrwh, // llvm.hexagon.V6.vasrwh - hexagon_V6_vasrwh_128B, // llvm.hexagon.V6.vasrwh.128B - hexagon_V6_vasrwhrndsat, // llvm.hexagon.V6.vasrwhrndsat - hexagon_V6_vasrwhrndsat_128B, // llvm.hexagon.V6.vasrwhrndsat.128B - hexagon_V6_vasrwhsat, // llvm.hexagon.V6.vasrwhsat - hexagon_V6_vasrwhsat_128B, // llvm.hexagon.V6.vasrwhsat.128B - hexagon_V6_vasrwuhsat, // llvm.hexagon.V6.vasrwuhsat - hexagon_V6_vasrwuhsat_128B, // llvm.hexagon.V6.vasrwuhsat.128B - hexagon_V6_vasrwv, // llvm.hexagon.V6.vasrwv - hexagon_V6_vasrwv_128B, // llvm.hexagon.V6.vasrwv.128B - hexagon_V6_vassign, // llvm.hexagon.V6.vassign - hexagon_V6_vassign_128B, // llvm.hexagon.V6.vassign.128B - hexagon_V6_vassignp, // llvm.hexagon.V6.vassignp - hexagon_V6_vassignp_128B, // llvm.hexagon.V6.vassignp.128B - hexagon_V6_vavgh, // llvm.hexagon.V6.vavgh - hexagon_V6_vavgh_128B, // llvm.hexagon.V6.vavgh.128B - hexagon_V6_vavghrnd, // llvm.hexagon.V6.vavghrnd - hexagon_V6_vavghrnd_128B, // llvm.hexagon.V6.vavghrnd.128B - hexagon_V6_vavgub, // llvm.hexagon.V6.vavgub - hexagon_V6_vavgub_128B, // llvm.hexagon.V6.vavgub.128B - hexagon_V6_vavgubrnd, // llvm.hexagon.V6.vavgubrnd - hexagon_V6_vavgubrnd_128B, // llvm.hexagon.V6.vavgubrnd.128B - hexagon_V6_vavguh, // llvm.hexagon.V6.vavguh - hexagon_V6_vavguh_128B, // llvm.hexagon.V6.vavguh.128B - hexagon_V6_vavguhrnd, // llvm.hexagon.V6.vavguhrnd - hexagon_V6_vavguhrnd_128B, // llvm.hexagon.V6.vavguhrnd.128B - hexagon_V6_vavgw, // llvm.hexagon.V6.vavgw - hexagon_V6_vavgw_128B, // llvm.hexagon.V6.vavgw.128B - hexagon_V6_vavgwrnd, // llvm.hexagon.V6.vavgwrnd - hexagon_V6_vavgwrnd_128B, // llvm.hexagon.V6.vavgwrnd.128B - hexagon_V6_vcl0h, // llvm.hexagon.V6.vcl0h - hexagon_V6_vcl0h_128B, // llvm.hexagon.V6.vcl0h.128B - hexagon_V6_vcl0w, // llvm.hexagon.V6.vcl0w - hexagon_V6_vcl0w_128B, // llvm.hexagon.V6.vcl0w.128B - hexagon_V6_vcombine, // llvm.hexagon.V6.vcombine - hexagon_V6_vcombine_128B, // llvm.hexagon.V6.vcombine.128B - hexagon_V6_vd0, // llvm.hexagon.V6.vd0 - hexagon_V6_vd0_128B, // llvm.hexagon.V6.vd0.128B - hexagon_V6_vdealb, // llvm.hexagon.V6.vdealb - hexagon_V6_vdealb_128B, // llvm.hexagon.V6.vdealb.128B - hexagon_V6_vdealb4w, // llvm.hexagon.V6.vdealb4w - hexagon_V6_vdealb4w_128B, // llvm.hexagon.V6.vdealb4w.128B - hexagon_V6_vdealh, // llvm.hexagon.V6.vdealh - hexagon_V6_vdealh_128B, // llvm.hexagon.V6.vdealh.128B - hexagon_V6_vdealvdd, // llvm.hexagon.V6.vdealvdd - hexagon_V6_vdealvdd_128B, // llvm.hexagon.V6.vdealvdd.128B - hexagon_V6_vdelta, // llvm.hexagon.V6.vdelta - hexagon_V6_vdelta_128B, // llvm.hexagon.V6.vdelta.128B - hexagon_V6_vdmpybus, // llvm.hexagon.V6.vdmpybus - hexagon_V6_vdmpybus_128B, // llvm.hexagon.V6.vdmpybus.128B - hexagon_V6_vdmpybus_acc, // llvm.hexagon.V6.vdmpybus.acc - hexagon_V6_vdmpybus_acc_128B, // llvm.hexagon.V6.vdmpybus.acc.128B - hexagon_V6_vdmpybus_dv, // llvm.hexagon.V6.vdmpybus.dv - hexagon_V6_vdmpybus_dv_128B, // llvm.hexagon.V6.vdmpybus.dv.128B - hexagon_V6_vdmpybus_dv_acc, // llvm.hexagon.V6.vdmpybus.dv.acc - hexagon_V6_vdmpybus_dv_acc_128B, // llvm.hexagon.V6.vdmpybus.dv.acc.128B - hexagon_V6_vdmpyhb, // llvm.hexagon.V6.vdmpyhb - hexagon_V6_vdmpyhb_128B, // llvm.hexagon.V6.vdmpyhb.128B - hexagon_V6_vdmpyhb_acc, // llvm.hexagon.V6.vdmpyhb.acc - hexagon_V6_vdmpyhb_acc_128B, // llvm.hexagon.V6.vdmpyhb.acc.128B - hexagon_V6_vdmpyhb_dv, // llvm.hexagon.V6.vdmpyhb.dv - hexagon_V6_vdmpyhb_dv_128B, // llvm.hexagon.V6.vdmpyhb.dv.128B - hexagon_V6_vdmpyhb_dv_acc, // llvm.hexagon.V6.vdmpyhb.dv.acc - hexagon_V6_vdmpyhb_dv_acc_128B, // llvm.hexagon.V6.vdmpyhb.dv.acc.128B - hexagon_V6_vdmpyhisat, // llvm.hexagon.V6.vdmpyhisat - hexagon_V6_vdmpyhisat_128B, // llvm.hexagon.V6.vdmpyhisat.128B - hexagon_V6_vdmpyhisat_acc, // llvm.hexagon.V6.vdmpyhisat.acc - hexagon_V6_vdmpyhisat_acc_128B, // llvm.hexagon.V6.vdmpyhisat.acc.128B - hexagon_V6_vdmpyhsat, // llvm.hexagon.V6.vdmpyhsat - hexagon_V6_vdmpyhsat_128B, // llvm.hexagon.V6.vdmpyhsat.128B - hexagon_V6_vdmpyhsat_acc, // llvm.hexagon.V6.vdmpyhsat.acc - hexagon_V6_vdmpyhsat_acc_128B, // llvm.hexagon.V6.vdmpyhsat.acc.128B - hexagon_V6_vdmpyhsuisat, // llvm.hexagon.V6.vdmpyhsuisat - hexagon_V6_vdmpyhsuisat_128B, // llvm.hexagon.V6.vdmpyhsuisat.128B - hexagon_V6_vdmpyhsuisat_acc, // llvm.hexagon.V6.vdmpyhsuisat.acc - hexagon_V6_vdmpyhsuisat_acc_128B, // llvm.hexagon.V6.vdmpyhsuisat.acc.128B - hexagon_V6_vdmpyhsusat, // llvm.hexagon.V6.vdmpyhsusat - hexagon_V6_vdmpyhsusat_128B, // llvm.hexagon.V6.vdmpyhsusat.128B - hexagon_V6_vdmpyhsusat_acc, // llvm.hexagon.V6.vdmpyhsusat.acc - hexagon_V6_vdmpyhsusat_acc_128B, // llvm.hexagon.V6.vdmpyhsusat.acc.128B - hexagon_V6_vdmpyhvsat, // llvm.hexagon.V6.vdmpyhvsat - hexagon_V6_vdmpyhvsat_128B, // llvm.hexagon.V6.vdmpyhvsat.128B - hexagon_V6_vdmpyhvsat_acc, // llvm.hexagon.V6.vdmpyhvsat.acc - hexagon_V6_vdmpyhvsat_acc_128B, // llvm.hexagon.V6.vdmpyhvsat.acc.128B - hexagon_V6_vdsaduh, // llvm.hexagon.V6.vdsaduh - hexagon_V6_vdsaduh_128B, // llvm.hexagon.V6.vdsaduh.128B - hexagon_V6_vdsaduh_acc, // llvm.hexagon.V6.vdsaduh.acc - hexagon_V6_vdsaduh_acc_128B, // llvm.hexagon.V6.vdsaduh.acc.128B - hexagon_V6_veqb, // llvm.hexagon.V6.veqb - hexagon_V6_veqb_128B, // llvm.hexagon.V6.veqb.128B - hexagon_V6_veqb_and, // llvm.hexagon.V6.veqb.and - hexagon_V6_veqb_and_128B, // llvm.hexagon.V6.veqb.and.128B - hexagon_V6_veqb_or, // llvm.hexagon.V6.veqb.or - hexagon_V6_veqb_or_128B, // llvm.hexagon.V6.veqb.or.128B - hexagon_V6_veqb_xor, // llvm.hexagon.V6.veqb.xor - hexagon_V6_veqb_xor_128B, // llvm.hexagon.V6.veqb.xor.128B - hexagon_V6_veqh, // llvm.hexagon.V6.veqh - hexagon_V6_veqh_128B, // llvm.hexagon.V6.veqh.128B - hexagon_V6_veqh_and, // llvm.hexagon.V6.veqh.and - hexagon_V6_veqh_and_128B, // llvm.hexagon.V6.veqh.and.128B - hexagon_V6_veqh_or, // llvm.hexagon.V6.veqh.or - hexagon_V6_veqh_or_128B, // llvm.hexagon.V6.veqh.or.128B - hexagon_V6_veqh_xor, // llvm.hexagon.V6.veqh.xor - hexagon_V6_veqh_xor_128B, // llvm.hexagon.V6.veqh.xor.128B - hexagon_V6_veqw, // llvm.hexagon.V6.veqw - hexagon_V6_veqw_128B, // llvm.hexagon.V6.veqw.128B - hexagon_V6_veqw_and, // llvm.hexagon.V6.veqw.and - hexagon_V6_veqw_and_128B, // llvm.hexagon.V6.veqw.and.128B - hexagon_V6_veqw_or, // llvm.hexagon.V6.veqw.or - hexagon_V6_veqw_or_128B, // llvm.hexagon.V6.veqw.or.128B - hexagon_V6_veqw_xor, // llvm.hexagon.V6.veqw.xor - hexagon_V6_veqw_xor_128B, // llvm.hexagon.V6.veqw.xor.128B - hexagon_V6_vgtb, // llvm.hexagon.V6.vgtb - hexagon_V6_vgtb_128B, // llvm.hexagon.V6.vgtb.128B - hexagon_V6_vgtb_and, // llvm.hexagon.V6.vgtb.and - hexagon_V6_vgtb_and_128B, // llvm.hexagon.V6.vgtb.and.128B - hexagon_V6_vgtb_or, // llvm.hexagon.V6.vgtb.or - hexagon_V6_vgtb_or_128B, // llvm.hexagon.V6.vgtb.or.128B - hexagon_V6_vgtb_xor, // llvm.hexagon.V6.vgtb.xor - hexagon_V6_vgtb_xor_128B, // llvm.hexagon.V6.vgtb.xor.128B - hexagon_V6_vgth, // llvm.hexagon.V6.vgth - hexagon_V6_vgth_128B, // llvm.hexagon.V6.vgth.128B - hexagon_V6_vgth_and, // llvm.hexagon.V6.vgth.and - hexagon_V6_vgth_and_128B, // llvm.hexagon.V6.vgth.and.128B - hexagon_V6_vgth_or, // llvm.hexagon.V6.vgth.or - hexagon_V6_vgth_or_128B, // llvm.hexagon.V6.vgth.or.128B - hexagon_V6_vgth_xor, // llvm.hexagon.V6.vgth.xor - hexagon_V6_vgth_xor_128B, // llvm.hexagon.V6.vgth.xor.128B - hexagon_V6_vgtub, // llvm.hexagon.V6.vgtub - hexagon_V6_vgtub_128B, // llvm.hexagon.V6.vgtub.128B - hexagon_V6_vgtub_and, // llvm.hexagon.V6.vgtub.and - hexagon_V6_vgtub_and_128B, // llvm.hexagon.V6.vgtub.and.128B - hexagon_V6_vgtub_or, // llvm.hexagon.V6.vgtub.or - hexagon_V6_vgtub_or_128B, // llvm.hexagon.V6.vgtub.or.128B - hexagon_V6_vgtub_xor, // llvm.hexagon.V6.vgtub.xor - hexagon_V6_vgtub_xor_128B, // llvm.hexagon.V6.vgtub.xor.128B - hexagon_V6_vgtuh, // llvm.hexagon.V6.vgtuh - hexagon_V6_vgtuh_128B, // llvm.hexagon.V6.vgtuh.128B - hexagon_V6_vgtuh_and, // llvm.hexagon.V6.vgtuh.and - hexagon_V6_vgtuh_and_128B, // llvm.hexagon.V6.vgtuh.and.128B - hexagon_V6_vgtuh_or, // llvm.hexagon.V6.vgtuh.or - hexagon_V6_vgtuh_or_128B, // llvm.hexagon.V6.vgtuh.or.128B - hexagon_V6_vgtuh_xor, // llvm.hexagon.V6.vgtuh.xor - hexagon_V6_vgtuh_xor_128B, // llvm.hexagon.V6.vgtuh.xor.128B - hexagon_V6_vgtuw, // llvm.hexagon.V6.vgtuw - hexagon_V6_vgtuw_128B, // llvm.hexagon.V6.vgtuw.128B - hexagon_V6_vgtuw_and, // llvm.hexagon.V6.vgtuw.and - hexagon_V6_vgtuw_and_128B, // llvm.hexagon.V6.vgtuw.and.128B - hexagon_V6_vgtuw_or, // llvm.hexagon.V6.vgtuw.or - hexagon_V6_vgtuw_or_128B, // llvm.hexagon.V6.vgtuw.or.128B - hexagon_V6_vgtuw_xor, // llvm.hexagon.V6.vgtuw.xor - hexagon_V6_vgtuw_xor_128B, // llvm.hexagon.V6.vgtuw.xor.128B - hexagon_V6_vgtw, // llvm.hexagon.V6.vgtw - hexagon_V6_vgtw_128B, // llvm.hexagon.V6.vgtw.128B - hexagon_V6_vgtw_and, // llvm.hexagon.V6.vgtw.and - hexagon_V6_vgtw_and_128B, // llvm.hexagon.V6.vgtw.and.128B - hexagon_V6_vgtw_or, // llvm.hexagon.V6.vgtw.or - hexagon_V6_vgtw_or_128B, // llvm.hexagon.V6.vgtw.or.128B - hexagon_V6_vgtw_xor, // llvm.hexagon.V6.vgtw.xor - hexagon_V6_vgtw_xor_128B, // llvm.hexagon.V6.vgtw.xor.128B - hexagon_V6_vinsertwr, // llvm.hexagon.V6.vinsertwr - hexagon_V6_vinsertwr_128B, // llvm.hexagon.V6.vinsertwr.128B - hexagon_V6_vlalignb, // llvm.hexagon.V6.vlalignb - hexagon_V6_vlalignb_128B, // llvm.hexagon.V6.vlalignb.128B - hexagon_V6_vlalignbi, // llvm.hexagon.V6.vlalignbi - hexagon_V6_vlalignbi_128B, // llvm.hexagon.V6.vlalignbi.128B - hexagon_V6_vlsrh, // llvm.hexagon.V6.vlsrh - hexagon_V6_vlsrh_128B, // llvm.hexagon.V6.vlsrh.128B - hexagon_V6_vlsrhv, // llvm.hexagon.V6.vlsrhv - hexagon_V6_vlsrhv_128B, // llvm.hexagon.V6.vlsrhv.128B - hexagon_V6_vlsrw, // llvm.hexagon.V6.vlsrw - hexagon_V6_vlsrw_128B, // llvm.hexagon.V6.vlsrw.128B - hexagon_V6_vlsrwv, // llvm.hexagon.V6.vlsrwv - hexagon_V6_vlsrwv_128B, // llvm.hexagon.V6.vlsrwv.128B - hexagon_V6_vlutb, // llvm.hexagon.V6.vlutb - hexagon_V6_vlutb_128B, // llvm.hexagon.V6.vlutb.128B - hexagon_V6_vlutb_acc, // llvm.hexagon.V6.vlutb.acc - hexagon_V6_vlutb_acc_128B, // llvm.hexagon.V6.vlutb.acc.128B - hexagon_V6_vlutb_dv, // llvm.hexagon.V6.vlutb.dv - hexagon_V6_vlutb_dv_128B, // llvm.hexagon.V6.vlutb.dv.128B - hexagon_V6_vlutb_dv_acc, // llvm.hexagon.V6.vlutb.dv.acc - hexagon_V6_vlutb_dv_acc_128B, // llvm.hexagon.V6.vlutb.dv.acc.128B - hexagon_V6_vlutvvb, // llvm.hexagon.V6.vlutvvb - hexagon_V6_vlutvvb_128B, // llvm.hexagon.V6.vlutvvb.128B - hexagon_V6_vlutvvb_oracc, // llvm.hexagon.V6.vlutvvb.oracc - hexagon_V6_vlutvvb_oracc_128B, // llvm.hexagon.V6.vlutvvb.oracc.128B - hexagon_V6_vlutvwh, // llvm.hexagon.V6.vlutvwh - hexagon_V6_vlutvwh_128B, // llvm.hexagon.V6.vlutvwh.128B - hexagon_V6_vlutvwh_oracc, // llvm.hexagon.V6.vlutvwh.oracc - hexagon_V6_vlutvwh_oracc_128B, // llvm.hexagon.V6.vlutvwh.oracc.128B - hexagon_V6_vmaxh, // llvm.hexagon.V6.vmaxh - hexagon_V6_vmaxh_128B, // llvm.hexagon.V6.vmaxh.128B - hexagon_V6_vmaxub, // llvm.hexagon.V6.vmaxub - hexagon_V6_vmaxub_128B, // llvm.hexagon.V6.vmaxub.128B - hexagon_V6_vmaxuh, // llvm.hexagon.V6.vmaxuh - hexagon_V6_vmaxuh_128B, // llvm.hexagon.V6.vmaxuh.128B - hexagon_V6_vmaxw, // llvm.hexagon.V6.vmaxw - hexagon_V6_vmaxw_128B, // llvm.hexagon.V6.vmaxw.128B - hexagon_V6_vminh, // llvm.hexagon.V6.vminh - hexagon_V6_vminh_128B, // llvm.hexagon.V6.vminh.128B - hexagon_V6_vminub, // llvm.hexagon.V6.vminub - hexagon_V6_vminub_128B, // llvm.hexagon.V6.vminub.128B - hexagon_V6_vminuh, // llvm.hexagon.V6.vminuh - hexagon_V6_vminuh_128B, // llvm.hexagon.V6.vminuh.128B - hexagon_V6_vminw, // llvm.hexagon.V6.vminw - hexagon_V6_vminw_128B, // llvm.hexagon.V6.vminw.128B - hexagon_V6_vmpabus, // llvm.hexagon.V6.vmpabus - hexagon_V6_vmpabus_128B, // llvm.hexagon.V6.vmpabus.128B - hexagon_V6_vmpabus_acc, // llvm.hexagon.V6.vmpabus.acc - hexagon_V6_vmpabus_acc_128B, // llvm.hexagon.V6.vmpabus.acc.128B - hexagon_V6_vmpabusv, // llvm.hexagon.V6.vmpabusv - hexagon_V6_vmpabusv_128B, // llvm.hexagon.V6.vmpabusv.128B - hexagon_V6_vmpabuuv, // llvm.hexagon.V6.vmpabuuv - hexagon_V6_vmpabuuv_128B, // llvm.hexagon.V6.vmpabuuv.128B - hexagon_V6_vmpahb, // llvm.hexagon.V6.vmpahb - hexagon_V6_vmpahb_128B, // llvm.hexagon.V6.vmpahb.128B - hexagon_V6_vmpahb_acc, // llvm.hexagon.V6.vmpahb.acc - hexagon_V6_vmpahb_acc_128B, // llvm.hexagon.V6.vmpahb.acc.128B - hexagon_V6_vmpybus, // llvm.hexagon.V6.vmpybus - hexagon_V6_vmpybus_128B, // llvm.hexagon.V6.vmpybus.128B - hexagon_V6_vmpybus_acc, // llvm.hexagon.V6.vmpybus.acc - hexagon_V6_vmpybus_acc_128B, // llvm.hexagon.V6.vmpybus.acc.128B - hexagon_V6_vmpybusv, // llvm.hexagon.V6.vmpybusv - hexagon_V6_vmpybusv_128B, // llvm.hexagon.V6.vmpybusv.128B - hexagon_V6_vmpybusv_acc, // llvm.hexagon.V6.vmpybusv.acc - hexagon_V6_vmpybusv_acc_128B, // llvm.hexagon.V6.vmpybusv.acc.128B - hexagon_V6_vmpybv, // llvm.hexagon.V6.vmpybv - hexagon_V6_vmpybv_128B, // llvm.hexagon.V6.vmpybv.128B - hexagon_V6_vmpybv_acc, // llvm.hexagon.V6.vmpybv.acc - hexagon_V6_vmpybv_acc_128B, // llvm.hexagon.V6.vmpybv.acc.128B - hexagon_V6_vmpyewuh, // llvm.hexagon.V6.vmpyewuh - hexagon_V6_vmpyewuh_128B, // llvm.hexagon.V6.vmpyewuh.128B - hexagon_V6_vmpyh, // llvm.hexagon.V6.vmpyh - hexagon_V6_vmpyh_128B, // llvm.hexagon.V6.vmpyh.128B - hexagon_V6_vmpyhsat_acc, // llvm.hexagon.V6.vmpyhsat.acc - hexagon_V6_vmpyhsat_acc_128B, // llvm.hexagon.V6.vmpyhsat.acc.128B - hexagon_V6_vmpyhsrs, // llvm.hexagon.V6.vmpyhsrs - hexagon_V6_vmpyhsrs_128B, // llvm.hexagon.V6.vmpyhsrs.128B - hexagon_V6_vmpyhss, // llvm.hexagon.V6.vmpyhss - hexagon_V6_vmpyhss_128B, // llvm.hexagon.V6.vmpyhss.128B - hexagon_V6_vmpyhus, // llvm.hexagon.V6.vmpyhus - hexagon_V6_vmpyhus_128B, // llvm.hexagon.V6.vmpyhus.128B - hexagon_V6_vmpyhus_acc, // llvm.hexagon.V6.vmpyhus.acc - hexagon_V6_vmpyhus_acc_128B, // llvm.hexagon.V6.vmpyhus.acc.128B - hexagon_V6_vmpyhv, // llvm.hexagon.V6.vmpyhv - hexagon_V6_vmpyhv_128B, // llvm.hexagon.V6.vmpyhv.128B - hexagon_V6_vmpyhv_acc, // llvm.hexagon.V6.vmpyhv.acc - hexagon_V6_vmpyhv_acc_128B, // llvm.hexagon.V6.vmpyhv.acc.128B - hexagon_V6_vmpyhvsrs, // llvm.hexagon.V6.vmpyhvsrs - hexagon_V6_vmpyhvsrs_128B, // llvm.hexagon.V6.vmpyhvsrs.128B - hexagon_V6_vmpyieoh, // llvm.hexagon.V6.vmpyieoh - hexagon_V6_vmpyieoh_128B, // llvm.hexagon.V6.vmpyieoh.128B - hexagon_V6_vmpyiewh_acc, // llvm.hexagon.V6.vmpyiewh.acc - hexagon_V6_vmpyiewh_acc_128B, // llvm.hexagon.V6.vmpyiewh.acc.128B - hexagon_V6_vmpyiewuh, // llvm.hexagon.V6.vmpyiewuh - hexagon_V6_vmpyiewuh_128B, // llvm.hexagon.V6.vmpyiewuh.128B - hexagon_V6_vmpyiewuh_acc, // llvm.hexagon.V6.vmpyiewuh.acc - hexagon_V6_vmpyiewuh_acc_128B, // llvm.hexagon.V6.vmpyiewuh.acc.128B - hexagon_V6_vmpyih, // llvm.hexagon.V6.vmpyih - hexagon_V6_vmpyih_128B, // llvm.hexagon.V6.vmpyih.128B - hexagon_V6_vmpyih_acc, // llvm.hexagon.V6.vmpyih.acc - hexagon_V6_vmpyih_acc_128B, // llvm.hexagon.V6.vmpyih.acc.128B - hexagon_V6_vmpyihb, // llvm.hexagon.V6.vmpyihb - hexagon_V6_vmpyihb_128B, // llvm.hexagon.V6.vmpyihb.128B - hexagon_V6_vmpyihb_acc, // llvm.hexagon.V6.vmpyihb.acc - hexagon_V6_vmpyihb_acc_128B, // llvm.hexagon.V6.vmpyihb.acc.128B - hexagon_V6_vmpyiowh, // llvm.hexagon.V6.vmpyiowh - hexagon_V6_vmpyiowh_128B, // llvm.hexagon.V6.vmpyiowh.128B - hexagon_V6_vmpyiwb, // llvm.hexagon.V6.vmpyiwb - hexagon_V6_vmpyiwb_128B, // llvm.hexagon.V6.vmpyiwb.128B - hexagon_V6_vmpyiwb_acc, // llvm.hexagon.V6.vmpyiwb.acc - hexagon_V6_vmpyiwb_acc_128B, // llvm.hexagon.V6.vmpyiwb.acc.128B - hexagon_V6_vmpyiwh, // llvm.hexagon.V6.vmpyiwh - hexagon_V6_vmpyiwh_128B, // llvm.hexagon.V6.vmpyiwh.128B - hexagon_V6_vmpyiwh_acc, // llvm.hexagon.V6.vmpyiwh.acc - hexagon_V6_vmpyiwh_acc_128B, // llvm.hexagon.V6.vmpyiwh.acc.128B - hexagon_V6_vmpyowh, // llvm.hexagon.V6.vmpyowh - hexagon_V6_vmpyowh_128B, // llvm.hexagon.V6.vmpyowh.128B - hexagon_V6_vmpyowh_rnd, // llvm.hexagon.V6.vmpyowh.rnd - hexagon_V6_vmpyowh_rnd_128B, // llvm.hexagon.V6.vmpyowh.rnd.128B - hexagon_V6_vmpyowh_rnd_sacc, // llvm.hexagon.V6.vmpyowh.rnd.sacc - hexagon_V6_vmpyowh_rnd_sacc_128B, // llvm.hexagon.V6.vmpyowh.rnd.sacc.128B - hexagon_V6_vmpyowh_sacc, // llvm.hexagon.V6.vmpyowh.sacc - hexagon_V6_vmpyowh_sacc_128B, // llvm.hexagon.V6.vmpyowh.sacc.128B - hexagon_V6_vmpyub, // llvm.hexagon.V6.vmpyub - hexagon_V6_vmpyub_128B, // llvm.hexagon.V6.vmpyub.128B - hexagon_V6_vmpyub_acc, // llvm.hexagon.V6.vmpyub.acc - hexagon_V6_vmpyub_acc_128B, // llvm.hexagon.V6.vmpyub.acc.128B - hexagon_V6_vmpyubv, // llvm.hexagon.V6.vmpyubv - hexagon_V6_vmpyubv_128B, // llvm.hexagon.V6.vmpyubv.128B - hexagon_V6_vmpyubv_acc, // llvm.hexagon.V6.vmpyubv.acc - hexagon_V6_vmpyubv_acc_128B, // llvm.hexagon.V6.vmpyubv.acc.128B - hexagon_V6_vmpyuh, // llvm.hexagon.V6.vmpyuh - hexagon_V6_vmpyuh_128B, // llvm.hexagon.V6.vmpyuh.128B - hexagon_V6_vmpyuh_acc, // llvm.hexagon.V6.vmpyuh.acc - hexagon_V6_vmpyuh_acc_128B, // llvm.hexagon.V6.vmpyuh.acc.128B - hexagon_V6_vmpyuhv, // llvm.hexagon.V6.vmpyuhv - hexagon_V6_vmpyuhv_128B, // llvm.hexagon.V6.vmpyuhv.128B - hexagon_V6_vmpyuhv_acc, // llvm.hexagon.V6.vmpyuhv.acc - hexagon_V6_vmpyuhv_acc_128B, // llvm.hexagon.V6.vmpyuhv.acc.128B - hexagon_V6_vmux, // llvm.hexagon.V6.vmux - hexagon_V6_vmux_128B, // llvm.hexagon.V6.vmux.128B - hexagon_V6_vnavgh, // llvm.hexagon.V6.vnavgh - hexagon_V6_vnavgh_128B, // llvm.hexagon.V6.vnavgh.128B - hexagon_V6_vnavgub, // llvm.hexagon.V6.vnavgub - hexagon_V6_vnavgub_128B, // llvm.hexagon.V6.vnavgub.128B - hexagon_V6_vnavgw, // llvm.hexagon.V6.vnavgw - hexagon_V6_vnavgw_128B, // llvm.hexagon.V6.vnavgw.128B - hexagon_V6_vnormamth, // llvm.hexagon.V6.vnormamth - hexagon_V6_vnormamth_128B, // llvm.hexagon.V6.vnormamth.128B - hexagon_V6_vnormamtw, // llvm.hexagon.V6.vnormamtw - hexagon_V6_vnormamtw_128B, // llvm.hexagon.V6.vnormamtw.128B - hexagon_V6_vnot, // llvm.hexagon.V6.vnot - hexagon_V6_vnot_128B, // llvm.hexagon.V6.vnot.128B - hexagon_V6_vor, // llvm.hexagon.V6.vor - hexagon_V6_vor_128B, // llvm.hexagon.V6.vor.128B - hexagon_V6_vpackeb, // llvm.hexagon.V6.vpackeb - hexagon_V6_vpackeb_128B, // llvm.hexagon.V6.vpackeb.128B - hexagon_V6_vpackeh, // llvm.hexagon.V6.vpackeh - hexagon_V6_vpackeh_128B, // llvm.hexagon.V6.vpackeh.128B - hexagon_V6_vpackhb_sat, // llvm.hexagon.V6.vpackhb.sat - hexagon_V6_vpackhb_sat_128B, // llvm.hexagon.V6.vpackhb.sat.128B - hexagon_V6_vpackhub_sat, // llvm.hexagon.V6.vpackhub.sat - hexagon_V6_vpackhub_sat_128B, // llvm.hexagon.V6.vpackhub.sat.128B - hexagon_V6_vpackob, // llvm.hexagon.V6.vpackob - hexagon_V6_vpackob_128B, // llvm.hexagon.V6.vpackob.128B - hexagon_V6_vpackoh, // llvm.hexagon.V6.vpackoh - hexagon_V6_vpackoh_128B, // llvm.hexagon.V6.vpackoh.128B - hexagon_V6_vpackwh_sat, // llvm.hexagon.V6.vpackwh.sat - hexagon_V6_vpackwh_sat_128B, // llvm.hexagon.V6.vpackwh.sat.128B - hexagon_V6_vpackwuh_sat, // llvm.hexagon.V6.vpackwuh.sat - hexagon_V6_vpackwuh_sat_128B, // llvm.hexagon.V6.vpackwuh.sat.128B - hexagon_V6_vpopcounth, // llvm.hexagon.V6.vpopcounth - hexagon_V6_vpopcounth_128B, // llvm.hexagon.V6.vpopcounth.128B - hexagon_V6_vrdelta, // llvm.hexagon.V6.vrdelta - hexagon_V6_vrdelta_128B, // llvm.hexagon.V6.vrdelta.128B - hexagon_V6_vrmpybus, // llvm.hexagon.V6.vrmpybus - hexagon_V6_vrmpybus_128B, // llvm.hexagon.V6.vrmpybus.128B - hexagon_V6_vrmpybus_acc, // llvm.hexagon.V6.vrmpybus.acc - hexagon_V6_vrmpybus_acc_128B, // llvm.hexagon.V6.vrmpybus.acc.128B - hexagon_V6_vrmpybusi, // llvm.hexagon.V6.vrmpybusi - hexagon_V6_vrmpybusi_128B, // llvm.hexagon.V6.vrmpybusi.128B - hexagon_V6_vrmpybusi_acc, // llvm.hexagon.V6.vrmpybusi.acc - hexagon_V6_vrmpybusi_acc_128B, // llvm.hexagon.V6.vrmpybusi.acc.128B - hexagon_V6_vrmpybusv, // llvm.hexagon.V6.vrmpybusv - hexagon_V6_vrmpybusv_128B, // llvm.hexagon.V6.vrmpybusv.128B - hexagon_V6_vrmpybusv_acc, // llvm.hexagon.V6.vrmpybusv.acc - hexagon_V6_vrmpybusv_acc_128B, // llvm.hexagon.V6.vrmpybusv.acc.128B - hexagon_V6_vrmpybv, // llvm.hexagon.V6.vrmpybv - hexagon_V6_vrmpybv_128B, // llvm.hexagon.V6.vrmpybv.128B - hexagon_V6_vrmpybv_acc, // llvm.hexagon.V6.vrmpybv.acc - hexagon_V6_vrmpybv_acc_128B, // llvm.hexagon.V6.vrmpybv.acc.128B - hexagon_V6_vrmpyub, // llvm.hexagon.V6.vrmpyub - hexagon_V6_vrmpyub_128B, // llvm.hexagon.V6.vrmpyub.128B - hexagon_V6_vrmpyub_acc, // llvm.hexagon.V6.vrmpyub.acc - hexagon_V6_vrmpyub_acc_128B, // llvm.hexagon.V6.vrmpyub.acc.128B - hexagon_V6_vrmpyubi, // llvm.hexagon.V6.vrmpyubi - hexagon_V6_vrmpyubi_128B, // llvm.hexagon.V6.vrmpyubi.128B - hexagon_V6_vrmpyubi_acc, // llvm.hexagon.V6.vrmpyubi.acc - hexagon_V6_vrmpyubi_acc_128B, // llvm.hexagon.V6.vrmpyubi.acc.128B - hexagon_V6_vrmpyubv, // llvm.hexagon.V6.vrmpyubv - hexagon_V6_vrmpyubv_128B, // llvm.hexagon.V6.vrmpyubv.128B - hexagon_V6_vrmpyubv_acc, // llvm.hexagon.V6.vrmpyubv.acc - hexagon_V6_vrmpyubv_acc_128B, // llvm.hexagon.V6.vrmpyubv.acc.128B - hexagon_V6_vror, // llvm.hexagon.V6.vror - hexagon_V6_vror_128B, // llvm.hexagon.V6.vror.128B - hexagon_V6_vroundhb, // llvm.hexagon.V6.vroundhb - hexagon_V6_vroundhb_128B, // llvm.hexagon.V6.vroundhb.128B - hexagon_V6_vroundhub, // llvm.hexagon.V6.vroundhub - hexagon_V6_vroundhub_128B, // llvm.hexagon.V6.vroundhub.128B - hexagon_V6_vroundwh, // llvm.hexagon.V6.vroundwh - hexagon_V6_vroundwh_128B, // llvm.hexagon.V6.vroundwh.128B - hexagon_V6_vroundwuh, // llvm.hexagon.V6.vroundwuh - hexagon_V6_vroundwuh_128B, // llvm.hexagon.V6.vroundwuh.128B - hexagon_V6_vrsadubi, // llvm.hexagon.V6.vrsadubi - hexagon_V6_vrsadubi_128B, // llvm.hexagon.V6.vrsadubi.128B - hexagon_V6_vrsadubi_acc, // llvm.hexagon.V6.vrsadubi.acc - hexagon_V6_vrsadubi_acc_128B, // llvm.hexagon.V6.vrsadubi.acc.128B - hexagon_V6_vsathub, // llvm.hexagon.V6.vsathub - hexagon_V6_vsathub_128B, // llvm.hexagon.V6.vsathub.128B - hexagon_V6_vsatwh, // llvm.hexagon.V6.vsatwh - hexagon_V6_vsatwh_128B, // llvm.hexagon.V6.vsatwh.128B - hexagon_V6_vsb, // llvm.hexagon.V6.vsb - hexagon_V6_vsb_128B, // llvm.hexagon.V6.vsb.128B - hexagon_V6_vsh, // llvm.hexagon.V6.vsh - hexagon_V6_vsh_128B, // llvm.hexagon.V6.vsh.128B - hexagon_V6_vshufeh, // llvm.hexagon.V6.vshufeh - hexagon_V6_vshufeh_128B, // llvm.hexagon.V6.vshufeh.128B - hexagon_V6_vshuffb, // llvm.hexagon.V6.vshuffb - hexagon_V6_vshuffb_128B, // llvm.hexagon.V6.vshuffb.128B - hexagon_V6_vshuffeb, // llvm.hexagon.V6.vshuffeb - hexagon_V6_vshuffeb_128B, // llvm.hexagon.V6.vshuffeb.128B - hexagon_V6_vshuffh, // llvm.hexagon.V6.vshuffh - hexagon_V6_vshuffh_128B, // llvm.hexagon.V6.vshuffh.128B - hexagon_V6_vshuffob, // llvm.hexagon.V6.vshuffob - hexagon_V6_vshuffob_128B, // llvm.hexagon.V6.vshuffob.128B - hexagon_V6_vshuffvdd, // llvm.hexagon.V6.vshuffvdd - hexagon_V6_vshuffvdd_128B, // llvm.hexagon.V6.vshuffvdd.128B - hexagon_V6_vshufoeb, // llvm.hexagon.V6.vshufoeb - hexagon_V6_vshufoeb_128B, // llvm.hexagon.V6.vshufoeb.128B - hexagon_V6_vshufoeh, // llvm.hexagon.V6.vshufoeh - hexagon_V6_vshufoeh_128B, // llvm.hexagon.V6.vshufoeh.128B - hexagon_V6_vshufoh, // llvm.hexagon.V6.vshufoh - hexagon_V6_vshufoh_128B, // llvm.hexagon.V6.vshufoh.128B - hexagon_V6_vsubb, // llvm.hexagon.V6.vsubb - hexagon_V6_vsubb_128B, // llvm.hexagon.V6.vsubb.128B - hexagon_V6_vsubb_dv, // llvm.hexagon.V6.vsubb.dv - hexagon_V6_vsubb_dv_128B, // llvm.hexagon.V6.vsubb.dv.128B - hexagon_V6_vsubbnq, // llvm.hexagon.V6.vsubbnq - hexagon_V6_vsubbnq_128B, // llvm.hexagon.V6.vsubbnq.128B - hexagon_V6_vsubbq, // llvm.hexagon.V6.vsubbq - hexagon_V6_vsubbq_128B, // llvm.hexagon.V6.vsubbq.128B - hexagon_V6_vsubh, // llvm.hexagon.V6.vsubh - hexagon_V6_vsubh_128B, // llvm.hexagon.V6.vsubh.128B - hexagon_V6_vsubh_dv, // llvm.hexagon.V6.vsubh.dv - hexagon_V6_vsubh_dv_128B, // llvm.hexagon.V6.vsubh.dv.128B - hexagon_V6_vsubhnq, // llvm.hexagon.V6.vsubhnq - hexagon_V6_vsubhnq_128B, // llvm.hexagon.V6.vsubhnq.128B - hexagon_V6_vsubhq, // llvm.hexagon.V6.vsubhq - hexagon_V6_vsubhq_128B, // llvm.hexagon.V6.vsubhq.128B - hexagon_V6_vsubhsat, // llvm.hexagon.V6.vsubhsat - hexagon_V6_vsubhsat_128B, // llvm.hexagon.V6.vsubhsat.128B - hexagon_V6_vsubhsat_dv, // llvm.hexagon.V6.vsubhsat.dv - hexagon_V6_vsubhsat_dv_128B, // llvm.hexagon.V6.vsubhsat.dv.128B - hexagon_V6_vsubhw, // llvm.hexagon.V6.vsubhw - hexagon_V6_vsubhw_128B, // llvm.hexagon.V6.vsubhw.128B - hexagon_V6_vsububh, // llvm.hexagon.V6.vsububh - hexagon_V6_vsububh_128B, // llvm.hexagon.V6.vsububh.128B - hexagon_V6_vsububsat, // llvm.hexagon.V6.vsububsat - hexagon_V6_vsububsat_128B, // llvm.hexagon.V6.vsububsat.128B - hexagon_V6_vsububsat_dv, // llvm.hexagon.V6.vsububsat.dv - hexagon_V6_vsububsat_dv_128B, // llvm.hexagon.V6.vsububsat.dv.128B - hexagon_V6_vsubuhsat, // llvm.hexagon.V6.vsubuhsat - hexagon_V6_vsubuhsat_128B, // llvm.hexagon.V6.vsubuhsat.128B - hexagon_V6_vsubuhsat_dv, // llvm.hexagon.V6.vsubuhsat.dv - hexagon_V6_vsubuhsat_dv_128B, // llvm.hexagon.V6.vsubuhsat.dv.128B - hexagon_V6_vsubuhw, // llvm.hexagon.V6.vsubuhw - hexagon_V6_vsubuhw_128B, // llvm.hexagon.V6.vsubuhw.128B - hexagon_V6_vsubw, // llvm.hexagon.V6.vsubw - hexagon_V6_vsubw_128B, // llvm.hexagon.V6.vsubw.128B - hexagon_V6_vsubw_dv, // llvm.hexagon.V6.vsubw.dv - hexagon_V6_vsubw_dv_128B, // llvm.hexagon.V6.vsubw.dv.128B - hexagon_V6_vsubwnq, // llvm.hexagon.V6.vsubwnq - hexagon_V6_vsubwnq_128B, // llvm.hexagon.V6.vsubwnq.128B - hexagon_V6_vsubwq, // llvm.hexagon.V6.vsubwq - hexagon_V6_vsubwq_128B, // llvm.hexagon.V6.vsubwq.128B - hexagon_V6_vsubwsat, // llvm.hexagon.V6.vsubwsat - hexagon_V6_vsubwsat_128B, // llvm.hexagon.V6.vsubwsat.128B - hexagon_V6_vsubwsat_dv, // llvm.hexagon.V6.vsubwsat.dv - hexagon_V6_vsubwsat_dv_128B, // llvm.hexagon.V6.vsubwsat.dv.128B - hexagon_V6_vswap, // llvm.hexagon.V6.vswap - hexagon_V6_vswap_128B, // llvm.hexagon.V6.vswap.128B - hexagon_V6_vtmpyb, // llvm.hexagon.V6.vtmpyb - hexagon_V6_vtmpyb_128B, // llvm.hexagon.V6.vtmpyb.128B - hexagon_V6_vtmpyb_acc, // llvm.hexagon.V6.vtmpyb.acc - hexagon_V6_vtmpyb_acc_128B, // llvm.hexagon.V6.vtmpyb.acc.128B - hexagon_V6_vtmpybus, // llvm.hexagon.V6.vtmpybus - hexagon_V6_vtmpybus_128B, // llvm.hexagon.V6.vtmpybus.128B - hexagon_V6_vtmpybus_acc, // llvm.hexagon.V6.vtmpybus.acc - hexagon_V6_vtmpybus_acc_128B, // llvm.hexagon.V6.vtmpybus.acc.128B - hexagon_V6_vtmpyhb, // llvm.hexagon.V6.vtmpyhb - hexagon_V6_vtmpyhb_128B, // llvm.hexagon.V6.vtmpyhb.128B - hexagon_V6_vtmpyhb_acc, // llvm.hexagon.V6.vtmpyhb.acc - hexagon_V6_vtmpyhb_acc_128B, // llvm.hexagon.V6.vtmpyhb.acc.128B - hexagon_V6_vunpackb, // llvm.hexagon.V6.vunpackb - hexagon_V6_vunpackb_128B, // llvm.hexagon.V6.vunpackb.128B - hexagon_V6_vunpackh, // llvm.hexagon.V6.vunpackh - hexagon_V6_vunpackh_128B, // llvm.hexagon.V6.vunpackh.128B - hexagon_V6_vunpackob, // llvm.hexagon.V6.vunpackob - hexagon_V6_vunpackob_128B, // llvm.hexagon.V6.vunpackob.128B - hexagon_V6_vunpackoh, // llvm.hexagon.V6.vunpackoh - hexagon_V6_vunpackoh_128B, // llvm.hexagon.V6.vunpackoh.128B - hexagon_V6_vunpackub, // llvm.hexagon.V6.vunpackub - hexagon_V6_vunpackub_128B, // llvm.hexagon.V6.vunpackub.128B - hexagon_V6_vunpackuh, // llvm.hexagon.V6.vunpackuh - hexagon_V6_vunpackuh_128B, // llvm.hexagon.V6.vunpackuh.128B - hexagon_V6_vxor, // llvm.hexagon.V6.vxor - hexagon_V6_vxor_128B, // llvm.hexagon.V6.vxor.128B - hexagon_V6_vzb, // llvm.hexagon.V6.vzb - hexagon_V6_vzb_128B, // llvm.hexagon.V6.vzb.128B - hexagon_V6_vzh, // llvm.hexagon.V6.vzh - hexagon_V6_vzh_128B, // llvm.hexagon.V6.vzh.128B - hexagon_brev_ldb, // llvm.hexagon.brev.ldb - hexagon_brev_ldd, // llvm.hexagon.brev.ldd - hexagon_brev_ldh, // llvm.hexagon.brev.ldh - hexagon_brev_ldub, // llvm.hexagon.brev.ldub - hexagon_brev_lduh, // llvm.hexagon.brev.lduh - hexagon_brev_ldw, // llvm.hexagon.brev.ldw - hexagon_brev_stb, // llvm.hexagon.brev.stb - hexagon_brev_std, // llvm.hexagon.brev.std - hexagon_brev_sth, // llvm.hexagon.brev.sth - hexagon_brev_sthhi, // llvm.hexagon.brev.sthhi - hexagon_brev_stw, // llvm.hexagon.brev.stw - hexagon_circ_ldb, // llvm.hexagon.circ.ldb - hexagon_circ_ldd, // llvm.hexagon.circ.ldd - hexagon_circ_ldh, // llvm.hexagon.circ.ldh - hexagon_circ_ldub, // llvm.hexagon.circ.ldub - hexagon_circ_lduh, // llvm.hexagon.circ.lduh - hexagon_circ_ldw, // llvm.hexagon.circ.ldw - hexagon_circ_stb, // llvm.hexagon.circ.stb - hexagon_circ_std, // llvm.hexagon.circ.std - hexagon_circ_sth, // llvm.hexagon.circ.sth - hexagon_circ_sthhi, // llvm.hexagon.circ.sthhi - hexagon_circ_stw, // llvm.hexagon.circ.stw - hexagon_mm256i_vaddw, // llvm.hexagon.mm256i.vaddw - hexagon_prefetch, // llvm.hexagon.prefetch - mips_absq_s_ph, // llvm.mips.absq.s.ph - mips_absq_s_qb, // llvm.mips.absq.s.qb - mips_absq_s_w, // llvm.mips.absq.s.w - mips_add_a_b, // llvm.mips.add.a.b - mips_add_a_d, // llvm.mips.add.a.d - mips_add_a_h, // llvm.mips.add.a.h - mips_add_a_w, // llvm.mips.add.a.w - mips_addq_ph, // llvm.mips.addq.ph - mips_addq_s_ph, // llvm.mips.addq.s.ph - mips_addq_s_w, // llvm.mips.addq.s.w - mips_addqh_ph, // llvm.mips.addqh.ph - mips_addqh_r_ph, // llvm.mips.addqh.r.ph - mips_addqh_r_w, // llvm.mips.addqh.r.w - mips_addqh_w, // llvm.mips.addqh.w - mips_adds_a_b, // llvm.mips.adds.a.b - mips_adds_a_d, // llvm.mips.adds.a.d - mips_adds_a_h, // llvm.mips.adds.a.h - mips_adds_a_w, // llvm.mips.adds.a.w - mips_adds_s_b, // llvm.mips.adds.s.b - mips_adds_s_d, // llvm.mips.adds.s.d - mips_adds_s_h, // llvm.mips.adds.s.h - mips_adds_s_w, // llvm.mips.adds.s.w - mips_adds_u_b, // llvm.mips.adds.u.b - mips_adds_u_d, // llvm.mips.adds.u.d - mips_adds_u_h, // llvm.mips.adds.u.h - mips_adds_u_w, // llvm.mips.adds.u.w - mips_addsc, // llvm.mips.addsc - mips_addu_ph, // llvm.mips.addu.ph - mips_addu_qb, // llvm.mips.addu.qb - mips_addu_s_ph, // llvm.mips.addu.s.ph - mips_addu_s_qb, // llvm.mips.addu.s.qb - mips_adduh_qb, // llvm.mips.adduh.qb - mips_adduh_r_qb, // llvm.mips.adduh.r.qb - mips_addv_b, // llvm.mips.addv.b - mips_addv_d, // llvm.mips.addv.d - mips_addv_h, // llvm.mips.addv.h - mips_addv_w, // llvm.mips.addv.w - mips_addvi_b, // llvm.mips.addvi.b - mips_addvi_d, // llvm.mips.addvi.d - mips_addvi_h, // llvm.mips.addvi.h - mips_addvi_w, // llvm.mips.addvi.w - mips_addwc, // llvm.mips.addwc - mips_and_v, // llvm.mips.and.v - mips_andi_b, // llvm.mips.andi.b - mips_append, // llvm.mips.append - mips_asub_s_b, // llvm.mips.asub.s.b - mips_asub_s_d, // llvm.mips.asub.s.d - mips_asub_s_h, // llvm.mips.asub.s.h - mips_asub_s_w, // llvm.mips.asub.s.w - mips_asub_u_b, // llvm.mips.asub.u.b - mips_asub_u_d, // llvm.mips.asub.u.d - mips_asub_u_h, // llvm.mips.asub.u.h - mips_asub_u_w, // llvm.mips.asub.u.w - mips_ave_s_b, // llvm.mips.ave.s.b - mips_ave_s_d, // llvm.mips.ave.s.d - mips_ave_s_h, // llvm.mips.ave.s.h - mips_ave_s_w, // llvm.mips.ave.s.w - mips_ave_u_b, // llvm.mips.ave.u.b - mips_ave_u_d, // llvm.mips.ave.u.d - mips_ave_u_h, // llvm.mips.ave.u.h - mips_ave_u_w, // llvm.mips.ave.u.w - mips_aver_s_b, // llvm.mips.aver.s.b - mips_aver_s_d, // llvm.mips.aver.s.d - mips_aver_s_h, // llvm.mips.aver.s.h - mips_aver_s_w, // llvm.mips.aver.s.w - mips_aver_u_b, // llvm.mips.aver.u.b - mips_aver_u_d, // llvm.mips.aver.u.d - mips_aver_u_h, // llvm.mips.aver.u.h - mips_aver_u_w, // llvm.mips.aver.u.w - mips_balign, // llvm.mips.balign - mips_bclr_b, // llvm.mips.bclr.b - mips_bclr_d, // llvm.mips.bclr.d - mips_bclr_h, // llvm.mips.bclr.h - mips_bclr_w, // llvm.mips.bclr.w - mips_bclri_b, // llvm.mips.bclri.b - mips_bclri_d, // llvm.mips.bclri.d - mips_bclri_h, // llvm.mips.bclri.h - mips_bclri_w, // llvm.mips.bclri.w - mips_binsl_b, // llvm.mips.binsl.b - mips_binsl_d, // llvm.mips.binsl.d - mips_binsl_h, // llvm.mips.binsl.h - mips_binsl_w, // llvm.mips.binsl.w - mips_binsli_b, // llvm.mips.binsli.b - mips_binsli_d, // llvm.mips.binsli.d - mips_binsli_h, // llvm.mips.binsli.h - mips_binsli_w, // llvm.mips.binsli.w - mips_binsr_b, // llvm.mips.binsr.b - mips_binsr_d, // llvm.mips.binsr.d - mips_binsr_h, // llvm.mips.binsr.h - mips_binsr_w, // llvm.mips.binsr.w - mips_binsri_b, // llvm.mips.binsri.b - mips_binsri_d, // llvm.mips.binsri.d - mips_binsri_h, // llvm.mips.binsri.h - mips_binsri_w, // llvm.mips.binsri.w - mips_bitrev, // llvm.mips.bitrev - mips_bmnz_v, // llvm.mips.bmnz.v - mips_bmnzi_b, // llvm.mips.bmnzi.b - mips_bmz_v, // llvm.mips.bmz.v - mips_bmzi_b, // llvm.mips.bmzi.b - mips_bneg_b, // llvm.mips.bneg.b - mips_bneg_d, // llvm.mips.bneg.d - mips_bneg_h, // llvm.mips.bneg.h - mips_bneg_w, // llvm.mips.bneg.w - mips_bnegi_b, // llvm.mips.bnegi.b - mips_bnegi_d, // llvm.mips.bnegi.d - mips_bnegi_h, // llvm.mips.bnegi.h - mips_bnegi_w, // llvm.mips.bnegi.w - mips_bnz_b, // llvm.mips.bnz.b - mips_bnz_d, // llvm.mips.bnz.d - mips_bnz_h, // llvm.mips.bnz.h - mips_bnz_v, // llvm.mips.bnz.v - mips_bnz_w, // llvm.mips.bnz.w - mips_bposge32, // llvm.mips.bposge32 - mips_bsel_v, // llvm.mips.bsel.v - mips_bseli_b, // llvm.mips.bseli.b - mips_bset_b, // llvm.mips.bset.b - mips_bset_d, // llvm.mips.bset.d - mips_bset_h, // llvm.mips.bset.h - mips_bset_w, // llvm.mips.bset.w - mips_bseti_b, // llvm.mips.bseti.b - mips_bseti_d, // llvm.mips.bseti.d - mips_bseti_h, // llvm.mips.bseti.h - mips_bseti_w, // llvm.mips.bseti.w - mips_bz_b, // llvm.mips.bz.b - mips_bz_d, // llvm.mips.bz.d - mips_bz_h, // llvm.mips.bz.h - mips_bz_v, // llvm.mips.bz.v - mips_bz_w, // llvm.mips.bz.w - mips_ceq_b, // llvm.mips.ceq.b - mips_ceq_d, // llvm.mips.ceq.d - mips_ceq_h, // llvm.mips.ceq.h - mips_ceq_w, // llvm.mips.ceq.w - mips_ceqi_b, // llvm.mips.ceqi.b - mips_ceqi_d, // llvm.mips.ceqi.d - mips_ceqi_h, // llvm.mips.ceqi.h - mips_ceqi_w, // llvm.mips.ceqi.w - mips_cfcmsa, // llvm.mips.cfcmsa - mips_cle_s_b, // llvm.mips.cle.s.b - mips_cle_s_d, // llvm.mips.cle.s.d - mips_cle_s_h, // llvm.mips.cle.s.h - mips_cle_s_w, // llvm.mips.cle.s.w - mips_cle_u_b, // llvm.mips.cle.u.b - mips_cle_u_d, // llvm.mips.cle.u.d - mips_cle_u_h, // llvm.mips.cle.u.h - mips_cle_u_w, // llvm.mips.cle.u.w - mips_clei_s_b, // llvm.mips.clei.s.b - mips_clei_s_d, // llvm.mips.clei.s.d - mips_clei_s_h, // llvm.mips.clei.s.h - mips_clei_s_w, // llvm.mips.clei.s.w - mips_clei_u_b, // llvm.mips.clei.u.b - mips_clei_u_d, // llvm.mips.clei.u.d - mips_clei_u_h, // llvm.mips.clei.u.h - mips_clei_u_w, // llvm.mips.clei.u.w - mips_clt_s_b, // llvm.mips.clt.s.b - mips_clt_s_d, // llvm.mips.clt.s.d - mips_clt_s_h, // llvm.mips.clt.s.h - mips_clt_s_w, // llvm.mips.clt.s.w - mips_clt_u_b, // llvm.mips.clt.u.b - mips_clt_u_d, // llvm.mips.clt.u.d - mips_clt_u_h, // llvm.mips.clt.u.h - mips_clt_u_w, // llvm.mips.clt.u.w - mips_clti_s_b, // llvm.mips.clti.s.b - mips_clti_s_d, // llvm.mips.clti.s.d - mips_clti_s_h, // llvm.mips.clti.s.h - mips_clti_s_w, // llvm.mips.clti.s.w - mips_clti_u_b, // llvm.mips.clti.u.b - mips_clti_u_d, // llvm.mips.clti.u.d - mips_clti_u_h, // llvm.mips.clti.u.h - mips_clti_u_w, // llvm.mips.clti.u.w - mips_cmp_eq_ph, // llvm.mips.cmp.eq.ph - mips_cmp_le_ph, // llvm.mips.cmp.le.ph - mips_cmp_lt_ph, // llvm.mips.cmp.lt.ph - mips_cmpgdu_eq_qb, // llvm.mips.cmpgdu.eq.qb - mips_cmpgdu_le_qb, // llvm.mips.cmpgdu.le.qb - mips_cmpgdu_lt_qb, // llvm.mips.cmpgdu.lt.qb - mips_cmpgu_eq_qb, // llvm.mips.cmpgu.eq.qb - mips_cmpgu_le_qb, // llvm.mips.cmpgu.le.qb - mips_cmpgu_lt_qb, // llvm.mips.cmpgu.lt.qb - mips_cmpu_eq_qb, // llvm.mips.cmpu.eq.qb - mips_cmpu_le_qb, // llvm.mips.cmpu.le.qb - mips_cmpu_lt_qb, // llvm.mips.cmpu.lt.qb - mips_copy_s_b, // llvm.mips.copy.s.b - mips_copy_s_d, // llvm.mips.copy.s.d - mips_copy_s_h, // llvm.mips.copy.s.h - mips_copy_s_w, // llvm.mips.copy.s.w - mips_copy_u_b, // llvm.mips.copy.u.b - mips_copy_u_d, // llvm.mips.copy.u.d - mips_copy_u_h, // llvm.mips.copy.u.h - mips_copy_u_w, // llvm.mips.copy.u.w - mips_ctcmsa, // llvm.mips.ctcmsa - mips_div_s_b, // llvm.mips.div.s.b - mips_div_s_d, // llvm.mips.div.s.d - mips_div_s_h, // llvm.mips.div.s.h - mips_div_s_w, // llvm.mips.div.s.w - mips_div_u_b, // llvm.mips.div.u.b - mips_div_u_d, // llvm.mips.div.u.d - mips_div_u_h, // llvm.mips.div.u.h - mips_div_u_w, // llvm.mips.div.u.w - mips_dlsa, // llvm.mips.dlsa - mips_dotp_s_d, // llvm.mips.dotp.s.d - mips_dotp_s_h, // llvm.mips.dotp.s.h - mips_dotp_s_w, // llvm.mips.dotp.s.w - mips_dotp_u_d, // llvm.mips.dotp.u.d - mips_dotp_u_h, // llvm.mips.dotp.u.h - mips_dotp_u_w, // llvm.mips.dotp.u.w - mips_dpa_w_ph, // llvm.mips.dpa.w.ph - mips_dpadd_s_d, // llvm.mips.dpadd.s.d - mips_dpadd_s_h, // llvm.mips.dpadd.s.h - mips_dpadd_s_w, // llvm.mips.dpadd.s.w - mips_dpadd_u_d, // llvm.mips.dpadd.u.d - mips_dpadd_u_h, // llvm.mips.dpadd.u.h - mips_dpadd_u_w, // llvm.mips.dpadd.u.w - mips_dpaq_s_w_ph, // llvm.mips.dpaq.s.w.ph - mips_dpaq_sa_l_w, // llvm.mips.dpaq.sa.l.w - mips_dpaqx_s_w_ph, // llvm.mips.dpaqx.s.w.ph - mips_dpaqx_sa_w_ph, // llvm.mips.dpaqx.sa.w.ph - mips_dpau_h_qbl, // llvm.mips.dpau.h.qbl - mips_dpau_h_qbr, // llvm.mips.dpau.h.qbr - mips_dpax_w_ph, // llvm.mips.dpax.w.ph - mips_dps_w_ph, // llvm.mips.dps.w.ph - mips_dpsq_s_w_ph, // llvm.mips.dpsq.s.w.ph - mips_dpsq_sa_l_w, // llvm.mips.dpsq.sa.l.w - mips_dpsqx_s_w_ph, // llvm.mips.dpsqx.s.w.ph - mips_dpsqx_sa_w_ph, // llvm.mips.dpsqx.sa.w.ph - mips_dpsu_h_qbl, // llvm.mips.dpsu.h.qbl - mips_dpsu_h_qbr, // llvm.mips.dpsu.h.qbr - mips_dpsub_s_d, // llvm.mips.dpsub.s.d - mips_dpsub_s_h, // llvm.mips.dpsub.s.h - mips_dpsub_s_w, // llvm.mips.dpsub.s.w - mips_dpsub_u_d, // llvm.mips.dpsub.u.d - mips_dpsub_u_h, // llvm.mips.dpsub.u.h - mips_dpsub_u_w, // llvm.mips.dpsub.u.w - mips_dpsx_w_ph, // llvm.mips.dpsx.w.ph - mips_extp, // llvm.mips.extp - mips_extpdp, // llvm.mips.extpdp - mips_extr_r_w, // llvm.mips.extr.r.w - mips_extr_rs_w, // llvm.mips.extr.rs.w - mips_extr_s_h, // llvm.mips.extr.s.h - mips_extr_w, // llvm.mips.extr.w - mips_fadd_d, // llvm.mips.fadd.d - mips_fadd_w, // llvm.mips.fadd.w - mips_fcaf_d, // llvm.mips.fcaf.d - mips_fcaf_w, // llvm.mips.fcaf.w - mips_fceq_d, // llvm.mips.fceq.d - mips_fceq_w, // llvm.mips.fceq.w - mips_fclass_d, // llvm.mips.fclass.d - mips_fclass_w, // llvm.mips.fclass.w - mips_fcle_d, // llvm.mips.fcle.d - mips_fcle_w, // llvm.mips.fcle.w - mips_fclt_d, // llvm.mips.fclt.d - mips_fclt_w, // llvm.mips.fclt.w - mips_fcne_d, // llvm.mips.fcne.d - mips_fcne_w, // llvm.mips.fcne.w - mips_fcor_d, // llvm.mips.fcor.d - mips_fcor_w, // llvm.mips.fcor.w - mips_fcueq_d, // llvm.mips.fcueq.d - mips_fcueq_w, // llvm.mips.fcueq.w - mips_fcule_d, // llvm.mips.fcule.d - mips_fcule_w, // llvm.mips.fcule.w - mips_fcult_d, // llvm.mips.fcult.d - mips_fcult_w, // llvm.mips.fcult.w - mips_fcun_d, // llvm.mips.fcun.d - mips_fcun_w, // llvm.mips.fcun.w - mips_fcune_d, // llvm.mips.fcune.d - mips_fcune_w, // llvm.mips.fcune.w - mips_fdiv_d, // llvm.mips.fdiv.d - mips_fdiv_w, // llvm.mips.fdiv.w - mips_fexdo_h, // llvm.mips.fexdo.h - mips_fexdo_w, // llvm.mips.fexdo.w - mips_fexp2_d, // llvm.mips.fexp2.d - mips_fexp2_w, // llvm.mips.fexp2.w - mips_fexupl_d, // llvm.mips.fexupl.d - mips_fexupl_w, // llvm.mips.fexupl.w - mips_fexupr_d, // llvm.mips.fexupr.d - mips_fexupr_w, // llvm.mips.fexupr.w - mips_ffint_s_d, // llvm.mips.ffint.s.d - mips_ffint_s_w, // llvm.mips.ffint.s.w - mips_ffint_u_d, // llvm.mips.ffint.u.d - mips_ffint_u_w, // llvm.mips.ffint.u.w - mips_ffql_d, // llvm.mips.ffql.d - mips_ffql_w, // llvm.mips.ffql.w - mips_ffqr_d, // llvm.mips.ffqr.d - mips_ffqr_w, // llvm.mips.ffqr.w - mips_fill_b, // llvm.mips.fill.b - mips_fill_d, // llvm.mips.fill.d - mips_fill_h, // llvm.mips.fill.h - mips_fill_w, // llvm.mips.fill.w - mips_flog2_d, // llvm.mips.flog2.d - mips_flog2_w, // llvm.mips.flog2.w - mips_fmadd_d, // llvm.mips.fmadd.d - mips_fmadd_w, // llvm.mips.fmadd.w - mips_fmax_a_d, // llvm.mips.fmax.a.d - mips_fmax_a_w, // llvm.mips.fmax.a.w - mips_fmax_d, // llvm.mips.fmax.d - mips_fmax_w, // llvm.mips.fmax.w - mips_fmin_a_d, // llvm.mips.fmin.a.d - mips_fmin_a_w, // llvm.mips.fmin.a.w - mips_fmin_d, // llvm.mips.fmin.d - mips_fmin_w, // llvm.mips.fmin.w - mips_fmsub_d, // llvm.mips.fmsub.d - mips_fmsub_w, // llvm.mips.fmsub.w - mips_fmul_d, // llvm.mips.fmul.d - mips_fmul_w, // llvm.mips.fmul.w - mips_frcp_d, // llvm.mips.frcp.d - mips_frcp_w, // llvm.mips.frcp.w - mips_frint_d, // llvm.mips.frint.d - mips_frint_w, // llvm.mips.frint.w - mips_frsqrt_d, // llvm.mips.frsqrt.d - mips_frsqrt_w, // llvm.mips.frsqrt.w - mips_fsaf_d, // llvm.mips.fsaf.d - mips_fsaf_w, // llvm.mips.fsaf.w - mips_fseq_d, // llvm.mips.fseq.d - mips_fseq_w, // llvm.mips.fseq.w - mips_fsle_d, // llvm.mips.fsle.d - mips_fsle_w, // llvm.mips.fsle.w - mips_fslt_d, // llvm.mips.fslt.d - mips_fslt_w, // llvm.mips.fslt.w - mips_fsne_d, // llvm.mips.fsne.d - mips_fsne_w, // llvm.mips.fsne.w - mips_fsor_d, // llvm.mips.fsor.d - mips_fsor_w, // llvm.mips.fsor.w - mips_fsqrt_d, // llvm.mips.fsqrt.d - mips_fsqrt_w, // llvm.mips.fsqrt.w - mips_fsub_d, // llvm.mips.fsub.d - mips_fsub_w, // llvm.mips.fsub.w - mips_fsueq_d, // llvm.mips.fsueq.d - mips_fsueq_w, // llvm.mips.fsueq.w - mips_fsule_d, // llvm.mips.fsule.d - mips_fsule_w, // llvm.mips.fsule.w - mips_fsult_d, // llvm.mips.fsult.d - mips_fsult_w, // llvm.mips.fsult.w - mips_fsun_d, // llvm.mips.fsun.d - mips_fsun_w, // llvm.mips.fsun.w - mips_fsune_d, // llvm.mips.fsune.d - mips_fsune_w, // llvm.mips.fsune.w - mips_ftint_s_d, // llvm.mips.ftint.s.d - mips_ftint_s_w, // llvm.mips.ftint.s.w - mips_ftint_u_d, // llvm.mips.ftint.u.d - mips_ftint_u_w, // llvm.mips.ftint.u.w - mips_ftq_h, // llvm.mips.ftq.h - mips_ftq_w, // llvm.mips.ftq.w - mips_ftrunc_s_d, // llvm.mips.ftrunc.s.d - mips_ftrunc_s_w, // llvm.mips.ftrunc.s.w - mips_ftrunc_u_d, // llvm.mips.ftrunc.u.d - mips_ftrunc_u_w, // llvm.mips.ftrunc.u.w - mips_hadd_s_d, // llvm.mips.hadd.s.d - mips_hadd_s_h, // llvm.mips.hadd.s.h - mips_hadd_s_w, // llvm.mips.hadd.s.w - mips_hadd_u_d, // llvm.mips.hadd.u.d - mips_hadd_u_h, // llvm.mips.hadd.u.h - mips_hadd_u_w, // llvm.mips.hadd.u.w - mips_hsub_s_d, // llvm.mips.hsub.s.d - mips_hsub_s_h, // llvm.mips.hsub.s.h - mips_hsub_s_w, // llvm.mips.hsub.s.w - mips_hsub_u_d, // llvm.mips.hsub.u.d - mips_hsub_u_h, // llvm.mips.hsub.u.h - mips_hsub_u_w, // llvm.mips.hsub.u.w - mips_ilvev_b, // llvm.mips.ilvev.b - mips_ilvev_d, // llvm.mips.ilvev.d - mips_ilvev_h, // llvm.mips.ilvev.h - mips_ilvev_w, // llvm.mips.ilvev.w - mips_ilvl_b, // llvm.mips.ilvl.b - mips_ilvl_d, // llvm.mips.ilvl.d - mips_ilvl_h, // llvm.mips.ilvl.h - mips_ilvl_w, // llvm.mips.ilvl.w - mips_ilvod_b, // llvm.mips.ilvod.b - mips_ilvod_d, // llvm.mips.ilvod.d - mips_ilvod_h, // llvm.mips.ilvod.h - mips_ilvod_w, // llvm.mips.ilvod.w - mips_ilvr_b, // llvm.mips.ilvr.b - mips_ilvr_d, // llvm.mips.ilvr.d - mips_ilvr_h, // llvm.mips.ilvr.h - mips_ilvr_w, // llvm.mips.ilvr.w - mips_insert_b, // llvm.mips.insert.b - mips_insert_d, // llvm.mips.insert.d - mips_insert_h, // llvm.mips.insert.h - mips_insert_w, // llvm.mips.insert.w - mips_insv, // llvm.mips.insv - mips_insve_b, // llvm.mips.insve.b - mips_insve_d, // llvm.mips.insve.d - mips_insve_h, // llvm.mips.insve.h - mips_insve_w, // llvm.mips.insve.w - mips_lbux, // llvm.mips.lbux - mips_ld_b, // llvm.mips.ld.b - mips_ld_d, // llvm.mips.ld.d - mips_ld_h, // llvm.mips.ld.h - mips_ld_w, // llvm.mips.ld.w - mips_ldi_b, // llvm.mips.ldi.b - mips_ldi_d, // llvm.mips.ldi.d - mips_ldi_h, // llvm.mips.ldi.h - mips_ldi_w, // llvm.mips.ldi.w - mips_lhx, // llvm.mips.lhx - mips_lsa, // llvm.mips.lsa - mips_lwx, // llvm.mips.lwx - mips_madd, // llvm.mips.madd - mips_madd_q_h, // llvm.mips.madd.q.h - mips_madd_q_w, // llvm.mips.madd.q.w - mips_maddr_q_h, // llvm.mips.maddr.q.h - mips_maddr_q_w, // llvm.mips.maddr.q.w - mips_maddu, // llvm.mips.maddu - mips_maddv_b, // llvm.mips.maddv.b - mips_maddv_d, // llvm.mips.maddv.d - mips_maddv_h, // llvm.mips.maddv.h - mips_maddv_w, // llvm.mips.maddv.w - mips_maq_s_w_phl, // llvm.mips.maq.s.w.phl - mips_maq_s_w_phr, // llvm.mips.maq.s.w.phr - mips_maq_sa_w_phl, // llvm.mips.maq.sa.w.phl - mips_maq_sa_w_phr, // llvm.mips.maq.sa.w.phr - mips_max_a_b, // llvm.mips.max.a.b - mips_max_a_d, // llvm.mips.max.a.d - mips_max_a_h, // llvm.mips.max.a.h - mips_max_a_w, // llvm.mips.max.a.w - mips_max_s_b, // llvm.mips.max.s.b - mips_max_s_d, // llvm.mips.max.s.d - mips_max_s_h, // llvm.mips.max.s.h - mips_max_s_w, // llvm.mips.max.s.w - mips_max_u_b, // llvm.mips.max.u.b - mips_max_u_d, // llvm.mips.max.u.d - mips_max_u_h, // llvm.mips.max.u.h - mips_max_u_w, // llvm.mips.max.u.w - mips_maxi_s_b, // llvm.mips.maxi.s.b - mips_maxi_s_d, // llvm.mips.maxi.s.d - mips_maxi_s_h, // llvm.mips.maxi.s.h - mips_maxi_s_w, // llvm.mips.maxi.s.w - mips_maxi_u_b, // llvm.mips.maxi.u.b - mips_maxi_u_d, // llvm.mips.maxi.u.d - mips_maxi_u_h, // llvm.mips.maxi.u.h - mips_maxi_u_w, // llvm.mips.maxi.u.w - mips_min_a_b, // llvm.mips.min.a.b - mips_min_a_d, // llvm.mips.min.a.d - mips_min_a_h, // llvm.mips.min.a.h - mips_min_a_w, // llvm.mips.min.a.w - mips_min_s_b, // llvm.mips.min.s.b - mips_min_s_d, // llvm.mips.min.s.d - mips_min_s_h, // llvm.mips.min.s.h - mips_min_s_w, // llvm.mips.min.s.w - mips_min_u_b, // llvm.mips.min.u.b - mips_min_u_d, // llvm.mips.min.u.d - mips_min_u_h, // llvm.mips.min.u.h - mips_min_u_w, // llvm.mips.min.u.w - mips_mini_s_b, // llvm.mips.mini.s.b - mips_mini_s_d, // llvm.mips.mini.s.d - mips_mini_s_h, // llvm.mips.mini.s.h - mips_mini_s_w, // llvm.mips.mini.s.w - mips_mini_u_b, // llvm.mips.mini.u.b - mips_mini_u_d, // llvm.mips.mini.u.d - mips_mini_u_h, // llvm.mips.mini.u.h - mips_mini_u_w, // llvm.mips.mini.u.w - mips_mod_s_b, // llvm.mips.mod.s.b - mips_mod_s_d, // llvm.mips.mod.s.d - mips_mod_s_h, // llvm.mips.mod.s.h - mips_mod_s_w, // llvm.mips.mod.s.w - mips_mod_u_b, // llvm.mips.mod.u.b - mips_mod_u_d, // llvm.mips.mod.u.d - mips_mod_u_h, // llvm.mips.mod.u.h - mips_mod_u_w, // llvm.mips.mod.u.w - mips_modsub, // llvm.mips.modsub - mips_move_v, // llvm.mips.move.v - mips_msub, // llvm.mips.msub - mips_msub_q_h, // llvm.mips.msub.q.h - mips_msub_q_w, // llvm.mips.msub.q.w - mips_msubr_q_h, // llvm.mips.msubr.q.h - mips_msubr_q_w, // llvm.mips.msubr.q.w - mips_msubu, // llvm.mips.msubu - mips_msubv_b, // llvm.mips.msubv.b - mips_msubv_d, // llvm.mips.msubv.d - mips_msubv_h, // llvm.mips.msubv.h - mips_msubv_w, // llvm.mips.msubv.w - mips_mthlip, // llvm.mips.mthlip - mips_mul_ph, // llvm.mips.mul.ph - mips_mul_q_h, // llvm.mips.mul.q.h - mips_mul_q_w, // llvm.mips.mul.q.w - mips_mul_s_ph, // llvm.mips.mul.s.ph - mips_muleq_s_w_phl, // llvm.mips.muleq.s.w.phl - mips_muleq_s_w_phr, // llvm.mips.muleq.s.w.phr - mips_muleu_s_ph_qbl, // llvm.mips.muleu.s.ph.qbl - mips_muleu_s_ph_qbr, // llvm.mips.muleu.s.ph.qbr - mips_mulq_rs_ph, // llvm.mips.mulq.rs.ph - mips_mulq_rs_w, // llvm.mips.mulq.rs.w - mips_mulq_s_ph, // llvm.mips.mulq.s.ph - mips_mulq_s_w, // llvm.mips.mulq.s.w - mips_mulr_q_h, // llvm.mips.mulr.q.h - mips_mulr_q_w, // llvm.mips.mulr.q.w - mips_mulsa_w_ph, // llvm.mips.mulsa.w.ph - mips_mulsaq_s_w_ph, // llvm.mips.mulsaq.s.w.ph - mips_mult, // llvm.mips.mult - mips_multu, // llvm.mips.multu - mips_mulv_b, // llvm.mips.mulv.b - mips_mulv_d, // llvm.mips.mulv.d - mips_mulv_h, // llvm.mips.mulv.h - mips_mulv_w, // llvm.mips.mulv.w - mips_nloc_b, // llvm.mips.nloc.b - mips_nloc_d, // llvm.mips.nloc.d - mips_nloc_h, // llvm.mips.nloc.h - mips_nloc_w, // llvm.mips.nloc.w - mips_nlzc_b, // llvm.mips.nlzc.b - mips_nlzc_d, // llvm.mips.nlzc.d - mips_nlzc_h, // llvm.mips.nlzc.h - mips_nlzc_w, // llvm.mips.nlzc.w - mips_nor_v, // llvm.mips.nor.v - mips_nori_b, // llvm.mips.nori.b - mips_or_v, // llvm.mips.or.v - mips_ori_b, // llvm.mips.ori.b - mips_packrl_ph, // llvm.mips.packrl.ph - mips_pckev_b, // llvm.mips.pckev.b - mips_pckev_d, // llvm.mips.pckev.d - mips_pckev_h, // llvm.mips.pckev.h - mips_pckev_w, // llvm.mips.pckev.w - mips_pckod_b, // llvm.mips.pckod.b - mips_pckod_d, // llvm.mips.pckod.d - mips_pckod_h, // llvm.mips.pckod.h - mips_pckod_w, // llvm.mips.pckod.w - mips_pcnt_b, // llvm.mips.pcnt.b - mips_pcnt_d, // llvm.mips.pcnt.d - mips_pcnt_h, // llvm.mips.pcnt.h - mips_pcnt_w, // llvm.mips.pcnt.w - mips_pick_ph, // llvm.mips.pick.ph - mips_pick_qb, // llvm.mips.pick.qb - mips_preceq_w_phl, // llvm.mips.preceq.w.phl - mips_preceq_w_phr, // llvm.mips.preceq.w.phr - mips_precequ_ph_qbl, // llvm.mips.precequ.ph.qbl - mips_precequ_ph_qbla, // llvm.mips.precequ.ph.qbla - mips_precequ_ph_qbr, // llvm.mips.precequ.ph.qbr - mips_precequ_ph_qbra, // llvm.mips.precequ.ph.qbra - mips_preceu_ph_qbl, // llvm.mips.preceu.ph.qbl - mips_preceu_ph_qbla, // llvm.mips.preceu.ph.qbla - mips_preceu_ph_qbr, // llvm.mips.preceu.ph.qbr - mips_preceu_ph_qbra, // llvm.mips.preceu.ph.qbra - mips_precr_qb_ph, // llvm.mips.precr.qb.ph - mips_precr_sra_ph_w, // llvm.mips.precr.sra.ph.w - mips_precr_sra_r_ph_w, // llvm.mips.precr.sra.r.ph.w - mips_precrq_ph_w, // llvm.mips.precrq.ph.w - mips_precrq_qb_ph, // llvm.mips.precrq.qb.ph - mips_precrq_rs_ph_w, // llvm.mips.precrq.rs.ph.w - mips_precrqu_s_qb_ph, // llvm.mips.precrqu.s.qb.ph - mips_prepend, // llvm.mips.prepend - mips_raddu_w_qb, // llvm.mips.raddu.w.qb - mips_rddsp, // llvm.mips.rddsp - mips_repl_ph, // llvm.mips.repl.ph - mips_repl_qb, // llvm.mips.repl.qb - mips_sat_s_b, // llvm.mips.sat.s.b - mips_sat_s_d, // llvm.mips.sat.s.d - mips_sat_s_h, // llvm.mips.sat.s.h - mips_sat_s_w, // llvm.mips.sat.s.w - mips_sat_u_b, // llvm.mips.sat.u.b - mips_sat_u_d, // llvm.mips.sat.u.d - mips_sat_u_h, // llvm.mips.sat.u.h - mips_sat_u_w, // llvm.mips.sat.u.w - mips_shf_b, // llvm.mips.shf.b - mips_shf_h, // llvm.mips.shf.h - mips_shf_w, // llvm.mips.shf.w - mips_shilo, // llvm.mips.shilo - mips_shll_ph, // llvm.mips.shll.ph - mips_shll_qb, // llvm.mips.shll.qb - mips_shll_s_ph, // llvm.mips.shll.s.ph - mips_shll_s_w, // llvm.mips.shll.s.w - mips_shra_ph, // llvm.mips.shra.ph - mips_shra_qb, // llvm.mips.shra.qb - mips_shra_r_ph, // llvm.mips.shra.r.ph - mips_shra_r_qb, // llvm.mips.shra.r.qb - mips_shra_r_w, // llvm.mips.shra.r.w - mips_shrl_ph, // llvm.mips.shrl.ph - mips_shrl_qb, // llvm.mips.shrl.qb - mips_sld_b, // llvm.mips.sld.b - mips_sld_d, // llvm.mips.sld.d - mips_sld_h, // llvm.mips.sld.h - mips_sld_w, // llvm.mips.sld.w - mips_sldi_b, // llvm.mips.sldi.b - mips_sldi_d, // llvm.mips.sldi.d - mips_sldi_h, // llvm.mips.sldi.h - mips_sldi_w, // llvm.mips.sldi.w - mips_sll_b, // llvm.mips.sll.b - mips_sll_d, // llvm.mips.sll.d - mips_sll_h, // llvm.mips.sll.h - mips_sll_w, // llvm.mips.sll.w - mips_slli_b, // llvm.mips.slli.b - mips_slli_d, // llvm.mips.slli.d - mips_slli_h, // llvm.mips.slli.h - mips_slli_w, // llvm.mips.slli.w - mips_splat_b, // llvm.mips.splat.b - mips_splat_d, // llvm.mips.splat.d - mips_splat_h, // llvm.mips.splat.h - mips_splat_w, // llvm.mips.splat.w - mips_splati_b, // llvm.mips.splati.b - mips_splati_d, // llvm.mips.splati.d - mips_splati_h, // llvm.mips.splati.h - mips_splati_w, // llvm.mips.splati.w - mips_sra_b, // llvm.mips.sra.b - mips_sra_d, // llvm.mips.sra.d - mips_sra_h, // llvm.mips.sra.h - mips_sra_w, // llvm.mips.sra.w - mips_srai_b, // llvm.mips.srai.b - mips_srai_d, // llvm.mips.srai.d - mips_srai_h, // llvm.mips.srai.h - mips_srai_w, // llvm.mips.srai.w - mips_srar_b, // llvm.mips.srar.b - mips_srar_d, // llvm.mips.srar.d - mips_srar_h, // llvm.mips.srar.h - mips_srar_w, // llvm.mips.srar.w - mips_srari_b, // llvm.mips.srari.b - mips_srari_d, // llvm.mips.srari.d - mips_srari_h, // llvm.mips.srari.h - mips_srari_w, // llvm.mips.srari.w - mips_srl_b, // llvm.mips.srl.b - mips_srl_d, // llvm.mips.srl.d - mips_srl_h, // llvm.mips.srl.h - mips_srl_w, // llvm.mips.srl.w - mips_srli_b, // llvm.mips.srli.b - mips_srli_d, // llvm.mips.srli.d - mips_srli_h, // llvm.mips.srli.h - mips_srli_w, // llvm.mips.srli.w - mips_srlr_b, // llvm.mips.srlr.b - mips_srlr_d, // llvm.mips.srlr.d - mips_srlr_h, // llvm.mips.srlr.h - mips_srlr_w, // llvm.mips.srlr.w - mips_srlri_b, // llvm.mips.srlri.b - mips_srlri_d, // llvm.mips.srlri.d - mips_srlri_h, // llvm.mips.srlri.h - mips_srlri_w, // llvm.mips.srlri.w - mips_st_b, // llvm.mips.st.b - mips_st_d, // llvm.mips.st.d - mips_st_h, // llvm.mips.st.h - mips_st_w, // llvm.mips.st.w - mips_subq_ph, // llvm.mips.subq.ph - mips_subq_s_ph, // llvm.mips.subq.s.ph - mips_subq_s_w, // llvm.mips.subq.s.w - mips_subqh_ph, // llvm.mips.subqh.ph - mips_subqh_r_ph, // llvm.mips.subqh.r.ph - mips_subqh_r_w, // llvm.mips.subqh.r.w - mips_subqh_w, // llvm.mips.subqh.w - mips_subs_s_b, // llvm.mips.subs.s.b - mips_subs_s_d, // llvm.mips.subs.s.d - mips_subs_s_h, // llvm.mips.subs.s.h - mips_subs_s_w, // llvm.mips.subs.s.w - mips_subs_u_b, // llvm.mips.subs.u.b - mips_subs_u_d, // llvm.mips.subs.u.d - mips_subs_u_h, // llvm.mips.subs.u.h - mips_subs_u_w, // llvm.mips.subs.u.w - mips_subsus_u_b, // llvm.mips.subsus.u.b - mips_subsus_u_d, // llvm.mips.subsus.u.d - mips_subsus_u_h, // llvm.mips.subsus.u.h - mips_subsus_u_w, // llvm.mips.subsus.u.w - mips_subsuu_s_b, // llvm.mips.subsuu.s.b - mips_subsuu_s_d, // llvm.mips.subsuu.s.d - mips_subsuu_s_h, // llvm.mips.subsuu.s.h - mips_subsuu_s_w, // llvm.mips.subsuu.s.w - mips_subu_ph, // llvm.mips.subu.ph - mips_subu_qb, // llvm.mips.subu.qb - mips_subu_s_ph, // llvm.mips.subu.s.ph - mips_subu_s_qb, // llvm.mips.subu.s.qb - mips_subuh_qb, // llvm.mips.subuh.qb - mips_subuh_r_qb, // llvm.mips.subuh.r.qb - mips_subv_b, // llvm.mips.subv.b - mips_subv_d, // llvm.mips.subv.d - mips_subv_h, // llvm.mips.subv.h - mips_subv_w, // llvm.mips.subv.w - mips_subvi_b, // llvm.mips.subvi.b - mips_subvi_d, // llvm.mips.subvi.d - mips_subvi_h, // llvm.mips.subvi.h - mips_subvi_w, // llvm.mips.subvi.w - mips_vshf_b, // llvm.mips.vshf.b - mips_vshf_d, // llvm.mips.vshf.d - mips_vshf_h, // llvm.mips.vshf.h - mips_vshf_w, // llvm.mips.vshf.w - mips_wrdsp, // llvm.mips.wrdsp - mips_xor_v, // llvm.mips.xor.v - mips_xori_b, // llvm.mips.xori.b - nvvm_abs_i, // llvm.nvvm.abs.i - nvvm_abs_ll, // llvm.nvvm.abs.ll - nvvm_add_rm_d, // llvm.nvvm.add.rm.d - nvvm_add_rm_f, // llvm.nvvm.add.rm.f - nvvm_add_rm_ftz_f, // llvm.nvvm.add.rm.ftz.f - nvvm_add_rn_d, // llvm.nvvm.add.rn.d - nvvm_add_rn_f, // llvm.nvvm.add.rn.f - nvvm_add_rn_ftz_f, // llvm.nvvm.add.rn.ftz.f - nvvm_add_rp_d, // llvm.nvvm.add.rp.d - nvvm_add_rp_f, // llvm.nvvm.add.rp.f - nvvm_add_rp_ftz_f, // llvm.nvvm.add.rp.ftz.f - nvvm_add_rz_d, // llvm.nvvm.add.rz.d - nvvm_add_rz_f, // llvm.nvvm.add.rz.f - nvvm_add_rz_ftz_f, // llvm.nvvm.add.rz.ftz.f - nvvm_atomic_load_add_f32, // llvm.nvvm.atomic.load.add.f32 - nvvm_atomic_load_dec_32, // llvm.nvvm.atomic.load.dec.32 - nvvm_atomic_load_inc_32, // llvm.nvvm.atomic.load.inc.32 - nvvm_bar_sync, // llvm.nvvm.bar.sync - nvvm_barrier0, // llvm.nvvm.barrier0 - nvvm_barrier0_and, // llvm.nvvm.barrier0.and - nvvm_barrier0_or, // llvm.nvvm.barrier0.or - nvvm_barrier0_popc, // llvm.nvvm.barrier0.popc - nvvm_bitcast_d2ll, // llvm.nvvm.bitcast.d2ll - nvvm_bitcast_f2i, // llvm.nvvm.bitcast.f2i - nvvm_bitcast_i2f, // llvm.nvvm.bitcast.i2f - nvvm_bitcast_ll2d, // llvm.nvvm.bitcast.ll2d - nvvm_brev32, // llvm.nvvm.brev32 - nvvm_brev64, // llvm.nvvm.brev64 - nvvm_ceil_d, // llvm.nvvm.ceil.d - nvvm_ceil_f, // llvm.nvvm.ceil.f - nvvm_ceil_ftz_f, // llvm.nvvm.ceil.ftz.f - nvvm_clz_i, // llvm.nvvm.clz.i - nvvm_clz_ll, // llvm.nvvm.clz.ll - nvvm_compiler_error, // llvm.nvvm.compiler.error - nvvm_compiler_warn, // llvm.nvvm.compiler.warn - nvvm_cos_approx_f, // llvm.nvvm.cos.approx.f - nvvm_cos_approx_ftz_f, // llvm.nvvm.cos.approx.ftz.f - nvvm_d2f_rm, // llvm.nvvm.d2f.rm - nvvm_d2f_rm_ftz, // llvm.nvvm.d2f.rm.ftz - nvvm_d2f_rn, // llvm.nvvm.d2f.rn - nvvm_d2f_rn_ftz, // llvm.nvvm.d2f.rn.ftz - nvvm_d2f_rp, // llvm.nvvm.d2f.rp - nvvm_d2f_rp_ftz, // llvm.nvvm.d2f.rp.ftz - nvvm_d2f_rz, // llvm.nvvm.d2f.rz - nvvm_d2f_rz_ftz, // llvm.nvvm.d2f.rz.ftz - nvvm_d2i_hi, // llvm.nvvm.d2i.hi - nvvm_d2i_lo, // llvm.nvvm.d2i.lo - nvvm_d2i_rm, // llvm.nvvm.d2i.rm - nvvm_d2i_rn, // llvm.nvvm.d2i.rn - nvvm_d2i_rp, // llvm.nvvm.d2i.rp - nvvm_d2i_rz, // llvm.nvvm.d2i.rz - nvvm_d2ll_rm, // llvm.nvvm.d2ll.rm - nvvm_d2ll_rn, // llvm.nvvm.d2ll.rn - nvvm_d2ll_rp, // llvm.nvvm.d2ll.rp - nvvm_d2ll_rz, // llvm.nvvm.d2ll.rz - nvvm_d2ui_rm, // llvm.nvvm.d2ui.rm - nvvm_d2ui_rn, // llvm.nvvm.d2ui.rn - nvvm_d2ui_rp, // llvm.nvvm.d2ui.rp - nvvm_d2ui_rz, // llvm.nvvm.d2ui.rz - nvvm_d2ull_rm, // llvm.nvvm.d2ull.rm - nvvm_d2ull_rn, // llvm.nvvm.d2ull.rn - nvvm_d2ull_rp, // llvm.nvvm.d2ull.rp - nvvm_d2ull_rz, // llvm.nvvm.d2ull.rz - nvvm_div_approx_f, // llvm.nvvm.div.approx.f - nvvm_div_approx_ftz_f, // llvm.nvvm.div.approx.ftz.f - nvvm_div_rm_d, // llvm.nvvm.div.rm.d - nvvm_div_rm_f, // llvm.nvvm.div.rm.f - nvvm_div_rm_ftz_f, // llvm.nvvm.div.rm.ftz.f - nvvm_div_rn_d, // llvm.nvvm.div.rn.d - nvvm_div_rn_f, // llvm.nvvm.div.rn.f - nvvm_div_rn_ftz_f, // llvm.nvvm.div.rn.ftz.f - nvvm_div_rp_d, // llvm.nvvm.div.rp.d - nvvm_div_rp_f, // llvm.nvvm.div.rp.f - nvvm_div_rp_ftz_f, // llvm.nvvm.div.rp.ftz.f - nvvm_div_rz_d, // llvm.nvvm.div.rz.d - nvvm_div_rz_f, // llvm.nvvm.div.rz.f - nvvm_div_rz_ftz_f, // llvm.nvvm.div.rz.ftz.f - nvvm_ex2_approx_d, // llvm.nvvm.ex2.approx.d - nvvm_ex2_approx_f, // llvm.nvvm.ex2.approx.f - nvvm_ex2_approx_ftz_f, // llvm.nvvm.ex2.approx.ftz.f - nvvm_f2h_rn, // llvm.nvvm.f2h.rn - nvvm_f2h_rn_ftz, // llvm.nvvm.f2h.rn.ftz - nvvm_f2i_rm, // llvm.nvvm.f2i.rm - nvvm_f2i_rm_ftz, // llvm.nvvm.f2i.rm.ftz - nvvm_f2i_rn, // llvm.nvvm.f2i.rn - nvvm_f2i_rn_ftz, // llvm.nvvm.f2i.rn.ftz - nvvm_f2i_rp, // llvm.nvvm.f2i.rp - nvvm_f2i_rp_ftz, // llvm.nvvm.f2i.rp.ftz - nvvm_f2i_rz, // llvm.nvvm.f2i.rz - nvvm_f2i_rz_ftz, // llvm.nvvm.f2i.rz.ftz - nvvm_f2ll_rm, // llvm.nvvm.f2ll.rm - nvvm_f2ll_rm_ftz, // llvm.nvvm.f2ll.rm.ftz - nvvm_f2ll_rn, // llvm.nvvm.f2ll.rn - nvvm_f2ll_rn_ftz, // llvm.nvvm.f2ll.rn.ftz - nvvm_f2ll_rp, // llvm.nvvm.f2ll.rp - nvvm_f2ll_rp_ftz, // llvm.nvvm.f2ll.rp.ftz - nvvm_f2ll_rz, // llvm.nvvm.f2ll.rz - nvvm_f2ll_rz_ftz, // llvm.nvvm.f2ll.rz.ftz - nvvm_f2ui_rm, // llvm.nvvm.f2ui.rm - nvvm_f2ui_rm_ftz, // llvm.nvvm.f2ui.rm.ftz - nvvm_f2ui_rn, // llvm.nvvm.f2ui.rn - nvvm_f2ui_rn_ftz, // llvm.nvvm.f2ui.rn.ftz - nvvm_f2ui_rp, // llvm.nvvm.f2ui.rp - nvvm_f2ui_rp_ftz, // llvm.nvvm.f2ui.rp.ftz - nvvm_f2ui_rz, // llvm.nvvm.f2ui.rz - nvvm_f2ui_rz_ftz, // llvm.nvvm.f2ui.rz.ftz - nvvm_f2ull_rm, // llvm.nvvm.f2ull.rm - nvvm_f2ull_rm_ftz, // llvm.nvvm.f2ull.rm.ftz - nvvm_f2ull_rn, // llvm.nvvm.f2ull.rn - nvvm_f2ull_rn_ftz, // llvm.nvvm.f2ull.rn.ftz - nvvm_f2ull_rp, // llvm.nvvm.f2ull.rp - nvvm_f2ull_rp_ftz, // llvm.nvvm.f2ull.rp.ftz - nvvm_f2ull_rz, // llvm.nvvm.f2ull.rz - nvvm_f2ull_rz_ftz, // llvm.nvvm.f2ull.rz.ftz - nvvm_fabs_d, // llvm.nvvm.fabs.d - nvvm_fabs_f, // llvm.nvvm.fabs.f - nvvm_fabs_ftz_f, // llvm.nvvm.fabs.ftz.f - nvvm_floor_d, // llvm.nvvm.floor.d - nvvm_floor_f, // llvm.nvvm.floor.f - nvvm_floor_ftz_f, // llvm.nvvm.floor.ftz.f - nvvm_fma_rm_d, // llvm.nvvm.fma.rm.d - nvvm_fma_rm_f, // llvm.nvvm.fma.rm.f - nvvm_fma_rm_ftz_f, // llvm.nvvm.fma.rm.ftz.f - nvvm_fma_rn_d, // llvm.nvvm.fma.rn.d - nvvm_fma_rn_f, // llvm.nvvm.fma.rn.f - nvvm_fma_rn_ftz_f, // llvm.nvvm.fma.rn.ftz.f - nvvm_fma_rp_d, // llvm.nvvm.fma.rp.d - nvvm_fma_rp_f, // llvm.nvvm.fma.rp.f - nvvm_fma_rp_ftz_f, // llvm.nvvm.fma.rp.ftz.f - nvvm_fma_rz_d, // llvm.nvvm.fma.rz.d - nvvm_fma_rz_f, // llvm.nvvm.fma.rz.f - nvvm_fma_rz_ftz_f, // llvm.nvvm.fma.rz.ftz.f - nvvm_fmax_d, // llvm.nvvm.fmax.d - nvvm_fmax_f, // llvm.nvvm.fmax.f - nvvm_fmax_ftz_f, // llvm.nvvm.fmax.ftz.f - nvvm_fmin_d, // llvm.nvvm.fmin.d - nvvm_fmin_f, // llvm.nvvm.fmin.f - nvvm_fmin_ftz_f, // llvm.nvvm.fmin.ftz.f - nvvm_h2f, // llvm.nvvm.h2f - nvvm_i2d_rm, // llvm.nvvm.i2d.rm - nvvm_i2d_rn, // llvm.nvvm.i2d.rn - nvvm_i2d_rp, // llvm.nvvm.i2d.rp - nvvm_i2d_rz, // llvm.nvvm.i2d.rz - nvvm_i2f_rm, // llvm.nvvm.i2f.rm - nvvm_i2f_rn, // llvm.nvvm.i2f.rn - nvvm_i2f_rp, // llvm.nvvm.i2f.rp - nvvm_i2f_rz, // llvm.nvvm.i2f.rz - nvvm_isspacep_const, // llvm.nvvm.isspacep.const - nvvm_isspacep_global, // llvm.nvvm.isspacep.global - nvvm_isspacep_local, // llvm.nvvm.isspacep.local - nvvm_isspacep_shared, // llvm.nvvm.isspacep.shared - nvvm_istypep_sampler, // llvm.nvvm.istypep.sampler - nvvm_istypep_surface, // llvm.nvvm.istypep.surface - nvvm_istypep_texture, // llvm.nvvm.istypep.texture - nvvm_ldg_global_f, // llvm.nvvm.ldg.global.f - nvvm_ldg_global_i, // llvm.nvvm.ldg.global.i - nvvm_ldg_global_p, // llvm.nvvm.ldg.global.p - nvvm_ldu_global_f, // llvm.nvvm.ldu.global.f - nvvm_ldu_global_i, // llvm.nvvm.ldu.global.i - nvvm_ldu_global_p, // llvm.nvvm.ldu.global.p - nvvm_lg2_approx_d, // llvm.nvvm.lg2.approx.d - nvvm_lg2_approx_f, // llvm.nvvm.lg2.approx.f - nvvm_lg2_approx_ftz_f, // llvm.nvvm.lg2.approx.ftz.f - nvvm_ll2d_rm, // llvm.nvvm.ll2d.rm - nvvm_ll2d_rn, // llvm.nvvm.ll2d.rn - nvvm_ll2d_rp, // llvm.nvvm.ll2d.rp - nvvm_ll2d_rz, // llvm.nvvm.ll2d.rz - nvvm_ll2f_rm, // llvm.nvvm.ll2f.rm - nvvm_ll2f_rn, // llvm.nvvm.ll2f.rn - nvvm_ll2f_rp, // llvm.nvvm.ll2f.rp - nvvm_ll2f_rz, // llvm.nvvm.ll2f.rz - nvvm_lohi_i2d, // llvm.nvvm.lohi.i2d - nvvm_max_i, // llvm.nvvm.max.i - nvvm_max_ll, // llvm.nvvm.max.ll - nvvm_max_ui, // llvm.nvvm.max.ui - nvvm_max_ull, // llvm.nvvm.max.ull - nvvm_membar_cta, // llvm.nvvm.membar.cta - nvvm_membar_gl, // llvm.nvvm.membar.gl - nvvm_membar_sys, // llvm.nvvm.membar.sys - nvvm_min_i, // llvm.nvvm.min.i - nvvm_min_ll, // llvm.nvvm.min.ll - nvvm_min_ui, // llvm.nvvm.min.ui - nvvm_min_ull, // llvm.nvvm.min.ull - nvvm_move_double, // llvm.nvvm.move.double - nvvm_move_float, // llvm.nvvm.move.float - nvvm_move_i16, // llvm.nvvm.move.i16 - nvvm_move_i32, // llvm.nvvm.move.i32 - nvvm_move_i64, // llvm.nvvm.move.i64 - nvvm_move_ptr, // llvm.nvvm.move.ptr - nvvm_mul_rm_d, // llvm.nvvm.mul.rm.d - nvvm_mul_rm_f, // llvm.nvvm.mul.rm.f - nvvm_mul_rm_ftz_f, // llvm.nvvm.mul.rm.ftz.f - nvvm_mul_rn_d, // llvm.nvvm.mul.rn.d - nvvm_mul_rn_f, // llvm.nvvm.mul.rn.f - nvvm_mul_rn_ftz_f, // llvm.nvvm.mul.rn.ftz.f - nvvm_mul_rp_d, // llvm.nvvm.mul.rp.d - nvvm_mul_rp_f, // llvm.nvvm.mul.rp.f - nvvm_mul_rp_ftz_f, // llvm.nvvm.mul.rp.ftz.f - nvvm_mul_rz_d, // llvm.nvvm.mul.rz.d - nvvm_mul_rz_f, // llvm.nvvm.mul.rz.f - nvvm_mul_rz_ftz_f, // llvm.nvvm.mul.rz.ftz.f - nvvm_mul24_i, // llvm.nvvm.mul24.i - nvvm_mul24_ui, // llvm.nvvm.mul24.ui - nvvm_mulhi_i, // llvm.nvvm.mulhi.i - nvvm_mulhi_ll, // llvm.nvvm.mulhi.ll - nvvm_mulhi_ui, // llvm.nvvm.mulhi.ui - nvvm_mulhi_ull, // llvm.nvvm.mulhi.ull - nvvm_popc_i, // llvm.nvvm.popc.i - nvvm_popc_ll, // llvm.nvvm.popc.ll - nvvm_prmt, // llvm.nvvm.prmt - nvvm_ptr_constant_to_gen, // llvm.nvvm.ptr.constant.to.gen - nvvm_ptr_gen_to_constant, // llvm.nvvm.ptr.gen.to.constant - nvvm_ptr_gen_to_global, // llvm.nvvm.ptr.gen.to.global - nvvm_ptr_gen_to_local, // llvm.nvvm.ptr.gen.to.local - nvvm_ptr_gen_to_param, // llvm.nvvm.ptr.gen.to.param - nvvm_ptr_gen_to_shared, // llvm.nvvm.ptr.gen.to.shared - nvvm_ptr_global_to_gen, // llvm.nvvm.ptr.global.to.gen - nvvm_ptr_local_to_gen, // llvm.nvvm.ptr.local.to.gen - nvvm_ptr_shared_to_gen, // llvm.nvvm.ptr.shared.to.gen - nvvm_rcp_approx_ftz_d, // llvm.nvvm.rcp.approx.ftz.d - nvvm_rcp_rm_d, // llvm.nvvm.rcp.rm.d - nvvm_rcp_rm_f, // llvm.nvvm.rcp.rm.f - nvvm_rcp_rm_ftz_f, // llvm.nvvm.rcp.rm.ftz.f - nvvm_rcp_rn_d, // llvm.nvvm.rcp.rn.d - nvvm_rcp_rn_f, // llvm.nvvm.rcp.rn.f - nvvm_rcp_rn_ftz_f, // llvm.nvvm.rcp.rn.ftz.f - nvvm_rcp_rp_d, // llvm.nvvm.rcp.rp.d - nvvm_rcp_rp_f, // llvm.nvvm.rcp.rp.f - nvvm_rcp_rp_ftz_f, // llvm.nvvm.rcp.rp.ftz.f - nvvm_rcp_rz_d, // llvm.nvvm.rcp.rz.d - nvvm_rcp_rz_f, // llvm.nvvm.rcp.rz.f - nvvm_rcp_rz_ftz_f, // llvm.nvvm.rcp.rz.ftz.f - nvvm_read_ptx_sreg_clock, // llvm.nvvm.read.ptx.sreg.clock - nvvm_read_ptx_sreg_clock64, // llvm.nvvm.read.ptx.sreg.clock64 - nvvm_read_ptx_sreg_ctaid_w, // llvm.nvvm.read.ptx.sreg.ctaid.w - nvvm_read_ptx_sreg_ctaid_x, // llvm.nvvm.read.ptx.sreg.ctaid.x - nvvm_read_ptx_sreg_ctaid_y, // llvm.nvvm.read.ptx.sreg.ctaid.y - nvvm_read_ptx_sreg_ctaid_z, // llvm.nvvm.read.ptx.sreg.ctaid.z - nvvm_read_ptx_sreg_envreg0, // llvm.nvvm.read.ptx.sreg.envreg0 - nvvm_read_ptx_sreg_envreg1, // llvm.nvvm.read.ptx.sreg.envreg1 - nvvm_read_ptx_sreg_envreg10, // llvm.nvvm.read.ptx.sreg.envreg10 - nvvm_read_ptx_sreg_envreg11, // llvm.nvvm.read.ptx.sreg.envreg11 - nvvm_read_ptx_sreg_envreg12, // llvm.nvvm.read.ptx.sreg.envreg12 - nvvm_read_ptx_sreg_envreg13, // llvm.nvvm.read.ptx.sreg.envreg13 - nvvm_read_ptx_sreg_envreg14, // llvm.nvvm.read.ptx.sreg.envreg14 - nvvm_read_ptx_sreg_envreg15, // llvm.nvvm.read.ptx.sreg.envreg15 - nvvm_read_ptx_sreg_envreg16, // llvm.nvvm.read.ptx.sreg.envreg16 - nvvm_read_ptx_sreg_envreg17, // llvm.nvvm.read.ptx.sreg.envreg17 - nvvm_read_ptx_sreg_envreg18, // llvm.nvvm.read.ptx.sreg.envreg18 - nvvm_read_ptx_sreg_envreg19, // llvm.nvvm.read.ptx.sreg.envreg19 - nvvm_read_ptx_sreg_envreg2, // llvm.nvvm.read.ptx.sreg.envreg2 - nvvm_read_ptx_sreg_envreg20, // llvm.nvvm.read.ptx.sreg.envreg20 - nvvm_read_ptx_sreg_envreg21, // llvm.nvvm.read.ptx.sreg.envreg21 - nvvm_read_ptx_sreg_envreg22, // llvm.nvvm.read.ptx.sreg.envreg22 - nvvm_read_ptx_sreg_envreg23, // llvm.nvvm.read.ptx.sreg.envreg23 - nvvm_read_ptx_sreg_envreg24, // llvm.nvvm.read.ptx.sreg.envreg24 - nvvm_read_ptx_sreg_envreg25, // llvm.nvvm.read.ptx.sreg.envreg25 - nvvm_read_ptx_sreg_envreg26, // llvm.nvvm.read.ptx.sreg.envreg26 - nvvm_read_ptx_sreg_envreg27, // llvm.nvvm.read.ptx.sreg.envreg27 - nvvm_read_ptx_sreg_envreg28, // llvm.nvvm.read.ptx.sreg.envreg28 - nvvm_read_ptx_sreg_envreg29, // llvm.nvvm.read.ptx.sreg.envreg29 - nvvm_read_ptx_sreg_envreg3, // llvm.nvvm.read.ptx.sreg.envreg3 - nvvm_read_ptx_sreg_envreg30, // llvm.nvvm.read.ptx.sreg.envreg30 - nvvm_read_ptx_sreg_envreg31, // llvm.nvvm.read.ptx.sreg.envreg31 - nvvm_read_ptx_sreg_envreg4, // llvm.nvvm.read.ptx.sreg.envreg4 - nvvm_read_ptx_sreg_envreg5, // llvm.nvvm.read.ptx.sreg.envreg5 - nvvm_read_ptx_sreg_envreg6, // llvm.nvvm.read.ptx.sreg.envreg6 - nvvm_read_ptx_sreg_envreg7, // llvm.nvvm.read.ptx.sreg.envreg7 - nvvm_read_ptx_sreg_envreg8, // llvm.nvvm.read.ptx.sreg.envreg8 - nvvm_read_ptx_sreg_envreg9, // llvm.nvvm.read.ptx.sreg.envreg9 - nvvm_read_ptx_sreg_gridid, // llvm.nvvm.read.ptx.sreg.gridid - nvvm_read_ptx_sreg_laneid, // llvm.nvvm.read.ptx.sreg.laneid - nvvm_read_ptx_sreg_lanemask_eq, // llvm.nvvm.read.ptx.sreg.lanemask.eq - nvvm_read_ptx_sreg_lanemask_ge, // llvm.nvvm.read.ptx.sreg.lanemask.ge - nvvm_read_ptx_sreg_lanemask_gt, // llvm.nvvm.read.ptx.sreg.lanemask.gt - nvvm_read_ptx_sreg_lanemask_le, // llvm.nvvm.read.ptx.sreg.lanemask.le - nvvm_read_ptx_sreg_lanemask_lt, // llvm.nvvm.read.ptx.sreg.lanemask.lt - nvvm_read_ptx_sreg_nctaid_w, // llvm.nvvm.read.ptx.sreg.nctaid.w - nvvm_read_ptx_sreg_nctaid_x, // llvm.nvvm.read.ptx.sreg.nctaid.x - nvvm_read_ptx_sreg_nctaid_y, // llvm.nvvm.read.ptx.sreg.nctaid.y - nvvm_read_ptx_sreg_nctaid_z, // llvm.nvvm.read.ptx.sreg.nctaid.z - nvvm_read_ptx_sreg_nsmid, // llvm.nvvm.read.ptx.sreg.nsmid - nvvm_read_ptx_sreg_ntid_w, // llvm.nvvm.read.ptx.sreg.ntid.w - nvvm_read_ptx_sreg_ntid_x, // llvm.nvvm.read.ptx.sreg.ntid.x - nvvm_read_ptx_sreg_ntid_y, // llvm.nvvm.read.ptx.sreg.ntid.y - nvvm_read_ptx_sreg_ntid_z, // llvm.nvvm.read.ptx.sreg.ntid.z - nvvm_read_ptx_sreg_nwarpid, // llvm.nvvm.read.ptx.sreg.nwarpid - nvvm_read_ptx_sreg_pm0, // llvm.nvvm.read.ptx.sreg.pm0 - nvvm_read_ptx_sreg_pm1, // llvm.nvvm.read.ptx.sreg.pm1 - nvvm_read_ptx_sreg_pm2, // llvm.nvvm.read.ptx.sreg.pm2 - nvvm_read_ptx_sreg_pm3, // llvm.nvvm.read.ptx.sreg.pm3 - nvvm_read_ptx_sreg_smid, // llvm.nvvm.read.ptx.sreg.smid - nvvm_read_ptx_sreg_tid_w, // llvm.nvvm.read.ptx.sreg.tid.w - nvvm_read_ptx_sreg_tid_x, // llvm.nvvm.read.ptx.sreg.tid.x - nvvm_read_ptx_sreg_tid_y, // llvm.nvvm.read.ptx.sreg.tid.y - nvvm_read_ptx_sreg_tid_z, // llvm.nvvm.read.ptx.sreg.tid.z - nvvm_read_ptx_sreg_warpid, // llvm.nvvm.read.ptx.sreg.warpid - nvvm_read_ptx_sreg_warpsize, // llvm.nvvm.read.ptx.sreg.warpsize - nvvm_reflect, // llvm.nvvm.reflect - nvvm_rotate_b32, // llvm.nvvm.rotate.b32 - nvvm_rotate_b64, // llvm.nvvm.rotate.b64 - nvvm_rotate_right_b64, // llvm.nvvm.rotate.right.b64 - nvvm_round_d, // llvm.nvvm.round.d - nvvm_round_f, // llvm.nvvm.round.f - nvvm_round_ftz_f, // llvm.nvvm.round.ftz.f - nvvm_rsqrt_approx_d, // llvm.nvvm.rsqrt.approx.d - nvvm_rsqrt_approx_f, // llvm.nvvm.rsqrt.approx.f - nvvm_rsqrt_approx_ftz_f, // llvm.nvvm.rsqrt.approx.ftz.f - nvvm_sad_i, // llvm.nvvm.sad.i - nvvm_sad_ui, // llvm.nvvm.sad.ui - nvvm_saturate_d, // llvm.nvvm.saturate.d - nvvm_saturate_f, // llvm.nvvm.saturate.f - nvvm_saturate_ftz_f, // llvm.nvvm.saturate.ftz.f - nvvm_shfl_bfly_f32, // llvm.nvvm.shfl.bfly.f32 - nvvm_shfl_bfly_i32, // llvm.nvvm.shfl.bfly.i32 - nvvm_shfl_down_f32, // llvm.nvvm.shfl.down.f32 - nvvm_shfl_down_i32, // llvm.nvvm.shfl.down.i32 - nvvm_shfl_idx_f32, // llvm.nvvm.shfl.idx.f32 - nvvm_shfl_idx_i32, // llvm.nvvm.shfl.idx.i32 - nvvm_shfl_up_f32, // llvm.nvvm.shfl.up.f32 - nvvm_shfl_up_i32, // llvm.nvvm.shfl.up.i32 - nvvm_sin_approx_f, // llvm.nvvm.sin.approx.f - nvvm_sin_approx_ftz_f, // llvm.nvvm.sin.approx.ftz.f - nvvm_sqrt_approx_f, // llvm.nvvm.sqrt.approx.f - nvvm_sqrt_approx_ftz_f, // llvm.nvvm.sqrt.approx.ftz.f - nvvm_sqrt_f, // llvm.nvvm.sqrt.f - nvvm_sqrt_rm_d, // llvm.nvvm.sqrt.rm.d - nvvm_sqrt_rm_f, // llvm.nvvm.sqrt.rm.f - nvvm_sqrt_rm_ftz_f, // llvm.nvvm.sqrt.rm.ftz.f - nvvm_sqrt_rn_d, // llvm.nvvm.sqrt.rn.d - nvvm_sqrt_rn_f, // llvm.nvvm.sqrt.rn.f - nvvm_sqrt_rn_ftz_f, // llvm.nvvm.sqrt.rn.ftz.f - nvvm_sqrt_rp_d, // llvm.nvvm.sqrt.rp.d - nvvm_sqrt_rp_f, // llvm.nvvm.sqrt.rp.f - nvvm_sqrt_rp_ftz_f, // llvm.nvvm.sqrt.rp.ftz.f - nvvm_sqrt_rz_d, // llvm.nvvm.sqrt.rz.d - nvvm_sqrt_rz_f, // llvm.nvvm.sqrt.rz.f - nvvm_sqrt_rz_ftz_f, // llvm.nvvm.sqrt.rz.ftz.f - nvvm_suld_1d_array_i16_clamp, // llvm.nvvm.suld.1d.array.i16.clamp - nvvm_suld_1d_array_i16_trap, // llvm.nvvm.suld.1d.array.i16.trap - nvvm_suld_1d_array_i16_zero, // llvm.nvvm.suld.1d.array.i16.zero - nvvm_suld_1d_array_i32_clamp, // llvm.nvvm.suld.1d.array.i32.clamp - nvvm_suld_1d_array_i32_trap, // llvm.nvvm.suld.1d.array.i32.trap - nvvm_suld_1d_array_i32_zero, // llvm.nvvm.suld.1d.array.i32.zero - nvvm_suld_1d_array_i64_clamp, // llvm.nvvm.suld.1d.array.i64.clamp - nvvm_suld_1d_array_i64_trap, // llvm.nvvm.suld.1d.array.i64.trap - nvvm_suld_1d_array_i64_zero, // llvm.nvvm.suld.1d.array.i64.zero - nvvm_suld_1d_array_i8_clamp, // llvm.nvvm.suld.1d.array.i8.clamp - nvvm_suld_1d_array_i8_trap, // llvm.nvvm.suld.1d.array.i8.trap - nvvm_suld_1d_array_i8_zero, // llvm.nvvm.suld.1d.array.i8.zero - nvvm_suld_1d_array_v2i16_clamp, // llvm.nvvm.suld.1d.array.v2i16.clamp - nvvm_suld_1d_array_v2i16_trap, // llvm.nvvm.suld.1d.array.v2i16.trap - nvvm_suld_1d_array_v2i16_zero, // llvm.nvvm.suld.1d.array.v2i16.zero - nvvm_suld_1d_array_v2i32_clamp, // llvm.nvvm.suld.1d.array.v2i32.clamp - nvvm_suld_1d_array_v2i32_trap, // llvm.nvvm.suld.1d.array.v2i32.trap - nvvm_suld_1d_array_v2i32_zero, // llvm.nvvm.suld.1d.array.v2i32.zero - nvvm_suld_1d_array_v2i64_clamp, // llvm.nvvm.suld.1d.array.v2i64.clamp - nvvm_suld_1d_array_v2i64_trap, // llvm.nvvm.suld.1d.array.v2i64.trap - nvvm_suld_1d_array_v2i64_zero, // llvm.nvvm.suld.1d.array.v2i64.zero - nvvm_suld_1d_array_v2i8_clamp, // llvm.nvvm.suld.1d.array.v2i8.clamp - nvvm_suld_1d_array_v2i8_trap, // llvm.nvvm.suld.1d.array.v2i8.trap - nvvm_suld_1d_array_v2i8_zero, // llvm.nvvm.suld.1d.array.v2i8.zero - nvvm_suld_1d_array_v4i16_clamp, // llvm.nvvm.suld.1d.array.v4i16.clamp - nvvm_suld_1d_array_v4i16_trap, // llvm.nvvm.suld.1d.array.v4i16.trap - nvvm_suld_1d_array_v4i16_zero, // llvm.nvvm.suld.1d.array.v4i16.zero - nvvm_suld_1d_array_v4i32_clamp, // llvm.nvvm.suld.1d.array.v4i32.clamp - nvvm_suld_1d_array_v4i32_trap, // llvm.nvvm.suld.1d.array.v4i32.trap - nvvm_suld_1d_array_v4i32_zero, // llvm.nvvm.suld.1d.array.v4i32.zero - nvvm_suld_1d_array_v4i8_clamp, // llvm.nvvm.suld.1d.array.v4i8.clamp - nvvm_suld_1d_array_v4i8_trap, // llvm.nvvm.suld.1d.array.v4i8.trap - nvvm_suld_1d_array_v4i8_zero, // llvm.nvvm.suld.1d.array.v4i8.zero - nvvm_suld_1d_i16_clamp, // llvm.nvvm.suld.1d.i16.clamp - nvvm_suld_1d_i16_trap, // llvm.nvvm.suld.1d.i16.trap - nvvm_suld_1d_i16_zero, // llvm.nvvm.suld.1d.i16.zero - nvvm_suld_1d_i32_clamp, // llvm.nvvm.suld.1d.i32.clamp - nvvm_suld_1d_i32_trap, // llvm.nvvm.suld.1d.i32.trap - nvvm_suld_1d_i32_zero, // llvm.nvvm.suld.1d.i32.zero - nvvm_suld_1d_i64_clamp, // llvm.nvvm.suld.1d.i64.clamp - nvvm_suld_1d_i64_trap, // llvm.nvvm.suld.1d.i64.trap - nvvm_suld_1d_i64_zero, // llvm.nvvm.suld.1d.i64.zero - nvvm_suld_1d_i8_clamp, // llvm.nvvm.suld.1d.i8.clamp - nvvm_suld_1d_i8_trap, // llvm.nvvm.suld.1d.i8.trap - nvvm_suld_1d_i8_zero, // llvm.nvvm.suld.1d.i8.zero - nvvm_suld_1d_v2i16_clamp, // llvm.nvvm.suld.1d.v2i16.clamp - nvvm_suld_1d_v2i16_trap, // llvm.nvvm.suld.1d.v2i16.trap - nvvm_suld_1d_v2i16_zero, // llvm.nvvm.suld.1d.v2i16.zero - nvvm_suld_1d_v2i32_clamp, // llvm.nvvm.suld.1d.v2i32.clamp - nvvm_suld_1d_v2i32_trap, // llvm.nvvm.suld.1d.v2i32.trap - nvvm_suld_1d_v2i32_zero, // llvm.nvvm.suld.1d.v2i32.zero - nvvm_suld_1d_v2i64_clamp, // llvm.nvvm.suld.1d.v2i64.clamp - nvvm_suld_1d_v2i64_trap, // llvm.nvvm.suld.1d.v2i64.trap - nvvm_suld_1d_v2i64_zero, // llvm.nvvm.suld.1d.v2i64.zero - nvvm_suld_1d_v2i8_clamp, // llvm.nvvm.suld.1d.v2i8.clamp - nvvm_suld_1d_v2i8_trap, // llvm.nvvm.suld.1d.v2i8.trap - nvvm_suld_1d_v2i8_zero, // llvm.nvvm.suld.1d.v2i8.zero - nvvm_suld_1d_v4i16_clamp, // llvm.nvvm.suld.1d.v4i16.clamp - nvvm_suld_1d_v4i16_trap, // llvm.nvvm.suld.1d.v4i16.trap - nvvm_suld_1d_v4i16_zero, // llvm.nvvm.suld.1d.v4i16.zero - nvvm_suld_1d_v4i32_clamp, // llvm.nvvm.suld.1d.v4i32.clamp - nvvm_suld_1d_v4i32_trap, // llvm.nvvm.suld.1d.v4i32.trap - nvvm_suld_1d_v4i32_zero, // llvm.nvvm.suld.1d.v4i32.zero - nvvm_suld_1d_v4i8_clamp, // llvm.nvvm.suld.1d.v4i8.clamp - nvvm_suld_1d_v4i8_trap, // llvm.nvvm.suld.1d.v4i8.trap - nvvm_suld_1d_v4i8_zero, // llvm.nvvm.suld.1d.v4i8.zero - nvvm_suld_2d_array_i16_clamp, // llvm.nvvm.suld.2d.array.i16.clamp - nvvm_suld_2d_array_i16_trap, // llvm.nvvm.suld.2d.array.i16.trap - nvvm_suld_2d_array_i16_zero, // llvm.nvvm.suld.2d.array.i16.zero - nvvm_suld_2d_array_i32_clamp, // llvm.nvvm.suld.2d.array.i32.clamp - nvvm_suld_2d_array_i32_trap, // llvm.nvvm.suld.2d.array.i32.trap - nvvm_suld_2d_array_i32_zero, // llvm.nvvm.suld.2d.array.i32.zero - nvvm_suld_2d_array_i64_clamp, // llvm.nvvm.suld.2d.array.i64.clamp - nvvm_suld_2d_array_i64_trap, // llvm.nvvm.suld.2d.array.i64.trap - nvvm_suld_2d_array_i64_zero, // llvm.nvvm.suld.2d.array.i64.zero - nvvm_suld_2d_array_i8_clamp, // llvm.nvvm.suld.2d.array.i8.clamp - nvvm_suld_2d_array_i8_trap, // llvm.nvvm.suld.2d.array.i8.trap - nvvm_suld_2d_array_i8_zero, // llvm.nvvm.suld.2d.array.i8.zero - nvvm_suld_2d_array_v2i16_clamp, // llvm.nvvm.suld.2d.array.v2i16.clamp - nvvm_suld_2d_array_v2i16_trap, // llvm.nvvm.suld.2d.array.v2i16.trap - nvvm_suld_2d_array_v2i16_zero, // llvm.nvvm.suld.2d.array.v2i16.zero - nvvm_suld_2d_array_v2i32_clamp, // llvm.nvvm.suld.2d.array.v2i32.clamp - nvvm_suld_2d_array_v2i32_trap, // llvm.nvvm.suld.2d.array.v2i32.trap - nvvm_suld_2d_array_v2i32_zero, // llvm.nvvm.suld.2d.array.v2i32.zero - nvvm_suld_2d_array_v2i64_clamp, // llvm.nvvm.suld.2d.array.v2i64.clamp - nvvm_suld_2d_array_v2i64_trap, // llvm.nvvm.suld.2d.array.v2i64.trap - nvvm_suld_2d_array_v2i64_zero, // llvm.nvvm.suld.2d.array.v2i64.zero - nvvm_suld_2d_array_v2i8_clamp, // llvm.nvvm.suld.2d.array.v2i8.clamp - nvvm_suld_2d_array_v2i8_trap, // llvm.nvvm.suld.2d.array.v2i8.trap - nvvm_suld_2d_array_v2i8_zero, // llvm.nvvm.suld.2d.array.v2i8.zero - nvvm_suld_2d_array_v4i16_clamp, // llvm.nvvm.suld.2d.array.v4i16.clamp - nvvm_suld_2d_array_v4i16_trap, // llvm.nvvm.suld.2d.array.v4i16.trap - nvvm_suld_2d_array_v4i16_zero, // llvm.nvvm.suld.2d.array.v4i16.zero - nvvm_suld_2d_array_v4i32_clamp, // llvm.nvvm.suld.2d.array.v4i32.clamp - nvvm_suld_2d_array_v4i32_trap, // llvm.nvvm.suld.2d.array.v4i32.trap - nvvm_suld_2d_array_v4i32_zero, // llvm.nvvm.suld.2d.array.v4i32.zero - nvvm_suld_2d_array_v4i8_clamp, // llvm.nvvm.suld.2d.array.v4i8.clamp - nvvm_suld_2d_array_v4i8_trap, // llvm.nvvm.suld.2d.array.v4i8.trap - nvvm_suld_2d_array_v4i8_zero, // llvm.nvvm.suld.2d.array.v4i8.zero - nvvm_suld_2d_i16_clamp, // llvm.nvvm.suld.2d.i16.clamp - nvvm_suld_2d_i16_trap, // llvm.nvvm.suld.2d.i16.trap - nvvm_suld_2d_i16_zero, // llvm.nvvm.suld.2d.i16.zero - nvvm_suld_2d_i32_clamp, // llvm.nvvm.suld.2d.i32.clamp - nvvm_suld_2d_i32_trap, // llvm.nvvm.suld.2d.i32.trap - nvvm_suld_2d_i32_zero, // llvm.nvvm.suld.2d.i32.zero - nvvm_suld_2d_i64_clamp, // llvm.nvvm.suld.2d.i64.clamp - nvvm_suld_2d_i64_trap, // llvm.nvvm.suld.2d.i64.trap - nvvm_suld_2d_i64_zero, // llvm.nvvm.suld.2d.i64.zero - nvvm_suld_2d_i8_clamp, // llvm.nvvm.suld.2d.i8.clamp - nvvm_suld_2d_i8_trap, // llvm.nvvm.suld.2d.i8.trap - nvvm_suld_2d_i8_zero, // llvm.nvvm.suld.2d.i8.zero - nvvm_suld_2d_v2i16_clamp, // llvm.nvvm.suld.2d.v2i16.clamp - nvvm_suld_2d_v2i16_trap, // llvm.nvvm.suld.2d.v2i16.trap - nvvm_suld_2d_v2i16_zero, // llvm.nvvm.suld.2d.v2i16.zero - nvvm_suld_2d_v2i32_clamp, // llvm.nvvm.suld.2d.v2i32.clamp - nvvm_suld_2d_v2i32_trap, // llvm.nvvm.suld.2d.v2i32.trap - nvvm_suld_2d_v2i32_zero, // llvm.nvvm.suld.2d.v2i32.zero - nvvm_suld_2d_v2i64_clamp, // llvm.nvvm.suld.2d.v2i64.clamp - nvvm_suld_2d_v2i64_trap, // llvm.nvvm.suld.2d.v2i64.trap - nvvm_suld_2d_v2i64_zero, // llvm.nvvm.suld.2d.v2i64.zero - nvvm_suld_2d_v2i8_clamp, // llvm.nvvm.suld.2d.v2i8.clamp - nvvm_suld_2d_v2i8_trap, // llvm.nvvm.suld.2d.v2i8.trap - nvvm_suld_2d_v2i8_zero, // llvm.nvvm.suld.2d.v2i8.zero - nvvm_suld_2d_v4i16_clamp, // llvm.nvvm.suld.2d.v4i16.clamp - nvvm_suld_2d_v4i16_trap, // llvm.nvvm.suld.2d.v4i16.trap - nvvm_suld_2d_v4i16_zero, // llvm.nvvm.suld.2d.v4i16.zero - nvvm_suld_2d_v4i32_clamp, // llvm.nvvm.suld.2d.v4i32.clamp - nvvm_suld_2d_v4i32_trap, // llvm.nvvm.suld.2d.v4i32.trap - nvvm_suld_2d_v4i32_zero, // llvm.nvvm.suld.2d.v4i32.zero - nvvm_suld_2d_v4i8_clamp, // llvm.nvvm.suld.2d.v4i8.clamp - nvvm_suld_2d_v4i8_trap, // llvm.nvvm.suld.2d.v4i8.trap - nvvm_suld_2d_v4i8_zero, // llvm.nvvm.suld.2d.v4i8.zero - nvvm_suld_3d_i16_clamp, // llvm.nvvm.suld.3d.i16.clamp - nvvm_suld_3d_i16_trap, // llvm.nvvm.suld.3d.i16.trap - nvvm_suld_3d_i16_zero, // llvm.nvvm.suld.3d.i16.zero - nvvm_suld_3d_i32_clamp, // llvm.nvvm.suld.3d.i32.clamp - nvvm_suld_3d_i32_trap, // llvm.nvvm.suld.3d.i32.trap - nvvm_suld_3d_i32_zero, // llvm.nvvm.suld.3d.i32.zero - nvvm_suld_3d_i64_clamp, // llvm.nvvm.suld.3d.i64.clamp - nvvm_suld_3d_i64_trap, // llvm.nvvm.suld.3d.i64.trap - nvvm_suld_3d_i64_zero, // llvm.nvvm.suld.3d.i64.zero - nvvm_suld_3d_i8_clamp, // llvm.nvvm.suld.3d.i8.clamp - nvvm_suld_3d_i8_trap, // llvm.nvvm.suld.3d.i8.trap - nvvm_suld_3d_i8_zero, // llvm.nvvm.suld.3d.i8.zero - nvvm_suld_3d_v2i16_clamp, // llvm.nvvm.suld.3d.v2i16.clamp - nvvm_suld_3d_v2i16_trap, // llvm.nvvm.suld.3d.v2i16.trap - nvvm_suld_3d_v2i16_zero, // llvm.nvvm.suld.3d.v2i16.zero - nvvm_suld_3d_v2i32_clamp, // llvm.nvvm.suld.3d.v2i32.clamp - nvvm_suld_3d_v2i32_trap, // llvm.nvvm.suld.3d.v2i32.trap - nvvm_suld_3d_v2i32_zero, // llvm.nvvm.suld.3d.v2i32.zero - nvvm_suld_3d_v2i64_clamp, // llvm.nvvm.suld.3d.v2i64.clamp - nvvm_suld_3d_v2i64_trap, // llvm.nvvm.suld.3d.v2i64.trap - nvvm_suld_3d_v2i64_zero, // llvm.nvvm.suld.3d.v2i64.zero - nvvm_suld_3d_v2i8_clamp, // llvm.nvvm.suld.3d.v2i8.clamp - nvvm_suld_3d_v2i8_trap, // llvm.nvvm.suld.3d.v2i8.trap - nvvm_suld_3d_v2i8_zero, // llvm.nvvm.suld.3d.v2i8.zero - nvvm_suld_3d_v4i16_clamp, // llvm.nvvm.suld.3d.v4i16.clamp - nvvm_suld_3d_v4i16_trap, // llvm.nvvm.suld.3d.v4i16.trap - nvvm_suld_3d_v4i16_zero, // llvm.nvvm.suld.3d.v4i16.zero - nvvm_suld_3d_v4i32_clamp, // llvm.nvvm.suld.3d.v4i32.clamp - nvvm_suld_3d_v4i32_trap, // llvm.nvvm.suld.3d.v4i32.trap - nvvm_suld_3d_v4i32_zero, // llvm.nvvm.suld.3d.v4i32.zero - nvvm_suld_3d_v4i8_clamp, // llvm.nvvm.suld.3d.v4i8.clamp - nvvm_suld_3d_v4i8_trap, // llvm.nvvm.suld.3d.v4i8.trap - nvvm_suld_3d_v4i8_zero, // llvm.nvvm.suld.3d.v4i8.zero - nvvm_suq_array_size, // llvm.nvvm.suq.array.size - nvvm_suq_channel_data_type, // llvm.nvvm.suq.channel.data.type - nvvm_suq_channel_order, // llvm.nvvm.suq.channel.order - nvvm_suq_depth, // llvm.nvvm.suq.depth - nvvm_suq_height, // llvm.nvvm.suq.height - nvvm_suq_width, // llvm.nvvm.suq.width - nvvm_sust_b_1d_array_i16_clamp, // llvm.nvvm.sust.b.1d.array.i16.clamp - nvvm_sust_b_1d_array_i16_trap, // llvm.nvvm.sust.b.1d.array.i16.trap - nvvm_sust_b_1d_array_i16_zero, // llvm.nvvm.sust.b.1d.array.i16.zero - nvvm_sust_b_1d_array_i32_clamp, // llvm.nvvm.sust.b.1d.array.i32.clamp - nvvm_sust_b_1d_array_i32_trap, // llvm.nvvm.sust.b.1d.array.i32.trap - nvvm_sust_b_1d_array_i32_zero, // llvm.nvvm.sust.b.1d.array.i32.zero - nvvm_sust_b_1d_array_i64_clamp, // llvm.nvvm.sust.b.1d.array.i64.clamp - nvvm_sust_b_1d_array_i64_trap, // llvm.nvvm.sust.b.1d.array.i64.trap - nvvm_sust_b_1d_array_i64_zero, // llvm.nvvm.sust.b.1d.array.i64.zero - nvvm_sust_b_1d_array_i8_clamp, // llvm.nvvm.sust.b.1d.array.i8.clamp - nvvm_sust_b_1d_array_i8_trap, // llvm.nvvm.sust.b.1d.array.i8.trap - nvvm_sust_b_1d_array_i8_zero, // llvm.nvvm.sust.b.1d.array.i8.zero - nvvm_sust_b_1d_array_v2i16_clamp, // llvm.nvvm.sust.b.1d.array.v2i16.clamp - nvvm_sust_b_1d_array_v2i16_trap, // llvm.nvvm.sust.b.1d.array.v2i16.trap - nvvm_sust_b_1d_array_v2i16_zero, // llvm.nvvm.sust.b.1d.array.v2i16.zero - nvvm_sust_b_1d_array_v2i32_clamp, // llvm.nvvm.sust.b.1d.array.v2i32.clamp - nvvm_sust_b_1d_array_v2i32_trap, // llvm.nvvm.sust.b.1d.array.v2i32.trap - nvvm_sust_b_1d_array_v2i32_zero, // llvm.nvvm.sust.b.1d.array.v2i32.zero - nvvm_sust_b_1d_array_v2i64_clamp, // llvm.nvvm.sust.b.1d.array.v2i64.clamp - nvvm_sust_b_1d_array_v2i64_trap, // llvm.nvvm.sust.b.1d.array.v2i64.trap - nvvm_sust_b_1d_array_v2i64_zero, // llvm.nvvm.sust.b.1d.array.v2i64.zero - nvvm_sust_b_1d_array_v2i8_clamp, // llvm.nvvm.sust.b.1d.array.v2i8.clamp - nvvm_sust_b_1d_array_v2i8_trap, // llvm.nvvm.sust.b.1d.array.v2i8.trap - nvvm_sust_b_1d_array_v2i8_zero, // llvm.nvvm.sust.b.1d.array.v2i8.zero - nvvm_sust_b_1d_array_v4i16_clamp, // llvm.nvvm.sust.b.1d.array.v4i16.clamp - nvvm_sust_b_1d_array_v4i16_trap, // llvm.nvvm.sust.b.1d.array.v4i16.trap - nvvm_sust_b_1d_array_v4i16_zero, // llvm.nvvm.sust.b.1d.array.v4i16.zero - nvvm_sust_b_1d_array_v4i32_clamp, // llvm.nvvm.sust.b.1d.array.v4i32.clamp - nvvm_sust_b_1d_array_v4i32_trap, // llvm.nvvm.sust.b.1d.array.v4i32.trap - nvvm_sust_b_1d_array_v4i32_zero, // llvm.nvvm.sust.b.1d.array.v4i32.zero - nvvm_sust_b_1d_array_v4i8_clamp, // llvm.nvvm.sust.b.1d.array.v4i8.clamp - nvvm_sust_b_1d_array_v4i8_trap, // llvm.nvvm.sust.b.1d.array.v4i8.trap - nvvm_sust_b_1d_array_v4i8_zero, // llvm.nvvm.sust.b.1d.array.v4i8.zero - nvvm_sust_b_1d_i16_clamp, // llvm.nvvm.sust.b.1d.i16.clamp - nvvm_sust_b_1d_i16_trap, // llvm.nvvm.sust.b.1d.i16.trap - nvvm_sust_b_1d_i16_zero, // llvm.nvvm.sust.b.1d.i16.zero - nvvm_sust_b_1d_i32_clamp, // llvm.nvvm.sust.b.1d.i32.clamp - nvvm_sust_b_1d_i32_trap, // llvm.nvvm.sust.b.1d.i32.trap - nvvm_sust_b_1d_i32_zero, // llvm.nvvm.sust.b.1d.i32.zero - nvvm_sust_b_1d_i64_clamp, // llvm.nvvm.sust.b.1d.i64.clamp - nvvm_sust_b_1d_i64_trap, // llvm.nvvm.sust.b.1d.i64.trap - nvvm_sust_b_1d_i64_zero, // llvm.nvvm.sust.b.1d.i64.zero - nvvm_sust_b_1d_i8_clamp, // llvm.nvvm.sust.b.1d.i8.clamp - nvvm_sust_b_1d_i8_trap, // llvm.nvvm.sust.b.1d.i8.trap - nvvm_sust_b_1d_i8_zero, // llvm.nvvm.sust.b.1d.i8.zero - nvvm_sust_b_1d_v2i16_clamp, // llvm.nvvm.sust.b.1d.v2i16.clamp - nvvm_sust_b_1d_v2i16_trap, // llvm.nvvm.sust.b.1d.v2i16.trap - nvvm_sust_b_1d_v2i16_zero, // llvm.nvvm.sust.b.1d.v2i16.zero - nvvm_sust_b_1d_v2i32_clamp, // llvm.nvvm.sust.b.1d.v2i32.clamp - nvvm_sust_b_1d_v2i32_trap, // llvm.nvvm.sust.b.1d.v2i32.trap - nvvm_sust_b_1d_v2i32_zero, // llvm.nvvm.sust.b.1d.v2i32.zero - nvvm_sust_b_1d_v2i64_clamp, // llvm.nvvm.sust.b.1d.v2i64.clamp - nvvm_sust_b_1d_v2i64_trap, // llvm.nvvm.sust.b.1d.v2i64.trap - nvvm_sust_b_1d_v2i64_zero, // llvm.nvvm.sust.b.1d.v2i64.zero - nvvm_sust_b_1d_v2i8_clamp, // llvm.nvvm.sust.b.1d.v2i8.clamp - nvvm_sust_b_1d_v2i8_trap, // llvm.nvvm.sust.b.1d.v2i8.trap - nvvm_sust_b_1d_v2i8_zero, // llvm.nvvm.sust.b.1d.v2i8.zero - nvvm_sust_b_1d_v4i16_clamp, // llvm.nvvm.sust.b.1d.v4i16.clamp - nvvm_sust_b_1d_v4i16_trap, // llvm.nvvm.sust.b.1d.v4i16.trap - nvvm_sust_b_1d_v4i16_zero, // llvm.nvvm.sust.b.1d.v4i16.zero - nvvm_sust_b_1d_v4i32_clamp, // llvm.nvvm.sust.b.1d.v4i32.clamp - nvvm_sust_b_1d_v4i32_trap, // llvm.nvvm.sust.b.1d.v4i32.trap - nvvm_sust_b_1d_v4i32_zero, // llvm.nvvm.sust.b.1d.v4i32.zero - nvvm_sust_b_1d_v4i8_clamp, // llvm.nvvm.sust.b.1d.v4i8.clamp - nvvm_sust_b_1d_v4i8_trap, // llvm.nvvm.sust.b.1d.v4i8.trap - nvvm_sust_b_1d_v4i8_zero, // llvm.nvvm.sust.b.1d.v4i8.zero - nvvm_sust_b_2d_array_i16_clamp, // llvm.nvvm.sust.b.2d.array.i16.clamp - nvvm_sust_b_2d_array_i16_trap, // llvm.nvvm.sust.b.2d.array.i16.trap - nvvm_sust_b_2d_array_i16_zero, // llvm.nvvm.sust.b.2d.array.i16.zero - nvvm_sust_b_2d_array_i32_clamp, // llvm.nvvm.sust.b.2d.array.i32.clamp - nvvm_sust_b_2d_array_i32_trap, // llvm.nvvm.sust.b.2d.array.i32.trap - nvvm_sust_b_2d_array_i32_zero, // llvm.nvvm.sust.b.2d.array.i32.zero - nvvm_sust_b_2d_array_i64_clamp, // llvm.nvvm.sust.b.2d.array.i64.clamp - nvvm_sust_b_2d_array_i64_trap, // llvm.nvvm.sust.b.2d.array.i64.trap - nvvm_sust_b_2d_array_i64_zero, // llvm.nvvm.sust.b.2d.array.i64.zero - nvvm_sust_b_2d_array_i8_clamp, // llvm.nvvm.sust.b.2d.array.i8.clamp - nvvm_sust_b_2d_array_i8_trap, // llvm.nvvm.sust.b.2d.array.i8.trap - nvvm_sust_b_2d_array_i8_zero, // llvm.nvvm.sust.b.2d.array.i8.zero - nvvm_sust_b_2d_array_v2i16_clamp, // llvm.nvvm.sust.b.2d.array.v2i16.clamp - nvvm_sust_b_2d_array_v2i16_trap, // llvm.nvvm.sust.b.2d.array.v2i16.trap - nvvm_sust_b_2d_array_v2i16_zero, // llvm.nvvm.sust.b.2d.array.v2i16.zero - nvvm_sust_b_2d_array_v2i32_clamp, // llvm.nvvm.sust.b.2d.array.v2i32.clamp - nvvm_sust_b_2d_array_v2i32_trap, // llvm.nvvm.sust.b.2d.array.v2i32.trap - nvvm_sust_b_2d_array_v2i32_zero, // llvm.nvvm.sust.b.2d.array.v2i32.zero - nvvm_sust_b_2d_array_v2i64_clamp, // llvm.nvvm.sust.b.2d.array.v2i64.clamp - nvvm_sust_b_2d_array_v2i64_trap, // llvm.nvvm.sust.b.2d.array.v2i64.trap - nvvm_sust_b_2d_array_v2i64_zero, // llvm.nvvm.sust.b.2d.array.v2i64.zero - nvvm_sust_b_2d_array_v2i8_clamp, // llvm.nvvm.sust.b.2d.array.v2i8.clamp - nvvm_sust_b_2d_array_v2i8_trap, // llvm.nvvm.sust.b.2d.array.v2i8.trap - nvvm_sust_b_2d_array_v2i8_zero, // llvm.nvvm.sust.b.2d.array.v2i8.zero - nvvm_sust_b_2d_array_v4i16_clamp, // llvm.nvvm.sust.b.2d.array.v4i16.clamp - nvvm_sust_b_2d_array_v4i16_trap, // llvm.nvvm.sust.b.2d.array.v4i16.trap - nvvm_sust_b_2d_array_v4i16_zero, // llvm.nvvm.sust.b.2d.array.v4i16.zero - nvvm_sust_b_2d_array_v4i32_clamp, // llvm.nvvm.sust.b.2d.array.v4i32.clamp - nvvm_sust_b_2d_array_v4i32_trap, // llvm.nvvm.sust.b.2d.array.v4i32.trap - nvvm_sust_b_2d_array_v4i32_zero, // llvm.nvvm.sust.b.2d.array.v4i32.zero - nvvm_sust_b_2d_array_v4i8_clamp, // llvm.nvvm.sust.b.2d.array.v4i8.clamp - nvvm_sust_b_2d_array_v4i8_trap, // llvm.nvvm.sust.b.2d.array.v4i8.trap - nvvm_sust_b_2d_array_v4i8_zero, // llvm.nvvm.sust.b.2d.array.v4i8.zero - nvvm_sust_b_2d_i16_clamp, // llvm.nvvm.sust.b.2d.i16.clamp - nvvm_sust_b_2d_i16_trap, // llvm.nvvm.sust.b.2d.i16.trap - nvvm_sust_b_2d_i16_zero, // llvm.nvvm.sust.b.2d.i16.zero - nvvm_sust_b_2d_i32_clamp, // llvm.nvvm.sust.b.2d.i32.clamp - nvvm_sust_b_2d_i32_trap, // llvm.nvvm.sust.b.2d.i32.trap - nvvm_sust_b_2d_i32_zero, // llvm.nvvm.sust.b.2d.i32.zero - nvvm_sust_b_2d_i64_clamp, // llvm.nvvm.sust.b.2d.i64.clamp - nvvm_sust_b_2d_i64_trap, // llvm.nvvm.sust.b.2d.i64.trap - nvvm_sust_b_2d_i64_zero, // llvm.nvvm.sust.b.2d.i64.zero - nvvm_sust_b_2d_i8_clamp, // llvm.nvvm.sust.b.2d.i8.clamp - nvvm_sust_b_2d_i8_trap, // llvm.nvvm.sust.b.2d.i8.trap - nvvm_sust_b_2d_i8_zero, // llvm.nvvm.sust.b.2d.i8.zero - nvvm_sust_b_2d_v2i16_clamp, // llvm.nvvm.sust.b.2d.v2i16.clamp - nvvm_sust_b_2d_v2i16_trap, // llvm.nvvm.sust.b.2d.v2i16.trap - nvvm_sust_b_2d_v2i16_zero, // llvm.nvvm.sust.b.2d.v2i16.zero - nvvm_sust_b_2d_v2i32_clamp, // llvm.nvvm.sust.b.2d.v2i32.clamp - nvvm_sust_b_2d_v2i32_trap, // llvm.nvvm.sust.b.2d.v2i32.trap - nvvm_sust_b_2d_v2i32_zero, // llvm.nvvm.sust.b.2d.v2i32.zero - nvvm_sust_b_2d_v2i64_clamp, // llvm.nvvm.sust.b.2d.v2i64.clamp - nvvm_sust_b_2d_v2i64_trap, // llvm.nvvm.sust.b.2d.v2i64.trap - nvvm_sust_b_2d_v2i64_zero, // llvm.nvvm.sust.b.2d.v2i64.zero - nvvm_sust_b_2d_v2i8_clamp, // llvm.nvvm.sust.b.2d.v2i8.clamp - nvvm_sust_b_2d_v2i8_trap, // llvm.nvvm.sust.b.2d.v2i8.trap - nvvm_sust_b_2d_v2i8_zero, // llvm.nvvm.sust.b.2d.v2i8.zero - nvvm_sust_b_2d_v4i16_clamp, // llvm.nvvm.sust.b.2d.v4i16.clamp - nvvm_sust_b_2d_v4i16_trap, // llvm.nvvm.sust.b.2d.v4i16.trap - nvvm_sust_b_2d_v4i16_zero, // llvm.nvvm.sust.b.2d.v4i16.zero - nvvm_sust_b_2d_v4i32_clamp, // llvm.nvvm.sust.b.2d.v4i32.clamp - nvvm_sust_b_2d_v4i32_trap, // llvm.nvvm.sust.b.2d.v4i32.trap - nvvm_sust_b_2d_v4i32_zero, // llvm.nvvm.sust.b.2d.v4i32.zero - nvvm_sust_b_2d_v4i8_clamp, // llvm.nvvm.sust.b.2d.v4i8.clamp - nvvm_sust_b_2d_v4i8_trap, // llvm.nvvm.sust.b.2d.v4i8.trap - nvvm_sust_b_2d_v4i8_zero, // llvm.nvvm.sust.b.2d.v4i8.zero - nvvm_sust_b_3d_i16_clamp, // llvm.nvvm.sust.b.3d.i16.clamp - nvvm_sust_b_3d_i16_trap, // llvm.nvvm.sust.b.3d.i16.trap - nvvm_sust_b_3d_i16_zero, // llvm.nvvm.sust.b.3d.i16.zero - nvvm_sust_b_3d_i32_clamp, // llvm.nvvm.sust.b.3d.i32.clamp - nvvm_sust_b_3d_i32_trap, // llvm.nvvm.sust.b.3d.i32.trap - nvvm_sust_b_3d_i32_zero, // llvm.nvvm.sust.b.3d.i32.zero - nvvm_sust_b_3d_i64_clamp, // llvm.nvvm.sust.b.3d.i64.clamp - nvvm_sust_b_3d_i64_trap, // llvm.nvvm.sust.b.3d.i64.trap - nvvm_sust_b_3d_i64_zero, // llvm.nvvm.sust.b.3d.i64.zero - nvvm_sust_b_3d_i8_clamp, // llvm.nvvm.sust.b.3d.i8.clamp - nvvm_sust_b_3d_i8_trap, // llvm.nvvm.sust.b.3d.i8.trap - nvvm_sust_b_3d_i8_zero, // llvm.nvvm.sust.b.3d.i8.zero - nvvm_sust_b_3d_v2i16_clamp, // llvm.nvvm.sust.b.3d.v2i16.clamp - nvvm_sust_b_3d_v2i16_trap, // llvm.nvvm.sust.b.3d.v2i16.trap - nvvm_sust_b_3d_v2i16_zero, // llvm.nvvm.sust.b.3d.v2i16.zero - nvvm_sust_b_3d_v2i32_clamp, // llvm.nvvm.sust.b.3d.v2i32.clamp - nvvm_sust_b_3d_v2i32_trap, // llvm.nvvm.sust.b.3d.v2i32.trap - nvvm_sust_b_3d_v2i32_zero, // llvm.nvvm.sust.b.3d.v2i32.zero - nvvm_sust_b_3d_v2i64_clamp, // llvm.nvvm.sust.b.3d.v2i64.clamp - nvvm_sust_b_3d_v2i64_trap, // llvm.nvvm.sust.b.3d.v2i64.trap - nvvm_sust_b_3d_v2i64_zero, // llvm.nvvm.sust.b.3d.v2i64.zero - nvvm_sust_b_3d_v2i8_clamp, // llvm.nvvm.sust.b.3d.v2i8.clamp - nvvm_sust_b_3d_v2i8_trap, // llvm.nvvm.sust.b.3d.v2i8.trap - nvvm_sust_b_3d_v2i8_zero, // llvm.nvvm.sust.b.3d.v2i8.zero - nvvm_sust_b_3d_v4i16_clamp, // llvm.nvvm.sust.b.3d.v4i16.clamp - nvvm_sust_b_3d_v4i16_trap, // llvm.nvvm.sust.b.3d.v4i16.trap - nvvm_sust_b_3d_v4i16_zero, // llvm.nvvm.sust.b.3d.v4i16.zero - nvvm_sust_b_3d_v4i32_clamp, // llvm.nvvm.sust.b.3d.v4i32.clamp - nvvm_sust_b_3d_v4i32_trap, // llvm.nvvm.sust.b.3d.v4i32.trap - nvvm_sust_b_3d_v4i32_zero, // llvm.nvvm.sust.b.3d.v4i32.zero - nvvm_sust_b_3d_v4i8_clamp, // llvm.nvvm.sust.b.3d.v4i8.clamp - nvvm_sust_b_3d_v4i8_trap, // llvm.nvvm.sust.b.3d.v4i8.trap - nvvm_sust_b_3d_v4i8_zero, // llvm.nvvm.sust.b.3d.v4i8.zero - nvvm_sust_p_1d_array_i16_trap, // llvm.nvvm.sust.p.1d.array.i16.trap - nvvm_sust_p_1d_array_i32_trap, // llvm.nvvm.sust.p.1d.array.i32.trap - nvvm_sust_p_1d_array_i8_trap, // llvm.nvvm.sust.p.1d.array.i8.trap - nvvm_sust_p_1d_array_v2i16_trap, // llvm.nvvm.sust.p.1d.array.v2i16.trap - nvvm_sust_p_1d_array_v2i32_trap, // llvm.nvvm.sust.p.1d.array.v2i32.trap - nvvm_sust_p_1d_array_v2i8_trap, // llvm.nvvm.sust.p.1d.array.v2i8.trap - nvvm_sust_p_1d_array_v4i16_trap, // llvm.nvvm.sust.p.1d.array.v4i16.trap - nvvm_sust_p_1d_array_v4i32_trap, // llvm.nvvm.sust.p.1d.array.v4i32.trap - nvvm_sust_p_1d_array_v4i8_trap, // llvm.nvvm.sust.p.1d.array.v4i8.trap - nvvm_sust_p_1d_i16_trap, // llvm.nvvm.sust.p.1d.i16.trap - nvvm_sust_p_1d_i32_trap, // llvm.nvvm.sust.p.1d.i32.trap - nvvm_sust_p_1d_i8_trap, // llvm.nvvm.sust.p.1d.i8.trap - nvvm_sust_p_1d_v2i16_trap, // llvm.nvvm.sust.p.1d.v2i16.trap - nvvm_sust_p_1d_v2i32_trap, // llvm.nvvm.sust.p.1d.v2i32.trap - nvvm_sust_p_1d_v2i8_trap, // llvm.nvvm.sust.p.1d.v2i8.trap - nvvm_sust_p_1d_v4i16_trap, // llvm.nvvm.sust.p.1d.v4i16.trap - nvvm_sust_p_1d_v4i32_trap, // llvm.nvvm.sust.p.1d.v4i32.trap - nvvm_sust_p_1d_v4i8_trap, // llvm.nvvm.sust.p.1d.v4i8.trap - nvvm_sust_p_2d_array_i16_trap, // llvm.nvvm.sust.p.2d.array.i16.trap - nvvm_sust_p_2d_array_i32_trap, // llvm.nvvm.sust.p.2d.array.i32.trap - nvvm_sust_p_2d_array_i8_trap, // llvm.nvvm.sust.p.2d.array.i8.trap - nvvm_sust_p_2d_array_v2i16_trap, // llvm.nvvm.sust.p.2d.array.v2i16.trap - nvvm_sust_p_2d_array_v2i32_trap, // llvm.nvvm.sust.p.2d.array.v2i32.trap - nvvm_sust_p_2d_array_v2i8_trap, // llvm.nvvm.sust.p.2d.array.v2i8.trap - nvvm_sust_p_2d_array_v4i16_trap, // llvm.nvvm.sust.p.2d.array.v4i16.trap - nvvm_sust_p_2d_array_v4i32_trap, // llvm.nvvm.sust.p.2d.array.v4i32.trap - nvvm_sust_p_2d_array_v4i8_trap, // llvm.nvvm.sust.p.2d.array.v4i8.trap - nvvm_sust_p_2d_i16_trap, // llvm.nvvm.sust.p.2d.i16.trap - nvvm_sust_p_2d_i32_trap, // llvm.nvvm.sust.p.2d.i32.trap - nvvm_sust_p_2d_i8_trap, // llvm.nvvm.sust.p.2d.i8.trap - nvvm_sust_p_2d_v2i16_trap, // llvm.nvvm.sust.p.2d.v2i16.trap - nvvm_sust_p_2d_v2i32_trap, // llvm.nvvm.sust.p.2d.v2i32.trap - nvvm_sust_p_2d_v2i8_trap, // llvm.nvvm.sust.p.2d.v2i8.trap - nvvm_sust_p_2d_v4i16_trap, // llvm.nvvm.sust.p.2d.v4i16.trap - nvvm_sust_p_2d_v4i32_trap, // llvm.nvvm.sust.p.2d.v4i32.trap - nvvm_sust_p_2d_v4i8_trap, // llvm.nvvm.sust.p.2d.v4i8.trap - nvvm_sust_p_3d_i16_trap, // llvm.nvvm.sust.p.3d.i16.trap - nvvm_sust_p_3d_i32_trap, // llvm.nvvm.sust.p.3d.i32.trap - nvvm_sust_p_3d_i8_trap, // llvm.nvvm.sust.p.3d.i8.trap - nvvm_sust_p_3d_v2i16_trap, // llvm.nvvm.sust.p.3d.v2i16.trap - nvvm_sust_p_3d_v2i32_trap, // llvm.nvvm.sust.p.3d.v2i32.trap - nvvm_sust_p_3d_v2i8_trap, // llvm.nvvm.sust.p.3d.v2i8.trap - nvvm_sust_p_3d_v4i16_trap, // llvm.nvvm.sust.p.3d.v4i16.trap - nvvm_sust_p_3d_v4i32_trap, // llvm.nvvm.sust.p.3d.v4i32.trap - nvvm_sust_p_3d_v4i8_trap, // llvm.nvvm.sust.p.3d.v4i8.trap - nvvm_swap_lo_hi_b64, // llvm.nvvm.swap.lo.hi.b64 - nvvm_tex_1d_array_grad_v4f32_f32, // llvm.nvvm.tex.1d.array.grad.v4f32.f32 - nvvm_tex_1d_array_grad_v4s32_f32, // llvm.nvvm.tex.1d.array.grad.v4s32.f32 - nvvm_tex_1d_array_grad_v4u32_f32, // llvm.nvvm.tex.1d.array.grad.v4u32.f32 - nvvm_tex_1d_array_level_v4f32_f32, // llvm.nvvm.tex.1d.array.level.v4f32.f32 - nvvm_tex_1d_array_level_v4s32_f32, // llvm.nvvm.tex.1d.array.level.v4s32.f32 - nvvm_tex_1d_array_level_v4u32_f32, // llvm.nvvm.tex.1d.array.level.v4u32.f32 - nvvm_tex_1d_array_v4f32_f32, // llvm.nvvm.tex.1d.array.v4f32.f32 - nvvm_tex_1d_array_v4f32_s32, // llvm.nvvm.tex.1d.array.v4f32.s32 - nvvm_tex_1d_array_v4s32_f32, // llvm.nvvm.tex.1d.array.v4s32.f32 - nvvm_tex_1d_array_v4s32_s32, // llvm.nvvm.tex.1d.array.v4s32.s32 - nvvm_tex_1d_array_v4u32_f32, // llvm.nvvm.tex.1d.array.v4u32.f32 - nvvm_tex_1d_array_v4u32_s32, // llvm.nvvm.tex.1d.array.v4u32.s32 - nvvm_tex_1d_grad_v4f32_f32, // llvm.nvvm.tex.1d.grad.v4f32.f32 - nvvm_tex_1d_grad_v4s32_f32, // llvm.nvvm.tex.1d.grad.v4s32.f32 - nvvm_tex_1d_grad_v4u32_f32, // llvm.nvvm.tex.1d.grad.v4u32.f32 - nvvm_tex_1d_level_v4f32_f32, // llvm.nvvm.tex.1d.level.v4f32.f32 - nvvm_tex_1d_level_v4s32_f32, // llvm.nvvm.tex.1d.level.v4s32.f32 - nvvm_tex_1d_level_v4u32_f32, // llvm.nvvm.tex.1d.level.v4u32.f32 - nvvm_tex_1d_v4f32_f32, // llvm.nvvm.tex.1d.v4f32.f32 - nvvm_tex_1d_v4f32_s32, // llvm.nvvm.tex.1d.v4f32.s32 - nvvm_tex_1d_v4s32_f32, // llvm.nvvm.tex.1d.v4s32.f32 - nvvm_tex_1d_v4s32_s32, // llvm.nvvm.tex.1d.v4s32.s32 - nvvm_tex_1d_v4u32_f32, // llvm.nvvm.tex.1d.v4u32.f32 - nvvm_tex_1d_v4u32_s32, // llvm.nvvm.tex.1d.v4u32.s32 - nvvm_tex_2d_array_grad_v4f32_f32, // llvm.nvvm.tex.2d.array.grad.v4f32.f32 - nvvm_tex_2d_array_grad_v4s32_f32, // llvm.nvvm.tex.2d.array.grad.v4s32.f32 - nvvm_tex_2d_array_grad_v4u32_f32, // llvm.nvvm.tex.2d.array.grad.v4u32.f32 - nvvm_tex_2d_array_level_v4f32_f32, // llvm.nvvm.tex.2d.array.level.v4f32.f32 - nvvm_tex_2d_array_level_v4s32_f32, // llvm.nvvm.tex.2d.array.level.v4s32.f32 - nvvm_tex_2d_array_level_v4u32_f32, // llvm.nvvm.tex.2d.array.level.v4u32.f32 - nvvm_tex_2d_array_v4f32_f32, // llvm.nvvm.tex.2d.array.v4f32.f32 - nvvm_tex_2d_array_v4f32_s32, // llvm.nvvm.tex.2d.array.v4f32.s32 - nvvm_tex_2d_array_v4s32_f32, // llvm.nvvm.tex.2d.array.v4s32.f32 - nvvm_tex_2d_array_v4s32_s32, // llvm.nvvm.tex.2d.array.v4s32.s32 - nvvm_tex_2d_array_v4u32_f32, // llvm.nvvm.tex.2d.array.v4u32.f32 - nvvm_tex_2d_array_v4u32_s32, // llvm.nvvm.tex.2d.array.v4u32.s32 - nvvm_tex_2d_grad_v4f32_f32, // llvm.nvvm.tex.2d.grad.v4f32.f32 - nvvm_tex_2d_grad_v4s32_f32, // llvm.nvvm.tex.2d.grad.v4s32.f32 - nvvm_tex_2d_grad_v4u32_f32, // llvm.nvvm.tex.2d.grad.v4u32.f32 - nvvm_tex_2d_level_v4f32_f32, // llvm.nvvm.tex.2d.level.v4f32.f32 - nvvm_tex_2d_level_v4s32_f32, // llvm.nvvm.tex.2d.level.v4s32.f32 - nvvm_tex_2d_level_v4u32_f32, // llvm.nvvm.tex.2d.level.v4u32.f32 - nvvm_tex_2d_v4f32_f32, // llvm.nvvm.tex.2d.v4f32.f32 - nvvm_tex_2d_v4f32_s32, // llvm.nvvm.tex.2d.v4f32.s32 - nvvm_tex_2d_v4s32_f32, // llvm.nvvm.tex.2d.v4s32.f32 - nvvm_tex_2d_v4s32_s32, // llvm.nvvm.tex.2d.v4s32.s32 - nvvm_tex_2d_v4u32_f32, // llvm.nvvm.tex.2d.v4u32.f32 - nvvm_tex_2d_v4u32_s32, // llvm.nvvm.tex.2d.v4u32.s32 - nvvm_tex_3d_grad_v4f32_f32, // llvm.nvvm.tex.3d.grad.v4f32.f32 - nvvm_tex_3d_grad_v4s32_f32, // llvm.nvvm.tex.3d.grad.v4s32.f32 - nvvm_tex_3d_grad_v4u32_f32, // llvm.nvvm.tex.3d.grad.v4u32.f32 - nvvm_tex_3d_level_v4f32_f32, // llvm.nvvm.tex.3d.level.v4f32.f32 - nvvm_tex_3d_level_v4s32_f32, // llvm.nvvm.tex.3d.level.v4s32.f32 - nvvm_tex_3d_level_v4u32_f32, // llvm.nvvm.tex.3d.level.v4u32.f32 - nvvm_tex_3d_v4f32_f32, // llvm.nvvm.tex.3d.v4f32.f32 - nvvm_tex_3d_v4f32_s32, // llvm.nvvm.tex.3d.v4f32.s32 - nvvm_tex_3d_v4s32_f32, // llvm.nvvm.tex.3d.v4s32.f32 - nvvm_tex_3d_v4s32_s32, // llvm.nvvm.tex.3d.v4s32.s32 - nvvm_tex_3d_v4u32_f32, // llvm.nvvm.tex.3d.v4u32.f32 - nvvm_tex_3d_v4u32_s32, // llvm.nvvm.tex.3d.v4u32.s32 - nvvm_tex_cube_array_level_v4f32_f32, // llvm.nvvm.tex.cube.array.level.v4f32.f32 - nvvm_tex_cube_array_level_v4s32_f32, // llvm.nvvm.tex.cube.array.level.v4s32.f32 - nvvm_tex_cube_array_level_v4u32_f32, // llvm.nvvm.tex.cube.array.level.v4u32.f32 - nvvm_tex_cube_array_v4f32_f32, // llvm.nvvm.tex.cube.array.v4f32.f32 - nvvm_tex_cube_array_v4s32_f32, // llvm.nvvm.tex.cube.array.v4s32.f32 - nvvm_tex_cube_array_v4u32_f32, // llvm.nvvm.tex.cube.array.v4u32.f32 - nvvm_tex_cube_level_v4f32_f32, // llvm.nvvm.tex.cube.level.v4f32.f32 - nvvm_tex_cube_level_v4s32_f32, // llvm.nvvm.tex.cube.level.v4s32.f32 - nvvm_tex_cube_level_v4u32_f32, // llvm.nvvm.tex.cube.level.v4u32.f32 - nvvm_tex_cube_v4f32_f32, // llvm.nvvm.tex.cube.v4f32.f32 - nvvm_tex_cube_v4s32_f32, // llvm.nvvm.tex.cube.v4s32.f32 - nvvm_tex_cube_v4u32_f32, // llvm.nvvm.tex.cube.v4u32.f32 - nvvm_tex_unified_1d_array_grad_v4f32_f32, // llvm.nvvm.tex.unified.1d.array.grad.v4f32.f32 - nvvm_tex_unified_1d_array_grad_v4s32_f32, // llvm.nvvm.tex.unified.1d.array.grad.v4s32.f32 - nvvm_tex_unified_1d_array_grad_v4u32_f32, // llvm.nvvm.tex.unified.1d.array.grad.v4u32.f32 - nvvm_tex_unified_1d_array_level_v4f32_f32, // llvm.nvvm.tex.unified.1d.array.level.v4f32.f32 - nvvm_tex_unified_1d_array_level_v4s32_f32, // llvm.nvvm.tex.unified.1d.array.level.v4s32.f32 - nvvm_tex_unified_1d_array_level_v4u32_f32, // llvm.nvvm.tex.unified.1d.array.level.v4u32.f32 - nvvm_tex_unified_1d_array_v4f32_f32, // llvm.nvvm.tex.unified.1d.array.v4f32.f32 - nvvm_tex_unified_1d_array_v4f32_s32, // llvm.nvvm.tex.unified.1d.array.v4f32.s32 - nvvm_tex_unified_1d_array_v4s32_f32, // llvm.nvvm.tex.unified.1d.array.v4s32.f32 - nvvm_tex_unified_1d_array_v4s32_s32, // llvm.nvvm.tex.unified.1d.array.v4s32.s32 - nvvm_tex_unified_1d_array_v4u32_f32, // llvm.nvvm.tex.unified.1d.array.v4u32.f32 - nvvm_tex_unified_1d_array_v4u32_s32, // llvm.nvvm.tex.unified.1d.array.v4u32.s32 - nvvm_tex_unified_1d_grad_v4f32_f32, // llvm.nvvm.tex.unified.1d.grad.v4f32.f32 - nvvm_tex_unified_1d_grad_v4s32_f32, // llvm.nvvm.tex.unified.1d.grad.v4s32.f32 - nvvm_tex_unified_1d_grad_v4u32_f32, // llvm.nvvm.tex.unified.1d.grad.v4u32.f32 - nvvm_tex_unified_1d_level_v4f32_f32, // llvm.nvvm.tex.unified.1d.level.v4f32.f32 - nvvm_tex_unified_1d_level_v4s32_f32, // llvm.nvvm.tex.unified.1d.level.v4s32.f32 - nvvm_tex_unified_1d_level_v4u32_f32, // llvm.nvvm.tex.unified.1d.level.v4u32.f32 - nvvm_tex_unified_1d_v4f32_f32, // llvm.nvvm.tex.unified.1d.v4f32.f32 - nvvm_tex_unified_1d_v4f32_s32, // llvm.nvvm.tex.unified.1d.v4f32.s32 - nvvm_tex_unified_1d_v4s32_f32, // llvm.nvvm.tex.unified.1d.v4s32.f32 - nvvm_tex_unified_1d_v4s32_s32, // llvm.nvvm.tex.unified.1d.v4s32.s32 - nvvm_tex_unified_1d_v4u32_f32, // llvm.nvvm.tex.unified.1d.v4u32.f32 - nvvm_tex_unified_1d_v4u32_s32, // llvm.nvvm.tex.unified.1d.v4u32.s32 - nvvm_tex_unified_2d_array_grad_v4f32_f32, // llvm.nvvm.tex.unified.2d.array.grad.v4f32.f32 - nvvm_tex_unified_2d_array_grad_v4s32_f32, // llvm.nvvm.tex.unified.2d.array.grad.v4s32.f32 - nvvm_tex_unified_2d_array_grad_v4u32_f32, // llvm.nvvm.tex.unified.2d.array.grad.v4u32.f32 - nvvm_tex_unified_2d_array_level_v4f32_f32, // llvm.nvvm.tex.unified.2d.array.level.v4f32.f32 - nvvm_tex_unified_2d_array_level_v4s32_f32, // llvm.nvvm.tex.unified.2d.array.level.v4s32.f32 - nvvm_tex_unified_2d_array_level_v4u32_f32, // llvm.nvvm.tex.unified.2d.array.level.v4u32.f32 - nvvm_tex_unified_2d_array_v4f32_f32, // llvm.nvvm.tex.unified.2d.array.v4f32.f32 - nvvm_tex_unified_2d_array_v4f32_s32, // llvm.nvvm.tex.unified.2d.array.v4f32.s32 - nvvm_tex_unified_2d_array_v4s32_f32, // llvm.nvvm.tex.unified.2d.array.v4s32.f32 - nvvm_tex_unified_2d_array_v4s32_s32, // llvm.nvvm.tex.unified.2d.array.v4s32.s32 - nvvm_tex_unified_2d_array_v4u32_f32, // llvm.nvvm.tex.unified.2d.array.v4u32.f32 - nvvm_tex_unified_2d_array_v4u32_s32, // llvm.nvvm.tex.unified.2d.array.v4u32.s32 - nvvm_tex_unified_2d_grad_v4f32_f32, // llvm.nvvm.tex.unified.2d.grad.v4f32.f32 - nvvm_tex_unified_2d_grad_v4s32_f32, // llvm.nvvm.tex.unified.2d.grad.v4s32.f32 - nvvm_tex_unified_2d_grad_v4u32_f32, // llvm.nvvm.tex.unified.2d.grad.v4u32.f32 - nvvm_tex_unified_2d_level_v4f32_f32, // llvm.nvvm.tex.unified.2d.level.v4f32.f32 - nvvm_tex_unified_2d_level_v4s32_f32, // llvm.nvvm.tex.unified.2d.level.v4s32.f32 - nvvm_tex_unified_2d_level_v4u32_f32, // llvm.nvvm.tex.unified.2d.level.v4u32.f32 - nvvm_tex_unified_2d_v4f32_f32, // llvm.nvvm.tex.unified.2d.v4f32.f32 - nvvm_tex_unified_2d_v4f32_s32, // llvm.nvvm.tex.unified.2d.v4f32.s32 - nvvm_tex_unified_2d_v4s32_f32, // llvm.nvvm.tex.unified.2d.v4s32.f32 - nvvm_tex_unified_2d_v4s32_s32, // llvm.nvvm.tex.unified.2d.v4s32.s32 - nvvm_tex_unified_2d_v4u32_f32, // llvm.nvvm.tex.unified.2d.v4u32.f32 - nvvm_tex_unified_2d_v4u32_s32, // llvm.nvvm.tex.unified.2d.v4u32.s32 - nvvm_tex_unified_3d_grad_v4f32_f32, // llvm.nvvm.tex.unified.3d.grad.v4f32.f32 - nvvm_tex_unified_3d_grad_v4s32_f32, // llvm.nvvm.tex.unified.3d.grad.v4s32.f32 - nvvm_tex_unified_3d_grad_v4u32_f32, // llvm.nvvm.tex.unified.3d.grad.v4u32.f32 - nvvm_tex_unified_3d_level_v4f32_f32, // llvm.nvvm.tex.unified.3d.level.v4f32.f32 - nvvm_tex_unified_3d_level_v4s32_f32, // llvm.nvvm.tex.unified.3d.level.v4s32.f32 - nvvm_tex_unified_3d_level_v4u32_f32, // llvm.nvvm.tex.unified.3d.level.v4u32.f32 - nvvm_tex_unified_3d_v4f32_f32, // llvm.nvvm.tex.unified.3d.v4f32.f32 - nvvm_tex_unified_3d_v4f32_s32, // llvm.nvvm.tex.unified.3d.v4f32.s32 - nvvm_tex_unified_3d_v4s32_f32, // llvm.nvvm.tex.unified.3d.v4s32.f32 - nvvm_tex_unified_3d_v4s32_s32, // llvm.nvvm.tex.unified.3d.v4s32.s32 - nvvm_tex_unified_3d_v4u32_f32, // llvm.nvvm.tex.unified.3d.v4u32.f32 - nvvm_tex_unified_3d_v4u32_s32, // llvm.nvvm.tex.unified.3d.v4u32.s32 - nvvm_tex_unified_cube_array_level_v4f32_f32, // llvm.nvvm.tex.unified.cube.array.level.v4f32.f32 - nvvm_tex_unified_cube_array_level_v4s32_f32, // llvm.nvvm.tex.unified.cube.array.level.v4s32.f32 - nvvm_tex_unified_cube_array_level_v4u32_f32, // llvm.nvvm.tex.unified.cube.array.level.v4u32.f32 - nvvm_tex_unified_cube_array_v4f32_f32, // llvm.nvvm.tex.unified.cube.array.v4f32.f32 - nvvm_tex_unified_cube_array_v4s32_f32, // llvm.nvvm.tex.unified.cube.array.v4s32.f32 - nvvm_tex_unified_cube_array_v4u32_f32, // llvm.nvvm.tex.unified.cube.array.v4u32.f32 - nvvm_tex_unified_cube_level_v4f32_f32, // llvm.nvvm.tex.unified.cube.level.v4f32.f32 - nvvm_tex_unified_cube_level_v4s32_f32, // llvm.nvvm.tex.unified.cube.level.v4s32.f32 - nvvm_tex_unified_cube_level_v4u32_f32, // llvm.nvvm.tex.unified.cube.level.v4u32.f32 - nvvm_tex_unified_cube_v4f32_f32, // llvm.nvvm.tex.unified.cube.v4f32.f32 - nvvm_tex_unified_cube_v4s32_f32, // llvm.nvvm.tex.unified.cube.v4s32.f32 - nvvm_tex_unified_cube_v4u32_f32, // llvm.nvvm.tex.unified.cube.v4u32.f32 - nvvm_texsurf_handle, // llvm.nvvm.texsurf.handle - nvvm_texsurf_handle_internal, // llvm.nvvm.texsurf.handle.internal - nvvm_tld4_a_2d_v4f32_f32, // llvm.nvvm.tld4.a.2d.v4f32.f32 - nvvm_tld4_a_2d_v4s32_f32, // llvm.nvvm.tld4.a.2d.v4s32.f32 - nvvm_tld4_a_2d_v4u32_f32, // llvm.nvvm.tld4.a.2d.v4u32.f32 - nvvm_tld4_b_2d_v4f32_f32, // llvm.nvvm.tld4.b.2d.v4f32.f32 - nvvm_tld4_b_2d_v4s32_f32, // llvm.nvvm.tld4.b.2d.v4s32.f32 - nvvm_tld4_b_2d_v4u32_f32, // llvm.nvvm.tld4.b.2d.v4u32.f32 - nvvm_tld4_g_2d_v4f32_f32, // llvm.nvvm.tld4.g.2d.v4f32.f32 - nvvm_tld4_g_2d_v4s32_f32, // llvm.nvvm.tld4.g.2d.v4s32.f32 - nvvm_tld4_g_2d_v4u32_f32, // llvm.nvvm.tld4.g.2d.v4u32.f32 - nvvm_tld4_r_2d_v4f32_f32, // llvm.nvvm.tld4.r.2d.v4f32.f32 - nvvm_tld4_r_2d_v4s32_f32, // llvm.nvvm.tld4.r.2d.v4s32.f32 - nvvm_tld4_r_2d_v4u32_f32, // llvm.nvvm.tld4.r.2d.v4u32.f32 - nvvm_tld4_unified_a_2d_v4f32_f32, // llvm.nvvm.tld4.unified.a.2d.v4f32.f32 - nvvm_tld4_unified_a_2d_v4s32_f32, // llvm.nvvm.tld4.unified.a.2d.v4s32.f32 - nvvm_tld4_unified_a_2d_v4u32_f32, // llvm.nvvm.tld4.unified.a.2d.v4u32.f32 - nvvm_tld4_unified_b_2d_v4f32_f32, // llvm.nvvm.tld4.unified.b.2d.v4f32.f32 - nvvm_tld4_unified_b_2d_v4s32_f32, // llvm.nvvm.tld4.unified.b.2d.v4s32.f32 - nvvm_tld4_unified_b_2d_v4u32_f32, // llvm.nvvm.tld4.unified.b.2d.v4u32.f32 - nvvm_tld4_unified_g_2d_v4f32_f32, // llvm.nvvm.tld4.unified.g.2d.v4f32.f32 - nvvm_tld4_unified_g_2d_v4s32_f32, // llvm.nvvm.tld4.unified.g.2d.v4s32.f32 - nvvm_tld4_unified_g_2d_v4u32_f32, // llvm.nvvm.tld4.unified.g.2d.v4u32.f32 - nvvm_tld4_unified_r_2d_v4f32_f32, // llvm.nvvm.tld4.unified.r.2d.v4f32.f32 - nvvm_tld4_unified_r_2d_v4s32_f32, // llvm.nvvm.tld4.unified.r.2d.v4s32.f32 - nvvm_tld4_unified_r_2d_v4u32_f32, // llvm.nvvm.tld4.unified.r.2d.v4u32.f32 - nvvm_trunc_d, // llvm.nvvm.trunc.d - nvvm_trunc_f, // llvm.nvvm.trunc.f - nvvm_trunc_ftz_f, // llvm.nvvm.trunc.ftz.f - nvvm_txq_array_size, // llvm.nvvm.txq.array.size - nvvm_txq_channel_data_type, // llvm.nvvm.txq.channel.data.type - nvvm_txq_channel_order, // llvm.nvvm.txq.channel.order - nvvm_txq_depth, // llvm.nvvm.txq.depth - nvvm_txq_height, // llvm.nvvm.txq.height - nvvm_txq_num_mipmap_levels, // llvm.nvvm.txq.num.mipmap.levels - nvvm_txq_num_samples, // llvm.nvvm.txq.num.samples - nvvm_txq_width, // llvm.nvvm.txq.width - nvvm_ui2d_rm, // llvm.nvvm.ui2d.rm - nvvm_ui2d_rn, // llvm.nvvm.ui2d.rn - nvvm_ui2d_rp, // llvm.nvvm.ui2d.rp - nvvm_ui2d_rz, // llvm.nvvm.ui2d.rz - nvvm_ui2f_rm, // llvm.nvvm.ui2f.rm - nvvm_ui2f_rn, // llvm.nvvm.ui2f.rn - nvvm_ui2f_rp, // llvm.nvvm.ui2f.rp - nvvm_ui2f_rz, // llvm.nvvm.ui2f.rz - nvvm_ull2d_rm, // llvm.nvvm.ull2d.rm - nvvm_ull2d_rn, // llvm.nvvm.ull2d.rn - nvvm_ull2d_rp, // llvm.nvvm.ull2d.rp - nvvm_ull2d_rz, // llvm.nvvm.ull2d.rz - nvvm_ull2f_rm, // llvm.nvvm.ull2f.rm - nvvm_ull2f_rn, // llvm.nvvm.ull2f.rn - nvvm_ull2f_rp, // llvm.nvvm.ull2f.rp - nvvm_ull2f_rz, // llvm.nvvm.ull2f.rz - ppc_altivec_crypto_vcipher, // llvm.ppc.altivec.crypto.vcipher - ppc_altivec_crypto_vcipherlast, // llvm.ppc.altivec.crypto.vcipherlast - ppc_altivec_crypto_vncipher, // llvm.ppc.altivec.crypto.vncipher - ppc_altivec_crypto_vncipherlast, // llvm.ppc.altivec.crypto.vncipherlast - ppc_altivec_crypto_vpermxor, // llvm.ppc.altivec.crypto.vpermxor - ppc_altivec_crypto_vpmsumb, // llvm.ppc.altivec.crypto.vpmsumb - ppc_altivec_crypto_vpmsumd, // llvm.ppc.altivec.crypto.vpmsumd - ppc_altivec_crypto_vpmsumh, // llvm.ppc.altivec.crypto.vpmsumh - ppc_altivec_crypto_vpmsumw, // llvm.ppc.altivec.crypto.vpmsumw - ppc_altivec_crypto_vsbox, // llvm.ppc.altivec.crypto.vsbox - ppc_altivec_crypto_vshasigmad, // llvm.ppc.altivec.crypto.vshasigmad - ppc_altivec_crypto_vshasigmaw, // llvm.ppc.altivec.crypto.vshasigmaw - ppc_altivec_dss, // llvm.ppc.altivec.dss - ppc_altivec_dssall, // llvm.ppc.altivec.dssall - ppc_altivec_dst, // llvm.ppc.altivec.dst - ppc_altivec_dstst, // llvm.ppc.altivec.dstst - ppc_altivec_dststt, // llvm.ppc.altivec.dststt - ppc_altivec_dstt, // llvm.ppc.altivec.dstt - ppc_altivec_lvebx, // llvm.ppc.altivec.lvebx - ppc_altivec_lvehx, // llvm.ppc.altivec.lvehx - ppc_altivec_lvewx, // llvm.ppc.altivec.lvewx - ppc_altivec_lvsl, // llvm.ppc.altivec.lvsl - ppc_altivec_lvsr, // llvm.ppc.altivec.lvsr - ppc_altivec_lvx, // llvm.ppc.altivec.lvx - ppc_altivec_lvxl, // llvm.ppc.altivec.lvxl - ppc_altivec_mfvscr, // llvm.ppc.altivec.mfvscr - ppc_altivec_mtvscr, // llvm.ppc.altivec.mtvscr - ppc_altivec_stvebx, // llvm.ppc.altivec.stvebx - ppc_altivec_stvehx, // llvm.ppc.altivec.stvehx - ppc_altivec_stvewx, // llvm.ppc.altivec.stvewx - ppc_altivec_stvx, // llvm.ppc.altivec.stvx - ppc_altivec_stvxl, // llvm.ppc.altivec.stvxl - ppc_altivec_vaddcuq, // llvm.ppc.altivec.vaddcuq - ppc_altivec_vaddcuw, // llvm.ppc.altivec.vaddcuw - ppc_altivec_vaddecuq, // llvm.ppc.altivec.vaddecuq - ppc_altivec_vaddeuqm, // llvm.ppc.altivec.vaddeuqm - ppc_altivec_vaddsbs, // llvm.ppc.altivec.vaddsbs - ppc_altivec_vaddshs, // llvm.ppc.altivec.vaddshs - ppc_altivec_vaddsws, // llvm.ppc.altivec.vaddsws - ppc_altivec_vaddubs, // llvm.ppc.altivec.vaddubs - ppc_altivec_vadduhs, // llvm.ppc.altivec.vadduhs - ppc_altivec_vadduws, // llvm.ppc.altivec.vadduws - ppc_altivec_vavgsb, // llvm.ppc.altivec.vavgsb - ppc_altivec_vavgsh, // llvm.ppc.altivec.vavgsh - ppc_altivec_vavgsw, // llvm.ppc.altivec.vavgsw - ppc_altivec_vavgub, // llvm.ppc.altivec.vavgub - ppc_altivec_vavguh, // llvm.ppc.altivec.vavguh - ppc_altivec_vavguw, // llvm.ppc.altivec.vavguw - ppc_altivec_vbpermq, // llvm.ppc.altivec.vbpermq - ppc_altivec_vcfsx, // llvm.ppc.altivec.vcfsx - ppc_altivec_vcfux, // llvm.ppc.altivec.vcfux - ppc_altivec_vcmpbfp, // llvm.ppc.altivec.vcmpbfp - ppc_altivec_vcmpbfp_p, // llvm.ppc.altivec.vcmpbfp.p - ppc_altivec_vcmpeqfp, // llvm.ppc.altivec.vcmpeqfp - ppc_altivec_vcmpeqfp_p, // llvm.ppc.altivec.vcmpeqfp.p - ppc_altivec_vcmpequb, // llvm.ppc.altivec.vcmpequb - ppc_altivec_vcmpequb_p, // llvm.ppc.altivec.vcmpequb.p - ppc_altivec_vcmpequd, // llvm.ppc.altivec.vcmpequd - ppc_altivec_vcmpequd_p, // llvm.ppc.altivec.vcmpequd.p - ppc_altivec_vcmpequh, // llvm.ppc.altivec.vcmpequh - ppc_altivec_vcmpequh_p, // llvm.ppc.altivec.vcmpequh.p - ppc_altivec_vcmpequw, // llvm.ppc.altivec.vcmpequw - ppc_altivec_vcmpequw_p, // llvm.ppc.altivec.vcmpequw.p - ppc_altivec_vcmpgefp, // llvm.ppc.altivec.vcmpgefp - ppc_altivec_vcmpgefp_p, // llvm.ppc.altivec.vcmpgefp.p - ppc_altivec_vcmpgtfp, // llvm.ppc.altivec.vcmpgtfp - ppc_altivec_vcmpgtfp_p, // llvm.ppc.altivec.vcmpgtfp.p - ppc_altivec_vcmpgtsb, // llvm.ppc.altivec.vcmpgtsb - ppc_altivec_vcmpgtsb_p, // llvm.ppc.altivec.vcmpgtsb.p - ppc_altivec_vcmpgtsd, // llvm.ppc.altivec.vcmpgtsd - ppc_altivec_vcmpgtsd_p, // llvm.ppc.altivec.vcmpgtsd.p - ppc_altivec_vcmpgtsh, // llvm.ppc.altivec.vcmpgtsh - ppc_altivec_vcmpgtsh_p, // llvm.ppc.altivec.vcmpgtsh.p - ppc_altivec_vcmpgtsw, // llvm.ppc.altivec.vcmpgtsw - ppc_altivec_vcmpgtsw_p, // llvm.ppc.altivec.vcmpgtsw.p - ppc_altivec_vcmpgtub, // llvm.ppc.altivec.vcmpgtub - ppc_altivec_vcmpgtub_p, // llvm.ppc.altivec.vcmpgtub.p - ppc_altivec_vcmpgtud, // llvm.ppc.altivec.vcmpgtud - ppc_altivec_vcmpgtud_p, // llvm.ppc.altivec.vcmpgtud.p - ppc_altivec_vcmpgtuh, // llvm.ppc.altivec.vcmpgtuh - ppc_altivec_vcmpgtuh_p, // llvm.ppc.altivec.vcmpgtuh.p - ppc_altivec_vcmpgtuw, // llvm.ppc.altivec.vcmpgtuw - ppc_altivec_vcmpgtuw_p, // llvm.ppc.altivec.vcmpgtuw.p - ppc_altivec_vctsxs, // llvm.ppc.altivec.vctsxs - ppc_altivec_vctuxs, // llvm.ppc.altivec.vctuxs - ppc_altivec_vexptefp, // llvm.ppc.altivec.vexptefp - ppc_altivec_vgbbd, // llvm.ppc.altivec.vgbbd - ppc_altivec_vlogefp, // llvm.ppc.altivec.vlogefp - ppc_altivec_vmaddfp, // llvm.ppc.altivec.vmaddfp - ppc_altivec_vmaxfp, // llvm.ppc.altivec.vmaxfp - ppc_altivec_vmaxsb, // llvm.ppc.altivec.vmaxsb - ppc_altivec_vmaxsd, // llvm.ppc.altivec.vmaxsd - ppc_altivec_vmaxsh, // llvm.ppc.altivec.vmaxsh - ppc_altivec_vmaxsw, // llvm.ppc.altivec.vmaxsw - ppc_altivec_vmaxub, // llvm.ppc.altivec.vmaxub - ppc_altivec_vmaxud, // llvm.ppc.altivec.vmaxud - ppc_altivec_vmaxuh, // llvm.ppc.altivec.vmaxuh - ppc_altivec_vmaxuw, // llvm.ppc.altivec.vmaxuw - ppc_altivec_vmhaddshs, // llvm.ppc.altivec.vmhaddshs - ppc_altivec_vmhraddshs, // llvm.ppc.altivec.vmhraddshs - ppc_altivec_vminfp, // llvm.ppc.altivec.vminfp - ppc_altivec_vminsb, // llvm.ppc.altivec.vminsb - ppc_altivec_vminsd, // llvm.ppc.altivec.vminsd - ppc_altivec_vminsh, // llvm.ppc.altivec.vminsh - ppc_altivec_vminsw, // llvm.ppc.altivec.vminsw - ppc_altivec_vminub, // llvm.ppc.altivec.vminub - ppc_altivec_vminud, // llvm.ppc.altivec.vminud - ppc_altivec_vminuh, // llvm.ppc.altivec.vminuh - ppc_altivec_vminuw, // llvm.ppc.altivec.vminuw - ppc_altivec_vmladduhm, // llvm.ppc.altivec.vmladduhm - ppc_altivec_vmsummbm, // llvm.ppc.altivec.vmsummbm - ppc_altivec_vmsumshm, // llvm.ppc.altivec.vmsumshm - ppc_altivec_vmsumshs, // llvm.ppc.altivec.vmsumshs - ppc_altivec_vmsumubm, // llvm.ppc.altivec.vmsumubm - ppc_altivec_vmsumuhm, // llvm.ppc.altivec.vmsumuhm - ppc_altivec_vmsumuhs, // llvm.ppc.altivec.vmsumuhs - ppc_altivec_vmulesb, // llvm.ppc.altivec.vmulesb - ppc_altivec_vmulesh, // llvm.ppc.altivec.vmulesh - ppc_altivec_vmulesw, // llvm.ppc.altivec.vmulesw - ppc_altivec_vmuleub, // llvm.ppc.altivec.vmuleub - ppc_altivec_vmuleuh, // llvm.ppc.altivec.vmuleuh - ppc_altivec_vmuleuw, // llvm.ppc.altivec.vmuleuw - ppc_altivec_vmulosb, // llvm.ppc.altivec.vmulosb - ppc_altivec_vmulosh, // llvm.ppc.altivec.vmulosh - ppc_altivec_vmulosw, // llvm.ppc.altivec.vmulosw - ppc_altivec_vmuloub, // llvm.ppc.altivec.vmuloub - ppc_altivec_vmulouh, // llvm.ppc.altivec.vmulouh - ppc_altivec_vmulouw, // llvm.ppc.altivec.vmulouw - ppc_altivec_vnmsubfp, // llvm.ppc.altivec.vnmsubfp - ppc_altivec_vperm, // llvm.ppc.altivec.vperm - ppc_altivec_vpkpx, // llvm.ppc.altivec.vpkpx - ppc_altivec_vpksdss, // llvm.ppc.altivec.vpksdss - ppc_altivec_vpksdus, // llvm.ppc.altivec.vpksdus - ppc_altivec_vpkshss, // llvm.ppc.altivec.vpkshss - ppc_altivec_vpkshus, // llvm.ppc.altivec.vpkshus - ppc_altivec_vpkswss, // llvm.ppc.altivec.vpkswss - ppc_altivec_vpkswus, // llvm.ppc.altivec.vpkswus - ppc_altivec_vpkudus, // llvm.ppc.altivec.vpkudus - ppc_altivec_vpkuhus, // llvm.ppc.altivec.vpkuhus - ppc_altivec_vpkuwus, // llvm.ppc.altivec.vpkuwus - ppc_altivec_vrefp, // llvm.ppc.altivec.vrefp - ppc_altivec_vrfim, // llvm.ppc.altivec.vrfim - ppc_altivec_vrfin, // llvm.ppc.altivec.vrfin - ppc_altivec_vrfip, // llvm.ppc.altivec.vrfip - ppc_altivec_vrfiz, // llvm.ppc.altivec.vrfiz - ppc_altivec_vrlb, // llvm.ppc.altivec.vrlb - ppc_altivec_vrld, // llvm.ppc.altivec.vrld - ppc_altivec_vrlh, // llvm.ppc.altivec.vrlh - ppc_altivec_vrlw, // llvm.ppc.altivec.vrlw - ppc_altivec_vrsqrtefp, // llvm.ppc.altivec.vrsqrtefp - ppc_altivec_vsel, // llvm.ppc.altivec.vsel - ppc_altivec_vsl, // llvm.ppc.altivec.vsl - ppc_altivec_vslb, // llvm.ppc.altivec.vslb - ppc_altivec_vslh, // llvm.ppc.altivec.vslh - ppc_altivec_vslo, // llvm.ppc.altivec.vslo - ppc_altivec_vslw, // llvm.ppc.altivec.vslw - ppc_altivec_vsr, // llvm.ppc.altivec.vsr - ppc_altivec_vsrab, // llvm.ppc.altivec.vsrab - ppc_altivec_vsrah, // llvm.ppc.altivec.vsrah - ppc_altivec_vsraw, // llvm.ppc.altivec.vsraw - ppc_altivec_vsrb, // llvm.ppc.altivec.vsrb - ppc_altivec_vsrh, // llvm.ppc.altivec.vsrh - ppc_altivec_vsro, // llvm.ppc.altivec.vsro - ppc_altivec_vsrw, // llvm.ppc.altivec.vsrw - ppc_altivec_vsubcuq, // llvm.ppc.altivec.vsubcuq - ppc_altivec_vsubcuw, // llvm.ppc.altivec.vsubcuw - ppc_altivec_vsubecuq, // llvm.ppc.altivec.vsubecuq - ppc_altivec_vsubeuqm, // llvm.ppc.altivec.vsubeuqm - ppc_altivec_vsubsbs, // llvm.ppc.altivec.vsubsbs - ppc_altivec_vsubshs, // llvm.ppc.altivec.vsubshs - ppc_altivec_vsubsws, // llvm.ppc.altivec.vsubsws - ppc_altivec_vsububs, // llvm.ppc.altivec.vsububs - ppc_altivec_vsubuhs, // llvm.ppc.altivec.vsubuhs - ppc_altivec_vsubuws, // llvm.ppc.altivec.vsubuws - ppc_altivec_vsum2sws, // llvm.ppc.altivec.vsum2sws - ppc_altivec_vsum4sbs, // llvm.ppc.altivec.vsum4sbs - ppc_altivec_vsum4shs, // llvm.ppc.altivec.vsum4shs - ppc_altivec_vsum4ubs, // llvm.ppc.altivec.vsum4ubs - ppc_altivec_vsumsws, // llvm.ppc.altivec.vsumsws - ppc_altivec_vupkhpx, // llvm.ppc.altivec.vupkhpx - ppc_altivec_vupkhsb, // llvm.ppc.altivec.vupkhsb - ppc_altivec_vupkhsh, // llvm.ppc.altivec.vupkhsh - ppc_altivec_vupkhsw, // llvm.ppc.altivec.vupkhsw - ppc_altivec_vupklpx, // llvm.ppc.altivec.vupklpx - ppc_altivec_vupklsb, // llvm.ppc.altivec.vupklsb - ppc_altivec_vupklsh, // llvm.ppc.altivec.vupklsh - ppc_altivec_vupklsw, // llvm.ppc.altivec.vupklsw - ppc_bpermd, // llvm.ppc.bpermd - ppc_dcba, // llvm.ppc.dcba - ppc_dcbf, // llvm.ppc.dcbf - ppc_dcbi, // llvm.ppc.dcbi - ppc_dcbst, // llvm.ppc.dcbst - ppc_dcbt, // llvm.ppc.dcbt - ppc_dcbtst, // llvm.ppc.dcbtst - ppc_dcbz, // llvm.ppc.dcbz - ppc_dcbzl, // llvm.ppc.dcbzl - ppc_divde, // llvm.ppc.divde - ppc_divdeu, // llvm.ppc.divdeu - ppc_divwe, // llvm.ppc.divwe - ppc_divweu, // llvm.ppc.divweu - ppc_get_texasr, // llvm.ppc.get.texasr - ppc_get_texasru, // llvm.ppc.get.texasru - ppc_get_tfhar, // llvm.ppc.get.tfhar - ppc_get_tfiar, // llvm.ppc.get.tfiar - ppc_is_decremented_ctr_nonzero, // llvm.ppc.is.decremented.ctr.nonzero - ppc_lwsync, // llvm.ppc.lwsync - ppc_mtctr, // llvm.ppc.mtctr - ppc_qpx_qvfabs, // llvm.ppc.qpx.qvfabs - ppc_qpx_qvfadd, // llvm.ppc.qpx.qvfadd - ppc_qpx_qvfadds, // llvm.ppc.qpx.qvfadds - ppc_qpx_qvfcfid, // llvm.ppc.qpx.qvfcfid - ppc_qpx_qvfcfids, // llvm.ppc.qpx.qvfcfids - ppc_qpx_qvfcfidu, // llvm.ppc.qpx.qvfcfidu - ppc_qpx_qvfcfidus, // llvm.ppc.qpx.qvfcfidus - ppc_qpx_qvfcmpeq, // llvm.ppc.qpx.qvfcmpeq - ppc_qpx_qvfcmpgt, // llvm.ppc.qpx.qvfcmpgt - ppc_qpx_qvfcmplt, // llvm.ppc.qpx.qvfcmplt - ppc_qpx_qvfcpsgn, // llvm.ppc.qpx.qvfcpsgn - ppc_qpx_qvfctid, // llvm.ppc.qpx.qvfctid - ppc_qpx_qvfctidu, // llvm.ppc.qpx.qvfctidu - ppc_qpx_qvfctiduz, // llvm.ppc.qpx.qvfctiduz - ppc_qpx_qvfctidz, // llvm.ppc.qpx.qvfctidz - ppc_qpx_qvfctiw, // llvm.ppc.qpx.qvfctiw - ppc_qpx_qvfctiwu, // llvm.ppc.qpx.qvfctiwu - ppc_qpx_qvfctiwuz, // llvm.ppc.qpx.qvfctiwuz - ppc_qpx_qvfctiwz, // llvm.ppc.qpx.qvfctiwz - ppc_qpx_qvflogical, // llvm.ppc.qpx.qvflogical - ppc_qpx_qvfmadd, // llvm.ppc.qpx.qvfmadd - ppc_qpx_qvfmadds, // llvm.ppc.qpx.qvfmadds - ppc_qpx_qvfmsub, // llvm.ppc.qpx.qvfmsub - ppc_qpx_qvfmsubs, // llvm.ppc.qpx.qvfmsubs - ppc_qpx_qvfmul, // llvm.ppc.qpx.qvfmul - ppc_qpx_qvfmuls, // llvm.ppc.qpx.qvfmuls - ppc_qpx_qvfnabs, // llvm.ppc.qpx.qvfnabs - ppc_qpx_qvfneg, // llvm.ppc.qpx.qvfneg - ppc_qpx_qvfnmadd, // llvm.ppc.qpx.qvfnmadd - ppc_qpx_qvfnmadds, // llvm.ppc.qpx.qvfnmadds - ppc_qpx_qvfnmsub, // llvm.ppc.qpx.qvfnmsub - ppc_qpx_qvfnmsubs, // llvm.ppc.qpx.qvfnmsubs - ppc_qpx_qvfperm, // llvm.ppc.qpx.qvfperm - ppc_qpx_qvfre, // llvm.ppc.qpx.qvfre - ppc_qpx_qvfres, // llvm.ppc.qpx.qvfres - ppc_qpx_qvfrim, // llvm.ppc.qpx.qvfrim - ppc_qpx_qvfrin, // llvm.ppc.qpx.qvfrin - ppc_qpx_qvfrip, // llvm.ppc.qpx.qvfrip - ppc_qpx_qvfriz, // llvm.ppc.qpx.qvfriz - ppc_qpx_qvfrsp, // llvm.ppc.qpx.qvfrsp - ppc_qpx_qvfrsqrte, // llvm.ppc.qpx.qvfrsqrte - ppc_qpx_qvfrsqrtes, // llvm.ppc.qpx.qvfrsqrtes - ppc_qpx_qvfsel, // llvm.ppc.qpx.qvfsel - ppc_qpx_qvfsub, // llvm.ppc.qpx.qvfsub - ppc_qpx_qvfsubs, // llvm.ppc.qpx.qvfsubs - ppc_qpx_qvftstnan, // llvm.ppc.qpx.qvftstnan - ppc_qpx_qvfxmadd, // llvm.ppc.qpx.qvfxmadd - ppc_qpx_qvfxmadds, // llvm.ppc.qpx.qvfxmadds - ppc_qpx_qvfxmul, // llvm.ppc.qpx.qvfxmul - ppc_qpx_qvfxmuls, // llvm.ppc.qpx.qvfxmuls - ppc_qpx_qvfxxcpnmadd, // llvm.ppc.qpx.qvfxxcpnmadd - ppc_qpx_qvfxxcpnmadds, // llvm.ppc.qpx.qvfxxcpnmadds - ppc_qpx_qvfxxmadd, // llvm.ppc.qpx.qvfxxmadd - ppc_qpx_qvfxxmadds, // llvm.ppc.qpx.qvfxxmadds - ppc_qpx_qvfxxnpmadd, // llvm.ppc.qpx.qvfxxnpmadd - ppc_qpx_qvfxxnpmadds, // llvm.ppc.qpx.qvfxxnpmadds - ppc_qpx_qvgpci, // llvm.ppc.qpx.qvgpci - ppc_qpx_qvlfcd, // llvm.ppc.qpx.qvlfcd - ppc_qpx_qvlfcda, // llvm.ppc.qpx.qvlfcda - ppc_qpx_qvlfcs, // llvm.ppc.qpx.qvlfcs - ppc_qpx_qvlfcsa, // llvm.ppc.qpx.qvlfcsa - ppc_qpx_qvlfd, // llvm.ppc.qpx.qvlfd - ppc_qpx_qvlfda, // llvm.ppc.qpx.qvlfda - ppc_qpx_qvlfiwa, // llvm.ppc.qpx.qvlfiwa - ppc_qpx_qvlfiwaa, // llvm.ppc.qpx.qvlfiwaa - ppc_qpx_qvlfiwz, // llvm.ppc.qpx.qvlfiwz - ppc_qpx_qvlfiwza, // llvm.ppc.qpx.qvlfiwza - ppc_qpx_qvlfs, // llvm.ppc.qpx.qvlfs - ppc_qpx_qvlfsa, // llvm.ppc.qpx.qvlfsa - ppc_qpx_qvlpcld, // llvm.ppc.qpx.qvlpcld - ppc_qpx_qvlpcls, // llvm.ppc.qpx.qvlpcls - ppc_qpx_qvlpcrd, // llvm.ppc.qpx.qvlpcrd - ppc_qpx_qvlpcrs, // llvm.ppc.qpx.qvlpcrs - ppc_qpx_qvstfcd, // llvm.ppc.qpx.qvstfcd - ppc_qpx_qvstfcda, // llvm.ppc.qpx.qvstfcda - ppc_qpx_qvstfcs, // llvm.ppc.qpx.qvstfcs - ppc_qpx_qvstfcsa, // llvm.ppc.qpx.qvstfcsa - ppc_qpx_qvstfd, // llvm.ppc.qpx.qvstfd - ppc_qpx_qvstfda, // llvm.ppc.qpx.qvstfda - ppc_qpx_qvstfiw, // llvm.ppc.qpx.qvstfiw - ppc_qpx_qvstfiwa, // llvm.ppc.qpx.qvstfiwa - ppc_qpx_qvstfs, // llvm.ppc.qpx.qvstfs - ppc_qpx_qvstfsa, // llvm.ppc.qpx.qvstfsa - ppc_set_texasr, // llvm.ppc.set.texasr - ppc_set_texasru, // llvm.ppc.set.texasru - ppc_set_tfhar, // llvm.ppc.set.tfhar - ppc_set_tfiar, // llvm.ppc.set.tfiar - ppc_sync, // llvm.ppc.sync - ppc_tabort, // llvm.ppc.tabort - ppc_tabortdc, // llvm.ppc.tabortdc - ppc_tabortdci, // llvm.ppc.tabortdci - ppc_tabortwc, // llvm.ppc.tabortwc - ppc_tabortwci, // llvm.ppc.tabortwci - ppc_tbegin, // llvm.ppc.tbegin - ppc_tcheck, // llvm.ppc.tcheck - ppc_tend, // llvm.ppc.tend - ppc_tendall, // llvm.ppc.tendall - ppc_trechkpt, // llvm.ppc.trechkpt - ppc_treclaim, // llvm.ppc.treclaim - ppc_tresume, // llvm.ppc.tresume - ppc_tsr, // llvm.ppc.tsr - ppc_tsuspend, // llvm.ppc.tsuspend - ppc_ttest, // llvm.ppc.ttest - ppc_vsx_lxvd2x, // llvm.ppc.vsx.lxvd2x - ppc_vsx_lxvw4x, // llvm.ppc.vsx.lxvw4x - ppc_vsx_stxvd2x, // llvm.ppc.vsx.stxvd2x - ppc_vsx_stxvw4x, // llvm.ppc.vsx.stxvw4x - ppc_vsx_xsmaxdp, // llvm.ppc.vsx.xsmaxdp - ppc_vsx_xsmindp, // llvm.ppc.vsx.xsmindp - ppc_vsx_xvcmpeqdp, // llvm.ppc.vsx.xvcmpeqdp - ppc_vsx_xvcmpeqdp_p, // llvm.ppc.vsx.xvcmpeqdp.p - ppc_vsx_xvcmpeqsp, // llvm.ppc.vsx.xvcmpeqsp - ppc_vsx_xvcmpeqsp_p, // llvm.ppc.vsx.xvcmpeqsp.p - ppc_vsx_xvcmpgedp, // llvm.ppc.vsx.xvcmpgedp - ppc_vsx_xvcmpgedp_p, // llvm.ppc.vsx.xvcmpgedp.p - ppc_vsx_xvcmpgesp, // llvm.ppc.vsx.xvcmpgesp - ppc_vsx_xvcmpgesp_p, // llvm.ppc.vsx.xvcmpgesp.p - ppc_vsx_xvcmpgtdp, // llvm.ppc.vsx.xvcmpgtdp - ppc_vsx_xvcmpgtdp_p, // llvm.ppc.vsx.xvcmpgtdp.p - ppc_vsx_xvcmpgtsp, // llvm.ppc.vsx.xvcmpgtsp - ppc_vsx_xvcmpgtsp_p, // llvm.ppc.vsx.xvcmpgtsp.p - ppc_vsx_xvdivdp, // llvm.ppc.vsx.xvdivdp - ppc_vsx_xvdivsp, // llvm.ppc.vsx.xvdivsp - ppc_vsx_xvmaxdp, // llvm.ppc.vsx.xvmaxdp - ppc_vsx_xvmaxsp, // llvm.ppc.vsx.xvmaxsp - ppc_vsx_xvmindp, // llvm.ppc.vsx.xvmindp - ppc_vsx_xvminsp, // llvm.ppc.vsx.xvminsp - ppc_vsx_xvrdpip, // llvm.ppc.vsx.xvrdpip - ppc_vsx_xvredp, // llvm.ppc.vsx.xvredp - ppc_vsx_xvresp, // llvm.ppc.vsx.xvresp - ppc_vsx_xvrspip, // llvm.ppc.vsx.xvrspip - ppc_vsx_xvrsqrtedp, // llvm.ppc.vsx.xvrsqrtedp - ppc_vsx_xvrsqrtesp, // llvm.ppc.vsx.xvrsqrtesp - ppc_vsx_xxleqv, // llvm.ppc.vsx.xxleqv - r600_group_barrier, // llvm.r600.group.barrier - r600_implicitarg_ptr, // llvm.r600.implicitarg.ptr - r600_rat_store_typed, // llvm.r600.rat.store.typed - r600_read_global_size_x, // llvm.r600.read.global.size.x - r600_read_global_size_y, // llvm.r600.read.global.size.y - r600_read_global_size_z, // llvm.r600.read.global.size.z - r600_read_local_size_x, // llvm.r600.read.local.size.x - r600_read_local_size_y, // llvm.r600.read.local.size.y - r600_read_local_size_z, // llvm.r600.read.local.size.z - r600_read_ngroups_x, // llvm.r600.read.ngroups.x - r600_read_ngroups_y, // llvm.r600.read.ngroups.y - r600_read_ngroups_z, // llvm.r600.read.ngroups.z - r600_read_tgid_x, // llvm.r600.read.tgid.x - r600_read_tgid_y, // llvm.r600.read.tgid.y - r600_read_tgid_z, // llvm.r600.read.tgid.z - r600_read_tidig_x, // llvm.r600.read.tidig.x - r600_read_tidig_y, // llvm.r600.read.tidig.y - r600_read_tidig_z, // llvm.r600.read.tidig.z - r600_read_workdim, // llvm.r600.read.workdim - r600_recipsqrt_clamped, // llvm.r600.recipsqrt.clamped - r600_recipsqrt_ieee, // llvm.r600.recipsqrt.ieee - s390_etnd, // llvm.s390.etnd - s390_lcbb, // llvm.s390.lcbb - s390_ntstg, // llvm.s390.ntstg - s390_ppa_txassist, // llvm.s390.ppa.txassist - s390_tabort, // llvm.s390.tabort - s390_tbegin, // llvm.s390.tbegin - s390_tbegin_nofloat, // llvm.s390.tbegin.nofloat - s390_tbeginc, // llvm.s390.tbeginc - s390_tdc, // llvm.s390.tdc - s390_tend, // llvm.s390.tend - s390_vaccb, // llvm.s390.vaccb - s390_vacccq, // llvm.s390.vacccq - s390_vaccf, // llvm.s390.vaccf - s390_vaccg, // llvm.s390.vaccg - s390_vacch, // llvm.s390.vacch - s390_vaccq, // llvm.s390.vaccq - s390_vacq, // llvm.s390.vacq - s390_vaq, // llvm.s390.vaq - s390_vavgb, // llvm.s390.vavgb - s390_vavgf, // llvm.s390.vavgf - s390_vavgg, // llvm.s390.vavgg - s390_vavgh, // llvm.s390.vavgh - s390_vavglb, // llvm.s390.vavglb - s390_vavglf, // llvm.s390.vavglf - s390_vavglg, // llvm.s390.vavglg - s390_vavglh, // llvm.s390.vavglh - s390_vceqbs, // llvm.s390.vceqbs - s390_vceqfs, // llvm.s390.vceqfs - s390_vceqgs, // llvm.s390.vceqgs - s390_vceqhs, // llvm.s390.vceqhs - s390_vchbs, // llvm.s390.vchbs - s390_vchfs, // llvm.s390.vchfs - s390_vchgs, // llvm.s390.vchgs - s390_vchhs, // llvm.s390.vchhs - s390_vchlbs, // llvm.s390.vchlbs - s390_vchlfs, // llvm.s390.vchlfs - s390_vchlgs, // llvm.s390.vchlgs - s390_vchlhs, // llvm.s390.vchlhs - s390_vcksm, // llvm.s390.vcksm - s390_verimb, // llvm.s390.verimb - s390_verimf, // llvm.s390.verimf - s390_verimg, // llvm.s390.verimg - s390_verimh, // llvm.s390.verimh - s390_verllb, // llvm.s390.verllb - s390_verllf, // llvm.s390.verllf - s390_verllg, // llvm.s390.verllg - s390_verllh, // llvm.s390.verllh - s390_verllvb, // llvm.s390.verllvb - s390_verllvf, // llvm.s390.verllvf - s390_verllvg, // llvm.s390.verllvg - s390_verllvh, // llvm.s390.verllvh - s390_vfaeb, // llvm.s390.vfaeb - s390_vfaebs, // llvm.s390.vfaebs - s390_vfaef, // llvm.s390.vfaef - s390_vfaefs, // llvm.s390.vfaefs - s390_vfaeh, // llvm.s390.vfaeh - s390_vfaehs, // llvm.s390.vfaehs - s390_vfaezb, // llvm.s390.vfaezb - s390_vfaezbs, // llvm.s390.vfaezbs - s390_vfaezf, // llvm.s390.vfaezf - s390_vfaezfs, // llvm.s390.vfaezfs - s390_vfaezh, // llvm.s390.vfaezh - s390_vfaezhs, // llvm.s390.vfaezhs - s390_vfcedbs, // llvm.s390.vfcedbs - s390_vfchdbs, // llvm.s390.vfchdbs - s390_vfchedbs, // llvm.s390.vfchedbs - s390_vfeeb, // llvm.s390.vfeeb - s390_vfeebs, // llvm.s390.vfeebs - s390_vfeef, // llvm.s390.vfeef - s390_vfeefs, // llvm.s390.vfeefs - s390_vfeeh, // llvm.s390.vfeeh - s390_vfeehs, // llvm.s390.vfeehs - s390_vfeezb, // llvm.s390.vfeezb - s390_vfeezbs, // llvm.s390.vfeezbs - s390_vfeezf, // llvm.s390.vfeezf - s390_vfeezfs, // llvm.s390.vfeezfs - s390_vfeezh, // llvm.s390.vfeezh - s390_vfeezhs, // llvm.s390.vfeezhs - s390_vfeneb, // llvm.s390.vfeneb - s390_vfenebs, // llvm.s390.vfenebs - s390_vfenef, // llvm.s390.vfenef - s390_vfenefs, // llvm.s390.vfenefs - s390_vfeneh, // llvm.s390.vfeneh - s390_vfenehs, // llvm.s390.vfenehs - s390_vfenezb, // llvm.s390.vfenezb - s390_vfenezbs, // llvm.s390.vfenezbs - s390_vfenezf, // llvm.s390.vfenezf - s390_vfenezfs, // llvm.s390.vfenezfs - s390_vfenezh, // llvm.s390.vfenezh - s390_vfenezhs, // llvm.s390.vfenezhs - s390_vfidb, // llvm.s390.vfidb - s390_vftcidb, // llvm.s390.vftcidb - s390_vgfmab, // llvm.s390.vgfmab - s390_vgfmaf, // llvm.s390.vgfmaf - s390_vgfmag, // llvm.s390.vgfmag - s390_vgfmah, // llvm.s390.vgfmah - s390_vgfmb, // llvm.s390.vgfmb - s390_vgfmf, // llvm.s390.vgfmf - s390_vgfmg, // llvm.s390.vgfmg - s390_vgfmh, // llvm.s390.vgfmh - s390_vistrb, // llvm.s390.vistrb - s390_vistrbs, // llvm.s390.vistrbs - s390_vistrf, // llvm.s390.vistrf - s390_vistrfs, // llvm.s390.vistrfs - s390_vistrh, // llvm.s390.vistrh - s390_vistrhs, // llvm.s390.vistrhs - s390_vlbb, // llvm.s390.vlbb - s390_vll, // llvm.s390.vll - s390_vmaeb, // llvm.s390.vmaeb - s390_vmaef, // llvm.s390.vmaef - s390_vmaeh, // llvm.s390.vmaeh - s390_vmahb, // llvm.s390.vmahb - s390_vmahf, // llvm.s390.vmahf - s390_vmahh, // llvm.s390.vmahh - s390_vmaleb, // llvm.s390.vmaleb - s390_vmalef, // llvm.s390.vmalef - s390_vmaleh, // llvm.s390.vmaleh - s390_vmalhb, // llvm.s390.vmalhb - s390_vmalhf, // llvm.s390.vmalhf - s390_vmalhh, // llvm.s390.vmalhh - s390_vmalob, // llvm.s390.vmalob - s390_vmalof, // llvm.s390.vmalof - s390_vmaloh, // llvm.s390.vmaloh - s390_vmaob, // llvm.s390.vmaob - s390_vmaof, // llvm.s390.vmaof - s390_vmaoh, // llvm.s390.vmaoh - s390_vmeb, // llvm.s390.vmeb - s390_vmef, // llvm.s390.vmef - s390_vmeh, // llvm.s390.vmeh - s390_vmhb, // llvm.s390.vmhb - s390_vmhf, // llvm.s390.vmhf - s390_vmhh, // llvm.s390.vmhh - s390_vmleb, // llvm.s390.vmleb - s390_vmlef, // llvm.s390.vmlef - s390_vmleh, // llvm.s390.vmleh - s390_vmlhb, // llvm.s390.vmlhb - s390_vmlhf, // llvm.s390.vmlhf - s390_vmlhh, // llvm.s390.vmlhh - s390_vmlob, // llvm.s390.vmlob - s390_vmlof, // llvm.s390.vmlof - s390_vmloh, // llvm.s390.vmloh - s390_vmob, // llvm.s390.vmob - s390_vmof, // llvm.s390.vmof - s390_vmoh, // llvm.s390.vmoh - s390_vpdi, // llvm.s390.vpdi - s390_vperm, // llvm.s390.vperm - s390_vpklsf, // llvm.s390.vpklsf - s390_vpklsfs, // llvm.s390.vpklsfs - s390_vpklsg, // llvm.s390.vpklsg - s390_vpklsgs, // llvm.s390.vpklsgs - s390_vpklsh, // llvm.s390.vpklsh - s390_vpklshs, // llvm.s390.vpklshs - s390_vpksf, // llvm.s390.vpksf - s390_vpksfs, // llvm.s390.vpksfs - s390_vpksg, // llvm.s390.vpksg - s390_vpksgs, // llvm.s390.vpksgs - s390_vpksh, // llvm.s390.vpksh - s390_vpkshs, // llvm.s390.vpkshs - s390_vsbcbiq, // llvm.s390.vsbcbiq - s390_vsbiq, // llvm.s390.vsbiq - s390_vscbib, // llvm.s390.vscbib - s390_vscbif, // llvm.s390.vscbif - s390_vscbig, // llvm.s390.vscbig - s390_vscbih, // llvm.s390.vscbih - s390_vscbiq, // llvm.s390.vscbiq - s390_vsl, // llvm.s390.vsl - s390_vslb, // llvm.s390.vslb - s390_vsldb, // llvm.s390.vsldb - s390_vsq, // llvm.s390.vsq - s390_vsra, // llvm.s390.vsra - s390_vsrab, // llvm.s390.vsrab - s390_vsrl, // llvm.s390.vsrl - s390_vsrlb, // llvm.s390.vsrlb - s390_vstl, // llvm.s390.vstl - s390_vstrcb, // llvm.s390.vstrcb - s390_vstrcbs, // llvm.s390.vstrcbs - s390_vstrcf, // llvm.s390.vstrcf - s390_vstrcfs, // llvm.s390.vstrcfs - s390_vstrch, // llvm.s390.vstrch - s390_vstrchs, // llvm.s390.vstrchs - s390_vstrczb, // llvm.s390.vstrczb - s390_vstrczbs, // llvm.s390.vstrczbs - s390_vstrczf, // llvm.s390.vstrczf - s390_vstrczfs, // llvm.s390.vstrczfs - s390_vstrczh, // llvm.s390.vstrczh - s390_vstrczhs, // llvm.s390.vstrczhs - s390_vsumb, // llvm.s390.vsumb - s390_vsumgf, // llvm.s390.vsumgf - s390_vsumgh, // llvm.s390.vsumgh - s390_vsumh, // llvm.s390.vsumh - s390_vsumqf, // llvm.s390.vsumqf - s390_vsumqg, // llvm.s390.vsumqg - s390_vtm, // llvm.s390.vtm - s390_vuphb, // llvm.s390.vuphb - s390_vuphf, // llvm.s390.vuphf - s390_vuphh, // llvm.s390.vuphh - s390_vuplb, // llvm.s390.vuplb - s390_vuplf, // llvm.s390.vuplf - s390_vuplhb, // llvm.s390.vuplhb - s390_vuplhf, // llvm.s390.vuplhf - s390_vuplhh, // llvm.s390.vuplhh - s390_vuplhw, // llvm.s390.vuplhw - s390_vupllb, // llvm.s390.vupllb - s390_vupllf, // llvm.s390.vupllf - s390_vupllh, // llvm.s390.vupllh - wasm_current_memory, // llvm.wasm.current.memory - wasm_grow_memory, // llvm.wasm.grow.memory - x86_3dnow_pavgusb, // llvm.x86.3dnow.pavgusb - x86_3dnow_pf2id, // llvm.x86.3dnow.pf2id - x86_3dnow_pfacc, // llvm.x86.3dnow.pfacc - x86_3dnow_pfadd, // llvm.x86.3dnow.pfadd - x86_3dnow_pfcmpeq, // llvm.x86.3dnow.pfcmpeq - x86_3dnow_pfcmpge, // llvm.x86.3dnow.pfcmpge - x86_3dnow_pfcmpgt, // llvm.x86.3dnow.pfcmpgt - x86_3dnow_pfmax, // llvm.x86.3dnow.pfmax - x86_3dnow_pfmin, // llvm.x86.3dnow.pfmin - x86_3dnow_pfmul, // llvm.x86.3dnow.pfmul - x86_3dnow_pfrcp, // llvm.x86.3dnow.pfrcp - x86_3dnow_pfrcpit1, // llvm.x86.3dnow.pfrcpit1 - x86_3dnow_pfrcpit2, // llvm.x86.3dnow.pfrcpit2 - x86_3dnow_pfrsqit1, // llvm.x86.3dnow.pfrsqit1 - x86_3dnow_pfrsqrt, // llvm.x86.3dnow.pfrsqrt - x86_3dnow_pfsub, // llvm.x86.3dnow.pfsub - x86_3dnow_pfsubr, // llvm.x86.3dnow.pfsubr - x86_3dnow_pi2fd, // llvm.x86.3dnow.pi2fd - x86_3dnow_pmulhrw, // llvm.x86.3dnow.pmulhrw - x86_3dnowa_pf2iw, // llvm.x86.3dnowa.pf2iw - x86_3dnowa_pfnacc, // llvm.x86.3dnowa.pfnacc - x86_3dnowa_pfpnacc, // llvm.x86.3dnowa.pfpnacc - x86_3dnowa_pi2fw, // llvm.x86.3dnowa.pi2fw - x86_3dnowa_pswapd, // llvm.x86.3dnowa.pswapd - x86_addcarry_u32, // llvm.x86.addcarry.u32 - x86_addcarry_u64, // llvm.x86.addcarry.u64 - x86_addcarryx_u32, // llvm.x86.addcarryx.u32 - x86_addcarryx_u64, // llvm.x86.addcarryx.u64 - x86_aesni_aesdec, // llvm.x86.aesni.aesdec - x86_aesni_aesdeclast, // llvm.x86.aesni.aesdeclast - x86_aesni_aesenc, // llvm.x86.aesni.aesenc - x86_aesni_aesenclast, // llvm.x86.aesni.aesenclast - x86_aesni_aesimc, // llvm.x86.aesni.aesimc - x86_aesni_aeskeygenassist, // llvm.x86.aesni.aeskeygenassist - x86_avx_addsub_pd_256, // llvm.x86.avx.addsub.pd.256 - x86_avx_addsub_ps_256, // llvm.x86.avx.addsub.ps.256 - x86_avx_blendv_pd_256, // llvm.x86.avx.blendv.pd.256 - x86_avx_blendv_ps_256, // llvm.x86.avx.blendv.ps.256 - x86_avx_cmp_pd_256, // llvm.x86.avx.cmp.pd.256 - x86_avx_cmp_ps_256, // llvm.x86.avx.cmp.ps.256 - x86_avx_cvt_pd2_ps_256, // llvm.x86.avx.cvt.pd2.ps.256 - x86_avx_cvt_pd2dq_256, // llvm.x86.avx.cvt.pd2dq.256 - x86_avx_cvt_ps2dq_256, // llvm.x86.avx.cvt.ps2dq.256 - x86_avx_cvtdq2_ps_256, // llvm.x86.avx.cvtdq2.ps.256 - x86_avx_cvtt_pd2dq_256, // llvm.x86.avx.cvtt.pd2dq.256 - x86_avx_cvtt_ps2dq_256, // llvm.x86.avx.cvtt.ps2dq.256 - x86_avx_dp_ps_256, // llvm.x86.avx.dp.ps.256 - x86_avx_hadd_pd_256, // llvm.x86.avx.hadd.pd.256 - x86_avx_hadd_ps_256, // llvm.x86.avx.hadd.ps.256 - x86_avx_hsub_pd_256, // llvm.x86.avx.hsub.pd.256 - x86_avx_hsub_ps_256, // llvm.x86.avx.hsub.ps.256 - x86_avx_ldu_dq_256, // llvm.x86.avx.ldu.dq.256 - x86_avx_maskload_pd, // llvm.x86.avx.maskload.pd - x86_avx_maskload_pd_256, // llvm.x86.avx.maskload.pd.256 - x86_avx_maskload_ps, // llvm.x86.avx.maskload.ps - x86_avx_maskload_ps_256, // llvm.x86.avx.maskload.ps.256 - x86_avx_maskstore_pd, // llvm.x86.avx.maskstore.pd - x86_avx_maskstore_pd_256, // llvm.x86.avx.maskstore.pd.256 - x86_avx_maskstore_ps, // llvm.x86.avx.maskstore.ps - x86_avx_maskstore_ps_256, // llvm.x86.avx.maskstore.ps.256 - x86_avx_max_pd_256, // llvm.x86.avx.max.pd.256 - x86_avx_max_ps_256, // llvm.x86.avx.max.ps.256 - x86_avx_min_pd_256, // llvm.x86.avx.min.pd.256 - x86_avx_min_ps_256, // llvm.x86.avx.min.ps.256 - x86_avx_movmsk_pd_256, // llvm.x86.avx.movmsk.pd.256 - x86_avx_movmsk_ps_256, // llvm.x86.avx.movmsk.ps.256 - x86_avx_ptestc_256, // llvm.x86.avx.ptestc.256 - x86_avx_ptestnzc_256, // llvm.x86.avx.ptestnzc.256 - x86_avx_ptestz_256, // llvm.x86.avx.ptestz.256 - x86_avx_rcp_ps_256, // llvm.x86.avx.rcp.ps.256 - x86_avx_round_pd_256, // llvm.x86.avx.round.pd.256 - x86_avx_round_ps_256, // llvm.x86.avx.round.ps.256 - x86_avx_rsqrt_ps_256, // llvm.x86.avx.rsqrt.ps.256 - x86_avx_sqrt_pd_256, // llvm.x86.avx.sqrt.pd.256 - x86_avx_sqrt_ps_256, // llvm.x86.avx.sqrt.ps.256 - x86_avx_vbroadcastf128_pd_256, // llvm.x86.avx.vbroadcastf128.pd.256 - x86_avx_vbroadcastf128_ps_256, // llvm.x86.avx.vbroadcastf128.ps.256 - x86_avx_vperm2f128_pd_256, // llvm.x86.avx.vperm2f128.pd.256 - x86_avx_vperm2f128_ps_256, // llvm.x86.avx.vperm2f128.ps.256 - x86_avx_vperm2f128_si_256, // llvm.x86.avx.vperm2f128.si.256 - x86_avx_vpermilvar_pd, // llvm.x86.avx.vpermilvar.pd - x86_avx_vpermilvar_pd_256, // llvm.x86.avx.vpermilvar.pd.256 - x86_avx_vpermilvar_ps, // llvm.x86.avx.vpermilvar.ps - x86_avx_vpermilvar_ps_256, // llvm.x86.avx.vpermilvar.ps.256 - x86_avx_vtestc_pd, // llvm.x86.avx.vtestc.pd - x86_avx_vtestc_pd_256, // llvm.x86.avx.vtestc.pd.256 - x86_avx_vtestc_ps, // llvm.x86.avx.vtestc.ps - x86_avx_vtestc_ps_256, // llvm.x86.avx.vtestc.ps.256 - x86_avx_vtestnzc_pd, // llvm.x86.avx.vtestnzc.pd - x86_avx_vtestnzc_pd_256, // llvm.x86.avx.vtestnzc.pd.256 - x86_avx_vtestnzc_ps, // llvm.x86.avx.vtestnzc.ps - x86_avx_vtestnzc_ps_256, // llvm.x86.avx.vtestnzc.ps.256 - x86_avx_vtestz_pd, // llvm.x86.avx.vtestz.pd - x86_avx_vtestz_pd_256, // llvm.x86.avx.vtestz.pd.256 - x86_avx_vtestz_ps, // llvm.x86.avx.vtestz.ps - x86_avx_vtestz_ps_256, // llvm.x86.avx.vtestz.ps.256 - x86_avx_vzeroall, // llvm.x86.avx.vzeroall - x86_avx_vzeroupper, // llvm.x86.avx.vzeroupper - x86_avx2_gather_d_d, // llvm.x86.avx2.gather.d.d - x86_avx2_gather_d_d_256, // llvm.x86.avx2.gather.d.d.256 - x86_avx2_gather_d_pd, // llvm.x86.avx2.gather.d.pd - x86_avx2_gather_d_pd_256, // llvm.x86.avx2.gather.d.pd.256 - x86_avx2_gather_d_ps, // llvm.x86.avx2.gather.d.ps - x86_avx2_gather_d_ps_256, // llvm.x86.avx2.gather.d.ps.256 - x86_avx2_gather_d_q, // llvm.x86.avx2.gather.d.q - x86_avx2_gather_d_q_256, // llvm.x86.avx2.gather.d.q.256 - x86_avx2_gather_q_d, // llvm.x86.avx2.gather.q.d - x86_avx2_gather_q_d_256, // llvm.x86.avx2.gather.q.d.256 - x86_avx2_gather_q_pd, // llvm.x86.avx2.gather.q.pd - x86_avx2_gather_q_pd_256, // llvm.x86.avx2.gather.q.pd.256 - x86_avx2_gather_q_ps, // llvm.x86.avx2.gather.q.ps - x86_avx2_gather_q_ps_256, // llvm.x86.avx2.gather.q.ps.256 - x86_avx2_gather_q_q, // llvm.x86.avx2.gather.q.q - x86_avx2_gather_q_q_256, // llvm.x86.avx2.gather.q.q.256 - x86_avx2_maskload_d, // llvm.x86.avx2.maskload.d - x86_avx2_maskload_d_256, // llvm.x86.avx2.maskload.d.256 - x86_avx2_maskload_q, // llvm.x86.avx2.maskload.q - x86_avx2_maskload_q_256, // llvm.x86.avx2.maskload.q.256 - x86_avx2_maskstore_d, // llvm.x86.avx2.maskstore.d - x86_avx2_maskstore_d_256, // llvm.x86.avx2.maskstore.d.256 - x86_avx2_maskstore_q, // llvm.x86.avx2.maskstore.q - x86_avx2_maskstore_q_256, // llvm.x86.avx2.maskstore.q.256 - x86_avx2_movntdqa, // llvm.x86.avx2.movntdqa - x86_avx2_mpsadbw, // llvm.x86.avx2.mpsadbw - x86_avx2_pabs_b, // llvm.x86.avx2.pabs.b - x86_avx2_pabs_d, // llvm.x86.avx2.pabs.d - x86_avx2_pabs_w, // llvm.x86.avx2.pabs.w - x86_avx2_packssdw, // llvm.x86.avx2.packssdw - x86_avx2_packsswb, // llvm.x86.avx2.packsswb - x86_avx2_packusdw, // llvm.x86.avx2.packusdw - x86_avx2_packuswb, // llvm.x86.avx2.packuswb - x86_avx2_padds_b, // llvm.x86.avx2.padds.b - x86_avx2_padds_w, // llvm.x86.avx2.padds.w - x86_avx2_paddus_b, // llvm.x86.avx2.paddus.b - x86_avx2_paddus_w, // llvm.x86.avx2.paddus.w - x86_avx2_pavg_b, // llvm.x86.avx2.pavg.b - x86_avx2_pavg_w, // llvm.x86.avx2.pavg.w - x86_avx2_pblendvb, // llvm.x86.avx2.pblendvb - x86_avx2_permd, // llvm.x86.avx2.permd - x86_avx2_permps, // llvm.x86.avx2.permps - x86_avx2_phadd_d, // llvm.x86.avx2.phadd.d - x86_avx2_phadd_sw, // llvm.x86.avx2.phadd.sw - x86_avx2_phadd_w, // llvm.x86.avx2.phadd.w - x86_avx2_phsub_d, // llvm.x86.avx2.phsub.d - x86_avx2_phsub_sw, // llvm.x86.avx2.phsub.sw - x86_avx2_phsub_w, // llvm.x86.avx2.phsub.w - x86_avx2_pmadd_ub_sw, // llvm.x86.avx2.pmadd.ub.sw - x86_avx2_pmadd_wd, // llvm.x86.avx2.pmadd.wd - x86_avx2_pmovmskb, // llvm.x86.avx2.pmovmskb - x86_avx2_pmul_dq, // llvm.x86.avx2.pmul.dq - x86_avx2_pmul_hr_sw, // llvm.x86.avx2.pmul.hr.sw - x86_avx2_pmulh_w, // llvm.x86.avx2.pmulh.w - x86_avx2_pmulhu_w, // llvm.x86.avx2.pmulhu.w - x86_avx2_pmulu_dq, // llvm.x86.avx2.pmulu.dq - x86_avx2_psad_bw, // llvm.x86.avx2.psad.bw - x86_avx2_pshuf_b, // llvm.x86.avx2.pshuf.b - x86_avx2_psign_b, // llvm.x86.avx2.psign.b - x86_avx2_psign_d, // llvm.x86.avx2.psign.d - x86_avx2_psign_w, // llvm.x86.avx2.psign.w - x86_avx2_psll_d, // llvm.x86.avx2.psll.d - x86_avx2_psll_q, // llvm.x86.avx2.psll.q - x86_avx2_psll_w, // llvm.x86.avx2.psll.w - x86_avx2_pslli_d, // llvm.x86.avx2.pslli.d - x86_avx2_pslli_q, // llvm.x86.avx2.pslli.q - x86_avx2_pslli_w, // llvm.x86.avx2.pslli.w - x86_avx2_psllv_d, // llvm.x86.avx2.psllv.d - x86_avx2_psllv_d_256, // llvm.x86.avx2.psllv.d.256 - x86_avx2_psllv_q, // llvm.x86.avx2.psllv.q - x86_avx2_psllv_q_256, // llvm.x86.avx2.psllv.q.256 - x86_avx2_psra_d, // llvm.x86.avx2.psra.d - x86_avx2_psra_w, // llvm.x86.avx2.psra.w - x86_avx2_psrai_d, // llvm.x86.avx2.psrai.d - x86_avx2_psrai_w, // llvm.x86.avx2.psrai.w - x86_avx2_psrav_d, // llvm.x86.avx2.psrav.d - x86_avx2_psrav_d_256, // llvm.x86.avx2.psrav.d.256 - x86_avx2_psrl_d, // llvm.x86.avx2.psrl.d - x86_avx2_psrl_q, // llvm.x86.avx2.psrl.q - x86_avx2_psrl_w, // llvm.x86.avx2.psrl.w - x86_avx2_psrli_d, // llvm.x86.avx2.psrli.d - x86_avx2_psrli_q, // llvm.x86.avx2.psrli.q - x86_avx2_psrli_w, // llvm.x86.avx2.psrli.w - x86_avx2_psrlv_d, // llvm.x86.avx2.psrlv.d - x86_avx2_psrlv_d_256, // llvm.x86.avx2.psrlv.d.256 - x86_avx2_psrlv_q, // llvm.x86.avx2.psrlv.q - x86_avx2_psrlv_q_256, // llvm.x86.avx2.psrlv.q.256 - x86_avx2_psubs_b, // llvm.x86.avx2.psubs.b - x86_avx2_psubs_w, // llvm.x86.avx2.psubs.w - x86_avx2_psubus_b, // llvm.x86.avx2.psubus.b - x86_avx2_psubus_w, // llvm.x86.avx2.psubus.w - x86_avx2_vperm2i128, // llvm.x86.avx2.vperm2i128 - x86_avx512_broadcastmb_128, // llvm.x86.avx512.broadcastmb.128 - x86_avx512_broadcastmb_256, // llvm.x86.avx512.broadcastmb.256 - x86_avx512_broadcastmb_512, // llvm.x86.avx512.broadcastmb.512 - x86_avx512_broadcastmw_128, // llvm.x86.avx512.broadcastmw.128 - x86_avx512_broadcastmw_256, // llvm.x86.avx512.broadcastmw.256 - x86_avx512_broadcastmw_512, // llvm.x86.avx512.broadcastmw.512 - x86_avx512_cvtb2mask_128, // llvm.x86.avx512.cvtb2mask.128 - x86_avx512_cvtb2mask_256, // llvm.x86.avx512.cvtb2mask.256 - x86_avx512_cvtb2mask_512, // llvm.x86.avx512.cvtb2mask.512 - x86_avx512_cvtd2mask_128, // llvm.x86.avx512.cvtd2mask.128 - x86_avx512_cvtd2mask_256, // llvm.x86.avx512.cvtd2mask.256 - x86_avx512_cvtd2mask_512, // llvm.x86.avx512.cvtd2mask.512 - x86_avx512_cvtmask2b_128, // llvm.x86.avx512.cvtmask2b.128 - x86_avx512_cvtmask2b_256, // llvm.x86.avx512.cvtmask2b.256 - x86_avx512_cvtmask2b_512, // llvm.x86.avx512.cvtmask2b.512 - x86_avx512_cvtmask2d_128, // llvm.x86.avx512.cvtmask2d.128 - x86_avx512_cvtmask2d_256, // llvm.x86.avx512.cvtmask2d.256 - x86_avx512_cvtmask2d_512, // llvm.x86.avx512.cvtmask2d.512 - x86_avx512_cvtmask2q_128, // llvm.x86.avx512.cvtmask2q.128 - x86_avx512_cvtmask2q_256, // llvm.x86.avx512.cvtmask2q.256 - x86_avx512_cvtmask2q_512, // llvm.x86.avx512.cvtmask2q.512 - x86_avx512_cvtmask2w_128, // llvm.x86.avx512.cvtmask2w.128 - x86_avx512_cvtmask2w_256, // llvm.x86.avx512.cvtmask2w.256 - x86_avx512_cvtmask2w_512, // llvm.x86.avx512.cvtmask2w.512 - x86_avx512_cvtq2mask_128, // llvm.x86.avx512.cvtq2mask.128 - x86_avx512_cvtq2mask_256, // llvm.x86.avx512.cvtq2mask.256 - x86_avx512_cvtq2mask_512, // llvm.x86.avx512.cvtq2mask.512 - x86_avx512_cvtsi2sd32, // llvm.x86.avx512.cvtsi2sd32 - x86_avx512_cvtsi2sd64, // llvm.x86.avx512.cvtsi2sd64 - x86_avx512_cvtsi2ss32, // llvm.x86.avx512.cvtsi2ss32 - x86_avx512_cvtsi2ss64, // llvm.x86.avx512.cvtsi2ss64 - x86_avx512_cvttsd2si, // llvm.x86.avx512.cvttsd2si - x86_avx512_cvttsd2si64, // llvm.x86.avx512.cvttsd2si64 - x86_avx512_cvttsd2usi, // llvm.x86.avx512.cvttsd2usi - x86_avx512_cvttsd2usi64, // llvm.x86.avx512.cvttsd2usi64 - x86_avx512_cvttss2si, // llvm.x86.avx512.cvttss2si - x86_avx512_cvttss2si64, // llvm.x86.avx512.cvttss2si64 - x86_avx512_cvttss2usi, // llvm.x86.avx512.cvttss2usi - x86_avx512_cvttss2usi64, // llvm.x86.avx512.cvttss2usi64 - x86_avx512_cvtusi2sd, // llvm.x86.avx512.cvtusi2sd - x86_avx512_cvtusi2ss, // llvm.x86.avx512.cvtusi2ss - x86_avx512_cvtusi642sd, // llvm.x86.avx512.cvtusi642sd - x86_avx512_cvtusi642ss, // llvm.x86.avx512.cvtusi642ss - x86_avx512_cvtw2mask_128, // llvm.x86.avx512.cvtw2mask.128 - x86_avx512_cvtw2mask_256, // llvm.x86.avx512.cvtw2mask.256 - x86_avx512_cvtw2mask_512, // llvm.x86.avx512.cvtw2mask.512 - x86_avx512_exp2_pd, // llvm.x86.avx512.exp2.pd - x86_avx512_exp2_ps, // llvm.x86.avx512.exp2.ps - x86_avx512_gather_dpd_512, // llvm.x86.avx512.gather.dpd.512 - x86_avx512_gather_dpi_512, // llvm.x86.avx512.gather.dpi.512 - x86_avx512_gather_dpq_512, // llvm.x86.avx512.gather.dpq.512 - x86_avx512_gather_dps_512, // llvm.x86.avx512.gather.dps.512 - x86_avx512_gather_qpd_512, // llvm.x86.avx512.gather.qpd.512 - x86_avx512_gather_qpi_512, // llvm.x86.avx512.gather.qpi.512 - x86_avx512_gather_qpq_512, // llvm.x86.avx512.gather.qpq.512 - x86_avx512_gather_qps_512, // llvm.x86.avx512.gather.qps.512 - x86_avx512_gather3div2_df, // llvm.x86.avx512.gather3div2.df - x86_avx512_gather3div2_di, // llvm.x86.avx512.gather3div2.di - x86_avx512_gather3div4_df, // llvm.x86.avx512.gather3div4.df - x86_avx512_gather3div4_di, // llvm.x86.avx512.gather3div4.di - x86_avx512_gather3div4_sf, // llvm.x86.avx512.gather3div4.sf - x86_avx512_gather3div4_si, // llvm.x86.avx512.gather3div4.si - x86_avx512_gather3div8_sf, // llvm.x86.avx512.gather3div8.sf - x86_avx512_gather3div8_si, // llvm.x86.avx512.gather3div8.si - x86_avx512_gather3siv2_df, // llvm.x86.avx512.gather3siv2.df - x86_avx512_gather3siv2_di, // llvm.x86.avx512.gather3siv2.di - x86_avx512_gather3siv4_df, // llvm.x86.avx512.gather3siv4.df - x86_avx512_gather3siv4_di, // llvm.x86.avx512.gather3siv4.di - x86_avx512_gather3siv4_sf, // llvm.x86.avx512.gather3siv4.sf - x86_avx512_gather3siv4_si, // llvm.x86.avx512.gather3siv4.si - x86_avx512_gather3siv8_sf, // llvm.x86.avx512.gather3siv8.sf - x86_avx512_gather3siv8_si, // llvm.x86.avx512.gather3siv8.si - x86_avx512_gatherpf_dpd_512, // llvm.x86.avx512.gatherpf.dpd.512 - x86_avx512_gatherpf_dps_512, // llvm.x86.avx512.gatherpf.dps.512 - x86_avx512_gatherpf_qpd_512, // llvm.x86.avx512.gatherpf.qpd.512 - x86_avx512_gatherpf_qps_512, // llvm.x86.avx512.gatherpf.qps.512 - x86_avx512_kand_w, // llvm.x86.avx512.kand.w - x86_avx512_kandn_w, // llvm.x86.avx512.kandn.w - x86_avx512_knot_w, // llvm.x86.avx512.knot.w - x86_avx512_kor_w, // llvm.x86.avx512.kor.w - x86_avx512_kortestc_w, // llvm.x86.avx512.kortestc.w - x86_avx512_kortestz_w, // llvm.x86.avx512.kortestz.w - x86_avx512_kunpck_bw, // llvm.x86.avx512.kunpck.bw - x86_avx512_kunpck_dq, // llvm.x86.avx512.kunpck.dq - x86_avx512_kunpck_wd, // llvm.x86.avx512.kunpck.wd - x86_avx512_kxnor_w, // llvm.x86.avx512.kxnor.w - x86_avx512_kxor_w, // llvm.x86.avx512.kxor.w - x86_avx512_mask_add_pd_128, // llvm.x86.avx512.mask.add.pd.128 - x86_avx512_mask_add_pd_256, // llvm.x86.avx512.mask.add.pd.256 - x86_avx512_mask_add_pd_512, // llvm.x86.avx512.mask.add.pd.512 - x86_avx512_mask_add_ps_128, // llvm.x86.avx512.mask.add.ps.128 - x86_avx512_mask_add_ps_256, // llvm.x86.avx512.mask.add.ps.256 - x86_avx512_mask_add_ps_512, // llvm.x86.avx512.mask.add.ps.512 - x86_avx512_mask_add_sd_round, // llvm.x86.avx512.mask.add.sd.round - x86_avx512_mask_add_ss_round, // llvm.x86.avx512.mask.add.ss.round - x86_avx512_mask_and_pd_128, // llvm.x86.avx512.mask.and.pd.128 - x86_avx512_mask_and_pd_256, // llvm.x86.avx512.mask.and.pd.256 - x86_avx512_mask_and_pd_512, // llvm.x86.avx512.mask.and.pd.512 - x86_avx512_mask_and_ps_128, // llvm.x86.avx512.mask.and.ps.128 - x86_avx512_mask_and_ps_256, // llvm.x86.avx512.mask.and.ps.256 - x86_avx512_mask_and_ps_512, // llvm.x86.avx512.mask.and.ps.512 - x86_avx512_mask_andn_pd_128, // llvm.x86.avx512.mask.andn.pd.128 - x86_avx512_mask_andn_pd_256, // llvm.x86.avx512.mask.andn.pd.256 - x86_avx512_mask_andn_pd_512, // llvm.x86.avx512.mask.andn.pd.512 - x86_avx512_mask_andn_ps_128, // llvm.x86.avx512.mask.andn.ps.128 - x86_avx512_mask_andn_ps_256, // llvm.x86.avx512.mask.andn.ps.256 - x86_avx512_mask_andn_ps_512, // llvm.x86.avx512.mask.andn.ps.512 - x86_avx512_mask_broadcastf32x2_256, // llvm.x86.avx512.mask.broadcastf32x2.256 - x86_avx512_mask_broadcastf32x2_512, // llvm.x86.avx512.mask.broadcastf32x2.512 - x86_avx512_mask_broadcastf32x4_256, // llvm.x86.avx512.mask.broadcastf32x4.256 - x86_avx512_mask_broadcastf32x4_512, // llvm.x86.avx512.mask.broadcastf32x4.512 - x86_avx512_mask_broadcastf32x8_512, // llvm.x86.avx512.mask.broadcastf32x8.512 - x86_avx512_mask_broadcastf64x2_256, // llvm.x86.avx512.mask.broadcastf64x2.256 - x86_avx512_mask_broadcastf64x2_512, // llvm.x86.avx512.mask.broadcastf64x2.512 - x86_avx512_mask_broadcastf64x4_512, // llvm.x86.avx512.mask.broadcastf64x4.512 - x86_avx512_mask_broadcasti32x2_128, // llvm.x86.avx512.mask.broadcasti32x2.128 - x86_avx512_mask_broadcasti32x2_256, // llvm.x86.avx512.mask.broadcasti32x2.256 - x86_avx512_mask_broadcasti32x2_512, // llvm.x86.avx512.mask.broadcasti32x2.512 - x86_avx512_mask_broadcasti32x4_256, // llvm.x86.avx512.mask.broadcasti32x4.256 - x86_avx512_mask_broadcasti32x4_512, // llvm.x86.avx512.mask.broadcasti32x4.512 - x86_avx512_mask_broadcasti32x8_512, // llvm.x86.avx512.mask.broadcasti32x8.512 - x86_avx512_mask_broadcasti64x2_256, // llvm.x86.avx512.mask.broadcasti64x2.256 - x86_avx512_mask_broadcasti64x2_512, // llvm.x86.avx512.mask.broadcasti64x2.512 - x86_avx512_mask_broadcasti64x4_512, // llvm.x86.avx512.mask.broadcasti64x4.512 - x86_avx512_mask_cmp_b_128, // llvm.x86.avx512.mask.cmp.b.128 - x86_avx512_mask_cmp_b_256, // llvm.x86.avx512.mask.cmp.b.256 - x86_avx512_mask_cmp_b_512, // llvm.x86.avx512.mask.cmp.b.512 - x86_avx512_mask_cmp_d_128, // llvm.x86.avx512.mask.cmp.d.128 - x86_avx512_mask_cmp_d_256, // llvm.x86.avx512.mask.cmp.d.256 - x86_avx512_mask_cmp_d_512, // llvm.x86.avx512.mask.cmp.d.512 - x86_avx512_mask_cmp_pd_128, // llvm.x86.avx512.mask.cmp.pd.128 - x86_avx512_mask_cmp_pd_256, // llvm.x86.avx512.mask.cmp.pd.256 - x86_avx512_mask_cmp_pd_512, // llvm.x86.avx512.mask.cmp.pd.512 - x86_avx512_mask_cmp_ps_128, // llvm.x86.avx512.mask.cmp.ps.128 - x86_avx512_mask_cmp_ps_256, // llvm.x86.avx512.mask.cmp.ps.256 - x86_avx512_mask_cmp_ps_512, // llvm.x86.avx512.mask.cmp.ps.512 - x86_avx512_mask_cmp_q_128, // llvm.x86.avx512.mask.cmp.q.128 - x86_avx512_mask_cmp_q_256, // llvm.x86.avx512.mask.cmp.q.256 - x86_avx512_mask_cmp_q_512, // llvm.x86.avx512.mask.cmp.q.512 - x86_avx512_mask_cmp_sd, // llvm.x86.avx512.mask.cmp.sd - x86_avx512_mask_cmp_ss, // llvm.x86.avx512.mask.cmp.ss - x86_avx512_mask_cmp_w_128, // llvm.x86.avx512.mask.cmp.w.128 - x86_avx512_mask_cmp_w_256, // llvm.x86.avx512.mask.cmp.w.256 - x86_avx512_mask_cmp_w_512, // llvm.x86.avx512.mask.cmp.w.512 - x86_avx512_mask_compress_d_128, // llvm.x86.avx512.mask.compress.d.128 - x86_avx512_mask_compress_d_256, // llvm.x86.avx512.mask.compress.d.256 - x86_avx512_mask_compress_d_512, // llvm.x86.avx512.mask.compress.d.512 - x86_avx512_mask_compress_pd_128, // llvm.x86.avx512.mask.compress.pd.128 - x86_avx512_mask_compress_pd_256, // llvm.x86.avx512.mask.compress.pd.256 - x86_avx512_mask_compress_pd_512, // llvm.x86.avx512.mask.compress.pd.512 - x86_avx512_mask_compress_ps_128, // llvm.x86.avx512.mask.compress.ps.128 - x86_avx512_mask_compress_ps_256, // llvm.x86.avx512.mask.compress.ps.256 - x86_avx512_mask_compress_ps_512, // llvm.x86.avx512.mask.compress.ps.512 - x86_avx512_mask_compress_q_128, // llvm.x86.avx512.mask.compress.q.128 - x86_avx512_mask_compress_q_256, // llvm.x86.avx512.mask.compress.q.256 - x86_avx512_mask_compress_q_512, // llvm.x86.avx512.mask.compress.q.512 - x86_avx512_mask_compress_store_d_128, // llvm.x86.avx512.mask.compress.store.d.128 - x86_avx512_mask_compress_store_d_256, // llvm.x86.avx512.mask.compress.store.d.256 - x86_avx512_mask_compress_store_d_512, // llvm.x86.avx512.mask.compress.store.d.512 - x86_avx512_mask_compress_store_pd_128, // llvm.x86.avx512.mask.compress.store.pd.128 - x86_avx512_mask_compress_store_pd_256, // llvm.x86.avx512.mask.compress.store.pd.256 - x86_avx512_mask_compress_store_pd_512, // llvm.x86.avx512.mask.compress.store.pd.512 - x86_avx512_mask_compress_store_ps_128, // llvm.x86.avx512.mask.compress.store.ps.128 - x86_avx512_mask_compress_store_ps_256, // llvm.x86.avx512.mask.compress.store.ps.256 - x86_avx512_mask_compress_store_ps_512, // llvm.x86.avx512.mask.compress.store.ps.512 - x86_avx512_mask_compress_store_q_128, // llvm.x86.avx512.mask.compress.store.q.128 - x86_avx512_mask_compress_store_q_256, // llvm.x86.avx512.mask.compress.store.q.256 - x86_avx512_mask_compress_store_q_512, // llvm.x86.avx512.mask.compress.store.q.512 - x86_avx512_mask_conflict_d_128, // llvm.x86.avx512.mask.conflict.d.128 - x86_avx512_mask_conflict_d_256, // llvm.x86.avx512.mask.conflict.d.256 - x86_avx512_mask_conflict_d_512, // llvm.x86.avx512.mask.conflict.d.512 - x86_avx512_mask_conflict_q_128, // llvm.x86.avx512.mask.conflict.q.128 - x86_avx512_mask_conflict_q_256, // llvm.x86.avx512.mask.conflict.q.256 - x86_avx512_mask_conflict_q_512, // llvm.x86.avx512.mask.conflict.q.512 - x86_avx512_mask_cvtdq2pd_128, // llvm.x86.avx512.mask.cvtdq2pd.128 - x86_avx512_mask_cvtdq2pd_256, // llvm.x86.avx512.mask.cvtdq2pd.256 - x86_avx512_mask_cvtdq2pd_512, // llvm.x86.avx512.mask.cvtdq2pd.512 - x86_avx512_mask_cvtdq2ps_128, // llvm.x86.avx512.mask.cvtdq2ps.128 - x86_avx512_mask_cvtdq2ps_256, // llvm.x86.avx512.mask.cvtdq2ps.256 - x86_avx512_mask_cvtdq2ps_512, // llvm.x86.avx512.mask.cvtdq2ps.512 - x86_avx512_mask_cvtpd2dq_128, // llvm.x86.avx512.mask.cvtpd2dq.128 - x86_avx512_mask_cvtpd2dq_256, // llvm.x86.avx512.mask.cvtpd2dq.256 - x86_avx512_mask_cvtpd2dq_512, // llvm.x86.avx512.mask.cvtpd2dq.512 - x86_avx512_mask_cvtpd2ps, // llvm.x86.avx512.mask.cvtpd2ps - x86_avx512_mask_cvtpd2ps_256, // llvm.x86.avx512.mask.cvtpd2ps.256 - x86_avx512_mask_cvtpd2ps_512, // llvm.x86.avx512.mask.cvtpd2ps.512 - x86_avx512_mask_cvtpd2qq_128, // llvm.x86.avx512.mask.cvtpd2qq.128 - x86_avx512_mask_cvtpd2qq_256, // llvm.x86.avx512.mask.cvtpd2qq.256 - x86_avx512_mask_cvtpd2qq_512, // llvm.x86.avx512.mask.cvtpd2qq.512 - x86_avx512_mask_cvtpd2udq_128, // llvm.x86.avx512.mask.cvtpd2udq.128 - x86_avx512_mask_cvtpd2udq_256, // llvm.x86.avx512.mask.cvtpd2udq.256 - x86_avx512_mask_cvtpd2udq_512, // llvm.x86.avx512.mask.cvtpd2udq.512 - x86_avx512_mask_cvtpd2uqq_128, // llvm.x86.avx512.mask.cvtpd2uqq.128 - x86_avx512_mask_cvtpd2uqq_256, // llvm.x86.avx512.mask.cvtpd2uqq.256 - x86_avx512_mask_cvtpd2uqq_512, // llvm.x86.avx512.mask.cvtpd2uqq.512 - x86_avx512_mask_cvtps2dq_128, // llvm.x86.avx512.mask.cvtps2dq.128 - x86_avx512_mask_cvtps2dq_256, // llvm.x86.avx512.mask.cvtps2dq.256 - x86_avx512_mask_cvtps2dq_512, // llvm.x86.avx512.mask.cvtps2dq.512 - x86_avx512_mask_cvtps2pd_128, // llvm.x86.avx512.mask.cvtps2pd.128 - x86_avx512_mask_cvtps2pd_256, // llvm.x86.avx512.mask.cvtps2pd.256 - x86_avx512_mask_cvtps2pd_512, // llvm.x86.avx512.mask.cvtps2pd.512 - x86_avx512_mask_cvtps2qq_128, // llvm.x86.avx512.mask.cvtps2qq.128 - x86_avx512_mask_cvtps2qq_256, // llvm.x86.avx512.mask.cvtps2qq.256 - x86_avx512_mask_cvtps2qq_512, // llvm.x86.avx512.mask.cvtps2qq.512 - x86_avx512_mask_cvtps2udq_128, // llvm.x86.avx512.mask.cvtps2udq.128 - x86_avx512_mask_cvtps2udq_256, // llvm.x86.avx512.mask.cvtps2udq.256 - x86_avx512_mask_cvtps2udq_512, // llvm.x86.avx512.mask.cvtps2udq.512 - x86_avx512_mask_cvtps2uqq_128, // llvm.x86.avx512.mask.cvtps2uqq.128 - x86_avx512_mask_cvtps2uqq_256, // llvm.x86.avx512.mask.cvtps2uqq.256 - x86_avx512_mask_cvtps2uqq_512, // llvm.x86.avx512.mask.cvtps2uqq.512 - x86_avx512_mask_cvtqq2pd_128, // llvm.x86.avx512.mask.cvtqq2pd.128 - x86_avx512_mask_cvtqq2pd_256, // llvm.x86.avx512.mask.cvtqq2pd.256 - x86_avx512_mask_cvtqq2pd_512, // llvm.x86.avx512.mask.cvtqq2pd.512 - x86_avx512_mask_cvtqq2ps_128, // llvm.x86.avx512.mask.cvtqq2ps.128 - x86_avx512_mask_cvtqq2ps_256, // llvm.x86.avx512.mask.cvtqq2ps.256 - x86_avx512_mask_cvtqq2ps_512, // llvm.x86.avx512.mask.cvtqq2ps.512 - x86_avx512_mask_cvtsd2ss_round, // llvm.x86.avx512.mask.cvtsd2ss.round - x86_avx512_mask_cvtss2sd_round, // llvm.x86.avx512.mask.cvtss2sd.round - x86_avx512_mask_cvttpd2dq_128, // llvm.x86.avx512.mask.cvttpd2dq.128 - x86_avx512_mask_cvttpd2dq_256, // llvm.x86.avx512.mask.cvttpd2dq.256 - x86_avx512_mask_cvttpd2dq_512, // llvm.x86.avx512.mask.cvttpd2dq.512 - x86_avx512_mask_cvttpd2qq_128, // llvm.x86.avx512.mask.cvttpd2qq.128 - x86_avx512_mask_cvttpd2qq_256, // llvm.x86.avx512.mask.cvttpd2qq.256 - x86_avx512_mask_cvttpd2qq_512, // llvm.x86.avx512.mask.cvttpd2qq.512 - x86_avx512_mask_cvttpd2udq_128, // llvm.x86.avx512.mask.cvttpd2udq.128 - x86_avx512_mask_cvttpd2udq_256, // llvm.x86.avx512.mask.cvttpd2udq.256 - x86_avx512_mask_cvttpd2udq_512, // llvm.x86.avx512.mask.cvttpd2udq.512 - x86_avx512_mask_cvttpd2uqq_128, // llvm.x86.avx512.mask.cvttpd2uqq.128 - x86_avx512_mask_cvttpd2uqq_256, // llvm.x86.avx512.mask.cvttpd2uqq.256 - x86_avx512_mask_cvttpd2uqq_512, // llvm.x86.avx512.mask.cvttpd2uqq.512 - x86_avx512_mask_cvttps2dq_128, // llvm.x86.avx512.mask.cvttps2dq.128 - x86_avx512_mask_cvttps2dq_256, // llvm.x86.avx512.mask.cvttps2dq.256 - x86_avx512_mask_cvttps2dq_512, // llvm.x86.avx512.mask.cvttps2dq.512 - x86_avx512_mask_cvttps2qq_128, // llvm.x86.avx512.mask.cvttps2qq.128 - x86_avx512_mask_cvttps2qq_256, // llvm.x86.avx512.mask.cvttps2qq.256 - x86_avx512_mask_cvttps2qq_512, // llvm.x86.avx512.mask.cvttps2qq.512 - x86_avx512_mask_cvttps2udq_128, // llvm.x86.avx512.mask.cvttps2udq.128 - x86_avx512_mask_cvttps2udq_256, // llvm.x86.avx512.mask.cvttps2udq.256 - x86_avx512_mask_cvttps2udq_512, // llvm.x86.avx512.mask.cvttps2udq.512 - x86_avx512_mask_cvttps2uqq_128, // llvm.x86.avx512.mask.cvttps2uqq.128 - x86_avx512_mask_cvttps2uqq_256, // llvm.x86.avx512.mask.cvttps2uqq.256 - x86_avx512_mask_cvttps2uqq_512, // llvm.x86.avx512.mask.cvttps2uqq.512 - x86_avx512_mask_cvtudq2pd_128, // llvm.x86.avx512.mask.cvtudq2pd.128 - x86_avx512_mask_cvtudq2pd_256, // llvm.x86.avx512.mask.cvtudq2pd.256 - x86_avx512_mask_cvtudq2pd_512, // llvm.x86.avx512.mask.cvtudq2pd.512 - x86_avx512_mask_cvtudq2ps_128, // llvm.x86.avx512.mask.cvtudq2ps.128 - x86_avx512_mask_cvtudq2ps_256, // llvm.x86.avx512.mask.cvtudq2ps.256 - x86_avx512_mask_cvtudq2ps_512, // llvm.x86.avx512.mask.cvtudq2ps.512 - x86_avx512_mask_cvtuqq2pd_128, // llvm.x86.avx512.mask.cvtuqq2pd.128 - x86_avx512_mask_cvtuqq2pd_256, // llvm.x86.avx512.mask.cvtuqq2pd.256 - x86_avx512_mask_cvtuqq2pd_512, // llvm.x86.avx512.mask.cvtuqq2pd.512 - x86_avx512_mask_cvtuqq2ps_128, // llvm.x86.avx512.mask.cvtuqq2ps.128 - x86_avx512_mask_cvtuqq2ps_256, // llvm.x86.avx512.mask.cvtuqq2ps.256 - x86_avx512_mask_cvtuqq2ps_512, // llvm.x86.avx512.mask.cvtuqq2ps.512 - x86_avx512_mask_dbpsadbw_128, // llvm.x86.avx512.mask.dbpsadbw.128 - x86_avx512_mask_dbpsadbw_256, // llvm.x86.avx512.mask.dbpsadbw.256 - x86_avx512_mask_dbpsadbw_512, // llvm.x86.avx512.mask.dbpsadbw.512 - x86_avx512_mask_div_pd_128, // llvm.x86.avx512.mask.div.pd.128 - x86_avx512_mask_div_pd_256, // llvm.x86.avx512.mask.div.pd.256 - x86_avx512_mask_div_pd_512, // llvm.x86.avx512.mask.div.pd.512 - x86_avx512_mask_div_ps_128, // llvm.x86.avx512.mask.div.ps.128 - x86_avx512_mask_div_ps_256, // llvm.x86.avx512.mask.div.ps.256 - x86_avx512_mask_div_ps_512, // llvm.x86.avx512.mask.div.ps.512 - x86_avx512_mask_div_sd_round, // llvm.x86.avx512.mask.div.sd.round - x86_avx512_mask_div_ss_round, // llvm.x86.avx512.mask.div.ss.round - x86_avx512_mask_expand_d_128, // llvm.x86.avx512.mask.expand.d.128 - x86_avx512_mask_expand_d_256, // llvm.x86.avx512.mask.expand.d.256 - x86_avx512_mask_expand_d_512, // llvm.x86.avx512.mask.expand.d.512 - x86_avx512_mask_expand_load_d_128, // llvm.x86.avx512.mask.expand.load.d.128 - x86_avx512_mask_expand_load_d_256, // llvm.x86.avx512.mask.expand.load.d.256 - x86_avx512_mask_expand_load_d_512, // llvm.x86.avx512.mask.expand.load.d.512 - x86_avx512_mask_expand_load_pd_128, // llvm.x86.avx512.mask.expand.load.pd.128 - x86_avx512_mask_expand_load_pd_256, // llvm.x86.avx512.mask.expand.load.pd.256 - x86_avx512_mask_expand_load_pd_512, // llvm.x86.avx512.mask.expand.load.pd.512 - x86_avx512_mask_expand_load_ps_128, // llvm.x86.avx512.mask.expand.load.ps.128 - x86_avx512_mask_expand_load_ps_256, // llvm.x86.avx512.mask.expand.load.ps.256 - x86_avx512_mask_expand_load_ps_512, // llvm.x86.avx512.mask.expand.load.ps.512 - x86_avx512_mask_expand_load_q_128, // llvm.x86.avx512.mask.expand.load.q.128 - x86_avx512_mask_expand_load_q_256, // llvm.x86.avx512.mask.expand.load.q.256 - x86_avx512_mask_expand_load_q_512, // llvm.x86.avx512.mask.expand.load.q.512 - x86_avx512_mask_expand_pd_128, // llvm.x86.avx512.mask.expand.pd.128 - x86_avx512_mask_expand_pd_256, // llvm.x86.avx512.mask.expand.pd.256 - x86_avx512_mask_expand_pd_512, // llvm.x86.avx512.mask.expand.pd.512 - x86_avx512_mask_expand_ps_128, // llvm.x86.avx512.mask.expand.ps.128 - x86_avx512_mask_expand_ps_256, // llvm.x86.avx512.mask.expand.ps.256 - x86_avx512_mask_expand_ps_512, // llvm.x86.avx512.mask.expand.ps.512 - x86_avx512_mask_expand_q_128, // llvm.x86.avx512.mask.expand.q.128 - x86_avx512_mask_expand_q_256, // llvm.x86.avx512.mask.expand.q.256 - x86_avx512_mask_expand_q_512, // llvm.x86.avx512.mask.expand.q.512 - x86_avx512_mask_fixupimm_pd_128, // llvm.x86.avx512.mask.fixupimm.pd.128 - x86_avx512_mask_fixupimm_pd_256, // llvm.x86.avx512.mask.fixupimm.pd.256 - x86_avx512_mask_fixupimm_pd_512, // llvm.x86.avx512.mask.fixupimm.pd.512 - x86_avx512_mask_fixupimm_ps_128, // llvm.x86.avx512.mask.fixupimm.ps.128 - x86_avx512_mask_fixupimm_ps_256, // llvm.x86.avx512.mask.fixupimm.ps.256 - x86_avx512_mask_fixupimm_ps_512, // llvm.x86.avx512.mask.fixupimm.ps.512 - x86_avx512_mask_fixupimm_sd, // llvm.x86.avx512.mask.fixupimm.sd - x86_avx512_mask_fixupimm_ss, // llvm.x86.avx512.mask.fixupimm.ss - x86_avx512_mask_fpclass_pd_128, // llvm.x86.avx512.mask.fpclass.pd.128 - x86_avx512_mask_fpclass_pd_256, // llvm.x86.avx512.mask.fpclass.pd.256 - x86_avx512_mask_fpclass_pd_512, // llvm.x86.avx512.mask.fpclass.pd.512 - x86_avx512_mask_fpclass_ps_128, // llvm.x86.avx512.mask.fpclass.ps.128 - x86_avx512_mask_fpclass_ps_256, // llvm.x86.avx512.mask.fpclass.ps.256 - x86_avx512_mask_fpclass_ps_512, // llvm.x86.avx512.mask.fpclass.ps.512 - x86_avx512_mask_fpclass_sd, // llvm.x86.avx512.mask.fpclass.sd - x86_avx512_mask_fpclass_ss, // llvm.x86.avx512.mask.fpclass.ss - x86_avx512_mask_getexp_pd_128, // llvm.x86.avx512.mask.getexp.pd.128 - x86_avx512_mask_getexp_pd_256, // llvm.x86.avx512.mask.getexp.pd.256 - x86_avx512_mask_getexp_pd_512, // llvm.x86.avx512.mask.getexp.pd.512 - x86_avx512_mask_getexp_ps_128, // llvm.x86.avx512.mask.getexp.ps.128 - x86_avx512_mask_getexp_ps_256, // llvm.x86.avx512.mask.getexp.ps.256 - x86_avx512_mask_getexp_ps_512, // llvm.x86.avx512.mask.getexp.ps.512 - x86_avx512_mask_getexp_sd, // llvm.x86.avx512.mask.getexp.sd - x86_avx512_mask_getexp_ss, // llvm.x86.avx512.mask.getexp.ss - x86_avx512_mask_getmant_pd_128, // llvm.x86.avx512.mask.getmant.pd.128 - x86_avx512_mask_getmant_pd_256, // llvm.x86.avx512.mask.getmant.pd.256 - x86_avx512_mask_getmant_pd_512, // llvm.x86.avx512.mask.getmant.pd.512 - x86_avx512_mask_getmant_ps_128, // llvm.x86.avx512.mask.getmant.ps.128 - x86_avx512_mask_getmant_ps_256, // llvm.x86.avx512.mask.getmant.ps.256 - x86_avx512_mask_getmant_ps_512, // llvm.x86.avx512.mask.getmant.ps.512 - x86_avx512_mask_getmant_sd, // llvm.x86.avx512.mask.getmant.sd - x86_avx512_mask_getmant_ss, // llvm.x86.avx512.mask.getmant.ss - x86_avx512_mask_insertf32x4_256, // llvm.x86.avx512.mask.insertf32x4.256 - x86_avx512_mask_insertf32x4_512, // llvm.x86.avx512.mask.insertf32x4.512 - x86_avx512_mask_insertf32x8_512, // llvm.x86.avx512.mask.insertf32x8.512 - x86_avx512_mask_insertf64x2_256, // llvm.x86.avx512.mask.insertf64x2.256 - x86_avx512_mask_insertf64x2_512, // llvm.x86.avx512.mask.insertf64x2.512 - x86_avx512_mask_insertf64x4_512, // llvm.x86.avx512.mask.insertf64x4.512 - x86_avx512_mask_inserti32x4_256, // llvm.x86.avx512.mask.inserti32x4.256 - x86_avx512_mask_inserti32x4_512, // llvm.x86.avx512.mask.inserti32x4.512 - x86_avx512_mask_inserti32x8_512, // llvm.x86.avx512.mask.inserti32x8.512 - x86_avx512_mask_inserti64x2_256, // llvm.x86.avx512.mask.inserti64x2.256 - x86_avx512_mask_inserti64x2_512, // llvm.x86.avx512.mask.inserti64x2.512 - x86_avx512_mask_inserti64x4_512, // llvm.x86.avx512.mask.inserti64x4.512 - x86_avx512_mask_lzcnt_d_128, // llvm.x86.avx512.mask.lzcnt.d.128 - x86_avx512_mask_lzcnt_d_256, // llvm.x86.avx512.mask.lzcnt.d.256 - x86_avx512_mask_lzcnt_d_512, // llvm.x86.avx512.mask.lzcnt.d.512 - x86_avx512_mask_lzcnt_q_128, // llvm.x86.avx512.mask.lzcnt.q.128 - x86_avx512_mask_lzcnt_q_256, // llvm.x86.avx512.mask.lzcnt.q.256 - x86_avx512_mask_lzcnt_q_512, // llvm.x86.avx512.mask.lzcnt.q.512 - x86_avx512_mask_max_pd_128, // llvm.x86.avx512.mask.max.pd.128 - x86_avx512_mask_max_pd_256, // llvm.x86.avx512.mask.max.pd.256 - x86_avx512_mask_max_pd_512, // llvm.x86.avx512.mask.max.pd.512 - x86_avx512_mask_max_ps_128, // llvm.x86.avx512.mask.max.ps.128 - x86_avx512_mask_max_ps_256, // llvm.x86.avx512.mask.max.ps.256 - x86_avx512_mask_max_ps_512, // llvm.x86.avx512.mask.max.ps.512 - x86_avx512_mask_max_sd_round, // llvm.x86.avx512.mask.max.sd.round - x86_avx512_mask_max_ss_round, // llvm.x86.avx512.mask.max.ss.round - x86_avx512_mask_min_pd_128, // llvm.x86.avx512.mask.min.pd.128 - x86_avx512_mask_min_pd_256, // llvm.x86.avx512.mask.min.pd.256 - x86_avx512_mask_min_pd_512, // llvm.x86.avx512.mask.min.pd.512 - x86_avx512_mask_min_ps_128, // llvm.x86.avx512.mask.min.ps.128 - x86_avx512_mask_min_ps_256, // llvm.x86.avx512.mask.min.ps.256 - x86_avx512_mask_min_ps_512, // llvm.x86.avx512.mask.min.ps.512 - x86_avx512_mask_min_sd_round, // llvm.x86.avx512.mask.min.sd.round - x86_avx512_mask_min_ss_round, // llvm.x86.avx512.mask.min.ss.round - x86_avx512_mask_move_sd, // llvm.x86.avx512.mask.move.sd - x86_avx512_mask_move_ss, // llvm.x86.avx512.mask.move.ss - x86_avx512_mask_mul_pd_128, // llvm.x86.avx512.mask.mul.pd.128 - x86_avx512_mask_mul_pd_256, // llvm.x86.avx512.mask.mul.pd.256 - x86_avx512_mask_mul_pd_512, // llvm.x86.avx512.mask.mul.pd.512 - x86_avx512_mask_mul_ps_128, // llvm.x86.avx512.mask.mul.ps.128 - x86_avx512_mask_mul_ps_256, // llvm.x86.avx512.mask.mul.ps.256 - x86_avx512_mask_mul_ps_512, // llvm.x86.avx512.mask.mul.ps.512 - x86_avx512_mask_mul_sd_round, // llvm.x86.avx512.mask.mul.sd.round - x86_avx512_mask_mul_ss_round, // llvm.x86.avx512.mask.mul.ss.round - x86_avx512_mask_or_pd_128, // llvm.x86.avx512.mask.or.pd.128 - x86_avx512_mask_or_pd_256, // llvm.x86.avx512.mask.or.pd.256 - x86_avx512_mask_or_pd_512, // llvm.x86.avx512.mask.or.pd.512 - x86_avx512_mask_or_ps_128, // llvm.x86.avx512.mask.or.ps.128 - x86_avx512_mask_or_ps_256, // llvm.x86.avx512.mask.or.ps.256 - x86_avx512_mask_or_ps_512, // llvm.x86.avx512.mask.or.ps.512 - x86_avx512_mask_pabs_b_128, // llvm.x86.avx512.mask.pabs.b.128 - x86_avx512_mask_pabs_b_256, // llvm.x86.avx512.mask.pabs.b.256 - x86_avx512_mask_pabs_b_512, // llvm.x86.avx512.mask.pabs.b.512 - x86_avx512_mask_pabs_d_128, // llvm.x86.avx512.mask.pabs.d.128 - x86_avx512_mask_pabs_d_256, // llvm.x86.avx512.mask.pabs.d.256 - x86_avx512_mask_pabs_d_512, // llvm.x86.avx512.mask.pabs.d.512 - x86_avx512_mask_pabs_q_128, // llvm.x86.avx512.mask.pabs.q.128 - x86_avx512_mask_pabs_q_256, // llvm.x86.avx512.mask.pabs.q.256 - x86_avx512_mask_pabs_q_512, // llvm.x86.avx512.mask.pabs.q.512 - x86_avx512_mask_pabs_w_128, // llvm.x86.avx512.mask.pabs.w.128 - x86_avx512_mask_pabs_w_256, // llvm.x86.avx512.mask.pabs.w.256 - x86_avx512_mask_pabs_w_512, // llvm.x86.avx512.mask.pabs.w.512 - x86_avx512_mask_packssdw_128, // llvm.x86.avx512.mask.packssdw.128 - x86_avx512_mask_packssdw_256, // llvm.x86.avx512.mask.packssdw.256 - x86_avx512_mask_packssdw_512, // llvm.x86.avx512.mask.packssdw.512 - x86_avx512_mask_packsswb_128, // llvm.x86.avx512.mask.packsswb.128 - x86_avx512_mask_packsswb_256, // llvm.x86.avx512.mask.packsswb.256 - x86_avx512_mask_packsswb_512, // llvm.x86.avx512.mask.packsswb.512 - x86_avx512_mask_packusdw_128, // llvm.x86.avx512.mask.packusdw.128 - x86_avx512_mask_packusdw_256, // llvm.x86.avx512.mask.packusdw.256 - x86_avx512_mask_packusdw_512, // llvm.x86.avx512.mask.packusdw.512 - x86_avx512_mask_packuswb_128, // llvm.x86.avx512.mask.packuswb.128 - x86_avx512_mask_packuswb_256, // llvm.x86.avx512.mask.packuswb.256 - x86_avx512_mask_packuswb_512, // llvm.x86.avx512.mask.packuswb.512 - x86_avx512_mask_padd_b_128, // llvm.x86.avx512.mask.padd.b.128 - x86_avx512_mask_padd_b_256, // llvm.x86.avx512.mask.padd.b.256 - x86_avx512_mask_padd_b_512, // llvm.x86.avx512.mask.padd.b.512 - x86_avx512_mask_padd_d_128, // llvm.x86.avx512.mask.padd.d.128 - x86_avx512_mask_padd_d_256, // llvm.x86.avx512.mask.padd.d.256 - x86_avx512_mask_padd_d_512, // llvm.x86.avx512.mask.padd.d.512 - x86_avx512_mask_padd_q_128, // llvm.x86.avx512.mask.padd.q.128 - x86_avx512_mask_padd_q_256, // llvm.x86.avx512.mask.padd.q.256 - x86_avx512_mask_padd_q_512, // llvm.x86.avx512.mask.padd.q.512 - x86_avx512_mask_padd_w_128, // llvm.x86.avx512.mask.padd.w.128 - x86_avx512_mask_padd_w_256, // llvm.x86.avx512.mask.padd.w.256 - x86_avx512_mask_padd_w_512, // llvm.x86.avx512.mask.padd.w.512 - x86_avx512_mask_padds_b_128, // llvm.x86.avx512.mask.padds.b.128 - x86_avx512_mask_padds_b_256, // llvm.x86.avx512.mask.padds.b.256 - x86_avx512_mask_padds_b_512, // llvm.x86.avx512.mask.padds.b.512 - x86_avx512_mask_padds_w_128, // llvm.x86.avx512.mask.padds.w.128 - x86_avx512_mask_padds_w_256, // llvm.x86.avx512.mask.padds.w.256 - x86_avx512_mask_padds_w_512, // llvm.x86.avx512.mask.padds.w.512 - x86_avx512_mask_paddus_b_128, // llvm.x86.avx512.mask.paddus.b.128 - x86_avx512_mask_paddus_b_256, // llvm.x86.avx512.mask.paddus.b.256 - x86_avx512_mask_paddus_b_512, // llvm.x86.avx512.mask.paddus.b.512 - x86_avx512_mask_paddus_w_128, // llvm.x86.avx512.mask.paddus.w.128 - x86_avx512_mask_paddus_w_256, // llvm.x86.avx512.mask.paddus.w.256 - x86_avx512_mask_paddus_w_512, // llvm.x86.avx512.mask.paddus.w.512 - x86_avx512_mask_pavg_b_128, // llvm.x86.avx512.mask.pavg.b.128 - x86_avx512_mask_pavg_b_256, // llvm.x86.avx512.mask.pavg.b.256 - x86_avx512_mask_pavg_b_512, // llvm.x86.avx512.mask.pavg.b.512 - x86_avx512_mask_pavg_w_128, // llvm.x86.avx512.mask.pavg.w.128 - x86_avx512_mask_pavg_w_256, // llvm.x86.avx512.mask.pavg.w.256 - x86_avx512_mask_pavg_w_512, // llvm.x86.avx512.mask.pavg.w.512 - x86_avx512_mask_pbroadcast_b_gpr_128, // llvm.x86.avx512.mask.pbroadcast.b.gpr.128 - x86_avx512_mask_pbroadcast_b_gpr_256, // llvm.x86.avx512.mask.pbroadcast.b.gpr.256 - x86_avx512_mask_pbroadcast_b_gpr_512, // llvm.x86.avx512.mask.pbroadcast.b.gpr.512 - x86_avx512_mask_pbroadcast_d_gpr_128, // llvm.x86.avx512.mask.pbroadcast.d.gpr.128 - x86_avx512_mask_pbroadcast_d_gpr_256, // llvm.x86.avx512.mask.pbroadcast.d.gpr.256 - x86_avx512_mask_pbroadcast_d_gpr_512, // llvm.x86.avx512.mask.pbroadcast.d.gpr.512 - x86_avx512_mask_pbroadcast_q_gpr_128, // llvm.x86.avx512.mask.pbroadcast.q.gpr.128 - x86_avx512_mask_pbroadcast_q_gpr_256, // llvm.x86.avx512.mask.pbroadcast.q.gpr.256 - x86_avx512_mask_pbroadcast_q_gpr_512, // llvm.x86.avx512.mask.pbroadcast.q.gpr.512 - x86_avx512_mask_pbroadcast_q_mem_512, // llvm.x86.avx512.mask.pbroadcast.q.mem.512 - x86_avx512_mask_pbroadcast_w_gpr_128, // llvm.x86.avx512.mask.pbroadcast.w.gpr.128 - x86_avx512_mask_pbroadcast_w_gpr_256, // llvm.x86.avx512.mask.pbroadcast.w.gpr.256 - x86_avx512_mask_pbroadcast_w_gpr_512, // llvm.x86.avx512.mask.pbroadcast.w.gpr.512 - x86_avx512_mask_permvar_df_256, // llvm.x86.avx512.mask.permvar.df.256 - x86_avx512_mask_permvar_df_512, // llvm.x86.avx512.mask.permvar.df.512 - x86_avx512_mask_permvar_di_256, // llvm.x86.avx512.mask.permvar.di.256 - x86_avx512_mask_permvar_di_512, // llvm.x86.avx512.mask.permvar.di.512 - x86_avx512_mask_permvar_hi_128, // llvm.x86.avx512.mask.permvar.hi.128 - x86_avx512_mask_permvar_hi_256, // llvm.x86.avx512.mask.permvar.hi.256 - x86_avx512_mask_permvar_hi_512, // llvm.x86.avx512.mask.permvar.hi.512 - x86_avx512_mask_permvar_qi_128, // llvm.x86.avx512.mask.permvar.qi.128 - x86_avx512_mask_permvar_qi_256, // llvm.x86.avx512.mask.permvar.qi.256 - x86_avx512_mask_permvar_qi_512, // llvm.x86.avx512.mask.permvar.qi.512 - x86_avx512_mask_permvar_sf_256, // llvm.x86.avx512.mask.permvar.sf.256 - x86_avx512_mask_permvar_sf_512, // llvm.x86.avx512.mask.permvar.sf.512 - x86_avx512_mask_permvar_si_256, // llvm.x86.avx512.mask.permvar.si.256 - x86_avx512_mask_permvar_si_512, // llvm.x86.avx512.mask.permvar.si.512 - x86_avx512_mask_pmaddubs_w_128, // llvm.x86.avx512.mask.pmaddubs.w.128 - x86_avx512_mask_pmaddubs_w_256, // llvm.x86.avx512.mask.pmaddubs.w.256 - x86_avx512_mask_pmaddubs_w_512, // llvm.x86.avx512.mask.pmaddubs.w.512 - x86_avx512_mask_pmaddw_d_128, // llvm.x86.avx512.mask.pmaddw.d.128 - x86_avx512_mask_pmaddw_d_256, // llvm.x86.avx512.mask.pmaddw.d.256 - x86_avx512_mask_pmaddw_d_512, // llvm.x86.avx512.mask.pmaddw.d.512 - x86_avx512_mask_pmaxs_b_128, // llvm.x86.avx512.mask.pmaxs.b.128 - x86_avx512_mask_pmaxs_b_256, // llvm.x86.avx512.mask.pmaxs.b.256 - x86_avx512_mask_pmaxs_b_512, // llvm.x86.avx512.mask.pmaxs.b.512 - x86_avx512_mask_pmaxs_d_128, // llvm.x86.avx512.mask.pmaxs.d.128 - x86_avx512_mask_pmaxs_d_256, // llvm.x86.avx512.mask.pmaxs.d.256 - x86_avx512_mask_pmaxs_d_512, // llvm.x86.avx512.mask.pmaxs.d.512 - x86_avx512_mask_pmaxs_q_128, // llvm.x86.avx512.mask.pmaxs.q.128 - x86_avx512_mask_pmaxs_q_256, // llvm.x86.avx512.mask.pmaxs.q.256 - x86_avx512_mask_pmaxs_q_512, // llvm.x86.avx512.mask.pmaxs.q.512 - x86_avx512_mask_pmaxs_w_128, // llvm.x86.avx512.mask.pmaxs.w.128 - x86_avx512_mask_pmaxs_w_256, // llvm.x86.avx512.mask.pmaxs.w.256 - x86_avx512_mask_pmaxs_w_512, // llvm.x86.avx512.mask.pmaxs.w.512 - x86_avx512_mask_pmaxu_b_128, // llvm.x86.avx512.mask.pmaxu.b.128 - x86_avx512_mask_pmaxu_b_256, // llvm.x86.avx512.mask.pmaxu.b.256 - x86_avx512_mask_pmaxu_b_512, // llvm.x86.avx512.mask.pmaxu.b.512 - x86_avx512_mask_pmaxu_d_128, // llvm.x86.avx512.mask.pmaxu.d.128 - x86_avx512_mask_pmaxu_d_256, // llvm.x86.avx512.mask.pmaxu.d.256 - x86_avx512_mask_pmaxu_d_512, // llvm.x86.avx512.mask.pmaxu.d.512 - x86_avx512_mask_pmaxu_q_128, // llvm.x86.avx512.mask.pmaxu.q.128 - x86_avx512_mask_pmaxu_q_256, // llvm.x86.avx512.mask.pmaxu.q.256 - x86_avx512_mask_pmaxu_q_512, // llvm.x86.avx512.mask.pmaxu.q.512 - x86_avx512_mask_pmaxu_w_128, // llvm.x86.avx512.mask.pmaxu.w.128 - x86_avx512_mask_pmaxu_w_256, // llvm.x86.avx512.mask.pmaxu.w.256 - x86_avx512_mask_pmaxu_w_512, // llvm.x86.avx512.mask.pmaxu.w.512 - x86_avx512_mask_pmins_b_128, // llvm.x86.avx512.mask.pmins.b.128 - x86_avx512_mask_pmins_b_256, // llvm.x86.avx512.mask.pmins.b.256 - x86_avx512_mask_pmins_b_512, // llvm.x86.avx512.mask.pmins.b.512 - x86_avx512_mask_pmins_d_128, // llvm.x86.avx512.mask.pmins.d.128 - x86_avx512_mask_pmins_d_256, // llvm.x86.avx512.mask.pmins.d.256 - x86_avx512_mask_pmins_d_512, // llvm.x86.avx512.mask.pmins.d.512 - x86_avx512_mask_pmins_q_128, // llvm.x86.avx512.mask.pmins.q.128 - x86_avx512_mask_pmins_q_256, // llvm.x86.avx512.mask.pmins.q.256 - x86_avx512_mask_pmins_q_512, // llvm.x86.avx512.mask.pmins.q.512 - x86_avx512_mask_pmins_w_128, // llvm.x86.avx512.mask.pmins.w.128 - x86_avx512_mask_pmins_w_256, // llvm.x86.avx512.mask.pmins.w.256 - x86_avx512_mask_pmins_w_512, // llvm.x86.avx512.mask.pmins.w.512 - x86_avx512_mask_pminu_b_128, // llvm.x86.avx512.mask.pminu.b.128 - x86_avx512_mask_pminu_b_256, // llvm.x86.avx512.mask.pminu.b.256 - x86_avx512_mask_pminu_b_512, // llvm.x86.avx512.mask.pminu.b.512 - x86_avx512_mask_pminu_d_128, // llvm.x86.avx512.mask.pminu.d.128 - x86_avx512_mask_pminu_d_256, // llvm.x86.avx512.mask.pminu.d.256 - x86_avx512_mask_pminu_d_512, // llvm.x86.avx512.mask.pminu.d.512 - x86_avx512_mask_pminu_q_128, // llvm.x86.avx512.mask.pminu.q.128 - x86_avx512_mask_pminu_q_256, // llvm.x86.avx512.mask.pminu.q.256 - x86_avx512_mask_pminu_q_512, // llvm.x86.avx512.mask.pminu.q.512 - x86_avx512_mask_pminu_w_128, // llvm.x86.avx512.mask.pminu.w.128 - x86_avx512_mask_pminu_w_256, // llvm.x86.avx512.mask.pminu.w.256 - x86_avx512_mask_pminu_w_512, // llvm.x86.avx512.mask.pminu.w.512 - x86_avx512_mask_pmov_db_128, // llvm.x86.avx512.mask.pmov.db.128 - x86_avx512_mask_pmov_db_256, // llvm.x86.avx512.mask.pmov.db.256 - x86_avx512_mask_pmov_db_512, // llvm.x86.avx512.mask.pmov.db.512 - x86_avx512_mask_pmov_db_mem_128, // llvm.x86.avx512.mask.pmov.db.mem.128 - x86_avx512_mask_pmov_db_mem_256, // llvm.x86.avx512.mask.pmov.db.mem.256 - x86_avx512_mask_pmov_db_mem_512, // llvm.x86.avx512.mask.pmov.db.mem.512 - x86_avx512_mask_pmov_dw_128, // llvm.x86.avx512.mask.pmov.dw.128 - x86_avx512_mask_pmov_dw_256, // llvm.x86.avx512.mask.pmov.dw.256 - x86_avx512_mask_pmov_dw_512, // llvm.x86.avx512.mask.pmov.dw.512 - x86_avx512_mask_pmov_dw_mem_128, // llvm.x86.avx512.mask.pmov.dw.mem.128 - x86_avx512_mask_pmov_dw_mem_256, // llvm.x86.avx512.mask.pmov.dw.mem.256 - x86_avx512_mask_pmov_dw_mem_512, // llvm.x86.avx512.mask.pmov.dw.mem.512 - x86_avx512_mask_pmov_qb_128, // llvm.x86.avx512.mask.pmov.qb.128 - x86_avx512_mask_pmov_qb_256, // llvm.x86.avx512.mask.pmov.qb.256 - x86_avx512_mask_pmov_qb_512, // llvm.x86.avx512.mask.pmov.qb.512 - x86_avx512_mask_pmov_qb_mem_128, // llvm.x86.avx512.mask.pmov.qb.mem.128 - x86_avx512_mask_pmov_qb_mem_256, // llvm.x86.avx512.mask.pmov.qb.mem.256 - x86_avx512_mask_pmov_qb_mem_512, // llvm.x86.avx512.mask.pmov.qb.mem.512 - x86_avx512_mask_pmov_qd_128, // llvm.x86.avx512.mask.pmov.qd.128 - x86_avx512_mask_pmov_qd_256, // llvm.x86.avx512.mask.pmov.qd.256 - x86_avx512_mask_pmov_qd_512, // llvm.x86.avx512.mask.pmov.qd.512 - x86_avx512_mask_pmov_qd_mem_128, // llvm.x86.avx512.mask.pmov.qd.mem.128 - x86_avx512_mask_pmov_qd_mem_256, // llvm.x86.avx512.mask.pmov.qd.mem.256 - x86_avx512_mask_pmov_qd_mem_512, // llvm.x86.avx512.mask.pmov.qd.mem.512 - x86_avx512_mask_pmov_qw_128, // llvm.x86.avx512.mask.pmov.qw.128 - x86_avx512_mask_pmov_qw_256, // llvm.x86.avx512.mask.pmov.qw.256 - x86_avx512_mask_pmov_qw_512, // llvm.x86.avx512.mask.pmov.qw.512 - x86_avx512_mask_pmov_qw_mem_128, // llvm.x86.avx512.mask.pmov.qw.mem.128 - x86_avx512_mask_pmov_qw_mem_256, // llvm.x86.avx512.mask.pmov.qw.mem.256 - x86_avx512_mask_pmov_qw_mem_512, // llvm.x86.avx512.mask.pmov.qw.mem.512 - x86_avx512_mask_pmov_wb_128, // llvm.x86.avx512.mask.pmov.wb.128 - x86_avx512_mask_pmov_wb_256, // llvm.x86.avx512.mask.pmov.wb.256 - x86_avx512_mask_pmov_wb_512, // llvm.x86.avx512.mask.pmov.wb.512 - x86_avx512_mask_pmov_wb_mem_128, // llvm.x86.avx512.mask.pmov.wb.mem.128 - x86_avx512_mask_pmov_wb_mem_256, // llvm.x86.avx512.mask.pmov.wb.mem.256 - x86_avx512_mask_pmov_wb_mem_512, // llvm.x86.avx512.mask.pmov.wb.mem.512 - x86_avx512_mask_pmovs_db_128, // llvm.x86.avx512.mask.pmovs.db.128 - x86_avx512_mask_pmovs_db_256, // llvm.x86.avx512.mask.pmovs.db.256 - x86_avx512_mask_pmovs_db_512, // llvm.x86.avx512.mask.pmovs.db.512 - x86_avx512_mask_pmovs_db_mem_128, // llvm.x86.avx512.mask.pmovs.db.mem.128 - x86_avx512_mask_pmovs_db_mem_256, // llvm.x86.avx512.mask.pmovs.db.mem.256 - x86_avx512_mask_pmovs_db_mem_512, // llvm.x86.avx512.mask.pmovs.db.mem.512 - x86_avx512_mask_pmovs_dw_128, // llvm.x86.avx512.mask.pmovs.dw.128 - x86_avx512_mask_pmovs_dw_256, // llvm.x86.avx512.mask.pmovs.dw.256 - x86_avx512_mask_pmovs_dw_512, // llvm.x86.avx512.mask.pmovs.dw.512 - x86_avx512_mask_pmovs_dw_mem_128, // llvm.x86.avx512.mask.pmovs.dw.mem.128 - x86_avx512_mask_pmovs_dw_mem_256, // llvm.x86.avx512.mask.pmovs.dw.mem.256 - x86_avx512_mask_pmovs_dw_mem_512, // llvm.x86.avx512.mask.pmovs.dw.mem.512 - x86_avx512_mask_pmovs_qb_128, // llvm.x86.avx512.mask.pmovs.qb.128 - x86_avx512_mask_pmovs_qb_256, // llvm.x86.avx512.mask.pmovs.qb.256 - x86_avx512_mask_pmovs_qb_512, // llvm.x86.avx512.mask.pmovs.qb.512 - x86_avx512_mask_pmovs_qb_mem_128, // llvm.x86.avx512.mask.pmovs.qb.mem.128 - x86_avx512_mask_pmovs_qb_mem_256, // llvm.x86.avx512.mask.pmovs.qb.mem.256 - x86_avx512_mask_pmovs_qb_mem_512, // llvm.x86.avx512.mask.pmovs.qb.mem.512 - x86_avx512_mask_pmovs_qd_128, // llvm.x86.avx512.mask.pmovs.qd.128 - x86_avx512_mask_pmovs_qd_256, // llvm.x86.avx512.mask.pmovs.qd.256 - x86_avx512_mask_pmovs_qd_512, // llvm.x86.avx512.mask.pmovs.qd.512 - x86_avx512_mask_pmovs_qd_mem_128, // llvm.x86.avx512.mask.pmovs.qd.mem.128 - x86_avx512_mask_pmovs_qd_mem_256, // llvm.x86.avx512.mask.pmovs.qd.mem.256 - x86_avx512_mask_pmovs_qd_mem_512, // llvm.x86.avx512.mask.pmovs.qd.mem.512 - x86_avx512_mask_pmovs_qw_128, // llvm.x86.avx512.mask.pmovs.qw.128 - x86_avx512_mask_pmovs_qw_256, // llvm.x86.avx512.mask.pmovs.qw.256 - x86_avx512_mask_pmovs_qw_512, // llvm.x86.avx512.mask.pmovs.qw.512 - x86_avx512_mask_pmovs_qw_mem_128, // llvm.x86.avx512.mask.pmovs.qw.mem.128 - x86_avx512_mask_pmovs_qw_mem_256, // llvm.x86.avx512.mask.pmovs.qw.mem.256 - x86_avx512_mask_pmovs_qw_mem_512, // llvm.x86.avx512.mask.pmovs.qw.mem.512 - x86_avx512_mask_pmovs_wb_128, // llvm.x86.avx512.mask.pmovs.wb.128 - x86_avx512_mask_pmovs_wb_256, // llvm.x86.avx512.mask.pmovs.wb.256 - x86_avx512_mask_pmovs_wb_512, // llvm.x86.avx512.mask.pmovs.wb.512 - x86_avx512_mask_pmovs_wb_mem_128, // llvm.x86.avx512.mask.pmovs.wb.mem.128 - x86_avx512_mask_pmovs_wb_mem_256, // llvm.x86.avx512.mask.pmovs.wb.mem.256 - x86_avx512_mask_pmovs_wb_mem_512, // llvm.x86.avx512.mask.pmovs.wb.mem.512 - x86_avx512_mask_pmovsxb_d_128, // llvm.x86.avx512.mask.pmovsxb.d.128 - x86_avx512_mask_pmovsxb_d_256, // llvm.x86.avx512.mask.pmovsxb.d.256 - x86_avx512_mask_pmovsxb_d_512, // llvm.x86.avx512.mask.pmovsxb.d.512 - x86_avx512_mask_pmovsxb_q_128, // llvm.x86.avx512.mask.pmovsxb.q.128 - x86_avx512_mask_pmovsxb_q_256, // llvm.x86.avx512.mask.pmovsxb.q.256 - x86_avx512_mask_pmovsxb_q_512, // llvm.x86.avx512.mask.pmovsxb.q.512 - x86_avx512_mask_pmovsxb_w_128, // llvm.x86.avx512.mask.pmovsxb.w.128 - x86_avx512_mask_pmovsxb_w_256, // llvm.x86.avx512.mask.pmovsxb.w.256 - x86_avx512_mask_pmovsxb_w_512, // llvm.x86.avx512.mask.pmovsxb.w.512 - x86_avx512_mask_pmovsxd_q_128, // llvm.x86.avx512.mask.pmovsxd.q.128 - x86_avx512_mask_pmovsxd_q_256, // llvm.x86.avx512.mask.pmovsxd.q.256 - x86_avx512_mask_pmovsxd_q_512, // llvm.x86.avx512.mask.pmovsxd.q.512 - x86_avx512_mask_pmovsxw_d_128, // llvm.x86.avx512.mask.pmovsxw.d.128 - x86_avx512_mask_pmovsxw_d_256, // llvm.x86.avx512.mask.pmovsxw.d.256 - x86_avx512_mask_pmovsxw_d_512, // llvm.x86.avx512.mask.pmovsxw.d.512 - x86_avx512_mask_pmovsxw_q_128, // llvm.x86.avx512.mask.pmovsxw.q.128 - x86_avx512_mask_pmovsxw_q_256, // llvm.x86.avx512.mask.pmovsxw.q.256 - x86_avx512_mask_pmovsxw_q_512, // llvm.x86.avx512.mask.pmovsxw.q.512 - x86_avx512_mask_pmovus_db_128, // llvm.x86.avx512.mask.pmovus.db.128 - x86_avx512_mask_pmovus_db_256, // llvm.x86.avx512.mask.pmovus.db.256 - x86_avx512_mask_pmovus_db_512, // llvm.x86.avx512.mask.pmovus.db.512 - x86_avx512_mask_pmovus_db_mem_128, // llvm.x86.avx512.mask.pmovus.db.mem.128 - x86_avx512_mask_pmovus_db_mem_256, // llvm.x86.avx512.mask.pmovus.db.mem.256 - x86_avx512_mask_pmovus_db_mem_512, // llvm.x86.avx512.mask.pmovus.db.mem.512 - x86_avx512_mask_pmovus_dw_128, // llvm.x86.avx512.mask.pmovus.dw.128 - x86_avx512_mask_pmovus_dw_256, // llvm.x86.avx512.mask.pmovus.dw.256 - x86_avx512_mask_pmovus_dw_512, // llvm.x86.avx512.mask.pmovus.dw.512 - x86_avx512_mask_pmovus_dw_mem_128, // llvm.x86.avx512.mask.pmovus.dw.mem.128 - x86_avx512_mask_pmovus_dw_mem_256, // llvm.x86.avx512.mask.pmovus.dw.mem.256 - x86_avx512_mask_pmovus_dw_mem_512, // llvm.x86.avx512.mask.pmovus.dw.mem.512 - x86_avx512_mask_pmovus_qb_128, // llvm.x86.avx512.mask.pmovus.qb.128 - x86_avx512_mask_pmovus_qb_256, // llvm.x86.avx512.mask.pmovus.qb.256 - x86_avx512_mask_pmovus_qb_512, // llvm.x86.avx512.mask.pmovus.qb.512 - x86_avx512_mask_pmovus_qb_mem_128, // llvm.x86.avx512.mask.pmovus.qb.mem.128 - x86_avx512_mask_pmovus_qb_mem_256, // llvm.x86.avx512.mask.pmovus.qb.mem.256 - x86_avx512_mask_pmovus_qb_mem_512, // llvm.x86.avx512.mask.pmovus.qb.mem.512 - x86_avx512_mask_pmovus_qd_128, // llvm.x86.avx512.mask.pmovus.qd.128 - x86_avx512_mask_pmovus_qd_256, // llvm.x86.avx512.mask.pmovus.qd.256 - x86_avx512_mask_pmovus_qd_512, // llvm.x86.avx512.mask.pmovus.qd.512 - x86_avx512_mask_pmovus_qd_mem_128, // llvm.x86.avx512.mask.pmovus.qd.mem.128 - x86_avx512_mask_pmovus_qd_mem_256, // llvm.x86.avx512.mask.pmovus.qd.mem.256 - x86_avx512_mask_pmovus_qd_mem_512, // llvm.x86.avx512.mask.pmovus.qd.mem.512 - x86_avx512_mask_pmovus_qw_128, // llvm.x86.avx512.mask.pmovus.qw.128 - x86_avx512_mask_pmovus_qw_256, // llvm.x86.avx512.mask.pmovus.qw.256 - x86_avx512_mask_pmovus_qw_512, // llvm.x86.avx512.mask.pmovus.qw.512 - x86_avx512_mask_pmovus_qw_mem_128, // llvm.x86.avx512.mask.pmovus.qw.mem.128 - x86_avx512_mask_pmovus_qw_mem_256, // llvm.x86.avx512.mask.pmovus.qw.mem.256 - x86_avx512_mask_pmovus_qw_mem_512, // llvm.x86.avx512.mask.pmovus.qw.mem.512 - x86_avx512_mask_pmovus_wb_128, // llvm.x86.avx512.mask.pmovus.wb.128 - x86_avx512_mask_pmovus_wb_256, // llvm.x86.avx512.mask.pmovus.wb.256 - x86_avx512_mask_pmovus_wb_512, // llvm.x86.avx512.mask.pmovus.wb.512 - x86_avx512_mask_pmovus_wb_mem_128, // llvm.x86.avx512.mask.pmovus.wb.mem.128 - x86_avx512_mask_pmovus_wb_mem_256, // llvm.x86.avx512.mask.pmovus.wb.mem.256 - x86_avx512_mask_pmovus_wb_mem_512, // llvm.x86.avx512.mask.pmovus.wb.mem.512 - x86_avx512_mask_pmovzxb_d_128, // llvm.x86.avx512.mask.pmovzxb.d.128 - x86_avx512_mask_pmovzxb_d_256, // llvm.x86.avx512.mask.pmovzxb.d.256 - x86_avx512_mask_pmovzxb_d_512, // llvm.x86.avx512.mask.pmovzxb.d.512 - x86_avx512_mask_pmovzxb_q_128, // llvm.x86.avx512.mask.pmovzxb.q.128 - x86_avx512_mask_pmovzxb_q_256, // llvm.x86.avx512.mask.pmovzxb.q.256 - x86_avx512_mask_pmovzxb_q_512, // llvm.x86.avx512.mask.pmovzxb.q.512 - x86_avx512_mask_pmovzxb_w_128, // llvm.x86.avx512.mask.pmovzxb.w.128 - x86_avx512_mask_pmovzxb_w_256, // llvm.x86.avx512.mask.pmovzxb.w.256 - x86_avx512_mask_pmovzxb_w_512, // llvm.x86.avx512.mask.pmovzxb.w.512 - x86_avx512_mask_pmovzxd_q_128, // llvm.x86.avx512.mask.pmovzxd.q.128 - x86_avx512_mask_pmovzxd_q_256, // llvm.x86.avx512.mask.pmovzxd.q.256 - x86_avx512_mask_pmovzxd_q_512, // llvm.x86.avx512.mask.pmovzxd.q.512 - x86_avx512_mask_pmovzxw_d_128, // llvm.x86.avx512.mask.pmovzxw.d.128 - x86_avx512_mask_pmovzxw_d_256, // llvm.x86.avx512.mask.pmovzxw.d.256 - x86_avx512_mask_pmovzxw_d_512, // llvm.x86.avx512.mask.pmovzxw.d.512 - x86_avx512_mask_pmovzxw_q_128, // llvm.x86.avx512.mask.pmovzxw.q.128 - x86_avx512_mask_pmovzxw_q_256, // llvm.x86.avx512.mask.pmovzxw.q.256 - x86_avx512_mask_pmovzxw_q_512, // llvm.x86.avx512.mask.pmovzxw.q.512 - x86_avx512_mask_pmul_dq_128, // llvm.x86.avx512.mask.pmul.dq.128 - x86_avx512_mask_pmul_dq_256, // llvm.x86.avx512.mask.pmul.dq.256 - x86_avx512_mask_pmul_dq_512, // llvm.x86.avx512.mask.pmul.dq.512 - x86_avx512_mask_pmul_hr_sw_128, // llvm.x86.avx512.mask.pmul.hr.sw.128 - x86_avx512_mask_pmul_hr_sw_256, // llvm.x86.avx512.mask.pmul.hr.sw.256 - x86_avx512_mask_pmul_hr_sw_512, // llvm.x86.avx512.mask.pmul.hr.sw.512 - x86_avx512_mask_pmulh_w_128, // llvm.x86.avx512.mask.pmulh.w.128 - x86_avx512_mask_pmulh_w_256, // llvm.x86.avx512.mask.pmulh.w.256 - x86_avx512_mask_pmulh_w_512, // llvm.x86.avx512.mask.pmulh.w.512 - x86_avx512_mask_pmulhu_w_128, // llvm.x86.avx512.mask.pmulhu.w.128 - x86_avx512_mask_pmulhu_w_256, // llvm.x86.avx512.mask.pmulhu.w.256 - x86_avx512_mask_pmulhu_w_512, // llvm.x86.avx512.mask.pmulhu.w.512 - x86_avx512_mask_pmull_d_128, // llvm.x86.avx512.mask.pmull.d.128 - x86_avx512_mask_pmull_d_256, // llvm.x86.avx512.mask.pmull.d.256 - x86_avx512_mask_pmull_d_512, // llvm.x86.avx512.mask.pmull.d.512 - x86_avx512_mask_pmull_q_128, // llvm.x86.avx512.mask.pmull.q.128 - x86_avx512_mask_pmull_q_256, // llvm.x86.avx512.mask.pmull.q.256 - x86_avx512_mask_pmull_q_512, // llvm.x86.avx512.mask.pmull.q.512 - x86_avx512_mask_pmull_w_128, // llvm.x86.avx512.mask.pmull.w.128 - x86_avx512_mask_pmull_w_256, // llvm.x86.avx512.mask.pmull.w.256 - x86_avx512_mask_pmull_w_512, // llvm.x86.avx512.mask.pmull.w.512 - x86_avx512_mask_pmultishift_qb_128, // llvm.x86.avx512.mask.pmultishift.qb.128 - x86_avx512_mask_pmultishift_qb_256, // llvm.x86.avx512.mask.pmultishift.qb.256 - x86_avx512_mask_pmultishift_qb_512, // llvm.x86.avx512.mask.pmultishift.qb.512 - x86_avx512_mask_pmulu_dq_128, // llvm.x86.avx512.mask.pmulu.dq.128 - x86_avx512_mask_pmulu_dq_256, // llvm.x86.avx512.mask.pmulu.dq.256 - x86_avx512_mask_pmulu_dq_512, // llvm.x86.avx512.mask.pmulu.dq.512 - x86_avx512_mask_prol_d_128, // llvm.x86.avx512.mask.prol.d.128 - x86_avx512_mask_prol_d_256, // llvm.x86.avx512.mask.prol.d.256 - x86_avx512_mask_prol_d_512, // llvm.x86.avx512.mask.prol.d.512 - x86_avx512_mask_prol_q_128, // llvm.x86.avx512.mask.prol.q.128 - x86_avx512_mask_prol_q_256, // llvm.x86.avx512.mask.prol.q.256 - x86_avx512_mask_prol_q_512, // llvm.x86.avx512.mask.prol.q.512 - x86_avx512_mask_prolv_d_128, // llvm.x86.avx512.mask.prolv.d.128 - x86_avx512_mask_prolv_d_256, // llvm.x86.avx512.mask.prolv.d.256 - x86_avx512_mask_prolv_d_512, // llvm.x86.avx512.mask.prolv.d.512 - x86_avx512_mask_prolv_q_128, // llvm.x86.avx512.mask.prolv.q.128 - x86_avx512_mask_prolv_q_256, // llvm.x86.avx512.mask.prolv.q.256 - x86_avx512_mask_prolv_q_512, // llvm.x86.avx512.mask.prolv.q.512 - x86_avx512_mask_pror_d_128, // llvm.x86.avx512.mask.pror.d.128 - x86_avx512_mask_pror_d_256, // llvm.x86.avx512.mask.pror.d.256 - x86_avx512_mask_pror_d_512, // llvm.x86.avx512.mask.pror.d.512 - x86_avx512_mask_pror_q_128, // llvm.x86.avx512.mask.pror.q.128 - x86_avx512_mask_pror_q_256, // llvm.x86.avx512.mask.pror.q.256 - x86_avx512_mask_pror_q_512, // llvm.x86.avx512.mask.pror.q.512 - x86_avx512_mask_prorv_d_128, // llvm.x86.avx512.mask.prorv.d.128 - x86_avx512_mask_prorv_d_256, // llvm.x86.avx512.mask.prorv.d.256 - x86_avx512_mask_prorv_d_512, // llvm.x86.avx512.mask.prorv.d.512 - x86_avx512_mask_prorv_q_128, // llvm.x86.avx512.mask.prorv.q.128 - x86_avx512_mask_prorv_q_256, // llvm.x86.avx512.mask.prorv.q.256 - x86_avx512_mask_prorv_q_512, // llvm.x86.avx512.mask.prorv.q.512 - x86_avx512_mask_pshuf_b_128, // llvm.x86.avx512.mask.pshuf.b.128 - x86_avx512_mask_pshuf_b_256, // llvm.x86.avx512.mask.pshuf.b.256 - x86_avx512_mask_pshuf_b_512, // llvm.x86.avx512.mask.pshuf.b.512 - x86_avx512_mask_psll_d, // llvm.x86.avx512.mask.psll.d - x86_avx512_mask_psll_d_128, // llvm.x86.avx512.mask.psll.d.128 - x86_avx512_mask_psll_d_256, // llvm.x86.avx512.mask.psll.d.256 - x86_avx512_mask_psll_di_128, // llvm.x86.avx512.mask.psll.di.128 - x86_avx512_mask_psll_di_256, // llvm.x86.avx512.mask.psll.di.256 - x86_avx512_mask_psll_di_512, // llvm.x86.avx512.mask.psll.di.512 - x86_avx512_mask_psll_q, // llvm.x86.avx512.mask.psll.q - x86_avx512_mask_psll_q_128, // llvm.x86.avx512.mask.psll.q.128 - x86_avx512_mask_psll_q_256, // llvm.x86.avx512.mask.psll.q.256 - x86_avx512_mask_psll_qi_128, // llvm.x86.avx512.mask.psll.qi.128 - x86_avx512_mask_psll_qi_256, // llvm.x86.avx512.mask.psll.qi.256 - x86_avx512_mask_psll_qi_512, // llvm.x86.avx512.mask.psll.qi.512 - x86_avx512_mask_psll_w_128, // llvm.x86.avx512.mask.psll.w.128 - x86_avx512_mask_psll_w_256, // llvm.x86.avx512.mask.psll.w.256 - x86_avx512_mask_psll_w_512, // llvm.x86.avx512.mask.psll.w.512 - x86_avx512_mask_psll_wi_128, // llvm.x86.avx512.mask.psll.wi.128 - x86_avx512_mask_psll_wi_256, // llvm.x86.avx512.mask.psll.wi.256 - x86_avx512_mask_psll_wi_512, // llvm.x86.avx512.mask.psll.wi.512 - x86_avx512_mask_psllv_d, // llvm.x86.avx512.mask.psllv.d - x86_avx512_mask_psllv_q, // llvm.x86.avx512.mask.psllv.q - x86_avx512_mask_psllv16_hi, // llvm.x86.avx512.mask.psllv16.hi - x86_avx512_mask_psllv2_di, // llvm.x86.avx512.mask.psllv2.di - x86_avx512_mask_psllv32hi, // llvm.x86.avx512.mask.psllv32hi - x86_avx512_mask_psllv4_di, // llvm.x86.avx512.mask.psllv4.di - x86_avx512_mask_psllv4_si, // llvm.x86.avx512.mask.psllv4.si - x86_avx512_mask_psllv8_hi, // llvm.x86.avx512.mask.psllv8.hi - x86_avx512_mask_psllv8_si, // llvm.x86.avx512.mask.psllv8.si - x86_avx512_mask_psra_d, // llvm.x86.avx512.mask.psra.d - x86_avx512_mask_psra_d_128, // llvm.x86.avx512.mask.psra.d.128 - x86_avx512_mask_psra_d_256, // llvm.x86.avx512.mask.psra.d.256 - x86_avx512_mask_psra_di_128, // llvm.x86.avx512.mask.psra.di.128 - x86_avx512_mask_psra_di_256, // llvm.x86.avx512.mask.psra.di.256 - x86_avx512_mask_psra_di_512, // llvm.x86.avx512.mask.psra.di.512 - x86_avx512_mask_psra_q, // llvm.x86.avx512.mask.psra.q - x86_avx512_mask_psra_q_128, // llvm.x86.avx512.mask.psra.q.128 - x86_avx512_mask_psra_q_256, // llvm.x86.avx512.mask.psra.q.256 - x86_avx512_mask_psra_qi_128, // llvm.x86.avx512.mask.psra.qi.128 - x86_avx512_mask_psra_qi_256, // llvm.x86.avx512.mask.psra.qi.256 - x86_avx512_mask_psra_qi_512, // llvm.x86.avx512.mask.psra.qi.512 - x86_avx512_mask_psra_w_128, // llvm.x86.avx512.mask.psra.w.128 - x86_avx512_mask_psra_w_256, // llvm.x86.avx512.mask.psra.w.256 - x86_avx512_mask_psra_w_512, // llvm.x86.avx512.mask.psra.w.512 - x86_avx512_mask_psra_wi_128, // llvm.x86.avx512.mask.psra.wi.128 - x86_avx512_mask_psra_wi_256, // llvm.x86.avx512.mask.psra.wi.256 - x86_avx512_mask_psra_wi_512, // llvm.x86.avx512.mask.psra.wi.512 - x86_avx512_mask_psrav_d, // llvm.x86.avx512.mask.psrav.d - x86_avx512_mask_psrav_q, // llvm.x86.avx512.mask.psrav.q - x86_avx512_mask_psrav_q_128, // llvm.x86.avx512.mask.psrav.q.128 - x86_avx512_mask_psrav_q_256, // llvm.x86.avx512.mask.psrav.q.256 - x86_avx512_mask_psrav16_hi, // llvm.x86.avx512.mask.psrav16.hi - x86_avx512_mask_psrav32_hi, // llvm.x86.avx512.mask.psrav32.hi - x86_avx512_mask_psrav4_si, // llvm.x86.avx512.mask.psrav4.si - x86_avx512_mask_psrav8_hi, // llvm.x86.avx512.mask.psrav8.hi - x86_avx512_mask_psrav8_si, // llvm.x86.avx512.mask.psrav8.si - x86_avx512_mask_psrl_d, // llvm.x86.avx512.mask.psrl.d - x86_avx512_mask_psrl_d_128, // llvm.x86.avx512.mask.psrl.d.128 - x86_avx512_mask_psrl_d_256, // llvm.x86.avx512.mask.psrl.d.256 - x86_avx512_mask_psrl_di_128, // llvm.x86.avx512.mask.psrl.di.128 - x86_avx512_mask_psrl_di_256, // llvm.x86.avx512.mask.psrl.di.256 - x86_avx512_mask_psrl_di_512, // llvm.x86.avx512.mask.psrl.di.512 - x86_avx512_mask_psrl_q, // llvm.x86.avx512.mask.psrl.q - x86_avx512_mask_psrl_q_128, // llvm.x86.avx512.mask.psrl.q.128 - x86_avx512_mask_psrl_q_256, // llvm.x86.avx512.mask.psrl.q.256 - x86_avx512_mask_psrl_qi_128, // llvm.x86.avx512.mask.psrl.qi.128 - x86_avx512_mask_psrl_qi_256, // llvm.x86.avx512.mask.psrl.qi.256 - x86_avx512_mask_psrl_qi_512, // llvm.x86.avx512.mask.psrl.qi.512 - x86_avx512_mask_psrl_w_128, // llvm.x86.avx512.mask.psrl.w.128 - x86_avx512_mask_psrl_w_256, // llvm.x86.avx512.mask.psrl.w.256 - x86_avx512_mask_psrl_w_512, // llvm.x86.avx512.mask.psrl.w.512 - x86_avx512_mask_psrl_wi_128, // llvm.x86.avx512.mask.psrl.wi.128 - x86_avx512_mask_psrl_wi_256, // llvm.x86.avx512.mask.psrl.wi.256 - x86_avx512_mask_psrl_wi_512, // llvm.x86.avx512.mask.psrl.wi.512 - x86_avx512_mask_psrlv_d, // llvm.x86.avx512.mask.psrlv.d - x86_avx512_mask_psrlv_q, // llvm.x86.avx512.mask.psrlv.q - x86_avx512_mask_psrlv16_hi, // llvm.x86.avx512.mask.psrlv16.hi - x86_avx512_mask_psrlv2_di, // llvm.x86.avx512.mask.psrlv2.di - x86_avx512_mask_psrlv32hi, // llvm.x86.avx512.mask.psrlv32hi - x86_avx512_mask_psrlv4_di, // llvm.x86.avx512.mask.psrlv4.di - x86_avx512_mask_psrlv4_si, // llvm.x86.avx512.mask.psrlv4.si - x86_avx512_mask_psrlv8_hi, // llvm.x86.avx512.mask.psrlv8.hi - x86_avx512_mask_psrlv8_si, // llvm.x86.avx512.mask.psrlv8.si - x86_avx512_mask_psub_b_128, // llvm.x86.avx512.mask.psub.b.128 - x86_avx512_mask_psub_b_256, // llvm.x86.avx512.mask.psub.b.256 - x86_avx512_mask_psub_b_512, // llvm.x86.avx512.mask.psub.b.512 - x86_avx512_mask_psub_d_128, // llvm.x86.avx512.mask.psub.d.128 - x86_avx512_mask_psub_d_256, // llvm.x86.avx512.mask.psub.d.256 - x86_avx512_mask_psub_d_512, // llvm.x86.avx512.mask.psub.d.512 - x86_avx512_mask_psub_q_128, // llvm.x86.avx512.mask.psub.q.128 - x86_avx512_mask_psub_q_256, // llvm.x86.avx512.mask.psub.q.256 - x86_avx512_mask_psub_q_512, // llvm.x86.avx512.mask.psub.q.512 - x86_avx512_mask_psub_w_128, // llvm.x86.avx512.mask.psub.w.128 - x86_avx512_mask_psub_w_256, // llvm.x86.avx512.mask.psub.w.256 - x86_avx512_mask_psub_w_512, // llvm.x86.avx512.mask.psub.w.512 - x86_avx512_mask_psubs_b_128, // llvm.x86.avx512.mask.psubs.b.128 - x86_avx512_mask_psubs_b_256, // llvm.x86.avx512.mask.psubs.b.256 - x86_avx512_mask_psubs_b_512, // llvm.x86.avx512.mask.psubs.b.512 - x86_avx512_mask_psubs_w_128, // llvm.x86.avx512.mask.psubs.w.128 - x86_avx512_mask_psubs_w_256, // llvm.x86.avx512.mask.psubs.w.256 - x86_avx512_mask_psubs_w_512, // llvm.x86.avx512.mask.psubs.w.512 - x86_avx512_mask_psubus_b_128, // llvm.x86.avx512.mask.psubus.b.128 - x86_avx512_mask_psubus_b_256, // llvm.x86.avx512.mask.psubus.b.256 - x86_avx512_mask_psubus_b_512, // llvm.x86.avx512.mask.psubus.b.512 - x86_avx512_mask_psubus_w_128, // llvm.x86.avx512.mask.psubus.w.128 - x86_avx512_mask_psubus_w_256, // llvm.x86.avx512.mask.psubus.w.256 - x86_avx512_mask_psubus_w_512, // llvm.x86.avx512.mask.psubus.w.512 - x86_avx512_mask_pternlog_d_128, // llvm.x86.avx512.mask.pternlog.d.128 - x86_avx512_mask_pternlog_d_256, // llvm.x86.avx512.mask.pternlog.d.256 - x86_avx512_mask_pternlog_d_512, // llvm.x86.avx512.mask.pternlog.d.512 - x86_avx512_mask_pternlog_q_128, // llvm.x86.avx512.mask.pternlog.q.128 - x86_avx512_mask_pternlog_q_256, // llvm.x86.avx512.mask.pternlog.q.256 - x86_avx512_mask_pternlog_q_512, // llvm.x86.avx512.mask.pternlog.q.512 - x86_avx512_mask_range_pd_128, // llvm.x86.avx512.mask.range.pd.128 - x86_avx512_mask_range_pd_256, // llvm.x86.avx512.mask.range.pd.256 - x86_avx512_mask_range_pd_512, // llvm.x86.avx512.mask.range.pd.512 - x86_avx512_mask_range_ps_128, // llvm.x86.avx512.mask.range.ps.128 - x86_avx512_mask_range_ps_256, // llvm.x86.avx512.mask.range.ps.256 - x86_avx512_mask_range_ps_512, // llvm.x86.avx512.mask.range.ps.512 - x86_avx512_mask_range_sd, // llvm.x86.avx512.mask.range.sd - x86_avx512_mask_range_ss, // llvm.x86.avx512.mask.range.ss - x86_avx512_mask_reduce_pd_128, // llvm.x86.avx512.mask.reduce.pd.128 - x86_avx512_mask_reduce_pd_256, // llvm.x86.avx512.mask.reduce.pd.256 - x86_avx512_mask_reduce_pd_512, // llvm.x86.avx512.mask.reduce.pd.512 - x86_avx512_mask_reduce_ps_128, // llvm.x86.avx512.mask.reduce.ps.128 - x86_avx512_mask_reduce_ps_256, // llvm.x86.avx512.mask.reduce.ps.256 - x86_avx512_mask_reduce_ps_512, // llvm.x86.avx512.mask.reduce.ps.512 - x86_avx512_mask_reduce_sd, // llvm.x86.avx512.mask.reduce.sd - x86_avx512_mask_reduce_ss, // llvm.x86.avx512.mask.reduce.ss - x86_avx512_mask_rndscale_pd_128, // llvm.x86.avx512.mask.rndscale.pd.128 - x86_avx512_mask_rndscale_pd_256, // llvm.x86.avx512.mask.rndscale.pd.256 - x86_avx512_mask_rndscale_pd_512, // llvm.x86.avx512.mask.rndscale.pd.512 - x86_avx512_mask_rndscale_ps_128, // llvm.x86.avx512.mask.rndscale.ps.128 - x86_avx512_mask_rndscale_ps_256, // llvm.x86.avx512.mask.rndscale.ps.256 - x86_avx512_mask_rndscale_ps_512, // llvm.x86.avx512.mask.rndscale.ps.512 - x86_avx512_mask_rndscale_sd, // llvm.x86.avx512.mask.rndscale.sd - x86_avx512_mask_rndscale_ss, // llvm.x86.avx512.mask.rndscale.ss - x86_avx512_mask_scalef_pd_128, // llvm.x86.avx512.mask.scalef.pd.128 - x86_avx512_mask_scalef_pd_256, // llvm.x86.avx512.mask.scalef.pd.256 - x86_avx512_mask_scalef_pd_512, // llvm.x86.avx512.mask.scalef.pd.512 - x86_avx512_mask_scalef_ps_128, // llvm.x86.avx512.mask.scalef.ps.128 - x86_avx512_mask_scalef_ps_256, // llvm.x86.avx512.mask.scalef.ps.256 - x86_avx512_mask_scalef_ps_512, // llvm.x86.avx512.mask.scalef.ps.512 - x86_avx512_mask_scalef_sd, // llvm.x86.avx512.mask.scalef.sd - x86_avx512_mask_scalef_ss, // llvm.x86.avx512.mask.scalef.ss - x86_avx512_mask_shuf_f32x4, // llvm.x86.avx512.mask.shuf.f32x4 - x86_avx512_mask_shuf_f32x4_256, // llvm.x86.avx512.mask.shuf.f32x4.256 - x86_avx512_mask_shuf_f64x2, // llvm.x86.avx512.mask.shuf.f64x2 - x86_avx512_mask_shuf_f64x2_256, // llvm.x86.avx512.mask.shuf.f64x2.256 - x86_avx512_mask_shuf_i32x4, // llvm.x86.avx512.mask.shuf.i32x4 - x86_avx512_mask_shuf_i32x4_256, // llvm.x86.avx512.mask.shuf.i32x4.256 - x86_avx512_mask_shuf_i64x2, // llvm.x86.avx512.mask.shuf.i64x2 - x86_avx512_mask_shuf_i64x2_256, // llvm.x86.avx512.mask.shuf.i64x2.256 - x86_avx512_mask_shuf_pd_128, // llvm.x86.avx512.mask.shuf.pd.128 - x86_avx512_mask_shuf_pd_256, // llvm.x86.avx512.mask.shuf.pd.256 - x86_avx512_mask_shuf_pd_512, // llvm.x86.avx512.mask.shuf.pd.512 - x86_avx512_mask_shuf_ps_128, // llvm.x86.avx512.mask.shuf.ps.128 - x86_avx512_mask_shuf_ps_256, // llvm.x86.avx512.mask.shuf.ps.256 - x86_avx512_mask_shuf_ps_512, // llvm.x86.avx512.mask.shuf.ps.512 - x86_avx512_mask_sqrt_pd_128, // llvm.x86.avx512.mask.sqrt.pd.128 - x86_avx512_mask_sqrt_pd_256, // llvm.x86.avx512.mask.sqrt.pd.256 - x86_avx512_mask_sqrt_pd_512, // llvm.x86.avx512.mask.sqrt.pd.512 - x86_avx512_mask_sqrt_ps_128, // llvm.x86.avx512.mask.sqrt.ps.128 - x86_avx512_mask_sqrt_ps_256, // llvm.x86.avx512.mask.sqrt.ps.256 - x86_avx512_mask_sqrt_ps_512, // llvm.x86.avx512.mask.sqrt.ps.512 - x86_avx512_mask_sqrt_sd, // llvm.x86.avx512.mask.sqrt.sd - x86_avx512_mask_sqrt_ss, // llvm.x86.avx512.mask.sqrt.ss - x86_avx512_mask_store_ss, // llvm.x86.avx512.mask.store.ss - x86_avx512_mask_sub_pd_128, // llvm.x86.avx512.mask.sub.pd.128 - x86_avx512_mask_sub_pd_256, // llvm.x86.avx512.mask.sub.pd.256 - x86_avx512_mask_sub_pd_512, // llvm.x86.avx512.mask.sub.pd.512 - x86_avx512_mask_sub_ps_128, // llvm.x86.avx512.mask.sub.ps.128 - x86_avx512_mask_sub_ps_256, // llvm.x86.avx512.mask.sub.ps.256 - x86_avx512_mask_sub_ps_512, // llvm.x86.avx512.mask.sub.ps.512 - x86_avx512_mask_sub_sd_round, // llvm.x86.avx512.mask.sub.sd.round - x86_avx512_mask_sub_ss_round, // llvm.x86.avx512.mask.sub.ss.round - x86_avx512_mask_ucmp_b_128, // llvm.x86.avx512.mask.ucmp.b.128 - x86_avx512_mask_ucmp_b_256, // llvm.x86.avx512.mask.ucmp.b.256 - x86_avx512_mask_ucmp_b_512, // llvm.x86.avx512.mask.ucmp.b.512 - x86_avx512_mask_ucmp_d_128, // llvm.x86.avx512.mask.ucmp.d.128 - x86_avx512_mask_ucmp_d_256, // llvm.x86.avx512.mask.ucmp.d.256 - x86_avx512_mask_ucmp_d_512, // llvm.x86.avx512.mask.ucmp.d.512 - x86_avx512_mask_ucmp_q_128, // llvm.x86.avx512.mask.ucmp.q.128 - x86_avx512_mask_ucmp_q_256, // llvm.x86.avx512.mask.ucmp.q.256 - x86_avx512_mask_ucmp_q_512, // llvm.x86.avx512.mask.ucmp.q.512 - x86_avx512_mask_ucmp_w_128, // llvm.x86.avx512.mask.ucmp.w.128 - x86_avx512_mask_ucmp_w_256, // llvm.x86.avx512.mask.ucmp.w.256 - x86_avx512_mask_ucmp_w_512, // llvm.x86.avx512.mask.ucmp.w.512 - x86_avx512_mask_valign_d_128, // llvm.x86.avx512.mask.valign.d.128 - x86_avx512_mask_valign_d_256, // llvm.x86.avx512.mask.valign.d.256 - x86_avx512_mask_valign_d_512, // llvm.x86.avx512.mask.valign.d.512 - x86_avx512_mask_valign_q_128, // llvm.x86.avx512.mask.valign.q.128 - x86_avx512_mask_valign_q_256, // llvm.x86.avx512.mask.valign.q.256 - x86_avx512_mask_valign_q_512, // llvm.x86.avx512.mask.valign.q.512 - x86_avx512_mask_vcvtph2ps_128, // llvm.x86.avx512.mask.vcvtph2ps.128 - x86_avx512_mask_vcvtph2ps_256, // llvm.x86.avx512.mask.vcvtph2ps.256 - x86_avx512_mask_vcvtph2ps_512, // llvm.x86.avx512.mask.vcvtph2ps.512 - x86_avx512_mask_vcvtps2ph_128, // llvm.x86.avx512.mask.vcvtps2ph.128 - x86_avx512_mask_vcvtps2ph_256, // llvm.x86.avx512.mask.vcvtps2ph.256 - x86_avx512_mask_vcvtps2ph_512, // llvm.x86.avx512.mask.vcvtps2ph.512 - x86_avx512_mask_vextractf32x4_256, // llvm.x86.avx512.mask.vextractf32x4.256 - x86_avx512_mask_vextractf32x4_512, // llvm.x86.avx512.mask.vextractf32x4.512 - x86_avx512_mask_vextractf32x8_512, // llvm.x86.avx512.mask.vextractf32x8.512 - x86_avx512_mask_vextractf64x2_256, // llvm.x86.avx512.mask.vextractf64x2.256 - x86_avx512_mask_vextractf64x2_512, // llvm.x86.avx512.mask.vextractf64x2.512 - x86_avx512_mask_vextractf64x4_512, // llvm.x86.avx512.mask.vextractf64x4.512 - x86_avx512_mask_vextracti32x4_256, // llvm.x86.avx512.mask.vextracti32x4.256 - x86_avx512_mask_vextracti32x4_512, // llvm.x86.avx512.mask.vextracti32x4.512 - x86_avx512_mask_vextracti32x8_512, // llvm.x86.avx512.mask.vextracti32x8.512 - x86_avx512_mask_vextracti64x2_256, // llvm.x86.avx512.mask.vextracti64x2.256 - x86_avx512_mask_vextracti64x2_512, // llvm.x86.avx512.mask.vextracti64x2.512 - x86_avx512_mask_vextracti64x4_512, // llvm.x86.avx512.mask.vextracti64x4.512 - x86_avx512_mask_vfmadd_pd_128, // llvm.x86.avx512.mask.vfmadd.pd.128 - x86_avx512_mask_vfmadd_pd_256, // llvm.x86.avx512.mask.vfmadd.pd.256 - x86_avx512_mask_vfmadd_pd_512, // llvm.x86.avx512.mask.vfmadd.pd.512 - x86_avx512_mask_vfmadd_ps_128, // llvm.x86.avx512.mask.vfmadd.ps.128 - x86_avx512_mask_vfmadd_ps_256, // llvm.x86.avx512.mask.vfmadd.ps.256 - x86_avx512_mask_vfmadd_ps_512, // llvm.x86.avx512.mask.vfmadd.ps.512 - x86_avx512_mask_vfmadd_sd, // llvm.x86.avx512.mask.vfmadd.sd - x86_avx512_mask_vfmadd_ss, // llvm.x86.avx512.mask.vfmadd.ss - x86_avx512_mask_vfmaddsub_pd_128, // llvm.x86.avx512.mask.vfmaddsub.pd.128 - x86_avx512_mask_vfmaddsub_pd_256, // llvm.x86.avx512.mask.vfmaddsub.pd.256 - x86_avx512_mask_vfmaddsub_pd_512, // llvm.x86.avx512.mask.vfmaddsub.pd.512 - x86_avx512_mask_vfmaddsub_ps_128, // llvm.x86.avx512.mask.vfmaddsub.ps.128 - x86_avx512_mask_vfmaddsub_ps_256, // llvm.x86.avx512.mask.vfmaddsub.ps.256 - x86_avx512_mask_vfmaddsub_ps_512, // llvm.x86.avx512.mask.vfmaddsub.ps.512 - x86_avx512_mask_vfnmadd_pd_128, // llvm.x86.avx512.mask.vfnmadd.pd.128 - x86_avx512_mask_vfnmadd_pd_256, // llvm.x86.avx512.mask.vfnmadd.pd.256 - x86_avx512_mask_vfnmadd_pd_512, // llvm.x86.avx512.mask.vfnmadd.pd.512 - x86_avx512_mask_vfnmadd_ps_128, // llvm.x86.avx512.mask.vfnmadd.ps.128 - x86_avx512_mask_vfnmadd_ps_256, // llvm.x86.avx512.mask.vfnmadd.ps.256 - x86_avx512_mask_vfnmadd_ps_512, // llvm.x86.avx512.mask.vfnmadd.ps.512 - x86_avx512_mask_vfnmsub_pd_128, // llvm.x86.avx512.mask.vfnmsub.pd.128 - x86_avx512_mask_vfnmsub_pd_256, // llvm.x86.avx512.mask.vfnmsub.pd.256 - x86_avx512_mask_vfnmsub_pd_512, // llvm.x86.avx512.mask.vfnmsub.pd.512 - x86_avx512_mask_vfnmsub_ps_128, // llvm.x86.avx512.mask.vfnmsub.ps.128 - x86_avx512_mask_vfnmsub_ps_256, // llvm.x86.avx512.mask.vfnmsub.ps.256 - x86_avx512_mask_vfnmsub_ps_512, // llvm.x86.avx512.mask.vfnmsub.ps.512 - x86_avx512_mask_vpermi2var_d_128, // llvm.x86.avx512.mask.vpermi2var.d.128 - x86_avx512_mask_vpermi2var_d_256, // llvm.x86.avx512.mask.vpermi2var.d.256 - x86_avx512_mask_vpermi2var_d_512, // llvm.x86.avx512.mask.vpermi2var.d.512 - x86_avx512_mask_vpermi2var_hi_128, // llvm.x86.avx512.mask.vpermi2var.hi.128 - x86_avx512_mask_vpermi2var_hi_256, // llvm.x86.avx512.mask.vpermi2var.hi.256 - x86_avx512_mask_vpermi2var_hi_512, // llvm.x86.avx512.mask.vpermi2var.hi.512 - x86_avx512_mask_vpermi2var_pd_128, // llvm.x86.avx512.mask.vpermi2var.pd.128 - x86_avx512_mask_vpermi2var_pd_256, // llvm.x86.avx512.mask.vpermi2var.pd.256 - x86_avx512_mask_vpermi2var_pd_512, // llvm.x86.avx512.mask.vpermi2var.pd.512 - x86_avx512_mask_vpermi2var_ps_128, // llvm.x86.avx512.mask.vpermi2var.ps.128 - x86_avx512_mask_vpermi2var_ps_256, // llvm.x86.avx512.mask.vpermi2var.ps.256 - x86_avx512_mask_vpermi2var_ps_512, // llvm.x86.avx512.mask.vpermi2var.ps.512 - x86_avx512_mask_vpermi2var_q_128, // llvm.x86.avx512.mask.vpermi2var.q.128 - x86_avx512_mask_vpermi2var_q_256, // llvm.x86.avx512.mask.vpermi2var.q.256 - x86_avx512_mask_vpermi2var_q_512, // llvm.x86.avx512.mask.vpermi2var.q.512 - x86_avx512_mask_vpermi2var_qi_128, // llvm.x86.avx512.mask.vpermi2var.qi.128 - x86_avx512_mask_vpermi2var_qi_256, // llvm.x86.avx512.mask.vpermi2var.qi.256 - x86_avx512_mask_vpermi2var_qi_512, // llvm.x86.avx512.mask.vpermi2var.qi.512 - x86_avx512_mask_vpermilvar_pd_128, // llvm.x86.avx512.mask.vpermilvar.pd.128 - x86_avx512_mask_vpermilvar_pd_256, // llvm.x86.avx512.mask.vpermilvar.pd.256 - x86_avx512_mask_vpermilvar_pd_512, // llvm.x86.avx512.mask.vpermilvar.pd.512 - x86_avx512_mask_vpermilvar_ps_128, // llvm.x86.avx512.mask.vpermilvar.ps.128 - x86_avx512_mask_vpermilvar_ps_256, // llvm.x86.avx512.mask.vpermilvar.ps.256 - x86_avx512_mask_vpermilvar_ps_512, // llvm.x86.avx512.mask.vpermilvar.ps.512 - x86_avx512_mask_vpermt2var_d_128, // llvm.x86.avx512.mask.vpermt2var.d.128 - x86_avx512_mask_vpermt2var_d_256, // llvm.x86.avx512.mask.vpermt2var.d.256 - x86_avx512_mask_vpermt2var_d_512, // llvm.x86.avx512.mask.vpermt2var.d.512 - x86_avx512_mask_vpermt2var_hi_128, // llvm.x86.avx512.mask.vpermt2var.hi.128 - x86_avx512_mask_vpermt2var_hi_256, // llvm.x86.avx512.mask.vpermt2var.hi.256 - x86_avx512_mask_vpermt2var_hi_512, // llvm.x86.avx512.mask.vpermt2var.hi.512 - x86_avx512_mask_vpermt2var_pd_128, // llvm.x86.avx512.mask.vpermt2var.pd.128 - x86_avx512_mask_vpermt2var_pd_256, // llvm.x86.avx512.mask.vpermt2var.pd.256 - x86_avx512_mask_vpermt2var_pd_512, // llvm.x86.avx512.mask.vpermt2var.pd.512 - x86_avx512_mask_vpermt2var_ps_128, // llvm.x86.avx512.mask.vpermt2var.ps.128 - x86_avx512_mask_vpermt2var_ps_256, // llvm.x86.avx512.mask.vpermt2var.ps.256 - x86_avx512_mask_vpermt2var_ps_512, // llvm.x86.avx512.mask.vpermt2var.ps.512 - x86_avx512_mask_vpermt2var_q_128, // llvm.x86.avx512.mask.vpermt2var.q.128 - x86_avx512_mask_vpermt2var_q_256, // llvm.x86.avx512.mask.vpermt2var.q.256 - x86_avx512_mask_vpermt2var_q_512, // llvm.x86.avx512.mask.vpermt2var.q.512 - x86_avx512_mask_vpermt2var_qi_128, // llvm.x86.avx512.mask.vpermt2var.qi.128 - x86_avx512_mask_vpermt2var_qi_256, // llvm.x86.avx512.mask.vpermt2var.qi.256 - x86_avx512_mask_vpermt2var_qi_512, // llvm.x86.avx512.mask.vpermt2var.qi.512 - x86_avx512_mask_vpmadd52h_uq_128, // llvm.x86.avx512.mask.vpmadd52h.uq.128 - x86_avx512_mask_vpmadd52h_uq_256, // llvm.x86.avx512.mask.vpmadd52h.uq.256 - x86_avx512_mask_vpmadd52h_uq_512, // llvm.x86.avx512.mask.vpmadd52h.uq.512 - x86_avx512_mask_vpmadd52l_uq_128, // llvm.x86.avx512.mask.vpmadd52l.uq.128 - x86_avx512_mask_vpmadd52l_uq_256, // llvm.x86.avx512.mask.vpmadd52l.uq.256 - x86_avx512_mask_vpmadd52l_uq_512, // llvm.x86.avx512.mask.vpmadd52l.uq.512 - x86_avx512_mask_xor_pd_128, // llvm.x86.avx512.mask.xor.pd.128 - x86_avx512_mask_xor_pd_256, // llvm.x86.avx512.mask.xor.pd.256 - x86_avx512_mask_xor_pd_512, // llvm.x86.avx512.mask.xor.pd.512 - x86_avx512_mask_xor_ps_128, // llvm.x86.avx512.mask.xor.ps.128 - x86_avx512_mask_xor_ps_256, // llvm.x86.avx512.mask.xor.ps.256 - x86_avx512_mask_xor_ps_512, // llvm.x86.avx512.mask.xor.ps.512 - x86_avx512_mask3_vfmadd_pd_128, // llvm.x86.avx512.mask3.vfmadd.pd.128 - x86_avx512_mask3_vfmadd_pd_256, // llvm.x86.avx512.mask3.vfmadd.pd.256 - x86_avx512_mask3_vfmadd_pd_512, // llvm.x86.avx512.mask3.vfmadd.pd.512 - x86_avx512_mask3_vfmadd_ps_128, // llvm.x86.avx512.mask3.vfmadd.ps.128 - x86_avx512_mask3_vfmadd_ps_256, // llvm.x86.avx512.mask3.vfmadd.ps.256 - x86_avx512_mask3_vfmadd_ps_512, // llvm.x86.avx512.mask3.vfmadd.ps.512 - x86_avx512_mask3_vfmadd_sd, // llvm.x86.avx512.mask3.vfmadd.sd - x86_avx512_mask3_vfmadd_ss, // llvm.x86.avx512.mask3.vfmadd.ss - x86_avx512_mask3_vfmaddsub_pd_128, // llvm.x86.avx512.mask3.vfmaddsub.pd.128 - x86_avx512_mask3_vfmaddsub_pd_256, // llvm.x86.avx512.mask3.vfmaddsub.pd.256 - x86_avx512_mask3_vfmaddsub_pd_512, // llvm.x86.avx512.mask3.vfmaddsub.pd.512 - x86_avx512_mask3_vfmaddsub_ps_128, // llvm.x86.avx512.mask3.vfmaddsub.ps.128 - x86_avx512_mask3_vfmaddsub_ps_256, // llvm.x86.avx512.mask3.vfmaddsub.ps.256 - x86_avx512_mask3_vfmaddsub_ps_512, // llvm.x86.avx512.mask3.vfmaddsub.ps.512 - x86_avx512_mask3_vfmsub_pd_128, // llvm.x86.avx512.mask3.vfmsub.pd.128 - x86_avx512_mask3_vfmsub_pd_256, // llvm.x86.avx512.mask3.vfmsub.pd.256 - x86_avx512_mask3_vfmsub_pd_512, // llvm.x86.avx512.mask3.vfmsub.pd.512 - x86_avx512_mask3_vfmsub_ps_128, // llvm.x86.avx512.mask3.vfmsub.ps.128 - x86_avx512_mask3_vfmsub_ps_256, // llvm.x86.avx512.mask3.vfmsub.ps.256 - x86_avx512_mask3_vfmsub_ps_512, // llvm.x86.avx512.mask3.vfmsub.ps.512 - x86_avx512_mask3_vfmsubadd_pd_128, // llvm.x86.avx512.mask3.vfmsubadd.pd.128 - x86_avx512_mask3_vfmsubadd_pd_256, // llvm.x86.avx512.mask3.vfmsubadd.pd.256 - x86_avx512_mask3_vfmsubadd_pd_512, // llvm.x86.avx512.mask3.vfmsubadd.pd.512 - x86_avx512_mask3_vfmsubadd_ps_128, // llvm.x86.avx512.mask3.vfmsubadd.ps.128 - x86_avx512_mask3_vfmsubadd_ps_256, // llvm.x86.avx512.mask3.vfmsubadd.ps.256 - x86_avx512_mask3_vfmsubadd_ps_512, // llvm.x86.avx512.mask3.vfmsubadd.ps.512 - x86_avx512_mask3_vfnmsub_pd_128, // llvm.x86.avx512.mask3.vfnmsub.pd.128 - x86_avx512_mask3_vfnmsub_pd_256, // llvm.x86.avx512.mask3.vfnmsub.pd.256 - x86_avx512_mask3_vfnmsub_pd_512, // llvm.x86.avx512.mask3.vfnmsub.pd.512 - x86_avx512_mask3_vfnmsub_ps_128, // llvm.x86.avx512.mask3.vfnmsub.ps.128 - x86_avx512_mask3_vfnmsub_ps_256, // llvm.x86.avx512.mask3.vfnmsub.ps.256 - x86_avx512_mask3_vfnmsub_ps_512, // llvm.x86.avx512.mask3.vfnmsub.ps.512 - x86_avx512_maskz_fixupimm_pd_128, // llvm.x86.avx512.maskz.fixupimm.pd.128 - x86_avx512_maskz_fixupimm_pd_256, // llvm.x86.avx512.maskz.fixupimm.pd.256 - x86_avx512_maskz_fixupimm_pd_512, // llvm.x86.avx512.maskz.fixupimm.pd.512 - x86_avx512_maskz_fixupimm_ps_128, // llvm.x86.avx512.maskz.fixupimm.ps.128 - x86_avx512_maskz_fixupimm_ps_256, // llvm.x86.avx512.maskz.fixupimm.ps.256 - x86_avx512_maskz_fixupimm_ps_512, // llvm.x86.avx512.maskz.fixupimm.ps.512 - x86_avx512_maskz_fixupimm_sd, // llvm.x86.avx512.maskz.fixupimm.sd - x86_avx512_maskz_fixupimm_ss, // llvm.x86.avx512.maskz.fixupimm.ss - x86_avx512_maskz_pternlog_d_128, // llvm.x86.avx512.maskz.pternlog.d.128 - x86_avx512_maskz_pternlog_d_256, // llvm.x86.avx512.maskz.pternlog.d.256 - x86_avx512_maskz_pternlog_d_512, // llvm.x86.avx512.maskz.pternlog.d.512 - x86_avx512_maskz_pternlog_q_128, // llvm.x86.avx512.maskz.pternlog.q.128 - x86_avx512_maskz_pternlog_q_256, // llvm.x86.avx512.maskz.pternlog.q.256 - x86_avx512_maskz_pternlog_q_512, // llvm.x86.avx512.maskz.pternlog.q.512 - x86_avx512_maskz_vfmadd_pd_128, // llvm.x86.avx512.maskz.vfmadd.pd.128 - x86_avx512_maskz_vfmadd_pd_256, // llvm.x86.avx512.maskz.vfmadd.pd.256 - x86_avx512_maskz_vfmadd_pd_512, // llvm.x86.avx512.maskz.vfmadd.pd.512 - x86_avx512_maskz_vfmadd_ps_128, // llvm.x86.avx512.maskz.vfmadd.ps.128 - x86_avx512_maskz_vfmadd_ps_256, // llvm.x86.avx512.maskz.vfmadd.ps.256 - x86_avx512_maskz_vfmadd_ps_512, // llvm.x86.avx512.maskz.vfmadd.ps.512 - x86_avx512_maskz_vfmadd_sd, // llvm.x86.avx512.maskz.vfmadd.sd - x86_avx512_maskz_vfmadd_ss, // llvm.x86.avx512.maskz.vfmadd.ss - x86_avx512_maskz_vfmaddsub_pd_128, // llvm.x86.avx512.maskz.vfmaddsub.pd.128 - x86_avx512_maskz_vfmaddsub_pd_256, // llvm.x86.avx512.maskz.vfmaddsub.pd.256 - x86_avx512_maskz_vfmaddsub_pd_512, // llvm.x86.avx512.maskz.vfmaddsub.pd.512 - x86_avx512_maskz_vfmaddsub_ps_128, // llvm.x86.avx512.maskz.vfmaddsub.ps.128 - x86_avx512_maskz_vfmaddsub_ps_256, // llvm.x86.avx512.maskz.vfmaddsub.ps.256 - x86_avx512_maskz_vfmaddsub_ps_512, // llvm.x86.avx512.maskz.vfmaddsub.ps.512 - x86_avx512_maskz_vpermt2var_d_128, // llvm.x86.avx512.maskz.vpermt2var.d.128 - x86_avx512_maskz_vpermt2var_d_256, // llvm.x86.avx512.maskz.vpermt2var.d.256 - x86_avx512_maskz_vpermt2var_d_512, // llvm.x86.avx512.maskz.vpermt2var.d.512 - x86_avx512_maskz_vpermt2var_hi_128, // llvm.x86.avx512.maskz.vpermt2var.hi.128 - x86_avx512_maskz_vpermt2var_hi_256, // llvm.x86.avx512.maskz.vpermt2var.hi.256 - x86_avx512_maskz_vpermt2var_hi_512, // llvm.x86.avx512.maskz.vpermt2var.hi.512 - x86_avx512_maskz_vpermt2var_pd_128, // llvm.x86.avx512.maskz.vpermt2var.pd.128 - x86_avx512_maskz_vpermt2var_pd_256, // llvm.x86.avx512.maskz.vpermt2var.pd.256 - x86_avx512_maskz_vpermt2var_pd_512, // llvm.x86.avx512.maskz.vpermt2var.pd.512 - x86_avx512_maskz_vpermt2var_ps_128, // llvm.x86.avx512.maskz.vpermt2var.ps.128 - x86_avx512_maskz_vpermt2var_ps_256, // llvm.x86.avx512.maskz.vpermt2var.ps.256 - x86_avx512_maskz_vpermt2var_ps_512, // llvm.x86.avx512.maskz.vpermt2var.ps.512 - x86_avx512_maskz_vpermt2var_q_128, // llvm.x86.avx512.maskz.vpermt2var.q.128 - x86_avx512_maskz_vpermt2var_q_256, // llvm.x86.avx512.maskz.vpermt2var.q.256 - x86_avx512_maskz_vpermt2var_q_512, // llvm.x86.avx512.maskz.vpermt2var.q.512 - x86_avx512_maskz_vpermt2var_qi_128, // llvm.x86.avx512.maskz.vpermt2var.qi.128 - x86_avx512_maskz_vpermt2var_qi_256, // llvm.x86.avx512.maskz.vpermt2var.qi.256 - x86_avx512_maskz_vpermt2var_qi_512, // llvm.x86.avx512.maskz.vpermt2var.qi.512 - x86_avx512_maskz_vpmadd52h_uq_128, // llvm.x86.avx512.maskz.vpmadd52h.uq.128 - x86_avx512_maskz_vpmadd52h_uq_256, // llvm.x86.avx512.maskz.vpmadd52h.uq.256 - x86_avx512_maskz_vpmadd52h_uq_512, // llvm.x86.avx512.maskz.vpmadd52h.uq.512 - x86_avx512_maskz_vpmadd52l_uq_128, // llvm.x86.avx512.maskz.vpmadd52l.uq.128 - x86_avx512_maskz_vpmadd52l_uq_256, // llvm.x86.avx512.maskz.vpmadd52l.uq.256 - x86_avx512_maskz_vpmadd52l_uq_512, // llvm.x86.avx512.maskz.vpmadd52l.uq.512 - x86_avx512_movntdqa, // llvm.x86.avx512.movntdqa - x86_avx512_pmovzxbd, // llvm.x86.avx512.pmovzxbd - x86_avx512_pmovzxbq, // llvm.x86.avx512.pmovzxbq - x86_avx512_pmovzxdq, // llvm.x86.avx512.pmovzxdq - x86_avx512_pmovzxwd, // llvm.x86.avx512.pmovzxwd - x86_avx512_pmovzxwq, // llvm.x86.avx512.pmovzxwq - x86_avx512_psad_bw_512, // llvm.x86.avx512.psad.bw.512 - x86_avx512_ptestm_b_128, // llvm.x86.avx512.ptestm.b.128 - x86_avx512_ptestm_b_256, // llvm.x86.avx512.ptestm.b.256 - x86_avx512_ptestm_b_512, // llvm.x86.avx512.ptestm.b.512 - x86_avx512_ptestm_d_128, // llvm.x86.avx512.ptestm.d.128 - x86_avx512_ptestm_d_256, // llvm.x86.avx512.ptestm.d.256 - x86_avx512_ptestm_d_512, // llvm.x86.avx512.ptestm.d.512 - x86_avx512_ptestm_q_128, // llvm.x86.avx512.ptestm.q.128 - x86_avx512_ptestm_q_256, // llvm.x86.avx512.ptestm.q.256 - x86_avx512_ptestm_q_512, // llvm.x86.avx512.ptestm.q.512 - x86_avx512_ptestm_w_128, // llvm.x86.avx512.ptestm.w.128 - x86_avx512_ptestm_w_256, // llvm.x86.avx512.ptestm.w.256 - x86_avx512_ptestm_w_512, // llvm.x86.avx512.ptestm.w.512 - x86_avx512_ptestnm_b_128, // llvm.x86.avx512.ptestnm.b.128 - x86_avx512_ptestnm_b_256, // llvm.x86.avx512.ptestnm.b.256 - x86_avx512_ptestnm_b_512, // llvm.x86.avx512.ptestnm.b.512 - x86_avx512_ptestnm_d_128, // llvm.x86.avx512.ptestnm.d.128 - x86_avx512_ptestnm_d_256, // llvm.x86.avx512.ptestnm.d.256 - x86_avx512_ptestnm_d_512, // llvm.x86.avx512.ptestnm.d.512 - x86_avx512_ptestnm_q_128, // llvm.x86.avx512.ptestnm.q.128 - x86_avx512_ptestnm_q_256, // llvm.x86.avx512.ptestnm.q.256 - x86_avx512_ptestnm_q_512, // llvm.x86.avx512.ptestnm.q.512 - x86_avx512_ptestnm_w_128, // llvm.x86.avx512.ptestnm.w.128 - x86_avx512_ptestnm_w_256, // llvm.x86.avx512.ptestnm.w.256 - x86_avx512_ptestnm_w_512, // llvm.x86.avx512.ptestnm.w.512 - x86_avx512_rcp14_pd_128, // llvm.x86.avx512.rcp14.pd.128 - x86_avx512_rcp14_pd_256, // llvm.x86.avx512.rcp14.pd.256 - x86_avx512_rcp14_pd_512, // llvm.x86.avx512.rcp14.pd.512 - x86_avx512_rcp14_ps_128, // llvm.x86.avx512.rcp14.ps.128 - x86_avx512_rcp14_ps_256, // llvm.x86.avx512.rcp14.ps.256 - x86_avx512_rcp14_ps_512, // llvm.x86.avx512.rcp14.ps.512 - x86_avx512_rcp14_sd, // llvm.x86.avx512.rcp14.sd - x86_avx512_rcp14_ss, // llvm.x86.avx512.rcp14.ss - x86_avx512_rcp28_pd, // llvm.x86.avx512.rcp28.pd - x86_avx512_rcp28_ps, // llvm.x86.avx512.rcp28.ps - x86_avx512_rcp28_sd, // llvm.x86.avx512.rcp28.sd - x86_avx512_rcp28_ss, // llvm.x86.avx512.rcp28.ss - x86_avx512_rsqrt14_pd_128, // llvm.x86.avx512.rsqrt14.pd.128 - x86_avx512_rsqrt14_pd_256, // llvm.x86.avx512.rsqrt14.pd.256 - x86_avx512_rsqrt14_pd_512, // llvm.x86.avx512.rsqrt14.pd.512 - x86_avx512_rsqrt14_ps_128, // llvm.x86.avx512.rsqrt14.ps.128 - x86_avx512_rsqrt14_ps_256, // llvm.x86.avx512.rsqrt14.ps.256 - x86_avx512_rsqrt14_ps_512, // llvm.x86.avx512.rsqrt14.ps.512 - x86_avx512_rsqrt14_sd, // llvm.x86.avx512.rsqrt14.sd - x86_avx512_rsqrt14_ss, // llvm.x86.avx512.rsqrt14.ss - x86_avx512_rsqrt28_pd, // llvm.x86.avx512.rsqrt28.pd - x86_avx512_rsqrt28_ps, // llvm.x86.avx512.rsqrt28.ps - x86_avx512_rsqrt28_sd, // llvm.x86.avx512.rsqrt28.sd - x86_avx512_rsqrt28_ss, // llvm.x86.avx512.rsqrt28.ss - x86_avx512_scatter_dpd_512, // llvm.x86.avx512.scatter.dpd.512 - x86_avx512_scatter_dpi_512, // llvm.x86.avx512.scatter.dpi.512 - x86_avx512_scatter_dpq_512, // llvm.x86.avx512.scatter.dpq.512 - x86_avx512_scatter_dps_512, // llvm.x86.avx512.scatter.dps.512 - x86_avx512_scatter_qpd_512, // llvm.x86.avx512.scatter.qpd.512 - x86_avx512_scatter_qpi_512, // llvm.x86.avx512.scatter.qpi.512 - x86_avx512_scatter_qpq_512, // llvm.x86.avx512.scatter.qpq.512 - x86_avx512_scatter_qps_512, // llvm.x86.avx512.scatter.qps.512 - x86_avx512_scatterdiv2_df, // llvm.x86.avx512.scatterdiv2.df - x86_avx512_scatterdiv2_di, // llvm.x86.avx512.scatterdiv2.di - x86_avx512_scatterdiv4_df, // llvm.x86.avx512.scatterdiv4.df - x86_avx512_scatterdiv4_di, // llvm.x86.avx512.scatterdiv4.di - x86_avx512_scatterdiv4_sf, // llvm.x86.avx512.scatterdiv4.sf - x86_avx512_scatterdiv4_si, // llvm.x86.avx512.scatterdiv4.si - x86_avx512_scatterdiv8_sf, // llvm.x86.avx512.scatterdiv8.sf - x86_avx512_scatterdiv8_si, // llvm.x86.avx512.scatterdiv8.si - x86_avx512_scatterpf_dpd_512, // llvm.x86.avx512.scatterpf.dpd.512 - x86_avx512_scatterpf_dps_512, // llvm.x86.avx512.scatterpf.dps.512 - x86_avx512_scatterpf_qpd_512, // llvm.x86.avx512.scatterpf.qpd.512 - x86_avx512_scatterpf_qps_512, // llvm.x86.avx512.scatterpf.qps.512 - x86_avx512_scattersiv2_df, // llvm.x86.avx512.scattersiv2.df - x86_avx512_scattersiv2_di, // llvm.x86.avx512.scattersiv2.di - x86_avx512_scattersiv4_df, // llvm.x86.avx512.scattersiv4.df - x86_avx512_scattersiv4_di, // llvm.x86.avx512.scattersiv4.di - x86_avx512_scattersiv4_sf, // llvm.x86.avx512.scattersiv4.sf - x86_avx512_scattersiv4_si, // llvm.x86.avx512.scattersiv4.si - x86_avx512_scattersiv8_sf, // llvm.x86.avx512.scattersiv8.sf - x86_avx512_scattersiv8_si, // llvm.x86.avx512.scattersiv8.si - x86_avx512_vbroadcast_sd_512, // llvm.x86.avx512.vbroadcast.sd.512 - x86_avx512_vbroadcast_ss_512, // llvm.x86.avx512.vbroadcast.ss.512 - x86_avx512_vcomi_sd, // llvm.x86.avx512.vcomi.sd - x86_avx512_vcomi_ss, // llvm.x86.avx512.vcomi.ss - x86_avx512_vcvtsd2si32, // llvm.x86.avx512.vcvtsd2si32 - x86_avx512_vcvtsd2si64, // llvm.x86.avx512.vcvtsd2si64 - x86_avx512_vcvtsd2usi32, // llvm.x86.avx512.vcvtsd2usi32 - x86_avx512_vcvtsd2usi64, // llvm.x86.avx512.vcvtsd2usi64 - x86_avx512_vcvtss2si32, // llvm.x86.avx512.vcvtss2si32 - x86_avx512_vcvtss2si64, // llvm.x86.avx512.vcvtss2si64 - x86_avx512_vcvtss2usi32, // llvm.x86.avx512.vcvtss2usi32 - x86_avx512_vcvtss2usi64, // llvm.x86.avx512.vcvtss2usi64 - x86_bmi_bextr_32, // llvm.x86.bmi.bextr.32 - x86_bmi_bextr_64, // llvm.x86.bmi.bextr.64 - x86_bmi_bzhi_32, // llvm.x86.bmi.bzhi.32 - x86_bmi_bzhi_64, // llvm.x86.bmi.bzhi.64 - x86_bmi_pdep_32, // llvm.x86.bmi.pdep.32 - x86_bmi_pdep_64, // llvm.x86.bmi.pdep.64 - x86_bmi_pext_32, // llvm.x86.bmi.pext.32 - x86_bmi_pext_64, // llvm.x86.bmi.pext.64 - x86_clflushopt, // llvm.x86.clflushopt - x86_flags_read_u32, // llvm.x86.flags.read.u32 - x86_flags_read_u64, // llvm.x86.flags.read.u64 - x86_flags_write_u32, // llvm.x86.flags.write.u32 - x86_flags_write_u64, // llvm.x86.flags.write.u64 - x86_fma_vfmadd_pd, // llvm.x86.fma.vfmadd.pd - x86_fma_vfmadd_pd_256, // llvm.x86.fma.vfmadd.pd.256 - x86_fma_vfmadd_ps, // llvm.x86.fma.vfmadd.ps - x86_fma_vfmadd_ps_256, // llvm.x86.fma.vfmadd.ps.256 - x86_fma_vfmadd_sd, // llvm.x86.fma.vfmadd.sd - x86_fma_vfmadd_ss, // llvm.x86.fma.vfmadd.ss - x86_fma_vfmaddsub_pd, // llvm.x86.fma.vfmaddsub.pd - x86_fma_vfmaddsub_pd_256, // llvm.x86.fma.vfmaddsub.pd.256 - x86_fma_vfmaddsub_ps, // llvm.x86.fma.vfmaddsub.ps - x86_fma_vfmaddsub_ps_256, // llvm.x86.fma.vfmaddsub.ps.256 - x86_fma_vfmsub_pd, // llvm.x86.fma.vfmsub.pd - x86_fma_vfmsub_pd_256, // llvm.x86.fma.vfmsub.pd.256 - x86_fma_vfmsub_ps, // llvm.x86.fma.vfmsub.ps - x86_fma_vfmsub_ps_256, // llvm.x86.fma.vfmsub.ps.256 - x86_fma_vfmsub_sd, // llvm.x86.fma.vfmsub.sd - x86_fma_vfmsub_ss, // llvm.x86.fma.vfmsub.ss - x86_fma_vfmsubadd_pd, // llvm.x86.fma.vfmsubadd.pd - x86_fma_vfmsubadd_pd_256, // llvm.x86.fma.vfmsubadd.pd.256 - x86_fma_vfmsubadd_ps, // llvm.x86.fma.vfmsubadd.ps - x86_fma_vfmsubadd_ps_256, // llvm.x86.fma.vfmsubadd.ps.256 - x86_fma_vfnmadd_pd, // llvm.x86.fma.vfnmadd.pd - x86_fma_vfnmadd_pd_256, // llvm.x86.fma.vfnmadd.pd.256 - x86_fma_vfnmadd_ps, // llvm.x86.fma.vfnmadd.ps - x86_fma_vfnmadd_ps_256, // llvm.x86.fma.vfnmadd.ps.256 - x86_fma_vfnmadd_sd, // llvm.x86.fma.vfnmadd.sd - x86_fma_vfnmadd_ss, // llvm.x86.fma.vfnmadd.ss - x86_fma_vfnmsub_pd, // llvm.x86.fma.vfnmsub.pd - x86_fma_vfnmsub_pd_256, // llvm.x86.fma.vfnmsub.pd.256 - x86_fma_vfnmsub_ps, // llvm.x86.fma.vfnmsub.ps - x86_fma_vfnmsub_ps_256, // llvm.x86.fma.vfnmsub.ps.256 - x86_fma_vfnmsub_sd, // llvm.x86.fma.vfnmsub.sd - x86_fma_vfnmsub_ss, // llvm.x86.fma.vfnmsub.ss - x86_fxrstor, // llvm.x86.fxrstor - x86_fxrstor64, // llvm.x86.fxrstor64 - x86_fxsave, // llvm.x86.fxsave - x86_fxsave64, // llvm.x86.fxsave64 - x86_int, // llvm.x86.int - x86_mmx_emms, // llvm.x86.mmx.emms - x86_mmx_femms, // llvm.x86.mmx.femms - x86_mmx_maskmovq, // llvm.x86.mmx.maskmovq - x86_mmx_movnt_dq, // llvm.x86.mmx.movnt.dq - x86_mmx_packssdw, // llvm.x86.mmx.packssdw - x86_mmx_packsswb, // llvm.x86.mmx.packsswb - x86_mmx_packuswb, // llvm.x86.mmx.packuswb - x86_mmx_padd_b, // llvm.x86.mmx.padd.b - x86_mmx_padd_d, // llvm.x86.mmx.padd.d - x86_mmx_padd_q, // llvm.x86.mmx.padd.q - x86_mmx_padd_w, // llvm.x86.mmx.padd.w - x86_mmx_padds_b, // llvm.x86.mmx.padds.b - x86_mmx_padds_w, // llvm.x86.mmx.padds.w - x86_mmx_paddus_b, // llvm.x86.mmx.paddus.b - x86_mmx_paddus_w, // llvm.x86.mmx.paddus.w - x86_mmx_palignr_b, // llvm.x86.mmx.palignr.b - x86_mmx_pand, // llvm.x86.mmx.pand - x86_mmx_pandn, // llvm.x86.mmx.pandn - x86_mmx_pavg_b, // llvm.x86.mmx.pavg.b - x86_mmx_pavg_w, // llvm.x86.mmx.pavg.w - x86_mmx_pcmpeq_b, // llvm.x86.mmx.pcmpeq.b - x86_mmx_pcmpeq_d, // llvm.x86.mmx.pcmpeq.d - x86_mmx_pcmpeq_w, // llvm.x86.mmx.pcmpeq.w - x86_mmx_pcmpgt_b, // llvm.x86.mmx.pcmpgt.b - x86_mmx_pcmpgt_d, // llvm.x86.mmx.pcmpgt.d - x86_mmx_pcmpgt_w, // llvm.x86.mmx.pcmpgt.w - x86_mmx_pextr_w, // llvm.x86.mmx.pextr.w - x86_mmx_pinsr_w, // llvm.x86.mmx.pinsr.w - x86_mmx_pmadd_wd, // llvm.x86.mmx.pmadd.wd - x86_mmx_pmaxs_w, // llvm.x86.mmx.pmaxs.w - x86_mmx_pmaxu_b, // llvm.x86.mmx.pmaxu.b - x86_mmx_pmins_w, // llvm.x86.mmx.pmins.w - x86_mmx_pminu_b, // llvm.x86.mmx.pminu.b - x86_mmx_pmovmskb, // llvm.x86.mmx.pmovmskb - x86_mmx_pmulh_w, // llvm.x86.mmx.pmulh.w - x86_mmx_pmulhu_w, // llvm.x86.mmx.pmulhu.w - x86_mmx_pmull_w, // llvm.x86.mmx.pmull.w - x86_mmx_pmulu_dq, // llvm.x86.mmx.pmulu.dq - x86_mmx_por, // llvm.x86.mmx.por - x86_mmx_psad_bw, // llvm.x86.mmx.psad.bw - x86_mmx_psll_d, // llvm.x86.mmx.psll.d - x86_mmx_psll_q, // llvm.x86.mmx.psll.q - x86_mmx_psll_w, // llvm.x86.mmx.psll.w - x86_mmx_pslli_d, // llvm.x86.mmx.pslli.d - x86_mmx_pslli_q, // llvm.x86.mmx.pslli.q - x86_mmx_pslli_w, // llvm.x86.mmx.pslli.w - x86_mmx_psra_d, // llvm.x86.mmx.psra.d - x86_mmx_psra_w, // llvm.x86.mmx.psra.w - x86_mmx_psrai_d, // llvm.x86.mmx.psrai.d - x86_mmx_psrai_w, // llvm.x86.mmx.psrai.w - x86_mmx_psrl_d, // llvm.x86.mmx.psrl.d - x86_mmx_psrl_q, // llvm.x86.mmx.psrl.q - x86_mmx_psrl_w, // llvm.x86.mmx.psrl.w - x86_mmx_psrli_d, // llvm.x86.mmx.psrli.d - x86_mmx_psrli_q, // llvm.x86.mmx.psrli.q - x86_mmx_psrli_w, // llvm.x86.mmx.psrli.w - x86_mmx_psub_b, // llvm.x86.mmx.psub.b - x86_mmx_psub_d, // llvm.x86.mmx.psub.d - x86_mmx_psub_q, // llvm.x86.mmx.psub.q - x86_mmx_psub_w, // llvm.x86.mmx.psub.w - x86_mmx_psubs_b, // llvm.x86.mmx.psubs.b - x86_mmx_psubs_w, // llvm.x86.mmx.psubs.w - x86_mmx_psubus_b, // llvm.x86.mmx.psubus.b - x86_mmx_psubus_w, // llvm.x86.mmx.psubus.w - x86_mmx_punpckhbw, // llvm.x86.mmx.punpckhbw - x86_mmx_punpckhdq, // llvm.x86.mmx.punpckhdq - x86_mmx_punpckhwd, // llvm.x86.mmx.punpckhwd - x86_mmx_punpcklbw, // llvm.x86.mmx.punpcklbw - x86_mmx_punpckldq, // llvm.x86.mmx.punpckldq - x86_mmx_punpcklwd, // llvm.x86.mmx.punpcklwd - x86_mmx_pxor, // llvm.x86.mmx.pxor - x86_monitorx, // llvm.x86.monitorx - x86_mwaitx, // llvm.x86.mwaitx - x86_pclmulqdq, // llvm.x86.pclmulqdq - x86_rdfsbase_32, // llvm.x86.rdfsbase.32 - x86_rdfsbase_64, // llvm.x86.rdfsbase.64 - x86_rdgsbase_32, // llvm.x86.rdgsbase.32 - x86_rdgsbase_64, // llvm.x86.rdgsbase.64 - x86_rdpkru, // llvm.x86.rdpkru - x86_rdpmc, // llvm.x86.rdpmc - x86_rdrand_16, // llvm.x86.rdrand.16 - x86_rdrand_32, // llvm.x86.rdrand.32 - x86_rdrand_64, // llvm.x86.rdrand.64 - x86_rdseed_16, // llvm.x86.rdseed.16 - x86_rdseed_32, // llvm.x86.rdseed.32 - x86_rdseed_64, // llvm.x86.rdseed.64 - x86_rdtsc, // llvm.x86.rdtsc - x86_rdtscp, // llvm.x86.rdtscp - x86_seh_ehguard, // llvm.x86.seh.ehguard - x86_seh_ehregnode, // llvm.x86.seh.ehregnode - x86_seh_lsda, // llvm.x86.seh.lsda - x86_seh_recoverfp, // llvm.x86.seh.recoverfp - x86_sha1msg1, // llvm.x86.sha1msg1 - x86_sha1msg2, // llvm.x86.sha1msg2 - x86_sha1nexte, // llvm.x86.sha1nexte - x86_sha1rnds4, // llvm.x86.sha1rnds4 - x86_sha256msg1, // llvm.x86.sha256msg1 - x86_sha256msg2, // llvm.x86.sha256msg2 - x86_sha256rnds2, // llvm.x86.sha256rnds2 - x86_sse_add_ss, // llvm.x86.sse.add.ss - x86_sse_cmp_ps, // llvm.x86.sse.cmp.ps - x86_sse_cmp_ss, // llvm.x86.sse.cmp.ss - x86_sse_comieq_ss, // llvm.x86.sse.comieq.ss - x86_sse_comige_ss, // llvm.x86.sse.comige.ss - x86_sse_comigt_ss, // llvm.x86.sse.comigt.ss - x86_sse_comile_ss, // llvm.x86.sse.comile.ss - x86_sse_comilt_ss, // llvm.x86.sse.comilt.ss - x86_sse_comineq_ss, // llvm.x86.sse.comineq.ss - x86_sse_cvtpd2pi, // llvm.x86.sse.cvtpd2pi - x86_sse_cvtpi2pd, // llvm.x86.sse.cvtpi2pd - x86_sse_cvtpi2ps, // llvm.x86.sse.cvtpi2ps - x86_sse_cvtps2pi, // llvm.x86.sse.cvtps2pi - x86_sse_cvtsi2ss, // llvm.x86.sse.cvtsi2ss - x86_sse_cvtsi642ss, // llvm.x86.sse.cvtsi642ss - x86_sse_cvtss2si, // llvm.x86.sse.cvtss2si - x86_sse_cvtss2si64, // llvm.x86.sse.cvtss2si64 - x86_sse_cvttpd2pi, // llvm.x86.sse.cvttpd2pi - x86_sse_cvttps2pi, // llvm.x86.sse.cvttps2pi - x86_sse_cvttss2si, // llvm.x86.sse.cvttss2si - x86_sse_cvttss2si64, // llvm.x86.sse.cvttss2si64 - x86_sse_div_ss, // llvm.x86.sse.div.ss - x86_sse_ldmxcsr, // llvm.x86.sse.ldmxcsr - x86_sse_max_ps, // llvm.x86.sse.max.ps - x86_sse_max_ss, // llvm.x86.sse.max.ss - x86_sse_min_ps, // llvm.x86.sse.min.ps - x86_sse_min_ss, // llvm.x86.sse.min.ss - x86_sse_movmsk_ps, // llvm.x86.sse.movmsk.ps - x86_sse_mul_ss, // llvm.x86.sse.mul.ss - x86_sse_pshuf_w, // llvm.x86.sse.pshuf.w - x86_sse_rcp_ps, // llvm.x86.sse.rcp.ps - x86_sse_rcp_ss, // llvm.x86.sse.rcp.ss - x86_sse_rsqrt_ps, // llvm.x86.sse.rsqrt.ps - x86_sse_rsqrt_ss, // llvm.x86.sse.rsqrt.ss - x86_sse_sfence, // llvm.x86.sse.sfence - x86_sse_sqrt_ps, // llvm.x86.sse.sqrt.ps - x86_sse_sqrt_ss, // llvm.x86.sse.sqrt.ss - x86_sse_stmxcsr, // llvm.x86.sse.stmxcsr - x86_sse_sub_ss, // llvm.x86.sse.sub.ss - x86_sse_ucomieq_ss, // llvm.x86.sse.ucomieq.ss - x86_sse_ucomige_ss, // llvm.x86.sse.ucomige.ss - x86_sse_ucomigt_ss, // llvm.x86.sse.ucomigt.ss - x86_sse_ucomile_ss, // llvm.x86.sse.ucomile.ss - x86_sse_ucomilt_ss, // llvm.x86.sse.ucomilt.ss - x86_sse_ucomineq_ss, // llvm.x86.sse.ucomineq.ss - x86_sse2_add_sd, // llvm.x86.sse2.add.sd - x86_sse2_clflush, // llvm.x86.sse2.clflush - x86_sse2_cmp_pd, // llvm.x86.sse2.cmp.pd - x86_sse2_cmp_sd, // llvm.x86.sse2.cmp.sd - x86_sse2_comieq_sd, // llvm.x86.sse2.comieq.sd - x86_sse2_comige_sd, // llvm.x86.sse2.comige.sd - x86_sse2_comigt_sd, // llvm.x86.sse2.comigt.sd - x86_sse2_comile_sd, // llvm.x86.sse2.comile.sd - x86_sse2_comilt_sd, // llvm.x86.sse2.comilt.sd - x86_sse2_comineq_sd, // llvm.x86.sse2.comineq.sd - x86_sse2_cvtdq2ps, // llvm.x86.sse2.cvtdq2ps - x86_sse2_cvtpd2dq, // llvm.x86.sse2.cvtpd2dq - x86_sse2_cvtpd2ps, // llvm.x86.sse2.cvtpd2ps - x86_sse2_cvtps2dq, // llvm.x86.sse2.cvtps2dq - x86_sse2_cvtsd2si, // llvm.x86.sse2.cvtsd2si - x86_sse2_cvtsd2si64, // llvm.x86.sse2.cvtsd2si64 - x86_sse2_cvtsd2ss, // llvm.x86.sse2.cvtsd2ss - x86_sse2_cvtsi2sd, // llvm.x86.sse2.cvtsi2sd - x86_sse2_cvtsi642sd, // llvm.x86.sse2.cvtsi642sd - x86_sse2_cvtss2sd, // llvm.x86.sse2.cvtss2sd - x86_sse2_cvttpd2dq, // llvm.x86.sse2.cvttpd2dq - x86_sse2_cvttps2dq, // llvm.x86.sse2.cvttps2dq - x86_sse2_cvttsd2si, // llvm.x86.sse2.cvttsd2si - x86_sse2_cvttsd2si64, // llvm.x86.sse2.cvttsd2si64 - x86_sse2_div_sd, // llvm.x86.sse2.div.sd - x86_sse2_lfence, // llvm.x86.sse2.lfence - x86_sse2_maskmov_dqu, // llvm.x86.sse2.maskmov.dqu - x86_sse2_max_pd, // llvm.x86.sse2.max.pd - x86_sse2_max_sd, // llvm.x86.sse2.max.sd - x86_sse2_mfence, // llvm.x86.sse2.mfence - x86_sse2_min_pd, // llvm.x86.sse2.min.pd - x86_sse2_min_sd, // llvm.x86.sse2.min.sd - x86_sse2_movmsk_pd, // llvm.x86.sse2.movmsk.pd - x86_sse2_mul_sd, // llvm.x86.sse2.mul.sd - x86_sse2_packssdw_128, // llvm.x86.sse2.packssdw.128 - x86_sse2_packsswb_128, // llvm.x86.sse2.packsswb.128 - x86_sse2_packuswb_128, // llvm.x86.sse2.packuswb.128 - x86_sse2_padds_b, // llvm.x86.sse2.padds.b - x86_sse2_padds_w, // llvm.x86.sse2.padds.w - x86_sse2_paddus_b, // llvm.x86.sse2.paddus.b - x86_sse2_paddus_w, // llvm.x86.sse2.paddus.w - x86_sse2_pause, // llvm.x86.sse2.pause - x86_sse2_pavg_b, // llvm.x86.sse2.pavg.b - x86_sse2_pavg_w, // llvm.x86.sse2.pavg.w - x86_sse2_pmadd_wd, // llvm.x86.sse2.pmadd.wd - x86_sse2_pmovmskb_128, // llvm.x86.sse2.pmovmskb.128 - x86_sse2_pmulh_w, // llvm.x86.sse2.pmulh.w - x86_sse2_pmulhu_w, // llvm.x86.sse2.pmulhu.w - x86_sse2_pmulu_dq, // llvm.x86.sse2.pmulu.dq - x86_sse2_psad_bw, // llvm.x86.sse2.psad.bw - x86_sse2_psll_d, // llvm.x86.sse2.psll.d - x86_sse2_psll_q, // llvm.x86.sse2.psll.q - x86_sse2_psll_w, // llvm.x86.sse2.psll.w - x86_sse2_pslli_d, // llvm.x86.sse2.pslli.d - x86_sse2_pslli_q, // llvm.x86.sse2.pslli.q - x86_sse2_pslli_w, // llvm.x86.sse2.pslli.w - x86_sse2_psra_d, // llvm.x86.sse2.psra.d - x86_sse2_psra_w, // llvm.x86.sse2.psra.w - x86_sse2_psrai_d, // llvm.x86.sse2.psrai.d - x86_sse2_psrai_w, // llvm.x86.sse2.psrai.w - x86_sse2_psrl_d, // llvm.x86.sse2.psrl.d - x86_sse2_psrl_q, // llvm.x86.sse2.psrl.q - x86_sse2_psrl_w, // llvm.x86.sse2.psrl.w - x86_sse2_psrli_d, // llvm.x86.sse2.psrli.d - x86_sse2_psrli_q, // llvm.x86.sse2.psrli.q - x86_sse2_psrli_w, // llvm.x86.sse2.psrli.w - x86_sse2_psubs_b, // llvm.x86.sse2.psubs.b - x86_sse2_psubs_w, // llvm.x86.sse2.psubs.w - x86_sse2_psubus_b, // llvm.x86.sse2.psubus.b - x86_sse2_psubus_w, // llvm.x86.sse2.psubus.w - x86_sse2_sqrt_pd, // llvm.x86.sse2.sqrt.pd - x86_sse2_sqrt_sd, // llvm.x86.sse2.sqrt.sd - x86_sse2_sub_sd, // llvm.x86.sse2.sub.sd - x86_sse2_ucomieq_sd, // llvm.x86.sse2.ucomieq.sd - x86_sse2_ucomige_sd, // llvm.x86.sse2.ucomige.sd - x86_sse2_ucomigt_sd, // llvm.x86.sse2.ucomigt.sd - x86_sse2_ucomile_sd, // llvm.x86.sse2.ucomile.sd - x86_sse2_ucomilt_sd, // llvm.x86.sse2.ucomilt.sd - x86_sse2_ucomineq_sd, // llvm.x86.sse2.ucomineq.sd - x86_sse3_addsub_pd, // llvm.x86.sse3.addsub.pd - x86_sse3_addsub_ps, // llvm.x86.sse3.addsub.ps - x86_sse3_hadd_pd, // llvm.x86.sse3.hadd.pd - x86_sse3_hadd_ps, // llvm.x86.sse3.hadd.ps - x86_sse3_hsub_pd, // llvm.x86.sse3.hsub.pd - x86_sse3_hsub_ps, // llvm.x86.sse3.hsub.ps - x86_sse3_ldu_dq, // llvm.x86.sse3.ldu.dq - x86_sse3_monitor, // llvm.x86.sse3.monitor - x86_sse3_mwait, // llvm.x86.sse3.mwait - x86_sse41_blendvpd, // llvm.x86.sse41.blendvpd - x86_sse41_blendvps, // llvm.x86.sse41.blendvps - x86_sse41_dppd, // llvm.x86.sse41.dppd - x86_sse41_dpps, // llvm.x86.sse41.dpps - x86_sse41_insertps, // llvm.x86.sse41.insertps - x86_sse41_movntdqa, // llvm.x86.sse41.movntdqa - x86_sse41_mpsadbw, // llvm.x86.sse41.mpsadbw - x86_sse41_packusdw, // llvm.x86.sse41.packusdw - x86_sse41_pblendvb, // llvm.x86.sse41.pblendvb - x86_sse41_phminposuw, // llvm.x86.sse41.phminposuw - x86_sse41_pmuldq, // llvm.x86.sse41.pmuldq - x86_sse41_ptestc, // llvm.x86.sse41.ptestc - x86_sse41_ptestnzc, // llvm.x86.sse41.ptestnzc - x86_sse41_ptestz, // llvm.x86.sse41.ptestz - x86_sse41_round_pd, // llvm.x86.sse41.round.pd - x86_sse41_round_ps, // llvm.x86.sse41.round.ps - x86_sse41_round_sd, // llvm.x86.sse41.round.sd - x86_sse41_round_ss, // llvm.x86.sse41.round.ss - x86_sse42_crc32_32_16, // llvm.x86.sse42.crc32.32.16 - x86_sse42_crc32_32_32, // llvm.x86.sse42.crc32.32.32 - x86_sse42_crc32_32_8, // llvm.x86.sse42.crc32.32.8 - x86_sse42_crc32_64_64, // llvm.x86.sse42.crc32.64.64 - x86_sse42_pcmpestri128, // llvm.x86.sse42.pcmpestri128 - x86_sse42_pcmpestria128, // llvm.x86.sse42.pcmpestria128 - x86_sse42_pcmpestric128, // llvm.x86.sse42.pcmpestric128 - x86_sse42_pcmpestrio128, // llvm.x86.sse42.pcmpestrio128 - x86_sse42_pcmpestris128, // llvm.x86.sse42.pcmpestris128 - x86_sse42_pcmpestriz128, // llvm.x86.sse42.pcmpestriz128 - x86_sse42_pcmpestrm128, // llvm.x86.sse42.pcmpestrm128 - x86_sse42_pcmpistri128, // llvm.x86.sse42.pcmpistri128 - x86_sse42_pcmpistria128, // llvm.x86.sse42.pcmpistria128 - x86_sse42_pcmpistric128, // llvm.x86.sse42.pcmpistric128 - x86_sse42_pcmpistrio128, // llvm.x86.sse42.pcmpistrio128 - x86_sse42_pcmpistris128, // llvm.x86.sse42.pcmpistris128 - x86_sse42_pcmpistriz128, // llvm.x86.sse42.pcmpistriz128 - x86_sse42_pcmpistrm128, // llvm.x86.sse42.pcmpistrm128 - x86_sse4a_extrq, // llvm.x86.sse4a.extrq - x86_sse4a_extrqi, // llvm.x86.sse4a.extrqi - x86_sse4a_insertq, // llvm.x86.sse4a.insertq - x86_sse4a_insertqi, // llvm.x86.sse4a.insertqi - x86_ssse3_pabs_b, // llvm.x86.ssse3.pabs.b - x86_ssse3_pabs_b_128, // llvm.x86.ssse3.pabs.b.128 - x86_ssse3_pabs_d, // llvm.x86.ssse3.pabs.d - x86_ssse3_pabs_d_128, // llvm.x86.ssse3.pabs.d.128 - x86_ssse3_pabs_w, // llvm.x86.ssse3.pabs.w - x86_ssse3_pabs_w_128, // llvm.x86.ssse3.pabs.w.128 - x86_ssse3_phadd_d, // llvm.x86.ssse3.phadd.d - x86_ssse3_phadd_d_128, // llvm.x86.ssse3.phadd.d.128 - x86_ssse3_phadd_sw, // llvm.x86.ssse3.phadd.sw - x86_ssse3_phadd_sw_128, // llvm.x86.ssse3.phadd.sw.128 - x86_ssse3_phadd_w, // llvm.x86.ssse3.phadd.w - x86_ssse3_phadd_w_128, // llvm.x86.ssse3.phadd.w.128 - x86_ssse3_phsub_d, // llvm.x86.ssse3.phsub.d - x86_ssse3_phsub_d_128, // llvm.x86.ssse3.phsub.d.128 - x86_ssse3_phsub_sw, // llvm.x86.ssse3.phsub.sw - x86_ssse3_phsub_sw_128, // llvm.x86.ssse3.phsub.sw.128 - x86_ssse3_phsub_w, // llvm.x86.ssse3.phsub.w - x86_ssse3_phsub_w_128, // llvm.x86.ssse3.phsub.w.128 - x86_ssse3_pmadd_ub_sw, // llvm.x86.ssse3.pmadd.ub.sw - x86_ssse3_pmadd_ub_sw_128, // llvm.x86.ssse3.pmadd.ub.sw.128 - x86_ssse3_pmul_hr_sw, // llvm.x86.ssse3.pmul.hr.sw - x86_ssse3_pmul_hr_sw_128, // llvm.x86.ssse3.pmul.hr.sw.128 - x86_ssse3_pshuf_b, // llvm.x86.ssse3.pshuf.b - x86_ssse3_pshuf_b_128, // llvm.x86.ssse3.pshuf.b.128 - x86_ssse3_psign_b, // llvm.x86.ssse3.psign.b - x86_ssse3_psign_b_128, // llvm.x86.ssse3.psign.b.128 - x86_ssse3_psign_d, // llvm.x86.ssse3.psign.d - x86_ssse3_psign_d_128, // llvm.x86.ssse3.psign.d.128 - x86_ssse3_psign_w, // llvm.x86.ssse3.psign.w - x86_ssse3_psign_w_128, // llvm.x86.ssse3.psign.w.128 - x86_subborrow_u32, // llvm.x86.subborrow.u32 - x86_subborrow_u64, // llvm.x86.subborrow.u64 - x86_tbm_bextri_u32, // llvm.x86.tbm.bextri.u32 - x86_tbm_bextri_u64, // llvm.x86.tbm.bextri.u64 - x86_vcvtph2ps_128, // llvm.x86.vcvtph2ps.128 - x86_vcvtph2ps_256, // llvm.x86.vcvtph2ps.256 - x86_vcvtps2ph_128, // llvm.x86.vcvtps2ph.128 - x86_vcvtps2ph_256, // llvm.x86.vcvtps2ph.256 - x86_wrfsbase_32, // llvm.x86.wrfsbase.32 - x86_wrfsbase_64, // llvm.x86.wrfsbase.64 - x86_wrgsbase_32, // llvm.x86.wrgsbase.32 - x86_wrgsbase_64, // llvm.x86.wrgsbase.64 - x86_wrpkru, // llvm.x86.wrpkru - x86_xabort, // llvm.x86.xabort - x86_xbegin, // llvm.x86.xbegin - x86_xend, // llvm.x86.xend - x86_xop_vfrcz_pd, // llvm.x86.xop.vfrcz.pd - x86_xop_vfrcz_pd_256, // llvm.x86.xop.vfrcz.pd.256 - x86_xop_vfrcz_ps, // llvm.x86.xop.vfrcz.ps - x86_xop_vfrcz_ps_256, // llvm.x86.xop.vfrcz.ps.256 - x86_xop_vfrcz_sd, // llvm.x86.xop.vfrcz.sd - x86_xop_vfrcz_ss, // llvm.x86.xop.vfrcz.ss - x86_xop_vpcmov, // llvm.x86.xop.vpcmov - x86_xop_vpcmov_256, // llvm.x86.xop.vpcmov.256 - x86_xop_vpcomb, // llvm.x86.xop.vpcomb - x86_xop_vpcomd, // llvm.x86.xop.vpcomd - x86_xop_vpcomq, // llvm.x86.xop.vpcomq - x86_xop_vpcomub, // llvm.x86.xop.vpcomub - x86_xop_vpcomud, // llvm.x86.xop.vpcomud - x86_xop_vpcomuq, // llvm.x86.xop.vpcomuq - x86_xop_vpcomuw, // llvm.x86.xop.vpcomuw - x86_xop_vpcomw, // llvm.x86.xop.vpcomw - x86_xop_vpermil2pd, // llvm.x86.xop.vpermil2pd - x86_xop_vpermil2pd_256, // llvm.x86.xop.vpermil2pd.256 - x86_xop_vpermil2ps, // llvm.x86.xop.vpermil2ps - x86_xop_vpermil2ps_256, // llvm.x86.xop.vpermil2ps.256 - x86_xop_vphaddbd, // llvm.x86.xop.vphaddbd - x86_xop_vphaddbq, // llvm.x86.xop.vphaddbq - x86_xop_vphaddbw, // llvm.x86.xop.vphaddbw - x86_xop_vphadddq, // llvm.x86.xop.vphadddq - x86_xop_vphaddubd, // llvm.x86.xop.vphaddubd - x86_xop_vphaddubq, // llvm.x86.xop.vphaddubq - x86_xop_vphaddubw, // llvm.x86.xop.vphaddubw - x86_xop_vphaddudq, // llvm.x86.xop.vphaddudq - x86_xop_vphadduwd, // llvm.x86.xop.vphadduwd - x86_xop_vphadduwq, // llvm.x86.xop.vphadduwq - x86_xop_vphaddwd, // llvm.x86.xop.vphaddwd - x86_xop_vphaddwq, // llvm.x86.xop.vphaddwq - x86_xop_vphsubbw, // llvm.x86.xop.vphsubbw - x86_xop_vphsubdq, // llvm.x86.xop.vphsubdq - x86_xop_vphsubwd, // llvm.x86.xop.vphsubwd - x86_xop_vpmacsdd, // llvm.x86.xop.vpmacsdd - x86_xop_vpmacsdqh, // llvm.x86.xop.vpmacsdqh - x86_xop_vpmacsdql, // llvm.x86.xop.vpmacsdql - x86_xop_vpmacssdd, // llvm.x86.xop.vpmacssdd - x86_xop_vpmacssdqh, // llvm.x86.xop.vpmacssdqh - x86_xop_vpmacssdql, // llvm.x86.xop.vpmacssdql - x86_xop_vpmacsswd, // llvm.x86.xop.vpmacsswd - x86_xop_vpmacssww, // llvm.x86.xop.vpmacssww - x86_xop_vpmacswd, // llvm.x86.xop.vpmacswd - x86_xop_vpmacsww, // llvm.x86.xop.vpmacsww - x86_xop_vpmadcsswd, // llvm.x86.xop.vpmadcsswd - x86_xop_vpmadcswd, // llvm.x86.xop.vpmadcswd - x86_xop_vpperm, // llvm.x86.xop.vpperm - x86_xop_vprotb, // llvm.x86.xop.vprotb - x86_xop_vprotbi, // llvm.x86.xop.vprotbi - x86_xop_vprotd, // llvm.x86.xop.vprotd - x86_xop_vprotdi, // llvm.x86.xop.vprotdi - x86_xop_vprotq, // llvm.x86.xop.vprotq - x86_xop_vprotqi, // llvm.x86.xop.vprotqi - x86_xop_vprotw, // llvm.x86.xop.vprotw - x86_xop_vprotwi, // llvm.x86.xop.vprotwi - x86_xop_vpshab, // llvm.x86.xop.vpshab - x86_xop_vpshad, // llvm.x86.xop.vpshad - x86_xop_vpshaq, // llvm.x86.xop.vpshaq - x86_xop_vpshaw, // llvm.x86.xop.vpshaw - x86_xop_vpshlb, // llvm.x86.xop.vpshlb - x86_xop_vpshld, // llvm.x86.xop.vpshld - x86_xop_vpshlq, // llvm.x86.xop.vpshlq - x86_xop_vpshlw, // llvm.x86.xop.vpshlw - x86_xrstor, // llvm.x86.xrstor - x86_xrstor64, // llvm.x86.xrstor64 - x86_xrstors, // llvm.x86.xrstors - x86_xrstors64, // llvm.x86.xrstors64 - x86_xsave, // llvm.x86.xsave - x86_xsave64, // llvm.x86.xsave64 - x86_xsavec, // llvm.x86.xsavec - x86_xsavec64, // llvm.x86.xsavec64 - x86_xsaveopt, // llvm.x86.xsaveopt - x86_xsaveopt64, // llvm.x86.xsaveopt64 - x86_xsaves, // llvm.x86.xsaves - x86_xsaves64, // llvm.x86.xsaves64 - x86_xtest, // llvm.x86.xtest - xcore_bitrev, // llvm.xcore.bitrev - xcore_checkevent, // llvm.xcore.checkevent - xcore_chkct, // llvm.xcore.chkct - xcore_clre, // llvm.xcore.clre - xcore_clrpt, // llvm.xcore.clrpt - xcore_clrsr, // llvm.xcore.clrsr - xcore_crc32, // llvm.xcore.crc32 - xcore_crc8, // llvm.xcore.crc8 - xcore_edu, // llvm.xcore.edu - xcore_eeu, // llvm.xcore.eeu - xcore_endin, // llvm.xcore.endin - xcore_freer, // llvm.xcore.freer - xcore_geted, // llvm.xcore.geted - xcore_getet, // llvm.xcore.getet - xcore_getid, // llvm.xcore.getid - xcore_getps, // llvm.xcore.getps - xcore_getr, // llvm.xcore.getr - xcore_getst, // llvm.xcore.getst - xcore_getts, // llvm.xcore.getts - xcore_in, // llvm.xcore.in - xcore_inct, // llvm.xcore.inct - xcore_initcp, // llvm.xcore.initcp - xcore_initdp, // llvm.xcore.initdp - xcore_initlr, // llvm.xcore.initlr - xcore_initpc, // llvm.xcore.initpc - xcore_initsp, // llvm.xcore.initsp - xcore_inshr, // llvm.xcore.inshr - xcore_int, // llvm.xcore.int - xcore_mjoin, // llvm.xcore.mjoin - xcore_msync, // llvm.xcore.msync - xcore_out, // llvm.xcore.out - xcore_outct, // llvm.xcore.outct - xcore_outshr, // llvm.xcore.outshr - xcore_outt, // llvm.xcore.outt - xcore_peek, // llvm.xcore.peek - xcore_setc, // llvm.xcore.setc - xcore_setclk, // llvm.xcore.setclk - xcore_setd, // llvm.xcore.setd - xcore_setev, // llvm.xcore.setev - xcore_setps, // llvm.xcore.setps - xcore_setpsc, // llvm.xcore.setpsc - xcore_setpt, // llvm.xcore.setpt - xcore_setrdy, // llvm.xcore.setrdy - xcore_setsr, // llvm.xcore.setsr - xcore_settw, // llvm.xcore.settw - xcore_setv, // llvm.xcore.setv - xcore_sext, // llvm.xcore.sext - xcore_ssync, // llvm.xcore.ssync - xcore_syncr, // llvm.xcore.syncr - xcore_testct, // llvm.xcore.testct - xcore_testwct, // llvm.xcore.testwct - xcore_waitevent, // llvm.xcore.waitevent - xcore_zext // llvm.xcore.zext -#endif - -// Target mapping -#ifdef GET_INTRINSIC_TARGET_DATA -struct IntrinsicTargetInfo { - StringRef Name; - size_t Offset; - size_t Count; -}; -static const IntrinsicTargetInfo TargetInfos[] = { - {"", 0, 124}, - {"aarch64", 124, 190}, - {"amdgcn", 314, 89}, - {"arm", 403, 172}, - {"bpf", 575, 4}, - {"hexagon", 579, 1489}, - {"mips", 2068, 667}, - {"nvvm", 2735, 917}, - {"ppc", 3652, 341}, - {"r600", 3993, 21}, - {"s390", 4014, 205}, - {"wasm", 4219, 2}, - {"x86", 4221, 1808}, - {"xcore", 6029, 53}, -}; -#endif - -// Intrinsic ID to name table -#ifdef GET_INTRINSIC_NAME_TABLE - // Note that entry #0 is the invalid intrinsic! - "llvm.adjust.trampoline", - "llvm.annotation", - "llvm.assume", - "llvm.bitreverse", - "llvm.bswap", - "llvm.canonicalize", - "llvm.ceil", - "llvm.clear_cache", - "llvm.convert.from.fp16", - "llvm.convert.to.fp16", - "llvm.convertff", - "llvm.convertfsi", - "llvm.convertfui", - "llvm.convertsif", - "llvm.convertss", - "llvm.convertsu", - "llvm.convertuif", - "llvm.convertus", - "llvm.convertuu", - "llvm.copysign", - "llvm.cos", - "llvm.ctlz", - "llvm.ctpop", - "llvm.cttz", - "llvm.dbg.declare", - "llvm.dbg.value", - "llvm.debugtrap", - "llvm.donothing", - "llvm.eh.dwarf.cfa", - "llvm.eh.exceptioncode", - "llvm.eh.exceptionpointer", - "llvm.eh.return.i32", - "llvm.eh.return.i64", - "llvm.eh.sjlj.callsite", - "llvm.eh.sjlj.functioncontext", - "llvm.eh.sjlj.longjmp", - "llvm.eh.sjlj.lsda", - "llvm.eh.sjlj.setjmp", - "llvm.eh.sjlj.setup.dispatch", - "llvm.eh.typeid.for", - "llvm.eh.unwind.init", - "llvm.exp", - "llvm.exp2", - "llvm.expect", - "llvm.experimental.deoptimize", - "llvm.experimental.gc.relocate", - "llvm.experimental.gc.result", - "llvm.experimental.gc.statepoint", - "llvm.experimental.guard", - "llvm.experimental.patchpoint.i64", - "llvm.experimental.patchpoint.void", - "llvm.experimental.stackmap", - "llvm.fabs", - "llvm.floor", - "llvm.flt.rounds", - "llvm.fma", - "llvm.fmuladd", - "llvm.frameaddress", - "llvm.gcread", - "llvm.gcroot", - "llvm.gcwrite", - "llvm.get.dynamic.area.offset", - "llvm.init.trampoline", - "llvm.instrprof.increment", - "llvm.instrprof.value.profile", - "llvm.invariant.end", - "llvm.invariant.group.barrier", - "llvm.invariant.start", - "llvm.lifetime.end", - "llvm.lifetime.start", - "llvm.load.relative", - "llvm.localaddress", - "llvm.localescape", - "llvm.localrecover", - "llvm.log", - "llvm.log10", - "llvm.log2", - "llvm.longjmp", - "llvm.masked.gather", - "llvm.masked.load", - "llvm.masked.scatter", - "llvm.masked.store", - "llvm.maxnum", - "llvm.memcpy", - "llvm.memmove", - "llvm.memset", - "llvm.minnum", - "llvm.nearbyint", - "llvm.objectsize", - "llvm.pcmarker", - "llvm.pow", - "llvm.powi", - "llvm.prefetch", - "llvm.ptr.annotation", - "llvm.read_register", - "llvm.readcyclecounter", - "llvm.returnaddress", - "llvm.rint", - "llvm.round", - "llvm.sadd.with.overflow", - "llvm.setjmp", - "llvm.siglongjmp", - "llvm.sigsetjmp", - "llvm.sin", - "llvm.smul.with.overflow", - "llvm.sqrt", - "llvm.ssub.with.overflow", - "llvm.stackguard", - "llvm.stackprotector", - "llvm.stackrestore", - "llvm.stacksave", - "llvm.thread.pointer", - "llvm.trap", - "llvm.trunc", - "llvm.type.checked.load", - "llvm.type.test", - "llvm.uadd.with.overflow", - "llvm.umul.with.overflow", - "llvm.usub.with.overflow", - "llvm.va_copy", - "llvm.va_end", - "llvm.va_start", - "llvm.var.annotation", - "llvm.write_register", - "llvm.aarch64.clrex", - "llvm.aarch64.crc32b", - "llvm.aarch64.crc32cb", - "llvm.aarch64.crc32ch", - "llvm.aarch64.crc32cw", - "llvm.aarch64.crc32cx", - "llvm.aarch64.crc32h", - "llvm.aarch64.crc32w", - "llvm.aarch64.crc32x", - "llvm.aarch64.crypto.aesd", - "llvm.aarch64.crypto.aese", - "llvm.aarch64.crypto.aesimc", - "llvm.aarch64.crypto.aesmc", - "llvm.aarch64.crypto.sha1c", - "llvm.aarch64.crypto.sha1h", - "llvm.aarch64.crypto.sha1m", - "llvm.aarch64.crypto.sha1p", - "llvm.aarch64.crypto.sha1su0", - "llvm.aarch64.crypto.sha1su1", - "llvm.aarch64.crypto.sha256h", - "llvm.aarch64.crypto.sha256h2", - "llvm.aarch64.crypto.sha256su0", - "llvm.aarch64.crypto.sha256su1", - "llvm.aarch64.dmb", - "llvm.aarch64.dsb", - "llvm.aarch64.hint", - "llvm.aarch64.isb", - "llvm.aarch64.ldaxp", - "llvm.aarch64.ldaxr", - "llvm.aarch64.ldxp", - "llvm.aarch64.ldxr", - "llvm.aarch64.neon.abs", - "llvm.aarch64.neon.addhn", - "llvm.aarch64.neon.addp", - "llvm.aarch64.neon.cls", - "llvm.aarch64.neon.fabd", - "llvm.aarch64.neon.facge", - "llvm.aarch64.neon.facgt", - "llvm.aarch64.neon.faddv", - "llvm.aarch64.neon.fcvtas", - "llvm.aarch64.neon.fcvtau", - "llvm.aarch64.neon.fcvtms", - "llvm.aarch64.neon.fcvtmu", - "llvm.aarch64.neon.fcvtns", - "llvm.aarch64.neon.fcvtnu", - "llvm.aarch64.neon.fcvtps", - "llvm.aarch64.neon.fcvtpu", - "llvm.aarch64.neon.fcvtxn", - "llvm.aarch64.neon.fcvtzs", - "llvm.aarch64.neon.fcvtzu", - "llvm.aarch64.neon.fmax", - "llvm.aarch64.neon.fmaxnm", - "llvm.aarch64.neon.fmaxnmp", - "llvm.aarch64.neon.fmaxnmv", - "llvm.aarch64.neon.fmaxp", - "llvm.aarch64.neon.fmaxv", - "llvm.aarch64.neon.fmin", - "llvm.aarch64.neon.fminnm", - "llvm.aarch64.neon.fminnmp", - "llvm.aarch64.neon.fminnmv", - "llvm.aarch64.neon.fminp", - "llvm.aarch64.neon.fminv", - "llvm.aarch64.neon.fmulx", - "llvm.aarch64.neon.frecpe", - "llvm.aarch64.neon.frecps", - "llvm.aarch64.neon.frecpx", - "llvm.aarch64.neon.frintn", - "llvm.aarch64.neon.frsqrte", - "llvm.aarch64.neon.frsqrts", - "llvm.aarch64.neon.ld1x2", - "llvm.aarch64.neon.ld1x3", - "llvm.aarch64.neon.ld1x4", - "llvm.aarch64.neon.ld2", - "llvm.aarch64.neon.ld2lane", - "llvm.aarch64.neon.ld2r", - "llvm.aarch64.neon.ld3", - "llvm.aarch64.neon.ld3lane", - "llvm.aarch64.neon.ld3r", - "llvm.aarch64.neon.ld4", - "llvm.aarch64.neon.ld4lane", - "llvm.aarch64.neon.ld4r", - "llvm.aarch64.neon.pmul", - "llvm.aarch64.neon.pmull", - "llvm.aarch64.neon.pmull64", - "llvm.aarch64.neon.raddhn", - "llvm.aarch64.neon.rbit", - "llvm.aarch64.neon.rshrn", - "llvm.aarch64.neon.rsubhn", - "llvm.aarch64.neon.sabd", - "llvm.aarch64.neon.saddlp", - "llvm.aarch64.neon.saddlv", - "llvm.aarch64.neon.saddv", - "llvm.aarch64.neon.scalar.sqxtn", - "llvm.aarch64.neon.scalar.sqxtun", - "llvm.aarch64.neon.scalar.uqxtn", - "llvm.aarch64.neon.shadd", - "llvm.aarch64.neon.shll", - "llvm.aarch64.neon.shsub", - "llvm.aarch64.neon.smax", - "llvm.aarch64.neon.smaxp", - "llvm.aarch64.neon.smaxv", - "llvm.aarch64.neon.smin", - "llvm.aarch64.neon.sminp", - "llvm.aarch64.neon.sminv", - "llvm.aarch64.neon.smull", - "llvm.aarch64.neon.sqabs", - "llvm.aarch64.neon.sqadd", - "llvm.aarch64.neon.sqdmulh", - "llvm.aarch64.neon.sqdmull", - "llvm.aarch64.neon.sqdmulls.scalar", - "llvm.aarch64.neon.sqneg", - "llvm.aarch64.neon.sqrdmulh", - "llvm.aarch64.neon.sqrshl", - "llvm.aarch64.neon.sqrshrn", - "llvm.aarch64.neon.sqrshrun", - "llvm.aarch64.neon.sqshl", - "llvm.aarch64.neon.sqshlu", - "llvm.aarch64.neon.sqshrn", - "llvm.aarch64.neon.sqshrun", - "llvm.aarch64.neon.sqsub", - "llvm.aarch64.neon.sqxtn", - "llvm.aarch64.neon.sqxtun", - "llvm.aarch64.neon.srhadd", - "llvm.aarch64.neon.srshl", - "llvm.aarch64.neon.sshl", - "llvm.aarch64.neon.sshll", - "llvm.aarch64.neon.st1x2", - "llvm.aarch64.neon.st1x3", - "llvm.aarch64.neon.st1x4", - "llvm.aarch64.neon.st2", - "llvm.aarch64.neon.st2lane", - "llvm.aarch64.neon.st3", - "llvm.aarch64.neon.st3lane", - "llvm.aarch64.neon.st4", - "llvm.aarch64.neon.st4lane", - "llvm.aarch64.neon.subhn", - "llvm.aarch64.neon.suqadd", - "llvm.aarch64.neon.tbl1", - "llvm.aarch64.neon.tbl2", - "llvm.aarch64.neon.tbl3", - "llvm.aarch64.neon.tbl4", - "llvm.aarch64.neon.tbx1", - "llvm.aarch64.neon.tbx2", - "llvm.aarch64.neon.tbx3", - "llvm.aarch64.neon.tbx4", - "llvm.aarch64.neon.uabd", - "llvm.aarch64.neon.uaddlp", - "llvm.aarch64.neon.uaddlv", - "llvm.aarch64.neon.uaddv", - "llvm.aarch64.neon.uhadd", - "llvm.aarch64.neon.uhsub", - "llvm.aarch64.neon.umax", - "llvm.aarch64.neon.umaxp", - "llvm.aarch64.neon.umaxv", - "llvm.aarch64.neon.umin", - "llvm.aarch64.neon.uminp", - "llvm.aarch64.neon.uminv", - "llvm.aarch64.neon.umull", - "llvm.aarch64.neon.uqadd", - "llvm.aarch64.neon.uqrshl", - "llvm.aarch64.neon.uqrshrn", - "llvm.aarch64.neon.uqshl", - "llvm.aarch64.neon.uqshrn", - "llvm.aarch64.neon.uqsub", - "llvm.aarch64.neon.uqxtn", - "llvm.aarch64.neon.urecpe", - "llvm.aarch64.neon.urhadd", - "llvm.aarch64.neon.urshl", - "llvm.aarch64.neon.ursqrte", - "llvm.aarch64.neon.ushl", - "llvm.aarch64.neon.ushll", - "llvm.aarch64.neon.usqadd", - "llvm.aarch64.neon.vcopy.lane", - "llvm.aarch64.neon.vcvtfp2fxs", - "llvm.aarch64.neon.vcvtfp2fxu", - "llvm.aarch64.neon.vcvtfp2hf", - "llvm.aarch64.neon.vcvtfxs2fp", - "llvm.aarch64.neon.vcvtfxu2fp", - "llvm.aarch64.neon.vcvthf2fp", - "llvm.aarch64.neon.vsli", - "llvm.aarch64.neon.vsri", - "llvm.aarch64.rbit", - "llvm.aarch64.sdiv", - "llvm.aarch64.sisd.fabd", - "llvm.aarch64.sisd.fcvtxn", - "llvm.aarch64.stlxp", - "llvm.aarch64.stlxr", - "llvm.aarch64.stxp", - "llvm.aarch64.stxr", - "llvm.aarch64.udiv", - "llvm.amdgcn.atomic.dec", - "llvm.amdgcn.atomic.inc", - "llvm.amdgcn.buffer.atomic.add", - "llvm.amdgcn.buffer.atomic.and", - "llvm.amdgcn.buffer.atomic.cmpswap", - "llvm.amdgcn.buffer.atomic.or", - "llvm.amdgcn.buffer.atomic.smax", - "llvm.amdgcn.buffer.atomic.smin", - "llvm.amdgcn.buffer.atomic.sub", - "llvm.amdgcn.buffer.atomic.swap", - "llvm.amdgcn.buffer.atomic.umax", - "llvm.amdgcn.buffer.atomic.umin", - "llvm.amdgcn.buffer.atomic.xor", - "llvm.amdgcn.buffer.load", - "llvm.amdgcn.buffer.load.format", - "llvm.amdgcn.buffer.store", - "llvm.amdgcn.buffer.store.format", - "llvm.amdgcn.buffer.wbinvl1", - "llvm.amdgcn.buffer.wbinvl1.sc", - "llvm.amdgcn.buffer.wbinvl1.vol", - "llvm.amdgcn.class", - "llvm.amdgcn.cos", - "llvm.amdgcn.cubeid", - "llvm.amdgcn.cubema", - "llvm.amdgcn.cubesc", - "llvm.amdgcn.cubetc", - "llvm.amdgcn.dispatch.ptr", - "llvm.amdgcn.div.fixup", - "llvm.amdgcn.div.fmas", - "llvm.amdgcn.div.scale", - "llvm.amdgcn.ds.bpermute", - "llvm.amdgcn.ds.permute", - "llvm.amdgcn.ds.swizzle", - "llvm.amdgcn.fract", - "llvm.amdgcn.frexp.exp", - "llvm.amdgcn.frexp.mant", - "llvm.amdgcn.groupstaticsize", - "llvm.amdgcn.image.atomic.add", - "llvm.amdgcn.image.atomic.and", - "llvm.amdgcn.image.atomic.cmpswap", - "llvm.amdgcn.image.atomic.dec", - "llvm.amdgcn.image.atomic.inc", - "llvm.amdgcn.image.atomic.or", - "llvm.amdgcn.image.atomic.smax", - "llvm.amdgcn.image.atomic.smin", - "llvm.amdgcn.image.atomic.sub", - "llvm.amdgcn.image.atomic.swap", - "llvm.amdgcn.image.atomic.umax", - "llvm.amdgcn.image.atomic.umin", - "llvm.amdgcn.image.atomic.xor", - "llvm.amdgcn.image.load", - "llvm.amdgcn.image.load.mip", - "llvm.amdgcn.image.store", - "llvm.amdgcn.image.store.mip", - "llvm.amdgcn.implicitarg.ptr", - "llvm.amdgcn.interp.p1", - "llvm.amdgcn.interp.p2", - "llvm.amdgcn.kernarg.segment.ptr", - "llvm.amdgcn.ldexp", - "llvm.amdgcn.lerp", - "llvm.amdgcn.log.clamp", - "llvm.amdgcn.mbcnt.hi", - "llvm.amdgcn.mbcnt.lo", - "llvm.amdgcn.mov.dpp", - "llvm.amdgcn.ps.live", - "llvm.amdgcn.queue.ptr", - "llvm.amdgcn.rcp", - "llvm.amdgcn.read.workdim", - "llvm.amdgcn.rsq", - "llvm.amdgcn.rsq.clamp", - "llvm.amdgcn.rsq.legacy", - "llvm.amdgcn.s.barrier", - "llvm.amdgcn.s.dcache.inv", - "llvm.amdgcn.s.dcache.inv.vol", - "llvm.amdgcn.s.dcache.wb", - "llvm.amdgcn.s.dcache.wb.vol", - "llvm.amdgcn.s.getreg", - "llvm.amdgcn.s.memrealtime", - "llvm.amdgcn.s.memtime", - "llvm.amdgcn.s.sleep", - "llvm.amdgcn.s.waitcnt", - "llvm.amdgcn.sin", - "llvm.amdgcn.trig.preop", - "llvm.amdgcn.workgroup.id.x", - "llvm.amdgcn.workgroup.id.y", - "llvm.amdgcn.workgroup.id.z", - "llvm.amdgcn.workitem.id.x", - "llvm.amdgcn.workitem.id.y", - "llvm.amdgcn.workitem.id.z", - "llvm.arm.cdp", - "llvm.arm.cdp2", - "llvm.arm.clrex", - "llvm.arm.crc32b", - "llvm.arm.crc32cb", - "llvm.arm.crc32ch", - "llvm.arm.crc32cw", - "llvm.arm.crc32h", - "llvm.arm.crc32w", - "llvm.arm.dbg", - "llvm.arm.dmb", - "llvm.arm.dsb", - "llvm.arm.get.fpscr", - "llvm.arm.hint", - "llvm.arm.isb", - "llvm.arm.ldaex", - "llvm.arm.ldaexd", - "llvm.arm.ldc", - "llvm.arm.ldc2", - "llvm.arm.ldc2l", - "llvm.arm.ldcl", - "llvm.arm.ldrex", - "llvm.arm.ldrexd", - "llvm.arm.mcr", - "llvm.arm.mcr2", - "llvm.arm.mcrr", - "llvm.arm.mcrr2", - "llvm.arm.mrc", - "llvm.arm.mrc2", - "llvm.arm.mrrc", - "llvm.arm.mrrc2", - "llvm.arm.neon.aesd", - "llvm.arm.neon.aese", - "llvm.arm.neon.aesimc", - "llvm.arm.neon.aesmc", - "llvm.arm.neon.sha1c", - "llvm.arm.neon.sha1h", - "llvm.arm.neon.sha1m", - "llvm.arm.neon.sha1p", - "llvm.arm.neon.sha1su0", - "llvm.arm.neon.sha1su1", - "llvm.arm.neon.sha256h", - "llvm.arm.neon.sha256h2", - "llvm.arm.neon.sha256su0", - "llvm.arm.neon.sha256su1", - "llvm.arm.neon.vabds", - "llvm.arm.neon.vabdu", - "llvm.arm.neon.vabs", - "llvm.arm.neon.vacge", - "llvm.arm.neon.vacgt", - "llvm.arm.neon.vbsl", - "llvm.arm.neon.vcls", - "llvm.arm.neon.vcvtas", - "llvm.arm.neon.vcvtau", - "llvm.arm.neon.vcvtfp2fxs", - "llvm.arm.neon.vcvtfp2fxu", - "llvm.arm.neon.vcvtfp2hf", - "llvm.arm.neon.vcvtfxs2fp", - "llvm.arm.neon.vcvtfxu2fp", - "llvm.arm.neon.vcvthf2fp", - "llvm.arm.neon.vcvtms", - "llvm.arm.neon.vcvtmu", - "llvm.arm.neon.vcvtns", - "llvm.arm.neon.vcvtnu", - "llvm.arm.neon.vcvtps", - "llvm.arm.neon.vcvtpu", - "llvm.arm.neon.vhadds", - "llvm.arm.neon.vhaddu", - "llvm.arm.neon.vhsubs", - "llvm.arm.neon.vhsubu", - "llvm.arm.neon.vld1", - "llvm.arm.neon.vld2", - "llvm.arm.neon.vld2lane", - "llvm.arm.neon.vld3", - "llvm.arm.neon.vld3lane", - "llvm.arm.neon.vld4", - "llvm.arm.neon.vld4lane", - "llvm.arm.neon.vmaxnm", - "llvm.arm.neon.vmaxs", - "llvm.arm.neon.vmaxu", - "llvm.arm.neon.vminnm", - "llvm.arm.neon.vmins", - "llvm.arm.neon.vminu", - "llvm.arm.neon.vmullp", - "llvm.arm.neon.vmulls", - "llvm.arm.neon.vmullu", - "llvm.arm.neon.vmulp", - "llvm.arm.neon.vpadals", - "llvm.arm.neon.vpadalu", - "llvm.arm.neon.vpadd", - "llvm.arm.neon.vpaddls", - "llvm.arm.neon.vpaddlu", - "llvm.arm.neon.vpmaxs", - "llvm.arm.neon.vpmaxu", - "llvm.arm.neon.vpmins", - "llvm.arm.neon.vpminu", - "llvm.arm.neon.vqabs", - "llvm.arm.neon.vqadds", - "llvm.arm.neon.vqaddu", - "llvm.arm.neon.vqdmulh", - "llvm.arm.neon.vqdmull", - "llvm.arm.neon.vqmovns", - "llvm.arm.neon.vqmovnsu", - "llvm.arm.neon.vqmovnu", - "llvm.arm.neon.vqneg", - "llvm.arm.neon.vqrdmulh", - "llvm.arm.neon.vqrshiftns", - "llvm.arm.neon.vqrshiftnsu", - "llvm.arm.neon.vqrshiftnu", - "llvm.arm.neon.vqrshifts", - "llvm.arm.neon.vqrshiftu", - "llvm.arm.neon.vqshiftns", - "llvm.arm.neon.vqshiftnsu", - "llvm.arm.neon.vqshiftnu", - "llvm.arm.neon.vqshifts", - "llvm.arm.neon.vqshiftsu", - "llvm.arm.neon.vqshiftu", - "llvm.arm.neon.vqsubs", - "llvm.arm.neon.vqsubu", - "llvm.arm.neon.vraddhn", - "llvm.arm.neon.vrecpe", - "llvm.arm.neon.vrecps", - "llvm.arm.neon.vrhadds", - "llvm.arm.neon.vrhaddu", - "llvm.arm.neon.vrinta", - "llvm.arm.neon.vrintm", - "llvm.arm.neon.vrintn", - "llvm.arm.neon.vrintp", - "llvm.arm.neon.vrintx", - "llvm.arm.neon.vrintz", - "llvm.arm.neon.vrshiftn", - "llvm.arm.neon.vrshifts", - "llvm.arm.neon.vrshiftu", - "llvm.arm.neon.vrsqrte", - "llvm.arm.neon.vrsqrts", - "llvm.arm.neon.vrsubhn", - "llvm.arm.neon.vshiftins", - "llvm.arm.neon.vshifts", - "llvm.arm.neon.vshiftu", - "llvm.arm.neon.vst1", - "llvm.arm.neon.vst2", - "llvm.arm.neon.vst2lane", - "llvm.arm.neon.vst3", - "llvm.arm.neon.vst3lane", - "llvm.arm.neon.vst4", - "llvm.arm.neon.vst4lane", - "llvm.arm.neon.vtbl1", - "llvm.arm.neon.vtbl2", - "llvm.arm.neon.vtbl3", - "llvm.arm.neon.vtbl4", - "llvm.arm.neon.vtbx1", - "llvm.arm.neon.vtbx2", - "llvm.arm.neon.vtbx3", - "llvm.arm.neon.vtbx4", - "llvm.arm.qadd", - "llvm.arm.qsub", - "llvm.arm.rbit", - "llvm.arm.set.fpscr", - "llvm.arm.space", - "llvm.arm.ssat", - "llvm.arm.stc", - "llvm.arm.stc2", - "llvm.arm.stc2l", - "llvm.arm.stcl", - "llvm.arm.stlex", - "llvm.arm.stlexd", - "llvm.arm.strex", - "llvm.arm.strexd", - "llvm.arm.undefined", - "llvm.arm.usat", - "llvm.arm.vcvtr", - "llvm.arm.vcvtru", - "llvm.bpf.load.byte", - "llvm.bpf.load.half", - "llvm.bpf.load.word", - "llvm.bpf.pseudo", - "llvm.hexagon.A2.abs", - "llvm.hexagon.A2.absp", - "llvm.hexagon.A2.abssat", - "llvm.hexagon.A2.add", - "llvm.hexagon.A2.addh.h16.hh", - "llvm.hexagon.A2.addh.h16.hl", - "llvm.hexagon.A2.addh.h16.lh", - "llvm.hexagon.A2.addh.h16.ll", - "llvm.hexagon.A2.addh.h16.sat.hh", - "llvm.hexagon.A2.addh.h16.sat.hl", - "llvm.hexagon.A2.addh.h16.sat.lh", - "llvm.hexagon.A2.addh.h16.sat.ll", - "llvm.hexagon.A2.addh.l16.hl", - "llvm.hexagon.A2.addh.l16.ll", - "llvm.hexagon.A2.addh.l16.sat.hl", - "llvm.hexagon.A2.addh.l16.sat.ll", - "llvm.hexagon.A2.addi", - "llvm.hexagon.A2.addp", - "llvm.hexagon.A2.addpsat", - "llvm.hexagon.A2.addsat", - "llvm.hexagon.A2.addsp", - "llvm.hexagon.A2.and", - "llvm.hexagon.A2.andir", - "llvm.hexagon.A2.andp", - "llvm.hexagon.A2.aslh", - "llvm.hexagon.A2.asrh", - "llvm.hexagon.A2.combine.hh", - "llvm.hexagon.A2.combine.hl", - "llvm.hexagon.A2.combine.lh", - "llvm.hexagon.A2.combine.ll", - "llvm.hexagon.A2.combineii", - "llvm.hexagon.A2.combinew", - "llvm.hexagon.A2.max", - "llvm.hexagon.A2.maxp", - "llvm.hexagon.A2.maxu", - "llvm.hexagon.A2.maxup", - "llvm.hexagon.A2.min", - "llvm.hexagon.A2.minp", - "llvm.hexagon.A2.minu", - "llvm.hexagon.A2.minup", - "llvm.hexagon.A2.neg", - "llvm.hexagon.A2.negp", - "llvm.hexagon.A2.negsat", - "llvm.hexagon.A2.not", - "llvm.hexagon.A2.notp", - "llvm.hexagon.A2.or", - "llvm.hexagon.A2.orir", - "llvm.hexagon.A2.orp", - "llvm.hexagon.A2.roundsat", - "llvm.hexagon.A2.sat", - "llvm.hexagon.A2.satb", - "llvm.hexagon.A2.sath", - "llvm.hexagon.A2.satub", - "llvm.hexagon.A2.satuh", - "llvm.hexagon.A2.sub", - "llvm.hexagon.A2.subh.h16.hh", - "llvm.hexagon.A2.subh.h16.hl", - "llvm.hexagon.A2.subh.h16.lh", - "llvm.hexagon.A2.subh.h16.ll", - "llvm.hexagon.A2.subh.h16.sat.hh", - "llvm.hexagon.A2.subh.h16.sat.hl", - "llvm.hexagon.A2.subh.h16.sat.lh", - "llvm.hexagon.A2.subh.h16.sat.ll", - "llvm.hexagon.A2.subh.l16.hl", - "llvm.hexagon.A2.subh.l16.ll", - "llvm.hexagon.A2.subh.l16.sat.hl", - "llvm.hexagon.A2.subh.l16.sat.ll", - "llvm.hexagon.A2.subp", - "llvm.hexagon.A2.subri", - "llvm.hexagon.A2.subsat", - "llvm.hexagon.A2.svaddh", - "llvm.hexagon.A2.svaddhs", - "llvm.hexagon.A2.svadduhs", - "llvm.hexagon.A2.svavgh", - "llvm.hexagon.A2.svavghs", - "llvm.hexagon.A2.svnavgh", - "llvm.hexagon.A2.svsubh", - "llvm.hexagon.A2.svsubhs", - "llvm.hexagon.A2.svsubuhs", - "llvm.hexagon.A2.swiz", - "llvm.hexagon.A2.sxtb", - "llvm.hexagon.A2.sxth", - "llvm.hexagon.A2.sxtw", - "llvm.hexagon.A2.tfr", - "llvm.hexagon.A2.tfrih", - "llvm.hexagon.A2.tfril", - "llvm.hexagon.A2.tfrp", - "llvm.hexagon.A2.tfrpi", - "llvm.hexagon.A2.tfrsi", - "llvm.hexagon.A2.vabsh", - "llvm.hexagon.A2.vabshsat", - "llvm.hexagon.A2.vabsw", - "llvm.hexagon.A2.vabswsat", - "llvm.hexagon.A2.vaddb.map", - "llvm.hexagon.A2.vaddh", - "llvm.hexagon.A2.vaddhs", - "llvm.hexagon.A2.vaddub", - "llvm.hexagon.A2.vaddubs", - "llvm.hexagon.A2.vadduhs", - "llvm.hexagon.A2.vaddw", - "llvm.hexagon.A2.vaddws", - "llvm.hexagon.A2.vavgh", - "llvm.hexagon.A2.vavghcr", - "llvm.hexagon.A2.vavghr", - "llvm.hexagon.A2.vavgub", - "llvm.hexagon.A2.vavgubr", - "llvm.hexagon.A2.vavguh", - "llvm.hexagon.A2.vavguhr", - "llvm.hexagon.A2.vavguw", - "llvm.hexagon.A2.vavguwr", - "llvm.hexagon.A2.vavgw", - "llvm.hexagon.A2.vavgwcr", - "llvm.hexagon.A2.vavgwr", - "llvm.hexagon.A2.vcmpbeq", - "llvm.hexagon.A2.vcmpbgtu", - "llvm.hexagon.A2.vcmpheq", - "llvm.hexagon.A2.vcmphgt", - "llvm.hexagon.A2.vcmphgtu", - "llvm.hexagon.A2.vcmpweq", - "llvm.hexagon.A2.vcmpwgt", - "llvm.hexagon.A2.vcmpwgtu", - "llvm.hexagon.A2.vconj", - "llvm.hexagon.A2.vmaxb", - "llvm.hexagon.A2.vmaxh", - "llvm.hexagon.A2.vmaxub", - "llvm.hexagon.A2.vmaxuh", - "llvm.hexagon.A2.vmaxuw", - "llvm.hexagon.A2.vmaxw", - "llvm.hexagon.A2.vminb", - "llvm.hexagon.A2.vminh", - "llvm.hexagon.A2.vminub", - "llvm.hexagon.A2.vminuh", - "llvm.hexagon.A2.vminuw", - "llvm.hexagon.A2.vminw", - "llvm.hexagon.A2.vnavgh", - "llvm.hexagon.A2.vnavghcr", - "llvm.hexagon.A2.vnavghr", - "llvm.hexagon.A2.vnavgw", - "llvm.hexagon.A2.vnavgwcr", - "llvm.hexagon.A2.vnavgwr", - "llvm.hexagon.A2.vraddub", - "llvm.hexagon.A2.vraddub.acc", - "llvm.hexagon.A2.vrsadub", - "llvm.hexagon.A2.vrsadub.acc", - "llvm.hexagon.A2.vsubb.map", - "llvm.hexagon.A2.vsubh", - "llvm.hexagon.A2.vsubhs", - "llvm.hexagon.A2.vsubub", - "llvm.hexagon.A2.vsububs", - "llvm.hexagon.A2.vsubuhs", - "llvm.hexagon.A2.vsubw", - "llvm.hexagon.A2.vsubws", - "llvm.hexagon.A2.xor", - "llvm.hexagon.A2.xorp", - "llvm.hexagon.A2.zxtb", - "llvm.hexagon.A2.zxth", - "llvm.hexagon.A4.andn", - "llvm.hexagon.A4.andnp", - "llvm.hexagon.A4.bitsplit", - "llvm.hexagon.A4.bitspliti", - "llvm.hexagon.A4.boundscheck", - "llvm.hexagon.A4.cmpbeq", - "llvm.hexagon.A4.cmpbeqi", - "llvm.hexagon.A4.cmpbgt", - "llvm.hexagon.A4.cmpbgti", - "llvm.hexagon.A4.cmpbgtu", - "llvm.hexagon.A4.cmpbgtui", - "llvm.hexagon.A4.cmpheq", - "llvm.hexagon.A4.cmpheqi", - "llvm.hexagon.A4.cmphgt", - "llvm.hexagon.A4.cmphgti", - "llvm.hexagon.A4.cmphgtu", - "llvm.hexagon.A4.cmphgtui", - "llvm.hexagon.A4.combineir", - "llvm.hexagon.A4.combineri", - "llvm.hexagon.A4.cround.ri", - "llvm.hexagon.A4.cround.rr", - "llvm.hexagon.A4.modwrapu", - "llvm.hexagon.A4.orn", - "llvm.hexagon.A4.ornp", - "llvm.hexagon.A4.rcmpeq", - "llvm.hexagon.A4.rcmpeqi", - "llvm.hexagon.A4.rcmpneq", - "llvm.hexagon.A4.rcmpneqi", - "llvm.hexagon.A4.round.ri", - "llvm.hexagon.A4.round.ri.sat", - "llvm.hexagon.A4.round.rr", - "llvm.hexagon.A4.round.rr.sat", - "llvm.hexagon.A4.tlbmatch", - "llvm.hexagon.A4.vcmpbeq.any", - "llvm.hexagon.A4.vcmpbeqi", - "llvm.hexagon.A4.vcmpbgt", - "llvm.hexagon.A4.vcmpbgti", - "llvm.hexagon.A4.vcmpbgtui", - "llvm.hexagon.A4.vcmpheqi", - "llvm.hexagon.A4.vcmphgti", - "llvm.hexagon.A4.vcmphgtui", - "llvm.hexagon.A4.vcmpweqi", - "llvm.hexagon.A4.vcmpwgti", - "llvm.hexagon.A4.vcmpwgtui", - "llvm.hexagon.A4.vrmaxh", - "llvm.hexagon.A4.vrmaxuh", - "llvm.hexagon.A4.vrmaxuw", - "llvm.hexagon.A4.vrmaxw", - "llvm.hexagon.A4.vrminh", - "llvm.hexagon.A4.vrminuh", - "llvm.hexagon.A4.vrminuw", - "llvm.hexagon.A4.vrminw", - "llvm.hexagon.A5.vaddhubs", - "llvm.hexagon.C2.all8", - "llvm.hexagon.C2.and", - "llvm.hexagon.C2.andn", - "llvm.hexagon.C2.any8", - "llvm.hexagon.C2.bitsclr", - "llvm.hexagon.C2.bitsclri", - "llvm.hexagon.C2.bitsset", - "llvm.hexagon.C2.cmpeq", - "llvm.hexagon.C2.cmpeqi", - "llvm.hexagon.C2.cmpeqp", - "llvm.hexagon.C2.cmpgei", - "llvm.hexagon.C2.cmpgeui", - "llvm.hexagon.C2.cmpgt", - "llvm.hexagon.C2.cmpgti", - "llvm.hexagon.C2.cmpgtp", - "llvm.hexagon.C2.cmpgtu", - "llvm.hexagon.C2.cmpgtui", - "llvm.hexagon.C2.cmpgtup", - "llvm.hexagon.C2.cmplt", - "llvm.hexagon.C2.cmpltu", - "llvm.hexagon.C2.mask", - "llvm.hexagon.C2.mux", - "llvm.hexagon.C2.muxii", - "llvm.hexagon.C2.muxir", - "llvm.hexagon.C2.muxri", - "llvm.hexagon.C2.not", - "llvm.hexagon.C2.or", - "llvm.hexagon.C2.orn", - "llvm.hexagon.C2.pxfer.map", - "llvm.hexagon.C2.tfrpr", - "llvm.hexagon.C2.tfrrp", - "llvm.hexagon.C2.vitpack", - "llvm.hexagon.C2.vmux", - "llvm.hexagon.C2.xor", - "llvm.hexagon.C4.and.and", - "llvm.hexagon.C4.and.andn", - "llvm.hexagon.C4.and.or", - "llvm.hexagon.C4.and.orn", - "llvm.hexagon.C4.cmplte", - "llvm.hexagon.C4.cmpltei", - "llvm.hexagon.C4.cmplteu", - "llvm.hexagon.C4.cmplteui", - "llvm.hexagon.C4.cmpneq", - "llvm.hexagon.C4.cmpneqi", - "llvm.hexagon.C4.fastcorner9", - "llvm.hexagon.C4.fastcorner9.not", - "llvm.hexagon.C4.nbitsclr", - "llvm.hexagon.C4.nbitsclri", - "llvm.hexagon.C4.nbitsset", - "llvm.hexagon.C4.or.and", - "llvm.hexagon.C4.or.andn", - "llvm.hexagon.C4.or.or", - "llvm.hexagon.C4.or.orn", - "llvm.hexagon.F2.conv.d2df", - "llvm.hexagon.F2.conv.d2sf", - "llvm.hexagon.F2.conv.df2d", - "llvm.hexagon.F2.conv.df2d.chop", - "llvm.hexagon.F2.conv.df2sf", - "llvm.hexagon.F2.conv.df2ud", - "llvm.hexagon.F2.conv.df2ud.chop", - "llvm.hexagon.F2.conv.df2uw", - "llvm.hexagon.F2.conv.df2uw.chop", - "llvm.hexagon.F2.conv.df2w", - "llvm.hexagon.F2.conv.df2w.chop", - "llvm.hexagon.F2.conv.sf2d", - "llvm.hexagon.F2.conv.sf2d.chop", - "llvm.hexagon.F2.conv.sf2df", - "llvm.hexagon.F2.conv.sf2ud", - "llvm.hexagon.F2.conv.sf2ud.chop", - "llvm.hexagon.F2.conv.sf2uw", - "llvm.hexagon.F2.conv.sf2uw.chop", - "llvm.hexagon.F2.conv.sf2w", - "llvm.hexagon.F2.conv.sf2w.chop", - "llvm.hexagon.F2.conv.ud2df", - "llvm.hexagon.F2.conv.ud2sf", - "llvm.hexagon.F2.conv.uw2df", - "llvm.hexagon.F2.conv.uw2sf", - "llvm.hexagon.F2.conv.w2df", - "llvm.hexagon.F2.conv.w2sf", - "llvm.hexagon.F2.dfclass", - "llvm.hexagon.F2.dfcmpeq", - "llvm.hexagon.F2.dfcmpge", - "llvm.hexagon.F2.dfcmpgt", - "llvm.hexagon.F2.dfcmpuo", - "llvm.hexagon.F2.dfimm.n", - "llvm.hexagon.F2.dfimm.p", - "llvm.hexagon.F2.sfadd", - "llvm.hexagon.F2.sfclass", - "llvm.hexagon.F2.sfcmpeq", - "llvm.hexagon.F2.sfcmpge", - "llvm.hexagon.F2.sfcmpgt", - "llvm.hexagon.F2.sfcmpuo", - "llvm.hexagon.F2.sffixupd", - "llvm.hexagon.F2.sffixupn", - "llvm.hexagon.F2.sffixupr", - "llvm.hexagon.F2.sffma", - "llvm.hexagon.F2.sffma.lib", - "llvm.hexagon.F2.sffma.sc", - "llvm.hexagon.F2.sffms", - "llvm.hexagon.F2.sffms.lib", - "llvm.hexagon.F2.sfimm.n", - "llvm.hexagon.F2.sfimm.p", - "llvm.hexagon.F2.sfmax", - "llvm.hexagon.F2.sfmin", - "llvm.hexagon.F2.sfmpy", - "llvm.hexagon.F2.sfsub", - "llvm.hexagon.L2.loadw.locked", - "llvm.hexagon.L4.loadd.locked", - "llvm.hexagon.M2.acci", - "llvm.hexagon.M2.accii", - "llvm.hexagon.M2.cmaci.s0", - "llvm.hexagon.M2.cmacr.s0", - "llvm.hexagon.M2.cmacs.s0", - "llvm.hexagon.M2.cmacs.s1", - "llvm.hexagon.M2.cmacsc.s0", - "llvm.hexagon.M2.cmacsc.s1", - "llvm.hexagon.M2.cmpyi.s0", - "llvm.hexagon.M2.cmpyr.s0", - "llvm.hexagon.M2.cmpyrs.s0", - "llvm.hexagon.M2.cmpyrs.s1", - "llvm.hexagon.M2.cmpyrsc.s0", - "llvm.hexagon.M2.cmpyrsc.s1", - "llvm.hexagon.M2.cmpys.s0", - "llvm.hexagon.M2.cmpys.s1", - "llvm.hexagon.M2.cmpysc.s0", - "llvm.hexagon.M2.cmpysc.s1", - "llvm.hexagon.M2.cnacs.s0", - "llvm.hexagon.M2.cnacs.s1", - "llvm.hexagon.M2.cnacsc.s0", - "llvm.hexagon.M2.cnacsc.s1", - "llvm.hexagon.M2.dpmpyss.acc.s0", - "llvm.hexagon.M2.dpmpyss.nac.s0", - "llvm.hexagon.M2.dpmpyss.rnd.s0", - "llvm.hexagon.M2.dpmpyss.s0", - "llvm.hexagon.M2.dpmpyuu.acc.s0", - "llvm.hexagon.M2.dpmpyuu.nac.s0", - "llvm.hexagon.M2.dpmpyuu.s0", - "llvm.hexagon.M2.hmmpyh.rs1", - "llvm.hexagon.M2.hmmpyh.s1", - "llvm.hexagon.M2.hmmpyl.rs1", - "llvm.hexagon.M2.hmmpyl.s1", - "llvm.hexagon.M2.maci", - "llvm.hexagon.M2.macsin", - "llvm.hexagon.M2.macsip", - "llvm.hexagon.M2.mmachs.rs0", - "llvm.hexagon.M2.mmachs.rs1", - "llvm.hexagon.M2.mmachs.s0", - "llvm.hexagon.M2.mmachs.s1", - "llvm.hexagon.M2.mmacls.rs0", - "llvm.hexagon.M2.mmacls.rs1", - "llvm.hexagon.M2.mmacls.s0", - "llvm.hexagon.M2.mmacls.s1", - "llvm.hexagon.M2.mmacuhs.rs0", - "llvm.hexagon.M2.mmacuhs.rs1", - "llvm.hexagon.M2.mmacuhs.s0", - "llvm.hexagon.M2.mmacuhs.s1", - "llvm.hexagon.M2.mmaculs.rs0", - "llvm.hexagon.M2.mmaculs.rs1", - "llvm.hexagon.M2.mmaculs.s0", - "llvm.hexagon.M2.mmaculs.s1", - "llvm.hexagon.M2.mmpyh.rs0", - "llvm.hexagon.M2.mmpyh.rs1", - "llvm.hexagon.M2.mmpyh.s0", - "llvm.hexagon.M2.mmpyh.s1", - "llvm.hexagon.M2.mmpyl.rs0", - "llvm.hexagon.M2.mmpyl.rs1", - "llvm.hexagon.M2.mmpyl.s0", - "llvm.hexagon.M2.mmpyl.s1", - "llvm.hexagon.M2.mmpyuh.rs0", - "llvm.hexagon.M2.mmpyuh.rs1", - "llvm.hexagon.M2.mmpyuh.s0", - "llvm.hexagon.M2.mmpyuh.s1", - "llvm.hexagon.M2.mmpyul.rs0", - "llvm.hexagon.M2.mmpyul.rs1", - "llvm.hexagon.M2.mmpyul.s0", - "llvm.hexagon.M2.mmpyul.s1", - "llvm.hexagon.M2.mpy.acc.hh.s0", - "llvm.hexagon.M2.mpy.acc.hh.s1", - "llvm.hexagon.M2.mpy.acc.hl.s0", - "llvm.hexagon.M2.mpy.acc.hl.s1", - "llvm.hexagon.M2.mpy.acc.lh.s0", - "llvm.hexagon.M2.mpy.acc.lh.s1", - "llvm.hexagon.M2.mpy.acc.ll.s0", - "llvm.hexagon.M2.mpy.acc.ll.s1", - "llvm.hexagon.M2.mpy.acc.sat.hh.s0", - "llvm.hexagon.M2.mpy.acc.sat.hh.s1", - "llvm.hexagon.M2.mpy.acc.sat.hl.s0", - "llvm.hexagon.M2.mpy.acc.sat.hl.s1", - "llvm.hexagon.M2.mpy.acc.sat.lh.s0", - "llvm.hexagon.M2.mpy.acc.sat.lh.s1", - "llvm.hexagon.M2.mpy.acc.sat.ll.s0", - "llvm.hexagon.M2.mpy.acc.sat.ll.s1", - "llvm.hexagon.M2.mpy.hh.s0", - "llvm.hexagon.M2.mpy.hh.s1", - "llvm.hexagon.M2.mpy.hl.s0", - "llvm.hexagon.M2.mpy.hl.s1", - "llvm.hexagon.M2.mpy.lh.s0", - "llvm.hexagon.M2.mpy.lh.s1", - "llvm.hexagon.M2.mpy.ll.s0", - "llvm.hexagon.M2.mpy.ll.s1", - "llvm.hexagon.M2.mpy.nac.hh.s0", - "llvm.hexagon.M2.mpy.nac.hh.s1", - "llvm.hexagon.M2.mpy.nac.hl.s0", - "llvm.hexagon.M2.mpy.nac.hl.s1", - "llvm.hexagon.M2.mpy.nac.lh.s0", - "llvm.hexagon.M2.mpy.nac.lh.s1", - "llvm.hexagon.M2.mpy.nac.ll.s0", - "llvm.hexagon.M2.mpy.nac.ll.s1", - "llvm.hexagon.M2.mpy.nac.sat.hh.s0", - "llvm.hexagon.M2.mpy.nac.sat.hh.s1", - "llvm.hexagon.M2.mpy.nac.sat.hl.s0", - "llvm.hexagon.M2.mpy.nac.sat.hl.s1", - "llvm.hexagon.M2.mpy.nac.sat.lh.s0", - "llvm.hexagon.M2.mpy.nac.sat.lh.s1", - "llvm.hexagon.M2.mpy.nac.sat.ll.s0", - "llvm.hexagon.M2.mpy.nac.sat.ll.s1", - "llvm.hexagon.M2.mpy.rnd.hh.s0", - "llvm.hexagon.M2.mpy.rnd.hh.s1", - "llvm.hexagon.M2.mpy.rnd.hl.s0", - "llvm.hexagon.M2.mpy.rnd.hl.s1", - "llvm.hexagon.M2.mpy.rnd.lh.s0", - "llvm.hexagon.M2.mpy.rnd.lh.s1", - "llvm.hexagon.M2.mpy.rnd.ll.s0", - "llvm.hexagon.M2.mpy.rnd.ll.s1", - "llvm.hexagon.M2.mpy.sat.hh.s0", - "llvm.hexagon.M2.mpy.sat.hh.s1", - "llvm.hexagon.M2.mpy.sat.hl.s0", - "llvm.hexagon.M2.mpy.sat.hl.s1", - "llvm.hexagon.M2.mpy.sat.lh.s0", - "llvm.hexagon.M2.mpy.sat.lh.s1", - "llvm.hexagon.M2.mpy.sat.ll.s0", - "llvm.hexagon.M2.mpy.sat.ll.s1", - "llvm.hexagon.M2.mpy.sat.rnd.hh.s0", - "llvm.hexagon.M2.mpy.sat.rnd.hh.s1", - "llvm.hexagon.M2.mpy.sat.rnd.hl.s0", - "llvm.hexagon.M2.mpy.sat.rnd.hl.s1", - "llvm.hexagon.M2.mpy.sat.rnd.lh.s0", - "llvm.hexagon.M2.mpy.sat.rnd.lh.s1", - "llvm.hexagon.M2.mpy.sat.rnd.ll.s0", - "llvm.hexagon.M2.mpy.sat.rnd.ll.s1", - "llvm.hexagon.M2.mpy.up", - "llvm.hexagon.M2.mpy.up.s1", - "llvm.hexagon.M2.mpy.up.s1.sat", - "llvm.hexagon.M2.mpyd.acc.hh.s0", - "llvm.hexagon.M2.mpyd.acc.hh.s1", - "llvm.hexagon.M2.mpyd.acc.hl.s0", - "llvm.hexagon.M2.mpyd.acc.hl.s1", - "llvm.hexagon.M2.mpyd.acc.lh.s0", - "llvm.hexagon.M2.mpyd.acc.lh.s1", - "llvm.hexagon.M2.mpyd.acc.ll.s0", - "llvm.hexagon.M2.mpyd.acc.ll.s1", - "llvm.hexagon.M2.mpyd.hh.s0", - "llvm.hexagon.M2.mpyd.hh.s1", - "llvm.hexagon.M2.mpyd.hl.s0", - "llvm.hexagon.M2.mpyd.hl.s1", - "llvm.hexagon.M2.mpyd.lh.s0", - "llvm.hexagon.M2.mpyd.lh.s1", - "llvm.hexagon.M2.mpyd.ll.s0", - "llvm.hexagon.M2.mpyd.ll.s1", - "llvm.hexagon.M2.mpyd.nac.hh.s0", - "llvm.hexagon.M2.mpyd.nac.hh.s1", - "llvm.hexagon.M2.mpyd.nac.hl.s0", - "llvm.hexagon.M2.mpyd.nac.hl.s1", - "llvm.hexagon.M2.mpyd.nac.lh.s0", - "llvm.hexagon.M2.mpyd.nac.lh.s1", - "llvm.hexagon.M2.mpyd.nac.ll.s0", - "llvm.hexagon.M2.mpyd.nac.ll.s1", - "llvm.hexagon.M2.mpyd.rnd.hh.s0", - "llvm.hexagon.M2.mpyd.rnd.hh.s1", - "llvm.hexagon.M2.mpyd.rnd.hl.s0", - "llvm.hexagon.M2.mpyd.rnd.hl.s1", - "llvm.hexagon.M2.mpyd.rnd.lh.s0", - "llvm.hexagon.M2.mpyd.rnd.lh.s1", - "llvm.hexagon.M2.mpyd.rnd.ll.s0", - "llvm.hexagon.M2.mpyd.rnd.ll.s1", - "llvm.hexagon.M2.mpyi", - "llvm.hexagon.M2.mpysmi", - "llvm.hexagon.M2.mpysu.up", - "llvm.hexagon.M2.mpyu.acc.hh.s0", - "llvm.hexagon.M2.mpyu.acc.hh.s1", - "llvm.hexagon.M2.mpyu.acc.hl.s0", - "llvm.hexagon.M2.mpyu.acc.hl.s1", - "llvm.hexagon.M2.mpyu.acc.lh.s0", - "llvm.hexagon.M2.mpyu.acc.lh.s1", - "llvm.hexagon.M2.mpyu.acc.ll.s0", - "llvm.hexagon.M2.mpyu.acc.ll.s1", - "llvm.hexagon.M2.mpyu.hh.s0", - "llvm.hexagon.M2.mpyu.hh.s1", - "llvm.hexagon.M2.mpyu.hl.s0", - "llvm.hexagon.M2.mpyu.hl.s1", - "llvm.hexagon.M2.mpyu.lh.s0", - "llvm.hexagon.M2.mpyu.lh.s1", - "llvm.hexagon.M2.mpyu.ll.s0", - "llvm.hexagon.M2.mpyu.ll.s1", - "llvm.hexagon.M2.mpyu.nac.hh.s0", - "llvm.hexagon.M2.mpyu.nac.hh.s1", - "llvm.hexagon.M2.mpyu.nac.hl.s0", - "llvm.hexagon.M2.mpyu.nac.hl.s1", - "llvm.hexagon.M2.mpyu.nac.lh.s0", - "llvm.hexagon.M2.mpyu.nac.lh.s1", - "llvm.hexagon.M2.mpyu.nac.ll.s0", - "llvm.hexagon.M2.mpyu.nac.ll.s1", - "llvm.hexagon.M2.mpyu.up", - "llvm.hexagon.M2.mpyud.acc.hh.s0", - "llvm.hexagon.M2.mpyud.acc.hh.s1", - "llvm.hexagon.M2.mpyud.acc.hl.s0", - "llvm.hexagon.M2.mpyud.acc.hl.s1", - "llvm.hexagon.M2.mpyud.acc.lh.s0", - "llvm.hexagon.M2.mpyud.acc.lh.s1", - "llvm.hexagon.M2.mpyud.acc.ll.s0", - "llvm.hexagon.M2.mpyud.acc.ll.s1", - "llvm.hexagon.M2.mpyud.hh.s0", - "llvm.hexagon.M2.mpyud.hh.s1", - "llvm.hexagon.M2.mpyud.hl.s0", - "llvm.hexagon.M2.mpyud.hl.s1", - "llvm.hexagon.M2.mpyud.lh.s0", - "llvm.hexagon.M2.mpyud.lh.s1", - "llvm.hexagon.M2.mpyud.ll.s0", - "llvm.hexagon.M2.mpyud.ll.s1", - "llvm.hexagon.M2.mpyud.nac.hh.s0", - "llvm.hexagon.M2.mpyud.nac.hh.s1", - "llvm.hexagon.M2.mpyud.nac.hl.s0", - "llvm.hexagon.M2.mpyud.nac.hl.s1", - "llvm.hexagon.M2.mpyud.nac.lh.s0", - "llvm.hexagon.M2.mpyud.nac.lh.s1", - "llvm.hexagon.M2.mpyud.nac.ll.s0", - "llvm.hexagon.M2.mpyud.nac.ll.s1", - "llvm.hexagon.M2.mpyui", - "llvm.hexagon.M2.nacci", - "llvm.hexagon.M2.naccii", - "llvm.hexagon.M2.subacc", - "llvm.hexagon.M2.vabsdiffh", - "llvm.hexagon.M2.vabsdiffw", - "llvm.hexagon.M2.vcmac.s0.sat.i", - "llvm.hexagon.M2.vcmac.s0.sat.r", - "llvm.hexagon.M2.vcmpy.s0.sat.i", - "llvm.hexagon.M2.vcmpy.s0.sat.r", - "llvm.hexagon.M2.vcmpy.s1.sat.i", - "llvm.hexagon.M2.vcmpy.s1.sat.r", - "llvm.hexagon.M2.vdmacs.s0", - "llvm.hexagon.M2.vdmacs.s1", - "llvm.hexagon.M2.vdmpyrs.s0", - "llvm.hexagon.M2.vdmpyrs.s1", - "llvm.hexagon.M2.vdmpys.s0", - "llvm.hexagon.M2.vdmpys.s1", - "llvm.hexagon.M2.vmac2", - "llvm.hexagon.M2.vmac2es", - "llvm.hexagon.M2.vmac2es.s0", - "llvm.hexagon.M2.vmac2es.s1", - "llvm.hexagon.M2.vmac2s.s0", - "llvm.hexagon.M2.vmac2s.s1", - "llvm.hexagon.M2.vmac2su.s0", - "llvm.hexagon.M2.vmac2su.s1", - "llvm.hexagon.M2.vmpy2es.s0", - "llvm.hexagon.M2.vmpy2es.s1", - "llvm.hexagon.M2.vmpy2s.s0", - "llvm.hexagon.M2.vmpy2s.s0pack", - "llvm.hexagon.M2.vmpy2s.s1", - "llvm.hexagon.M2.vmpy2s.s1pack", - "llvm.hexagon.M2.vmpy2su.s0", - "llvm.hexagon.M2.vmpy2su.s1", - "llvm.hexagon.M2.vraddh", - "llvm.hexagon.M2.vradduh", - "llvm.hexagon.M2.vrcmaci.s0", - "llvm.hexagon.M2.vrcmaci.s0c", - "llvm.hexagon.M2.vrcmacr.s0", - "llvm.hexagon.M2.vrcmacr.s0c", - "llvm.hexagon.M2.vrcmpyi.s0", - "llvm.hexagon.M2.vrcmpyi.s0c", - "llvm.hexagon.M2.vrcmpyr.s0", - "llvm.hexagon.M2.vrcmpyr.s0c", - "llvm.hexagon.M2.vrcmpys.acc.s1", - "llvm.hexagon.M2.vrcmpys.s1", - "llvm.hexagon.M2.vrcmpys.s1rp", - "llvm.hexagon.M2.vrmac.s0", - "llvm.hexagon.M2.vrmpy.s0", - "llvm.hexagon.M2.xor.xacc", - "llvm.hexagon.M4.and.and", - "llvm.hexagon.M4.and.andn", - "llvm.hexagon.M4.and.or", - "llvm.hexagon.M4.and.xor", - "llvm.hexagon.M4.cmpyi.wh", - "llvm.hexagon.M4.cmpyi.whc", - "llvm.hexagon.M4.cmpyr.wh", - "llvm.hexagon.M4.cmpyr.whc", - "llvm.hexagon.M4.mac.up.s1.sat", - "llvm.hexagon.M4.mpyri.addi", - "llvm.hexagon.M4.mpyri.addr", - "llvm.hexagon.M4.mpyri.addr.u2", - "llvm.hexagon.M4.mpyrr.addi", - "llvm.hexagon.M4.mpyrr.addr", - "llvm.hexagon.M4.nac.up.s1.sat", - "llvm.hexagon.M4.or.and", - "llvm.hexagon.M4.or.andn", - "llvm.hexagon.M4.or.or", - "llvm.hexagon.M4.or.xor", - "llvm.hexagon.M4.pmpyw", - "llvm.hexagon.M4.pmpyw.acc", - "llvm.hexagon.M4.vpmpyh", - "llvm.hexagon.M4.vpmpyh.acc", - "llvm.hexagon.M4.vrmpyeh.acc.s0", - "llvm.hexagon.M4.vrmpyeh.acc.s1", - "llvm.hexagon.M4.vrmpyeh.s0", - "llvm.hexagon.M4.vrmpyeh.s1", - "llvm.hexagon.M4.vrmpyoh.acc.s0", - "llvm.hexagon.M4.vrmpyoh.acc.s1", - "llvm.hexagon.M4.vrmpyoh.s0", - "llvm.hexagon.M4.vrmpyoh.s1", - "llvm.hexagon.M4.xor.and", - "llvm.hexagon.M4.xor.andn", - "llvm.hexagon.M4.xor.or", - "llvm.hexagon.M4.xor.xacc", - "llvm.hexagon.M5.vdmacbsu", - "llvm.hexagon.M5.vdmpybsu", - "llvm.hexagon.M5.vmacbsu", - "llvm.hexagon.M5.vmacbuu", - "llvm.hexagon.M5.vmpybsu", - "llvm.hexagon.M5.vmpybuu", - "llvm.hexagon.M5.vrmacbsu", - "llvm.hexagon.M5.vrmacbuu", - "llvm.hexagon.M5.vrmpybsu", - "llvm.hexagon.M5.vrmpybuu", - "llvm.hexagon.M6.vabsdiffb", - "llvm.hexagon.M6.vabsdiffub", - "llvm.hexagon.S2.addasl.rrri", - "llvm.hexagon.S2.asl.i.p", - "llvm.hexagon.S2.asl.i.p.acc", - "llvm.hexagon.S2.asl.i.p.and", - "llvm.hexagon.S2.asl.i.p.nac", - "llvm.hexagon.S2.asl.i.p.or", - "llvm.hexagon.S2.asl.i.p.xacc", - "llvm.hexagon.S2.asl.i.r", - "llvm.hexagon.S2.asl.i.r.acc", - "llvm.hexagon.S2.asl.i.r.and", - "llvm.hexagon.S2.asl.i.r.nac", - "llvm.hexagon.S2.asl.i.r.or", - "llvm.hexagon.S2.asl.i.r.sat", - "llvm.hexagon.S2.asl.i.r.xacc", - "llvm.hexagon.S2.asl.i.vh", - "llvm.hexagon.S2.asl.i.vw", - "llvm.hexagon.S2.asl.r.p", - "llvm.hexagon.S2.asl.r.p.acc", - "llvm.hexagon.S2.asl.r.p.and", - "llvm.hexagon.S2.asl.r.p.nac", - "llvm.hexagon.S2.asl.r.p.or", - "llvm.hexagon.S2.asl.r.p.xor", - "llvm.hexagon.S2.asl.r.r", - "llvm.hexagon.S2.asl.r.r.acc", - "llvm.hexagon.S2.asl.r.r.and", - "llvm.hexagon.S2.asl.r.r.nac", - "llvm.hexagon.S2.asl.r.r.or", - "llvm.hexagon.S2.asl.r.r.sat", - "llvm.hexagon.S2.asl.r.vh", - "llvm.hexagon.S2.asl.r.vw", - "llvm.hexagon.S2.asr.i.p", - "llvm.hexagon.S2.asr.i.p.acc", - "llvm.hexagon.S2.asr.i.p.and", - "llvm.hexagon.S2.asr.i.p.nac", - "llvm.hexagon.S2.asr.i.p.or", - "llvm.hexagon.S2.asr.i.p.rnd", - "llvm.hexagon.S2.asr.i.p.rnd.goodsyntax", - "llvm.hexagon.S2.asr.i.r", - "llvm.hexagon.S2.asr.i.r.acc", - "llvm.hexagon.S2.asr.i.r.and", - "llvm.hexagon.S2.asr.i.r.nac", - "llvm.hexagon.S2.asr.i.r.or", - "llvm.hexagon.S2.asr.i.r.rnd", - "llvm.hexagon.S2.asr.i.r.rnd.goodsyntax", - "llvm.hexagon.S2.asr.i.svw.trun", - "llvm.hexagon.S2.asr.i.vh", - "llvm.hexagon.S2.asr.i.vw", - "llvm.hexagon.S2.asr.r.p", - "llvm.hexagon.S2.asr.r.p.acc", - "llvm.hexagon.S2.asr.r.p.and", - "llvm.hexagon.S2.asr.r.p.nac", - "llvm.hexagon.S2.asr.r.p.or", - "llvm.hexagon.S2.asr.r.p.xor", - "llvm.hexagon.S2.asr.r.r", - "llvm.hexagon.S2.asr.r.r.acc", - "llvm.hexagon.S2.asr.r.r.and", - "llvm.hexagon.S2.asr.r.r.nac", - "llvm.hexagon.S2.asr.r.r.or", - "llvm.hexagon.S2.asr.r.r.sat", - "llvm.hexagon.S2.asr.r.svw.trun", - "llvm.hexagon.S2.asr.r.vh", - "llvm.hexagon.S2.asr.r.vw", - "llvm.hexagon.S2.brev", - "llvm.hexagon.S2.brevp", - "llvm.hexagon.S2.cabacencbin", - "llvm.hexagon.S2.cl0", - "llvm.hexagon.S2.cl0p", - "llvm.hexagon.S2.cl1", - "llvm.hexagon.S2.cl1p", - "llvm.hexagon.S2.clb", - "llvm.hexagon.S2.clbnorm", - "llvm.hexagon.S2.clbp", - "llvm.hexagon.S2.clrbit.i", - "llvm.hexagon.S2.clrbit.r", - "llvm.hexagon.S2.ct0", - "llvm.hexagon.S2.ct0p", - "llvm.hexagon.S2.ct1", - "llvm.hexagon.S2.ct1p", - "llvm.hexagon.S2.deinterleave", - "llvm.hexagon.S2.extractu", - "llvm.hexagon.S2.extractu.rp", - "llvm.hexagon.S2.extractup", - "llvm.hexagon.S2.extractup.rp", - "llvm.hexagon.S2.insert", - "llvm.hexagon.S2.insert.rp", - "llvm.hexagon.S2.insertp", - "llvm.hexagon.S2.insertp.rp", - "llvm.hexagon.S2.interleave", - "llvm.hexagon.S2.lfsp", - "llvm.hexagon.S2.lsl.r.p", - "llvm.hexagon.S2.lsl.r.p.acc", - "llvm.hexagon.S2.lsl.r.p.and", - "llvm.hexagon.S2.lsl.r.p.nac", - "llvm.hexagon.S2.lsl.r.p.or", - "llvm.hexagon.S2.lsl.r.p.xor", - "llvm.hexagon.S2.lsl.r.r", - "llvm.hexagon.S2.lsl.r.r.acc", - "llvm.hexagon.S2.lsl.r.r.and", - "llvm.hexagon.S2.lsl.r.r.nac", - "llvm.hexagon.S2.lsl.r.r.or", - "llvm.hexagon.S2.lsl.r.vh", - "llvm.hexagon.S2.lsl.r.vw", - "llvm.hexagon.S2.lsr.i.p", - "llvm.hexagon.S2.lsr.i.p.acc", - "llvm.hexagon.S2.lsr.i.p.and", - "llvm.hexagon.S2.lsr.i.p.nac", - "llvm.hexagon.S2.lsr.i.p.or", - "llvm.hexagon.S2.lsr.i.p.xacc", - "llvm.hexagon.S2.lsr.i.r", - "llvm.hexagon.S2.lsr.i.r.acc", - "llvm.hexagon.S2.lsr.i.r.and", - "llvm.hexagon.S2.lsr.i.r.nac", - "llvm.hexagon.S2.lsr.i.r.or", - "llvm.hexagon.S2.lsr.i.r.xacc", - "llvm.hexagon.S2.lsr.i.vh", - "llvm.hexagon.S2.lsr.i.vw", - "llvm.hexagon.S2.lsr.r.p", - "llvm.hexagon.S2.lsr.r.p.acc", - "llvm.hexagon.S2.lsr.r.p.and", - "llvm.hexagon.S2.lsr.r.p.nac", - "llvm.hexagon.S2.lsr.r.p.or", - "llvm.hexagon.S2.lsr.r.p.xor", - "llvm.hexagon.S2.lsr.r.r", - "llvm.hexagon.S2.lsr.r.r.acc", - "llvm.hexagon.S2.lsr.r.r.and", - "llvm.hexagon.S2.lsr.r.r.nac", - "llvm.hexagon.S2.lsr.r.r.or", - "llvm.hexagon.S2.lsr.r.vh", - "llvm.hexagon.S2.lsr.r.vw", - "llvm.hexagon.S2.packhl", - "llvm.hexagon.S2.parityp", - "llvm.hexagon.S2.setbit.i", - "llvm.hexagon.S2.setbit.r", - "llvm.hexagon.S2.shuffeb", - "llvm.hexagon.S2.shuffeh", - "llvm.hexagon.S2.shuffob", - "llvm.hexagon.S2.shuffoh", - "llvm.hexagon.S2.storew.locked", - "llvm.hexagon.S2.svsathb", - "llvm.hexagon.S2.svsathub", - "llvm.hexagon.S2.tableidxb.goodsyntax", - "llvm.hexagon.S2.tableidxd.goodsyntax", - "llvm.hexagon.S2.tableidxh.goodsyntax", - "llvm.hexagon.S2.tableidxw.goodsyntax", - "llvm.hexagon.S2.togglebit.i", - "llvm.hexagon.S2.togglebit.r", - "llvm.hexagon.S2.tstbit.i", - "llvm.hexagon.S2.tstbit.r", - "llvm.hexagon.S2.valignib", - "llvm.hexagon.S2.valignrb", - "llvm.hexagon.S2.vcnegh", - "llvm.hexagon.S2.vcrotate", - "llvm.hexagon.S2.vrcnegh", - "llvm.hexagon.S2.vrndpackwh", - "llvm.hexagon.S2.vrndpackwhs", - "llvm.hexagon.S2.vsathb", - "llvm.hexagon.S2.vsathb.nopack", - "llvm.hexagon.S2.vsathub", - "llvm.hexagon.S2.vsathub.nopack", - "llvm.hexagon.S2.vsatwh", - "llvm.hexagon.S2.vsatwh.nopack", - "llvm.hexagon.S2.vsatwuh", - "llvm.hexagon.S2.vsatwuh.nopack", - "llvm.hexagon.S2.vsplatrb", - "llvm.hexagon.S2.vsplatrh", - "llvm.hexagon.S2.vspliceib", - "llvm.hexagon.S2.vsplicerb", - "llvm.hexagon.S2.vsxtbh", - "llvm.hexagon.S2.vsxthw", - "llvm.hexagon.S2.vtrunehb", - "llvm.hexagon.S2.vtrunewh", - "llvm.hexagon.S2.vtrunohb", - "llvm.hexagon.S2.vtrunowh", - "llvm.hexagon.S2.vzxtbh", - "llvm.hexagon.S2.vzxthw", - "llvm.hexagon.S4.addaddi", - "llvm.hexagon.S4.addi.asl.ri", - "llvm.hexagon.S4.addi.lsr.ri", - "llvm.hexagon.S4.andi.asl.ri", - "llvm.hexagon.S4.andi.lsr.ri", - "llvm.hexagon.S4.clbaddi", - "llvm.hexagon.S4.clbpaddi", - "llvm.hexagon.S4.clbpnorm", - "llvm.hexagon.S4.extract", - "llvm.hexagon.S4.extract.rp", - "llvm.hexagon.S4.extractp", - "llvm.hexagon.S4.extractp.rp", - "llvm.hexagon.S4.lsli", - "llvm.hexagon.S4.ntstbit.i", - "llvm.hexagon.S4.ntstbit.r", - "llvm.hexagon.S4.or.andi", - "llvm.hexagon.S4.or.andix", - "llvm.hexagon.S4.or.ori", - "llvm.hexagon.S4.ori.asl.ri", - "llvm.hexagon.S4.ori.lsr.ri", - "llvm.hexagon.S4.parity", - "llvm.hexagon.S4.stored.locked", - "llvm.hexagon.S4.subaddi", - "llvm.hexagon.S4.subi.asl.ri", - "llvm.hexagon.S4.subi.lsr.ri", - "llvm.hexagon.S4.vrcrotate", - "llvm.hexagon.S4.vrcrotate.acc", - "llvm.hexagon.S4.vxaddsubh", - "llvm.hexagon.S4.vxaddsubhr", - "llvm.hexagon.S4.vxaddsubw", - "llvm.hexagon.S4.vxsubaddh", - "llvm.hexagon.S4.vxsubaddhr", - "llvm.hexagon.S4.vxsubaddw", - "llvm.hexagon.S5.asrhub.rnd.sat.goodsyntax", - "llvm.hexagon.S5.asrhub.sat", - "llvm.hexagon.S5.popcountp", - "llvm.hexagon.S5.vasrhrnd.goodsyntax", - "llvm.hexagon.S6.rol.i.p", - "llvm.hexagon.S6.rol.i.p.acc", - "llvm.hexagon.S6.rol.i.p.and", - "llvm.hexagon.S6.rol.i.p.nac", - "llvm.hexagon.S6.rol.i.p.or", - "llvm.hexagon.S6.rol.i.p.xacc", - "llvm.hexagon.S6.rol.i.r", - "llvm.hexagon.S6.rol.i.r.acc", - "llvm.hexagon.S6.rol.i.r.and", - "llvm.hexagon.S6.rol.i.r.nac", - "llvm.hexagon.S6.rol.i.r.or", - "llvm.hexagon.S6.rol.i.r.xacc", - "llvm.hexagon.S6.vsplatrbp", - "llvm.hexagon.S6.vtrunehb.ppp", - "llvm.hexagon.S6.vtrunohb.ppp", - "llvm.hexagon.SI.to.SXTHI.asrh", - "llvm.hexagon.V6.extractw", - "llvm.hexagon.V6.extractw.128B", - "llvm.hexagon.V6.hi", - "llvm.hexagon.V6.hi.128B", - "llvm.hexagon.V6.lo", - "llvm.hexagon.V6.lo.128B", - "llvm.hexagon.V6.lvsplatw", - "llvm.hexagon.V6.lvsplatw.128B", - "llvm.hexagon.V6.pred.and", - "llvm.hexagon.V6.pred.and.128B", - "llvm.hexagon.V6.pred.and.n", - "llvm.hexagon.V6.pred.and.n.128B", - "llvm.hexagon.V6.pred.not", - "llvm.hexagon.V6.pred.not.128B", - "llvm.hexagon.V6.pred.or", - "llvm.hexagon.V6.pred.or.128B", - "llvm.hexagon.V6.pred.or.n", - "llvm.hexagon.V6.pred.or.n.128B", - "llvm.hexagon.V6.pred.scalar2", - "llvm.hexagon.V6.pred.scalar2.128B", - "llvm.hexagon.V6.pred.xor", - "llvm.hexagon.V6.pred.xor.128B", - "llvm.hexagon.V6.vabsdiffh", - "llvm.hexagon.V6.vabsdiffh.128B", - "llvm.hexagon.V6.vabsdiffub", - "llvm.hexagon.V6.vabsdiffub.128B", - "llvm.hexagon.V6.vabsdiffuh", - "llvm.hexagon.V6.vabsdiffuh.128B", - "llvm.hexagon.V6.vabsdiffw", - "llvm.hexagon.V6.vabsdiffw.128B", - "llvm.hexagon.V6.vabsh", - "llvm.hexagon.V6.vabsh.128B", - "llvm.hexagon.V6.vabsh.sat", - "llvm.hexagon.V6.vabsh.sat.128B", - "llvm.hexagon.V6.vabsw", - "llvm.hexagon.V6.vabsw.128B", - "llvm.hexagon.V6.vabsw.sat", - "llvm.hexagon.V6.vabsw.sat.128B", - "llvm.hexagon.V6.vaddb", - "llvm.hexagon.V6.vaddb.128B", - "llvm.hexagon.V6.vaddb.dv", - "llvm.hexagon.V6.vaddb.dv.128B", - "llvm.hexagon.V6.vaddbnq", - "llvm.hexagon.V6.vaddbnq.128B", - "llvm.hexagon.V6.vaddbq", - "llvm.hexagon.V6.vaddbq.128B", - "llvm.hexagon.V6.vaddh", - "llvm.hexagon.V6.vaddh.128B", - "llvm.hexagon.V6.vaddh.dv", - "llvm.hexagon.V6.vaddh.dv.128B", - "llvm.hexagon.V6.vaddhnq", - "llvm.hexagon.V6.vaddhnq.128B", - "llvm.hexagon.V6.vaddhq", - "llvm.hexagon.V6.vaddhq.128B", - "llvm.hexagon.V6.vaddhsat", - "llvm.hexagon.V6.vaddhsat.128B", - "llvm.hexagon.V6.vaddhsat.dv", - "llvm.hexagon.V6.vaddhsat.dv.128B", - "llvm.hexagon.V6.vaddhw", - "llvm.hexagon.V6.vaddhw.128B", - "llvm.hexagon.V6.vaddubh", - "llvm.hexagon.V6.vaddubh.128B", - "llvm.hexagon.V6.vaddubsat", - "llvm.hexagon.V6.vaddubsat.128B", - "llvm.hexagon.V6.vaddubsat.dv", - "llvm.hexagon.V6.vaddubsat.dv.128B", - "llvm.hexagon.V6.vadduhsat", - "llvm.hexagon.V6.vadduhsat.128B", - "llvm.hexagon.V6.vadduhsat.dv", - "llvm.hexagon.V6.vadduhsat.dv.128B", - "llvm.hexagon.V6.vadduhw", - "llvm.hexagon.V6.vadduhw.128B", - "llvm.hexagon.V6.vaddw", - "llvm.hexagon.V6.vaddw.128B", - "llvm.hexagon.V6.vaddw.dv", - "llvm.hexagon.V6.vaddw.dv.128B", - "llvm.hexagon.V6.vaddwnq", - "llvm.hexagon.V6.vaddwnq.128B", - "llvm.hexagon.V6.vaddwq", - "llvm.hexagon.V6.vaddwq.128B", - "llvm.hexagon.V6.vaddwsat", - "llvm.hexagon.V6.vaddwsat.128B", - "llvm.hexagon.V6.vaddwsat.dv", - "llvm.hexagon.V6.vaddwsat.dv.128B", - "llvm.hexagon.V6.valignb", - "llvm.hexagon.V6.valignb.128B", - "llvm.hexagon.V6.valignbi", - "llvm.hexagon.V6.valignbi.128B", - "llvm.hexagon.V6.vand", - "llvm.hexagon.V6.vand.128B", - "llvm.hexagon.V6.vandqrt", - "llvm.hexagon.V6.vandqrt.128B", - "llvm.hexagon.V6.vandqrt.acc", - "llvm.hexagon.V6.vandqrt.acc.128B", - "llvm.hexagon.V6.vandvrt", - "llvm.hexagon.V6.vandvrt.128B", - "llvm.hexagon.V6.vandvrt.acc", - "llvm.hexagon.V6.vandvrt.acc.128B", - "llvm.hexagon.V6.vaslh", - "llvm.hexagon.V6.vaslh.128B", - "llvm.hexagon.V6.vaslhv", - "llvm.hexagon.V6.vaslhv.128B", - "llvm.hexagon.V6.vaslw", - "llvm.hexagon.V6.vaslw.128B", - "llvm.hexagon.V6.vaslw.acc", - "llvm.hexagon.V6.vaslw.acc.128B", - "llvm.hexagon.V6.vaslwv", - "llvm.hexagon.V6.vaslwv.128B", - "llvm.hexagon.V6.vasrh", - "llvm.hexagon.V6.vasrh.128B", - "llvm.hexagon.V6.vasrhbrndsat", - "llvm.hexagon.V6.vasrhbrndsat.128B", - "llvm.hexagon.V6.vasrhubrndsat", - "llvm.hexagon.V6.vasrhubrndsat.128B", - "llvm.hexagon.V6.vasrhubsat", - "llvm.hexagon.V6.vasrhubsat.128B", - "llvm.hexagon.V6.vasrhv", - "llvm.hexagon.V6.vasrhv.128B", - "llvm.hexagon.V6.vasrw", - "llvm.hexagon.V6.vasrw.128B", - "llvm.hexagon.V6.vasrw.acc", - "llvm.hexagon.V6.vasrw.acc.128B", - "llvm.hexagon.V6.vasrwh", - "llvm.hexagon.V6.vasrwh.128B", - "llvm.hexagon.V6.vasrwhrndsat", - "llvm.hexagon.V6.vasrwhrndsat.128B", - "llvm.hexagon.V6.vasrwhsat", - "llvm.hexagon.V6.vasrwhsat.128B", - "llvm.hexagon.V6.vasrwuhsat", - "llvm.hexagon.V6.vasrwuhsat.128B", - "llvm.hexagon.V6.vasrwv", - "llvm.hexagon.V6.vasrwv.128B", - "llvm.hexagon.V6.vassign", - "llvm.hexagon.V6.vassign.128B", - "llvm.hexagon.V6.vassignp", - "llvm.hexagon.V6.vassignp.128B", - "llvm.hexagon.V6.vavgh", - "llvm.hexagon.V6.vavgh.128B", - "llvm.hexagon.V6.vavghrnd", - "llvm.hexagon.V6.vavghrnd.128B", - "llvm.hexagon.V6.vavgub", - "llvm.hexagon.V6.vavgub.128B", - "llvm.hexagon.V6.vavgubrnd", - "llvm.hexagon.V6.vavgubrnd.128B", - "llvm.hexagon.V6.vavguh", - "llvm.hexagon.V6.vavguh.128B", - "llvm.hexagon.V6.vavguhrnd", - "llvm.hexagon.V6.vavguhrnd.128B", - "llvm.hexagon.V6.vavgw", - "llvm.hexagon.V6.vavgw.128B", - "llvm.hexagon.V6.vavgwrnd", - "llvm.hexagon.V6.vavgwrnd.128B", - "llvm.hexagon.V6.vcl0h", - "llvm.hexagon.V6.vcl0h.128B", - "llvm.hexagon.V6.vcl0w", - "llvm.hexagon.V6.vcl0w.128B", - "llvm.hexagon.V6.vcombine", - "llvm.hexagon.V6.vcombine.128B", - "llvm.hexagon.V6.vd0", - "llvm.hexagon.V6.vd0.128B", - "llvm.hexagon.V6.vdealb", - "llvm.hexagon.V6.vdealb.128B", - "llvm.hexagon.V6.vdealb4w", - "llvm.hexagon.V6.vdealb4w.128B", - "llvm.hexagon.V6.vdealh", - "llvm.hexagon.V6.vdealh.128B", - "llvm.hexagon.V6.vdealvdd", - "llvm.hexagon.V6.vdealvdd.128B", - "llvm.hexagon.V6.vdelta", - "llvm.hexagon.V6.vdelta.128B", - "llvm.hexagon.V6.vdmpybus", - "llvm.hexagon.V6.vdmpybus.128B", - "llvm.hexagon.V6.vdmpybus.acc", - "llvm.hexagon.V6.vdmpybus.acc.128B", - "llvm.hexagon.V6.vdmpybus.dv", - "llvm.hexagon.V6.vdmpybus.dv.128B", - "llvm.hexagon.V6.vdmpybus.dv.acc", - "llvm.hexagon.V6.vdmpybus.dv.acc.128B", - "llvm.hexagon.V6.vdmpyhb", - "llvm.hexagon.V6.vdmpyhb.128B", - "llvm.hexagon.V6.vdmpyhb.acc", - "llvm.hexagon.V6.vdmpyhb.acc.128B", - "llvm.hexagon.V6.vdmpyhb.dv", - "llvm.hexagon.V6.vdmpyhb.dv.128B", - "llvm.hexagon.V6.vdmpyhb.dv.acc", - "llvm.hexagon.V6.vdmpyhb.dv.acc.128B", - "llvm.hexagon.V6.vdmpyhisat", - "llvm.hexagon.V6.vdmpyhisat.128B", - "llvm.hexagon.V6.vdmpyhisat.acc", - "llvm.hexagon.V6.vdmpyhisat.acc.128B", - "llvm.hexagon.V6.vdmpyhsat", - "llvm.hexagon.V6.vdmpyhsat.128B", - "llvm.hexagon.V6.vdmpyhsat.acc", - "llvm.hexagon.V6.vdmpyhsat.acc.128B", - "llvm.hexagon.V6.vdmpyhsuisat", - "llvm.hexagon.V6.vdmpyhsuisat.128B", - "llvm.hexagon.V6.vdmpyhsuisat.acc", - "llvm.hexagon.V6.vdmpyhsuisat.acc.128B", - "llvm.hexagon.V6.vdmpyhsusat", - "llvm.hexagon.V6.vdmpyhsusat.128B", - "llvm.hexagon.V6.vdmpyhsusat.acc", - "llvm.hexagon.V6.vdmpyhsusat.acc.128B", - "llvm.hexagon.V6.vdmpyhvsat", - "llvm.hexagon.V6.vdmpyhvsat.128B", - "llvm.hexagon.V6.vdmpyhvsat.acc", - "llvm.hexagon.V6.vdmpyhvsat.acc.128B", - "llvm.hexagon.V6.vdsaduh", - "llvm.hexagon.V6.vdsaduh.128B", - "llvm.hexagon.V6.vdsaduh.acc", - "llvm.hexagon.V6.vdsaduh.acc.128B", - "llvm.hexagon.V6.veqb", - "llvm.hexagon.V6.veqb.128B", - "llvm.hexagon.V6.veqb.and", - "llvm.hexagon.V6.veqb.and.128B", - "llvm.hexagon.V6.veqb.or", - "llvm.hexagon.V6.veqb.or.128B", - "llvm.hexagon.V6.veqb.xor", - "llvm.hexagon.V6.veqb.xor.128B", - "llvm.hexagon.V6.veqh", - "llvm.hexagon.V6.veqh.128B", - "llvm.hexagon.V6.veqh.and", - "llvm.hexagon.V6.veqh.and.128B", - "llvm.hexagon.V6.veqh.or", - "llvm.hexagon.V6.veqh.or.128B", - "llvm.hexagon.V6.veqh.xor", - "llvm.hexagon.V6.veqh.xor.128B", - "llvm.hexagon.V6.veqw", - "llvm.hexagon.V6.veqw.128B", - "llvm.hexagon.V6.veqw.and", - "llvm.hexagon.V6.veqw.and.128B", - "llvm.hexagon.V6.veqw.or", - "llvm.hexagon.V6.veqw.or.128B", - "llvm.hexagon.V6.veqw.xor", - "llvm.hexagon.V6.veqw.xor.128B", - "llvm.hexagon.V6.vgtb", - "llvm.hexagon.V6.vgtb.128B", - "llvm.hexagon.V6.vgtb.and", - "llvm.hexagon.V6.vgtb.and.128B", - "llvm.hexagon.V6.vgtb.or", - "llvm.hexagon.V6.vgtb.or.128B", - "llvm.hexagon.V6.vgtb.xor", - "llvm.hexagon.V6.vgtb.xor.128B", - "llvm.hexagon.V6.vgth", - "llvm.hexagon.V6.vgth.128B", - "llvm.hexagon.V6.vgth.and", - "llvm.hexagon.V6.vgth.and.128B", - "llvm.hexagon.V6.vgth.or", - "llvm.hexagon.V6.vgth.or.128B", - "llvm.hexagon.V6.vgth.xor", - "llvm.hexagon.V6.vgth.xor.128B", - "llvm.hexagon.V6.vgtub", - "llvm.hexagon.V6.vgtub.128B", - "llvm.hexagon.V6.vgtub.and", - "llvm.hexagon.V6.vgtub.and.128B", - "llvm.hexagon.V6.vgtub.or", - "llvm.hexagon.V6.vgtub.or.128B", - "llvm.hexagon.V6.vgtub.xor", - "llvm.hexagon.V6.vgtub.xor.128B", - "llvm.hexagon.V6.vgtuh", - "llvm.hexagon.V6.vgtuh.128B", - "llvm.hexagon.V6.vgtuh.and", - "llvm.hexagon.V6.vgtuh.and.128B", - "llvm.hexagon.V6.vgtuh.or", - "llvm.hexagon.V6.vgtuh.or.128B", - "llvm.hexagon.V6.vgtuh.xor", - "llvm.hexagon.V6.vgtuh.xor.128B", - "llvm.hexagon.V6.vgtuw", - "llvm.hexagon.V6.vgtuw.128B", - "llvm.hexagon.V6.vgtuw.and", - "llvm.hexagon.V6.vgtuw.and.128B", - "llvm.hexagon.V6.vgtuw.or", - "llvm.hexagon.V6.vgtuw.or.128B", - "llvm.hexagon.V6.vgtuw.xor", - "llvm.hexagon.V6.vgtuw.xor.128B", - "llvm.hexagon.V6.vgtw", - "llvm.hexagon.V6.vgtw.128B", - "llvm.hexagon.V6.vgtw.and", - "llvm.hexagon.V6.vgtw.and.128B", - "llvm.hexagon.V6.vgtw.or", - "llvm.hexagon.V6.vgtw.or.128B", - "llvm.hexagon.V6.vgtw.xor", - "llvm.hexagon.V6.vgtw.xor.128B", - "llvm.hexagon.V6.vinsertwr", - "llvm.hexagon.V6.vinsertwr.128B", - "llvm.hexagon.V6.vlalignb", - "llvm.hexagon.V6.vlalignb.128B", - "llvm.hexagon.V6.vlalignbi", - "llvm.hexagon.V6.vlalignbi.128B", - "llvm.hexagon.V6.vlsrh", - "llvm.hexagon.V6.vlsrh.128B", - "llvm.hexagon.V6.vlsrhv", - "llvm.hexagon.V6.vlsrhv.128B", - "llvm.hexagon.V6.vlsrw", - "llvm.hexagon.V6.vlsrw.128B", - "llvm.hexagon.V6.vlsrwv", - "llvm.hexagon.V6.vlsrwv.128B", - "llvm.hexagon.V6.vlutb", - "llvm.hexagon.V6.vlutb.128B", - "llvm.hexagon.V6.vlutb.acc", - "llvm.hexagon.V6.vlutb.acc.128B", - "llvm.hexagon.V6.vlutb.dv", - "llvm.hexagon.V6.vlutb.dv.128B", - "llvm.hexagon.V6.vlutb.dv.acc", - "llvm.hexagon.V6.vlutb.dv.acc.128B", - "llvm.hexagon.V6.vlutvvb", - "llvm.hexagon.V6.vlutvvb.128B", - "llvm.hexagon.V6.vlutvvb.oracc", - "llvm.hexagon.V6.vlutvvb.oracc.128B", - "llvm.hexagon.V6.vlutvwh", - "llvm.hexagon.V6.vlutvwh.128B", - "llvm.hexagon.V6.vlutvwh.oracc", - "llvm.hexagon.V6.vlutvwh.oracc.128B", - "llvm.hexagon.V6.vmaxh", - "llvm.hexagon.V6.vmaxh.128B", - "llvm.hexagon.V6.vmaxub", - "llvm.hexagon.V6.vmaxub.128B", - "llvm.hexagon.V6.vmaxuh", - "llvm.hexagon.V6.vmaxuh.128B", - "llvm.hexagon.V6.vmaxw", - "llvm.hexagon.V6.vmaxw.128B", - "llvm.hexagon.V6.vminh", - "llvm.hexagon.V6.vminh.128B", - "llvm.hexagon.V6.vminub", - "llvm.hexagon.V6.vminub.128B", - "llvm.hexagon.V6.vminuh", - "llvm.hexagon.V6.vminuh.128B", - "llvm.hexagon.V6.vminw", - "llvm.hexagon.V6.vminw.128B", - "llvm.hexagon.V6.vmpabus", - "llvm.hexagon.V6.vmpabus.128B", - "llvm.hexagon.V6.vmpabus.acc", - "llvm.hexagon.V6.vmpabus.acc.128B", - "llvm.hexagon.V6.vmpabusv", - "llvm.hexagon.V6.vmpabusv.128B", - "llvm.hexagon.V6.vmpabuuv", - "llvm.hexagon.V6.vmpabuuv.128B", - "llvm.hexagon.V6.vmpahb", - "llvm.hexagon.V6.vmpahb.128B", - "llvm.hexagon.V6.vmpahb.acc", - "llvm.hexagon.V6.vmpahb.acc.128B", - "llvm.hexagon.V6.vmpybus", - "llvm.hexagon.V6.vmpybus.128B", - "llvm.hexagon.V6.vmpybus.acc", - "llvm.hexagon.V6.vmpybus.acc.128B", - "llvm.hexagon.V6.vmpybusv", - "llvm.hexagon.V6.vmpybusv.128B", - "llvm.hexagon.V6.vmpybusv.acc", - "llvm.hexagon.V6.vmpybusv.acc.128B", - "llvm.hexagon.V6.vmpybv", - "llvm.hexagon.V6.vmpybv.128B", - "llvm.hexagon.V6.vmpybv.acc", - "llvm.hexagon.V6.vmpybv.acc.128B", - "llvm.hexagon.V6.vmpyewuh", - "llvm.hexagon.V6.vmpyewuh.128B", - "llvm.hexagon.V6.vmpyh", - "llvm.hexagon.V6.vmpyh.128B", - "llvm.hexagon.V6.vmpyhsat.acc", - "llvm.hexagon.V6.vmpyhsat.acc.128B", - "llvm.hexagon.V6.vmpyhsrs", - "llvm.hexagon.V6.vmpyhsrs.128B", - "llvm.hexagon.V6.vmpyhss", - "llvm.hexagon.V6.vmpyhss.128B", - "llvm.hexagon.V6.vmpyhus", - "llvm.hexagon.V6.vmpyhus.128B", - "llvm.hexagon.V6.vmpyhus.acc", - "llvm.hexagon.V6.vmpyhus.acc.128B", - "llvm.hexagon.V6.vmpyhv", - "llvm.hexagon.V6.vmpyhv.128B", - "llvm.hexagon.V6.vmpyhv.acc", - "llvm.hexagon.V6.vmpyhv.acc.128B", - "llvm.hexagon.V6.vmpyhvsrs", - "llvm.hexagon.V6.vmpyhvsrs.128B", - "llvm.hexagon.V6.vmpyieoh", - "llvm.hexagon.V6.vmpyieoh.128B", - "llvm.hexagon.V6.vmpyiewh.acc", - "llvm.hexagon.V6.vmpyiewh.acc.128B", - "llvm.hexagon.V6.vmpyiewuh", - "llvm.hexagon.V6.vmpyiewuh.128B", - "llvm.hexagon.V6.vmpyiewuh.acc", - "llvm.hexagon.V6.vmpyiewuh.acc.128B", - "llvm.hexagon.V6.vmpyih", - "llvm.hexagon.V6.vmpyih.128B", - "llvm.hexagon.V6.vmpyih.acc", - "llvm.hexagon.V6.vmpyih.acc.128B", - "llvm.hexagon.V6.vmpyihb", - "llvm.hexagon.V6.vmpyihb.128B", - "llvm.hexagon.V6.vmpyihb.acc", - "llvm.hexagon.V6.vmpyihb.acc.128B", - "llvm.hexagon.V6.vmpyiowh", - "llvm.hexagon.V6.vmpyiowh.128B", - "llvm.hexagon.V6.vmpyiwb", - "llvm.hexagon.V6.vmpyiwb.128B", - "llvm.hexagon.V6.vmpyiwb.acc", - "llvm.hexagon.V6.vmpyiwb.acc.128B", - "llvm.hexagon.V6.vmpyiwh", - "llvm.hexagon.V6.vmpyiwh.128B", - "llvm.hexagon.V6.vmpyiwh.acc", - "llvm.hexagon.V6.vmpyiwh.acc.128B", - "llvm.hexagon.V6.vmpyowh", - "llvm.hexagon.V6.vmpyowh.128B", - "llvm.hexagon.V6.vmpyowh.rnd", - "llvm.hexagon.V6.vmpyowh.rnd.128B", - "llvm.hexagon.V6.vmpyowh.rnd.sacc", - "llvm.hexagon.V6.vmpyowh.rnd.sacc.128B", - "llvm.hexagon.V6.vmpyowh.sacc", - "llvm.hexagon.V6.vmpyowh.sacc.128B", - "llvm.hexagon.V6.vmpyub", - "llvm.hexagon.V6.vmpyub.128B", - "llvm.hexagon.V6.vmpyub.acc", - "llvm.hexagon.V6.vmpyub.acc.128B", - "llvm.hexagon.V6.vmpyubv", - "llvm.hexagon.V6.vmpyubv.128B", - "llvm.hexagon.V6.vmpyubv.acc", - "llvm.hexagon.V6.vmpyubv.acc.128B", - "llvm.hexagon.V6.vmpyuh", - "llvm.hexagon.V6.vmpyuh.128B", - "llvm.hexagon.V6.vmpyuh.acc", - "llvm.hexagon.V6.vmpyuh.acc.128B", - "llvm.hexagon.V6.vmpyuhv", - "llvm.hexagon.V6.vmpyuhv.128B", - "llvm.hexagon.V6.vmpyuhv.acc", - "llvm.hexagon.V6.vmpyuhv.acc.128B", - "llvm.hexagon.V6.vmux", - "llvm.hexagon.V6.vmux.128B", - "llvm.hexagon.V6.vnavgh", - "llvm.hexagon.V6.vnavgh.128B", - "llvm.hexagon.V6.vnavgub", - "llvm.hexagon.V6.vnavgub.128B", - "llvm.hexagon.V6.vnavgw", - "llvm.hexagon.V6.vnavgw.128B", - "llvm.hexagon.V6.vnormamth", - "llvm.hexagon.V6.vnormamth.128B", - "llvm.hexagon.V6.vnormamtw", - "llvm.hexagon.V6.vnormamtw.128B", - "llvm.hexagon.V6.vnot", - "llvm.hexagon.V6.vnot.128B", - "llvm.hexagon.V6.vor", - "llvm.hexagon.V6.vor.128B", - "llvm.hexagon.V6.vpackeb", - "llvm.hexagon.V6.vpackeb.128B", - "llvm.hexagon.V6.vpackeh", - "llvm.hexagon.V6.vpackeh.128B", - "llvm.hexagon.V6.vpackhb.sat", - "llvm.hexagon.V6.vpackhb.sat.128B", - "llvm.hexagon.V6.vpackhub.sat", - "llvm.hexagon.V6.vpackhub.sat.128B", - "llvm.hexagon.V6.vpackob", - "llvm.hexagon.V6.vpackob.128B", - "llvm.hexagon.V6.vpackoh", - "llvm.hexagon.V6.vpackoh.128B", - "llvm.hexagon.V6.vpackwh.sat", - "llvm.hexagon.V6.vpackwh.sat.128B", - "llvm.hexagon.V6.vpackwuh.sat", - "llvm.hexagon.V6.vpackwuh.sat.128B", - "llvm.hexagon.V6.vpopcounth", - "llvm.hexagon.V6.vpopcounth.128B", - "llvm.hexagon.V6.vrdelta", - "llvm.hexagon.V6.vrdelta.128B", - "llvm.hexagon.V6.vrmpybus", - "llvm.hexagon.V6.vrmpybus.128B", - "llvm.hexagon.V6.vrmpybus.acc", - "llvm.hexagon.V6.vrmpybus.acc.128B", - "llvm.hexagon.V6.vrmpybusi", - "llvm.hexagon.V6.vrmpybusi.128B", - "llvm.hexagon.V6.vrmpybusi.acc", - "llvm.hexagon.V6.vrmpybusi.acc.128B", - "llvm.hexagon.V6.vrmpybusv", - "llvm.hexagon.V6.vrmpybusv.128B", - "llvm.hexagon.V6.vrmpybusv.acc", - "llvm.hexagon.V6.vrmpybusv.acc.128B", - "llvm.hexagon.V6.vrmpybv", - "llvm.hexagon.V6.vrmpybv.128B", - "llvm.hexagon.V6.vrmpybv.acc", - "llvm.hexagon.V6.vrmpybv.acc.128B", - "llvm.hexagon.V6.vrmpyub", - "llvm.hexagon.V6.vrmpyub.128B", - "llvm.hexagon.V6.vrmpyub.acc", - "llvm.hexagon.V6.vrmpyub.acc.128B", - "llvm.hexagon.V6.vrmpyubi", - "llvm.hexagon.V6.vrmpyubi.128B", - "llvm.hexagon.V6.vrmpyubi.acc", - "llvm.hexagon.V6.vrmpyubi.acc.128B", - "llvm.hexagon.V6.vrmpyubv", - "llvm.hexagon.V6.vrmpyubv.128B", - "llvm.hexagon.V6.vrmpyubv.acc", - "llvm.hexagon.V6.vrmpyubv.acc.128B", - "llvm.hexagon.V6.vror", - "llvm.hexagon.V6.vror.128B", - "llvm.hexagon.V6.vroundhb", - "llvm.hexagon.V6.vroundhb.128B", - "llvm.hexagon.V6.vroundhub", - "llvm.hexagon.V6.vroundhub.128B", - "llvm.hexagon.V6.vroundwh", - "llvm.hexagon.V6.vroundwh.128B", - "llvm.hexagon.V6.vroundwuh", - "llvm.hexagon.V6.vroundwuh.128B", - "llvm.hexagon.V6.vrsadubi", - "llvm.hexagon.V6.vrsadubi.128B", - "llvm.hexagon.V6.vrsadubi.acc", - "llvm.hexagon.V6.vrsadubi.acc.128B", - "llvm.hexagon.V6.vsathub", - "llvm.hexagon.V6.vsathub.128B", - "llvm.hexagon.V6.vsatwh", - "llvm.hexagon.V6.vsatwh.128B", - "llvm.hexagon.V6.vsb", - "llvm.hexagon.V6.vsb.128B", - "llvm.hexagon.V6.vsh", - "llvm.hexagon.V6.vsh.128B", - "llvm.hexagon.V6.vshufeh", - "llvm.hexagon.V6.vshufeh.128B", - "llvm.hexagon.V6.vshuffb", - "llvm.hexagon.V6.vshuffb.128B", - "llvm.hexagon.V6.vshuffeb", - "llvm.hexagon.V6.vshuffeb.128B", - "llvm.hexagon.V6.vshuffh", - "llvm.hexagon.V6.vshuffh.128B", - "llvm.hexagon.V6.vshuffob", - "llvm.hexagon.V6.vshuffob.128B", - "llvm.hexagon.V6.vshuffvdd", - "llvm.hexagon.V6.vshuffvdd.128B", - "llvm.hexagon.V6.vshufoeb", - "llvm.hexagon.V6.vshufoeb.128B", - "llvm.hexagon.V6.vshufoeh", - "llvm.hexagon.V6.vshufoeh.128B", - "llvm.hexagon.V6.vshufoh", - "llvm.hexagon.V6.vshufoh.128B", - "llvm.hexagon.V6.vsubb", - "llvm.hexagon.V6.vsubb.128B", - "llvm.hexagon.V6.vsubb.dv", - "llvm.hexagon.V6.vsubb.dv.128B", - "llvm.hexagon.V6.vsubbnq", - "llvm.hexagon.V6.vsubbnq.128B", - "llvm.hexagon.V6.vsubbq", - "llvm.hexagon.V6.vsubbq.128B", - "llvm.hexagon.V6.vsubh", - "llvm.hexagon.V6.vsubh.128B", - "llvm.hexagon.V6.vsubh.dv", - "llvm.hexagon.V6.vsubh.dv.128B", - "llvm.hexagon.V6.vsubhnq", - "llvm.hexagon.V6.vsubhnq.128B", - "llvm.hexagon.V6.vsubhq", - "llvm.hexagon.V6.vsubhq.128B", - "llvm.hexagon.V6.vsubhsat", - "llvm.hexagon.V6.vsubhsat.128B", - "llvm.hexagon.V6.vsubhsat.dv", - "llvm.hexagon.V6.vsubhsat.dv.128B", - "llvm.hexagon.V6.vsubhw", - "llvm.hexagon.V6.vsubhw.128B", - "llvm.hexagon.V6.vsububh", - "llvm.hexagon.V6.vsububh.128B", - "llvm.hexagon.V6.vsububsat", - "llvm.hexagon.V6.vsububsat.128B", - "llvm.hexagon.V6.vsububsat.dv", - "llvm.hexagon.V6.vsububsat.dv.128B", - "llvm.hexagon.V6.vsubuhsat", - "llvm.hexagon.V6.vsubuhsat.128B", - "llvm.hexagon.V6.vsubuhsat.dv", - "llvm.hexagon.V6.vsubuhsat.dv.128B", - "llvm.hexagon.V6.vsubuhw", - "llvm.hexagon.V6.vsubuhw.128B", - "llvm.hexagon.V6.vsubw", - "llvm.hexagon.V6.vsubw.128B", - "llvm.hexagon.V6.vsubw.dv", - "llvm.hexagon.V6.vsubw.dv.128B", - "llvm.hexagon.V6.vsubwnq", - "llvm.hexagon.V6.vsubwnq.128B", - "llvm.hexagon.V6.vsubwq", - "llvm.hexagon.V6.vsubwq.128B", - "llvm.hexagon.V6.vsubwsat", - "llvm.hexagon.V6.vsubwsat.128B", - "llvm.hexagon.V6.vsubwsat.dv", - "llvm.hexagon.V6.vsubwsat.dv.128B", - "llvm.hexagon.V6.vswap", - "llvm.hexagon.V6.vswap.128B", - "llvm.hexagon.V6.vtmpyb", - "llvm.hexagon.V6.vtmpyb.128B", - "llvm.hexagon.V6.vtmpyb.acc", - "llvm.hexagon.V6.vtmpyb.acc.128B", - "llvm.hexagon.V6.vtmpybus", - "llvm.hexagon.V6.vtmpybus.128B", - "llvm.hexagon.V6.vtmpybus.acc", - "llvm.hexagon.V6.vtmpybus.acc.128B", - "llvm.hexagon.V6.vtmpyhb", - "llvm.hexagon.V6.vtmpyhb.128B", - "llvm.hexagon.V6.vtmpyhb.acc", - "llvm.hexagon.V6.vtmpyhb.acc.128B", - "llvm.hexagon.V6.vunpackb", - "llvm.hexagon.V6.vunpackb.128B", - "llvm.hexagon.V6.vunpackh", - "llvm.hexagon.V6.vunpackh.128B", - "llvm.hexagon.V6.vunpackob", - "llvm.hexagon.V6.vunpackob.128B", - "llvm.hexagon.V6.vunpackoh", - "llvm.hexagon.V6.vunpackoh.128B", - "llvm.hexagon.V6.vunpackub", - "llvm.hexagon.V6.vunpackub.128B", - "llvm.hexagon.V6.vunpackuh", - "llvm.hexagon.V6.vunpackuh.128B", - "llvm.hexagon.V6.vxor", - "llvm.hexagon.V6.vxor.128B", - "llvm.hexagon.V6.vzb", - "llvm.hexagon.V6.vzb.128B", - "llvm.hexagon.V6.vzh", - "llvm.hexagon.V6.vzh.128B", - "llvm.hexagon.brev.ldb", - "llvm.hexagon.brev.ldd", - "llvm.hexagon.brev.ldh", - "llvm.hexagon.brev.ldub", - "llvm.hexagon.brev.lduh", - "llvm.hexagon.brev.ldw", - "llvm.hexagon.brev.stb", - "llvm.hexagon.brev.std", - "llvm.hexagon.brev.sth", - "llvm.hexagon.brev.sthhi", - "llvm.hexagon.brev.stw", - "llvm.hexagon.circ.ldb", - "llvm.hexagon.circ.ldd", - "llvm.hexagon.circ.ldh", - "llvm.hexagon.circ.ldub", - "llvm.hexagon.circ.lduh", - "llvm.hexagon.circ.ldw", - "llvm.hexagon.circ.stb", - "llvm.hexagon.circ.std", - "llvm.hexagon.circ.sth", - "llvm.hexagon.circ.sthhi", - "llvm.hexagon.circ.stw", - "llvm.hexagon.mm256i.vaddw", - "llvm.hexagon.prefetch", - "llvm.mips.absq.s.ph", - "llvm.mips.absq.s.qb", - "llvm.mips.absq.s.w", - "llvm.mips.add.a.b", - "llvm.mips.add.a.d", - "llvm.mips.add.a.h", - "llvm.mips.add.a.w", - "llvm.mips.addq.ph", - "llvm.mips.addq.s.ph", - "llvm.mips.addq.s.w", - "llvm.mips.addqh.ph", - "llvm.mips.addqh.r.ph", - "llvm.mips.addqh.r.w", - "llvm.mips.addqh.w", - "llvm.mips.adds.a.b", - "llvm.mips.adds.a.d", - "llvm.mips.adds.a.h", - "llvm.mips.adds.a.w", - "llvm.mips.adds.s.b", - "llvm.mips.adds.s.d", - "llvm.mips.adds.s.h", - "llvm.mips.adds.s.w", - "llvm.mips.adds.u.b", - "llvm.mips.adds.u.d", - "llvm.mips.adds.u.h", - "llvm.mips.adds.u.w", - "llvm.mips.addsc", - "llvm.mips.addu.ph", - "llvm.mips.addu.qb", - "llvm.mips.addu.s.ph", - "llvm.mips.addu.s.qb", - "llvm.mips.adduh.qb", - "llvm.mips.adduh.r.qb", - "llvm.mips.addv.b", - "llvm.mips.addv.d", - "llvm.mips.addv.h", - "llvm.mips.addv.w", - "llvm.mips.addvi.b", - "llvm.mips.addvi.d", - "llvm.mips.addvi.h", - "llvm.mips.addvi.w", - "llvm.mips.addwc", - "llvm.mips.and.v", - "llvm.mips.andi.b", - "llvm.mips.append", - "llvm.mips.asub.s.b", - "llvm.mips.asub.s.d", - "llvm.mips.asub.s.h", - "llvm.mips.asub.s.w", - "llvm.mips.asub.u.b", - "llvm.mips.asub.u.d", - "llvm.mips.asub.u.h", - "llvm.mips.asub.u.w", - "llvm.mips.ave.s.b", - "llvm.mips.ave.s.d", - "llvm.mips.ave.s.h", - "llvm.mips.ave.s.w", - "llvm.mips.ave.u.b", - "llvm.mips.ave.u.d", - "llvm.mips.ave.u.h", - "llvm.mips.ave.u.w", - "llvm.mips.aver.s.b", - "llvm.mips.aver.s.d", - "llvm.mips.aver.s.h", - "llvm.mips.aver.s.w", - "llvm.mips.aver.u.b", - "llvm.mips.aver.u.d", - "llvm.mips.aver.u.h", - "llvm.mips.aver.u.w", - "llvm.mips.balign", - "llvm.mips.bclr.b", - "llvm.mips.bclr.d", - "llvm.mips.bclr.h", - "llvm.mips.bclr.w", - "llvm.mips.bclri.b", - "llvm.mips.bclri.d", - "llvm.mips.bclri.h", - "llvm.mips.bclri.w", - "llvm.mips.binsl.b", - "llvm.mips.binsl.d", - "llvm.mips.binsl.h", - "llvm.mips.binsl.w", - "llvm.mips.binsli.b", - "llvm.mips.binsli.d", - "llvm.mips.binsli.h", - "llvm.mips.binsli.w", - "llvm.mips.binsr.b", - "llvm.mips.binsr.d", - "llvm.mips.binsr.h", - "llvm.mips.binsr.w", - "llvm.mips.binsri.b", - "llvm.mips.binsri.d", - "llvm.mips.binsri.h", - "llvm.mips.binsri.w", - "llvm.mips.bitrev", - "llvm.mips.bmnz.v", - "llvm.mips.bmnzi.b", - "llvm.mips.bmz.v", - "llvm.mips.bmzi.b", - "llvm.mips.bneg.b", - "llvm.mips.bneg.d", - "llvm.mips.bneg.h", - "llvm.mips.bneg.w", - "llvm.mips.bnegi.b", - "llvm.mips.bnegi.d", - "llvm.mips.bnegi.h", - "llvm.mips.bnegi.w", - "llvm.mips.bnz.b", - "llvm.mips.bnz.d", - "llvm.mips.bnz.h", - "llvm.mips.bnz.v", - "llvm.mips.bnz.w", - "llvm.mips.bposge32", - "llvm.mips.bsel.v", - "llvm.mips.bseli.b", - "llvm.mips.bset.b", - "llvm.mips.bset.d", - "llvm.mips.bset.h", - "llvm.mips.bset.w", - "llvm.mips.bseti.b", - "llvm.mips.bseti.d", - "llvm.mips.bseti.h", - "llvm.mips.bseti.w", - "llvm.mips.bz.b", - "llvm.mips.bz.d", - "llvm.mips.bz.h", - "llvm.mips.bz.v", - "llvm.mips.bz.w", - "llvm.mips.ceq.b", - "llvm.mips.ceq.d", - "llvm.mips.ceq.h", - "llvm.mips.ceq.w", - "llvm.mips.ceqi.b", - "llvm.mips.ceqi.d", - "llvm.mips.ceqi.h", - "llvm.mips.ceqi.w", - "llvm.mips.cfcmsa", - "llvm.mips.cle.s.b", - "llvm.mips.cle.s.d", - "llvm.mips.cle.s.h", - "llvm.mips.cle.s.w", - "llvm.mips.cle.u.b", - "llvm.mips.cle.u.d", - "llvm.mips.cle.u.h", - "llvm.mips.cle.u.w", - "llvm.mips.clei.s.b", - "llvm.mips.clei.s.d", - "llvm.mips.clei.s.h", - "llvm.mips.clei.s.w", - "llvm.mips.clei.u.b", - "llvm.mips.clei.u.d", - "llvm.mips.clei.u.h", - "llvm.mips.clei.u.w", - "llvm.mips.clt.s.b", - "llvm.mips.clt.s.d", - "llvm.mips.clt.s.h", - "llvm.mips.clt.s.w", - "llvm.mips.clt.u.b", - "llvm.mips.clt.u.d", - "llvm.mips.clt.u.h", - "llvm.mips.clt.u.w", - "llvm.mips.clti.s.b", - "llvm.mips.clti.s.d", - "llvm.mips.clti.s.h", - "llvm.mips.clti.s.w", - "llvm.mips.clti.u.b", - "llvm.mips.clti.u.d", - "llvm.mips.clti.u.h", - "llvm.mips.clti.u.w", - "llvm.mips.cmp.eq.ph", - "llvm.mips.cmp.le.ph", - "llvm.mips.cmp.lt.ph", - "llvm.mips.cmpgdu.eq.qb", - "llvm.mips.cmpgdu.le.qb", - "llvm.mips.cmpgdu.lt.qb", - "llvm.mips.cmpgu.eq.qb", - "llvm.mips.cmpgu.le.qb", - "llvm.mips.cmpgu.lt.qb", - "llvm.mips.cmpu.eq.qb", - "llvm.mips.cmpu.le.qb", - "llvm.mips.cmpu.lt.qb", - "llvm.mips.copy.s.b", - "llvm.mips.copy.s.d", - "llvm.mips.copy.s.h", - "llvm.mips.copy.s.w", - "llvm.mips.copy.u.b", - "llvm.mips.copy.u.d", - "llvm.mips.copy.u.h", - "llvm.mips.copy.u.w", - "llvm.mips.ctcmsa", - "llvm.mips.div.s.b", - "llvm.mips.div.s.d", - "llvm.mips.div.s.h", - "llvm.mips.div.s.w", - "llvm.mips.div.u.b", - "llvm.mips.div.u.d", - "llvm.mips.div.u.h", - "llvm.mips.div.u.w", - "llvm.mips.dlsa", - "llvm.mips.dotp.s.d", - "llvm.mips.dotp.s.h", - "llvm.mips.dotp.s.w", - "llvm.mips.dotp.u.d", - "llvm.mips.dotp.u.h", - "llvm.mips.dotp.u.w", - "llvm.mips.dpa.w.ph", - "llvm.mips.dpadd.s.d", - "llvm.mips.dpadd.s.h", - "llvm.mips.dpadd.s.w", - "llvm.mips.dpadd.u.d", - "llvm.mips.dpadd.u.h", - "llvm.mips.dpadd.u.w", - "llvm.mips.dpaq.s.w.ph", - "llvm.mips.dpaq.sa.l.w", - "llvm.mips.dpaqx.s.w.ph", - "llvm.mips.dpaqx.sa.w.ph", - "llvm.mips.dpau.h.qbl", - "llvm.mips.dpau.h.qbr", - "llvm.mips.dpax.w.ph", - "llvm.mips.dps.w.ph", - "llvm.mips.dpsq.s.w.ph", - "llvm.mips.dpsq.sa.l.w", - "llvm.mips.dpsqx.s.w.ph", - "llvm.mips.dpsqx.sa.w.ph", - "llvm.mips.dpsu.h.qbl", - "llvm.mips.dpsu.h.qbr", - "llvm.mips.dpsub.s.d", - "llvm.mips.dpsub.s.h", - "llvm.mips.dpsub.s.w", - "llvm.mips.dpsub.u.d", - "llvm.mips.dpsub.u.h", - "llvm.mips.dpsub.u.w", - "llvm.mips.dpsx.w.ph", - "llvm.mips.extp", - "llvm.mips.extpdp", - "llvm.mips.extr.r.w", - "llvm.mips.extr.rs.w", - "llvm.mips.extr.s.h", - "llvm.mips.extr.w", - "llvm.mips.fadd.d", - "llvm.mips.fadd.w", - "llvm.mips.fcaf.d", - "llvm.mips.fcaf.w", - "llvm.mips.fceq.d", - "llvm.mips.fceq.w", - "llvm.mips.fclass.d", - "llvm.mips.fclass.w", - "llvm.mips.fcle.d", - "llvm.mips.fcle.w", - "llvm.mips.fclt.d", - "llvm.mips.fclt.w", - "llvm.mips.fcne.d", - "llvm.mips.fcne.w", - "llvm.mips.fcor.d", - "llvm.mips.fcor.w", - "llvm.mips.fcueq.d", - "llvm.mips.fcueq.w", - "llvm.mips.fcule.d", - "llvm.mips.fcule.w", - "llvm.mips.fcult.d", - "llvm.mips.fcult.w", - "llvm.mips.fcun.d", - "llvm.mips.fcun.w", - "llvm.mips.fcune.d", - "llvm.mips.fcune.w", - "llvm.mips.fdiv.d", - "llvm.mips.fdiv.w", - "llvm.mips.fexdo.h", - "llvm.mips.fexdo.w", - "llvm.mips.fexp2.d", - "llvm.mips.fexp2.w", - "llvm.mips.fexupl.d", - "llvm.mips.fexupl.w", - "llvm.mips.fexupr.d", - "llvm.mips.fexupr.w", - "llvm.mips.ffint.s.d", - "llvm.mips.ffint.s.w", - "llvm.mips.ffint.u.d", - "llvm.mips.ffint.u.w", - "llvm.mips.ffql.d", - "llvm.mips.ffql.w", - "llvm.mips.ffqr.d", - "llvm.mips.ffqr.w", - "llvm.mips.fill.b", - "llvm.mips.fill.d", - "llvm.mips.fill.h", - "llvm.mips.fill.w", - "llvm.mips.flog2.d", - "llvm.mips.flog2.w", - "llvm.mips.fmadd.d", - "llvm.mips.fmadd.w", - "llvm.mips.fmax.a.d", - "llvm.mips.fmax.a.w", - "llvm.mips.fmax.d", - "llvm.mips.fmax.w", - "llvm.mips.fmin.a.d", - "llvm.mips.fmin.a.w", - "llvm.mips.fmin.d", - "llvm.mips.fmin.w", - "llvm.mips.fmsub.d", - "llvm.mips.fmsub.w", - "llvm.mips.fmul.d", - "llvm.mips.fmul.w", - "llvm.mips.frcp.d", - "llvm.mips.frcp.w", - "llvm.mips.frint.d", - "llvm.mips.frint.w", - "llvm.mips.frsqrt.d", - "llvm.mips.frsqrt.w", - "llvm.mips.fsaf.d", - "llvm.mips.fsaf.w", - "llvm.mips.fseq.d", - "llvm.mips.fseq.w", - "llvm.mips.fsle.d", - "llvm.mips.fsle.w", - "llvm.mips.fslt.d", - "llvm.mips.fslt.w", - "llvm.mips.fsne.d", - "llvm.mips.fsne.w", - "llvm.mips.fsor.d", - "llvm.mips.fsor.w", - "llvm.mips.fsqrt.d", - "llvm.mips.fsqrt.w", - "llvm.mips.fsub.d", - "llvm.mips.fsub.w", - "llvm.mips.fsueq.d", - "llvm.mips.fsueq.w", - "llvm.mips.fsule.d", - "llvm.mips.fsule.w", - "llvm.mips.fsult.d", - "llvm.mips.fsult.w", - "llvm.mips.fsun.d", - "llvm.mips.fsun.w", - "llvm.mips.fsune.d", - "llvm.mips.fsune.w", - "llvm.mips.ftint.s.d", - "llvm.mips.ftint.s.w", - "llvm.mips.ftint.u.d", - "llvm.mips.ftint.u.w", - "llvm.mips.ftq.h", - "llvm.mips.ftq.w", - "llvm.mips.ftrunc.s.d", - "llvm.mips.ftrunc.s.w", - "llvm.mips.ftrunc.u.d", - "llvm.mips.ftrunc.u.w", - "llvm.mips.hadd.s.d", - "llvm.mips.hadd.s.h", - "llvm.mips.hadd.s.w", - "llvm.mips.hadd.u.d", - "llvm.mips.hadd.u.h", - "llvm.mips.hadd.u.w", - "llvm.mips.hsub.s.d", - "llvm.mips.hsub.s.h", - "llvm.mips.hsub.s.w", - "llvm.mips.hsub.u.d", - "llvm.mips.hsub.u.h", - "llvm.mips.hsub.u.w", - "llvm.mips.ilvev.b", - "llvm.mips.ilvev.d", - "llvm.mips.ilvev.h", - "llvm.mips.ilvev.w", - "llvm.mips.ilvl.b", - "llvm.mips.ilvl.d", - "llvm.mips.ilvl.h", - "llvm.mips.ilvl.w", - "llvm.mips.ilvod.b", - "llvm.mips.ilvod.d", - "llvm.mips.ilvod.h", - "llvm.mips.ilvod.w", - "llvm.mips.ilvr.b", - "llvm.mips.ilvr.d", - "llvm.mips.ilvr.h", - "llvm.mips.ilvr.w", - "llvm.mips.insert.b", - "llvm.mips.insert.d", - "llvm.mips.insert.h", - "llvm.mips.insert.w", - "llvm.mips.insv", - "llvm.mips.insve.b", - "llvm.mips.insve.d", - "llvm.mips.insve.h", - "llvm.mips.insve.w", - "llvm.mips.lbux", - "llvm.mips.ld.b", - "llvm.mips.ld.d", - "llvm.mips.ld.h", - "llvm.mips.ld.w", - "llvm.mips.ldi.b", - "llvm.mips.ldi.d", - "llvm.mips.ldi.h", - "llvm.mips.ldi.w", - "llvm.mips.lhx", - "llvm.mips.lsa", - "llvm.mips.lwx", - "llvm.mips.madd", - "llvm.mips.madd.q.h", - "llvm.mips.madd.q.w", - "llvm.mips.maddr.q.h", - "llvm.mips.maddr.q.w", - "llvm.mips.maddu", - "llvm.mips.maddv.b", - "llvm.mips.maddv.d", - "llvm.mips.maddv.h", - "llvm.mips.maddv.w", - "llvm.mips.maq.s.w.phl", - "llvm.mips.maq.s.w.phr", - "llvm.mips.maq.sa.w.phl", - "llvm.mips.maq.sa.w.phr", - "llvm.mips.max.a.b", - "llvm.mips.max.a.d", - "llvm.mips.max.a.h", - "llvm.mips.max.a.w", - "llvm.mips.max.s.b", - "llvm.mips.max.s.d", - "llvm.mips.max.s.h", - "llvm.mips.max.s.w", - "llvm.mips.max.u.b", - "llvm.mips.max.u.d", - "llvm.mips.max.u.h", - "llvm.mips.max.u.w", - "llvm.mips.maxi.s.b", - "llvm.mips.maxi.s.d", - "llvm.mips.maxi.s.h", - "llvm.mips.maxi.s.w", - "llvm.mips.maxi.u.b", - "llvm.mips.maxi.u.d", - "llvm.mips.maxi.u.h", - "llvm.mips.maxi.u.w", - "llvm.mips.min.a.b", - "llvm.mips.min.a.d", - "llvm.mips.min.a.h", - "llvm.mips.min.a.w", - "llvm.mips.min.s.b", - "llvm.mips.min.s.d", - "llvm.mips.min.s.h", - "llvm.mips.min.s.w", - "llvm.mips.min.u.b", - "llvm.mips.min.u.d", - "llvm.mips.min.u.h", - "llvm.mips.min.u.w", - "llvm.mips.mini.s.b", - "llvm.mips.mini.s.d", - "llvm.mips.mini.s.h", - "llvm.mips.mini.s.w", - "llvm.mips.mini.u.b", - "llvm.mips.mini.u.d", - "llvm.mips.mini.u.h", - "llvm.mips.mini.u.w", - "llvm.mips.mod.s.b", - "llvm.mips.mod.s.d", - "llvm.mips.mod.s.h", - "llvm.mips.mod.s.w", - "llvm.mips.mod.u.b", - "llvm.mips.mod.u.d", - "llvm.mips.mod.u.h", - "llvm.mips.mod.u.w", - "llvm.mips.modsub", - "llvm.mips.move.v", - "llvm.mips.msub", - "llvm.mips.msub.q.h", - "llvm.mips.msub.q.w", - "llvm.mips.msubr.q.h", - "llvm.mips.msubr.q.w", - "llvm.mips.msubu", - "llvm.mips.msubv.b", - "llvm.mips.msubv.d", - "llvm.mips.msubv.h", - "llvm.mips.msubv.w", - "llvm.mips.mthlip", - "llvm.mips.mul.ph", - "llvm.mips.mul.q.h", - "llvm.mips.mul.q.w", - "llvm.mips.mul.s.ph", - "llvm.mips.muleq.s.w.phl", - "llvm.mips.muleq.s.w.phr", - "llvm.mips.muleu.s.ph.qbl", - "llvm.mips.muleu.s.ph.qbr", - "llvm.mips.mulq.rs.ph", - "llvm.mips.mulq.rs.w", - "llvm.mips.mulq.s.ph", - "llvm.mips.mulq.s.w", - "llvm.mips.mulr.q.h", - "llvm.mips.mulr.q.w", - "llvm.mips.mulsa.w.ph", - "llvm.mips.mulsaq.s.w.ph", - "llvm.mips.mult", - "llvm.mips.multu", - "llvm.mips.mulv.b", - "llvm.mips.mulv.d", - "llvm.mips.mulv.h", - "llvm.mips.mulv.w", - "llvm.mips.nloc.b", - "llvm.mips.nloc.d", - "llvm.mips.nloc.h", - "llvm.mips.nloc.w", - "llvm.mips.nlzc.b", - "llvm.mips.nlzc.d", - "llvm.mips.nlzc.h", - "llvm.mips.nlzc.w", - "llvm.mips.nor.v", - "llvm.mips.nori.b", - "llvm.mips.or.v", - "llvm.mips.ori.b", - "llvm.mips.packrl.ph", - "llvm.mips.pckev.b", - "llvm.mips.pckev.d", - "llvm.mips.pckev.h", - "llvm.mips.pckev.w", - "llvm.mips.pckod.b", - "llvm.mips.pckod.d", - "llvm.mips.pckod.h", - "llvm.mips.pckod.w", - "llvm.mips.pcnt.b", - "llvm.mips.pcnt.d", - "llvm.mips.pcnt.h", - "llvm.mips.pcnt.w", - "llvm.mips.pick.ph", - "llvm.mips.pick.qb", - "llvm.mips.preceq.w.phl", - "llvm.mips.preceq.w.phr", - "llvm.mips.precequ.ph.qbl", - "llvm.mips.precequ.ph.qbla", - "llvm.mips.precequ.ph.qbr", - "llvm.mips.precequ.ph.qbra", - "llvm.mips.preceu.ph.qbl", - "llvm.mips.preceu.ph.qbla", - "llvm.mips.preceu.ph.qbr", - "llvm.mips.preceu.ph.qbra", - "llvm.mips.precr.qb.ph", - "llvm.mips.precr.sra.ph.w", - "llvm.mips.precr.sra.r.ph.w", - "llvm.mips.precrq.ph.w", - "llvm.mips.precrq.qb.ph", - "llvm.mips.precrq.rs.ph.w", - "llvm.mips.precrqu.s.qb.ph", - "llvm.mips.prepend", - "llvm.mips.raddu.w.qb", - "llvm.mips.rddsp", - "llvm.mips.repl.ph", - "llvm.mips.repl.qb", - "llvm.mips.sat.s.b", - "llvm.mips.sat.s.d", - "llvm.mips.sat.s.h", - "llvm.mips.sat.s.w", - "llvm.mips.sat.u.b", - "llvm.mips.sat.u.d", - "llvm.mips.sat.u.h", - "llvm.mips.sat.u.w", - "llvm.mips.shf.b", - "llvm.mips.shf.h", - "llvm.mips.shf.w", - "llvm.mips.shilo", - "llvm.mips.shll.ph", - "llvm.mips.shll.qb", - "llvm.mips.shll.s.ph", - "llvm.mips.shll.s.w", - "llvm.mips.shra.ph", - "llvm.mips.shra.qb", - "llvm.mips.shra.r.ph", - "llvm.mips.shra.r.qb", - "llvm.mips.shra.r.w", - "llvm.mips.shrl.ph", - "llvm.mips.shrl.qb", - "llvm.mips.sld.b", - "llvm.mips.sld.d", - "llvm.mips.sld.h", - "llvm.mips.sld.w", - "llvm.mips.sldi.b", - "llvm.mips.sldi.d", - "llvm.mips.sldi.h", - "llvm.mips.sldi.w", - "llvm.mips.sll.b", - "llvm.mips.sll.d", - "llvm.mips.sll.h", - "llvm.mips.sll.w", - "llvm.mips.slli.b", - "llvm.mips.slli.d", - "llvm.mips.slli.h", - "llvm.mips.slli.w", - "llvm.mips.splat.b", - "llvm.mips.splat.d", - "llvm.mips.splat.h", - "llvm.mips.splat.w", - "llvm.mips.splati.b", - "llvm.mips.splati.d", - "llvm.mips.splati.h", - "llvm.mips.splati.w", - "llvm.mips.sra.b", - "llvm.mips.sra.d", - "llvm.mips.sra.h", - "llvm.mips.sra.w", - "llvm.mips.srai.b", - "llvm.mips.srai.d", - "llvm.mips.srai.h", - "llvm.mips.srai.w", - "llvm.mips.srar.b", - "llvm.mips.srar.d", - "llvm.mips.srar.h", - "llvm.mips.srar.w", - "llvm.mips.srari.b", - "llvm.mips.srari.d", - "llvm.mips.srari.h", - "llvm.mips.srari.w", - "llvm.mips.srl.b", - "llvm.mips.srl.d", - "llvm.mips.srl.h", - "llvm.mips.srl.w", - "llvm.mips.srli.b", - "llvm.mips.srli.d", - "llvm.mips.srli.h", - "llvm.mips.srli.w", - "llvm.mips.srlr.b", - "llvm.mips.srlr.d", - "llvm.mips.srlr.h", - "llvm.mips.srlr.w", - "llvm.mips.srlri.b", - "llvm.mips.srlri.d", - "llvm.mips.srlri.h", - "llvm.mips.srlri.w", - "llvm.mips.st.b", - "llvm.mips.st.d", - "llvm.mips.st.h", - "llvm.mips.st.w", - "llvm.mips.subq.ph", - "llvm.mips.subq.s.ph", - "llvm.mips.subq.s.w", - "llvm.mips.subqh.ph", - "llvm.mips.subqh.r.ph", - "llvm.mips.subqh.r.w", - "llvm.mips.subqh.w", - "llvm.mips.subs.s.b", - "llvm.mips.subs.s.d", - "llvm.mips.subs.s.h", - "llvm.mips.subs.s.w", - "llvm.mips.subs.u.b", - "llvm.mips.subs.u.d", - "llvm.mips.subs.u.h", - "llvm.mips.subs.u.w", - "llvm.mips.subsus.u.b", - "llvm.mips.subsus.u.d", - "llvm.mips.subsus.u.h", - "llvm.mips.subsus.u.w", - "llvm.mips.subsuu.s.b", - "llvm.mips.subsuu.s.d", - "llvm.mips.subsuu.s.h", - "llvm.mips.subsuu.s.w", - "llvm.mips.subu.ph", - "llvm.mips.subu.qb", - "llvm.mips.subu.s.ph", - "llvm.mips.subu.s.qb", - "llvm.mips.subuh.qb", - "llvm.mips.subuh.r.qb", - "llvm.mips.subv.b", - "llvm.mips.subv.d", - "llvm.mips.subv.h", - "llvm.mips.subv.w", - "llvm.mips.subvi.b", - "llvm.mips.subvi.d", - "llvm.mips.subvi.h", - "llvm.mips.subvi.w", - "llvm.mips.vshf.b", - "llvm.mips.vshf.d", - "llvm.mips.vshf.h", - "llvm.mips.vshf.w", - "llvm.mips.wrdsp", - "llvm.mips.xor.v", - "llvm.mips.xori.b", - "llvm.nvvm.abs.i", - "llvm.nvvm.abs.ll", - "llvm.nvvm.add.rm.d", - "llvm.nvvm.add.rm.f", - "llvm.nvvm.add.rm.ftz.f", - "llvm.nvvm.add.rn.d", - "llvm.nvvm.add.rn.f", - "llvm.nvvm.add.rn.ftz.f", - "llvm.nvvm.add.rp.d", - "llvm.nvvm.add.rp.f", - "llvm.nvvm.add.rp.ftz.f", - "llvm.nvvm.add.rz.d", - "llvm.nvvm.add.rz.f", - "llvm.nvvm.add.rz.ftz.f", - "llvm.nvvm.atomic.load.add.f32", - "llvm.nvvm.atomic.load.dec.32", - "llvm.nvvm.atomic.load.inc.32", - "llvm.nvvm.bar.sync", - "llvm.nvvm.barrier0", - "llvm.nvvm.barrier0.and", - "llvm.nvvm.barrier0.or", - "llvm.nvvm.barrier0.popc", - "llvm.nvvm.bitcast.d2ll", - "llvm.nvvm.bitcast.f2i", - "llvm.nvvm.bitcast.i2f", - "llvm.nvvm.bitcast.ll2d", - "llvm.nvvm.brev32", - "llvm.nvvm.brev64", - "llvm.nvvm.ceil.d", - "llvm.nvvm.ceil.f", - "llvm.nvvm.ceil.ftz.f", - "llvm.nvvm.clz.i", - "llvm.nvvm.clz.ll", - "llvm.nvvm.compiler.error", - "llvm.nvvm.compiler.warn", - "llvm.nvvm.cos.approx.f", - "llvm.nvvm.cos.approx.ftz.f", - "llvm.nvvm.d2f.rm", - "llvm.nvvm.d2f.rm.ftz", - "llvm.nvvm.d2f.rn", - "llvm.nvvm.d2f.rn.ftz", - "llvm.nvvm.d2f.rp", - "llvm.nvvm.d2f.rp.ftz", - "llvm.nvvm.d2f.rz", - "llvm.nvvm.d2f.rz.ftz", - "llvm.nvvm.d2i.hi", - "llvm.nvvm.d2i.lo", - "llvm.nvvm.d2i.rm", - "llvm.nvvm.d2i.rn", - "llvm.nvvm.d2i.rp", - "llvm.nvvm.d2i.rz", - "llvm.nvvm.d2ll.rm", - "llvm.nvvm.d2ll.rn", - "llvm.nvvm.d2ll.rp", - "llvm.nvvm.d2ll.rz", - "llvm.nvvm.d2ui.rm", - "llvm.nvvm.d2ui.rn", - "llvm.nvvm.d2ui.rp", - "llvm.nvvm.d2ui.rz", - "llvm.nvvm.d2ull.rm", - "llvm.nvvm.d2ull.rn", - "llvm.nvvm.d2ull.rp", - "llvm.nvvm.d2ull.rz", - "llvm.nvvm.div.approx.f", - "llvm.nvvm.div.approx.ftz.f", - "llvm.nvvm.div.rm.d", - "llvm.nvvm.div.rm.f", - "llvm.nvvm.div.rm.ftz.f", - "llvm.nvvm.div.rn.d", - "llvm.nvvm.div.rn.f", - "llvm.nvvm.div.rn.ftz.f", - "llvm.nvvm.div.rp.d", - "llvm.nvvm.div.rp.f", - "llvm.nvvm.div.rp.ftz.f", - "llvm.nvvm.div.rz.d", - "llvm.nvvm.div.rz.f", - "llvm.nvvm.div.rz.ftz.f", - "llvm.nvvm.ex2.approx.d", - "llvm.nvvm.ex2.approx.f", - "llvm.nvvm.ex2.approx.ftz.f", - "llvm.nvvm.f2h.rn", - "llvm.nvvm.f2h.rn.ftz", - "llvm.nvvm.f2i.rm", - "llvm.nvvm.f2i.rm.ftz", - "llvm.nvvm.f2i.rn", - "llvm.nvvm.f2i.rn.ftz", - "llvm.nvvm.f2i.rp", - "llvm.nvvm.f2i.rp.ftz", - "llvm.nvvm.f2i.rz", - "llvm.nvvm.f2i.rz.ftz", - "llvm.nvvm.f2ll.rm", - "llvm.nvvm.f2ll.rm.ftz", - "llvm.nvvm.f2ll.rn", - "llvm.nvvm.f2ll.rn.ftz", - "llvm.nvvm.f2ll.rp", - "llvm.nvvm.f2ll.rp.ftz", - "llvm.nvvm.f2ll.rz", - "llvm.nvvm.f2ll.rz.ftz", - "llvm.nvvm.f2ui.rm", - "llvm.nvvm.f2ui.rm.ftz", - "llvm.nvvm.f2ui.rn", - "llvm.nvvm.f2ui.rn.ftz", - "llvm.nvvm.f2ui.rp", - "llvm.nvvm.f2ui.rp.ftz", - "llvm.nvvm.f2ui.rz", - "llvm.nvvm.f2ui.rz.ftz", - "llvm.nvvm.f2ull.rm", - "llvm.nvvm.f2ull.rm.ftz", - "llvm.nvvm.f2ull.rn", - "llvm.nvvm.f2ull.rn.ftz", - "llvm.nvvm.f2ull.rp", - "llvm.nvvm.f2ull.rp.ftz", - "llvm.nvvm.f2ull.rz", - "llvm.nvvm.f2ull.rz.ftz", - "llvm.nvvm.fabs.d", - "llvm.nvvm.fabs.f", - "llvm.nvvm.fabs.ftz.f", - "llvm.nvvm.floor.d", - "llvm.nvvm.floor.f", - "llvm.nvvm.floor.ftz.f", - "llvm.nvvm.fma.rm.d", - "llvm.nvvm.fma.rm.f", - "llvm.nvvm.fma.rm.ftz.f", - "llvm.nvvm.fma.rn.d", - "llvm.nvvm.fma.rn.f", - "llvm.nvvm.fma.rn.ftz.f", - "llvm.nvvm.fma.rp.d", - "llvm.nvvm.fma.rp.f", - "llvm.nvvm.fma.rp.ftz.f", - "llvm.nvvm.fma.rz.d", - "llvm.nvvm.fma.rz.f", - "llvm.nvvm.fma.rz.ftz.f", - "llvm.nvvm.fmax.d", - "llvm.nvvm.fmax.f", - "llvm.nvvm.fmax.ftz.f", - "llvm.nvvm.fmin.d", - "llvm.nvvm.fmin.f", - "llvm.nvvm.fmin.ftz.f", - "llvm.nvvm.h2f", - "llvm.nvvm.i2d.rm", - "llvm.nvvm.i2d.rn", - "llvm.nvvm.i2d.rp", - "llvm.nvvm.i2d.rz", - "llvm.nvvm.i2f.rm", - "llvm.nvvm.i2f.rn", - "llvm.nvvm.i2f.rp", - "llvm.nvvm.i2f.rz", - "llvm.nvvm.isspacep.const", - "llvm.nvvm.isspacep.global", - "llvm.nvvm.isspacep.local", - "llvm.nvvm.isspacep.shared", - "llvm.nvvm.istypep.sampler", - "llvm.nvvm.istypep.surface", - "llvm.nvvm.istypep.texture", - "llvm.nvvm.ldg.global.f", - "llvm.nvvm.ldg.global.i", - "llvm.nvvm.ldg.global.p", - "llvm.nvvm.ldu.global.f", - "llvm.nvvm.ldu.global.i", - "llvm.nvvm.ldu.global.p", - "llvm.nvvm.lg2.approx.d", - "llvm.nvvm.lg2.approx.f", - "llvm.nvvm.lg2.approx.ftz.f", - "llvm.nvvm.ll2d.rm", - "llvm.nvvm.ll2d.rn", - "llvm.nvvm.ll2d.rp", - "llvm.nvvm.ll2d.rz", - "llvm.nvvm.ll2f.rm", - "llvm.nvvm.ll2f.rn", - "llvm.nvvm.ll2f.rp", - "llvm.nvvm.ll2f.rz", - "llvm.nvvm.lohi.i2d", - "llvm.nvvm.max.i", - "llvm.nvvm.max.ll", - "llvm.nvvm.max.ui", - "llvm.nvvm.max.ull", - "llvm.nvvm.membar.cta", - "llvm.nvvm.membar.gl", - "llvm.nvvm.membar.sys", - "llvm.nvvm.min.i", - "llvm.nvvm.min.ll", - "llvm.nvvm.min.ui", - "llvm.nvvm.min.ull", - "llvm.nvvm.move.double", - "llvm.nvvm.move.float", - "llvm.nvvm.move.i16", - "llvm.nvvm.move.i32", - "llvm.nvvm.move.i64", - "llvm.nvvm.move.ptr", - "llvm.nvvm.mul.rm.d", - "llvm.nvvm.mul.rm.f", - "llvm.nvvm.mul.rm.ftz.f", - "llvm.nvvm.mul.rn.d", - "llvm.nvvm.mul.rn.f", - "llvm.nvvm.mul.rn.ftz.f", - "llvm.nvvm.mul.rp.d", - "llvm.nvvm.mul.rp.f", - "llvm.nvvm.mul.rp.ftz.f", - "llvm.nvvm.mul.rz.d", - "llvm.nvvm.mul.rz.f", - "llvm.nvvm.mul.rz.ftz.f", - "llvm.nvvm.mul24.i", - "llvm.nvvm.mul24.ui", - "llvm.nvvm.mulhi.i", - "llvm.nvvm.mulhi.ll", - "llvm.nvvm.mulhi.ui", - "llvm.nvvm.mulhi.ull", - "llvm.nvvm.popc.i", - "llvm.nvvm.popc.ll", - "llvm.nvvm.prmt", - "llvm.nvvm.ptr.constant.to.gen", - "llvm.nvvm.ptr.gen.to.constant", - "llvm.nvvm.ptr.gen.to.global", - "llvm.nvvm.ptr.gen.to.local", - "llvm.nvvm.ptr.gen.to.param", - "llvm.nvvm.ptr.gen.to.shared", - "llvm.nvvm.ptr.global.to.gen", - "llvm.nvvm.ptr.local.to.gen", - "llvm.nvvm.ptr.shared.to.gen", - "llvm.nvvm.rcp.approx.ftz.d", - "llvm.nvvm.rcp.rm.d", - "llvm.nvvm.rcp.rm.f", - "llvm.nvvm.rcp.rm.ftz.f", - "llvm.nvvm.rcp.rn.d", - "llvm.nvvm.rcp.rn.f", - "llvm.nvvm.rcp.rn.ftz.f", - "llvm.nvvm.rcp.rp.d", - "llvm.nvvm.rcp.rp.f", - "llvm.nvvm.rcp.rp.ftz.f", - "llvm.nvvm.rcp.rz.d", - "llvm.nvvm.rcp.rz.f", - "llvm.nvvm.rcp.rz.ftz.f", - "llvm.nvvm.read.ptx.sreg.clock", - "llvm.nvvm.read.ptx.sreg.clock64", - "llvm.nvvm.read.ptx.sreg.ctaid.w", - "llvm.nvvm.read.ptx.sreg.ctaid.x", - "llvm.nvvm.read.ptx.sreg.ctaid.y", - "llvm.nvvm.read.ptx.sreg.ctaid.z", - "llvm.nvvm.read.ptx.sreg.envreg0", - "llvm.nvvm.read.ptx.sreg.envreg1", - "llvm.nvvm.read.ptx.sreg.envreg10", - "llvm.nvvm.read.ptx.sreg.envreg11", - "llvm.nvvm.read.ptx.sreg.envreg12", - "llvm.nvvm.read.ptx.sreg.envreg13", - "llvm.nvvm.read.ptx.sreg.envreg14", - "llvm.nvvm.read.ptx.sreg.envreg15", - "llvm.nvvm.read.ptx.sreg.envreg16", - "llvm.nvvm.read.ptx.sreg.envreg17", - "llvm.nvvm.read.ptx.sreg.envreg18", - "llvm.nvvm.read.ptx.sreg.envreg19", - "llvm.nvvm.read.ptx.sreg.envreg2", - "llvm.nvvm.read.ptx.sreg.envreg20", - "llvm.nvvm.read.ptx.sreg.envreg21", - "llvm.nvvm.read.ptx.sreg.envreg22", - "llvm.nvvm.read.ptx.sreg.envreg23", - "llvm.nvvm.read.ptx.sreg.envreg24", - "llvm.nvvm.read.ptx.sreg.envreg25", - "llvm.nvvm.read.ptx.sreg.envreg26", - "llvm.nvvm.read.ptx.sreg.envreg27", - "llvm.nvvm.read.ptx.sreg.envreg28", - "llvm.nvvm.read.ptx.sreg.envreg29", - "llvm.nvvm.read.ptx.sreg.envreg3", - "llvm.nvvm.read.ptx.sreg.envreg30", - "llvm.nvvm.read.ptx.sreg.envreg31", - "llvm.nvvm.read.ptx.sreg.envreg4", - "llvm.nvvm.read.ptx.sreg.envreg5", - "llvm.nvvm.read.ptx.sreg.envreg6", - "llvm.nvvm.read.ptx.sreg.envreg7", - "llvm.nvvm.read.ptx.sreg.envreg8", - "llvm.nvvm.read.ptx.sreg.envreg9", - "llvm.nvvm.read.ptx.sreg.gridid", - "llvm.nvvm.read.ptx.sreg.laneid", - "llvm.nvvm.read.ptx.sreg.lanemask.eq", - "llvm.nvvm.read.ptx.sreg.lanemask.ge", - "llvm.nvvm.read.ptx.sreg.lanemask.gt", - "llvm.nvvm.read.ptx.sreg.lanemask.le", - "llvm.nvvm.read.ptx.sreg.lanemask.lt", - "llvm.nvvm.read.ptx.sreg.nctaid.w", - "llvm.nvvm.read.ptx.sreg.nctaid.x", - "llvm.nvvm.read.ptx.sreg.nctaid.y", - "llvm.nvvm.read.ptx.sreg.nctaid.z", - "llvm.nvvm.read.ptx.sreg.nsmid", - "llvm.nvvm.read.ptx.sreg.ntid.w", - "llvm.nvvm.read.ptx.sreg.ntid.x", - "llvm.nvvm.read.ptx.sreg.ntid.y", - "llvm.nvvm.read.ptx.sreg.ntid.z", - "llvm.nvvm.read.ptx.sreg.nwarpid", - "llvm.nvvm.read.ptx.sreg.pm0", - "llvm.nvvm.read.ptx.sreg.pm1", - "llvm.nvvm.read.ptx.sreg.pm2", - "llvm.nvvm.read.ptx.sreg.pm3", - "llvm.nvvm.read.ptx.sreg.smid", - "llvm.nvvm.read.ptx.sreg.tid.w", - "llvm.nvvm.read.ptx.sreg.tid.x", - "llvm.nvvm.read.ptx.sreg.tid.y", - "llvm.nvvm.read.ptx.sreg.tid.z", - "llvm.nvvm.read.ptx.sreg.warpid", - "llvm.nvvm.read.ptx.sreg.warpsize", - "llvm.nvvm.reflect", - "llvm.nvvm.rotate.b32", - "llvm.nvvm.rotate.b64", - "llvm.nvvm.rotate.right.b64", - "llvm.nvvm.round.d", - "llvm.nvvm.round.f", - "llvm.nvvm.round.ftz.f", - "llvm.nvvm.rsqrt.approx.d", - "llvm.nvvm.rsqrt.approx.f", - "llvm.nvvm.rsqrt.approx.ftz.f", - "llvm.nvvm.sad.i", - "llvm.nvvm.sad.ui", - "llvm.nvvm.saturate.d", - "llvm.nvvm.saturate.f", - "llvm.nvvm.saturate.ftz.f", - "llvm.nvvm.shfl.bfly.f32", - "llvm.nvvm.shfl.bfly.i32", - "llvm.nvvm.shfl.down.f32", - "llvm.nvvm.shfl.down.i32", - "llvm.nvvm.shfl.idx.f32", - "llvm.nvvm.shfl.idx.i32", - "llvm.nvvm.shfl.up.f32", - "llvm.nvvm.shfl.up.i32", - "llvm.nvvm.sin.approx.f", - "llvm.nvvm.sin.approx.ftz.f", - "llvm.nvvm.sqrt.approx.f", - "llvm.nvvm.sqrt.approx.ftz.f", - "llvm.nvvm.sqrt.f", - "llvm.nvvm.sqrt.rm.d", - "llvm.nvvm.sqrt.rm.f", - "llvm.nvvm.sqrt.rm.ftz.f", - "llvm.nvvm.sqrt.rn.d", - "llvm.nvvm.sqrt.rn.f", - "llvm.nvvm.sqrt.rn.ftz.f", - "llvm.nvvm.sqrt.rp.d", - "llvm.nvvm.sqrt.rp.f", - "llvm.nvvm.sqrt.rp.ftz.f", - "llvm.nvvm.sqrt.rz.d", - "llvm.nvvm.sqrt.rz.f", - "llvm.nvvm.sqrt.rz.ftz.f", - "llvm.nvvm.suld.1d.array.i16.clamp", - "llvm.nvvm.suld.1d.array.i16.trap", - "llvm.nvvm.suld.1d.array.i16.zero", - "llvm.nvvm.suld.1d.array.i32.clamp", - "llvm.nvvm.suld.1d.array.i32.trap", - "llvm.nvvm.suld.1d.array.i32.zero", - "llvm.nvvm.suld.1d.array.i64.clamp", - "llvm.nvvm.suld.1d.array.i64.trap", - "llvm.nvvm.suld.1d.array.i64.zero", - "llvm.nvvm.suld.1d.array.i8.clamp", - "llvm.nvvm.suld.1d.array.i8.trap", - "llvm.nvvm.suld.1d.array.i8.zero", - "llvm.nvvm.suld.1d.array.v2i16.clamp", - "llvm.nvvm.suld.1d.array.v2i16.trap", - "llvm.nvvm.suld.1d.array.v2i16.zero", - "llvm.nvvm.suld.1d.array.v2i32.clamp", - "llvm.nvvm.suld.1d.array.v2i32.trap", - "llvm.nvvm.suld.1d.array.v2i32.zero", - "llvm.nvvm.suld.1d.array.v2i64.clamp", - "llvm.nvvm.suld.1d.array.v2i64.trap", - "llvm.nvvm.suld.1d.array.v2i64.zero", - "llvm.nvvm.suld.1d.array.v2i8.clamp", - "llvm.nvvm.suld.1d.array.v2i8.trap", - "llvm.nvvm.suld.1d.array.v2i8.zero", - "llvm.nvvm.suld.1d.array.v4i16.clamp", - "llvm.nvvm.suld.1d.array.v4i16.trap", - "llvm.nvvm.suld.1d.array.v4i16.zero", - "llvm.nvvm.suld.1d.array.v4i32.clamp", - "llvm.nvvm.suld.1d.array.v4i32.trap", - "llvm.nvvm.suld.1d.array.v4i32.zero", - "llvm.nvvm.suld.1d.array.v4i8.clamp", - "llvm.nvvm.suld.1d.array.v4i8.trap", - "llvm.nvvm.suld.1d.array.v4i8.zero", - "llvm.nvvm.suld.1d.i16.clamp", - "llvm.nvvm.suld.1d.i16.trap", - "llvm.nvvm.suld.1d.i16.zero", - "llvm.nvvm.suld.1d.i32.clamp", - "llvm.nvvm.suld.1d.i32.trap", - "llvm.nvvm.suld.1d.i32.zero", - "llvm.nvvm.suld.1d.i64.clamp", - "llvm.nvvm.suld.1d.i64.trap", - "llvm.nvvm.suld.1d.i64.zero", - "llvm.nvvm.suld.1d.i8.clamp", - "llvm.nvvm.suld.1d.i8.trap", - "llvm.nvvm.suld.1d.i8.zero", - "llvm.nvvm.suld.1d.v2i16.clamp", - "llvm.nvvm.suld.1d.v2i16.trap", - "llvm.nvvm.suld.1d.v2i16.zero", - "llvm.nvvm.suld.1d.v2i32.clamp", - "llvm.nvvm.suld.1d.v2i32.trap", - "llvm.nvvm.suld.1d.v2i32.zero", - "llvm.nvvm.suld.1d.v2i64.clamp", - "llvm.nvvm.suld.1d.v2i64.trap", - "llvm.nvvm.suld.1d.v2i64.zero", - "llvm.nvvm.suld.1d.v2i8.clamp", - "llvm.nvvm.suld.1d.v2i8.trap", - "llvm.nvvm.suld.1d.v2i8.zero", - "llvm.nvvm.suld.1d.v4i16.clamp", - "llvm.nvvm.suld.1d.v4i16.trap", - "llvm.nvvm.suld.1d.v4i16.zero", - "llvm.nvvm.suld.1d.v4i32.clamp", - "llvm.nvvm.suld.1d.v4i32.trap", - "llvm.nvvm.suld.1d.v4i32.zero", - "llvm.nvvm.suld.1d.v4i8.clamp", - "llvm.nvvm.suld.1d.v4i8.trap", - "llvm.nvvm.suld.1d.v4i8.zero", - "llvm.nvvm.suld.2d.array.i16.clamp", - "llvm.nvvm.suld.2d.array.i16.trap", - "llvm.nvvm.suld.2d.array.i16.zero", - "llvm.nvvm.suld.2d.array.i32.clamp", - "llvm.nvvm.suld.2d.array.i32.trap", - "llvm.nvvm.suld.2d.array.i32.zero", - "llvm.nvvm.suld.2d.array.i64.clamp", - "llvm.nvvm.suld.2d.array.i64.trap", - "llvm.nvvm.suld.2d.array.i64.zero", - "llvm.nvvm.suld.2d.array.i8.clamp", - "llvm.nvvm.suld.2d.array.i8.trap", - "llvm.nvvm.suld.2d.array.i8.zero", - "llvm.nvvm.suld.2d.array.v2i16.clamp", - "llvm.nvvm.suld.2d.array.v2i16.trap", - "llvm.nvvm.suld.2d.array.v2i16.zero", - "llvm.nvvm.suld.2d.array.v2i32.clamp", - "llvm.nvvm.suld.2d.array.v2i32.trap", - "llvm.nvvm.suld.2d.array.v2i32.zero", - "llvm.nvvm.suld.2d.array.v2i64.clamp", - "llvm.nvvm.suld.2d.array.v2i64.trap", - "llvm.nvvm.suld.2d.array.v2i64.zero", - "llvm.nvvm.suld.2d.array.v2i8.clamp", - "llvm.nvvm.suld.2d.array.v2i8.trap", - "llvm.nvvm.suld.2d.array.v2i8.zero", - "llvm.nvvm.suld.2d.array.v4i16.clamp", - "llvm.nvvm.suld.2d.array.v4i16.trap", - "llvm.nvvm.suld.2d.array.v4i16.zero", - "llvm.nvvm.suld.2d.array.v4i32.clamp", - "llvm.nvvm.suld.2d.array.v4i32.trap", - "llvm.nvvm.suld.2d.array.v4i32.zero", - "llvm.nvvm.suld.2d.array.v4i8.clamp", - "llvm.nvvm.suld.2d.array.v4i8.trap", - "llvm.nvvm.suld.2d.array.v4i8.zero", - "llvm.nvvm.suld.2d.i16.clamp", - "llvm.nvvm.suld.2d.i16.trap", - "llvm.nvvm.suld.2d.i16.zero", - "llvm.nvvm.suld.2d.i32.clamp", - "llvm.nvvm.suld.2d.i32.trap", - "llvm.nvvm.suld.2d.i32.zero", - "llvm.nvvm.suld.2d.i64.clamp", - "llvm.nvvm.suld.2d.i64.trap", - "llvm.nvvm.suld.2d.i64.zero", - "llvm.nvvm.suld.2d.i8.clamp", - "llvm.nvvm.suld.2d.i8.trap", - "llvm.nvvm.suld.2d.i8.zero", - "llvm.nvvm.suld.2d.v2i16.clamp", - "llvm.nvvm.suld.2d.v2i16.trap", - "llvm.nvvm.suld.2d.v2i16.zero", - "llvm.nvvm.suld.2d.v2i32.clamp", - "llvm.nvvm.suld.2d.v2i32.trap", - "llvm.nvvm.suld.2d.v2i32.zero", - "llvm.nvvm.suld.2d.v2i64.clamp", - "llvm.nvvm.suld.2d.v2i64.trap", - "llvm.nvvm.suld.2d.v2i64.zero", - "llvm.nvvm.suld.2d.v2i8.clamp", - "llvm.nvvm.suld.2d.v2i8.trap", - "llvm.nvvm.suld.2d.v2i8.zero", - "llvm.nvvm.suld.2d.v4i16.clamp", - "llvm.nvvm.suld.2d.v4i16.trap", - "llvm.nvvm.suld.2d.v4i16.zero", - "llvm.nvvm.suld.2d.v4i32.clamp", - "llvm.nvvm.suld.2d.v4i32.trap", - "llvm.nvvm.suld.2d.v4i32.zero", - "llvm.nvvm.suld.2d.v4i8.clamp", - "llvm.nvvm.suld.2d.v4i8.trap", - "llvm.nvvm.suld.2d.v4i8.zero", - "llvm.nvvm.suld.3d.i16.clamp", - "llvm.nvvm.suld.3d.i16.trap", - "llvm.nvvm.suld.3d.i16.zero", - "llvm.nvvm.suld.3d.i32.clamp", - "llvm.nvvm.suld.3d.i32.trap", - "llvm.nvvm.suld.3d.i32.zero", - "llvm.nvvm.suld.3d.i64.clamp", - "llvm.nvvm.suld.3d.i64.trap", - "llvm.nvvm.suld.3d.i64.zero", - "llvm.nvvm.suld.3d.i8.clamp", - "llvm.nvvm.suld.3d.i8.trap", - "llvm.nvvm.suld.3d.i8.zero", - "llvm.nvvm.suld.3d.v2i16.clamp", - "llvm.nvvm.suld.3d.v2i16.trap", - "llvm.nvvm.suld.3d.v2i16.zero", - "llvm.nvvm.suld.3d.v2i32.clamp", - "llvm.nvvm.suld.3d.v2i32.trap", - "llvm.nvvm.suld.3d.v2i32.zero", - "llvm.nvvm.suld.3d.v2i64.clamp", - "llvm.nvvm.suld.3d.v2i64.trap", - "llvm.nvvm.suld.3d.v2i64.zero", - "llvm.nvvm.suld.3d.v2i8.clamp", - "llvm.nvvm.suld.3d.v2i8.trap", - "llvm.nvvm.suld.3d.v2i8.zero", - "llvm.nvvm.suld.3d.v4i16.clamp", - "llvm.nvvm.suld.3d.v4i16.trap", - "llvm.nvvm.suld.3d.v4i16.zero", - "llvm.nvvm.suld.3d.v4i32.clamp", - "llvm.nvvm.suld.3d.v4i32.trap", - "llvm.nvvm.suld.3d.v4i32.zero", - "llvm.nvvm.suld.3d.v4i8.clamp", - "llvm.nvvm.suld.3d.v4i8.trap", - "llvm.nvvm.suld.3d.v4i8.zero", - "llvm.nvvm.suq.array.size", - "llvm.nvvm.suq.channel.data.type", - "llvm.nvvm.suq.channel.order", - "llvm.nvvm.suq.depth", - "llvm.nvvm.suq.height", - "llvm.nvvm.suq.width", - "llvm.nvvm.sust.b.1d.array.i16.clamp", - "llvm.nvvm.sust.b.1d.array.i16.trap", - "llvm.nvvm.sust.b.1d.array.i16.zero", - "llvm.nvvm.sust.b.1d.array.i32.clamp", - "llvm.nvvm.sust.b.1d.array.i32.trap", - "llvm.nvvm.sust.b.1d.array.i32.zero", - "llvm.nvvm.sust.b.1d.array.i64.clamp", - "llvm.nvvm.sust.b.1d.array.i64.trap", - "llvm.nvvm.sust.b.1d.array.i64.zero", - "llvm.nvvm.sust.b.1d.array.i8.clamp", - "llvm.nvvm.sust.b.1d.array.i8.trap", - "llvm.nvvm.sust.b.1d.array.i8.zero", - "llvm.nvvm.sust.b.1d.array.v2i16.clamp", - "llvm.nvvm.sust.b.1d.array.v2i16.trap", - "llvm.nvvm.sust.b.1d.array.v2i16.zero", - "llvm.nvvm.sust.b.1d.array.v2i32.clamp", - "llvm.nvvm.sust.b.1d.array.v2i32.trap", - "llvm.nvvm.sust.b.1d.array.v2i32.zero", - "llvm.nvvm.sust.b.1d.array.v2i64.clamp", - "llvm.nvvm.sust.b.1d.array.v2i64.trap", - "llvm.nvvm.sust.b.1d.array.v2i64.zero", - "llvm.nvvm.sust.b.1d.array.v2i8.clamp", - "llvm.nvvm.sust.b.1d.array.v2i8.trap", - "llvm.nvvm.sust.b.1d.array.v2i8.zero", - "llvm.nvvm.sust.b.1d.array.v4i16.clamp", - "llvm.nvvm.sust.b.1d.array.v4i16.trap", - "llvm.nvvm.sust.b.1d.array.v4i16.zero", - "llvm.nvvm.sust.b.1d.array.v4i32.clamp", - "llvm.nvvm.sust.b.1d.array.v4i32.trap", - "llvm.nvvm.sust.b.1d.array.v4i32.zero", - "llvm.nvvm.sust.b.1d.array.v4i8.clamp", - "llvm.nvvm.sust.b.1d.array.v4i8.trap", - "llvm.nvvm.sust.b.1d.array.v4i8.zero", - "llvm.nvvm.sust.b.1d.i16.clamp", - "llvm.nvvm.sust.b.1d.i16.trap", - "llvm.nvvm.sust.b.1d.i16.zero", - "llvm.nvvm.sust.b.1d.i32.clamp", - "llvm.nvvm.sust.b.1d.i32.trap", - "llvm.nvvm.sust.b.1d.i32.zero", - "llvm.nvvm.sust.b.1d.i64.clamp", - "llvm.nvvm.sust.b.1d.i64.trap", - "llvm.nvvm.sust.b.1d.i64.zero", - "llvm.nvvm.sust.b.1d.i8.clamp", - "llvm.nvvm.sust.b.1d.i8.trap", - "llvm.nvvm.sust.b.1d.i8.zero", - "llvm.nvvm.sust.b.1d.v2i16.clamp", - "llvm.nvvm.sust.b.1d.v2i16.trap", - "llvm.nvvm.sust.b.1d.v2i16.zero", - "llvm.nvvm.sust.b.1d.v2i32.clamp", - "llvm.nvvm.sust.b.1d.v2i32.trap", - "llvm.nvvm.sust.b.1d.v2i32.zero", - "llvm.nvvm.sust.b.1d.v2i64.clamp", - "llvm.nvvm.sust.b.1d.v2i64.trap", - "llvm.nvvm.sust.b.1d.v2i64.zero", - "llvm.nvvm.sust.b.1d.v2i8.clamp", - "llvm.nvvm.sust.b.1d.v2i8.trap", - "llvm.nvvm.sust.b.1d.v2i8.zero", - "llvm.nvvm.sust.b.1d.v4i16.clamp", - "llvm.nvvm.sust.b.1d.v4i16.trap", - "llvm.nvvm.sust.b.1d.v4i16.zero", - "llvm.nvvm.sust.b.1d.v4i32.clamp", - "llvm.nvvm.sust.b.1d.v4i32.trap", - "llvm.nvvm.sust.b.1d.v4i32.zero", - "llvm.nvvm.sust.b.1d.v4i8.clamp", - "llvm.nvvm.sust.b.1d.v4i8.trap", - "llvm.nvvm.sust.b.1d.v4i8.zero", - "llvm.nvvm.sust.b.2d.array.i16.clamp", - "llvm.nvvm.sust.b.2d.array.i16.trap", - "llvm.nvvm.sust.b.2d.array.i16.zero", - "llvm.nvvm.sust.b.2d.array.i32.clamp", - "llvm.nvvm.sust.b.2d.array.i32.trap", - "llvm.nvvm.sust.b.2d.array.i32.zero", - "llvm.nvvm.sust.b.2d.array.i64.clamp", - "llvm.nvvm.sust.b.2d.array.i64.trap", - "llvm.nvvm.sust.b.2d.array.i64.zero", - "llvm.nvvm.sust.b.2d.array.i8.clamp", - "llvm.nvvm.sust.b.2d.array.i8.trap", - "llvm.nvvm.sust.b.2d.array.i8.zero", - "llvm.nvvm.sust.b.2d.array.v2i16.clamp", - "llvm.nvvm.sust.b.2d.array.v2i16.trap", - "llvm.nvvm.sust.b.2d.array.v2i16.zero", - "llvm.nvvm.sust.b.2d.array.v2i32.clamp", - "llvm.nvvm.sust.b.2d.array.v2i32.trap", - "llvm.nvvm.sust.b.2d.array.v2i32.zero", - "llvm.nvvm.sust.b.2d.array.v2i64.clamp", - "llvm.nvvm.sust.b.2d.array.v2i64.trap", - "llvm.nvvm.sust.b.2d.array.v2i64.zero", - "llvm.nvvm.sust.b.2d.array.v2i8.clamp", - "llvm.nvvm.sust.b.2d.array.v2i8.trap", - "llvm.nvvm.sust.b.2d.array.v2i8.zero", - "llvm.nvvm.sust.b.2d.array.v4i16.clamp", - "llvm.nvvm.sust.b.2d.array.v4i16.trap", - "llvm.nvvm.sust.b.2d.array.v4i16.zero", - "llvm.nvvm.sust.b.2d.array.v4i32.clamp", - "llvm.nvvm.sust.b.2d.array.v4i32.trap", - "llvm.nvvm.sust.b.2d.array.v4i32.zero", - "llvm.nvvm.sust.b.2d.array.v4i8.clamp", - "llvm.nvvm.sust.b.2d.array.v4i8.trap", - "llvm.nvvm.sust.b.2d.array.v4i8.zero", - "llvm.nvvm.sust.b.2d.i16.clamp", - "llvm.nvvm.sust.b.2d.i16.trap", - "llvm.nvvm.sust.b.2d.i16.zero", - "llvm.nvvm.sust.b.2d.i32.clamp", - "llvm.nvvm.sust.b.2d.i32.trap", - "llvm.nvvm.sust.b.2d.i32.zero", - "llvm.nvvm.sust.b.2d.i64.clamp", - "llvm.nvvm.sust.b.2d.i64.trap", - "llvm.nvvm.sust.b.2d.i64.zero", - "llvm.nvvm.sust.b.2d.i8.clamp", - "llvm.nvvm.sust.b.2d.i8.trap", - "llvm.nvvm.sust.b.2d.i8.zero", - "llvm.nvvm.sust.b.2d.v2i16.clamp", - "llvm.nvvm.sust.b.2d.v2i16.trap", - "llvm.nvvm.sust.b.2d.v2i16.zero", - "llvm.nvvm.sust.b.2d.v2i32.clamp", - "llvm.nvvm.sust.b.2d.v2i32.trap", - "llvm.nvvm.sust.b.2d.v2i32.zero", - "llvm.nvvm.sust.b.2d.v2i64.clamp", - "llvm.nvvm.sust.b.2d.v2i64.trap", - "llvm.nvvm.sust.b.2d.v2i64.zero", - "llvm.nvvm.sust.b.2d.v2i8.clamp", - "llvm.nvvm.sust.b.2d.v2i8.trap", - "llvm.nvvm.sust.b.2d.v2i8.zero", - "llvm.nvvm.sust.b.2d.v4i16.clamp", - "llvm.nvvm.sust.b.2d.v4i16.trap", - "llvm.nvvm.sust.b.2d.v4i16.zero", - "llvm.nvvm.sust.b.2d.v4i32.clamp", - "llvm.nvvm.sust.b.2d.v4i32.trap", - "llvm.nvvm.sust.b.2d.v4i32.zero", - "llvm.nvvm.sust.b.2d.v4i8.clamp", - "llvm.nvvm.sust.b.2d.v4i8.trap", - "llvm.nvvm.sust.b.2d.v4i8.zero", - "llvm.nvvm.sust.b.3d.i16.clamp", - "llvm.nvvm.sust.b.3d.i16.trap", - "llvm.nvvm.sust.b.3d.i16.zero", - "llvm.nvvm.sust.b.3d.i32.clamp", - "llvm.nvvm.sust.b.3d.i32.trap", - "llvm.nvvm.sust.b.3d.i32.zero", - "llvm.nvvm.sust.b.3d.i64.clamp", - "llvm.nvvm.sust.b.3d.i64.trap", - "llvm.nvvm.sust.b.3d.i64.zero", - "llvm.nvvm.sust.b.3d.i8.clamp", - "llvm.nvvm.sust.b.3d.i8.trap", - "llvm.nvvm.sust.b.3d.i8.zero", - "llvm.nvvm.sust.b.3d.v2i16.clamp", - "llvm.nvvm.sust.b.3d.v2i16.trap", - "llvm.nvvm.sust.b.3d.v2i16.zero", - "llvm.nvvm.sust.b.3d.v2i32.clamp", - "llvm.nvvm.sust.b.3d.v2i32.trap", - "llvm.nvvm.sust.b.3d.v2i32.zero", - "llvm.nvvm.sust.b.3d.v2i64.clamp", - "llvm.nvvm.sust.b.3d.v2i64.trap", - "llvm.nvvm.sust.b.3d.v2i64.zero", - "llvm.nvvm.sust.b.3d.v2i8.clamp", - "llvm.nvvm.sust.b.3d.v2i8.trap", - "llvm.nvvm.sust.b.3d.v2i8.zero", - "llvm.nvvm.sust.b.3d.v4i16.clamp", - "llvm.nvvm.sust.b.3d.v4i16.trap", - "llvm.nvvm.sust.b.3d.v4i16.zero", - "llvm.nvvm.sust.b.3d.v4i32.clamp", - "llvm.nvvm.sust.b.3d.v4i32.trap", - "llvm.nvvm.sust.b.3d.v4i32.zero", - "llvm.nvvm.sust.b.3d.v4i8.clamp", - "llvm.nvvm.sust.b.3d.v4i8.trap", - "llvm.nvvm.sust.b.3d.v4i8.zero", - "llvm.nvvm.sust.p.1d.array.i16.trap", - "llvm.nvvm.sust.p.1d.array.i32.trap", - "llvm.nvvm.sust.p.1d.array.i8.trap", - "llvm.nvvm.sust.p.1d.array.v2i16.trap", - "llvm.nvvm.sust.p.1d.array.v2i32.trap", - "llvm.nvvm.sust.p.1d.array.v2i8.trap", - "llvm.nvvm.sust.p.1d.array.v4i16.trap", - "llvm.nvvm.sust.p.1d.array.v4i32.trap", - "llvm.nvvm.sust.p.1d.array.v4i8.trap", - "llvm.nvvm.sust.p.1d.i16.trap", - "llvm.nvvm.sust.p.1d.i32.trap", - "llvm.nvvm.sust.p.1d.i8.trap", - "llvm.nvvm.sust.p.1d.v2i16.trap", - "llvm.nvvm.sust.p.1d.v2i32.trap", - "llvm.nvvm.sust.p.1d.v2i8.trap", - "llvm.nvvm.sust.p.1d.v4i16.trap", - "llvm.nvvm.sust.p.1d.v4i32.trap", - "llvm.nvvm.sust.p.1d.v4i8.trap", - "llvm.nvvm.sust.p.2d.array.i16.trap", - "llvm.nvvm.sust.p.2d.array.i32.trap", - "llvm.nvvm.sust.p.2d.array.i8.trap", - "llvm.nvvm.sust.p.2d.array.v2i16.trap", - "llvm.nvvm.sust.p.2d.array.v2i32.trap", - "llvm.nvvm.sust.p.2d.array.v2i8.trap", - "llvm.nvvm.sust.p.2d.array.v4i16.trap", - "llvm.nvvm.sust.p.2d.array.v4i32.trap", - "llvm.nvvm.sust.p.2d.array.v4i8.trap", - "llvm.nvvm.sust.p.2d.i16.trap", - "llvm.nvvm.sust.p.2d.i32.trap", - "llvm.nvvm.sust.p.2d.i8.trap", - "llvm.nvvm.sust.p.2d.v2i16.trap", - "llvm.nvvm.sust.p.2d.v2i32.trap", - "llvm.nvvm.sust.p.2d.v2i8.trap", - "llvm.nvvm.sust.p.2d.v4i16.trap", - "llvm.nvvm.sust.p.2d.v4i32.trap", - "llvm.nvvm.sust.p.2d.v4i8.trap", - "llvm.nvvm.sust.p.3d.i16.trap", - "llvm.nvvm.sust.p.3d.i32.trap", - "llvm.nvvm.sust.p.3d.i8.trap", - "llvm.nvvm.sust.p.3d.v2i16.trap", - "llvm.nvvm.sust.p.3d.v2i32.trap", - "llvm.nvvm.sust.p.3d.v2i8.trap", - "llvm.nvvm.sust.p.3d.v4i16.trap", - "llvm.nvvm.sust.p.3d.v4i32.trap", - "llvm.nvvm.sust.p.3d.v4i8.trap", - "llvm.nvvm.swap.lo.hi.b64", - "llvm.nvvm.tex.1d.array.grad.v4f32.f32", - "llvm.nvvm.tex.1d.array.grad.v4s32.f32", - "llvm.nvvm.tex.1d.array.grad.v4u32.f32", - "llvm.nvvm.tex.1d.array.level.v4f32.f32", - "llvm.nvvm.tex.1d.array.level.v4s32.f32", - "llvm.nvvm.tex.1d.array.level.v4u32.f32", - "llvm.nvvm.tex.1d.array.v4f32.f32", - "llvm.nvvm.tex.1d.array.v4f32.s32", - "llvm.nvvm.tex.1d.array.v4s32.f32", - "llvm.nvvm.tex.1d.array.v4s32.s32", - "llvm.nvvm.tex.1d.array.v4u32.f32", - "llvm.nvvm.tex.1d.array.v4u32.s32", - "llvm.nvvm.tex.1d.grad.v4f32.f32", - "llvm.nvvm.tex.1d.grad.v4s32.f32", - "llvm.nvvm.tex.1d.grad.v4u32.f32", - "llvm.nvvm.tex.1d.level.v4f32.f32", - "llvm.nvvm.tex.1d.level.v4s32.f32", - "llvm.nvvm.tex.1d.level.v4u32.f32", - "llvm.nvvm.tex.1d.v4f32.f32", - "llvm.nvvm.tex.1d.v4f32.s32", - "llvm.nvvm.tex.1d.v4s32.f32", - "llvm.nvvm.tex.1d.v4s32.s32", - "llvm.nvvm.tex.1d.v4u32.f32", - "llvm.nvvm.tex.1d.v4u32.s32", - "llvm.nvvm.tex.2d.array.grad.v4f32.f32", - "llvm.nvvm.tex.2d.array.grad.v4s32.f32", - "llvm.nvvm.tex.2d.array.grad.v4u32.f32", - "llvm.nvvm.tex.2d.array.level.v4f32.f32", - "llvm.nvvm.tex.2d.array.level.v4s32.f32", - "llvm.nvvm.tex.2d.array.level.v4u32.f32", - "llvm.nvvm.tex.2d.array.v4f32.f32", - "llvm.nvvm.tex.2d.array.v4f32.s32", - "llvm.nvvm.tex.2d.array.v4s32.f32", - "llvm.nvvm.tex.2d.array.v4s32.s32", - "llvm.nvvm.tex.2d.array.v4u32.f32", - "llvm.nvvm.tex.2d.array.v4u32.s32", - "llvm.nvvm.tex.2d.grad.v4f32.f32", - "llvm.nvvm.tex.2d.grad.v4s32.f32", - "llvm.nvvm.tex.2d.grad.v4u32.f32", - "llvm.nvvm.tex.2d.level.v4f32.f32", - "llvm.nvvm.tex.2d.level.v4s32.f32", - "llvm.nvvm.tex.2d.level.v4u32.f32", - "llvm.nvvm.tex.2d.v4f32.f32", - "llvm.nvvm.tex.2d.v4f32.s32", - "llvm.nvvm.tex.2d.v4s32.f32", - "llvm.nvvm.tex.2d.v4s32.s32", - "llvm.nvvm.tex.2d.v4u32.f32", - "llvm.nvvm.tex.2d.v4u32.s32", - "llvm.nvvm.tex.3d.grad.v4f32.f32", - "llvm.nvvm.tex.3d.grad.v4s32.f32", - "llvm.nvvm.tex.3d.grad.v4u32.f32", - "llvm.nvvm.tex.3d.level.v4f32.f32", - "llvm.nvvm.tex.3d.level.v4s32.f32", - "llvm.nvvm.tex.3d.level.v4u32.f32", - "llvm.nvvm.tex.3d.v4f32.f32", - "llvm.nvvm.tex.3d.v4f32.s32", - "llvm.nvvm.tex.3d.v4s32.f32", - "llvm.nvvm.tex.3d.v4s32.s32", - "llvm.nvvm.tex.3d.v4u32.f32", - "llvm.nvvm.tex.3d.v4u32.s32", - "llvm.nvvm.tex.cube.array.level.v4f32.f32", - "llvm.nvvm.tex.cube.array.level.v4s32.f32", - "llvm.nvvm.tex.cube.array.level.v4u32.f32", - "llvm.nvvm.tex.cube.array.v4f32.f32", - "llvm.nvvm.tex.cube.array.v4s32.f32", - "llvm.nvvm.tex.cube.array.v4u32.f32", - "llvm.nvvm.tex.cube.level.v4f32.f32", - "llvm.nvvm.tex.cube.level.v4s32.f32", - "llvm.nvvm.tex.cube.level.v4u32.f32", - "llvm.nvvm.tex.cube.v4f32.f32", - "llvm.nvvm.tex.cube.v4s32.f32", - "llvm.nvvm.tex.cube.v4u32.f32", - "llvm.nvvm.tex.unified.1d.array.grad.v4f32.f32", - "llvm.nvvm.tex.unified.1d.array.grad.v4s32.f32", - "llvm.nvvm.tex.unified.1d.array.grad.v4u32.f32", - "llvm.nvvm.tex.unified.1d.array.level.v4f32.f32", - "llvm.nvvm.tex.unified.1d.array.level.v4s32.f32", - "llvm.nvvm.tex.unified.1d.array.level.v4u32.f32", - "llvm.nvvm.tex.unified.1d.array.v4f32.f32", - "llvm.nvvm.tex.unified.1d.array.v4f32.s32", - "llvm.nvvm.tex.unified.1d.array.v4s32.f32", - "llvm.nvvm.tex.unified.1d.array.v4s32.s32", - "llvm.nvvm.tex.unified.1d.array.v4u32.f32", - "llvm.nvvm.tex.unified.1d.array.v4u32.s32", - "llvm.nvvm.tex.unified.1d.grad.v4f32.f32", - "llvm.nvvm.tex.unified.1d.grad.v4s32.f32", - "llvm.nvvm.tex.unified.1d.grad.v4u32.f32", - "llvm.nvvm.tex.unified.1d.level.v4f32.f32", - "llvm.nvvm.tex.unified.1d.level.v4s32.f32", - "llvm.nvvm.tex.unified.1d.level.v4u32.f32", - "llvm.nvvm.tex.unified.1d.v4f32.f32", - "llvm.nvvm.tex.unified.1d.v4f32.s32", - "llvm.nvvm.tex.unified.1d.v4s32.f32", - "llvm.nvvm.tex.unified.1d.v4s32.s32", - "llvm.nvvm.tex.unified.1d.v4u32.f32", - "llvm.nvvm.tex.unified.1d.v4u32.s32", - "llvm.nvvm.tex.unified.2d.array.grad.v4f32.f32", - "llvm.nvvm.tex.unified.2d.array.grad.v4s32.f32", - "llvm.nvvm.tex.unified.2d.array.grad.v4u32.f32", - "llvm.nvvm.tex.unified.2d.array.level.v4f32.f32", - "llvm.nvvm.tex.unified.2d.array.level.v4s32.f32", - "llvm.nvvm.tex.unified.2d.array.level.v4u32.f32", - "llvm.nvvm.tex.unified.2d.array.v4f32.f32", - "llvm.nvvm.tex.unified.2d.array.v4f32.s32", - "llvm.nvvm.tex.unified.2d.array.v4s32.f32", - "llvm.nvvm.tex.unified.2d.array.v4s32.s32", - "llvm.nvvm.tex.unified.2d.array.v4u32.f32", - "llvm.nvvm.tex.unified.2d.array.v4u32.s32", - "llvm.nvvm.tex.unified.2d.grad.v4f32.f32", - "llvm.nvvm.tex.unified.2d.grad.v4s32.f32", - "llvm.nvvm.tex.unified.2d.grad.v4u32.f32", - "llvm.nvvm.tex.unified.2d.level.v4f32.f32", - "llvm.nvvm.tex.unified.2d.level.v4s32.f32", - "llvm.nvvm.tex.unified.2d.level.v4u32.f32", - "llvm.nvvm.tex.unified.2d.v4f32.f32", - "llvm.nvvm.tex.unified.2d.v4f32.s32", - "llvm.nvvm.tex.unified.2d.v4s32.f32", - "llvm.nvvm.tex.unified.2d.v4s32.s32", - "llvm.nvvm.tex.unified.2d.v4u32.f32", - "llvm.nvvm.tex.unified.2d.v4u32.s32", - "llvm.nvvm.tex.unified.3d.grad.v4f32.f32", - "llvm.nvvm.tex.unified.3d.grad.v4s32.f32", - "llvm.nvvm.tex.unified.3d.grad.v4u32.f32", - "llvm.nvvm.tex.unified.3d.level.v4f32.f32", - "llvm.nvvm.tex.unified.3d.level.v4s32.f32", - "llvm.nvvm.tex.unified.3d.level.v4u32.f32", - "llvm.nvvm.tex.unified.3d.v4f32.f32", - "llvm.nvvm.tex.unified.3d.v4f32.s32", - "llvm.nvvm.tex.unified.3d.v4s32.f32", - "llvm.nvvm.tex.unified.3d.v4s32.s32", - "llvm.nvvm.tex.unified.3d.v4u32.f32", - "llvm.nvvm.tex.unified.3d.v4u32.s32", - "llvm.nvvm.tex.unified.cube.array.level.v4f32.f32", - "llvm.nvvm.tex.unified.cube.array.level.v4s32.f32", - "llvm.nvvm.tex.unified.cube.array.level.v4u32.f32", - "llvm.nvvm.tex.unified.cube.array.v4f32.f32", - "llvm.nvvm.tex.unified.cube.array.v4s32.f32", - "llvm.nvvm.tex.unified.cube.array.v4u32.f32", - "llvm.nvvm.tex.unified.cube.level.v4f32.f32", - "llvm.nvvm.tex.unified.cube.level.v4s32.f32", - "llvm.nvvm.tex.unified.cube.level.v4u32.f32", - "llvm.nvvm.tex.unified.cube.v4f32.f32", - "llvm.nvvm.tex.unified.cube.v4s32.f32", - "llvm.nvvm.tex.unified.cube.v4u32.f32", - "llvm.nvvm.texsurf.handle", - "llvm.nvvm.texsurf.handle.internal", - "llvm.nvvm.tld4.a.2d.v4f32.f32", - "llvm.nvvm.tld4.a.2d.v4s32.f32", - "llvm.nvvm.tld4.a.2d.v4u32.f32", - "llvm.nvvm.tld4.b.2d.v4f32.f32", - "llvm.nvvm.tld4.b.2d.v4s32.f32", - "llvm.nvvm.tld4.b.2d.v4u32.f32", - "llvm.nvvm.tld4.g.2d.v4f32.f32", - "llvm.nvvm.tld4.g.2d.v4s32.f32", - "llvm.nvvm.tld4.g.2d.v4u32.f32", - "llvm.nvvm.tld4.r.2d.v4f32.f32", - "llvm.nvvm.tld4.r.2d.v4s32.f32", - "llvm.nvvm.tld4.r.2d.v4u32.f32", - "llvm.nvvm.tld4.unified.a.2d.v4f32.f32", - "llvm.nvvm.tld4.unified.a.2d.v4s32.f32", - "llvm.nvvm.tld4.unified.a.2d.v4u32.f32", - "llvm.nvvm.tld4.unified.b.2d.v4f32.f32", - "llvm.nvvm.tld4.unified.b.2d.v4s32.f32", - "llvm.nvvm.tld4.unified.b.2d.v4u32.f32", - "llvm.nvvm.tld4.unified.g.2d.v4f32.f32", - "llvm.nvvm.tld4.unified.g.2d.v4s32.f32", - "llvm.nvvm.tld4.unified.g.2d.v4u32.f32", - "llvm.nvvm.tld4.unified.r.2d.v4f32.f32", - "llvm.nvvm.tld4.unified.r.2d.v4s32.f32", - "llvm.nvvm.tld4.unified.r.2d.v4u32.f32", - "llvm.nvvm.trunc.d", - "llvm.nvvm.trunc.f", - "llvm.nvvm.trunc.ftz.f", - "llvm.nvvm.txq.array.size", - "llvm.nvvm.txq.channel.data.type", - "llvm.nvvm.txq.channel.order", - "llvm.nvvm.txq.depth", - "llvm.nvvm.txq.height", - "llvm.nvvm.txq.num.mipmap.levels", - "llvm.nvvm.txq.num.samples", - "llvm.nvvm.txq.width", - "llvm.nvvm.ui2d.rm", - "llvm.nvvm.ui2d.rn", - "llvm.nvvm.ui2d.rp", - "llvm.nvvm.ui2d.rz", - "llvm.nvvm.ui2f.rm", - "llvm.nvvm.ui2f.rn", - "llvm.nvvm.ui2f.rp", - "llvm.nvvm.ui2f.rz", - "llvm.nvvm.ull2d.rm", - "llvm.nvvm.ull2d.rn", - "llvm.nvvm.ull2d.rp", - "llvm.nvvm.ull2d.rz", - "llvm.nvvm.ull2f.rm", - "llvm.nvvm.ull2f.rn", - "llvm.nvvm.ull2f.rp", - "llvm.nvvm.ull2f.rz", - "llvm.ppc.altivec.crypto.vcipher", - "llvm.ppc.altivec.crypto.vcipherlast", - "llvm.ppc.altivec.crypto.vncipher", - "llvm.ppc.altivec.crypto.vncipherlast", - "llvm.ppc.altivec.crypto.vpermxor", - "llvm.ppc.altivec.crypto.vpmsumb", - "llvm.ppc.altivec.crypto.vpmsumd", - "llvm.ppc.altivec.crypto.vpmsumh", - "llvm.ppc.altivec.crypto.vpmsumw", - "llvm.ppc.altivec.crypto.vsbox", - "llvm.ppc.altivec.crypto.vshasigmad", - "llvm.ppc.altivec.crypto.vshasigmaw", - "llvm.ppc.altivec.dss", - "llvm.ppc.altivec.dssall", - "llvm.ppc.altivec.dst", - "llvm.ppc.altivec.dstst", - "llvm.ppc.altivec.dststt", - "llvm.ppc.altivec.dstt", - "llvm.ppc.altivec.lvebx", - "llvm.ppc.altivec.lvehx", - "llvm.ppc.altivec.lvewx", - "llvm.ppc.altivec.lvsl", - "llvm.ppc.altivec.lvsr", - "llvm.ppc.altivec.lvx", - "llvm.ppc.altivec.lvxl", - "llvm.ppc.altivec.mfvscr", - "llvm.ppc.altivec.mtvscr", - "llvm.ppc.altivec.stvebx", - "llvm.ppc.altivec.stvehx", - "llvm.ppc.altivec.stvewx", - "llvm.ppc.altivec.stvx", - "llvm.ppc.altivec.stvxl", - "llvm.ppc.altivec.vaddcuq", - "llvm.ppc.altivec.vaddcuw", - "llvm.ppc.altivec.vaddecuq", - "llvm.ppc.altivec.vaddeuqm", - "llvm.ppc.altivec.vaddsbs", - "llvm.ppc.altivec.vaddshs", - "llvm.ppc.altivec.vaddsws", - "llvm.ppc.altivec.vaddubs", - "llvm.ppc.altivec.vadduhs", - "llvm.ppc.altivec.vadduws", - "llvm.ppc.altivec.vavgsb", - "llvm.ppc.altivec.vavgsh", - "llvm.ppc.altivec.vavgsw", - "llvm.ppc.altivec.vavgub", - "llvm.ppc.altivec.vavguh", - "llvm.ppc.altivec.vavguw", - "llvm.ppc.altivec.vbpermq", - "llvm.ppc.altivec.vcfsx", - "llvm.ppc.altivec.vcfux", - "llvm.ppc.altivec.vcmpbfp", - "llvm.ppc.altivec.vcmpbfp.p", - "llvm.ppc.altivec.vcmpeqfp", - "llvm.ppc.altivec.vcmpeqfp.p", - "llvm.ppc.altivec.vcmpequb", - "llvm.ppc.altivec.vcmpequb.p", - "llvm.ppc.altivec.vcmpequd", - "llvm.ppc.altivec.vcmpequd.p", - "llvm.ppc.altivec.vcmpequh", - "llvm.ppc.altivec.vcmpequh.p", - "llvm.ppc.altivec.vcmpequw", - "llvm.ppc.altivec.vcmpequw.p", - "llvm.ppc.altivec.vcmpgefp", - "llvm.ppc.altivec.vcmpgefp.p", - "llvm.ppc.altivec.vcmpgtfp", - "llvm.ppc.altivec.vcmpgtfp.p", - "llvm.ppc.altivec.vcmpgtsb", - "llvm.ppc.altivec.vcmpgtsb.p", - "llvm.ppc.altivec.vcmpgtsd", - "llvm.ppc.altivec.vcmpgtsd.p", - "llvm.ppc.altivec.vcmpgtsh", - "llvm.ppc.altivec.vcmpgtsh.p", - "llvm.ppc.altivec.vcmpgtsw", - "llvm.ppc.altivec.vcmpgtsw.p", - "llvm.ppc.altivec.vcmpgtub", - "llvm.ppc.altivec.vcmpgtub.p", - "llvm.ppc.altivec.vcmpgtud", - "llvm.ppc.altivec.vcmpgtud.p", - "llvm.ppc.altivec.vcmpgtuh", - "llvm.ppc.altivec.vcmpgtuh.p", - "llvm.ppc.altivec.vcmpgtuw", - "llvm.ppc.altivec.vcmpgtuw.p", - "llvm.ppc.altivec.vctsxs", - "llvm.ppc.altivec.vctuxs", - "llvm.ppc.altivec.vexptefp", - "llvm.ppc.altivec.vgbbd", - "llvm.ppc.altivec.vlogefp", - "llvm.ppc.altivec.vmaddfp", - "llvm.ppc.altivec.vmaxfp", - "llvm.ppc.altivec.vmaxsb", - "llvm.ppc.altivec.vmaxsd", - "llvm.ppc.altivec.vmaxsh", - "llvm.ppc.altivec.vmaxsw", - "llvm.ppc.altivec.vmaxub", - "llvm.ppc.altivec.vmaxud", - "llvm.ppc.altivec.vmaxuh", - "llvm.ppc.altivec.vmaxuw", - "llvm.ppc.altivec.vmhaddshs", - "llvm.ppc.altivec.vmhraddshs", - "llvm.ppc.altivec.vminfp", - "llvm.ppc.altivec.vminsb", - "llvm.ppc.altivec.vminsd", - "llvm.ppc.altivec.vminsh", - "llvm.ppc.altivec.vminsw", - "llvm.ppc.altivec.vminub", - "llvm.ppc.altivec.vminud", - "llvm.ppc.altivec.vminuh", - "llvm.ppc.altivec.vminuw", - "llvm.ppc.altivec.vmladduhm", - "llvm.ppc.altivec.vmsummbm", - "llvm.ppc.altivec.vmsumshm", - "llvm.ppc.altivec.vmsumshs", - "llvm.ppc.altivec.vmsumubm", - "llvm.ppc.altivec.vmsumuhm", - "llvm.ppc.altivec.vmsumuhs", - "llvm.ppc.altivec.vmulesb", - "llvm.ppc.altivec.vmulesh", - "llvm.ppc.altivec.vmulesw", - "llvm.ppc.altivec.vmuleub", - "llvm.ppc.altivec.vmuleuh", - "llvm.ppc.altivec.vmuleuw", - "llvm.ppc.altivec.vmulosb", - "llvm.ppc.altivec.vmulosh", - "llvm.ppc.altivec.vmulosw", - "llvm.ppc.altivec.vmuloub", - "llvm.ppc.altivec.vmulouh", - "llvm.ppc.altivec.vmulouw", - "llvm.ppc.altivec.vnmsubfp", - "llvm.ppc.altivec.vperm", - "llvm.ppc.altivec.vpkpx", - "llvm.ppc.altivec.vpksdss", - "llvm.ppc.altivec.vpksdus", - "llvm.ppc.altivec.vpkshss", - "llvm.ppc.altivec.vpkshus", - "llvm.ppc.altivec.vpkswss", - "llvm.ppc.altivec.vpkswus", - "llvm.ppc.altivec.vpkudus", - "llvm.ppc.altivec.vpkuhus", - "llvm.ppc.altivec.vpkuwus", - "llvm.ppc.altivec.vrefp", - "llvm.ppc.altivec.vrfim", - "llvm.ppc.altivec.vrfin", - "llvm.ppc.altivec.vrfip", - "llvm.ppc.altivec.vrfiz", - "llvm.ppc.altivec.vrlb", - "llvm.ppc.altivec.vrld", - "llvm.ppc.altivec.vrlh", - "llvm.ppc.altivec.vrlw", - "llvm.ppc.altivec.vrsqrtefp", - "llvm.ppc.altivec.vsel", - "llvm.ppc.altivec.vsl", - "llvm.ppc.altivec.vslb", - "llvm.ppc.altivec.vslh", - "llvm.ppc.altivec.vslo", - "llvm.ppc.altivec.vslw", - "llvm.ppc.altivec.vsr", - "llvm.ppc.altivec.vsrab", - "llvm.ppc.altivec.vsrah", - "llvm.ppc.altivec.vsraw", - "llvm.ppc.altivec.vsrb", - "llvm.ppc.altivec.vsrh", - "llvm.ppc.altivec.vsro", - "llvm.ppc.altivec.vsrw", - "llvm.ppc.altivec.vsubcuq", - "llvm.ppc.altivec.vsubcuw", - "llvm.ppc.altivec.vsubecuq", - "llvm.ppc.altivec.vsubeuqm", - "llvm.ppc.altivec.vsubsbs", - "llvm.ppc.altivec.vsubshs", - "llvm.ppc.altivec.vsubsws", - "llvm.ppc.altivec.vsububs", - "llvm.ppc.altivec.vsubuhs", - "llvm.ppc.altivec.vsubuws", - "llvm.ppc.altivec.vsum2sws", - "llvm.ppc.altivec.vsum4sbs", - "llvm.ppc.altivec.vsum4shs", - "llvm.ppc.altivec.vsum4ubs", - "llvm.ppc.altivec.vsumsws", - "llvm.ppc.altivec.vupkhpx", - "llvm.ppc.altivec.vupkhsb", - "llvm.ppc.altivec.vupkhsh", - "llvm.ppc.altivec.vupkhsw", - "llvm.ppc.altivec.vupklpx", - "llvm.ppc.altivec.vupklsb", - "llvm.ppc.altivec.vupklsh", - "llvm.ppc.altivec.vupklsw", - "llvm.ppc.bpermd", - "llvm.ppc.dcba", - "llvm.ppc.dcbf", - "llvm.ppc.dcbi", - "llvm.ppc.dcbst", - "llvm.ppc.dcbt", - "llvm.ppc.dcbtst", - "llvm.ppc.dcbz", - "llvm.ppc.dcbzl", - "llvm.ppc.divde", - "llvm.ppc.divdeu", - "llvm.ppc.divwe", - "llvm.ppc.divweu", - "llvm.ppc.get.texasr", - "llvm.ppc.get.texasru", - "llvm.ppc.get.tfhar", - "llvm.ppc.get.tfiar", - "llvm.ppc.is.decremented.ctr.nonzero", - "llvm.ppc.lwsync", - "llvm.ppc.mtctr", - "llvm.ppc.qpx.qvfabs", - "llvm.ppc.qpx.qvfadd", - "llvm.ppc.qpx.qvfadds", - "llvm.ppc.qpx.qvfcfid", - "llvm.ppc.qpx.qvfcfids", - "llvm.ppc.qpx.qvfcfidu", - "llvm.ppc.qpx.qvfcfidus", - "llvm.ppc.qpx.qvfcmpeq", - "llvm.ppc.qpx.qvfcmpgt", - "llvm.ppc.qpx.qvfcmplt", - "llvm.ppc.qpx.qvfcpsgn", - "llvm.ppc.qpx.qvfctid", - "llvm.ppc.qpx.qvfctidu", - "llvm.ppc.qpx.qvfctiduz", - "llvm.ppc.qpx.qvfctidz", - "llvm.ppc.qpx.qvfctiw", - "llvm.ppc.qpx.qvfctiwu", - "llvm.ppc.qpx.qvfctiwuz", - "llvm.ppc.qpx.qvfctiwz", - "llvm.ppc.qpx.qvflogical", - "llvm.ppc.qpx.qvfmadd", - "llvm.ppc.qpx.qvfmadds", - "llvm.ppc.qpx.qvfmsub", - "llvm.ppc.qpx.qvfmsubs", - "llvm.ppc.qpx.qvfmul", - "llvm.ppc.qpx.qvfmuls", - "llvm.ppc.qpx.qvfnabs", - "llvm.ppc.qpx.qvfneg", - "llvm.ppc.qpx.qvfnmadd", - "llvm.ppc.qpx.qvfnmadds", - "llvm.ppc.qpx.qvfnmsub", - "llvm.ppc.qpx.qvfnmsubs", - "llvm.ppc.qpx.qvfperm", - "llvm.ppc.qpx.qvfre", - "llvm.ppc.qpx.qvfres", - "llvm.ppc.qpx.qvfrim", - "llvm.ppc.qpx.qvfrin", - "llvm.ppc.qpx.qvfrip", - "llvm.ppc.qpx.qvfriz", - "llvm.ppc.qpx.qvfrsp", - "llvm.ppc.qpx.qvfrsqrte", - "llvm.ppc.qpx.qvfrsqrtes", - "llvm.ppc.qpx.qvfsel", - "llvm.ppc.qpx.qvfsub", - "llvm.ppc.qpx.qvfsubs", - "llvm.ppc.qpx.qvftstnan", - "llvm.ppc.qpx.qvfxmadd", - "llvm.ppc.qpx.qvfxmadds", - "llvm.ppc.qpx.qvfxmul", - "llvm.ppc.qpx.qvfxmuls", - "llvm.ppc.qpx.qvfxxcpnmadd", - "llvm.ppc.qpx.qvfxxcpnmadds", - "llvm.ppc.qpx.qvfxxmadd", - "llvm.ppc.qpx.qvfxxmadds", - "llvm.ppc.qpx.qvfxxnpmadd", - "llvm.ppc.qpx.qvfxxnpmadds", - "llvm.ppc.qpx.qvgpci", - "llvm.ppc.qpx.qvlfcd", - "llvm.ppc.qpx.qvlfcda", - "llvm.ppc.qpx.qvlfcs", - "llvm.ppc.qpx.qvlfcsa", - "llvm.ppc.qpx.qvlfd", - "llvm.ppc.qpx.qvlfda", - "llvm.ppc.qpx.qvlfiwa", - "llvm.ppc.qpx.qvlfiwaa", - "llvm.ppc.qpx.qvlfiwz", - "llvm.ppc.qpx.qvlfiwza", - "llvm.ppc.qpx.qvlfs", - "llvm.ppc.qpx.qvlfsa", - "llvm.ppc.qpx.qvlpcld", - "llvm.ppc.qpx.qvlpcls", - "llvm.ppc.qpx.qvlpcrd", - "llvm.ppc.qpx.qvlpcrs", - "llvm.ppc.qpx.qvstfcd", - "llvm.ppc.qpx.qvstfcda", - "llvm.ppc.qpx.qvstfcs", - "llvm.ppc.qpx.qvstfcsa", - "llvm.ppc.qpx.qvstfd", - "llvm.ppc.qpx.qvstfda", - "llvm.ppc.qpx.qvstfiw", - "llvm.ppc.qpx.qvstfiwa", - "llvm.ppc.qpx.qvstfs", - "llvm.ppc.qpx.qvstfsa", - "llvm.ppc.set.texasr", - "llvm.ppc.set.texasru", - "llvm.ppc.set.tfhar", - "llvm.ppc.set.tfiar", - "llvm.ppc.sync", - "llvm.ppc.tabort", - "llvm.ppc.tabortdc", - "llvm.ppc.tabortdci", - "llvm.ppc.tabortwc", - "llvm.ppc.tabortwci", - "llvm.ppc.tbegin", - "llvm.ppc.tcheck", - "llvm.ppc.tend", - "llvm.ppc.tendall", - "llvm.ppc.trechkpt", - "llvm.ppc.treclaim", - "llvm.ppc.tresume", - "llvm.ppc.tsr", - "llvm.ppc.tsuspend", - "llvm.ppc.ttest", - "llvm.ppc.vsx.lxvd2x", - "llvm.ppc.vsx.lxvw4x", - "llvm.ppc.vsx.stxvd2x", - "llvm.ppc.vsx.stxvw4x", - "llvm.ppc.vsx.xsmaxdp", - "llvm.ppc.vsx.xsmindp", - "llvm.ppc.vsx.xvcmpeqdp", - "llvm.ppc.vsx.xvcmpeqdp.p", - "llvm.ppc.vsx.xvcmpeqsp", - "llvm.ppc.vsx.xvcmpeqsp.p", - "llvm.ppc.vsx.xvcmpgedp", - "llvm.ppc.vsx.xvcmpgedp.p", - "llvm.ppc.vsx.xvcmpgesp", - "llvm.ppc.vsx.xvcmpgesp.p", - "llvm.ppc.vsx.xvcmpgtdp", - "llvm.ppc.vsx.xvcmpgtdp.p", - "llvm.ppc.vsx.xvcmpgtsp", - "llvm.ppc.vsx.xvcmpgtsp.p", - "llvm.ppc.vsx.xvdivdp", - "llvm.ppc.vsx.xvdivsp", - "llvm.ppc.vsx.xvmaxdp", - "llvm.ppc.vsx.xvmaxsp", - "llvm.ppc.vsx.xvmindp", - "llvm.ppc.vsx.xvminsp", - "llvm.ppc.vsx.xvrdpip", - "llvm.ppc.vsx.xvredp", - "llvm.ppc.vsx.xvresp", - "llvm.ppc.vsx.xvrspip", - "llvm.ppc.vsx.xvrsqrtedp", - "llvm.ppc.vsx.xvrsqrtesp", - "llvm.ppc.vsx.xxleqv", - "llvm.r600.group.barrier", - "llvm.r600.implicitarg.ptr", - "llvm.r600.rat.store.typed", - "llvm.r600.read.global.size.x", - "llvm.r600.read.global.size.y", - "llvm.r600.read.global.size.z", - "llvm.r600.read.local.size.x", - "llvm.r600.read.local.size.y", - "llvm.r600.read.local.size.z", - "llvm.r600.read.ngroups.x", - "llvm.r600.read.ngroups.y", - "llvm.r600.read.ngroups.z", - "llvm.r600.read.tgid.x", - "llvm.r600.read.tgid.y", - "llvm.r600.read.tgid.z", - "llvm.r600.read.tidig.x", - "llvm.r600.read.tidig.y", - "llvm.r600.read.tidig.z", - "llvm.r600.read.workdim", - "llvm.r600.recipsqrt.clamped", - "llvm.r600.recipsqrt.ieee", - "llvm.s390.etnd", - "llvm.s390.lcbb", - "llvm.s390.ntstg", - "llvm.s390.ppa.txassist", - "llvm.s390.tabort", - "llvm.s390.tbegin", - "llvm.s390.tbegin.nofloat", - "llvm.s390.tbeginc", - "llvm.s390.tdc", - "llvm.s390.tend", - "llvm.s390.vaccb", - "llvm.s390.vacccq", - "llvm.s390.vaccf", - "llvm.s390.vaccg", - "llvm.s390.vacch", - "llvm.s390.vaccq", - "llvm.s390.vacq", - "llvm.s390.vaq", - "llvm.s390.vavgb", - "llvm.s390.vavgf", - "llvm.s390.vavgg", - "llvm.s390.vavgh", - "llvm.s390.vavglb", - "llvm.s390.vavglf", - "llvm.s390.vavglg", - "llvm.s390.vavglh", - "llvm.s390.vceqbs", - "llvm.s390.vceqfs", - "llvm.s390.vceqgs", - "llvm.s390.vceqhs", - "llvm.s390.vchbs", - "llvm.s390.vchfs", - "llvm.s390.vchgs", - "llvm.s390.vchhs", - "llvm.s390.vchlbs", - "llvm.s390.vchlfs", - "llvm.s390.vchlgs", - "llvm.s390.vchlhs", - "llvm.s390.vcksm", - "llvm.s390.verimb", - "llvm.s390.verimf", - "llvm.s390.verimg", - "llvm.s390.verimh", - "llvm.s390.verllb", - "llvm.s390.verllf", - "llvm.s390.verllg", - "llvm.s390.verllh", - "llvm.s390.verllvb", - "llvm.s390.verllvf", - "llvm.s390.verllvg", - "llvm.s390.verllvh", - "llvm.s390.vfaeb", - "llvm.s390.vfaebs", - "llvm.s390.vfaef", - "llvm.s390.vfaefs", - "llvm.s390.vfaeh", - "llvm.s390.vfaehs", - "llvm.s390.vfaezb", - "llvm.s390.vfaezbs", - "llvm.s390.vfaezf", - "llvm.s390.vfaezfs", - "llvm.s390.vfaezh", - "llvm.s390.vfaezhs", - "llvm.s390.vfcedbs", - "llvm.s390.vfchdbs", - "llvm.s390.vfchedbs", - "llvm.s390.vfeeb", - "llvm.s390.vfeebs", - "llvm.s390.vfeef", - "llvm.s390.vfeefs", - "llvm.s390.vfeeh", - "llvm.s390.vfeehs", - "llvm.s390.vfeezb", - "llvm.s390.vfeezbs", - "llvm.s390.vfeezf", - "llvm.s390.vfeezfs", - "llvm.s390.vfeezh", - "llvm.s390.vfeezhs", - "llvm.s390.vfeneb", - "llvm.s390.vfenebs", - "llvm.s390.vfenef", - "llvm.s390.vfenefs", - "llvm.s390.vfeneh", - "llvm.s390.vfenehs", - "llvm.s390.vfenezb", - "llvm.s390.vfenezbs", - "llvm.s390.vfenezf", - "llvm.s390.vfenezfs", - "llvm.s390.vfenezh", - "llvm.s390.vfenezhs", - "llvm.s390.vfidb", - "llvm.s390.vftcidb", - "llvm.s390.vgfmab", - "llvm.s390.vgfmaf", - "llvm.s390.vgfmag", - "llvm.s390.vgfmah", - "llvm.s390.vgfmb", - "llvm.s390.vgfmf", - "llvm.s390.vgfmg", - "llvm.s390.vgfmh", - "llvm.s390.vistrb", - "llvm.s390.vistrbs", - "llvm.s390.vistrf", - "llvm.s390.vistrfs", - "llvm.s390.vistrh", - "llvm.s390.vistrhs", - "llvm.s390.vlbb", - "llvm.s390.vll", - "llvm.s390.vmaeb", - "llvm.s390.vmaef", - "llvm.s390.vmaeh", - "llvm.s390.vmahb", - "llvm.s390.vmahf", - "llvm.s390.vmahh", - "llvm.s390.vmaleb", - "llvm.s390.vmalef", - "llvm.s390.vmaleh", - "llvm.s390.vmalhb", - "llvm.s390.vmalhf", - "llvm.s390.vmalhh", - "llvm.s390.vmalob", - "llvm.s390.vmalof", - "llvm.s390.vmaloh", - "llvm.s390.vmaob", - "llvm.s390.vmaof", - "llvm.s390.vmaoh", - "llvm.s390.vmeb", - "llvm.s390.vmef", - "llvm.s390.vmeh", - "llvm.s390.vmhb", - "llvm.s390.vmhf", - "llvm.s390.vmhh", - "llvm.s390.vmleb", - "llvm.s390.vmlef", - "llvm.s390.vmleh", - "llvm.s390.vmlhb", - "llvm.s390.vmlhf", - "llvm.s390.vmlhh", - "llvm.s390.vmlob", - "llvm.s390.vmlof", - "llvm.s390.vmloh", - "llvm.s390.vmob", - "llvm.s390.vmof", - "llvm.s390.vmoh", - "llvm.s390.vpdi", - "llvm.s390.vperm", - "llvm.s390.vpklsf", - "llvm.s390.vpklsfs", - "llvm.s390.vpklsg", - "llvm.s390.vpklsgs", - "llvm.s390.vpklsh", - "llvm.s390.vpklshs", - "llvm.s390.vpksf", - "llvm.s390.vpksfs", - "llvm.s390.vpksg", - "llvm.s390.vpksgs", - "llvm.s390.vpksh", - "llvm.s390.vpkshs", - "llvm.s390.vsbcbiq", - "llvm.s390.vsbiq", - "llvm.s390.vscbib", - "llvm.s390.vscbif", - "llvm.s390.vscbig", - "llvm.s390.vscbih", - "llvm.s390.vscbiq", - "llvm.s390.vsl", - "llvm.s390.vslb", - "llvm.s390.vsldb", - "llvm.s390.vsq", - "llvm.s390.vsra", - "llvm.s390.vsrab", - "llvm.s390.vsrl", - "llvm.s390.vsrlb", - "llvm.s390.vstl", - "llvm.s390.vstrcb", - "llvm.s390.vstrcbs", - "llvm.s390.vstrcf", - "llvm.s390.vstrcfs", - "llvm.s390.vstrch", - "llvm.s390.vstrchs", - "llvm.s390.vstrczb", - "llvm.s390.vstrczbs", - "llvm.s390.vstrczf", - "llvm.s390.vstrczfs", - "llvm.s390.vstrczh", - "llvm.s390.vstrczhs", - "llvm.s390.vsumb", - "llvm.s390.vsumgf", - "llvm.s390.vsumgh", - "llvm.s390.vsumh", - "llvm.s390.vsumqf", - "llvm.s390.vsumqg", - "llvm.s390.vtm", - "llvm.s390.vuphb", - "llvm.s390.vuphf", - "llvm.s390.vuphh", - "llvm.s390.vuplb", - "llvm.s390.vuplf", - "llvm.s390.vuplhb", - "llvm.s390.vuplhf", - "llvm.s390.vuplhh", - "llvm.s390.vuplhw", - "llvm.s390.vupllb", - "llvm.s390.vupllf", - "llvm.s390.vupllh", - "llvm.wasm.current.memory", - "llvm.wasm.grow.memory", - "llvm.x86.3dnow.pavgusb", - "llvm.x86.3dnow.pf2id", - "llvm.x86.3dnow.pfacc", - "llvm.x86.3dnow.pfadd", - "llvm.x86.3dnow.pfcmpeq", - "llvm.x86.3dnow.pfcmpge", - "llvm.x86.3dnow.pfcmpgt", - "llvm.x86.3dnow.pfmax", - "llvm.x86.3dnow.pfmin", - "llvm.x86.3dnow.pfmul", - "llvm.x86.3dnow.pfrcp", - "llvm.x86.3dnow.pfrcpit1", - "llvm.x86.3dnow.pfrcpit2", - "llvm.x86.3dnow.pfrsqit1", - "llvm.x86.3dnow.pfrsqrt", - "llvm.x86.3dnow.pfsub", - "llvm.x86.3dnow.pfsubr", - "llvm.x86.3dnow.pi2fd", - "llvm.x86.3dnow.pmulhrw", - "llvm.x86.3dnowa.pf2iw", - "llvm.x86.3dnowa.pfnacc", - "llvm.x86.3dnowa.pfpnacc", - "llvm.x86.3dnowa.pi2fw", - "llvm.x86.3dnowa.pswapd", - "llvm.x86.addcarry.u32", - "llvm.x86.addcarry.u64", - "llvm.x86.addcarryx.u32", - "llvm.x86.addcarryx.u64", - "llvm.x86.aesni.aesdec", - "llvm.x86.aesni.aesdeclast", - "llvm.x86.aesni.aesenc", - "llvm.x86.aesni.aesenclast", - "llvm.x86.aesni.aesimc", - "llvm.x86.aesni.aeskeygenassist", - "llvm.x86.avx.addsub.pd.256", - "llvm.x86.avx.addsub.ps.256", - "llvm.x86.avx.blendv.pd.256", - "llvm.x86.avx.blendv.ps.256", - "llvm.x86.avx.cmp.pd.256", - "llvm.x86.avx.cmp.ps.256", - "llvm.x86.avx.cvt.pd2.ps.256", - "llvm.x86.avx.cvt.pd2dq.256", - "llvm.x86.avx.cvt.ps2dq.256", - "llvm.x86.avx.cvtdq2.ps.256", - "llvm.x86.avx.cvtt.pd2dq.256", - "llvm.x86.avx.cvtt.ps2dq.256", - "llvm.x86.avx.dp.ps.256", - "llvm.x86.avx.hadd.pd.256", - "llvm.x86.avx.hadd.ps.256", - "llvm.x86.avx.hsub.pd.256", - "llvm.x86.avx.hsub.ps.256", - "llvm.x86.avx.ldu.dq.256", - "llvm.x86.avx.maskload.pd", - "llvm.x86.avx.maskload.pd.256", - "llvm.x86.avx.maskload.ps", - "llvm.x86.avx.maskload.ps.256", - "llvm.x86.avx.maskstore.pd", - "llvm.x86.avx.maskstore.pd.256", - "llvm.x86.avx.maskstore.ps", - "llvm.x86.avx.maskstore.ps.256", - "llvm.x86.avx.max.pd.256", - "llvm.x86.avx.max.ps.256", - "llvm.x86.avx.min.pd.256", - "llvm.x86.avx.min.ps.256", - "llvm.x86.avx.movmsk.pd.256", - "llvm.x86.avx.movmsk.ps.256", - "llvm.x86.avx.ptestc.256", - "llvm.x86.avx.ptestnzc.256", - "llvm.x86.avx.ptestz.256", - "llvm.x86.avx.rcp.ps.256", - "llvm.x86.avx.round.pd.256", - "llvm.x86.avx.round.ps.256", - "llvm.x86.avx.rsqrt.ps.256", - "llvm.x86.avx.sqrt.pd.256", - "llvm.x86.avx.sqrt.ps.256", - "llvm.x86.avx.vbroadcastf128.pd.256", - "llvm.x86.avx.vbroadcastf128.ps.256", - "llvm.x86.avx.vperm2f128.pd.256", - "llvm.x86.avx.vperm2f128.ps.256", - "llvm.x86.avx.vperm2f128.si.256", - "llvm.x86.avx.vpermilvar.pd", - "llvm.x86.avx.vpermilvar.pd.256", - "llvm.x86.avx.vpermilvar.ps", - "llvm.x86.avx.vpermilvar.ps.256", - "llvm.x86.avx.vtestc.pd", - "llvm.x86.avx.vtestc.pd.256", - "llvm.x86.avx.vtestc.ps", - "llvm.x86.avx.vtestc.ps.256", - "llvm.x86.avx.vtestnzc.pd", - "llvm.x86.avx.vtestnzc.pd.256", - "llvm.x86.avx.vtestnzc.ps", - "llvm.x86.avx.vtestnzc.ps.256", - "llvm.x86.avx.vtestz.pd", - "llvm.x86.avx.vtestz.pd.256", - "llvm.x86.avx.vtestz.ps", - "llvm.x86.avx.vtestz.ps.256", - "llvm.x86.avx.vzeroall", - "llvm.x86.avx.vzeroupper", - "llvm.x86.avx2.gather.d.d", - "llvm.x86.avx2.gather.d.d.256", - "llvm.x86.avx2.gather.d.pd", - "llvm.x86.avx2.gather.d.pd.256", - "llvm.x86.avx2.gather.d.ps", - "llvm.x86.avx2.gather.d.ps.256", - "llvm.x86.avx2.gather.d.q", - "llvm.x86.avx2.gather.d.q.256", - "llvm.x86.avx2.gather.q.d", - "llvm.x86.avx2.gather.q.d.256", - "llvm.x86.avx2.gather.q.pd", - "llvm.x86.avx2.gather.q.pd.256", - "llvm.x86.avx2.gather.q.ps", - "llvm.x86.avx2.gather.q.ps.256", - "llvm.x86.avx2.gather.q.q", - "llvm.x86.avx2.gather.q.q.256", - "llvm.x86.avx2.maskload.d", - "llvm.x86.avx2.maskload.d.256", - "llvm.x86.avx2.maskload.q", - "llvm.x86.avx2.maskload.q.256", - "llvm.x86.avx2.maskstore.d", - "llvm.x86.avx2.maskstore.d.256", - "llvm.x86.avx2.maskstore.q", - "llvm.x86.avx2.maskstore.q.256", - "llvm.x86.avx2.movntdqa", - "llvm.x86.avx2.mpsadbw", - "llvm.x86.avx2.pabs.b", - "llvm.x86.avx2.pabs.d", - "llvm.x86.avx2.pabs.w", - "llvm.x86.avx2.packssdw", - "llvm.x86.avx2.packsswb", - "llvm.x86.avx2.packusdw", - "llvm.x86.avx2.packuswb", - "llvm.x86.avx2.padds.b", - "llvm.x86.avx2.padds.w", - "llvm.x86.avx2.paddus.b", - "llvm.x86.avx2.paddus.w", - "llvm.x86.avx2.pavg.b", - "llvm.x86.avx2.pavg.w", - "llvm.x86.avx2.pblendvb", - "llvm.x86.avx2.permd", - "llvm.x86.avx2.permps", - "llvm.x86.avx2.phadd.d", - "llvm.x86.avx2.phadd.sw", - "llvm.x86.avx2.phadd.w", - "llvm.x86.avx2.phsub.d", - "llvm.x86.avx2.phsub.sw", - "llvm.x86.avx2.phsub.w", - "llvm.x86.avx2.pmadd.ub.sw", - "llvm.x86.avx2.pmadd.wd", - "llvm.x86.avx2.pmovmskb", - "llvm.x86.avx2.pmul.dq", - "llvm.x86.avx2.pmul.hr.sw", - "llvm.x86.avx2.pmulh.w", - "llvm.x86.avx2.pmulhu.w", - "llvm.x86.avx2.pmulu.dq", - "llvm.x86.avx2.psad.bw", - "llvm.x86.avx2.pshuf.b", - "llvm.x86.avx2.psign.b", - "llvm.x86.avx2.psign.d", - "llvm.x86.avx2.psign.w", - "llvm.x86.avx2.psll.d", - "llvm.x86.avx2.psll.q", - "llvm.x86.avx2.psll.w", - "llvm.x86.avx2.pslli.d", - "llvm.x86.avx2.pslli.q", - "llvm.x86.avx2.pslli.w", - "llvm.x86.avx2.psllv.d", - "llvm.x86.avx2.psllv.d.256", - "llvm.x86.avx2.psllv.q", - "llvm.x86.avx2.psllv.q.256", - "llvm.x86.avx2.psra.d", - "llvm.x86.avx2.psra.w", - "llvm.x86.avx2.psrai.d", - "llvm.x86.avx2.psrai.w", - "llvm.x86.avx2.psrav.d", - "llvm.x86.avx2.psrav.d.256", - "llvm.x86.avx2.psrl.d", - "llvm.x86.avx2.psrl.q", - "llvm.x86.avx2.psrl.w", - "llvm.x86.avx2.psrli.d", - "llvm.x86.avx2.psrli.q", - "llvm.x86.avx2.psrli.w", - "llvm.x86.avx2.psrlv.d", - "llvm.x86.avx2.psrlv.d.256", - "llvm.x86.avx2.psrlv.q", - "llvm.x86.avx2.psrlv.q.256", - "llvm.x86.avx2.psubs.b", - "llvm.x86.avx2.psubs.w", - "llvm.x86.avx2.psubus.b", - "llvm.x86.avx2.psubus.w", - "llvm.x86.avx2.vperm2i128", - "llvm.x86.avx512.broadcastmb.128", - "llvm.x86.avx512.broadcastmb.256", - "llvm.x86.avx512.broadcastmb.512", - "llvm.x86.avx512.broadcastmw.128", - "llvm.x86.avx512.broadcastmw.256", - "llvm.x86.avx512.broadcastmw.512", - "llvm.x86.avx512.cvtb2mask.128", - "llvm.x86.avx512.cvtb2mask.256", - "llvm.x86.avx512.cvtb2mask.512", - "llvm.x86.avx512.cvtd2mask.128", - "llvm.x86.avx512.cvtd2mask.256", - "llvm.x86.avx512.cvtd2mask.512", - "llvm.x86.avx512.cvtmask2b.128", - "llvm.x86.avx512.cvtmask2b.256", - "llvm.x86.avx512.cvtmask2b.512", - "llvm.x86.avx512.cvtmask2d.128", - "llvm.x86.avx512.cvtmask2d.256", - "llvm.x86.avx512.cvtmask2d.512", - "llvm.x86.avx512.cvtmask2q.128", - "llvm.x86.avx512.cvtmask2q.256", - "llvm.x86.avx512.cvtmask2q.512", - "llvm.x86.avx512.cvtmask2w.128", - "llvm.x86.avx512.cvtmask2w.256", - "llvm.x86.avx512.cvtmask2w.512", - "llvm.x86.avx512.cvtq2mask.128", - "llvm.x86.avx512.cvtq2mask.256", - "llvm.x86.avx512.cvtq2mask.512", - "llvm.x86.avx512.cvtsi2sd32", - "llvm.x86.avx512.cvtsi2sd64", - "llvm.x86.avx512.cvtsi2ss32", - "llvm.x86.avx512.cvtsi2ss64", - "llvm.x86.avx512.cvttsd2si", - "llvm.x86.avx512.cvttsd2si64", - "llvm.x86.avx512.cvttsd2usi", - "llvm.x86.avx512.cvttsd2usi64", - "llvm.x86.avx512.cvttss2si", - "llvm.x86.avx512.cvttss2si64", - "llvm.x86.avx512.cvttss2usi", - "llvm.x86.avx512.cvttss2usi64", - "llvm.x86.avx512.cvtusi2sd", - "llvm.x86.avx512.cvtusi2ss", - "llvm.x86.avx512.cvtusi642sd", - "llvm.x86.avx512.cvtusi642ss", - "llvm.x86.avx512.cvtw2mask.128", - "llvm.x86.avx512.cvtw2mask.256", - "llvm.x86.avx512.cvtw2mask.512", - "llvm.x86.avx512.exp2.pd", - "llvm.x86.avx512.exp2.ps", - "llvm.x86.avx512.gather.dpd.512", - "llvm.x86.avx512.gather.dpi.512", - "llvm.x86.avx512.gather.dpq.512", - "llvm.x86.avx512.gather.dps.512", - "llvm.x86.avx512.gather.qpd.512", - "llvm.x86.avx512.gather.qpi.512", - "llvm.x86.avx512.gather.qpq.512", - "llvm.x86.avx512.gather.qps.512", - "llvm.x86.avx512.gather3div2.df", - "llvm.x86.avx512.gather3div2.di", - "llvm.x86.avx512.gather3div4.df", - "llvm.x86.avx512.gather3div4.di", - "llvm.x86.avx512.gather3div4.sf", - "llvm.x86.avx512.gather3div4.si", - "llvm.x86.avx512.gather3div8.sf", - "llvm.x86.avx512.gather3div8.si", - "llvm.x86.avx512.gather3siv2.df", - "llvm.x86.avx512.gather3siv2.di", - "llvm.x86.avx512.gather3siv4.df", - "llvm.x86.avx512.gather3siv4.di", - "llvm.x86.avx512.gather3siv4.sf", - "llvm.x86.avx512.gather3siv4.si", - "llvm.x86.avx512.gather3siv8.sf", - "llvm.x86.avx512.gather3siv8.si", - "llvm.x86.avx512.gatherpf.dpd.512", - "llvm.x86.avx512.gatherpf.dps.512", - "llvm.x86.avx512.gatherpf.qpd.512", - "llvm.x86.avx512.gatherpf.qps.512", - "llvm.x86.avx512.kand.w", - "llvm.x86.avx512.kandn.w", - "llvm.x86.avx512.knot.w", - "llvm.x86.avx512.kor.w", - "llvm.x86.avx512.kortestc.w", - "llvm.x86.avx512.kortestz.w", - "llvm.x86.avx512.kunpck.bw", - "llvm.x86.avx512.kunpck.dq", - "llvm.x86.avx512.kunpck.wd", - "llvm.x86.avx512.kxnor.w", - "llvm.x86.avx512.kxor.w", - "llvm.x86.avx512.mask.add.pd.128", - "llvm.x86.avx512.mask.add.pd.256", - "llvm.x86.avx512.mask.add.pd.512", - "llvm.x86.avx512.mask.add.ps.128", - "llvm.x86.avx512.mask.add.ps.256", - "llvm.x86.avx512.mask.add.ps.512", - "llvm.x86.avx512.mask.add.sd.round", - "llvm.x86.avx512.mask.add.ss.round", - "llvm.x86.avx512.mask.and.pd.128", - "llvm.x86.avx512.mask.and.pd.256", - "llvm.x86.avx512.mask.and.pd.512", - "llvm.x86.avx512.mask.and.ps.128", - "llvm.x86.avx512.mask.and.ps.256", - "llvm.x86.avx512.mask.and.ps.512", - "llvm.x86.avx512.mask.andn.pd.128", - "llvm.x86.avx512.mask.andn.pd.256", - "llvm.x86.avx512.mask.andn.pd.512", - "llvm.x86.avx512.mask.andn.ps.128", - "llvm.x86.avx512.mask.andn.ps.256", - "llvm.x86.avx512.mask.andn.ps.512", - "llvm.x86.avx512.mask.broadcastf32x2.256", - "llvm.x86.avx512.mask.broadcastf32x2.512", - "llvm.x86.avx512.mask.broadcastf32x4.256", - "llvm.x86.avx512.mask.broadcastf32x4.512", - "llvm.x86.avx512.mask.broadcastf32x8.512", - "llvm.x86.avx512.mask.broadcastf64x2.256", - "llvm.x86.avx512.mask.broadcastf64x2.512", - "llvm.x86.avx512.mask.broadcastf64x4.512", - "llvm.x86.avx512.mask.broadcasti32x2.128", - "llvm.x86.avx512.mask.broadcasti32x2.256", - "llvm.x86.avx512.mask.broadcasti32x2.512", - "llvm.x86.avx512.mask.broadcasti32x4.256", - "llvm.x86.avx512.mask.broadcasti32x4.512", - "llvm.x86.avx512.mask.broadcasti32x8.512", - "llvm.x86.avx512.mask.broadcasti64x2.256", - "llvm.x86.avx512.mask.broadcasti64x2.512", - "llvm.x86.avx512.mask.broadcasti64x4.512", - "llvm.x86.avx512.mask.cmp.b.128", - "llvm.x86.avx512.mask.cmp.b.256", - "llvm.x86.avx512.mask.cmp.b.512", - "llvm.x86.avx512.mask.cmp.d.128", - "llvm.x86.avx512.mask.cmp.d.256", - "llvm.x86.avx512.mask.cmp.d.512", - "llvm.x86.avx512.mask.cmp.pd.128", - "llvm.x86.avx512.mask.cmp.pd.256", - "llvm.x86.avx512.mask.cmp.pd.512", - "llvm.x86.avx512.mask.cmp.ps.128", - "llvm.x86.avx512.mask.cmp.ps.256", - "llvm.x86.avx512.mask.cmp.ps.512", - "llvm.x86.avx512.mask.cmp.q.128", - "llvm.x86.avx512.mask.cmp.q.256", - "llvm.x86.avx512.mask.cmp.q.512", - "llvm.x86.avx512.mask.cmp.sd", - "llvm.x86.avx512.mask.cmp.ss", - "llvm.x86.avx512.mask.cmp.w.128", - "llvm.x86.avx512.mask.cmp.w.256", - "llvm.x86.avx512.mask.cmp.w.512", - "llvm.x86.avx512.mask.compress.d.128", - "llvm.x86.avx512.mask.compress.d.256", - "llvm.x86.avx512.mask.compress.d.512", - "llvm.x86.avx512.mask.compress.pd.128", - "llvm.x86.avx512.mask.compress.pd.256", - "llvm.x86.avx512.mask.compress.pd.512", - "llvm.x86.avx512.mask.compress.ps.128", - "llvm.x86.avx512.mask.compress.ps.256", - "llvm.x86.avx512.mask.compress.ps.512", - "llvm.x86.avx512.mask.compress.q.128", - "llvm.x86.avx512.mask.compress.q.256", - "llvm.x86.avx512.mask.compress.q.512", - "llvm.x86.avx512.mask.compress.store.d.128", - "llvm.x86.avx512.mask.compress.store.d.256", - "llvm.x86.avx512.mask.compress.store.d.512", - "llvm.x86.avx512.mask.compress.store.pd.128", - "llvm.x86.avx512.mask.compress.store.pd.256", - "llvm.x86.avx512.mask.compress.store.pd.512", - "llvm.x86.avx512.mask.compress.store.ps.128", - "llvm.x86.avx512.mask.compress.store.ps.256", - "llvm.x86.avx512.mask.compress.store.ps.512", - "llvm.x86.avx512.mask.compress.store.q.128", - "llvm.x86.avx512.mask.compress.store.q.256", - "llvm.x86.avx512.mask.compress.store.q.512", - "llvm.x86.avx512.mask.conflict.d.128", - "llvm.x86.avx512.mask.conflict.d.256", - "llvm.x86.avx512.mask.conflict.d.512", - "llvm.x86.avx512.mask.conflict.q.128", - "llvm.x86.avx512.mask.conflict.q.256", - "llvm.x86.avx512.mask.conflict.q.512", - "llvm.x86.avx512.mask.cvtdq2pd.128", - "llvm.x86.avx512.mask.cvtdq2pd.256", - "llvm.x86.avx512.mask.cvtdq2pd.512", - "llvm.x86.avx512.mask.cvtdq2ps.128", - "llvm.x86.avx512.mask.cvtdq2ps.256", - "llvm.x86.avx512.mask.cvtdq2ps.512", - "llvm.x86.avx512.mask.cvtpd2dq.128", - "llvm.x86.avx512.mask.cvtpd2dq.256", - "llvm.x86.avx512.mask.cvtpd2dq.512", - "llvm.x86.avx512.mask.cvtpd2ps", - "llvm.x86.avx512.mask.cvtpd2ps.256", - "llvm.x86.avx512.mask.cvtpd2ps.512", - "llvm.x86.avx512.mask.cvtpd2qq.128", - "llvm.x86.avx512.mask.cvtpd2qq.256", - "llvm.x86.avx512.mask.cvtpd2qq.512", - "llvm.x86.avx512.mask.cvtpd2udq.128", - "llvm.x86.avx512.mask.cvtpd2udq.256", - "llvm.x86.avx512.mask.cvtpd2udq.512", - "llvm.x86.avx512.mask.cvtpd2uqq.128", - "llvm.x86.avx512.mask.cvtpd2uqq.256", - "llvm.x86.avx512.mask.cvtpd2uqq.512", - "llvm.x86.avx512.mask.cvtps2dq.128", - "llvm.x86.avx512.mask.cvtps2dq.256", - "llvm.x86.avx512.mask.cvtps2dq.512", - "llvm.x86.avx512.mask.cvtps2pd.128", - "llvm.x86.avx512.mask.cvtps2pd.256", - "llvm.x86.avx512.mask.cvtps2pd.512", - "llvm.x86.avx512.mask.cvtps2qq.128", - "llvm.x86.avx512.mask.cvtps2qq.256", - "llvm.x86.avx512.mask.cvtps2qq.512", - "llvm.x86.avx512.mask.cvtps2udq.128", - "llvm.x86.avx512.mask.cvtps2udq.256", - "llvm.x86.avx512.mask.cvtps2udq.512", - "llvm.x86.avx512.mask.cvtps2uqq.128", - "llvm.x86.avx512.mask.cvtps2uqq.256", - "llvm.x86.avx512.mask.cvtps2uqq.512", - "llvm.x86.avx512.mask.cvtqq2pd.128", - "llvm.x86.avx512.mask.cvtqq2pd.256", - "llvm.x86.avx512.mask.cvtqq2pd.512", - "llvm.x86.avx512.mask.cvtqq2ps.128", - "llvm.x86.avx512.mask.cvtqq2ps.256", - "llvm.x86.avx512.mask.cvtqq2ps.512", - "llvm.x86.avx512.mask.cvtsd2ss.round", - "llvm.x86.avx512.mask.cvtss2sd.round", - "llvm.x86.avx512.mask.cvttpd2dq.128", - "llvm.x86.avx512.mask.cvttpd2dq.256", - "llvm.x86.avx512.mask.cvttpd2dq.512", - "llvm.x86.avx512.mask.cvttpd2qq.128", - "llvm.x86.avx512.mask.cvttpd2qq.256", - "llvm.x86.avx512.mask.cvttpd2qq.512", - "llvm.x86.avx512.mask.cvttpd2udq.128", - "llvm.x86.avx512.mask.cvttpd2udq.256", - "llvm.x86.avx512.mask.cvttpd2udq.512", - "llvm.x86.avx512.mask.cvttpd2uqq.128", - "llvm.x86.avx512.mask.cvttpd2uqq.256", - "llvm.x86.avx512.mask.cvttpd2uqq.512", - "llvm.x86.avx512.mask.cvttps2dq.128", - "llvm.x86.avx512.mask.cvttps2dq.256", - "llvm.x86.avx512.mask.cvttps2dq.512", - "llvm.x86.avx512.mask.cvttps2qq.128", - "llvm.x86.avx512.mask.cvttps2qq.256", - "llvm.x86.avx512.mask.cvttps2qq.512", - "llvm.x86.avx512.mask.cvttps2udq.128", - "llvm.x86.avx512.mask.cvttps2udq.256", - "llvm.x86.avx512.mask.cvttps2udq.512", - "llvm.x86.avx512.mask.cvttps2uqq.128", - "llvm.x86.avx512.mask.cvttps2uqq.256", - "llvm.x86.avx512.mask.cvttps2uqq.512", - "llvm.x86.avx512.mask.cvtudq2pd.128", - "llvm.x86.avx512.mask.cvtudq2pd.256", - "llvm.x86.avx512.mask.cvtudq2pd.512", - "llvm.x86.avx512.mask.cvtudq2ps.128", - "llvm.x86.avx512.mask.cvtudq2ps.256", - "llvm.x86.avx512.mask.cvtudq2ps.512", - "llvm.x86.avx512.mask.cvtuqq2pd.128", - "llvm.x86.avx512.mask.cvtuqq2pd.256", - "llvm.x86.avx512.mask.cvtuqq2pd.512", - "llvm.x86.avx512.mask.cvtuqq2ps.128", - "llvm.x86.avx512.mask.cvtuqq2ps.256", - "llvm.x86.avx512.mask.cvtuqq2ps.512", - "llvm.x86.avx512.mask.dbpsadbw.128", - "llvm.x86.avx512.mask.dbpsadbw.256", - "llvm.x86.avx512.mask.dbpsadbw.512", - "llvm.x86.avx512.mask.div.pd.128", - "llvm.x86.avx512.mask.div.pd.256", - "llvm.x86.avx512.mask.div.pd.512", - "llvm.x86.avx512.mask.div.ps.128", - "llvm.x86.avx512.mask.div.ps.256", - "llvm.x86.avx512.mask.div.ps.512", - "llvm.x86.avx512.mask.div.sd.round", - "llvm.x86.avx512.mask.div.ss.round", - "llvm.x86.avx512.mask.expand.d.128", - "llvm.x86.avx512.mask.expand.d.256", - "llvm.x86.avx512.mask.expand.d.512", - "llvm.x86.avx512.mask.expand.load.d.128", - "llvm.x86.avx512.mask.expand.load.d.256", - "llvm.x86.avx512.mask.expand.load.d.512", - "llvm.x86.avx512.mask.expand.load.pd.128", - "llvm.x86.avx512.mask.expand.load.pd.256", - "llvm.x86.avx512.mask.expand.load.pd.512", - "llvm.x86.avx512.mask.expand.load.ps.128", - "llvm.x86.avx512.mask.expand.load.ps.256", - "llvm.x86.avx512.mask.expand.load.ps.512", - "llvm.x86.avx512.mask.expand.load.q.128", - "llvm.x86.avx512.mask.expand.load.q.256", - "llvm.x86.avx512.mask.expand.load.q.512", - "llvm.x86.avx512.mask.expand.pd.128", - "llvm.x86.avx512.mask.expand.pd.256", - "llvm.x86.avx512.mask.expand.pd.512", - "llvm.x86.avx512.mask.expand.ps.128", - "llvm.x86.avx512.mask.expand.ps.256", - "llvm.x86.avx512.mask.expand.ps.512", - "llvm.x86.avx512.mask.expand.q.128", - "llvm.x86.avx512.mask.expand.q.256", - "llvm.x86.avx512.mask.expand.q.512", - "llvm.x86.avx512.mask.fixupimm.pd.128", - "llvm.x86.avx512.mask.fixupimm.pd.256", - "llvm.x86.avx512.mask.fixupimm.pd.512", - "llvm.x86.avx512.mask.fixupimm.ps.128", - "llvm.x86.avx512.mask.fixupimm.ps.256", - "llvm.x86.avx512.mask.fixupimm.ps.512", - "llvm.x86.avx512.mask.fixupimm.sd", - "llvm.x86.avx512.mask.fixupimm.ss", - "llvm.x86.avx512.mask.fpclass.pd.128", - "llvm.x86.avx512.mask.fpclass.pd.256", - "llvm.x86.avx512.mask.fpclass.pd.512", - "llvm.x86.avx512.mask.fpclass.ps.128", - "llvm.x86.avx512.mask.fpclass.ps.256", - "llvm.x86.avx512.mask.fpclass.ps.512", - "llvm.x86.avx512.mask.fpclass.sd", - "llvm.x86.avx512.mask.fpclass.ss", - "llvm.x86.avx512.mask.getexp.pd.128", - "llvm.x86.avx512.mask.getexp.pd.256", - "llvm.x86.avx512.mask.getexp.pd.512", - "llvm.x86.avx512.mask.getexp.ps.128", - "llvm.x86.avx512.mask.getexp.ps.256", - "llvm.x86.avx512.mask.getexp.ps.512", - "llvm.x86.avx512.mask.getexp.sd", - "llvm.x86.avx512.mask.getexp.ss", - "llvm.x86.avx512.mask.getmant.pd.128", - "llvm.x86.avx512.mask.getmant.pd.256", - "llvm.x86.avx512.mask.getmant.pd.512", - "llvm.x86.avx512.mask.getmant.ps.128", - "llvm.x86.avx512.mask.getmant.ps.256", - "llvm.x86.avx512.mask.getmant.ps.512", - "llvm.x86.avx512.mask.getmant.sd", - "llvm.x86.avx512.mask.getmant.ss", - "llvm.x86.avx512.mask.insertf32x4.256", - "llvm.x86.avx512.mask.insertf32x4.512", - "llvm.x86.avx512.mask.insertf32x8.512", - "llvm.x86.avx512.mask.insertf64x2.256", - "llvm.x86.avx512.mask.insertf64x2.512", - "llvm.x86.avx512.mask.insertf64x4.512", - "llvm.x86.avx512.mask.inserti32x4.256", - "llvm.x86.avx512.mask.inserti32x4.512", - "llvm.x86.avx512.mask.inserti32x8.512", - "llvm.x86.avx512.mask.inserti64x2.256", - "llvm.x86.avx512.mask.inserti64x2.512", - "llvm.x86.avx512.mask.inserti64x4.512", - "llvm.x86.avx512.mask.lzcnt.d.128", - "llvm.x86.avx512.mask.lzcnt.d.256", - "llvm.x86.avx512.mask.lzcnt.d.512", - "llvm.x86.avx512.mask.lzcnt.q.128", - "llvm.x86.avx512.mask.lzcnt.q.256", - "llvm.x86.avx512.mask.lzcnt.q.512", - "llvm.x86.avx512.mask.max.pd.128", - "llvm.x86.avx512.mask.max.pd.256", - "llvm.x86.avx512.mask.max.pd.512", - "llvm.x86.avx512.mask.max.ps.128", - "llvm.x86.avx512.mask.max.ps.256", - "llvm.x86.avx512.mask.max.ps.512", - "llvm.x86.avx512.mask.max.sd.round", - "llvm.x86.avx512.mask.max.ss.round", - "llvm.x86.avx512.mask.min.pd.128", - "llvm.x86.avx512.mask.min.pd.256", - "llvm.x86.avx512.mask.min.pd.512", - "llvm.x86.avx512.mask.min.ps.128", - "llvm.x86.avx512.mask.min.ps.256", - "llvm.x86.avx512.mask.min.ps.512", - "llvm.x86.avx512.mask.min.sd.round", - "llvm.x86.avx512.mask.min.ss.round", - "llvm.x86.avx512.mask.move.sd", - "llvm.x86.avx512.mask.move.ss", - "llvm.x86.avx512.mask.mul.pd.128", - "llvm.x86.avx512.mask.mul.pd.256", - "llvm.x86.avx512.mask.mul.pd.512", - "llvm.x86.avx512.mask.mul.ps.128", - "llvm.x86.avx512.mask.mul.ps.256", - "llvm.x86.avx512.mask.mul.ps.512", - "llvm.x86.avx512.mask.mul.sd.round", - "llvm.x86.avx512.mask.mul.ss.round", - "llvm.x86.avx512.mask.or.pd.128", - "llvm.x86.avx512.mask.or.pd.256", - "llvm.x86.avx512.mask.or.pd.512", - "llvm.x86.avx512.mask.or.ps.128", - "llvm.x86.avx512.mask.or.ps.256", - "llvm.x86.avx512.mask.or.ps.512", - "llvm.x86.avx512.mask.pabs.b.128", - "llvm.x86.avx512.mask.pabs.b.256", - "llvm.x86.avx512.mask.pabs.b.512", - "llvm.x86.avx512.mask.pabs.d.128", - "llvm.x86.avx512.mask.pabs.d.256", - "llvm.x86.avx512.mask.pabs.d.512", - "llvm.x86.avx512.mask.pabs.q.128", - "llvm.x86.avx512.mask.pabs.q.256", - "llvm.x86.avx512.mask.pabs.q.512", - "llvm.x86.avx512.mask.pabs.w.128", - "llvm.x86.avx512.mask.pabs.w.256", - "llvm.x86.avx512.mask.pabs.w.512", - "llvm.x86.avx512.mask.packssdw.128", - "llvm.x86.avx512.mask.packssdw.256", - "llvm.x86.avx512.mask.packssdw.512", - "llvm.x86.avx512.mask.packsswb.128", - "llvm.x86.avx512.mask.packsswb.256", - "llvm.x86.avx512.mask.packsswb.512", - "llvm.x86.avx512.mask.packusdw.128", - "llvm.x86.avx512.mask.packusdw.256", - "llvm.x86.avx512.mask.packusdw.512", - "llvm.x86.avx512.mask.packuswb.128", - "llvm.x86.avx512.mask.packuswb.256", - "llvm.x86.avx512.mask.packuswb.512", - "llvm.x86.avx512.mask.padd.b.128", - "llvm.x86.avx512.mask.padd.b.256", - "llvm.x86.avx512.mask.padd.b.512", - "llvm.x86.avx512.mask.padd.d.128", - "llvm.x86.avx512.mask.padd.d.256", - "llvm.x86.avx512.mask.padd.d.512", - "llvm.x86.avx512.mask.padd.q.128", - "llvm.x86.avx512.mask.padd.q.256", - "llvm.x86.avx512.mask.padd.q.512", - "llvm.x86.avx512.mask.padd.w.128", - "llvm.x86.avx512.mask.padd.w.256", - "llvm.x86.avx512.mask.padd.w.512", - "llvm.x86.avx512.mask.padds.b.128", - "llvm.x86.avx512.mask.padds.b.256", - "llvm.x86.avx512.mask.padds.b.512", - "llvm.x86.avx512.mask.padds.w.128", - "llvm.x86.avx512.mask.padds.w.256", - "llvm.x86.avx512.mask.padds.w.512", - "llvm.x86.avx512.mask.paddus.b.128", - "llvm.x86.avx512.mask.paddus.b.256", - "llvm.x86.avx512.mask.paddus.b.512", - "llvm.x86.avx512.mask.paddus.w.128", - "llvm.x86.avx512.mask.paddus.w.256", - "llvm.x86.avx512.mask.paddus.w.512", - "llvm.x86.avx512.mask.pavg.b.128", - "llvm.x86.avx512.mask.pavg.b.256", - "llvm.x86.avx512.mask.pavg.b.512", - "llvm.x86.avx512.mask.pavg.w.128", - "llvm.x86.avx512.mask.pavg.w.256", - "llvm.x86.avx512.mask.pavg.w.512", - "llvm.x86.avx512.mask.pbroadcast.b.gpr.128", - "llvm.x86.avx512.mask.pbroadcast.b.gpr.256", - "llvm.x86.avx512.mask.pbroadcast.b.gpr.512", - "llvm.x86.avx512.mask.pbroadcast.d.gpr.128", - "llvm.x86.avx512.mask.pbroadcast.d.gpr.256", - "llvm.x86.avx512.mask.pbroadcast.d.gpr.512", - "llvm.x86.avx512.mask.pbroadcast.q.gpr.128", - "llvm.x86.avx512.mask.pbroadcast.q.gpr.256", - "llvm.x86.avx512.mask.pbroadcast.q.gpr.512", - "llvm.x86.avx512.mask.pbroadcast.q.mem.512", - "llvm.x86.avx512.mask.pbroadcast.w.gpr.128", - "llvm.x86.avx512.mask.pbroadcast.w.gpr.256", - "llvm.x86.avx512.mask.pbroadcast.w.gpr.512", - "llvm.x86.avx512.mask.permvar.df.256", - "llvm.x86.avx512.mask.permvar.df.512", - "llvm.x86.avx512.mask.permvar.di.256", - "llvm.x86.avx512.mask.permvar.di.512", - "llvm.x86.avx512.mask.permvar.hi.128", - "llvm.x86.avx512.mask.permvar.hi.256", - "llvm.x86.avx512.mask.permvar.hi.512", - "llvm.x86.avx512.mask.permvar.qi.128", - "llvm.x86.avx512.mask.permvar.qi.256", - "llvm.x86.avx512.mask.permvar.qi.512", - "llvm.x86.avx512.mask.permvar.sf.256", - "llvm.x86.avx512.mask.permvar.sf.512", - "llvm.x86.avx512.mask.permvar.si.256", - "llvm.x86.avx512.mask.permvar.si.512", - "llvm.x86.avx512.mask.pmaddubs.w.128", - "llvm.x86.avx512.mask.pmaddubs.w.256", - "llvm.x86.avx512.mask.pmaddubs.w.512", - "llvm.x86.avx512.mask.pmaddw.d.128", - "llvm.x86.avx512.mask.pmaddw.d.256", - "llvm.x86.avx512.mask.pmaddw.d.512", - "llvm.x86.avx512.mask.pmaxs.b.128", - "llvm.x86.avx512.mask.pmaxs.b.256", - "llvm.x86.avx512.mask.pmaxs.b.512", - "llvm.x86.avx512.mask.pmaxs.d.128", - "llvm.x86.avx512.mask.pmaxs.d.256", - "llvm.x86.avx512.mask.pmaxs.d.512", - "llvm.x86.avx512.mask.pmaxs.q.128", - "llvm.x86.avx512.mask.pmaxs.q.256", - "llvm.x86.avx512.mask.pmaxs.q.512", - "llvm.x86.avx512.mask.pmaxs.w.128", - "llvm.x86.avx512.mask.pmaxs.w.256", - "llvm.x86.avx512.mask.pmaxs.w.512", - "llvm.x86.avx512.mask.pmaxu.b.128", - "llvm.x86.avx512.mask.pmaxu.b.256", - "llvm.x86.avx512.mask.pmaxu.b.512", - "llvm.x86.avx512.mask.pmaxu.d.128", - "llvm.x86.avx512.mask.pmaxu.d.256", - "llvm.x86.avx512.mask.pmaxu.d.512", - "llvm.x86.avx512.mask.pmaxu.q.128", - "llvm.x86.avx512.mask.pmaxu.q.256", - "llvm.x86.avx512.mask.pmaxu.q.512", - "llvm.x86.avx512.mask.pmaxu.w.128", - "llvm.x86.avx512.mask.pmaxu.w.256", - "llvm.x86.avx512.mask.pmaxu.w.512", - "llvm.x86.avx512.mask.pmins.b.128", - "llvm.x86.avx512.mask.pmins.b.256", - "llvm.x86.avx512.mask.pmins.b.512", - "llvm.x86.avx512.mask.pmins.d.128", - "llvm.x86.avx512.mask.pmins.d.256", - "llvm.x86.avx512.mask.pmins.d.512", - "llvm.x86.avx512.mask.pmins.q.128", - "llvm.x86.avx512.mask.pmins.q.256", - "llvm.x86.avx512.mask.pmins.q.512", - "llvm.x86.avx512.mask.pmins.w.128", - "llvm.x86.avx512.mask.pmins.w.256", - "llvm.x86.avx512.mask.pmins.w.512", - "llvm.x86.avx512.mask.pminu.b.128", - "llvm.x86.avx512.mask.pminu.b.256", - "llvm.x86.avx512.mask.pminu.b.512", - "llvm.x86.avx512.mask.pminu.d.128", - "llvm.x86.avx512.mask.pminu.d.256", - "llvm.x86.avx512.mask.pminu.d.512", - "llvm.x86.avx512.mask.pminu.q.128", - "llvm.x86.avx512.mask.pminu.q.256", - "llvm.x86.avx512.mask.pminu.q.512", - "llvm.x86.avx512.mask.pminu.w.128", - "llvm.x86.avx512.mask.pminu.w.256", - "llvm.x86.avx512.mask.pminu.w.512", - "llvm.x86.avx512.mask.pmov.db.128", - "llvm.x86.avx512.mask.pmov.db.256", - "llvm.x86.avx512.mask.pmov.db.512", - "llvm.x86.avx512.mask.pmov.db.mem.128", - "llvm.x86.avx512.mask.pmov.db.mem.256", - "llvm.x86.avx512.mask.pmov.db.mem.512", - "llvm.x86.avx512.mask.pmov.dw.128", - "llvm.x86.avx512.mask.pmov.dw.256", - "llvm.x86.avx512.mask.pmov.dw.512", - "llvm.x86.avx512.mask.pmov.dw.mem.128", - "llvm.x86.avx512.mask.pmov.dw.mem.256", - "llvm.x86.avx512.mask.pmov.dw.mem.512", - "llvm.x86.avx512.mask.pmov.qb.128", - "llvm.x86.avx512.mask.pmov.qb.256", - "llvm.x86.avx512.mask.pmov.qb.512", - "llvm.x86.avx512.mask.pmov.qb.mem.128", - "llvm.x86.avx512.mask.pmov.qb.mem.256", - "llvm.x86.avx512.mask.pmov.qb.mem.512", - "llvm.x86.avx512.mask.pmov.qd.128", - "llvm.x86.avx512.mask.pmov.qd.256", - "llvm.x86.avx512.mask.pmov.qd.512", - "llvm.x86.avx512.mask.pmov.qd.mem.128", - "llvm.x86.avx512.mask.pmov.qd.mem.256", - "llvm.x86.avx512.mask.pmov.qd.mem.512", - "llvm.x86.avx512.mask.pmov.qw.128", - "llvm.x86.avx512.mask.pmov.qw.256", - "llvm.x86.avx512.mask.pmov.qw.512", - "llvm.x86.avx512.mask.pmov.qw.mem.128", - "llvm.x86.avx512.mask.pmov.qw.mem.256", - "llvm.x86.avx512.mask.pmov.qw.mem.512", - "llvm.x86.avx512.mask.pmov.wb.128", - "llvm.x86.avx512.mask.pmov.wb.256", - "llvm.x86.avx512.mask.pmov.wb.512", - "llvm.x86.avx512.mask.pmov.wb.mem.128", - "llvm.x86.avx512.mask.pmov.wb.mem.256", - "llvm.x86.avx512.mask.pmov.wb.mem.512", - "llvm.x86.avx512.mask.pmovs.db.128", - "llvm.x86.avx512.mask.pmovs.db.256", - "llvm.x86.avx512.mask.pmovs.db.512", - "llvm.x86.avx512.mask.pmovs.db.mem.128", - "llvm.x86.avx512.mask.pmovs.db.mem.256", - "llvm.x86.avx512.mask.pmovs.db.mem.512", - "llvm.x86.avx512.mask.pmovs.dw.128", - "llvm.x86.avx512.mask.pmovs.dw.256", - "llvm.x86.avx512.mask.pmovs.dw.512", - "llvm.x86.avx512.mask.pmovs.dw.mem.128", - "llvm.x86.avx512.mask.pmovs.dw.mem.256", - "llvm.x86.avx512.mask.pmovs.dw.mem.512", - "llvm.x86.avx512.mask.pmovs.qb.128", - "llvm.x86.avx512.mask.pmovs.qb.256", - "llvm.x86.avx512.mask.pmovs.qb.512", - "llvm.x86.avx512.mask.pmovs.qb.mem.128", - "llvm.x86.avx512.mask.pmovs.qb.mem.256", - "llvm.x86.avx512.mask.pmovs.qb.mem.512", - "llvm.x86.avx512.mask.pmovs.qd.128", - "llvm.x86.avx512.mask.pmovs.qd.256", - "llvm.x86.avx512.mask.pmovs.qd.512", - "llvm.x86.avx512.mask.pmovs.qd.mem.128", - "llvm.x86.avx512.mask.pmovs.qd.mem.256", - "llvm.x86.avx512.mask.pmovs.qd.mem.512", - "llvm.x86.avx512.mask.pmovs.qw.128", - "llvm.x86.avx512.mask.pmovs.qw.256", - "llvm.x86.avx512.mask.pmovs.qw.512", - "llvm.x86.avx512.mask.pmovs.qw.mem.128", - "llvm.x86.avx512.mask.pmovs.qw.mem.256", - "llvm.x86.avx512.mask.pmovs.qw.mem.512", - "llvm.x86.avx512.mask.pmovs.wb.128", - "llvm.x86.avx512.mask.pmovs.wb.256", - "llvm.x86.avx512.mask.pmovs.wb.512", - "llvm.x86.avx512.mask.pmovs.wb.mem.128", - "llvm.x86.avx512.mask.pmovs.wb.mem.256", - "llvm.x86.avx512.mask.pmovs.wb.mem.512", - "llvm.x86.avx512.mask.pmovsxb.d.128", - "llvm.x86.avx512.mask.pmovsxb.d.256", - "llvm.x86.avx512.mask.pmovsxb.d.512", - "llvm.x86.avx512.mask.pmovsxb.q.128", - "llvm.x86.avx512.mask.pmovsxb.q.256", - "llvm.x86.avx512.mask.pmovsxb.q.512", - "llvm.x86.avx512.mask.pmovsxb.w.128", - "llvm.x86.avx512.mask.pmovsxb.w.256", - "llvm.x86.avx512.mask.pmovsxb.w.512", - "llvm.x86.avx512.mask.pmovsxd.q.128", - "llvm.x86.avx512.mask.pmovsxd.q.256", - "llvm.x86.avx512.mask.pmovsxd.q.512", - "llvm.x86.avx512.mask.pmovsxw.d.128", - "llvm.x86.avx512.mask.pmovsxw.d.256", - "llvm.x86.avx512.mask.pmovsxw.d.512", - "llvm.x86.avx512.mask.pmovsxw.q.128", - "llvm.x86.avx512.mask.pmovsxw.q.256", - "llvm.x86.avx512.mask.pmovsxw.q.512", - "llvm.x86.avx512.mask.pmovus.db.128", - "llvm.x86.avx512.mask.pmovus.db.256", - "llvm.x86.avx512.mask.pmovus.db.512", - "llvm.x86.avx512.mask.pmovus.db.mem.128", - "llvm.x86.avx512.mask.pmovus.db.mem.256", - "llvm.x86.avx512.mask.pmovus.db.mem.512", - "llvm.x86.avx512.mask.pmovus.dw.128", - "llvm.x86.avx512.mask.pmovus.dw.256", - "llvm.x86.avx512.mask.pmovus.dw.512", - "llvm.x86.avx512.mask.pmovus.dw.mem.128", - "llvm.x86.avx512.mask.pmovus.dw.mem.256", - "llvm.x86.avx512.mask.pmovus.dw.mem.512", - "llvm.x86.avx512.mask.pmovus.qb.128", - "llvm.x86.avx512.mask.pmovus.qb.256", - "llvm.x86.avx512.mask.pmovus.qb.512", - "llvm.x86.avx512.mask.pmovus.qb.mem.128", - "llvm.x86.avx512.mask.pmovus.qb.mem.256", - "llvm.x86.avx512.mask.pmovus.qb.mem.512", - "llvm.x86.avx512.mask.pmovus.qd.128", - "llvm.x86.avx512.mask.pmovus.qd.256", - "llvm.x86.avx512.mask.pmovus.qd.512", - "llvm.x86.avx512.mask.pmovus.qd.mem.128", - "llvm.x86.avx512.mask.pmovus.qd.mem.256", - "llvm.x86.avx512.mask.pmovus.qd.mem.512", - "llvm.x86.avx512.mask.pmovus.qw.128", - "llvm.x86.avx512.mask.pmovus.qw.256", - "llvm.x86.avx512.mask.pmovus.qw.512", - "llvm.x86.avx512.mask.pmovus.qw.mem.128", - "llvm.x86.avx512.mask.pmovus.qw.mem.256", - "llvm.x86.avx512.mask.pmovus.qw.mem.512", - "llvm.x86.avx512.mask.pmovus.wb.128", - "llvm.x86.avx512.mask.pmovus.wb.256", - "llvm.x86.avx512.mask.pmovus.wb.512", - "llvm.x86.avx512.mask.pmovus.wb.mem.128", - "llvm.x86.avx512.mask.pmovus.wb.mem.256", - "llvm.x86.avx512.mask.pmovus.wb.mem.512", - "llvm.x86.avx512.mask.pmovzxb.d.128", - "llvm.x86.avx512.mask.pmovzxb.d.256", - "llvm.x86.avx512.mask.pmovzxb.d.512", - "llvm.x86.avx512.mask.pmovzxb.q.128", - "llvm.x86.avx512.mask.pmovzxb.q.256", - "llvm.x86.avx512.mask.pmovzxb.q.512", - "llvm.x86.avx512.mask.pmovzxb.w.128", - "llvm.x86.avx512.mask.pmovzxb.w.256", - "llvm.x86.avx512.mask.pmovzxb.w.512", - "llvm.x86.avx512.mask.pmovzxd.q.128", - "llvm.x86.avx512.mask.pmovzxd.q.256", - "llvm.x86.avx512.mask.pmovzxd.q.512", - "llvm.x86.avx512.mask.pmovzxw.d.128", - "llvm.x86.avx512.mask.pmovzxw.d.256", - "llvm.x86.avx512.mask.pmovzxw.d.512", - "llvm.x86.avx512.mask.pmovzxw.q.128", - "llvm.x86.avx512.mask.pmovzxw.q.256", - "llvm.x86.avx512.mask.pmovzxw.q.512", - "llvm.x86.avx512.mask.pmul.dq.128", - "llvm.x86.avx512.mask.pmul.dq.256", - "llvm.x86.avx512.mask.pmul.dq.512", - "llvm.x86.avx512.mask.pmul.hr.sw.128", - "llvm.x86.avx512.mask.pmul.hr.sw.256", - "llvm.x86.avx512.mask.pmul.hr.sw.512", - "llvm.x86.avx512.mask.pmulh.w.128", - "llvm.x86.avx512.mask.pmulh.w.256", - "llvm.x86.avx512.mask.pmulh.w.512", - "llvm.x86.avx512.mask.pmulhu.w.128", - "llvm.x86.avx512.mask.pmulhu.w.256", - "llvm.x86.avx512.mask.pmulhu.w.512", - "llvm.x86.avx512.mask.pmull.d.128", - "llvm.x86.avx512.mask.pmull.d.256", - "llvm.x86.avx512.mask.pmull.d.512", - "llvm.x86.avx512.mask.pmull.q.128", - "llvm.x86.avx512.mask.pmull.q.256", - "llvm.x86.avx512.mask.pmull.q.512", - "llvm.x86.avx512.mask.pmull.w.128", - "llvm.x86.avx512.mask.pmull.w.256", - "llvm.x86.avx512.mask.pmull.w.512", - "llvm.x86.avx512.mask.pmultishift.qb.128", - "llvm.x86.avx512.mask.pmultishift.qb.256", - "llvm.x86.avx512.mask.pmultishift.qb.512", - "llvm.x86.avx512.mask.pmulu.dq.128", - "llvm.x86.avx512.mask.pmulu.dq.256", - "llvm.x86.avx512.mask.pmulu.dq.512", - "llvm.x86.avx512.mask.prol.d.128", - "llvm.x86.avx512.mask.prol.d.256", - "llvm.x86.avx512.mask.prol.d.512", - "llvm.x86.avx512.mask.prol.q.128", - "llvm.x86.avx512.mask.prol.q.256", - "llvm.x86.avx512.mask.prol.q.512", - "llvm.x86.avx512.mask.prolv.d.128", - "llvm.x86.avx512.mask.prolv.d.256", - "llvm.x86.avx512.mask.prolv.d.512", - "llvm.x86.avx512.mask.prolv.q.128", - "llvm.x86.avx512.mask.prolv.q.256", - "llvm.x86.avx512.mask.prolv.q.512", - "llvm.x86.avx512.mask.pror.d.128", - "llvm.x86.avx512.mask.pror.d.256", - "llvm.x86.avx512.mask.pror.d.512", - "llvm.x86.avx512.mask.pror.q.128", - "llvm.x86.avx512.mask.pror.q.256", - "llvm.x86.avx512.mask.pror.q.512", - "llvm.x86.avx512.mask.prorv.d.128", - "llvm.x86.avx512.mask.prorv.d.256", - "llvm.x86.avx512.mask.prorv.d.512", - "llvm.x86.avx512.mask.prorv.q.128", - "llvm.x86.avx512.mask.prorv.q.256", - "llvm.x86.avx512.mask.prorv.q.512", - "llvm.x86.avx512.mask.pshuf.b.128", - "llvm.x86.avx512.mask.pshuf.b.256", - "llvm.x86.avx512.mask.pshuf.b.512", - "llvm.x86.avx512.mask.psll.d", - "llvm.x86.avx512.mask.psll.d.128", - "llvm.x86.avx512.mask.psll.d.256", - "llvm.x86.avx512.mask.psll.di.128", - "llvm.x86.avx512.mask.psll.di.256", - "llvm.x86.avx512.mask.psll.di.512", - "llvm.x86.avx512.mask.psll.q", - "llvm.x86.avx512.mask.psll.q.128", - "llvm.x86.avx512.mask.psll.q.256", - "llvm.x86.avx512.mask.psll.qi.128", - "llvm.x86.avx512.mask.psll.qi.256", - "llvm.x86.avx512.mask.psll.qi.512", - "llvm.x86.avx512.mask.psll.w.128", - "llvm.x86.avx512.mask.psll.w.256", - "llvm.x86.avx512.mask.psll.w.512", - "llvm.x86.avx512.mask.psll.wi.128", - "llvm.x86.avx512.mask.psll.wi.256", - "llvm.x86.avx512.mask.psll.wi.512", - "llvm.x86.avx512.mask.psllv.d", - "llvm.x86.avx512.mask.psllv.q", - "llvm.x86.avx512.mask.psllv16.hi", - "llvm.x86.avx512.mask.psllv2.di", - "llvm.x86.avx512.mask.psllv32hi", - "llvm.x86.avx512.mask.psllv4.di", - "llvm.x86.avx512.mask.psllv4.si", - "llvm.x86.avx512.mask.psllv8.hi", - "llvm.x86.avx512.mask.psllv8.si", - "llvm.x86.avx512.mask.psra.d", - "llvm.x86.avx512.mask.psra.d.128", - "llvm.x86.avx512.mask.psra.d.256", - "llvm.x86.avx512.mask.psra.di.128", - "llvm.x86.avx512.mask.psra.di.256", - "llvm.x86.avx512.mask.psra.di.512", - "llvm.x86.avx512.mask.psra.q", - "llvm.x86.avx512.mask.psra.q.128", - "llvm.x86.avx512.mask.psra.q.256", - "llvm.x86.avx512.mask.psra.qi.128", - "llvm.x86.avx512.mask.psra.qi.256", - "llvm.x86.avx512.mask.psra.qi.512", - "llvm.x86.avx512.mask.psra.w.128", - "llvm.x86.avx512.mask.psra.w.256", - "llvm.x86.avx512.mask.psra.w.512", - "llvm.x86.avx512.mask.psra.wi.128", - "llvm.x86.avx512.mask.psra.wi.256", - "llvm.x86.avx512.mask.psra.wi.512", - "llvm.x86.avx512.mask.psrav.d", - "llvm.x86.avx512.mask.psrav.q", - "llvm.x86.avx512.mask.psrav.q.128", - "llvm.x86.avx512.mask.psrav.q.256", - "llvm.x86.avx512.mask.psrav16.hi", - "llvm.x86.avx512.mask.psrav32.hi", - "llvm.x86.avx512.mask.psrav4.si", - "llvm.x86.avx512.mask.psrav8.hi", - "llvm.x86.avx512.mask.psrav8.si", - "llvm.x86.avx512.mask.psrl.d", - "llvm.x86.avx512.mask.psrl.d.128", - "llvm.x86.avx512.mask.psrl.d.256", - "llvm.x86.avx512.mask.psrl.di.128", - "llvm.x86.avx512.mask.psrl.di.256", - "llvm.x86.avx512.mask.psrl.di.512", - "llvm.x86.avx512.mask.psrl.q", - "llvm.x86.avx512.mask.psrl.q.128", - "llvm.x86.avx512.mask.psrl.q.256", - "llvm.x86.avx512.mask.psrl.qi.128", - "llvm.x86.avx512.mask.psrl.qi.256", - "llvm.x86.avx512.mask.psrl.qi.512", - "llvm.x86.avx512.mask.psrl.w.128", - "llvm.x86.avx512.mask.psrl.w.256", - "llvm.x86.avx512.mask.psrl.w.512", - "llvm.x86.avx512.mask.psrl.wi.128", - "llvm.x86.avx512.mask.psrl.wi.256", - "llvm.x86.avx512.mask.psrl.wi.512", - "llvm.x86.avx512.mask.psrlv.d", - "llvm.x86.avx512.mask.psrlv.q", - "llvm.x86.avx512.mask.psrlv16.hi", - "llvm.x86.avx512.mask.psrlv2.di", - "llvm.x86.avx512.mask.psrlv32hi", - "llvm.x86.avx512.mask.psrlv4.di", - "llvm.x86.avx512.mask.psrlv4.si", - "llvm.x86.avx512.mask.psrlv8.hi", - "llvm.x86.avx512.mask.psrlv8.si", - "llvm.x86.avx512.mask.psub.b.128", - "llvm.x86.avx512.mask.psub.b.256", - "llvm.x86.avx512.mask.psub.b.512", - "llvm.x86.avx512.mask.psub.d.128", - "llvm.x86.avx512.mask.psub.d.256", - "llvm.x86.avx512.mask.psub.d.512", - "llvm.x86.avx512.mask.psub.q.128", - "llvm.x86.avx512.mask.psub.q.256", - "llvm.x86.avx512.mask.psub.q.512", - "llvm.x86.avx512.mask.psub.w.128", - "llvm.x86.avx512.mask.psub.w.256", - "llvm.x86.avx512.mask.psub.w.512", - "llvm.x86.avx512.mask.psubs.b.128", - "llvm.x86.avx512.mask.psubs.b.256", - "llvm.x86.avx512.mask.psubs.b.512", - "llvm.x86.avx512.mask.psubs.w.128", - "llvm.x86.avx512.mask.psubs.w.256", - "llvm.x86.avx512.mask.psubs.w.512", - "llvm.x86.avx512.mask.psubus.b.128", - "llvm.x86.avx512.mask.psubus.b.256", - "llvm.x86.avx512.mask.psubus.b.512", - "llvm.x86.avx512.mask.psubus.w.128", - "llvm.x86.avx512.mask.psubus.w.256", - "llvm.x86.avx512.mask.psubus.w.512", - "llvm.x86.avx512.mask.pternlog.d.128", - "llvm.x86.avx512.mask.pternlog.d.256", - "llvm.x86.avx512.mask.pternlog.d.512", - "llvm.x86.avx512.mask.pternlog.q.128", - "llvm.x86.avx512.mask.pternlog.q.256", - "llvm.x86.avx512.mask.pternlog.q.512", - "llvm.x86.avx512.mask.range.pd.128", - "llvm.x86.avx512.mask.range.pd.256", - "llvm.x86.avx512.mask.range.pd.512", - "llvm.x86.avx512.mask.range.ps.128", - "llvm.x86.avx512.mask.range.ps.256", - "llvm.x86.avx512.mask.range.ps.512", - "llvm.x86.avx512.mask.range.sd", - "llvm.x86.avx512.mask.range.ss", - "llvm.x86.avx512.mask.reduce.pd.128", - "llvm.x86.avx512.mask.reduce.pd.256", - "llvm.x86.avx512.mask.reduce.pd.512", - "llvm.x86.avx512.mask.reduce.ps.128", - "llvm.x86.avx512.mask.reduce.ps.256", - "llvm.x86.avx512.mask.reduce.ps.512", - "llvm.x86.avx512.mask.reduce.sd", - "llvm.x86.avx512.mask.reduce.ss", - "llvm.x86.avx512.mask.rndscale.pd.128", - "llvm.x86.avx512.mask.rndscale.pd.256", - "llvm.x86.avx512.mask.rndscale.pd.512", - "llvm.x86.avx512.mask.rndscale.ps.128", - "llvm.x86.avx512.mask.rndscale.ps.256", - "llvm.x86.avx512.mask.rndscale.ps.512", - "llvm.x86.avx512.mask.rndscale.sd", - "llvm.x86.avx512.mask.rndscale.ss", - "llvm.x86.avx512.mask.scalef.pd.128", - "llvm.x86.avx512.mask.scalef.pd.256", - "llvm.x86.avx512.mask.scalef.pd.512", - "llvm.x86.avx512.mask.scalef.ps.128", - "llvm.x86.avx512.mask.scalef.ps.256", - "llvm.x86.avx512.mask.scalef.ps.512", - "llvm.x86.avx512.mask.scalef.sd", - "llvm.x86.avx512.mask.scalef.ss", - "llvm.x86.avx512.mask.shuf.f32x4", - "llvm.x86.avx512.mask.shuf.f32x4.256", - "llvm.x86.avx512.mask.shuf.f64x2", - "llvm.x86.avx512.mask.shuf.f64x2.256", - "llvm.x86.avx512.mask.shuf.i32x4", - "llvm.x86.avx512.mask.shuf.i32x4.256", - "llvm.x86.avx512.mask.shuf.i64x2", - "llvm.x86.avx512.mask.shuf.i64x2.256", - "llvm.x86.avx512.mask.shuf.pd.128", - "llvm.x86.avx512.mask.shuf.pd.256", - "llvm.x86.avx512.mask.shuf.pd.512", - "llvm.x86.avx512.mask.shuf.ps.128", - "llvm.x86.avx512.mask.shuf.ps.256", - "llvm.x86.avx512.mask.shuf.ps.512", - "llvm.x86.avx512.mask.sqrt.pd.128", - "llvm.x86.avx512.mask.sqrt.pd.256", - "llvm.x86.avx512.mask.sqrt.pd.512", - "llvm.x86.avx512.mask.sqrt.ps.128", - "llvm.x86.avx512.mask.sqrt.ps.256", - "llvm.x86.avx512.mask.sqrt.ps.512", - "llvm.x86.avx512.mask.sqrt.sd", - "llvm.x86.avx512.mask.sqrt.ss", - "llvm.x86.avx512.mask.store.ss", - "llvm.x86.avx512.mask.sub.pd.128", - "llvm.x86.avx512.mask.sub.pd.256", - "llvm.x86.avx512.mask.sub.pd.512", - "llvm.x86.avx512.mask.sub.ps.128", - "llvm.x86.avx512.mask.sub.ps.256", - "llvm.x86.avx512.mask.sub.ps.512", - "llvm.x86.avx512.mask.sub.sd.round", - "llvm.x86.avx512.mask.sub.ss.round", - "llvm.x86.avx512.mask.ucmp.b.128", - "llvm.x86.avx512.mask.ucmp.b.256", - "llvm.x86.avx512.mask.ucmp.b.512", - "llvm.x86.avx512.mask.ucmp.d.128", - "llvm.x86.avx512.mask.ucmp.d.256", - "llvm.x86.avx512.mask.ucmp.d.512", - "llvm.x86.avx512.mask.ucmp.q.128", - "llvm.x86.avx512.mask.ucmp.q.256", - "llvm.x86.avx512.mask.ucmp.q.512", - "llvm.x86.avx512.mask.ucmp.w.128", - "llvm.x86.avx512.mask.ucmp.w.256", - "llvm.x86.avx512.mask.ucmp.w.512", - "llvm.x86.avx512.mask.valign.d.128", - "llvm.x86.avx512.mask.valign.d.256", - "llvm.x86.avx512.mask.valign.d.512", - "llvm.x86.avx512.mask.valign.q.128", - "llvm.x86.avx512.mask.valign.q.256", - "llvm.x86.avx512.mask.valign.q.512", - "llvm.x86.avx512.mask.vcvtph2ps.128", - "llvm.x86.avx512.mask.vcvtph2ps.256", - "llvm.x86.avx512.mask.vcvtph2ps.512", - "llvm.x86.avx512.mask.vcvtps2ph.128", - "llvm.x86.avx512.mask.vcvtps2ph.256", - "llvm.x86.avx512.mask.vcvtps2ph.512", - "llvm.x86.avx512.mask.vextractf32x4.256", - "llvm.x86.avx512.mask.vextractf32x4.512", - "llvm.x86.avx512.mask.vextractf32x8.512", - "llvm.x86.avx512.mask.vextractf64x2.256", - "llvm.x86.avx512.mask.vextractf64x2.512", - "llvm.x86.avx512.mask.vextractf64x4.512", - "llvm.x86.avx512.mask.vextracti32x4.256", - "llvm.x86.avx512.mask.vextracti32x4.512", - "llvm.x86.avx512.mask.vextracti32x8.512", - "llvm.x86.avx512.mask.vextracti64x2.256", - "llvm.x86.avx512.mask.vextracti64x2.512", - "llvm.x86.avx512.mask.vextracti64x4.512", - "llvm.x86.avx512.mask.vfmadd.pd.128", - "llvm.x86.avx512.mask.vfmadd.pd.256", - "llvm.x86.avx512.mask.vfmadd.pd.512", - "llvm.x86.avx512.mask.vfmadd.ps.128", - "llvm.x86.avx512.mask.vfmadd.ps.256", - "llvm.x86.avx512.mask.vfmadd.ps.512", - "llvm.x86.avx512.mask.vfmadd.sd", - "llvm.x86.avx512.mask.vfmadd.ss", - "llvm.x86.avx512.mask.vfmaddsub.pd.128", - "llvm.x86.avx512.mask.vfmaddsub.pd.256", - "llvm.x86.avx512.mask.vfmaddsub.pd.512", - "llvm.x86.avx512.mask.vfmaddsub.ps.128", - "llvm.x86.avx512.mask.vfmaddsub.ps.256", - "llvm.x86.avx512.mask.vfmaddsub.ps.512", - "llvm.x86.avx512.mask.vfnmadd.pd.128", - "llvm.x86.avx512.mask.vfnmadd.pd.256", - "llvm.x86.avx512.mask.vfnmadd.pd.512", - "llvm.x86.avx512.mask.vfnmadd.ps.128", - "llvm.x86.avx512.mask.vfnmadd.ps.256", - "llvm.x86.avx512.mask.vfnmadd.ps.512", - "llvm.x86.avx512.mask.vfnmsub.pd.128", - "llvm.x86.avx512.mask.vfnmsub.pd.256", - "llvm.x86.avx512.mask.vfnmsub.pd.512", - "llvm.x86.avx512.mask.vfnmsub.ps.128", - "llvm.x86.avx512.mask.vfnmsub.ps.256", - "llvm.x86.avx512.mask.vfnmsub.ps.512", - "llvm.x86.avx512.mask.vpermi2var.d.128", - "llvm.x86.avx512.mask.vpermi2var.d.256", - "llvm.x86.avx512.mask.vpermi2var.d.512", - "llvm.x86.avx512.mask.vpermi2var.hi.128", - "llvm.x86.avx512.mask.vpermi2var.hi.256", - "llvm.x86.avx512.mask.vpermi2var.hi.512", - "llvm.x86.avx512.mask.vpermi2var.pd.128", - "llvm.x86.avx512.mask.vpermi2var.pd.256", - "llvm.x86.avx512.mask.vpermi2var.pd.512", - "llvm.x86.avx512.mask.vpermi2var.ps.128", - "llvm.x86.avx512.mask.vpermi2var.ps.256", - "llvm.x86.avx512.mask.vpermi2var.ps.512", - "llvm.x86.avx512.mask.vpermi2var.q.128", - "llvm.x86.avx512.mask.vpermi2var.q.256", - "llvm.x86.avx512.mask.vpermi2var.q.512", - "llvm.x86.avx512.mask.vpermi2var.qi.128", - "llvm.x86.avx512.mask.vpermi2var.qi.256", - "llvm.x86.avx512.mask.vpermi2var.qi.512", - "llvm.x86.avx512.mask.vpermilvar.pd.128", - "llvm.x86.avx512.mask.vpermilvar.pd.256", - "llvm.x86.avx512.mask.vpermilvar.pd.512", - "llvm.x86.avx512.mask.vpermilvar.ps.128", - "llvm.x86.avx512.mask.vpermilvar.ps.256", - "llvm.x86.avx512.mask.vpermilvar.ps.512", - "llvm.x86.avx512.mask.vpermt2var.d.128", - "llvm.x86.avx512.mask.vpermt2var.d.256", - "llvm.x86.avx512.mask.vpermt2var.d.512", - "llvm.x86.avx512.mask.vpermt2var.hi.128", - "llvm.x86.avx512.mask.vpermt2var.hi.256", - "llvm.x86.avx512.mask.vpermt2var.hi.512", - "llvm.x86.avx512.mask.vpermt2var.pd.128", - "llvm.x86.avx512.mask.vpermt2var.pd.256", - "llvm.x86.avx512.mask.vpermt2var.pd.512", - "llvm.x86.avx512.mask.vpermt2var.ps.128", - "llvm.x86.avx512.mask.vpermt2var.ps.256", - "llvm.x86.avx512.mask.vpermt2var.ps.512", - "llvm.x86.avx512.mask.vpermt2var.q.128", - "llvm.x86.avx512.mask.vpermt2var.q.256", - "llvm.x86.avx512.mask.vpermt2var.q.512", - "llvm.x86.avx512.mask.vpermt2var.qi.128", - "llvm.x86.avx512.mask.vpermt2var.qi.256", - "llvm.x86.avx512.mask.vpermt2var.qi.512", - "llvm.x86.avx512.mask.vpmadd52h.uq.128", - "llvm.x86.avx512.mask.vpmadd52h.uq.256", - "llvm.x86.avx512.mask.vpmadd52h.uq.512", - "llvm.x86.avx512.mask.vpmadd52l.uq.128", - "llvm.x86.avx512.mask.vpmadd52l.uq.256", - "llvm.x86.avx512.mask.vpmadd52l.uq.512", - "llvm.x86.avx512.mask.xor.pd.128", - "llvm.x86.avx512.mask.xor.pd.256", - "llvm.x86.avx512.mask.xor.pd.512", - "llvm.x86.avx512.mask.xor.ps.128", - "llvm.x86.avx512.mask.xor.ps.256", - "llvm.x86.avx512.mask.xor.ps.512", - "llvm.x86.avx512.mask3.vfmadd.pd.128", - "llvm.x86.avx512.mask3.vfmadd.pd.256", - "llvm.x86.avx512.mask3.vfmadd.pd.512", - "llvm.x86.avx512.mask3.vfmadd.ps.128", - "llvm.x86.avx512.mask3.vfmadd.ps.256", - "llvm.x86.avx512.mask3.vfmadd.ps.512", - "llvm.x86.avx512.mask3.vfmadd.sd", - "llvm.x86.avx512.mask3.vfmadd.ss", - "llvm.x86.avx512.mask3.vfmaddsub.pd.128", - "llvm.x86.avx512.mask3.vfmaddsub.pd.256", - "llvm.x86.avx512.mask3.vfmaddsub.pd.512", - "llvm.x86.avx512.mask3.vfmaddsub.ps.128", - "llvm.x86.avx512.mask3.vfmaddsub.ps.256", - "llvm.x86.avx512.mask3.vfmaddsub.ps.512", - "llvm.x86.avx512.mask3.vfmsub.pd.128", - "llvm.x86.avx512.mask3.vfmsub.pd.256", - "llvm.x86.avx512.mask3.vfmsub.pd.512", - "llvm.x86.avx512.mask3.vfmsub.ps.128", - "llvm.x86.avx512.mask3.vfmsub.ps.256", - "llvm.x86.avx512.mask3.vfmsub.ps.512", - "llvm.x86.avx512.mask3.vfmsubadd.pd.128", - "llvm.x86.avx512.mask3.vfmsubadd.pd.256", - "llvm.x86.avx512.mask3.vfmsubadd.pd.512", - "llvm.x86.avx512.mask3.vfmsubadd.ps.128", - "llvm.x86.avx512.mask3.vfmsubadd.ps.256", - "llvm.x86.avx512.mask3.vfmsubadd.ps.512", - "llvm.x86.avx512.mask3.vfnmsub.pd.128", - "llvm.x86.avx512.mask3.vfnmsub.pd.256", - "llvm.x86.avx512.mask3.vfnmsub.pd.512", - "llvm.x86.avx512.mask3.vfnmsub.ps.128", - "llvm.x86.avx512.mask3.vfnmsub.ps.256", - "llvm.x86.avx512.mask3.vfnmsub.ps.512", - "llvm.x86.avx512.maskz.fixupimm.pd.128", - "llvm.x86.avx512.maskz.fixupimm.pd.256", - "llvm.x86.avx512.maskz.fixupimm.pd.512", - "llvm.x86.avx512.maskz.fixupimm.ps.128", - "llvm.x86.avx512.maskz.fixupimm.ps.256", - "llvm.x86.avx512.maskz.fixupimm.ps.512", - "llvm.x86.avx512.maskz.fixupimm.sd", - "llvm.x86.avx512.maskz.fixupimm.ss", - "llvm.x86.avx512.maskz.pternlog.d.128", - "llvm.x86.avx512.maskz.pternlog.d.256", - "llvm.x86.avx512.maskz.pternlog.d.512", - "llvm.x86.avx512.maskz.pternlog.q.128", - "llvm.x86.avx512.maskz.pternlog.q.256", - "llvm.x86.avx512.maskz.pternlog.q.512", - "llvm.x86.avx512.maskz.vfmadd.pd.128", - "llvm.x86.avx512.maskz.vfmadd.pd.256", - "llvm.x86.avx512.maskz.vfmadd.pd.512", - "llvm.x86.avx512.maskz.vfmadd.ps.128", - "llvm.x86.avx512.maskz.vfmadd.ps.256", - "llvm.x86.avx512.maskz.vfmadd.ps.512", - "llvm.x86.avx512.maskz.vfmadd.sd", - "llvm.x86.avx512.maskz.vfmadd.ss", - "llvm.x86.avx512.maskz.vfmaddsub.pd.128", - "llvm.x86.avx512.maskz.vfmaddsub.pd.256", - "llvm.x86.avx512.maskz.vfmaddsub.pd.512", - "llvm.x86.avx512.maskz.vfmaddsub.ps.128", - "llvm.x86.avx512.maskz.vfmaddsub.ps.256", - "llvm.x86.avx512.maskz.vfmaddsub.ps.512", - "llvm.x86.avx512.maskz.vpermt2var.d.128", - "llvm.x86.avx512.maskz.vpermt2var.d.256", - "llvm.x86.avx512.maskz.vpermt2var.d.512", - "llvm.x86.avx512.maskz.vpermt2var.hi.128", - "llvm.x86.avx512.maskz.vpermt2var.hi.256", - "llvm.x86.avx512.maskz.vpermt2var.hi.512", - "llvm.x86.avx512.maskz.vpermt2var.pd.128", - "llvm.x86.avx512.maskz.vpermt2var.pd.256", - "llvm.x86.avx512.maskz.vpermt2var.pd.512", - "llvm.x86.avx512.maskz.vpermt2var.ps.128", - "llvm.x86.avx512.maskz.vpermt2var.ps.256", - "llvm.x86.avx512.maskz.vpermt2var.ps.512", - "llvm.x86.avx512.maskz.vpermt2var.q.128", - "llvm.x86.avx512.maskz.vpermt2var.q.256", - "llvm.x86.avx512.maskz.vpermt2var.q.512", - "llvm.x86.avx512.maskz.vpermt2var.qi.128", - "llvm.x86.avx512.maskz.vpermt2var.qi.256", - "llvm.x86.avx512.maskz.vpermt2var.qi.512", - "llvm.x86.avx512.maskz.vpmadd52h.uq.128", - "llvm.x86.avx512.maskz.vpmadd52h.uq.256", - "llvm.x86.avx512.maskz.vpmadd52h.uq.512", - "llvm.x86.avx512.maskz.vpmadd52l.uq.128", - "llvm.x86.avx512.maskz.vpmadd52l.uq.256", - "llvm.x86.avx512.maskz.vpmadd52l.uq.512", - "llvm.x86.avx512.movntdqa", - "llvm.x86.avx512.pmovzxbd", - "llvm.x86.avx512.pmovzxbq", - "llvm.x86.avx512.pmovzxdq", - "llvm.x86.avx512.pmovzxwd", - "llvm.x86.avx512.pmovzxwq", - "llvm.x86.avx512.psad.bw.512", - "llvm.x86.avx512.ptestm.b.128", - "llvm.x86.avx512.ptestm.b.256", - "llvm.x86.avx512.ptestm.b.512", - "llvm.x86.avx512.ptestm.d.128", - "llvm.x86.avx512.ptestm.d.256", - "llvm.x86.avx512.ptestm.d.512", - "llvm.x86.avx512.ptestm.q.128", - "llvm.x86.avx512.ptestm.q.256", - "llvm.x86.avx512.ptestm.q.512", - "llvm.x86.avx512.ptestm.w.128", - "llvm.x86.avx512.ptestm.w.256", - "llvm.x86.avx512.ptestm.w.512", - "llvm.x86.avx512.ptestnm.b.128", - "llvm.x86.avx512.ptestnm.b.256", - "llvm.x86.avx512.ptestnm.b.512", - "llvm.x86.avx512.ptestnm.d.128", - "llvm.x86.avx512.ptestnm.d.256", - "llvm.x86.avx512.ptestnm.d.512", - "llvm.x86.avx512.ptestnm.q.128", - "llvm.x86.avx512.ptestnm.q.256", - "llvm.x86.avx512.ptestnm.q.512", - "llvm.x86.avx512.ptestnm.w.128", - "llvm.x86.avx512.ptestnm.w.256", - "llvm.x86.avx512.ptestnm.w.512", - "llvm.x86.avx512.rcp14.pd.128", - "llvm.x86.avx512.rcp14.pd.256", - "llvm.x86.avx512.rcp14.pd.512", - "llvm.x86.avx512.rcp14.ps.128", - "llvm.x86.avx512.rcp14.ps.256", - "llvm.x86.avx512.rcp14.ps.512", - "llvm.x86.avx512.rcp14.sd", - "llvm.x86.avx512.rcp14.ss", - "llvm.x86.avx512.rcp28.pd", - "llvm.x86.avx512.rcp28.ps", - "llvm.x86.avx512.rcp28.sd", - "llvm.x86.avx512.rcp28.ss", - "llvm.x86.avx512.rsqrt14.pd.128", - "llvm.x86.avx512.rsqrt14.pd.256", - "llvm.x86.avx512.rsqrt14.pd.512", - "llvm.x86.avx512.rsqrt14.ps.128", - "llvm.x86.avx512.rsqrt14.ps.256", - "llvm.x86.avx512.rsqrt14.ps.512", - "llvm.x86.avx512.rsqrt14.sd", - "llvm.x86.avx512.rsqrt14.ss", - "llvm.x86.avx512.rsqrt28.pd", - "llvm.x86.avx512.rsqrt28.ps", - "llvm.x86.avx512.rsqrt28.sd", - "llvm.x86.avx512.rsqrt28.ss", - "llvm.x86.avx512.scatter.dpd.512", - "llvm.x86.avx512.scatter.dpi.512", - "llvm.x86.avx512.scatter.dpq.512", - "llvm.x86.avx512.scatter.dps.512", - "llvm.x86.avx512.scatter.qpd.512", - "llvm.x86.avx512.scatter.qpi.512", - "llvm.x86.avx512.scatter.qpq.512", - "llvm.x86.avx512.scatter.qps.512", - "llvm.x86.avx512.scatterdiv2.df", - "llvm.x86.avx512.scatterdiv2.di", - "llvm.x86.avx512.scatterdiv4.df", - "llvm.x86.avx512.scatterdiv4.di", - "llvm.x86.avx512.scatterdiv4.sf", - "llvm.x86.avx512.scatterdiv4.si", - "llvm.x86.avx512.scatterdiv8.sf", - "llvm.x86.avx512.scatterdiv8.si", - "llvm.x86.avx512.scatterpf.dpd.512", - "llvm.x86.avx512.scatterpf.dps.512", - "llvm.x86.avx512.scatterpf.qpd.512", - "llvm.x86.avx512.scatterpf.qps.512", - "llvm.x86.avx512.scattersiv2.df", - "llvm.x86.avx512.scattersiv2.di", - "llvm.x86.avx512.scattersiv4.df", - "llvm.x86.avx512.scattersiv4.di", - "llvm.x86.avx512.scattersiv4.sf", - "llvm.x86.avx512.scattersiv4.si", - "llvm.x86.avx512.scattersiv8.sf", - "llvm.x86.avx512.scattersiv8.si", - "llvm.x86.avx512.vbroadcast.sd.512", - "llvm.x86.avx512.vbroadcast.ss.512", - "llvm.x86.avx512.vcomi.sd", - "llvm.x86.avx512.vcomi.ss", - "llvm.x86.avx512.vcvtsd2si32", - "llvm.x86.avx512.vcvtsd2si64", - "llvm.x86.avx512.vcvtsd2usi32", - "llvm.x86.avx512.vcvtsd2usi64", - "llvm.x86.avx512.vcvtss2si32", - "llvm.x86.avx512.vcvtss2si64", - "llvm.x86.avx512.vcvtss2usi32", - "llvm.x86.avx512.vcvtss2usi64", - "llvm.x86.bmi.bextr.32", - "llvm.x86.bmi.bextr.64", - "llvm.x86.bmi.bzhi.32", - "llvm.x86.bmi.bzhi.64", - "llvm.x86.bmi.pdep.32", - "llvm.x86.bmi.pdep.64", - "llvm.x86.bmi.pext.32", - "llvm.x86.bmi.pext.64", - "llvm.x86.clflushopt", - "llvm.x86.flags.read.u32", - "llvm.x86.flags.read.u64", - "llvm.x86.flags.write.u32", - "llvm.x86.flags.write.u64", - "llvm.x86.fma.vfmadd.pd", - "llvm.x86.fma.vfmadd.pd.256", - "llvm.x86.fma.vfmadd.ps", - "llvm.x86.fma.vfmadd.ps.256", - "llvm.x86.fma.vfmadd.sd", - "llvm.x86.fma.vfmadd.ss", - "llvm.x86.fma.vfmaddsub.pd", - "llvm.x86.fma.vfmaddsub.pd.256", - "llvm.x86.fma.vfmaddsub.ps", - "llvm.x86.fma.vfmaddsub.ps.256", - "llvm.x86.fma.vfmsub.pd", - "llvm.x86.fma.vfmsub.pd.256", - "llvm.x86.fma.vfmsub.ps", - "llvm.x86.fma.vfmsub.ps.256", - "llvm.x86.fma.vfmsub.sd", - "llvm.x86.fma.vfmsub.ss", - "llvm.x86.fma.vfmsubadd.pd", - "llvm.x86.fma.vfmsubadd.pd.256", - "llvm.x86.fma.vfmsubadd.ps", - "llvm.x86.fma.vfmsubadd.ps.256", - "llvm.x86.fma.vfnmadd.pd", - "llvm.x86.fma.vfnmadd.pd.256", - "llvm.x86.fma.vfnmadd.ps", - "llvm.x86.fma.vfnmadd.ps.256", - "llvm.x86.fma.vfnmadd.sd", - "llvm.x86.fma.vfnmadd.ss", - "llvm.x86.fma.vfnmsub.pd", - "llvm.x86.fma.vfnmsub.pd.256", - "llvm.x86.fma.vfnmsub.ps", - "llvm.x86.fma.vfnmsub.ps.256", - "llvm.x86.fma.vfnmsub.sd", - "llvm.x86.fma.vfnmsub.ss", - "llvm.x86.fxrstor", - "llvm.x86.fxrstor64", - "llvm.x86.fxsave", - "llvm.x86.fxsave64", - "llvm.x86.int", - "llvm.x86.mmx.emms", - "llvm.x86.mmx.femms", - "llvm.x86.mmx.maskmovq", - "llvm.x86.mmx.movnt.dq", - "llvm.x86.mmx.packssdw", - "llvm.x86.mmx.packsswb", - "llvm.x86.mmx.packuswb", - "llvm.x86.mmx.padd.b", - "llvm.x86.mmx.padd.d", - "llvm.x86.mmx.padd.q", - "llvm.x86.mmx.padd.w", - "llvm.x86.mmx.padds.b", - "llvm.x86.mmx.padds.w", - "llvm.x86.mmx.paddus.b", - "llvm.x86.mmx.paddus.w", - "llvm.x86.mmx.palignr.b", - "llvm.x86.mmx.pand", - "llvm.x86.mmx.pandn", - "llvm.x86.mmx.pavg.b", - "llvm.x86.mmx.pavg.w", - "llvm.x86.mmx.pcmpeq.b", - "llvm.x86.mmx.pcmpeq.d", - "llvm.x86.mmx.pcmpeq.w", - "llvm.x86.mmx.pcmpgt.b", - "llvm.x86.mmx.pcmpgt.d", - "llvm.x86.mmx.pcmpgt.w", - "llvm.x86.mmx.pextr.w", - "llvm.x86.mmx.pinsr.w", - "llvm.x86.mmx.pmadd.wd", - "llvm.x86.mmx.pmaxs.w", - "llvm.x86.mmx.pmaxu.b", - "llvm.x86.mmx.pmins.w", - "llvm.x86.mmx.pminu.b", - "llvm.x86.mmx.pmovmskb", - "llvm.x86.mmx.pmulh.w", - "llvm.x86.mmx.pmulhu.w", - "llvm.x86.mmx.pmull.w", - "llvm.x86.mmx.pmulu.dq", - "llvm.x86.mmx.por", - "llvm.x86.mmx.psad.bw", - "llvm.x86.mmx.psll.d", - "llvm.x86.mmx.psll.q", - "llvm.x86.mmx.psll.w", - "llvm.x86.mmx.pslli.d", - "llvm.x86.mmx.pslli.q", - "llvm.x86.mmx.pslli.w", - "llvm.x86.mmx.psra.d", - "llvm.x86.mmx.psra.w", - "llvm.x86.mmx.psrai.d", - "llvm.x86.mmx.psrai.w", - "llvm.x86.mmx.psrl.d", - "llvm.x86.mmx.psrl.q", - "llvm.x86.mmx.psrl.w", - "llvm.x86.mmx.psrli.d", - "llvm.x86.mmx.psrli.q", - "llvm.x86.mmx.psrli.w", - "llvm.x86.mmx.psub.b", - "llvm.x86.mmx.psub.d", - "llvm.x86.mmx.psub.q", - "llvm.x86.mmx.psub.w", - "llvm.x86.mmx.psubs.b", - "llvm.x86.mmx.psubs.w", - "llvm.x86.mmx.psubus.b", - "llvm.x86.mmx.psubus.w", - "llvm.x86.mmx.punpckhbw", - "llvm.x86.mmx.punpckhdq", - "llvm.x86.mmx.punpckhwd", - "llvm.x86.mmx.punpcklbw", - "llvm.x86.mmx.punpckldq", - "llvm.x86.mmx.punpcklwd", - "llvm.x86.mmx.pxor", - "llvm.x86.monitorx", - "llvm.x86.mwaitx", - "llvm.x86.pclmulqdq", - "llvm.x86.rdfsbase.32", - "llvm.x86.rdfsbase.64", - "llvm.x86.rdgsbase.32", - "llvm.x86.rdgsbase.64", - "llvm.x86.rdpkru", - "llvm.x86.rdpmc", - "llvm.x86.rdrand.16", - "llvm.x86.rdrand.32", - "llvm.x86.rdrand.64", - "llvm.x86.rdseed.16", - "llvm.x86.rdseed.32", - "llvm.x86.rdseed.64", - "llvm.x86.rdtsc", - "llvm.x86.rdtscp", - "llvm.x86.seh.ehguard", - "llvm.x86.seh.ehregnode", - "llvm.x86.seh.lsda", - "llvm.x86.seh.recoverfp", - "llvm.x86.sha1msg1", - "llvm.x86.sha1msg2", - "llvm.x86.sha1nexte", - "llvm.x86.sha1rnds4", - "llvm.x86.sha256msg1", - "llvm.x86.sha256msg2", - "llvm.x86.sha256rnds2", - "llvm.x86.sse.add.ss", - "llvm.x86.sse.cmp.ps", - "llvm.x86.sse.cmp.ss", - "llvm.x86.sse.comieq.ss", - "llvm.x86.sse.comige.ss", - "llvm.x86.sse.comigt.ss", - "llvm.x86.sse.comile.ss", - "llvm.x86.sse.comilt.ss", - "llvm.x86.sse.comineq.ss", - "llvm.x86.sse.cvtpd2pi", - "llvm.x86.sse.cvtpi2pd", - "llvm.x86.sse.cvtpi2ps", - "llvm.x86.sse.cvtps2pi", - "llvm.x86.sse.cvtsi2ss", - "llvm.x86.sse.cvtsi642ss", - "llvm.x86.sse.cvtss2si", - "llvm.x86.sse.cvtss2si64", - "llvm.x86.sse.cvttpd2pi", - "llvm.x86.sse.cvttps2pi", - "llvm.x86.sse.cvttss2si", - "llvm.x86.sse.cvttss2si64", - "llvm.x86.sse.div.ss", - "llvm.x86.sse.ldmxcsr", - "llvm.x86.sse.max.ps", - "llvm.x86.sse.max.ss", - "llvm.x86.sse.min.ps", - "llvm.x86.sse.min.ss", - "llvm.x86.sse.movmsk.ps", - "llvm.x86.sse.mul.ss", - "llvm.x86.sse.pshuf.w", - "llvm.x86.sse.rcp.ps", - "llvm.x86.sse.rcp.ss", - "llvm.x86.sse.rsqrt.ps", - "llvm.x86.sse.rsqrt.ss", - "llvm.x86.sse.sfence", - "llvm.x86.sse.sqrt.ps", - "llvm.x86.sse.sqrt.ss", - "llvm.x86.sse.stmxcsr", - "llvm.x86.sse.sub.ss", - "llvm.x86.sse.ucomieq.ss", - "llvm.x86.sse.ucomige.ss", - "llvm.x86.sse.ucomigt.ss", - "llvm.x86.sse.ucomile.ss", - "llvm.x86.sse.ucomilt.ss", - "llvm.x86.sse.ucomineq.ss", - "llvm.x86.sse2.add.sd", - "llvm.x86.sse2.clflush", - "llvm.x86.sse2.cmp.pd", - "llvm.x86.sse2.cmp.sd", - "llvm.x86.sse2.comieq.sd", - "llvm.x86.sse2.comige.sd", - "llvm.x86.sse2.comigt.sd", - "llvm.x86.sse2.comile.sd", - "llvm.x86.sse2.comilt.sd", - "llvm.x86.sse2.comineq.sd", - "llvm.x86.sse2.cvtdq2ps", - "llvm.x86.sse2.cvtpd2dq", - "llvm.x86.sse2.cvtpd2ps", - "llvm.x86.sse2.cvtps2dq", - "llvm.x86.sse2.cvtsd2si", - "llvm.x86.sse2.cvtsd2si64", - "llvm.x86.sse2.cvtsd2ss", - "llvm.x86.sse2.cvtsi2sd", - "llvm.x86.sse2.cvtsi642sd", - "llvm.x86.sse2.cvtss2sd", - "llvm.x86.sse2.cvttpd2dq", - "llvm.x86.sse2.cvttps2dq", - "llvm.x86.sse2.cvttsd2si", - "llvm.x86.sse2.cvttsd2si64", - "llvm.x86.sse2.div.sd", - "llvm.x86.sse2.lfence", - "llvm.x86.sse2.maskmov.dqu", - "llvm.x86.sse2.max.pd", - "llvm.x86.sse2.max.sd", - "llvm.x86.sse2.mfence", - "llvm.x86.sse2.min.pd", - "llvm.x86.sse2.min.sd", - "llvm.x86.sse2.movmsk.pd", - "llvm.x86.sse2.mul.sd", - "llvm.x86.sse2.packssdw.128", - "llvm.x86.sse2.packsswb.128", - "llvm.x86.sse2.packuswb.128", - "llvm.x86.sse2.padds.b", - "llvm.x86.sse2.padds.w", - "llvm.x86.sse2.paddus.b", - "llvm.x86.sse2.paddus.w", - "llvm.x86.sse2.pause", - "llvm.x86.sse2.pavg.b", - "llvm.x86.sse2.pavg.w", - "llvm.x86.sse2.pmadd.wd", - "llvm.x86.sse2.pmovmskb.128", - "llvm.x86.sse2.pmulh.w", - "llvm.x86.sse2.pmulhu.w", - "llvm.x86.sse2.pmulu.dq", - "llvm.x86.sse2.psad.bw", - "llvm.x86.sse2.psll.d", - "llvm.x86.sse2.psll.q", - "llvm.x86.sse2.psll.w", - "llvm.x86.sse2.pslli.d", - "llvm.x86.sse2.pslli.q", - "llvm.x86.sse2.pslli.w", - "llvm.x86.sse2.psra.d", - "llvm.x86.sse2.psra.w", - "llvm.x86.sse2.psrai.d", - "llvm.x86.sse2.psrai.w", - "llvm.x86.sse2.psrl.d", - "llvm.x86.sse2.psrl.q", - "llvm.x86.sse2.psrl.w", - "llvm.x86.sse2.psrli.d", - "llvm.x86.sse2.psrli.q", - "llvm.x86.sse2.psrli.w", - "llvm.x86.sse2.psubs.b", - "llvm.x86.sse2.psubs.w", - "llvm.x86.sse2.psubus.b", - "llvm.x86.sse2.psubus.w", - "llvm.x86.sse2.sqrt.pd", - "llvm.x86.sse2.sqrt.sd", - "llvm.x86.sse2.sub.sd", - "llvm.x86.sse2.ucomieq.sd", - "llvm.x86.sse2.ucomige.sd", - "llvm.x86.sse2.ucomigt.sd", - "llvm.x86.sse2.ucomile.sd", - "llvm.x86.sse2.ucomilt.sd", - "llvm.x86.sse2.ucomineq.sd", - "llvm.x86.sse3.addsub.pd", - "llvm.x86.sse3.addsub.ps", - "llvm.x86.sse3.hadd.pd", - "llvm.x86.sse3.hadd.ps", - "llvm.x86.sse3.hsub.pd", - "llvm.x86.sse3.hsub.ps", - "llvm.x86.sse3.ldu.dq", - "llvm.x86.sse3.monitor", - "llvm.x86.sse3.mwait", - "llvm.x86.sse41.blendvpd", - "llvm.x86.sse41.blendvps", - "llvm.x86.sse41.dppd", - "llvm.x86.sse41.dpps", - "llvm.x86.sse41.insertps", - "llvm.x86.sse41.movntdqa", - "llvm.x86.sse41.mpsadbw", - "llvm.x86.sse41.packusdw", - "llvm.x86.sse41.pblendvb", - "llvm.x86.sse41.phminposuw", - "llvm.x86.sse41.pmuldq", - "llvm.x86.sse41.ptestc", - "llvm.x86.sse41.ptestnzc", - "llvm.x86.sse41.ptestz", - "llvm.x86.sse41.round.pd", - "llvm.x86.sse41.round.ps", - "llvm.x86.sse41.round.sd", - "llvm.x86.sse41.round.ss", - "llvm.x86.sse42.crc32.32.16", - "llvm.x86.sse42.crc32.32.32", - "llvm.x86.sse42.crc32.32.8", - "llvm.x86.sse42.crc32.64.64", - "llvm.x86.sse42.pcmpestri128", - "llvm.x86.sse42.pcmpestria128", - "llvm.x86.sse42.pcmpestric128", - "llvm.x86.sse42.pcmpestrio128", - "llvm.x86.sse42.pcmpestris128", - "llvm.x86.sse42.pcmpestriz128", - "llvm.x86.sse42.pcmpestrm128", - "llvm.x86.sse42.pcmpistri128", - "llvm.x86.sse42.pcmpistria128", - "llvm.x86.sse42.pcmpistric128", - "llvm.x86.sse42.pcmpistrio128", - "llvm.x86.sse42.pcmpistris128", - "llvm.x86.sse42.pcmpistriz128", - "llvm.x86.sse42.pcmpistrm128", - "llvm.x86.sse4a.extrq", - "llvm.x86.sse4a.extrqi", - "llvm.x86.sse4a.insertq", - "llvm.x86.sse4a.insertqi", - "llvm.x86.ssse3.pabs.b", - "llvm.x86.ssse3.pabs.b.128", - "llvm.x86.ssse3.pabs.d", - "llvm.x86.ssse3.pabs.d.128", - "llvm.x86.ssse3.pabs.w", - "llvm.x86.ssse3.pabs.w.128", - "llvm.x86.ssse3.phadd.d", - "llvm.x86.ssse3.phadd.d.128", - "llvm.x86.ssse3.phadd.sw", - "llvm.x86.ssse3.phadd.sw.128", - "llvm.x86.ssse3.phadd.w", - "llvm.x86.ssse3.phadd.w.128", - "llvm.x86.ssse3.phsub.d", - "llvm.x86.ssse3.phsub.d.128", - "llvm.x86.ssse3.phsub.sw", - "llvm.x86.ssse3.phsub.sw.128", - "llvm.x86.ssse3.phsub.w", - "llvm.x86.ssse3.phsub.w.128", - "llvm.x86.ssse3.pmadd.ub.sw", - "llvm.x86.ssse3.pmadd.ub.sw.128", - "llvm.x86.ssse3.pmul.hr.sw", - "llvm.x86.ssse3.pmul.hr.sw.128", - "llvm.x86.ssse3.pshuf.b", - "llvm.x86.ssse3.pshuf.b.128", - "llvm.x86.ssse3.psign.b", - "llvm.x86.ssse3.psign.b.128", - "llvm.x86.ssse3.psign.d", - "llvm.x86.ssse3.psign.d.128", - "llvm.x86.ssse3.psign.w", - "llvm.x86.ssse3.psign.w.128", - "llvm.x86.subborrow.u32", - "llvm.x86.subborrow.u64", - "llvm.x86.tbm.bextri.u32", - "llvm.x86.tbm.bextri.u64", - "llvm.x86.vcvtph2ps.128", - "llvm.x86.vcvtph2ps.256", - "llvm.x86.vcvtps2ph.128", - "llvm.x86.vcvtps2ph.256", - "llvm.x86.wrfsbase.32", - "llvm.x86.wrfsbase.64", - "llvm.x86.wrgsbase.32", - "llvm.x86.wrgsbase.64", - "llvm.x86.wrpkru", - "llvm.x86.xabort", - "llvm.x86.xbegin", - "llvm.x86.xend", - "llvm.x86.xop.vfrcz.pd", - "llvm.x86.xop.vfrcz.pd.256", - "llvm.x86.xop.vfrcz.ps", - "llvm.x86.xop.vfrcz.ps.256", - "llvm.x86.xop.vfrcz.sd", - "llvm.x86.xop.vfrcz.ss", - "llvm.x86.xop.vpcmov", - "llvm.x86.xop.vpcmov.256", - "llvm.x86.xop.vpcomb", - "llvm.x86.xop.vpcomd", - "llvm.x86.xop.vpcomq", - "llvm.x86.xop.vpcomub", - "llvm.x86.xop.vpcomud", - "llvm.x86.xop.vpcomuq", - "llvm.x86.xop.vpcomuw", - "llvm.x86.xop.vpcomw", - "llvm.x86.xop.vpermil2pd", - "llvm.x86.xop.vpermil2pd.256", - "llvm.x86.xop.vpermil2ps", - "llvm.x86.xop.vpermil2ps.256", - "llvm.x86.xop.vphaddbd", - "llvm.x86.xop.vphaddbq", - "llvm.x86.xop.vphaddbw", - "llvm.x86.xop.vphadddq", - "llvm.x86.xop.vphaddubd", - "llvm.x86.xop.vphaddubq", - "llvm.x86.xop.vphaddubw", - "llvm.x86.xop.vphaddudq", - "llvm.x86.xop.vphadduwd", - "llvm.x86.xop.vphadduwq", - "llvm.x86.xop.vphaddwd", - "llvm.x86.xop.vphaddwq", - "llvm.x86.xop.vphsubbw", - "llvm.x86.xop.vphsubdq", - "llvm.x86.xop.vphsubwd", - "llvm.x86.xop.vpmacsdd", - "llvm.x86.xop.vpmacsdqh", - "llvm.x86.xop.vpmacsdql", - "llvm.x86.xop.vpmacssdd", - "llvm.x86.xop.vpmacssdqh", - "llvm.x86.xop.vpmacssdql", - "llvm.x86.xop.vpmacsswd", - "llvm.x86.xop.vpmacssww", - "llvm.x86.xop.vpmacswd", - "llvm.x86.xop.vpmacsww", - "llvm.x86.xop.vpmadcsswd", - "llvm.x86.xop.vpmadcswd", - "llvm.x86.xop.vpperm", - "llvm.x86.xop.vprotb", - "llvm.x86.xop.vprotbi", - "llvm.x86.xop.vprotd", - "llvm.x86.xop.vprotdi", - "llvm.x86.xop.vprotq", - "llvm.x86.xop.vprotqi", - "llvm.x86.xop.vprotw", - "llvm.x86.xop.vprotwi", - "llvm.x86.xop.vpshab", - "llvm.x86.xop.vpshad", - "llvm.x86.xop.vpshaq", - "llvm.x86.xop.vpshaw", - "llvm.x86.xop.vpshlb", - "llvm.x86.xop.vpshld", - "llvm.x86.xop.vpshlq", - "llvm.x86.xop.vpshlw", - "llvm.x86.xrstor", - "llvm.x86.xrstor64", - "llvm.x86.xrstors", - "llvm.x86.xrstors64", - "llvm.x86.xsave", - "llvm.x86.xsave64", - "llvm.x86.xsavec", - "llvm.x86.xsavec64", - "llvm.x86.xsaveopt", - "llvm.x86.xsaveopt64", - "llvm.x86.xsaves", - "llvm.x86.xsaves64", - "llvm.x86.xtest", - "llvm.xcore.bitrev", - "llvm.xcore.checkevent", - "llvm.xcore.chkct", - "llvm.xcore.clre", - "llvm.xcore.clrpt", - "llvm.xcore.clrsr", - "llvm.xcore.crc32", - "llvm.xcore.crc8", - "llvm.xcore.edu", - "llvm.xcore.eeu", - "llvm.xcore.endin", - "llvm.xcore.freer", - "llvm.xcore.geted", - "llvm.xcore.getet", - "llvm.xcore.getid", - "llvm.xcore.getps", - "llvm.xcore.getr", - "llvm.xcore.getst", - "llvm.xcore.getts", - "llvm.xcore.in", - "llvm.xcore.inct", - "llvm.xcore.initcp", - "llvm.xcore.initdp", - "llvm.xcore.initlr", - "llvm.xcore.initpc", - "llvm.xcore.initsp", - "llvm.xcore.inshr", - "llvm.xcore.int", - "llvm.xcore.mjoin", - "llvm.xcore.msync", - "llvm.xcore.out", - "llvm.xcore.outct", - "llvm.xcore.outshr", - "llvm.xcore.outt", - "llvm.xcore.peek", - "llvm.xcore.setc", - "llvm.xcore.setclk", - "llvm.xcore.setd", - "llvm.xcore.setev", - "llvm.xcore.setps", - "llvm.xcore.setpsc", - "llvm.xcore.setpt", - "llvm.xcore.setrdy", - "llvm.xcore.setsr", - "llvm.xcore.settw", - "llvm.xcore.setv", - "llvm.xcore.sext", - "llvm.xcore.ssync", - "llvm.xcore.syncr", - "llvm.xcore.testct", - "llvm.xcore.testwct", - "llvm.xcore.waitevent", - "llvm.xcore.zext", -#endif - -// Intrinsic ID to overload bitset -#ifdef GET_INTRINSIC_OVERLOAD_TABLE -static const uint8_t OTable[] = { - 0 | (1<<2) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<7), - 0, - 0 | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<5) | (1<<6), - 0 | (1<<0) | (1<<1) | (1<<6), - 0 | (1<<7), - 0 | (1<<3) | (1<<4) | (1<<5) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<3) | (1<<4) | (1<<6) | (1<<7), - 0 | (1<<2) | (1<<3) | (1<<4), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3), - 0 | (1<<2) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<4), - 0, - 0, - 0, - 0 | (1<<1) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<5) | (1<<6), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<7), - 0 | (1<<1) | (1<<2) | (1<<3) | (1<<4), - 0, - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<7), - 0 | (1<<0) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<4) | (1<<5) | (1<<6), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<5) | (1<<7), - 0 | (1<<2) | (1<<5) | (1<<7), - 0 | (1<<0), - 0 | (1<<4) | (1<<5), - 0, - 0, - 0 | (1<<3), - 0 | (1<<1), - 0, - 0, - 0 | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<5) | (1<<6), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5), - 0, - 0, - 0 | (1<<0) | (1<<2) | (1<<6) | (1<<7), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 | (1<<6) | (1<<7), - 0 | (1<<0), - 0, - 0 | (1<<1) | (1<<2), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0, - 0, - 0, - 0 | (1<<4), - 0, - 0, - 0 | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 | (1<<2), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 | (1<<0) | (1<<1), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 | (1<<3), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 | (1<<5) | (1<<6), - 0 | (1<<7), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 | (1<<4) | (1<<5), - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 | (1<<0) | (1<<2) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<5) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<1) | (1<<2) | (1<<3) | (1<<4) | (1<<6) | (1<<7), - 0 | (1<<0) | (1<<2) | (1<<3) | (1<<6) | (1<<7), - 0 | (1<<0) -}; - -return (OTable[id/8] & (1 << (id%8))) != 0; -#endif - -// Global intrinsic function declaration type table. -#ifdef GET_INTRINSIC_GENERATOR_GLOBAL -static const unsigned IIT_Table[] = { - 0x2E2E, (1U<<31) | 1828, 0x10, 0x1F1F, 0x1F1F, 0x2F2F, 0x2F2F, - 0x2E2E0, 0x32F, 0x2F3, 0x44AF2F, 0x449F2F, 0x449F2F, 0x44AF1F, 0x449F1F, - 0x449F1F, 0x44AF1F, 0x449F1F, 0x449F1F, 0x2F2F2F, 0x2F2F, 0x11F1F, 0x1F1F, - 0x11F1F, (1U<<31) | 3716, (1U<<31) | 3710, 0x0, 0x0, 0x42E, (1U<<31) | 3689, (1U<<31) | 3688, - 0x2E40, 0x2E50, 0x40, 0x2E0, 0x2E0, 0x2E, 0x2E4, 0x0, - 0x2E4, 0x0, 0x2F2F, 0x2F2F, 0x1F1F1F, (1U<<31) | 3721, (1U<<31) | 2459, (1U<<31) | 3684, - (1U<<31) | 3745, (1U<<31) | 3725, (1U<<31) | 3737, (1U<<31) | 3729, (1U<<31) | 3754, 0x2F2F, 0x2F2F, 0x4, - 0x2F2F2F2F, 0x2F2F2F2F, 0x42E, 0x2EE2E2E, 0x2E2EE0, 0x2EE2E2E0, 0x1F, 0x2E2E2E0, - 0x4452E0, 0x44552E0, (1U<<31) | 1028, 0x2E2E, (1U<<31) | 1029, 0x2E50, 0x2E50, 0x1F2E2E, - 0x2E, (1U<<31) | 3722, 0x42E2E2E, 0x2F2F, 0x2F2F, 0x2F2F, 0x42E0, (1U<<31) | 1300, - (1U<<31) | 1311, (1U<<31) | 54, (1U<<31) | 64, 0x2F2F2F, (1U<<31) | 74, (1U<<31) | 74, 0x149F24F0, 0x2F2F2F, - 0x2F2F, 0x1CF1F, 0x40, 0x2F2F2F, 0x42F2F, 0x4442E0, (1U<<31) | 1838, (1U<<31) | 3692, - 0x5, 0x42E, 0x2F2F, 0x2F2F, (1U<<31) | 84, 0x2E4, 0x42E0, 0x42E4, - 0x2F2F, (1U<<31) | 84, 0x2F2F, (1U<<31) | 84, 0x2E, 0x2EE2E0, 0x2E0, 0x2E, - 0x2E, 0x0, 0x2F2F, (1U<<31) | 3701, (1U<<31) | 3696, (1U<<31) | 84, (1U<<31) | 84, (1U<<31) | 84, - 0x2E2E0, 0x2E0, 0x2E0, 0x42E2E2E0, (1U<<31) | 93, 0x0, 0x444, 0x444, - 0x444, 0x444, 0x544, 0x444, 0x444, 0x544, 0x2C2C2C, 0x2C2C2C, - 0x2C2C, 0x2C2C, 0x4A44A4A, 0x44, 0x4A44A4A, 0x4A44A4A, 0x4A4A4A4A, 0x4A4A4A, - 0x4A4A4A4A, 0x4A4A4A4A, 0x4A4A4A, 0x4A4A4A4A, 0x40, 0x40, 0x40, 0x40, - (1U<<31) | 1022, 0x4F5, (1U<<31) | 1022, 0x4F5, 0x1F1F, (1U<<31) | 1366, 0x3F3F3F, 0x3F3F, - 0x3F3F3F, 0xAFAF1F, 0xAFAF1F, 0xBF2F, 0xAF1F, 0xAF1F, 0xAF1F, 0xAF1F, - 0xAF1F, 0xAF1F, 0xAF1F, 0xAF1F, 0xBF3F, 0xAF1F, 0xAF1F, 0x3F3F3F, - 0x2F2F2F, 0x3F3F3F, 0xBF2F, 0x3F3F3F, 0xBF2F, 0x3F3F3F, 0x2F2F2F, 0x3F3F3F, - 0xBF2F, 0x3F3F3F, 0xBF2F, 0x2F2F2F, 0x2F2F, 0x2F2F2F, 0x2F2F, 0x2F2F, - 0x2F2F, 0x2F2F2F, (1U<<31) | 3570, (1U<<31) | 3560, (1U<<31) | 3548, (1U<<31) | 3570, (1U<<31) | 3649, (1U<<31) | 3570, - (1U<<31) | 3560, (1U<<31) | 3632, (1U<<31) | 3560, (1U<<31) | 3548, (1U<<31) | 3611, (1U<<31) | 3548, 0x3F3F3F, (1U<<31) | 1378, - 0x552C, (1U<<31) | 1366, 0x3F3F, (1U<<31) | 1385, (1U<<31) | 1366, 0x3F3F3F, 0xBF3F, 0xBF1F, - 0xBF1F, 0x9F1F, 0x9F1F, 0x9F1F, 0x3F3F3F, (1U<<31) | 1373, 0x3F3F3F, 0x3F3F3F, - 0x3F3F3F, 0xBF1F, 0x3F3F3F, 0x3F3F3F, 0xBF1F, (1U<<31) | 1378, 0x1F1F, 0x1F1F1F, - 0x1F1F1F, (1U<<31) | 1378, 0x445, 0x1F1F, 0x1F1F1F, 0x1F1F1F, (1U<<31) | 1385, (1U<<31) | 1385, - 0x1F1F1F, 0x1F1F1F, (1U<<31) | 1385, (1U<<31) | 1385, 0x1F1F1F, (1U<<31) | 98, (1U<<31) | 98, 0x3F3F3F, - 0x1F1F1F, 0x1F1F1F, (1U<<31) | 1992, 0xCF3F3F0, (1U<<31) | 3526, (1U<<31) | 3536, 0xCF3F3F0, (1U<<31) | 3578, - (1U<<31) | 3526, (1U<<31) | 3587, (1U<<31) | 3536, (1U<<31) | 3598, (1U<<31) | 1366, 0x1F1F1F, 0x3F2C3F, 0x3F2C2C3F, - (1U<<31) | 1339, (1U<<31) | 1324, 0x3F2C3F3F, (1U<<31) | 1350, (1U<<31) | 1337, (1U<<31) | 1322, 0x3F3F3F, 0xBF3F, - 0xBF1F, 0xBF1F, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, 0xBF1F, 0x3F3F3F, - 0x3F3F3F, 0xBF1F, (1U<<31) | 1378, 0x1F1F1F, 0x1F1F1F, (1U<<31) | 1385, 0x1F1F1F, (1U<<31) | 1385, - 0x1F1F1F, (1U<<31) | 98, 0x3F3F, 0x3F3F3F, 0x1F1F1F, 0x3F3F, 0x1F1F1F, (1U<<31) | 1992, - 0x1F1F1F, 0x53F5BF3F, 0x4AF1F, 0x4AF1F, 0x7A3A, 0x49F2F, 0x49F2F, 0x3A7A, - 0x43F3F3F, 0x43F3F3F, 0x1F1F, 0x1F1F1F, 0x2F2F2F, 0x87, 0x2E554, 0x4F54, - 0x2E554, 0x4F54, 0x1F1F1F, 0x1FCF1F, 0x1FCF1F, 0x1444A44, 0x1444A44, 0x1444A444, - 0x1444A44, 0x1444A44, 0x1444A44, 0x1444A44, 0x1444A44, 0x1444A44, 0x1444A44, 0x1444A44, - 0x11444A2F, 0x11444A2F, (1U<<31) | 24, (1U<<31) | 24, 0x0, 0x0, 0x0, 0x42F1, - 0x2F2F, 0x7777, 0x7777, 0x7777, 0x7777, (1U<<31) | 117, 0x2F2F2F2F, (1U<<31) | 44, - (1U<<31) | 34, 0x444, 0x444, 0x444, 0x2F2F, 0x2F4, 0x2F2F, 0x4, - (1U<<31) | 14, (1U<<31) | 14, (1U<<31) | 13, (1U<<31) | 14, (1U<<31) | 14, (1U<<31) | 14, (1U<<31) | 14, (1U<<31) | 14, - (1U<<31) | 14, (1U<<31) | 14, (1U<<31) | 14, (1U<<31) | 14, (1U<<31) | 14, (1U<<31) | 1, (1U<<31) | 1, (1U<<31) | 0, - (1U<<31) | 0, (1U<<31) | 117, 0x44447, 0x444477, (1U<<31) | 117, 0x42F2F, 0x4444, 0x2F2F, - 0x444, 0x444, 0x14441F1F, 0x1, (1U<<31) | 117, 0x2F2F, 0x4, 0x2F2F, - 0x2F2F, 0x77, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, - 0x5, 0x5, 0x40, 0x40, 0x2F2F, 0x42F2F, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4444440, 0x4444440, 0x0, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x40, 0x40, 0x40, - 0x4, 0x40, 0x40, 0x4F4, (1U<<31) | 1016, 0x2E440, 0x2E440, 0x2E440, - 0x2E440, 0x4F4, (1U<<31) | 1016, 0x4444440, 0x4444440, 0x444440, 0x444440, 0x444444, - 0x444444, (1U<<31) | 2086, (1U<<31) | 2086, 0x2C2C2C, 0x2C2C2C, 0x2C2C, 0x2C2C, 0x4A44A4A, - 0x44, 0x4A44A4A, 0x4A44A4A, 0x4A4A4A4A, 0x4A4A4A, 0x4A4A4A4A, 0x4A4A4A4A, 0x4A4A4A, - 0x4A4A4A4A, 0x3F3F3F, 0x3F3F3F, 0x3F3F, 0xBFBF3F, 0xBFBF3F, 0x3F3F3F3F, 0x3F3F, - 0xBF3F, 0xBF3F, 0x4AF1F, 0x4AF1F, 0x7A3A, 0x49F2F, 0x49F2F, 0x3A7A, - 0xBF3F, 0xBF3F, 0xBF3F, 0xBF3F, 0xBF3F, 0xBF3F, 0x3F3F3F, 0x3F3F3F, - 0x3F3F3F, 0x3F3F3F, 0x4CF3F, (1U<<31) | 2840, (1U<<31) | 2062, (1U<<31) | 2829, (1U<<31) | 2044, (1U<<31) | 2816, - (1U<<31) | 2022, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, (1U<<31) | 1378, - (1U<<31) | 1378, (1U<<31) | 1378, 0x3F3F3F, 0xBF3F3F, 0xBF3F3F, 0x3F3F3F, 0xBF3F, 0xBF3F, - 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, 0x3F3F, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, - (1U<<31) | 1378, (1U<<31) | 1361, (1U<<31) | 1361, (1U<<31) | 1361, 0x3F3F, 0x3F3F3F, (1U<<31) | 1366, (1U<<31) | 1366, - (1U<<31) | 1366, 0x3F3F3F, 0x3F3F3F, (1U<<31) | 1366, (1U<<31) | 1366, (1U<<31) | 1366, 0x3F3F3F, 0x3F3F3F, - 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, (1U<<31) | 1366, 0x3F3F, 0x3F3F3F, 0x3F3F3F, 0x3F3F3F, - 0x3F3F, 0x3F3F, 0x3F3F, 0x3F3F, 0x3F3F, 0x3F3F, (1U<<31) | 1366, 0x3F3F3F, - 0x3F3F3F, 0x3F3F, 0x3F3F3F, (1U<<31) | 1366, 0x3F3F3F3F, 0x3F3F3F, 0x3F3F3F, 0x4BF4F0, - 0x4BFBF4F0, (1U<<31) | 2328, (1U<<31) | 2765, (1U<<31) | 2338, (1U<<31) | 2776, (1U<<31) | 2350, 0x2B2B2B, 0x2B2B2B2B, - (1U<<31) | 989, (1U<<31) | 987, 0x2B2B2B2B, (1U<<31) | 989, (1U<<31) | 987, (1U<<31) | 985, 0x444, 0x444, - 0x44, 0x40, 0x444, 0x444, 0x2E440, 0x2E440, 0x2E440, 0x2E440, - 0x4F44, 0x2E444, 0x4F44, 0x2E444, 0x40, 0x444, 0x2F7, 0x2F7, - 0x52E5, 0x52E5, 0x52E5, 0x555, 0x44, 0x55, 0x44, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x555, 0x555, 0x444, - 0x545, 0x444, 0x444, 0x555, 0x44, 0x44, 0x444, 0x444, - 0x444, 0x444, 0x445, 0x445, 0x444, 0x555, 0x444, 0x555, - 0x444, 0x555, 0x444, 0x555, 0x44, 0x55, 0x44, 0x44, - 0x55, 0x444, 0x444, 0x555, 0x54, 0x54, 0x44, 0x44, - 0x44, 0x44, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x555, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x44, 0x44, 0x44, 0x45, 0x44, - 0x444, 0x444, 0x55, 0x45, 0x44, 0x55, 0x55, 0x55, - 0x55, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, - 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, - 0x555, 0x555, 0x555, 0x555, 0x555, 0x554, 0x554, 0x554, - 0x554, 0x554, 0x554, 0x554, 0x554, 0x55, 0x555, 0x555, - 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, - 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, - 0x555, 0x5555, 0x555, 0x5555, 0x555, 0x555, 0x555, 0x555, - 0x555, 0x555, 0x555, 0x555, 0x444, 0x555, 0x44, 0x44, - 0x444, 0x555, 0x445, 0x445, 0x544, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x444, 0x445, 0x445, 0x444, 0x444, 0x444, 0x444, 0x555, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x454, 0x554, 0x454, 0x554, 0x454, 0x454, 0x454, 0x454, - 0x454, 0x454, 0x454, 0x454, 0x4555, 0x4555, 0x4555, 0x4555, - 0x4555, 0x4555, 0x4555, 0x4555, 0x554, 0x44, 0x444, 0x444, - 0x44, 0x444, 0x444, 0x444, 0x444, 0x444, 0x554, 0x444, - 0x444, 0x444, 0x444, 0x554, 0x444, 0x444, 0x554, 0x444, - 0x444, 0x45, 0x4444, 0x4444, 0x4444, 0x4444, 0x44, 0x444, - 0x444, 0x44, 0x44, 0x44, 0x444, 0x5545, 0x444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x58, 0x57, 0x85, 0x85, 0x87, 0x85, - 0x85, 0x84, 0x84, 0x84, 0x84, 0x75, 0x75, 0x78, - 0x75, 0x75, 0x74, 0x74, 0x74, 0x74, 0x58, 0x57, - 0x48, 0x47, 0x48, 0x47, 0x484, 0x884, 0x884, 0x884, - 0x884, 0x48, 0x48, 0x777, 0x474, 0x774, 0x774, 0x774, - 0x774, 0x777, 0x777, 0x77, 0x7777, 0x7777, 0x47777, 0x7777, - 0x7777, 0x47, 0x47, 0x777, 0x777, 0x777, 0x777, 0x4E4, - 0x5E5, 0x4444, 0x4444, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, - 0x4455, 0x445, 0x445, 0x444, 0x444, 0x444, 0x444, 0x445, - 0x445, 0x445, 0x445, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, - 0x4455, 0x444, 0x445, 0x4455, 0x4455, 0x445, 0x444, 0x444, - 0x444, 0x444, 0x4444, 0x4444, 0x4444, 0x5555, 0x5555, 0x5555, - 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, - 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x555, 0x555, 0x555, - 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, 0x555, - 0x555, 0x555, 0x555, 0x555, 0x555, 0x4444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, - 0x445, 0x445, 0x445, 0x445, 0x445, 0x445, 0x445, 0x445, - 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, 0x4455, - 0x445, 0x445, 0x445, 0x445, 0x445, 0x445, 0x445, 0x445, - 0x444, 0x444, 0x444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x444, 0x444, 0x444, 0x444, 0x444, - 0x444, 0x444, 0x444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x444, 0x4455, 0x4455, 0x4455, 0x4455, - 0x4455, 0x4455, 0x4455, 0x4455, 0x445, 0x445, 0x445, 0x445, - 0x445, 0x445, 0x445, 0x445, 0x4455, 0x4455, 0x4455, 0x4455, - 0x4455, 0x4455, 0x4455, 0x4455, 0x444, 0x4444, 0x4444, 0x4444, - 0x555, 0x555, 0x5555, 0x5555, 0x555, 0x555, 0x555, 0x555, - 0x5555, 0x5555, 0x554, 0x554, 0x555, 0x555, 0x4455, 0x5555, - 0x5555, 0x5555, 0x4455, 0x4455, 0x4455, 0x4455, 0x555, 0x555, - 0x445, 0x444, 0x445, 0x444, 0x445, 0x445, 0x554, 0x554, - 0x5555, 0x5555, 0x5555, 0x5555, 0x555, 0x555, 0x555, 0x555, - 0x4555, 0x455, 0x454, 0x5555, 0x555, 0x4444, 0x4444, 0x4444, - 0x4444, 0x4444, 0x454, 0x454, 0x454, 0x454, 0x4444, 0x4444, - 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x445, 0x4455, 0x445, 0x4455, 0x5555, 0x5555, 0x555, - 0x555, 0x5555, 0x5555, 0x555, 0x555, 0x4444, 0x4444, 0x4444, - 0x5555, 0x5555, 0x555, 0x4455, 0x4455, 0x445, 0x445, 0x5555, - 0x5555, 0x555, 0x555, 0x555, 0x555, 0x4444, 0x455, 0x4555, - 0x4555, 0x4555, 0x4555, 0x4555, 0x444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x444, 0x4444, 0x455, 0x455, 0x455, 0x4555, 0x4555, - 0x4555, 0x4555, 0x4555, 0x444, 0x4444, 0x4444, 0x4444, 0x4444, - 0x444, 0x455, 0x455, 0x455, 0x4555, 0x4555, 0x4555, 0x4555, - 0x455, 0x455, 0x444, 0x4444, 0x4444, 0x4444, 0x4444, 0x444, - 0x444, 0x454, 0x455, 0x455, 0x455, 0x4555, 0x4555, 0x4555, - 0x4555, 0x4555, 0x444, 0x4444, 0x4444, 0x4444, 0x4444, 0x444, - 0x454, 0x455, 0x455, 0x44, 0x55, 0x4555, 0x44, 0x54, - 0x44, 0x54, 0x44, 0x44, 0x54, 0x444, 0x444, 0x44, - 0x54, 0x44, 0x54, 0x55, 0x4444, 0x544, 0x4455, 0x555, - 0x44444, 0x5444, 0x44555, 0x5555, 0x55, 0x555, 0x455, 0x4555, - 0x4555, 0x4555, 0x4555, 0x4555, 0x444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x455, 0x455, 0x455, 0x4555, 0x4555, 0x4555, 0x4555, - 0x4555, 0x444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x455, - 0x455, 0x455, 0x4555, 0x4555, 0x4555, 0x4555, 0x4555, 0x444, - 0x4444, 0x4444, 0x4444, 0x4444, 0x455, 0x455, 0x445, 0x554, - 0x444, 0x444, 0x555, 0x555, 0x555, 0x555, 0x44E4, 0x44, - 0x44, 0x44444, 0x44444, 0x44444, 0x44444, 0x444, 0x444, 0x444, - 0x444, 0x4555, 0x4555, 0x455, 0x455, 0x4555, 0x54, 0x54, - 0x54, 0x55, 0x54, 0x55, 0x54, 0x55, 0x54, 0x55, - 0x44, 0x45, 0x4555, 0x4555, 0x45, 0x45, 0x54, 0x555, - 0x54, 0x555, 0x45, 0x45, 0x4444, 0x4444, 0x4444, 0x4444, - 0x4444, 0x444, 0x454, 0x54, 0x4444, 0x544, 0x4455, 0x555, - 0x444, 0x444, 0x444, 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, - 0x444, 0x55E4, 0x4444, 0x4444, 0x4444, 0x4455, 0x44555, 0x555, - 0x555, 0x555, 0x555, 0x555, 0x555, 0x454, 0x454, 0x54, - 0x455, 0x455, 0x4555, 0x4555, 0x4555, 0x4555, 0x4555, 0x444, - 0x4444, 0x4444, 0x4444, 0x4444, 0x4444, 0x45, 0x555, 0x555, - 0x44, 0x44C4, 0x44D4, 0x4D4C, (1U<<31) | 2897, 0x4D4C, (1U<<31) | 2897, 0x44C, - 0x44D, (1U<<31) | 103, (1U<<31) | 110, (1U<<31) | 103, (1U<<31) | 110, (1U<<31) | 105, (1U<<31) | 112, (1U<<31) | 103, - (1U<<31) | 110, (1U<<31) | 103, (1U<<31) | 110, (1U<<31) | 1395, (1U<<31) | 1403, (1U<<31) | 103, (1U<<31) | 110, 0x4C4C4C, - 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C, - 0x4D4D, 0x4C4C, 0x4D4D, 0x4C4C, 0x4D4D, 0x4C4C, 0x4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, (1U<<31) | 2798, (1U<<31) | 2858, (1U<<31) | 2798, (1U<<31) | 2858, 0x4C4C4C, - 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, (1U<<31) | 2798, (1U<<31) | 2858, (1U<<31) | 2798, (1U<<31) | 2858, 0x4C4C4C, - 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4C, - 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, 0x4C4C4C, 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, 0x4C4C4D, - (1U<<31) | 2878, 0x4C4C4C, 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, (1U<<31) | 2798, (1U<<31) | 2858, (1U<<31) | 2798, - (1U<<31) | 2858, 0x4C4C4C, 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, 0x44C4C4C, 0x44D4D4D, 0x44C4C4C, - 0x44D4D4D, 0x4C4C4C, 0x4D4D4D, (1U<<31) | 1393, (1U<<31) | 1401, (1U<<31) | 1391, (1U<<31) | 1399, (1U<<31) | 2366, - (1U<<31) | 2404, (1U<<31) | 2364, (1U<<31) | 2402, 0x44C4C, 0x44D4D, 0x4C4C4C, 0x4D4D4D, 0x44C4C, - 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x4C4C4C, 0x4D4D4D, 0x44C4C, 0x44D4D, 0x44C4C4C, - 0x44D4D4D, 0x44C4C4C, 0x44D4D4D, 0x44C4C4C, 0x44D4D4D, 0x4C4C4C, 0x4D4D4D, 0x44C4C, - 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x44C4C4C, 0x44D4D4D, 0x44C4C4C, 0x44D4D4D, 0x44C4C4C, - 0x44D4D4D, 0x44C4C4C, 0x44D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C, 0x4D4D, 0x4D4D, - (1U<<31) | 2904, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4C4C, 0x4D4D, 0x4C4C, 0x4D4D, 0x4C4C4D, (1U<<31) | 2878, 0x4C, - 0x4D, 0x4C4C, 0x4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C, 0x4D4D, 0x44C4C4D, - (1U<<31) | 2422, 0x4C4C4C, 0x4D4D4D, 0x44C4C, 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x44D4D, - (1U<<31) | 2448, 0x44D4D4D, (1U<<31) | 2446, 0x44C4C, 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x44D4D, - (1U<<31) | 2448, 0x44D4D4D, (1U<<31) | 2446, 0x44D4C, (1U<<31) | 2440, 0x44D4C4C, (1U<<31) | 2438, 0x44C4C, - 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x44D4C, (1U<<31) | 2440, 0x44D4C4C, (1U<<31) | 2438, 0x44C4C, - 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C4C, 0x4D4D4D4D, 0x44D4D, - (1U<<31) | 2448, 0x44D4D4D, (1U<<31) | 2446, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2791, (1U<<31) | 2851, (1U<<31) | 2789, (1U<<31) | 2849, (1U<<31) | 2789, - (1U<<31) | 2849, (1U<<31) | 2789, (1U<<31) | 2849, 0x44C4C, 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x44C4C4C, - 0x44D4D4D, 0x44C4C, 0x44D4D, 0x4C4C4C, 0x4D4D4D, 0x44C4C, 0x44D4D, 0x4C4C4C, - 0x4D4D4D, 0x454C4C, 0x454D4D, 0x454C4C4C, 0x454D4D4D, 0x454D4D, (1U<<31) | 2499, 0x454D4D4D, - (1U<<31) | 2497, 0x44C4C4C, 0x44D4D4D, (1U<<31) | 2382, (1U<<31) | 2410, 0x44C4C4D, (1U<<31) | 2422, (1U<<31) | 2392, - (1U<<31) | 2420, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x44D4D, (1U<<31) | 2448, 0x44D4D4D, (1U<<31) | 2446, 0x4D4D4D, (1U<<31) | 2902, 0x4D4D4D, - (1U<<31) | 2902, 0x44D4D, (1U<<31) | 2448, 0x44D4D4D, (1U<<31) | 2446, 0x44C4D, (1U<<31) | 2432, 0x44C4D4D, - (1U<<31) | 2430, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4D4D, (1U<<31) | 2876, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4D4D, - (1U<<31) | 2876, 0x4C4C4C, 0x4D4D4D, 0x44C4D, (1U<<31) | 2432, 0x44C4D4D, (1U<<31) | 2430, 0x44C4C, - 0x44D4D, 0x44C4C, 0x44D4D, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4D4D, (1U<<31) | 2876, 0x4C4C4D, - (1U<<31) | 2878, 0x4C4C4D4D, (1U<<31) | 2876, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C4C, - 0x4D4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C4C, 0x4D4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C4C, - 0x4D4D4D4D, 0x44C4C, 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x4C4C4C, 0x4D4D4D, 0x44C4C, - 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x44C4C, 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C4C, 0x4D4D4D4D, 0x4C4C4C4C, 0x4D4D4D4D, 0x44C4D, - (1U<<31) | 2432, 0x44C4D4D, (1U<<31) | 2430, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4D4D, (1U<<31) | 2876, 0x44C4D, - (1U<<31) | 2432, 0x44C4D4D, (1U<<31) | 2430, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4D4D, (1U<<31) | 2876, (1U<<31) | 2798, - (1U<<31) | 2858, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C, - 0x4D4D, 0x4C4C, 0x4D4D, 0x4C4C, 0x4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C, - 0x4D4D, 0x4C4C4C, 0x4D4D4D, 0x44C4C, 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x444D4D, - (1U<<31) | 2171, 0x444D4D4D, (1U<<31) | 2169, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C4C, 0x4D4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4C4C4C4C, 0x4D4D4D4D, 0x44C4C, 0x44D4D, 0x44C4C4C, 0x44D4D4D, 0x444D4D, - (1U<<31) | 2171, 0x444D4D4D, (1U<<31) | 2169, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C4C, 0x4D4D4D4D, 0x44C4C, - 0x44D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x444D4D, (1U<<31) | 2171, 0x444D4D4D, (1U<<31) | 2169, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4C4D, (1U<<31) | 2887, 0x4C4D, (1U<<31) | 2887, 0x4C4C4C, 0x4D4D4D, 0x4C4C, - 0x4D4D, 0x4C4C4C, 0x4D4D4D, 0x4C4C, 0x4D4D, 0x4C4C4C, 0x4D4D4D, 0x44C4C4D, - (1U<<31) | 2422, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4C, 0x4D4D4D, 0x4C4C4C, - 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, (1U<<31) | 2798, (1U<<31) | 2858, (1U<<31) | 2798, (1U<<31) | 2858, 0x4C4C4C, - 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, (1U<<31) | 2798, (1U<<31) | 2858, (1U<<31) | 2798, (1U<<31) | 2858, 0x4C4C4C, - 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4D, (1U<<31) | 2878, 0x4C4C4C, - 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, 0x4C4C4C, 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, 0x4C4C4D, - (1U<<31) | 2878, 0x4C4C4C, 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, (1U<<31) | 2798, (1U<<31) | 2858, (1U<<31) | 2798, - (1U<<31) | 2858, 0x4C4C4C, 0x4D4D4D, 0x4D4D4D, (1U<<31) | 2902, (1U<<31) | 2807, (1U<<31) | 2867, 0x44D4D, - (1U<<31) | 2448, 0x44D4D4D, (1U<<31) | 2446, 0x44D4D, (1U<<31) | 2448, 0x44D4D4D, (1U<<31) | 2446, 0x44D4D, - (1U<<31) | 2448, 0x44D4D4D, (1U<<31) | 2446, 0x4C4D, (1U<<31) | 2887, 0x4C4D, (1U<<31) | 2887, 0x4C4D4D, - (1U<<31) | 2885, 0x4C4D4D, (1U<<31) | 2885, 0x4C4D, (1U<<31) | 2887, 0x4C4D, (1U<<31) | 2887, 0x4C4C4C, - 0x4D4D4D, 0x4C4D, (1U<<31) | 2887, 0x4C4D, (1U<<31) | 2887, 0x42E2E2E, 0x42E2E2E, 0x42E2E2E, - 0x42E2E2E, 0x42E2E2E, 0x42E2E2E, 0x442E2E, 0x452E2E, 0x442E2E, 0x442E2E, 0x442E2E, - 0x442E2E2E, 0x442E2E2E, 0x442E2E2E, 0x442E2E2E, 0x442E2E2E, 0x442E2E2E, 0x4442E2E, 0x4452E2E, - 0x4442E2E, 0x4442E2E, 0x4442E2E, 0x4B4B4B, 0x2E0, 0x3939, 0x2A2A, 0x44, - 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x393939, 0x393939, 0x444, 0x393939, - 0x393939, 0x444, 0x444, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, - 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x444, - 0x393939, 0x2A2A2A, 0x393939, 0x2A2A2A, 0x2A2A2A, 0x2A2A2A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, 0x444, 0x2C2C2C, - 0x42C2C, 0x4444, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x4444, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, - 0x45959, 0x43B3B, 0x44A4A, 0x2C2C2C2C, 0x59595959, 0x3B3B3B3B, 0x4A4A4A4A, 0x42C2C2C, - 0x4595959, 0x43B3B3B, 0x44A4A4A, 0x2C2C2C2C, 0x59595959, 0x3B3B3B3B, 0x4A4A4A4A, 0x42C2C2C, - 0x4595959, 0x43B3B3B, 0x44A4A4A, 0x44, 0x2C2C2C2C, 0x42C2C2C, 0x2C2C2C2C, 0x42C2C2C, - 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, - 0x2C4, 0x594, 0x3B4, 0x2C4, 0x4A4, 0x4, 0x2C2C2C2C, 0x42C2C2C, - 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, - 0x2C4, 0x594, 0x3B4, 0x2C4, 0x4A4, 0x2C2C2C, 0x595959, 0x3B3B3B, - 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, 0x44, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, - 0x43B3B, 0x44A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, - 0x43B3B, 0x44A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, 0x39390, 0x39390, - 0x39390, 0x2A2A4, 0x2A2A4, 0x2A2A4, 0x2A2A4, 0x2A2A4, 0x2A2A4, 0x2A2A0, - 0x2A2A0, 0x2A2A0, 0x42C4, 0x4595, 0x43B4, 0x44A4, 0x42C4, 0x4595, - 0x43B4, 0x44A4, 0x440, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, - 0x595959, 0x3B3B3B, 0x4A4A4A, 0x4555, 0x4A4A59, 0x2C2C3B, 0x3B3B4A, 0x4A4A59, - 0x2C2C3B, 0x3B3B4A, 0x393955, 0x4A4A5959, 0x2C2C3B3B, 0x3B3B4A4A, 0x4A4A5959, 0x2C2C3B3B, - 0x3B3B4A4A, 0x393955, 0x4455, 0x393955, 0x393955, 0x2A2A55, 0x2A2A55, 0x393955, - 0x393955, 0x393955, 0x4455, 0x393955, 0x393955, 0x2A2A55, 0x2A2A55, 0x4A4A5959, - 0x2C2C3B3B, 0x3B3B4A4A, 0x4A4A5959, 0x2C2C3B3B, 0x3B3B4A4A, 0x393955, 0x454, 0x454, - 0x454, 0x454, 0x454, 0x454, 0x898989, 0x7A7A7A, 0x898959, 0x7A7A4A, - 0x898959, 0x7A7A4A, 0x8959, 0x7A4A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, - 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, - 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x898989, 0x7A7A7A, - 0x7A7A6B, 0x89897A, 0x598989, 0x4A7A7A, 0x7A89, 0x6B7A, 0x7A89, 0x6B7A, - 0x5989, 0x4A7A, 0x5989, 0x4A7A, 0x4A89, 0x3B7A, 0x4A89, 0x3B7A, - 0x42C, 0x559, 0x43B, 0x44A, 0x8989, 0x7A7A, (1U<<31) | 3504, 0x7A7A7A7A, - 0x898989, 0x7A7A7A, 0x898989, 0x7A7A7A, 0x898989, 0x7A7A7A, 0x898989, 0x7A7A7A, - (1U<<31) | 3504, 0x7A7A7A7A, 0x898989, 0x7A7A7A, 0x8989, 0x7A7A, 0x8989, 0x7A7A, - 0x8989, 0x7A7A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, - 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x8989, 0x7A7A, - 0x898989, 0x7A7A7A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, - 0x898959, 0x7A7A4A, 0x898959, 0x7A7A4A, 0x8959, 0x7A4A, 0x8959, 0x7A4A, - 0x7A7A3B, 0x89894A, 0x8959, 0x7A4A, 0x8959, 0x7A4A, 0x4A4A59, 0x2C2C3B, - 0x3B3B4A, 0x4A4A59, 0x2C2C3B, 0x3B3B4A, 0x4A4A59, 0x2C2C3B, 0x3B3B4A, 0x4A4A59, - 0x2C2C3B, 0x3B3B4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x442C2C, 0x545959, 0x443B3B, 0x444A4A, 0x444, 0x2C42C2C, - 0x5945959, 0x3B43B3B, 0x4A44A4A, 0x42E4, 0x42E2C, 0x42E59, 0x42E3B, 0x42E4A, - 0x42C, 0x459, 0x43B, 0x44A, 0x42E4, 0x4444, 0x42E4, 0x4455, - 0x3B3B3B3B, 0x4A4A4A4A, 0x3B3B3B3B, 0x4A4A4A4A, 0x4455, 0x2C2C2C2C, 0x59595959, 0x3B3B3B3B, - 0x4A4A4A4A, 0x393955, 0x393955, 0x393955, 0x393955, 0x2C2C2C, 0x595959, 0x3B3B3B, - 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, - 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, 0x42C2C, 0x45959, 0x43B3B, - 0x44A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, - 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, - 0x44A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, - 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x444, 0x2C2C, 0x4455, - 0x3B3B3B3B, 0x4A4A4A4A, 0x3B3B3B3B, 0x4A4A4A4A, 0x4455, 0x2C2C2C2C, 0x59595959, 0x3B3B3B3B, - 0x4A4A4A4A, 0x455, 0x393939, 0x3B3B3B, 0x4A4A4A, 0x393939, 0x39394, 0x39394, - 0x392A39, 0x392A39, 0x393939, 0x444, 0x393939, 0x444, 0x3B3B3B, 0x4A4A4A, - 0x393955, 0x393955, 0x445, 0x445, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, - 0x2C2C, 0x5959, 0x3B3B, 0x4A4A, 0x2C2C, 0x5959, 0x3B3B, 0x4A4A, - 0x2C2C2C, 0x42C2C, 0x2C2C2C, 0x42C2C, 0x393939, 0x2C2C2C, 0x595959, 0x3B3B3B, - 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C, 0x5959, 0x3B3B, - 0x4A4A, 0x393939, 0x2A2A2A, 0x394, 0x394, 0x2A39, 0x2A39, 0x2A39, - 0x2A39, 0x2A39, 0x2A39, 0x2A39, 0x2A39, 0x39392A, 0x44439, 0x44439, - 0x4439, 0x39392A, 0x4439, 0x39392A, 0x4444, 0x2A4, 0x44, 0x439, - 0x42A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, 0x42C2C, 0x45959, 0x43B3B, - 0x44A4A, 0x42C2C, 0x43B3B, 0x44A4A, 0x455, 0x43939, 0x42A2A, 0x43939, - 0x444, 0x43939, 0x42A2A, 0x43939, 0x42A2A, 0x444, 0x43939, 0x42A2A, - 0x42C2C2C, 0x4595959, 0x43B3B3B, 0x44A4A4A, 0x42C2C2C, 0x4595959, 0x43B3B3B, 0x44A4A4A, - 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, - 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, - 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, - 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, - 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, - 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, 0x44A4A, - 0x42E2C0, 0x42E590, 0x42E3B0, 0x42E4A0, 0x393939, 0x393939, 0x444, 0x393939, - 0x393939, 0x444, 0x444, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, - 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, - 0x595959, 0x3B3B3B, 0x4A4A4A, 0x393939, 0x2A2A2A, 0x393939, 0x2A2A2A, 0x2A2A2A, - 0x2A2A2A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x42C2C, 0x45959, 0x43B3B, - 0x44A4A, 0x2C2C2C2C, 0x59595959, 0x3B3B3B3B, 0x4A4A4A4A, 0x440, 0x2C2C2C, 0x42C2C, - 0x44, 0x55, 0x888, 0x777, 0x777, 0x888, 0x777, 0x777, - 0x888, 0x777, 0x777, 0x888, 0x777, 0x777, 0x74F7, 0x44F4, - 0x44F4, 0x40, 0x0, 0x44, 0x44, 0x44, 0x85, 0x74, - 0x47, 0x58, 0x44, 0x55, 0x88, 0x77, 0x77, 0x44, - 0x54, 0x4F0, 0x4F0, 0x77, 0x77, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x84, 0x84, 0x84, - 0x84, 0x84, 0x84, 0x85, 0x85, 0x85, 0x85, 0x84, - 0x84, 0x84, 0x84, 0x85, 0x85, 0x85, 0x85, 0x777, - 0x777, 0x888, 0x777, 0x777, 0x888, 0x777, 0x777, 0x888, - 0x777, 0x777, 0x888, 0x777, 0x777, 0x88, 0x77, 0x77, - 0x73, 0x73, 0x74, 0x74, 0x74, 0x74, 0x74, 0x74, - 0x74, 0x74, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, - 0x75, 0x75, 0x74, 0x74, 0x74, 0x74, 0x74, 0x74, - 0x74, 0x74, 0x75, 0x75, 0x75, 0x75, 0x75, 0x75, - 0x75, 0x75, 0x88, 0x77, 0x77, 0x88, 0x77, 0x77, - 0x8888, 0x7777, 0x7777, 0x8888, 0x7777, 0x7777, 0x8888, 0x7777, - 0x7777, 0x8888, 0x7777, 0x7777, 0x888, 0x777, 0x777, 0x888, - 0x777, 0x777, 0x37, 0x48, 0x48, 0x48, 0x48, 0x47, - 0x47, 0x47, 0x47, 0x2E1, 0x2E1, 0x2E1, 0x2E1, 0x51, - 0x51, 0x51, 0x4CF2F, 0x4CF1F, 0x4CF4F, 0x4CF2F, 0x4CF1F, 0x4CF4F, - 0x88, 0x77, 0x77, 0x58, 0x58, 0x58, 0x58, 0x57, - 0x57, 0x57, 0x57, 0x448, 0x444, 0x555, 0x444, 0x555, - 0x0, 0x0, 0x0, 0x444, 0x555, 0x444, 0x555, 0x88, - 0x77, 0x33, 0x44, 0x55, 0xCF4F, 0x888, 0x777, 0x777, - 0x888, 0x777, 0x777, 0x888, 0x777, 0x777, 0x888, 0x777, - 0x777, 0x444, 0x444, 0x444, 0x555, 0x444, 0x555, 0x44, - 0x54, 0x4444, 0xCF4F, 0xCF4F, 0xCF4F, 0xCF4F, 0xCF4F, 0xCF4F, - 0xCF4F, 0xCF4F, 0xCF4F, 0x88, 0x88, 0x77, 0x77, 0x88, - 0x77, 0x77, 0x88, 0x77, 0x77, 0x88, 0x77, 0x77, - 0x4, 0x5, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4F4, 0x444, 0x455, 0x455, 0x88, 0x77, - 0x77, 0x88, 0x77, 0x77, 0x4444, 0x4444, 0x88, 0x77, - 0x77, 0x4477, 0x4444, 0x4477, 0x4444, 0x4477, 0x4444, 0x4477, - 0x4444, 0x77, 0x77, 0x77, 0x77, 0x77, 0x88, 0x77, - 0x77, 0x88, 0x77, 0x77, 0x88, 0x77, 0x77, 0x88, - 0x77, 0x77, 0x4453, 0x4453, 0x4453, 0x4454, 0x4454, 0x4454, - 0x4455, 0x4455, 0x4455, 0x4453, 0x4453, 0x4453, (1U<<31) | 2187, (1U<<31) | 2187, - (1U<<31) | 2187, (1U<<31) | 2203, (1U<<31) | 2203, (1U<<31) | 2203, (1U<<31) | 2220, (1U<<31) | 2220, (1U<<31) | 2220, (1U<<31) | 2187, - (1U<<31) | 2187, (1U<<31) | 2187, (1U<<31) | 2178, (1U<<31) | 2178, (1U<<31) | 2178, (1U<<31) | 2194, (1U<<31) | 2194, (1U<<31) | 2194, - (1U<<31) | 2178, (1U<<31) | 2178, (1U<<31) | 2178, 0x453, 0x453, 0x453, 0x454, 0x454, - 0x454, 0x455, 0x455, 0x455, 0x453, 0x453, 0x453, (1U<<31) | 2477, - (1U<<31) | 2477, (1U<<31) | 2477, (1U<<31) | 2491, (1U<<31) | 2491, (1U<<31) | 2491, (1U<<31) | 2515, (1U<<31) | 2515, (1U<<31) | 2515, - (1U<<31) | 2477, (1U<<31) | 2477, (1U<<31) | 2477, (1U<<31) | 2469, (1U<<31) | 2469, (1U<<31) | 2469, (1U<<31) | 2483, (1U<<31) | 2483, - (1U<<31) | 2483, (1U<<31) | 2469, (1U<<31) | 2469, (1U<<31) | 2469, 0x44453, 0x44453, 0x44453, 0x44454, - 0x44454, 0x44454, 0x44455, 0x44455, 0x44455, 0x44453, 0x44453, 0x44453, - (1U<<31) | 2103, (1U<<31) | 2103, (1U<<31) | 2103, (1U<<31) | 2121, (1U<<31) | 2121, (1U<<31) | 2121, (1U<<31) | 2140, (1U<<31) | 2140, - (1U<<31) | 2140, (1U<<31) | 2103, (1U<<31) | 2103, (1U<<31) | 2103, (1U<<31) | 2093, (1U<<31) | 2093, (1U<<31) | 2093, (1U<<31) | 2111, - (1U<<31) | 2111, (1U<<31) | 2111, (1U<<31) | 2093, (1U<<31) | 2093, (1U<<31) | 2093, 0x4453, 0x4453, 0x4453, - 0x4454, 0x4454, 0x4454, 0x4455, 0x4455, 0x4455, 0x4453, 0x4453, - 0x4453, (1U<<31) | 2187, (1U<<31) | 2187, (1U<<31) | 2187, (1U<<31) | 2203, (1U<<31) | 2203, (1U<<31) | 2203, (1U<<31) | 2220, - (1U<<31) | 2220, (1U<<31) | 2220, (1U<<31) | 2187, (1U<<31) | 2187, (1U<<31) | 2187, (1U<<31) | 2178, (1U<<31) | 2178, (1U<<31) | 2178, - (1U<<31) | 2194, (1U<<31) | 2194, (1U<<31) | 2194, (1U<<31) | 2178, (1U<<31) | 2178, (1U<<31) | 2178, 0x44453, 0x44453, - 0x44453, 0x44454, 0x44454, 0x44454, 0x44455, 0x44455, 0x44455, 0x44453, - 0x44453, 0x44453, (1U<<31) | 2103, (1U<<31) | 2103, (1U<<31) | 2103, (1U<<31) | 2121, (1U<<31) | 2121, (1U<<31) | 2121, - (1U<<31) | 2140, (1U<<31) | 2140, (1U<<31) | 2140, (1U<<31) | 2103, (1U<<31) | 2103, (1U<<31) | 2103, (1U<<31) | 2093, (1U<<31) | 2093, - (1U<<31) | 2093, (1U<<31) | 2111, (1U<<31) | 2111, (1U<<31) | 2111, (1U<<31) | 2093, (1U<<31) | 2093, (1U<<31) | 2093, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x54, 0x34450, 0x34450, 0x34450, - 0x44450, 0x44450, 0x44450, 0x54450, 0x54450, 0x54450, 0x34450, 0x34450, - 0x34450, 0x334450, 0x334450, 0x334450, 0x444450, 0x444450, 0x444450, 0x554450, - 0x554450, 0x554450, 0x334450, 0x334450, 0x334450, 0x33334450, 0x33334450, 0x33334450, - 0x44444450, 0x44444450, 0x44444450, 0x33334450, 0x33334450, 0x33334450, 0x3450, 0x3450, - 0x3450, 0x4450, 0x4450, 0x4450, 0x5450, 0x5450, 0x5450, 0x3450, - 0x3450, 0x3450, 0x33450, 0x33450, 0x33450, 0x44450, 0x44450, 0x44450, - 0x55450, 0x55450, 0x55450, 0x33450, 0x33450, 0x33450, 0x3333450, 0x3333450, - 0x3333450, 0x4444450, 0x4444450, 0x4444450, 0x3333450, 0x3333450, 0x3333450, 0x344450, - 0x344450, 0x344450, 0x444450, 0x444450, 0x444450, 0x544450, 0x544450, 0x544450, - 0x344450, 0x344450, 0x344450, 0x3344450, 0x3344450, 0x3344450, 0x4444450, 0x4444450, - 0x4444450, 0x5544450, 0x5544450, 0x5544450, 0x3344450, 0x3344450, 0x3344450, (1U<<31) | 1077, - (1U<<31) | 1077, (1U<<31) | 1077, (1U<<31) | 2076, (1U<<31) | 2076, (1U<<31) | 2076, (1U<<31) | 1077, (1U<<31) | 1077, (1U<<31) | 1077, - 0x34450, 0x34450, 0x34450, 0x44450, 0x44450, 0x44450, 0x54450, 0x54450, - 0x54450, 0x34450, 0x34450, 0x34450, 0x334450, 0x334450, 0x334450, 0x444450, - 0x444450, 0x444450, 0x554450, 0x554450, 0x554450, 0x334450, 0x334450, 0x334450, - 0x33334450, 0x33334450, 0x33334450, 0x44444450, 0x44444450, 0x44444450, 0x33334450, 0x33334450, - 0x33334450, 0x344450, 0x344450, 0x344450, 0x444450, 0x444450, 0x444450, 0x544450, - 0x544450, 0x544450, 0x344450, 0x344450, 0x344450, 0x3344450, 0x3344450, 0x3344450, - 0x4444450, 0x4444450, 0x4444450, 0x5544450, 0x5544450, 0x5544450, 0x3344450, 0x3344450, - 0x3344450, (1U<<31) | 1077, (1U<<31) | 1077, (1U<<31) | 1077, (1U<<31) | 2076, (1U<<31) | 2076, (1U<<31) | 2076, (1U<<31) | 1077, - (1U<<31) | 1077, (1U<<31) | 1077, 0x34450, 0x44450, 0x34450, 0x334450, 0x444450, 0x334450, - 0x33334450, 0x44444450, 0x33334450, 0x3450, 0x4450, 0x3450, 0x33450, 0x44450, - 0x33450, 0x3333450, 0x4444450, 0x3333450, 0x344450, 0x444450, 0x344450, 0x3344450, - 0x4444450, 0x3344450, (1U<<31) | 1077, (1U<<31) | 2076, (1U<<31) | 1077, 0x34450, 0x44450, 0x34450, - 0x334450, 0x444450, 0x334450, 0x33334450, 0x44444450, 0x33334450, 0x344450, 0x444450, - 0x344450, 0x3344450, 0x4444450, 0x3344450, (1U<<31) | 1077, (1U<<31) | 2076, (1U<<31) | 1077, 0x55, - (1U<<31) | 3152, (1U<<31) | 3140, (1U<<31) | 3140, (1U<<31) | 3070, (1U<<31) | 3059, (1U<<31) | 3059, (1U<<31) | 2996, (1U<<31) | 2227, - (1U<<31) | 2986, (1U<<31) | 2210, (1U<<31) | 2986, (1U<<31) | 2210, (1U<<31) | 3196, (1U<<31) | 3185, (1U<<31) | 3185, (1U<<31) | 3110, - (1U<<31) | 3100, (1U<<31) | 3100, (1U<<31) | 3032, (1U<<31) | 2521, (1U<<31) | 3023, (1U<<31) | 2506, (1U<<31) | 3023, (1U<<31) | 2506, - (1U<<31) | 3342, (1U<<31) | 3327, (1U<<31) | 3327, (1U<<31) | 3152, (1U<<31) | 3140, (1U<<31) | 3140, (1U<<31) | 3070, (1U<<31) | 2148, - (1U<<31) | 3059, (1U<<31) | 2129, (1U<<31) | 3059, (1U<<31) | 2129, (1U<<31) | 3398, (1U<<31) | 3384, (1U<<31) | 3384, (1U<<31) | 3196, - (1U<<31) | 3185, (1U<<31) | 3185, (1U<<31) | 3110, (1U<<31) | 2227, (1U<<31) | 3100, (1U<<31) | 2210, (1U<<31) | 3100, (1U<<31) | 2210, - (1U<<31) | 3458, (1U<<31) | 3441, (1U<<31) | 3441, (1U<<31) | 3290, (1U<<31) | 3278, (1U<<31) | 3278, (1U<<31) | 3196, (1U<<31) | 2148, - (1U<<31) | 3185, (1U<<31) | 2129, (1U<<31) | 3185, (1U<<31) | 2129, (1U<<31) | 3242, (1U<<31) | 3229, (1U<<31) | 3229, (1U<<31) | 3152, - (1U<<31) | 3140, (1U<<31) | 3140, (1U<<31) | 3290, (1U<<31) | 3278, (1U<<31) | 3278, (1U<<31) | 3196, (1U<<31) | 3185, (1U<<31) | 3185, - (1U<<31) | 3164, (1U<<31) | 3129, (1U<<31) | 3129, (1U<<31) | 3081, (1U<<31) | 3049, (1U<<31) | 3049, (1U<<31) | 3006, (1U<<31) | 2237, - (1U<<31) | 2977, (1U<<31) | 2194, (1U<<31) | 2977, (1U<<31) | 2194, (1U<<31) | 3207, (1U<<31) | 3175, (1U<<31) | 3175, (1U<<31) | 3120, - (1U<<31) | 3091, (1U<<31) | 3091, (1U<<31) | 3041, (1U<<31) | 2530, (1U<<31) | 3015, (1U<<31) | 2483, (1U<<31) | 3015, (1U<<31) | 2483, - (1U<<31) | 3357, (1U<<31) | 3313, (1U<<31) | 3313, (1U<<31) | 3164, (1U<<31) | 3129, (1U<<31) | 3129, (1U<<31) | 3081, (1U<<31) | 2159, - (1U<<31) | 3049, (1U<<31) | 2111, (1U<<31) | 3049, (1U<<31) | 2111, (1U<<31) | 3412, (1U<<31) | 3371, (1U<<31) | 3371, (1U<<31) | 3207, - (1U<<31) | 3175, (1U<<31) | 3175, (1U<<31) | 3120, (1U<<31) | 2237, (1U<<31) | 3091, (1U<<31) | 2194, (1U<<31) | 3091, (1U<<31) | 2194, - (1U<<31) | 3475, (1U<<31) | 3425, (1U<<31) | 3425, (1U<<31) | 3302, (1U<<31) | 3267, (1U<<31) | 3267, (1U<<31) | 3207, (1U<<31) | 2159, - (1U<<31) | 3175, (1U<<31) | 2111, (1U<<31) | 3175, (1U<<31) | 2111, (1U<<31) | 3255, (1U<<31) | 3217, (1U<<31) | 3217, (1U<<31) | 3164, - (1U<<31) | 3129, (1U<<31) | 3129, (1U<<31) | 3302, (1U<<31) | 3267, (1U<<31) | 3267, (1U<<31) | 3207, (1U<<31) | 3175, (1U<<31) | 3175, - (1U<<31) | 2892, 0x4F5, (1U<<31) | 3110, (1U<<31) | 3100, (1U<<31) | 3100, (1U<<31) | 3110, (1U<<31) | 3100, (1U<<31) | 3100, - (1U<<31) | 3110, (1U<<31) | 3100, (1U<<31) | 3100, (1U<<31) | 3110, (1U<<31) | 3100, (1U<<31) | 3100, (1U<<31) | 3120, (1U<<31) | 3091, - (1U<<31) | 3091, (1U<<31) | 3120, (1U<<31) | 3091, (1U<<31) | 3091, (1U<<31) | 3120, (1U<<31) | 3091, (1U<<31) | 3091, (1U<<31) | 3120, - (1U<<31) | 3091, (1U<<31) | 3091, 0x88, 0x77, 0x77, 0x54, 0x54, 0x54, - 0x54, 0x54, 0x54, 0x54, 0x54, 0x48, 0x48, 0x48, - 0x48, 0x47, 0x47, 0x47, 0x47, 0x58, 0x58, 0x58, - 0x58, 0x57, 0x57, 0x57, 0x57, 0x595959, 0x595959, 0x595959, - 0x595959, 0x2C2C2C2C, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x5959, 0x445959, - 0x444A4A, 0x40, 0x0, 0x442E0, 0x442E0, 0x442E0, 0x442E0, 0x2E2C, - 0x2E3B, 0x2E4A, 0x2E2C, 0x2E2C, 0x2E4A, 0x2E4A, 0x3B, 0x4A0, - 0x2E2C0, 0x2E3B0, 0x2E4A0, 0x2E4A0, 0x2E4A0, (1U<<31) | 3761, 0x4A4A4A, (1U<<31) | 3759, - (1U<<31) | 3759, 0x2C2C2C, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, - 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x3B3B3B, 0x4A4A4A, 0x2C2C59, 0x44A7A, 0x44A7A, - 0x7A7A4A, 0x7A7A44, 0x7A7A4A, 0x7A7A44, 0x2C2C2C, 0x2C2C44, 0x595959, 0x595944, - 0x3B3B3B, 0x3B3B44, 0x4A4A4A, 0x4A4A44, 0x7A7A4A, 0x7A7A44, 0x7A7A4A, 0x7A7A44, - 0x2C2C2C, 0x2C2C44, 0x595959, 0x595944, 0x3B3B3B, 0x3B3B44, 0x4A4A4A, 0x4A4A44, - 0x2C2C2C, 0x2C2C44, 0x595959, 0x595944, 0x3B3B3B, 0x3B3B44, 0x4A4A4A, 0x4A4A44, - 0x47A4A, 0x47A4A, 0x7A7A, 0x2C2C, 0x7A7A, 0x7A7A7A7A, 0x7A7A7A, 0x2C2C2C, - 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x3B3B3B3B, - 0x3B3B3B3B, 0x7A7A7A, 0x2C2C2C, 0x595959, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x3B3B3B3B, 0x4A2C2C4A, 0x4A3B3B4A, 0x4A3B3B4A, 0x4A2C2C4A, 0x4A3B3B4A, - 0x4A3B3B4A, 0x2C2C3B, 0x3B3B4A, 0x4A4A59, 0x2C2C3B, 0x3B3B4A, 0x4A4A59, 0x2C2C3B, - 0x3B3B4A, 0x4A4A59, 0x2C2C3B, 0x3B3B4A, 0x4A4A59, 0x7A7A7A7A, 0x2C4A4A4A, 0x4A4A3B, - 0x59594A, 0x59594A, 0x3B3B2C, 0x3B3B2C, 0x4A4A3B, 0x4A4A3B, 0x59594A, 0x3B3B2C, - 0x4A4A3B, 0x7A7A, 0x7A7A, 0x7A7A, 0x7A7A, 0x7A7A, 0x2C2C2C, 0x595959, - 0x3B3B3B, 0x4A4A4A, 0x7A7A, 0x4A4A4A4A, 0x4A4A4A, 0x2C2C2C, 0x3B3B3B, 0x4A4A4A, - 0x4A4A4A, 0x4A4A4A, 0x2C2C2C, 0x3B3B3B, 0x4A4A4A, 0x2C2C2C, 0x3B3B3B, 0x4A4A4A, - 0x4A4A4A, (1U<<31) | 3761, 0x4A4A4A, (1U<<31) | 3759, (1U<<31) | 3759, 0x2C2C2C, 0x3B3B3B, 0x4A4A4A, - 0x2C2C2C, 0x3B3B3B, 0x4A4A4A, 0x4A4A4A, 0x4A2C4A, 0x4A3B4A, 0x4A2C4A, 0x4A4A4A, - 0x3B4A, 0x2C3B, 0x3B4A, 0x4A59, 0x3B4A, 0x2C3B, 0x3B4A, 0x4A59, - 0x555, 0x2E0, 0x2E0, 0x2E0, 0x2E0, 0x2E0, 0x2E0, 0x2E0, - 0x2E0, 0x555, 0x555, 0x444, 0x444, 0x5, 0x5, 0x5, - 0x5, 0x1, 0x0, 0x1F0, 0x8A8A, 0x8A8A8A, 0x8A8A8A, 0x8A8A, - 0x8A8A, 0x8A8A, 0x8A8A, 0x8A8A8A, 0x8A8A8A, 0x8A8A8A, 0x8A8A8A, 0x8A8A, - 0x8A8A, 0x8A8A, 0x8A8A, 0x8A8A, 0x8A8A, 0x8A8A, 0x8A8A, 0x48A8A8A, - (1U<<31) | 3517, (1U<<31) | 3517, (1U<<31) | 3517, (1U<<31) | 3517, 0x8A8A8A, 0x8A8A8A, 0x8A8A, 0x8A8A, - (1U<<31) | 3517, (1U<<31) | 3517, (1U<<31) | 3517, (1U<<31) | 3517, (1U<<31) | 3517, 0x8A8A, 0x8A8A, 0x8A8A, - 0x8A8A, 0x8A8A, 0x8A8A, 0x8A8A, 0x8A8A, 0x8A8A, (1U<<31) | 3517, 0x8A8A8A, - 0x8A8A8A, 0x8A8A8A, (1U<<31) | 3517, (1U<<31) | 3517, 0x8A8A8A, 0x8A8A8A, (1U<<31) | 3517, (1U<<31) | 3517, - (1U<<31) | 3517, (1U<<31) | 3517, (1U<<31) | 3517, (1U<<31) | 3517, 0x48A, 0x2E8A, 0x2E8A, 0x2E8A, - 0x2E8A, 0x2E8A, 0x2E8A, 0x2E8A, 0x2E8A, 0x2E8A, 0x2E8A, 0x2E8A, - 0x2E8A, 0x2E8A, 0x2E8A, 0x2E8A, 0x2E8A, 0x2E8A0, 0x2E8A0, 0x2E8A0, - 0x2E8A0, 0x2E8A0, 0x2E8A0, 0x2E8A0, 0x2E8A0, 0x2E8A0, 0x2E8A0, 0x50, - 0x50, 0x50, 0x50, 0x0, 0x44, 0x4444, 0x4444, 0x4444, - 0x4444, 0x44, 0x4, 0x44, 0x4, 0x4, 0x44, 0x4, - 0x44, 0x4, 0x5, 0x2E89, 0x2E4A, 0x2E890, 0x2E4A0, 0x888, - 0x888, 0x898959, 0x898944, 0x7A7A4A, 0x7A7A44, 0x898959, 0x898944, 0x7A7A4A, - 0x7A7A44, 0x898959, 0x898944, 0x7A7A4A, 0x7A7A44, 0x898989, 0x7A7A7A, 0x898989, - 0x7A7A7A, 0x898989, 0x7A7A7A, 0x8989, 0x8989, 0x7A7A, 0x7A7A, 0x8989, - 0x7A7A, 0x4A4A4A, 0x0, (1U<<31) | 777, 0x44A4A0, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x2F2F, 0x2F2F, 0x4, - 0x42E4, 0x5E50, 0x40, 0x50, 0x42E4, 0x42E4, 0x42E0, 0x52F4, - 0x4, 0x2C2C2C, 0x2C2C2C2C, 0x4A4A4A, 0x595959, 0x3B3B3B, 0x2C2C2C, 0x2C2C2C2C, - 0x2C2C2C, 0x2C2C2C, 0x4A4A4A, 0x595959, 0x3B3B3B, 0x2C2C2C, 0x4A4A4A, 0x595959, - 0x3B3B3B, (1U<<31) | 1000, (1U<<31) | 2756, (1U<<31) | 2968, (1U<<31) | 1284, (1U<<31) | 1000, (1U<<31) | 2756, (1U<<31) | 2968, - (1U<<31) | 1284, (1U<<31) | 1000, (1U<<31) | 2756, (1U<<31) | 2968, (1U<<31) | 1284, 0x4A4A4A, (1U<<31) | 1776, (1U<<31) | 2278, - (1U<<31) | 2558, (1U<<31) | 1905, 0x42C2C, 0x44A4A, 0x45959, 0x43B3B, 0x2C2C2C, 0x4A4A4A, - 0x595959, 0x3B3B3B, 0x42C2C2C, (1U<<31) | 1798, 0x44A4A4A, (1U<<31) | 2256, 0x43B3B3B, (1U<<31) | 1927, - 0x42C2C2C, (1U<<31) | 1798, 0x44A4A4A, (1U<<31) | 2256, 0x43B3B3B, (1U<<31) | 1927, (1U<<31) | 3495, (1U<<31) | 3495, - (1U<<31) | 3495, 0x2C2C2C, (1U<<31) | 1000, 0x4A4A4A, (1U<<31) | 2756, 0x3B3B3B, (1U<<31) | 1284, 0x2C2C2C, - (1U<<31) | 1000, 0x4A4A4A, (1U<<31) | 2756, 0x3B3B3B, (1U<<31) | 1284, 0x2C2C2C, (1U<<31) | 1000, 0x4A4A4A, - (1U<<31) | 2756, 0x3B3B3B, (1U<<31) | 1284, 0x2C2C2C, (1U<<31) | 1000, 0x4A4A4A, (1U<<31) | 2756, 0x3B3B3B, - (1U<<31) | 1284, 0x448989, (1U<<31) | 2672, 0x3B2C2C3B, 0x594A4A59, 0x2C59592C, 0x4A3B3B4A, 0x2C2C3B, - 0x4A4A59, 0x59592C, 0x3B3B4A, 0x2C2C, (1U<<31) | 1009, 0x4A4A, (1U<<31) | 2740, 0x3B3B, - (1U<<31) | 1293, 0x42E2C, 0x2E42C, 0x3B2C2C3B, 0x594A4A59, 0x4A3B3B4A, 0x2C2C2C2C, 0x4A4A4A4A, - 0x3B3B3B3B, 0x3B2C2C3B, 0x594A4A59, 0x4A3B3B4A, 0x2C2C2C2C, 0x4A4A4A4A, 0x3B3B3B3B, 0x3B2C2C3B, - 0x594A4A59, 0x4A3B3B4A, 0x3B2C2C3B, 0x594A4A59, 0x4A3B3B4A, 0x2C2C3B, 0x4A4A59, 0x3B3B4A, - 0x2C2C2C, 0x4A4A4A, 0x3B3B3B, 0x2C2C3B, 0x4A4A59, 0x3B3B4A, 0x2C2C2C, 0x4A4A4A, - 0x3B3B3B, 0x2C2C3B, 0x4A4A59, 0x3B3B4A, 0x2C2C3B, 0x4A4A59, 0x3B3B4A, 0x4595959, - 0x2C2C2C2C, 0x4A4A3B, (1U<<31) | 2747, 0x59594A, (1U<<31) | 2959, 0x3B3B2C, (1U<<31) | 1275, 0x4A4A3B, - (1U<<31) | 2747, 0x59594A, (1U<<31) | 2959, 0x3B3B2C, (1U<<31) | 1275, 0x2C2C2C2C, 0x2C2C2C2C, 0x2C2C2C, - 0x4A4A4A, 0x595959, 0x3B3B3B, 0x2C2C2C, 0x2C2C2C, 0x2C2C2C, 0x42C2C2C, 0x2C2C2C, - 0x2C2C2C, 0x2C2C2C, 0x2C2C2C, 0x2C2C2C, 0x2E42C0, (1U<<31) | 1776, (1U<<31) | 1786, (1U<<31) | 2278, - (1U<<31) | 2266, (1U<<31) | 1905, (1U<<31) | 1915, (1U<<31) | 1776, (1U<<31) | 1786, (1U<<31) | 2278, (1U<<31) | 2266, (1U<<31) | 1905, - (1U<<31) | 1915, 0x2C2C4A, 0x4A4A59, 0x3B3B59, 0x3B3B4A, 0x4A4A2C, 0x59592C, 0x2C2C4, - 0x2C3B, 0x4A59, 0x3B4A, 0x2C3B, 0x4A59, 0x2C3B, 0x4A59, 0x3B4A, - 0x3B4A, 0x2C3B, 0x4A59, 0x3B4A, 0x1F, 0x1F0, (1U<<31) | 3680, (1U<<31) | 3677, - (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, - (1U<<31) | 3677, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3677, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3677, - (1U<<31) | 3680, (1U<<31) | 3677, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3677, (1U<<31) | 3677, 0x2E4422, 0x2E5522, - 0x2E4422, 0x2E5522, 0x595959, 0x595959, 0x595959, 0x595959, 0x5959, 0x25959, - 0x8A8A8A, 0x7B7B7B, (1U<<31) | 3517, 0x7B7B7B7B, 0x28A8A8A, 0x27B7B7B, 0x8A7A, 0x8A4A, - 0x7B4B, 0x4B7B, 0x8A4A, 0x7B4B, 0x27B7B7B, 0x8A8A8A, 0x7B7B7B, 0x8A8A8A, - 0x7B7B7B, 0x2E2D, 0x592E89, 0x5A2E8A, 0x4A2E7A, 0x4B2E7B, 0x89592E0, 0x8A5A2E0, - 0x7A4A2E0, 0x7B4B2E0, 0x8A8A8A, 0x7B7B7B, 0x8A8A8A, 0x7B7B7B, 0x8A4, 0x7B4, - 0x5A5A4, 0x5A5A4, 0x5A5A4, 0x7B7B, 0x48A8A, 0x47B7B, 0x7B7B, 0x8A8A, - 0x7B7B, 0x2E8A, 0x2E7B, 0x28A8A8A, 0x27B7B7B, 0x24B4B4B, 0x598989, 0x5A8A8A, - 0x4A7A7A, 0x4B7B7B, 0x89894, 0x8A8A4, 0x7A7A4, 0x7B7B4, 0x89894, 0x8A8A4, - 0x7A7A4, 0x7B7B4, 0x89894, 0x8A8A4, 0x7A7A4, 0x7B7B4, 0x0, 0x0, - (1U<<31) | 292, (1U<<31) | 390, (1U<<31) | 792, (1U<<31) | 868, (1U<<31) | 647, (1U<<31) | 735, (1U<<31) | 433, (1U<<31) | 509, - (1U<<31) | 314, (1U<<31) | 326, (1U<<31) | 804, (1U<<31) | 880, (1U<<31) | 669, (1U<<31) | 681, (1U<<31) | 455, (1U<<31) | 541, - 0x4A2E4A, 0x4B2E4B, 0x592E59, 0x5A2E5A, 0x4A4A2E0, 0x4B4B2E0, 0x59592E0, 0x5A5A2E0, - 0x2E5A, 0x22D2D3C, 0x2D2D, 0x4B4B, 0x3C3C, 0x4B4B3C, 0x3C3C2D, 0x4B4B3C, - 0x3C3C2D, 0x2D2D2D, 0x3C3C3C, 0x2D2D2D, 0x3C3C3C, 0x2D2D2D, 0x3C3C3C, 0x2D2D2D2D, - 0x4B4B4B, 0x4B7B7B, 0x4B4B4B, 0x3C3C3C, 0x3C3C3C, 0x4B4B4B, 0x3C3C3C, 0x3C3C3C, - 0x2D2D3C, 0x3C3C4B, 0x2D4, 0x4B4B5A, 0x3C3C3C, 0x3C3C3C, 0x3C3C3C, 0x4B4B5A, - 0x2D2D5A, 0x2D2D2D, 0x2D2D2D, 0x4B4B4B, 0x3C3C3C, 0x4A4B4B, 0x595A5A, 0x3B3C3C, - 0x44B4B, 0x45A5A, 0x43C3C, 0x4A4A4A, 0x4B4B4B, 0x595959, 0x5A5A5A, 0x4A4B4B, - 0x3B3C3C, 0x44B4B, 0x43C3C, 0x4A4A4A, 0x4B4B4B, 0x4A4B4B, 0x595A5A, 0x3B3C3C, - 0x44B4B, 0x45A5A, 0x43C3C, 0x4A4A4A, 0x4B4B4B, 0x595959, 0x5A5A5A, 0x2D2D2D, - 0x3C3C3C, 0x2D2D2D, 0x3C3C3C, 0x25A5A5A, 0x259, 0x25A, 0x25B, 0x34A, - 0x34B, 0x34C, 0x2C3, 0x2D4, (1U<<31) | 1048, 0x4A2, 0x4B2, 0x4C3, - 0x32C, 0x42D, (1U<<31) | 2920, 0x24A, 0x24B, 0x34C, 0x259, 0x25A, - 0x25B, 0x23B, 0x33C, 0x43D, 0x592, 0x5A2, 0x5B2, 0x448989, - 0x458989, 0x447A7A, 0x457A7A, 0x4894, 0x4895, 0x4894, 0x4895, 0x47A4, - 0x47A5, 0x47A4, 0x47A5, 0x48989, 0x447A7A, 0x458989, 0x457A7A, 0x3B2, - 0x3C3, 0x3D4, 0x428B8B8B, 0x437C7C7C, (1U<<31) | 1542, (1U<<31) | 1860, (1U<<31) | 1520, (1U<<31) | 1871, - (1U<<31) | 1674, (1U<<31) | 1641, (1U<<31) | 1652, (1U<<31) | 1663, (1U<<31) | 1586, (1U<<31) | 1564, (1U<<31) | 1630, (1U<<31) | 1608, - (1U<<31) | 1575, (1U<<31) | 1553, (1U<<31) | 1619, (1U<<31) | 1597, (1U<<31) | 1487, (1U<<31) | 1454, (1U<<31) | 1498, (1U<<31) | 1465, - (1U<<31) | 1476, (1U<<31) | 1443, (1U<<31) | 1531, (1U<<31) | 1509, 0x442E4B20, 0x442E4C30, 0x442E5B20, 0x442E5B20, - 0x333, 0x333, 0x33, 0x333, 0x334, 0x334, 0x333, 0x555, - 0x444, 0x333, 0x333, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, - (1U<<31) | 1894, (1U<<31) | 1742, (1U<<31) | 1697, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 975, (1U<<31) | 703, (1U<<31) | 767, - (1U<<31) | 1265, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 975, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1265, 0x27B7A7B, - 0x37C7A7C, 0x27B7A7B, 0x37C7A7C, 0x37C7B7C, 0x28A898A, 0x28B898B, 0x28B8A8B, 0x24A4A4A, - 0x24B4A4B, 0x34C4A4C, 0x24B4A4B, 0x34C4A4C, 0x34C4B4C, 0x25A595A, 0x25B595B, 0x25B5A5B, - 0x342C2C3, 0x442D2D4, (1U<<31) | 2951, 0x244A4A2, 0x244B4B2, 0x344C4C3, 0x2489892, 0x248A8A2, - 0x4248B8B2, 0x247A7A2, 0x247B7B2, 0x4347C7C3, 0x2459592, 0x245A5A2, 0x245B5B2, 0x42489892, - 0x4247A7A2, 0x243B3B2, 0x343C3C3, 0x443D3D4, 0x24A4A4A, 0x24B4B4B, 0x34C4C4C, 0x2898989, - 0x28A8A8A, 0x28B8B8B, 0x27A7A7A, 0x27B7B7B, 0x37C7C7C, 0x2595959, 0x25A5A5A, 0x25B5B5B, - 0x24A2E0, 0x24B2E0, 0x34C2E0, 0x2892E0, 0x28A2E0, 0x28B2E0, 0x27A2E0, 0x27B2E0, - 0x37C2E0, 0x2592E0, 0x25A2E0, 0x25B2E0, 0x24A4A4A, 0x24B4B4B, 0x34C4C4C, 0x2595959, - 0x25A5A5A, 0x25B5B5B, 0x2894A89, 0x28A4A8A, 0x28B4B8B, 0x27A4A7A, 0x27B4B7B, 0x437C4C7C, - 0x24A894A, 0x24A8A4A, 0x424B8B4B, 0x27A897A, 0x27A8A7A, 0x427B8B7B, 0x2598959, 0x25A8A5A, - 0x425B8B5B, 0x24A894A, 0x24A8A4A, 0x424B8B4B, 0x2598959, 0x25A8A5A, 0x425B8B5B, 0x24A7A4A, - 0x24B7B4B, 0x434C7C4C, 0x2897A89, 0x28A7A8A, 0x428B7B8B, 0x2597A59, 0x25A7A5A, 0x425B7B5B, - 0x24A7A4A, 0x24B7B4B, 0x434C7C4C, 0x2597A59, 0x25A7A5A, 0x425B7B5B, 0x2895989, 0x28A5A8A, - 0x428B5B8B, 0x27A597A, 0x27A5A7A, 0x427B5B7B, (1U<<31) | 1708, (1U<<31) | 1731, 0x24A894A, 0x24A8A4A, - 0x424B8B4B, 0x2598959, 0x25A8A5A, 0x425B8B5B, 0x24A894A, 0x24A8A4A, 0x424B8B4B, 0x2598959, - 0x25A8A5A, 0x425B8B5B, 0x24A7A4A, 0x24B7B4B, 0x434C7C4C, 0x2597A59, 0x25A7A5A, 0x425B7B5B, - 0x24A7A4A, 0x24B7B4B, 0x434C7C4C, 0x2597A59, 0x25A7A5A, 0x425B7B5B, 0x2894A89, 0x28A4A8A, - 0x28B4B8B, 0x27A4A7A, 0x27B4B7B, 0x437C4C7C, 0x2895989, 0x28A5A8A, 0x428B5B8B, 0x27A597A, - 0x27A5A7A, 0x427B5B7B, (1U<<31) | 141, (1U<<31) | 1117, (1U<<31) | 1967, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, - (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 1742, (1U<<31) | 1697, 0x24A4A4A, 0x24B4B4B, 0x34C4C4C, - 0x24A2E4A, 0x24B2E4B, 0x34C2E4C, 0x2892E89, 0x28A2E8A, 0x28B2E8B, 0x27A2E7A, 0x27B2E7B, - 0x37C2E7C, 0x2592E59, 0x25A2E5A, 0x25B2E5B, 0x2898989, 0x28A8A8A, 0x28B8B8B, 0x27A7A7A, - 0x27B7B7B, 0x37C7C7C, 0x2595959, 0x25A5A5A, 0x25B5B5B, (1U<<31) | 227, (1U<<31) | 249, (1U<<31) | 1431, - (1U<<31) | 183, (1U<<31) | 205, (1U<<31) | 1848, (1U<<31) | 1419, (1U<<31) | 1407, 0x24892, 0x248A2, 0x248B2, - 0x247A2, 0x247B2, 0x347C3, 0x24892, 0x247A2, 0x2898989, 0x28A8A8A, 0x428B8B8B, - 0x27A7A7A, 0x27B7B7B, 0x437C7C7C, (1U<<31) | 1742, (1U<<31) | 1697, 0x28948989, 0x28A48A8A, (1U<<31) | 1755, - 0x27A47A7A, 0x27B47B7B, (1U<<31) | 1884, (1U<<31) | 1719, (1U<<31) | 1685, (1U<<31) | 713, (1U<<31) | 1212, (1U<<31) | 1223, - (1U<<31) | 846, (1U<<31) | 922, (1U<<31) | 933, (1U<<31) | 358, (1U<<31) | 1159, (1U<<31) | 1170, (1U<<31) | 487, (1U<<31) | 573, - (1U<<31) | 584, 0x24A4A4A, 0x24B4B4B, 0x34C4C4C, 0x2595959, 0x25A5A5A, 0x25B5B5B, (1U<<31) | 836, - (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 1742, (1U<<31) | 1697, (1U<<31) | 836, - (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 1742, (1U<<31) | 1697, (1U<<31) | 836, - (1U<<31) | 703, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 1742, - (1U<<31) | 1697, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 975, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1265, 0x32C2C2C, - 0x42D2D2D, (1U<<31) | 2926, 0x24A4A4A, 0x24B4B4B, 0x34C4C4C, 0x2595959, 0x25A5A5A, 0x25B5B5B, - 0x23B3B3B, 0x33C3C3C, 0x43D3D3D, (1U<<31) | 152, (1U<<31) | 1128, (1U<<31) | 1978, (1U<<31) | 1067, (1U<<31) | 1818, - (1U<<31) | 2941, (1U<<31) | 152, (1U<<31) | 1128, (1U<<31) | 1978, (1U<<31) | 1067, (1U<<31) | 1818, (1U<<31) | 2941, (1U<<31) | 1057, - (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, - (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 131, (1U<<31) | 1107, - (1U<<31) | 1957, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 1057, - (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, 0x32C22C, 0x42D22D, (1U<<31) | 2917, - 0x24A44A, 0x24B44B, 0x34C44C, 0x259559, 0x25A55A, 0x25B55B, 0x25B55B, 0x23B33B, - 0x33C33C, 0x43D33D, (1U<<31) | 892, (1U<<31) | 955, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 131, (1U<<31) | 1107, - (1U<<31) | 1957, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 747, (1U<<31) | 1245, (1U<<31) | 402, (1U<<31) | 1202, - (1U<<31) | 121, (1U<<31) | 1087, (1U<<31) | 1937, (1U<<31) | 271, (1U<<31) | 348, (1U<<31) | 1149, (1U<<31) | 1057, (1U<<31) | 1808, - (1U<<31) | 2924, (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 131, - (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, - (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 1057, (1U<<31) | 1808, - (1U<<31) | 2924, (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 131, - (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, - (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, 0x22C4A2C, 0x22C4B2C, - 0x32C4C2C, 0x24A2E0, 0x24B2E0, 0x34C2E0, 0x23B4A3B, 0x23B4B3B, 0x33C4C3C, 0x24A2E0, - 0x24B2E0, 0x34C2E0, 0x22C592C, 0x22C5A2C, 0x22C5B2C, 0x2592E0, 0x25A2E0, 0x25B2E0, - 0x24A594A, 0x24A5A4A, 0x24B5B4B, 0x2592E0, 0x25A2E0, 0x25B2E0, 0x23B593B, 0x23B5A3B, - 0x23B5B3B, 0x2592E0, 0x25A2E0, 0x25B2E0, 0x22C3B2C, 0x32C3C2C, 0x42D3D2D, 0x23B2E0, - 0x33C2E0, 0x43D2E0, 0x22C4A2C, 0x22C4B2C, 0x32C4C2C, 0x24A2E0, 0x24B2E0, 0x34C2E0, - 0x23B4A3B, 0x23B4B3B, 0x33C4C3C, 0x24A2E0, 0x24B2E0, 0x34C2E0, 0x22C592C, 0x22C5A2C, - 0x22C5B2C, 0x2592E0, 0x25A2E0, 0x25B2E0, 0x24A594A, 0x24A5A4A, 0x24B5B4B, 0x2592E0, - 0x25A2E0, 0x25B2E0, 0x23B593B, 0x23B5A3B, 0x23B5B3B, 0x2592E0, 0x25A2E0, 0x25B2E0, - 0x22C3B2C, 0x32C3C2C, 0x42D3D2D, 0x23B2E0, 0x33C2E0, 0x43D2E0, 0x24A2C4A, 0x24B2C4B, - 0x34C2C4C, 0x2592C59, 0x25A2C5A, 0x25B2C5B, 0x23B2C3B, 0x33C2C3C, 0x43D2D3D, 0x2594A59, - 0x25A4A5A, 0x25B4B5B, 0x24A3B4A, 0x24B3B4B, 0x34C3C4C, 0x2593B59, 0x25A3B5A, 0x25B3B5B, - 0x22C4A2C, 0x22C4B2C, 0x32C4C2C, 0x24A2E0, 0x24B2E0, 0x34C2E0, 0x23B4A3B, 0x23B4B3B, - 0x33C4C3C, 0x24A2E0, 0x24B2E0, 0x34C2E0, 0x22C592C, 0x22C5A2C, 0x22C5B2C, 0x2592E0, - 0x25A2E0, 0x25B2E0, 0x24A594A, 0x24A5A4A, 0x24B5B4B, 0x2592E0, 0x25A2E0, 0x25B2E0, - 0x23B593B, 0x23B5A3B, 0x23B5B3B, 0x2592E0, 0x25A2E0, 0x25B2E0, 0x22C3B2C, 0x32C3C2C, - 0x42D3D2D, 0x23B2E0, 0x33C2E0, 0x43D2E0, 0x24A2C4A, 0x24B2C4B, 0x34C2C4C, 0x2592C59, - 0x25A2C5A, 0x25B2C5B, 0x23B2C3B, 0x33C2C3C, 0x43D2D3D, 0x2594A59, 0x25A4A5A, 0x25B4B5B, - 0x24A3B4A, 0x24B3B4B, 0x34C3C4C, 0x2593B59, 0x25A3B5A, 0x25B3B5B, (1U<<31) | 445, (1U<<31) | 521, - (1U<<31) | 606, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 131, - (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, - (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 445, (1U<<31) | 521, - (1U<<31) | 606, 0x24A44A4A, 0x24B44B4B, 0x34C44C4C, 0x25945959, 0x25A45A5A, 0x25B45B5B, (1U<<31) | 304, - (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, 0x24A44A4A, 0x24B44B4B, 0x34C44C4C, - 0x25945959, 0x25A45A5A, 0x25B45B5B, (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 467, (1U<<31) | 553, - (1U<<31) | 626, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 1192, (1U<<31) | 304, (1U<<31) | 380, 0x24A44A4A, - 0x24B44B4B, 0x34C44C4C, (1U<<31) | 616, (1U<<31) | 467, (1U<<31) | 531, 0x25945959, 0x25A45A5A, 0x25B45B5B, - (1U<<31) | 131, (1U<<31) | 1097, (1U<<31) | 1947, 0x23B43B3B, 0x33C43C3C, 0x43D43D3D, (1U<<31) | 1202, (1U<<31) | 626, - (1U<<31) | 1107, (1U<<31) | 467, (1U<<31) | 1957, (1U<<31) | 553, (1U<<31) | 304, (1U<<31) | 131, (1U<<31) | 402, (1U<<31) | 1192, - (1U<<31) | 304, (1U<<31) | 380, 0x24A44A4A, 0x24B44B4B, 0x34C44C4C, (1U<<31) | 616, (1U<<31) | 467, (1U<<31) | 531, - 0x25945959, 0x25A45A5A, 0x25B45B5B, (1U<<31) | 131, (1U<<31) | 1097, (1U<<31) | 1947, 0x23B43B3B, 0x33C43C3C, - 0x43D43D3D, (1U<<31) | 1202, (1U<<31) | 626, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 304, - (1U<<31) | 131, (1U<<31) | 402, (1U<<31) | 1192, (1U<<31) | 304, (1U<<31) | 380, 0x24A44A4A, 0x24B44B4B, 0x34C44C4C, - (1U<<31) | 616, (1U<<31) | 467, (1U<<31) | 531, 0x25945959, 0x25A45A5A, 0x25B45B5B, (1U<<31) | 131, (1U<<31) | 1097, - (1U<<31) | 1947, 0x23B43B3B, 0x33C43C3C, 0x43D43D3D, (1U<<31) | 1202, (1U<<31) | 626, (1U<<31) | 1107, (1U<<31) | 467, - (1U<<31) | 1957, (1U<<31) | 553, (1U<<31) | 304, (1U<<31) | 131, (1U<<31) | 402, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, - (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 131, (1U<<31) | 1107, - (1U<<31) | 1957, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 1057, - (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 172, (1U<<31) | 194, (1U<<31) | 1138, - (1U<<31) | 216, (1U<<31) | 238, (1U<<31) | 260, (1U<<31) | 781, (1U<<31) | 857, (1U<<31) | 1753, (1U<<31) | 636, (1U<<31) | 724, - (1U<<31) | 1882, (1U<<31) | 2010, (1U<<31) | 1998, 0x28948989, 0x28A48A8A, (1U<<31) | 1755, 0x27A47A7A, 0x27B47B7B, - (1U<<31) | 1884, (1U<<31) | 2010, (1U<<31) | 1998, 0x28948989, 0x28A48A8A, (1U<<31) | 1755, 0x27A47A7A, 0x27B47B7B, - (1U<<31) | 1884, (1U<<31) | 2010, (1U<<31) | 1998, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, - (1U<<31) | 1894, (1U<<31) | 1742, (1U<<31) | 1697, (1U<<31) | 1234, (1U<<31) | 724, (1U<<31) | 944, (1U<<31) | 857, (1U<<31) | 1181, - (1U<<31) | 369, (1U<<31) | 595, (1U<<31) | 498, (1U<<31) | 781, (1U<<31) | 857, (1U<<31) | 944, (1U<<31) | 636, (1U<<31) | 724, - (1U<<31) | 1234, 0x2898989, 0x28A8A8A, 0x428B8B8B, 0x27A7A7A, 0x27B7B7B, 0x437C7C7C, (1U<<31) | 1742, - (1U<<31) | 1697, 0x27A2E0, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, - (1U<<31) | 1742, (1U<<31) | 1697, 0x342C2C3, 0x442D2D4, (1U<<31) | 2951, 0x244A4A2, 0x244B4B2, 0x344C4C3, - 0x2459592, 0x245A5A2, 0x245B5B2, 0x243B3B2, 0x343C3C3, 0x443D3D4, (1U<<31) | 281, (1U<<31) | 369, - (1U<<31) | 1181, (1U<<31) | 422, (1U<<31) | 498, (1U<<31) | 595, 0x27A3B7A, 0x27B3B7B, 0x437C3C7C, 0x23B47A3B, - 0x23B47B3B, 0x33C47C3C, 0x27A47B7A, 0x27A47C7A, 0x27B47C7B, 0x28948A89, 0x28948B89, 0x28A48B8A, - 0x24A44B4A, 0x24A44C4A, 0x24B44C4B, 0x25945A59, 0x25945B59, 0x25A45B5A, (1U<<31) | 836, (1U<<31) | 912, - (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 1742, (1U<<31) | 1697, (1U<<31) | 836, (1U<<31) | 912, - (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, - (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, - (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 816, (1U<<31) | 892, - (1U<<31) | 955, (1U<<31) | 659, (1U<<31) | 747, (1U<<31) | 1245, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 1057, - (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 816, (1U<<31) | 892, (1U<<31) | 955, (1U<<31) | 659, (1U<<31) | 747, (1U<<31) | 1245, - (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, (1U<<31) | 826, (1U<<31) | 902, - (1U<<31) | 965, (1U<<31) | 693, (1U<<31) | 757, (1U<<31) | 1255, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 1057, - (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, - (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 975, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1265, (1U<<31) | 836, (1U<<31) | 912, - (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 1742, (1U<<31) | 1697, (1U<<31) | 836, (1U<<31) | 912, - (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, - (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, - (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 227, (1U<<31) | 249, - (1U<<31) | 1431, (1U<<31) | 183, (1U<<31) | 205, (1U<<31) | 1848, (1U<<31) | 1419, (1U<<31) | 1407, (1U<<31) | 172, (1U<<31) | 194, - (1U<<31) | 1138, (1U<<31) | 216, (1U<<31) | 238, (1U<<31) | 260, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, - (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 1742, (1U<<31) | 1697, (1U<<31) | 836, (1U<<31) | 912, (1U<<31) | 1765, (1U<<31) | 703, - (1U<<31) | 767, (1U<<31) | 1894, (1U<<31) | 304, (1U<<31) | 402, (1U<<31) | 1202, (1U<<31) | 131, (1U<<31) | 1107, (1U<<31) | 1957, - (1U<<31) | 826, (1U<<31) | 902, (1U<<31) | 965, (1U<<31) | 693, (1U<<31) | 757, (1U<<31) | 1255, (1U<<31) | 467, (1U<<31) | 553, - (1U<<31) | 626, (1U<<31) | 1057, (1U<<31) | 1808, (1U<<31) | 2924, (1U<<31) | 467, (1U<<31) | 553, (1U<<31) | 626, (1U<<31) | 467, - (1U<<31) | 553, (1U<<31) | 626, 0x2E5B, 0x2C4C, 0x2C5B, 0x4B5B, 0x3C4C, 0x3B5B, - (1U<<31) | 1041, 0x32C2C3, 0x42D2D4, (1U<<31) | 2934, 0x24A4A2, 0x24B4B2, 0x34C4C3, 0x259592, - 0x25A5A2, 0x25B5B2, 0x23B3B2, 0x33C3C3, 0x43D3D4, 0x32C2C3, 0x42D2D4, (1U<<31) | 2934, - 0x24A4A2, 0x24B4B2, 0x34C4C3, 0x259592, 0x25A5A2, 0x25B5B2, 0x23B3B2, 0x33C3C3, - 0x43D3D4, 0x2898989, 0x28A8A8A, 0x28B8B8B, 0x27A7A7A, 0x27B7B7B, 0x37C7C7C, (1U<<31) | 836, - (1U<<31) | 703, 0x428B8B8B, 0x437C7C7C, (1U<<31) | 1742, (1U<<31) | 1697, 0x2898989, 0x28A8A8A, 0x28B8B8B, - 0x27A7A7A, 0x27B7B7B, 0x37C7C7C, (1U<<31) | 836, (1U<<31) | 703, 0x428B8B8B, 0x437C7C7C, (1U<<31) | 1742, - (1U<<31) | 1697, (1U<<31) | 2720, (1U<<31) | 2372, (1U<<31) | 2588, (1U<<31) | 2662, (1U<<31) | 2730, (1U<<31) | 2318, (1U<<31) | 2598, - (1U<<31) | 2652, (1U<<31) | 2690, (1U<<31) | 2548, (1U<<31) | 2710, (1U<<31) | 2578, (1U<<31) | 2622, (1U<<31) | 2288, (1U<<31) | 2632, - (1U<<31) | 2298, 0x442E4B20, 0x442E4C30, 0x442E5B20, 0x442E5B20, (1U<<31) | 2680, (1U<<31) | 2538, (1U<<31) | 2700, - (1U<<31) | 2568, (1U<<31) | 2612, (1U<<31) | 2246, (1U<<31) | 2642, (1U<<31) | 2308, 0x2E8B, 0x2E7C, 0x4489894, - 0x447A7A4, 0x4894, 0x4895, 0x4894, 0x4895, 0x47A4, 0x47A5, 0x47A4, - 0x47A5, 0x444, 0x555, 0x444, 0x555, 0x444, 0x555, 0x444, - 0x555, 0x2E0, 0x4, 0x5, 0x40, 0x50, (1U<<31) | 3504, (1U<<31) | 3517, - 0x7A7A7A7A, 0x7B7B7B7B, (1U<<31) | 3504, 0x7A7A7A7A, (1U<<31) | 3504, (1U<<31) | 3517, 0x7A7A7A7A, 0x7B7B7B7B, - (1U<<31) | 3504, (1U<<31) | 3517, 0x7A7A7A7A, 0x7B7B7B7B, (1U<<31) | 3504, 0x7A7A7A7A, (1U<<31) | 3504, (1U<<31) | 3517, - 0x7A7A7A7A, 0x7B7B7B7B, (1U<<31) | 3504, (1U<<31) | 3517, 0x7A7A7A7A, 0x7B7B7B7B, (1U<<31) | 3504, 0x7A7A7A7A, - (1U<<31) | 3504, (1U<<31) | 3517, 0x7A7A7A7A, 0x7B7B7B7B, (1U<<31) | 3504, 0x7A7A7A7A, 0x2E0, 0x2E0, - 0x2E0, 0x2E0, 0x20, 0x0, 0x0, (1U<<31) | 1035, (1U<<31) | 3675, (1U<<31) | 3680, - (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, - (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 1052, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, - (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 2909, (1U<<31) | 2454, (1U<<31) | 3680, - (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3662, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, - (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 2913, (1U<<31) | 2913, - (1U<<31) | 2913, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 2913, (1U<<31) | 2913, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, - (1U<<31) | 2913, (1U<<31) | 2913, (1U<<31) | 2913, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, - (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, (1U<<31) | 3680, - (1U<<31) | 3680, (1U<<31) | 3680, 0x442E0, 0x4440, 0x2595959, 0x4, 0x5, 0x4, - 0x5, 0x4, 0x45, (1U<<31) | 1988, (1U<<31) | 2465, (1U<<31) | 2608, (1U<<31) | 1988, (1U<<31) | 2465, - (1U<<31) | 2608, 0x5, 0x2E5, 0x2E0, 0x2E0, 0x2E2E, 0x2E2E2E, 0x4A4A4A, - 0x4A4A4A, 0x4A4A4A, 0x24A4A4A, 0x4A4A4A, 0x4A4A4A, 0x4A4A4A4A, 0x7A7A7A, 0x27A7A7A, - 0x27A7A7A, 0x7A7A4, 0x7A7A4, 0x7A7A4, 0x7A7A4, 0x7A7A4, 0x7A7A4, (1U<<31) | 3513, - (1U<<31) | 3671, (1U<<31) | 3665, (1U<<31) | 3491, 0x47A7A, 0x57A7A, 0x7A4, 0x7A5, (1U<<31) | 3513, - (1U<<31) | 3491, 0x7A4, 0x7A5, 0x7A7A7A, 0x2E0, 0x7A7A7A, 0x7A7A7A, 0x7A7A7A, - 0x7A7A7A, 0x7A4, 0x7A7A7A, (1U<<31) | 1053, 0x7A7A, 0x7A7A, 0x7A7A, 0x7A7A, - 0x0, 0x7A7A, 0x7A7A, 0x2E0, 0x7A7A7A, 0x7A7A4, 0x7A7A4, 0x7A7A4, - 0x7A7A4, 0x7A7A4, 0x7A7A4, 0x898989, 0x2E0, 0x2898989, 0x2898989, 0x89894, - 0x89894, 0x89894, 0x89894, 0x89894, 0x89894, 0x4A7A, 0x894A, 0x897A, - 0x7A4A, 0x894, 0x895, 0x897A7A, 0x48989, 0x58989, 0x7A8989, 0x894A, - 0x7A4A, 0x894, 0x895, 0x898989, 0x0, 0x2E2C2C0, 0x898989, 0x898989, - 0x0, 0x898989, 0x898989, 0x894, 0x898989, 0x4A4A3B, 0x3B3B2C, 0x3B3B2C, - 0x2C2C2C, 0x3B3B3B, 0x2C2C2C, 0x3B3B3B, 0x0, 0x2C2C2C, 0x3B3B3B, 0x3B3B4A, - 0x2C4, 0x3B3B3B, 0x3B3B3B, 0x4A4A59, 0x2C2C59, 0x4A4A4A, 0x595959, 0x3B3B3B, - 0x44A4A, 0x45959, 0x43B3B, 0x4A4A4A, 0x3B3B3B, 0x44A4A, 0x43B3B, 0x4A4A4A, - 0x595959, 0x3B3B3B, 0x44A4A, 0x45959, 0x43B3B, 0x2C2C2C, 0x3B3B3B, 0x2C2C2C, - 0x3B3B3B, 0x8989, 0x8989, 0x898989, 0x89894, 0x89894, 0x89894, 0x89894, - 0x89894, 0x89894, 0x898989, 0x7A7A7A, 0x898989, 0x7A7A7A, 0x898989, 0x7A7A7A, - 0x2E2C, 0x442E0, 0x440, (1U<<31) | 3504, 0x7A7A7A7A, 0x2898989, 0x27A7A7A, 0x27A7A7A, - 0x2E59, 0x22C2C3B, 0x4A4A3B, 0x2C2C2C2C, 0x3B3B, 0x4A4A59, 0x59594, 0x59594, - 0x59594, 0x48989, 0x47A7A, 0x4898989, 0x47A7A7A, 0x344, 0x444, 0x244, - 0x555, 0x242C42C4, 0x242C42C4, 0x242C42C4, 0x242C42C4, 0x242C42C4, 0x242C42C4, (1U<<31) | 162, - 0x22C2C4, 0x22C2C4, 0x22C2C4, 0x22C2C4, 0x22C2C4, 0x22C2C4, 0x22C2C2C, 0x2C5959, - 0x225959, 0x595959, 0x22595959, (1U<<31) | 3677, 0x2C2C, (1U<<31) | 3677, 0x4A4A, (1U<<31) | 3677, - 0x3B3B, (1U<<31) | 3680, 0x4A4A4A, (1U<<31) | 3680, 0x3B3B3B, (1U<<31) | 3680, 0x3B3B3B, (1U<<31) | 3680, - 0x4A4A4A, (1U<<31) | 3680, 0x3B3B3B, (1U<<31) | 3680, 0x3B3B3B, (1U<<31) | 3680, 0x2C2C3B, (1U<<31) | 3680, - 0x3B3B3B, (1U<<31) | 3680, 0x2C2C2C, (1U<<31) | 3680, 0x2C2C2C, (1U<<31) | 3680, 0x4A4A4A, (1U<<31) | 3680, - 0x3B3B3B, 0x2E4422, 0x2E5522, 0x444, 0x555, 0x3B7A, 0x3B7B, 0x47A3B, - 0x47B3B, 0x40, 0x50, 0x40, 0x50, 0x40, 0x20, 0x4, - 0x0, 0x8989, 0x8A8A, 0x7A7A, 0x7B7B, 0x8989, 0x7A7A, 0x59595959, - 0x5A5A5A5A, 0x22C2C2C, 0x24A4A4A, 0x2595959, 0x22C2C2C, 0x24A4A4A, 0x2595959, 0x23B3B3B, - 0x23B3B3B, (1U<<31) | 477, (1U<<31) | 563, (1U<<31) | 338, (1U<<31) | 412, 0x2C4A, 0x2C59, 0x2C3B, - 0x4A59, 0x2C4A, 0x2C59, 0x2C3B, 0x4A59, 0x3B4A, 0x3B59, 0x3B4A, - 0x3B59, 0x2C3B, 0x4A59, 0x3B4A, 0x4A4A4A4A, 0x594A4A59, 0x594A4A59, 0x4A4A4A4A, - 0x594A4A59, 0x594A4A59, 0x4A3B3B4A, 0x3B3B3B3B, 0x4A3B3B4A, 0x3B3B3B3B, 0x4A3B3B4A, 0x4A3B3B4A, - 0x2C2C2C2C, 0x2C2C2C, 0x22C2C, 0x4A4A4A, 0x24A4A, 0x595959, 0x25959, 0x3B3B3B, - 0x23B3B, 0x2C2C2C, 0x4A4A4A, 0x595959, 0x3B3B3B, 0x2C2C2C, 0x4A4A4A, 0x595959, - 0x3B3B3B, 0x442E0, 0x442E0, 0x442E0, 0x442E0, 0x442E0, 0x442E0, 0x442E0, - 0x442E0, 0x442E0, 0x442E0, 0x442E0, 0x442E0, 0x4, 0x44, 0x2E2E, - 0x44F0, 0x0, 0x4F0, 0x40, 0x4444, (1U<<31) | 2086, 0x4F0, 0x4F0, - 0x4F4, 0x4F0, 0x4, 0x4, 0x4, 0x44, 0x44F, 0xCF4F, - 0x4F4, 0x4F4, 0x4F4, 0x2E4F0, 0x2E4F0, 0x2E4F0, 0x2E4F0, 0x2E4F0, - 0x44F4, 0x4F4, 0x4F0, 0x4F0, 0x44F0, 0x44F0, 0x44F4, 0x44F0, - 0x4F4, 0x44F0, 0xCF4F0, 0x44F0, 0x2E4F0, 0x440, 0x44F0, 0x44F0, - 0xCF4F0, 0x40, 0x44F0, 0x2E4F0, 0x444, 0x0, 0x4F0, 0x4F4, - 0x4F4, 0x2E, 0x444, 0 -}; - -static const unsigned char IIT_LongEncodingTable[] = { - /* 0 */ 0, 10, 7, 15, 1, 11, 4, 4, 1, 1, 1, 1, 0, - /* 13 */ 4, 4, 4, 15, 1, 11, 4, 1, 1, 1, 0, - /* 24 */ 0, 15, 2, 10, 4, 4, 4, 1, 1, 0, - /* 34 */ 21, 15, 2, 1, 15, 2, 15, 2, 1, 0, - /* 44 */ 15, 2, 15, 2, 15, 2, 15, 2, 1, 0, - /* 54 */ 0, 15, 3, 33, 3, 4, 31, 3, 1, 0, - /* 64 */ 0, 15, 3, 15, 12, 4, 31, 3, 1, 0, - /* 74 */ 0, 15, 4, 15, 12, 15, 17, 4, 1, 0, - /* 84 */ 21, 15, 1, 1, 15, 1, 15, 1, 0, - /* 93 */ 0, 19, 15, 1, 0, - /* 98 */ 15, 1, 25, 1, 0, - /* 103 */ 35, 1, 35, 1, 35, 1, 0, - /* 110 */ 36, 1, 36, 1, 36, 1, 0, - /* 117 */ 27, 2, 2, 0, - /* 121 */ 11, 3, 12, 2, 12, 2, 11, 3, 2, 0, - /* 131 */ 11, 3, 11, 3, 11, 3, 11, 3, 2, 0, - /* 141 */ 11, 3, 12, 2, 12, 2, 4, 11, 3, 2, 0, - /* 152 */ 11, 3, 10, 4, 10, 4, 11, 3, 2, 0, - /* 162 */ 12, 2, 12, 2, 4, 12, 2, 4, 2, 0, - /* 172 */ 10, 4, 10, 4, 10, 4, 10, 4, 4, 2, 0, - /* 183 */ 10, 7, 10, 7, 10, 7, 10, 4, 4, 2, 0, - /* 194 */ 11, 4, 11, 4, 11, 4, 11, 4, 4, 2, 0, - /* 205 */ 11, 7, 11, 7, 11, 7, 11, 4, 4, 2, 0, - /* 216 */ 9, 5, 9, 5, 9, 5, 9, 5, 4, 2, 0, - /* 227 */ 9, 8, 9, 8, 9, 8, 9, 5, 4, 2, 0, - /* 238 */ 10, 5, 10, 5, 10, 5, 10, 5, 4, 2, 0, - /* 249 */ 10, 8, 10, 8, 10, 8, 10, 5, 4, 2, 0, - /* 260 */ 11, 5, 11, 5, 11, 5, 11, 5, 4, 2, 0, - /* 271 */ 10, 4, 11, 3, 11, 3, 10, 4, 2, 0, - /* 281 */ 10, 4, 10, 4, 10, 4, 4, 10, 4, 2, 0, - /* 292 */ 10, 4, 10, 4, 14, 2, 10, 4, 10, 4, 2, 0, - /* 304 */ 10, 4, 10, 4, 10, 4, 10, 4, 2, 0, - /* 314 */ 10, 4, 10, 4, 14, 2, 9, 5, 10, 4, 2, 0, - /* 326 */ 10, 4, 10, 4, 14, 2, 10, 5, 10, 4, 2, 0, - /* 338 */ 10, 7, 10, 7, 10, 7, 10, 4, 2, 0, - /* 348 */ 11, 4, 12, 3, 12, 3, 11, 4, 2, 0, - /* 358 */ 11, 4, 11, 4, 10, 4, 4, 11, 4, 2, 0, - /* 369 */ 11, 4, 11, 4, 11, 4, 4, 11, 4, 2, 0, - /* 380 */ 11, 4, 11, 4, 10, 4, 11, 4, 2, 0, - /* 390 */ 11, 4, 11, 4, 14, 2, 11, 4, 11, 4, 2, 0, - /* 402 */ 11, 4, 11, 4, 11, 4, 11, 4, 2, 0, - /* 412 */ 11, 7, 11, 7, 11, 7, 11, 4, 2, 0, - /* 422 */ 9, 5, 9, 5, 9, 5, 4, 9, 5, 2, 0, - /* 433 */ 9, 5, 9, 5, 14, 2, 10, 4, 9, 5, 2, 0, - /* 445 */ 9, 5, 10, 4, 10, 4, 9, 5, 2, 0, - /* 455 */ 9, 5, 9, 5, 14, 2, 9, 5, 9, 5, 2, 0, - /* 467 */ 9, 5, 9, 5, 9, 5, 9, 5, 2, 0, - /* 477 */ 9, 8, 9, 8, 9, 8, 9, 5, 2, 0, - /* 487 */ 10, 5, 10, 5, 9, 5, 4, 10, 5, 2, 0, - /* 498 */ 10, 5, 10, 5, 10, 5, 4, 10, 5, 2, 0, - /* 509 */ 10, 5, 10, 5, 14, 2, 10, 4, 10, 5, 2, 0, - /* 521 */ 10, 5, 11, 4, 11, 4, 10, 5, 2, 0, - /* 531 */ 10, 5, 10, 5, 9, 5, 10, 5, 2, 0, - /* 541 */ 10, 5, 10, 5, 14, 2, 10, 5, 10, 5, 2, 0, - /* 553 */ 10, 5, 10, 5, 10, 5, 10, 5, 2, 0, - /* 563 */ 10, 8, 10, 8, 10, 8, 10, 5, 2, 0, - /* 573 */ 11, 5, 11, 5, 9, 5, 4, 11, 5, 2, 0, - /* 584 */ 11, 5, 11, 5, 10, 5, 4, 11, 5, 2, 0, - /* 595 */ 11, 5, 11, 5, 11, 5, 4, 11, 5, 2, 0, - /* 606 */ 11, 5, 12, 4, 12, 4, 11, 5, 2, 0, - /* 616 */ 11, 5, 11, 5, 9, 5, 11, 5, 2, 0, - /* 626 */ 11, 5, 11, 5, 11, 5, 11, 5, 2, 0, - /* 636 */ 10, 7, 10, 7, 10, 7, 4, 10, 7, 2, 0, - /* 647 */ 10, 7, 10, 7, 14, 2, 10, 4, 10, 7, 2, 0, - /* 659 */ 10, 7, 10, 7, 10, 4, 10, 7, 2, 0, - /* 669 */ 10, 7, 10, 7, 14, 2, 9, 5, 10, 7, 2, 0, - /* 681 */ 10, 7, 10, 7, 14, 2, 10, 5, 10, 7, 2, 0, - /* 693 */ 10, 7, 10, 4, 10, 7, 10, 7, 2, 0, - /* 703 */ 10, 7, 10, 7, 10, 7, 10, 7, 2, 0, - /* 713 */ 11, 7, 11, 7, 10, 7, 4, 11, 7, 2, 0, - /* 724 */ 11, 7, 11, 7, 11, 7, 4, 11, 7, 2, 0, - /* 735 */ 11, 7, 11, 7, 14, 2, 11, 4, 11, 7, 2, 0, - /* 747 */ 11, 7, 11, 7, 11, 4, 11, 7, 2, 0, - /* 757 */ 11, 7, 11, 4, 11, 7, 11, 7, 2, 0, - /* 767 */ 11, 7, 11, 7, 11, 7, 11, 7, 2, 0, - /* 777 */ 27, 7, 2, 0, - /* 781 */ 9, 8, 9, 8, 9, 8, 4, 9, 8, 2, 0, - /* 792 */ 9, 8, 9, 8, 14, 2, 10, 4, 9, 8, 2, 0, - /* 804 */ 9, 8, 9, 8, 14, 2, 9, 5, 9, 8, 2, 0, - /* 816 */ 9, 8, 9, 8, 9, 5, 9, 8, 2, 0, - /* 826 */ 9, 8, 9, 5, 9, 8, 9, 8, 2, 0, - /* 836 */ 9, 8, 9, 8, 9, 8, 9, 8, 2, 0, - /* 846 */ 10, 8, 10, 8, 9, 8, 4, 10, 8, 2, 0, - /* 857 */ 10, 8, 10, 8, 10, 8, 4, 10, 8, 2, 0, - /* 868 */ 10, 8, 10, 8, 14, 2, 10, 4, 10, 8, 2, 0, - /* 880 */ 10, 8, 10, 8, 14, 2, 10, 5, 10, 8, 2, 0, - /* 892 */ 10, 8, 10, 8, 10, 5, 10, 8, 2, 0, - /* 902 */ 10, 8, 10, 5, 10, 8, 10, 8, 2, 0, - /* 912 */ 10, 8, 10, 8, 10, 8, 10, 8, 2, 0, - /* 922 */ 11, 8, 11, 8, 9, 8, 4, 11, 8, 2, 0, - /* 933 */ 11, 8, 11, 8, 10, 8, 4, 11, 8, 2, 0, - /* 944 */ 11, 8, 11, 8, 11, 8, 4, 11, 8, 2, 0, - /* 955 */ 11, 8, 11, 8, 11, 5, 11, 8, 2, 0, - /* 965 */ 11, 8, 11, 5, 11, 8, 11, 8, 2, 0, - /* 975 */ 11, 8, 11, 8, 11, 8, 11, 8, 2, 0, - /* 985 */ 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 11, 2, 0, - /* 1000 */ 21, 12, 2, 4, 12, 2, 12, 2, 0, - /* 1009 */ 21, 12, 2, 4, 12, 2, 0, - /* 1016 */ 21, 4, 4, 14, 2, 0, - /* 1022 */ 21, 5, 5, 14, 2, 0, - /* 1028 */ 0, 14, 20, 5, 14, 2, 0, - /* 1035 */ 0, 17, 17, 14, 2, 0, - /* 1041 */ 11, 5, 16, 2, 16, 2, 0, - /* 1048 */ 5, 16, 2, 0, - /* 1052 */ 17, 17, 17, 2, 0, - /* 1057 */ 12, 2, 12, 2, 12, 2, 12, 2, 3, 0, - /* 1067 */ 12, 2, 11, 3, 11, 3, 12, 2, 3, 0, - /* 1077 */ 0, 5, 4, 4, 4, 3, 3, 3, 3, 0, - /* 1087 */ 12, 3, 13, 2, 13, 2, 12, 3, 3, 0, - /* 1097 */ 12, 3, 12, 3, 11, 3, 12, 3, 3, 0, - /* 1107 */ 12, 3, 12, 3, 12, 3, 12, 3, 3, 0, - /* 1117 */ 12, 3, 13, 2, 13, 2, 4, 12, 3, 3, 0, - /* 1128 */ 12, 3, 11, 4, 11, 4, 12, 3, 3, 0, - /* 1138 */ 12, 4, 12, 4, 12, 4, 12, 4, 4, 3, 0, - /* 1149 */ 12, 4, 13, 3, 13, 3, 12, 4, 3, 0, - /* 1159 */ 12, 4, 12, 4, 10, 4, 4, 12, 4, 3, 0, - /* 1170 */ 12, 4, 12, 4, 11, 4, 4, 12, 4, 3, 0, - /* 1181 */ 12, 4, 12, 4, 12, 4, 4, 12, 4, 3, 0, - /* 1192 */ 12, 4, 12, 4, 10, 4, 12, 4, 3, 0, - /* 1202 */ 12, 4, 12, 4, 12, 4, 12, 4, 3, 0, - /* 1212 */ 12, 7, 12, 7, 10, 7, 4, 12, 7, 3, 0, - /* 1223 */ 12, 7, 12, 7, 11, 7, 4, 12, 7, 3, 0, - /* 1234 */ 12, 7, 12, 7, 12, 7, 4, 12, 7, 3, 0, - /* 1245 */ 12, 7, 12, 7, 12, 4, 12, 7, 3, 0, - /* 1255 */ 12, 7, 12, 4, 12, 7, 12, 7, 3, 0, - /* 1265 */ 12, 7, 12, 7, 12, 7, 12, 7, 3, 0, - /* 1275 */ 21, 12, 2, 4, 11, 3, 11, 3, 0, - /* 1284 */ 21, 11, 3, 4, 11, 3, 11, 3, 0, - /* 1293 */ 21, 11, 3, 4, 11, 3, 0, - /* 1300 */ 15, 3, 33, 3, 4, 31, 3, 1, 15, 3, 0, - /* 1311 */ 15, 3, 15, 12, 4, 31, 3, 1, 15, 3, 0, - /* 1322 */ 15, 3, 15, 3, 12, 2, 12, 2, 12, 2, 12, 2, 15, 3, 0, - /* 1337 */ 15, 3, 15, 3, 12, 2, 12, 2, 12, 2, 15, 3, 0, - /* 1350 */ 15, 3, 15, 3, 12, 2, 12, 2, 15, 3, 0, - /* 1361 */ 15, 3, 25, 3, 0, - /* 1366 */ 15, 3, 25, 3, 25, 3, 0, - /* 1373 */ 15, 3, 26, 3, 0, - /* 1378 */ 15, 3, 26, 3, 26, 3, 0, - /* 1385 */ 15, 1, 25, 1, 4, 0, - /* 1391 */ 12, 4, 12, 4, 35, 1, 4, 0, - /* 1399 */ 13, 4, 13, 4, 36, 1, 4, 0, - /* 1407 */ 10, 7, 10, 7, 10, 7, 10, 4, 4, 2, 4, 0, - /* 1419 */ 9, 8, 9, 8, 9, 8, 9, 5, 4, 2, 4, 0, - /* 1431 */ 11, 8, 11, 8, 11, 8, 11, 5, 4, 2, 4, 0, - /* 1443 */ 10, 4, 10, 4, 14, 2, 10, 4, 2, 4, 0, - /* 1454 */ 10, 4, 9, 5, 14, 2, 10, 4, 2, 4, 0, - /* 1465 */ 11, 4, 10, 5, 14, 2, 10, 4, 2, 4, 0, - /* 1476 */ 10, 7, 10, 7, 14, 2, 10, 4, 2, 4, 0, - /* 1487 */ 9, 8, 9, 8, 14, 2, 10, 4, 2, 4, 0, - /* 1498 */ 10, 8, 10, 8, 14, 2, 10, 4, 2, 4, 0, - /* 1509 */ 11, 4, 11, 4, 14, 2, 11, 4, 2, 4, 0, - /* 1520 */ 11, 5, 11, 5, 14, 2, 11, 4, 2, 4, 0, - /* 1531 */ 11, 7, 11, 7, 14, 2, 11, 4, 2, 4, 0, - /* 1542 */ 11, 8, 11, 8, 14, 2, 11, 4, 2, 4, 0, - /* 1553 */ 10, 4, 10, 4, 14, 2, 9, 5, 2, 4, 0, - /* 1564 */ 10, 4, 9, 5, 14, 2, 9, 5, 2, 4, 0, - /* 1575 */ 10, 7, 10, 7, 14, 2, 9, 5, 2, 4, 0, - /* 1586 */ 9, 8, 9, 8, 14, 2, 9, 5, 2, 4, 0, - /* 1597 */ 10, 4, 10, 4, 14, 2, 10, 5, 2, 4, 0, - /* 1608 */ 11, 4, 10, 5, 14, 2, 10, 5, 2, 4, 0, - /* 1619 */ 10, 7, 10, 7, 14, 2, 10, 5, 2, 4, 0, - /* 1630 */ 10, 8, 10, 8, 14, 2, 10, 5, 2, 4, 0, - /* 1641 */ 11, 4, 11, 4, 14, 2, 11, 5, 2, 4, 0, - /* 1652 */ 11, 5, 11, 5, 14, 2, 11, 5, 2, 4, 0, - /* 1663 */ 11, 7, 11, 7, 14, 2, 11, 5, 2, 4, 0, - /* 1674 */ 11, 8, 11, 8, 14, 2, 11, 5, 2, 4, 0, - /* 1685 */ 10, 7, 10, 7, 10, 7, 4, 10, 7, 2, 4, 0, - /* 1697 */ 10, 7, 10, 7, 10, 7, 10, 7, 2, 4, 0, - /* 1708 */ 10, 7, 10, 7, 9, 8, 10, 7, 2, 4, 0, - /* 1719 */ 9, 8, 9, 8, 9, 8, 4, 9, 8, 2, 4, 0, - /* 1731 */ 9, 8, 9, 8, 10, 7, 9, 8, 2, 4, 0, - /* 1742 */ 9, 8, 9, 8, 9, 8, 9, 8, 2, 4, 0, - /* 1753 */ 11, 8, 11, 8, 11, 8, 4, 11, 8, 2, 4, 0, - /* 1765 */ 11, 8, 11, 8, 11, 8, 11, 8, 2, 4, 0, - /* 1776 */ 12, 2, 12, 2, 12, 2, 12, 2, 4, 0, - /* 1786 */ 21, 12, 2, 4, 12, 2, 12, 2, 12, 2, 4, 0, - /* 1798 */ 21, 12, 2, 4, 12, 2, 12, 2, 4, 0, - /* 1808 */ 13, 2, 13, 2, 13, 2, 13, 2, 4, 0, - /* 1818 */ 13, 2, 12, 3, 12, 3, 13, 2, 4, 0, - /* 1828 */ 15, 1, 15, 1, 14, 2, 14, 2, 4, 0, - /* 1838 */ 15, 4, 15, 4, 14, 2, 14, 2, 4, 0, - /* 1848 */ 12, 7, 12, 7, 12, 7, 12, 4, 4, 3, 4, 0, - /* 1860 */ 12, 4, 12, 4, 14, 2, 12, 4, 3, 4, 0, - /* 1871 */ 12, 7, 12, 7, 14, 2, 12, 4, 3, 4, 0, - /* 1882 */ 12, 7, 12, 7, 12, 7, 4, 12, 7, 3, 4, 0, - /* 1894 */ 12, 7, 12, 7, 12, 7, 12, 7, 3, 4, 0, - /* 1905 */ 11, 3, 11, 3, 11, 3, 11, 3, 4, 0, - /* 1915 */ 21, 11, 3, 4, 11, 3, 11, 3, 11, 3, 4, 0, - /* 1927 */ 21, 11, 3, 4, 11, 3, 11, 3, 4, 0, - /* 1937 */ 13, 3, 16, 2, 16, 2, 13, 3, 4, 0, - /* 1947 */ 13, 3, 13, 3, 11, 3, 13, 3, 4, 0, - /* 1957 */ 13, 3, 13, 3, 13, 3, 13, 3, 4, 0, - /* 1967 */ 13, 3, 16, 2, 16, 2, 4, 13, 3, 4, 0, - /* 1978 */ 13, 3, 12, 4, 12, 4, 13, 3, 4, 0, - /* 1988 */ 21, 3, 4, 0, - /* 1992 */ 15, 3, 26, 3, 4, 0, - /* 1998 */ 10, 7, 10, 7, 10, 7, 10, 7, 2, 4, 4, 0, - /* 2010 */ 9, 8, 9, 8, 9, 8, 9, 8, 2, 4, 4, 0, - /* 2022 */ 23, 15, 3, 15, 3, 15, 3, 15, 3, 15, 12, 15, 3, 15, 3, 15, 3, 15, 3, 4, 4, 0, - /* 2044 */ 22, 15, 3, 15, 3, 15, 3, 15, 12, 15, 3, 15, 3, 15, 3, 4, 4, 0, - /* 2062 */ 21, 15, 3, 15, 3, 15, 12, 15, 3, 15, 3, 4, 4, 0, - /* 2076 */ 0, 5, 4, 4, 4, 4, 4, 4, 4, 0, - /* 2086 */ 21, 4, 4, 4, 4, 4, 0, - /* 2093 */ 23, 3, 3, 3, 3, 5, 4, 4, 4, 0, - /* 2103 */ 21, 3, 3, 5, 4, 4, 4, 0, - /* 2111 */ 23, 4, 4, 4, 4, 5, 4, 4, 4, 0, - /* 2121 */ 21, 4, 4, 5, 4, 4, 4, 0, - /* 2129 */ 23, 4, 4, 4, 4, 5, 5, 4, 4, 4, 0, - /* 2140 */ 21, 5, 5, 5, 4, 4, 4, 0, - /* 2148 */ 23, 7, 7, 7, 7, 5, 5, 4, 4, 4, 0, - /* 2159 */ 23, 7, 7, 7, 7, 5, 4, 4, 4, 0, - /* 2169 */ 16, 4, 16, 4, 16, 4, 4, 4, 0, - /* 2178 */ 23, 3, 3, 3, 3, 5, 4, 4, 0, - /* 2187 */ 21, 3, 3, 5, 4, 4, 0, - /* 2194 */ 23, 4, 4, 4, 4, 5, 4, 4, 0, - /* 2203 */ 21, 4, 4, 5, 4, 4, 0, - /* 2210 */ 23, 4, 4, 4, 4, 5, 5, 4, 4, 0, - /* 2220 */ 21, 5, 5, 5, 4, 4, 0, - /* 2227 */ 23, 7, 7, 7, 7, 5, 5, 4, 4, 0, - /* 2237 */ 23, 7, 7, 7, 7, 5, 4, 4, 0, - /* 2246 */ 0, 14, 2, 2, 10, 4, 10, 4, 4, 0, - /* 2256 */ 21, 10, 4, 4, 10, 4, 10, 4, 4, 0, - /* 2266 */ 21, 10, 4, 4, 10, 4, 10, 4, 10, 4, 4, 0, - /* 2278 */ 10, 4, 10, 4, 10, 4, 10, 4, 4, 0, - /* 2288 */ 0, 14, 2, 2, 9, 5, 10, 4, 4, 0, - /* 2298 */ 0, 14, 2, 2, 10, 5, 10, 4, 4, 0, - /* 2308 */ 0, 14, 2, 2, 11, 4, 11, 4, 4, 0, - /* 2318 */ 0, 14, 2, 2, 11, 5, 11, 4, 4, 0, - /* 2328 */ 0, 15, 4, 15, 11, 15, 11, 4, 4, 0, - /* 2338 */ 0, 15, 4, 15, 11, 15, 11, 15, 11, 4, 4, 0, - /* 2350 */ 0, 15, 4, 15, 11, 15, 11, 15, 11, 15, 11, 4, 4, 0, - /* 2364 */ 35, 1, 35, 1, 12, 4, 4, 0, - /* 2372 */ 0, 14, 2, 3, 12, 4, 12, 4, 4, 0, - /* 2382 */ 12, 4, 12, 4, 12, 4, 12, 4, 4, 0, - /* 2392 */ 13, 4, 13, 4, 12, 4, 12, 4, 4, 0, - /* 2402 */ 36, 1, 36, 1, 13, 4, 4, 0, - /* 2410 */ 13, 4, 13, 4, 13, 4, 13, 4, 4, 0, - /* 2420 */ 16, 4, 16, 4, 13, 4, 13, 4, 4, 0, - /* 2430 */ 16, 4, 16, 4, 13, 4, 4, 0, - /* 2438 */ 13, 4, 13, 4, 16, 4, 4, 0, - /* 2446 */ 16, 4, 16, 4, 16, 4, 4, 0, - /* 2454 */ 17, 17, 4, 4, 0, - /* 2459 */ 15, 0, 18, 4, 4, 0, - /* 2465 */ 21, 4, 4, 0, - /* 2469 */ 23, 3, 3, 3, 3, 5, 4, 0, - /* 2477 */ 21, 3, 3, 5, 4, 0, - /* 2483 */ 23, 4, 4, 4, 4, 5, 4, 0, - /* 2491 */ 21, 4, 4, 5, 4, 0, - /* 2497 */ 16, 4, 16, 4, 16, 4, 5, 4, 0, - /* 2506 */ 23, 4, 4, 4, 4, 5, 5, 4, 0, - /* 2515 */ 21, 5, 5, 5, 4, 0, - /* 2521 */ 23, 7, 7, 7, 7, 5, 5, 4, 0, - /* 2530 */ 23, 7, 7, 7, 7, 5, 4, 0, - /* 2538 */ 0, 14, 2, 2, 10, 4, 9, 5, 4, 0, - /* 2548 */ 0, 14, 2, 2, 9, 5, 9, 5, 4, 0, - /* 2558 */ 9, 5, 9, 5, 9, 5, 9, 5, 4, 0, - /* 2568 */ 0, 14, 2, 2, 10, 4, 10, 5, 4, 0, - /* 2578 */ 0, 14, 2, 2, 10, 5, 10, 5, 4, 0, - /* 2588 */ 0, 14, 2, 2, 11, 4, 11, 5, 4, 0, - /* 2598 */ 0, 14, 2, 2, 11, 5, 11, 5, 4, 0, - /* 2608 */ 21, 5, 4, 0, - /* 2612 */ 0, 14, 2, 2, 10, 4, 10, 7, 4, 0, - /* 2622 */ 0, 14, 2, 2, 9, 5, 10, 7, 4, 0, - /* 2632 */ 0, 14, 2, 2, 10, 5, 10, 7, 4, 0, - /* 2642 */ 0, 14, 2, 2, 11, 4, 11, 7, 4, 0, - /* 2652 */ 0, 14, 2, 2, 11, 5, 11, 7, 4, 0, - /* 2662 */ 0, 14, 2, 3, 12, 4, 12, 7, 4, 0, - /* 2672 */ 21, 9, 5, 4, 9, 8, 4, 0, - /* 2680 */ 0, 14, 2, 2, 10, 4, 9, 8, 4, 0, - /* 2690 */ 0, 14, 2, 2, 9, 5, 9, 8, 4, 0, - /* 2700 */ 0, 14, 2, 2, 10, 4, 10, 8, 4, 0, - /* 2710 */ 0, 14, 2, 2, 10, 5, 10, 8, 4, 0, - /* 2720 */ 0, 14, 2, 2, 11, 4, 11, 8, 4, 0, - /* 2730 */ 0, 14, 2, 2, 11, 5, 11, 8, 4, 0, - /* 2740 */ 21, 10, 4, 4, 10, 4, 0, - /* 2747 */ 21, 11, 3, 4, 10, 4, 10, 4, 0, - /* 2756 */ 21, 10, 4, 4, 10, 4, 10, 4, 0, - /* 2765 */ 0, 15, 4, 15, 11, 15, 11, 15, 11, 4, 0, - /* 2776 */ 0, 15, 4, 15, 11, 15, 11, 15, 11, 15, 11, 4, 0, - /* 2789 */ 35, 1, 35, 1, 12, 4, 12, 4, 0, - /* 2798 */ 12, 4, 35, 1, 12, 4, 12, 4, 0, - /* 2807 */ 13, 4, 35, 1, 12, 4, 12, 4, 0, - /* 2816 */ 23, 15, 3, 15, 3, 15, 3, 15, 3, 15, 12, 4, 0, - /* 2829 */ 22, 15, 3, 15, 3, 15, 3, 15, 12, 4, 0, - /* 2840 */ 21, 15, 3, 15, 3, 15, 12, 4, 0, - /* 2849 */ 36, 1, 36, 1, 13, 4, 13, 4, 0, - /* 2858 */ 13, 4, 36, 1, 13, 4, 13, 4, 0, - /* 2867 */ 16, 4, 36, 1, 13, 4, 13, 4, 0, - /* 2876 */ 16, 4, 16, 4, 13, 4, 13, 4, 0, - /* 2885 */ 16, 4, 16, 4, 13, 4, 0, - /* 2892 */ 5, 19, 15, 4, 0, - /* 2897 */ 13, 4, 16, 4, 0, - /* 2902 */ 16, 4, 16, 4, 16, 4, 0, - /* 2909 */ 4, 17, 4, 0, - /* 2913 */ 17, 17, 4, 0, - /* 2917 */ 16, 2, 2, 16, 2, 5, 0, - /* 2924 */ 16, 2, 16, 2, 16, 2, 16, 2, 5, 0, - /* 2934 */ 5, 16, 2, 16, 2, 5, 0, - /* 2941 */ 16, 2, 13, 3, 13, 3, 16, 2, 5, 0, - /* 2951 */ 5, 16, 2, 16, 2, 4, 5, 0, - /* 2959 */ 21, 10, 4, 4, 9, 5, 9, 5, 0, - /* 2968 */ 21, 9, 5, 4, 9, 5, 9, 5, 0, - /* 2977 */ 23, 4, 4, 4, 4, 5, 4, 7, 0, - /* 2986 */ 23, 4, 4, 4, 4, 5, 5, 4, 7, 0, - /* 2996 */ 23, 7, 7, 7, 7, 5, 5, 4, 7, 0, - /* 3006 */ 23, 7, 7, 7, 7, 5, 4, 7, 0, - /* 3015 */ 23, 4, 4, 4, 4, 5, 7, 0, - /* 3023 */ 23, 4, 4, 4, 4, 5, 5, 7, 0, - /* 3032 */ 23, 7, 7, 7, 7, 5, 5, 7, 0, - /* 3041 */ 23, 7, 7, 7, 7, 5, 7, 0, - /* 3049 */ 23, 4, 4, 4, 4, 5, 4, 7, 7, 0, - /* 3059 */ 23, 4, 4, 4, 4, 5, 5, 4, 7, 7, 0, - /* 3070 */ 23, 7, 7, 7, 7, 5, 5, 4, 7, 7, 0, - /* 3081 */ 23, 7, 7, 7, 7, 5, 4, 7, 7, 0, - /* 3091 */ 23, 4, 4, 4, 4, 5, 7, 7, 0, - /* 3100 */ 23, 4, 4, 4, 4, 5, 5, 7, 7, 0, - /* 3110 */ 23, 7, 7, 7, 7, 5, 5, 7, 7, 0, - /* 3120 */ 23, 7, 7, 7, 7, 5, 7, 7, 0, - /* 3129 */ 23, 4, 4, 4, 4, 5, 4, 7, 7, 7, 0, - /* 3140 */ 23, 4, 4, 4, 4, 5, 5, 4, 7, 7, 7, 0, - /* 3152 */ 23, 7, 7, 7, 7, 5, 5, 4, 7, 7, 7, 0, - /* 3164 */ 23, 7, 7, 7, 7, 5, 4, 7, 7, 7, 0, - /* 3175 */ 23, 4, 4, 4, 4, 5, 7, 7, 7, 0, - /* 3185 */ 23, 4, 4, 4, 4, 5, 5, 7, 7, 7, 0, - /* 3196 */ 23, 7, 7, 7, 7, 5, 5, 7, 7, 7, 0, - /* 3207 */ 23, 7, 7, 7, 7, 5, 7, 7, 7, 0, - /* 3217 */ 23, 4, 4, 4, 4, 5, 4, 7, 7, 7, 7, 0, - /* 3229 */ 23, 4, 4, 4, 4, 5, 5, 4, 7, 7, 7, 7, 0, - /* 3242 */ 23, 7, 7, 7, 7, 5, 5, 4, 7, 7, 7, 7, 0, - /* 3255 */ 23, 7, 7, 7, 7, 5, 4, 7, 7, 7, 7, 0, - /* 3267 */ 23, 4, 4, 4, 4, 5, 7, 7, 7, 7, 0, - /* 3278 */ 23, 4, 4, 4, 4, 5, 5, 7, 7, 7, 7, 0, - /* 3290 */ 23, 7, 7, 7, 7, 5, 5, 7, 7, 7, 7, 0, - /* 3302 */ 23, 7, 7, 7, 7, 5, 7, 7, 7, 7, 0, - /* 3313 */ 23, 4, 4, 4, 4, 5, 4, 7, 7, 7, 7, 7, 7, 0, - /* 3327 */ 23, 4, 4, 4, 4, 5, 5, 4, 7, 7, 7, 7, 7, 7, 0, - /* 3342 */ 23, 7, 7, 7, 7, 5, 5, 4, 7, 7, 7, 7, 7, 7, 0, - /* 3357 */ 23, 7, 7, 7, 7, 5, 4, 7, 7, 7, 7, 7, 7, 0, - /* 3371 */ 23, 4, 4, 4, 4, 5, 7, 7, 7, 7, 7, 7, 0, - /* 3384 */ 23, 4, 4, 4, 4, 5, 5, 7, 7, 7, 7, 7, 7, 0, - /* 3398 */ 23, 7, 7, 7, 7, 5, 5, 7, 7, 7, 7, 7, 7, 0, - /* 3412 */ 23, 7, 7, 7, 7, 5, 7, 7, 7, 7, 7, 7, 0, - /* 3425 */ 23, 4, 4, 4, 4, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, - /* 3441 */ 23, 4, 4, 4, 4, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, - /* 3458 */ 23, 7, 7, 7, 7, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, - /* 3475 */ 23, 7, 7, 7, 7, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, - /* 3491 */ 17, 10, 7, 0, - /* 3495 */ 21, 9, 5, 4, 9, 8, 9, 8, 0, - /* 3504 */ 9, 8, 9, 8, 9, 8, 9, 8, 0, - /* 3513 */ 17, 9, 8, 0, - /* 3517 */ 10, 8, 10, 8, 10, 8, 10, 8, 0, - /* 3526 */ 0, 15, 3, 15, 3, 15, 3, 15, 12, 0, - /* 3536 */ 0, 15, 3, 15, 3, 15, 3, 15, 3, 15, 12, 0, - /* 3548 */ 23, 15, 3, 15, 3, 15, 3, 15, 3, 15, 12, 0, - /* 3560 */ 22, 15, 3, 15, 3, 15, 3, 15, 12, 0, - /* 3570 */ 21, 15, 3, 15, 3, 15, 12, 0, - /* 3578 */ 0, 15, 3, 15, 3, 5, 15, 12, 0, - /* 3587 */ 0, 15, 3, 15, 3, 15, 3, 5, 15, 12, 0, - /* 3598 */ 0, 15, 3, 15, 3, 15, 3, 15, 3, 5, 15, 12, 0, - /* 3611 */ 23, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 5, 15, 12, 0, - /* 3632 */ 22, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 5, 15, 12, 0, - /* 3649 */ 21, 15, 3, 15, 3, 15, 3, 15, 3, 5, 15, 12, 0, - /* 3662 */ 4, 17, 0, - /* 3665 */ 10, 7, 10, 7, 17, 0, - /* 3671 */ 9, 8, 17, 0, - /* 3675 */ 0, 14, 17, 17, 0, - /* 3680 */ 17, 17, 17, 0, - /* 3684 */ 15, 0, 18, 0, - /* 3688 */ 15, 4, 18, 0, - /* 3692 */ 15, 1, 19, 0, - /* 3696 */ 1, 14, 2, 19, 0, - /* 3701 */ 21, 14, 2, 1, 14, 2, 4, 19, 0, - /* 3710 */ 0, 19, 5, 19, 19, 0, - /* 3716 */ 0, 19, 19, 19, 0, - /* 3721 */ 15, 0, 29, 0, - /* 3725 */ 0, 1, 29, 0, - /* 3729 */ 0, 5, 4, 14, 2, 4, 29, 0, - /* 3737 */ 5, 5, 4, 14, 2, 4, 29, 0, - /* 3745 */ 18, 5, 4, 15, 4, 4, 4, 29, 0, - /* 3754 */ 0, 5, 4, 29, 0, - /* 3759 */ 28, 34, 28, 34, 28, 34, 28, 34, 0, - 255 -}; - -#endif - -// Add parameter attributes that are not common to all intrinsics. -#ifdef GET_INTRINSIC_ATTRIBUTES -AttributeSet Intrinsic::getAttributes(LLVMContext &C, ID id) { - static const uint8_t IntrinsicsToAttributesMap[] = { - 1, // llvm.adjust.trampoline - 2, // llvm.annotation - 2, // llvm.assume - 3, // llvm.bitreverse - 3, // llvm.bswap - 3, // llvm.canonicalize - 3, // llvm.ceil - 2, // llvm.clear_cache - 3, // llvm.convert.from.fp16 - 3, // llvm.convert.to.fp16 - 2, // llvm.convertff - 2, // llvm.convertfsi - 2, // llvm.convertfui - 2, // llvm.convertsif - 2, // llvm.convertss - 2, // llvm.convertsu - 2, // llvm.convertuif - 2, // llvm.convertus - 2, // llvm.convertuu - 3, // llvm.copysign - 3, // llvm.cos - 3, // llvm.ctlz - 3, // llvm.ctpop - 3, // llvm.cttz - 3, // llvm.dbg.declare - 3, // llvm.dbg.value - 2, // llvm.debugtrap - 3, // llvm.donothing - 2, // llvm.eh.dwarf.cfa - 3, // llvm.eh.exceptioncode - 3, // llvm.eh.exceptionpointer - 2, // llvm.eh.return.i32 - 2, // llvm.eh.return.i64 - 3, // llvm.eh.sjlj.callsite - 2, // llvm.eh.sjlj.functioncontext - 4, // llvm.eh.sjlj.longjmp - 3, // llvm.eh.sjlj.lsda - 2, // llvm.eh.sjlj.setjmp - 2, // llvm.eh.sjlj.setup.dispatch - 3, // llvm.eh.typeid.for - 2, // llvm.eh.unwind.init - 3, // llvm.exp - 3, // llvm.exp2 - 3, // llvm.expect - 5, // llvm.experimental.deoptimize - 6, // llvm.experimental.gc.relocate - 6, // llvm.experimental.gc.result - 5, // llvm.experimental.gc.statepoint - 5, // llvm.experimental.guard - 5, // llvm.experimental.patchpoint.i64 - 5, // llvm.experimental.patchpoint.void - 5, // llvm.experimental.stackmap - 3, // llvm.fabs - 3, // llvm.floor - 2, // llvm.flt.rounds - 3, // llvm.fma - 3, // llvm.fmuladd - 3, // llvm.frameaddress - 1, // llvm.gcread - 2, // llvm.gcroot - 7, // llvm.gcwrite - 2, // llvm.get.dynamic.area.offset - 8, // llvm.init.trampoline - 2, // llvm.instrprof.increment - 2, // llvm.instrprof.value.profile - 9, // llvm.invariant.end - 3, // llvm.invariant.group.barrier - 10, // llvm.invariant.start - 10, // llvm.lifetime.end - 10, // llvm.lifetime.start - 1, // llvm.load.relative - 3, // llvm.localaddress - 2, // llvm.localescape - 3, // llvm.localrecover - 3, // llvm.log - 3, // llvm.log10 - 3, // llvm.log2 - 4, // llvm.longjmp - 6, // llvm.masked.gather - 1, // llvm.masked.load - 2, // llvm.masked.scatter - 11, // llvm.masked.store - 3, // llvm.maxnum - 12, // llvm.memcpy - 13, // llvm.memmove - 14, // llvm.memset - 3, // llvm.minnum - 3, // llvm.nearbyint - 3, // llvm.objectsize - 2, // llvm.pcmarker - 3, // llvm.pow - 3, // llvm.powi - 8, // llvm.prefetch - 2, // llvm.ptr.annotation - 6, // llvm.read_register - 2, // llvm.readcyclecounter - 3, // llvm.returnaddress - 3, // llvm.rint - 3, // llvm.round - 3, // llvm.sadd.with.overflow - 2, // llvm.setjmp - 4, // llvm.siglongjmp - 2, // llvm.sigsetjmp - 3, // llvm.sin - 3, // llvm.smul.with.overflow - 3, // llvm.sqrt - 3, // llvm.ssub.with.overflow - 2, // llvm.stackguard - 2, // llvm.stackprotector - 2, // llvm.stackrestore - 2, // llvm.stacksave - 3, // llvm.thread.pointer - 4, // llvm.trap - 3, // llvm.trunc - 3, // llvm.type.checked.load - 3, // llvm.type.test - 3, // llvm.uadd.with.overflow - 3, // llvm.umul.with.overflow - 3, // llvm.usub.with.overflow - 2, // llvm.va_copy - 2, // llvm.va_end - 2, // llvm.va_start - 2, // llvm.var.annotation - 2, // llvm.write_register - 2, // llvm.aarch64.clrex - 3, // llvm.aarch64.crc32b - 3, // llvm.aarch64.crc32cb - 3, // llvm.aarch64.crc32ch - 3, // llvm.aarch64.crc32cw - 3, // llvm.aarch64.crc32cx - 3, // llvm.aarch64.crc32h - 3, // llvm.aarch64.crc32w - 3, // llvm.aarch64.crc32x - 3, // llvm.aarch64.crypto.aesd - 3, // llvm.aarch64.crypto.aese - 3, // llvm.aarch64.crypto.aesimc - 3, // llvm.aarch64.crypto.aesmc - 3, // llvm.aarch64.crypto.sha1c - 3, // llvm.aarch64.crypto.sha1h - 3, // llvm.aarch64.crypto.sha1m - 3, // llvm.aarch64.crypto.sha1p - 3, // llvm.aarch64.crypto.sha1su0 - 3, // llvm.aarch64.crypto.sha1su1 - 3, // llvm.aarch64.crypto.sha256h - 3, // llvm.aarch64.crypto.sha256h2 - 3, // llvm.aarch64.crypto.sha256su0 - 3, // llvm.aarch64.crypto.sha256su1 - 2, // llvm.aarch64.dmb - 2, // llvm.aarch64.dsb - 2, // llvm.aarch64.hint - 2, // llvm.aarch64.isb - 2, // llvm.aarch64.ldaxp - 2, // llvm.aarch64.ldaxr - 2, // llvm.aarch64.ldxp - 2, // llvm.aarch64.ldxr - 3, // llvm.aarch64.neon.abs - 3, // llvm.aarch64.neon.addhn - 3, // llvm.aarch64.neon.addp - 3, // llvm.aarch64.neon.cls - 3, // llvm.aarch64.neon.fabd - 3, // llvm.aarch64.neon.facge - 3, // llvm.aarch64.neon.facgt - 3, // llvm.aarch64.neon.faddv - 3, // llvm.aarch64.neon.fcvtas - 3, // llvm.aarch64.neon.fcvtau - 3, // llvm.aarch64.neon.fcvtms - 3, // llvm.aarch64.neon.fcvtmu - 3, // llvm.aarch64.neon.fcvtns - 3, // llvm.aarch64.neon.fcvtnu - 3, // llvm.aarch64.neon.fcvtps - 3, // llvm.aarch64.neon.fcvtpu - 3, // llvm.aarch64.neon.fcvtxn - 3, // llvm.aarch64.neon.fcvtzs - 3, // llvm.aarch64.neon.fcvtzu - 3, // llvm.aarch64.neon.fmax - 3, // llvm.aarch64.neon.fmaxnm - 3, // llvm.aarch64.neon.fmaxnmp - 3, // llvm.aarch64.neon.fmaxnmv - 3, // llvm.aarch64.neon.fmaxp - 3, // llvm.aarch64.neon.fmaxv - 3, // llvm.aarch64.neon.fmin - 3, // llvm.aarch64.neon.fminnm - 3, // llvm.aarch64.neon.fminnmp - 3, // llvm.aarch64.neon.fminnmv - 3, // llvm.aarch64.neon.fminp - 3, // llvm.aarch64.neon.fminv - 3, // llvm.aarch64.neon.fmulx - 3, // llvm.aarch64.neon.frecpe - 3, // llvm.aarch64.neon.frecps - 3, // llvm.aarch64.neon.frecpx - 3, // llvm.aarch64.neon.frintn - 3, // llvm.aarch64.neon.frsqrte - 3, // llvm.aarch64.neon.frsqrts - 1, // llvm.aarch64.neon.ld1x2 - 1, // llvm.aarch64.neon.ld1x3 - 1, // llvm.aarch64.neon.ld1x4 - 1, // llvm.aarch64.neon.ld2 - 1, // llvm.aarch64.neon.ld2lane - 1, // llvm.aarch64.neon.ld2r - 1, // llvm.aarch64.neon.ld3 - 1, // llvm.aarch64.neon.ld3lane - 1, // llvm.aarch64.neon.ld3r - 1, // llvm.aarch64.neon.ld4 - 1, // llvm.aarch64.neon.ld4lane - 1, // llvm.aarch64.neon.ld4r - 3, // llvm.aarch64.neon.pmul - 3, // llvm.aarch64.neon.pmull - 3, // llvm.aarch64.neon.pmull64 - 3, // llvm.aarch64.neon.raddhn - 3, // llvm.aarch64.neon.rbit - 3, // llvm.aarch64.neon.rshrn - 3, // llvm.aarch64.neon.rsubhn - 3, // llvm.aarch64.neon.sabd - 3, // llvm.aarch64.neon.saddlp - 3, // llvm.aarch64.neon.saddlv - 3, // llvm.aarch64.neon.saddv - 3, // llvm.aarch64.neon.scalar.sqxtn - 3, // llvm.aarch64.neon.scalar.sqxtun - 3, // llvm.aarch64.neon.scalar.uqxtn - 3, // llvm.aarch64.neon.shadd - 3, // llvm.aarch64.neon.shll - 3, // llvm.aarch64.neon.shsub - 3, // llvm.aarch64.neon.smax - 3, // llvm.aarch64.neon.smaxp - 3, // llvm.aarch64.neon.smaxv - 3, // llvm.aarch64.neon.smin - 3, // llvm.aarch64.neon.sminp - 3, // llvm.aarch64.neon.sminv - 3, // llvm.aarch64.neon.smull - 3, // llvm.aarch64.neon.sqabs - 3, // llvm.aarch64.neon.sqadd - 3, // llvm.aarch64.neon.sqdmulh - 3, // llvm.aarch64.neon.sqdmull - 3, // llvm.aarch64.neon.sqdmulls.scalar - 3, // llvm.aarch64.neon.sqneg - 3, // llvm.aarch64.neon.sqrdmulh - 3, // llvm.aarch64.neon.sqrshl - 3, // llvm.aarch64.neon.sqrshrn - 3, // llvm.aarch64.neon.sqrshrun - 3, // llvm.aarch64.neon.sqshl - 3, // llvm.aarch64.neon.sqshlu - 3, // llvm.aarch64.neon.sqshrn - 3, // llvm.aarch64.neon.sqshrun - 3, // llvm.aarch64.neon.sqsub - 3, // llvm.aarch64.neon.sqxtn - 3, // llvm.aarch64.neon.sqxtun - 3, // llvm.aarch64.neon.srhadd - 3, // llvm.aarch64.neon.srshl - 3, // llvm.aarch64.neon.sshl - 3, // llvm.aarch64.neon.sshll - 9, // llvm.aarch64.neon.st1x2 - 15, // llvm.aarch64.neon.st1x3 - 16, // llvm.aarch64.neon.st1x4 - 9, // llvm.aarch64.neon.st2 - 15, // llvm.aarch64.neon.st2lane - 15, // llvm.aarch64.neon.st3 - 16, // llvm.aarch64.neon.st3lane - 16, // llvm.aarch64.neon.st4 - 17, // llvm.aarch64.neon.st4lane - 3, // llvm.aarch64.neon.subhn - 3, // llvm.aarch64.neon.suqadd - 3, // llvm.aarch64.neon.tbl1 - 3, // llvm.aarch64.neon.tbl2 - 3, // llvm.aarch64.neon.tbl3 - 3, // llvm.aarch64.neon.tbl4 - 3, // llvm.aarch64.neon.tbx1 - 3, // llvm.aarch64.neon.tbx2 - 3, // llvm.aarch64.neon.tbx3 - 3, // llvm.aarch64.neon.tbx4 - 3, // llvm.aarch64.neon.uabd - 3, // llvm.aarch64.neon.uaddlp - 3, // llvm.aarch64.neon.uaddlv - 3, // llvm.aarch64.neon.uaddv - 3, // llvm.aarch64.neon.uhadd - 3, // llvm.aarch64.neon.uhsub - 3, // llvm.aarch64.neon.umax - 3, // llvm.aarch64.neon.umaxp - 3, // llvm.aarch64.neon.umaxv - 3, // llvm.aarch64.neon.umin - 3, // llvm.aarch64.neon.uminp - 3, // llvm.aarch64.neon.uminv - 3, // llvm.aarch64.neon.umull - 3, // llvm.aarch64.neon.uqadd - 3, // llvm.aarch64.neon.uqrshl - 3, // llvm.aarch64.neon.uqrshrn - 3, // llvm.aarch64.neon.uqshl - 3, // llvm.aarch64.neon.uqshrn - 3, // llvm.aarch64.neon.uqsub - 3, // llvm.aarch64.neon.uqxtn - 3, // llvm.aarch64.neon.urecpe - 3, // llvm.aarch64.neon.urhadd - 3, // llvm.aarch64.neon.urshl - 3, // llvm.aarch64.neon.ursqrte - 3, // llvm.aarch64.neon.ushl - 3, // llvm.aarch64.neon.ushll - 3, // llvm.aarch64.neon.usqadd - 3, // llvm.aarch64.neon.vcopy.lane - 3, // llvm.aarch64.neon.vcvtfp2fxs - 3, // llvm.aarch64.neon.vcvtfp2fxu - 3, // llvm.aarch64.neon.vcvtfp2hf - 3, // llvm.aarch64.neon.vcvtfxs2fp - 3, // llvm.aarch64.neon.vcvtfxu2fp - 3, // llvm.aarch64.neon.vcvthf2fp - 3, // llvm.aarch64.neon.vsli - 3, // llvm.aarch64.neon.vsri - 3, // llvm.aarch64.rbit - 3, // llvm.aarch64.sdiv - 3, // llvm.aarch64.sisd.fabd - 3, // llvm.aarch64.sisd.fcvtxn - 2, // llvm.aarch64.stlxp - 2, // llvm.aarch64.stlxr - 2, // llvm.aarch64.stxp - 2, // llvm.aarch64.stxr - 3, // llvm.aarch64.udiv - 8, // llvm.amdgcn.atomic.dec - 8, // llvm.amdgcn.atomic.inc - 2, // llvm.amdgcn.buffer.atomic.add - 2, // llvm.amdgcn.buffer.atomic.and - 2, // llvm.amdgcn.buffer.atomic.cmpswap - 2, // llvm.amdgcn.buffer.atomic.or - 2, // llvm.amdgcn.buffer.atomic.smax - 2, // llvm.amdgcn.buffer.atomic.smin - 2, // llvm.amdgcn.buffer.atomic.sub - 2, // llvm.amdgcn.buffer.atomic.swap - 2, // llvm.amdgcn.buffer.atomic.umax - 2, // llvm.amdgcn.buffer.atomic.umin - 2, // llvm.amdgcn.buffer.atomic.xor - 6, // llvm.amdgcn.buffer.load - 6, // llvm.amdgcn.buffer.load.format - 18, // llvm.amdgcn.buffer.store - 18, // llvm.amdgcn.buffer.store.format - 2, // llvm.amdgcn.buffer.wbinvl1 - 2, // llvm.amdgcn.buffer.wbinvl1.sc - 2, // llvm.amdgcn.buffer.wbinvl1.vol - 3, // llvm.amdgcn.class - 3, // llvm.amdgcn.cos - 3, // llvm.amdgcn.cubeid - 3, // llvm.amdgcn.cubema - 3, // llvm.amdgcn.cubesc - 3, // llvm.amdgcn.cubetc - 3, // llvm.amdgcn.dispatch.ptr - 3, // llvm.amdgcn.div.fixup - 3, // llvm.amdgcn.div.fmas - 3, // llvm.amdgcn.div.scale - 19, // llvm.amdgcn.ds.bpermute - 19, // llvm.amdgcn.ds.permute - 19, // llvm.amdgcn.ds.swizzle - 3, // llvm.amdgcn.fract - 3, // llvm.amdgcn.frexp.exp - 3, // llvm.amdgcn.frexp.mant - 3, // llvm.amdgcn.groupstaticsize - 2, // llvm.amdgcn.image.atomic.add - 2, // llvm.amdgcn.image.atomic.and - 2, // llvm.amdgcn.image.atomic.cmpswap - 2, // llvm.amdgcn.image.atomic.dec - 2, // llvm.amdgcn.image.atomic.inc - 2, // llvm.amdgcn.image.atomic.or - 2, // llvm.amdgcn.image.atomic.smax - 2, // llvm.amdgcn.image.atomic.smin - 2, // llvm.amdgcn.image.atomic.sub - 2, // llvm.amdgcn.image.atomic.swap - 2, // llvm.amdgcn.image.atomic.umax - 2, // llvm.amdgcn.image.atomic.umin - 2, // llvm.amdgcn.image.atomic.xor - 6, // llvm.amdgcn.image.load - 6, // llvm.amdgcn.image.load.mip - 2, // llvm.amdgcn.image.store - 2, // llvm.amdgcn.image.store.mip - 3, // llvm.amdgcn.implicitarg.ptr - 3, // llvm.amdgcn.interp.p1 - 3, // llvm.amdgcn.interp.p2 - 3, // llvm.amdgcn.kernarg.segment.ptr - 3, // llvm.amdgcn.ldexp - 3, // llvm.amdgcn.lerp - 3, // llvm.amdgcn.log.clamp - 3, // llvm.amdgcn.mbcnt.hi - 3, // llvm.amdgcn.mbcnt.lo - 19, // llvm.amdgcn.mov.dpp - 3, // llvm.amdgcn.ps.live - 3, // llvm.amdgcn.queue.ptr - 3, // llvm.amdgcn.rcp - 3, // llvm.amdgcn.read.workdim - 3, // llvm.amdgcn.rsq - 3, // llvm.amdgcn.rsq.clamp - 3, // llvm.amdgcn.rsq.legacy - 20, // llvm.amdgcn.s.barrier - 2, // llvm.amdgcn.s.dcache.inv - 2, // llvm.amdgcn.s.dcache.inv.vol - 2, // llvm.amdgcn.s.dcache.wb - 2, // llvm.amdgcn.s.dcache.wb.vol - 6, // llvm.amdgcn.s.getreg - 2, // llvm.amdgcn.s.memrealtime - 2, // llvm.amdgcn.s.memtime - 2, // llvm.amdgcn.s.sleep - 2, // llvm.amdgcn.s.waitcnt - 3, // llvm.amdgcn.sin - 3, // llvm.amdgcn.trig.preop - 3, // llvm.amdgcn.workgroup.id.x - 3, // llvm.amdgcn.workgroup.id.y - 3, // llvm.amdgcn.workgroup.id.z - 3, // llvm.amdgcn.workitem.id.x - 3, // llvm.amdgcn.workitem.id.y - 3, // llvm.amdgcn.workitem.id.z - 2, // llvm.arm.cdp - 2, // llvm.arm.cdp2 - 2, // llvm.arm.clrex - 3, // llvm.arm.crc32b - 3, // llvm.arm.crc32cb - 3, // llvm.arm.crc32ch - 3, // llvm.arm.crc32cw - 3, // llvm.arm.crc32h - 3, // llvm.arm.crc32w - 2, // llvm.arm.dbg - 2, // llvm.arm.dmb - 2, // llvm.arm.dsb - 3, // llvm.arm.get.fpscr - 2, // llvm.arm.hint - 2, // llvm.arm.isb - 2, // llvm.arm.ldaex - 2, // llvm.arm.ldaexd - 2, // llvm.arm.ldc - 2, // llvm.arm.ldc2 - 2, // llvm.arm.ldc2l - 2, // llvm.arm.ldcl - 2, // llvm.arm.ldrex - 2, // llvm.arm.ldrexd - 2, // llvm.arm.mcr - 2, // llvm.arm.mcr2 - 2, // llvm.arm.mcrr - 2, // llvm.arm.mcrr2 - 2, // llvm.arm.mrc - 2, // llvm.arm.mrc2 - 2, // llvm.arm.mrrc - 2, // llvm.arm.mrrc2 - 3, // llvm.arm.neon.aesd - 3, // llvm.arm.neon.aese - 3, // llvm.arm.neon.aesimc - 3, // llvm.arm.neon.aesmc - 3, // llvm.arm.neon.sha1c - 3, // llvm.arm.neon.sha1h - 3, // llvm.arm.neon.sha1m - 3, // llvm.arm.neon.sha1p - 3, // llvm.arm.neon.sha1su0 - 3, // llvm.arm.neon.sha1su1 - 3, // llvm.arm.neon.sha256h - 3, // llvm.arm.neon.sha256h2 - 3, // llvm.arm.neon.sha256su0 - 3, // llvm.arm.neon.sha256su1 - 3, // llvm.arm.neon.vabds - 3, // llvm.arm.neon.vabdu - 3, // llvm.arm.neon.vabs - 3, // llvm.arm.neon.vacge - 3, // llvm.arm.neon.vacgt - 3, // llvm.arm.neon.vbsl - 3, // llvm.arm.neon.vcls - 3, // llvm.arm.neon.vcvtas - 3, // llvm.arm.neon.vcvtau - 3, // llvm.arm.neon.vcvtfp2fxs - 3, // llvm.arm.neon.vcvtfp2fxu - 3, // llvm.arm.neon.vcvtfp2hf - 3, // llvm.arm.neon.vcvtfxs2fp - 3, // llvm.arm.neon.vcvtfxu2fp - 3, // llvm.arm.neon.vcvthf2fp - 3, // llvm.arm.neon.vcvtms - 3, // llvm.arm.neon.vcvtmu - 3, // llvm.arm.neon.vcvtns - 3, // llvm.arm.neon.vcvtnu - 3, // llvm.arm.neon.vcvtps - 3, // llvm.arm.neon.vcvtpu - 3, // llvm.arm.neon.vhadds - 3, // llvm.arm.neon.vhaddu - 3, // llvm.arm.neon.vhsubs - 3, // llvm.arm.neon.vhsubu - 1, // llvm.arm.neon.vld1 - 1, // llvm.arm.neon.vld2 - 1, // llvm.arm.neon.vld2lane - 1, // llvm.arm.neon.vld3 - 1, // llvm.arm.neon.vld3lane - 1, // llvm.arm.neon.vld4 - 1, // llvm.arm.neon.vld4lane - 3, // llvm.arm.neon.vmaxnm - 3, // llvm.arm.neon.vmaxs - 3, // llvm.arm.neon.vmaxu - 3, // llvm.arm.neon.vminnm - 3, // llvm.arm.neon.vmins - 3, // llvm.arm.neon.vminu - 3, // llvm.arm.neon.vmullp - 3, // llvm.arm.neon.vmulls - 3, // llvm.arm.neon.vmullu - 3, // llvm.arm.neon.vmulp - 3, // llvm.arm.neon.vpadals - 3, // llvm.arm.neon.vpadalu - 3, // llvm.arm.neon.vpadd - 3, // llvm.arm.neon.vpaddls - 3, // llvm.arm.neon.vpaddlu - 3, // llvm.arm.neon.vpmaxs - 3, // llvm.arm.neon.vpmaxu - 3, // llvm.arm.neon.vpmins - 3, // llvm.arm.neon.vpminu - 3, // llvm.arm.neon.vqabs - 3, // llvm.arm.neon.vqadds - 3, // llvm.arm.neon.vqaddu - 3, // llvm.arm.neon.vqdmulh - 3, // llvm.arm.neon.vqdmull - 3, // llvm.arm.neon.vqmovns - 3, // llvm.arm.neon.vqmovnsu - 3, // llvm.arm.neon.vqmovnu - 3, // llvm.arm.neon.vqneg - 3, // llvm.arm.neon.vqrdmulh - 3, // llvm.arm.neon.vqrshiftns - 3, // llvm.arm.neon.vqrshiftnsu - 3, // llvm.arm.neon.vqrshiftnu - 3, // llvm.arm.neon.vqrshifts - 3, // llvm.arm.neon.vqrshiftu - 3, // llvm.arm.neon.vqshiftns - 3, // llvm.arm.neon.vqshiftnsu - 3, // llvm.arm.neon.vqshiftnu - 3, // llvm.arm.neon.vqshifts - 3, // llvm.arm.neon.vqshiftsu - 3, // llvm.arm.neon.vqshiftu - 3, // llvm.arm.neon.vqsubs - 3, // llvm.arm.neon.vqsubu - 3, // llvm.arm.neon.vraddhn - 3, // llvm.arm.neon.vrecpe - 3, // llvm.arm.neon.vrecps - 3, // llvm.arm.neon.vrhadds - 3, // llvm.arm.neon.vrhaddu - 3, // llvm.arm.neon.vrinta - 3, // llvm.arm.neon.vrintm - 3, // llvm.arm.neon.vrintn - 3, // llvm.arm.neon.vrintp - 3, // llvm.arm.neon.vrintx - 3, // llvm.arm.neon.vrintz - 3, // llvm.arm.neon.vrshiftn - 3, // llvm.arm.neon.vrshifts - 3, // llvm.arm.neon.vrshiftu - 3, // llvm.arm.neon.vrsqrte - 3, // llvm.arm.neon.vrsqrts - 3, // llvm.arm.neon.vrsubhn - 3, // llvm.arm.neon.vshiftins - 3, // llvm.arm.neon.vshifts - 3, // llvm.arm.neon.vshiftu - 11, // llvm.arm.neon.vst1 - 11, // llvm.arm.neon.vst2 - 11, // llvm.arm.neon.vst2lane - 11, // llvm.arm.neon.vst3 - 11, // llvm.arm.neon.vst3lane - 11, // llvm.arm.neon.vst4 - 11, // llvm.arm.neon.vst4lane - 3, // llvm.arm.neon.vtbl1 - 3, // llvm.arm.neon.vtbl2 - 3, // llvm.arm.neon.vtbl3 - 3, // llvm.arm.neon.vtbl4 - 3, // llvm.arm.neon.vtbx1 - 3, // llvm.arm.neon.vtbx2 - 3, // llvm.arm.neon.vtbx3 - 3, // llvm.arm.neon.vtbx4 - 3, // llvm.arm.qadd - 3, // llvm.arm.qsub - 3, // llvm.arm.rbit - 2, // llvm.arm.set.fpscr - 2, // llvm.arm.space - 3, // llvm.arm.ssat - 2, // llvm.arm.stc - 2, // llvm.arm.stc2 - 2, // llvm.arm.stc2l - 2, // llvm.arm.stcl - 2, // llvm.arm.stlex - 2, // llvm.arm.stlexd - 2, // llvm.arm.strex - 2, // llvm.arm.strexd - 2, // llvm.arm.undefined - 3, // llvm.arm.usat - 3, // llvm.arm.vcvtr - 3, // llvm.arm.vcvtru - 6, // llvm.bpf.load.byte - 6, // llvm.bpf.load.half - 6, // llvm.bpf.load.word - 2, // llvm.bpf.pseudo - 3, // llvm.hexagon.A2.abs - 3, // llvm.hexagon.A2.absp - 3, // llvm.hexagon.A2.abssat - 3, // llvm.hexagon.A2.add - 3, // llvm.hexagon.A2.addh.h16.hh - 3, // llvm.hexagon.A2.addh.h16.hl - 3, // llvm.hexagon.A2.addh.h16.lh - 3, // llvm.hexagon.A2.addh.h16.ll - 3, // llvm.hexagon.A2.addh.h16.sat.hh - 3, // llvm.hexagon.A2.addh.h16.sat.hl - 3, // llvm.hexagon.A2.addh.h16.sat.lh - 3, // llvm.hexagon.A2.addh.h16.sat.ll - 3, // llvm.hexagon.A2.addh.l16.hl - 3, // llvm.hexagon.A2.addh.l16.ll - 3, // llvm.hexagon.A2.addh.l16.sat.hl - 3, // llvm.hexagon.A2.addh.l16.sat.ll - 3, // llvm.hexagon.A2.addi - 3, // llvm.hexagon.A2.addp - 3, // llvm.hexagon.A2.addpsat - 3, // llvm.hexagon.A2.addsat - 3, // llvm.hexagon.A2.addsp - 3, // llvm.hexagon.A2.and - 3, // llvm.hexagon.A2.andir - 3, // llvm.hexagon.A2.andp - 3, // llvm.hexagon.A2.aslh - 3, // llvm.hexagon.A2.asrh - 3, // llvm.hexagon.A2.combine.hh - 3, // llvm.hexagon.A2.combine.hl - 3, // llvm.hexagon.A2.combine.lh - 3, // llvm.hexagon.A2.combine.ll - 3, // llvm.hexagon.A2.combineii - 3, // llvm.hexagon.A2.combinew - 3, // llvm.hexagon.A2.max - 3, // llvm.hexagon.A2.maxp - 3, // llvm.hexagon.A2.maxu - 3, // llvm.hexagon.A2.maxup - 3, // llvm.hexagon.A2.min - 3, // llvm.hexagon.A2.minp - 3, // llvm.hexagon.A2.minu - 3, // llvm.hexagon.A2.minup - 3, // llvm.hexagon.A2.neg - 3, // llvm.hexagon.A2.negp - 3, // llvm.hexagon.A2.negsat - 3, // llvm.hexagon.A2.not - 3, // llvm.hexagon.A2.notp - 3, // llvm.hexagon.A2.or - 3, // llvm.hexagon.A2.orir - 3, // llvm.hexagon.A2.orp - 3, // llvm.hexagon.A2.roundsat - 3, // llvm.hexagon.A2.sat - 3, // llvm.hexagon.A2.satb - 3, // llvm.hexagon.A2.sath - 3, // llvm.hexagon.A2.satub - 3, // llvm.hexagon.A2.satuh - 3, // llvm.hexagon.A2.sub - 3, // llvm.hexagon.A2.subh.h16.hh - 3, // llvm.hexagon.A2.subh.h16.hl - 3, // llvm.hexagon.A2.subh.h16.lh - 3, // llvm.hexagon.A2.subh.h16.ll - 3, // llvm.hexagon.A2.subh.h16.sat.hh - 3, // llvm.hexagon.A2.subh.h16.sat.hl - 3, // llvm.hexagon.A2.subh.h16.sat.lh - 3, // llvm.hexagon.A2.subh.h16.sat.ll - 3, // llvm.hexagon.A2.subh.l16.hl - 3, // llvm.hexagon.A2.subh.l16.ll - 3, // llvm.hexagon.A2.subh.l16.sat.hl - 3, // llvm.hexagon.A2.subh.l16.sat.ll - 3, // llvm.hexagon.A2.subp - 3, // llvm.hexagon.A2.subri - 3, // llvm.hexagon.A2.subsat - 3, // llvm.hexagon.A2.svaddh - 3, // llvm.hexagon.A2.svaddhs - 3, // llvm.hexagon.A2.svadduhs - 3, // llvm.hexagon.A2.svavgh - 3, // llvm.hexagon.A2.svavghs - 3, // llvm.hexagon.A2.svnavgh - 3, // llvm.hexagon.A2.svsubh - 3, // llvm.hexagon.A2.svsubhs - 3, // llvm.hexagon.A2.svsubuhs - 3, // llvm.hexagon.A2.swiz - 3, // llvm.hexagon.A2.sxtb - 3, // llvm.hexagon.A2.sxth - 3, // llvm.hexagon.A2.sxtw - 3, // llvm.hexagon.A2.tfr - 3, // llvm.hexagon.A2.tfrih - 3, // llvm.hexagon.A2.tfril - 3, // llvm.hexagon.A2.tfrp - 3, // llvm.hexagon.A2.tfrpi - 3, // llvm.hexagon.A2.tfrsi - 3, // llvm.hexagon.A2.vabsh - 3, // llvm.hexagon.A2.vabshsat - 3, // llvm.hexagon.A2.vabsw - 3, // llvm.hexagon.A2.vabswsat - 3, // llvm.hexagon.A2.vaddb.map - 3, // llvm.hexagon.A2.vaddh - 3, // llvm.hexagon.A2.vaddhs - 3, // llvm.hexagon.A2.vaddub - 3, // llvm.hexagon.A2.vaddubs - 3, // llvm.hexagon.A2.vadduhs - 3, // llvm.hexagon.A2.vaddw - 3, // llvm.hexagon.A2.vaddws - 3, // llvm.hexagon.A2.vavgh - 3, // llvm.hexagon.A2.vavghcr - 3, // llvm.hexagon.A2.vavghr - 3, // llvm.hexagon.A2.vavgub - 3, // llvm.hexagon.A2.vavgubr - 3, // llvm.hexagon.A2.vavguh - 3, // llvm.hexagon.A2.vavguhr - 3, // llvm.hexagon.A2.vavguw - 3, // llvm.hexagon.A2.vavguwr - 3, // llvm.hexagon.A2.vavgw - 3, // llvm.hexagon.A2.vavgwcr - 3, // llvm.hexagon.A2.vavgwr - 3, // llvm.hexagon.A2.vcmpbeq - 3, // llvm.hexagon.A2.vcmpbgtu - 3, // llvm.hexagon.A2.vcmpheq - 3, // llvm.hexagon.A2.vcmphgt - 3, // llvm.hexagon.A2.vcmphgtu - 3, // llvm.hexagon.A2.vcmpweq - 3, // llvm.hexagon.A2.vcmpwgt - 3, // llvm.hexagon.A2.vcmpwgtu - 3, // llvm.hexagon.A2.vconj - 3, // llvm.hexagon.A2.vmaxb - 3, // llvm.hexagon.A2.vmaxh - 3, // llvm.hexagon.A2.vmaxub - 3, // llvm.hexagon.A2.vmaxuh - 3, // llvm.hexagon.A2.vmaxuw - 3, // llvm.hexagon.A2.vmaxw - 3, // llvm.hexagon.A2.vminb - 3, // llvm.hexagon.A2.vminh - 3, // llvm.hexagon.A2.vminub - 3, // llvm.hexagon.A2.vminuh - 3, // llvm.hexagon.A2.vminuw - 3, // llvm.hexagon.A2.vminw - 3, // llvm.hexagon.A2.vnavgh - 3, // llvm.hexagon.A2.vnavghcr - 3, // llvm.hexagon.A2.vnavghr - 3, // llvm.hexagon.A2.vnavgw - 3, // llvm.hexagon.A2.vnavgwcr - 3, // llvm.hexagon.A2.vnavgwr - 3, // llvm.hexagon.A2.vraddub - 3, // llvm.hexagon.A2.vraddub.acc - 3, // llvm.hexagon.A2.vrsadub - 3, // llvm.hexagon.A2.vrsadub.acc - 3, // llvm.hexagon.A2.vsubb.map - 3, // llvm.hexagon.A2.vsubh - 3, // llvm.hexagon.A2.vsubhs - 3, // llvm.hexagon.A2.vsubub - 3, // llvm.hexagon.A2.vsububs - 3, // llvm.hexagon.A2.vsubuhs - 3, // llvm.hexagon.A2.vsubw - 3, // llvm.hexagon.A2.vsubws - 3, // llvm.hexagon.A2.xor - 3, // llvm.hexagon.A2.xorp - 3, // llvm.hexagon.A2.zxtb - 3, // llvm.hexagon.A2.zxth - 3, // llvm.hexagon.A4.andn - 3, // llvm.hexagon.A4.andnp - 3, // llvm.hexagon.A4.bitsplit - 3, // llvm.hexagon.A4.bitspliti - 3, // llvm.hexagon.A4.boundscheck - 3, // llvm.hexagon.A4.cmpbeq - 3, // llvm.hexagon.A4.cmpbeqi - 3, // llvm.hexagon.A4.cmpbgt - 3, // llvm.hexagon.A4.cmpbgti - 3, // llvm.hexagon.A4.cmpbgtu - 3, // llvm.hexagon.A4.cmpbgtui - 3, // llvm.hexagon.A4.cmpheq - 3, // llvm.hexagon.A4.cmpheqi - 3, // llvm.hexagon.A4.cmphgt - 3, // llvm.hexagon.A4.cmphgti - 3, // llvm.hexagon.A4.cmphgtu - 3, // llvm.hexagon.A4.cmphgtui - 3, // llvm.hexagon.A4.combineir - 3, // llvm.hexagon.A4.combineri - 3, // llvm.hexagon.A4.cround.ri - 3, // llvm.hexagon.A4.cround.rr - 3, // llvm.hexagon.A4.modwrapu - 3, // llvm.hexagon.A4.orn - 3, // llvm.hexagon.A4.ornp - 3, // llvm.hexagon.A4.rcmpeq - 3, // llvm.hexagon.A4.rcmpeqi - 3, // llvm.hexagon.A4.rcmpneq - 3, // llvm.hexagon.A4.rcmpneqi - 3, // llvm.hexagon.A4.round.ri - 3, // llvm.hexagon.A4.round.ri.sat - 3, // llvm.hexagon.A4.round.rr - 3, // llvm.hexagon.A4.round.rr.sat - 3, // llvm.hexagon.A4.tlbmatch - 3, // llvm.hexagon.A4.vcmpbeq.any - 3, // llvm.hexagon.A4.vcmpbeqi - 3, // llvm.hexagon.A4.vcmpbgt - 3, // llvm.hexagon.A4.vcmpbgti - 3, // llvm.hexagon.A4.vcmpbgtui - 3, // llvm.hexagon.A4.vcmpheqi - 3, // llvm.hexagon.A4.vcmphgti - 3, // llvm.hexagon.A4.vcmphgtui - 3, // llvm.hexagon.A4.vcmpweqi - 3, // llvm.hexagon.A4.vcmpwgti - 3, // llvm.hexagon.A4.vcmpwgtui - 3, // llvm.hexagon.A4.vrmaxh - 3, // llvm.hexagon.A4.vrmaxuh - 3, // llvm.hexagon.A4.vrmaxuw - 3, // llvm.hexagon.A4.vrmaxw - 3, // llvm.hexagon.A4.vrminh - 3, // llvm.hexagon.A4.vrminuh - 3, // llvm.hexagon.A4.vrminuw - 3, // llvm.hexagon.A4.vrminw - 3, // llvm.hexagon.A5.vaddhubs - 3, // llvm.hexagon.C2.all8 - 3, // llvm.hexagon.C2.and - 3, // llvm.hexagon.C2.andn - 3, // llvm.hexagon.C2.any8 - 3, // llvm.hexagon.C2.bitsclr - 3, // llvm.hexagon.C2.bitsclri - 3, // llvm.hexagon.C2.bitsset - 3, // llvm.hexagon.C2.cmpeq - 3, // llvm.hexagon.C2.cmpeqi - 3, // llvm.hexagon.C2.cmpeqp - 3, // llvm.hexagon.C2.cmpgei - 3, // llvm.hexagon.C2.cmpgeui - 3, // llvm.hexagon.C2.cmpgt - 3, // llvm.hexagon.C2.cmpgti - 3, // llvm.hexagon.C2.cmpgtp - 3, // llvm.hexagon.C2.cmpgtu - 3, // llvm.hexagon.C2.cmpgtui - 3, // llvm.hexagon.C2.cmpgtup - 3, // llvm.hexagon.C2.cmplt - 3, // llvm.hexagon.C2.cmpltu - 3, // llvm.hexagon.C2.mask - 3, // llvm.hexagon.C2.mux - 3, // llvm.hexagon.C2.muxii - 3, // llvm.hexagon.C2.muxir - 3, // llvm.hexagon.C2.muxri - 3, // llvm.hexagon.C2.not - 3, // llvm.hexagon.C2.or - 3, // llvm.hexagon.C2.orn - 3, // llvm.hexagon.C2.pxfer.map - 3, // llvm.hexagon.C2.tfrpr - 3, // llvm.hexagon.C2.tfrrp - 3, // llvm.hexagon.C2.vitpack - 3, // llvm.hexagon.C2.vmux - 3, // llvm.hexagon.C2.xor - 3, // llvm.hexagon.C4.and.and - 3, // llvm.hexagon.C4.and.andn - 3, // llvm.hexagon.C4.and.or - 3, // llvm.hexagon.C4.and.orn - 3, // llvm.hexagon.C4.cmplte - 3, // llvm.hexagon.C4.cmpltei - 3, // llvm.hexagon.C4.cmplteu - 3, // llvm.hexagon.C4.cmplteui - 3, // llvm.hexagon.C4.cmpneq - 3, // llvm.hexagon.C4.cmpneqi - 3, // llvm.hexagon.C4.fastcorner9 - 3, // llvm.hexagon.C4.fastcorner9.not - 3, // llvm.hexagon.C4.nbitsclr - 3, // llvm.hexagon.C4.nbitsclri - 3, // llvm.hexagon.C4.nbitsset - 3, // llvm.hexagon.C4.or.and - 3, // llvm.hexagon.C4.or.andn - 3, // llvm.hexagon.C4.or.or - 3, // llvm.hexagon.C4.or.orn - 3, // llvm.hexagon.F2.conv.d2df - 3, // llvm.hexagon.F2.conv.d2sf - 3, // llvm.hexagon.F2.conv.df2d - 3, // llvm.hexagon.F2.conv.df2d.chop - 3, // llvm.hexagon.F2.conv.df2sf - 3, // llvm.hexagon.F2.conv.df2ud - 3, // llvm.hexagon.F2.conv.df2ud.chop - 3, // llvm.hexagon.F2.conv.df2uw - 3, // llvm.hexagon.F2.conv.df2uw.chop - 3, // llvm.hexagon.F2.conv.df2w - 3, // llvm.hexagon.F2.conv.df2w.chop - 3, // llvm.hexagon.F2.conv.sf2d - 3, // llvm.hexagon.F2.conv.sf2d.chop - 3, // llvm.hexagon.F2.conv.sf2df - 3, // llvm.hexagon.F2.conv.sf2ud - 3, // llvm.hexagon.F2.conv.sf2ud.chop - 3, // llvm.hexagon.F2.conv.sf2uw - 3, // llvm.hexagon.F2.conv.sf2uw.chop - 3, // llvm.hexagon.F2.conv.sf2w - 3, // llvm.hexagon.F2.conv.sf2w.chop - 3, // llvm.hexagon.F2.conv.ud2df - 3, // llvm.hexagon.F2.conv.ud2sf - 21, // llvm.hexagon.F2.conv.uw2df - 21, // llvm.hexagon.F2.conv.uw2sf - 21, // llvm.hexagon.F2.conv.w2df - 21, // llvm.hexagon.F2.conv.w2sf - 21, // llvm.hexagon.F2.dfclass - 21, // llvm.hexagon.F2.dfcmpeq - 21, // llvm.hexagon.F2.dfcmpge - 21, // llvm.hexagon.F2.dfcmpgt - 21, // llvm.hexagon.F2.dfcmpuo - 21, // llvm.hexagon.F2.dfimm.n - 21, // llvm.hexagon.F2.dfimm.p - 21, // llvm.hexagon.F2.sfadd - 21, // llvm.hexagon.F2.sfclass - 21, // llvm.hexagon.F2.sfcmpeq - 21, // llvm.hexagon.F2.sfcmpge - 21, // llvm.hexagon.F2.sfcmpgt - 21, // llvm.hexagon.F2.sfcmpuo - 21, // llvm.hexagon.F2.sffixupd - 21, // llvm.hexagon.F2.sffixupn - 3, // llvm.hexagon.F2.sffixupr - 21, // llvm.hexagon.F2.sffma - 21, // llvm.hexagon.F2.sffma.lib - 21, // llvm.hexagon.F2.sffma.sc - 21, // llvm.hexagon.F2.sffms - 21, // llvm.hexagon.F2.sffms.lib - 21, // llvm.hexagon.F2.sfimm.n - 21, // llvm.hexagon.F2.sfimm.p - 21, // llvm.hexagon.F2.sfmax - 21, // llvm.hexagon.F2.sfmin - 21, // llvm.hexagon.F2.sfmpy - 21, // llvm.hexagon.F2.sfsub - 8, // llvm.hexagon.L2.loadw.locked - 8, // llvm.hexagon.L4.loadd.locked - 3, // llvm.hexagon.M2.acci - 3, // llvm.hexagon.M2.accii - 3, // llvm.hexagon.M2.cmaci.s0 - 3, // llvm.hexagon.M2.cmacr.s0 - 3, // llvm.hexagon.M2.cmacs.s0 - 3, // llvm.hexagon.M2.cmacs.s1 - 3, // llvm.hexagon.M2.cmacsc.s0 - 3, // llvm.hexagon.M2.cmacsc.s1 - 3, // llvm.hexagon.M2.cmpyi.s0 - 3, // llvm.hexagon.M2.cmpyr.s0 - 3, // llvm.hexagon.M2.cmpyrs.s0 - 3, // llvm.hexagon.M2.cmpyrs.s1 - 3, // llvm.hexagon.M2.cmpyrsc.s0 - 3, // llvm.hexagon.M2.cmpyrsc.s1 - 3, // llvm.hexagon.M2.cmpys.s0 - 3, // llvm.hexagon.M2.cmpys.s1 - 3, // llvm.hexagon.M2.cmpysc.s0 - 3, // llvm.hexagon.M2.cmpysc.s1 - 3, // llvm.hexagon.M2.cnacs.s0 - 3, // llvm.hexagon.M2.cnacs.s1 - 3, // llvm.hexagon.M2.cnacsc.s0 - 3, // llvm.hexagon.M2.cnacsc.s1 - 3, // llvm.hexagon.M2.dpmpyss.acc.s0 - 3, // llvm.hexagon.M2.dpmpyss.nac.s0 - 3, // llvm.hexagon.M2.dpmpyss.rnd.s0 - 3, // llvm.hexagon.M2.dpmpyss.s0 - 3, // llvm.hexagon.M2.dpmpyuu.acc.s0 - 3, // llvm.hexagon.M2.dpmpyuu.nac.s0 - 3, // llvm.hexagon.M2.dpmpyuu.s0 - 3, // llvm.hexagon.M2.hmmpyh.rs1 - 3, // llvm.hexagon.M2.hmmpyh.s1 - 3, // llvm.hexagon.M2.hmmpyl.rs1 - 3, // llvm.hexagon.M2.hmmpyl.s1 - 3, // llvm.hexagon.M2.maci - 3, // llvm.hexagon.M2.macsin - 3, // llvm.hexagon.M2.macsip - 3, // llvm.hexagon.M2.mmachs.rs0 - 3, // llvm.hexagon.M2.mmachs.rs1 - 3, // llvm.hexagon.M2.mmachs.s0 - 3, // llvm.hexagon.M2.mmachs.s1 - 3, // llvm.hexagon.M2.mmacls.rs0 - 3, // llvm.hexagon.M2.mmacls.rs1 - 3, // llvm.hexagon.M2.mmacls.s0 - 3, // llvm.hexagon.M2.mmacls.s1 - 3, // llvm.hexagon.M2.mmacuhs.rs0 - 3, // llvm.hexagon.M2.mmacuhs.rs1 - 3, // llvm.hexagon.M2.mmacuhs.s0 - 3, // llvm.hexagon.M2.mmacuhs.s1 - 3, // llvm.hexagon.M2.mmaculs.rs0 - 3, // llvm.hexagon.M2.mmaculs.rs1 - 3, // llvm.hexagon.M2.mmaculs.s0 - 3, // llvm.hexagon.M2.mmaculs.s1 - 3, // llvm.hexagon.M2.mmpyh.rs0 - 3, // llvm.hexagon.M2.mmpyh.rs1 - 3, // llvm.hexagon.M2.mmpyh.s0 - 3, // llvm.hexagon.M2.mmpyh.s1 - 3, // llvm.hexagon.M2.mmpyl.rs0 - 3, // llvm.hexagon.M2.mmpyl.rs1 - 3, // llvm.hexagon.M2.mmpyl.s0 - 3, // llvm.hexagon.M2.mmpyl.s1 - 3, // llvm.hexagon.M2.mmpyuh.rs0 - 3, // llvm.hexagon.M2.mmpyuh.rs1 - 3, // llvm.hexagon.M2.mmpyuh.s0 - 3, // llvm.hexagon.M2.mmpyuh.s1 - 3, // llvm.hexagon.M2.mmpyul.rs0 - 3, // llvm.hexagon.M2.mmpyul.rs1 - 3, // llvm.hexagon.M2.mmpyul.s0 - 3, // llvm.hexagon.M2.mmpyul.s1 - 3, // llvm.hexagon.M2.mpy.acc.hh.s0 - 3, // llvm.hexagon.M2.mpy.acc.hh.s1 - 3, // llvm.hexagon.M2.mpy.acc.hl.s0 - 3, // llvm.hexagon.M2.mpy.acc.hl.s1 - 3, // llvm.hexagon.M2.mpy.acc.lh.s0 - 3, // llvm.hexagon.M2.mpy.acc.lh.s1 - 3, // llvm.hexagon.M2.mpy.acc.ll.s0 - 3, // llvm.hexagon.M2.mpy.acc.ll.s1 - 3, // llvm.hexagon.M2.mpy.acc.sat.hh.s0 - 3, // llvm.hexagon.M2.mpy.acc.sat.hh.s1 - 3, // llvm.hexagon.M2.mpy.acc.sat.hl.s0 - 3, // llvm.hexagon.M2.mpy.acc.sat.hl.s1 - 3, // llvm.hexagon.M2.mpy.acc.sat.lh.s0 - 3, // llvm.hexagon.M2.mpy.acc.sat.lh.s1 - 3, // llvm.hexagon.M2.mpy.acc.sat.ll.s0 - 3, // llvm.hexagon.M2.mpy.acc.sat.ll.s1 - 3, // llvm.hexagon.M2.mpy.hh.s0 - 3, // llvm.hexagon.M2.mpy.hh.s1 - 3, // llvm.hexagon.M2.mpy.hl.s0 - 3, // llvm.hexagon.M2.mpy.hl.s1 - 3, // llvm.hexagon.M2.mpy.lh.s0 - 3, // llvm.hexagon.M2.mpy.lh.s1 - 3, // llvm.hexagon.M2.mpy.ll.s0 - 3, // llvm.hexagon.M2.mpy.ll.s1 - 3, // llvm.hexagon.M2.mpy.nac.hh.s0 - 3, // llvm.hexagon.M2.mpy.nac.hh.s1 - 3, // llvm.hexagon.M2.mpy.nac.hl.s0 - 3, // llvm.hexagon.M2.mpy.nac.hl.s1 - 3, // llvm.hexagon.M2.mpy.nac.lh.s0 - 3, // llvm.hexagon.M2.mpy.nac.lh.s1 - 3, // llvm.hexagon.M2.mpy.nac.ll.s0 - 3, // llvm.hexagon.M2.mpy.nac.ll.s1 - 3, // llvm.hexagon.M2.mpy.nac.sat.hh.s0 - 3, // llvm.hexagon.M2.mpy.nac.sat.hh.s1 - 3, // llvm.hexagon.M2.mpy.nac.sat.hl.s0 - 3, // llvm.hexagon.M2.mpy.nac.sat.hl.s1 - 3, // llvm.hexagon.M2.mpy.nac.sat.lh.s0 - 3, // llvm.hexagon.M2.mpy.nac.sat.lh.s1 - 3, // llvm.hexagon.M2.mpy.nac.sat.ll.s0 - 3, // llvm.hexagon.M2.mpy.nac.sat.ll.s1 - 3, // llvm.hexagon.M2.mpy.rnd.hh.s0 - 3, // llvm.hexagon.M2.mpy.rnd.hh.s1 - 3, // llvm.hexagon.M2.mpy.rnd.hl.s0 - 3, // llvm.hexagon.M2.mpy.rnd.hl.s1 - 3, // llvm.hexagon.M2.mpy.rnd.lh.s0 - 3, // llvm.hexagon.M2.mpy.rnd.lh.s1 - 3, // llvm.hexagon.M2.mpy.rnd.ll.s0 - 3, // llvm.hexagon.M2.mpy.rnd.ll.s1 - 3, // llvm.hexagon.M2.mpy.sat.hh.s0 - 3, // llvm.hexagon.M2.mpy.sat.hh.s1 - 3, // llvm.hexagon.M2.mpy.sat.hl.s0 - 3, // llvm.hexagon.M2.mpy.sat.hl.s1 - 3, // llvm.hexagon.M2.mpy.sat.lh.s0 - 3, // llvm.hexagon.M2.mpy.sat.lh.s1 - 3, // llvm.hexagon.M2.mpy.sat.ll.s0 - 3, // llvm.hexagon.M2.mpy.sat.ll.s1 - 3, // llvm.hexagon.M2.mpy.sat.rnd.hh.s0 - 3, // llvm.hexagon.M2.mpy.sat.rnd.hh.s1 - 3, // llvm.hexagon.M2.mpy.sat.rnd.hl.s0 - 3, // llvm.hexagon.M2.mpy.sat.rnd.hl.s1 - 3, // llvm.hexagon.M2.mpy.sat.rnd.lh.s0 - 3, // llvm.hexagon.M2.mpy.sat.rnd.lh.s1 - 3, // llvm.hexagon.M2.mpy.sat.rnd.ll.s0 - 3, // llvm.hexagon.M2.mpy.sat.rnd.ll.s1 - 3, // llvm.hexagon.M2.mpy.up - 3, // llvm.hexagon.M2.mpy.up.s1 - 3, // llvm.hexagon.M2.mpy.up.s1.sat - 3, // llvm.hexagon.M2.mpyd.acc.hh.s0 - 3, // llvm.hexagon.M2.mpyd.acc.hh.s1 - 3, // llvm.hexagon.M2.mpyd.acc.hl.s0 - 3, // llvm.hexagon.M2.mpyd.acc.hl.s1 - 3, // llvm.hexagon.M2.mpyd.acc.lh.s0 - 3, // llvm.hexagon.M2.mpyd.acc.lh.s1 - 3, // llvm.hexagon.M2.mpyd.acc.ll.s0 - 3, // llvm.hexagon.M2.mpyd.acc.ll.s1 - 3, // llvm.hexagon.M2.mpyd.hh.s0 - 3, // llvm.hexagon.M2.mpyd.hh.s1 - 3, // llvm.hexagon.M2.mpyd.hl.s0 - 3, // llvm.hexagon.M2.mpyd.hl.s1 - 3, // llvm.hexagon.M2.mpyd.lh.s0 - 3, // llvm.hexagon.M2.mpyd.lh.s1 - 3, // llvm.hexagon.M2.mpyd.ll.s0 - 3, // llvm.hexagon.M2.mpyd.ll.s1 - 3, // llvm.hexagon.M2.mpyd.nac.hh.s0 - 3, // llvm.hexagon.M2.mpyd.nac.hh.s1 - 3, // llvm.hexagon.M2.mpyd.nac.hl.s0 - 3, // llvm.hexagon.M2.mpyd.nac.hl.s1 - 3, // llvm.hexagon.M2.mpyd.nac.lh.s0 - 3, // llvm.hexagon.M2.mpyd.nac.lh.s1 - 3, // llvm.hexagon.M2.mpyd.nac.ll.s0 - 3, // llvm.hexagon.M2.mpyd.nac.ll.s1 - 3, // llvm.hexagon.M2.mpyd.rnd.hh.s0 - 3, // llvm.hexagon.M2.mpyd.rnd.hh.s1 - 3, // llvm.hexagon.M2.mpyd.rnd.hl.s0 - 3, // llvm.hexagon.M2.mpyd.rnd.hl.s1 - 3, // llvm.hexagon.M2.mpyd.rnd.lh.s0 - 3, // llvm.hexagon.M2.mpyd.rnd.lh.s1 - 3, // llvm.hexagon.M2.mpyd.rnd.ll.s0 - 3, // llvm.hexagon.M2.mpyd.rnd.ll.s1 - 3, // llvm.hexagon.M2.mpyi - 3, // llvm.hexagon.M2.mpysmi - 3, // llvm.hexagon.M2.mpysu.up - 3, // llvm.hexagon.M2.mpyu.acc.hh.s0 - 3, // llvm.hexagon.M2.mpyu.acc.hh.s1 - 3, // llvm.hexagon.M2.mpyu.acc.hl.s0 - 3, // llvm.hexagon.M2.mpyu.acc.hl.s1 - 3, // llvm.hexagon.M2.mpyu.acc.lh.s0 - 3, // llvm.hexagon.M2.mpyu.acc.lh.s1 - 3, // llvm.hexagon.M2.mpyu.acc.ll.s0 - 3, // llvm.hexagon.M2.mpyu.acc.ll.s1 - 3, // llvm.hexagon.M2.mpyu.hh.s0 - 3, // llvm.hexagon.M2.mpyu.hh.s1 - 3, // llvm.hexagon.M2.mpyu.hl.s0 - 3, // llvm.hexagon.M2.mpyu.hl.s1 - 3, // llvm.hexagon.M2.mpyu.lh.s0 - 3, // llvm.hexagon.M2.mpyu.lh.s1 - 3, // llvm.hexagon.M2.mpyu.ll.s0 - 3, // llvm.hexagon.M2.mpyu.ll.s1 - 3, // llvm.hexagon.M2.mpyu.nac.hh.s0 - 3, // llvm.hexagon.M2.mpyu.nac.hh.s1 - 3, // llvm.hexagon.M2.mpyu.nac.hl.s0 - 3, // llvm.hexagon.M2.mpyu.nac.hl.s1 - 3, // llvm.hexagon.M2.mpyu.nac.lh.s0 - 3, // llvm.hexagon.M2.mpyu.nac.lh.s1 - 3, // llvm.hexagon.M2.mpyu.nac.ll.s0 - 3, // llvm.hexagon.M2.mpyu.nac.ll.s1 - 3, // llvm.hexagon.M2.mpyu.up - 3, // llvm.hexagon.M2.mpyud.acc.hh.s0 - 3, // llvm.hexagon.M2.mpyud.acc.hh.s1 - 3, // llvm.hexagon.M2.mpyud.acc.hl.s0 - 3, // llvm.hexagon.M2.mpyud.acc.hl.s1 - 3, // llvm.hexagon.M2.mpyud.acc.lh.s0 - 3, // llvm.hexagon.M2.mpyud.acc.lh.s1 - 3, // llvm.hexagon.M2.mpyud.acc.ll.s0 - 3, // llvm.hexagon.M2.mpyud.acc.ll.s1 - 3, // llvm.hexagon.M2.mpyud.hh.s0 - 3, // llvm.hexagon.M2.mpyud.hh.s1 - 3, // llvm.hexagon.M2.mpyud.hl.s0 - 3, // llvm.hexagon.M2.mpyud.hl.s1 - 3, // llvm.hexagon.M2.mpyud.lh.s0 - 3, // llvm.hexagon.M2.mpyud.lh.s1 - 3, // llvm.hexagon.M2.mpyud.ll.s0 - 3, // llvm.hexagon.M2.mpyud.ll.s1 - 3, // llvm.hexagon.M2.mpyud.nac.hh.s0 - 3, // llvm.hexagon.M2.mpyud.nac.hh.s1 - 3, // llvm.hexagon.M2.mpyud.nac.hl.s0 - 3, // llvm.hexagon.M2.mpyud.nac.hl.s1 - 3, // llvm.hexagon.M2.mpyud.nac.lh.s0 - 3, // llvm.hexagon.M2.mpyud.nac.lh.s1 - 3, // llvm.hexagon.M2.mpyud.nac.ll.s0 - 3, // llvm.hexagon.M2.mpyud.nac.ll.s1 - 3, // llvm.hexagon.M2.mpyui - 3, // llvm.hexagon.M2.nacci - 3, // llvm.hexagon.M2.naccii - 3, // llvm.hexagon.M2.subacc - 3, // llvm.hexagon.M2.vabsdiffh - 3, // llvm.hexagon.M2.vabsdiffw - 3, // llvm.hexagon.M2.vcmac.s0.sat.i - 3, // llvm.hexagon.M2.vcmac.s0.sat.r - 3, // llvm.hexagon.M2.vcmpy.s0.sat.i - 3, // llvm.hexagon.M2.vcmpy.s0.sat.r - 3, // llvm.hexagon.M2.vcmpy.s1.sat.i - 3, // llvm.hexagon.M2.vcmpy.s1.sat.r - 3, // llvm.hexagon.M2.vdmacs.s0 - 3, // llvm.hexagon.M2.vdmacs.s1 - 3, // llvm.hexagon.M2.vdmpyrs.s0 - 3, // llvm.hexagon.M2.vdmpyrs.s1 - 3, // llvm.hexagon.M2.vdmpys.s0 - 3, // llvm.hexagon.M2.vdmpys.s1 - 3, // llvm.hexagon.M2.vmac2 - 3, // llvm.hexagon.M2.vmac2es - 3, // llvm.hexagon.M2.vmac2es.s0 - 3, // llvm.hexagon.M2.vmac2es.s1 - 3, // llvm.hexagon.M2.vmac2s.s0 - 3, // llvm.hexagon.M2.vmac2s.s1 - 3, // llvm.hexagon.M2.vmac2su.s0 - 3, // llvm.hexagon.M2.vmac2su.s1 - 3, // llvm.hexagon.M2.vmpy2es.s0 - 3, // llvm.hexagon.M2.vmpy2es.s1 - 3, // llvm.hexagon.M2.vmpy2s.s0 - 3, // llvm.hexagon.M2.vmpy2s.s0pack - 3, // llvm.hexagon.M2.vmpy2s.s1 - 3, // llvm.hexagon.M2.vmpy2s.s1pack - 3, // llvm.hexagon.M2.vmpy2su.s0 - 3, // llvm.hexagon.M2.vmpy2su.s1 - 3, // llvm.hexagon.M2.vraddh - 3, // llvm.hexagon.M2.vradduh - 3, // llvm.hexagon.M2.vrcmaci.s0 - 3, // llvm.hexagon.M2.vrcmaci.s0c - 3, // llvm.hexagon.M2.vrcmacr.s0 - 3, // llvm.hexagon.M2.vrcmacr.s0c - 3, // llvm.hexagon.M2.vrcmpyi.s0 - 3, // llvm.hexagon.M2.vrcmpyi.s0c - 3, // llvm.hexagon.M2.vrcmpyr.s0 - 3, // llvm.hexagon.M2.vrcmpyr.s0c - 3, // llvm.hexagon.M2.vrcmpys.acc.s1 - 3, // llvm.hexagon.M2.vrcmpys.s1 - 3, // llvm.hexagon.M2.vrcmpys.s1rp - 3, // llvm.hexagon.M2.vrmac.s0 - 3, // llvm.hexagon.M2.vrmpy.s0 - 3, // llvm.hexagon.M2.xor.xacc - 3, // llvm.hexagon.M4.and.and - 3, // llvm.hexagon.M4.and.andn - 3, // llvm.hexagon.M4.and.or - 3, // llvm.hexagon.M4.and.xor - 3, // llvm.hexagon.M4.cmpyi.wh - 3, // llvm.hexagon.M4.cmpyi.whc - 3, // llvm.hexagon.M4.cmpyr.wh - 3, // llvm.hexagon.M4.cmpyr.whc - 3, // llvm.hexagon.M4.mac.up.s1.sat - 3, // llvm.hexagon.M4.mpyri.addi - 3, // llvm.hexagon.M4.mpyri.addr - 3, // llvm.hexagon.M4.mpyri.addr.u2 - 3, // llvm.hexagon.M4.mpyrr.addi - 3, // llvm.hexagon.M4.mpyrr.addr - 3, // llvm.hexagon.M4.nac.up.s1.sat - 3, // llvm.hexagon.M4.or.and - 3, // llvm.hexagon.M4.or.andn - 3, // llvm.hexagon.M4.or.or - 3, // llvm.hexagon.M4.or.xor - 3, // llvm.hexagon.M4.pmpyw - 3, // llvm.hexagon.M4.pmpyw.acc - 3, // llvm.hexagon.M4.vpmpyh - 3, // llvm.hexagon.M4.vpmpyh.acc - 3, // llvm.hexagon.M4.vrmpyeh.acc.s0 - 3, // llvm.hexagon.M4.vrmpyeh.acc.s1 - 3, // llvm.hexagon.M4.vrmpyeh.s0 - 3, // llvm.hexagon.M4.vrmpyeh.s1 - 3, // llvm.hexagon.M4.vrmpyoh.acc.s0 - 3, // llvm.hexagon.M4.vrmpyoh.acc.s1 - 3, // llvm.hexagon.M4.vrmpyoh.s0 - 3, // llvm.hexagon.M4.vrmpyoh.s1 - 3, // llvm.hexagon.M4.xor.and - 3, // llvm.hexagon.M4.xor.andn - 3, // llvm.hexagon.M4.xor.or - 3, // llvm.hexagon.M4.xor.xacc - 3, // llvm.hexagon.M5.vdmacbsu - 3, // llvm.hexagon.M5.vdmpybsu - 3, // llvm.hexagon.M5.vmacbsu - 3, // llvm.hexagon.M5.vmacbuu - 3, // llvm.hexagon.M5.vmpybsu - 3, // llvm.hexagon.M5.vmpybuu - 3, // llvm.hexagon.M5.vrmacbsu - 3, // llvm.hexagon.M5.vrmacbuu - 3, // llvm.hexagon.M5.vrmpybsu - 3, // llvm.hexagon.M5.vrmpybuu - 3, // llvm.hexagon.M6.vabsdiffb - 3, // llvm.hexagon.M6.vabsdiffub - 3, // llvm.hexagon.S2.addasl.rrri - 3, // llvm.hexagon.S2.asl.i.p - 3, // llvm.hexagon.S2.asl.i.p.acc - 3, // llvm.hexagon.S2.asl.i.p.and - 3, // llvm.hexagon.S2.asl.i.p.nac - 3, // llvm.hexagon.S2.asl.i.p.or - 3, // llvm.hexagon.S2.asl.i.p.xacc - 3, // llvm.hexagon.S2.asl.i.r - 3, // llvm.hexagon.S2.asl.i.r.acc - 3, // llvm.hexagon.S2.asl.i.r.and - 3, // llvm.hexagon.S2.asl.i.r.nac - 3, // llvm.hexagon.S2.asl.i.r.or - 3, // llvm.hexagon.S2.asl.i.r.sat - 3, // llvm.hexagon.S2.asl.i.r.xacc - 3, // llvm.hexagon.S2.asl.i.vh - 3, // llvm.hexagon.S2.asl.i.vw - 3, // llvm.hexagon.S2.asl.r.p - 3, // llvm.hexagon.S2.asl.r.p.acc - 3, // llvm.hexagon.S2.asl.r.p.and - 3, // llvm.hexagon.S2.asl.r.p.nac - 3, // llvm.hexagon.S2.asl.r.p.or - 3, // llvm.hexagon.S2.asl.r.p.xor - 3, // llvm.hexagon.S2.asl.r.r - 3, // llvm.hexagon.S2.asl.r.r.acc - 3, // llvm.hexagon.S2.asl.r.r.and - 3, // llvm.hexagon.S2.asl.r.r.nac - 3, // llvm.hexagon.S2.asl.r.r.or - 3, // llvm.hexagon.S2.asl.r.r.sat - 3, // llvm.hexagon.S2.asl.r.vh - 3, // llvm.hexagon.S2.asl.r.vw - 3, // llvm.hexagon.S2.asr.i.p - 3, // llvm.hexagon.S2.asr.i.p.acc - 3, // llvm.hexagon.S2.asr.i.p.and - 3, // llvm.hexagon.S2.asr.i.p.nac - 3, // llvm.hexagon.S2.asr.i.p.or - 3, // llvm.hexagon.S2.asr.i.p.rnd - 3, // llvm.hexagon.S2.asr.i.p.rnd.goodsyntax - 3, // llvm.hexagon.S2.asr.i.r - 3, // llvm.hexagon.S2.asr.i.r.acc - 3, // llvm.hexagon.S2.asr.i.r.and - 3, // llvm.hexagon.S2.asr.i.r.nac - 3, // llvm.hexagon.S2.asr.i.r.or - 3, // llvm.hexagon.S2.asr.i.r.rnd - 3, // llvm.hexagon.S2.asr.i.r.rnd.goodsyntax - 3, // llvm.hexagon.S2.asr.i.svw.trun - 3, // llvm.hexagon.S2.asr.i.vh - 3, // llvm.hexagon.S2.asr.i.vw - 3, // llvm.hexagon.S2.asr.r.p - 3, // llvm.hexagon.S2.asr.r.p.acc - 3, // llvm.hexagon.S2.asr.r.p.and - 3, // llvm.hexagon.S2.asr.r.p.nac - 3, // llvm.hexagon.S2.asr.r.p.or - 3, // llvm.hexagon.S2.asr.r.p.xor - 3, // llvm.hexagon.S2.asr.r.r - 3, // llvm.hexagon.S2.asr.r.r.acc - 3, // llvm.hexagon.S2.asr.r.r.and - 3, // llvm.hexagon.S2.asr.r.r.nac - 3, // llvm.hexagon.S2.asr.r.r.or - 3, // llvm.hexagon.S2.asr.r.r.sat - 3, // llvm.hexagon.S2.asr.r.svw.trun - 3, // llvm.hexagon.S2.asr.r.vh - 3, // llvm.hexagon.S2.asr.r.vw - 3, // llvm.hexagon.S2.brev - 3, // llvm.hexagon.S2.brevp - 3, // llvm.hexagon.S2.cabacencbin - 3, // llvm.hexagon.S2.cl0 - 3, // llvm.hexagon.S2.cl0p - 3, // llvm.hexagon.S2.cl1 - 3, // llvm.hexagon.S2.cl1p - 3, // llvm.hexagon.S2.clb - 3, // llvm.hexagon.S2.clbnorm - 3, // llvm.hexagon.S2.clbp - 3, // llvm.hexagon.S2.clrbit.i - 3, // llvm.hexagon.S2.clrbit.r - 3, // llvm.hexagon.S2.ct0 - 3, // llvm.hexagon.S2.ct0p - 3, // llvm.hexagon.S2.ct1 - 3, // llvm.hexagon.S2.ct1p - 3, // llvm.hexagon.S2.deinterleave - 3, // llvm.hexagon.S2.extractu - 3, // llvm.hexagon.S2.extractu.rp - 3, // llvm.hexagon.S2.extractup - 3, // llvm.hexagon.S2.extractup.rp - 3, // llvm.hexagon.S2.insert - 3, // llvm.hexagon.S2.insert.rp - 3, // llvm.hexagon.S2.insertp - 3, // llvm.hexagon.S2.insertp.rp - 3, // llvm.hexagon.S2.interleave - 3, // llvm.hexagon.S2.lfsp - 3, // llvm.hexagon.S2.lsl.r.p - 3, // llvm.hexagon.S2.lsl.r.p.acc - 3, // llvm.hexagon.S2.lsl.r.p.and - 3, // llvm.hexagon.S2.lsl.r.p.nac - 3, // llvm.hexagon.S2.lsl.r.p.or - 3, // llvm.hexagon.S2.lsl.r.p.xor - 3, // llvm.hexagon.S2.lsl.r.r - 3, // llvm.hexagon.S2.lsl.r.r.acc - 3, // llvm.hexagon.S2.lsl.r.r.and - 3, // llvm.hexagon.S2.lsl.r.r.nac - 3, // llvm.hexagon.S2.lsl.r.r.or - 3, // llvm.hexagon.S2.lsl.r.vh - 3, // llvm.hexagon.S2.lsl.r.vw - 3, // llvm.hexagon.S2.lsr.i.p - 3, // llvm.hexagon.S2.lsr.i.p.acc - 3, // llvm.hexagon.S2.lsr.i.p.and - 3, // llvm.hexagon.S2.lsr.i.p.nac - 3, // llvm.hexagon.S2.lsr.i.p.or - 3, // llvm.hexagon.S2.lsr.i.p.xacc - 3, // llvm.hexagon.S2.lsr.i.r - 3, // llvm.hexagon.S2.lsr.i.r.acc - 3, // llvm.hexagon.S2.lsr.i.r.and - 3, // llvm.hexagon.S2.lsr.i.r.nac - 3, // llvm.hexagon.S2.lsr.i.r.or - 3, // llvm.hexagon.S2.lsr.i.r.xacc - 3, // llvm.hexagon.S2.lsr.i.vh - 3, // llvm.hexagon.S2.lsr.i.vw - 3, // llvm.hexagon.S2.lsr.r.p - 3, // llvm.hexagon.S2.lsr.r.p.acc - 3, // llvm.hexagon.S2.lsr.r.p.and - 3, // llvm.hexagon.S2.lsr.r.p.nac - 3, // llvm.hexagon.S2.lsr.r.p.or - 3, // llvm.hexagon.S2.lsr.r.p.xor - 3, // llvm.hexagon.S2.lsr.r.r - 3, // llvm.hexagon.S2.lsr.r.r.acc - 3, // llvm.hexagon.S2.lsr.r.r.and - 3, // llvm.hexagon.S2.lsr.r.r.nac - 3, // llvm.hexagon.S2.lsr.r.r.or - 3, // llvm.hexagon.S2.lsr.r.vh - 3, // llvm.hexagon.S2.lsr.r.vw - 3, // llvm.hexagon.S2.packhl - 3, // llvm.hexagon.S2.parityp - 3, // llvm.hexagon.S2.setbit.i - 3, // llvm.hexagon.S2.setbit.r - 3, // llvm.hexagon.S2.shuffeb - 3, // llvm.hexagon.S2.shuffeh - 3, // llvm.hexagon.S2.shuffob - 3, // llvm.hexagon.S2.shuffoh - 8, // llvm.hexagon.S2.storew.locked - 3, // llvm.hexagon.S2.svsathb - 3, // llvm.hexagon.S2.svsathub - 3, // llvm.hexagon.S2.tableidxb.goodsyntax - 3, // llvm.hexagon.S2.tableidxd.goodsyntax - 3, // llvm.hexagon.S2.tableidxh.goodsyntax - 3, // llvm.hexagon.S2.tableidxw.goodsyntax - 3, // llvm.hexagon.S2.togglebit.i - 3, // llvm.hexagon.S2.togglebit.r - 3, // llvm.hexagon.S2.tstbit.i - 3, // llvm.hexagon.S2.tstbit.r - 3, // llvm.hexagon.S2.valignib - 3, // llvm.hexagon.S2.valignrb - 3, // llvm.hexagon.S2.vcnegh - 3, // llvm.hexagon.S2.vcrotate - 3, // llvm.hexagon.S2.vrcnegh - 3, // llvm.hexagon.S2.vrndpackwh - 3, // llvm.hexagon.S2.vrndpackwhs - 3, // llvm.hexagon.S2.vsathb - 3, // llvm.hexagon.S2.vsathb.nopack - 3, // llvm.hexagon.S2.vsathub - 3, // llvm.hexagon.S2.vsathub.nopack - 3, // llvm.hexagon.S2.vsatwh - 3, // llvm.hexagon.S2.vsatwh.nopack - 3, // llvm.hexagon.S2.vsatwuh - 3, // llvm.hexagon.S2.vsatwuh.nopack - 3, // llvm.hexagon.S2.vsplatrb - 3, // llvm.hexagon.S2.vsplatrh - 3, // llvm.hexagon.S2.vspliceib - 3, // llvm.hexagon.S2.vsplicerb - 3, // llvm.hexagon.S2.vsxtbh - 3, // llvm.hexagon.S2.vsxthw - 3, // llvm.hexagon.S2.vtrunehb - 3, // llvm.hexagon.S2.vtrunewh - 3, // llvm.hexagon.S2.vtrunohb - 3, // llvm.hexagon.S2.vtrunowh - 3, // llvm.hexagon.S2.vzxtbh - 3, // llvm.hexagon.S2.vzxthw - 3, // llvm.hexagon.S4.addaddi - 3, // llvm.hexagon.S4.addi.asl.ri - 3, // llvm.hexagon.S4.addi.lsr.ri - 3, // llvm.hexagon.S4.andi.asl.ri - 3, // llvm.hexagon.S4.andi.lsr.ri - 3, // llvm.hexagon.S4.clbaddi - 3, // llvm.hexagon.S4.clbpaddi - 3, // llvm.hexagon.S4.clbpnorm - 3, // llvm.hexagon.S4.extract - 3, // llvm.hexagon.S4.extract.rp - 3, // llvm.hexagon.S4.extractp - 3, // llvm.hexagon.S4.extractp.rp - 3, // llvm.hexagon.S4.lsli - 3, // llvm.hexagon.S4.ntstbit.i - 3, // llvm.hexagon.S4.ntstbit.r - 3, // llvm.hexagon.S4.or.andi - 3, // llvm.hexagon.S4.or.andix - 3, // llvm.hexagon.S4.or.ori - 3, // llvm.hexagon.S4.ori.asl.ri - 3, // llvm.hexagon.S4.ori.lsr.ri - 3, // llvm.hexagon.S4.parity - 8, // llvm.hexagon.S4.stored.locked - 3, // llvm.hexagon.S4.subaddi - 3, // llvm.hexagon.S4.subi.asl.ri - 3, // llvm.hexagon.S4.subi.lsr.ri - 3, // llvm.hexagon.S4.vrcrotate - 3, // llvm.hexagon.S4.vrcrotate.acc - 3, // llvm.hexagon.S4.vxaddsubh - 3, // llvm.hexagon.S4.vxaddsubhr - 3, // llvm.hexagon.S4.vxaddsubw - 3, // llvm.hexagon.S4.vxsubaddh - 3, // llvm.hexagon.S4.vxsubaddhr - 3, // llvm.hexagon.S4.vxsubaddw - 3, // llvm.hexagon.S5.asrhub.rnd.sat.goodsyntax - 3, // llvm.hexagon.S5.asrhub.sat - 3, // llvm.hexagon.S5.popcountp - 3, // llvm.hexagon.S5.vasrhrnd.goodsyntax - 3, // llvm.hexagon.S6.rol.i.p - 3, // llvm.hexagon.S6.rol.i.p.acc - 3, // llvm.hexagon.S6.rol.i.p.and - 3, // llvm.hexagon.S6.rol.i.p.nac - 3, // llvm.hexagon.S6.rol.i.p.or - 3, // llvm.hexagon.S6.rol.i.p.xacc - 3, // llvm.hexagon.S6.rol.i.r - 3, // llvm.hexagon.S6.rol.i.r.acc - 3, // llvm.hexagon.S6.rol.i.r.and - 3, // llvm.hexagon.S6.rol.i.r.nac - 3, // llvm.hexagon.S6.rol.i.r.or - 3, // llvm.hexagon.S6.rol.i.r.xacc - 3, // llvm.hexagon.S6.vsplatrbp - 3, // llvm.hexagon.S6.vtrunehb.ppp - 3, // llvm.hexagon.S6.vtrunohb.ppp - 3, // llvm.hexagon.SI.to.SXTHI.asrh - 3, // llvm.hexagon.V6.extractw - 3, // llvm.hexagon.V6.extractw.128B - 3, // llvm.hexagon.V6.hi - 3, // llvm.hexagon.V6.hi.128B - 3, // llvm.hexagon.V6.lo - 3, // llvm.hexagon.V6.lo.128B - 3, // llvm.hexagon.V6.lvsplatw - 3, // llvm.hexagon.V6.lvsplatw.128B - 3, // llvm.hexagon.V6.pred.and - 3, // llvm.hexagon.V6.pred.and.128B - 3, // llvm.hexagon.V6.pred.and.n - 3, // llvm.hexagon.V6.pred.and.n.128B - 3, // llvm.hexagon.V6.pred.not - 3, // llvm.hexagon.V6.pred.not.128B - 3, // llvm.hexagon.V6.pred.or - 3, // llvm.hexagon.V6.pred.or.128B - 3, // llvm.hexagon.V6.pred.or.n - 3, // llvm.hexagon.V6.pred.or.n.128B - 3, // llvm.hexagon.V6.pred.scalar2 - 3, // llvm.hexagon.V6.pred.scalar2.128B - 3, // llvm.hexagon.V6.pred.xor - 3, // llvm.hexagon.V6.pred.xor.128B - 3, // llvm.hexagon.V6.vabsdiffh - 3, // llvm.hexagon.V6.vabsdiffh.128B - 3, // llvm.hexagon.V6.vabsdiffub - 3, // llvm.hexagon.V6.vabsdiffub.128B - 3, // llvm.hexagon.V6.vabsdiffuh - 3, // llvm.hexagon.V6.vabsdiffuh.128B - 3, // llvm.hexagon.V6.vabsdiffw - 3, // llvm.hexagon.V6.vabsdiffw.128B - 3, // llvm.hexagon.V6.vabsh - 3, // llvm.hexagon.V6.vabsh.128B - 3, // llvm.hexagon.V6.vabsh.sat - 3, // llvm.hexagon.V6.vabsh.sat.128B - 3, // llvm.hexagon.V6.vabsw - 3, // llvm.hexagon.V6.vabsw.128B - 3, // llvm.hexagon.V6.vabsw.sat - 3, // llvm.hexagon.V6.vabsw.sat.128B - 3, // llvm.hexagon.V6.vaddb - 3, // llvm.hexagon.V6.vaddb.128B - 3, // llvm.hexagon.V6.vaddb.dv - 3, // llvm.hexagon.V6.vaddb.dv.128B - 3, // llvm.hexagon.V6.vaddbnq - 3, // llvm.hexagon.V6.vaddbnq.128B - 3, // llvm.hexagon.V6.vaddbq - 3, // llvm.hexagon.V6.vaddbq.128B - 3, // llvm.hexagon.V6.vaddh - 3, // llvm.hexagon.V6.vaddh.128B - 3, // llvm.hexagon.V6.vaddh.dv - 3, // llvm.hexagon.V6.vaddh.dv.128B - 3, // llvm.hexagon.V6.vaddhnq - 3, // llvm.hexagon.V6.vaddhnq.128B - 3, // llvm.hexagon.V6.vaddhq - 3, // llvm.hexagon.V6.vaddhq.128B - 3, // llvm.hexagon.V6.vaddhsat - 3, // llvm.hexagon.V6.vaddhsat.128B - 3, // llvm.hexagon.V6.vaddhsat.dv - 3, // llvm.hexagon.V6.vaddhsat.dv.128B - 3, // llvm.hexagon.V6.vaddhw - 3, // llvm.hexagon.V6.vaddhw.128B - 3, // llvm.hexagon.V6.vaddubh - 3, // llvm.hexagon.V6.vaddubh.128B - 3, // llvm.hexagon.V6.vaddubsat - 3, // llvm.hexagon.V6.vaddubsat.128B - 3, // llvm.hexagon.V6.vaddubsat.dv - 3, // llvm.hexagon.V6.vaddubsat.dv.128B - 3, // llvm.hexagon.V6.vadduhsat - 3, // llvm.hexagon.V6.vadduhsat.128B - 3, // llvm.hexagon.V6.vadduhsat.dv - 3, // llvm.hexagon.V6.vadduhsat.dv.128B - 3, // llvm.hexagon.V6.vadduhw - 3, // llvm.hexagon.V6.vadduhw.128B - 3, // llvm.hexagon.V6.vaddw - 3, // llvm.hexagon.V6.vaddw.128B - 3, // llvm.hexagon.V6.vaddw.dv - 3, // llvm.hexagon.V6.vaddw.dv.128B - 3, // llvm.hexagon.V6.vaddwnq - 3, // llvm.hexagon.V6.vaddwnq.128B - 3, // llvm.hexagon.V6.vaddwq - 3, // llvm.hexagon.V6.vaddwq.128B - 3, // llvm.hexagon.V6.vaddwsat - 3, // llvm.hexagon.V6.vaddwsat.128B - 3, // llvm.hexagon.V6.vaddwsat.dv - 3, // llvm.hexagon.V6.vaddwsat.dv.128B - 3, // llvm.hexagon.V6.valignb - 3, // llvm.hexagon.V6.valignb.128B - 3, // llvm.hexagon.V6.valignbi - 3, // llvm.hexagon.V6.valignbi.128B - 3, // llvm.hexagon.V6.vand - 3, // llvm.hexagon.V6.vand.128B - 3, // llvm.hexagon.V6.vandqrt - 3, // llvm.hexagon.V6.vandqrt.128B - 3, // llvm.hexagon.V6.vandqrt.acc - 3, // llvm.hexagon.V6.vandqrt.acc.128B - 3, // llvm.hexagon.V6.vandvrt - 3, // llvm.hexagon.V6.vandvrt.128B - 3, // llvm.hexagon.V6.vandvrt.acc - 3, // llvm.hexagon.V6.vandvrt.acc.128B - 3, // llvm.hexagon.V6.vaslh - 3, // llvm.hexagon.V6.vaslh.128B - 3, // llvm.hexagon.V6.vaslhv - 3, // llvm.hexagon.V6.vaslhv.128B - 3, // llvm.hexagon.V6.vaslw - 3, // llvm.hexagon.V6.vaslw.128B - 3, // llvm.hexagon.V6.vaslw.acc - 3, // llvm.hexagon.V6.vaslw.acc.128B - 3, // llvm.hexagon.V6.vaslwv - 3, // llvm.hexagon.V6.vaslwv.128B - 3, // llvm.hexagon.V6.vasrh - 3, // llvm.hexagon.V6.vasrh.128B - 3, // llvm.hexagon.V6.vasrhbrndsat - 3, // llvm.hexagon.V6.vasrhbrndsat.128B - 3, // llvm.hexagon.V6.vasrhubrndsat - 3, // llvm.hexagon.V6.vasrhubrndsat.128B - 3, // llvm.hexagon.V6.vasrhubsat - 3, // llvm.hexagon.V6.vasrhubsat.128B - 3, // llvm.hexagon.V6.vasrhv - 3, // llvm.hexagon.V6.vasrhv.128B - 3, // llvm.hexagon.V6.vasrw - 3, // llvm.hexagon.V6.vasrw.128B - 3, // llvm.hexagon.V6.vasrw.acc - 3, // llvm.hexagon.V6.vasrw.acc.128B - 3, // llvm.hexagon.V6.vasrwh - 3, // llvm.hexagon.V6.vasrwh.128B - 3, // llvm.hexagon.V6.vasrwhrndsat - 3, // llvm.hexagon.V6.vasrwhrndsat.128B - 3, // llvm.hexagon.V6.vasrwhsat - 3, // llvm.hexagon.V6.vasrwhsat.128B - 3, // llvm.hexagon.V6.vasrwuhsat - 3, // llvm.hexagon.V6.vasrwuhsat.128B - 3, // llvm.hexagon.V6.vasrwv - 3, // llvm.hexagon.V6.vasrwv.128B - 3, // llvm.hexagon.V6.vassign - 3, // llvm.hexagon.V6.vassign.128B - 3, // llvm.hexagon.V6.vassignp - 3, // llvm.hexagon.V6.vassignp.128B - 3, // llvm.hexagon.V6.vavgh - 3, // llvm.hexagon.V6.vavgh.128B - 3, // llvm.hexagon.V6.vavghrnd - 3, // llvm.hexagon.V6.vavghrnd.128B - 3, // llvm.hexagon.V6.vavgub - 3, // llvm.hexagon.V6.vavgub.128B - 3, // llvm.hexagon.V6.vavgubrnd - 3, // llvm.hexagon.V6.vavgubrnd.128B - 3, // llvm.hexagon.V6.vavguh - 3, // llvm.hexagon.V6.vavguh.128B - 3, // llvm.hexagon.V6.vavguhrnd - 3, // llvm.hexagon.V6.vavguhrnd.128B - 3, // llvm.hexagon.V6.vavgw - 3, // llvm.hexagon.V6.vavgw.128B - 3, // llvm.hexagon.V6.vavgwrnd - 3, // llvm.hexagon.V6.vavgwrnd.128B - 3, // llvm.hexagon.V6.vcl0h - 3, // llvm.hexagon.V6.vcl0h.128B - 3, // llvm.hexagon.V6.vcl0w - 3, // llvm.hexagon.V6.vcl0w.128B - 3, // llvm.hexagon.V6.vcombine - 3, // llvm.hexagon.V6.vcombine.128B - 3, // llvm.hexagon.V6.vd0 - 3, // llvm.hexagon.V6.vd0.128B - 3, // llvm.hexagon.V6.vdealb - 3, // llvm.hexagon.V6.vdealb.128B - 3, // llvm.hexagon.V6.vdealb4w - 3, // llvm.hexagon.V6.vdealb4w.128B - 3, // llvm.hexagon.V6.vdealh - 3, // llvm.hexagon.V6.vdealh.128B - 3, // llvm.hexagon.V6.vdealvdd - 3, // llvm.hexagon.V6.vdealvdd.128B - 3, // llvm.hexagon.V6.vdelta - 3, // llvm.hexagon.V6.vdelta.128B - 3, // llvm.hexagon.V6.vdmpybus - 3, // llvm.hexagon.V6.vdmpybus.128B - 3, // llvm.hexagon.V6.vdmpybus.acc - 3, // llvm.hexagon.V6.vdmpybus.acc.128B - 3, // llvm.hexagon.V6.vdmpybus.dv - 3, // llvm.hexagon.V6.vdmpybus.dv.128B - 3, // llvm.hexagon.V6.vdmpybus.dv.acc - 3, // llvm.hexagon.V6.vdmpybus.dv.acc.128B - 3, // llvm.hexagon.V6.vdmpyhb - 3, // llvm.hexagon.V6.vdmpyhb.128B - 3, // llvm.hexagon.V6.vdmpyhb.acc - 3, // llvm.hexagon.V6.vdmpyhb.acc.128B - 3, // llvm.hexagon.V6.vdmpyhb.dv - 3, // llvm.hexagon.V6.vdmpyhb.dv.128B - 3, // llvm.hexagon.V6.vdmpyhb.dv.acc - 3, // llvm.hexagon.V6.vdmpyhb.dv.acc.128B - 3, // llvm.hexagon.V6.vdmpyhisat - 3, // llvm.hexagon.V6.vdmpyhisat.128B - 3, // llvm.hexagon.V6.vdmpyhisat.acc - 3, // llvm.hexagon.V6.vdmpyhisat.acc.128B - 3, // llvm.hexagon.V6.vdmpyhsat - 3, // llvm.hexagon.V6.vdmpyhsat.128B - 3, // llvm.hexagon.V6.vdmpyhsat.acc - 3, // llvm.hexagon.V6.vdmpyhsat.acc.128B - 3, // llvm.hexagon.V6.vdmpyhsuisat - 3, // llvm.hexagon.V6.vdmpyhsuisat.128B - 3, // llvm.hexagon.V6.vdmpyhsuisat.acc - 3, // llvm.hexagon.V6.vdmpyhsuisat.acc.128B - 3, // llvm.hexagon.V6.vdmpyhsusat - 3, // llvm.hexagon.V6.vdmpyhsusat.128B - 3, // llvm.hexagon.V6.vdmpyhsusat.acc - 3, // llvm.hexagon.V6.vdmpyhsusat.acc.128B - 3, // llvm.hexagon.V6.vdmpyhvsat - 3, // llvm.hexagon.V6.vdmpyhvsat.128B - 3, // llvm.hexagon.V6.vdmpyhvsat.acc - 3, // llvm.hexagon.V6.vdmpyhvsat.acc.128B - 3, // llvm.hexagon.V6.vdsaduh - 3, // llvm.hexagon.V6.vdsaduh.128B - 3, // llvm.hexagon.V6.vdsaduh.acc - 3, // llvm.hexagon.V6.vdsaduh.acc.128B - 3, // llvm.hexagon.V6.veqb - 3, // llvm.hexagon.V6.veqb.128B - 3, // llvm.hexagon.V6.veqb.and - 3, // llvm.hexagon.V6.veqb.and.128B - 3, // llvm.hexagon.V6.veqb.or - 3, // llvm.hexagon.V6.veqb.or.128B - 3, // llvm.hexagon.V6.veqb.xor - 3, // llvm.hexagon.V6.veqb.xor.128B - 3, // llvm.hexagon.V6.veqh - 3, // llvm.hexagon.V6.veqh.128B - 3, // llvm.hexagon.V6.veqh.and - 3, // llvm.hexagon.V6.veqh.and.128B - 3, // llvm.hexagon.V6.veqh.or - 3, // llvm.hexagon.V6.veqh.or.128B - 3, // llvm.hexagon.V6.veqh.xor - 3, // llvm.hexagon.V6.veqh.xor.128B - 3, // llvm.hexagon.V6.veqw - 3, // llvm.hexagon.V6.veqw.128B - 3, // llvm.hexagon.V6.veqw.and - 3, // llvm.hexagon.V6.veqw.and.128B - 3, // llvm.hexagon.V6.veqw.or - 3, // llvm.hexagon.V6.veqw.or.128B - 3, // llvm.hexagon.V6.veqw.xor - 3, // llvm.hexagon.V6.veqw.xor.128B - 3, // llvm.hexagon.V6.vgtb - 3, // llvm.hexagon.V6.vgtb.128B - 3, // llvm.hexagon.V6.vgtb.and - 3, // llvm.hexagon.V6.vgtb.and.128B - 3, // llvm.hexagon.V6.vgtb.or - 3, // llvm.hexagon.V6.vgtb.or.128B - 3, // llvm.hexagon.V6.vgtb.xor - 3, // llvm.hexagon.V6.vgtb.xor.128B - 3, // llvm.hexagon.V6.vgth - 3, // llvm.hexagon.V6.vgth.128B - 3, // llvm.hexagon.V6.vgth.and - 3, // llvm.hexagon.V6.vgth.and.128B - 3, // llvm.hexagon.V6.vgth.or - 3, // llvm.hexagon.V6.vgth.or.128B - 3, // llvm.hexagon.V6.vgth.xor - 3, // llvm.hexagon.V6.vgth.xor.128B - 3, // llvm.hexagon.V6.vgtub - 3, // llvm.hexagon.V6.vgtub.128B - 3, // llvm.hexagon.V6.vgtub.and - 3, // llvm.hexagon.V6.vgtub.and.128B - 3, // llvm.hexagon.V6.vgtub.or - 3, // llvm.hexagon.V6.vgtub.or.128B - 3, // llvm.hexagon.V6.vgtub.xor - 3, // llvm.hexagon.V6.vgtub.xor.128B - 3, // llvm.hexagon.V6.vgtuh - 3, // llvm.hexagon.V6.vgtuh.128B - 3, // llvm.hexagon.V6.vgtuh.and - 3, // llvm.hexagon.V6.vgtuh.and.128B - 3, // llvm.hexagon.V6.vgtuh.or - 3, // llvm.hexagon.V6.vgtuh.or.128B - 3, // llvm.hexagon.V6.vgtuh.xor - 3, // llvm.hexagon.V6.vgtuh.xor.128B - 3, // llvm.hexagon.V6.vgtuw - 3, // llvm.hexagon.V6.vgtuw.128B - 3, // llvm.hexagon.V6.vgtuw.and - 3, // llvm.hexagon.V6.vgtuw.and.128B - 3, // llvm.hexagon.V6.vgtuw.or - 3, // llvm.hexagon.V6.vgtuw.or.128B - 3, // llvm.hexagon.V6.vgtuw.xor - 3, // llvm.hexagon.V6.vgtuw.xor.128B - 3, // llvm.hexagon.V6.vgtw - 3, // llvm.hexagon.V6.vgtw.128B - 3, // llvm.hexagon.V6.vgtw.and - 3, // llvm.hexagon.V6.vgtw.and.128B - 3, // llvm.hexagon.V6.vgtw.or - 3, // llvm.hexagon.V6.vgtw.or.128B - 3, // llvm.hexagon.V6.vgtw.xor - 3, // llvm.hexagon.V6.vgtw.xor.128B - 3, // llvm.hexagon.V6.vinsertwr - 3, // llvm.hexagon.V6.vinsertwr.128B - 3, // llvm.hexagon.V6.vlalignb - 3, // llvm.hexagon.V6.vlalignb.128B - 3, // llvm.hexagon.V6.vlalignbi - 3, // llvm.hexagon.V6.vlalignbi.128B - 3, // llvm.hexagon.V6.vlsrh - 3, // llvm.hexagon.V6.vlsrh.128B - 3, // llvm.hexagon.V6.vlsrhv - 3, // llvm.hexagon.V6.vlsrhv.128B - 3, // llvm.hexagon.V6.vlsrw - 3, // llvm.hexagon.V6.vlsrw.128B - 3, // llvm.hexagon.V6.vlsrwv - 3, // llvm.hexagon.V6.vlsrwv.128B - 3, // llvm.hexagon.V6.vlutb - 3, // llvm.hexagon.V6.vlutb.128B - 3, // llvm.hexagon.V6.vlutb.acc - 3, // llvm.hexagon.V6.vlutb.acc.128B - 3, // llvm.hexagon.V6.vlutb.dv - 3, // llvm.hexagon.V6.vlutb.dv.128B - 3, // llvm.hexagon.V6.vlutb.dv.acc - 3, // llvm.hexagon.V6.vlutb.dv.acc.128B - 3, // llvm.hexagon.V6.vlutvvb - 3, // llvm.hexagon.V6.vlutvvb.128B - 3, // llvm.hexagon.V6.vlutvvb.oracc - 3, // llvm.hexagon.V6.vlutvvb.oracc.128B - 3, // llvm.hexagon.V6.vlutvwh - 3, // llvm.hexagon.V6.vlutvwh.128B - 3, // llvm.hexagon.V6.vlutvwh.oracc - 3, // llvm.hexagon.V6.vlutvwh.oracc.128B - 3, // llvm.hexagon.V6.vmaxh - 3, // llvm.hexagon.V6.vmaxh.128B - 3, // llvm.hexagon.V6.vmaxub - 3, // llvm.hexagon.V6.vmaxub.128B - 3, // llvm.hexagon.V6.vmaxuh - 3, // llvm.hexagon.V6.vmaxuh.128B - 3, // llvm.hexagon.V6.vmaxw - 3, // llvm.hexagon.V6.vmaxw.128B - 3, // llvm.hexagon.V6.vminh - 3, // llvm.hexagon.V6.vminh.128B - 3, // llvm.hexagon.V6.vminub - 3, // llvm.hexagon.V6.vminub.128B - 3, // llvm.hexagon.V6.vminuh - 3, // llvm.hexagon.V6.vminuh.128B - 3, // llvm.hexagon.V6.vminw - 3, // llvm.hexagon.V6.vminw.128B - 3, // llvm.hexagon.V6.vmpabus - 3, // llvm.hexagon.V6.vmpabus.128B - 3, // llvm.hexagon.V6.vmpabus.acc - 3, // llvm.hexagon.V6.vmpabus.acc.128B - 3, // llvm.hexagon.V6.vmpabusv - 3, // llvm.hexagon.V6.vmpabusv.128B - 3, // llvm.hexagon.V6.vmpabuuv - 3, // llvm.hexagon.V6.vmpabuuv.128B - 3, // llvm.hexagon.V6.vmpahb - 3, // llvm.hexagon.V6.vmpahb.128B - 3, // llvm.hexagon.V6.vmpahb.acc - 3, // llvm.hexagon.V6.vmpahb.acc.128B - 3, // llvm.hexagon.V6.vmpybus - 3, // llvm.hexagon.V6.vmpybus.128B - 3, // llvm.hexagon.V6.vmpybus.acc - 3, // llvm.hexagon.V6.vmpybus.acc.128B - 3, // llvm.hexagon.V6.vmpybusv - 3, // llvm.hexagon.V6.vmpybusv.128B - 3, // llvm.hexagon.V6.vmpybusv.acc - 3, // llvm.hexagon.V6.vmpybusv.acc.128B - 3, // llvm.hexagon.V6.vmpybv - 3, // llvm.hexagon.V6.vmpybv.128B - 3, // llvm.hexagon.V6.vmpybv.acc - 3, // llvm.hexagon.V6.vmpybv.acc.128B - 3, // llvm.hexagon.V6.vmpyewuh - 3, // llvm.hexagon.V6.vmpyewuh.128B - 3, // llvm.hexagon.V6.vmpyh - 3, // llvm.hexagon.V6.vmpyh.128B - 3, // llvm.hexagon.V6.vmpyhsat.acc - 3, // llvm.hexagon.V6.vmpyhsat.acc.128B - 3, // llvm.hexagon.V6.vmpyhsrs - 3, // llvm.hexagon.V6.vmpyhsrs.128B - 3, // llvm.hexagon.V6.vmpyhss - 3, // llvm.hexagon.V6.vmpyhss.128B - 3, // llvm.hexagon.V6.vmpyhus - 3, // llvm.hexagon.V6.vmpyhus.128B - 3, // llvm.hexagon.V6.vmpyhus.acc - 3, // llvm.hexagon.V6.vmpyhus.acc.128B - 3, // llvm.hexagon.V6.vmpyhv - 3, // llvm.hexagon.V6.vmpyhv.128B - 3, // llvm.hexagon.V6.vmpyhv.acc - 3, // llvm.hexagon.V6.vmpyhv.acc.128B - 3, // llvm.hexagon.V6.vmpyhvsrs - 3, // llvm.hexagon.V6.vmpyhvsrs.128B - 3, // llvm.hexagon.V6.vmpyieoh - 3, // llvm.hexagon.V6.vmpyieoh.128B - 3, // llvm.hexagon.V6.vmpyiewh.acc - 3, // llvm.hexagon.V6.vmpyiewh.acc.128B - 3, // llvm.hexagon.V6.vmpyiewuh - 3, // llvm.hexagon.V6.vmpyiewuh.128B - 3, // llvm.hexagon.V6.vmpyiewuh.acc - 3, // llvm.hexagon.V6.vmpyiewuh.acc.128B - 3, // llvm.hexagon.V6.vmpyih - 3, // llvm.hexagon.V6.vmpyih.128B - 3, // llvm.hexagon.V6.vmpyih.acc - 3, // llvm.hexagon.V6.vmpyih.acc.128B - 3, // llvm.hexagon.V6.vmpyihb - 3, // llvm.hexagon.V6.vmpyihb.128B - 3, // llvm.hexagon.V6.vmpyihb.acc - 3, // llvm.hexagon.V6.vmpyihb.acc.128B - 3, // llvm.hexagon.V6.vmpyiowh - 3, // llvm.hexagon.V6.vmpyiowh.128B - 3, // llvm.hexagon.V6.vmpyiwb - 3, // llvm.hexagon.V6.vmpyiwb.128B - 3, // llvm.hexagon.V6.vmpyiwb.acc - 3, // llvm.hexagon.V6.vmpyiwb.acc.128B - 3, // llvm.hexagon.V6.vmpyiwh - 3, // llvm.hexagon.V6.vmpyiwh.128B - 3, // llvm.hexagon.V6.vmpyiwh.acc - 3, // llvm.hexagon.V6.vmpyiwh.acc.128B - 3, // llvm.hexagon.V6.vmpyowh - 3, // llvm.hexagon.V6.vmpyowh.128B - 3, // llvm.hexagon.V6.vmpyowh.rnd - 3, // llvm.hexagon.V6.vmpyowh.rnd.128B - 3, // llvm.hexagon.V6.vmpyowh.rnd.sacc - 3, // llvm.hexagon.V6.vmpyowh.rnd.sacc.128B - 3, // llvm.hexagon.V6.vmpyowh.sacc - 3, // llvm.hexagon.V6.vmpyowh.sacc.128B - 3, // llvm.hexagon.V6.vmpyub - 3, // llvm.hexagon.V6.vmpyub.128B - 3, // llvm.hexagon.V6.vmpyub.acc - 3, // llvm.hexagon.V6.vmpyub.acc.128B - 3, // llvm.hexagon.V6.vmpyubv - 3, // llvm.hexagon.V6.vmpyubv.128B - 3, // llvm.hexagon.V6.vmpyubv.acc - 3, // llvm.hexagon.V6.vmpyubv.acc.128B - 3, // llvm.hexagon.V6.vmpyuh - 3, // llvm.hexagon.V6.vmpyuh.128B - 3, // llvm.hexagon.V6.vmpyuh.acc - 3, // llvm.hexagon.V6.vmpyuh.acc.128B - 3, // llvm.hexagon.V6.vmpyuhv - 3, // llvm.hexagon.V6.vmpyuhv.128B - 3, // llvm.hexagon.V6.vmpyuhv.acc - 3, // llvm.hexagon.V6.vmpyuhv.acc.128B - 3, // llvm.hexagon.V6.vmux - 3, // llvm.hexagon.V6.vmux.128B - 3, // llvm.hexagon.V6.vnavgh - 3, // llvm.hexagon.V6.vnavgh.128B - 3, // llvm.hexagon.V6.vnavgub - 3, // llvm.hexagon.V6.vnavgub.128B - 3, // llvm.hexagon.V6.vnavgw - 3, // llvm.hexagon.V6.vnavgw.128B - 3, // llvm.hexagon.V6.vnormamth - 3, // llvm.hexagon.V6.vnormamth.128B - 3, // llvm.hexagon.V6.vnormamtw - 3, // llvm.hexagon.V6.vnormamtw.128B - 3, // llvm.hexagon.V6.vnot - 3, // llvm.hexagon.V6.vnot.128B - 3, // llvm.hexagon.V6.vor - 3, // llvm.hexagon.V6.vor.128B - 3, // llvm.hexagon.V6.vpackeb - 3, // llvm.hexagon.V6.vpackeb.128B - 3, // llvm.hexagon.V6.vpackeh - 3, // llvm.hexagon.V6.vpackeh.128B - 3, // llvm.hexagon.V6.vpackhb.sat - 3, // llvm.hexagon.V6.vpackhb.sat.128B - 3, // llvm.hexagon.V6.vpackhub.sat - 3, // llvm.hexagon.V6.vpackhub.sat.128B - 3, // llvm.hexagon.V6.vpackob - 3, // llvm.hexagon.V6.vpackob.128B - 3, // llvm.hexagon.V6.vpackoh - 3, // llvm.hexagon.V6.vpackoh.128B - 3, // llvm.hexagon.V6.vpackwh.sat - 3, // llvm.hexagon.V6.vpackwh.sat.128B - 3, // llvm.hexagon.V6.vpackwuh.sat - 3, // llvm.hexagon.V6.vpackwuh.sat.128B - 3, // llvm.hexagon.V6.vpopcounth - 3, // llvm.hexagon.V6.vpopcounth.128B - 3, // llvm.hexagon.V6.vrdelta - 3, // llvm.hexagon.V6.vrdelta.128B - 3, // llvm.hexagon.V6.vrmpybus - 3, // llvm.hexagon.V6.vrmpybus.128B - 3, // llvm.hexagon.V6.vrmpybus.acc - 3, // llvm.hexagon.V6.vrmpybus.acc.128B - 3, // llvm.hexagon.V6.vrmpybusi - 3, // llvm.hexagon.V6.vrmpybusi.128B - 3, // llvm.hexagon.V6.vrmpybusi.acc - 3, // llvm.hexagon.V6.vrmpybusi.acc.128B - 3, // llvm.hexagon.V6.vrmpybusv - 3, // llvm.hexagon.V6.vrmpybusv.128B - 3, // llvm.hexagon.V6.vrmpybusv.acc - 3, // llvm.hexagon.V6.vrmpybusv.acc.128B - 3, // llvm.hexagon.V6.vrmpybv - 3, // llvm.hexagon.V6.vrmpybv.128B - 3, // llvm.hexagon.V6.vrmpybv.acc - 3, // llvm.hexagon.V6.vrmpybv.acc.128B - 3, // llvm.hexagon.V6.vrmpyub - 3, // llvm.hexagon.V6.vrmpyub.128B - 3, // llvm.hexagon.V6.vrmpyub.acc - 3, // llvm.hexagon.V6.vrmpyub.acc.128B - 3, // llvm.hexagon.V6.vrmpyubi - 3, // llvm.hexagon.V6.vrmpyubi.128B - 3, // llvm.hexagon.V6.vrmpyubi.acc - 3, // llvm.hexagon.V6.vrmpyubi.acc.128B - 3, // llvm.hexagon.V6.vrmpyubv - 3, // llvm.hexagon.V6.vrmpyubv.128B - 3, // llvm.hexagon.V6.vrmpyubv.acc - 3, // llvm.hexagon.V6.vrmpyubv.acc.128B - 3, // llvm.hexagon.V6.vror - 3, // llvm.hexagon.V6.vror.128B - 3, // llvm.hexagon.V6.vroundhb - 3, // llvm.hexagon.V6.vroundhb.128B - 3, // llvm.hexagon.V6.vroundhub - 3, // llvm.hexagon.V6.vroundhub.128B - 3, // llvm.hexagon.V6.vroundwh - 3, // llvm.hexagon.V6.vroundwh.128B - 3, // llvm.hexagon.V6.vroundwuh - 3, // llvm.hexagon.V6.vroundwuh.128B - 3, // llvm.hexagon.V6.vrsadubi - 3, // llvm.hexagon.V6.vrsadubi.128B - 3, // llvm.hexagon.V6.vrsadubi.acc - 3, // llvm.hexagon.V6.vrsadubi.acc.128B - 3, // llvm.hexagon.V6.vsathub - 3, // llvm.hexagon.V6.vsathub.128B - 3, // llvm.hexagon.V6.vsatwh - 3, // llvm.hexagon.V6.vsatwh.128B - 3, // llvm.hexagon.V6.vsb - 3, // llvm.hexagon.V6.vsb.128B - 3, // llvm.hexagon.V6.vsh - 3, // llvm.hexagon.V6.vsh.128B - 3, // llvm.hexagon.V6.vshufeh - 3, // llvm.hexagon.V6.vshufeh.128B - 3, // llvm.hexagon.V6.vshuffb - 3, // llvm.hexagon.V6.vshuffb.128B - 3, // llvm.hexagon.V6.vshuffeb - 3, // llvm.hexagon.V6.vshuffeb.128B - 3, // llvm.hexagon.V6.vshuffh - 3, // llvm.hexagon.V6.vshuffh.128B - 3, // llvm.hexagon.V6.vshuffob - 3, // llvm.hexagon.V6.vshuffob.128B - 3, // llvm.hexagon.V6.vshuffvdd - 3, // llvm.hexagon.V6.vshuffvdd.128B - 3, // llvm.hexagon.V6.vshufoeb - 3, // llvm.hexagon.V6.vshufoeb.128B - 3, // llvm.hexagon.V6.vshufoeh - 3, // llvm.hexagon.V6.vshufoeh.128B - 3, // llvm.hexagon.V6.vshufoh - 3, // llvm.hexagon.V6.vshufoh.128B - 3, // llvm.hexagon.V6.vsubb - 3, // llvm.hexagon.V6.vsubb.128B - 3, // llvm.hexagon.V6.vsubb.dv - 3, // llvm.hexagon.V6.vsubb.dv.128B - 3, // llvm.hexagon.V6.vsubbnq - 3, // llvm.hexagon.V6.vsubbnq.128B - 3, // llvm.hexagon.V6.vsubbq - 3, // llvm.hexagon.V6.vsubbq.128B - 3, // llvm.hexagon.V6.vsubh - 3, // llvm.hexagon.V6.vsubh.128B - 3, // llvm.hexagon.V6.vsubh.dv - 3, // llvm.hexagon.V6.vsubh.dv.128B - 3, // llvm.hexagon.V6.vsubhnq - 3, // llvm.hexagon.V6.vsubhnq.128B - 3, // llvm.hexagon.V6.vsubhq - 3, // llvm.hexagon.V6.vsubhq.128B - 3, // llvm.hexagon.V6.vsubhsat - 3, // llvm.hexagon.V6.vsubhsat.128B - 3, // llvm.hexagon.V6.vsubhsat.dv - 3, // llvm.hexagon.V6.vsubhsat.dv.128B - 3, // llvm.hexagon.V6.vsubhw - 3, // llvm.hexagon.V6.vsubhw.128B - 3, // llvm.hexagon.V6.vsububh - 3, // llvm.hexagon.V6.vsububh.128B - 3, // llvm.hexagon.V6.vsububsat - 3, // llvm.hexagon.V6.vsububsat.128B - 3, // llvm.hexagon.V6.vsububsat.dv - 3, // llvm.hexagon.V6.vsububsat.dv.128B - 3, // llvm.hexagon.V6.vsubuhsat - 3, // llvm.hexagon.V6.vsubuhsat.128B - 3, // llvm.hexagon.V6.vsubuhsat.dv - 3, // llvm.hexagon.V6.vsubuhsat.dv.128B - 3, // llvm.hexagon.V6.vsubuhw - 3, // llvm.hexagon.V6.vsubuhw.128B - 3, // llvm.hexagon.V6.vsubw - 3, // llvm.hexagon.V6.vsubw.128B - 3, // llvm.hexagon.V6.vsubw.dv - 3, // llvm.hexagon.V6.vsubw.dv.128B - 3, // llvm.hexagon.V6.vsubwnq - 3, // llvm.hexagon.V6.vsubwnq.128B - 3, // llvm.hexagon.V6.vsubwq - 3, // llvm.hexagon.V6.vsubwq.128B - 3, // llvm.hexagon.V6.vsubwsat - 3, // llvm.hexagon.V6.vsubwsat.128B - 3, // llvm.hexagon.V6.vsubwsat.dv - 3, // llvm.hexagon.V6.vsubwsat.dv.128B - 3, // llvm.hexagon.V6.vswap - 3, // llvm.hexagon.V6.vswap.128B - 3, // llvm.hexagon.V6.vtmpyb - 3, // llvm.hexagon.V6.vtmpyb.128B - 3, // llvm.hexagon.V6.vtmpyb.acc - 3, // llvm.hexagon.V6.vtmpyb.acc.128B - 3, // llvm.hexagon.V6.vtmpybus - 3, // llvm.hexagon.V6.vtmpybus.128B - 3, // llvm.hexagon.V6.vtmpybus.acc - 3, // llvm.hexagon.V6.vtmpybus.acc.128B - 3, // llvm.hexagon.V6.vtmpyhb - 3, // llvm.hexagon.V6.vtmpyhb.128B - 3, // llvm.hexagon.V6.vtmpyhb.acc - 3, // llvm.hexagon.V6.vtmpyhb.acc.128B - 3, // llvm.hexagon.V6.vunpackb - 3, // llvm.hexagon.V6.vunpackb.128B - 3, // llvm.hexagon.V6.vunpackh - 3, // llvm.hexagon.V6.vunpackh.128B - 3, // llvm.hexagon.V6.vunpackob - 3, // llvm.hexagon.V6.vunpackob.128B - 3, // llvm.hexagon.V6.vunpackoh - 3, // llvm.hexagon.V6.vunpackoh.128B - 3, // llvm.hexagon.V6.vunpackub - 3, // llvm.hexagon.V6.vunpackub.128B - 3, // llvm.hexagon.V6.vunpackuh - 3, // llvm.hexagon.V6.vunpackuh.128B - 3, // llvm.hexagon.V6.vxor - 3, // llvm.hexagon.V6.vxor.128B - 3, // llvm.hexagon.V6.vzb - 3, // llvm.hexagon.V6.vzb.128B - 3, // llvm.hexagon.V6.vzh - 3, // llvm.hexagon.V6.vzh.128B - 11, // llvm.hexagon.brev.ldb - 11, // llvm.hexagon.brev.ldd - 11, // llvm.hexagon.brev.ldh - 11, // llvm.hexagon.brev.ldub - 11, // llvm.hexagon.brev.lduh - 11, // llvm.hexagon.brev.ldw - 11, // llvm.hexagon.brev.stb - 11, // llvm.hexagon.brev.std - 11, // llvm.hexagon.brev.sth - 11, // llvm.hexagon.brev.sthhi - 11, // llvm.hexagon.brev.stw - 11, // llvm.hexagon.circ.ldb - 11, // llvm.hexagon.circ.ldd - 11, // llvm.hexagon.circ.ldh - 11, // llvm.hexagon.circ.ldub - 11, // llvm.hexagon.circ.lduh - 11, // llvm.hexagon.circ.ldw - 11, // llvm.hexagon.circ.stb - 11, // llvm.hexagon.circ.std - 11, // llvm.hexagon.circ.sth - 11, // llvm.hexagon.circ.sthhi - 11, // llvm.hexagon.circ.stw - 11, // llvm.hexagon.mm256i.vaddw - 2, // llvm.hexagon.prefetch - 2, // llvm.mips.absq.s.ph - 2, // llvm.mips.absq.s.qb - 2, // llvm.mips.absq.s.w - 3, // llvm.mips.add.a.b - 3, // llvm.mips.add.a.d - 3, // llvm.mips.add.a.h - 3, // llvm.mips.add.a.w - 3, // llvm.mips.addq.ph - 3, // llvm.mips.addq.s.ph - 2, // llvm.mips.addq.s.w - 3, // llvm.mips.addqh.ph - 3, // llvm.mips.addqh.r.ph - 3, // llvm.mips.addqh.r.w - 3, // llvm.mips.addqh.w - 3, // llvm.mips.adds.a.b - 3, // llvm.mips.adds.a.d - 3, // llvm.mips.adds.a.h - 3, // llvm.mips.adds.a.w - 3, // llvm.mips.adds.s.b - 3, // llvm.mips.adds.s.d - 3, // llvm.mips.adds.s.h - 3, // llvm.mips.adds.s.w - 3, // llvm.mips.adds.u.b - 3, // llvm.mips.adds.u.d - 3, // llvm.mips.adds.u.h - 3, // llvm.mips.adds.u.w - 2, // llvm.mips.addsc - 2, // llvm.mips.addu.ph - 3, // llvm.mips.addu.qb - 2, // llvm.mips.addu.s.ph - 3, // llvm.mips.addu.s.qb - 3, // llvm.mips.adduh.qb - 3, // llvm.mips.adduh.r.qb - 3, // llvm.mips.addv.b - 3, // llvm.mips.addv.d - 3, // llvm.mips.addv.h - 3, // llvm.mips.addv.w - 3, // llvm.mips.addvi.b - 3, // llvm.mips.addvi.d - 3, // llvm.mips.addvi.h - 3, // llvm.mips.addvi.w - 2, // llvm.mips.addwc - 3, // llvm.mips.and.v - 3, // llvm.mips.andi.b - 3, // llvm.mips.append - 3, // llvm.mips.asub.s.b - 3, // llvm.mips.asub.s.d - 3, // llvm.mips.asub.s.h - 3, // llvm.mips.asub.s.w - 3, // llvm.mips.asub.u.b - 3, // llvm.mips.asub.u.d - 3, // llvm.mips.asub.u.h - 3, // llvm.mips.asub.u.w - 3, // llvm.mips.ave.s.b - 3, // llvm.mips.ave.s.d - 3, // llvm.mips.ave.s.h - 3, // llvm.mips.ave.s.w - 3, // llvm.mips.ave.u.b - 3, // llvm.mips.ave.u.d - 3, // llvm.mips.ave.u.h - 3, // llvm.mips.ave.u.w - 3, // llvm.mips.aver.s.b - 3, // llvm.mips.aver.s.d - 3, // llvm.mips.aver.s.h - 3, // llvm.mips.aver.s.w - 3, // llvm.mips.aver.u.b - 3, // llvm.mips.aver.u.d - 3, // llvm.mips.aver.u.h - 3, // llvm.mips.aver.u.w - 3, // llvm.mips.balign - 3, // llvm.mips.bclr.b - 3, // llvm.mips.bclr.d - 3, // llvm.mips.bclr.h - 3, // llvm.mips.bclr.w - 3, // llvm.mips.bclri.b - 3, // llvm.mips.bclri.d - 3, // llvm.mips.bclri.h - 3, // llvm.mips.bclri.w - 3, // llvm.mips.binsl.b - 3, // llvm.mips.binsl.d - 3, // llvm.mips.binsl.h - 3, // llvm.mips.binsl.w - 3, // llvm.mips.binsli.b - 3, // llvm.mips.binsli.d - 3, // llvm.mips.binsli.h - 3, // llvm.mips.binsli.w - 3, // llvm.mips.binsr.b - 3, // llvm.mips.binsr.d - 3, // llvm.mips.binsr.h - 3, // llvm.mips.binsr.w - 3, // llvm.mips.binsri.b - 3, // llvm.mips.binsri.d - 3, // llvm.mips.binsri.h - 3, // llvm.mips.binsri.w - 3, // llvm.mips.bitrev - 3, // llvm.mips.bmnz.v - 3, // llvm.mips.bmnzi.b - 3, // llvm.mips.bmz.v - 3, // llvm.mips.bmzi.b - 3, // llvm.mips.bneg.b - 3, // llvm.mips.bneg.d - 3, // llvm.mips.bneg.h - 3, // llvm.mips.bneg.w - 3, // llvm.mips.bnegi.b - 3, // llvm.mips.bnegi.d - 3, // llvm.mips.bnegi.h - 3, // llvm.mips.bnegi.w - 3, // llvm.mips.bnz.b - 3, // llvm.mips.bnz.d - 3, // llvm.mips.bnz.h - 3, // llvm.mips.bnz.v - 3, // llvm.mips.bnz.w - 6, // llvm.mips.bposge32 - 3, // llvm.mips.bsel.v - 3, // llvm.mips.bseli.b - 3, // llvm.mips.bset.b - 3, // llvm.mips.bset.d - 3, // llvm.mips.bset.h - 3, // llvm.mips.bset.w - 3, // llvm.mips.bseti.b - 3, // llvm.mips.bseti.d - 3, // llvm.mips.bseti.h - 3, // llvm.mips.bseti.w - 3, // llvm.mips.bz.b - 3, // llvm.mips.bz.d - 3, // llvm.mips.bz.h - 3, // llvm.mips.bz.v - 3, // llvm.mips.bz.w - 3, // llvm.mips.ceq.b - 3, // llvm.mips.ceq.d - 3, // llvm.mips.ceq.h - 3, // llvm.mips.ceq.w - 3, // llvm.mips.ceqi.b - 3, // llvm.mips.ceqi.d - 3, // llvm.mips.ceqi.h - 3, // llvm.mips.ceqi.w - 2, // llvm.mips.cfcmsa - 3, // llvm.mips.cle.s.b - 3, // llvm.mips.cle.s.d - 3, // llvm.mips.cle.s.h - 3, // llvm.mips.cle.s.w - 3, // llvm.mips.cle.u.b - 3, // llvm.mips.cle.u.d - 3, // llvm.mips.cle.u.h - 3, // llvm.mips.cle.u.w - 3, // llvm.mips.clei.s.b - 3, // llvm.mips.clei.s.d - 3, // llvm.mips.clei.s.h - 3, // llvm.mips.clei.s.w - 3, // llvm.mips.clei.u.b - 3, // llvm.mips.clei.u.d - 3, // llvm.mips.clei.u.h - 3, // llvm.mips.clei.u.w - 3, // llvm.mips.clt.s.b - 3, // llvm.mips.clt.s.d - 3, // llvm.mips.clt.s.h - 3, // llvm.mips.clt.s.w - 3, // llvm.mips.clt.u.b - 3, // llvm.mips.clt.u.d - 3, // llvm.mips.clt.u.h - 3, // llvm.mips.clt.u.w - 3, // llvm.mips.clti.s.b - 3, // llvm.mips.clti.s.d - 3, // llvm.mips.clti.s.h - 3, // llvm.mips.clti.s.w - 3, // llvm.mips.clti.u.b - 3, // llvm.mips.clti.u.d - 3, // llvm.mips.clti.u.h - 3, // llvm.mips.clti.u.w - 2, // llvm.mips.cmp.eq.ph - 2, // llvm.mips.cmp.le.ph - 2, // llvm.mips.cmp.lt.ph - 2, // llvm.mips.cmpgdu.eq.qb - 2, // llvm.mips.cmpgdu.le.qb - 2, // llvm.mips.cmpgdu.lt.qb - 2, // llvm.mips.cmpgu.eq.qb - 2, // llvm.mips.cmpgu.le.qb - 2, // llvm.mips.cmpgu.lt.qb - 2, // llvm.mips.cmpu.eq.qb - 2, // llvm.mips.cmpu.le.qb - 2, // llvm.mips.cmpu.lt.qb - 3, // llvm.mips.copy.s.b - 3, // llvm.mips.copy.s.d - 3, // llvm.mips.copy.s.h - 3, // llvm.mips.copy.s.w - 3, // llvm.mips.copy.u.b - 3, // llvm.mips.copy.u.d - 3, // llvm.mips.copy.u.h - 3, // llvm.mips.copy.u.w - 2, // llvm.mips.ctcmsa - 3, // llvm.mips.div.s.b - 3, // llvm.mips.div.s.d - 3, // llvm.mips.div.s.h - 3, // llvm.mips.div.s.w - 3, // llvm.mips.div.u.b - 3, // llvm.mips.div.u.d - 3, // llvm.mips.div.u.h - 3, // llvm.mips.div.u.w - 3, // llvm.mips.dlsa - 3, // llvm.mips.dotp.s.d - 3, // llvm.mips.dotp.s.h - 3, // llvm.mips.dotp.s.w - 3, // llvm.mips.dotp.u.d - 3, // llvm.mips.dotp.u.h - 3, // llvm.mips.dotp.u.w - 3, // llvm.mips.dpa.w.ph - 3, // llvm.mips.dpadd.s.d - 3, // llvm.mips.dpadd.s.h - 3, // llvm.mips.dpadd.s.w - 3, // llvm.mips.dpadd.u.d - 3, // llvm.mips.dpadd.u.h - 3, // llvm.mips.dpadd.u.w - 2, // llvm.mips.dpaq.s.w.ph - 2, // llvm.mips.dpaq.sa.l.w - 2, // llvm.mips.dpaqx.s.w.ph - 2, // llvm.mips.dpaqx.sa.w.ph - 3, // llvm.mips.dpau.h.qbl - 3, // llvm.mips.dpau.h.qbr - 3, // llvm.mips.dpax.w.ph - 3, // llvm.mips.dps.w.ph - 2, // llvm.mips.dpsq.s.w.ph - 2, // llvm.mips.dpsq.sa.l.w - 2, // llvm.mips.dpsqx.s.w.ph - 2, // llvm.mips.dpsqx.sa.w.ph - 3, // llvm.mips.dpsu.h.qbl - 3, // llvm.mips.dpsu.h.qbr - 3, // llvm.mips.dpsub.s.d - 3, // llvm.mips.dpsub.s.h - 3, // llvm.mips.dpsub.s.w - 3, // llvm.mips.dpsub.u.d - 3, // llvm.mips.dpsub.u.h - 3, // llvm.mips.dpsub.u.w - 3, // llvm.mips.dpsx.w.ph - 2, // llvm.mips.extp - 2, // llvm.mips.extpdp - 2, // llvm.mips.extr.r.w - 2, // llvm.mips.extr.rs.w - 2, // llvm.mips.extr.s.h - 2, // llvm.mips.extr.w - 3, // llvm.mips.fadd.d - 3, // llvm.mips.fadd.w - 3, // llvm.mips.fcaf.d - 3, // llvm.mips.fcaf.w - 3, // llvm.mips.fceq.d - 3, // llvm.mips.fceq.w - 3, // llvm.mips.fclass.d - 3, // llvm.mips.fclass.w - 3, // llvm.mips.fcle.d - 3, // llvm.mips.fcle.w - 3, // llvm.mips.fclt.d - 3, // llvm.mips.fclt.w - 3, // llvm.mips.fcne.d - 3, // llvm.mips.fcne.w - 3, // llvm.mips.fcor.d - 3, // llvm.mips.fcor.w - 3, // llvm.mips.fcueq.d - 3, // llvm.mips.fcueq.w - 3, // llvm.mips.fcule.d - 3, // llvm.mips.fcule.w - 3, // llvm.mips.fcult.d - 3, // llvm.mips.fcult.w - 3, // llvm.mips.fcun.d - 3, // llvm.mips.fcun.w - 3, // llvm.mips.fcune.d - 3, // llvm.mips.fcune.w - 3, // llvm.mips.fdiv.d - 3, // llvm.mips.fdiv.w - 3, // llvm.mips.fexdo.h - 3, // llvm.mips.fexdo.w - 3, // llvm.mips.fexp2.d - 3, // llvm.mips.fexp2.w - 3, // llvm.mips.fexupl.d - 3, // llvm.mips.fexupl.w - 3, // llvm.mips.fexupr.d - 3, // llvm.mips.fexupr.w - 3, // llvm.mips.ffint.s.d - 3, // llvm.mips.ffint.s.w - 3, // llvm.mips.ffint.u.d - 3, // llvm.mips.ffint.u.w - 3, // llvm.mips.ffql.d - 3, // llvm.mips.ffql.w - 3, // llvm.mips.ffqr.d - 3, // llvm.mips.ffqr.w - 3, // llvm.mips.fill.b - 3, // llvm.mips.fill.d - 3, // llvm.mips.fill.h - 3, // llvm.mips.fill.w - 3, // llvm.mips.flog2.d - 3, // llvm.mips.flog2.w - 3, // llvm.mips.fmadd.d - 3, // llvm.mips.fmadd.w - 3, // llvm.mips.fmax.a.d - 3, // llvm.mips.fmax.a.w - 3, // llvm.mips.fmax.d - 3, // llvm.mips.fmax.w - 3, // llvm.mips.fmin.a.d - 3, // llvm.mips.fmin.a.w - 3, // llvm.mips.fmin.d - 3, // llvm.mips.fmin.w - 3, // llvm.mips.fmsub.d - 3, // llvm.mips.fmsub.w - 3, // llvm.mips.fmul.d - 3, // llvm.mips.fmul.w - 3, // llvm.mips.frcp.d - 3, // llvm.mips.frcp.w - 3, // llvm.mips.frint.d - 3, // llvm.mips.frint.w - 3, // llvm.mips.frsqrt.d - 3, // llvm.mips.frsqrt.w - 3, // llvm.mips.fsaf.d - 3, // llvm.mips.fsaf.w - 3, // llvm.mips.fseq.d - 3, // llvm.mips.fseq.w - 3, // llvm.mips.fsle.d - 3, // llvm.mips.fsle.w - 3, // llvm.mips.fslt.d - 3, // llvm.mips.fslt.w - 3, // llvm.mips.fsne.d - 3, // llvm.mips.fsne.w - 3, // llvm.mips.fsor.d - 3, // llvm.mips.fsor.w - 3, // llvm.mips.fsqrt.d - 3, // llvm.mips.fsqrt.w - 3, // llvm.mips.fsub.d - 3, // llvm.mips.fsub.w - 3, // llvm.mips.fsueq.d - 3, // llvm.mips.fsueq.w - 3, // llvm.mips.fsule.d - 3, // llvm.mips.fsule.w - 3, // llvm.mips.fsult.d - 3, // llvm.mips.fsult.w - 3, // llvm.mips.fsun.d - 3, // llvm.mips.fsun.w - 3, // llvm.mips.fsune.d - 3, // llvm.mips.fsune.w - 3, // llvm.mips.ftint.s.d - 3, // llvm.mips.ftint.s.w - 3, // llvm.mips.ftint.u.d - 3, // llvm.mips.ftint.u.w - 3, // llvm.mips.ftq.h - 3, // llvm.mips.ftq.w - 3, // llvm.mips.ftrunc.s.d - 3, // llvm.mips.ftrunc.s.w - 3, // llvm.mips.ftrunc.u.d - 3, // llvm.mips.ftrunc.u.w - 3, // llvm.mips.hadd.s.d - 3, // llvm.mips.hadd.s.h - 3, // llvm.mips.hadd.s.w - 3, // llvm.mips.hadd.u.d - 3, // llvm.mips.hadd.u.h - 3, // llvm.mips.hadd.u.w - 3, // llvm.mips.hsub.s.d - 3, // llvm.mips.hsub.s.h - 3, // llvm.mips.hsub.s.w - 3, // llvm.mips.hsub.u.d - 3, // llvm.mips.hsub.u.h - 3, // llvm.mips.hsub.u.w - 3, // llvm.mips.ilvev.b - 3, // llvm.mips.ilvev.d - 3, // llvm.mips.ilvev.h - 3, // llvm.mips.ilvev.w - 3, // llvm.mips.ilvl.b - 3, // llvm.mips.ilvl.d - 3, // llvm.mips.ilvl.h - 3, // llvm.mips.ilvl.w - 3, // llvm.mips.ilvod.b - 3, // llvm.mips.ilvod.d - 3, // llvm.mips.ilvod.h - 3, // llvm.mips.ilvod.w - 3, // llvm.mips.ilvr.b - 3, // llvm.mips.ilvr.d - 3, // llvm.mips.ilvr.h - 3, // llvm.mips.ilvr.w - 3, // llvm.mips.insert.b - 3, // llvm.mips.insert.d - 3, // llvm.mips.insert.h - 3, // llvm.mips.insert.w - 6, // llvm.mips.insv - 3, // llvm.mips.insve.b - 3, // llvm.mips.insve.d - 3, // llvm.mips.insve.h - 3, // llvm.mips.insve.w - 1, // llvm.mips.lbux - 1, // llvm.mips.ld.b - 1, // llvm.mips.ld.d - 1, // llvm.mips.ld.h - 1, // llvm.mips.ld.w - 3, // llvm.mips.ldi.b - 3, // llvm.mips.ldi.d - 3, // llvm.mips.ldi.h - 3, // llvm.mips.ldi.w - 1, // llvm.mips.lhx - 3, // llvm.mips.lsa - 1, // llvm.mips.lwx - 3, // llvm.mips.madd - 3, // llvm.mips.madd.q.h - 3, // llvm.mips.madd.q.w - 3, // llvm.mips.maddr.q.h - 3, // llvm.mips.maddr.q.w - 3, // llvm.mips.maddu - 3, // llvm.mips.maddv.b - 3, // llvm.mips.maddv.d - 3, // llvm.mips.maddv.h - 3, // llvm.mips.maddv.w - 2, // llvm.mips.maq.s.w.phl - 2, // llvm.mips.maq.s.w.phr - 2, // llvm.mips.maq.sa.w.phl - 2, // llvm.mips.maq.sa.w.phr - 3, // llvm.mips.max.a.b - 3, // llvm.mips.max.a.d - 3, // llvm.mips.max.a.h - 3, // llvm.mips.max.a.w - 3, // llvm.mips.max.s.b - 3, // llvm.mips.max.s.d - 3, // llvm.mips.max.s.h - 3, // llvm.mips.max.s.w - 3, // llvm.mips.max.u.b - 3, // llvm.mips.max.u.d - 3, // llvm.mips.max.u.h - 3, // llvm.mips.max.u.w - 3, // llvm.mips.maxi.s.b - 3, // llvm.mips.maxi.s.d - 3, // llvm.mips.maxi.s.h - 3, // llvm.mips.maxi.s.w - 3, // llvm.mips.maxi.u.b - 3, // llvm.mips.maxi.u.d - 3, // llvm.mips.maxi.u.h - 3, // llvm.mips.maxi.u.w - 3, // llvm.mips.min.a.b - 3, // llvm.mips.min.a.d - 3, // llvm.mips.min.a.h - 3, // llvm.mips.min.a.w - 3, // llvm.mips.min.s.b - 3, // llvm.mips.min.s.d - 3, // llvm.mips.min.s.h - 3, // llvm.mips.min.s.w - 3, // llvm.mips.min.u.b - 3, // llvm.mips.min.u.d - 3, // llvm.mips.min.u.h - 3, // llvm.mips.min.u.w - 3, // llvm.mips.mini.s.b - 3, // llvm.mips.mini.s.d - 3, // llvm.mips.mini.s.h - 3, // llvm.mips.mini.s.w - 3, // llvm.mips.mini.u.b - 3, // llvm.mips.mini.u.d - 3, // llvm.mips.mini.u.h - 3, // llvm.mips.mini.u.w - 3, // llvm.mips.mod.s.b - 3, // llvm.mips.mod.s.d - 3, // llvm.mips.mod.s.h - 3, // llvm.mips.mod.s.w - 3, // llvm.mips.mod.u.b - 3, // llvm.mips.mod.u.d - 3, // llvm.mips.mod.u.h - 3, // llvm.mips.mod.u.w - 3, // llvm.mips.modsub - 3, // llvm.mips.move.v - 3, // llvm.mips.msub - 3, // llvm.mips.msub.q.h - 3, // llvm.mips.msub.q.w - 3, // llvm.mips.msubr.q.h - 3, // llvm.mips.msubr.q.w - 3, // llvm.mips.msubu - 3, // llvm.mips.msubv.b - 3, // llvm.mips.msubv.d - 3, // llvm.mips.msubv.h - 3, // llvm.mips.msubv.w - 2, // llvm.mips.mthlip - 2, // llvm.mips.mul.ph - 3, // llvm.mips.mul.q.h - 3, // llvm.mips.mul.q.w - 2, // llvm.mips.mul.s.ph - 2, // llvm.mips.muleq.s.w.phl - 2, // llvm.mips.muleq.s.w.phr - 2, // llvm.mips.muleu.s.ph.qbl - 2, // llvm.mips.muleu.s.ph.qbr - 2, // llvm.mips.mulq.rs.ph - 2, // llvm.mips.mulq.rs.w - 2, // llvm.mips.mulq.s.ph - 2, // llvm.mips.mulq.s.w - 3, // llvm.mips.mulr.q.h - 3, // llvm.mips.mulr.q.w - 3, // llvm.mips.mulsa.w.ph - 2, // llvm.mips.mulsaq.s.w.ph - 3, // llvm.mips.mult - 3, // llvm.mips.multu - 3, // llvm.mips.mulv.b - 3, // llvm.mips.mulv.d - 3, // llvm.mips.mulv.h - 3, // llvm.mips.mulv.w - 3, // llvm.mips.nloc.b - 3, // llvm.mips.nloc.d - 3, // llvm.mips.nloc.h - 3, // llvm.mips.nloc.w - 3, // llvm.mips.nlzc.b - 3, // llvm.mips.nlzc.d - 3, // llvm.mips.nlzc.h - 3, // llvm.mips.nlzc.w - 3, // llvm.mips.nor.v - 3, // llvm.mips.nori.b - 3, // llvm.mips.or.v - 3, // llvm.mips.ori.b - 3, // llvm.mips.packrl.ph - 3, // llvm.mips.pckev.b - 3, // llvm.mips.pckev.d - 3, // llvm.mips.pckev.h - 3, // llvm.mips.pckev.w - 3, // llvm.mips.pckod.b - 3, // llvm.mips.pckod.d - 3, // llvm.mips.pckod.h - 3, // llvm.mips.pckod.w - 3, // llvm.mips.pcnt.b - 3, // llvm.mips.pcnt.d - 3, // llvm.mips.pcnt.h - 3, // llvm.mips.pcnt.w - 6, // llvm.mips.pick.ph - 6, // llvm.mips.pick.qb - 3, // llvm.mips.preceq.w.phl - 3, // llvm.mips.preceq.w.phr - 3, // llvm.mips.precequ.ph.qbl - 3, // llvm.mips.precequ.ph.qbla - 3, // llvm.mips.precequ.ph.qbr - 3, // llvm.mips.precequ.ph.qbra - 3, // llvm.mips.preceu.ph.qbl - 3, // llvm.mips.preceu.ph.qbla - 3, // llvm.mips.preceu.ph.qbr - 3, // llvm.mips.preceu.ph.qbra - 2, // llvm.mips.precr.qb.ph - 3, // llvm.mips.precr.sra.ph.w - 3, // llvm.mips.precr.sra.r.ph.w - 3, // llvm.mips.precrq.ph.w - 3, // llvm.mips.precrq.qb.ph - 2, // llvm.mips.precrq.rs.ph.w - 2, // llvm.mips.precrqu.s.qb.ph - 3, // llvm.mips.prepend - 3, // llvm.mips.raddu.w.qb - 6, // llvm.mips.rddsp - 3, // llvm.mips.repl.ph - 3, // llvm.mips.repl.qb - 3, // llvm.mips.sat.s.b - 3, // llvm.mips.sat.s.d - 3, // llvm.mips.sat.s.h - 3, // llvm.mips.sat.s.w - 3, // llvm.mips.sat.u.b - 3, // llvm.mips.sat.u.d - 3, // llvm.mips.sat.u.h - 3, // llvm.mips.sat.u.w - 3, // llvm.mips.shf.b - 3, // llvm.mips.shf.h - 3, // llvm.mips.shf.w - 3, // llvm.mips.shilo - 2, // llvm.mips.shll.ph - 2, // llvm.mips.shll.qb - 2, // llvm.mips.shll.s.ph - 2, // llvm.mips.shll.s.w - 3, // llvm.mips.shra.ph - 3, // llvm.mips.shra.qb - 3, // llvm.mips.shra.r.ph - 3, // llvm.mips.shra.r.qb - 3, // llvm.mips.shra.r.w - 3, // llvm.mips.shrl.ph - 3, // llvm.mips.shrl.qb - 3, // llvm.mips.sld.b - 3, // llvm.mips.sld.d - 3, // llvm.mips.sld.h - 3, // llvm.mips.sld.w - 3, // llvm.mips.sldi.b - 3, // llvm.mips.sldi.d - 3, // llvm.mips.sldi.h - 3, // llvm.mips.sldi.w - 3, // llvm.mips.sll.b - 3, // llvm.mips.sll.d - 3, // llvm.mips.sll.h - 3, // llvm.mips.sll.w - 3, // llvm.mips.slli.b - 3, // llvm.mips.slli.d - 3, // llvm.mips.slli.h - 3, // llvm.mips.slli.w - 3, // llvm.mips.splat.b - 3, // llvm.mips.splat.d - 3, // llvm.mips.splat.h - 3, // llvm.mips.splat.w - 3, // llvm.mips.splati.b - 3, // llvm.mips.splati.d - 3, // llvm.mips.splati.h - 3, // llvm.mips.splati.w - 3, // llvm.mips.sra.b - 3, // llvm.mips.sra.d - 3, // llvm.mips.sra.h - 3, // llvm.mips.sra.w - 3, // llvm.mips.srai.b - 3, // llvm.mips.srai.d - 3, // llvm.mips.srai.h - 3, // llvm.mips.srai.w - 3, // llvm.mips.srar.b - 3, // llvm.mips.srar.d - 3, // llvm.mips.srar.h - 3, // llvm.mips.srar.w - 3, // llvm.mips.srari.b - 3, // llvm.mips.srari.d - 3, // llvm.mips.srari.h - 3, // llvm.mips.srari.w - 3, // llvm.mips.srl.b - 3, // llvm.mips.srl.d - 3, // llvm.mips.srl.h - 3, // llvm.mips.srl.w - 3, // llvm.mips.srli.b - 3, // llvm.mips.srli.d - 3, // llvm.mips.srli.h - 3, // llvm.mips.srli.w - 3, // llvm.mips.srlr.b - 3, // llvm.mips.srlr.d - 3, // llvm.mips.srlr.h - 3, // llvm.mips.srlr.w - 3, // llvm.mips.srlri.b - 3, // llvm.mips.srlri.d - 3, // llvm.mips.srlri.h - 3, // llvm.mips.srlri.w - 11, // llvm.mips.st.b - 11, // llvm.mips.st.d - 11, // llvm.mips.st.h - 11, // llvm.mips.st.w - 3, // llvm.mips.subq.ph - 3, // llvm.mips.subq.s.ph - 2, // llvm.mips.subq.s.w - 3, // llvm.mips.subqh.ph - 3, // llvm.mips.subqh.r.ph - 3, // llvm.mips.subqh.r.w - 3, // llvm.mips.subqh.w - 3, // llvm.mips.subs.s.b - 3, // llvm.mips.subs.s.d - 3, // llvm.mips.subs.s.h - 3, // llvm.mips.subs.s.w - 3, // llvm.mips.subs.u.b - 3, // llvm.mips.subs.u.d - 3, // llvm.mips.subs.u.h - 3, // llvm.mips.subs.u.w - 3, // llvm.mips.subsus.u.b - 3, // llvm.mips.subsus.u.d - 3, // llvm.mips.subsus.u.h - 3, // llvm.mips.subsus.u.w - 3, // llvm.mips.subsuu.s.b - 3, // llvm.mips.subsuu.s.d - 3, // llvm.mips.subsuu.s.h - 3, // llvm.mips.subsuu.s.w - 2, // llvm.mips.subu.ph - 3, // llvm.mips.subu.qb - 2, // llvm.mips.subu.s.ph - 3, // llvm.mips.subu.s.qb - 3, // llvm.mips.subuh.qb - 3, // llvm.mips.subuh.r.qb - 3, // llvm.mips.subv.b - 3, // llvm.mips.subv.d - 3, // llvm.mips.subv.h - 3, // llvm.mips.subv.w - 3, // llvm.mips.subvi.b - 3, // llvm.mips.subvi.d - 3, // llvm.mips.subvi.h - 3, // llvm.mips.subvi.w - 3, // llvm.mips.vshf.b - 3, // llvm.mips.vshf.d - 3, // llvm.mips.vshf.h - 3, // llvm.mips.vshf.w - 2, // llvm.mips.wrdsp - 3, // llvm.mips.xor.v - 3, // llvm.mips.xori.b - 3, // llvm.nvvm.abs.i - 3, // llvm.nvvm.abs.ll - 3, // llvm.nvvm.add.rm.d - 3, // llvm.nvvm.add.rm.f - 3, // llvm.nvvm.add.rm.ftz.f - 3, // llvm.nvvm.add.rn.d - 3, // llvm.nvvm.add.rn.f - 3, // llvm.nvvm.add.rn.ftz.f - 3, // llvm.nvvm.add.rp.d - 3, // llvm.nvvm.add.rp.f - 3, // llvm.nvvm.add.rp.ftz.f - 3, // llvm.nvvm.add.rz.d - 3, // llvm.nvvm.add.rz.f - 3, // llvm.nvvm.add.rz.ftz.f - 8, // llvm.nvvm.atomic.load.add.f32 - 8, // llvm.nvvm.atomic.load.dec.32 - 8, // llvm.nvvm.atomic.load.inc.32 - 20, // llvm.nvvm.bar.sync - 20, // llvm.nvvm.barrier0 - 20, // llvm.nvvm.barrier0.and - 20, // llvm.nvvm.barrier0.or - 20, // llvm.nvvm.barrier0.popc - 3, // llvm.nvvm.bitcast.d2ll - 3, // llvm.nvvm.bitcast.f2i - 3, // llvm.nvvm.bitcast.i2f - 3, // llvm.nvvm.bitcast.ll2d - 3, // llvm.nvvm.brev32 - 3, // llvm.nvvm.brev64 - 3, // llvm.nvvm.ceil.d - 3, // llvm.nvvm.ceil.f - 3, // llvm.nvvm.ceil.ftz.f - 3, // llvm.nvvm.clz.i - 3, // llvm.nvvm.clz.ll - 2, // llvm.nvvm.compiler.error - 2, // llvm.nvvm.compiler.warn - 3, // llvm.nvvm.cos.approx.f - 3, // llvm.nvvm.cos.approx.ftz.f - 3, // llvm.nvvm.d2f.rm - 3, // llvm.nvvm.d2f.rm.ftz - 3, // llvm.nvvm.d2f.rn - 3, // llvm.nvvm.d2f.rn.ftz - 3, // llvm.nvvm.d2f.rp - 3, // llvm.nvvm.d2f.rp.ftz - 3, // llvm.nvvm.d2f.rz - 3, // llvm.nvvm.d2f.rz.ftz - 3, // llvm.nvvm.d2i.hi - 3, // llvm.nvvm.d2i.lo - 3, // llvm.nvvm.d2i.rm - 3, // llvm.nvvm.d2i.rn - 3, // llvm.nvvm.d2i.rp - 3, // llvm.nvvm.d2i.rz - 3, // llvm.nvvm.d2ll.rm - 3, // llvm.nvvm.d2ll.rn - 3, // llvm.nvvm.d2ll.rp - 3, // llvm.nvvm.d2ll.rz - 3, // llvm.nvvm.d2ui.rm - 3, // llvm.nvvm.d2ui.rn - 3, // llvm.nvvm.d2ui.rp - 3, // llvm.nvvm.d2ui.rz - 3, // llvm.nvvm.d2ull.rm - 3, // llvm.nvvm.d2ull.rn - 3, // llvm.nvvm.d2ull.rp - 3, // llvm.nvvm.d2ull.rz - 3, // llvm.nvvm.div.approx.f - 3, // llvm.nvvm.div.approx.ftz.f - 3, // llvm.nvvm.div.rm.d - 3, // llvm.nvvm.div.rm.f - 3, // llvm.nvvm.div.rm.ftz.f - 3, // llvm.nvvm.div.rn.d - 3, // llvm.nvvm.div.rn.f - 3, // llvm.nvvm.div.rn.ftz.f - 3, // llvm.nvvm.div.rp.d - 3, // llvm.nvvm.div.rp.f - 3, // llvm.nvvm.div.rp.ftz.f - 3, // llvm.nvvm.div.rz.d - 3, // llvm.nvvm.div.rz.f - 3, // llvm.nvvm.div.rz.ftz.f - 3, // llvm.nvvm.ex2.approx.d - 3, // llvm.nvvm.ex2.approx.f - 3, // llvm.nvvm.ex2.approx.ftz.f - 3, // llvm.nvvm.f2h.rn - 3, // llvm.nvvm.f2h.rn.ftz - 3, // llvm.nvvm.f2i.rm - 3, // llvm.nvvm.f2i.rm.ftz - 3, // llvm.nvvm.f2i.rn - 3, // llvm.nvvm.f2i.rn.ftz - 3, // llvm.nvvm.f2i.rp - 3, // llvm.nvvm.f2i.rp.ftz - 3, // llvm.nvvm.f2i.rz - 3, // llvm.nvvm.f2i.rz.ftz - 3, // llvm.nvvm.f2ll.rm - 3, // llvm.nvvm.f2ll.rm.ftz - 3, // llvm.nvvm.f2ll.rn - 3, // llvm.nvvm.f2ll.rn.ftz - 3, // llvm.nvvm.f2ll.rp - 3, // llvm.nvvm.f2ll.rp.ftz - 3, // llvm.nvvm.f2ll.rz - 3, // llvm.nvvm.f2ll.rz.ftz - 3, // llvm.nvvm.f2ui.rm - 3, // llvm.nvvm.f2ui.rm.ftz - 3, // llvm.nvvm.f2ui.rn - 3, // llvm.nvvm.f2ui.rn.ftz - 3, // llvm.nvvm.f2ui.rp - 3, // llvm.nvvm.f2ui.rp.ftz - 3, // llvm.nvvm.f2ui.rz - 3, // llvm.nvvm.f2ui.rz.ftz - 3, // llvm.nvvm.f2ull.rm - 3, // llvm.nvvm.f2ull.rm.ftz - 3, // llvm.nvvm.f2ull.rn - 3, // llvm.nvvm.f2ull.rn.ftz - 3, // llvm.nvvm.f2ull.rp - 3, // llvm.nvvm.f2ull.rp.ftz - 3, // llvm.nvvm.f2ull.rz - 3, // llvm.nvvm.f2ull.rz.ftz - 3, // llvm.nvvm.fabs.d - 3, // llvm.nvvm.fabs.f - 3, // llvm.nvvm.fabs.ftz.f - 3, // llvm.nvvm.floor.d - 3, // llvm.nvvm.floor.f - 3, // llvm.nvvm.floor.ftz.f - 3, // llvm.nvvm.fma.rm.d - 3, // llvm.nvvm.fma.rm.f - 3, // llvm.nvvm.fma.rm.ftz.f - 3, // llvm.nvvm.fma.rn.d - 3, // llvm.nvvm.fma.rn.f - 3, // llvm.nvvm.fma.rn.ftz.f - 3, // llvm.nvvm.fma.rp.d - 3, // llvm.nvvm.fma.rp.f - 3, // llvm.nvvm.fma.rp.ftz.f - 3, // llvm.nvvm.fma.rz.d - 3, // llvm.nvvm.fma.rz.f - 3, // llvm.nvvm.fma.rz.ftz.f - 3, // llvm.nvvm.fmax.d - 3, // llvm.nvvm.fmax.f - 3, // llvm.nvvm.fmax.ftz.f - 3, // llvm.nvvm.fmin.d - 3, // llvm.nvvm.fmin.f - 3, // llvm.nvvm.fmin.ftz.f - 3, // llvm.nvvm.h2f - 3, // llvm.nvvm.i2d.rm - 3, // llvm.nvvm.i2d.rn - 3, // llvm.nvvm.i2d.rp - 3, // llvm.nvvm.i2d.rz - 3, // llvm.nvvm.i2f.rm - 3, // llvm.nvvm.i2f.rn - 3, // llvm.nvvm.i2f.rp - 3, // llvm.nvvm.i2f.rz - 3, // llvm.nvvm.isspacep.const - 3, // llvm.nvvm.isspacep.global - 3, // llvm.nvvm.isspacep.local - 3, // llvm.nvvm.isspacep.shared - 3, // llvm.nvvm.istypep.sampler - 3, // llvm.nvvm.istypep.surface - 3, // llvm.nvvm.istypep.texture - 22, // llvm.nvvm.ldg.global.f - 22, // llvm.nvvm.ldg.global.i - 22, // llvm.nvvm.ldg.global.p - 22, // llvm.nvvm.ldu.global.f - 22, // llvm.nvvm.ldu.global.i - 22, // llvm.nvvm.ldu.global.p - 3, // llvm.nvvm.lg2.approx.d - 3, // llvm.nvvm.lg2.approx.f - 3, // llvm.nvvm.lg2.approx.ftz.f - 3, // llvm.nvvm.ll2d.rm - 3, // llvm.nvvm.ll2d.rn - 3, // llvm.nvvm.ll2d.rp - 3, // llvm.nvvm.ll2d.rz - 3, // llvm.nvvm.ll2f.rm - 3, // llvm.nvvm.ll2f.rn - 3, // llvm.nvvm.ll2f.rp - 3, // llvm.nvvm.ll2f.rz - 3, // llvm.nvvm.lohi.i2d - 3, // llvm.nvvm.max.i - 3, // llvm.nvvm.max.ll - 3, // llvm.nvvm.max.ui - 3, // llvm.nvvm.max.ull - 2, // llvm.nvvm.membar.cta - 2, // llvm.nvvm.membar.gl - 2, // llvm.nvvm.membar.sys - 3, // llvm.nvvm.min.i - 3, // llvm.nvvm.min.ll - 3, // llvm.nvvm.min.ui - 3, // llvm.nvvm.min.ull - 3, // llvm.nvvm.move.double - 3, // llvm.nvvm.move.float - 3, // llvm.nvvm.move.i16 - 3, // llvm.nvvm.move.i32 - 3, // llvm.nvvm.move.i64 - 23, // llvm.nvvm.move.ptr - 3, // llvm.nvvm.mul.rm.d - 3, // llvm.nvvm.mul.rm.f - 3, // llvm.nvvm.mul.rm.ftz.f - 3, // llvm.nvvm.mul.rn.d - 3, // llvm.nvvm.mul.rn.f - 3, // llvm.nvvm.mul.rn.ftz.f - 3, // llvm.nvvm.mul.rp.d - 3, // llvm.nvvm.mul.rp.f - 3, // llvm.nvvm.mul.rp.ftz.f - 3, // llvm.nvvm.mul.rz.d - 3, // llvm.nvvm.mul.rz.f - 3, // llvm.nvvm.mul.rz.ftz.f - 3, // llvm.nvvm.mul24.i - 3, // llvm.nvvm.mul24.ui - 3, // llvm.nvvm.mulhi.i - 3, // llvm.nvvm.mulhi.ll - 3, // llvm.nvvm.mulhi.ui - 3, // llvm.nvvm.mulhi.ull - 3, // llvm.nvvm.popc.i - 3, // llvm.nvvm.popc.ll - 3, // llvm.nvvm.prmt - 3, // llvm.nvvm.ptr.constant.to.gen - 3, // llvm.nvvm.ptr.gen.to.constant - 3, // llvm.nvvm.ptr.gen.to.global - 3, // llvm.nvvm.ptr.gen.to.local - 3, // llvm.nvvm.ptr.gen.to.param - 3, // llvm.nvvm.ptr.gen.to.shared - 3, // llvm.nvvm.ptr.global.to.gen - 3, // llvm.nvvm.ptr.local.to.gen - 3, // llvm.nvvm.ptr.shared.to.gen - 3, // llvm.nvvm.rcp.approx.ftz.d - 3, // llvm.nvvm.rcp.rm.d - 3, // llvm.nvvm.rcp.rm.f - 3, // llvm.nvvm.rcp.rm.ftz.f - 3, // llvm.nvvm.rcp.rn.d - 3, // llvm.nvvm.rcp.rn.f - 3, // llvm.nvvm.rcp.rn.ftz.f - 3, // llvm.nvvm.rcp.rp.d - 3, // llvm.nvvm.rcp.rp.f - 3, // llvm.nvvm.rcp.rp.ftz.f - 3, // llvm.nvvm.rcp.rz.d - 3, // llvm.nvvm.rcp.rz.f - 3, // llvm.nvvm.rcp.rz.ftz.f - 3, // llvm.nvvm.read.ptx.sreg.clock - 3, // llvm.nvvm.read.ptx.sreg.clock64 - 3, // llvm.nvvm.read.ptx.sreg.ctaid.w - 3, // llvm.nvvm.read.ptx.sreg.ctaid.x - 3, // llvm.nvvm.read.ptx.sreg.ctaid.y - 3, // llvm.nvvm.read.ptx.sreg.ctaid.z - 3, // llvm.nvvm.read.ptx.sreg.envreg0 - 3, // llvm.nvvm.read.ptx.sreg.envreg1 - 3, // llvm.nvvm.read.ptx.sreg.envreg10 - 3, // llvm.nvvm.read.ptx.sreg.envreg11 - 3, // llvm.nvvm.read.ptx.sreg.envreg12 - 3, // llvm.nvvm.read.ptx.sreg.envreg13 - 3, // llvm.nvvm.read.ptx.sreg.envreg14 - 3, // llvm.nvvm.read.ptx.sreg.envreg15 - 3, // llvm.nvvm.read.ptx.sreg.envreg16 - 3, // llvm.nvvm.read.ptx.sreg.envreg17 - 3, // llvm.nvvm.read.ptx.sreg.envreg18 - 3, // llvm.nvvm.read.ptx.sreg.envreg19 - 3, // llvm.nvvm.read.ptx.sreg.envreg2 - 3, // llvm.nvvm.read.ptx.sreg.envreg20 - 3, // llvm.nvvm.read.ptx.sreg.envreg21 - 3, // llvm.nvvm.read.ptx.sreg.envreg22 - 3, // llvm.nvvm.read.ptx.sreg.envreg23 - 3, // llvm.nvvm.read.ptx.sreg.envreg24 - 3, // llvm.nvvm.read.ptx.sreg.envreg25 - 3, // llvm.nvvm.read.ptx.sreg.envreg26 - 3, // llvm.nvvm.read.ptx.sreg.envreg27 - 3, // llvm.nvvm.read.ptx.sreg.envreg28 - 3, // llvm.nvvm.read.ptx.sreg.envreg29 - 3, // llvm.nvvm.read.ptx.sreg.envreg3 - 3, // llvm.nvvm.read.ptx.sreg.envreg30 - 3, // llvm.nvvm.read.ptx.sreg.envreg31 - 3, // llvm.nvvm.read.ptx.sreg.envreg4 - 3, // llvm.nvvm.read.ptx.sreg.envreg5 - 3, // llvm.nvvm.read.ptx.sreg.envreg6 - 3, // llvm.nvvm.read.ptx.sreg.envreg7 - 3, // llvm.nvvm.read.ptx.sreg.envreg8 - 3, // llvm.nvvm.read.ptx.sreg.envreg9 - 3, // llvm.nvvm.read.ptx.sreg.gridid - 3, // llvm.nvvm.read.ptx.sreg.laneid - 3, // llvm.nvvm.read.ptx.sreg.lanemask.eq - 3, // llvm.nvvm.read.ptx.sreg.lanemask.ge - 3, // llvm.nvvm.read.ptx.sreg.lanemask.gt - 3, // llvm.nvvm.read.ptx.sreg.lanemask.le - 3, // llvm.nvvm.read.ptx.sreg.lanemask.lt - 3, // llvm.nvvm.read.ptx.sreg.nctaid.w - 3, // llvm.nvvm.read.ptx.sreg.nctaid.x - 3, // llvm.nvvm.read.ptx.sreg.nctaid.y - 3, // llvm.nvvm.read.ptx.sreg.nctaid.z - 3, // llvm.nvvm.read.ptx.sreg.nsmid - 3, // llvm.nvvm.read.ptx.sreg.ntid.w - 3, // llvm.nvvm.read.ptx.sreg.ntid.x - 3, // llvm.nvvm.read.ptx.sreg.ntid.y - 3, // llvm.nvvm.read.ptx.sreg.ntid.z - 3, // llvm.nvvm.read.ptx.sreg.nwarpid - 3, // llvm.nvvm.read.ptx.sreg.pm0 - 3, // llvm.nvvm.read.ptx.sreg.pm1 - 3, // llvm.nvvm.read.ptx.sreg.pm2 - 3, // llvm.nvvm.read.ptx.sreg.pm3 - 3, // llvm.nvvm.read.ptx.sreg.smid - 3, // llvm.nvvm.read.ptx.sreg.tid.w - 3, // llvm.nvvm.read.ptx.sreg.tid.x - 3, // llvm.nvvm.read.ptx.sreg.tid.y - 3, // llvm.nvvm.read.ptx.sreg.tid.z - 3, // llvm.nvvm.read.ptx.sreg.warpid - 3, // llvm.nvvm.read.ptx.sreg.warpsize - 3, // llvm.nvvm.reflect - 3, // llvm.nvvm.rotate.b32 - 3, // llvm.nvvm.rotate.b64 - 3, // llvm.nvvm.rotate.right.b64 - 3, // llvm.nvvm.round.d - 3, // llvm.nvvm.round.f - 3, // llvm.nvvm.round.ftz.f - 3, // llvm.nvvm.rsqrt.approx.d - 3, // llvm.nvvm.rsqrt.approx.f - 3, // llvm.nvvm.rsqrt.approx.ftz.f - 3, // llvm.nvvm.sad.i - 3, // llvm.nvvm.sad.ui - 3, // llvm.nvvm.saturate.d - 3, // llvm.nvvm.saturate.f - 3, // llvm.nvvm.saturate.ftz.f - 19, // llvm.nvvm.shfl.bfly.f32 - 19, // llvm.nvvm.shfl.bfly.i32 - 19, // llvm.nvvm.shfl.down.f32 - 19, // llvm.nvvm.shfl.down.i32 - 19, // llvm.nvvm.shfl.idx.f32 - 19, // llvm.nvvm.shfl.idx.i32 - 19, // llvm.nvvm.shfl.up.f32 - 19, // llvm.nvvm.shfl.up.i32 - 3, // llvm.nvvm.sin.approx.f - 3, // llvm.nvvm.sin.approx.ftz.f - 3, // llvm.nvvm.sqrt.approx.f - 3, // llvm.nvvm.sqrt.approx.ftz.f - 3, // llvm.nvvm.sqrt.f - 3, // llvm.nvvm.sqrt.rm.d - 3, // llvm.nvvm.sqrt.rm.f - 3, // llvm.nvvm.sqrt.rm.ftz.f - 3, // llvm.nvvm.sqrt.rn.d - 3, // llvm.nvvm.sqrt.rn.f - 3, // llvm.nvvm.sqrt.rn.ftz.f - 3, // llvm.nvvm.sqrt.rp.d - 3, // llvm.nvvm.sqrt.rp.f - 3, // llvm.nvvm.sqrt.rp.ftz.f - 3, // llvm.nvvm.sqrt.rz.d - 3, // llvm.nvvm.sqrt.rz.f - 3, // llvm.nvvm.sqrt.rz.ftz.f - 2, // llvm.nvvm.suld.1d.array.i16.clamp - 2, // llvm.nvvm.suld.1d.array.i16.trap - 2, // llvm.nvvm.suld.1d.array.i16.zero - 2, // llvm.nvvm.suld.1d.array.i32.clamp - 2, // llvm.nvvm.suld.1d.array.i32.trap - 2, // llvm.nvvm.suld.1d.array.i32.zero - 2, // llvm.nvvm.suld.1d.array.i64.clamp - 2, // llvm.nvvm.suld.1d.array.i64.trap - 2, // llvm.nvvm.suld.1d.array.i64.zero - 2, // llvm.nvvm.suld.1d.array.i8.clamp - 2, // llvm.nvvm.suld.1d.array.i8.trap - 2, // llvm.nvvm.suld.1d.array.i8.zero - 2, // llvm.nvvm.suld.1d.array.v2i16.clamp - 2, // llvm.nvvm.suld.1d.array.v2i16.trap - 2, // llvm.nvvm.suld.1d.array.v2i16.zero - 2, // llvm.nvvm.suld.1d.array.v2i32.clamp - 2, // llvm.nvvm.suld.1d.array.v2i32.trap - 2, // llvm.nvvm.suld.1d.array.v2i32.zero - 2, // llvm.nvvm.suld.1d.array.v2i64.clamp - 2, // llvm.nvvm.suld.1d.array.v2i64.trap - 2, // llvm.nvvm.suld.1d.array.v2i64.zero - 2, // llvm.nvvm.suld.1d.array.v2i8.clamp - 2, // llvm.nvvm.suld.1d.array.v2i8.trap - 2, // llvm.nvvm.suld.1d.array.v2i8.zero - 2, // llvm.nvvm.suld.1d.array.v4i16.clamp - 2, // llvm.nvvm.suld.1d.array.v4i16.trap - 2, // llvm.nvvm.suld.1d.array.v4i16.zero - 2, // llvm.nvvm.suld.1d.array.v4i32.clamp - 2, // llvm.nvvm.suld.1d.array.v4i32.trap - 2, // llvm.nvvm.suld.1d.array.v4i32.zero - 2, // llvm.nvvm.suld.1d.array.v4i8.clamp - 2, // llvm.nvvm.suld.1d.array.v4i8.trap - 2, // llvm.nvvm.suld.1d.array.v4i8.zero - 2, // llvm.nvvm.suld.1d.i16.clamp - 2, // llvm.nvvm.suld.1d.i16.trap - 2, // llvm.nvvm.suld.1d.i16.zero - 2, // llvm.nvvm.suld.1d.i32.clamp - 2, // llvm.nvvm.suld.1d.i32.trap - 2, // llvm.nvvm.suld.1d.i32.zero - 2, // llvm.nvvm.suld.1d.i64.clamp - 2, // llvm.nvvm.suld.1d.i64.trap - 2, // llvm.nvvm.suld.1d.i64.zero - 2, // llvm.nvvm.suld.1d.i8.clamp - 2, // llvm.nvvm.suld.1d.i8.trap - 2, // llvm.nvvm.suld.1d.i8.zero - 2, // llvm.nvvm.suld.1d.v2i16.clamp - 2, // llvm.nvvm.suld.1d.v2i16.trap - 2, // llvm.nvvm.suld.1d.v2i16.zero - 2, // llvm.nvvm.suld.1d.v2i32.clamp - 2, // llvm.nvvm.suld.1d.v2i32.trap - 2, // llvm.nvvm.suld.1d.v2i32.zero - 2, // llvm.nvvm.suld.1d.v2i64.clamp - 2, // llvm.nvvm.suld.1d.v2i64.trap - 2, // llvm.nvvm.suld.1d.v2i64.zero - 2, // llvm.nvvm.suld.1d.v2i8.clamp - 2, // llvm.nvvm.suld.1d.v2i8.trap - 2, // llvm.nvvm.suld.1d.v2i8.zero - 2, // llvm.nvvm.suld.1d.v4i16.clamp - 2, // llvm.nvvm.suld.1d.v4i16.trap - 2, // llvm.nvvm.suld.1d.v4i16.zero - 2, // llvm.nvvm.suld.1d.v4i32.clamp - 2, // llvm.nvvm.suld.1d.v4i32.trap - 2, // llvm.nvvm.suld.1d.v4i32.zero - 2, // llvm.nvvm.suld.1d.v4i8.clamp - 2, // llvm.nvvm.suld.1d.v4i8.trap - 2, // llvm.nvvm.suld.1d.v4i8.zero - 2, // llvm.nvvm.suld.2d.array.i16.clamp - 2, // llvm.nvvm.suld.2d.array.i16.trap - 2, // llvm.nvvm.suld.2d.array.i16.zero - 2, // llvm.nvvm.suld.2d.array.i32.clamp - 2, // llvm.nvvm.suld.2d.array.i32.trap - 2, // llvm.nvvm.suld.2d.array.i32.zero - 2, // llvm.nvvm.suld.2d.array.i64.clamp - 2, // llvm.nvvm.suld.2d.array.i64.trap - 2, // llvm.nvvm.suld.2d.array.i64.zero - 2, // llvm.nvvm.suld.2d.array.i8.clamp - 2, // llvm.nvvm.suld.2d.array.i8.trap - 2, // llvm.nvvm.suld.2d.array.i8.zero - 2, // llvm.nvvm.suld.2d.array.v2i16.clamp - 2, // llvm.nvvm.suld.2d.array.v2i16.trap - 2, // llvm.nvvm.suld.2d.array.v2i16.zero - 2, // llvm.nvvm.suld.2d.array.v2i32.clamp - 2, // llvm.nvvm.suld.2d.array.v2i32.trap - 2, // llvm.nvvm.suld.2d.array.v2i32.zero - 2, // llvm.nvvm.suld.2d.array.v2i64.clamp - 2, // llvm.nvvm.suld.2d.array.v2i64.trap - 2, // llvm.nvvm.suld.2d.array.v2i64.zero - 2, // llvm.nvvm.suld.2d.array.v2i8.clamp - 2, // llvm.nvvm.suld.2d.array.v2i8.trap - 2, // llvm.nvvm.suld.2d.array.v2i8.zero - 2, // llvm.nvvm.suld.2d.array.v4i16.clamp - 2, // llvm.nvvm.suld.2d.array.v4i16.trap - 2, // llvm.nvvm.suld.2d.array.v4i16.zero - 2, // llvm.nvvm.suld.2d.array.v4i32.clamp - 2, // llvm.nvvm.suld.2d.array.v4i32.trap - 2, // llvm.nvvm.suld.2d.array.v4i32.zero - 2, // llvm.nvvm.suld.2d.array.v4i8.clamp - 2, // llvm.nvvm.suld.2d.array.v4i8.trap - 2, // llvm.nvvm.suld.2d.array.v4i8.zero - 2, // llvm.nvvm.suld.2d.i16.clamp - 2, // llvm.nvvm.suld.2d.i16.trap - 2, // llvm.nvvm.suld.2d.i16.zero - 2, // llvm.nvvm.suld.2d.i32.clamp - 2, // llvm.nvvm.suld.2d.i32.trap - 2, // llvm.nvvm.suld.2d.i32.zero - 2, // llvm.nvvm.suld.2d.i64.clamp - 2, // llvm.nvvm.suld.2d.i64.trap - 2, // llvm.nvvm.suld.2d.i64.zero - 2, // llvm.nvvm.suld.2d.i8.clamp - 2, // llvm.nvvm.suld.2d.i8.trap - 2, // llvm.nvvm.suld.2d.i8.zero - 2, // llvm.nvvm.suld.2d.v2i16.clamp - 2, // llvm.nvvm.suld.2d.v2i16.trap - 2, // llvm.nvvm.suld.2d.v2i16.zero - 2, // llvm.nvvm.suld.2d.v2i32.clamp - 2, // llvm.nvvm.suld.2d.v2i32.trap - 2, // llvm.nvvm.suld.2d.v2i32.zero - 2, // llvm.nvvm.suld.2d.v2i64.clamp - 2, // llvm.nvvm.suld.2d.v2i64.trap - 2, // llvm.nvvm.suld.2d.v2i64.zero - 2, // llvm.nvvm.suld.2d.v2i8.clamp - 2, // llvm.nvvm.suld.2d.v2i8.trap - 2, // llvm.nvvm.suld.2d.v2i8.zero - 2, // llvm.nvvm.suld.2d.v4i16.clamp - 2, // llvm.nvvm.suld.2d.v4i16.trap - 2, // llvm.nvvm.suld.2d.v4i16.zero - 2, // llvm.nvvm.suld.2d.v4i32.clamp - 2, // llvm.nvvm.suld.2d.v4i32.trap - 2, // llvm.nvvm.suld.2d.v4i32.zero - 2, // llvm.nvvm.suld.2d.v4i8.clamp - 2, // llvm.nvvm.suld.2d.v4i8.trap - 2, // llvm.nvvm.suld.2d.v4i8.zero - 2, // llvm.nvvm.suld.3d.i16.clamp - 2, // llvm.nvvm.suld.3d.i16.trap - 2, // llvm.nvvm.suld.3d.i16.zero - 2, // llvm.nvvm.suld.3d.i32.clamp - 2, // llvm.nvvm.suld.3d.i32.trap - 2, // llvm.nvvm.suld.3d.i32.zero - 2, // llvm.nvvm.suld.3d.i64.clamp - 2, // llvm.nvvm.suld.3d.i64.trap - 2, // llvm.nvvm.suld.3d.i64.zero - 2, // llvm.nvvm.suld.3d.i8.clamp - 2, // llvm.nvvm.suld.3d.i8.trap - 2, // llvm.nvvm.suld.3d.i8.zero - 2, // llvm.nvvm.suld.3d.v2i16.clamp - 2, // llvm.nvvm.suld.3d.v2i16.trap - 2, // llvm.nvvm.suld.3d.v2i16.zero - 2, // llvm.nvvm.suld.3d.v2i32.clamp - 2, // llvm.nvvm.suld.3d.v2i32.trap - 2, // llvm.nvvm.suld.3d.v2i32.zero - 2, // llvm.nvvm.suld.3d.v2i64.clamp - 2, // llvm.nvvm.suld.3d.v2i64.trap - 2, // llvm.nvvm.suld.3d.v2i64.zero - 2, // llvm.nvvm.suld.3d.v2i8.clamp - 2, // llvm.nvvm.suld.3d.v2i8.trap - 2, // llvm.nvvm.suld.3d.v2i8.zero - 2, // llvm.nvvm.suld.3d.v4i16.clamp - 2, // llvm.nvvm.suld.3d.v4i16.trap - 2, // llvm.nvvm.suld.3d.v4i16.zero - 2, // llvm.nvvm.suld.3d.v4i32.clamp - 2, // llvm.nvvm.suld.3d.v4i32.trap - 2, // llvm.nvvm.suld.3d.v4i32.zero - 2, // llvm.nvvm.suld.3d.v4i8.clamp - 2, // llvm.nvvm.suld.3d.v4i8.trap - 2, // llvm.nvvm.suld.3d.v4i8.zero - 3, // llvm.nvvm.suq.array.size - 3, // llvm.nvvm.suq.channel.data.type - 3, // llvm.nvvm.suq.channel.order - 3, // llvm.nvvm.suq.depth - 3, // llvm.nvvm.suq.height - 3, // llvm.nvvm.suq.width - 2, // llvm.nvvm.sust.b.1d.array.i16.clamp - 2, // llvm.nvvm.sust.b.1d.array.i16.trap - 2, // llvm.nvvm.sust.b.1d.array.i16.zero - 2, // llvm.nvvm.sust.b.1d.array.i32.clamp - 2, // llvm.nvvm.sust.b.1d.array.i32.trap - 2, // llvm.nvvm.sust.b.1d.array.i32.zero - 2, // llvm.nvvm.sust.b.1d.array.i64.clamp - 2, // llvm.nvvm.sust.b.1d.array.i64.trap - 2, // llvm.nvvm.sust.b.1d.array.i64.zero - 2, // llvm.nvvm.sust.b.1d.array.i8.clamp - 2, // llvm.nvvm.sust.b.1d.array.i8.trap - 2, // llvm.nvvm.sust.b.1d.array.i8.zero - 2, // llvm.nvvm.sust.b.1d.array.v2i16.clamp - 2, // llvm.nvvm.sust.b.1d.array.v2i16.trap - 2, // llvm.nvvm.sust.b.1d.array.v2i16.zero - 2, // llvm.nvvm.sust.b.1d.array.v2i32.clamp - 2, // llvm.nvvm.sust.b.1d.array.v2i32.trap - 2, // llvm.nvvm.sust.b.1d.array.v2i32.zero - 2, // llvm.nvvm.sust.b.1d.array.v2i64.clamp - 2, // llvm.nvvm.sust.b.1d.array.v2i64.trap - 2, // llvm.nvvm.sust.b.1d.array.v2i64.zero - 2, // llvm.nvvm.sust.b.1d.array.v2i8.clamp - 2, // llvm.nvvm.sust.b.1d.array.v2i8.trap - 2, // llvm.nvvm.sust.b.1d.array.v2i8.zero - 2, // llvm.nvvm.sust.b.1d.array.v4i16.clamp - 2, // llvm.nvvm.sust.b.1d.array.v4i16.trap - 2, // llvm.nvvm.sust.b.1d.array.v4i16.zero - 2, // llvm.nvvm.sust.b.1d.array.v4i32.clamp - 2, // llvm.nvvm.sust.b.1d.array.v4i32.trap - 2, // llvm.nvvm.sust.b.1d.array.v4i32.zero - 2, // llvm.nvvm.sust.b.1d.array.v4i8.clamp - 2, // llvm.nvvm.sust.b.1d.array.v4i8.trap - 2, // llvm.nvvm.sust.b.1d.array.v4i8.zero - 2, // llvm.nvvm.sust.b.1d.i16.clamp - 2, // llvm.nvvm.sust.b.1d.i16.trap - 2, // llvm.nvvm.sust.b.1d.i16.zero - 2, // llvm.nvvm.sust.b.1d.i32.clamp - 2, // llvm.nvvm.sust.b.1d.i32.trap - 2, // llvm.nvvm.sust.b.1d.i32.zero - 2, // llvm.nvvm.sust.b.1d.i64.clamp - 2, // llvm.nvvm.sust.b.1d.i64.trap - 2, // llvm.nvvm.sust.b.1d.i64.zero - 2, // llvm.nvvm.sust.b.1d.i8.clamp - 2, // llvm.nvvm.sust.b.1d.i8.trap - 2, // llvm.nvvm.sust.b.1d.i8.zero - 2, // llvm.nvvm.sust.b.1d.v2i16.clamp - 2, // llvm.nvvm.sust.b.1d.v2i16.trap - 2, // llvm.nvvm.sust.b.1d.v2i16.zero - 2, // llvm.nvvm.sust.b.1d.v2i32.clamp - 2, // llvm.nvvm.sust.b.1d.v2i32.trap - 2, // llvm.nvvm.sust.b.1d.v2i32.zero - 2, // llvm.nvvm.sust.b.1d.v2i64.clamp - 2, // llvm.nvvm.sust.b.1d.v2i64.trap - 2, // llvm.nvvm.sust.b.1d.v2i64.zero - 2, // llvm.nvvm.sust.b.1d.v2i8.clamp - 2, // llvm.nvvm.sust.b.1d.v2i8.trap - 2, // llvm.nvvm.sust.b.1d.v2i8.zero - 2, // llvm.nvvm.sust.b.1d.v4i16.clamp - 2, // llvm.nvvm.sust.b.1d.v4i16.trap - 2, // llvm.nvvm.sust.b.1d.v4i16.zero - 2, // llvm.nvvm.sust.b.1d.v4i32.clamp - 2, // llvm.nvvm.sust.b.1d.v4i32.trap - 2, // llvm.nvvm.sust.b.1d.v4i32.zero - 2, // llvm.nvvm.sust.b.1d.v4i8.clamp - 2, // llvm.nvvm.sust.b.1d.v4i8.trap - 2, // llvm.nvvm.sust.b.1d.v4i8.zero - 2, // llvm.nvvm.sust.b.2d.array.i16.clamp - 2, // llvm.nvvm.sust.b.2d.array.i16.trap - 2, // llvm.nvvm.sust.b.2d.array.i16.zero - 2, // llvm.nvvm.sust.b.2d.array.i32.clamp - 2, // llvm.nvvm.sust.b.2d.array.i32.trap - 2, // llvm.nvvm.sust.b.2d.array.i32.zero - 2, // llvm.nvvm.sust.b.2d.array.i64.clamp - 2, // llvm.nvvm.sust.b.2d.array.i64.trap - 2, // llvm.nvvm.sust.b.2d.array.i64.zero - 2, // llvm.nvvm.sust.b.2d.array.i8.clamp - 2, // llvm.nvvm.sust.b.2d.array.i8.trap - 2, // llvm.nvvm.sust.b.2d.array.i8.zero - 2, // llvm.nvvm.sust.b.2d.array.v2i16.clamp - 2, // llvm.nvvm.sust.b.2d.array.v2i16.trap - 2, // llvm.nvvm.sust.b.2d.array.v2i16.zero - 2, // llvm.nvvm.sust.b.2d.array.v2i32.clamp - 2, // llvm.nvvm.sust.b.2d.array.v2i32.trap - 2, // llvm.nvvm.sust.b.2d.array.v2i32.zero - 2, // llvm.nvvm.sust.b.2d.array.v2i64.clamp - 2, // llvm.nvvm.sust.b.2d.array.v2i64.trap - 2, // llvm.nvvm.sust.b.2d.array.v2i64.zero - 2, // llvm.nvvm.sust.b.2d.array.v2i8.clamp - 2, // llvm.nvvm.sust.b.2d.array.v2i8.trap - 2, // llvm.nvvm.sust.b.2d.array.v2i8.zero - 2, // llvm.nvvm.sust.b.2d.array.v4i16.clamp - 2, // llvm.nvvm.sust.b.2d.array.v4i16.trap - 2, // llvm.nvvm.sust.b.2d.array.v4i16.zero - 2, // llvm.nvvm.sust.b.2d.array.v4i32.clamp - 2, // llvm.nvvm.sust.b.2d.array.v4i32.trap - 2, // llvm.nvvm.sust.b.2d.array.v4i32.zero - 2, // llvm.nvvm.sust.b.2d.array.v4i8.clamp - 2, // llvm.nvvm.sust.b.2d.array.v4i8.trap - 2, // llvm.nvvm.sust.b.2d.array.v4i8.zero - 2, // llvm.nvvm.sust.b.2d.i16.clamp - 2, // llvm.nvvm.sust.b.2d.i16.trap - 2, // llvm.nvvm.sust.b.2d.i16.zero - 2, // llvm.nvvm.sust.b.2d.i32.clamp - 2, // llvm.nvvm.sust.b.2d.i32.trap - 2, // llvm.nvvm.sust.b.2d.i32.zero - 2, // llvm.nvvm.sust.b.2d.i64.clamp - 2, // llvm.nvvm.sust.b.2d.i64.trap - 2, // llvm.nvvm.sust.b.2d.i64.zero - 2, // llvm.nvvm.sust.b.2d.i8.clamp - 2, // llvm.nvvm.sust.b.2d.i8.trap - 2, // llvm.nvvm.sust.b.2d.i8.zero - 2, // llvm.nvvm.sust.b.2d.v2i16.clamp - 2, // llvm.nvvm.sust.b.2d.v2i16.trap - 2, // llvm.nvvm.sust.b.2d.v2i16.zero - 2, // llvm.nvvm.sust.b.2d.v2i32.clamp - 2, // llvm.nvvm.sust.b.2d.v2i32.trap - 2, // llvm.nvvm.sust.b.2d.v2i32.zero - 2, // llvm.nvvm.sust.b.2d.v2i64.clamp - 2, // llvm.nvvm.sust.b.2d.v2i64.trap - 2, // llvm.nvvm.sust.b.2d.v2i64.zero - 2, // llvm.nvvm.sust.b.2d.v2i8.clamp - 2, // llvm.nvvm.sust.b.2d.v2i8.trap - 2, // llvm.nvvm.sust.b.2d.v2i8.zero - 2, // llvm.nvvm.sust.b.2d.v4i16.clamp - 2, // llvm.nvvm.sust.b.2d.v4i16.trap - 2, // llvm.nvvm.sust.b.2d.v4i16.zero - 2, // llvm.nvvm.sust.b.2d.v4i32.clamp - 2, // llvm.nvvm.sust.b.2d.v4i32.trap - 2, // llvm.nvvm.sust.b.2d.v4i32.zero - 2, // llvm.nvvm.sust.b.2d.v4i8.clamp - 2, // llvm.nvvm.sust.b.2d.v4i8.trap - 2, // llvm.nvvm.sust.b.2d.v4i8.zero - 2, // llvm.nvvm.sust.b.3d.i16.clamp - 2, // llvm.nvvm.sust.b.3d.i16.trap - 2, // llvm.nvvm.sust.b.3d.i16.zero - 2, // llvm.nvvm.sust.b.3d.i32.clamp - 2, // llvm.nvvm.sust.b.3d.i32.trap - 2, // llvm.nvvm.sust.b.3d.i32.zero - 2, // llvm.nvvm.sust.b.3d.i64.clamp - 2, // llvm.nvvm.sust.b.3d.i64.trap - 2, // llvm.nvvm.sust.b.3d.i64.zero - 2, // llvm.nvvm.sust.b.3d.i8.clamp - 2, // llvm.nvvm.sust.b.3d.i8.trap - 2, // llvm.nvvm.sust.b.3d.i8.zero - 2, // llvm.nvvm.sust.b.3d.v2i16.clamp - 2, // llvm.nvvm.sust.b.3d.v2i16.trap - 2, // llvm.nvvm.sust.b.3d.v2i16.zero - 2, // llvm.nvvm.sust.b.3d.v2i32.clamp - 2, // llvm.nvvm.sust.b.3d.v2i32.trap - 2, // llvm.nvvm.sust.b.3d.v2i32.zero - 2, // llvm.nvvm.sust.b.3d.v2i64.clamp - 2, // llvm.nvvm.sust.b.3d.v2i64.trap - 2, // llvm.nvvm.sust.b.3d.v2i64.zero - 2, // llvm.nvvm.sust.b.3d.v2i8.clamp - 2, // llvm.nvvm.sust.b.3d.v2i8.trap - 2, // llvm.nvvm.sust.b.3d.v2i8.zero - 2, // llvm.nvvm.sust.b.3d.v4i16.clamp - 2, // llvm.nvvm.sust.b.3d.v4i16.trap - 2, // llvm.nvvm.sust.b.3d.v4i16.zero - 2, // llvm.nvvm.sust.b.3d.v4i32.clamp - 2, // llvm.nvvm.sust.b.3d.v4i32.trap - 2, // llvm.nvvm.sust.b.3d.v4i32.zero - 2, // llvm.nvvm.sust.b.3d.v4i8.clamp - 2, // llvm.nvvm.sust.b.3d.v4i8.trap - 2, // llvm.nvvm.sust.b.3d.v4i8.zero - 2, // llvm.nvvm.sust.p.1d.array.i16.trap - 2, // llvm.nvvm.sust.p.1d.array.i32.trap - 2, // llvm.nvvm.sust.p.1d.array.i8.trap - 2, // llvm.nvvm.sust.p.1d.array.v2i16.trap - 2, // llvm.nvvm.sust.p.1d.array.v2i32.trap - 2, // llvm.nvvm.sust.p.1d.array.v2i8.trap - 2, // llvm.nvvm.sust.p.1d.array.v4i16.trap - 2, // llvm.nvvm.sust.p.1d.array.v4i32.trap - 2, // llvm.nvvm.sust.p.1d.array.v4i8.trap - 2, // llvm.nvvm.sust.p.1d.i16.trap - 2, // llvm.nvvm.sust.p.1d.i32.trap - 2, // llvm.nvvm.sust.p.1d.i8.trap - 2, // llvm.nvvm.sust.p.1d.v2i16.trap - 2, // llvm.nvvm.sust.p.1d.v2i32.trap - 2, // llvm.nvvm.sust.p.1d.v2i8.trap - 2, // llvm.nvvm.sust.p.1d.v4i16.trap - 2, // llvm.nvvm.sust.p.1d.v4i32.trap - 2, // llvm.nvvm.sust.p.1d.v4i8.trap - 2, // llvm.nvvm.sust.p.2d.array.i16.trap - 2, // llvm.nvvm.sust.p.2d.array.i32.trap - 2, // llvm.nvvm.sust.p.2d.array.i8.trap - 2, // llvm.nvvm.sust.p.2d.array.v2i16.trap - 2, // llvm.nvvm.sust.p.2d.array.v2i32.trap - 2, // llvm.nvvm.sust.p.2d.array.v2i8.trap - 2, // llvm.nvvm.sust.p.2d.array.v4i16.trap - 2, // llvm.nvvm.sust.p.2d.array.v4i32.trap - 2, // llvm.nvvm.sust.p.2d.array.v4i8.trap - 2, // llvm.nvvm.sust.p.2d.i16.trap - 2, // llvm.nvvm.sust.p.2d.i32.trap - 2, // llvm.nvvm.sust.p.2d.i8.trap - 2, // llvm.nvvm.sust.p.2d.v2i16.trap - 2, // llvm.nvvm.sust.p.2d.v2i32.trap - 2, // llvm.nvvm.sust.p.2d.v2i8.trap - 2, // llvm.nvvm.sust.p.2d.v4i16.trap - 2, // llvm.nvvm.sust.p.2d.v4i32.trap - 2, // llvm.nvvm.sust.p.2d.v4i8.trap - 2, // llvm.nvvm.sust.p.3d.i16.trap - 2, // llvm.nvvm.sust.p.3d.i32.trap - 2, // llvm.nvvm.sust.p.3d.i8.trap - 2, // llvm.nvvm.sust.p.3d.v2i16.trap - 2, // llvm.nvvm.sust.p.3d.v2i32.trap - 2, // llvm.nvvm.sust.p.3d.v2i8.trap - 2, // llvm.nvvm.sust.p.3d.v4i16.trap - 2, // llvm.nvvm.sust.p.3d.v4i32.trap - 2, // llvm.nvvm.sust.p.3d.v4i8.trap - 3, // llvm.nvvm.swap.lo.hi.b64 - 2, // llvm.nvvm.tex.1d.array.grad.v4f32.f32 - 2, // llvm.nvvm.tex.1d.array.grad.v4s32.f32 - 2, // llvm.nvvm.tex.1d.array.grad.v4u32.f32 - 2, // llvm.nvvm.tex.1d.array.level.v4f32.f32 - 2, // llvm.nvvm.tex.1d.array.level.v4s32.f32 - 2, // llvm.nvvm.tex.1d.array.level.v4u32.f32 - 2, // llvm.nvvm.tex.1d.array.v4f32.f32 - 2, // llvm.nvvm.tex.1d.array.v4f32.s32 - 2, // llvm.nvvm.tex.1d.array.v4s32.f32 - 2, // llvm.nvvm.tex.1d.array.v4s32.s32 - 2, // llvm.nvvm.tex.1d.array.v4u32.f32 - 2, // llvm.nvvm.tex.1d.array.v4u32.s32 - 2, // llvm.nvvm.tex.1d.grad.v4f32.f32 - 2, // llvm.nvvm.tex.1d.grad.v4s32.f32 - 2, // llvm.nvvm.tex.1d.grad.v4u32.f32 - 2, // llvm.nvvm.tex.1d.level.v4f32.f32 - 2, // llvm.nvvm.tex.1d.level.v4s32.f32 - 2, // llvm.nvvm.tex.1d.level.v4u32.f32 - 2, // llvm.nvvm.tex.1d.v4f32.f32 - 2, // llvm.nvvm.tex.1d.v4f32.s32 - 2, // llvm.nvvm.tex.1d.v4s32.f32 - 2, // llvm.nvvm.tex.1d.v4s32.s32 - 2, // llvm.nvvm.tex.1d.v4u32.f32 - 2, // llvm.nvvm.tex.1d.v4u32.s32 - 2, // llvm.nvvm.tex.2d.array.grad.v4f32.f32 - 2, // llvm.nvvm.tex.2d.array.grad.v4s32.f32 - 2, // llvm.nvvm.tex.2d.array.grad.v4u32.f32 - 2, // llvm.nvvm.tex.2d.array.level.v4f32.f32 - 2, // llvm.nvvm.tex.2d.array.level.v4s32.f32 - 2, // llvm.nvvm.tex.2d.array.level.v4u32.f32 - 2, // llvm.nvvm.tex.2d.array.v4f32.f32 - 2, // llvm.nvvm.tex.2d.array.v4f32.s32 - 2, // llvm.nvvm.tex.2d.array.v4s32.f32 - 2, // llvm.nvvm.tex.2d.array.v4s32.s32 - 2, // llvm.nvvm.tex.2d.array.v4u32.f32 - 2, // llvm.nvvm.tex.2d.array.v4u32.s32 - 2, // llvm.nvvm.tex.2d.grad.v4f32.f32 - 2, // llvm.nvvm.tex.2d.grad.v4s32.f32 - 2, // llvm.nvvm.tex.2d.grad.v4u32.f32 - 2, // llvm.nvvm.tex.2d.level.v4f32.f32 - 2, // llvm.nvvm.tex.2d.level.v4s32.f32 - 2, // llvm.nvvm.tex.2d.level.v4u32.f32 - 2, // llvm.nvvm.tex.2d.v4f32.f32 - 2, // llvm.nvvm.tex.2d.v4f32.s32 - 2, // llvm.nvvm.tex.2d.v4s32.f32 - 2, // llvm.nvvm.tex.2d.v4s32.s32 - 2, // llvm.nvvm.tex.2d.v4u32.f32 - 2, // llvm.nvvm.tex.2d.v4u32.s32 - 2, // llvm.nvvm.tex.3d.grad.v4f32.f32 - 2, // llvm.nvvm.tex.3d.grad.v4s32.f32 - 2, // llvm.nvvm.tex.3d.grad.v4u32.f32 - 2, // llvm.nvvm.tex.3d.level.v4f32.f32 - 2, // llvm.nvvm.tex.3d.level.v4s32.f32 - 2, // llvm.nvvm.tex.3d.level.v4u32.f32 - 2, // llvm.nvvm.tex.3d.v4f32.f32 - 2, // llvm.nvvm.tex.3d.v4f32.s32 - 2, // llvm.nvvm.tex.3d.v4s32.f32 - 2, // llvm.nvvm.tex.3d.v4s32.s32 - 2, // llvm.nvvm.tex.3d.v4u32.f32 - 2, // llvm.nvvm.tex.3d.v4u32.s32 - 2, // llvm.nvvm.tex.cube.array.level.v4f32.f32 - 2, // llvm.nvvm.tex.cube.array.level.v4s32.f32 - 2, // llvm.nvvm.tex.cube.array.level.v4u32.f32 - 2, // llvm.nvvm.tex.cube.array.v4f32.f32 - 2, // llvm.nvvm.tex.cube.array.v4s32.f32 - 2, // llvm.nvvm.tex.cube.array.v4u32.f32 - 2, // llvm.nvvm.tex.cube.level.v4f32.f32 - 2, // llvm.nvvm.tex.cube.level.v4s32.f32 - 2, // llvm.nvvm.tex.cube.level.v4u32.f32 - 2, // llvm.nvvm.tex.cube.v4f32.f32 - 2, // llvm.nvvm.tex.cube.v4s32.f32 - 2, // llvm.nvvm.tex.cube.v4u32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.grad.v4f32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.grad.v4s32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.grad.v4u32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.level.v4f32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.level.v4s32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.level.v4u32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.v4f32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.v4f32.s32 - 2, // llvm.nvvm.tex.unified.1d.array.v4s32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.v4s32.s32 - 2, // llvm.nvvm.tex.unified.1d.array.v4u32.f32 - 2, // llvm.nvvm.tex.unified.1d.array.v4u32.s32 - 2, // llvm.nvvm.tex.unified.1d.grad.v4f32.f32 - 2, // llvm.nvvm.tex.unified.1d.grad.v4s32.f32 - 2, // llvm.nvvm.tex.unified.1d.grad.v4u32.f32 - 2, // llvm.nvvm.tex.unified.1d.level.v4f32.f32 - 2, // llvm.nvvm.tex.unified.1d.level.v4s32.f32 - 2, // llvm.nvvm.tex.unified.1d.level.v4u32.f32 - 2, // llvm.nvvm.tex.unified.1d.v4f32.f32 - 2, // llvm.nvvm.tex.unified.1d.v4f32.s32 - 2, // llvm.nvvm.tex.unified.1d.v4s32.f32 - 2, // llvm.nvvm.tex.unified.1d.v4s32.s32 - 2, // llvm.nvvm.tex.unified.1d.v4u32.f32 - 2, // llvm.nvvm.tex.unified.1d.v4u32.s32 - 2, // llvm.nvvm.tex.unified.2d.array.grad.v4f32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.grad.v4s32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.grad.v4u32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.level.v4f32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.level.v4s32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.level.v4u32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.v4f32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.v4f32.s32 - 2, // llvm.nvvm.tex.unified.2d.array.v4s32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.v4s32.s32 - 2, // llvm.nvvm.tex.unified.2d.array.v4u32.f32 - 2, // llvm.nvvm.tex.unified.2d.array.v4u32.s32 - 2, // llvm.nvvm.tex.unified.2d.grad.v4f32.f32 - 2, // llvm.nvvm.tex.unified.2d.grad.v4s32.f32 - 2, // llvm.nvvm.tex.unified.2d.grad.v4u32.f32 - 2, // llvm.nvvm.tex.unified.2d.level.v4f32.f32 - 2, // llvm.nvvm.tex.unified.2d.level.v4s32.f32 - 2, // llvm.nvvm.tex.unified.2d.level.v4u32.f32 - 2, // llvm.nvvm.tex.unified.2d.v4f32.f32 - 2, // llvm.nvvm.tex.unified.2d.v4f32.s32 - 2, // llvm.nvvm.tex.unified.2d.v4s32.f32 - 2, // llvm.nvvm.tex.unified.2d.v4s32.s32 - 2, // llvm.nvvm.tex.unified.2d.v4u32.f32 - 2, // llvm.nvvm.tex.unified.2d.v4u32.s32 - 2, // llvm.nvvm.tex.unified.3d.grad.v4f32.f32 - 2, // llvm.nvvm.tex.unified.3d.grad.v4s32.f32 - 2, // llvm.nvvm.tex.unified.3d.grad.v4u32.f32 - 2, // llvm.nvvm.tex.unified.3d.level.v4f32.f32 - 2, // llvm.nvvm.tex.unified.3d.level.v4s32.f32 - 2, // llvm.nvvm.tex.unified.3d.level.v4u32.f32 - 2, // llvm.nvvm.tex.unified.3d.v4f32.f32 - 2, // llvm.nvvm.tex.unified.3d.v4f32.s32 - 2, // llvm.nvvm.tex.unified.3d.v4s32.f32 - 2, // llvm.nvvm.tex.unified.3d.v4s32.s32 - 2, // llvm.nvvm.tex.unified.3d.v4u32.f32 - 2, // llvm.nvvm.tex.unified.3d.v4u32.s32 - 2, // llvm.nvvm.tex.unified.cube.array.level.v4f32.f32 - 2, // llvm.nvvm.tex.unified.cube.array.level.v4s32.f32 - 2, // llvm.nvvm.tex.unified.cube.array.level.v4u32.f32 - 2, // llvm.nvvm.tex.unified.cube.array.v4f32.f32 - 2, // llvm.nvvm.tex.unified.cube.array.v4s32.f32 - 2, // llvm.nvvm.tex.unified.cube.array.v4u32.f32 - 2, // llvm.nvvm.tex.unified.cube.level.v4f32.f32 - 2, // llvm.nvvm.tex.unified.cube.level.v4s32.f32 - 2, // llvm.nvvm.tex.unified.cube.level.v4u32.f32 - 2, // llvm.nvvm.tex.unified.cube.v4f32.f32 - 2, // llvm.nvvm.tex.unified.cube.v4s32.f32 - 2, // llvm.nvvm.tex.unified.cube.v4u32.f32 - 3, // llvm.nvvm.texsurf.handle - 3, // llvm.nvvm.texsurf.handle.internal - 2, // llvm.nvvm.tld4.a.2d.v4f32.f32 - 2, // llvm.nvvm.tld4.a.2d.v4s32.f32 - 2, // llvm.nvvm.tld4.a.2d.v4u32.f32 - 2, // llvm.nvvm.tld4.b.2d.v4f32.f32 - 2, // llvm.nvvm.tld4.b.2d.v4s32.f32 - 2, // llvm.nvvm.tld4.b.2d.v4u32.f32 - 2, // llvm.nvvm.tld4.g.2d.v4f32.f32 - 2, // llvm.nvvm.tld4.g.2d.v4s32.f32 - 2, // llvm.nvvm.tld4.g.2d.v4u32.f32 - 2, // llvm.nvvm.tld4.r.2d.v4f32.f32 - 2, // llvm.nvvm.tld4.r.2d.v4s32.f32 - 2, // llvm.nvvm.tld4.r.2d.v4u32.f32 - 2, // llvm.nvvm.tld4.unified.a.2d.v4f32.f32 - 2, // llvm.nvvm.tld4.unified.a.2d.v4s32.f32 - 2, // llvm.nvvm.tld4.unified.a.2d.v4u32.f32 - 2, // llvm.nvvm.tld4.unified.b.2d.v4f32.f32 - 2, // llvm.nvvm.tld4.unified.b.2d.v4s32.f32 - 2, // llvm.nvvm.tld4.unified.b.2d.v4u32.f32 - 2, // llvm.nvvm.tld4.unified.g.2d.v4f32.f32 - 2, // llvm.nvvm.tld4.unified.g.2d.v4s32.f32 - 2, // llvm.nvvm.tld4.unified.g.2d.v4u32.f32 - 2, // llvm.nvvm.tld4.unified.r.2d.v4f32.f32 - 2, // llvm.nvvm.tld4.unified.r.2d.v4s32.f32 - 2, // llvm.nvvm.tld4.unified.r.2d.v4u32.f32 - 3, // llvm.nvvm.trunc.d - 3, // llvm.nvvm.trunc.f - 3, // llvm.nvvm.trunc.ftz.f - 3, // llvm.nvvm.txq.array.size - 3, // llvm.nvvm.txq.channel.data.type - 3, // llvm.nvvm.txq.channel.order - 3, // llvm.nvvm.txq.depth - 3, // llvm.nvvm.txq.height - 3, // llvm.nvvm.txq.num.mipmap.levels - 3, // llvm.nvvm.txq.num.samples - 3, // llvm.nvvm.txq.width - 3, // llvm.nvvm.ui2d.rm - 3, // llvm.nvvm.ui2d.rn - 3, // llvm.nvvm.ui2d.rp - 3, // llvm.nvvm.ui2d.rz - 3, // llvm.nvvm.ui2f.rm - 3, // llvm.nvvm.ui2f.rn - 3, // llvm.nvvm.ui2f.rp - 3, // llvm.nvvm.ui2f.rz - 3, // llvm.nvvm.ull2d.rm - 3, // llvm.nvvm.ull2d.rn - 3, // llvm.nvvm.ull2d.rp - 3, // llvm.nvvm.ull2d.rz - 3, // llvm.nvvm.ull2f.rm - 3, // llvm.nvvm.ull2f.rn - 3, // llvm.nvvm.ull2f.rp - 3, // llvm.nvvm.ull2f.rz - 3, // llvm.ppc.altivec.crypto.vcipher - 3, // llvm.ppc.altivec.crypto.vcipherlast - 3, // llvm.ppc.altivec.crypto.vncipher - 3, // llvm.ppc.altivec.crypto.vncipherlast - 3, // llvm.ppc.altivec.crypto.vpermxor - 3, // llvm.ppc.altivec.crypto.vpmsumb - 3, // llvm.ppc.altivec.crypto.vpmsumd - 3, // llvm.ppc.altivec.crypto.vpmsumh - 3, // llvm.ppc.altivec.crypto.vpmsumw - 3, // llvm.ppc.altivec.crypto.vsbox - 3, // llvm.ppc.altivec.crypto.vshasigmad - 3, // llvm.ppc.altivec.crypto.vshasigmaw - 2, // llvm.ppc.altivec.dss - 2, // llvm.ppc.altivec.dssall - 2, // llvm.ppc.altivec.dst - 2, // llvm.ppc.altivec.dstst - 2, // llvm.ppc.altivec.dststt - 2, // llvm.ppc.altivec.dstt - 1, // llvm.ppc.altivec.lvebx - 1, // llvm.ppc.altivec.lvehx - 1, // llvm.ppc.altivec.lvewx - 3, // llvm.ppc.altivec.lvsl - 3, // llvm.ppc.altivec.lvsr - 1, // llvm.ppc.altivec.lvx - 1, // llvm.ppc.altivec.lvxl - 6, // llvm.ppc.altivec.mfvscr - 2, // llvm.ppc.altivec.mtvscr - 11, // llvm.ppc.altivec.stvebx - 11, // llvm.ppc.altivec.stvehx - 11, // llvm.ppc.altivec.stvewx - 11, // llvm.ppc.altivec.stvx - 11, // llvm.ppc.altivec.stvxl - 3, // llvm.ppc.altivec.vaddcuq - 3, // llvm.ppc.altivec.vaddcuw - 3, // llvm.ppc.altivec.vaddecuq - 3, // llvm.ppc.altivec.vaddeuqm - 3, // llvm.ppc.altivec.vaddsbs - 3, // llvm.ppc.altivec.vaddshs - 3, // llvm.ppc.altivec.vaddsws - 3, // llvm.ppc.altivec.vaddubs - 3, // llvm.ppc.altivec.vadduhs - 3, // llvm.ppc.altivec.vadduws - 3, // llvm.ppc.altivec.vavgsb - 3, // llvm.ppc.altivec.vavgsh - 3, // llvm.ppc.altivec.vavgsw - 3, // llvm.ppc.altivec.vavgub - 3, // llvm.ppc.altivec.vavguh - 3, // llvm.ppc.altivec.vavguw - 3, // llvm.ppc.altivec.vbpermq - 3, // llvm.ppc.altivec.vcfsx - 3, // llvm.ppc.altivec.vcfux - 3, // llvm.ppc.altivec.vcmpbfp - 3, // llvm.ppc.altivec.vcmpbfp.p - 3, // llvm.ppc.altivec.vcmpeqfp - 3, // llvm.ppc.altivec.vcmpeqfp.p - 3, // llvm.ppc.altivec.vcmpequb - 3, // llvm.ppc.altivec.vcmpequb.p - 3, // llvm.ppc.altivec.vcmpequd - 3, // llvm.ppc.altivec.vcmpequd.p - 3, // llvm.ppc.altivec.vcmpequh - 3, // llvm.ppc.altivec.vcmpequh.p - 3, // llvm.ppc.altivec.vcmpequw - 3, // llvm.ppc.altivec.vcmpequw.p - 3, // llvm.ppc.altivec.vcmpgefp - 3, // llvm.ppc.altivec.vcmpgefp.p - 3, // llvm.ppc.altivec.vcmpgtfp - 3, // llvm.ppc.altivec.vcmpgtfp.p - 3, // llvm.ppc.altivec.vcmpgtsb - 3, // llvm.ppc.altivec.vcmpgtsb.p - 3, // llvm.ppc.altivec.vcmpgtsd - 3, // llvm.ppc.altivec.vcmpgtsd.p - 3, // llvm.ppc.altivec.vcmpgtsh - 3, // llvm.ppc.altivec.vcmpgtsh.p - 3, // llvm.ppc.altivec.vcmpgtsw - 3, // llvm.ppc.altivec.vcmpgtsw.p - 3, // llvm.ppc.altivec.vcmpgtub - 3, // llvm.ppc.altivec.vcmpgtub.p - 3, // llvm.ppc.altivec.vcmpgtud - 3, // llvm.ppc.altivec.vcmpgtud.p - 3, // llvm.ppc.altivec.vcmpgtuh - 3, // llvm.ppc.altivec.vcmpgtuh.p - 3, // llvm.ppc.altivec.vcmpgtuw - 3, // llvm.ppc.altivec.vcmpgtuw.p - 3, // llvm.ppc.altivec.vctsxs - 3, // llvm.ppc.altivec.vctuxs - 3, // llvm.ppc.altivec.vexptefp - 3, // llvm.ppc.altivec.vgbbd - 3, // llvm.ppc.altivec.vlogefp - 3, // llvm.ppc.altivec.vmaddfp - 3, // llvm.ppc.altivec.vmaxfp - 3, // llvm.ppc.altivec.vmaxsb - 3, // llvm.ppc.altivec.vmaxsd - 3, // llvm.ppc.altivec.vmaxsh - 3, // llvm.ppc.altivec.vmaxsw - 3, // llvm.ppc.altivec.vmaxub - 3, // llvm.ppc.altivec.vmaxud - 3, // llvm.ppc.altivec.vmaxuh - 3, // llvm.ppc.altivec.vmaxuw - 3, // llvm.ppc.altivec.vmhaddshs - 3, // llvm.ppc.altivec.vmhraddshs - 3, // llvm.ppc.altivec.vminfp - 3, // llvm.ppc.altivec.vminsb - 3, // llvm.ppc.altivec.vminsd - 3, // llvm.ppc.altivec.vminsh - 3, // llvm.ppc.altivec.vminsw - 3, // llvm.ppc.altivec.vminub - 3, // llvm.ppc.altivec.vminud - 3, // llvm.ppc.altivec.vminuh - 3, // llvm.ppc.altivec.vminuw - 3, // llvm.ppc.altivec.vmladduhm - 3, // llvm.ppc.altivec.vmsummbm - 3, // llvm.ppc.altivec.vmsumshm - 3, // llvm.ppc.altivec.vmsumshs - 3, // llvm.ppc.altivec.vmsumubm - 3, // llvm.ppc.altivec.vmsumuhm - 3, // llvm.ppc.altivec.vmsumuhs - 3, // llvm.ppc.altivec.vmulesb - 3, // llvm.ppc.altivec.vmulesh - 3, // llvm.ppc.altivec.vmulesw - 3, // llvm.ppc.altivec.vmuleub - 3, // llvm.ppc.altivec.vmuleuh - 3, // llvm.ppc.altivec.vmuleuw - 3, // llvm.ppc.altivec.vmulosb - 3, // llvm.ppc.altivec.vmulosh - 3, // llvm.ppc.altivec.vmulosw - 3, // llvm.ppc.altivec.vmuloub - 3, // llvm.ppc.altivec.vmulouh - 3, // llvm.ppc.altivec.vmulouw - 3, // llvm.ppc.altivec.vnmsubfp - 3, // llvm.ppc.altivec.vperm - 3, // llvm.ppc.altivec.vpkpx - 3, // llvm.ppc.altivec.vpksdss - 3, // llvm.ppc.altivec.vpksdus - 3, // llvm.ppc.altivec.vpkshss - 3, // llvm.ppc.altivec.vpkshus - 3, // llvm.ppc.altivec.vpkswss - 3, // llvm.ppc.altivec.vpkswus - 3, // llvm.ppc.altivec.vpkudus - 3, // llvm.ppc.altivec.vpkuhus - 3, // llvm.ppc.altivec.vpkuwus - 3, // llvm.ppc.altivec.vrefp - 3, // llvm.ppc.altivec.vrfim - 3, // llvm.ppc.altivec.vrfin - 3, // llvm.ppc.altivec.vrfip - 3, // llvm.ppc.altivec.vrfiz - 3, // llvm.ppc.altivec.vrlb - 3, // llvm.ppc.altivec.vrld - 3, // llvm.ppc.altivec.vrlh - 3, // llvm.ppc.altivec.vrlw - 3, // llvm.ppc.altivec.vrsqrtefp - 3, // llvm.ppc.altivec.vsel - 3, // llvm.ppc.altivec.vsl - 3, // llvm.ppc.altivec.vslb - 3, // llvm.ppc.altivec.vslh - 3, // llvm.ppc.altivec.vslo - 3, // llvm.ppc.altivec.vslw - 3, // llvm.ppc.altivec.vsr - 3, // llvm.ppc.altivec.vsrab - 3, // llvm.ppc.altivec.vsrah - 3, // llvm.ppc.altivec.vsraw - 3, // llvm.ppc.altivec.vsrb - 3, // llvm.ppc.altivec.vsrh - 3, // llvm.ppc.altivec.vsro - 3, // llvm.ppc.altivec.vsrw - 3, // llvm.ppc.altivec.vsubcuq - 3, // llvm.ppc.altivec.vsubcuw - 3, // llvm.ppc.altivec.vsubecuq - 3, // llvm.ppc.altivec.vsubeuqm - 3, // llvm.ppc.altivec.vsubsbs - 3, // llvm.ppc.altivec.vsubshs - 3, // llvm.ppc.altivec.vsubsws - 3, // llvm.ppc.altivec.vsububs - 3, // llvm.ppc.altivec.vsubuhs - 3, // llvm.ppc.altivec.vsubuws - 3, // llvm.ppc.altivec.vsum2sws - 3, // llvm.ppc.altivec.vsum4sbs - 3, // llvm.ppc.altivec.vsum4shs - 3, // llvm.ppc.altivec.vsum4ubs - 3, // llvm.ppc.altivec.vsumsws - 3, // llvm.ppc.altivec.vupkhpx - 3, // llvm.ppc.altivec.vupkhsb - 3, // llvm.ppc.altivec.vupkhsh - 3, // llvm.ppc.altivec.vupkhsw - 3, // llvm.ppc.altivec.vupklpx - 3, // llvm.ppc.altivec.vupklsb - 3, // llvm.ppc.altivec.vupklsh - 3, // llvm.ppc.altivec.vupklsw - 3, // llvm.ppc.bpermd - 2, // llvm.ppc.dcba - 2, // llvm.ppc.dcbf - 2, // llvm.ppc.dcbi - 2, // llvm.ppc.dcbst - 8, // llvm.ppc.dcbt - 8, // llvm.ppc.dcbtst - 2, // llvm.ppc.dcbz - 2, // llvm.ppc.dcbzl - 3, // llvm.ppc.divde - 3, // llvm.ppc.divdeu - 3, // llvm.ppc.divwe - 3, // llvm.ppc.divweu - 2, // llvm.ppc.get.texasr - 2, // llvm.ppc.get.texasru - 2, // llvm.ppc.get.tfhar - 2, // llvm.ppc.get.tfiar - 2, // llvm.ppc.is.decremented.ctr.nonzero - 2, // llvm.ppc.lwsync - 2, // llvm.ppc.mtctr - 3, // llvm.ppc.qpx.qvfabs - 3, // llvm.ppc.qpx.qvfadd - 3, // llvm.ppc.qpx.qvfadds - 3, // llvm.ppc.qpx.qvfcfid - 3, // llvm.ppc.qpx.qvfcfids - 3, // llvm.ppc.qpx.qvfcfidu - 3, // llvm.ppc.qpx.qvfcfidus - 3, // llvm.ppc.qpx.qvfcmpeq - 3, // llvm.ppc.qpx.qvfcmpgt - 3, // llvm.ppc.qpx.qvfcmplt - 3, // llvm.ppc.qpx.qvfcpsgn - 3, // llvm.ppc.qpx.qvfctid - 3, // llvm.ppc.qpx.qvfctidu - 3, // llvm.ppc.qpx.qvfctiduz - 3, // llvm.ppc.qpx.qvfctidz - 3, // llvm.ppc.qpx.qvfctiw - 3, // llvm.ppc.qpx.qvfctiwu - 3, // llvm.ppc.qpx.qvfctiwuz - 3, // llvm.ppc.qpx.qvfctiwz - 3, // llvm.ppc.qpx.qvflogical - 3, // llvm.ppc.qpx.qvfmadd - 3, // llvm.ppc.qpx.qvfmadds - 3, // llvm.ppc.qpx.qvfmsub - 3, // llvm.ppc.qpx.qvfmsubs - 3, // llvm.ppc.qpx.qvfmul - 3, // llvm.ppc.qpx.qvfmuls - 3, // llvm.ppc.qpx.qvfnabs - 3, // llvm.ppc.qpx.qvfneg - 3, // llvm.ppc.qpx.qvfnmadd - 3, // llvm.ppc.qpx.qvfnmadds - 3, // llvm.ppc.qpx.qvfnmsub - 3, // llvm.ppc.qpx.qvfnmsubs - 3, // llvm.ppc.qpx.qvfperm - 3, // llvm.ppc.qpx.qvfre - 3, // llvm.ppc.qpx.qvfres - 3, // llvm.ppc.qpx.qvfrim - 3, // llvm.ppc.qpx.qvfrin - 3, // llvm.ppc.qpx.qvfrip - 3, // llvm.ppc.qpx.qvfriz - 3, // llvm.ppc.qpx.qvfrsp - 3, // llvm.ppc.qpx.qvfrsqrte - 3, // llvm.ppc.qpx.qvfrsqrtes - 3, // llvm.ppc.qpx.qvfsel - 3, // llvm.ppc.qpx.qvfsub - 3, // llvm.ppc.qpx.qvfsubs - 3, // llvm.ppc.qpx.qvftstnan - 3, // llvm.ppc.qpx.qvfxmadd - 3, // llvm.ppc.qpx.qvfxmadds - 3, // llvm.ppc.qpx.qvfxmul - 3, // llvm.ppc.qpx.qvfxmuls - 3, // llvm.ppc.qpx.qvfxxcpnmadd - 3, // llvm.ppc.qpx.qvfxxcpnmadds - 3, // llvm.ppc.qpx.qvfxxmadd - 3, // llvm.ppc.qpx.qvfxxmadds - 3, // llvm.ppc.qpx.qvfxxnpmadd - 3, // llvm.ppc.qpx.qvfxxnpmadds - 3, // llvm.ppc.qpx.qvgpci - 1, // llvm.ppc.qpx.qvlfcd - 1, // llvm.ppc.qpx.qvlfcda - 1, // llvm.ppc.qpx.qvlfcs - 1, // llvm.ppc.qpx.qvlfcsa - 1, // llvm.ppc.qpx.qvlfd - 1, // llvm.ppc.qpx.qvlfda - 1, // llvm.ppc.qpx.qvlfiwa - 1, // llvm.ppc.qpx.qvlfiwaa - 1, // llvm.ppc.qpx.qvlfiwz - 1, // llvm.ppc.qpx.qvlfiwza - 1, // llvm.ppc.qpx.qvlfs - 1, // llvm.ppc.qpx.qvlfsa - 3, // llvm.ppc.qpx.qvlpcld - 3, // llvm.ppc.qpx.qvlpcls - 3, // llvm.ppc.qpx.qvlpcrd - 3, // llvm.ppc.qpx.qvlpcrs - 11, // llvm.ppc.qpx.qvstfcd - 11, // llvm.ppc.qpx.qvstfcda - 11, // llvm.ppc.qpx.qvstfcs - 11, // llvm.ppc.qpx.qvstfcsa - 11, // llvm.ppc.qpx.qvstfd - 11, // llvm.ppc.qpx.qvstfda - 11, // llvm.ppc.qpx.qvstfiw - 11, // llvm.ppc.qpx.qvstfiwa - 11, // llvm.ppc.qpx.qvstfs - 11, // llvm.ppc.qpx.qvstfsa - 2, // llvm.ppc.set.texasr - 2, // llvm.ppc.set.texasru - 2, // llvm.ppc.set.tfhar - 2, // llvm.ppc.set.tfiar - 2, // llvm.ppc.sync - 2, // llvm.ppc.tabort - 2, // llvm.ppc.tabortdc - 2, // llvm.ppc.tabortdci - 2, // llvm.ppc.tabortwc - 2, // llvm.ppc.tabortwci - 2, // llvm.ppc.tbegin - 2, // llvm.ppc.tcheck - 2, // llvm.ppc.tend - 2, // llvm.ppc.tendall - 2, // llvm.ppc.trechkpt - 2, // llvm.ppc.treclaim - 2, // llvm.ppc.tresume - 2, // llvm.ppc.tsr - 2, // llvm.ppc.tsuspend - 2, // llvm.ppc.ttest - 1, // llvm.ppc.vsx.lxvd2x - 1, // llvm.ppc.vsx.lxvw4x - 11, // llvm.ppc.vsx.stxvd2x - 11, // llvm.ppc.vsx.stxvw4x - 3, // llvm.ppc.vsx.xsmaxdp - 3, // llvm.ppc.vsx.xsmindp - 3, // llvm.ppc.vsx.xvcmpeqdp - 3, // llvm.ppc.vsx.xvcmpeqdp.p - 3, // llvm.ppc.vsx.xvcmpeqsp - 3, // llvm.ppc.vsx.xvcmpeqsp.p - 3, // llvm.ppc.vsx.xvcmpgedp - 3, // llvm.ppc.vsx.xvcmpgedp.p - 3, // llvm.ppc.vsx.xvcmpgesp - 3, // llvm.ppc.vsx.xvcmpgesp.p - 3, // llvm.ppc.vsx.xvcmpgtdp - 3, // llvm.ppc.vsx.xvcmpgtdp.p - 3, // llvm.ppc.vsx.xvcmpgtsp - 3, // llvm.ppc.vsx.xvcmpgtsp.p - 3, // llvm.ppc.vsx.xvdivdp - 3, // llvm.ppc.vsx.xvdivsp - 3, // llvm.ppc.vsx.xvmaxdp - 3, // llvm.ppc.vsx.xvmaxsp - 3, // llvm.ppc.vsx.xvmindp - 3, // llvm.ppc.vsx.xvminsp - 3, // llvm.ppc.vsx.xvrdpip - 3, // llvm.ppc.vsx.xvredp - 3, // llvm.ppc.vsx.xvresp - 3, // llvm.ppc.vsx.xvrspip - 3, // llvm.ppc.vsx.xvrsqrtedp - 3, // llvm.ppc.vsx.xvrsqrtesp - 3, // llvm.ppc.vsx.xxleqv - 20, // llvm.r600.group.barrier - 3, // llvm.r600.implicitarg.ptr - 2, // llvm.r600.rat.store.typed - 3, // llvm.r600.read.global.size.x - 3, // llvm.r600.read.global.size.y - 3, // llvm.r600.read.global.size.z - 3, // llvm.r600.read.local.size.x - 3, // llvm.r600.read.local.size.y - 3, // llvm.r600.read.local.size.z - 3, // llvm.r600.read.ngroups.x - 3, // llvm.r600.read.ngroups.y - 3, // llvm.r600.read.ngroups.z - 3, // llvm.r600.read.tgid.x - 3, // llvm.r600.read.tgid.y - 3, // llvm.r600.read.tgid.z - 3, // llvm.r600.read.tidig.x - 3, // llvm.r600.read.tidig.y - 3, // llvm.r600.read.tidig.z - 3, // llvm.r600.read.workdim - 3, // llvm.r600.recipsqrt.clamped - 3, // llvm.r600.recipsqrt.ieee - 3, // llvm.s390.etnd - 3, // llvm.s390.lcbb - 11, // llvm.s390.ntstg - 2, // llvm.s390.ppa.txassist - 24, // llvm.s390.tabort - 25, // llvm.s390.tbegin - 25, // llvm.s390.tbegin.nofloat - 25, // llvm.s390.tbeginc - 3, // llvm.s390.tdc - 2, // llvm.s390.tend - 3, // llvm.s390.vaccb - 3, // llvm.s390.vacccq - 3, // llvm.s390.vaccf - 3, // llvm.s390.vaccg - 3, // llvm.s390.vacch - 3, // llvm.s390.vaccq - 3, // llvm.s390.vacq - 3, // llvm.s390.vaq - 3, // llvm.s390.vavgb - 3, // llvm.s390.vavgf - 3, // llvm.s390.vavgg - 3, // llvm.s390.vavgh - 3, // llvm.s390.vavglb - 3, // llvm.s390.vavglf - 3, // llvm.s390.vavglg - 3, // llvm.s390.vavglh - 3, // llvm.s390.vceqbs - 3, // llvm.s390.vceqfs - 3, // llvm.s390.vceqgs - 3, // llvm.s390.vceqhs - 3, // llvm.s390.vchbs - 3, // llvm.s390.vchfs - 3, // llvm.s390.vchgs - 3, // llvm.s390.vchhs - 3, // llvm.s390.vchlbs - 3, // llvm.s390.vchlfs - 3, // llvm.s390.vchlgs - 3, // llvm.s390.vchlhs - 3, // llvm.s390.vcksm - 3, // llvm.s390.verimb - 3, // llvm.s390.verimf - 3, // llvm.s390.verimg - 3, // llvm.s390.verimh - 3, // llvm.s390.verllb - 3, // llvm.s390.verllf - 3, // llvm.s390.verllg - 3, // llvm.s390.verllh - 3, // llvm.s390.verllvb - 3, // llvm.s390.verllvf - 3, // llvm.s390.verllvg - 3, // llvm.s390.verllvh - 3, // llvm.s390.vfaeb - 3, // llvm.s390.vfaebs - 3, // llvm.s390.vfaef - 3, // llvm.s390.vfaefs - 3, // llvm.s390.vfaeh - 3, // llvm.s390.vfaehs - 3, // llvm.s390.vfaezb - 3, // llvm.s390.vfaezbs - 3, // llvm.s390.vfaezf - 3, // llvm.s390.vfaezfs - 3, // llvm.s390.vfaezh - 3, // llvm.s390.vfaezhs - 3, // llvm.s390.vfcedbs - 3, // llvm.s390.vfchdbs - 3, // llvm.s390.vfchedbs - 3, // llvm.s390.vfeeb - 3, // llvm.s390.vfeebs - 3, // llvm.s390.vfeef - 3, // llvm.s390.vfeefs - 3, // llvm.s390.vfeeh - 3, // llvm.s390.vfeehs - 3, // llvm.s390.vfeezb - 3, // llvm.s390.vfeezbs - 3, // llvm.s390.vfeezf - 3, // llvm.s390.vfeezfs - 3, // llvm.s390.vfeezh - 3, // llvm.s390.vfeezhs - 3, // llvm.s390.vfeneb - 3, // llvm.s390.vfenebs - 3, // llvm.s390.vfenef - 3, // llvm.s390.vfenefs - 3, // llvm.s390.vfeneh - 3, // llvm.s390.vfenehs - 3, // llvm.s390.vfenezb - 3, // llvm.s390.vfenezbs - 3, // llvm.s390.vfenezf - 3, // llvm.s390.vfenezfs - 3, // llvm.s390.vfenezh - 3, // llvm.s390.vfenezhs - 3, // llvm.s390.vfidb - 3, // llvm.s390.vftcidb - 3, // llvm.s390.vgfmab - 3, // llvm.s390.vgfmaf - 3, // llvm.s390.vgfmag - 3, // llvm.s390.vgfmah - 3, // llvm.s390.vgfmb - 3, // llvm.s390.vgfmf - 3, // llvm.s390.vgfmg - 3, // llvm.s390.vgfmh - 3, // llvm.s390.vistrb - 3, // llvm.s390.vistrbs - 3, // llvm.s390.vistrf - 3, // llvm.s390.vistrfs - 3, // llvm.s390.vistrh - 3, // llvm.s390.vistrhs - 1, // llvm.s390.vlbb - 1, // llvm.s390.vll - 3, // llvm.s390.vmaeb - 3, // llvm.s390.vmaef - 3, // llvm.s390.vmaeh - 3, // llvm.s390.vmahb - 3, // llvm.s390.vmahf - 3, // llvm.s390.vmahh - 3, // llvm.s390.vmaleb - 3, // llvm.s390.vmalef - 3, // llvm.s390.vmaleh - 3, // llvm.s390.vmalhb - 3, // llvm.s390.vmalhf - 3, // llvm.s390.vmalhh - 3, // llvm.s390.vmalob - 3, // llvm.s390.vmalof - 3, // llvm.s390.vmaloh - 3, // llvm.s390.vmaob - 3, // llvm.s390.vmaof - 3, // llvm.s390.vmaoh - 3, // llvm.s390.vmeb - 3, // llvm.s390.vmef - 3, // llvm.s390.vmeh - 3, // llvm.s390.vmhb - 3, // llvm.s390.vmhf - 3, // llvm.s390.vmhh - 3, // llvm.s390.vmleb - 3, // llvm.s390.vmlef - 3, // llvm.s390.vmleh - 3, // llvm.s390.vmlhb - 3, // llvm.s390.vmlhf - 3, // llvm.s390.vmlhh - 3, // llvm.s390.vmlob - 3, // llvm.s390.vmlof - 3, // llvm.s390.vmloh - 3, // llvm.s390.vmob - 3, // llvm.s390.vmof - 3, // llvm.s390.vmoh - 3, // llvm.s390.vpdi - 3, // llvm.s390.vperm - 3, // llvm.s390.vpklsf - 3, // llvm.s390.vpklsfs - 3, // llvm.s390.vpklsg - 3, // llvm.s390.vpklsgs - 3, // llvm.s390.vpklsh - 3, // llvm.s390.vpklshs - 3, // llvm.s390.vpksf - 3, // llvm.s390.vpksfs - 3, // llvm.s390.vpksg - 3, // llvm.s390.vpksgs - 3, // llvm.s390.vpksh - 3, // llvm.s390.vpkshs - 3, // llvm.s390.vsbcbiq - 3, // llvm.s390.vsbiq - 3, // llvm.s390.vscbib - 3, // llvm.s390.vscbif - 3, // llvm.s390.vscbig - 3, // llvm.s390.vscbih - 3, // llvm.s390.vscbiq - 3, // llvm.s390.vsl - 3, // llvm.s390.vslb - 3, // llvm.s390.vsldb - 3, // llvm.s390.vsq - 3, // llvm.s390.vsra - 3, // llvm.s390.vsrab - 3, // llvm.s390.vsrl - 3, // llvm.s390.vsrlb - 11, // llvm.s390.vstl - 3, // llvm.s390.vstrcb - 3, // llvm.s390.vstrcbs - 3, // llvm.s390.vstrcf - 3, // llvm.s390.vstrcfs - 3, // llvm.s390.vstrch - 3, // llvm.s390.vstrchs - 3, // llvm.s390.vstrczb - 3, // llvm.s390.vstrczbs - 3, // llvm.s390.vstrczf - 3, // llvm.s390.vstrczfs - 3, // llvm.s390.vstrczh - 3, // llvm.s390.vstrczhs - 3, // llvm.s390.vsumb - 3, // llvm.s390.vsumgf - 3, // llvm.s390.vsumgh - 3, // llvm.s390.vsumh - 3, // llvm.s390.vsumqf - 3, // llvm.s390.vsumqg - 3, // llvm.s390.vtm - 3, // llvm.s390.vuphb - 3, // llvm.s390.vuphf - 3, // llvm.s390.vuphh - 3, // llvm.s390.vuplb - 3, // llvm.s390.vuplf - 3, // llvm.s390.vuplhb - 3, // llvm.s390.vuplhf - 3, // llvm.s390.vuplhh - 3, // llvm.s390.vuplhw - 3, // llvm.s390.vupllb - 3, // llvm.s390.vupllf - 3, // llvm.s390.vupllh - 6, // llvm.wasm.current.memory - 2, // llvm.wasm.grow.memory - 3, // llvm.x86.3dnow.pavgusb - 3, // llvm.x86.3dnow.pf2id - 3, // llvm.x86.3dnow.pfacc - 3, // llvm.x86.3dnow.pfadd - 3, // llvm.x86.3dnow.pfcmpeq - 3, // llvm.x86.3dnow.pfcmpge - 3, // llvm.x86.3dnow.pfcmpgt - 3, // llvm.x86.3dnow.pfmax - 3, // llvm.x86.3dnow.pfmin - 3, // llvm.x86.3dnow.pfmul - 3, // llvm.x86.3dnow.pfrcp - 3, // llvm.x86.3dnow.pfrcpit1 - 3, // llvm.x86.3dnow.pfrcpit2 - 3, // llvm.x86.3dnow.pfrsqit1 - 3, // llvm.x86.3dnow.pfrsqrt - 3, // llvm.x86.3dnow.pfsub - 3, // llvm.x86.3dnow.pfsubr - 3, // llvm.x86.3dnow.pi2fd - 3, // llvm.x86.3dnow.pmulhrw - 3, // llvm.x86.3dnowa.pf2iw - 3, // llvm.x86.3dnowa.pfnacc - 3, // llvm.x86.3dnowa.pfpnacc - 3, // llvm.x86.3dnowa.pi2fw - 3, // llvm.x86.3dnowa.pswapd - 11, // llvm.x86.addcarry.u32 - 11, // llvm.x86.addcarry.u64 - 11, // llvm.x86.addcarryx.u32 - 11, // llvm.x86.addcarryx.u64 - 3, // llvm.x86.aesni.aesdec - 3, // llvm.x86.aesni.aesdeclast - 3, // llvm.x86.aesni.aesenc - 3, // llvm.x86.aesni.aesenclast - 3, // llvm.x86.aesni.aesimc - 3, // llvm.x86.aesni.aeskeygenassist - 3, // llvm.x86.avx.addsub.pd.256 - 3, // llvm.x86.avx.addsub.ps.256 - 3, // llvm.x86.avx.blendv.pd.256 - 3, // llvm.x86.avx.blendv.ps.256 - 3, // llvm.x86.avx.cmp.pd.256 - 3, // llvm.x86.avx.cmp.ps.256 - 3, // llvm.x86.avx.cvt.pd2.ps.256 - 3, // llvm.x86.avx.cvt.pd2dq.256 - 3, // llvm.x86.avx.cvt.ps2dq.256 - 3, // llvm.x86.avx.cvtdq2.ps.256 - 3, // llvm.x86.avx.cvtt.pd2dq.256 - 3, // llvm.x86.avx.cvtt.ps2dq.256 - 3, // llvm.x86.avx.dp.ps.256 - 3, // llvm.x86.avx.hadd.pd.256 - 3, // llvm.x86.avx.hadd.ps.256 - 3, // llvm.x86.avx.hsub.pd.256 - 3, // llvm.x86.avx.hsub.ps.256 - 6, // llvm.x86.avx.ldu.dq.256 - 1, // llvm.x86.avx.maskload.pd - 1, // llvm.x86.avx.maskload.pd.256 - 1, // llvm.x86.avx.maskload.ps - 1, // llvm.x86.avx.maskload.ps.256 - 11, // llvm.x86.avx.maskstore.pd - 11, // llvm.x86.avx.maskstore.pd.256 - 11, // llvm.x86.avx.maskstore.ps - 11, // llvm.x86.avx.maskstore.ps.256 - 3, // llvm.x86.avx.max.pd.256 - 3, // llvm.x86.avx.max.ps.256 - 3, // llvm.x86.avx.min.pd.256 - 3, // llvm.x86.avx.min.ps.256 - 3, // llvm.x86.avx.movmsk.pd.256 - 3, // llvm.x86.avx.movmsk.ps.256 - 3, // llvm.x86.avx.ptestc.256 - 3, // llvm.x86.avx.ptestnzc.256 - 3, // llvm.x86.avx.ptestz.256 - 3, // llvm.x86.avx.rcp.ps.256 - 3, // llvm.x86.avx.round.pd.256 - 3, // llvm.x86.avx.round.ps.256 - 3, // llvm.x86.avx.rsqrt.ps.256 - 3, // llvm.x86.avx.sqrt.pd.256 - 3, // llvm.x86.avx.sqrt.ps.256 - 1, // llvm.x86.avx.vbroadcastf128.pd.256 - 1, // llvm.x86.avx.vbroadcastf128.ps.256 - 3, // llvm.x86.avx.vperm2f128.pd.256 - 3, // llvm.x86.avx.vperm2f128.ps.256 - 3, // llvm.x86.avx.vperm2f128.si.256 - 3, // llvm.x86.avx.vpermilvar.pd - 3, // llvm.x86.avx.vpermilvar.pd.256 - 3, // llvm.x86.avx.vpermilvar.ps - 3, // llvm.x86.avx.vpermilvar.ps.256 - 3, // llvm.x86.avx.vtestc.pd - 3, // llvm.x86.avx.vtestc.pd.256 - 3, // llvm.x86.avx.vtestc.ps - 3, // llvm.x86.avx.vtestc.ps.256 - 3, // llvm.x86.avx.vtestnzc.pd - 3, // llvm.x86.avx.vtestnzc.pd.256 - 3, // llvm.x86.avx.vtestnzc.ps - 3, // llvm.x86.avx.vtestnzc.ps.256 - 3, // llvm.x86.avx.vtestz.pd - 3, // llvm.x86.avx.vtestz.pd.256 - 3, // llvm.x86.avx.vtestz.ps - 3, // llvm.x86.avx.vtestz.ps.256 - 2, // llvm.x86.avx.vzeroall - 2, // llvm.x86.avx.vzeroupper - 1, // llvm.x86.avx2.gather.d.d - 1, // llvm.x86.avx2.gather.d.d.256 - 1, // llvm.x86.avx2.gather.d.pd - 1, // llvm.x86.avx2.gather.d.pd.256 - 1, // llvm.x86.avx2.gather.d.ps - 1, // llvm.x86.avx2.gather.d.ps.256 - 1, // llvm.x86.avx2.gather.d.q - 1, // llvm.x86.avx2.gather.d.q.256 - 1, // llvm.x86.avx2.gather.q.d - 1, // llvm.x86.avx2.gather.q.d.256 - 1, // llvm.x86.avx2.gather.q.pd - 1, // llvm.x86.avx2.gather.q.pd.256 - 1, // llvm.x86.avx2.gather.q.ps - 1, // llvm.x86.avx2.gather.q.ps.256 - 1, // llvm.x86.avx2.gather.q.q - 1, // llvm.x86.avx2.gather.q.q.256 - 1, // llvm.x86.avx2.maskload.d - 1, // llvm.x86.avx2.maskload.d.256 - 1, // llvm.x86.avx2.maskload.q - 1, // llvm.x86.avx2.maskload.q.256 - 11, // llvm.x86.avx2.maskstore.d - 11, // llvm.x86.avx2.maskstore.d.256 - 11, // llvm.x86.avx2.maskstore.q - 11, // llvm.x86.avx2.maskstore.q.256 - 6, // llvm.x86.avx2.movntdqa - 3, // llvm.x86.avx2.mpsadbw - 3, // llvm.x86.avx2.pabs.b - 3, // llvm.x86.avx2.pabs.d - 3, // llvm.x86.avx2.pabs.w - 3, // llvm.x86.avx2.packssdw - 3, // llvm.x86.avx2.packsswb - 3, // llvm.x86.avx2.packusdw - 3, // llvm.x86.avx2.packuswb - 3, // llvm.x86.avx2.padds.b - 3, // llvm.x86.avx2.padds.w - 3, // llvm.x86.avx2.paddus.b - 3, // llvm.x86.avx2.paddus.w - 3, // llvm.x86.avx2.pavg.b - 3, // llvm.x86.avx2.pavg.w - 3, // llvm.x86.avx2.pblendvb - 3, // llvm.x86.avx2.permd - 3, // llvm.x86.avx2.permps - 3, // llvm.x86.avx2.phadd.d - 3, // llvm.x86.avx2.phadd.sw - 3, // llvm.x86.avx2.phadd.w - 3, // llvm.x86.avx2.phsub.d - 3, // llvm.x86.avx2.phsub.sw - 3, // llvm.x86.avx2.phsub.w - 3, // llvm.x86.avx2.pmadd.ub.sw - 3, // llvm.x86.avx2.pmadd.wd - 3, // llvm.x86.avx2.pmovmskb - 3, // llvm.x86.avx2.pmul.dq - 3, // llvm.x86.avx2.pmul.hr.sw - 3, // llvm.x86.avx2.pmulh.w - 3, // llvm.x86.avx2.pmulhu.w - 3, // llvm.x86.avx2.pmulu.dq - 3, // llvm.x86.avx2.psad.bw - 3, // llvm.x86.avx2.pshuf.b - 3, // llvm.x86.avx2.psign.b - 3, // llvm.x86.avx2.psign.d - 3, // llvm.x86.avx2.psign.w - 3, // llvm.x86.avx2.psll.d - 3, // llvm.x86.avx2.psll.q - 3, // llvm.x86.avx2.psll.w - 3, // llvm.x86.avx2.pslli.d - 3, // llvm.x86.avx2.pslli.q - 3, // llvm.x86.avx2.pslli.w - 3, // llvm.x86.avx2.psllv.d - 3, // llvm.x86.avx2.psllv.d.256 - 3, // llvm.x86.avx2.psllv.q - 3, // llvm.x86.avx2.psllv.q.256 - 3, // llvm.x86.avx2.psra.d - 3, // llvm.x86.avx2.psra.w - 3, // llvm.x86.avx2.psrai.d - 3, // llvm.x86.avx2.psrai.w - 3, // llvm.x86.avx2.psrav.d - 3, // llvm.x86.avx2.psrav.d.256 - 3, // llvm.x86.avx2.psrl.d - 3, // llvm.x86.avx2.psrl.q - 3, // llvm.x86.avx2.psrl.w - 3, // llvm.x86.avx2.psrli.d - 3, // llvm.x86.avx2.psrli.q - 3, // llvm.x86.avx2.psrli.w - 3, // llvm.x86.avx2.psrlv.d - 3, // llvm.x86.avx2.psrlv.d.256 - 3, // llvm.x86.avx2.psrlv.q - 3, // llvm.x86.avx2.psrlv.q.256 - 3, // llvm.x86.avx2.psubs.b - 3, // llvm.x86.avx2.psubs.w - 3, // llvm.x86.avx2.psubus.b - 3, // llvm.x86.avx2.psubus.w - 3, // llvm.x86.avx2.vperm2i128 - 3, // llvm.x86.avx512.broadcastmb.128 - 3, // llvm.x86.avx512.broadcastmb.256 - 3, // llvm.x86.avx512.broadcastmb.512 - 3, // llvm.x86.avx512.broadcastmw.128 - 3, // llvm.x86.avx512.broadcastmw.256 - 3, // llvm.x86.avx512.broadcastmw.512 - 3, // llvm.x86.avx512.cvtb2mask.128 - 3, // llvm.x86.avx512.cvtb2mask.256 - 3, // llvm.x86.avx512.cvtb2mask.512 - 3, // llvm.x86.avx512.cvtd2mask.128 - 3, // llvm.x86.avx512.cvtd2mask.256 - 3, // llvm.x86.avx512.cvtd2mask.512 - 3, // llvm.x86.avx512.cvtmask2b.128 - 3, // llvm.x86.avx512.cvtmask2b.256 - 3, // llvm.x86.avx512.cvtmask2b.512 - 3, // llvm.x86.avx512.cvtmask2d.128 - 3, // llvm.x86.avx512.cvtmask2d.256 - 3, // llvm.x86.avx512.cvtmask2d.512 - 3, // llvm.x86.avx512.cvtmask2q.128 - 3, // llvm.x86.avx512.cvtmask2q.256 - 3, // llvm.x86.avx512.cvtmask2q.512 - 3, // llvm.x86.avx512.cvtmask2w.128 - 3, // llvm.x86.avx512.cvtmask2w.256 - 3, // llvm.x86.avx512.cvtmask2w.512 - 3, // llvm.x86.avx512.cvtq2mask.128 - 3, // llvm.x86.avx512.cvtq2mask.256 - 3, // llvm.x86.avx512.cvtq2mask.512 - 3, // llvm.x86.avx512.cvtsi2sd32 - 3, // llvm.x86.avx512.cvtsi2sd64 - 3, // llvm.x86.avx512.cvtsi2ss32 - 3, // llvm.x86.avx512.cvtsi2ss64 - 3, // llvm.x86.avx512.cvttsd2si - 3, // llvm.x86.avx512.cvttsd2si64 - 3, // llvm.x86.avx512.cvttsd2usi - 3, // llvm.x86.avx512.cvttsd2usi64 - 3, // llvm.x86.avx512.cvttss2si - 3, // llvm.x86.avx512.cvttss2si64 - 3, // llvm.x86.avx512.cvttss2usi - 3, // llvm.x86.avx512.cvttss2usi64 - 3, // llvm.x86.avx512.cvtusi2sd - 3, // llvm.x86.avx512.cvtusi2ss - 3, // llvm.x86.avx512.cvtusi642sd - 3, // llvm.x86.avx512.cvtusi642ss - 3, // llvm.x86.avx512.cvtw2mask.128 - 3, // llvm.x86.avx512.cvtw2mask.256 - 3, // llvm.x86.avx512.cvtw2mask.512 - 3, // llvm.x86.avx512.exp2.pd - 3, // llvm.x86.avx512.exp2.ps - 1, // llvm.x86.avx512.gather.dpd.512 - 1, // llvm.x86.avx512.gather.dpi.512 - 1, // llvm.x86.avx512.gather.dpq.512 - 1, // llvm.x86.avx512.gather.dps.512 - 1, // llvm.x86.avx512.gather.qpd.512 - 1, // llvm.x86.avx512.gather.qpi.512 - 1, // llvm.x86.avx512.gather.qpq.512 - 1, // llvm.x86.avx512.gather.qps.512 - 1, // llvm.x86.avx512.gather3div2.df - 1, // llvm.x86.avx512.gather3div2.di - 1, // llvm.x86.avx512.gather3div4.df - 1, // llvm.x86.avx512.gather3div4.di - 1, // llvm.x86.avx512.gather3div4.sf - 1, // llvm.x86.avx512.gather3div4.si - 1, // llvm.x86.avx512.gather3div8.sf - 1, // llvm.x86.avx512.gather3div8.si - 1, // llvm.x86.avx512.gather3siv2.df - 1, // llvm.x86.avx512.gather3siv2.di - 1, // llvm.x86.avx512.gather3siv4.df - 1, // llvm.x86.avx512.gather3siv4.di - 1, // llvm.x86.avx512.gather3siv4.sf - 1, // llvm.x86.avx512.gather3siv4.si - 1, // llvm.x86.avx512.gather3siv8.sf - 1, // llvm.x86.avx512.gather3siv8.si - 11, // llvm.x86.avx512.gatherpf.dpd.512 - 11, // llvm.x86.avx512.gatherpf.dps.512 - 11, // llvm.x86.avx512.gatherpf.qpd.512 - 11, // llvm.x86.avx512.gatherpf.qps.512 - 3, // llvm.x86.avx512.kand.w - 3, // llvm.x86.avx512.kandn.w - 3, // llvm.x86.avx512.knot.w - 3, // llvm.x86.avx512.kor.w - 3, // llvm.x86.avx512.kortestc.w - 3, // llvm.x86.avx512.kortestz.w - 3, // llvm.x86.avx512.kunpck.bw - 3, // llvm.x86.avx512.kunpck.dq - 3, // llvm.x86.avx512.kunpck.wd - 3, // llvm.x86.avx512.kxnor.w - 3, // llvm.x86.avx512.kxor.w - 3, // llvm.x86.avx512.mask.add.pd.128 - 3, // llvm.x86.avx512.mask.add.pd.256 - 3, // llvm.x86.avx512.mask.add.pd.512 - 3, // llvm.x86.avx512.mask.add.ps.128 - 3, // llvm.x86.avx512.mask.add.ps.256 - 3, // llvm.x86.avx512.mask.add.ps.512 - 3, // llvm.x86.avx512.mask.add.sd.round - 3, // llvm.x86.avx512.mask.add.ss.round - 3, // llvm.x86.avx512.mask.and.pd.128 - 3, // llvm.x86.avx512.mask.and.pd.256 - 3, // llvm.x86.avx512.mask.and.pd.512 - 3, // llvm.x86.avx512.mask.and.ps.128 - 3, // llvm.x86.avx512.mask.and.ps.256 - 3, // llvm.x86.avx512.mask.and.ps.512 - 3, // llvm.x86.avx512.mask.andn.pd.128 - 3, // llvm.x86.avx512.mask.andn.pd.256 - 3, // llvm.x86.avx512.mask.andn.pd.512 - 3, // llvm.x86.avx512.mask.andn.ps.128 - 3, // llvm.x86.avx512.mask.andn.ps.256 - 3, // llvm.x86.avx512.mask.andn.ps.512 - 3, // llvm.x86.avx512.mask.broadcastf32x2.256 - 3, // llvm.x86.avx512.mask.broadcastf32x2.512 - 3, // llvm.x86.avx512.mask.broadcastf32x4.256 - 3, // llvm.x86.avx512.mask.broadcastf32x4.512 - 3, // llvm.x86.avx512.mask.broadcastf32x8.512 - 3, // llvm.x86.avx512.mask.broadcastf64x2.256 - 3, // llvm.x86.avx512.mask.broadcastf64x2.512 - 3, // llvm.x86.avx512.mask.broadcastf64x4.512 - 3, // llvm.x86.avx512.mask.broadcasti32x2.128 - 3, // llvm.x86.avx512.mask.broadcasti32x2.256 - 3, // llvm.x86.avx512.mask.broadcasti32x2.512 - 3, // llvm.x86.avx512.mask.broadcasti32x4.256 - 3, // llvm.x86.avx512.mask.broadcasti32x4.512 - 3, // llvm.x86.avx512.mask.broadcasti32x8.512 - 3, // llvm.x86.avx512.mask.broadcasti64x2.256 - 3, // llvm.x86.avx512.mask.broadcasti64x2.512 - 3, // llvm.x86.avx512.mask.broadcasti64x4.512 - 3, // llvm.x86.avx512.mask.cmp.b.128 - 3, // llvm.x86.avx512.mask.cmp.b.256 - 3, // llvm.x86.avx512.mask.cmp.b.512 - 3, // llvm.x86.avx512.mask.cmp.d.128 - 3, // llvm.x86.avx512.mask.cmp.d.256 - 3, // llvm.x86.avx512.mask.cmp.d.512 - 3, // llvm.x86.avx512.mask.cmp.pd.128 - 3, // llvm.x86.avx512.mask.cmp.pd.256 - 3, // llvm.x86.avx512.mask.cmp.pd.512 - 3, // llvm.x86.avx512.mask.cmp.ps.128 - 3, // llvm.x86.avx512.mask.cmp.ps.256 - 3, // llvm.x86.avx512.mask.cmp.ps.512 - 3, // llvm.x86.avx512.mask.cmp.q.128 - 3, // llvm.x86.avx512.mask.cmp.q.256 - 3, // llvm.x86.avx512.mask.cmp.q.512 - 3, // llvm.x86.avx512.mask.cmp.sd - 3, // llvm.x86.avx512.mask.cmp.ss - 3, // llvm.x86.avx512.mask.cmp.w.128 - 3, // llvm.x86.avx512.mask.cmp.w.256 - 3, // llvm.x86.avx512.mask.cmp.w.512 - 3, // llvm.x86.avx512.mask.compress.d.128 - 3, // llvm.x86.avx512.mask.compress.d.256 - 3, // llvm.x86.avx512.mask.compress.d.512 - 3, // llvm.x86.avx512.mask.compress.pd.128 - 3, // llvm.x86.avx512.mask.compress.pd.256 - 3, // llvm.x86.avx512.mask.compress.pd.512 - 3, // llvm.x86.avx512.mask.compress.ps.128 - 3, // llvm.x86.avx512.mask.compress.ps.256 - 3, // llvm.x86.avx512.mask.compress.ps.512 - 3, // llvm.x86.avx512.mask.compress.q.128 - 3, // llvm.x86.avx512.mask.compress.q.256 - 3, // llvm.x86.avx512.mask.compress.q.512 - 11, // llvm.x86.avx512.mask.compress.store.d.128 - 11, // llvm.x86.avx512.mask.compress.store.d.256 - 11, // llvm.x86.avx512.mask.compress.store.d.512 - 11, // llvm.x86.avx512.mask.compress.store.pd.128 - 11, // llvm.x86.avx512.mask.compress.store.pd.256 - 11, // llvm.x86.avx512.mask.compress.store.pd.512 - 11, // llvm.x86.avx512.mask.compress.store.ps.128 - 11, // llvm.x86.avx512.mask.compress.store.ps.256 - 11, // llvm.x86.avx512.mask.compress.store.ps.512 - 11, // llvm.x86.avx512.mask.compress.store.q.128 - 11, // llvm.x86.avx512.mask.compress.store.q.256 - 11, // llvm.x86.avx512.mask.compress.store.q.512 - 3, // llvm.x86.avx512.mask.conflict.d.128 - 3, // llvm.x86.avx512.mask.conflict.d.256 - 3, // llvm.x86.avx512.mask.conflict.d.512 - 3, // llvm.x86.avx512.mask.conflict.q.128 - 3, // llvm.x86.avx512.mask.conflict.q.256 - 3, // llvm.x86.avx512.mask.conflict.q.512 - 3, // llvm.x86.avx512.mask.cvtdq2pd.128 - 3, // llvm.x86.avx512.mask.cvtdq2pd.256 - 3, // llvm.x86.avx512.mask.cvtdq2pd.512 - 3, // llvm.x86.avx512.mask.cvtdq2ps.128 - 3, // llvm.x86.avx512.mask.cvtdq2ps.256 - 3, // llvm.x86.avx512.mask.cvtdq2ps.512 - 3, // llvm.x86.avx512.mask.cvtpd2dq.128 - 3, // llvm.x86.avx512.mask.cvtpd2dq.256 - 3, // llvm.x86.avx512.mask.cvtpd2dq.512 - 3, // llvm.x86.avx512.mask.cvtpd2ps - 3, // llvm.x86.avx512.mask.cvtpd2ps.256 - 3, // llvm.x86.avx512.mask.cvtpd2ps.512 - 3, // llvm.x86.avx512.mask.cvtpd2qq.128 - 3, // llvm.x86.avx512.mask.cvtpd2qq.256 - 3, // llvm.x86.avx512.mask.cvtpd2qq.512 - 3, // llvm.x86.avx512.mask.cvtpd2udq.128 - 3, // llvm.x86.avx512.mask.cvtpd2udq.256 - 3, // llvm.x86.avx512.mask.cvtpd2udq.512 - 3, // llvm.x86.avx512.mask.cvtpd2uqq.128 - 3, // llvm.x86.avx512.mask.cvtpd2uqq.256 - 3, // llvm.x86.avx512.mask.cvtpd2uqq.512 - 3, // llvm.x86.avx512.mask.cvtps2dq.128 - 3, // llvm.x86.avx512.mask.cvtps2dq.256 - 3, // llvm.x86.avx512.mask.cvtps2dq.512 - 3, // llvm.x86.avx512.mask.cvtps2pd.128 - 3, // llvm.x86.avx512.mask.cvtps2pd.256 - 3, // llvm.x86.avx512.mask.cvtps2pd.512 - 3, // llvm.x86.avx512.mask.cvtps2qq.128 - 3, // llvm.x86.avx512.mask.cvtps2qq.256 - 3, // llvm.x86.avx512.mask.cvtps2qq.512 - 3, // llvm.x86.avx512.mask.cvtps2udq.128 - 3, // llvm.x86.avx512.mask.cvtps2udq.256 - 3, // llvm.x86.avx512.mask.cvtps2udq.512 - 3, // llvm.x86.avx512.mask.cvtps2uqq.128 - 3, // llvm.x86.avx512.mask.cvtps2uqq.256 - 3, // llvm.x86.avx512.mask.cvtps2uqq.512 - 3, // llvm.x86.avx512.mask.cvtqq2pd.128 - 3, // llvm.x86.avx512.mask.cvtqq2pd.256 - 3, // llvm.x86.avx512.mask.cvtqq2pd.512 - 3, // llvm.x86.avx512.mask.cvtqq2ps.128 - 3, // llvm.x86.avx512.mask.cvtqq2ps.256 - 3, // llvm.x86.avx512.mask.cvtqq2ps.512 - 3, // llvm.x86.avx512.mask.cvtsd2ss.round - 3, // llvm.x86.avx512.mask.cvtss2sd.round - 3, // llvm.x86.avx512.mask.cvttpd2dq.128 - 3, // llvm.x86.avx512.mask.cvttpd2dq.256 - 3, // llvm.x86.avx512.mask.cvttpd2dq.512 - 3, // llvm.x86.avx512.mask.cvttpd2qq.128 - 3, // llvm.x86.avx512.mask.cvttpd2qq.256 - 3, // llvm.x86.avx512.mask.cvttpd2qq.512 - 3, // llvm.x86.avx512.mask.cvttpd2udq.128 - 3, // llvm.x86.avx512.mask.cvttpd2udq.256 - 3, // llvm.x86.avx512.mask.cvttpd2udq.512 - 3, // llvm.x86.avx512.mask.cvttpd2uqq.128 - 3, // llvm.x86.avx512.mask.cvttpd2uqq.256 - 3, // llvm.x86.avx512.mask.cvttpd2uqq.512 - 3, // llvm.x86.avx512.mask.cvttps2dq.128 - 3, // llvm.x86.avx512.mask.cvttps2dq.256 - 3, // llvm.x86.avx512.mask.cvttps2dq.512 - 3, // llvm.x86.avx512.mask.cvttps2qq.128 - 3, // llvm.x86.avx512.mask.cvttps2qq.256 - 3, // llvm.x86.avx512.mask.cvttps2qq.512 - 3, // llvm.x86.avx512.mask.cvttps2udq.128 - 3, // llvm.x86.avx512.mask.cvttps2udq.256 - 3, // llvm.x86.avx512.mask.cvttps2udq.512 - 3, // llvm.x86.avx512.mask.cvttps2uqq.128 - 3, // llvm.x86.avx512.mask.cvttps2uqq.256 - 3, // llvm.x86.avx512.mask.cvttps2uqq.512 - 3, // llvm.x86.avx512.mask.cvtudq2pd.128 - 3, // llvm.x86.avx512.mask.cvtudq2pd.256 - 3, // llvm.x86.avx512.mask.cvtudq2pd.512 - 3, // llvm.x86.avx512.mask.cvtudq2ps.128 - 3, // llvm.x86.avx512.mask.cvtudq2ps.256 - 3, // llvm.x86.avx512.mask.cvtudq2ps.512 - 3, // llvm.x86.avx512.mask.cvtuqq2pd.128 - 3, // llvm.x86.avx512.mask.cvtuqq2pd.256 - 3, // llvm.x86.avx512.mask.cvtuqq2pd.512 - 3, // llvm.x86.avx512.mask.cvtuqq2ps.128 - 3, // llvm.x86.avx512.mask.cvtuqq2ps.256 - 3, // llvm.x86.avx512.mask.cvtuqq2ps.512 - 3, // llvm.x86.avx512.mask.dbpsadbw.128 - 3, // llvm.x86.avx512.mask.dbpsadbw.256 - 3, // llvm.x86.avx512.mask.dbpsadbw.512 - 3, // llvm.x86.avx512.mask.div.pd.128 - 3, // llvm.x86.avx512.mask.div.pd.256 - 3, // llvm.x86.avx512.mask.div.pd.512 - 3, // llvm.x86.avx512.mask.div.ps.128 - 3, // llvm.x86.avx512.mask.div.ps.256 - 3, // llvm.x86.avx512.mask.div.ps.512 - 3, // llvm.x86.avx512.mask.div.sd.round - 3, // llvm.x86.avx512.mask.div.ss.round - 3, // llvm.x86.avx512.mask.expand.d.128 - 3, // llvm.x86.avx512.mask.expand.d.256 - 3, // llvm.x86.avx512.mask.expand.d.512 - 1, // llvm.x86.avx512.mask.expand.load.d.128 - 1, // llvm.x86.avx512.mask.expand.load.d.256 - 1, // llvm.x86.avx512.mask.expand.load.d.512 - 1, // llvm.x86.avx512.mask.expand.load.pd.128 - 1, // llvm.x86.avx512.mask.expand.load.pd.256 - 1, // llvm.x86.avx512.mask.expand.load.pd.512 - 1, // llvm.x86.avx512.mask.expand.load.ps.128 - 1, // llvm.x86.avx512.mask.expand.load.ps.256 - 1, // llvm.x86.avx512.mask.expand.load.ps.512 - 1, // llvm.x86.avx512.mask.expand.load.q.128 - 1, // llvm.x86.avx512.mask.expand.load.q.256 - 1, // llvm.x86.avx512.mask.expand.load.q.512 - 3, // llvm.x86.avx512.mask.expand.pd.128 - 3, // llvm.x86.avx512.mask.expand.pd.256 - 3, // llvm.x86.avx512.mask.expand.pd.512 - 3, // llvm.x86.avx512.mask.expand.ps.128 - 3, // llvm.x86.avx512.mask.expand.ps.256 - 3, // llvm.x86.avx512.mask.expand.ps.512 - 3, // llvm.x86.avx512.mask.expand.q.128 - 3, // llvm.x86.avx512.mask.expand.q.256 - 3, // llvm.x86.avx512.mask.expand.q.512 - 3, // llvm.x86.avx512.mask.fixupimm.pd.128 - 3, // llvm.x86.avx512.mask.fixupimm.pd.256 - 3, // llvm.x86.avx512.mask.fixupimm.pd.512 - 3, // llvm.x86.avx512.mask.fixupimm.ps.128 - 3, // llvm.x86.avx512.mask.fixupimm.ps.256 - 3, // llvm.x86.avx512.mask.fixupimm.ps.512 - 3, // llvm.x86.avx512.mask.fixupimm.sd - 3, // llvm.x86.avx512.mask.fixupimm.ss - 3, // llvm.x86.avx512.mask.fpclass.pd.128 - 3, // llvm.x86.avx512.mask.fpclass.pd.256 - 3, // llvm.x86.avx512.mask.fpclass.pd.512 - 3, // llvm.x86.avx512.mask.fpclass.ps.128 - 3, // llvm.x86.avx512.mask.fpclass.ps.256 - 3, // llvm.x86.avx512.mask.fpclass.ps.512 - 3, // llvm.x86.avx512.mask.fpclass.sd - 3, // llvm.x86.avx512.mask.fpclass.ss - 3, // llvm.x86.avx512.mask.getexp.pd.128 - 3, // llvm.x86.avx512.mask.getexp.pd.256 - 3, // llvm.x86.avx512.mask.getexp.pd.512 - 3, // llvm.x86.avx512.mask.getexp.ps.128 - 3, // llvm.x86.avx512.mask.getexp.ps.256 - 3, // llvm.x86.avx512.mask.getexp.ps.512 - 3, // llvm.x86.avx512.mask.getexp.sd - 3, // llvm.x86.avx512.mask.getexp.ss - 3, // llvm.x86.avx512.mask.getmant.pd.128 - 3, // llvm.x86.avx512.mask.getmant.pd.256 - 3, // llvm.x86.avx512.mask.getmant.pd.512 - 3, // llvm.x86.avx512.mask.getmant.ps.128 - 3, // llvm.x86.avx512.mask.getmant.ps.256 - 3, // llvm.x86.avx512.mask.getmant.ps.512 - 3, // llvm.x86.avx512.mask.getmant.sd - 3, // llvm.x86.avx512.mask.getmant.ss - 3, // llvm.x86.avx512.mask.insertf32x4.256 - 3, // llvm.x86.avx512.mask.insertf32x4.512 - 3, // llvm.x86.avx512.mask.insertf32x8.512 - 3, // llvm.x86.avx512.mask.insertf64x2.256 - 3, // llvm.x86.avx512.mask.insertf64x2.512 - 3, // llvm.x86.avx512.mask.insertf64x4.512 - 3, // llvm.x86.avx512.mask.inserti32x4.256 - 3, // llvm.x86.avx512.mask.inserti32x4.512 - 3, // llvm.x86.avx512.mask.inserti32x8.512 - 3, // llvm.x86.avx512.mask.inserti64x2.256 - 3, // llvm.x86.avx512.mask.inserti64x2.512 - 3, // llvm.x86.avx512.mask.inserti64x4.512 - 3, // llvm.x86.avx512.mask.lzcnt.d.128 - 3, // llvm.x86.avx512.mask.lzcnt.d.256 - 3, // llvm.x86.avx512.mask.lzcnt.d.512 - 3, // llvm.x86.avx512.mask.lzcnt.q.128 - 3, // llvm.x86.avx512.mask.lzcnt.q.256 - 3, // llvm.x86.avx512.mask.lzcnt.q.512 - 3, // llvm.x86.avx512.mask.max.pd.128 - 3, // llvm.x86.avx512.mask.max.pd.256 - 3, // llvm.x86.avx512.mask.max.pd.512 - 3, // llvm.x86.avx512.mask.max.ps.128 - 3, // llvm.x86.avx512.mask.max.ps.256 - 3, // llvm.x86.avx512.mask.max.ps.512 - 3, // llvm.x86.avx512.mask.max.sd.round - 3, // llvm.x86.avx512.mask.max.ss.round - 3, // llvm.x86.avx512.mask.min.pd.128 - 3, // llvm.x86.avx512.mask.min.pd.256 - 3, // llvm.x86.avx512.mask.min.pd.512 - 3, // llvm.x86.avx512.mask.min.ps.128 - 3, // llvm.x86.avx512.mask.min.ps.256 - 3, // llvm.x86.avx512.mask.min.ps.512 - 3, // llvm.x86.avx512.mask.min.sd.round - 3, // llvm.x86.avx512.mask.min.ss.round - 3, // llvm.x86.avx512.mask.move.sd - 3, // llvm.x86.avx512.mask.move.ss - 3, // llvm.x86.avx512.mask.mul.pd.128 - 3, // llvm.x86.avx512.mask.mul.pd.256 - 3, // llvm.x86.avx512.mask.mul.pd.512 - 3, // llvm.x86.avx512.mask.mul.ps.128 - 3, // llvm.x86.avx512.mask.mul.ps.256 - 3, // llvm.x86.avx512.mask.mul.ps.512 - 3, // llvm.x86.avx512.mask.mul.sd.round - 3, // llvm.x86.avx512.mask.mul.ss.round - 3, // llvm.x86.avx512.mask.or.pd.128 - 3, // llvm.x86.avx512.mask.or.pd.256 - 3, // llvm.x86.avx512.mask.or.pd.512 - 3, // llvm.x86.avx512.mask.or.ps.128 - 3, // llvm.x86.avx512.mask.or.ps.256 - 3, // llvm.x86.avx512.mask.or.ps.512 - 3, // llvm.x86.avx512.mask.pabs.b.128 - 3, // llvm.x86.avx512.mask.pabs.b.256 - 3, // llvm.x86.avx512.mask.pabs.b.512 - 3, // llvm.x86.avx512.mask.pabs.d.128 - 3, // llvm.x86.avx512.mask.pabs.d.256 - 3, // llvm.x86.avx512.mask.pabs.d.512 - 3, // llvm.x86.avx512.mask.pabs.q.128 - 3, // llvm.x86.avx512.mask.pabs.q.256 - 3, // llvm.x86.avx512.mask.pabs.q.512 - 3, // llvm.x86.avx512.mask.pabs.w.128 - 3, // llvm.x86.avx512.mask.pabs.w.256 - 3, // llvm.x86.avx512.mask.pabs.w.512 - 3, // llvm.x86.avx512.mask.packssdw.128 - 3, // llvm.x86.avx512.mask.packssdw.256 - 3, // llvm.x86.avx512.mask.packssdw.512 - 3, // llvm.x86.avx512.mask.packsswb.128 - 3, // llvm.x86.avx512.mask.packsswb.256 - 3, // llvm.x86.avx512.mask.packsswb.512 - 3, // llvm.x86.avx512.mask.packusdw.128 - 3, // llvm.x86.avx512.mask.packusdw.256 - 3, // llvm.x86.avx512.mask.packusdw.512 - 3, // llvm.x86.avx512.mask.packuswb.128 - 3, // llvm.x86.avx512.mask.packuswb.256 - 3, // llvm.x86.avx512.mask.packuswb.512 - 3, // llvm.x86.avx512.mask.padd.b.128 - 3, // llvm.x86.avx512.mask.padd.b.256 - 3, // llvm.x86.avx512.mask.padd.b.512 - 3, // llvm.x86.avx512.mask.padd.d.128 - 3, // llvm.x86.avx512.mask.padd.d.256 - 3, // llvm.x86.avx512.mask.padd.d.512 - 3, // llvm.x86.avx512.mask.padd.q.128 - 3, // llvm.x86.avx512.mask.padd.q.256 - 3, // llvm.x86.avx512.mask.padd.q.512 - 3, // llvm.x86.avx512.mask.padd.w.128 - 3, // llvm.x86.avx512.mask.padd.w.256 - 3, // llvm.x86.avx512.mask.padd.w.512 - 3, // llvm.x86.avx512.mask.padds.b.128 - 3, // llvm.x86.avx512.mask.padds.b.256 - 3, // llvm.x86.avx512.mask.padds.b.512 - 3, // llvm.x86.avx512.mask.padds.w.128 - 3, // llvm.x86.avx512.mask.padds.w.256 - 3, // llvm.x86.avx512.mask.padds.w.512 - 3, // llvm.x86.avx512.mask.paddus.b.128 - 3, // llvm.x86.avx512.mask.paddus.b.256 - 3, // llvm.x86.avx512.mask.paddus.b.512 - 3, // llvm.x86.avx512.mask.paddus.w.128 - 3, // llvm.x86.avx512.mask.paddus.w.256 - 3, // llvm.x86.avx512.mask.paddus.w.512 - 3, // llvm.x86.avx512.mask.pavg.b.128 - 3, // llvm.x86.avx512.mask.pavg.b.256 - 3, // llvm.x86.avx512.mask.pavg.b.512 - 3, // llvm.x86.avx512.mask.pavg.w.128 - 3, // llvm.x86.avx512.mask.pavg.w.256 - 3, // llvm.x86.avx512.mask.pavg.w.512 - 3, // llvm.x86.avx512.mask.pbroadcast.b.gpr.128 - 3, // llvm.x86.avx512.mask.pbroadcast.b.gpr.256 - 3, // llvm.x86.avx512.mask.pbroadcast.b.gpr.512 - 3, // llvm.x86.avx512.mask.pbroadcast.d.gpr.128 - 3, // llvm.x86.avx512.mask.pbroadcast.d.gpr.256 - 3, // llvm.x86.avx512.mask.pbroadcast.d.gpr.512 - 3, // llvm.x86.avx512.mask.pbroadcast.q.gpr.128 - 3, // llvm.x86.avx512.mask.pbroadcast.q.gpr.256 - 3, // llvm.x86.avx512.mask.pbroadcast.q.gpr.512 - 3, // llvm.x86.avx512.mask.pbroadcast.q.mem.512 - 3, // llvm.x86.avx512.mask.pbroadcast.w.gpr.128 - 3, // llvm.x86.avx512.mask.pbroadcast.w.gpr.256 - 3, // llvm.x86.avx512.mask.pbroadcast.w.gpr.512 - 3, // llvm.x86.avx512.mask.permvar.df.256 - 3, // llvm.x86.avx512.mask.permvar.df.512 - 3, // llvm.x86.avx512.mask.permvar.di.256 - 3, // llvm.x86.avx512.mask.permvar.di.512 - 3, // llvm.x86.avx512.mask.permvar.hi.128 - 3, // llvm.x86.avx512.mask.permvar.hi.256 - 3, // llvm.x86.avx512.mask.permvar.hi.512 - 3, // llvm.x86.avx512.mask.permvar.qi.128 - 3, // llvm.x86.avx512.mask.permvar.qi.256 - 3, // llvm.x86.avx512.mask.permvar.qi.512 - 3, // llvm.x86.avx512.mask.permvar.sf.256 - 3, // llvm.x86.avx512.mask.permvar.sf.512 - 3, // llvm.x86.avx512.mask.permvar.si.256 - 3, // llvm.x86.avx512.mask.permvar.si.512 - 3, // llvm.x86.avx512.mask.pmaddubs.w.128 - 3, // llvm.x86.avx512.mask.pmaddubs.w.256 - 3, // llvm.x86.avx512.mask.pmaddubs.w.512 - 3, // llvm.x86.avx512.mask.pmaddw.d.128 - 3, // llvm.x86.avx512.mask.pmaddw.d.256 - 3, // llvm.x86.avx512.mask.pmaddw.d.512 - 3, // llvm.x86.avx512.mask.pmaxs.b.128 - 3, // llvm.x86.avx512.mask.pmaxs.b.256 - 3, // llvm.x86.avx512.mask.pmaxs.b.512 - 3, // llvm.x86.avx512.mask.pmaxs.d.128 - 3, // llvm.x86.avx512.mask.pmaxs.d.256 - 3, // llvm.x86.avx512.mask.pmaxs.d.512 - 3, // llvm.x86.avx512.mask.pmaxs.q.128 - 3, // llvm.x86.avx512.mask.pmaxs.q.256 - 3, // llvm.x86.avx512.mask.pmaxs.q.512 - 3, // llvm.x86.avx512.mask.pmaxs.w.128 - 3, // llvm.x86.avx512.mask.pmaxs.w.256 - 3, // llvm.x86.avx512.mask.pmaxs.w.512 - 3, // llvm.x86.avx512.mask.pmaxu.b.128 - 3, // llvm.x86.avx512.mask.pmaxu.b.256 - 3, // llvm.x86.avx512.mask.pmaxu.b.512 - 3, // llvm.x86.avx512.mask.pmaxu.d.128 - 3, // llvm.x86.avx512.mask.pmaxu.d.256 - 3, // llvm.x86.avx512.mask.pmaxu.d.512 - 3, // llvm.x86.avx512.mask.pmaxu.q.128 - 3, // llvm.x86.avx512.mask.pmaxu.q.256 - 3, // llvm.x86.avx512.mask.pmaxu.q.512 - 3, // llvm.x86.avx512.mask.pmaxu.w.128 - 3, // llvm.x86.avx512.mask.pmaxu.w.256 - 3, // llvm.x86.avx512.mask.pmaxu.w.512 - 3, // llvm.x86.avx512.mask.pmins.b.128 - 3, // llvm.x86.avx512.mask.pmins.b.256 - 3, // llvm.x86.avx512.mask.pmins.b.512 - 3, // llvm.x86.avx512.mask.pmins.d.128 - 3, // llvm.x86.avx512.mask.pmins.d.256 - 3, // llvm.x86.avx512.mask.pmins.d.512 - 3, // llvm.x86.avx512.mask.pmins.q.128 - 3, // llvm.x86.avx512.mask.pmins.q.256 - 3, // llvm.x86.avx512.mask.pmins.q.512 - 3, // llvm.x86.avx512.mask.pmins.w.128 - 3, // llvm.x86.avx512.mask.pmins.w.256 - 3, // llvm.x86.avx512.mask.pmins.w.512 - 3, // llvm.x86.avx512.mask.pminu.b.128 - 3, // llvm.x86.avx512.mask.pminu.b.256 - 3, // llvm.x86.avx512.mask.pminu.b.512 - 3, // llvm.x86.avx512.mask.pminu.d.128 - 3, // llvm.x86.avx512.mask.pminu.d.256 - 3, // llvm.x86.avx512.mask.pminu.d.512 - 3, // llvm.x86.avx512.mask.pminu.q.128 - 3, // llvm.x86.avx512.mask.pminu.q.256 - 3, // llvm.x86.avx512.mask.pminu.q.512 - 3, // llvm.x86.avx512.mask.pminu.w.128 - 3, // llvm.x86.avx512.mask.pminu.w.256 - 3, // llvm.x86.avx512.mask.pminu.w.512 - 3, // llvm.x86.avx512.mask.pmov.db.128 - 3, // llvm.x86.avx512.mask.pmov.db.256 - 3, // llvm.x86.avx512.mask.pmov.db.512 - 11, // llvm.x86.avx512.mask.pmov.db.mem.128 - 11, // llvm.x86.avx512.mask.pmov.db.mem.256 - 11, // llvm.x86.avx512.mask.pmov.db.mem.512 - 3, // llvm.x86.avx512.mask.pmov.dw.128 - 3, // llvm.x86.avx512.mask.pmov.dw.256 - 3, // llvm.x86.avx512.mask.pmov.dw.512 - 11, // llvm.x86.avx512.mask.pmov.dw.mem.128 - 11, // llvm.x86.avx512.mask.pmov.dw.mem.256 - 11, // llvm.x86.avx512.mask.pmov.dw.mem.512 - 3, // llvm.x86.avx512.mask.pmov.qb.128 - 3, // llvm.x86.avx512.mask.pmov.qb.256 - 3, // llvm.x86.avx512.mask.pmov.qb.512 - 11, // llvm.x86.avx512.mask.pmov.qb.mem.128 - 11, // llvm.x86.avx512.mask.pmov.qb.mem.256 - 11, // llvm.x86.avx512.mask.pmov.qb.mem.512 - 3, // llvm.x86.avx512.mask.pmov.qd.128 - 3, // llvm.x86.avx512.mask.pmov.qd.256 - 3, // llvm.x86.avx512.mask.pmov.qd.512 - 11, // llvm.x86.avx512.mask.pmov.qd.mem.128 - 11, // llvm.x86.avx512.mask.pmov.qd.mem.256 - 11, // llvm.x86.avx512.mask.pmov.qd.mem.512 - 3, // llvm.x86.avx512.mask.pmov.qw.128 - 3, // llvm.x86.avx512.mask.pmov.qw.256 - 3, // llvm.x86.avx512.mask.pmov.qw.512 - 11, // llvm.x86.avx512.mask.pmov.qw.mem.128 - 11, // llvm.x86.avx512.mask.pmov.qw.mem.256 - 11, // llvm.x86.avx512.mask.pmov.qw.mem.512 - 3, // llvm.x86.avx512.mask.pmov.wb.128 - 3, // llvm.x86.avx512.mask.pmov.wb.256 - 3, // llvm.x86.avx512.mask.pmov.wb.512 - 11, // llvm.x86.avx512.mask.pmov.wb.mem.128 - 11, // llvm.x86.avx512.mask.pmov.wb.mem.256 - 11, // llvm.x86.avx512.mask.pmov.wb.mem.512 - 3, // llvm.x86.avx512.mask.pmovs.db.128 - 3, // llvm.x86.avx512.mask.pmovs.db.256 - 3, // llvm.x86.avx512.mask.pmovs.db.512 - 11, // llvm.x86.avx512.mask.pmovs.db.mem.128 - 11, // llvm.x86.avx512.mask.pmovs.db.mem.256 - 11, // llvm.x86.avx512.mask.pmovs.db.mem.512 - 3, // llvm.x86.avx512.mask.pmovs.dw.128 - 3, // llvm.x86.avx512.mask.pmovs.dw.256 - 3, // llvm.x86.avx512.mask.pmovs.dw.512 - 11, // llvm.x86.avx512.mask.pmovs.dw.mem.128 - 11, // llvm.x86.avx512.mask.pmovs.dw.mem.256 - 11, // llvm.x86.avx512.mask.pmovs.dw.mem.512 - 3, // llvm.x86.avx512.mask.pmovs.qb.128 - 3, // llvm.x86.avx512.mask.pmovs.qb.256 - 3, // llvm.x86.avx512.mask.pmovs.qb.512 - 11, // llvm.x86.avx512.mask.pmovs.qb.mem.128 - 11, // llvm.x86.avx512.mask.pmovs.qb.mem.256 - 11, // llvm.x86.avx512.mask.pmovs.qb.mem.512 - 3, // llvm.x86.avx512.mask.pmovs.qd.128 - 3, // llvm.x86.avx512.mask.pmovs.qd.256 - 3, // llvm.x86.avx512.mask.pmovs.qd.512 - 11, // llvm.x86.avx512.mask.pmovs.qd.mem.128 - 11, // llvm.x86.avx512.mask.pmovs.qd.mem.256 - 11, // llvm.x86.avx512.mask.pmovs.qd.mem.512 - 3, // llvm.x86.avx512.mask.pmovs.qw.128 - 3, // llvm.x86.avx512.mask.pmovs.qw.256 - 3, // llvm.x86.avx512.mask.pmovs.qw.512 - 11, // llvm.x86.avx512.mask.pmovs.qw.mem.128 - 11, // llvm.x86.avx512.mask.pmovs.qw.mem.256 - 11, // llvm.x86.avx512.mask.pmovs.qw.mem.512 - 3, // llvm.x86.avx512.mask.pmovs.wb.128 - 3, // llvm.x86.avx512.mask.pmovs.wb.256 - 3, // llvm.x86.avx512.mask.pmovs.wb.512 - 11, // llvm.x86.avx512.mask.pmovs.wb.mem.128 - 11, // llvm.x86.avx512.mask.pmovs.wb.mem.256 - 11, // llvm.x86.avx512.mask.pmovs.wb.mem.512 - 3, // llvm.x86.avx512.mask.pmovsxb.d.128 - 3, // llvm.x86.avx512.mask.pmovsxb.d.256 - 3, // llvm.x86.avx512.mask.pmovsxb.d.512 - 3, // llvm.x86.avx512.mask.pmovsxb.q.128 - 3, // llvm.x86.avx512.mask.pmovsxb.q.256 - 3, // llvm.x86.avx512.mask.pmovsxb.q.512 - 3, // llvm.x86.avx512.mask.pmovsxb.w.128 - 3, // llvm.x86.avx512.mask.pmovsxb.w.256 - 3, // llvm.x86.avx512.mask.pmovsxb.w.512 - 3, // llvm.x86.avx512.mask.pmovsxd.q.128 - 3, // llvm.x86.avx512.mask.pmovsxd.q.256 - 3, // llvm.x86.avx512.mask.pmovsxd.q.512 - 3, // llvm.x86.avx512.mask.pmovsxw.d.128 - 3, // llvm.x86.avx512.mask.pmovsxw.d.256 - 3, // llvm.x86.avx512.mask.pmovsxw.d.512 - 3, // llvm.x86.avx512.mask.pmovsxw.q.128 - 3, // llvm.x86.avx512.mask.pmovsxw.q.256 - 3, // llvm.x86.avx512.mask.pmovsxw.q.512 - 3, // llvm.x86.avx512.mask.pmovus.db.128 - 3, // llvm.x86.avx512.mask.pmovus.db.256 - 3, // llvm.x86.avx512.mask.pmovus.db.512 - 11, // llvm.x86.avx512.mask.pmovus.db.mem.128 - 11, // llvm.x86.avx512.mask.pmovus.db.mem.256 - 11, // llvm.x86.avx512.mask.pmovus.db.mem.512 - 3, // llvm.x86.avx512.mask.pmovus.dw.128 - 3, // llvm.x86.avx512.mask.pmovus.dw.256 - 3, // llvm.x86.avx512.mask.pmovus.dw.512 - 11, // llvm.x86.avx512.mask.pmovus.dw.mem.128 - 11, // llvm.x86.avx512.mask.pmovus.dw.mem.256 - 11, // llvm.x86.avx512.mask.pmovus.dw.mem.512 - 3, // llvm.x86.avx512.mask.pmovus.qb.128 - 3, // llvm.x86.avx512.mask.pmovus.qb.256 - 3, // llvm.x86.avx512.mask.pmovus.qb.512 - 11, // llvm.x86.avx512.mask.pmovus.qb.mem.128 - 11, // llvm.x86.avx512.mask.pmovus.qb.mem.256 - 11, // llvm.x86.avx512.mask.pmovus.qb.mem.512 - 3, // llvm.x86.avx512.mask.pmovus.qd.128 - 3, // llvm.x86.avx512.mask.pmovus.qd.256 - 3, // llvm.x86.avx512.mask.pmovus.qd.512 - 11, // llvm.x86.avx512.mask.pmovus.qd.mem.128 - 11, // llvm.x86.avx512.mask.pmovus.qd.mem.256 - 11, // llvm.x86.avx512.mask.pmovus.qd.mem.512 - 3, // llvm.x86.avx512.mask.pmovus.qw.128 - 3, // llvm.x86.avx512.mask.pmovus.qw.256 - 3, // llvm.x86.avx512.mask.pmovus.qw.512 - 11, // llvm.x86.avx512.mask.pmovus.qw.mem.128 - 11, // llvm.x86.avx512.mask.pmovus.qw.mem.256 - 11, // llvm.x86.avx512.mask.pmovus.qw.mem.512 - 3, // llvm.x86.avx512.mask.pmovus.wb.128 - 3, // llvm.x86.avx512.mask.pmovus.wb.256 - 3, // llvm.x86.avx512.mask.pmovus.wb.512 - 11, // llvm.x86.avx512.mask.pmovus.wb.mem.128 - 11, // llvm.x86.avx512.mask.pmovus.wb.mem.256 - 11, // llvm.x86.avx512.mask.pmovus.wb.mem.512 - 3, // llvm.x86.avx512.mask.pmovzxb.d.128 - 3, // llvm.x86.avx512.mask.pmovzxb.d.256 - 3, // llvm.x86.avx512.mask.pmovzxb.d.512 - 3, // llvm.x86.avx512.mask.pmovzxb.q.128 - 3, // llvm.x86.avx512.mask.pmovzxb.q.256 - 3, // llvm.x86.avx512.mask.pmovzxb.q.512 - 3, // llvm.x86.avx512.mask.pmovzxb.w.128 - 3, // llvm.x86.avx512.mask.pmovzxb.w.256 - 3, // llvm.x86.avx512.mask.pmovzxb.w.512 - 3, // llvm.x86.avx512.mask.pmovzxd.q.128 - 3, // llvm.x86.avx512.mask.pmovzxd.q.256 - 3, // llvm.x86.avx512.mask.pmovzxd.q.512 - 3, // llvm.x86.avx512.mask.pmovzxw.d.128 - 3, // llvm.x86.avx512.mask.pmovzxw.d.256 - 3, // llvm.x86.avx512.mask.pmovzxw.d.512 - 3, // llvm.x86.avx512.mask.pmovzxw.q.128 - 3, // llvm.x86.avx512.mask.pmovzxw.q.256 - 3, // llvm.x86.avx512.mask.pmovzxw.q.512 - 3, // llvm.x86.avx512.mask.pmul.dq.128 - 3, // llvm.x86.avx512.mask.pmul.dq.256 - 3, // llvm.x86.avx512.mask.pmul.dq.512 - 3, // llvm.x86.avx512.mask.pmul.hr.sw.128 - 3, // llvm.x86.avx512.mask.pmul.hr.sw.256 - 3, // llvm.x86.avx512.mask.pmul.hr.sw.512 - 3, // llvm.x86.avx512.mask.pmulh.w.128 - 3, // llvm.x86.avx512.mask.pmulh.w.256 - 3, // llvm.x86.avx512.mask.pmulh.w.512 - 3, // llvm.x86.avx512.mask.pmulhu.w.128 - 3, // llvm.x86.avx512.mask.pmulhu.w.256 - 3, // llvm.x86.avx512.mask.pmulhu.w.512 - 3, // llvm.x86.avx512.mask.pmull.d.128 - 3, // llvm.x86.avx512.mask.pmull.d.256 - 3, // llvm.x86.avx512.mask.pmull.d.512 - 3, // llvm.x86.avx512.mask.pmull.q.128 - 3, // llvm.x86.avx512.mask.pmull.q.256 - 3, // llvm.x86.avx512.mask.pmull.q.512 - 3, // llvm.x86.avx512.mask.pmull.w.128 - 3, // llvm.x86.avx512.mask.pmull.w.256 - 3, // llvm.x86.avx512.mask.pmull.w.512 - 3, // llvm.x86.avx512.mask.pmultishift.qb.128 - 3, // llvm.x86.avx512.mask.pmultishift.qb.256 - 3, // llvm.x86.avx512.mask.pmultishift.qb.512 - 3, // llvm.x86.avx512.mask.pmulu.dq.128 - 3, // llvm.x86.avx512.mask.pmulu.dq.256 - 3, // llvm.x86.avx512.mask.pmulu.dq.512 - 3, // llvm.x86.avx512.mask.prol.d.128 - 3, // llvm.x86.avx512.mask.prol.d.256 - 3, // llvm.x86.avx512.mask.prol.d.512 - 3, // llvm.x86.avx512.mask.prol.q.128 - 3, // llvm.x86.avx512.mask.prol.q.256 - 3, // llvm.x86.avx512.mask.prol.q.512 - 3, // llvm.x86.avx512.mask.prolv.d.128 - 3, // llvm.x86.avx512.mask.prolv.d.256 - 3, // llvm.x86.avx512.mask.prolv.d.512 - 3, // llvm.x86.avx512.mask.prolv.q.128 - 3, // llvm.x86.avx512.mask.prolv.q.256 - 3, // llvm.x86.avx512.mask.prolv.q.512 - 3, // llvm.x86.avx512.mask.pror.d.128 - 3, // llvm.x86.avx512.mask.pror.d.256 - 3, // llvm.x86.avx512.mask.pror.d.512 - 3, // llvm.x86.avx512.mask.pror.q.128 - 3, // llvm.x86.avx512.mask.pror.q.256 - 3, // llvm.x86.avx512.mask.pror.q.512 - 3, // llvm.x86.avx512.mask.prorv.d.128 - 3, // llvm.x86.avx512.mask.prorv.d.256 - 3, // llvm.x86.avx512.mask.prorv.d.512 - 3, // llvm.x86.avx512.mask.prorv.q.128 - 3, // llvm.x86.avx512.mask.prorv.q.256 - 3, // llvm.x86.avx512.mask.prorv.q.512 - 3, // llvm.x86.avx512.mask.pshuf.b.128 - 3, // llvm.x86.avx512.mask.pshuf.b.256 - 3, // llvm.x86.avx512.mask.pshuf.b.512 - 3, // llvm.x86.avx512.mask.psll.d - 3, // llvm.x86.avx512.mask.psll.d.128 - 3, // llvm.x86.avx512.mask.psll.d.256 - 3, // llvm.x86.avx512.mask.psll.di.128 - 3, // llvm.x86.avx512.mask.psll.di.256 - 3, // llvm.x86.avx512.mask.psll.di.512 - 3, // llvm.x86.avx512.mask.psll.q - 3, // llvm.x86.avx512.mask.psll.q.128 - 3, // llvm.x86.avx512.mask.psll.q.256 - 3, // llvm.x86.avx512.mask.psll.qi.128 - 3, // llvm.x86.avx512.mask.psll.qi.256 - 3, // llvm.x86.avx512.mask.psll.qi.512 - 3, // llvm.x86.avx512.mask.psll.w.128 - 3, // llvm.x86.avx512.mask.psll.w.256 - 3, // llvm.x86.avx512.mask.psll.w.512 - 3, // llvm.x86.avx512.mask.psll.wi.128 - 3, // llvm.x86.avx512.mask.psll.wi.256 - 3, // llvm.x86.avx512.mask.psll.wi.512 - 3, // llvm.x86.avx512.mask.psllv.d - 3, // llvm.x86.avx512.mask.psllv.q - 3, // llvm.x86.avx512.mask.psllv16.hi - 3, // llvm.x86.avx512.mask.psllv2.di - 3, // llvm.x86.avx512.mask.psllv32hi - 3, // llvm.x86.avx512.mask.psllv4.di - 3, // llvm.x86.avx512.mask.psllv4.si - 3, // llvm.x86.avx512.mask.psllv8.hi - 3, // llvm.x86.avx512.mask.psllv8.si - 3, // llvm.x86.avx512.mask.psra.d - 3, // llvm.x86.avx512.mask.psra.d.128 - 3, // llvm.x86.avx512.mask.psra.d.256 - 3, // llvm.x86.avx512.mask.psra.di.128 - 3, // llvm.x86.avx512.mask.psra.di.256 - 3, // llvm.x86.avx512.mask.psra.di.512 - 3, // llvm.x86.avx512.mask.psra.q - 3, // llvm.x86.avx512.mask.psra.q.128 - 3, // llvm.x86.avx512.mask.psra.q.256 - 3, // llvm.x86.avx512.mask.psra.qi.128 - 3, // llvm.x86.avx512.mask.psra.qi.256 - 3, // llvm.x86.avx512.mask.psra.qi.512 - 3, // llvm.x86.avx512.mask.psra.w.128 - 3, // llvm.x86.avx512.mask.psra.w.256 - 3, // llvm.x86.avx512.mask.psra.w.512 - 3, // llvm.x86.avx512.mask.psra.wi.128 - 3, // llvm.x86.avx512.mask.psra.wi.256 - 3, // llvm.x86.avx512.mask.psra.wi.512 - 3, // llvm.x86.avx512.mask.psrav.d - 3, // llvm.x86.avx512.mask.psrav.q - 3, // llvm.x86.avx512.mask.psrav.q.128 - 3, // llvm.x86.avx512.mask.psrav.q.256 - 3, // llvm.x86.avx512.mask.psrav16.hi - 3, // llvm.x86.avx512.mask.psrav32.hi - 3, // llvm.x86.avx512.mask.psrav4.si - 3, // llvm.x86.avx512.mask.psrav8.hi - 3, // llvm.x86.avx512.mask.psrav8.si - 3, // llvm.x86.avx512.mask.psrl.d - 3, // llvm.x86.avx512.mask.psrl.d.128 - 3, // llvm.x86.avx512.mask.psrl.d.256 - 3, // llvm.x86.avx512.mask.psrl.di.128 - 3, // llvm.x86.avx512.mask.psrl.di.256 - 3, // llvm.x86.avx512.mask.psrl.di.512 - 3, // llvm.x86.avx512.mask.psrl.q - 3, // llvm.x86.avx512.mask.psrl.q.128 - 3, // llvm.x86.avx512.mask.psrl.q.256 - 3, // llvm.x86.avx512.mask.psrl.qi.128 - 3, // llvm.x86.avx512.mask.psrl.qi.256 - 3, // llvm.x86.avx512.mask.psrl.qi.512 - 3, // llvm.x86.avx512.mask.psrl.w.128 - 3, // llvm.x86.avx512.mask.psrl.w.256 - 3, // llvm.x86.avx512.mask.psrl.w.512 - 3, // llvm.x86.avx512.mask.psrl.wi.128 - 3, // llvm.x86.avx512.mask.psrl.wi.256 - 3, // llvm.x86.avx512.mask.psrl.wi.512 - 3, // llvm.x86.avx512.mask.psrlv.d - 3, // llvm.x86.avx512.mask.psrlv.q - 3, // llvm.x86.avx512.mask.psrlv16.hi - 3, // llvm.x86.avx512.mask.psrlv2.di - 3, // llvm.x86.avx512.mask.psrlv32hi - 3, // llvm.x86.avx512.mask.psrlv4.di - 3, // llvm.x86.avx512.mask.psrlv4.si - 3, // llvm.x86.avx512.mask.psrlv8.hi - 3, // llvm.x86.avx512.mask.psrlv8.si - 3, // llvm.x86.avx512.mask.psub.b.128 - 3, // llvm.x86.avx512.mask.psub.b.256 - 3, // llvm.x86.avx512.mask.psub.b.512 - 3, // llvm.x86.avx512.mask.psub.d.128 - 3, // llvm.x86.avx512.mask.psub.d.256 - 3, // llvm.x86.avx512.mask.psub.d.512 - 3, // llvm.x86.avx512.mask.psub.q.128 - 3, // llvm.x86.avx512.mask.psub.q.256 - 3, // llvm.x86.avx512.mask.psub.q.512 - 3, // llvm.x86.avx512.mask.psub.w.128 - 3, // llvm.x86.avx512.mask.psub.w.256 - 3, // llvm.x86.avx512.mask.psub.w.512 - 3, // llvm.x86.avx512.mask.psubs.b.128 - 3, // llvm.x86.avx512.mask.psubs.b.256 - 3, // llvm.x86.avx512.mask.psubs.b.512 - 3, // llvm.x86.avx512.mask.psubs.w.128 - 3, // llvm.x86.avx512.mask.psubs.w.256 - 3, // llvm.x86.avx512.mask.psubs.w.512 - 3, // llvm.x86.avx512.mask.psubus.b.128 - 3, // llvm.x86.avx512.mask.psubus.b.256 - 3, // llvm.x86.avx512.mask.psubus.b.512 - 3, // llvm.x86.avx512.mask.psubus.w.128 - 3, // llvm.x86.avx512.mask.psubus.w.256 - 3, // llvm.x86.avx512.mask.psubus.w.512 - 3, // llvm.x86.avx512.mask.pternlog.d.128 - 3, // llvm.x86.avx512.mask.pternlog.d.256 - 3, // llvm.x86.avx512.mask.pternlog.d.512 - 3, // llvm.x86.avx512.mask.pternlog.q.128 - 3, // llvm.x86.avx512.mask.pternlog.q.256 - 3, // llvm.x86.avx512.mask.pternlog.q.512 - 3, // llvm.x86.avx512.mask.range.pd.128 - 3, // llvm.x86.avx512.mask.range.pd.256 - 3, // llvm.x86.avx512.mask.range.pd.512 - 3, // llvm.x86.avx512.mask.range.ps.128 - 3, // llvm.x86.avx512.mask.range.ps.256 - 3, // llvm.x86.avx512.mask.range.ps.512 - 3, // llvm.x86.avx512.mask.range.sd - 3, // llvm.x86.avx512.mask.range.ss - 3, // llvm.x86.avx512.mask.reduce.pd.128 - 3, // llvm.x86.avx512.mask.reduce.pd.256 - 3, // llvm.x86.avx512.mask.reduce.pd.512 - 3, // llvm.x86.avx512.mask.reduce.ps.128 - 3, // llvm.x86.avx512.mask.reduce.ps.256 - 3, // llvm.x86.avx512.mask.reduce.ps.512 - 3, // llvm.x86.avx512.mask.reduce.sd - 3, // llvm.x86.avx512.mask.reduce.ss - 3, // llvm.x86.avx512.mask.rndscale.pd.128 - 3, // llvm.x86.avx512.mask.rndscale.pd.256 - 3, // llvm.x86.avx512.mask.rndscale.pd.512 - 3, // llvm.x86.avx512.mask.rndscale.ps.128 - 3, // llvm.x86.avx512.mask.rndscale.ps.256 - 3, // llvm.x86.avx512.mask.rndscale.ps.512 - 3, // llvm.x86.avx512.mask.rndscale.sd - 3, // llvm.x86.avx512.mask.rndscale.ss - 3, // llvm.x86.avx512.mask.scalef.pd.128 - 3, // llvm.x86.avx512.mask.scalef.pd.256 - 3, // llvm.x86.avx512.mask.scalef.pd.512 - 3, // llvm.x86.avx512.mask.scalef.ps.128 - 3, // llvm.x86.avx512.mask.scalef.ps.256 - 3, // llvm.x86.avx512.mask.scalef.ps.512 - 3, // llvm.x86.avx512.mask.scalef.sd - 3, // llvm.x86.avx512.mask.scalef.ss - 3, // llvm.x86.avx512.mask.shuf.f32x4 - 3, // llvm.x86.avx512.mask.shuf.f32x4.256 - 3, // llvm.x86.avx512.mask.shuf.f64x2 - 3, // llvm.x86.avx512.mask.shuf.f64x2.256 - 3, // llvm.x86.avx512.mask.shuf.i32x4 - 3, // llvm.x86.avx512.mask.shuf.i32x4.256 - 3, // llvm.x86.avx512.mask.shuf.i64x2 - 3, // llvm.x86.avx512.mask.shuf.i64x2.256 - 3, // llvm.x86.avx512.mask.shuf.pd.128 - 3, // llvm.x86.avx512.mask.shuf.pd.256 - 3, // llvm.x86.avx512.mask.shuf.pd.512 - 3, // llvm.x86.avx512.mask.shuf.ps.128 - 3, // llvm.x86.avx512.mask.shuf.ps.256 - 3, // llvm.x86.avx512.mask.shuf.ps.512 - 3, // llvm.x86.avx512.mask.sqrt.pd.128 - 3, // llvm.x86.avx512.mask.sqrt.pd.256 - 3, // llvm.x86.avx512.mask.sqrt.pd.512 - 3, // llvm.x86.avx512.mask.sqrt.ps.128 - 3, // llvm.x86.avx512.mask.sqrt.ps.256 - 3, // llvm.x86.avx512.mask.sqrt.ps.512 - 3, // llvm.x86.avx512.mask.sqrt.sd - 3, // llvm.x86.avx512.mask.sqrt.ss - 11, // llvm.x86.avx512.mask.store.ss - 3, // llvm.x86.avx512.mask.sub.pd.128 - 3, // llvm.x86.avx512.mask.sub.pd.256 - 3, // llvm.x86.avx512.mask.sub.pd.512 - 3, // llvm.x86.avx512.mask.sub.ps.128 - 3, // llvm.x86.avx512.mask.sub.ps.256 - 3, // llvm.x86.avx512.mask.sub.ps.512 - 3, // llvm.x86.avx512.mask.sub.sd.round - 3, // llvm.x86.avx512.mask.sub.ss.round - 3, // llvm.x86.avx512.mask.ucmp.b.128 - 3, // llvm.x86.avx512.mask.ucmp.b.256 - 3, // llvm.x86.avx512.mask.ucmp.b.512 - 3, // llvm.x86.avx512.mask.ucmp.d.128 - 3, // llvm.x86.avx512.mask.ucmp.d.256 - 3, // llvm.x86.avx512.mask.ucmp.d.512 - 3, // llvm.x86.avx512.mask.ucmp.q.128 - 3, // llvm.x86.avx512.mask.ucmp.q.256 - 3, // llvm.x86.avx512.mask.ucmp.q.512 - 3, // llvm.x86.avx512.mask.ucmp.w.128 - 3, // llvm.x86.avx512.mask.ucmp.w.256 - 3, // llvm.x86.avx512.mask.ucmp.w.512 - 3, // llvm.x86.avx512.mask.valign.d.128 - 3, // llvm.x86.avx512.mask.valign.d.256 - 3, // llvm.x86.avx512.mask.valign.d.512 - 3, // llvm.x86.avx512.mask.valign.q.128 - 3, // llvm.x86.avx512.mask.valign.q.256 - 3, // llvm.x86.avx512.mask.valign.q.512 - 3, // llvm.x86.avx512.mask.vcvtph2ps.128 - 3, // llvm.x86.avx512.mask.vcvtph2ps.256 - 3, // llvm.x86.avx512.mask.vcvtph2ps.512 - 3, // llvm.x86.avx512.mask.vcvtps2ph.128 - 3, // llvm.x86.avx512.mask.vcvtps2ph.256 - 3, // llvm.x86.avx512.mask.vcvtps2ph.512 - 3, // llvm.x86.avx512.mask.vextractf32x4.256 - 3, // llvm.x86.avx512.mask.vextractf32x4.512 - 3, // llvm.x86.avx512.mask.vextractf32x8.512 - 3, // llvm.x86.avx512.mask.vextractf64x2.256 - 3, // llvm.x86.avx512.mask.vextractf64x2.512 - 3, // llvm.x86.avx512.mask.vextractf64x4.512 - 3, // llvm.x86.avx512.mask.vextracti32x4.256 - 3, // llvm.x86.avx512.mask.vextracti32x4.512 - 3, // llvm.x86.avx512.mask.vextracti32x8.512 - 3, // llvm.x86.avx512.mask.vextracti64x2.256 - 3, // llvm.x86.avx512.mask.vextracti64x2.512 - 3, // llvm.x86.avx512.mask.vextracti64x4.512 - 3, // llvm.x86.avx512.mask.vfmadd.pd.128 - 3, // llvm.x86.avx512.mask.vfmadd.pd.256 - 3, // llvm.x86.avx512.mask.vfmadd.pd.512 - 3, // llvm.x86.avx512.mask.vfmadd.ps.128 - 3, // llvm.x86.avx512.mask.vfmadd.ps.256 - 3, // llvm.x86.avx512.mask.vfmadd.ps.512 - 3, // llvm.x86.avx512.mask.vfmadd.sd - 3, // llvm.x86.avx512.mask.vfmadd.ss - 3, // llvm.x86.avx512.mask.vfmaddsub.pd.128 - 3, // llvm.x86.avx512.mask.vfmaddsub.pd.256 - 3, // llvm.x86.avx512.mask.vfmaddsub.pd.512 - 3, // llvm.x86.avx512.mask.vfmaddsub.ps.128 - 3, // llvm.x86.avx512.mask.vfmaddsub.ps.256 - 3, // llvm.x86.avx512.mask.vfmaddsub.ps.512 - 3, // llvm.x86.avx512.mask.vfnmadd.pd.128 - 3, // llvm.x86.avx512.mask.vfnmadd.pd.256 - 3, // llvm.x86.avx512.mask.vfnmadd.pd.512 - 3, // llvm.x86.avx512.mask.vfnmadd.ps.128 - 3, // llvm.x86.avx512.mask.vfnmadd.ps.256 - 3, // llvm.x86.avx512.mask.vfnmadd.ps.512 - 3, // llvm.x86.avx512.mask.vfnmsub.pd.128 - 3, // llvm.x86.avx512.mask.vfnmsub.pd.256 - 3, // llvm.x86.avx512.mask.vfnmsub.pd.512 - 3, // llvm.x86.avx512.mask.vfnmsub.ps.128 - 3, // llvm.x86.avx512.mask.vfnmsub.ps.256 - 3, // llvm.x86.avx512.mask.vfnmsub.ps.512 - 3, // llvm.x86.avx512.mask.vpermi2var.d.128 - 3, // llvm.x86.avx512.mask.vpermi2var.d.256 - 3, // llvm.x86.avx512.mask.vpermi2var.d.512 - 3, // llvm.x86.avx512.mask.vpermi2var.hi.128 - 3, // llvm.x86.avx512.mask.vpermi2var.hi.256 - 3, // llvm.x86.avx512.mask.vpermi2var.hi.512 - 3, // llvm.x86.avx512.mask.vpermi2var.pd.128 - 3, // llvm.x86.avx512.mask.vpermi2var.pd.256 - 3, // llvm.x86.avx512.mask.vpermi2var.pd.512 - 3, // llvm.x86.avx512.mask.vpermi2var.ps.128 - 3, // llvm.x86.avx512.mask.vpermi2var.ps.256 - 3, // llvm.x86.avx512.mask.vpermi2var.ps.512 - 3, // llvm.x86.avx512.mask.vpermi2var.q.128 - 3, // llvm.x86.avx512.mask.vpermi2var.q.256 - 3, // llvm.x86.avx512.mask.vpermi2var.q.512 - 3, // llvm.x86.avx512.mask.vpermi2var.qi.128 - 3, // llvm.x86.avx512.mask.vpermi2var.qi.256 - 3, // llvm.x86.avx512.mask.vpermi2var.qi.512 - 3, // llvm.x86.avx512.mask.vpermilvar.pd.128 - 3, // llvm.x86.avx512.mask.vpermilvar.pd.256 - 3, // llvm.x86.avx512.mask.vpermilvar.pd.512 - 3, // llvm.x86.avx512.mask.vpermilvar.ps.128 - 3, // llvm.x86.avx512.mask.vpermilvar.ps.256 - 3, // llvm.x86.avx512.mask.vpermilvar.ps.512 - 3, // llvm.x86.avx512.mask.vpermt2var.d.128 - 3, // llvm.x86.avx512.mask.vpermt2var.d.256 - 3, // llvm.x86.avx512.mask.vpermt2var.d.512 - 3, // llvm.x86.avx512.mask.vpermt2var.hi.128 - 3, // llvm.x86.avx512.mask.vpermt2var.hi.256 - 3, // llvm.x86.avx512.mask.vpermt2var.hi.512 - 3, // llvm.x86.avx512.mask.vpermt2var.pd.128 - 3, // llvm.x86.avx512.mask.vpermt2var.pd.256 - 3, // llvm.x86.avx512.mask.vpermt2var.pd.512 - 3, // llvm.x86.avx512.mask.vpermt2var.ps.128 - 3, // llvm.x86.avx512.mask.vpermt2var.ps.256 - 3, // llvm.x86.avx512.mask.vpermt2var.ps.512 - 3, // llvm.x86.avx512.mask.vpermt2var.q.128 - 3, // llvm.x86.avx512.mask.vpermt2var.q.256 - 3, // llvm.x86.avx512.mask.vpermt2var.q.512 - 3, // llvm.x86.avx512.mask.vpermt2var.qi.128 - 3, // llvm.x86.avx512.mask.vpermt2var.qi.256 - 3, // llvm.x86.avx512.mask.vpermt2var.qi.512 - 3, // llvm.x86.avx512.mask.vpmadd52h.uq.128 - 3, // llvm.x86.avx512.mask.vpmadd52h.uq.256 - 3, // llvm.x86.avx512.mask.vpmadd52h.uq.512 - 3, // llvm.x86.avx512.mask.vpmadd52l.uq.128 - 3, // llvm.x86.avx512.mask.vpmadd52l.uq.256 - 3, // llvm.x86.avx512.mask.vpmadd52l.uq.512 - 3, // llvm.x86.avx512.mask.xor.pd.128 - 3, // llvm.x86.avx512.mask.xor.pd.256 - 3, // llvm.x86.avx512.mask.xor.pd.512 - 3, // llvm.x86.avx512.mask.xor.ps.128 - 3, // llvm.x86.avx512.mask.xor.ps.256 - 3, // llvm.x86.avx512.mask.xor.ps.512 - 3, // llvm.x86.avx512.mask3.vfmadd.pd.128 - 3, // llvm.x86.avx512.mask3.vfmadd.pd.256 - 3, // llvm.x86.avx512.mask3.vfmadd.pd.512 - 3, // llvm.x86.avx512.mask3.vfmadd.ps.128 - 3, // llvm.x86.avx512.mask3.vfmadd.ps.256 - 3, // llvm.x86.avx512.mask3.vfmadd.ps.512 - 3, // llvm.x86.avx512.mask3.vfmadd.sd - 3, // llvm.x86.avx512.mask3.vfmadd.ss - 3, // llvm.x86.avx512.mask3.vfmaddsub.pd.128 - 3, // llvm.x86.avx512.mask3.vfmaddsub.pd.256 - 3, // llvm.x86.avx512.mask3.vfmaddsub.pd.512 - 3, // llvm.x86.avx512.mask3.vfmaddsub.ps.128 - 3, // llvm.x86.avx512.mask3.vfmaddsub.ps.256 - 3, // llvm.x86.avx512.mask3.vfmaddsub.ps.512 - 3, // llvm.x86.avx512.mask3.vfmsub.pd.128 - 3, // llvm.x86.avx512.mask3.vfmsub.pd.256 - 3, // llvm.x86.avx512.mask3.vfmsub.pd.512 - 3, // llvm.x86.avx512.mask3.vfmsub.ps.128 - 3, // llvm.x86.avx512.mask3.vfmsub.ps.256 - 3, // llvm.x86.avx512.mask3.vfmsub.ps.512 - 3, // llvm.x86.avx512.mask3.vfmsubadd.pd.128 - 3, // llvm.x86.avx512.mask3.vfmsubadd.pd.256 - 3, // llvm.x86.avx512.mask3.vfmsubadd.pd.512 - 3, // llvm.x86.avx512.mask3.vfmsubadd.ps.128 - 3, // llvm.x86.avx512.mask3.vfmsubadd.ps.256 - 3, // llvm.x86.avx512.mask3.vfmsubadd.ps.512 - 3, // llvm.x86.avx512.mask3.vfnmsub.pd.128 - 3, // llvm.x86.avx512.mask3.vfnmsub.pd.256 - 3, // llvm.x86.avx512.mask3.vfnmsub.pd.512 - 3, // llvm.x86.avx512.mask3.vfnmsub.ps.128 - 3, // llvm.x86.avx512.mask3.vfnmsub.ps.256 - 3, // llvm.x86.avx512.mask3.vfnmsub.ps.512 - 3, // llvm.x86.avx512.maskz.fixupimm.pd.128 - 3, // llvm.x86.avx512.maskz.fixupimm.pd.256 - 3, // llvm.x86.avx512.maskz.fixupimm.pd.512 - 3, // llvm.x86.avx512.maskz.fixupimm.ps.128 - 3, // llvm.x86.avx512.maskz.fixupimm.ps.256 - 3, // llvm.x86.avx512.maskz.fixupimm.ps.512 - 3, // llvm.x86.avx512.maskz.fixupimm.sd - 3, // llvm.x86.avx512.maskz.fixupimm.ss - 3, // llvm.x86.avx512.maskz.pternlog.d.128 - 3, // llvm.x86.avx512.maskz.pternlog.d.256 - 3, // llvm.x86.avx512.maskz.pternlog.d.512 - 3, // llvm.x86.avx512.maskz.pternlog.q.128 - 3, // llvm.x86.avx512.maskz.pternlog.q.256 - 3, // llvm.x86.avx512.maskz.pternlog.q.512 - 3, // llvm.x86.avx512.maskz.vfmadd.pd.128 - 3, // llvm.x86.avx512.maskz.vfmadd.pd.256 - 3, // llvm.x86.avx512.maskz.vfmadd.pd.512 - 3, // llvm.x86.avx512.maskz.vfmadd.ps.128 - 3, // llvm.x86.avx512.maskz.vfmadd.ps.256 - 3, // llvm.x86.avx512.maskz.vfmadd.ps.512 - 3, // llvm.x86.avx512.maskz.vfmadd.sd - 3, // llvm.x86.avx512.maskz.vfmadd.ss - 3, // llvm.x86.avx512.maskz.vfmaddsub.pd.128 - 3, // llvm.x86.avx512.maskz.vfmaddsub.pd.256 - 3, // llvm.x86.avx512.maskz.vfmaddsub.pd.512 - 3, // llvm.x86.avx512.maskz.vfmaddsub.ps.128 - 3, // llvm.x86.avx512.maskz.vfmaddsub.ps.256 - 3, // llvm.x86.avx512.maskz.vfmaddsub.ps.512 - 3, // llvm.x86.avx512.maskz.vpermt2var.d.128 - 3, // llvm.x86.avx512.maskz.vpermt2var.d.256 - 3, // llvm.x86.avx512.maskz.vpermt2var.d.512 - 3, // llvm.x86.avx512.maskz.vpermt2var.hi.128 - 3, // llvm.x86.avx512.maskz.vpermt2var.hi.256 - 3, // llvm.x86.avx512.maskz.vpermt2var.hi.512 - 3, // llvm.x86.avx512.maskz.vpermt2var.pd.128 - 3, // llvm.x86.avx512.maskz.vpermt2var.pd.256 - 3, // llvm.x86.avx512.maskz.vpermt2var.pd.512 - 3, // llvm.x86.avx512.maskz.vpermt2var.ps.128 - 3, // llvm.x86.avx512.maskz.vpermt2var.ps.256 - 3, // llvm.x86.avx512.maskz.vpermt2var.ps.512 - 3, // llvm.x86.avx512.maskz.vpermt2var.q.128 - 3, // llvm.x86.avx512.maskz.vpermt2var.q.256 - 3, // llvm.x86.avx512.maskz.vpermt2var.q.512 - 3, // llvm.x86.avx512.maskz.vpermt2var.qi.128 - 3, // llvm.x86.avx512.maskz.vpermt2var.qi.256 - 3, // llvm.x86.avx512.maskz.vpermt2var.qi.512 - 3, // llvm.x86.avx512.maskz.vpmadd52h.uq.128 - 3, // llvm.x86.avx512.maskz.vpmadd52h.uq.256 - 3, // llvm.x86.avx512.maskz.vpmadd52h.uq.512 - 3, // llvm.x86.avx512.maskz.vpmadd52l.uq.128 - 3, // llvm.x86.avx512.maskz.vpmadd52l.uq.256 - 3, // llvm.x86.avx512.maskz.vpmadd52l.uq.512 - 6, // llvm.x86.avx512.movntdqa - 3, // llvm.x86.avx512.pmovzxbd - 3, // llvm.x86.avx512.pmovzxbq - 3, // llvm.x86.avx512.pmovzxdq - 3, // llvm.x86.avx512.pmovzxwd - 3, // llvm.x86.avx512.pmovzxwq - 3, // llvm.x86.avx512.psad.bw.512 - 3, // llvm.x86.avx512.ptestm.b.128 - 3, // llvm.x86.avx512.ptestm.b.256 - 3, // llvm.x86.avx512.ptestm.b.512 - 3, // llvm.x86.avx512.ptestm.d.128 - 3, // llvm.x86.avx512.ptestm.d.256 - 3, // llvm.x86.avx512.ptestm.d.512 - 3, // llvm.x86.avx512.ptestm.q.128 - 3, // llvm.x86.avx512.ptestm.q.256 - 3, // llvm.x86.avx512.ptestm.q.512 - 3, // llvm.x86.avx512.ptestm.w.128 - 3, // llvm.x86.avx512.ptestm.w.256 - 3, // llvm.x86.avx512.ptestm.w.512 - 3, // llvm.x86.avx512.ptestnm.b.128 - 3, // llvm.x86.avx512.ptestnm.b.256 - 3, // llvm.x86.avx512.ptestnm.b.512 - 3, // llvm.x86.avx512.ptestnm.d.128 - 3, // llvm.x86.avx512.ptestnm.d.256 - 3, // llvm.x86.avx512.ptestnm.d.512 - 3, // llvm.x86.avx512.ptestnm.q.128 - 3, // llvm.x86.avx512.ptestnm.q.256 - 3, // llvm.x86.avx512.ptestnm.q.512 - 3, // llvm.x86.avx512.ptestnm.w.128 - 3, // llvm.x86.avx512.ptestnm.w.256 - 3, // llvm.x86.avx512.ptestnm.w.512 - 3, // llvm.x86.avx512.rcp14.pd.128 - 3, // llvm.x86.avx512.rcp14.pd.256 - 3, // llvm.x86.avx512.rcp14.pd.512 - 3, // llvm.x86.avx512.rcp14.ps.128 - 3, // llvm.x86.avx512.rcp14.ps.256 - 3, // llvm.x86.avx512.rcp14.ps.512 - 3, // llvm.x86.avx512.rcp14.sd - 3, // llvm.x86.avx512.rcp14.ss - 3, // llvm.x86.avx512.rcp28.pd - 3, // llvm.x86.avx512.rcp28.ps - 3, // llvm.x86.avx512.rcp28.sd - 3, // llvm.x86.avx512.rcp28.ss - 3, // llvm.x86.avx512.rsqrt14.pd.128 - 3, // llvm.x86.avx512.rsqrt14.pd.256 - 3, // llvm.x86.avx512.rsqrt14.pd.512 - 3, // llvm.x86.avx512.rsqrt14.ps.128 - 3, // llvm.x86.avx512.rsqrt14.ps.256 - 3, // llvm.x86.avx512.rsqrt14.ps.512 - 3, // llvm.x86.avx512.rsqrt14.sd - 3, // llvm.x86.avx512.rsqrt14.ss - 3, // llvm.x86.avx512.rsqrt28.pd - 3, // llvm.x86.avx512.rsqrt28.ps - 3, // llvm.x86.avx512.rsqrt28.sd - 3, // llvm.x86.avx512.rsqrt28.ss - 11, // llvm.x86.avx512.scatter.dpd.512 - 11, // llvm.x86.avx512.scatter.dpi.512 - 11, // llvm.x86.avx512.scatter.dpq.512 - 11, // llvm.x86.avx512.scatter.dps.512 - 11, // llvm.x86.avx512.scatter.qpd.512 - 11, // llvm.x86.avx512.scatter.qpi.512 - 11, // llvm.x86.avx512.scatter.qpq.512 - 11, // llvm.x86.avx512.scatter.qps.512 - 11, // llvm.x86.avx512.scatterdiv2.df - 11, // llvm.x86.avx512.scatterdiv2.di - 11, // llvm.x86.avx512.scatterdiv4.df - 11, // llvm.x86.avx512.scatterdiv4.di - 11, // llvm.x86.avx512.scatterdiv4.sf - 11, // llvm.x86.avx512.scatterdiv4.si - 11, // llvm.x86.avx512.scatterdiv8.sf - 11, // llvm.x86.avx512.scatterdiv8.si - 11, // llvm.x86.avx512.scatterpf.dpd.512 - 11, // llvm.x86.avx512.scatterpf.dps.512 - 11, // llvm.x86.avx512.scatterpf.qpd.512 - 11, // llvm.x86.avx512.scatterpf.qps.512 - 11, // llvm.x86.avx512.scattersiv2.df - 11, // llvm.x86.avx512.scattersiv2.di - 11, // llvm.x86.avx512.scattersiv4.df - 11, // llvm.x86.avx512.scattersiv4.di - 11, // llvm.x86.avx512.scattersiv4.sf - 11, // llvm.x86.avx512.scattersiv4.si - 11, // llvm.x86.avx512.scattersiv8.sf - 11, // llvm.x86.avx512.scattersiv8.si - 1, // llvm.x86.avx512.vbroadcast.sd.512 - 1, // llvm.x86.avx512.vbroadcast.ss.512 - 3, // llvm.x86.avx512.vcomi.sd - 3, // llvm.x86.avx512.vcomi.ss - 3, // llvm.x86.avx512.vcvtsd2si32 - 3, // llvm.x86.avx512.vcvtsd2si64 - 3, // llvm.x86.avx512.vcvtsd2usi32 - 3, // llvm.x86.avx512.vcvtsd2usi64 - 3, // llvm.x86.avx512.vcvtss2si32 - 3, // llvm.x86.avx512.vcvtss2si64 - 3, // llvm.x86.avx512.vcvtss2usi32 - 3, // llvm.x86.avx512.vcvtss2usi64 - 3, // llvm.x86.bmi.bextr.32 - 3, // llvm.x86.bmi.bextr.64 - 3, // llvm.x86.bmi.bzhi.32 - 3, // llvm.x86.bmi.bzhi.64 - 3, // llvm.x86.bmi.pdep.32 - 3, // llvm.x86.bmi.pdep.64 - 3, // llvm.x86.bmi.pext.32 - 3, // llvm.x86.bmi.pext.64 - 2, // llvm.x86.clflushopt - 2, // llvm.x86.flags.read.u32 - 2, // llvm.x86.flags.read.u64 - 2, // llvm.x86.flags.write.u32 - 2, // llvm.x86.flags.write.u64 - 3, // llvm.x86.fma.vfmadd.pd - 3, // llvm.x86.fma.vfmadd.pd.256 - 3, // llvm.x86.fma.vfmadd.ps - 3, // llvm.x86.fma.vfmadd.ps.256 - 3, // llvm.x86.fma.vfmadd.sd - 3, // llvm.x86.fma.vfmadd.ss - 3, // llvm.x86.fma.vfmaddsub.pd - 3, // llvm.x86.fma.vfmaddsub.pd.256 - 3, // llvm.x86.fma.vfmaddsub.ps - 3, // llvm.x86.fma.vfmaddsub.ps.256 - 3, // llvm.x86.fma.vfmsub.pd - 3, // llvm.x86.fma.vfmsub.pd.256 - 3, // llvm.x86.fma.vfmsub.ps - 3, // llvm.x86.fma.vfmsub.ps.256 - 3, // llvm.x86.fma.vfmsub.sd - 3, // llvm.x86.fma.vfmsub.ss - 3, // llvm.x86.fma.vfmsubadd.pd - 3, // llvm.x86.fma.vfmsubadd.pd.256 - 3, // llvm.x86.fma.vfmsubadd.ps - 3, // llvm.x86.fma.vfmsubadd.ps.256 - 3, // llvm.x86.fma.vfnmadd.pd - 3, // llvm.x86.fma.vfnmadd.pd.256 - 3, // llvm.x86.fma.vfnmadd.ps - 3, // llvm.x86.fma.vfnmadd.ps.256 - 3, // llvm.x86.fma.vfnmadd.sd - 3, // llvm.x86.fma.vfnmadd.ss - 3, // llvm.x86.fma.vfnmsub.pd - 3, // llvm.x86.fma.vfnmsub.pd.256 - 3, // llvm.x86.fma.vfnmsub.ps - 3, // llvm.x86.fma.vfnmsub.ps.256 - 3, // llvm.x86.fma.vfnmsub.sd - 3, // llvm.x86.fma.vfnmsub.ss - 2, // llvm.x86.fxrstor - 2, // llvm.x86.fxrstor64 - 2, // llvm.x86.fxsave - 2, // llvm.x86.fxsave64 - 2, // llvm.x86.int - 2, // llvm.x86.mmx.emms - 2, // llvm.x86.mmx.femms - 2, // llvm.x86.mmx.maskmovq - 2, // llvm.x86.mmx.movnt.dq - 3, // llvm.x86.mmx.packssdw - 3, // llvm.x86.mmx.packsswb - 3, // llvm.x86.mmx.packuswb - 3, // llvm.x86.mmx.padd.b - 3, // llvm.x86.mmx.padd.d - 3, // llvm.x86.mmx.padd.q - 3, // llvm.x86.mmx.padd.w - 3, // llvm.x86.mmx.padds.b - 3, // llvm.x86.mmx.padds.w - 3, // llvm.x86.mmx.paddus.b - 3, // llvm.x86.mmx.paddus.w - 3, // llvm.x86.mmx.palignr.b - 3, // llvm.x86.mmx.pand - 3, // llvm.x86.mmx.pandn - 3, // llvm.x86.mmx.pavg.b - 3, // llvm.x86.mmx.pavg.w - 3, // llvm.x86.mmx.pcmpeq.b - 3, // llvm.x86.mmx.pcmpeq.d - 3, // llvm.x86.mmx.pcmpeq.w - 3, // llvm.x86.mmx.pcmpgt.b - 3, // llvm.x86.mmx.pcmpgt.d - 3, // llvm.x86.mmx.pcmpgt.w - 3, // llvm.x86.mmx.pextr.w - 3, // llvm.x86.mmx.pinsr.w - 3, // llvm.x86.mmx.pmadd.wd - 3, // llvm.x86.mmx.pmaxs.w - 3, // llvm.x86.mmx.pmaxu.b - 3, // llvm.x86.mmx.pmins.w - 3, // llvm.x86.mmx.pminu.b - 3, // llvm.x86.mmx.pmovmskb - 3, // llvm.x86.mmx.pmulh.w - 3, // llvm.x86.mmx.pmulhu.w - 3, // llvm.x86.mmx.pmull.w - 3, // llvm.x86.mmx.pmulu.dq - 3, // llvm.x86.mmx.por - 3, // llvm.x86.mmx.psad.bw - 3, // llvm.x86.mmx.psll.d - 3, // llvm.x86.mmx.psll.q - 3, // llvm.x86.mmx.psll.w - 3, // llvm.x86.mmx.pslli.d - 3, // llvm.x86.mmx.pslli.q - 3, // llvm.x86.mmx.pslli.w - 3, // llvm.x86.mmx.psra.d - 3, // llvm.x86.mmx.psra.w - 3, // llvm.x86.mmx.psrai.d - 3, // llvm.x86.mmx.psrai.w - 3, // llvm.x86.mmx.psrl.d - 3, // llvm.x86.mmx.psrl.q - 3, // llvm.x86.mmx.psrl.w - 3, // llvm.x86.mmx.psrli.d - 3, // llvm.x86.mmx.psrli.q - 3, // llvm.x86.mmx.psrli.w - 3, // llvm.x86.mmx.psub.b - 3, // llvm.x86.mmx.psub.d - 3, // llvm.x86.mmx.psub.q - 3, // llvm.x86.mmx.psub.w - 3, // llvm.x86.mmx.psubs.b - 3, // llvm.x86.mmx.psubs.w - 3, // llvm.x86.mmx.psubus.b - 3, // llvm.x86.mmx.psubus.w - 3, // llvm.x86.mmx.punpckhbw - 3, // llvm.x86.mmx.punpckhdq - 3, // llvm.x86.mmx.punpckhwd - 3, // llvm.x86.mmx.punpcklbw - 3, // llvm.x86.mmx.punpckldq - 3, // llvm.x86.mmx.punpcklwd - 3, // llvm.x86.mmx.pxor - 2, // llvm.x86.monitorx - 2, // llvm.x86.mwaitx - 3, // llvm.x86.pclmulqdq - 2, // llvm.x86.rdfsbase.32 - 2, // llvm.x86.rdfsbase.64 - 2, // llvm.x86.rdgsbase.32 - 2, // llvm.x86.rdgsbase.64 - 2, // llvm.x86.rdpkru - 2, // llvm.x86.rdpmc - 2, // llvm.x86.rdrand.16 - 2, // llvm.x86.rdrand.32 - 2, // llvm.x86.rdrand.64 - 2, // llvm.x86.rdseed.16 - 2, // llvm.x86.rdseed.32 - 2, // llvm.x86.rdseed.64 - 2, // llvm.x86.rdtsc - 11, // llvm.x86.rdtscp - 2, // llvm.x86.seh.ehguard - 2, // llvm.x86.seh.ehregnode - 3, // llvm.x86.seh.lsda - 3, // llvm.x86.seh.recoverfp - 3, // llvm.x86.sha1msg1 - 3, // llvm.x86.sha1msg2 - 3, // llvm.x86.sha1nexte - 3, // llvm.x86.sha1rnds4 - 3, // llvm.x86.sha256msg1 - 3, // llvm.x86.sha256msg2 - 3, // llvm.x86.sha256rnds2 - 3, // llvm.x86.sse.add.ss - 3, // llvm.x86.sse.cmp.ps - 3, // llvm.x86.sse.cmp.ss - 3, // llvm.x86.sse.comieq.ss - 3, // llvm.x86.sse.comige.ss - 3, // llvm.x86.sse.comigt.ss - 3, // llvm.x86.sse.comile.ss - 3, // llvm.x86.sse.comilt.ss - 3, // llvm.x86.sse.comineq.ss - 3, // llvm.x86.sse.cvtpd2pi - 3, // llvm.x86.sse.cvtpi2pd - 3, // llvm.x86.sse.cvtpi2ps - 3, // llvm.x86.sse.cvtps2pi - 3, // llvm.x86.sse.cvtsi2ss - 3, // llvm.x86.sse.cvtsi642ss - 3, // llvm.x86.sse.cvtss2si - 3, // llvm.x86.sse.cvtss2si64 - 3, // llvm.x86.sse.cvttpd2pi - 3, // llvm.x86.sse.cvttps2pi - 3, // llvm.x86.sse.cvttss2si - 3, // llvm.x86.sse.cvttss2si64 - 3, // llvm.x86.sse.div.ss - 2, // llvm.x86.sse.ldmxcsr - 3, // llvm.x86.sse.max.ps - 3, // llvm.x86.sse.max.ss - 3, // llvm.x86.sse.min.ps - 3, // llvm.x86.sse.min.ss - 3, // llvm.x86.sse.movmsk.ps - 3, // llvm.x86.sse.mul.ss - 3, // llvm.x86.sse.pshuf.w - 3, // llvm.x86.sse.rcp.ps - 3, // llvm.x86.sse.rcp.ss - 3, // llvm.x86.sse.rsqrt.ps - 3, // llvm.x86.sse.rsqrt.ss - 2, // llvm.x86.sse.sfence - 3, // llvm.x86.sse.sqrt.ps - 3, // llvm.x86.sse.sqrt.ss - 2, // llvm.x86.sse.stmxcsr - 3, // llvm.x86.sse.sub.ss - 3, // llvm.x86.sse.ucomieq.ss - 3, // llvm.x86.sse.ucomige.ss - 3, // llvm.x86.sse.ucomigt.ss - 3, // llvm.x86.sse.ucomile.ss - 3, // llvm.x86.sse.ucomilt.ss - 3, // llvm.x86.sse.ucomineq.ss - 3, // llvm.x86.sse2.add.sd - 2, // llvm.x86.sse2.clflush - 3, // llvm.x86.sse2.cmp.pd - 3, // llvm.x86.sse2.cmp.sd - 3, // llvm.x86.sse2.comieq.sd - 3, // llvm.x86.sse2.comige.sd - 3, // llvm.x86.sse2.comigt.sd - 3, // llvm.x86.sse2.comile.sd - 3, // llvm.x86.sse2.comilt.sd - 3, // llvm.x86.sse2.comineq.sd - 3, // llvm.x86.sse2.cvtdq2ps - 3, // llvm.x86.sse2.cvtpd2dq - 3, // llvm.x86.sse2.cvtpd2ps - 3, // llvm.x86.sse2.cvtps2dq - 3, // llvm.x86.sse2.cvtsd2si - 3, // llvm.x86.sse2.cvtsd2si64 - 3, // llvm.x86.sse2.cvtsd2ss - 3, // llvm.x86.sse2.cvtsi2sd - 3, // llvm.x86.sse2.cvtsi642sd - 3, // llvm.x86.sse2.cvtss2sd - 3, // llvm.x86.sse2.cvttpd2dq - 3, // llvm.x86.sse2.cvttps2dq - 3, // llvm.x86.sse2.cvttsd2si - 3, // llvm.x86.sse2.cvttsd2si64 - 3, // llvm.x86.sse2.div.sd - 2, // llvm.x86.sse2.lfence - 2, // llvm.x86.sse2.maskmov.dqu - 3, // llvm.x86.sse2.max.pd - 3, // llvm.x86.sse2.max.sd - 2, // llvm.x86.sse2.mfence - 3, // llvm.x86.sse2.min.pd - 3, // llvm.x86.sse2.min.sd - 3, // llvm.x86.sse2.movmsk.pd - 3, // llvm.x86.sse2.mul.sd - 3, // llvm.x86.sse2.packssdw.128 - 3, // llvm.x86.sse2.packsswb.128 - 3, // llvm.x86.sse2.packuswb.128 - 3, // llvm.x86.sse2.padds.b - 3, // llvm.x86.sse2.padds.w - 3, // llvm.x86.sse2.paddus.b - 3, // llvm.x86.sse2.paddus.w - 2, // llvm.x86.sse2.pause - 3, // llvm.x86.sse2.pavg.b - 3, // llvm.x86.sse2.pavg.w - 3, // llvm.x86.sse2.pmadd.wd - 3, // llvm.x86.sse2.pmovmskb.128 - 3, // llvm.x86.sse2.pmulh.w - 3, // llvm.x86.sse2.pmulhu.w - 3, // llvm.x86.sse2.pmulu.dq - 3, // llvm.x86.sse2.psad.bw - 3, // llvm.x86.sse2.psll.d - 3, // llvm.x86.sse2.psll.q - 3, // llvm.x86.sse2.psll.w - 3, // llvm.x86.sse2.pslli.d - 3, // llvm.x86.sse2.pslli.q - 3, // llvm.x86.sse2.pslli.w - 3, // llvm.x86.sse2.psra.d - 3, // llvm.x86.sse2.psra.w - 3, // llvm.x86.sse2.psrai.d - 3, // llvm.x86.sse2.psrai.w - 3, // llvm.x86.sse2.psrl.d - 3, // llvm.x86.sse2.psrl.q - 3, // llvm.x86.sse2.psrl.w - 3, // llvm.x86.sse2.psrli.d - 3, // llvm.x86.sse2.psrli.q - 3, // llvm.x86.sse2.psrli.w - 3, // llvm.x86.sse2.psubs.b - 3, // llvm.x86.sse2.psubs.w - 3, // llvm.x86.sse2.psubus.b - 3, // llvm.x86.sse2.psubus.w - 3, // llvm.x86.sse2.sqrt.pd - 3, // llvm.x86.sse2.sqrt.sd - 3, // llvm.x86.sse2.sub.sd - 3, // llvm.x86.sse2.ucomieq.sd - 3, // llvm.x86.sse2.ucomige.sd - 3, // llvm.x86.sse2.ucomigt.sd - 3, // llvm.x86.sse2.ucomile.sd - 3, // llvm.x86.sse2.ucomilt.sd - 3, // llvm.x86.sse2.ucomineq.sd - 3, // llvm.x86.sse3.addsub.pd - 3, // llvm.x86.sse3.addsub.ps - 3, // llvm.x86.sse3.hadd.pd - 3, // llvm.x86.sse3.hadd.ps - 3, // llvm.x86.sse3.hsub.pd - 3, // llvm.x86.sse3.hsub.ps - 6, // llvm.x86.sse3.ldu.dq - 2, // llvm.x86.sse3.monitor - 2, // llvm.x86.sse3.mwait - 3, // llvm.x86.sse41.blendvpd - 3, // llvm.x86.sse41.blendvps - 3, // llvm.x86.sse41.dppd - 3, // llvm.x86.sse41.dpps - 3, // llvm.x86.sse41.insertps - 6, // llvm.x86.sse41.movntdqa - 3, // llvm.x86.sse41.mpsadbw - 3, // llvm.x86.sse41.packusdw - 3, // llvm.x86.sse41.pblendvb - 3, // llvm.x86.sse41.phminposuw - 3, // llvm.x86.sse41.pmuldq - 3, // llvm.x86.sse41.ptestc - 3, // llvm.x86.sse41.ptestnzc - 3, // llvm.x86.sse41.ptestz - 3, // llvm.x86.sse41.round.pd - 3, // llvm.x86.sse41.round.ps - 3, // llvm.x86.sse41.round.sd - 3, // llvm.x86.sse41.round.ss - 3, // llvm.x86.sse42.crc32.32.16 - 3, // llvm.x86.sse42.crc32.32.32 - 3, // llvm.x86.sse42.crc32.32.8 - 3, // llvm.x86.sse42.crc32.64.64 - 3, // llvm.x86.sse42.pcmpestri128 - 3, // llvm.x86.sse42.pcmpestria128 - 3, // llvm.x86.sse42.pcmpestric128 - 3, // llvm.x86.sse42.pcmpestrio128 - 3, // llvm.x86.sse42.pcmpestris128 - 3, // llvm.x86.sse42.pcmpestriz128 - 3, // llvm.x86.sse42.pcmpestrm128 - 3, // llvm.x86.sse42.pcmpistri128 - 3, // llvm.x86.sse42.pcmpistria128 - 3, // llvm.x86.sse42.pcmpistric128 - 3, // llvm.x86.sse42.pcmpistrio128 - 3, // llvm.x86.sse42.pcmpistris128 - 3, // llvm.x86.sse42.pcmpistriz128 - 3, // llvm.x86.sse42.pcmpistrm128 - 3, // llvm.x86.sse4a.extrq - 3, // llvm.x86.sse4a.extrqi - 3, // llvm.x86.sse4a.insertq - 3, // llvm.x86.sse4a.insertqi - 3, // llvm.x86.ssse3.pabs.b - 3, // llvm.x86.ssse3.pabs.b.128 - 3, // llvm.x86.ssse3.pabs.d - 3, // llvm.x86.ssse3.pabs.d.128 - 3, // llvm.x86.ssse3.pabs.w - 3, // llvm.x86.ssse3.pabs.w.128 - 3, // llvm.x86.ssse3.phadd.d - 3, // llvm.x86.ssse3.phadd.d.128 - 3, // llvm.x86.ssse3.phadd.sw - 3, // llvm.x86.ssse3.phadd.sw.128 - 3, // llvm.x86.ssse3.phadd.w - 3, // llvm.x86.ssse3.phadd.w.128 - 3, // llvm.x86.ssse3.phsub.d - 3, // llvm.x86.ssse3.phsub.d.128 - 3, // llvm.x86.ssse3.phsub.sw - 3, // llvm.x86.ssse3.phsub.sw.128 - 3, // llvm.x86.ssse3.phsub.w - 3, // llvm.x86.ssse3.phsub.w.128 - 3, // llvm.x86.ssse3.pmadd.ub.sw - 3, // llvm.x86.ssse3.pmadd.ub.sw.128 - 3, // llvm.x86.ssse3.pmul.hr.sw - 3, // llvm.x86.ssse3.pmul.hr.sw.128 - 3, // llvm.x86.ssse3.pshuf.b - 3, // llvm.x86.ssse3.pshuf.b.128 - 3, // llvm.x86.ssse3.psign.b - 3, // llvm.x86.ssse3.psign.b.128 - 3, // llvm.x86.ssse3.psign.d - 3, // llvm.x86.ssse3.psign.d.128 - 3, // llvm.x86.ssse3.psign.w - 3, // llvm.x86.ssse3.psign.w.128 - 11, // llvm.x86.subborrow.u32 - 11, // llvm.x86.subborrow.u64 - 3, // llvm.x86.tbm.bextri.u32 - 3, // llvm.x86.tbm.bextri.u64 - 3, // llvm.x86.vcvtph2ps.128 - 3, // llvm.x86.vcvtph2ps.256 - 3, // llvm.x86.vcvtps2ph.128 - 3, // llvm.x86.vcvtps2ph.256 - 2, // llvm.x86.wrfsbase.32 - 2, // llvm.x86.wrfsbase.64 - 2, // llvm.x86.wrgsbase.32 - 2, // llvm.x86.wrgsbase.64 - 2, // llvm.x86.wrpkru - 2, // llvm.x86.xabort - 2, // llvm.x86.xbegin - 2, // llvm.x86.xend - 3, // llvm.x86.xop.vfrcz.pd - 3, // llvm.x86.xop.vfrcz.pd.256 - 3, // llvm.x86.xop.vfrcz.ps - 3, // llvm.x86.xop.vfrcz.ps.256 - 3, // llvm.x86.xop.vfrcz.sd - 3, // llvm.x86.xop.vfrcz.ss - 3, // llvm.x86.xop.vpcmov - 3, // llvm.x86.xop.vpcmov.256 - 3, // llvm.x86.xop.vpcomb - 3, // llvm.x86.xop.vpcomd - 3, // llvm.x86.xop.vpcomq - 3, // llvm.x86.xop.vpcomub - 3, // llvm.x86.xop.vpcomud - 3, // llvm.x86.xop.vpcomuq - 3, // llvm.x86.xop.vpcomuw - 3, // llvm.x86.xop.vpcomw - 3, // llvm.x86.xop.vpermil2pd - 3, // llvm.x86.xop.vpermil2pd.256 - 3, // llvm.x86.xop.vpermil2ps - 3, // llvm.x86.xop.vpermil2ps.256 - 3, // llvm.x86.xop.vphaddbd - 3, // llvm.x86.xop.vphaddbq - 3, // llvm.x86.xop.vphaddbw - 3, // llvm.x86.xop.vphadddq - 3, // llvm.x86.xop.vphaddubd - 3, // llvm.x86.xop.vphaddubq - 3, // llvm.x86.xop.vphaddubw - 3, // llvm.x86.xop.vphaddudq - 3, // llvm.x86.xop.vphadduwd - 3, // llvm.x86.xop.vphadduwq - 3, // llvm.x86.xop.vphaddwd - 3, // llvm.x86.xop.vphaddwq - 3, // llvm.x86.xop.vphsubbw - 3, // llvm.x86.xop.vphsubdq - 3, // llvm.x86.xop.vphsubwd - 3, // llvm.x86.xop.vpmacsdd - 3, // llvm.x86.xop.vpmacsdqh - 3, // llvm.x86.xop.vpmacsdql - 3, // llvm.x86.xop.vpmacssdd - 3, // llvm.x86.xop.vpmacssdqh - 3, // llvm.x86.xop.vpmacssdql - 3, // llvm.x86.xop.vpmacsswd - 3, // llvm.x86.xop.vpmacssww - 3, // llvm.x86.xop.vpmacswd - 3, // llvm.x86.xop.vpmacsww - 3, // llvm.x86.xop.vpmadcsswd - 3, // llvm.x86.xop.vpmadcswd - 3, // llvm.x86.xop.vpperm - 3, // llvm.x86.xop.vprotb - 3, // llvm.x86.xop.vprotbi - 3, // llvm.x86.xop.vprotd - 3, // llvm.x86.xop.vprotdi - 3, // llvm.x86.xop.vprotq - 3, // llvm.x86.xop.vprotqi - 3, // llvm.x86.xop.vprotw - 3, // llvm.x86.xop.vprotwi - 3, // llvm.x86.xop.vpshab - 3, // llvm.x86.xop.vpshad - 3, // llvm.x86.xop.vpshaq - 3, // llvm.x86.xop.vpshaw - 3, // llvm.x86.xop.vpshlb - 3, // llvm.x86.xop.vpshld - 3, // llvm.x86.xop.vpshlq - 3, // llvm.x86.xop.vpshlw - 2, // llvm.x86.xrstor - 2, // llvm.x86.xrstor64 - 2, // llvm.x86.xrstors - 2, // llvm.x86.xrstors64 - 2, // llvm.x86.xsave - 2, // llvm.x86.xsave64 - 2, // llvm.x86.xsavec - 2, // llvm.x86.xsavec64 - 2, // llvm.x86.xsaveopt - 2, // llvm.x86.xsaveopt64 - 2, // llvm.x86.xsaves - 2, // llvm.x86.xsaves64 - 2, // llvm.x86.xtest - 3, // llvm.xcore.bitrev - 2, // llvm.xcore.checkevent - 26, // llvm.xcore.chkct - 2, // llvm.xcore.clre - 26, // llvm.xcore.clrpt - 2, // llvm.xcore.clrsr - 3, // llvm.xcore.crc32 - 3, // llvm.xcore.crc8 - 26, // llvm.xcore.edu - 26, // llvm.xcore.eeu - 26, // llvm.xcore.endin - 26, // llvm.xcore.freer - 2, // llvm.xcore.geted - 2, // llvm.xcore.getet - 3, // llvm.xcore.getid - 2, // llvm.xcore.getps - 2, // llvm.xcore.getr - 26, // llvm.xcore.getst - 26, // llvm.xcore.getts - 26, // llvm.xcore.in - 26, // llvm.xcore.inct - 26, // llvm.xcore.initcp - 26, // llvm.xcore.initdp - 26, // llvm.xcore.initlr - 26, // llvm.xcore.initpc - 26, // llvm.xcore.initsp - 26, // llvm.xcore.inshr - 26, // llvm.xcore.int - 26, // llvm.xcore.mjoin - 26, // llvm.xcore.msync - 26, // llvm.xcore.out - 26, // llvm.xcore.outct - 26, // llvm.xcore.outshr - 26, // llvm.xcore.outt - 26, // llvm.xcore.peek - 26, // llvm.xcore.setc - 27, // llvm.xcore.setclk - 26, // llvm.xcore.setd - 26, // llvm.xcore.setev - 2, // llvm.xcore.setps - 26, // llvm.xcore.setpsc - 26, // llvm.xcore.setpt - 27, // llvm.xcore.setrdy - 2, // llvm.xcore.setsr - 26, // llvm.xcore.settw - 26, // llvm.xcore.setv - 3, // llvm.xcore.sext - 2, // llvm.xcore.ssync - 26, // llvm.xcore.syncr - 26, // llvm.xcore.testct - 26, // llvm.xcore.testwct - 6, // llvm.xcore.waitevent - 3, // llvm.xcore.zext - }; - - AttributeSet AS[5]; - unsigned NumAttrs = 0; - if (id != 0) { - switch(IntrinsicsToAttributesMap[id - 1]) { - default: llvm_unreachable("Invalid attribute number"); - case 2: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 26: { - const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 1, AttrParam1); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 27: { - const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 1, AttrParam1); - const Attribute::AttrKind AttrParam2[]= {Attribute::NoCapture}; - AS[1] = AttributeSet::get(C, 2, AttrParam2); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind}; - AS[2] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 3; - break; - } - case 11: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 8: { - const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 1, AttrParam1); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 14: { - const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture,Attribute::WriteOnly}; - AS[0] = AttributeSet::get(C, 1, AttrParam1); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 12: { - const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture,Attribute::WriteOnly}; - AS[0] = AttributeSet::get(C, 1, AttrParam1); - const Attribute::AttrKind AttrParam2[]= {Attribute::NoCapture,Attribute::ReadOnly}; - AS[1] = AttributeSet::get(C, 2, AttrParam2); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[2] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 3; - break; - } - case 13: { - const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 1, AttrParam1); - const Attribute::AttrKind AttrParam2[]= {Attribute::NoCapture,Attribute::ReadOnly}; - AS[1] = AttributeSet::get(C, 2, AttrParam2); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[2] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 3; - break; - } - case 10: { - const Attribute::AttrKind AttrParam2[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 2, AttrParam2); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 7: { - const Attribute::AttrKind AttrParam2[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 2, AttrParam2); - const Attribute::AttrKind AttrParam3[]= {Attribute::NoCapture}; - AS[1] = AttributeSet::get(C, 3, AttrParam3); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[2] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 3; - break; - } - case 9: { - const Attribute::AttrKind AttrParam3[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 3, AttrParam3); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 15: { - const Attribute::AttrKind AttrParam4[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 4, AttrParam4); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 16: { - const Attribute::AttrKind AttrParam5[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 5, AttrParam5); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 17: { - const Attribute::AttrKind AttrParam6[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 6, AttrParam6); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ArgMemOnly}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 18: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::WriteOnly}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 6: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ReadOnly}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 1: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ReadOnly,Attribute::ArgMemOnly}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 22: { - const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 1, AttrParam1); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ReadOnly,Attribute::ArgMemOnly}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 3: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ReadNone}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 23: { - const Attribute::AttrKind AttrParam1[]= {Attribute::NoCapture}; - AS[0] = AttributeSet::get(C, 1, AttrParam1); - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::ReadNone}; - AS[1] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 2; - break; - } - case 20: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::Convergent}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 19: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::Convergent,Attribute::ReadNone}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 4: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::NoReturn}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 25: { - const Attribute::AttrKind Atts[] = {Attribute::NoUnwind,Attribute::NoDuplicate}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 5: { - return AttributeSet(); - } - case 21: { - const Attribute::AttrKind Atts[] = {Attribute::ReadNone}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - case 24: { - const Attribute::AttrKind Atts[] = {Attribute::NoReturn}; - AS[0] = AttributeSet::get(C, AttributeSet::FunctionIndex, Atts); - NumAttrs = 1; - break; - } - } - } - return AttributeSet::get(C, makeArrayRef(AS, NumAttrs)); -} -#endif // GET_INTRINSIC_ATTRIBUTES - -// Get the LLVM intrinsic that corresponds to a builtin. -// This is used by the C front-end. The builtin name is passed -// in as BuiltinName, and a target prefix (e.g. 'ppc') is passed -// in as TargetPrefix. The result is assigned to 'IntrinsicID'. -#ifdef GET_LLVM_INTRINSIC_FOR_GCC_BUILTIN -Intrinsic::ID Intrinsic::getIntrinsicForGCCBuiltin(const char *TargetPrefixStr, const char *BuiltinNameStr) { - static const char BuiltinNames[] = { - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'd', 'j', 'u', 's', - 't', '_', 't', 'r', 'a', 'm', 'p', 'o', 'l', 'i', 'n', 'e', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'd', 'e', 'b', 'u', 'g', 't', 'r', - 'a', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'u', 'n', - 'w', 'i', 'n', 'd', '_', 'i', 'n', 'i', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'f', 'l', 't', '_', 'r', 'o', 'u', 'n', 'd', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'n', 'i', 't', - '_', 't', 'r', 'a', 'm', 'p', 'o', 'l', 'i', 'n', 'e', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'o', 'b', 'j', 'e', 'c', 't', '_', 's', - 'i', 'z', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - 't', 'a', 'c', 'k', '_', 'r', 'e', 's', 't', 'o', 'r', 'e', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', 't', 'a', 'c', 'k', '_', 's', - 'a', 'v', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', - 'h', 'r', 'e', 'a', 'd', '_', 'p', 'o', 'i', 'n', 't', 'e', 'r', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 'r', 'a', 'p', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'd', 'm', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', - '_', 'd', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'r', 'm', '_', 'i', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'b', 'u', 'f', 'f', 'e', - 'r', '_', 'w', 'b', 'i', 'n', 'v', 'l', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'b', 'u', 'f', - 'f', 'e', 'r', '_', 'w', 'b', 'i', 'n', 'v', 'l', '1', '_', 's', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', - 'n', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'w', 'b', 'i', 'n', 'v', 'l', - '1', '_', 'v', 'o', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'c', 'u', 'b', 'e', 'i', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', - 'n', '_', 'c', 'u', 'b', 'e', 'm', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'c', 'u', 'b', 'e', - 's', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', - 'd', 'g', 'c', 'n', '_', 'c', 'u', 'b', 'e', 't', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'd', - 'i', 's', 'p', 'a', 't', 'c', 'h', '_', 'p', 't', 'r', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'd', - 's', '_', 's', 'w', 'i', 'z', 'z', 'l', 'e', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'g', 'r', 'o', - 'u', 'p', 's', 't', 'a', 't', 'i', 'c', 's', 'i', 'z', 'e', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', - 'i', 'm', 'p', 'l', 'i', 'c', 'i', 't', 'a', 'r', 'g', '_', 'p', 't', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', - 'c', 'n', '_', 'i', 'n', 't', 'e', 'r', 'p', '_', 'p', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', - 'i', 'n', 't', 'e', 'r', 'p', '_', 'p', '2', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'k', 'e', 'r', - 'n', 'a', 'r', 'g', '_', 's', 'e', 'g', 'm', 'e', 'n', 't', '_', 'p', 't', - 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', - 'g', 'c', 'n', '_', 'l', 'e', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'm', 'b', 'c', 'n', - 't', '_', 'h', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'm', 'd', 'g', 'c', 'n', '_', 'm', 'b', 'c', 'n', 't', '_', 'l', 'o', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', - 'c', 'n', '_', 'q', 'u', 'e', 'u', 'e', '_', 'p', 't', 'r', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', - 'r', 's', 'q', '_', 'l', 'e', 'g', 'a', 'c', 'y', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 's', '_', - 'b', 'a', 'r', 'r', 'i', 'e', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 's', '_', 'd', 'c', 'a', - 'c', 'h', 'e', '_', 'i', 'n', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 's', '_', 'd', 'c', 'a', - 'c', 'h', 'e', '_', 'i', 'n', 'v', '_', 'v', 'o', 'l', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 's', - '_', 'd', 'c', 'a', 'c', 'h', 'e', '_', 'w', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 's', '_', - 'd', 'c', 'a', 'c', 'h', 'e', '_', 'w', 'b', '_', 'v', 'o', 'l', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', - '_', 's', '_', 'g', 'e', 't', 'r', 'e', 'g', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 's', '_', 'm', - 'e', 'm', 'r', 'e', 'a', 'l', 't', 'i', 'm', 'e', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 's', '_', - 'm', 'e', 'm', 't', 'i', 'm', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 's', '_', 's', 'l', 'e', - 'e', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'm', - 'd', 'g', 'c', 'n', '_', 'w', 'o', 'r', 'k', 'g', 'r', 'o', 'u', 'p', '_', - 'i', 'd', '_', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'm', 'd', 'g', 'c', 'n', '_', 'w', 'o', 'r', 'k', 'g', 'r', 'o', 'u', - 'p', '_', 'i', 'd', '_', 'y', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'm', 'd', 'g', 'c', 'n', '_', 'w', 'o', 'r', 'k', 'g', 'r', - 'o', 'u', 'p', '_', 'i', 'd', '_', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'c', 'd', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'c', 'd', 'p', '2', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', - 'g', 'e', 't', '_', 'f', 'p', 's', 'c', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'l', 'd', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'l', 'd', 'c', - '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', - '_', 'l', 'd', 'c', '2', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'r', 'm', '_', 'l', 'd', 'c', 'l', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'm', 'c', 'r', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'm', 'c', - 'r', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', - 'm', '_', 'm', 'r', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'r', 'm', '_', 'm', 'r', 'c', '2', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'q', 'a', 'd', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 'q', 's', - 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', - 'm', '_', 's', 'e', 't', '_', 'f', 'p', 's', 'c', 'r', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 's', 's', 'a', 't', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', - 's', 't', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'r', 'm', '_', 's', 't', 'c', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'r', 'm', '_', 's', 't', 'c', '2', 'l', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', '_', 's', 't', 'c', - 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'r', 'm', - '_', 'u', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'b', 'p', 'f', '_', 'l', 'o', 'a', 'd', '_', 'b', 'y', 't', 'e', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'b', 'p', 'f', '_', 'l', - 'o', 'a', 'd', '_', 'h', 'a', 'l', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'b', 'p', 'f', '_', 'l', 'o', 'a', 'd', '_', 'w', 'o', - 'r', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'b', 'p', - 'f', '_', 'p', 's', 'e', 'u', 'd', 'o', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 'a', 'b', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'b', 's', 'p', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 'a', 'b', 's', 's', 'a', 't', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'a', 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', - 'd', 'd', 'h', '_', 'h', '1', '6', '_', 'h', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 'a', 'd', 'd', 'h', '_', 'h', '1', '6', '_', 'h', 'l', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 'h', '_', 'h', '1', '6', '_', 'l', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 'h', '_', 'h', '1', - '6', '_', 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 'h', - '_', 'h', '1', '6', '_', 's', 'a', 't', '_', 'h', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 'a', 'd', 'd', 'h', '_', 'h', '1', '6', '_', 's', 'a', 't', - '_', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 'h', '_', - 'h', '1', '6', '_', 's', 'a', 't', '_', 'l', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 'a', 'd', 'd', 'h', '_', 'h', '1', '6', '_', 's', 'a', 't', '_', - 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 'h', '_', 'l', - '1', '6', '_', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'd', 'd', - 'h', '_', 'l', '1', '6', '_', 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 'a', 'd', 'd', 'h', '_', 'l', '1', '6', '_', 's', 'a', 't', '_', 'h', 'l', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 'h', '_', 'l', '1', '6', - '_', 's', 'a', 't', '_', 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', - 'd', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 'p', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 'p', 's', 'a', 't', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'A', '2', '_', 'a', 'd', 'd', 's', 'a', 't', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 'a', 'd', 'd', 's', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'n', 'd', 'i', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 'a', 'n', 'd', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 'a', 's', 'l', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'a', - 's', 'r', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'c', 'o', 'm', 'b', 'i', - 'n', 'e', '_', 'h', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'c', 'o', 'm', - 'b', 'i', 'n', 'e', '_', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'c', - 'o', 'm', 'b', 'i', 'n', 'e', '_', 'l', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', - '_', 'c', 'o', 'm', 'b', 'i', 'n', 'e', '_', 'l', 'l', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 'c', 'o', 'm', 'b', 'i', 'n', 'e', 'i', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'c', 'o', 'm', 'b', 'i', 'n', 'e', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'm', 'a', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'm', - 'a', 'x', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'm', 'a', 'x', 'u', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 'm', 'a', 'x', 'u', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 'm', 'i', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'm', 'i', - 'n', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'm', 'i', 'n', 'u', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'A', '2', '_', 'm', 'i', 'n', 'u', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 'n', 'e', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'n', 'e', 'g', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'n', 'e', 'g', 's', 'a', 't', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 'n', 'o', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', - '_', 'n', 'o', 't', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'o', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 'o', 'r', 'i', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 'o', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'r', 'o', 'u', - 'n', 'd', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'a', 't', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'a', 't', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 's', 'a', 't', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', - 'a', 't', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'a', 't', 'u', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'u', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 's', 'u', 'b', 'h', '_', 'h', '1', '6', '_', 'h', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 's', 'u', 'b', 'h', '_', 'h', '1', '6', '_', - 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'u', 'b', 'h', '_', 'h', - '1', '6', '_', 'l', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'u', 'b', - 'h', '_', 'h', '1', '6', '_', 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 's', 'u', 'b', 'h', '_', 'h', '1', '6', '_', 's', 'a', 't', '_', 'h', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'u', 'b', 'h', '_', 'h', '1', '6', - '_', 's', 'a', 't', '_', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', - 'u', 'b', 'h', '_', 'h', '1', '6', '_', 's', 'a', 't', '_', 'l', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 's', 'u', 'b', 'h', '_', 'h', '1', '6', '_', - 's', 'a', 't', '_', 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'u', - 'b', 'h', '_', 'l', '1', '6', '_', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', - '_', 's', 'u', 'b', 'h', '_', 'l', '1', '6', '_', 'l', 'l', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 's', 'u', 'b', 'h', '_', 'l', '1', '6', '_', 's', 'a', - 't', '_', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'u', 'b', 'h', - '_', 'l', '1', '6', '_', 's', 'a', 't', '_', 'l', 'l', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 's', 'u', 'b', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', - 'u', 'b', 'r', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'u', 'b', 's', - 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'v', 'a', 'd', 'd', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'v', 'a', 'd', 'd', 'h', 's', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 's', 'v', 'a', 'd', 'd', 'u', 'h', 's', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 's', 'v', 'a', 'v', 'g', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 's', 'v', 'a', 'v', 'g', 'h', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 's', 'v', 'n', 'a', 'v', 'g', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 's', 'v', 's', 'u', 'b', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 's', 'v', 's', 'u', 'b', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', - 'v', 's', 'u', 'b', 'u', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', - 'w', 'i', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 's', 'x', 't', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 's', 'x', 't', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 's', 'x', 't', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 't', 'f', - 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 't', 'f', 'r', 'i', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'A', '2', '_', 't', 'f', 'r', 'i', 'l', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 't', 'f', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 't', 'f', - 'r', 'p', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 't', 'f', 'r', 's', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'b', 's', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'v', 'a', 'b', 's', 'h', 's', 'a', 't', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'v', 'a', 'b', 's', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', - '_', 'v', 'a', 'b', 's', 'w', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', - '_', 'v', 'a', 'd', 'd', 'b', '_', 'm', 'a', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 'v', 'a', 'd', 'd', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', - 'a', 'd', 'd', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'd', - 'd', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'd', 'd', 'u', - 'b', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'd', 'd', 'u', 'h', - 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'd', 'd', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'A', '2', '_', 'v', 'a', 'd', 'd', 'w', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 'v', 'a', 'v', 'g', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 'v', 'a', 'v', 'g', 'h', 'c', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', - 'a', 'v', 'g', 'h', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'v', - 'g', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'v', 'g', 'u', - 'b', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'v', 'g', 'u', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'v', 'g', 'u', 'h', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 'v', 'a', 'v', 'g', 'u', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'v', 'a', 'v', 'g', 'u', 'w', 'r', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 'v', 'a', 'v', 'g', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 'v', 'a', 'v', 'g', 'w', 'c', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', - 'a', 'v', 'g', 'w', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'm', - 'p', 'b', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'm', 'p', - 'b', 'g', 't', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'm', 'p', - 'h', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'm', 'p', 'h', - 'g', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'm', 'p', 'h', 'g', - 't', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'm', 'p', 'w', 'e', - 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'm', 'p', 'w', 'g', 't', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'm', 'p', 'w', 'g', 't', 'u', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'c', 'o', 'n', 'j', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'v', 'm', 'a', 'x', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', - '_', 'v', 'm', 'a', 'x', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'm', - 'a', 'x', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'm', 'a', 'x', - 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'm', 'a', 'x', 'u', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'm', 'a', 'x', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'v', 'm', 'i', 'n', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', - '_', 'v', 'm', 'i', 'n', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'm', - 'i', 'n', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'm', 'i', 'n', - 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'm', 'i', 'n', 'u', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'm', 'i', 'n', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'v', 'n', 'a', 'v', 'g', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 'v', 'n', 'a', 'v', 'g', 'h', 'c', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 'v', 'n', 'a', 'v', 'g', 'h', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', - '_', 'v', 'n', 'a', 'v', 'g', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', - 'n', 'a', 'v', 'g', 'w', 'c', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', - 'n', 'a', 'v', 'g', 'w', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'r', - 'a', 'd', 'd', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 'r', 'a', - 'd', 'd', 'u', 'b', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 'v', 'r', 's', 'a', 'd', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', - 'r', 's', 'a', 'd', 'u', 'b', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '2', '_', 'v', 's', 'u', 'b', 'b', '_', 'm', 'a', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '2', '_', 'v', 's', 'u', 'b', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', - 'v', 's', 'u', 'b', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 's', - 'u', 'b', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 's', 'u', 'b', - 'u', 'b', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 's', 'u', 'b', 'u', - 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'v', 's', 'u', 'b', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 'v', 's', 'u', 'b', 'w', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '2', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'x', - 'o', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '2', '_', 'z', 'x', 't', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '2', '_', 'z', 'x', 't', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'a', 'n', 'd', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'a', 'n', - 'd', 'n', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'b', 'i', 't', 's', 'p', - 'l', 'i', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'b', 'i', 't', 's', 'p', - 'l', 'i', 't', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'b', 'o', 'u', 'n', - 'd', 's', 'c', 'h', 'e', 'c', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'c', - 'm', 'p', 'b', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'c', 'm', 'p', - 'b', 'e', 'q', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'c', 'm', 'p', 'b', - 'g', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'c', 'm', 'p', 'b', 'g', 't', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'c', 'm', 'p', 'b', 'g', 't', 'u', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '4', '_', 'c', 'm', 'p', 'b', 'g', 't', 'u', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '4', '_', 'c', 'm', 'p', 'h', 'e', 'q', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'A', '4', '_', 'c', 'm', 'p', 'h', 'e', 'q', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '4', '_', 'c', 'm', 'p', 'h', 'g', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'c', 'm', 'p', 'h', 'g', 't', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', - '_', 'c', 'm', 'p', 'h', 'g', 't', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', - 'c', 'm', 'p', 'h', 'g', 't', 'u', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', - 'c', 'o', 'm', 'b', 'i', 'n', 'e', 'i', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', - '_', 'c', 'o', 'm', 'b', 'i', 'n', 'e', 'r', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'c', 'r', 'o', 'u', 'n', 'd', '_', 'r', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '4', '_', 'c', 'r', 'o', 'u', 'n', 'd', '_', 'r', 'r', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '4', '_', 'm', 'o', 'd', 'w', 'r', 'a', 'p', 'u', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '4', '_', 'o', 'r', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'o', - 'r', 'n', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'r', 'c', 'm', 'p', 'e', - 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'r', 'c', 'm', 'p', 'e', 'q', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '4', '_', 'r', 'c', 'm', 'p', 'n', 'e', 'q', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '4', '_', 'r', 'c', 'm', 'p', 'n', 'e', 'q', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '4', '_', 'r', 'o', 'u', 'n', 'd', '_', 'r', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'A', '4', '_', 'r', 'o', 'u', 'n', 'd', '_', 'r', 'i', '_', - 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'r', 'o', 'u', 'n', 'd', - '_', 'r', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'r', 'o', 'u', 'n', 'd', - '_', 'r', 'r', '_', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 't', - 'l', 'b', 'm', 'a', 't', 'c', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'v', - 'c', 'm', 'p', 'b', 'e', 'q', '_', 'a', 'n', 'y', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'v', 'c', 'm', 'p', 'b', 'e', 'q', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'v', 'c', 'm', 'p', 'b', 'g', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', - '_', 'v', 'c', 'm', 'p', 'b', 'g', 't', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', - '_', 'v', 'c', 'm', 'p', 'b', 'g', 't', 'u', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'v', 'c', 'm', 'p', 'h', 'e', 'q', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'v', 'c', 'm', 'p', 'h', 'g', 't', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'v', 'c', 'm', 'p', 'h', 'g', 't', 'u', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '4', '_', 'v', 'c', 'm', 'p', 'w', 'e', 'q', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '4', '_', 'v', 'c', 'm', 'p', 'w', 'g', 't', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'A', '4', '_', 'v', 'c', 'm', 'p', 'w', 'g', 't', 'u', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'A', '4', '_', 'v', 'r', 'm', 'a', 'x', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', - '4', '_', 'v', 'r', 'm', 'a', 'x', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', - '_', 'v', 'r', 'm', 'a', 'x', 'u', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', - 'v', 'r', 'm', 'a', 'x', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'v', 'r', - 'm', 'i', 'n', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'v', 'r', 'm', 'i', - 'n', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'v', 'r', 'm', 'i', 'n', - 'u', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'A', '4', '_', 'v', 'r', 'm', 'i', 'n', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'A', '5', '_', 'v', 'a', 'd', 'd', 'h', 'u', 'b', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'C', '2', '_', 'a', 'l', 'l', '8', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'C', '2', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'a', 'n', - 'd', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'a', 'n', 'y', '8', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'C', '2', '_', 'b', 'i', 't', 's', 'c', 'l', 'r', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'C', '2', '_', 'b', 'i', 't', 's', 'c', 'l', 'r', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'C', '2', '_', 'b', 'i', 't', 's', 's', 'e', 't', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'C', '2', '_', 'c', 'm', 'p', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', - 'c', 'm', 'p', 'e', 'q', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'c', 'm', - 'p', 'e', 'q', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'c', 'm', 'p', 'g', - 'e', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'c', 'm', 'p', 'g', 'e', 'u', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'c', 'm', 'p', 'g', 't', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'C', '2', '_', 'c', 'm', 'p', 'g', 't', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'C', '2', '_', 'c', 'm', 'p', 'g', 't', 'p', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', - '_', 'c', 'm', 'p', 'g', 't', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'c', - 'm', 'p', 'g', 't', 'u', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'c', 'm', - 'p', 'g', 't', 'u', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'c', 'm', 'p', - 'l', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'c', 'm', 'p', 'l', 't', 'u', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'C', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'C', '2', '_', 'm', 'u', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'm', 'u', - 'x', 'i', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'm', 'u', 'x', 'i', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'C', '2', '_', 'm', 'u', 'x', 'r', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'C', '2', '_', 'n', 'o', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'o', - 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'o', 'r', 'n', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'C', '2', '_', 'p', 'x', 'f', 'e', 'r', '_', 'm', 'a', 'p', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'C', '2', '_', 't', 'f', 'r', 'p', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', - '_', 't', 'f', 'r', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'v', 'i', - 't', 'p', 'a', 'c', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'v', 'm', 'u', - 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'C', '2', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'C', '4', '_', 'a', 'n', 'd', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', - '4', '_', 'a', 'n', 'd', '_', 'a', 'n', 'd', 'n', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', - '4', '_', 'a', 'n', 'd', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', - 'a', 'n', 'd', '_', 'o', 'r', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', 'c', - 'm', 'p', 'l', 't', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', 'c', 'm', 'p', - 'l', 't', 'e', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', 'c', 'm', 'p', 'l', - 't', 'e', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', 'c', 'm', 'p', 'l', 't', - 'e', 'u', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', 'c', 'm', 'p', 'n', 'e', - 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'C', '4', '_', 'c', 'm', 'p', 'n', 'e', 'q', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'C', '4', '_', 'f', 'a', 's', 't', 'c', 'o', 'r', 'n', - 'e', 'r', '9', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', 'f', 'a', 's', 't', 'c', - 'o', 'r', 'n', 'e', 'r', '9', '_', 'n', 'o', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', - '4', '_', 'n', 'b', 'i', 't', 's', 'c', 'l', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', - '4', '_', 'n', 'b', 'i', 't', 's', 'c', 'l', 'r', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'C', '4', '_', 'n', 'b', 'i', 't', 's', 's', 'e', 't', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'C', '4', '_', 'o', 'r', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', - '_', 'o', 'r', '_', 'a', 'n', 'd', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', - 'o', 'r', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'C', '4', '_', 'o', 'r', '_', - 'o', 'r', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', - 'd', '2', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', - '_', 'd', '2', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', - 'v', '_', 'd', 'f', '2', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', - 'n', 'v', '_', 'd', 'f', '2', 'd', '_', 'c', 'h', 'o', 'p', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 'd', 'f', '2', 's', 'f', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 'd', 'f', '2', 'u', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 'd', 'f', - '2', 'u', 'd', '_', 'c', 'h', 'o', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', - 'c', 'o', 'n', 'v', '_', 'd', 'f', '2', 'u', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', - '2', '_', 'c', 'o', 'n', 'v', '_', 'd', 'f', '2', 'u', 'w', '_', 'c', 'h', - 'o', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 'd', - 'f', '2', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', - 'd', 'f', '2', 'w', '_', 'c', 'h', 'o', 'p', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', - '_', 'c', 'o', 'n', 'v', '_', 's', 'f', '2', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', - '2', '_', 'c', 'o', 'n', 'v', '_', 's', 'f', '2', 'd', '_', 'c', 'h', 'o', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 's', 'f', - '2', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', - 's', 'f', '2', 'u', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', - 'v', '_', 's', 'f', '2', 'u', 'd', '_', 'c', 'h', 'o', 'p', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 's', 'f', '2', 'u', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 's', 'f', '2', 'u', - 'w', '_', 'c', 'h', 'o', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', - 'n', 'v', '_', 's', 'f', '2', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', - 'o', 'n', 'v', '_', 's', 'f', '2', 'w', '_', 'c', 'h', 'o', 'p', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 'u', 'd', '2', 'd', 'f', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 'u', 'd', '2', - 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', '_', 'u', - 'w', '2', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', 'n', 'v', - '_', 'u', 'w', '2', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', 'o', - 'n', 'v', '_', 'w', '2', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'c', - 'o', 'n', 'v', '_', 'w', '2', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', - 'd', 'f', 'c', 'l', 'a', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'd', - 'f', 'c', 'm', 'p', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'd', 'f', - 'c', 'm', 'p', 'g', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'd', 'f', 'c', - 'm', 'p', 'g', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'd', 'f', 'c', 'm', - 'p', 'u', 'o', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'd', 'f', 'i', 'm', 'm', - '_', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 'd', 'f', 'i', 'm', 'm', '_', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 's', 'f', 'a', 'd', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'F', '2', '_', 's', 'f', 'c', 'l', 'a', 's', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'F', '2', '_', 's', 'f', 'c', 'm', 'p', 'e', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'F', '2', '_', 's', 'f', 'c', 'm', 'p', 'g', 'e', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', - '2', '_', 's', 'f', 'c', 'm', 'p', 'g', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', - '_', 's', 'f', 'c', 'm', 'p', 'u', 'o', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', - 's', 'f', 'f', 'i', 'x', 'u', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', - 's', 'f', 'f', 'i', 'x', 'u', 'p', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', - 's', 'f', 'f', 'i', 'x', 'u', 'p', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', - 's', 'f', 'f', 'm', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 's', 'f', 'f', - 'm', 'a', '_', 'l', 'i', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 's', 'f', - 'f', 'm', 'a', '_', 's', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 's', 'f', - 'f', 'm', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 's', 'f', 'f', 'm', 's', - '_', 'l', 'i', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 's', 'f', 'i', 'm', - 'm', '_', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 's', 'f', 'i', 'm', 'm', - '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', 's', 'f', 'm', 'a', 'x', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'F', '2', '_', 's', 'f', 'm', 'i', 'n', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'F', '2', '_', 's', 'f', 'm', 'p', 'y', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'F', '2', '_', - 's', 'f', 's', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'L', '2', '_', 'l', 'o', 'a', - 'd', 'w', '_', 'l', 'o', 'c', 'k', 'e', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'L', '4', - '_', 'l', 'o', 'a', 'd', 'd', '_', 'l', 'o', 'c', 'k', 'e', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'a', 'c', 'c', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'a', 'c', 'c', 'i', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'm', - 'a', 'c', 'i', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'm', - 'a', 'c', 'r', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'm', - 'a', 'c', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'm', - 'a', 'c', 's', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'm', - 'a', 'c', 's', 'c', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', - 'm', 'a', 'c', 's', 'c', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'c', 'm', 'p', 'y', 'i', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'c', 'm', 'p', 'y', 'r', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'c', 'm', 'p', 'y', 'r', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'c', 'm', 'p', 'y', 'r', 's', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'c', 'm', 'p', 'y', 'r', 's', 'c', '_', 's', '0', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'c', 'm', 'p', 'y', 'r', 's', 'c', '_', 's', '1', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'c', 'm', 'p', 'y', 's', '_', 's', '0', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'c', 'm', 'p', 'y', 's', '_', 's', '1', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'c', 'm', 'p', 'y', 's', 'c', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'm', 'p', 'y', 's', 'c', '_', 's', - '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'n', 'a', 'c', 's', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'n', 'a', 'c', 's', '_', 's', - '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'n', 'a', 'c', 's', 'c', '_', - 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'c', 'n', 'a', 'c', 's', 'c', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'd', 'p', 'm', 'p', 'y', - 's', 's', '_', 'a', 'c', 'c', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'd', 'p', 'm', 'p', 'y', 's', 's', '_', 'n', 'a', 'c', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'd', 'p', 'm', 'p', 'y', 's', 's', '_', - 'r', 'n', 'd', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'd', 'p', - 'm', 'p', 'y', 's', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'd', 'p', 'm', 'p', 'y', 'u', 'u', '_', 'a', 'c', 'c', '_', 's', '0', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'd', 'p', 'm', 'p', 'y', 'u', 'u', '_', 'n', - 'a', 'c', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'd', 'p', 'm', - 'p', 'y', 'u', 'u', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'h', - 'm', 'm', 'p', 'y', 'h', '_', 'r', 's', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'h', 'm', 'm', 'p', 'y', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'h', 'm', 'm', 'p', 'y', 'l', '_', 'r', 's', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'h', 'm', 'm', 'p', 'y', 'l', '_', 's', '1', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'a', 'c', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'a', 'c', 's', 'i', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'a', 'c', 's', 'i', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'a', - 'c', 'h', 's', '_', 'r', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'm', 'a', 'c', 'h', 's', '_', 'r', 's', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'm', 'a', 'c', 'h', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'm', 'a', 'c', 'h', 's', '_', 's', '1', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'm', 'a', 'c', 'l', 's', '_', 'r', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'm', 'a', 'c', 'l', 's', '_', 'r', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'a', 'c', 'l', 's', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'a', 'c', 'l', 's', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'a', 'c', 'u', 'h', - 's', '_', 'r', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'a', - 'c', 'u', 'h', 's', '_', 'r', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'm', 'a', 'c', 'u', 'h', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'm', 'a', 'c', 'u', 'h', 's', '_', 's', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'm', 'a', 'c', 'u', 'l', 's', '_', 'r', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'a', 'c', 'u', 'l', 's', '_', - 'r', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'a', 'c', 'u', - 'l', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'a', - 'c', 'u', 'l', 's', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'm', 'p', 'y', 'h', '_', 'r', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'm', 'p', 'y', 'h', '_', 'r', 's', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'm', 'p', 'y', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'm', 'p', 'y', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'm', 'p', 'y', 'l', '_', 'r', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'm', 'p', 'y', 'l', '_', 'r', 's', '1', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'm', 'p', 'y', 'l', '_', 's', '0', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'm', 'p', 'y', 'l', '_', 's', '1', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'm', 'p', 'y', 'u', 'h', '_', 'r', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'm', 'p', 'y', 'u', 'h', '_', 'r', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'p', 'y', 'u', 'h', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'p', 'y', 'u', 'h', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'p', 'y', 'u', 'l', - '_', 'r', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', 'p', 'y', - 'u', 'l', '_', 'r', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'm', - 'p', 'y', 'u', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'm', 'p', 'y', 'u', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 'h', 'h', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 'h', 'h', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', - 'c', 'c', '_', 'h', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 'h', 'l', '_', 's', '1', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 'l', 'h', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', - 'c', 'c', '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 'l', 'l', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 'l', 'l', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', - 'c', 'c', '_', 's', 'a', 't', '_', 'h', 'h', '_', 's', '0', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 's', 'a', 't', - '_', 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', '_', 'a', 'c', 'c', '_', 's', 'a', 't', '_', 'h', 'l', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', - 's', 'a', 't', '_', 'h', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 's', 'a', 't', '_', 'l', 'h', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', - 'c', 'c', '_', 's', 'a', 't', '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'a', 'c', 'c', '_', 's', 'a', 't', - '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', '_', 'a', 'c', 'c', '_', 's', 'a', 't', '_', 'l', 'l', '_', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'h', 'h', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'h', 'h', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'h', 'l', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'h', - 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', - 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'p', 'y', '_', 'l', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 'h', 'h', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 'h', 'h', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', - 'a', 'c', '_', 'h', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 'h', 'l', '_', 's', '1', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 'l', 'h', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', - 'a', 'c', '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 'l', 'l', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 'l', 'l', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', - 'a', 'c', '_', 's', 'a', 't', '_', 'h', 'h', '_', 's', '0', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 's', 'a', 't', - '_', 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', '_', 'n', 'a', 'c', '_', 's', 'a', 't', '_', 'h', 'l', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', - 's', 'a', 't', '_', 'h', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 's', 'a', 't', '_', 'l', 'h', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', - 'a', 'c', '_', 's', 'a', 't', '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'n', 'a', 'c', '_', 's', 'a', 't', - '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', '_', 'n', 'a', 'c', '_', 's', 'a', 't', '_', 'l', 'l', '_', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'r', 'n', 'd', '_', - 'h', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - '_', 'r', 'n', 'd', '_', 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', '_', 'r', 'n', 'd', '_', 'h', 'l', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'r', 'n', 'd', '_', - 'h', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - '_', 'r', 'n', 'd', '_', 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', '_', 'r', 'n', 'd', '_', 'l', 'h', '_', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'r', 'n', 'd', '_', - 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - '_', 'r', 'n', 'd', '_', 'l', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', 'h', 'h', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', - 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - '_', 's', 'a', 't', '_', 'h', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', 'h', 'l', '_', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', - 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - '_', 's', 'a', 't', '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', 'l', 'l', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', - 'l', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - '_', 's', 'a', 't', '_', 'r', 'n', 'd', '_', 'h', 'h', '_', 's', '0', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', 'r', - 'n', 'd', '_', 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', '_', 's', 'a', 't', '_', 'r', 'n', 'd', '_', 'h', 'l', '_', - 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 's', 'a', - 't', '_', 'r', 'n', 'd', '_', 'h', 'l', '_', 's', '1', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', 'r', 'n', 'd', '_', - 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - '_', 's', 'a', 't', '_', 'r', 'n', 'd', '_', 'l', 'h', '_', 's', '1', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 's', 'a', 't', '_', 'r', - 'n', 'd', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', '_', 's', 'a', 't', '_', 'r', 'n', 'd', '_', 'l', 'l', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'u', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'u', 'p', '_', 's', - '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', '_', 'u', 'p', '_', - 's', '1', '_', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', 'd', '_', 'a', 'c', 'c', '_', 'h', 'h', '_', 's', '0', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'a', 'c', 'c', '_', 'h', 'h', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', - 'a', 'c', 'c', '_', 'h', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'p', 'y', 'd', '_', 'a', 'c', 'c', '_', 'h', 'l', '_', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'a', 'c', 'c', - '_', 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', 'd', '_', 'a', 'c', 'c', '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'a', 'c', 'c', '_', 'l', 'l', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', - 'a', 'c', 'c', '_', 'l', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'p', 'y', 'd', '_', 'h', 'h', '_', 's', '0', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'h', 'h', '_', 's', '1', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'h', 'l', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'h', 'l', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'l', - 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', - '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', 'd', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', 'd', '_', 'l', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 'd', '_', 'n', 'a', 'c', '_', 'h', 'h', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'n', 'a', - 'c', '_', 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'p', 'y', 'd', '_', 'n', 'a', 'c', '_', 'h', 'l', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'n', 'a', 'c', '_', 'h', - 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', - '_', 'n', 'a', 'c', '_', 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 'd', '_', 'n', 'a', 'c', '_', 'l', 'h', '_', 's', - '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'n', 'a', - 'c', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'p', 'y', 'd', '_', 'n', 'a', 'c', '_', 'l', 'l', '_', 's', '1', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'r', 'n', 'd', '_', 'h', - 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', - '_', 'r', 'n', 'd', '_', 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 'd', '_', 'r', 'n', 'd', '_', 'h', 'l', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'r', 'n', - 'd', '_', 'h', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'p', 'y', 'd', '_', 'r', 'n', 'd', '_', 'l', 'h', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', '_', 'r', 'n', 'd', '_', 'l', - 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'd', - '_', 'r', 'n', 'd', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 'd', '_', 'r', 'n', 'd', '_', 'l', 'l', '_', 's', - '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', 's', 'm', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 's', 'u', '_', 'u', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 'u', '_', 'a', 'c', 'c', '_', 'h', 'h', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'a', 'c', - 'c', '_', 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'p', 'y', 'u', '_', 'a', 'c', 'c', '_', 'h', 'l', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'a', 'c', 'c', '_', 'h', - 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', - '_', 'a', 'c', 'c', '_', 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 'u', '_', 'a', 'c', 'c', '_', 'l', 'h', '_', 's', - '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'a', 'c', - 'c', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'p', 'y', 'u', '_', 'a', 'c', 'c', '_', 'l', 'l', '_', 's', '1', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'h', 'h', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'h', 'h', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'h', - 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', - '_', 'h', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', 'u', '_', 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', 'u', '_', 'l', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 'u', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'l', 'l', '_', 's', '1', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'n', 'a', 'c', '_', - 'h', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - 'u', '_', 'n', 'a', 'c', '_', 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'n', 'a', 'c', '_', 'h', 'l', '_', - 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'n', - 'a', 'c', '_', 'h', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', 'u', '_', 'n', 'a', 'c', '_', 'l', 'h', '_', 's', '0', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'n', 'a', 'c', '_', - 'l', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - 'u', '_', 'n', 'a', 'c', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'n', 'a', 'c', '_', 'l', 'l', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', '_', 'u', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'a', - 'c', 'c', '_', 'h', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'm', 'p', 'y', 'u', 'd', '_', 'a', 'c', 'c', '_', 'h', 'h', '_', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'a', 'c', - 'c', '_', 'h', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', - 'p', 'y', 'u', 'd', '_', 'a', 'c', 'c', '_', 'h', 'l', '_', 's', '1', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'a', 'c', 'c', - '_', 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', 'u', 'd', '_', 'a', 'c', 'c', '_', 'l', 'h', '_', 's', '1', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'a', 'c', 'c', '_', - 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - 'u', 'd', '_', 'a', 'c', 'c', '_', 'l', 'l', '_', 's', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'h', 'h', '_', 's', '0', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'h', 'h', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', - '_', 'h', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', 'u', 'd', '_', 'h', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'm', 'p', 'y', 'u', 'd', '_', 'l', 'h', '_', 's', '0', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'l', 'h', '_', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'l', 'l', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', - '_', 'l', 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', - 'y', 'u', 'd', '_', 'n', 'a', 'c', '_', 'h', 'h', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'n', 'a', 'c', '_', - 'h', 'h', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', - 'u', 'd', '_', 'n', 'a', 'c', '_', 'h', 'l', '_', 's', '0', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'n', 'a', 'c', '_', 'h', - 'l', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', - 'd', '_', 'n', 'a', 'c', '_', 'l', 'h', '_', 's', '0', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'n', 'a', 'c', '_', 'l', 'h', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'd', - '_', 'n', 'a', 'c', '_', 'l', 'l', '_', 's', '0', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'm', 'p', 'y', 'u', 'd', '_', 'n', 'a', 'c', '_', 'l', 'l', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'm', 'p', 'y', 'u', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'n', 'a', 'c', 'c', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'n', 'a', 'c', 'c', 'i', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 's', 'u', 'b', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', - 'a', 'b', 's', 'd', 'i', 'f', 'f', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'v', 'c', 'm', 'a', 'c', '_', 's', '0', '_', 's', 'a', 't', '_', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'c', 'm', 'a', 'c', '_', 's', '0', - '_', 's', 'a', 't', '_', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'c', - 'm', 'p', 'y', '_', 's', '0', '_', 's', 'a', 't', '_', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'v', 'c', 'm', 'p', 'y', '_', 's', '0', '_', 's', 'a', - 't', '_', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'c', 'm', 'p', 'y', - '_', 's', '1', '_', 's', 'a', 't', '_', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'v', 'c', 'm', 'p', 'y', '_', 's', '1', '_', 's', 'a', 't', '_', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'd', 'm', 'a', 'c', 's', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'd', 'm', 'a', 'c', 's', '_', - 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'd', 'm', 'p', 'y', 'r', - 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'd', 'm', 'p', - 'y', 'r', 's', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'd', - 'm', 'p', 'y', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', - 'd', 'm', 'p', 'y', 's', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'v', 'm', 'a', 'c', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'm', 'a', - 'c', '2', 'e', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'm', 'a', 'c', - '2', 'e', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'm', - 'a', 'c', '2', 'e', 's', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'v', 'm', 'a', 'c', '2', 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'v', 'm', 'a', 'c', '2', 's', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'v', 'm', 'a', 'c', '2', 's', 'u', '_', 's', '0', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'v', 'm', 'a', 'c', '2', 's', 'u', '_', 's', '1', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'v', 'm', 'p', 'y', '2', 'e', 's', '_', 's', - '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'm', 'p', 'y', '2', 'e', 's', - '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'm', 'p', 'y', '2', - 's', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'm', 'p', 'y', - '2', 's', '_', 's', '0', 'p', 'a', 'c', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', - '_', 'v', 'm', 'p', 'y', '2', 's', '_', 's', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '2', '_', 'v', 'm', 'p', 'y', '2', 's', '_', 's', '1', 'p', 'a', 'c', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'm', 'p', 'y', '2', 's', 'u', '_', - 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'm', 'p', 'y', '2', 's', - 'u', '_', 's', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'a', 'd', - 'd', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'a', 'd', 'd', 'u', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'c', 'm', 'a', 'c', 'i', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'c', 'm', 'a', - 'c', 'i', '_', 's', '0', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', - 'c', 'm', 'a', 'c', 'r', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', - 'v', 'r', 'c', 'm', 'a', 'c', 'r', '_', 's', '0', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '2', '_', 'v', 'r', 'c', 'm', 'p', 'y', 'i', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '2', '_', 'v', 'r', 'c', 'm', 'p', 'y', 'i', '_', 's', '0', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'c', 'm', 'p', 'y', 'r', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'c', 'm', 'p', - 'y', 'r', '_', 's', '0', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', - 'c', 'm', 'p', 'y', 's', '_', 'a', 'c', 'c', '_', 's', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '2', '_', 'v', 'r', 'c', 'm', 'p', 'y', 's', '_', 's', '1', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'c', 'm', 'p', 'y', 's', '_', 's', - '1', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'm', 'a', 'c', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'v', 'r', 'm', 'p', 'y', - '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '2', '_', 'x', 'o', 'r', '_', 'x', - 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'a', 'n', 'd', '_', 'a', - 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'a', 'n', 'd', '_', 'a', 'n', - 'd', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'a', 'n', 'd', '_', 'o', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '4', '_', 'a', 'n', 'd', '_', 'x', 'o', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '4', '_', 'c', 'm', 'p', 'y', 'i', '_', 'w', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '4', '_', 'c', 'm', 'p', 'y', 'i', '_', 'w', 'h', 'c', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '4', '_', 'c', 'm', 'p', 'y', 'r', '_', 'w', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '4', '_', 'c', 'm', 'p', 'y', 'r', '_', 'w', 'h', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'm', 'a', 'c', '_', 'u', 'p', '_', - 's', '1', '_', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'm', 'p', - 'y', 'r', 'i', '_', 'a', 'd', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', - 'm', 'p', 'y', 'r', 'i', '_', 'a', 'd', 'd', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '4', '_', 'm', 'p', 'y', 'r', 'i', '_', 'a', 'd', 'd', 'r', '_', 'u', '2', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '4', '_', 'm', 'p', 'y', 'r', 'r', '_', 'a', 'd', - 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'm', 'p', 'y', 'r', 'r', '_', - 'a', 'd', 'd', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'n', 'a', 'c', '_', - 'u', 'p', '_', 's', '1', '_', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', - '_', 'o', 'r', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'o', - 'r', '_', 'a', 'n', 'd', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'o', 'r', - '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'o', 'r', '_', 'x', 'o', - 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'p', 'm', 'p', 'y', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '4', '_', 'p', 'm', 'p', 'y', 'w', '_', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '4', '_', 'v', 'p', 'm', 'p', 'y', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '4', '_', 'v', 'p', 'm', 'p', 'y', 'h', '_', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '4', '_', 'v', 'r', 'm', 'p', 'y', 'e', 'h', '_', 'a', - 'c', 'c', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'v', 'r', 'm', - 'p', 'y', 'e', 'h', '_', 'a', 'c', 'c', '_', 's', '1', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '4', '_', 'v', 'r', 'm', 'p', 'y', 'e', 'h', '_', 's', '0', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '4', '_', 'v', 'r', 'm', 'p', 'y', 'e', 'h', '_', 's', '1', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '4', '_', 'v', 'r', 'm', 'p', 'y', 'o', 'h', '_', - 'a', 'c', 'c', '_', 's', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'v', 'r', - 'm', 'p', 'y', 'o', 'h', '_', 'a', 'c', 'c', '_', 's', '1', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '4', '_', 'v', 'r', 'm', 'p', 'y', 'o', 'h', '_', 's', '0', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'M', '4', '_', 'v', 'r', 'm', 'p', 'y', 'o', 'h', '_', 's', - '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'M', '4', '_', 'x', 'o', 'r', '_', 'a', 'n', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '4', '_', 'x', 'o', 'r', '_', 'a', 'n', 'd', 'n', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'M', '4', '_', 'x', 'o', 'r', '_', 'o', 'r', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '4', '_', 'x', 'o', 'r', '_', 'x', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '5', '_', 'v', 'd', 'm', 'a', 'c', 'b', 's', 'u', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '5', '_', 'v', 'd', 'm', 'p', 'y', 'b', 's', 'u', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'M', '5', '_', 'v', 'm', 'a', 'c', 'b', 's', 'u', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'M', '5', '_', 'v', 'm', 'a', 'c', 'b', 'u', 'u', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'M', '5', '_', 'v', 'm', 'p', 'y', 'b', 's', 'u', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '5', '_', 'v', 'm', 'p', 'y', 'b', 'u', 'u', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '5', - '_', 'v', 'r', 'm', 'a', 'c', 'b', 's', 'u', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '5', - '_', 'v', 'r', 'm', 'a', 'c', 'b', 'u', 'u', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '5', - '_', 'v', 'r', 'm', 'p', 'y', 'b', 's', 'u', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '5', - '_', 'v', 'r', 'm', 'p', 'y', 'b', 'u', 'u', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', '6', - '_', 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'M', - '6', '_', 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', 'u', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 'd', 'd', 'a', 's', 'l', '_', 'r', 'r', 'r', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', 'p', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', 'p', '_', 'a', - 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', - 'p', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', - '_', 'i', '_', 'p', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', - 'a', 's', 'l', '_', 'i', '_', 'p', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'a', 's', 'l', '_', 'i', '_', 'p', '_', 'x', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', 'r', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', 'r', '_', 'a', 'c', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', 'r', - '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', - 'i', '_', 'r', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', - 's', 'l', '_', 'i', '_', 'r', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'a', 's', 'l', '_', 'i', '_', 'r', '_', 's', 'a', 't', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', 'r', '_', 'x', 'a', 'c', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', 'v', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'i', '_', 'v', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'r', '_', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'r', '_', 'p', '_', - 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'r', - '_', 'p', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', - 'l', '_', 'r', '_', 'p', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'a', 's', 'l', '_', 'r', '_', 'p', '_', 'o', 'r', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 'a', 's', 'l', '_', 'r', '_', 'p', '_', 'x', 'o', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'r', '_', 'r', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'r', '_', 'r', '_', 'a', 'c', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', 'r', '_', 'r', - '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'l', '_', - 'r', '_', 'r', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', - 's', 'l', '_', 'r', '_', 'r', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'a', 's', 'l', '_', 'r', '_', 'r', '_', 's', 'a', 't', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 's', 'l', '_', 'r', '_', 'v', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 's', 'l', '_', 'r', '_', 'v', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', 'p', '_', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', 'p', '_', 'a', - 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', - 'p', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', - '_', 'i', '_', 'p', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', - 's', 'r', '_', 'i', '_', 'p', '_', 'r', 'n', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'a', 's', 'r', '_', 'i', '_', 'p', '_', 'r', 'n', 'd', '_', 'g', - 'o', 'o', 'd', 's', 'y', 'n', 't', 'a', 'x', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'a', 's', 'r', '_', 'i', '_', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', - 'a', 's', 'r', '_', 'i', '_', 'r', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', 'r', '_', 'a', 'n', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', 'r', '_', 'n', - 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', - 'r', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', - 'i', '_', 'r', '_', 'r', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', - 's', 'r', '_', 'i', '_', 'r', '_', 'r', 'n', 'd', '_', 'g', 'o', 'o', 'd', - 's', 'y', 'n', 't', 'a', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', - 'r', '_', 'i', '_', 's', 'v', 'w', '_', 't', 'r', 'u', 'n', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', 'v', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 's', 'r', '_', 'i', '_', 'v', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 's', 'r', '_', 'r', '_', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 'a', 's', 'r', '_', 'r', '_', 'p', '_', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'r', '_', 'p', '_', 'a', - 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'r', '_', - 'p', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', - '_', 'r', '_', 'p', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', - 's', 'r', '_', 'r', '_', 'p', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'a', 's', 'r', '_', 'r', '_', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'a', 's', 'r', '_', 'r', '_', 'r', '_', 'a', 'c', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'a', 's', 'r', '_', 'r', '_', 'r', '_', 'a', 'n', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'r', '_', 'r', '_', - 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'r', - '_', 'r', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', - '_', 'r', '_', 'r', '_', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', - 'a', 's', 'r', '_', 'r', '_', 's', 'v', 'w', '_', 't', 'r', 'u', 'n', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'r', '_', 'v', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'a', 's', 'r', '_', 'r', '_', 'v', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'b', 'r', 'e', 'v', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'b', 'r', 'e', 'v', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'c', - 'a', 'b', 'a', 'c', 'e', 'n', 'c', 'b', 'i', 'n', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'c', 'l', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'c', 'l', '0', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'c', 'l', '1', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 'c', 'l', '1', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'c', - 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'c', 'l', 'b', 'n', 'o', 'r', - 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'c', 'l', 'b', 'p', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'c', 'l', 'r', 'b', 'i', 't', '_', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'c', 'l', 'r', 'b', 'i', 't', '_', 'r', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'c', 't', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'c', - 't', '0', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'c', 't', '1', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'c', 't', '1', 'p', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'd', 'e', 'i', 'n', 't', 'e', 'r', 'l', 'e', 'a', 'v', 'e', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'u', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'u', '_', 'r', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', - 'u', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', - 't', 'u', 'p', '_', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'i', 'n', - 's', 'e', 'r', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'i', 'n', 's', 'e', - 'r', 't', '_', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'i', 'n', 's', - 'e', 'r', 't', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'i', 'n', 's', 'e', - 'r', 't', 'p', '_', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'i', 'n', - 't', 'e', 'r', 'l', 'e', 'a', 'v', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', - 'l', 'f', 's', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'l', '_', - 'r', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'l', '_', 'r', - '_', 'p', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', - 'l', '_', 'r', '_', 'p', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'l', 's', 'l', '_', 'r', '_', 'p', '_', 'n', 'a', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'l', 's', 'l', '_', 'r', '_', 'p', '_', 'o', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'l', '_', 'r', '_', 'p', '_', 'x', - 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'l', '_', 'r', '_', - 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'l', '_', 'r', '_', 'r', - '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'l', '_', - 'r', '_', 'r', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', - 's', 'l', '_', 'r', '_', 'r', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'l', 's', 'l', '_', 'r', '_', 'r', '_', 'o', 'r', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'l', 's', 'l', '_', 'r', '_', 'v', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'l', 's', 'l', '_', 'r', '_', 'v', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'l', 's', 'r', '_', 'i', '_', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 'l', 's', 'r', '_', 'i', '_', 'p', '_', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'i', '_', 'p', '_', 'a', - 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'i', '_', - 'p', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', - '_', 'i', '_', 'p', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', - 's', 'r', '_', 'i', '_', 'p', '_', 'x', 'a', 'c', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 'l', 's', 'r', '_', 'i', '_', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'l', 's', 'r', '_', 'i', '_', 'r', '_', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'i', '_', 'r', '_', 'a', 'n', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'i', '_', 'r', - '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', - 'i', '_', 'r', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', - 'r', '_', 'i', '_', 'r', '_', 'x', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'l', 's', 'r', '_', 'i', '_', 'v', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'l', 's', 'r', '_', 'i', '_', 'v', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'l', 's', 'r', '_', 'r', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'l', 's', 'r', '_', 'r', '_', 'p', '_', 'a', 'c', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'l', 's', 'r', '_', 'r', '_', 'p', '_', 'a', 'n', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'r', '_', 'p', '_', - 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'r', - '_', 'p', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', - '_', 'r', '_', 'p', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', - 'l', 's', 'r', '_', 'r', '_', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', - 's', 'r', '_', 'r', '_', 'r', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'l', 's', 'r', '_', 'r', '_', 'r', '_', 'a', 'n', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'r', '_', 'r', '_', 'n', 'a', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'r', '_', 'r', - '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'r', - '_', 'v', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'l', 's', 'r', '_', 'r', - '_', 'v', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'p', 'a', 'c', 'k', 'h', - 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'p', 'a', 'r', 'i', 't', 'y', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 's', 'e', 't', 'b', 'i', 't', '_', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 's', 'e', 't', 'b', 'i', 't', '_', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 's', 'h', 'u', 'f', 'f', 'e', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 's', 'h', 'u', 'f', 'f', 'e', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 's', 'h', 'u', 'f', 'f', 'o', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 's', 'h', 'u', 'f', 'f', 'o', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 's', 't', 'o', 'r', 'e', 'w', '_', 'l', 'o', 'c', 'k', 'e', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 's', 'v', 's', 'a', 't', 'h', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 's', 'v', 's', 'a', 't', 'h', 'u', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '2', '_', 't', 'a', 'b', 'l', 'e', 'i', 'd', 'x', - 'b', '_', 'g', 'o', 'o', 'd', 's', 'y', 'n', 't', 'a', 'x', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 't', 'a', 'b', 'l', 'e', 'i', 'd', 'x', 'd', '_', 'g', - 'o', 'o', 'd', 's', 'y', 'n', 't', 'a', 'x', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 't', 'a', 'b', 'l', 'e', 'i', 'd', 'x', 'h', '_', 'g', 'o', 'o', 'd', - 's', 'y', 'n', 't', 'a', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 't', 'a', - 'b', 'l', 'e', 'i', 'd', 'x', 'w', '_', 'g', 'o', 'o', 'd', 's', 'y', 'n', - 't', 'a', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 't', 'o', 'g', 'g', 'l', - 'e', 'b', 'i', 't', '_', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 't', 'o', - 'g', 'g', 'l', 'e', 'b', 'i', 't', '_', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 't', 's', 't', 'b', 'i', 't', '_', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 't', 's', 't', 'b', 'i', 't', '_', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'v', 'a', 'l', 'i', 'g', 'n', 'i', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'v', 'a', 'l', 'i', 'g', 'n', 'r', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'v', 'c', 'n', 'e', 'g', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'v', - 'c', 'r', 'o', 't', 'a', 't', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'v', - 'r', 'c', 'n', 'e', 'g', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'v', 'r', - 'n', 'd', 'p', 'a', 'c', 'k', 'w', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', - 'v', 'r', 'n', 'd', 'p', 'a', 'c', 'k', 'w', 'h', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '2', '_', 'v', 's', 'a', 't', 'h', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', - '_', 'v', 's', 'a', 't', 'h', 'b', '_', 'n', 'o', 'p', 'a', 'c', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'v', 's', 'a', 't', 'h', 'u', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'v', 's', 'a', 't', 'h', 'u', 'b', '_', 'n', 'o', - 'p', 'a', 'c', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'v', 's', 'a', 't', - 'w', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'v', 's', 'a', 't', 'w', 'h', - '_', 'n', 'o', 'p', 'a', 'c', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'v', - 's', 'a', 't', 'w', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', 'v', 's', - 'a', 't', 'w', 'u', 'h', '_', 'n', 'o', 'p', 'a', 'c', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'v', 's', 'p', 'l', 'a', 't', 'r', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'v', 's', 'p', 'l', 'a', 't', 'r', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'v', 's', 'p', 'l', 'i', 'c', 'e', 'i', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '2', '_', 'v', 's', 'p', 'l', 'i', 'c', 'e', 'r', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '2', '_', 'v', 's', 'x', 't', 'b', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '2', '_', 'v', 's', 'x', 't', 'h', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'v', 't', 'r', 'u', 'n', 'e', 'h', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'v', 't', 'r', 'u', 'n', 'e', 'w', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'v', 't', 'r', 'u', 'n', 'o', 'h', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'v', 't', 'r', 'u', 'n', 'o', 'w', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '2', '_', 'v', 'z', 'x', 't', 'b', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '2', '_', - 'v', 'z', 'x', 't', 'h', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'a', 'd', - 'd', 'a', 'd', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'a', 'd', 'd', - 'i', '_', 'a', 's', 'l', '_', 'r', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', - 'a', 'd', 'd', 'i', '_', 'l', 's', 'r', '_', 'r', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '4', '_', 'a', 'n', 'd', 'i', '_', 'a', 's', 'l', '_', 'r', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '4', '_', 'a', 'n', 'd', 'i', '_', 'l', 's', 'r', '_', - 'r', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'c', 'l', 'b', 'a', 'd', 'd', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'c', 'l', 'b', 'p', 'a', 'd', 'd', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'c', 'l', 'b', 'p', 'n', 'o', 'r', - 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '4', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', - 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'e', 'x', 't', 'r', 'a', 'c', - 't', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'e', 'x', 't', 'r', 'a', 'c', - 't', 'p', '_', 'r', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'l', 's', 'l', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'n', 't', 's', 't', 'b', 'i', 't', - '_', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'n', 't', 's', 't', 'b', 'i', - 't', '_', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'o', 'r', '_', 'a', 'n', - 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'o', 'r', '_', 'a', 'n', 'd', - 'i', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'o', 'r', '_', 'o', 'r', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '4', '_', 'o', 'r', 'i', '_', 'a', 's', 'l', '_', - 'r', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'o', 'r', 'i', '_', 'l', 's', - 'r', '_', 'r', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'p', 'a', 'r', 'i', - 't', 'y', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 's', 't', 'o', 'r', 'e', 'd', - '_', 'l', 'o', 'c', 'k', 'e', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 's', - 'u', 'b', 'a', 'd', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 's', 'u', - 'b', 'i', '_', 'a', 's', 'l', '_', 'r', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', - '_', 's', 'u', 'b', 'i', '_', 'l', 's', 'r', '_', 'r', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '4', '_', 'v', 'r', 'c', 'r', 'o', 't', 'a', 't', 'e', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '4', '_', 'v', 'r', 'c', 'r', 'o', 't', 'a', 't', 'e', '_', - 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'v', 'x', 'a', 'd', 'd', - 's', 'u', 'b', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'v', 'x', 'a', 'd', - 'd', 's', 'u', 'b', 'h', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'v', 'x', - 'a', 'd', 'd', 's', 'u', 'b', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', 'v', - 'x', 's', 'u', 'b', 'a', 'd', 'd', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '4', '_', - 'v', 'x', 's', 'u', 'b', 'a', 'd', 'd', 'h', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '4', '_', 'v', 'x', 's', 'u', 'b', 'a', 'd', 'd', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '5', '_', 'a', 's', 'r', 'h', 'u', 'b', '_', 'r', 'n', 'd', '_', 's', - 'a', 't', '_', 'g', 'o', 'o', 'd', 's', 'y', 'n', 't', 'a', 'x', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '5', '_', 'a', 's', 'r', 'h', 'u', 'b', '_', 's', 'a', 't', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '5', '_', 'p', 'o', 'p', 'c', 'o', 'u', 'n', 't', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '5', '_', 'v', 'a', 's', 'r', 'h', 'r', 'n', - 'd', '_', 'g', 'o', 'o', 'd', 's', 'y', 'n', 't', 'a', 'x', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'S', '6', '_', 'r', 'o', 'l', '_', 'i', '_', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '6', '_', 'r', 'o', 'l', '_', 'i', '_', 'p', '_', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'S', '6', '_', 'r', 'o', 'l', '_', 'i', '_', 'p', '_', 'a', - 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'S', '6', '_', 'r', 'o', 'l', '_', 'i', '_', - 'p', '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '6', '_', 'r', 'o', 'l', - '_', 'i', '_', 'p', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '6', '_', 'r', - 'o', 'l', '_', 'i', '_', 'p', '_', 'x', 'a', 'c', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '6', '_', 'r', 'o', 'l', '_', 'i', '_', 'r', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '6', '_', 'r', 'o', 'l', '_', 'i', '_', 'r', '_', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'S', '6', '_', 'r', 'o', 'l', '_', 'i', '_', 'r', '_', 'a', 'n', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'S', '6', '_', 'r', 'o', 'l', '_', 'i', '_', 'r', - '_', 'n', 'a', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '6', '_', 'r', 'o', 'l', '_', - 'i', '_', 'r', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', '6', '_', 'r', 'o', - 'l', '_', 'i', '_', 'r', '_', 'x', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'S', - '6', '_', 'v', 's', 'p', 'l', 'a', 't', 'r', 'b', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'S', '6', '_', 'v', 't', 'r', 'u', 'n', 'e', 'h', 'b', '_', 'p', 'p', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'S', '6', '_', 'v', 't', 'r', 'u', 'n', 'o', 'h', 'b', - '_', 'p', 'p', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'S', 'I', '_', 't', 'o', '_', 'S', 'X', 'T', 'H', 'I', '_', 'a', 's', 'r', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', - 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'h', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'h', 'i', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'l', 'o', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'l', 'o', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'l', - 'v', 's', 'p', 'l', 'a', 't', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'l', - 'v', 's', 'p', 'l', 'a', 't', 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 'a', 'n', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 'a', 'n', 'd', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 'a', - 'n', 'd', '_', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'p', 'r', 'e', 'd', - '_', 'a', 'n', 'd', '_', 'n', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 'n', 'o', 't', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 'n', 'o', 't', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 'o', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 'o', 'r', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'p', 'r', 'e', 'd', - '_', 'o', 'r', '_', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'p', 'r', 'e', - 'd', '_', 'o', 'r', '_', 'n', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 's', 'c', 'a', 'l', 'a', 'r', '2', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'p', 'r', 'e', 'd', '_', 's', 'c', 'a', - 'l', 'a', 'r', '2', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'p', 'r', 'e', 'd', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'p', 'r', 'e', 'd', '_', 'x', 'o', 'r', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', - 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', - 'b', 's', 'd', 'i', 'f', 'f', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', 'u', 'b', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', - 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', 'd', 'i', - 'f', 'f', 'u', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'b', 's', 'd', 'i', 'f', 'f', 'w', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', 'h', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', 'h', '_', 's', 'a', - 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', 'h', '_', 's', - 'a', 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'a', 'b', 's', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'b', 's', - 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', - 'b', 's', 'w', '_', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'a', 'b', 's', 'w', '_', 's', 'a', 't', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'd', 'd', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'b', '_', 'd', 'v', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'b', '_', 'd', 'v', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'b', 'n', - 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'b', 'n', 'q', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', - 'd', 'b', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'b', - 'q', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', - 'd', 'd', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'h', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', - 'd', 'h', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', - 'd', 'h', '_', 'd', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'd', 'd', 'h', 'n', 'q', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'a', 'd', 'd', 'h', 'n', 'q', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'h', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'a', 'd', 'd', 'h', 'q', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'h', 's', 'a', 't', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'h', 's', 'a', 't', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', - 'h', 's', 'a', 't', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'a', 'd', 'd', 'h', 's', 'a', 't', '_', 'd', 'v', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'h', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'h', 'w', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'u', 'b', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'u', 'b', 'h', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', - 'u', 'b', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', - 'd', 'u', 'b', 's', 'a', 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'a', 'd', 'd', 'u', 'b', 's', 'a', 't', '_', 'd', 'v', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'u', 'b', 's', 'a', - 't', '_', 'd', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'a', 'd', 'd', 'u', 'h', 's', 'a', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'd', 'd', 'u', 'h', 's', 'a', 't', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'u', 'h', 's', - 'a', 't', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', - 'd', 'u', 'h', 's', 'a', 't', '_', 'd', 'v', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'u', 'h', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'u', 'h', 'w', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'w', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'w', '_', 'd', - 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'w', '_', 'd', - 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', - 'd', 'd', 'w', 'n', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', - 'd', 'w', 'n', 'q', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'a', 'd', 'd', 'w', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'a', 'd', 'd', 'w', 'q', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'd', 'd', 'w', 's', 'a', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'd', 'd', 'w', 's', 'a', 't', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'w', 's', 'a', 't', - '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'd', 'd', 'w', - 's', 'a', 't', '_', 'd', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'a', 'l', 'i', 'g', 'n', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'l', 'i', 'g', 'n', 'b', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'l', 'i', 'g', 'n', 'b', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'l', 'i', 'g', 'n', 'b', 'i', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'n', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'n', 'd', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'n', 'd', 'q', 'r', 't', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'n', 'd', 'q', 'r', 't', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'n', 'd', - 'q', 'r', 't', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'a', 'n', 'd', 'q', 'r', 't', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'n', 'd', 'v', 'r', 't', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'n', 'd', 'v', 'r', 't', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'n', 'd', 'v', - 'r', 't', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', - 'n', 'd', 'v', 'r', 't', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'l', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'a', 's', 'l', 'h', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'l', 'h', 'v', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'a', 's', 'l', 'h', 'v', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'l', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'a', 's', 'l', 'w', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'l', 'w', '_', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'l', 'w', '_', 'a', 'c', 'c', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', - 'l', 'w', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'l', 'w', - 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', - 's', 'r', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'h', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', - 'r', 'h', 'b', 'r', 'n', 'd', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'a', 's', 'r', 'h', 'b', 'r', 'n', 'd', 's', 'a', 't', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'h', - 'u', 'b', 'r', 'n', 'd', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'a', 's', 'r', 'h', 'u', 'b', 'r', 'n', 'd', 's', 'a', 't', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'h', - 'u', 'b', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', - 'r', 'h', 'u', 'b', 's', 'a', 't', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'h', 'v', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 's', 'r', 'h', 'v', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 's', 'r', 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'w', '_', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'w', '_', 'a', 'c', 'c', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', - 'w', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'w', 'h', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', - 'r', 'w', 'h', 'r', 'n', 'd', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'a', 's', 'r', 'w', 'h', 'r', 'n', 'd', 's', 'a', 't', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'w', - 'h', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', - 'w', 'h', 's', 'a', 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 's', 'r', 'w', 'u', 'h', 's', 'a', 't', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'w', 'u', 'h', 's', 'a', 't', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', - 'w', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 'r', 'w', 'v', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', - 's', 'i', 'g', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 's', 's', - 'i', 'g', 'n', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'a', 's', 's', 'i', 'g', 'n', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'a', 's', 's', 'i', 'g', 'n', 'p', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'v', 'g', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'h', 'r', 'n', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'h', 'r', 'n', 'd', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'u', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'u', 'b', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'u', - 'b', 'r', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', - 'u', 'b', 'r', 'n', 'd', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'a', 'v', 'g', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'a', 'v', 'g', 'u', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'a', 'v', 'g', 'u', 'h', 'r', 'n', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'u', 'h', 'r', 'n', 'd', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'w', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'w', 'r', - 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'a', 'v', 'g', 'w', 'r', - 'n', 'd', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'c', 'l', '0', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'c', 'l', '0', - 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'c', - 'l', '0', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'c', 'l', '0', 'w', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'c', 'o', - 'm', 'b', 'i', 'n', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'c', 'o', - 'm', 'b', 'i', 'n', 'e', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'd', '0', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', '0', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'e', - 'a', 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'e', 'a', 'l', - 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', - 'e', 'a', 'l', 'b', '4', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', - 'e', 'a', 'l', 'b', '4', 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'd', 'e', 'a', 'l', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'd', 'e', 'a', 'l', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'd', 'e', 'a', 'l', 'v', 'd', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'd', 'e', 'a', 'l', 'v', 'd', 'd', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'e', 'l', 't', 'a', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'e', 'l', 't', 'a', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', - 'b', 'u', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', - 'b', 'u', 's', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'd', 'm', 'p', 'y', 'b', 'u', 's', '_', 'a', 'c', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'b', 'u', 's', '_', 'a', 'c', - 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', - 'm', 'p', 'y', 'b', 'u', 's', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'd', 'm', 'p', 'y', 'b', 'u', 's', '_', 'd', 'v', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'b', - 'u', 's', '_', 'd', 'v', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'd', 'm', 'p', 'y', 'b', 'u', 's', '_', 'd', 'v', '_', 'a', 'c', - 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', - 'm', 'p', 'y', 'h', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', - 'p', 'y', 'h', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'd', 'm', 'p', 'y', 'h', 'b', '_', 'a', 'c', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 'b', '_', 'a', 'c', 'c', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', - 'p', 'y', 'h', 'b', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'd', 'm', 'p', 'y', 'h', 'b', '_', 'd', 'v', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 'b', '_', 'd', - 'v', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', - 'p', 'y', 'h', 'b', '_', 'd', 'v', '_', 'a', 'c', 'c', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 'i', - 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', - 'h', 'i', 's', 'a', 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 'i', 's', 'a', 't', '_', 'a', 'c', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 'i', - 's', 'a', 't', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 's', 'a', 't', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 's', 'a', 't', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', - 'y', 'h', 's', 'a', 't', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'd', 'm', 'p', 'y', 'h', 's', 'a', 't', '_', 'a', 'c', 'c', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', - 'y', 'h', 's', 'u', 'i', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'd', 'm', 'p', 'y', 'h', 's', 'u', 'i', 's', 'a', 't', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', - 's', 'u', 'i', 's', 'a', 't', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 's', 'u', 'i', 's', 'a', 't', '_', - 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'd', 'm', 'p', 'y', 'h', 's', 'u', 's', 'a', 't', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 's', 'u', 's', 'a', 't', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', - 'y', 'h', 's', 'u', 's', 'a', 't', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 's', 'u', 's', 'a', 't', '_', - 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'd', 'm', 'p', 'y', 'h', 'v', 's', 'a', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', 'v', 's', 'a', 't', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 'm', 'p', 'y', 'h', - 'v', 's', 'a', 't', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'd', 'm', 'p', 'y', 'h', 'v', 's', 'a', 't', '_', 'a', 'c', 'c', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 's', 'a', - 'd', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'd', 's', 'a', 'd', - 'u', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'd', 's', 'a', 'd', 'u', 'h', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'd', 's', 'a', 'd', 'u', 'h', '_', 'a', 'c', 'c', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'b', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'b', '_', 'a', 'n', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'b', '_', 'a', 'n', 'd', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', - 'b', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'b', - '_', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'e', 'q', 'b', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'e', 'q', 'b', '_', 'x', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'e', 'q', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'e', 'q', 'h', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'e', 'q', 'h', '_', 'a', 'n', 'd', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'h', '_', 'o', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'h', '_', 'o', 'r', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'h', '_', - 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'h', '_', - 'x', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'e', 'q', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'w', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', - 'w', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'e', 'q', - 'w', '_', 'a', 'n', 'd', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'e', 'q', 'w', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'e', 'q', 'w', '_', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'w', '_', 'x', 'o', 'r', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'e', 'q', 'w', '_', 'x', 'o', 'r', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'b', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'b', '_', 'a', 'n', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'b', '_', 'a', 'n', 'd', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', - 'b', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'b', - '_', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'g', 't', 'b', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'g', 't', 'b', '_', 'x', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'g', 't', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'g', 't', 'h', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'g', 't', 'h', '_', 'a', 'n', 'd', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'h', '_', 'o', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'h', '_', 'o', 'r', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'h', '_', - 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'h', '_', - 'x', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'g', 't', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', - 'u', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'g', 't', 'u', 'b', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'g', 't', 'u', 'b', '_', 'a', 'n', 'd', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'u', 'b', '_', 'o', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'u', 'b', '_', 'o', 'r', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'u', - 'b', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', - 'u', 'b', '_', 'x', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'g', 't', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'g', 't', 'u', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'g', 't', 'u', 'h', '_', 'a', 'n', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'g', 't', 'u', 'h', '_', 'a', 'n', 'd', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'u', 'h', '_', - 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'u', 'h', '_', - 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'g', 't', 'u', 'h', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'g', 't', 'u', 'h', '_', 'x', 'o', 'r', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'u', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'g', 't', 'u', 'w', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'u', 'w', '_', 'a', 'n', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'u', 'w', '_', 'a', 'n', 'd', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', - 'u', 'w', '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', - 'u', 'w', '_', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'g', 't', 'u', 'w', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'g', 't', 'u', 'w', '_', 'x', 'o', 'r', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'w', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'w', '_', 'a', 'n', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'w', '_', 'a', 'n', 'd', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'w', - '_', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'g', 't', 'w', '_', - 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'g', 't', 'w', '_', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'g', 't', 'w', '_', 'x', 'o', 'r', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'i', 'n', 's', 'e', 'r', 't', 'w', 'r', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'i', 'n', 's', 'e', 'r', 't', 'w', 'r', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 'a', 'l', - 'i', 'g', 'n', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 'a', 'l', - 'i', 'g', 'n', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'l', 'a', 'l', 'i', 'g', 'n', 'b', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'l', 'a', 'l', 'i', 'g', 'n', 'b', 'i', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 's', 'r', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'l', 's', 'r', 'h', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 's', 'r', 'h', 'v', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'l', 's', 'r', 'h', 'v', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 's', 'r', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'l', 's', 'r', 'w', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 's', 'r', 'w', 'v', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'l', 's', 'r', 'w', 'v', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'b', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'b', '_', 'a', 'c', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'b', '_', 'a', - 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'l', 'u', 't', 'b', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'l', 'u', 't', 'b', '_', 'd', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'b', '_', 'd', 'v', '_', 'a', 'c', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'b', '_', 'd', - 'v', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'l', 'u', 't', 'v', 'v', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'l', 'u', 't', 'v', 'v', 'b', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'v', 'v', 'b', '_', 'o', 'r', - 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'v', - 'v', 'b', '_', 'o', 'r', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'v', 'w', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'v', 'w', 'h', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', 'u', 't', 'v', 'w', 'h', - '_', 'o', 'r', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'l', - 'u', 't', 'v', 'w', 'h', '_', 'o', 'r', 'a', 'c', 'c', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'a', 'x', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'a', 'x', 'h', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'a', 'x', 'u', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'a', 'x', 'u', 'b', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'a', 'x', 'u', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'a', 'x', 'u', 'h', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'a', 'x', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'a', 'x', 'w', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'i', 'n', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'i', 'n', 'h', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'i', 'n', 'u', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'i', 'n', 'u', 'b', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'i', 'n', 'u', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'i', 'n', 'u', 'h', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'i', 'n', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'i', 'n', 'w', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'a', 'b', 'u', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'a', 'b', 'u', 's', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'a', - 'b', 'u', 's', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'm', 'p', 'a', 'b', 'u', 's', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'a', 'b', 'u', 's', 'v', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'a', 'b', 'u', 's', 'v', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', - 'a', 'b', 'u', 'u', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', - 'a', 'b', 'u', 'u', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'm', 'p', 'a', 'h', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'm', 'p', 'a', 'h', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'p', 'a', 'h', 'b', '_', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'a', 'h', 'b', '_', 'a', 'c', 'c', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', - 'y', 'b', 'u', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', - 'b', 'u', 's', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'm', 'p', 'y', 'b', 'u', 's', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'p', 'y', 'b', 'u', 's', '_', 'a', 'c', 'c', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', - 'b', 'u', 's', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', - 'b', 'u', 's', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'm', 'p', 'y', 'b', 'u', 's', 'v', '_', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'b', 'u', 's', 'v', '_', 'a', - 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'm', 'p', 'y', 'b', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', - 'y', 'b', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'm', 'p', 'y', 'b', 'v', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'm', 'p', 'y', 'b', 'v', '_', 'a', 'c', 'c', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'e', 'w', - 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'e', 'w', - 'u', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'm', 'p', 'y', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', - 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', - 'p', 'y', 'h', 's', 'a', 't', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'm', 'p', 'y', 'h', 's', 'a', 't', '_', 'a', 'c', 'c', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', - 'h', 's', 'r', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', - 'h', 's', 'r', 's', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'm', 'p', 'y', 'h', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'm', 'p', 'y', 'h', 's', 's', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'h', 'u', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'p', 'y', 'h', 'u', 's', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'h', 'u', 's', '_', - 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'h', - 'u', 's', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'p', 'y', 'h', 'v', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'm', 'p', 'y', 'h', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'h', 'v', '_', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'h', 'v', '_', 'a', 'c', - 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', - 'p', 'y', 'h', 'v', 's', 'r', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'm', 'p', 'y', 'h', 'v', 's', 'r', 's', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'e', 'o', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'e', 'o', 'h', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', - 'e', 'w', 'h', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'm', 'p', 'y', 'i', 'e', 'w', 'h', '_', 'a', 'c', 'c', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'e', 'w', - 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'e', - 'w', 'u', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'm', 'p', 'y', 'i', 'e', 'w', 'u', 'h', '_', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'e', 'w', 'u', 'h', '_', - 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'm', 'p', 'y', 'i', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', - 'p', 'y', 'i', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'm', 'p', 'y', 'i', 'h', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'h', '_', 'a', 'c', 'c', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', - 'h', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'h', - 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', - 'p', 'y', 'i', 'h', 'b', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'm', 'p', 'y', 'i', 'h', 'b', '_', 'a', 'c', 'c', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'o', - 'w', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'o', - 'w', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'm', 'p', 'y', 'i', 'w', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', - 'p', 'y', 'i', 'w', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'm', 'p', 'y', 'i', 'w', 'b', '_', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'w', 'b', '_', 'a', 'c', - 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', - 'p', 'y', 'i', 'w', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', - 'y', 'i', 'w', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'm', 'p', 'y', 'i', 'w', 'h', '_', 'a', 'c', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'i', 'w', 'h', '_', 'a', 'c', 'c', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', - 'y', 'o', 'w', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', - 'o', 'w', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'm', 'p', 'y', 'o', 'w', 'h', '_', 'r', 'n', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'p', 'y', 'o', 'w', 'h', '_', 'r', 'n', 'd', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', - 'o', 'w', 'h', '_', 'r', 'n', 'd', '_', 's', 'a', 'c', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'o', 'w', 'h', '_', 'r', 'n', 'd', - '_', 's', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'm', 'p', 'y', 'o', 'w', 'h', '_', 's', 'a', 'c', 'c', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'o', 'w', 'h', '_', 's', - 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'm', 'p', 'y', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', - 'p', 'y', 'u', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'm', 'p', 'y', 'u', 'b', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', 'b', '_', 'a', 'c', 'c', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', - 'b', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', 'b', - 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', - 'p', 'y', 'u', 'b', 'v', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'm', 'p', 'y', 'u', 'b', 'v', '_', 'a', 'c', 'c', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', 'h', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', - 'h', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', - 'y', 'u', 'h', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', 'h', 'v', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', 'h', 'v', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', 'h', 'v', '_', - 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'm', 'p', 'y', 'u', - 'h', 'v', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'm', 'u', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'm', 'u', 'x', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'n', 'a', 'v', 'g', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'n', - 'a', 'v', 'g', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'n', 'a', 'v', 'g', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'n', 'a', 'v', 'g', 'u', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'n', 'a', 'v', 'g', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'n', 'a', 'v', 'g', 'w', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'n', 'o', 'r', 'm', 'a', 'm', 't', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'n', 'o', 'r', 'm', 'a', 'm', 't', 'h', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'n', 'o', - 'r', 'm', 'a', 'm', 't', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'n', - 'o', 'r', 'm', 'a', 'm', 't', 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'n', 'o', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'n', 'o', 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'o', 'r', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', 'a', 'c', - 'k', 'e', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', 'a', 'c', 'k', - 'e', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'p', 'a', 'c', 'k', 'e', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', - 'a', 'c', 'k', 'e', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'p', 'a', 'c', 'k', 'h', 'b', '_', 's', 'a', 't', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'p', 'a', 'c', 'k', 'h', 'b', '_', 's', 'a', - 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', - 'a', 'c', 'k', 'h', 'u', 'b', '_', 's', 'a', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'p', 'a', 'c', 'k', 'h', 'u', 'b', '_', 's', 'a', 't', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', 'a', 'c', - 'k', 'o', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', 'a', 'c', 'k', - 'o', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'p', 'a', 'c', 'k', 'o', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', - 'a', 'c', 'k', 'o', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'p', 'a', 'c', 'k', 'w', 'h', '_', 's', 'a', 't', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'p', 'a', 'c', 'k', 'w', 'h', '_', 's', 'a', - 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', - 'a', 'c', 'k', 'w', 'u', 'h', '_', 's', 'a', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'p', 'a', 'c', 'k', 'w', 'u', 'h', '_', 's', 'a', 't', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', 'o', 'p', - 'c', 'o', 'u', 'n', 't', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'p', - 'o', 'p', 'c', 'o', 'u', 'n', 't', 'h', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'r', 'd', 'e', 'l', 't', 'a', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'r', 'd', 'e', 'l', 't', 'a', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'b', 'u', - 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'b', 'u', - 's', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', - 'm', 'p', 'y', 'b', 'u', 's', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'r', 'm', 'p', 'y', 'b', 'u', 's', '_', 'a', 'c', 'c', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', - 'y', 'b', 'u', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', - 'p', 'y', 'b', 'u', 's', 'i', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'b', 'u', 's', 'i', '_', 'a', 'c', - 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'b', 'u', - 's', 'i', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'b', 'u', 's', 'v', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'b', 'u', 's', 'v', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', - 'b', 'u', 's', 'v', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'r', 'm', 'p', 'y', 'b', 'u', 's', 'v', '_', 'a', 'c', 'c', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', - 'b', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'b', - 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', - 'm', 'p', 'y', 'b', 'v', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'r', 'm', 'p', 'y', 'b', 'v', '_', 'a', 'c', 'c', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'u', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'u', 'b', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', - 'p', 'y', 'u', 'b', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'r', 'm', 'p', 'y', 'u', 'b', '_', 'a', 'c', 'c', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'u', 'b', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'u', 'b', - 'i', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', - 'm', 'p', 'y', 'u', 'b', 'i', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'r', 'm', 'p', 'y', 'u', 'b', 'i', '_', 'a', 'c', 'c', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', - 'y', 'u', 'b', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', - 'y', 'u', 'b', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'r', 'm', 'p', 'y', 'u', 'b', 'v', '_', 'a', 'c', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'r', 'm', 'p', 'y', 'u', 'b', 'v', '_', 'a', - 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'r', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'o', 'r', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'o', 'u', - 'n', 'd', 'h', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'o', 'u', - 'n', 'd', 'h', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'r', 'o', 'u', 'n', 'd', 'h', 'u', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 'r', 'o', 'u', 'n', 'd', 'h', 'u', 'b', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'o', 'u', 'n', 'd', 'w', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 'o', 'u', 'n', 'd', 'w', - 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', - 'o', 'u', 'n', 'd', 'w', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'r', 'o', 'u', 'n', 'd', 'w', 'u', 'h', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'r', 's', 'a', 'd', 'u', 'b', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'r', 's', 'a', 'd', 'u', 'b', 'i', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'r', 's', 'a', 'd', - 'u', 'b', 'i', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'r', 's', 'a', 'd', 'u', 'b', 'i', '_', 'a', 'c', 'c', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'a', 't', 'h', 'u', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'a', 't', 'h', 'u', 'b', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'a', 't', - 'w', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'a', 't', 'w', 'h', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'b', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 's', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 's', 'h', 'u', 'f', 'e', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 's', 'h', 'u', 'f', 'e', 'h', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'f', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'f', 'b', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'f', 'e', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'f', 'e', - 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', - 'h', 'u', 'f', 'f', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'h', - 'u', 'f', 'f', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 's', 'h', 'u', 'f', 'f', 'o', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 's', 'h', 'u', 'f', 'f', 'o', 'b', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'f', 'v', 'd', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'f', 'v', 'd', - 'd', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', - 'h', 'u', 'f', 'o', 'e', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', - 'h', 'u', 'f', 'o', 'e', 'b', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'o', 'e', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'o', 'e', 'h', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'o', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'h', 'u', 'f', 'o', 'h', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'b', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'b', - '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'b', - '_', 'd', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 's', 'u', 'b', 'b', 'n', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 's', 'u', 'b', 'b', 'n', 'q', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 's', 'u', 'b', 'b', 'q', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 's', 'u', 'b', 'b', 'q', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 's', 'u', 'b', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 's', 'u', 'b', 'h', '_', 'd', 'v', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 's', 'u', 'b', 'h', '_', 'd', 'v', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'h', 'n', 'q', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'h', 'n', 'q', '_', - '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', - 'h', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'h', 'q', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', - 'b', 'h', 's', 'a', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', - 'b', 'h', 's', 'a', 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 's', 'u', 'b', 'h', 's', 'a', 't', '_', 'd', 'v', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'h', 's', 'a', 't', '_', 'd', - 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', - 'u', 'b', 'h', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', - 'h', 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 's', 'u', 'b', 'u', 'b', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', - 'u', 'b', 'u', 'b', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', - '6', '_', 'v', 's', 'u', 'b', 'u', 'b', 's', 'a', 't', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 's', 'u', 'b', 'u', 'b', 's', 'a', 't', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'u', 'b', - 's', 'a', 't', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', - 'u', 'b', 'u', 'b', 's', 'a', 't', '_', 'd', 'v', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'u', 'h', 's', 'a', - 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'u', 'h', 's', - 'a', 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 's', 'u', 'b', 'u', 'h', 's', 'a', 't', '_', 'd', 'v', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 's', 'u', 'b', 'u', 'h', 's', 'a', 't', '_', 'd', 'v', - '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', - 'b', 'u', 'h', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', - 'u', 'h', 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 's', 'u', 'b', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', - 'b', 'w', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 's', 'u', 'b', 'w', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 's', 'u', 'b', 'w', '_', 'd', 'v', '_', '1', '2', '8', 'B', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', - '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'w', 'n', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 's', 'u', 'b', 'w', 'n', 'q', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'w', 'q', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'w', 'q', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'w', 's', 'a', - 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'u', 'b', 'w', 's', 'a', - 't', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', - 'u', 'b', 'w', 's', 'a', 't', '_', 'd', 'v', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 's', 'u', 'b', 'w', 's', 'a', 't', '_', 'd', 'v', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'w', 'a', 'p', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 's', 'w', 'a', 'p', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'b', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'b', - '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', 'p', - 'y', 'b', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'b', 'u', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', - 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'b', 'u', 's', '_', '1', '2', '8', - 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'b', 'u', - 's', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', - 'p', 'y', 'b', 'u', 's', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'h', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'h', 'b', '_', '1', '2', - '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', 'p', 'y', 'h', - 'b', '_', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 't', 'm', - 'p', 'y', 'h', 'b', '_', 'a', 'c', 'c', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'u', 'n', 'p', 'a', 'c', 'k', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'u', 'n', 'p', 'a', 'c', 'k', 'b', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'u', 'n', 'p', 'a', - 'c', 'k', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'u', 'n', 'p', 'a', - 'c', 'k', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'u', 'n', 'p', 'a', 'c', 'k', 'o', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', - '_', 'v', 'u', 'n', 'p', 'a', 'c', 'k', 'o', 'b', '_', '1', '2', '8', 'B', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'u', 'n', 'p', 'a', 'c', 'k', 'o', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', - 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'u', 'n', 'p', 'a', 'c', 'k', - 'o', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', - 'u', 'n', 'p', 'a', 'c', 'k', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'u', 'n', 'p', 'a', 'c', 'k', 'u', 'b', '_', '1', '2', '8', 'B', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', - 'O', 'N', '_', 'V', '6', '_', 'v', 'u', 'n', 'p', 'a', 'c', 'k', 'u', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', - 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'u', 'n', 'p', 'a', 'c', 'k', 'u', - 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'x', - 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', - 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'x', 'o', 'r', '_', '1', - '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', - 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', 'v', 'z', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'z', 'b', '_', '1', '2', '8', 'B', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', - 'N', '_', 'V', '6', '_', 'v', 'z', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'V', '6', '_', - 'v', 'z', 'h', '_', '1', '2', '8', 'B', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'b', 'r', 'e', 'v', '_', 'l', 'd', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'b', 'r', 'e', 'v', '_', 'l', 'd', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'b', 'r', 'e', - 'v', '_', 'l', 'd', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'b', 'r', 'e', 'v', '_', 'l', 'd', 'u', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'b', 'r', 'e', 'v', '_', 'l', 'd', 'u', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'b', 'r', 'e', 'v', - '_', 'l', 'd', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'b', 'r', 'e', 'v', '_', 's', 't', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'b', 'r', 'e', 'v', '_', 's', 't', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'b', 'r', 'e', 'v', '_', 's', 't', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'b', 'r', 'e', - 'v', '_', 's', 't', 'h', 'h', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'b', 'r', 'e', 'v', '_', 's', 't', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'c', 'i', 'r', 'c', '_', 'l', 'd', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'c', 'i', 'r', 'c', - '_', 'l', 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'c', 'i', 'r', 'c', '_', 'l', 'd', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'c', 'i', 'r', 'c', '_', 'l', 'd', 'u', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'c', 'i', 'r', 'c', '_', 'l', - 'd', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'c', - 'i', 'r', 'c', '_', 'l', 'd', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'c', 'i', 'r', 'c', '_', 's', 't', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'c', 'i', 'r', 'c', '_', 's', 't', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'c', 'i', 'r', 'c', - '_', 's', 't', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'c', 'i', 'r', 'c', '_', 's', 't', 'h', 'h', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'c', 'i', 'r', 'c', '_', 's', 't', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', '_', 'm', 'm', '2', '5', - '6', 'i', '_', 'v', 'a', 'd', 'd', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'H', 'E', 'X', 'A', 'G', 'O', 'N', '_', 'p', 'r', 'e', - 'f', 'e', 't', 'c', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'a', 'b', 's', 'q', '_', 's', '_', 'p', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'a', 'b', 's', 'q', '_', 's', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'a', 'b', 's', 'q', - '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'a', 'd', 'd', '_', 'a', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', '_', - 'a', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'a', 'd', 'd', '_', 'a', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', '_', 'a', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', - 'p', 's', '_', 'a', 'd', 'd', 'q', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'q', - '_', 's', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'q', '_', 's', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 'a', 'd', 'd', 'q', 'h', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'q', 'h', '_', - 'r', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'q', 'h', '_', 'r', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 'a', 'd', 'd', 'q', 'h', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 's', '_', 'a', '_', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'a', 'd', 'd', 's', '_', 'a', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 's', '_', 'a', '_', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'a', 'd', 'd', 's', '_', 'a', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 's', '_', 's', - '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'a', 'd', 'd', 's', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 's', '_', - 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'a', 'd', 'd', 's', '_', 's', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 's', - '_', 'u', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'a', 'd', 'd', 's', '_', 'u', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', - 's', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 's', '_', 'u', '_', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'a', - 'd', 'd', 's', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'u', '_', 'p', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'a', 'd', - 'd', 'u', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'u', '_', 's', '_', 'p', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'a', 'd', 'd', 'u', '_', 's', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'u', - 'h', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'u', 'h', '_', 'r', '_', 'q', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'a', 'd', 'd', 'v', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 'v', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', - 'v', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'a', 'd', 'd', 'v', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 'v', 'i', '_', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'a', 'd', 'd', 'v', 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'd', 'd', 'v', 'i', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'a', 'd', 'd', 'v', 'i', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'a', 'd', 'd', 'w', 'c', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'n', - 'd', '_', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'a', 'n', 'd', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'a', 'p', 'p', 'e', 'n', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'a', 's', 'u', 'b', '_', 's', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 's', 'u', 'b', '_', 's', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'a', 's', 'u', 'b', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 's', 'u', 'b', '_', - 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'a', 's', 'u', 'b', '_', 'u', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 's', 'u', 'b', - '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'a', 's', 'u', 'b', '_', 'u', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 's', 'u', - 'b', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'a', 'v', 'e', '_', 's', '_', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'v', 'e', - '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'a', 'v', 'e', '_', 's', '_', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'v', 'e', '_', - 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'a', 'v', 'e', '_', 'u', '_', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'v', 'e', '_', 'u', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'a', 'v', 'e', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'v', 'e', '_', 'u', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'a', 'v', 'e', 'r', '_', 's', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'v', 'e', 'r', '_', 's', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'a', 'v', 'e', 'r', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'v', 'e', 'r', '_', - 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'a', 'v', 'e', 'r', '_', 'u', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'v', 'e', 'r', - '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'a', 'v', 'e', 'r', '_', 'u', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'a', 'v', 'e', - 'r', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'b', 'a', 'l', 'i', 'g', 'n', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'c', 'l', - 'r', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'b', 'c', 'l', 'r', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'c', 'l', 'r', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'b', 'c', 'l', 'r', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'b', 'c', 'l', 'r', 'i', '_', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'c', - 'l', 'r', 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'b', 'c', 'l', 'r', 'i', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'c', 'l', - 'r', 'i', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'b', 'i', 'n', 's', 'l', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'i', 'n', 's', - 'l', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'b', 'i', 'n', 's', 'l', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'i', 'n', 's', 'l', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'b', 'i', 'n', 's', 'l', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'i', 'n', 's', 'l', - 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'b', 'i', 'n', 's', 'l', 'i', '_', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'i', 'n', 's', - 'l', 'i', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'b', 'i', 'n', 's', 'r', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'i', 'n', 's', - 'r', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'b', 'i', 'n', 's', 'r', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'i', 'n', 's', 'r', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'b', 'i', 'n', 's', 'r', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'i', 'n', 's', 'r', - 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'b', 'i', 'n', 's', 'r', 'i', '_', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'i', 'n', 's', - 'r', 'i', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'b', 'i', 't', 'r', 'e', 'v', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'm', 'n', 'z', - '_', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'b', 'm', 'n', 'z', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'm', 'z', '_', 'v', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', - 'm', 'z', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'b', 'n', 'e', 'g', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'n', 'e', 'g', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'b', 'n', 'e', 'g', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'n', 'e', 'g', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', - 'n', 'e', 'g', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'b', 'n', 'e', 'g', 'i', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'n', - 'e', 'g', 'i', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'b', 'n', 'e', 'g', 'i', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'n', 'z', - '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'b', 'n', 'z', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'n', 'z', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'n', 'z', - '_', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'b', 'n', 'z', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'b', 'p', 'o', 's', 'g', 'e', '3', - '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'b', 's', 'e', 'l', '_', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 's', 'e', 'l', 'i', '_', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', - 's', 'e', 't', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'b', 's', 'e', 't', '_', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 's', 'e', 't', - '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'b', 's', 'e', 't', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 's', 'e', 't', 'i', '_', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'b', 's', 'e', 't', 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 's', 'e', 't', 'i', '_', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', - 's', 'e', 't', 'i', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'b', 'z', '_', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'z', '_', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'b', - 'z', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'b', 'z', '_', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'b', 'z', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'e', 'q', '_', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'c', 'e', 'q', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'c', 'e', 'q', '_', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'e', 'q', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'c', 'e', 'q', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'e', 'q', 'i', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'e', - 'q', 'i', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'c', 'e', 'q', 'i', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'f', 'c', 'm', 's', - 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'c', 'l', 'e', '_', 's', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 'e', '_', 's', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'c', 'l', 'e', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 'e', '_', 's', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', - 'l', 'e', '_', 'u', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 'e', '_', 'u', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', - 'e', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'c', 'l', 'e', '_', 'u', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 'e', - 'i', '_', 's', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'c', 'l', 'e', 'i', '_', 's', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', - 'e', 'i', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 'e', 'i', '_', 's', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', - 'l', 'e', 'i', '_', 'u', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 'e', 'i', '_', 'u', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'c', 'l', 'e', 'i', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 'e', 'i', '_', 'u', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'c', 'l', 't', '_', 's', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 't', '_', 's', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'c', 'l', 't', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 't', '_', 's', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', - 'l', 't', '_', 'u', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 't', '_', 'u', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', - 't', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'c', 'l', 't', '_', 'u', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 't', - 'i', '_', 's', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'c', 'l', 't', 'i', '_', 's', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', - 't', 'i', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 't', 'i', '_', 's', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', - 'l', 't', 'i', '_', 'u', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 't', 'i', '_', 'u', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'c', 'l', 't', 'i', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'l', 't', 'i', '_', 'u', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', - 's', '_', 'c', 'm', 'p', '_', 'e', 'q', '_', 'p', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'c', 'm', 'p', - '_', 'l', 'e', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'c', 'm', 'p', '_', 'l', 't', '_', 'p', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', - 's', '_', 'c', 'm', 'p', 'g', 'd', 'u', '_', 'e', 'q', '_', 'q', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 'c', 'm', 'p', 'g', 'd', 'u', '_', 'l', 'e', '_', 'q', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'c', 'm', - 'p', 'g', 'd', 'u', '_', 'l', 't', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'c', 'm', 'p', 'g', - 'u', '_', 'e', 'q', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'c', 'm', 'p', 'g', 'u', '_', 'l', - 'e', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'c', 'm', 'p', 'g', 'u', '_', 'l', 't', '_', 'q', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', - 's', '_', 'c', 'm', 'p', 'u', '_', 'e', 'q', '_', 'q', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'c', 'm', - 'p', 'u', '_', 'l', 'e', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'c', 'm', 'p', 'u', '_', 'l', - 't', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'c', 'o', 'p', 'y', '_', 's', '_', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'o', 'p', - 'y', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'c', 'o', 'p', 'y', '_', 's', '_', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'o', - 'p', 'y', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'c', 'o', 'p', 'y', '_', 'u', '_', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', - 'o', 'p', 'y', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 'o', 'p', 'y', '_', 'u', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'c', 'o', 'p', 'y', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'c', 't', 'c', 'm', 's', 'a', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', - 'i', 'v', '_', 's', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'd', 'i', 'v', '_', 's', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'i', - 'v', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'd', 'i', 'v', '_', 's', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'i', 'v', - '_', 'u', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'd', 'i', 'v', '_', 'u', '_', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'i', 'v', '_', - 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'd', 'i', 'v', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'd', 'l', 's', 'a', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'd', 'o', 't', 'p', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'o', 't', 'p', '_', 's', '_', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'd', 'o', 't', 'p', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'o', 't', 'p', '_', 'u', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'd', 'o', 't', 'p', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'o', 't', 'p', '_', - 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 'i', 'p', 's', '_', 'd', 'p', 'a', '_', 'w', '_', 'p', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'p', 'a', - 'd', 'd', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'd', 'p', 'a', 'd', 'd', '_', 's', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'd', 'p', 'a', 'd', 'd', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'p', 'a', 'd', 'd', '_', - 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'd', 'p', 'a', 'd', 'd', '_', 'u', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'p', 'a', - 'd', 'd', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'd', 'p', 'a', 'q', '_', 's', '_', 'w', - '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 'i', 'p', 's', '_', 'd', 'p', 'a', 'q', '_', 's', 'a', '_', 'l', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'd', 'p', 'a', 'q', 'x', '_', 's', '_', 'w', '_', 'p', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'd', - 'p', 'a', 'q', 'x', '_', 's', 'a', '_', 'w', '_', 'p', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'd', 'p', - 'a', 'u', '_', 'h', '_', 'q', 'b', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'd', 'p', 'a', 'u', '_', 'h', - '_', 'q', 'b', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'd', 'p', 'a', 'x', '_', 'w', '_', 'p', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 'd', 'p', 's', '_', 'w', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'd', 'p', 's', 'q', '_', 's', - '_', 'w', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'd', 'p', 's', 'q', '_', 's', 'a', '_', 'l', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', - 'p', 's', '_', 'd', 'p', 's', 'q', 'x', '_', 's', '_', 'w', '_', 'p', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'd', 'p', 's', 'q', 'x', '_', 's', 'a', '_', 'w', '_', 'p', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 'd', 'p', 's', 'u', '_', 'h', '_', 'q', 'b', 'l', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'd', 'p', 's', 'u', - '_', 'h', '_', 'q', 'b', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'd', 'p', 's', 'u', 'b', '_', 's', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'd', 'p', 's', 'u', 'b', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'p', 's', 'u', 'b', '_', - 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'd', 'p', 's', 'u', 'b', '_', 'u', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'd', 'p', 's', - 'u', 'b', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'd', 'p', 's', 'u', 'b', '_', 'u', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'd', 'p', 's', 'x', '_', 'w', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'e', 'x', 't', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'e', 'x', 't', 'p', 'd', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'e', 'x', 't', 'r', '_', 'r', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', - 's', '_', 'e', 'x', 't', 'r', '_', 'r', 's', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'e', 'x', 't', - 'r', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'e', 'x', 't', 'r', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'a', 'd', - 'd', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'f', 'a', 'd', 'd', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'a', 'f', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 'c', 'a', 'f', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'e', 'q', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'e', - 'q', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'f', 'c', 'l', 'a', 's', 's', '_', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'l', 'a', - 's', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'f', 'c', 'l', 'e', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'l', 'e', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'f', 'c', 'l', 't', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'l', 't', '_', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', - 'n', 'e', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'f', 'c', 'n', 'e', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'o', 'r', '_', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'f', 'c', 'o', 'r', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'u', 'e', 'q', '_', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', - 'c', 'u', 'e', 'q', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'u', 'l', 'e', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', - 'u', 'l', 'e', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 'c', 'u', 'l', 't', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'u', - 'l', 't', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'f', 'c', 'u', 'n', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'u', 'n', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'f', 'c', 'u', 'n', 'e', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'c', 'u', 'n', 'e', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 'd', 'i', 'v', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'f', 'd', 'i', 'v', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'e', 'x', - 'd', 'o', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'f', 'e', 'x', 'd', 'o', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'e', 'x', 'p', - '2', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'f', 'e', 'x', 'p', '2', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'e', 'x', 'u', 'p', - 'l', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'f', 'e', 'x', 'u', 'p', 'l', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'e', 'x', 'u', - 'p', 'r', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'f', 'e', 'x', 'u', 'p', 'r', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'f', 'i', - 'n', 't', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'f', 'f', 'i', 'n', 't', '_', 's', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 'f', 'i', 'n', 't', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'f', 'i', 'n', 't', '_', - 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'f', 'f', 'q', 'l', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'f', 'q', 'l', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 'f', 'q', 'r', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'f', 'f', 'q', 'r', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'i', 'l', - 'l', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'f', 'i', 'l', 'l', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'i', 'l', 'l', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 'i', 'l', 'l', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'f', 'l', 'o', 'g', '2', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'l', - 'o', 'g', '2', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 'm', 'a', 'd', 'd', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'm', 'a', - 'd', 'd', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'f', 'm', 'a', 'x', '_', 'a', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'm', 'a', - 'x', '_', 'a', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 'm', 'a', 'x', '_', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'm', 'a', 'x', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'f', 'm', 'i', 'n', '_', 'a', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'm', 'i', 'n', '_', - 'a', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'f', 'm', 'i', 'n', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'm', 'i', 'n', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 'm', 's', 'u', 'b', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'm', 's', 'u', 'b', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', - 'm', 'u', 'l', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 'm', 'u', 'l', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'r', 'c', 'p', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'f', 'r', 'c', 'p', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'r', 'i', 'n', 't', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 'r', 'i', 'n', 't', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 'r', 's', 'q', 'r', 't', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 'r', 's', 'q', 'r', 't', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'a', 'f', '_', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', - 's', 'a', 'f', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 's', 'e', 'q', '_', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'e', 'q', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'f', 's', 'l', 'e', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'l', 'e', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', - 's', 'l', 't', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 's', 'l', 't', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'n', 'e', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'f', 's', 'n', 'e', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'o', 'r', '_', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', - 's', 'o', 'r', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 's', 'q', 'r', 't', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'q', - 'r', 't', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'f', 's', 'u', 'b', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'u', 'b', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'f', 's', 'u', 'e', 'q', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'u', 'e', 'q', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 's', 'u', 'l', 'e', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'u', 'l', 'e', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', - 's', 'u', 'l', 't', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'u', 'l', 't', '_', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', - 'u', 'n', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'f', 's', 'u', 'n', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 's', 'u', 'n', 'e', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'f', 's', 'u', 'n', 'e', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 't', 'i', 'n', 't', '_', - 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'f', 't', 'i', 'n', 't', '_', 's', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 't', 'i', - 'n', 't', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'f', 't', 'i', 'n', 't', '_', 'u', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 't', 'q', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 't', 'q', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 't', 'r', 'u', 'n', - 'c', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'f', 't', 'r', 'u', 'n', 'c', '_', 's', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'f', 't', 'r', 'u', 'n', 'c', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'f', 't', 'r', 'u', 'n', - 'c', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'h', 'a', 'd', 'd', '_', 's', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'h', 'a', - 'd', 'd', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'h', 'a', 'd', 'd', '_', 's', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'h', - 'a', 'd', 'd', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'h', 'a', 'd', 'd', '_', 'u', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'h', 'a', 'd', 'd', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'h', 's', 'u', 'b', '_', 's', '_', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'h', 's', 'u', 'b', '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'h', 's', 'u', 'b', '_', 's', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'h', 's', 'u', 'b', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'h', 's', 'u', 'b', '_', - 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'h', 's', 'u', 'b', '_', 'u', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'l', 'v', 'e', - 'v', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'i', 'l', 'v', 'e', 'v', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'l', 'v', 'e', 'v', - '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'i', 'l', 'v', 'e', 'v', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'l', 'v', 'l', '_', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'i', 'l', 'v', 'l', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'i', 'l', 'v', 'l', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'l', 'v', - 'l', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'i', 'l', 'v', 'o', 'd', '_', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'l', 'v', 'o', 'd', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'i', 'l', 'v', 'o', 'd', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'l', 'v', 'o', 'd', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'i', 'l', 'v', 'r', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'l', 'v', 'r', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'l', - 'v', 'r', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'i', 'l', 'v', 'r', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'n', 's', 'e', 'r', - 't', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'i', 'n', 's', 'e', 'r', 't', '_', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'n', 's', 'e', - 'r', 't', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'i', 'n', 's', 'e', 'r', 't', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'i', 'n', - 's', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'i', 'n', 's', 'v', 'e', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'n', 's', 'v', 'e', '_', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'i', 'n', 's', 'v', 'e', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'i', 'n', 's', 'v', 'e', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'l', 'b', 'u', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'l', 'd', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'l', 'd', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'l', 'd', - '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'l', 'd', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'l', 'd', 'i', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'l', 'd', 'i', '_', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'l', 'd', 'i', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'l', 'd', 'i', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'l', 'h', 'x', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'l', 's', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'l', 'w', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 'a', 'd', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', - 'd', 'd', '_', 'q', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'd', 'd', '_', 'q', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 'a', 'd', 'd', 'r', '_', 'q', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'd', 'd', 'r', '_', 'q', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', - 'p', 's', '_', 'm', 'a', 'd', 'd', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'd', 'd', 'v', '_', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'm', 'a', 'd', 'd', 'v', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'd', 'd', 'v', '_', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 'a', 'd', 'd', 'v', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 'a', 'q', '_', 's', '_', 'w', '_', - 'p', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 'i', 'p', 's', '_', 'm', 'a', 'q', '_', 's', '_', 'w', '_', 'p', 'h', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'm', 'a', 'q', '_', 's', 'a', '_', 'w', '_', 'p', 'h', 'l', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'm', - 'a', 'q', '_', 's', 'a', '_', 'w', '_', 'p', 'h', 'r', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', '_', - 'a', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'm', 'a', 'x', '_', 'a', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', '_', 'a', - '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'm', 'a', 'x', '_', 'a', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', '_', 's', '_', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'm', 'a', 'x', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', '_', 's', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'm', 'a', 'x', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', '_', 'u', '_', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 'a', 'x', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', '_', 'u', '_', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', - 'x', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'm', 'a', 'x', 'i', '_', 's', '_', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', - 'x', 'i', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', 'i', '_', 's', '_', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 'a', 'x', 'i', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', 'i', '_', 'u', '_', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'm', 'a', 'x', 'i', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'a', 'x', 'i', '_', 'u', '_', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'm', 'a', 'x', 'i', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', '_', 'a', '_', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'm', 'i', 'n', '_', 'a', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', '_', 'a', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'm', 'i', 'n', '_', 'a', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', '_', 's', '_', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 'i', 'n', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', '_', 's', '_', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', - 'n', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'm', 'i', 'n', '_', 'u', '_', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', - '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'm', 'i', 'n', '_', 'u', '_', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', '_', - 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'm', 'i', 'n', 'i', '_', 's', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', 'i', - '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'm', 'i', 'n', 'i', '_', 's', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', - 'i', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'm', 'i', 'n', 'i', '_', 'u', '_', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'i', - 'n', 'i', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'm', 'i', 'n', 'i', '_', 'u', '_', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 'i', 'n', 'i', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'o', 'd', '_', 's', '_', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 'o', 'd', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'm', 'o', 'd', '_', 's', '_', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'o', - 'd', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'm', 'o', 'd', '_', 'u', '_', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'o', 'd', - '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 'm', 'o', 'd', '_', 'u', '_', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'o', 'd', '_', - 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 'i', 'p', 's', '_', 'm', 'o', 'd', 's', 'u', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'o', 'v', 'e', '_', - 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', - 's', '_', 'm', 's', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'm', 's', 'u', 'b', '_', 'q', '_', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 's', 'u', 'b', '_', 'q', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 's', 'u', 'b', 'r', '_', 'q', '_', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'm', 's', 'u', 'b', 'r', '_', 'q', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 's', 'u', 'b', - 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'm', 's', 'u', 'b', 'v', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 's', 'u', 'b', 'v', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'm', 's', 'u', 'b', 'v', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 's', 'u', 'b', 'v', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 'm', 't', 'h', 'l', 'i', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', '_', 'p', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'u', - 'l', '_', 'q', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'm', 'u', 'l', '_', 'q', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 'u', - 'l', '_', 's', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', 'e', 'q', '_', 's', '_', - 'w', '_', 'p', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', 'e', 'q', '_', 's', '_', 'w', - '_', 'p', 'h', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', 'e', 'u', '_', 's', '_', 'p', 'h', - '_', 'q', 'b', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', 'e', 'u', '_', 's', '_', 'p', 'h', - '_', 'q', 'b', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', 'q', '_', 'r', 's', '_', 'p', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'm', 'u', 'l', 'q', '_', 'r', 's', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', 'q', - '_', 's', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', 'q', '_', 's', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', - 'u', 'l', 'r', '_', 'q', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'u', 'l', 'r', '_', 'q', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'm', 'u', 'l', 's', 'a', '_', 'w', '_', 'p', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', - 's', 'a', 'q', '_', 's', '_', 'w', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'm', 'u', 'l', 't', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'm', 'u', 'l', 't', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'm', 'u', 'l', 'v', '_', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'u', 'l', - 'v', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'm', 'u', 'l', 'v', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'm', 'u', 'l', 'v', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'n', 'l', 'o', 'c', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'n', 'l', 'o', 'c', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'n', 'l', 'o', - 'c', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'n', 'l', 'o', 'c', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'n', 'l', 'z', 'c', '_', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'n', 'l', 'z', 'c', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 'n', 'l', 'z', 'c', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'n', 'l', 'z', - 'c', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'n', 'o', 'r', '_', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'n', 'o', 'r', 'i', '_', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'o', - 'r', '_', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'o', 'r', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'a', 'c', 'k', 'r', 'l', - '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 'p', 'c', 'k', 'e', 'v', '_', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'p', 'c', 'k', 'e', 'v', - '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'p', 'c', 'k', 'e', 'v', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'p', 'c', 'k', 'e', 'v', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 'p', 'c', 'k', 'o', 'd', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'p', 'c', 'k', 'o', 'd', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 'p', 'c', 'k', 'o', 'd', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'p', 'c', 'k', 'o', 'd', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'p', - 'c', 'n', 't', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'p', 'c', 'n', 't', '_', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'p', 'c', 'n', 't', - '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'p', 'c', 'n', 't', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'i', 'c', 'k', '_', 'p', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', - 's', '_', 'p', 'i', 'c', 'k', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', - 'q', '_', 'w', '_', 'p', 'h', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'q', '_', - 'w', '_', 'p', 'h', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'q', 'u', '_', 'p', - 'h', '_', 'q', 'b', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'q', 'u', '_', 'p', - 'h', '_', 'q', 'b', 'l', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'q', 'u', '_', - 'p', 'h', '_', 'q', 'b', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'q', 'u', '_', - 'p', 'h', '_', 'q', 'b', 'r', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'u', '_', - 'p', 'h', '_', 'q', 'b', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'u', '_', 'p', - 'h', '_', 'q', 'b', 'l', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'u', '_', 'p', - 'h', '_', 'q', 'b', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'e', 'u', '_', 'p', 'h', - '_', 'q', 'b', 'r', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'r', '_', 'q', 'b', '_', - 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', - 'p', 's', '_', 'p', 'r', 'e', 'c', 'r', '_', 's', 'r', 'a', '_', 'p', 'h', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', - 'p', 's', '_', 'p', 'r', 'e', 'c', 'r', '_', 's', 'r', 'a', '_', 'r', '_', - 'p', 'h', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'p', 'r', 'e', 'c', 'r', 'q', '_', 'p', 'h', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', - 's', '_', 'p', 'r', 'e', 'c', 'r', 'q', '_', 'q', 'b', '_', 'p', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 'p', 'r', 'e', 'c', 'r', 'q', '_', 'r', 's', '_', 'p', 'h', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 'p', 'r', 'e', 'c', 'r', 'q', 'u', '_', 's', '_', 'q', 'b', '_', 'p', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 'p', 'r', 'e', 'p', 'e', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'r', 'a', 'd', 'd', 'u', '_', - 'w', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 'r', 'd', 'd', 's', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'r', 'e', 'p', 'l', - '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 'i', 'p', 's', '_', 'r', 'e', 'p', 'l', '_', 'q', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'a', 't', '_', - 's', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 's', 'a', 't', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'a', 't', '_', 's', - '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 's', 'a', 't', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'a', 't', '_', 'u', '_', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'a', 't', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'a', 't', '_', 'u', '_', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 's', 'a', 't', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'h', 'f', '_', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'h', 'f', - '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 's', 'h', 'f', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'h', 'i', 'l', 'o', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', - 'h', 'l', 'l', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'h', 'l', 'l', '_', 'q', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 's', 'h', 'l', 'l', '_', 's', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'h', 'l', 'l', '_', - 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 'i', 'p', 's', '_', 's', 'h', 'r', 'a', '_', 'p', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'h', 'r', - 'a', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 'i', 'p', 's', '_', 's', 'h', 'r', 'a', '_', 'r', '_', 'p', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 's', 'h', 'r', 'a', '_', 'r', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'h', 'r', 'a', '_', - 'r', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 'i', 'p', 's', '_', 's', 'h', 'r', 'l', '_', 'p', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'h', 'r', - 'l', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'l', 'd', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'l', 'd', '_', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', - 'l', 'd', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'l', 'd', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'l', 'd', 'i', '_', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 's', 'l', 'd', 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 's', 'l', 'd', 'i', '_', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'l', 'd', - 'i', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 's', 'l', 'l', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'l', 'l', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'l', - 'l', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 's', 'l', 'l', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'l', 'l', 'i', '_', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', - 'l', 'l', 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 's', 'l', 'l', 'i', '_', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'l', 'l', 'i', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 's', 'p', 'l', 'a', 't', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'p', 'l', 'a', 't', '_', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'p', 'l', 'a', 't', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'p', 'l', 'a', 't', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 's', 'p', 'l', 'a', 't', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'p', 'l', 'a', 't', 'i', '_', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'p', 'l', 'a', 't', 'i', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'p', 'l', 'a', 't', 'i', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 's', 'r', 'a', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'a', '_', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'a', - '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 's', 'r', 'a', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'a', 'i', '_', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', - 'a', 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'r', 'a', 'i', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'a', 'i', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'r', 'a', 'r', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'a', 'r', '_', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', - 'a', 'r', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'r', 'a', 'r', '_', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'a', 'r', 'i', - '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 's', 'r', 'a', 'r', 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'a', 'r', 'i', '_', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'r', 'a', 'r', 'i', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'l', '_', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', - 'l', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 's', 'r', 'l', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'l', '_', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', - 'l', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'r', 'l', 'i', '_', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'l', 'i', '_', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'r', 'l', 'i', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'l', 'r', '_', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', - 'l', 'r', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'r', 'l', 'r', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'l', 'r', '_', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'r', 'l', 'r', 'i', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'l', 'r', 'i', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 's', 'r', 'l', 'r', 'i', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'r', 'l', 'r', 'i', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', - 't', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 's', 't', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 't', '_', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 't', '_', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 's', 'u', 'b', 'q', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'u', 'b', 'q', '_', 's', - '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 'i', 'p', 's', '_', 's', 'u', 'b', 'q', '_', 's', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'u', - 'b', 'q', 'h', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'u', 'b', 'q', 'h', '_', 'r', '_', - 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', - 'p', 's', '_', 's', 'u', 'b', 'q', 'h', '_', 'r', '_', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'u', - 'b', 'q', 'h', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 's', 'u', 'b', 's', '_', 's', '_', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', - 'b', 's', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 's', '_', 's', '_', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', - 'u', 'b', 's', '_', 's', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 's', '_', 'u', '_', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', - 's', 'u', 'b', 's', '_', 'u', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 's', '_', 'u', '_', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'u', 'b', 's', '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 's', 'u', 's', - '_', 'u', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'u', 'b', 's', 'u', 's', '_', 'u', '_', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', - 'u', 'b', 's', 'u', 's', '_', 'u', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 's', 'u', 's', - '_', 'u', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'u', 'b', 's', 'u', 'u', '_', 's', '_', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', - 'u', 'b', 's', 'u', 'u', '_', 's', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 's', 'u', 'u', - '_', 's', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'u', 'b', 's', 'u', 'u', '_', 's', '_', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 's', 'u', 'b', 'u', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'u', 'b', 'u', '_', 'q', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', - '_', 's', 'u', 'b', 'u', '_', 's', '_', 'p', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 's', 'u', 'b', 'u', - '_', 's', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 'i', 'p', 's', '_', 's', 'u', 'b', 'u', 'h', '_', 'q', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', - 's', 'u', 'b', 'u', 'h', '_', 'r', '_', 'q', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 'v', '_', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', - '_', 's', 'u', 'b', 'v', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 'v', '_', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', - 'b', 'v', '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'm', 's', 'a', '_', 's', 'u', 'b', 'v', 'i', '_', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 'v', - 'i', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', - 's', 'a', '_', 's', 'u', 'b', 'v', 'i', '_', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 's', 'u', 'b', 'v', 'i', - '_', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'v', 's', 'h', 'f', '_', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'v', 's', 'h', 'f', '_', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', 'a', '_', 'v', - 's', 'h', 'f', '_', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'm', 's', 'a', '_', 'v', 's', 'h', 'f', '_', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 'i', 'p', 's', '_', 'w', 'r', 'd', - 's', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'm', 's', - 'a', '_', 'x', 'o', 'r', '_', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'm', 's', 'a', '_', 'x', 'o', 'r', 'i', '_', 'b', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'a', 'b', 's', '_', 'i', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'a', 'b', 's', '_', 'l', 'l', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'a', 'd', 'd', '_', 'r', 'm', '_', 'd', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'a', 'd', 'd', '_', 'r', 'm', '_', 'f', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'a', 'd', 'd', '_', 'r', 'm', '_', 'f', 't', 'z', - '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'a', 'd', 'd', '_', 'r', - 'n', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'a', 'd', 'd', '_', - 'r', 'n', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'a', 'd', 'd', - '_', 'r', 'n', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'a', 'd', 'd', '_', 'r', 'p', '_', 'd', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'a', 'd', 'd', '_', 'r', 'p', '_', 'f', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'a', 'd', 'd', '_', 'r', 'p', '_', 'f', 't', 'z', '_', - 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'a', 'd', 'd', '_', 'r', 'z', - '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'a', 'd', 'd', '_', 'r', - 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'a', 'd', 'd', '_', - 'r', 'z', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'b', 'a', 'r', '_', 's', 'y', 'n', 'c', '\000', '_', '_', 's', 'y', 'n', - 'c', 't', 'h', 'r', 'e', 'a', 'd', 's', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'b', 'a', 'r', '0', '_', 'a', 'n', 'd', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'b', 'a', 'r', '0', '_', 'o', 'r', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'b', 'a', 'r', '0', '_', 'p', 'o', 'p', 'c', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'b', 'i', 't', 'c', 'a', 's', 't', '_', 'd', '2', 'l', - 'l', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'b', 'i', 't', 'c', 'a', 's', - 't', '_', 'f', '2', 'i', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'b', 'i', - 't', 'c', 'a', 's', 't', '_', 'i', '2', 'f', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'b', 'i', 't', 'c', 'a', 's', 't', '_', 'l', 'l', '2', 'd', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'b', 'r', 'e', 'v', '3', '2', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'b', 'r', 'e', 'v', '6', '4', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'c', 'e', 'i', 'l', '_', 'd', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'c', 'e', 'i', 'l', '_', 'f', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'c', 'e', 'i', 'l', '_', 'f', 't', 'z', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'c', 'l', 'z', '_', 'i', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'c', 'l', 'z', '_', 'l', 'l', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'c', 'o', 's', '_', 'a', 'p', 'p', 'r', 'o', 'x', '_', 'f', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'c', 'o', 's', '_', 'a', 'p', 'p', - 'r', 'o', 'x', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'd', '2', 'f', '_', 'r', 'm', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'd', '2', 'f', '_', 'r', 'm', '_', 'f', 't', 'z', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'f', '_', 'r', 'n', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'd', '2', 'f', '_', 'r', 'n', '_', 'f', 't', 'z', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'f', '_', 'r', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'd', '2', 'f', '_', 'r', 'p', '_', 'f', 't', 'z', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'f', '_', 'r', 'z', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'f', '_', 'r', 'z', '_', 'f', - 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'i', '_', 'h', - 'i', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'i', '_', 'l', 'o', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'i', '_', 'r', 'm', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'i', '_', 'r', 'n', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'i', '_', 'r', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'd', '2', 'i', '_', 'r', 'z', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'l', 'l', '_', 'r', 'm', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'l', 'l', '_', 'r', 'n', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'l', 'l', '_', 'r', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'l', 'l', '_', 'r', 'z', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'u', 'i', '_', 'r', 'm', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'u', 'i', '_', 'r', 'n', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'u', 'i', '_', 'r', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'u', 'i', '_', 'r', 'z', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'd', '2', 'u', 'l', 'l', '_', 'r', 'm', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'd', '2', 'u', 'l', 'l', '_', 'r', 'n', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'u', 'l', 'l', '_', 'r', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'd', '2', 'u', 'l', 'l', '_', 'r', 'z', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', 'v', '_', 'a', 'p', 'p', - 'r', 'o', 'x', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', - 'v', '_', 'a', 'p', 'p', 'r', 'o', 'x', '_', 'f', 't', 'z', '_', 'f', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', 'v', '_', 'r', 'm', '_', 'd', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', 'v', '_', 'r', 'm', '_', - 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', 'v', '_', 'r', 'm', - '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', - 'i', 'v', '_', 'r', 'n', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'd', 'i', 'v', '_', 'r', 'n', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'd', 'i', 'v', '_', 'r', 'n', '_', 'f', 't', 'z', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', 'v', '_', 'r', 'p', '_', 'd', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', 'v', '_', 'r', 'p', '_', 'f', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', 'v', '_', 'r', 'p', '_', - 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', 'i', - 'v', '_', 'r', 'z', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'd', - 'i', 'v', '_', 'r', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'd', 'i', 'v', '_', 'r', 'z', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'e', 'x', '2', '_', 'a', 'p', 'p', 'r', 'o', 'x', - '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'e', 'x', '2', '_', 'a', - 'p', 'p', 'r', 'o', 'x', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'e', 'x', '2', '_', 'a', 'p', 'p', 'r', 'o', 'x', '_', 'f', 't', 'z', '_', - 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'h', '_', 'r', 'n', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'h', '_', 'r', 'n', '_', - 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'i', '_', - 'r', 'm', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'i', '_', 'r', - 'm', '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', - 'i', '_', 'r', 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'i', - '_', 'r', 'n', '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'f', '2', 'i', '_', 'r', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', - '2', 'i', '_', 'r', 'p', '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'f', '2', 'i', '_', 'r', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'f', '2', 'i', '_', 'r', 'z', '_', 'f', 't', 'z', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'f', '2', 'l', 'l', '_', 'r', 'm', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'f', '2', 'l', 'l', '_', 'r', 'm', '_', 'f', 't', 'z', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'l', 'l', '_', 'r', 'n', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'l', 'l', '_', 'r', 'n', - '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'l', - 'l', '_', 'r', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'l', - 'l', '_', 'r', 'p', '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'f', '2', 'l', 'l', '_', 'r', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'f', '2', 'l', 'l', '_', 'r', 'z', '_', 'f', 't', 'z', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', 'i', '_', 'r', 'm', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', 'i', '_', 'r', 'm', '_', 'f', 't', - 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', 'i', '_', 'r', - 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', 'i', '_', 'r', - 'n', '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', - 'u', 'i', '_', 'r', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', - 'u', 'i', '_', 'r', 'p', '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'f', '2', 'u', 'i', '_', 'r', 'z', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'f', '2', 'u', 'i', '_', 'r', 'z', '_', 'f', 't', 'z', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', 'l', 'l', '_', 'r', 'm', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', 'l', 'l', '_', 'r', 'm', - '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', - 'l', 'l', '_', 'r', 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', - 'u', 'l', 'l', '_', 'r', 'n', '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'f', '2', 'u', 'l', 'l', '_', 'r', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'f', '2', 'u', 'l', 'l', '_', 'r', 'p', '_', 'f', 't', - 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', 'l', 'l', '_', - 'r', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', '2', 'u', 'l', 'l', - '_', 'r', 'z', '_', 'f', 't', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'f', 'a', 'b', 's', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', - 'a', 'b', 's', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', 'a', - 'b', 's', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'f', 'l', 'o', 'o', 'r', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'f', 'l', 'o', 'o', 'r', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'f', 'l', 'o', 'o', 'r', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'f', 'm', 'a', '_', 'r', 'm', '_', 'd', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'f', 'm', 'a', '_', 'r', 'm', '_', 'f', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'f', 'm', 'a', '_', 'r', 'm', '_', 'f', - 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', 'm', 'a', - '_', 'r', 'n', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', 'm', - 'a', '_', 'r', 'n', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', - 'm', 'a', '_', 'r', 'n', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'f', 'm', 'a', '_', 'r', 'p', '_', 'd', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'f', 'm', 'a', '_', 'r', 'p', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'f', 'm', 'a', '_', 'r', 'p', '_', 'f', 't', - 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', 'm', 'a', '_', - 'r', 'z', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', 'm', 'a', - '_', 'r', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'f', 'm', - 'a', '_', 'r', 'z', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'f', 'm', 'a', 'x', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'f', 'm', 'a', 'x', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'f', 'm', 'a', 'x', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'f', 'm', 'i', 'n', '_', 'd', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'f', 'm', 'i', 'n', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'f', 'm', 'i', 'n', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'h', '2', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'i', '2', 'd', '_', 'r', 'm', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'i', '2', 'd', '_', 'r', 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', - '2', 'd', '_', 'r', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', '2', - 'd', '_', 'r', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', '2', 'f', - '_', 'r', 'm', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', '2', 'f', '_', - 'r', 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', '2', 'f', '_', 'r', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', '2', 'f', '_', 'r', 'z', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', 's', 's', 'p', 'a', 'c', 'e', - 'p', '_', 'c', 'o', 'n', 's', 't', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'i', 's', 's', 'p', 'a', 'c', 'e', 'p', '_', 'g', 'l', 'o', 'b', 'a', 'l', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', 's', 's', 'p', 'a', 'c', 'e', - 'p', '_', 'l', 'o', 'c', 'a', 'l', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'i', 's', 's', 'p', 'a', 'c', 'e', 'p', '_', 's', 'h', 'a', 'r', 'e', 'd', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', 's', 't', 'y', 'p', 'e', 'p', - '_', 's', 'a', 'm', 'p', 'l', 'e', 'r', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'i', 's', 't', 'y', 'p', 'e', 'p', '_', 's', 'u', 'r', 'f', 'a', 'c', - 'e', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'i', 's', 't', 'y', 'p', 'e', - 'p', '_', 't', 'e', 'x', 't', 'u', 'r', 'e', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'l', 'g', '2', '_', 'a', 'p', 'p', 'r', 'o', 'x', '_', 'd', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'l', 'g', '2', '_', 'a', 'p', 'p', 'r', - 'o', 'x', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'l', 'g', '2', - '_', 'a', 'p', 'p', 'r', 'o', 'x', '_', 'f', 't', 'z', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'l', '2', 'd', '_', 'r', 'm', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'l', '2', 'd', '_', 'r', 'n', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'l', '2', 'd', '_', 'r', 'p', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'l', '2', 'd', '_', 'r', 'z', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'l', '2', 'f', '_', 'r', 'm', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'l', '2', 'f', '_', 'r', 'n', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'l', '2', 'f', '_', 'r', 'p', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'l', '2', 'f', '_', 'r', 'z', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'l', 'o', 'h', 'i', '_', 'i', '2', 'd', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'a', 'x', '_', 'i', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'm', 'a', 'x', '_', 'l', 'l', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'm', 'a', 'x', '_', 'u', 'i', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'm', 'a', 'x', '_', 'u', 'l', 'l', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'm', 'e', 'm', 'b', 'a', 'r', '_', 'c', 't', 'a', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'm', 'e', 'm', 'b', 'a', 'r', '_', 'g', 'l', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'e', 'm', 'b', 'a', 'r', '_', - 's', 'y', 's', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'i', 'n', '_', - 'i', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'i', 'n', '_', 'l', 'l', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'i', 'n', '_', 'u', 'i', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'i', 'n', '_', 'u', 'l', 'l', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', '_', 'r', 'm', '_', 'd', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', '_', 'r', 'm', '_', - 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', '_', 'r', 'm', - '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', - 'u', 'l', '_', 'r', 'n', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'm', 'u', 'l', '_', 'r', 'n', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'm', 'u', 'l', '_', 'r', 'n', '_', 'f', 't', 'z', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', '_', 'r', 'p', '_', 'd', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', '_', 'r', 'p', '_', 'f', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', '_', 'r', 'p', '_', - 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', - 'l', '_', 'r', 'z', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', - 'u', 'l', '_', 'r', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'm', 'u', 'l', '_', 'r', 'z', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', '2', '4', '_', 'i', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', '2', '4', '_', 'u', 'i', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', 'h', 'i', '_', 'i', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', 'h', 'i', '_', 'l', 'l', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', 'h', 'i', '_', 'u', 'i', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'm', 'u', 'l', 'h', 'i', '_', 'u', - 'l', 'l', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'p', 'o', 'p', 'c', '_', - 'i', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'p', 'o', 'p', 'c', '_', 'l', - 'l', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'p', 'r', 'm', 't', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'c', 'p', '_', 'a', 'p', 'p', 'r', 'o', - 'x', '_', 'f', 't', 'z', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'r', 'c', 'p', '_', 'r', 'm', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'c', 'p', '_', 'r', 'm', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'c', 'p', '_', 'r', 'm', '_', 'f', 't', 'z', '_', 'f', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'c', 'p', '_', 'r', 'n', '_', 'd', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'c', 'p', '_', 'r', 'n', '_', - 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'c', 'p', '_', 'r', 'n', - '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', - 'c', 'p', '_', 'r', 'p', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'r', 'c', 'p', '_', 'r', 'p', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'c', 'p', '_', 'r', 'p', '_', 'f', 't', 'z', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'c', 'p', '_', 'r', 'z', '_', 'd', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'c', 'p', '_', 'r', 'z', '_', 'f', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'c', 'p', '_', 'r', 'z', '_', - 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', - 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'c', 'l', 'o', - 'c', 'k', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', - 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'c', 'l', 'o', 'c', 'k', '6', - '4', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', - 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'c', 't', 'a', 'i', 'd', '_', 'w', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', - 'x', '_', 's', 'r', 'e', 'g', '_', 'c', 't', 'a', 'i', 'd', '_', 'x', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', - '_', 's', 'r', 'e', 'g', '_', 'c', 't', 'a', 'i', 'd', '_', 'y', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', - 's', 'r', 'e', 'g', '_', 'c', 't', 'a', 'i', 'd', '_', 'z', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', - 'r', 'e', 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '0', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', - 'e', 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '0', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '1', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '2', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '3', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '4', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '5', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '6', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '7', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '8', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '1', '9', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '0', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '1', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '2', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '3', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '4', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '5', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '6', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '7', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '8', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '2', '9', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', - '_', 'e', 'n', 'v', 'r', 'e', 'g', '3', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', - 'e', 'n', 'v', 'r', 'e', 'g', '3', '0', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', - 'e', 'n', 'v', 'r', 'e', 'g', '3', '1', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', - 'e', 'n', 'v', 'r', 'e', 'g', '4', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'e', - 'n', 'v', 'r', 'e', 'g', '5', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', - 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'e', 'n', - 'v', 'r', 'e', 'g', '6', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', - 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'e', 'n', 'v', - 'r', 'e', 'g', '7', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', - 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'e', 'n', 'v', 'r', - 'e', 'g', '8', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', - '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'e', 'n', 'v', 'r', 'e', - 'g', '9', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', - 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'g', 'r', 'i', 'd', 'i', 'd', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', - 'x', '_', 's', 'r', 'e', 'g', '_', 'l', 'a', 'n', 'e', 'i', 'd', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', - 's', 'r', 'e', 'g', '_', 'l', 'a', 'n', 'e', 'm', 'a', 's', 'k', '_', 'e', - 'q', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', - 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'l', 'a', 'n', 'e', 'm', 'a', 's', - 'k', '_', 'g', 'e', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', - 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'l', 'a', 'n', 'e', - 'm', 'a', 's', 'k', '_', 'g', 't', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'l', - 'a', 'n', 'e', 'm', 'a', 's', 'k', '_', 'l', 'e', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'l', 'a', 'n', 'e', 'm', 'a', 's', 'k', '_', 'l', 't', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', - 's', 'r', 'e', 'g', '_', 'n', 'c', 't', 'a', 'i', 'd', '_', 'w', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', - 's', 'r', 'e', 'g', '_', 'n', 'c', 't', 'a', 'i', 'd', '_', 'x', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', - 's', 'r', 'e', 'g', '_', 'n', 'c', 't', 'a', 'i', 'd', '_', 'y', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', - 's', 'r', 'e', 'g', '_', 'n', 'c', 't', 'a', 'i', 'd', '_', 'z', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', - 's', 'r', 'e', 'g', '_', 'n', 's', 'm', 'i', 'd', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'n', 't', 'i', 'd', '_', 'w', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', - 'n', 't', 'i', 'd', '_', 'x', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', - 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'n', 't', - 'i', 'd', '_', 'y', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', - 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'n', 't', 'i', 'd', - '_', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', - 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'n', 'w', 'a', 'r', 'p', 'i', - 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', - 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'p', 'm', '0', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', - 'e', 'g', '_', 'p', 'm', '1', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', - 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'p', 'm', - '2', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', - 't', 'x', '_', 's', 'r', 'e', 'g', '_', 'p', 'm', '3', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', - 'e', 'g', '_', 's', 'm', 'i', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 't', - 'i', 'd', '_', 'w', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', - 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', 't', 'i', 'd', '_', - 'x', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', - 't', 'x', '_', 's', 'r', 'e', 'g', '_', 't', 'i', 'd', '_', 'y', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', - 's', 'r', 'e', 'g', '_', 't', 'i', 'd', '_', 'z', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', - 'g', '_', 'w', 'a', 'r', 'p', 'i', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'e', 'a', 'd', '_', 'p', 't', 'x', '_', 's', 'r', 'e', 'g', '_', - 'w', 'a', 'r', 'p', 's', 'i', 'z', 'e', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'o', 't', 'a', 't', 'e', '_', 'b', '3', '2', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'r', 'o', 't', 'a', 't', 'e', '_', 'b', '6', '4', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 'o', 't', 'a', 't', 'e', '_', 'r', - 'i', 'g', 'h', 't', '_', 'b', '6', '4', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'o', 'u', 'n', 'd', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'o', 'u', 'n', 'd', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'r', 'o', 'u', 'n', 'd', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 'r', 's', 'q', 'r', 't', '_', 'a', 'p', 'p', 'r', - 'o', 'x', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'r', 's', 'q', - 'r', 't', '_', 'a', 'p', 'p', 'r', 'o', 'x', '_', 'f', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 'r', 's', 'q', 'r', 't', '_', 'a', 'p', 'p', 'r', 'o', - 'x', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'a', 'd', '_', 'i', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'a', - 'd', '_', 'u', 'i', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'a', 't', - 'u', 'r', 'a', 't', 'e', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'a', 't', 'u', 'r', 'a', 't', 'e', '_', 'f', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'a', 't', 'u', 'r', 'a', 't', 'e', '_', 'f', 't', 'z', - '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'h', 'f', 'l', '_', - 'b', 'f', 'l', 'y', '_', 'f', '3', '2', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'h', 'f', 'l', '_', 'b', 'f', 'l', 'y', '_', 'i', '3', '2', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'h', 'f', 'l', '_', 'd', 'o', 'w', - 'n', '_', 'f', '3', '2', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'h', - 'f', 'l', '_', 'd', 'o', 'w', 'n', '_', 'i', '3', '2', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'h', 'f', 'l', '_', 'i', 'd', 'x', '_', 'f', '3', - '2', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'h', 'f', 'l', '_', 'i', - 'd', 'x', '_', 'i', '3', '2', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'h', 'f', 'l', '_', 'u', 'p', '_', 'f', '3', '2', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'h', 'f', 'l', '_', 'u', 'p', '_', 'i', '3', '2', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'i', 'n', '_', 'a', 'p', 'p', 'r', - 'o', 'x', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'i', 'n', - '_', 'a', 'p', 'p', 'r', 'o', 'x', '_', 'f', 't', 'z', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', 'a', 'p', 'p', 'r', - 'o', 'x', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', - 't', '_', 'a', 'p', 'p', 'r', 'o', 'x', '_', 'f', 't', 'z', '_', 'f', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', 'r', 'm', '_', 'd', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', 'r', 'm', - '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', - 'r', 'm', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'q', 'r', 't', '_', 'r', 'n', '_', 'd', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'q', 'r', 't', '_', 'r', 'n', '_', 'f', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', 'r', 'n', '_', 'f', 't', - 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', - '_', 'r', 'p', '_', 'd', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'q', - 'r', 't', '_', 'r', 'p', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'q', 'r', 't', '_', 'r', 'p', '_', 'f', 't', 'z', '_', 'f', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', 'r', 'z', '_', 'd', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', 'r', 'z', - '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'q', 'r', 't', '_', - 'r', 'z', '_', 'f', 't', 'z', '_', 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 'q', '_', 'a', 'r', 'r', 'a', 'y', '_', 's', 'i', 'z', 'e', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 'q', '_', 'c', 'h', 'a', - 'n', 'n', 'e', 'l', '_', 'd', 'a', 't', 'a', '_', 't', 'y', 'p', 'e', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 'q', '_', 'c', 'h', 'a', 'n', - 'n', 'e', 'l', '_', 'o', 'r', 'd', 'e', 'r', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 'q', '_', 'd', 'e', 'p', 't', 'h', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 'q', '_', 'h', 'e', 'i', 'g', 'h', 't', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 'q', '_', 'w', 'i', 'd', 't', - 'h', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '1', '6', '_', 'c', - 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '1', - '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', - 'i', '1', '6', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', - 'y', '_', 'i', '3', '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', - 'r', 'r', 'a', 'y', '_', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', - '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '3', '2', '_', 'z', 'e', 'r', 'o', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '6', '4', '_', 'c', 'l', - 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '6', '4', - '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', - '6', '4', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', - 'a', 'y', '_', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', - 'r', 'a', 'y', '_', 'i', '8', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', - 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '1', '6', '_', 'c', 'l', 'a', 'm', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '1', '6', - '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', - '2', 'i', '1', '6', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', - 'a', 'y', '_', 'v', '2', 'i', '3', '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', - 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '3', '2', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', - '3', '2', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'v', '2', 'i', '6', '4', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', - 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '6', '4', '_', 't', 'r', 'a', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '6', '4', - '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', - '2', 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', - 'a', 'y', '_', 'v', '2', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', - 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '8', '_', 'z', 'e', 'r', 'o', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '1', '6', '_', - 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', - '4', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', - 'a', 'y', '_', 'v', '4', 'i', '1', '6', '_', 'z', 'e', 'r', 'o', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', - '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '3', '2', '_', 'c', 'l', - 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', - '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'v', '4', 'i', '3', '2', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'a', - 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '8', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', - '8', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'i', '1', '6', '_', 'c', 'l', - 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', - 'd', '_', 'i', '1', '6', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'i', '3', - '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'i', '3', '2', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'i', '3', '2', '_', 'z', 'e', 'r', 'o', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', - 'd', '_', 'i', '6', '4', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'i', - '6', '4', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'i', '6', '4', '_', 'z', - 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', - 'd', '_', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'i', '8', '_', - 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'b', '_', '1', 'd', '_', 'v', '2', 'i', '1', '6', '_', 'c', 'l', - 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'v', '2', 'i', '1', '6', '_', 't', 'r', 'a', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '1', 'd', '_', 'v', '2', 'i', '1', '6', '_', 'z', 'e', 'r', 'o', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', - 'd', '_', 'v', '2', 'i', '3', '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', - '_', 'v', '2', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', - '2', 'i', '3', '2', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', '2', 'i', - '6', '4', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', '2', 'i', '6', - '4', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', '2', 'i', '6', '4', '_', - 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'b', '_', '1', 'd', '_', 'v', '2', 'i', '8', '_', 'c', 'l', 'a', - 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'b', '_', '1', 'd', '_', 'v', '2', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', - 'd', '_', 'v', '2', 'i', '8', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', - '4', 'i', '1', '6', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', '4', - 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', '4', 'i', '1', - '6', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', '4', 'i', '3', '2', '_', - 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', '4', 'i', '3', '2', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '1', 'd', '_', 'v', '4', 'i', '3', '2', '_', 'z', 'e', 'r', - 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '1', 'd', '_', 'v', '4', 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', - 'd', '_', 'v', '4', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '1', 'd', '_', 'v', - '4', 'i', '8', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', - 'y', '_', 'i', '1', '6', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', - 'r', 'r', 'a', 'y', '_', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', - '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '1', '6', '_', 'z', 'e', 'r', 'o', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '3', '2', '_', 'c', 'l', - 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '3', '2', - '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', - '3', '2', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'i', '6', '4', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', - 'r', 'a', 'y', '_', 'i', '6', '4', '_', 't', 'r', 'a', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', - 'a', 'r', 'r', 'a', 'y', '_', 'i', '6', '4', '_', 'z', 'e', 'r', 'o', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', - 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '8', '_', 'c', 'l', 'a', 'm', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '8', '_', 't', 'r', - 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '8', '_', 'z', - 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', - '1', '6', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', - 'y', '_', 'v', '2', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', - 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '1', '6', '_', 'z', 'e', 'r', - 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '3', '2', - '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', - 'v', '2', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', - 'r', 'a', 'y', '_', 'v', '2', 'i', '3', '2', '_', 'z', 'e', 'r', 'o', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', - 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '6', '4', '_', 'c', - 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', - 'i', '6', '4', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', - 'y', '_', 'v', '2', 'i', '6', '4', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', - 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '8', '_', 'c', 'l', 'a', 'm', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '8', '_', - 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', - 'i', '8', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'v', '4', 'i', '1', '6', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', - 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '1', '6', '_', 't', 'r', 'a', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '1', '6', - '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', - '4', 'i', '3', '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', - 'r', 'a', 'y', '_', 'v', '4', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', - 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '3', '2', '_', 'z', - 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', - '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'v', '4', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'a', 'r', - 'r', 'a', 'y', '_', 'v', '4', 'i', '8', '_', 'z', 'e', 'r', 'o', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', - '_', 'i', '1', '6', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'i', '1', - '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'i', '1', '6', '_', 'z', 'e', - 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'b', '_', '2', 'd', '_', 'i', '3', '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', - 'd', '_', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'i', '3', - '2', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'i', '6', '4', '_', 'c', 'l', - 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '2', 'd', '_', 'i', '6', '4', '_', 't', 'r', 'a', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', - 'd', '_', 'i', '6', '4', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'i', '8', - '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'i', '8', '_', 't', 'r', 'a', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '2', 'd', '_', 'i', '8', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', - '2', 'i', '1', '6', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '2', - 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '2', 'i', '1', - '6', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '2', 'i', '3', '2', '_', - 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '2', 'i', '3', '2', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '2', 'd', '_', 'v', '2', 'i', '3', '2', '_', 'z', 'e', 'r', - 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '2', 'd', '_', 'v', '2', 'i', '6', '4', '_', 'c', 'l', 'a', 'm', 'p', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '2', 'd', '_', 'v', '2', 'i', '6', '4', '_', 't', 'r', 'a', 'p', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', - '_', 'v', '2', 'i', '6', '4', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', - '2', 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '2', 'i', - '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '2', 'i', '8', '_', 'z', - 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '2', 'd', '_', 'v', '4', 'i', '1', '6', '_', 'c', 'l', 'a', - 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'b', '_', '2', 'd', '_', 'v', '4', 'i', '1', '6', '_', 't', 'r', 'a', 'p', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '2', 'd', '_', 'v', '4', 'i', '1', '6', '_', 'z', 'e', 'r', 'o', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', - '_', 'v', '4', 'i', '3', '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', - 'v', '4', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '4', - 'i', '3', '2', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '4', 'i', '8', - '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'b', '_', '2', 'd', '_', 'v', '4', 'i', '8', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '2', 'd', '_', 'v', '4', 'i', '8', '_', 'z', 'e', 'r', 'o', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '3', 'd', '_', 'i', '1', '6', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', - 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'i', '1', '6', '_', - 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'b', '_', '3', 'd', '_', 'i', '3', '2', '_', 'c', 'l', 'a', 'm', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '3', 'd', '_', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', - 'i', '3', '2', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'i', '6', '4', '_', - 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '3', 'd', '_', 'i', '6', '4', '_', 't', 'r', 'a', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', - '_', '3', 'd', '_', 'i', '6', '4', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', - 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'i', '8', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '3', 'd', '_', 'i', '8', '_', 'z', 'e', 'r', 'o', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', - '_', 'v', '2', 'i', '1', '6', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', - 'v', '2', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '2', - 'i', '1', '6', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '2', 'i', '3', - '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '2', 'i', '3', '2', - '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '2', 'i', '3', '2', '_', 'z', - 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'b', '_', '3', 'd', '_', 'v', '2', 'i', '6', '4', '_', 'c', 'l', 'a', - 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'b', '_', '3', 'd', '_', 'v', '2', 'i', '6', '4', '_', 't', 'r', 'a', 'p', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '3', 'd', '_', 'v', '2', 'i', '6', '4', '_', 'z', 'e', 'r', 'o', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', - '_', 'v', '2', 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', - '2', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '2', 'i', '8', - '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '4', 'i', '1', '6', '_', 'c', - 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'b', '_', '3', 'd', '_', 'v', '4', 'i', '1', '6', '_', 't', 'r', - 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'b', '_', '3', 'd', '_', 'v', '4', 'i', '1', '6', '_', 'z', 'e', 'r', 'o', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', - '3', 'd', '_', 'v', '4', 'i', '3', '2', '_', 'c', 'l', 'a', 'm', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', - 'd', '_', 'v', '4', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', - 'v', '4', 'i', '3', '2', '_', 'z', 'e', 'r', 'o', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '4', - 'i', '8', '_', 'c', 'l', 'a', 'm', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '4', 'i', '8', - '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'b', '_', '3', 'd', '_', 'v', '4', 'i', '8', '_', 'z', 'e', - 'r', 'o', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'p', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '1', '6', '_', - 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'p', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '3', - '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', - 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'v', '2', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'a', - 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '3', '2', '_', 't', 'r', 'a', 'p', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', - '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '8', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'p', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', - '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'v', '4', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'a', - 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '1', - 'd', '_', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'i', '3', - '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'i', '8', '_', 't', 'r', 'a', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', - '_', '1', 'd', '_', 'v', '2', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '1', - 'd', '_', 'v', '2', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', - 'v', '2', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'v', '4', 'i', - '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'p', '_', '1', 'd', '_', 'v', '4', 'i', '3', '2', - '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'p', '_', '1', 'd', '_', 'v', '4', 'i', '8', '_', 't', 'r', - 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'p', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '1', '6', '_', - 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'p', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'i', '3', - '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', - 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'v', '2', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'a', - 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '3', '2', '_', 't', 'r', 'a', 'p', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', - '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '2', 'i', '8', '_', 't', - 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', - '_', 'p', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', - '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'a', 'r', 'r', 'a', 'y', - '_', 'v', '4', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', - 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'a', - 'r', 'r', 'a', 'y', '_', 'v', '4', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '2', - 'd', '_', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'i', '3', - '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', - 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'i', '8', '_', 't', 'r', 'a', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', - '_', '2', 'd', '_', 'v', '2', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '2', - 'd', '_', 'v', '2', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', - 'v', '2', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'v', '4', 'i', - '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 's', 'u', 's', 't', '_', 'p', '_', '2', 'd', '_', 'v', '4', 'i', '3', '2', - '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', - 's', 't', '_', 'p', '_', '2', 'd', '_', 'v', '4', 'i', '8', '_', 't', 'r', - 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'p', '_', '3', 'd', '_', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', - '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '3', 'd', - '_', 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', - 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '3', 'd', '_', 'i', '8', '_', - 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', - 't', '_', 'p', '_', '3', 'd', '_', 'v', '2', 'i', '1', '6', '_', 't', 'r', - 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', - 'p', '_', '3', 'd', '_', 'v', '2', 'i', '3', '2', '_', 't', 'r', 'a', 'p', - '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', - '3', 'd', '_', 'v', '2', 'i', '8', '_', 't', 'r', 'a', 'p', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '3', 'd', '_', - 'v', '4', 'i', '1', '6', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', - 'v', 'm', '_', 's', 'u', 's', 't', '_', 'p', '_', '3', 'd', '_', 'v', '4', - 'i', '3', '2', '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 's', 'u', 's', 't', '_', 'p', '_', '3', 'd', '_', 'v', '4', 'i', '8', - '_', 't', 'r', 'a', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 's', 'w', - 'a', 'p', '_', 'l', 'o', '_', 'h', 'i', '_', 'b', '6', '4', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 't', 'r', 'u', 'n', 'c', '_', 'd', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 't', 'r', 'u', 'n', 'c', '_', 'f', '\000', '_', '_', - 'n', 'v', 'v', 'm', '_', 't', 'r', 'u', 'n', 'c', '_', 'f', 't', 'z', '_', - 'f', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 't', 'x', 'q', '_', 'a', 'r', - 'r', 'a', 'y', '_', 's', 'i', 'z', 'e', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 't', 'x', 'q', '_', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '_', 'd', 'a', - 't', 'a', '_', 't', 'y', 'p', 'e', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 't', 'x', 'q', '_', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '_', 'o', 'r', 'd', - 'e', 'r', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 't', 'x', 'q', '_', 'd', - 'e', 'p', 't', 'h', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 't', 'x', 'q', - '_', 'h', 'e', 'i', 'g', 'h', 't', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 't', 'x', 'q', '_', 'n', 'u', 'm', '_', 'm', 'i', 'p', 'm', 'a', 'p', '_', - 'l', 'e', 'v', 'e', 'l', 's', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 't', - 'x', 'q', '_', 'n', 'u', 'm', '_', 's', 'a', 'm', 'p', 'l', 'e', 's', '\000', - '_', '_', 'n', 'v', 'v', 'm', '_', 't', 'x', 'q', '_', 'w', 'i', 'd', 't', - 'h', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'i', '2', 'd', '_', 'r', - 'm', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'i', '2', 'd', '_', 'r', - 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'i', '2', 'd', '_', 'r', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'i', '2', 'd', '_', 'r', - 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'i', '2', 'f', '_', 'r', - 'm', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'i', '2', 'f', '_', 'r', - 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'i', '2', 'f', '_', 'r', - 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'i', '2', 'f', '_', 'r', - 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'l', 'l', '2', 'd', '_', - 'r', 'm', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'l', 'l', '2', 'd', - '_', 'r', 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'l', 'l', '2', - 'd', '_', 'r', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'l', 'l', - '2', 'd', '_', 'r', 'z', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', 'l', - 'l', '2', 'f', '_', 'r', 'm', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', 'u', - 'l', 'l', '2', 'f', '_', 'r', 'n', '\000', '_', '_', 'n', 'v', 'v', 'm', '_', - 'u', 'l', 'l', '2', 'f', '_', 'r', 'p', '\000', '_', '_', 'n', 'v', 'v', 'm', - '_', 'u', 'l', 'l', '2', 'f', '_', 'r', 'z', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'c', 'r', - 'y', 'p', 't', 'o', '_', 'v', 'c', 'i', 'p', 'h', 'e', 'r', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', - '_', 'c', 'r', 'y', 'p', 't', 'o', '_', 'v', 'c', 'i', 'p', 'h', 'e', 'r', - 'l', 'a', 's', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'c', 'r', 'y', 'p', 't', 'o', '_', - 'v', 'n', 'c', 'i', 'p', 'h', 'e', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'c', 'r', 'y', - 'p', 't', 'o', '_', 'v', 'n', 'c', 'i', 'p', 'h', 'e', 'r', 'l', 'a', 's', - 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'c', 'r', 'y', 'p', 't', 'o', '_', 'v', 'p', 'e', - 'r', 'm', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'c', 'r', 'y', 'p', 't', 'o', - '_', 'v', 'p', 'm', 's', 'u', 'm', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'c', 'r', 'y', - 'p', 't', 'o', '_', 'v', 'p', 'm', 's', 'u', 'm', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'c', 'r', 'y', 'p', 't', 'o', '_', 'v', 'p', 'm', 's', 'u', 'm', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'c', 'r', 'y', 'p', 't', 'o', '_', 'v', 'p', 'm', 's', 'u', - 'm', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'c', 'r', 'y', 'p', 't', 'o', '_', 'v', 's', - 'b', 'o', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'c', 'r', 'y', 'p', 't', 'o', '_', 'v', - 's', 'h', 'a', 's', 'i', 'g', 'm', 'a', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'c', 'r', - 'y', 'p', 't', 'o', '_', 'v', 's', 'h', 'a', 's', 'i', 'g', 'm', 'a', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'd', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'd', 's', 's', 'a', - 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'd', 's', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'd', 's', - 't', 's', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'd', 's', 't', 's', 't', 't', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'd', 's', 't', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'm', 'f', 'v', 's', 'c', - 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'm', 't', 'v', 's', 'c', 'r', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'a', 'd', 'd', 'c', 'u', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'd', 'd', - 'c', 'u', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'd', 'd', 'e', 'c', 'u', 'q', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'v', 'a', 'd', 'd', 'e', 'u', 'q', 'm', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', - '_', 'v', 'a', 'd', 'd', 's', 'b', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'd', - 'd', 's', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'd', 'd', 's', 'w', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'v', 'a', 'd', 'd', 'u', 'b', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'a', 'd', 'd', 'u', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'd', 'd', - 'u', 'w', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'v', 'g', 's', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'a', 'v', 'g', 's', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'v', - 'g', 's', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'v', 'g', 'u', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'a', 'v', 'g', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'a', 'v', - 'g', 'u', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'b', 'p', 'e', 'r', 'm', 'q', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'c', 'f', 's', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'f', - 'u', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'b', 'f', 'p', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'c', 'm', 'p', 'b', 'f', 'p', '_', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'c', 'm', 'p', 'e', 'q', 'f', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', - 'p', 'e', 'q', 'f', 'p', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', - 'e', 'q', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'e', 'q', 'u', - 'b', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'e', 'q', 'u', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'e', 'q', 'u', 'd', '_', 'p', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'c', 'm', 'p', 'e', 'q', 'u', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'c', 'm', 'p', 'e', 'q', 'u', 'h', '_', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', - 'c', 'm', 'p', 'e', 'q', 'u', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', - 'e', 'q', 'u', 'w', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', - 'e', 'f', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 'e', 'f', 'p', - '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 'f', 'p', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 'f', 'p', '_', 'p', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 's', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', - 'c', 'm', 'p', 'g', 't', 's', 'b', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', - 'm', 'p', 'g', 't', 's', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', - 't', 's', 'd', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', - 's', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 's', 'h', '_', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 's', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 's', 'w', '_', 'p', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', - '_', 'v', 'c', 'm', 'p', 'g', 't', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', - 'm', 'p', 'g', 't', 'u', 'b', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', - 'p', 'g', 't', 'u', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', - 'u', 'd', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 'u', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 'u', 'h', '_', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'v', 'c', 'm', 'p', 'g', 't', 'u', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', - '_', 'v', 'c', 'm', 'p', 'g', 't', 'u', 'w', '_', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'c', 't', 's', 'x', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'c', 't', 'u', 'x', - 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'e', 'x', 'p', 't', 'e', 'f', 'p', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'g', 'b', 'b', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'l', 'o', 'g', - 'e', 'f', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'a', 'd', 'd', 'f', 'p', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'm', 'a', 'x', 'f', 'p', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', - 'a', 'x', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'a', 'x', 's', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'm', 'a', 'x', 's', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', - 'a', 'x', 's', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'a', 'x', 'u', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'm', 'a', 'x', 'u', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', - 'a', 'x', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'a', 'x', 'u', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'm', 'h', 'a', 'd', 'd', 's', 'h', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', - '_', 'v', 'm', 'h', 'r', 'a', 'd', 'd', 's', 'h', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'm', 'i', 'n', 'f', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'i', 'n', 's', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'm', 'i', 'n', 's', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'm', 'i', 'n', 's', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'i', 'n', 's', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'm', 'i', 'n', 'u', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'm', 'i', 'n', 'u', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'i', 'n', 'u', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'm', 'i', 'n', 'u', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'm', 'l', 'a', 'd', 'd', 'u', 'h', 'm', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', - 's', 'u', 'm', 'm', 'b', 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 's', 'u', 'm', - 's', 'h', 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 's', 'u', 'm', 's', 'h', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'v', 'm', 's', 'u', 'm', 'u', 'b', 'm', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', - '_', 'v', 'm', 's', 'u', 'm', 'u', 'h', 'm', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', - 's', 'u', 'm', 'u', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'u', 'l', 'e', - 's', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'u', 'l', 'e', 's', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'm', 'u', 'l', 'e', 's', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', - 'u', 'l', 'e', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'u', 'l', 'e', 'u', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'm', 'u', 'l', 'e', 'u', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', - '_', 'v', 'm', 'u', 'l', 'o', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'u', - 'l', 'o', 's', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'u', 'l', 'o', 's', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'v', 'm', 'u', 'l', 'o', 'u', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'm', 'u', 'l', 'o', 'u', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'm', 'u', 'l', - 'o', 'u', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'n', 'm', 's', 'u', 'b', 'f', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'v', 'p', 'e', 'r', 'm', '_', '4', 's', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'p', 'k', 'p', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'p', 'k', 's', - 'd', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'p', 'k', 's', 'd', 'u', 's', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'p', 'k', 's', 'h', 's', 's', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', - 'p', 'k', 's', 'h', 'u', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'p', 'k', 's', 'w', - 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 'p', 'k', 's', 'w', 'u', 's', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'p', 'k', 'u', 'd', 'u', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'p', - 'k', 'u', 'h', 'u', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'p', 'k', 'u', 'w', 'u', - 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'r', 'e', 'f', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', - 'r', 'f', 'i', 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'r', 'f', 'i', 'n', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 'r', 'f', 'i', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'r', 'f', 'i', - 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 'r', 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'r', - 'l', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 'r', 'l', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', - 'r', 'l', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'r', 's', 'q', 'r', 't', 'e', 'f', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', - 'i', 'v', 'e', 'c', '_', 'v', 's', 'e', 'l', '_', '4', 's', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 's', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'l', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 's', 'l', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'l', 'o', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 's', 'l', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 's', 'r', 'a', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'r', - 'a', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'r', 'a', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 's', 'r', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'r', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', - '_', 'v', 's', 'r', 'o', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'r', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 's', 'u', 'b', 'c', 'u', 'q', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', - 'u', 'b', 'c', 'u', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'u', 'b', 'e', 'c', - 'u', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'u', 'b', 'e', 'u', 'q', 'm', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 's', 'u', 'b', 's', 'b', 's', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', - 's', 'u', 'b', 's', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'u', 'b', 's', - 'w', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'u', 'b', 'u', 'b', 's', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', - 'c', '_', 'v', 's', 'u', 'b', 'u', 'h', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', - 'u', 'b', 'u', 'w', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'u', 'm', '2', 's', - 'w', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', - 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'u', 'm', '4', 's', 'b', 's', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 's', 'u', 'm', '4', 's', 'h', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 's', 'u', 'm', '4', 'u', 'b', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 's', 'u', - 'm', 's', 'w', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'u', 'p', 'k', 'h', 'p', 'x', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', - 'v', 'e', 'c', '_', 'v', 'u', 'p', 'k', 'h', 's', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', - 'v', 'u', 'p', 'k', 'h', 's', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'u', 'p', 'k', - 'h', 's', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', - 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'u', 'p', 'k', 'l', 'p', 'x', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', - 'e', 'c', '_', 'v', 'u', 'p', 'k', 'l', 's', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', - 'u', 'p', 'k', 'l', 's', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'a', 'l', 't', 'i', 'v', 'e', 'c', '_', 'v', 'u', 'p', 'k', 'l', - 's', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'b', 'p', - 'e', 'r', 'm', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'd', 'i', 'v', 'd', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'd', 'i', 'v', 'd', 'e', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'd', 'i', 'v', 'w', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'd', 'i', 'v', 'w', 'e', 'u', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'g', 'e', 't', '_', 't', 'e', 'x', 'a', 's', - 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'g', 'e', 't', - '_', 't', 'e', 'x', 'a', 's', 'r', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'g', 'e', 't', '_', 't', 'f', 'h', 'a', 'r', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'g', 'e', 't', '_', 't', 'f', - 'i', 'a', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', - 'p', 'x', '_', 'q', 'v', 'f', 'a', 'b', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'a', 'd', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', - 'q', 'v', 'f', 'a', 'd', 'd', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', 'f', 'i', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', - 'v', 'f', 'c', 'f', 'i', 'd', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', 'f', 'i', 'd', 'u', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', - 'q', 'v', 'f', 'c', 'f', 'i', 'd', 'u', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', 'm', 'p', - 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', - 'x', '_', 'q', 'v', 'f', 'c', 'm', 'p', 'g', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', 'm', - 'p', 'l', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', - 'p', 'x', '_', 'q', 'v', 'f', 'c', 'p', 's', 'g', 'n', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', - 't', 'i', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', - 'p', 'x', '_', 'q', 'v', 'f', 'c', 't', 'i', 'd', 'u', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', - 't', 'i', 'd', 'u', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', 't', 'i', 'd', 'z', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', - 'f', 'c', 't', 'i', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', 't', 'i', 'w', 'u', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', - 'f', 'c', 't', 'i', 'w', 'u', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'c', 't', 'i', 'w', 'z', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', - 'q', 'v', 'f', 'l', 'o', 'g', 'i', 'c', 'a', 'l', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'm', 'a', - 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', - 'x', '_', 'q', 'v', 'f', 'm', 'a', 'd', 'd', 's', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'm', 's', - 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', - 'x', '_', 'q', 'v', 'f', 'm', 's', 'u', 'b', 's', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'm', 'u', - 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', - '_', 'q', 'v', 'f', 'm', 'u', 'l', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'n', 'a', 'b', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', - 'q', 'v', 'f', 'n', 'e', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'n', 'm', 'a', 'd', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', - 'v', 'f', 'n', 'm', 'a', 'd', 'd', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'n', 'm', 's', 'u', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', - '_', 'q', 'v', 'f', 'n', 'm', 's', 'u', 'b', 's', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'p', 'e', - 'r', 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', - 'x', '_', 'q', 'v', 'f', 'r', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'r', 'e', 's', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', - 'f', 'r', 'i', 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'q', 'p', 'x', '_', 'q', 'v', 'f', 'r', 'i', 'n', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'r', 'i', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', - '_', 'q', 'v', 'f', 'r', 'i', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'r', 's', 'p', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', - 'f', 'r', 's', 'q', 'r', 't', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'r', 's', 'q', 'r', 't', - 'e', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', - 'x', '_', 'q', 'v', 'f', 's', 'e', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 's', 'u', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', - 'v', 'f', 's', 'u', 'b', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 't', 's', 't', 'n', 'a', 'n', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', - 'q', 'v', 'f', 'x', 'm', 'a', 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'x', 'm', 'a', 'd', - 'd', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', - 'x', '_', 'q', 'v', 'f', 'x', 'm', 'u', 'l', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'x', 'm', 'u', - 'l', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', - 'x', '_', 'q', 'v', 'f', 'x', 'x', 'c', 'p', 'n', 'm', 'a', 'd', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', - 'v', 'f', 'x', 'x', 'c', 'p', 'n', 'm', 'a', 'd', 'd', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', - 'x', 'x', 'm', 'a', 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', 'x', 'x', 'm', 'a', 'd', 'd', - 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', - '_', 'q', 'v', 'f', 'x', 'x', 'n', 'p', 'm', 'a', 'd', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'f', - 'x', 'x', 'n', 'p', 'm', 'a', 'd', 'd', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'g', 'p', 'c', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', - 'q', 'v', 'l', 'f', 'c', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'l', 'f', 'c', 'd', 'a', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', - 'l', 'f', 'c', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'q', 'p', 'x', '_', 'q', 'v', 'l', 'f', 'c', 's', 'a', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'l', 'f', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', - '_', 'q', 'v', 'l', 'f', 'd', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'l', 'f', 'i', 'w', 'a', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', - 'v', 'l', 'f', 'i', 'w', 'a', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'l', 'f', 'i', 'w', 'z', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', - 'v', 'l', 'f', 'i', 'w', 'z', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'l', 'f', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'l', - 'f', 's', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', - 'p', 'x', '_', 'q', 'v', 'l', 'p', 'c', 'l', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'l', 'p', 'c', - 'l', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', - 'x', '_', 'q', 'v', 'l', 'p', 'c', 'r', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 'l', 'p', 'c', 'r', - 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', - '_', 'q', 'v', 's', 't', 'f', 'c', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 's', 't', 'f', 'c', 'd', - 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', - '_', 'q', 'v', 's', 't', 'f', 'c', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 's', 't', 'f', 'c', 's', - 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', - '_', 'q', 'v', 's', 't', 'f', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 's', 't', 'f', 'd', 'a', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', - 'v', 's', 't', 'f', 'i', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'q', 'p', 'x', '_', 'q', 'v', 's', 't', 'f', 'i', 'w', 'a', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'q', 'p', 'x', '_', 'q', - 'v', 's', 't', 'f', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'q', 'p', 'x', '_', 'q', 'v', 's', 't', 'f', 's', 'a', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', 'e', 't', '_', 't', 'e', 'x', - 'a', 's', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - 'e', 't', '_', 't', 'e', 'x', 'a', 's', 'r', 'u', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 's', 'e', 't', '_', 't', 'f', 'h', 'a', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', 'e', 't', '_', - 't', 'f', 'i', 'a', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 't', 'a', 'b', 'o', 'r', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 't', 'a', 'b', 'o', 'r', 't', 'd', 'c', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 'a', 'b', 'o', 'r', 't', 'd', 'c', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 'a', 'b', - 'o', 'r', 't', 'w', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 't', 'a', 'b', 'o', 'r', 't', 'w', 'c', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 't', 'b', 'e', 'g', 'i', 'n', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 'c', 'h', 'e', 'c', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 'e', 'n', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 'e', 'n', 'd', 'a', - 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 'r', - 'e', 'c', 'h', 'k', 'p', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 't', 'r', 'e', 'c', 'l', 'a', 'i', 'm', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 't', 'r', 'e', 's', 'u', 'm', 'e', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 's', 'r', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 's', 'u', 's', 'p', 'e', 'n', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 't', 'e', - 's', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', - 'x', '_', 'x', 's', 'm', 'a', 'x', 'd', 'p', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 's', 'm', 'i', 'n', 'd', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', - '_', 'x', 'v', 'c', 'm', 'p', 'e', 'q', 'd', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'c', 'm', 'p', - 'e', 'q', 'd', 'p', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'c', 'm', 'p', 'e', 'q', 's', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', - 'x', 'v', 'c', 'm', 'p', 'e', 'q', 's', 'p', '_', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'c', 'm', - 'p', 'g', 'e', 'd', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'v', 's', 'x', '_', 'x', 'v', 'c', 'm', 'p', 'g', 'e', 'd', 'p', '_', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', - '_', 'x', 'v', 'c', 'm', 'p', 'g', 'e', 's', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'c', 'm', 'p', - 'g', 'e', 's', 'p', '_', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'c', 'm', 'p', 'g', 't', 'd', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', - 'x', 'v', 'c', 'm', 'p', 'g', 't', 'd', 'p', '_', 'p', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'c', 'm', - 'p', 'g', 't', 's', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'v', 's', 'x', '_', 'x', 'v', 'c', 'm', 'p', 'g', 't', 's', 'p', '_', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', - '_', 'x', 'v', 'd', 'i', 'v', 'd', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'd', 'i', 'v', 's', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', - 'x', 'v', 'm', 'a', 'x', 'd', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'm', 'a', 'x', 's', 'p', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', - 'v', 'm', 'i', 'n', 'd', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'm', 'i', 'n', 's', 'p', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 'v', - 'r', 'e', 'd', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'v', 's', 'x', '_', 'x', 'v', 'r', 'e', 's', 'p', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', 'x', 'v', 'r', 's', 'q', - 'r', 't', 'e', 'd', 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'v', 's', 'x', '_', 'x', 'v', 'r', 's', 'q', 'r', 't', 'e', 's', 'p', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'v', 's', 'x', '_', - 'x', 'x', 'l', 'e', 'q', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'r', '6', '0', '0', '_', 'g', 'r', 'o', 'u', 'p', '_', 'b', 'a', - 'r', 'r', 'i', 'e', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'r', '6', '0', '0', '_', 'i', 'm', 'p', 'l', 'i', 'c', 'i', 't', 'a', - 'r', 'g', '_', 'p', 't', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'r', '6', '0', '0', '_', 'r', 'a', 't', '_', 's', 't', 'o', 'r', - 'e', '_', 't', 'y', 'p', 'e', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'r', '6', '0', '0', '_', 'r', 'e', 'a', 'd', '_', 'g', 'l', - 'o', 'b', 'a', 'l', '_', 's', 'i', 'z', 'e', '_', 'x', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'r', '6', '0', '0', '_', 'r', 'e', 'a', - 'd', '_', 'g', 'l', 'o', 'b', 'a', 'l', '_', 's', 'i', 'z', 'e', '_', 'y', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'r', '6', '0', '0', - '_', 'r', 'e', 'a', 'd', '_', 'g', 'l', 'o', 'b', 'a', 'l', '_', 's', 'i', - 'z', 'e', '_', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'r', '6', '0', '0', '_', 'r', 'e', 'a', 'd', '_', 'n', 'g', 'r', 'o', 'u', - 'p', 's', '_', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'r', '6', '0', '0', '_', 'r', 'e', 'a', 'd', '_', 'n', 'g', 'r', 'o', 'u', - 'p', 's', '_', 'y', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'r', '6', '0', '0', '_', 'r', 'e', 'a', 'd', '_', 'n', 'g', 'r', 'o', 'u', - 'p', 's', '_', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'r', '6', '0', '0', '_', 'r', 'e', 'a', 'd', '_', 't', 'g', 'i', 'd', '_', - 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'r', '6', '0', - '0', '_', 'r', 'e', 'a', 'd', '_', 't', 'g', 'i', 'd', '_', 'y', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'r', '6', '0', '0', '_', 'r', - 'e', 'a', 'd', '_', 't', 'g', 'i', 'd', '_', 'z', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 't', 'x', '_', 'n', 'e', 's', 't', 'i', 'n', - 'g', '_', 'd', 'e', 'p', 't', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 's', '3', '9', '0', '_', 'l', 'c', 'b', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 't', 'x', '_', 'a', 's', 's', 'i', - 's', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', - '9', '0', '_', 'v', 'a', 'c', 'c', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'a', 'c', 'c', 'c', 'q', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'a', 'c', 'c', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'a', 'c', 'c', 'g', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'a', - 'c', 'c', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'a', 'c', 'c', 'q', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'a', 'c', 'q', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', - 'v', 'a', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'a', 'v', 'g', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'a', 'v', 'g', 'f', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'a', 'v', 'g', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'a', 'v', 'g', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'a', - 'v', 'g', 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 's', '3', '9', '0', '_', 'v', 'a', 'v', 'g', 'l', 'f', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'a', 'v', - 'g', 'l', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'a', 'v', 'g', 'l', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'c', 'k', 's', - 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'e', 'r', 'i', 'm', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'e', 'r', 'i', 'm', 'f', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'e', 'r', 'i', 'm', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'e', 'r', 'i', 'm', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', - 'v', 'e', 'r', 'l', 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'e', 'r', 'l', 'l', 'f', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', - 'e', 'r', 'l', 'l', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 'e', 'r', 'l', 'l', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'e', - 'r', 'l', 'l', 'v', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 'e', 'r', 'l', 'l', 'v', 'f', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', - 'e', 'r', 'l', 'l', 'v', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'e', 'r', 'l', 'l', 'v', 'h', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', - 'v', 'f', 'a', 'e', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 'f', 'a', 'e', 'f', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'f', 'a', - 'e', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', - '9', '0', '_', 'v', 'f', 'a', 'e', 'z', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'f', 'a', 'e', 'z', - 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'f', 'a', 'e', 'z', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'f', 'e', 'e', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', - 'v', 'f', 'e', 'e', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 'f', 'e', 'e', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'f', 'e', - 'e', 'z', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'f', 'e', 'e', 'z', 'f', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'f', 'e', 'e', - 'z', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', - '9', '0', '_', 'v', 'f', 'e', 'n', 'e', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'f', 'e', 'n', 'e', - 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'f', 'e', 'n', 'e', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'f', 'e', 'n', 'e', 'z', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'f', 'e', 'n', 'e', 'z', 'f', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'f', 'e', 'n', 'e', - 'z', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', - '9', '0', '_', 'v', 'g', 'f', 'm', 'a', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'g', 'f', 'm', 'a', - 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'g', 'f', 'm', 'a', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'g', 'f', 'm', 'a', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'g', 'f', 'm', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'g', 'f', 'm', 'f', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'g', - 'f', 'm', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'g', 'f', 'm', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'i', 's', 't', 'r', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'i', 's', 't', 'r', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'i', 's', 't', 'r', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'l', 'b', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'a', 'e', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'm', 'a', 'e', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'a', 'e', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', - 'a', 'h', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'm', 'a', 'h', 'f', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'a', 'h', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'm', 'a', 'l', 'e', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'a', 'l', 'e', 'f', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', - 'v', 'm', 'a', 'l', 'e', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'a', 'l', 'h', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', - 'm', 'a', 'l', 'h', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 'm', 'a', 'l', 'h', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', - 'a', 'l', 'o', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 's', '3', '9', '0', '_', 'v', 'm', 'a', 'l', 'o', 'f', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'a', - 'l', 'o', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'm', 'a', 'o', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'a', 'o', 'f', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'm', 'a', 'o', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'e', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'e', - 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'm', 'e', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'h', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'h', - 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'm', 'h', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'l', 'e', 'b', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', - 'l', 'e', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'm', 'l', 'e', 'h', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'l', 'h', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'm', 'l', 'h', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'l', 'h', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', - 'l', 'o', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'm', 'l', 'o', 'f', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'l', 'o', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'm', 'o', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 'm', 'o', 'f', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'm', 'o', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'p', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 'p', 'e', 'r', 'm', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'p', 'k', - 'l', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'p', 'k', 'l', 's', 'g', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'p', 'k', 'l', - 's', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', - '9', '0', '_', 'v', 'p', 'k', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'p', 'k', 's', 'g', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', - 'v', 'p', 'k', 's', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 's', 'b', 'c', 'b', 'i', 'q', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', - 's', 'b', 'i', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 's', '3', '9', '0', '_', 'v', 's', 'c', 'b', 'i', 'b', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 'c', - 'b', 'i', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 's', 'c', 'b', 'i', 'g', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 'c', 'b', - 'i', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', - '9', '0', '_', 'v', 's', 'c', 'b', 'i', 'q', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 'l', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', - 's', 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 's', 'l', 'd', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 'q', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', - 's', 'r', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 's', 'r', 'a', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 'r', 'l', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', - 'v', 's', 'r', 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 's', 't', 'l', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 't', 'r', - 'c', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', - '9', '0', '_', 'v', 's', 't', 'r', 'c', 'f', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 't', 'r', 'c', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 's', 't', 'r', 'c', 'z', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 't', 'r', 'c', - 'z', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', - '9', '0', '_', 'v', 's', 't', 'r', 'c', 'z', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 'u', 'm', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 's', 'u', 'm', 'g', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 'u', 'm', 'g', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 's', 'u', 'm', 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 's', 'u', 'm', 'q', 'f', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', - 's', 'u', 'm', 'q', 'g', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 's', '3', '9', '0', '_', 'v', 't', 'm', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'u', 'p', 'h', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'u', 'p', 'h', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'u', 'p', 'h', 'h', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'u', - 'p', 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', - '3', '9', '0', '_', 'v', 'u', 'p', 'l', 'f', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'u', 'p', 'l', 'h', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', - '0', '_', 'v', 'u', 'p', 'l', 'h', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'u', 'p', 'l', 'h', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', - '_', 'v', 'u', 'p', 'l', 'h', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 's', '3', '9', '0', '_', 'v', 'u', 'p', 'l', 'l', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 's', '3', '9', '0', '_', - 'v', 'u', 'p', 'l', 'l', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 's', '3', '9', '0', '_', 'v', 'u', 'p', 'l', 'l', 'h', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'a', 'v', 'g', 'u', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', '2', 'i', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', - 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'f', 'a', 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', 'c', 'm', 'p', - 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'f', 'c', 'm', 'p', 'g', 'e', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', 'c', 'm', - 'p', 'g', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'f', 'm', 'a', 'x', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', 'm', 'i', 'n', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'f', 'm', 'u', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', 'r', 'c', 'p', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', - 'r', 'c', 'p', 'i', 't', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', 'r', 'c', 'p', 'i', 't', '2', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'f', 'r', 's', 'q', 'i', 't', '1', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', 'r', 's', 'q', - 'r', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'f', 's', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', 's', 'u', 'b', 'r', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'i', '2', 'f', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'h', 'r', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'f', '2', 'i', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'f', 'n', 'a', 'c', 'c', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'f', - 'p', 'n', 'a', 'c', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'i', '2', 'f', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', - 'c', 'a', 'r', 'r', 'y', '_', 'u', '3', '2', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 'c', 'a', - 'r', 'r', 'y', '_', 'u', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 'c', 'a', 'r', 'r', - 'y', 'x', '_', 'u', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 'c', 'a', 'r', 'r', 'y', - 'x', '_', 'u', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'a', 'e', 's', 'd', 'e', 'c', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'a', 'e', 's', 'd', 'e', 'c', 'l', 'a', 's', 't', '1', '2', '8', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'a', 'e', 's', 'e', 'n', 'c', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'e', 's', 'e', 'n', - 'c', 'l', 'a', 's', 't', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'e', 's', 'i', 'm', 'c', - '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'a', 'e', 's', 'k', 'e', 'y', 'g', 'e', 'n', 'a', 's', - 's', 'i', 's', 't', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 's', 'u', 'b', 'p', - 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'b', 'l', 'e', 'n', 'd', 'v', 'p', 'd', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', - 'l', 'e', 'n', 'd', 'v', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', - 'd', '2', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'd', - 'q', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', '2', 'd', 'q', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'v', 't', 'd', 'q', '2', 'p', 's', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 't', 'p', 'd', '2', 'd', 'q', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 't', 'p', 's', '2', 'd', 'q', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'd', 'p', 'p', 's', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'h', 'a', 'd', 'd', 'p', 'd', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'h', 'a', - 'd', 'd', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'h', 's', 'u', 'b', 'p', 'd', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'h', 's', 'u', 'b', 'p', 's', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'l', 'd', - 'd', 'q', 'u', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 'l', 'o', 'a', 'd', - 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'm', 'a', 's', 'k', 'l', 'o', 'a', 'd', 'p', 'd', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'm', 'a', 's', 'k', 'l', 'o', 'a', 'd', 'p', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', - 's', 'k', 'l', 'o', 'a', 'd', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', - 'k', 's', 't', 'o', 'r', 'e', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 's', 't', - 'o', 'r', 'e', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 's', 't', - 'o', 'r', 'e', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 's', 't', 'o', 'r', 'e', - 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'm', 'a', 'x', 'p', 'd', '2', '5', '6', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'm', 'a', 'x', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'i', 'n', 'p', 'd', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'm', 'i', 'n', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'o', 'v', - 'm', 's', 'k', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'o', 'v', 'm', 's', 'k', - 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'c', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 't', 'e', 's', 't', 'n', 'z', 'c', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', - 'e', 's', 't', 'z', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', 'p', 's', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'r', 'o', 'u', 'n', 'd', 'p', 'd', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'o', - 'u', 'n', 'd', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', 'p', - 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 'p', 'd', '2', '5', '6', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 's', 'q', 'r', 't', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'b', 'r', 'o', 'a', - 'd', 'c', 'a', 's', 't', 'f', '1', '2', '8', '_', 'p', 'd', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'f', '1', '2', '8', - '_', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', '2', 'f', '1', - '2', '8', '_', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', '2', - 'f', '1', '2', '8', '_', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', - 'm', '2', 'f', '1', '2', '8', '_', 's', 'i', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'e', 'r', 'm', 'i', 'l', 'v', 'a', 'r', 'p', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', - 'm', 'i', 'l', 'v', 'a', 'r', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', - 'r', 'm', 'i', 'l', 'v', 'a', 'r', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 'i', 'l', 'v', 'a', 'r', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 't', 'e', 's', - 't', 'c', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 't', 'e', 's', 't', 'c', 'p', 'd', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 't', 'e', 's', 't', 'c', 'p', 's', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 't', 'e', 's', - 't', 'c', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 't', 'e', 's', 't', 'n', 'z', - 'c', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 't', 'e', 's', 't', 'n', 'z', 'c', 'p', 'd', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 't', 'e', 's', 't', 'n', 'z', 'c', 'p', 's', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 't', 'e', 's', 't', 'n', 'z', 'c', 'p', 's', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 't', - 'e', 's', 't', 'z', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 't', 'e', 's', 't', 'z', 'p', 'd', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 't', 'e', 's', 't', 'z', 'p', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 't', - 'e', 's', 't', 'z', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'z', 'e', 'r', 'o', - 'a', 'l', 'l', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'z', 'e', 'r', 'o', 'u', 'p', 'p', 'e', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'g', 'a', 't', 'h', 'e', 'r', 'd', '_', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', - 'r', 'd', '_', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'd', - '_', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'd', '_', 'p', 'd', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'd', '_', 'p', 's', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', - 'a', 't', 'h', 'e', 'r', 'd', '_', 'p', 's', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', - 't', 'h', 'e', 'r', 'd', '_', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'd', - '_', 'q', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'q', '_', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'g', 'a', 't', 'h', 'e', 'r', 'q', '_', 'd', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', - 'a', 't', 'h', 'e', 'r', 'q', '_', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', - 'r', 'q', '_', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', - 'q', '_', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'q', '_', 'p', 's', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'q', '_', 'q', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', - 'a', 't', 'h', 'e', 'r', 'q', '_', 'q', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', - 'k', 'l', 'o', 'a', 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 'l', 'o', 'a', 'd', - 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 'l', 'o', 'a', 'd', 'q', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'm', 'a', 's', 'k', 'l', 'o', 'a', 'd', 'q', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', - 's', 'k', 's', 't', 'o', 'r', 'e', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 's', 't', - 'o', 'r', 'e', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 's', 't', 'o', - 'r', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'm', 'a', 's', 'k', 's', 't', 'o', 'r', 'e', 'q', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'm', 'o', 'v', 'n', 't', 'd', 'q', 'a', '2', '5', '6', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'm', 'p', 's', 'a', 'd', 'b', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', - 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', 'd', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'a', 'b', 's', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 's', 's', 'd', - 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 's', 's', 'w', 'b', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'a', 'c', 'k', 'u', 's', 'd', 'w', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'a', 'c', 'k', 'u', 's', 'w', 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', - 's', 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'w', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'a', 'd', 'd', 'u', 's', 'b', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', - 'd', 'u', 's', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', 'b', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'a', 'v', 'g', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'b', 'l', 'e', - 'n', 'd', 'v', 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', - 's', 'i', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', 's', 'f', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'h', 'a', 'd', 'd', 'd', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'h', 'a', 'd', 'd', 's', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', 'a', 'd', 'd', - 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'h', 's', 'u', 'b', 'd', '2', '5', '6', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'h', 's', 'u', 'b', 's', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', 's', 'u', - 'b', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'd', 'd', 'u', 'b', 's', 'w', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'm', 'a', 'd', 'd', 'w', 'd', '2', '5', '6', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'm', 'o', 'v', 'm', 's', 'k', 'b', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', - 'l', 'd', 'q', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'h', 'r', 's', 'w', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'h', 'w', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'u', 'l', 'h', 'u', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'u', - 'd', 'q', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'a', 'd', 'b', 'w', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'h', 'u', 'f', 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'i', 'g', - 'n', 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'i', 'g', 'n', 'd', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'i', 'g', 'n', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', - 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'q', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'l', 'l', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'd', 'i', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 's', 'l', 'l', 'q', 'i', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'l', 'l', 'w', 'i', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '4', 's', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'l', 'l', 'v', '8', 's', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', - 'v', '2', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '4', 'd', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'r', 'a', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'r', 'a', 'd', 'i', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', - 'a', 'w', 'i', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', '4', 's', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'a', 'v', '8', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'd', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'q', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'r', 'l', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'd', 'i', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'r', 'l', 'q', 'i', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', - 'l', 'w', 'i', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '4', 's', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'l', 'v', '8', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', - '2', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '4', 'd', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'u', 'b', 's', 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 's', 'w', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 's', 'u', 'b', 'u', 's', 'b', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'u', 'b', 'u', 's', 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 't', - 'i', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'm', - 'b', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'm', - 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'm', - 'b', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'm', - 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'm', - 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'm', - 'w', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'b', '2', 'm', 'a', 's', 'k', '1', - '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 'b', '2', 'm', 'a', 's', 'k', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'v', 't', 'b', '2', 'm', 'a', 's', 'k', '5', '1', '2', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 'd', '2', 'm', 'a', 's', 'k', '1', '2', '8', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'd', '2', 'm', 'a', 's', 'k', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'd', '2', - 'm', 'a', 's', 'k', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'm', 'a', 's', 'k', - '2', 'b', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'm', 'a', 's', 'k', '2', 'b', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 'm', 'a', 's', 'k', '2', 'b', '5', '1', - '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'v', 't', 'm', 'a', 's', 'k', '2', 'd', '1', '2', '8', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 'm', 'a', 's', 'k', '2', 'd', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', - 't', 'm', 'a', 's', 'k', '2', 'd', '5', '1', '2', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'm', - 'a', 's', 'k', '2', 'q', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'm', 'a', 's', - 'k', '2', 'q', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'm', 'a', 's', 'k', '2', - 'q', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'm', 'a', 's', 'k', '2', 'w', '1', - '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 'm', 'a', 's', 'k', '2', 'w', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'v', 't', 'm', 'a', 's', 'k', '2', 'w', '5', '1', '2', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 'q', '2', 'm', 'a', 's', 'k', '1', '2', '8', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'q', '2', 'm', 'a', 's', 'k', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'q', '2', - 'm', 'a', 's', 'k', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 's', 'i', '2', 's', - 'd', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 's', 'i', '2', 's', 'd', '6', '4', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 's', 'i', '2', 's', 's', '3', '2', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 's', - 'i', '2', 's', 's', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', 't', 's', 'd', '2', - 's', 'i', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', 't', 's', 'd', '2', 's', 'i', - '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'c', 'v', 't', 't', 's', 'd', '2', 'u', 's', 'i', '3', - '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'c', 'v', 't', 't', 's', 'd', '2', 'u', 's', 'i', '6', '4', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'c', 'v', 't', 't', 's', 's', '2', 's', 'i', '3', '2', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'c', 'v', 't', 't', 's', 's', '2', 's', 'i', '6', '4', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', - 't', 't', 's', 's', '2', 'u', 's', 'i', '3', '2', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', - 't', 's', 's', '2', 'u', 's', 'i', '6', '4', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'u', 's', - 'i', '2', 's', 'd', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'u', 's', 'i', '2', 's', - 's', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 'u', 's', 'i', '2', 's', 'd', '6', '4', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'v', 't', 'u', 's', 'i', '2', 's', 's', '6', '4', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', - 't', 'w', '2', 'm', 'a', 's', 'k', '1', '2', '8', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'w', - '2', 'm', 'a', 's', 'k', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'w', '2', 'm', - 'a', 's', 'k', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', '2', 'p', 'd', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'e', 'x', 'p', '2', 'p', 's', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'g', 'a', 't', 'h', 'e', 'r', 's', 'i', 'v', '8', 'd', 'f', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', - 'a', 't', 'h', 'e', 'r', 's', 'i', 'v', '1', '6', 's', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', - 't', 'h', 'e', 'r', 's', 'i', 'v', '8', 'd', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', - 'e', 'r', 's', 'i', 'v', '1', '6', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', - 'r', 'd', 'i', 'v', '8', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'd', - 'i', 'v', '1', '6', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'd', 'i', - 'v', '8', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'd', 'i', 'v', '1', - '6', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', '3', 'd', 'i', 'v', '2', - 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', '3', 'd', 'i', 'v', '2', 'd', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'g', 'a', 't', 'h', 'e', 'r', '3', 'd', 'i', 'v', '4', 'd', 'f', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'g', 'a', 't', 'h', 'e', 'r', '3', 'd', 'i', 'v', '4', 'd', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'g', 'a', 't', 'h', 'e', 'r', '3', 'd', 'i', 'v', '4', 's', 'f', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', - 'a', 't', 'h', 'e', 'r', '3', 'd', 'i', 'v', '4', 's', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', - 't', 'h', 'e', 'r', '3', 'd', 'i', 'v', '8', 's', 'f', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', - 'h', 'e', 'r', '3', 'd', 'i', 'v', '8', 's', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', - 'e', 'r', '3', 's', 'i', 'v', '2', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', - 'r', '3', 's', 'i', 'v', '2', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', - '3', 's', 'i', 'v', '4', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', '3', - 's', 'i', 'v', '4', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', '3', 's', - 'i', 'v', '4', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', '3', 's', 'i', - 'v', '4', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', '3', 's', 'i', 'v', - '8', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', '3', 's', 'i', 'v', '8', - 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', 'p', 'f', 'd', 'p', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'g', 'a', 't', 'h', 'e', 'r', 'p', 'f', 'd', 'p', 's', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', - 'h', 'e', 'r', 'p', 'f', 'q', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'a', 't', 'h', 'e', 'r', - 'p', 'f', 'q', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'k', 'a', 'n', 'd', 'h', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'k', 'a', - 'n', 'd', 'n', 'h', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'k', 'n', 'o', 't', 'h', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'k', 'o', - 'r', 'h', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'k', 'o', 'r', 't', 'e', 's', 't', 'c', 'h', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'k', 'o', 'r', 't', 'e', 's', 't', 'z', 'h', 'i', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'k', 'u', 'n', 'p', - 'c', 'k', 'h', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'k', 'u', 'n', 'p', 'c', 'k', 'd', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'k', - 'u', 'n', 'p', 'c', 'k', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'k', 'x', 'n', 'o', 'r', 'h', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'k', 'x', 'o', 'r', 'h', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 'p', 'd', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 'p', 'd', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 'p', 'd', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 'p', 's', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'a', 'd', 'd', 'p', 's', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'a', 'd', 'd', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'a', 'd', 'd', 's', 'd', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'a', 'd', 'd', 's', 's', '_', 'r', 'o', 'u', 'n', 'd', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'a', 'n', 'd', 'p', 'd', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'a', 'n', 'd', 'p', 'd', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'a', 'n', 'd', 'p', 'd', '5', '1', '2', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'a', 'n', 'd', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'a', 'n', 'd', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'a', 'n', 'd', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'a', 'n', 'd', 'n', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'a', 'n', 'd', 'n', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'a', 'n', 'd', 'n', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'a', 'n', 'd', 'n', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'a', 'n', 'd', 'n', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'a', 'n', 'd', 'n', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'f', '3', '2', 'x', '2', '_', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', - 'a', 's', 't', 'f', '3', '2', 'x', '2', '_', '5', '1', '2', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'f', '3', '2', - 'x', '4', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'r', 'o', - 'a', 'd', 'c', 'a', 's', 't', 'f', '3', '2', 'x', '4', '_', '5', '1', '2', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'f', '3', '2', 'x', '8', - '_', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', - 'c', 'a', 's', 't', 'f', '6', '4', 'x', '2', '_', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'f', '6', - '4', 'x', '2', '_', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'r', - 'o', 'a', 'd', 'c', 'a', 's', 't', 'f', '6', '4', 'x', '4', '_', '5', '1', - '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'i', '3', '2', 'x', - '2', '_', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', - 'd', 'c', 'a', 's', 't', 'i', '3', '2', 'x', '2', '_', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'i', - '3', '2', 'x', '2', '_', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', - 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'i', '3', '2', 'x', '4', '_', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', - 's', 't', 'i', '3', '2', 'x', '4', '_', '5', '1', '2', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'r', 'o', - 'a', 'd', 'c', 'a', 's', 't', 'i', '3', '2', 'x', '8', '_', '5', '1', '2', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', - 'i', '6', '4', 'x', '2', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'i', '6', '4', 'x', '2', '_', - '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'r', 'o', 'a', 'd', 'c', - 'a', 's', 't', 'i', '6', '4', 'x', '4', '_', '5', '1', '2', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'm', - 'p', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'm', 'p', - 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'm', 'p', 'p', - 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'm', 'p', 'p', 's', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'm', 'p', 'p', 's', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'm', 'p', 'p', 's', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'm', 'p', 's', 'd', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'm', 'p', 's', 's', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 'i', '1', '2', '8', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 'i', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', - 's', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', - 'r', 'e', 's', 's', 'd', 'f', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 'd', 'f', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 'd', 'f', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', - 's', 's', 'f', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', - 'p', 'r', 'e', 's', 's', 's', 'f', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 'f', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 'd', 'i', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', - 's', 's', 'd', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', - 'm', 'p', 'r', 'e', 's', 's', 'd', 'i', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 't', 'o', 'r', 'e', - 's', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', - 'r', 'e', 's', 's', 's', 't', 'o', 'r', 'e', 's', 'i', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 't', - 'o', 'r', 'e', 's', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 't', 'o', 'r', 'e', 'd', 'f', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', - 's', 's', 't', 'o', 'r', 'e', 'd', 'f', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 't', 'o', 'r', 'e', - 'd', 'f', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', - 'r', 'e', 's', 's', 's', 't', 'o', 'r', 'e', 's', 'f', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 't', - 'o', 'r', 'e', 's', 'f', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 't', 'o', 'r', 'e', 's', 'f', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', - 's', 's', 't', 'o', 'r', 'e', 'd', 'i', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'o', 'm', 'p', 'r', 'e', 's', 's', 's', 't', 'o', 'r', 'e', - 'd', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'p', - 'r', 'e', 's', 's', 's', 't', 'o', 'r', 'e', 'd', 'i', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'p', 'c', 'o', 'n', 'f', 'l', 'i', 'c', 't', - 's', 'i', '_', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'c', - 'o', 'n', 'f', 'l', 'i', 'c', 't', 's', 'i', '_', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'c', 'o', 'n', 'f', 'l', 'i', 'c', 't', 's', - 'i', '_', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'c', 'o', - 'n', 'f', 'l', 'i', 'c', 't', 'd', 'i', '_', '1', '2', '8', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 'c', 'o', 'n', 'f', 'l', 'i', 'c', 't', 'd', 'i', - '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'c', 'o', 'n', - 'f', 'l', 'i', 'c', 't', 'd', 'i', '_', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'v', 't', 'd', 'q', '2', 'p', 'd', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 'd', 'q', '2', 'p', 'd', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'd', 'q', '2', 'p', 'd', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'd', 'q', '2', 'p', - 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'd', 'q', - '2', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'd', 'q', '2', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 'p', 'd', '2', 'd', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'v', 't', 'p', 'd', '2', 'd', 'q', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'd', 'q', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'p', 's', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'p', 's', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'p', 's', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'q', - 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', - '2', 'q', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'p', 'd', '2', 'q', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 'p', 'd', '2', 'u', 'd', 'q', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'u', 'd', 'q', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'u', 'd', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'u', - 'q', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', - 'd', '2', 'u', 'q', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 'p', 'd', '2', 'u', 'q', 'q', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'v', 't', 'p', 's', '2', 'd', 'q', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', '2', 'd', 'q', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', '2', 'd', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', '2', 'p', - 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', - '2', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'p', 's', '2', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 'p', 's', '2', 'q', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'v', 't', 'p', 's', '2', 'q', 'q', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 'p', 's', '2', 'q', 'q', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', '2', 'u', 'd', 'q', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', '2', 'u', - 'd', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', - 's', '2', 'u', 'd', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 'p', 's', '2', 'u', 'q', 'q', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'v', 't', 'p', 's', '2', 'u', 'q', 'q', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', '2', 'u', 'q', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'q', 'q', '2', 'p', - 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'q', 'q', - '2', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'q', 'q', '2', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 'q', 'q', '2', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'v', 't', 'q', 'q', '2', 'p', 's', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 'q', 'q', '2', 'p', 's', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 's', 'd', '2', 's', 's', '_', 'r', - 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 's', 's', - '2', 's', 'd', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 't', 'p', 'd', '2', 'd', 'q', '1', '2', '8', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 't', 'p', 'd', '2', 'd', 'q', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 'd', '2', 'd', 'q', - '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 'd', - '2', 'q', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 't', 'p', 'd', '2', 'q', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 't', 'p', 'd', '2', 'q', 'q', '5', '1', '2', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 't', 'p', 'd', '2', 'u', 'd', 'q', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 'd', '2', 'u', - 'd', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', - 'p', 'd', '2', 'u', 'd', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 't', 'p', 'd', '2', 'u', 'q', 'q', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 'd', '2', 'u', 'q', 'q', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 'd', '2', - 'u', 'q', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 't', 'p', 's', '2', 'd', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 't', 'p', 's', '2', 'd', 'q', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 't', 'p', 's', '2', 'd', 'q', '5', '1', '2', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 's', '2', 'q', 'q', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 's', - '2', 'q', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 't', 'p', 's', '2', 'q', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 't', 'p', 's', '2', 'u', 'd', 'q', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 's', '2', 'u', 'd', 'q', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 's', '2', - 'u', 'd', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 't', 'p', 's', '2', 'u', 'q', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'v', 't', 't', 'p', 's', '2', 'u', 'q', 'q', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 's', '2', 'u', 'q', 'q', - '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'u', 'd', 'q', - '2', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'u', 'd', 'q', '2', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 'u', 'd', 'q', '2', 'p', 'd', '5', '1', '2', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 'u', 'd', 'q', '2', 'p', 's', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'u', 'd', 'q', '2', 'p', 's', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'u', 'd', 'q', - '2', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'u', 'q', 'q', '2', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 'u', 'q', 'q', '2', 'p', 'd', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 'u', 'q', 'q', '2', 'p', 'd', '5', '1', '2', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'u', 'q', 'q', '2', 'p', 's', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'u', 'q', 'q', - '2', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'u', 'q', 'q', '2', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'd', 'b', 'p', 's', 'a', 'd', 'b', 'w', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'd', 'b', 'p', 's', 'a', 'd', 'b', 'w', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'd', 'b', 'p', 's', 'a', 'd', 'b', 'w', '5', '1', '2', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'd', 'i', 'v', 'p', 'd', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'd', 'i', 'v', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'd', 'i', 'v', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'd', 'i', 'v', 'p', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'd', 'i', 'v', 'p', - 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'd', 'i', 'v', 'p', 's', - '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'd', 'i', 'v', 's', 'd', '_', - 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'd', 'i', 'v', 's', - 's', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', - 'p', 'a', 'n', 'd', 's', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'e', 'x', 'p', 'a', 'n', 'd', 's', 'i', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 's', 'i', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 'l', 'o', 'a', 'd', 's', - 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', - 'd', 'l', 'o', 'a', 'd', 's', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'e', 'x', 'p', 'a', 'n', 'd', 'l', 'o', 'a', 'd', 's', 'i', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 'l', 'o', - 'a', 'd', 'd', 'f', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', - 'p', 'a', 'n', 'd', 'l', 'o', 'a', 'd', 'd', 'f', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 'l', 'o', 'a', 'd', 'd', - 'f', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', - 'd', 'l', 'o', 'a', 'd', 's', 'f', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'e', 'x', 'p', 'a', 'n', 'd', 'l', 'o', 'a', 'd', 's', 'f', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 'l', 'o', - 'a', 'd', 's', 'f', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', - 'p', 'a', 'n', 'd', 'l', 'o', 'a', 'd', 'd', 'i', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 'l', 'o', 'a', 'd', 'd', - 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', - 'd', 'l', 'o', 'a', 'd', 'd', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'e', 'x', 'p', 'a', 'n', 'd', 'd', 'f', '1', '2', '8', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 'd', 'f', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 'd', 'f', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 's', 'f', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', - 's', 'f', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 'p', 'a', - 'n', 'd', 's', 'f', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', - 'p', 'a', 'n', 'd', 'd', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'e', 'x', 'p', 'a', 'n', 'd', 'd', 'i', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'e', 'x', 'p', 'a', 'n', 'd', 'd', 'i', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'f', 'i', 'x', 'u', 'p', 'i', 'm', 'm', 'p', 'd', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', 'x', 'u', 'p', 'i', 'm', - 'm', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', 'x', - 'u', 'p', 'i', 'm', 'm', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'f', 'i', 'x', 'u', 'p', 'i', 'm', 'm', 'p', 's', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'f', 'i', 'x', 'u', 'p', 'i', 'm', 'm', 'p', 's', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', 'x', 'u', 'p', 'i', - 'm', 'm', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', - 'x', 'u', 'p', 'i', 'm', 'm', 's', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', - 'i', 'x', 'u', 'p', 'i', 'm', 'm', 's', 's', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'f', 'p', 'c', 'l', 'a', 's', 's', 'p', 'd', '1', '2', '8', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'f', 'p', 'c', 'l', 'a', 's', 's', 'p', 'd', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'f', 'p', 'c', 'l', 'a', 's', 's', 'p', 'd', - '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'p', 'c', 'l', 'a', 's', - 's', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'p', 'c', - 'l', 'a', 's', 's', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'f', 'p', 'c', 'l', 'a', 's', 's', 'p', 's', '5', '1', '2', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'f', 'p', 'c', 'l', 'a', 's', 's', 's', 'd', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'f', 'p', 'c', 'l', 'a', 's', 's', 's', 's', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'g', 'e', 't', 'e', 'x', 'p', 'p', 'd', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'g', 'e', 't', 'e', 'x', 'p', 'p', 'd', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', 't', 'e', 'x', 'p', 'p', 'd', - '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', 't', 'e', 'x', 'p', - 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', 't', 'e', - 'x', 'p', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', - 't', 'e', 'x', 'p', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'g', 'e', 't', 'e', 'x', 'p', 's', 'd', '1', '2', '8', '_', 'r', 'o', 'u', - 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', 't', 'e', 'x', 'p', 's', - 's', '1', '2', '8', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'g', 'e', 't', 'm', 'a', 'n', 't', 'p', 'd', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'g', 'e', 't', 'm', 'a', 'n', 't', 'p', 'd', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', 't', 'm', 'a', 'n', 't', 'p', - 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', 't', 'm', 'a', - 'n', 't', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', - 't', 'm', 'a', 'n', 't', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'g', 'e', 't', 'm', 'a', 'n', 't', 'p', 's', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'g', 'e', 't', 'm', 'a', 'n', 't', 's', 'd', '_', 'r', - 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'g', 'e', 't', 'm', 'a', - 'n', 't', 's', 's', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'i', 'n', 's', 'e', 'r', 't', 'f', '3', '2', 'x', '4', '_', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'i', 'n', 's', 'e', 'r', 't', 'f', '3', - '2', 'x', '4', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'i', 'n', 's', 'e', 'r', 't', - 'f', '3', '2', 'x', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'i', 'n', 's', 'e', - 'r', 't', 'f', '6', '4', 'x', '2', '_', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'i', 'n', 's', 'e', 'r', 't', 'f', '6', '4', 'x', '2', '_', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'i', 'n', 's', 'e', 'r', 't', 'f', - '6', '4', 'x', '4', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'i', 'n', 's', 'e', 'r', - 't', 'i', '3', '2', 'x', '4', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'i', 'n', 's', 'e', 'r', 't', 'i', '3', '2', 'x', '4', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'i', 'n', 's', 'e', 'r', 't', 'i', '3', '2', 'x', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'i', 'n', 's', 'e', 'r', 't', 'i', '6', '4', 'x', - '2', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'i', 'n', 's', 'e', - 'r', 't', 'i', '6', '4', 'x', '2', '_', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'i', 'n', 's', 'e', 'r', 't', 'i', '6', '4', 'x', '4', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'm', 'a', 'x', 'p', 'd', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'm', 'a', 'x', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', - 'a', 'x', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', - 'x', 'p', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 'x', 'p', 's', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 'x', 'p', 's', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 'x', 's', 'd', '_', 'r', 'o', - 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 'x', 's', 's', '_', - 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'i', 'n', 'p', - 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'i', 'n', 'p', 'd', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'm', 'i', 'n', 'p', 'd', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'm', 'i', 'n', 'p', 's', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'm', 'i', 'n', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'm', 'i', 'n', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', - 'i', 'n', 's', 'd', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'm', 'i', 'n', 's', 's', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'm', 'o', 'v', 's', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', - 'o', 'v', 's', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'u', 'l', 'p', 'd', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'm', 'u', 'l', 'p', 'd', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'm', 'u', 'l', 'p', 'd', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'm', 'u', 'l', 'p', 's', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'm', 'u', 'l', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', - 'u', 'l', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'u', - 'l', 's', 'd', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'm', 'u', 'l', 's', 's', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'o', 'r', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'o', 'r', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'o', 'r', - 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'o', 'r', 'p', 's', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'o', 'r', 'p', 's', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'o', 'r', 'p', 's', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', 'b', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'a', 'b', 's', 'b', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'a', 'b', 's', 'b', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'a', 'b', 's', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'a', 'b', 's', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'a', 'b', 's', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'a', 'b', 's', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', - 'b', 's', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'b', - 's', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', - 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', 'w', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', 'w', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 's', 's', 'd', - 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 's', - 's', 'd', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', - 'k', 's', 's', 'd', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'a', 'c', 'k', 's', 's', 'w', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'a', 'c', 'k', 's', 's', 'w', 'b', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'a', 'c', 'k', 's', 's', 'w', 'b', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 'u', 's', 'd', 'w', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 'u', 's', 'd', 'w', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 'u', 's', - 'd', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', - 'u', 's', 'w', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', - 'c', 'k', 'u', 's', 'w', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'a', 'c', 'k', 'u', 's', 'w', 'b', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'a', 'd', 'd', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'a', 'd', 'd', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'a', 'd', 'd', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'a', 'd', 'd', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', - 'd', 'd', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', - 'd', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', - 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'q', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'w', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'w', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'w', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'b', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'b', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'b', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'w', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'w', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'w', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', 's', 'b', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', 's', 'b', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', 's', 'b', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', 's', 'w', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', 's', - 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', - 's', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', - 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', 'b', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', 'b', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', 'w', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', 'w', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', 'w', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', - 'b', '1', '2', '8', '_', 'g', 'p', 'r', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'b', '2', '5', '6', '_', 'g', - 'p', 'r', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'b', 'r', 'o', 'a', 'd', 'c', - 'a', 's', 't', 'b', '5', '1', '2', '_', 'g', 'p', 'r', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'd', '1', '2', - '8', '_', 'g', 'p', 'r', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'b', 'r', 'o', - 'a', 'd', 'c', 'a', 's', 't', 'd', '2', '5', '6', '_', 'g', 'p', 'r', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', - 'd', '5', '1', '2', '_', 'g', 'p', 'r', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'q', '1', '2', '8', '_', 'g', - 'p', 'r', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'b', 'r', 'o', 'a', 'd', 'c', - 'a', 's', 't', 'q', '2', '5', '6', '_', 'g', 'p', 'r', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'q', '5', '1', - '2', '_', 'g', 'p', 'r', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'b', 'r', 'o', - 'a', 'd', 'c', 'a', 's', 't', 'q', '5', '1', '2', '_', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', - 'w', '1', '2', '8', '_', 'g', 'p', 'r', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 'w', '2', '5', '6', '_', 'g', - 'p', 'r', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'b', 'r', 'o', 'a', 'd', 'c', - 'a', 's', 't', 'w', '5', '1', '2', '_', 'g', 'p', 'r', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', 'd', 'f', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', 'd', 'f', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', - 'd', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', - 'v', 'a', 'r', 'd', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'e', 'r', 'm', 'v', 'a', 'r', 'h', 'i', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', 'h', 'i', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', 'h', 'i', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', - 'q', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', - 'v', 'a', 'r', 'q', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'e', 'r', 'm', 'v', 'a', 'r', 'q', 'i', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', 's', 'f', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', 's', 'f', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', 'v', 'a', 'r', - 's', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'r', 'm', - 'v', 'a', 'r', 's', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'a', 'd', 'd', 'u', 'b', 's', 'w', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'a', 'd', 'd', 'u', 'b', 's', 'w', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'd', 'd', 'u', 'b', 's', 'w', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'd', 'd', 'w', 'd', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'd', 'd', 'w', - 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'd', 'd', - 'w', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 's', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', - 'u', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 's', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', - 'u', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'd', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'd', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'd', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'd', 'b', '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'd', 'b', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'd', 'b', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'd', 'w', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'd', 'w', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'd', 'w', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'd', 'w', '1', '2', '8', 'm', - 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'd', 'w', '2', - '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'd', 'w', '5', '1', '2', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'q', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'q', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'q', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'q', 'b', '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'q', 'b', '2', '5', '6', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'q', 'b', '5', '1', '2', 'm', - 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'q', 'd', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'q', 'd', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'q', 'd', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'q', 'd', '1', - '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'q', 'd', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'q', 'd', '5', '1', '2', 'm', 'e', 'm', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'q', 'w', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'q', 'w', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'q', 'w', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'q', 'w', '1', '2', '8', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'q', 'w', '2', '5', '6', 'm', - 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'q', 'w', '5', - '1', '2', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'w', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'w', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'w', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'w', 'b', '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'w', 'b', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'w', 'b', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'd', 'b', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'd', 'b', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'd', 'b', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'd', 'b', - '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 's', 'd', 'b', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 's', 'd', 'b', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'd', 'w', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'd', 'w', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'd', 'w', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'd', 'w', - '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 's', 'd', 'w', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 's', 'd', 'w', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'b', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'b', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'b', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'b', - '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 's', 'q', 'b', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 's', 'q', 'b', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'd', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'd', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'd', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'd', - '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 's', 'q', 'd', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 's', 'q', 'd', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'w', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'w', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'w', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'q', 'w', - '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 's', 'q', 'w', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 's', 'q', 'w', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'w', 'b', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'w', 'b', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'w', 'b', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'w', 'b', - '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 's', 'w', 'b', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 's', 'w', 'b', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'b', 'd', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'b', 'd', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', - 'b', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 's', 'x', 'b', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', - 'o', 'v', 's', 'x', 'b', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'm', 'o', 'v', 's', 'x', 'b', 'q', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'b', 'w', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'b', 'w', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'b', 'w', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'd', - 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', - 'x', 'd', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 's', 'x', 'd', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 's', 'x', 'w', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 's', 'x', 'w', 'd', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'w', 'd', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'w', 'q', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', 'w', 'q', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 's', 'x', - 'w', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'u', 's', 'd', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', - 'o', 'v', 'u', 's', 'd', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'm', 'o', 'v', 'u', 's', 'd', 'b', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'd', 'b', '1', '2', '8', 'm', 'e', - 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'd', 'b', - '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 'u', 's', 'd', 'b', '5', '1', '2', 'm', 'e', 'm', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'd', 'w', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'd', 'w', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'd', 'w', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'd', - 'w', '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', - 'o', 'v', 'u', 's', 'd', 'w', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'd', 'w', '5', '1', '2', 'm', - 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', - 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', - 's', 'q', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 'u', 's', 'q', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'u', 's', 'q', 'b', '1', '2', '8', 'm', 'e', 'm', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', 'b', '2', '5', '6', - 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', - 'q', 'b', '5', '1', '2', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'u', 's', 'q', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', 'd', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', 'd', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', 'd', '1', '2', - '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', - 's', 'q', 'd', '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'm', 'o', 'v', 'u', 's', 'q', 'd', '5', '1', '2', 'm', 'e', 'm', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', 'w', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', 'w', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', - 'q', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'u', 's', 'q', 'w', '1', '2', '8', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', 'w', '2', '5', '6', 'm', 'e', 'm', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'q', 'w', '5', - '1', '2', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'u', 's', 'w', 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', - 'o', 'v', 'u', 's', 'w', 'b', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'm', 'o', 'v', 'u', 's', 'w', 'b', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'w', 'b', '1', '2', '8', 'm', 'e', - 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'u', 's', 'w', 'b', - '2', '5', '6', 'm', 'e', 'm', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 'u', 's', 'w', 'b', '5', '1', '2', 'm', 'e', 'm', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'b', 'd', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'b', 'd', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'b', 'd', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'b', - 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', - 'x', 'b', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 'z', 'x', 'b', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'o', 'v', 'z', 'x', 'b', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'o', 'v', 'z', 'x', 'b', 'w', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'b', 'w', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'd', 'q', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'd', 'q', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', - 'd', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', - 'z', 'x', 'w', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', - 'o', 'v', 'z', 'x', 'w', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'm', 'o', 'v', 'z', 'x', 'w', 'd', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'w', 'q', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'w', 'q', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'w', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'd', 'q', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'd', 'q', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'd', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'h', 'r', 's', - 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'h', - 'r', 's', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', - 'l', 'h', 'r', 's', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'u', 'l', 'h', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'u', 'l', 'h', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'u', 'l', 'h', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'u', 'l', 'h', 'u', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'm', 'u', 'l', 'h', 'u', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'm', 'u', 'l', 'h', 'u', 'w', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'd', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'd', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'd', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'q', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'q', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'q', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'w', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'w', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'l', 'w', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'p', 'm', 'u', 'l', 't', 'i', 's', 'h', 'i', 'f', 't', 'q', - 'b', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'u', 'l', - 't', 'i', 's', 'h', 'i', 'f', 't', 'q', 'b', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 'm', 'u', 'l', 't', 'i', 's', 'h', 'i', 'f', 't', - 'q', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', - 'u', 'd', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', - 'l', 'u', 'd', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', - 'u', 'l', 'u', 'd', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'r', 'o', 'l', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', - 'o', 'l', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', - 'l', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', - 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', 'q', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', 'v', 'd', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', 'v', 'd', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', 'v', 'd', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', 'v', 'q', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', 'v', 'q', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'l', 'v', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'r', 'd', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'r', 'd', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'r', 'd', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'r', 'o', 'r', 'q', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'r', 'o', 'r', 'q', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'r', 'o', 'r', 'q', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'r', 'o', 'r', 'v', 'd', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'r', 'o', 'r', 'v', 'd', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'r', 'o', 'r', 'v', 'd', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'r', 'o', 'r', 'v', 'q', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'r', 'o', 'r', 'v', 'q', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'r', 'o', 'r', 'v', 'q', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'h', 'u', 'f', 'b', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'h', 'u', 'f', 'b', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'h', 'u', 'f', 'b', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'l', 'l', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'l', 'l', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 's', 'l', 'l', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'l', 'l', 'd', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'l', 'l', 'd', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'l', 'l', 'd', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'l', 'l', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'l', 'l', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', - 'l', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', - 'q', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', - 'q', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', - 'q', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', - 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'w', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'w', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'w', 'i', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'w', 'i', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'w', 'i', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '1', '6', - 's', 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '8', 'd', - 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '1', '6', 'h', - 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '2', 'd', 'i', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '3', '2', 'h', 'i', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '4', 'd', 'i', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '4', 's', 'i', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'v', '8', 'h', 'i', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 's', 'l', 'l', 'v', '8', 's', 'i', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'r', 'a', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'a', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 's', 'r', 'a', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'r', 'a', 'd', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'r', 'a', 'd', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'r', 'a', 'd', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'r', 'a', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'r', 'a', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', - 'a', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', - 'q', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', - 'q', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', - 'q', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', - 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', 'i', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', 'i', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', 'i', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', '1', '6', - 's', 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', '8', 'd', - 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', 'q', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', 'q', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', '1', '6', 'h', - 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', '3', '2', 'h', - 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', '4', 's', 'i', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', '8', 'h', 'i', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'v', '8', 's', 'i', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'd', '5', '1', '2', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 's', 'r', 'l', 'd', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'r', 'l', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'l', 'd', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'l', 'd', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'l', 'd', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'l', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 's', 'r', 'l', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'r', 'l', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'r', 'l', 'q', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'r', 'l', 'q', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'r', 'l', 'q', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'r', 'l', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', - 'l', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', - 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'w', - 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'w', - 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'w', - 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', - '1', '6', 's', 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', - '8', 'd', 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '1', - '6', 'h', 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '2', - 'd', 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '3', '2', - 'h', 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '4', 'd', - 'i', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '4', 's', 'i', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '8', 'h', 'i', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'v', '8', 's', 'i', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'b', '1', '2', '8', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 's', 'u', 'b', 'b', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'u', 'b', 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'u', 'b', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 's', 'u', 'b', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'u', 'b', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'u', 'b', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', - 'b', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', - 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'w', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'w', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'w', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 's', 'b', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 's', 'b', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 's', 'b', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 's', 'w', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 's', 'w', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 's', 'w', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'u', 's', 'b', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'u', 's', 'b', - '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'u', 's', - 'b', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'u', - 's', 'w', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', - 'u', 's', 'w', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', - 'b', 'u', 's', 'w', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', - 'e', 'r', 'n', 'l', 'o', 'g', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 't', 'e', 'r', 'n', 'l', 'o', 'g', 'd', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 't', 'e', 'r', 'n', 'l', 'o', 'g', 'd', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 'r', 'n', 'l', 'o', 'g', - 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 'r', 'n', - 'l', 'o', 'g', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', - 'e', 'r', 'n', 'l', 'o', 'g', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'r', 'a', 'n', 'g', 'e', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'r', 'a', 'n', 'g', 'e', 'p', 'd', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'r', 'a', 'n', 'g', 'e', 'p', 'd', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'r', 'a', 'n', 'g', 'e', 'p', 's', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'r', 'a', 'n', 'g', 'e', 'p', 's', '2', '5', '6', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'r', 'a', 'n', 'g', 'e', 'p', 's', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'a', 'n', 'g', 'e', 's', 'd', '1', - '2', '8', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', - 'a', 'n', 'g', 'e', 's', 's', '1', '2', '8', '_', 'r', 'o', 'u', 'n', 'd', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'r', 'e', 'd', 'u', 'c', 'e', 'p', 'd', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'e', 'd', 'u', 'c', 'e', 'p', - 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'e', 'd', 'u', 'c', - 'e', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'e', 'd', - 'u', 'c', 'e', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', - 'e', 'd', 'u', 'c', 'e', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'r', 'e', 'd', 'u', 'c', 'e', 'p', 's', '5', '1', '2', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'r', 'e', 'd', 'u', 'c', 'e', 's', 'd', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'r', 'e', 'd', 'u', 'c', 'e', 's', 's', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'r', 'n', 'd', 's', 'c', 'a', 'l', 'e', 'p', 'd', '_', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'r', 'n', 'd', 's', 'c', 'a', 'l', 'e', 'p', - 'd', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'n', 'd', 's', - 'c', 'a', 'l', 'e', 'p', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'n', 'd', - 's', 'c', 'a', 'l', 'e', 'p', 's', '_', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'r', 'n', 'd', 's', 'c', 'a', 'l', 'e', 'p', 's', '_', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'n', 'd', 's', 'c', 'a', 'l', 'e', - 'p', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'n', 'd', 's', 'c', 'a', 'l', - 'e', 's', 'd', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'r', 'n', 'd', 's', 'c', 'a', 'l', 'e', 's', 's', '_', 'r', 'o', 'u', 'n', - 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 'l', 'e', 'f', 'p', 'd', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 'l', 'e', 'f', - 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 'l', - 'e', 'f', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', - 'a', 'l', 'e', 'f', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 's', 'c', 'a', 'l', 'e', 'f', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 's', 'c', 'a', 'l', 'e', 'f', 'p', 's', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 's', 'c', 'a', 'l', 'e', 'f', 's', 'd', '_', 'r', 'o', - 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 'l', 'e', 'f', - 's', 's', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', - 'h', 'u', 'f', '_', 'f', '3', '2', 'x', '4', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 's', 'h', 'u', 'f', '_', 'f', '3', '2', 'x', '4', '_', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', '_', 'f', '6', '4', 'x', '2', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', '_', 'f', '6', '4', 'x', - '2', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', - '_', 'i', '3', '2', 'x', '4', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', - 'f', '_', 'i', '3', '2', 'x', '4', '_', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 's', 'h', 'u', 'f', '_', 'i', '6', '4', 'x', '2', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 's', 'h', 'u', 'f', '_', 'i', '6', '4', 'x', '2', '_', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', 'p', 'd', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', 'p', 'd', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', 'p', 'd', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', 'p', 's', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', 'p', 's', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'u', 'f', 'p', 's', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 'p', 'd', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 'p', 'd', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 'p', 'd', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 'p', 's', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 'p', 's', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 'p', 's', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 's', 'd', '_', - 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', - 's', 's', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', - 't', 'o', 'r', 'e', 's', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'u', 'b', - 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'u', 'b', 'p', - 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'u', 'b', 'p', 'd', - '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'u', 'b', 'p', 's', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'u', 'b', 'p', 's', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 's', 'u', 'b', 'p', 's', '5', '1', '2', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 's', 'u', 'b', 's', 'd', '_', 'r', 'o', 'u', - 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'u', 'b', 's', 's', '_', 'r', - 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'l', 'i', 'g', 'n', - 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'l', 'i', 'g', 'n', - 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'l', 'i', 'g', 'n', - 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'l', 'i', 'g', 'n', - 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'l', 'i', 'g', 'n', - 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'l', 'i', 'g', 'n', - 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', 'p', - 'h', '2', 'p', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', 'p', - 'h', '2', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', - 'v', 't', 'p', 'h', '2', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'c', 'v', 't', 'p', 's', '2', 'p', 'h', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'c', 'v', 't', 'p', 's', '2', 'p', 'h', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'c', 'v', 't', 'p', 's', '2', 'p', 'h', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'f', - '3', '2', 'x', '4', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', - 'x', 't', 'r', 'a', 'c', 't', 'f', '3', '2', 'x', '4', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'f', '3', '2', 'x', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'f', '6', '4', - 'x', '2', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 't', - 'r', 'a', 'c', 't', 'f', '6', '4', 'x', '2', '_', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'f', '6', '4', 'x', - '4', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'i', - '3', '2', 'x', '4', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', - 'x', 't', 'r', 'a', 'c', 't', 'i', '3', '2', 'x', '4', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'i', '3', '2', 'x', '8', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'i', '6', '4', - 'x', '2', '_', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 't', - 'r', 'a', 'c', 't', 'i', '6', '4', 'x', '2', '_', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'i', '6', '4', 'x', - '4', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 'd', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', - 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', - 'd', 'd', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 'a', 'd', 'd', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'f', 'm', 'a', 'd', 'd', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 's', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'd', '3', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 's', '3', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 'd', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', - 's', 'u', 'b', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 'd', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', - 's', 'u', 'b', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 'a', 'd', 'd', 'p', 'd', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 'a', 'd', 'd', 'p', - 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 'a', - 'd', 'd', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'n', 'm', 'a', 'd', 'd', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'n', 'm', 'a', 'd', 'd', 'p', 's', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 'a', 'd', 'd', 'p', 's', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', - 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', - 'u', 'b', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'n', 'm', 's', 'u', 'b', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', 's', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', 's', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', - 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 'i', '2', 'v', 'a', 'r', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'd', '2', '5', '6', '_', - 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', - 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 'i', '2', 'v', 'a', 'r', 'h', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'h', 'i', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', - 'a', 'r', 'h', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'p', 'd', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'p', - 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 'i', '2', 'v', 'a', 'r', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'p', 's', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', - 'a', 'r', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'p', 's', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'q', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', - '2', 'v', 'a', 'r', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'q', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'q', - 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 'i', '2', 'v', 'a', 'r', 'q', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 'i', '2', 'v', 'a', 'r', 'q', 'i', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', 'l', 'v', - 'a', 'r', 'p', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 'i', 'l', 'v', 'a', 'r', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 'i', 'l', 'v', 'a', 'r', 'p', 'd', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', 'l', 'v', - 'a', 'r', 'p', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 'i', 'l', 'v', 'a', 'r', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 'i', 'l', 'v', 'a', 'r', 'p', 's', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', - 'a', 'r', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', - 'r', 'm', 't', '2', 'v', 'a', 'r', 'd', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'd', '5', '1', - '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', - 'a', 'r', 'h', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'h', 'i', '2', '5', '6', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'h', - 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 't', '2', 'v', 'a', 'r', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'p', 'd', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', - 'a', 'r', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'p', 's', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'p', - 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', - 't', '2', 'v', 'a', 'r', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'q', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', - 'r', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', - 'm', 't', '2', 'v', 'a', 'r', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'q', 'i', '1', '2', - '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', - 'a', 'r', 'q', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'q', 'i', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'd', '5', '2', 'h', 'u', 'q', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'd', - '5', '2', 'h', 'u', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'p', 'm', 'a', 'd', 'd', '5', '2', 'h', 'u', 'q', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'd', '5', '2', 'l', 'u', 'q', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'd', - '5', '2', 'l', 'u', 'q', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'p', 'm', 'a', 'd', 'd', '5', '2', 'l', 'u', 'q', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'x', 'o', 'r', 'p', 'd', '1', '2', '8', '_', 'm', 'a', - 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'x', 'o', 'r', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'x', 'o', 'r', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'x', 'o', 'r', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'x', 'o', 'r', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'x', - 'o', 'r', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 'a', 'd', 'd', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '3', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 'd', '2', '5', '6', '_', 'm', 'a', - 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 'd', '5', '1', '2', - '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 's', - '1', '2', '8', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', - 'd', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 'a', 'd', 'd', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '3', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'd', '3', '_', 'm', 'a', 's', 'k', - '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 's', '3', '_', 'm', 'a', 's', - 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 'd', '1', - '2', '8', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', - 's', 'u', 'b', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '3', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 'd', '5', '1', '2', '_', - 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', - 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', - 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', - 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', '5', - '1', '2', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', - 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', - 's', 'u', 'b', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '3', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'f', 'm', 's', 'u', 'b', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', 'p', 's', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', 'p', 's', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', - 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', - 's', 'u', 'b', 'a', 'd', 'd', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', - 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', 'a', 'd', 'd', 'p', 'd', '2', - '5', '6', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', - 'a', 'd', 'd', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '3', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'f', 'm', 's', 'u', 'b', 'a', 'd', 'd', 'p', 's', '1', '2', '8', '_', - 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', 'a', 'd', 'd', - 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', - 's', 'u', 'b', 'a', 'd', 'd', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', - 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', 'd', '1', '2', '8', - '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', - 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', - 's', 'u', 'b', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '3', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', 's', '1', '2', '8', '_', 'm', 'a', - 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', 's', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', - 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', '3', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', 'x', - 'u', 'p', 'i', 'm', 'm', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', - 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'f', 'i', 'x', 'u', 'p', 'i', 'm', 'm', 'p', 'd', '2', '5', '6', - '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', 'x', 'u', 'p', 'i', 'm', 'm', - 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', 'x', - 'u', 'p', 'i', 'm', 'm', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', - 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'f', 'i', 'x', 'u', 'p', 'i', 'm', 'm', 'p', 's', '2', '5', '6', - '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', 'x', 'u', 'p', 'i', 'm', 'm', - 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'i', 'x', - 'u', 'p', 'i', 'm', 'm', 's', 'd', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', - 'i', 'x', 'u', 'p', 'i', 'm', 'm', 's', 's', '_', 'm', 'a', 's', 'k', 'z', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 't', 'e', 'r', 'n', 'l', 'o', 'g', 'd', '1', '2', '8', '_', 'm', - 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 't', 'e', 'r', 'n', 'l', 'o', 'g', 'd', '2', - '5', '6', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 'r', 'n', 'l', - 'o', 'g', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', - 'e', 'r', 'n', 'l', 'o', 'g', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', - 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 't', 'e', 'r', 'n', 'l', 'o', 'g', 'q', '2', '5', '6', '_', - 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 'r', 'n', 'l', 'o', 'g', 'q', - '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', - 'd', 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 'a', 'd', 'd', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', 'z', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 'd', '5', '1', '2', '_', 'm', 'a', - 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 's', '1', '2', '8', - '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 's', - '2', '5', '6', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', - 'd', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 'a', 'd', 'd', 's', 'd', '3', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'f', 'm', 'a', 'd', 'd', 's', 's', '3', '_', 'm', 'a', 's', 'k', 'z', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 'd', '1', '2', '8', '_', - 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', - 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', - 'a', 'd', 'd', 's', 'u', 'b', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', - 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', '1', - '2', '8', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', - 's', 'u', 'b', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', 'z', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', '5', '1', '2', '_', - 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', - 'r', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', - 'r', 'm', 't', '2', 'v', 'a', 'r', 'd', '2', '5', '6', '_', 'm', 'a', 's', - 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'd', '5', - '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', - '2', 'v', 'a', 'r', 'h', 'i', '1', '2', '8', '_', 'm', 'a', 's', 'k', 'z', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'h', 'i', '2', '5', - '6', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', - 'v', 'a', 'r', 'h', 'i', '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'p', 'd', '1', '2', '8', - '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', - 'a', 'r', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'p', 'd', '5', '1', '2', '_', - 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', - 'r', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'p', 's', '2', '5', '6', '_', 'm', - 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', - 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', - 'r', 'm', 't', '2', 'v', 'a', 'r', 'q', '1', '2', '8', '_', 'm', 'a', 's', - 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'q', '2', - '5', '6', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', - '2', 'v', 'a', 'r', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'q', 'i', '1', '2', '8', - '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 't', '2', 'v', - 'a', 'r', 'q', 'i', '2', '5', '6', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', - 'p', 'e', 'r', 'm', 't', '2', 'v', 'a', 'r', 'q', 'i', '5', '1', '2', '_', - 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'd', '5', '2', 'h', - 'u', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', - 'a', 'd', 'd', '5', '2', 'h', 'u', 'q', '2', '5', '6', '_', 'm', 'a', 's', - 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'd', '5', '2', 'h', 'u', 'q', '5', - '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'd', - '5', '2', 'l', 'u', 'q', '1', '2', '8', '_', 'm', 'a', 's', 'k', 'z', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'p', 'm', 'a', 'd', 'd', '5', '2', 'l', 'u', 'q', '2', '5', '6', '_', - 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'd', '5', '2', 'l', - 'u', 'q', '5', '1', '2', '_', 'm', 'a', 's', 'k', 'z', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'o', 'v', - 'n', 't', 'd', 'q', 'a', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', - 'b', 'd', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'b', 'q', '5', - '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'm', 'o', 'v', 'z', 'x', 'd', 'q', '5', '1', '2', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'm', 'o', 'v', 'z', 'x', 'w', 'd', '5', '1', '2', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'o', - 'v', 'z', 'x', 'w', 'q', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'a', 'd', 'b', 'w', - '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'm', 'b', '1', '2', '8', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 't', 'e', 's', 't', 'm', 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', - 't', 'm', 'b', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'm', 'd', '1', - '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 't', 'e', 's', 't', 'm', 'd', '2', '5', '6', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 't', 'e', 's', 't', 'm', 'd', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', - 'm', 'q', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'm', 'q', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 't', 'e', 's', 't', 'm', 'q', '5', '1', '2', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', - 'e', 's', 't', 'm', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'm', - 'w', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'm', 'w', '5', '1', '2', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 't', 'e', 's', 't', 'n', 'm', 'b', '1', '2', '8', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', - 'e', 's', 't', 'n', 'm', 'b', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', - 'n', 'm', 'b', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'n', 'm', 'd', - '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'n', 'm', 'd', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 't', 'e', 's', 't', 'n', 'm', 'd', '5', '1', '2', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', - 'e', 's', 't', 'n', 'm', 'q', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', - 'n', 'm', 'q', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'n', 'm', 'q', - '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'n', 'm', 'w', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 't', 'e', 's', 't', 'n', 'm', 'w', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', - 'e', 's', 't', 'n', 'm', 'w', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', '1', '4', - 'p', 'd', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', '1', - '4', 'p', 'd', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', - '1', '4', 'p', 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', - 'p', '1', '4', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', - 'c', 'p', '1', '4', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'r', 'c', 'p', '1', '4', 'p', 's', '5', '1', '2', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'r', 'c', 'p', '1', '4', 's', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', - 'c', 'p', '1', '4', 's', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', - '2', '8', 'p', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', '2', '8', - 'p', 's', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', '2', '8', 's', 'd', - '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', - '2', '8', 's', 's', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'r', 's', 'q', 'r', 't', '1', '4', 'p', 'd', '1', '2', '8', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', '1', '4', 'p', 'd', '2', '5', - '6', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', '1', '4', 'p', - 'd', '5', '1', '2', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', - '1', '4', 'p', 's', '1', '2', '8', '_', 'm', 'a', 's', 'k', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 's', - 'q', 'r', 't', '1', '4', 'p', 's', '2', '5', '6', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'r', 's', 'q', 'r', 't', '1', '4', 'p', 's', '5', '1', '2', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', '1', '4', 's', 'd', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', '1', '4', 's', 's', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', '2', '8', 'p', 'd', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', '2', '8', 'p', 's', '_', 'm', - 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', '2', '8', 's', 'd', '_', 'r', - 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', - '2', '8', 's', 's', '_', 'r', 'o', 'u', 'n', 'd', '_', 'm', 'a', 's', 'k', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 's', 'c', 'a', 't', 't', 'e', 'r', 's', 'i', 'v', '8', 'd', 'f', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 's', 'c', 'a', 't', 't', 'e', 'r', 's', 'i', 'v', '1', '6', 's', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 's', 'c', 'a', 't', 't', 'e', 'r', 's', 'i', 'v', '8', 'd', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', - 'c', 'a', 't', 't', 'e', 'r', 's', 'i', 'v', '1', '6', 's', 'f', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', - 'c', 'a', 't', 't', 'e', 'r', 'd', 'i', 'v', '8', 'd', 'f', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', - 'a', 't', 't', 'e', 'r', 'd', 'i', 'v', '1', '6', 's', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', - 'a', 't', 't', 'e', 'r', 'd', 'i', 'v', '8', 'd', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', - 't', 't', 'e', 'r', 'd', 'i', 'v', '1', '6', 's', 'f', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', - 't', 't', 'e', 'r', 'd', 'i', 'v', '2', 'd', 'f', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', - 't', 'e', 'r', 'd', 'i', 'v', '2', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', - 'e', 'r', 'd', 'i', 'v', '4', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', - 'r', 'd', 'i', 'v', '4', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', - 'd', 'i', 'v', '4', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 'd', - 'i', 'v', '4', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 'd', 'i', - 'v', '8', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 'd', 'i', 'v', - '8', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 'p', 'f', 'd', 'p', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 'p', 'f', 'd', 'p', 's', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 's', 'c', 'a', 't', 't', 'e', 'r', 'p', 'f', 'q', 'p', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', - 'a', 't', 't', 'e', 'r', 'p', 'f', 'q', 'p', 's', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', - 't', 'e', 'r', 's', 'i', 'v', '2', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', - 'e', 'r', 's', 'i', 'v', '2', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', - 'r', 's', 'i', 'v', '4', 'd', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', - 's', 'i', 'v', '4', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 's', - 'i', 'v', '4', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 's', 'i', - 'v', '4', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 's', 'i', 'v', - '8', 's', 'f', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 's', 'c', 'a', 't', 't', 'e', 'r', 's', 'i', 'v', '8', - 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 's', 'd', - '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'b', 'r', 'o', 'a', 'd', 'c', 'a', 's', 't', 's', - 's', '5', '1', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'c', 'o', 'm', 'i', 's', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', - 'o', 'm', 'i', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', 's', 'd', '2', 's', 'i', - '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'c', 'v', 't', 's', 'd', '2', 's', 'i', '6', '4', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'c', 'v', 't', 's', 'd', '2', 'u', 's', 'i', '3', '2', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', - 'v', 't', 's', 'd', '2', 'u', 's', 'i', '6', '4', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', - 's', 's', '2', 's', 'i', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', 's', 's', '2', - 's', 'i', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', 's', 's', '2', 'u', 's', 'i', - '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'c', 'v', 't', 's', 's', '2', 'u', 's', 'i', '6', '4', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'b', 'e', 'x', 't', 'r', '_', 'u', '3', '2', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'e', 'x', 't', - 'r', '_', 'u', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'b', 'z', 'h', 'i', '_', 's', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', - 'z', 'h', 'i', '_', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'd', 'e', 'p', '_', 's', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'd', 'e', 'p', '_', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'e', 'x', 't', '_', 's', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'e', 'x', 't', '_', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'l', 'f', 'l', 'u', 's', - 'h', 'o', 'p', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'r', 'e', 'a', 'd', 'e', 'f', 'l', 'a', 'g', 's', - '_', 'u', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'r', 'e', 'a', 'd', 'e', 'f', 'l', 'a', 'g', 's', - '_', 'u', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'w', 'r', 'i', 't', 'e', 'e', 'f', 'l', 'a', 'g', - 's', '_', 'u', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'w', 'r', 'i', 't', 'e', 'e', 'f', 'l', 'a', - 'g', 's', '_', 'u', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 'd', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 'a', 'd', 'd', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 'p', 's', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 'a', 'd', 'd', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', - 'b', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 'd', - '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'm', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'm', 's', 'u', 'b', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', - 'b', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', 'p', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'm', 's', 'u', 'b', 'p', 's', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 's', 'u', 'b', 's', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', 'b', 's', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'm', 's', 'u', 'b', 'a', 'd', 'd', 'p', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 's', 'u', 'b', 'a', 'd', 'd', 'p', 'd', '2', '5', '6', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'm', 's', 'u', 'b', 'a', 'd', 'd', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'm', 's', 'u', - 'b', 'a', 'd', 'd', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 'a', - 'd', 'd', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 'a', 'd', 'd', 'p', 'd', '2', - '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'f', 'n', 'm', 'a', 'd', 'd', 'p', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', - 'n', 'm', 'a', 'd', 'd', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', - 'a', 'd', 'd', 's', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 'a', 'd', 'd', 's', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', - 's', 'u', 'b', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', - 'b', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 'p', 's', '2', '5', - '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'f', 'n', 'm', 's', 'u', 'b', 's', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'n', - 'm', 's', 'u', 'b', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'x', 'r', 's', 't', 'o', 'r', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'f', 'x', 'r', 's', 't', 'o', 'r', '6', '4', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'f', 'x', 's', 'a', 'v', - 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'f', 'x', 's', 'a', 'v', 'e', '6', '4', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'm', 'm', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'f', 'e', 'm', 'm', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 'm', 'o', 'v', 'q', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'm', 'o', 'v', 'n', 't', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 's', 's', 'd', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'a', 'c', 'k', 's', 's', 'w', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', - 'u', 's', 'w', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'a', 'd', 'd', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'a', 'd', 'd', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', - 'd', 'd', 'u', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', 's', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'a', 'l', 'i', 'g', 'n', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'n', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'n', - 'd', 'n', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'a', 'v', 'g', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'c', 'm', 'p', 'e', 'q', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'e', 'q', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'c', 'm', 'p', 'e', 'q', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'g', 't', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'c', 'm', 'p', 'g', 't', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'g', - 't', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'e', 'c', '_', 'e', 'x', 't', '_', 'v', '4', 'h', 'i', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'e', 'c', '_', 's', 'e', 't', '_', 'v', '4', 'h', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'a', 'd', 'd', 'w', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'x', 's', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'a', 'x', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'i', 'n', 's', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', - 'i', 'n', 'u', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'm', 's', 'k', 'b', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'u', 'l', 'h', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'h', 'u', 'w', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'm', 'u', 'l', 'l', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'u', 'd', 'q', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 's', 'a', 'd', 'b', 'w', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'l', 'l', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'l', 'l', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'q', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', - 'l', 'w', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'a', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', 'i', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 's', 'r', 'l', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', - 'l', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 's', 'r', 'l', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'q', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'r', 'l', 'w', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 's', 'u', 'b', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', - 'b', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 's', 'u', 'b', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 's', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'u', 'b', 'u', 's', 'b', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'u', - 's', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'u', 'n', 'p', 'c', 'k', 'h', 'b', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'u', - 'n', 'p', 'c', 'k', 'h', 'd', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'u', 'n', 'p', 'c', 'k', 'h', - 'w', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'u', 'n', 'p', 'c', 'k', 'l', 'b', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'u', - 'n', 'p', 'c', 'k', 'l', 'd', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'u', 'n', 'p', 'c', 'k', 'l', - 'w', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'x', 'o', 'r', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'o', 'n', 'i', 't', 'o', 'r', - 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'm', 'w', 'a', 'i', 't', 'x', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'l', 'm', 'u', 'l', - 'q', 'd', 'q', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'd', 'f', 's', 'b', 'a', 's', 'e', - '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'r', 'd', 'f', 's', 'b', 'a', 's', 'e', '6', '4', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', - 'd', 'g', 's', 'b', 'a', 's', 'e', '3', '2', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'd', 'g', 's', 'b', - 'a', 's', 'e', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'r', 'd', 'p', 'k', 'r', 'u', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'd', - 'p', 'm', 'c', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'r', 'd', 't', 's', 'c', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'd', 't', 's', 'c', - 'p', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 's', 'h', 'a', '1', 'm', 's', 'g', '1', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'a', '1', - 'm', 's', 'g', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 's', 'h', 'a', '1', 'n', 'e', 'x', 't', 'e', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 's', 'h', 'a', '1', 'r', 'n', 'd', 's', '4', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'h', 'a', '2', '5', - '6', 'm', 's', 'g', '1', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 's', 'h', 'a', '2', '5', '6', 'm', 's', 'g', - '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 's', 'h', 'a', '2', '5', '6', 'r', 'n', 'd', 's', '2', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'm', 'p', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'i', 'e', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', - 'i', 'g', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'o', 'm', 'i', 'g', 't', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'i', - 'l', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'o', 'm', 'i', 'l', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'i', 'n', - 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'p', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 'p', 'i', '2', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'i', '2', 'p', 's', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'v', 't', 'p', 's', '2', 'p', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 's', 'i', '2', - 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 's', 'i', '6', '4', '2', 's', 's', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 's', 's', '2', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 's', 's', '2', 's', - 'i', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 't', 'p', 'd', '2', 'p', 'i', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', - 'v', 't', 't', 'p', 's', '2', 'p', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 's', 's', - '2', 's', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 't', 's', 's', '2', 's', 'i', '6', '4', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'm', 'a', 'x', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 'x', 's', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'i', - 'n', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'm', 'i', 'n', 's', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'o', 'v', 'm', 's', - 'k', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'h', 'u', 'f', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'c', 'p', 'p', - 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'r', 'c', 'p', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 's', 'q', 'r', 't', 'p', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'r', 's', 'q', 'r', 't', 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'f', 'e', 'n', 'c', 'e', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 's', 'q', 'r', 't', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 's', 's', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'u', 'c', 'o', 'm', 'i', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'u', 'c', 'o', 'm', 'i', 'g', 'e', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'u', 'c', 'o', 'm', 'i', 'g', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'u', 'c', 'o', 'm', 'i', 'l', - 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'u', 'c', 'o', 'm', 'i', 'l', 't', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'u', 'c', 'o', 'm', 'i', - 'n', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'l', 'f', 'l', 'u', 's', 'h', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'm', 'p', - 's', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'o', 'm', 'i', 's', 'd', 'e', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', - 'i', 's', 'd', 'g', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'i', 's', 'd', 'g', 't', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'c', 'o', 'm', 'i', 's', 'd', 'l', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'o', 'm', 'i', 's', 'd', - 'l', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'o', 'm', 'i', 's', 'd', 'n', 'e', 'q', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', - 't', 'd', 'q', '2', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 'd', '2', 'd', 'q', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'c', 'v', 't', 'p', 'd', '2', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 'p', 's', - '2', 'd', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'v', 't', 's', 'd', '2', 's', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', - 't', 's', 'd', '2', 's', 'i', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 's', 'd', '2', - 's', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'c', 'v', 't', 's', 'i', '2', 's', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 's', 'i', '6', '4', '2', 's', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 's', 's', '2', 's', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'v', 't', 't', 'p', 'd', '2', 'd', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', - 't', 'p', 's', '2', 'd', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'v', 't', 't', 's', 'd', '2', 's', - 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'c', 'v', 't', 't', 's', 'd', '2', 's', 'i', '6', '4', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'l', - 'f', 'e', 'n', 'c', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'm', 'a', 's', 'k', 'm', 'o', 'v', 'd', 'q', - 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'm', 'a', 'x', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'a', 'x', 's', 'd', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', - 'f', 'e', 'n', 'c', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'm', 'i', 'n', 'p', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'i', 'n', - 's', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'm', 'o', 'v', 'm', 's', 'k', 'p', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', - 'k', 's', 's', 'd', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 's', 's', - 'w', 'b', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 'u', 's', 'w', 'b', '1', - '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'a', 'd', 'd', 's', 'b', '1', '2', '8', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', - 'd', 'd', 's', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', 's', 'b', - '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'a', 'd', 'd', 'u', 's', 'w', '1', '2', '8', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'a', 'u', 's', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'v', 'g', 'b', '1', '2', '8', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'a', 'v', 'g', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'd', 'd', 'w', - 'd', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'm', 'o', 'v', 'm', 's', 'k', 'b', '1', '2', - '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'm', 'u', 'l', 'h', 'w', '1', '2', '8', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', - 'l', 'h', 'u', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'u', 'd', 'q', - '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'a', 'd', 'b', 'w', '1', '2', '8', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'l', 'l', 'd', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'q', '1', '2', - '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'l', 'l', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', - 'd', 'i', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'l', 'l', 'q', 'i', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'l', 'l', 'w', 'i', '1', '2', '8', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', - 'd', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', '1', '2', '8', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'r', 'a', 'd', 'i', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'a', 'w', 'i', - '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'd', '1', '2', '8', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', - 'r', 'l', 'q', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'w', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'r', 'l', 'd', 'i', '1', '2', '8', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', - 'q', 'i', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'r', 'l', 'w', 'i', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'u', 'b', 's', 'b', '1', '2', '8', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', - 's', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'u', 'b', 'u', 's', 'b', '1', '2', - '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'u', 'b', 'u', 's', 'w', '1', '2', '8', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 's', 'q', - 'r', 't', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 's', 'q', 'r', 't', 's', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'u', 'c', 'o', - 'm', 'i', 's', 'd', 'e', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'u', 'c', 'o', 'm', 'i', 's', 'd', 'g', - 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'u', 'c', 'o', 'm', 'i', 's', 'd', 'g', 't', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'u', 'c', 'o', - 'm', 'i', 's', 'd', 'l', 'e', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'u', 'c', 'o', 'm', 'i', 's', 'd', 'l', - 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'u', 'c', 'o', 'm', 'i', 's', 'd', 'n', 'e', 'q', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', - 'd', 's', 'u', 'b', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'a', 'd', 'd', 's', 'u', 'b', 'p', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'h', 'a', 'd', 'd', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'h', 'a', 'd', 'd', 'p', 's', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'h', 's', 'u', 'b', 'p', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'h', 's', 'u', 'b', 'p', 's', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'l', - 'd', 'd', 'q', 'u', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'm', 'o', 'n', 'i', 't', 'o', 'r', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'w', - 'a', 'i', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'b', 'l', 'e', 'n', 'd', 'v', 'p', 'd', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'l', - 'e', 'n', 'd', 'v', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'd', 'p', 'p', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'd', 'p', 'p', - 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'i', 'n', 's', 'e', 'r', 't', 'p', 's', '1', '2', '8', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', - 'o', 'v', 'n', 't', 'd', 'q', 'a', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'm', 'p', 's', 'a', 'd', 'b', 'w', - '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'a', 'c', 'k', 'u', 's', 'd', 'w', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'b', 'l', 'e', 'n', 'd', 'v', 'b', '1', '2', '8', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', - 'm', 'i', 'n', 'p', 'o', 's', 'u', 'w', '1', '2', '8', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'u', - 'l', 'd', 'q', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 't', 'e', 's', 't', 'c', '1', '2', - '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 't', 'e', 's', 't', 'n', 'z', 'c', '1', '2', '8', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 't', 'e', 's', 't', 'z', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'o', 'u', 'n', 'd', 'p', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'r', 'o', 'u', 'n', 'd', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'r', 'o', 'u', 'n', 'd', - 's', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'r', 'o', 'u', 'n', 'd', 's', 's', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'r', 'c', '3', - '2', 'h', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'c', 'r', 'c', '3', '2', 's', 'i', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'c', 'r', 'c', - '3', '2', 'q', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'c', 'r', 'c', '3', '2', 'd', 'i', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', - 'm', 'p', 'e', 's', 't', 'r', 'i', '1', '2', '8', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', - 'e', 's', 't', 'r', 'i', 'a', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'e', - 's', 't', 'r', 'i', 'c', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'e', 's', - 't', 'r', 'i', 'o', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'e', 's', 't', - 'r', 'i', 's', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'e', 's', 't', 'r', - 'i', 'z', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'e', 's', 't', 'r', 'm', - '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'c', 'm', 'p', 'i', 's', 't', 'r', 'i', '1', '2', - '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'c', 'm', 'p', 'i', 's', 't', 'r', 'i', 'a', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'c', 'm', 'p', 'i', 's', 't', 'r', 'i', 'c', '1', '2', '8', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'p', 'c', 'm', 'p', 'i', 's', 't', 'r', 'i', 'o', '1', '2', '8', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 'c', 'm', 'p', 'i', 's', 't', 'r', 'i', 's', '1', '2', '8', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', - 'm', 'p', 'i', 's', 't', 'r', 'i', 'z', '1', '2', '8', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'c', 'm', - 'p', 'i', 's', 't', 'r', 'm', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'e', 'x', 't', 'r', 'q', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'e', 'x', 't', 'r', 'q', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'i', 'n', 's', 'e', 'r', 't', 'q', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'i', 'n', 's', 'e', 'r', 't', 'q', 'i', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', 'b', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'a', 'b', 's', 'b', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'a', 'b', 's', 'd', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'a', 'b', 's', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'a', 'b', 's', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', 'a', 'd', 'd', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 'h', 'a', 'd', 'd', 'd', '1', '2', '8', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', 'a', - 'd', 'd', 's', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'h', 'a', 'd', 'd', 's', 'w', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'h', 'a', 'd', 'd', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', 'a', 'd', 'd', 'w', '1', - '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'p', 'h', 's', 'u', 'b', 'd', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', 's', 'u', 'b', - 'd', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'p', 'h', 's', 'u', 'b', 's', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', - 's', 'u', 'b', 's', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'h', 's', 'u', 'b', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 'h', 's', 'u', 'b', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'd', - 'd', 'u', 'b', 's', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 'm', 'a', 'd', 'd', 'u', 'b', 's', 'w', - '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 'm', 'u', 'l', 'h', 'r', 's', 'w', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 'm', - 'u', 'l', 'h', 'r', 's', 'w', '1', '2', '8', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'h', 'u', 'f', - 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'p', 's', 'h', 'u', 'f', 'b', '1', '2', '8', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'i', - 'g', 'n', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'p', 's', 'i', 'g', 'n', 'b', '1', '2', '8', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', - 's', 'i', 'g', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'p', 's', 'i', 'g', 'n', 'd', '1', '2', '8', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'p', 's', 'i', 'g', 'n', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'p', 's', 'i', 'g', 'n', 'w', '1', - '2', '8', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 's', 'u', 'b', 'b', 'o', 'r', 'r', 'o', 'w', '_', 'u', '3', - '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 's', 'u', 'b', 'b', 'o', 'r', 'r', 'o', 'w', '_', 'u', '6', '4', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'b', 'e', 'x', 't', 'r', 'i', '_', 'u', '3', '2', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'b', 'e', 'x', - 't', 'r', 'i', '_', 'u', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', 'p', 'h', '2', - 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'c', 'v', 't', 'p', 'h', '2', 'p', 's', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'c', 'v', 't', 'p', 's', '2', 'p', 'h', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'c', 'v', 't', - 'p', 's', '2', 'p', 'h', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'w', 'r', 'f', 's', 'b', 'a', - 's', 'e', '3', '2', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'w', 'r', 'f', 's', 'b', 'a', 's', 'e', '6', '4', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'w', 'r', 'g', 's', 'b', 'a', 's', 'e', '3', '2', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'w', 'r', 'g', - 's', 'b', 'a', 's', 'e', '6', '4', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'w', 'r', 'p', 'k', 'r', 'u', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'x', 'a', 'b', 'o', 'r', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'x', 'b', 'e', 'g', 'i', 'n', '\000', '_', - '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'x', - 'e', 'n', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'f', 'r', 'c', 'z', 'p', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'r', - 'c', 'z', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'r', 'c', 'z', 'p', 's', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'f', 'r', 'c', 'z', 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'f', 'r', - 'c', 'z', 's', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'f', 'r', 'c', 'z', 's', 's', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'c', 'm', 'o', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', - 'i', 'a', '3', '2', '_', 'v', 'p', 'c', 'm', 'o', 'v', '_', '2', '5', '6', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'c', 'o', 'm', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'c', 'o', 'm', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'p', 'c', 'o', 'm', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'c', 'o', 'm', 'u', 'b', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'p', 'c', 'o', 'm', 'u', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'c', 'o', 'm', 'u', 'q', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'c', 'o', 'm', 'u', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'c', 'o', 'm', 'w', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'e', 'r', 'm', 'i', 'l', '2', 'p', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', - 'r', 'm', 'i', 'l', '2', 'p', 'd', '2', '5', '6', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', - 'm', 'i', 'l', '2', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'e', 'r', 'm', 'i', 'l', '2', - 'p', 's', '2', '5', '6', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', 'a', 'd', 'd', 'b', 'd', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'p', 'h', 'a', 'd', 'd', 'b', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', 'a', 'd', 'd', - 'b', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 'h', 'a', 'd', 'd', 'd', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', - 'a', 'd', 'd', 'u', 'b', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', 'a', 'd', 'd', 'u', 'b', - 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'p', 'h', 'a', 'd', 'd', 'u', 'b', 'w', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', - 'a', 'd', 'd', 'u', 'd', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', - 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', 'a', 'd', 'd', 'u', 'w', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'p', 'h', 'a', 'd', 'd', 'u', 'w', 'q', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', - 'a', 'd', 'd', 'w', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', 'a', 'd', 'd', 'w', 'q', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'v', 'p', 'h', 's', 'u', 'b', 'b', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'h', 's', 'u', 'b', - 'd', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 'h', 's', 'u', 'b', 'w', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', - 'a', 'c', 's', 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'c', 's', 'd', 'q', 'h', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 'm', 'a', 'c', 's', 'd', 'q', 'l', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', - 'c', 's', 's', 'd', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'c', 's', 's', 'd', 'q', - 'h', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'p', 'm', 'a', 'c', 's', 's', 'd', 'q', 'l', '\000', '_', '_', - 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', - 'm', 'a', 'c', 's', 's', 'w', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'c', 's', 's', - 'w', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 'm', 'a', 'c', 's', 'w', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', - 'a', 'c', 's', 'w', 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'm', 'a', 'd', 'c', 's', 's', 'w', - 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'p', 'm', 'a', 'd', 'c', 's', 'w', 'd', '\000', '_', '_', 'b', - 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'p', - 'e', 'r', 'm', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'r', 'o', 't', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'r', 'o', - 't', 'b', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'r', 'o', 't', 'd', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'r', 'o', - 't', 'd', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'r', 'o', 't', 'q', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'r', 'o', - 't', 'q', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 'r', 'o', 't', 'w', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 'r', 'o', - 't', 'w', 'i', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', - 'a', '3', '2', '_', 'v', 'p', 's', 'h', 'a', 'b', '\000', '_', '_', 'b', 'u', - 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 's', 'h', - 'a', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', - '3', '2', '_', 'v', 'p', 's', 'h', 'a', 'q', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 's', 'h', 'a', - 'w', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', - '2', '_', 'v', 'p', 's', 'h', 'l', 'b', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 's', 'h', 'l', 'd', - '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', - '_', 'v', 'p', 's', 'h', 'l', 'q', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'i', 'a', '3', '2', '_', 'v', 'p', 's', 'h', 'l', 'w', '\000', - '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', '_', 'i', 'a', '3', '2', '_', - 'x', 't', 'e', 's', 't', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', 'i', 'n', - '_', 'b', 'i', 't', 'r', 'e', 'v', '\000', '_', '_', 'b', 'u', 'i', 'l', 't', - 'i', 'n', '_', 'g', 'e', 't', 'i', 'd', '\000', '_', '_', 'b', 'u', 'i', 'l', - 't', 'i', 'n', '_', 'g', 'e', 't', 'p', 's', '\000', '_', '_', 'b', 'u', 'i', - 'l', 't', 'i', 'n', '_', 's', 'e', 't', 'p', 's', '\000', - }; - - struct BuiltinEntry { - Intrinsic::ID IntrinID; - unsigned StrTabOffset; - const char *getName() const { - return &BuiltinNames[StrTabOffset]; - } - bool operator<(const char *RHS) const { - return strcmp(getName(), RHS) < 0; - } - }; - StringRef BuiltinName(BuiltinNameStr); - StringRef TargetPrefix(TargetPrefixStr); - - /* Target Independent Builtins */ { - static const BuiltinEntry Names[] = { - {Intrinsic::adjust_trampoline, 0}, // __builtin_adjust_trampoline - {Intrinsic::debugtrap, 28}, // __builtin_debugtrap - {Intrinsic::flt_rounds, 70}, // __builtin_flt_rounds - {Intrinsic::init_trampoline, 91}, // __builtin_init_trampoline - {Intrinsic::objectsize, 117}, // __builtin_object_size - {Intrinsic::stackrestore, 139}, // __builtin_stack_restore - {Intrinsic::stacksave, 163}, // __builtin_stack_save - {Intrinsic::thread_pointer, 184}, // __builtin_thread_pointer - {Intrinsic::trap, 209}, // __builtin_trap - {Intrinsic::eh_unwind_init, 48}, // __builtin_unwind_init - }; - auto I = std::lower_bound(std::begin(Names), - std::end(Names), - BuiltinNameStr); - if (I != std::end(Names) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "aarch64") { - static const BuiltinEntry aarch64Names[] = { - {Intrinsic::aarch64_dmb, 224}, // __builtin_arm_dmb - {Intrinsic::aarch64_dsb, 242}, // __builtin_arm_dsb - {Intrinsic::aarch64_isb, 260}, // __builtin_arm_isb - }; - auto I = std::lower_bound(std::begin(aarch64Names), - std::end(aarch64Names), - BuiltinNameStr); - if (I != std::end(aarch64Names) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "amdgcn") { - static const BuiltinEntry amdgcnNames[] = { - {Intrinsic::amdgcn_buffer_wbinvl1, 278}, // __builtin_amdgcn_buffer_wbinvl1 - {Intrinsic::amdgcn_buffer_wbinvl1_sc, 310}, // __builtin_amdgcn_buffer_wbinvl1_sc - {Intrinsic::amdgcn_buffer_wbinvl1_vol, 345}, // __builtin_amdgcn_buffer_wbinvl1_vol - {Intrinsic::amdgcn_cubeid, 381}, // __builtin_amdgcn_cubeid - {Intrinsic::amdgcn_cubema, 405}, // __builtin_amdgcn_cubema - {Intrinsic::amdgcn_cubesc, 429}, // __builtin_amdgcn_cubesc - {Intrinsic::amdgcn_cubetc, 453}, // __builtin_amdgcn_cubetc - {Intrinsic::amdgcn_dispatch_ptr, 477}, // __builtin_amdgcn_dispatch_ptr - {Intrinsic::amdgcn_ds_swizzle, 507}, // __builtin_amdgcn_ds_swizzle - {Intrinsic::amdgcn_groupstaticsize, 535}, // __builtin_amdgcn_groupstaticsize - {Intrinsic::amdgcn_implicitarg_ptr, 568}, // __builtin_amdgcn_implicitarg_ptr - {Intrinsic::amdgcn_interp_p1, 601}, // __builtin_amdgcn_interp_p1 - {Intrinsic::amdgcn_interp_p2, 628}, // __builtin_amdgcn_interp_p2 - {Intrinsic::amdgcn_kernarg_segment_ptr, 655}, // __builtin_amdgcn_kernarg_segment_ptr - {Intrinsic::amdgcn_lerp, 692}, // __builtin_amdgcn_lerp - {Intrinsic::amdgcn_mbcnt_hi, 714}, // __builtin_amdgcn_mbcnt_hi - {Intrinsic::amdgcn_mbcnt_lo, 740}, // __builtin_amdgcn_mbcnt_lo - {Intrinsic::amdgcn_queue_ptr, 766}, // __builtin_amdgcn_queue_ptr - {Intrinsic::amdgcn_rsq_legacy, 793}, // __builtin_amdgcn_rsq_legacy - {Intrinsic::amdgcn_s_barrier, 821}, // __builtin_amdgcn_s_barrier - {Intrinsic::amdgcn_s_dcache_inv, 848}, // __builtin_amdgcn_s_dcache_inv - {Intrinsic::amdgcn_s_dcache_inv_vol, 878}, // __builtin_amdgcn_s_dcache_inv_vol - {Intrinsic::amdgcn_s_dcache_wb, 912}, // __builtin_amdgcn_s_dcache_wb - {Intrinsic::amdgcn_s_dcache_wb_vol, 941}, // __builtin_amdgcn_s_dcache_wb_vol - {Intrinsic::amdgcn_s_getreg, 974}, // __builtin_amdgcn_s_getreg - {Intrinsic::amdgcn_s_memrealtime, 1000}, // __builtin_amdgcn_s_memrealtime - {Intrinsic::amdgcn_s_memtime, 1031}, // __builtin_amdgcn_s_memtime - {Intrinsic::amdgcn_s_sleep, 1058}, // __builtin_amdgcn_s_sleep - {Intrinsic::amdgcn_workgroup_id_x, 1083}, // __builtin_amdgcn_workgroup_id_x - {Intrinsic::amdgcn_workgroup_id_y, 1115}, // __builtin_amdgcn_workgroup_id_y - {Intrinsic::amdgcn_workgroup_id_z, 1147}, // __builtin_amdgcn_workgroup_id_z - }; - auto I = std::lower_bound(std::begin(amdgcnNames), - std::end(amdgcnNames), - BuiltinNameStr); - if (I != std::end(amdgcnNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "arm") { - static const BuiltinEntry armNames[] = { - {Intrinsic::arm_cdp, 1179}, // __builtin_arm_cdp - {Intrinsic::arm_cdp2, 1197}, // __builtin_arm_cdp2 - {Intrinsic::arm_dmb, 224}, // __builtin_arm_dmb - {Intrinsic::arm_dsb, 242}, // __builtin_arm_dsb - {Intrinsic::arm_get_fpscr, 1216}, // __builtin_arm_get_fpscr - {Intrinsic::arm_isb, 260}, // __builtin_arm_isb - {Intrinsic::arm_ldc, 1240}, // __builtin_arm_ldc - {Intrinsic::arm_ldc2, 1258}, // __builtin_arm_ldc2 - {Intrinsic::arm_ldc2l, 1277}, // __builtin_arm_ldc2l - {Intrinsic::arm_ldcl, 1297}, // __builtin_arm_ldcl - {Intrinsic::arm_mcr, 1316}, // __builtin_arm_mcr - {Intrinsic::arm_mcr2, 1334}, // __builtin_arm_mcr2 - {Intrinsic::arm_mrc, 1353}, // __builtin_arm_mrc - {Intrinsic::arm_mrc2, 1371}, // __builtin_arm_mrc2 - {Intrinsic::arm_qadd, 1390}, // __builtin_arm_qadd - {Intrinsic::arm_qsub, 1409}, // __builtin_arm_qsub - {Intrinsic::arm_set_fpscr, 1428}, // __builtin_arm_set_fpscr - {Intrinsic::arm_ssat, 1452}, // __builtin_arm_ssat - {Intrinsic::arm_stc, 1471}, // __builtin_arm_stc - {Intrinsic::arm_stc2, 1489}, // __builtin_arm_stc2 - {Intrinsic::arm_stc2l, 1508}, // __builtin_arm_stc2l - {Intrinsic::arm_stcl, 1528}, // __builtin_arm_stcl - {Intrinsic::arm_usat, 1547}, // __builtin_arm_usat - }; - auto I = std::lower_bound(std::begin(armNames), - std::end(armNames), - BuiltinNameStr); - if (I != std::end(armNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "bpf") { - static const BuiltinEntry bpfNames[] = { - {Intrinsic::bpf_load_byte, 1566}, // __builtin_bpf_load_byte - {Intrinsic::bpf_load_half, 1590}, // __builtin_bpf_load_half - {Intrinsic::bpf_load_word, 1614}, // __builtin_bpf_load_word - {Intrinsic::bpf_pseudo, 1638}, // __builtin_bpf_pseudo - }; - auto I = std::lower_bound(std::begin(bpfNames), - std::end(bpfNames), - BuiltinNameStr); - if (I != std::end(bpfNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "hexagon") { - static const BuiltinEntry hexagonNames[] = { - {Intrinsic::hexagon_A2_abs, 1659}, // __builtin_HEXAGON_A2_abs - {Intrinsic::hexagon_A2_absp, 1684}, // __builtin_HEXAGON_A2_absp - {Intrinsic::hexagon_A2_abssat, 1710}, // __builtin_HEXAGON_A2_abssat - {Intrinsic::hexagon_A2_add, 1738}, // __builtin_HEXAGON_A2_add - {Intrinsic::hexagon_A2_addh_h16_hh, 1763}, // __builtin_HEXAGON_A2_addh_h16_hh - {Intrinsic::hexagon_A2_addh_h16_hl, 1796}, // __builtin_HEXAGON_A2_addh_h16_hl - {Intrinsic::hexagon_A2_addh_h16_lh, 1829}, // __builtin_HEXAGON_A2_addh_h16_lh - {Intrinsic::hexagon_A2_addh_h16_ll, 1862}, // __builtin_HEXAGON_A2_addh_h16_ll - {Intrinsic::hexagon_A2_addh_h16_sat_hh, 1895}, // __builtin_HEXAGON_A2_addh_h16_sat_hh - {Intrinsic::hexagon_A2_addh_h16_sat_hl, 1932}, // __builtin_HEXAGON_A2_addh_h16_sat_hl - {Intrinsic::hexagon_A2_addh_h16_sat_lh, 1969}, // __builtin_HEXAGON_A2_addh_h16_sat_lh - {Intrinsic::hexagon_A2_addh_h16_sat_ll, 2006}, // __builtin_HEXAGON_A2_addh_h16_sat_ll - {Intrinsic::hexagon_A2_addh_l16_hl, 2043}, // __builtin_HEXAGON_A2_addh_l16_hl - {Intrinsic::hexagon_A2_addh_l16_ll, 2076}, // __builtin_HEXAGON_A2_addh_l16_ll - {Intrinsic::hexagon_A2_addh_l16_sat_hl, 2109}, // __builtin_HEXAGON_A2_addh_l16_sat_hl - {Intrinsic::hexagon_A2_addh_l16_sat_ll, 2146}, // __builtin_HEXAGON_A2_addh_l16_sat_ll - {Intrinsic::hexagon_A2_addi, 2183}, // __builtin_HEXAGON_A2_addi - {Intrinsic::hexagon_A2_addp, 2209}, // __builtin_HEXAGON_A2_addp - {Intrinsic::hexagon_A2_addpsat, 2235}, // __builtin_HEXAGON_A2_addpsat - {Intrinsic::hexagon_A2_addsat, 2264}, // __builtin_HEXAGON_A2_addsat - {Intrinsic::hexagon_A2_addsp, 2292}, // __builtin_HEXAGON_A2_addsp - {Intrinsic::hexagon_A2_and, 2319}, // __builtin_HEXAGON_A2_and - {Intrinsic::hexagon_A2_andir, 2344}, // __builtin_HEXAGON_A2_andir - {Intrinsic::hexagon_A2_andp, 2371}, // __builtin_HEXAGON_A2_andp - {Intrinsic::hexagon_A2_aslh, 2397}, // __builtin_HEXAGON_A2_aslh - {Intrinsic::hexagon_A2_asrh, 2423}, // __builtin_HEXAGON_A2_asrh - {Intrinsic::hexagon_A2_combine_hh, 2449}, // __builtin_HEXAGON_A2_combine_hh - {Intrinsic::hexagon_A2_combine_hl, 2481}, // __builtin_HEXAGON_A2_combine_hl - {Intrinsic::hexagon_A2_combine_lh, 2513}, // __builtin_HEXAGON_A2_combine_lh - {Intrinsic::hexagon_A2_combine_ll, 2545}, // __builtin_HEXAGON_A2_combine_ll - {Intrinsic::hexagon_A2_combineii, 2577}, // __builtin_HEXAGON_A2_combineii - {Intrinsic::hexagon_A2_combinew, 2608}, // __builtin_HEXAGON_A2_combinew - {Intrinsic::hexagon_A2_max, 2638}, // __builtin_HEXAGON_A2_max - {Intrinsic::hexagon_A2_maxp, 2663}, // __builtin_HEXAGON_A2_maxp - {Intrinsic::hexagon_A2_maxu, 2689}, // __builtin_HEXAGON_A2_maxu - {Intrinsic::hexagon_A2_maxup, 2715}, // __builtin_HEXAGON_A2_maxup - {Intrinsic::hexagon_A2_min, 2742}, // __builtin_HEXAGON_A2_min - {Intrinsic::hexagon_A2_minp, 2767}, // __builtin_HEXAGON_A2_minp - {Intrinsic::hexagon_A2_minu, 2793}, // __builtin_HEXAGON_A2_minu - {Intrinsic::hexagon_A2_minup, 2819}, // __builtin_HEXAGON_A2_minup - {Intrinsic::hexagon_A2_neg, 2846}, // __builtin_HEXAGON_A2_neg - {Intrinsic::hexagon_A2_negp, 2871}, // __builtin_HEXAGON_A2_negp - {Intrinsic::hexagon_A2_negsat, 2897}, // __builtin_HEXAGON_A2_negsat - {Intrinsic::hexagon_A2_not, 2925}, // __builtin_HEXAGON_A2_not - {Intrinsic::hexagon_A2_notp, 2950}, // __builtin_HEXAGON_A2_notp - {Intrinsic::hexagon_A2_or, 2976}, // __builtin_HEXAGON_A2_or - {Intrinsic::hexagon_A2_orir, 3000}, // __builtin_HEXAGON_A2_orir - {Intrinsic::hexagon_A2_orp, 3026}, // __builtin_HEXAGON_A2_orp - {Intrinsic::hexagon_A2_roundsat, 3051}, // __builtin_HEXAGON_A2_roundsat - {Intrinsic::hexagon_A2_sat, 3081}, // __builtin_HEXAGON_A2_sat - {Intrinsic::hexagon_A2_satb, 3106}, // __builtin_HEXAGON_A2_satb - {Intrinsic::hexagon_A2_sath, 3132}, // __builtin_HEXAGON_A2_sath - {Intrinsic::hexagon_A2_satub, 3158}, // __builtin_HEXAGON_A2_satub - {Intrinsic::hexagon_A2_satuh, 3185}, // __builtin_HEXAGON_A2_satuh - {Intrinsic::hexagon_A2_sub, 3212}, // __builtin_HEXAGON_A2_sub - {Intrinsic::hexagon_A2_subh_h16_hh, 3237}, // __builtin_HEXAGON_A2_subh_h16_hh - {Intrinsic::hexagon_A2_subh_h16_hl, 3270}, // __builtin_HEXAGON_A2_subh_h16_hl - {Intrinsic::hexagon_A2_subh_h16_lh, 3303}, // __builtin_HEXAGON_A2_subh_h16_lh - {Intrinsic::hexagon_A2_subh_h16_ll, 3336}, // __builtin_HEXAGON_A2_subh_h16_ll - {Intrinsic::hexagon_A2_subh_h16_sat_hh, 3369}, // __builtin_HEXAGON_A2_subh_h16_sat_hh - {Intrinsic::hexagon_A2_subh_h16_sat_hl, 3406}, // __builtin_HEXAGON_A2_subh_h16_sat_hl - {Intrinsic::hexagon_A2_subh_h16_sat_lh, 3443}, // __builtin_HEXAGON_A2_subh_h16_sat_lh - {Intrinsic::hexagon_A2_subh_h16_sat_ll, 3480}, // __builtin_HEXAGON_A2_subh_h16_sat_ll - {Intrinsic::hexagon_A2_subh_l16_hl, 3517}, // __builtin_HEXAGON_A2_subh_l16_hl - {Intrinsic::hexagon_A2_subh_l16_ll, 3550}, // __builtin_HEXAGON_A2_subh_l16_ll - {Intrinsic::hexagon_A2_subh_l16_sat_hl, 3583}, // __builtin_HEXAGON_A2_subh_l16_sat_hl - {Intrinsic::hexagon_A2_subh_l16_sat_ll, 3620}, // __builtin_HEXAGON_A2_subh_l16_sat_ll - {Intrinsic::hexagon_A2_subp, 3657}, // __builtin_HEXAGON_A2_subp - {Intrinsic::hexagon_A2_subri, 3683}, // __builtin_HEXAGON_A2_subri - {Intrinsic::hexagon_A2_subsat, 3710}, // __builtin_HEXAGON_A2_subsat - {Intrinsic::hexagon_A2_svaddh, 3738}, // __builtin_HEXAGON_A2_svaddh - {Intrinsic::hexagon_A2_svaddhs, 3766}, // __builtin_HEXAGON_A2_svaddhs - {Intrinsic::hexagon_A2_svadduhs, 3795}, // __builtin_HEXAGON_A2_svadduhs - {Intrinsic::hexagon_A2_svavgh, 3825}, // __builtin_HEXAGON_A2_svavgh - {Intrinsic::hexagon_A2_svavghs, 3853}, // __builtin_HEXAGON_A2_svavghs - {Intrinsic::hexagon_A2_svnavgh, 3882}, // __builtin_HEXAGON_A2_svnavgh - {Intrinsic::hexagon_A2_svsubh, 3911}, // __builtin_HEXAGON_A2_svsubh - {Intrinsic::hexagon_A2_svsubhs, 3939}, // __builtin_HEXAGON_A2_svsubhs - {Intrinsic::hexagon_A2_svsubuhs, 3968}, // __builtin_HEXAGON_A2_svsubuhs - {Intrinsic::hexagon_A2_swiz, 3998}, // __builtin_HEXAGON_A2_swiz - {Intrinsic::hexagon_A2_sxtb, 4024}, // __builtin_HEXAGON_A2_sxtb - {Intrinsic::hexagon_A2_sxth, 4050}, // __builtin_HEXAGON_A2_sxth - {Intrinsic::hexagon_A2_sxtw, 4076}, // __builtin_HEXAGON_A2_sxtw - {Intrinsic::hexagon_A2_tfr, 4102}, // __builtin_HEXAGON_A2_tfr - {Intrinsic::hexagon_A2_tfrih, 4127}, // __builtin_HEXAGON_A2_tfrih - {Intrinsic::hexagon_A2_tfril, 4154}, // __builtin_HEXAGON_A2_tfril - {Intrinsic::hexagon_A2_tfrp, 4181}, // __builtin_HEXAGON_A2_tfrp - {Intrinsic::hexagon_A2_tfrpi, 4207}, // __builtin_HEXAGON_A2_tfrpi - {Intrinsic::hexagon_A2_tfrsi, 4234}, // __builtin_HEXAGON_A2_tfrsi - {Intrinsic::hexagon_A2_vabsh, 4261}, // __builtin_HEXAGON_A2_vabsh - {Intrinsic::hexagon_A2_vabshsat, 4288}, // __builtin_HEXAGON_A2_vabshsat - {Intrinsic::hexagon_A2_vabsw, 4318}, // __builtin_HEXAGON_A2_vabsw - {Intrinsic::hexagon_A2_vabswsat, 4345}, // __builtin_HEXAGON_A2_vabswsat - {Intrinsic::hexagon_A2_vaddb_map, 4375}, // __builtin_HEXAGON_A2_vaddb_map - {Intrinsic::hexagon_A2_vaddh, 4406}, // __builtin_HEXAGON_A2_vaddh - {Intrinsic::hexagon_A2_vaddhs, 4433}, // __builtin_HEXAGON_A2_vaddhs - {Intrinsic::hexagon_A2_vaddub, 4461}, // __builtin_HEXAGON_A2_vaddub - {Intrinsic::hexagon_A2_vaddubs, 4489}, // __builtin_HEXAGON_A2_vaddubs - {Intrinsic::hexagon_A2_vadduhs, 4518}, // __builtin_HEXAGON_A2_vadduhs - {Intrinsic::hexagon_A2_vaddw, 4547}, // __builtin_HEXAGON_A2_vaddw - {Intrinsic::hexagon_A2_vaddws, 4574}, // __builtin_HEXAGON_A2_vaddws - {Intrinsic::hexagon_A2_vavgh, 4602}, // __builtin_HEXAGON_A2_vavgh - {Intrinsic::hexagon_A2_vavghcr, 4629}, // __builtin_HEXAGON_A2_vavghcr - {Intrinsic::hexagon_A2_vavghr, 4658}, // __builtin_HEXAGON_A2_vavghr - {Intrinsic::hexagon_A2_vavgub, 4686}, // __builtin_HEXAGON_A2_vavgub - {Intrinsic::hexagon_A2_vavgubr, 4714}, // __builtin_HEXAGON_A2_vavgubr - {Intrinsic::hexagon_A2_vavguh, 4743}, // __builtin_HEXAGON_A2_vavguh - {Intrinsic::hexagon_A2_vavguhr, 4771}, // __builtin_HEXAGON_A2_vavguhr - {Intrinsic::hexagon_A2_vavguw, 4800}, // __builtin_HEXAGON_A2_vavguw - {Intrinsic::hexagon_A2_vavguwr, 4828}, // __builtin_HEXAGON_A2_vavguwr - {Intrinsic::hexagon_A2_vavgw, 4857}, // __builtin_HEXAGON_A2_vavgw - {Intrinsic::hexagon_A2_vavgwcr, 4884}, // __builtin_HEXAGON_A2_vavgwcr - {Intrinsic::hexagon_A2_vavgwr, 4913}, // __builtin_HEXAGON_A2_vavgwr - {Intrinsic::hexagon_A2_vcmpbeq, 4941}, // __builtin_HEXAGON_A2_vcmpbeq - {Intrinsic::hexagon_A2_vcmpbgtu, 4970}, // __builtin_HEXAGON_A2_vcmpbgtu - {Intrinsic::hexagon_A2_vcmpheq, 5000}, // __builtin_HEXAGON_A2_vcmpheq - {Intrinsic::hexagon_A2_vcmphgt, 5029}, // __builtin_HEXAGON_A2_vcmphgt - {Intrinsic::hexagon_A2_vcmphgtu, 5058}, // __builtin_HEXAGON_A2_vcmphgtu - {Intrinsic::hexagon_A2_vcmpweq, 5088}, // __builtin_HEXAGON_A2_vcmpweq - {Intrinsic::hexagon_A2_vcmpwgt, 5117}, // __builtin_HEXAGON_A2_vcmpwgt - {Intrinsic::hexagon_A2_vcmpwgtu, 5146}, // __builtin_HEXAGON_A2_vcmpwgtu - {Intrinsic::hexagon_A2_vconj, 5176}, // __builtin_HEXAGON_A2_vconj - {Intrinsic::hexagon_A2_vmaxb, 5203}, // __builtin_HEXAGON_A2_vmaxb - {Intrinsic::hexagon_A2_vmaxh, 5230}, // __builtin_HEXAGON_A2_vmaxh - {Intrinsic::hexagon_A2_vmaxub, 5257}, // __builtin_HEXAGON_A2_vmaxub - {Intrinsic::hexagon_A2_vmaxuh, 5285}, // __builtin_HEXAGON_A2_vmaxuh - {Intrinsic::hexagon_A2_vmaxuw, 5313}, // __builtin_HEXAGON_A2_vmaxuw - {Intrinsic::hexagon_A2_vmaxw, 5341}, // __builtin_HEXAGON_A2_vmaxw - {Intrinsic::hexagon_A2_vminb, 5368}, // __builtin_HEXAGON_A2_vminb - {Intrinsic::hexagon_A2_vminh, 5395}, // __builtin_HEXAGON_A2_vminh - {Intrinsic::hexagon_A2_vminub, 5422}, // __builtin_HEXAGON_A2_vminub - {Intrinsic::hexagon_A2_vminuh, 5450}, // __builtin_HEXAGON_A2_vminuh - {Intrinsic::hexagon_A2_vminuw, 5478}, // __builtin_HEXAGON_A2_vminuw - {Intrinsic::hexagon_A2_vminw, 5506}, // __builtin_HEXAGON_A2_vminw - {Intrinsic::hexagon_A2_vnavgh, 5533}, // __builtin_HEXAGON_A2_vnavgh - {Intrinsic::hexagon_A2_vnavghcr, 5561}, // __builtin_HEXAGON_A2_vnavghcr - {Intrinsic::hexagon_A2_vnavghr, 5591}, // __builtin_HEXAGON_A2_vnavghr - {Intrinsic::hexagon_A2_vnavgw, 5620}, // __builtin_HEXAGON_A2_vnavgw - {Intrinsic::hexagon_A2_vnavgwcr, 5648}, // __builtin_HEXAGON_A2_vnavgwcr - {Intrinsic::hexagon_A2_vnavgwr, 5678}, // __builtin_HEXAGON_A2_vnavgwr - {Intrinsic::hexagon_A2_vraddub, 5707}, // __builtin_HEXAGON_A2_vraddub - {Intrinsic::hexagon_A2_vraddub_acc, 5736}, // __builtin_HEXAGON_A2_vraddub_acc - {Intrinsic::hexagon_A2_vrsadub, 5769}, // __builtin_HEXAGON_A2_vrsadub - {Intrinsic::hexagon_A2_vrsadub_acc, 5798}, // __builtin_HEXAGON_A2_vrsadub_acc - {Intrinsic::hexagon_A2_vsubb_map, 5831}, // __builtin_HEXAGON_A2_vsubb_map - {Intrinsic::hexagon_A2_vsubh, 5862}, // __builtin_HEXAGON_A2_vsubh - {Intrinsic::hexagon_A2_vsubhs, 5889}, // __builtin_HEXAGON_A2_vsubhs - {Intrinsic::hexagon_A2_vsubub, 5917}, // __builtin_HEXAGON_A2_vsubub - {Intrinsic::hexagon_A2_vsububs, 5945}, // __builtin_HEXAGON_A2_vsububs - {Intrinsic::hexagon_A2_vsubuhs, 5974}, // __builtin_HEXAGON_A2_vsubuhs - {Intrinsic::hexagon_A2_vsubw, 6003}, // __builtin_HEXAGON_A2_vsubw - {Intrinsic::hexagon_A2_vsubws, 6030}, // __builtin_HEXAGON_A2_vsubws - {Intrinsic::hexagon_A2_xor, 6058}, // __builtin_HEXAGON_A2_xor - {Intrinsic::hexagon_A2_xorp, 6083}, // __builtin_HEXAGON_A2_xorp - {Intrinsic::hexagon_A2_zxtb, 6109}, // __builtin_HEXAGON_A2_zxtb - {Intrinsic::hexagon_A2_zxth, 6135}, // __builtin_HEXAGON_A2_zxth - {Intrinsic::hexagon_A4_andn, 6161}, // __builtin_HEXAGON_A4_andn - {Intrinsic::hexagon_A4_andnp, 6187}, // __builtin_HEXAGON_A4_andnp - {Intrinsic::hexagon_A4_bitsplit, 6214}, // __builtin_HEXAGON_A4_bitsplit - {Intrinsic::hexagon_A4_bitspliti, 6244}, // __builtin_HEXAGON_A4_bitspliti - {Intrinsic::hexagon_A4_boundscheck, 6275}, // __builtin_HEXAGON_A4_boundscheck - {Intrinsic::hexagon_A4_cmpbeq, 6308}, // __builtin_HEXAGON_A4_cmpbeq - {Intrinsic::hexagon_A4_cmpbeqi, 6336}, // __builtin_HEXAGON_A4_cmpbeqi - {Intrinsic::hexagon_A4_cmpbgt, 6365}, // __builtin_HEXAGON_A4_cmpbgt - {Intrinsic::hexagon_A4_cmpbgti, 6393}, // __builtin_HEXAGON_A4_cmpbgti - {Intrinsic::hexagon_A4_cmpbgtu, 6422}, // __builtin_HEXAGON_A4_cmpbgtu - {Intrinsic::hexagon_A4_cmpbgtui, 6451}, // __builtin_HEXAGON_A4_cmpbgtui - {Intrinsic::hexagon_A4_cmpheq, 6481}, // __builtin_HEXAGON_A4_cmpheq - {Intrinsic::hexagon_A4_cmpheqi, 6509}, // __builtin_HEXAGON_A4_cmpheqi - {Intrinsic::hexagon_A4_cmphgt, 6538}, // __builtin_HEXAGON_A4_cmphgt - {Intrinsic::hexagon_A4_cmphgti, 6566}, // __builtin_HEXAGON_A4_cmphgti - {Intrinsic::hexagon_A4_cmphgtu, 6595}, // __builtin_HEXAGON_A4_cmphgtu - {Intrinsic::hexagon_A4_cmphgtui, 6624}, // __builtin_HEXAGON_A4_cmphgtui - {Intrinsic::hexagon_A4_combineir, 6654}, // __builtin_HEXAGON_A4_combineir - {Intrinsic::hexagon_A4_combineri, 6685}, // __builtin_HEXAGON_A4_combineri - {Intrinsic::hexagon_A4_cround_ri, 6716}, // __builtin_HEXAGON_A4_cround_ri - {Intrinsic::hexagon_A4_cround_rr, 6747}, // __builtin_HEXAGON_A4_cround_rr - {Intrinsic::hexagon_A4_modwrapu, 6778}, // __builtin_HEXAGON_A4_modwrapu - {Intrinsic::hexagon_A4_orn, 6808}, // __builtin_HEXAGON_A4_orn - {Intrinsic::hexagon_A4_ornp, 6833}, // __builtin_HEXAGON_A4_ornp - {Intrinsic::hexagon_A4_rcmpeq, 6859}, // __builtin_HEXAGON_A4_rcmpeq - {Intrinsic::hexagon_A4_rcmpeqi, 6887}, // __builtin_HEXAGON_A4_rcmpeqi - {Intrinsic::hexagon_A4_rcmpneq, 6916}, // __builtin_HEXAGON_A4_rcmpneq - {Intrinsic::hexagon_A4_rcmpneqi, 6945}, // __builtin_HEXAGON_A4_rcmpneqi - {Intrinsic::hexagon_A4_round_ri, 6975}, // __builtin_HEXAGON_A4_round_ri - {Intrinsic::hexagon_A4_round_ri_sat, 7005}, // __builtin_HEXAGON_A4_round_ri_sat - {Intrinsic::hexagon_A4_round_rr, 7039}, // __builtin_HEXAGON_A4_round_rr - {Intrinsic::hexagon_A4_round_rr_sat, 7069}, // __builtin_HEXAGON_A4_round_rr_sat - {Intrinsic::hexagon_A4_tlbmatch, 7103}, // __builtin_HEXAGON_A4_tlbmatch - {Intrinsic::hexagon_A4_vcmpbeq_any, 7133}, // __builtin_HEXAGON_A4_vcmpbeq_any - {Intrinsic::hexagon_A4_vcmpbeqi, 7166}, // __builtin_HEXAGON_A4_vcmpbeqi - {Intrinsic::hexagon_A4_vcmpbgt, 7196}, // __builtin_HEXAGON_A4_vcmpbgt - {Intrinsic::hexagon_A4_vcmpbgti, 7225}, // __builtin_HEXAGON_A4_vcmpbgti - {Intrinsic::hexagon_A4_vcmpbgtui, 7255}, // __builtin_HEXAGON_A4_vcmpbgtui - {Intrinsic::hexagon_A4_vcmpheqi, 7286}, // __builtin_HEXAGON_A4_vcmpheqi - {Intrinsic::hexagon_A4_vcmphgti, 7316}, // __builtin_HEXAGON_A4_vcmphgti - {Intrinsic::hexagon_A4_vcmphgtui, 7346}, // __builtin_HEXAGON_A4_vcmphgtui - {Intrinsic::hexagon_A4_vcmpweqi, 7377}, // __builtin_HEXAGON_A4_vcmpweqi - {Intrinsic::hexagon_A4_vcmpwgti, 7407}, // __builtin_HEXAGON_A4_vcmpwgti - {Intrinsic::hexagon_A4_vcmpwgtui, 7437}, // __builtin_HEXAGON_A4_vcmpwgtui - {Intrinsic::hexagon_A4_vrmaxh, 7468}, // __builtin_HEXAGON_A4_vrmaxh - {Intrinsic::hexagon_A4_vrmaxuh, 7496}, // __builtin_HEXAGON_A4_vrmaxuh - {Intrinsic::hexagon_A4_vrmaxuw, 7525}, // __builtin_HEXAGON_A4_vrmaxuw - {Intrinsic::hexagon_A4_vrmaxw, 7554}, // __builtin_HEXAGON_A4_vrmaxw - {Intrinsic::hexagon_A4_vrminh, 7582}, // __builtin_HEXAGON_A4_vrminh - {Intrinsic::hexagon_A4_vrminuh, 7610}, // __builtin_HEXAGON_A4_vrminuh - {Intrinsic::hexagon_A4_vrminuw, 7639}, // __builtin_HEXAGON_A4_vrminuw - {Intrinsic::hexagon_A4_vrminw, 7668}, // __builtin_HEXAGON_A4_vrminw - {Intrinsic::hexagon_A5_vaddhubs, 7696}, // __builtin_HEXAGON_A5_vaddhubs - {Intrinsic::hexagon_C2_all8, 7726}, // __builtin_HEXAGON_C2_all8 - {Intrinsic::hexagon_C2_and, 7752}, // __builtin_HEXAGON_C2_and - {Intrinsic::hexagon_C2_andn, 7777}, // __builtin_HEXAGON_C2_andn - {Intrinsic::hexagon_C2_any8, 7803}, // __builtin_HEXAGON_C2_any8 - {Intrinsic::hexagon_C2_bitsclr, 7829}, // __builtin_HEXAGON_C2_bitsclr - {Intrinsic::hexagon_C2_bitsclri, 7858}, // __builtin_HEXAGON_C2_bitsclri - {Intrinsic::hexagon_C2_bitsset, 7888}, // __builtin_HEXAGON_C2_bitsset - {Intrinsic::hexagon_C2_cmpeq, 7917}, // __builtin_HEXAGON_C2_cmpeq - {Intrinsic::hexagon_C2_cmpeqi, 7944}, // __builtin_HEXAGON_C2_cmpeqi - {Intrinsic::hexagon_C2_cmpeqp, 7972}, // __builtin_HEXAGON_C2_cmpeqp - {Intrinsic::hexagon_C2_cmpgei, 8000}, // __builtin_HEXAGON_C2_cmpgei - {Intrinsic::hexagon_C2_cmpgeui, 8028}, // __builtin_HEXAGON_C2_cmpgeui - {Intrinsic::hexagon_C2_cmpgt, 8057}, // __builtin_HEXAGON_C2_cmpgt - {Intrinsic::hexagon_C2_cmpgti, 8084}, // __builtin_HEXAGON_C2_cmpgti - {Intrinsic::hexagon_C2_cmpgtp, 8112}, // __builtin_HEXAGON_C2_cmpgtp - {Intrinsic::hexagon_C2_cmpgtu, 8140}, // __builtin_HEXAGON_C2_cmpgtu - {Intrinsic::hexagon_C2_cmpgtui, 8168}, // __builtin_HEXAGON_C2_cmpgtui - {Intrinsic::hexagon_C2_cmpgtup, 8197}, // __builtin_HEXAGON_C2_cmpgtup - {Intrinsic::hexagon_C2_cmplt, 8226}, // __builtin_HEXAGON_C2_cmplt - {Intrinsic::hexagon_C2_cmpltu, 8253}, // __builtin_HEXAGON_C2_cmpltu - {Intrinsic::hexagon_C2_mask, 8281}, // __builtin_HEXAGON_C2_mask - {Intrinsic::hexagon_C2_mux, 8307}, // __builtin_HEXAGON_C2_mux - {Intrinsic::hexagon_C2_muxii, 8332}, // __builtin_HEXAGON_C2_muxii - {Intrinsic::hexagon_C2_muxir, 8359}, // __builtin_HEXAGON_C2_muxir - {Intrinsic::hexagon_C2_muxri, 8386}, // __builtin_HEXAGON_C2_muxri - {Intrinsic::hexagon_C2_not, 8413}, // __builtin_HEXAGON_C2_not - {Intrinsic::hexagon_C2_or, 8438}, // __builtin_HEXAGON_C2_or - {Intrinsic::hexagon_C2_orn, 8462}, // __builtin_HEXAGON_C2_orn - {Intrinsic::hexagon_C2_pxfer_map, 8487}, // __builtin_HEXAGON_C2_pxfer_map - {Intrinsic::hexagon_C2_tfrpr, 8518}, // __builtin_HEXAGON_C2_tfrpr - {Intrinsic::hexagon_C2_tfrrp, 8545}, // __builtin_HEXAGON_C2_tfrrp - {Intrinsic::hexagon_C2_vitpack, 8572}, // __builtin_HEXAGON_C2_vitpack - {Intrinsic::hexagon_C2_vmux, 8601}, // __builtin_HEXAGON_C2_vmux - {Intrinsic::hexagon_C2_xor, 8627}, // __builtin_HEXAGON_C2_xor - {Intrinsic::hexagon_C4_and_and, 8652}, // __builtin_HEXAGON_C4_and_and - {Intrinsic::hexagon_C4_and_andn, 8681}, // __builtin_HEXAGON_C4_and_andn - {Intrinsic::hexagon_C4_and_or, 8711}, // __builtin_HEXAGON_C4_and_or - {Intrinsic::hexagon_C4_and_orn, 8739}, // __builtin_HEXAGON_C4_and_orn - {Intrinsic::hexagon_C4_cmplte, 8768}, // __builtin_HEXAGON_C4_cmplte - {Intrinsic::hexagon_C4_cmpltei, 8796}, // __builtin_HEXAGON_C4_cmpltei - {Intrinsic::hexagon_C4_cmplteu, 8825}, // __builtin_HEXAGON_C4_cmplteu - {Intrinsic::hexagon_C4_cmplteui, 8854}, // __builtin_HEXAGON_C4_cmplteui - {Intrinsic::hexagon_C4_cmpneq, 8884}, // __builtin_HEXAGON_C4_cmpneq - {Intrinsic::hexagon_C4_cmpneqi, 8912}, // __builtin_HEXAGON_C4_cmpneqi - {Intrinsic::hexagon_C4_fastcorner9, 8941}, // __builtin_HEXAGON_C4_fastcorner9 - {Intrinsic::hexagon_C4_fastcorner9_not, 8974}, // __builtin_HEXAGON_C4_fastcorner9_not - {Intrinsic::hexagon_C4_nbitsclr, 9011}, // __builtin_HEXAGON_C4_nbitsclr - {Intrinsic::hexagon_C4_nbitsclri, 9041}, // __builtin_HEXAGON_C4_nbitsclri - {Intrinsic::hexagon_C4_nbitsset, 9072}, // __builtin_HEXAGON_C4_nbitsset - {Intrinsic::hexagon_C4_or_and, 9102}, // __builtin_HEXAGON_C4_or_and - {Intrinsic::hexagon_C4_or_andn, 9130}, // __builtin_HEXAGON_C4_or_andn - {Intrinsic::hexagon_C4_or_or, 9159}, // __builtin_HEXAGON_C4_or_or - {Intrinsic::hexagon_C4_or_orn, 9186}, // __builtin_HEXAGON_C4_or_orn - {Intrinsic::hexagon_F2_conv_d2df, 9214}, // __builtin_HEXAGON_F2_conv_d2df - {Intrinsic::hexagon_F2_conv_d2sf, 9245}, // __builtin_HEXAGON_F2_conv_d2sf - {Intrinsic::hexagon_F2_conv_df2d, 9276}, // __builtin_HEXAGON_F2_conv_df2d - {Intrinsic::hexagon_F2_conv_df2d_chop, 9307}, // __builtin_HEXAGON_F2_conv_df2d_chop - {Intrinsic::hexagon_F2_conv_df2sf, 9343}, // __builtin_HEXAGON_F2_conv_df2sf - {Intrinsic::hexagon_F2_conv_df2ud, 9375}, // __builtin_HEXAGON_F2_conv_df2ud - {Intrinsic::hexagon_F2_conv_df2ud_chop, 9407}, // __builtin_HEXAGON_F2_conv_df2ud_chop - {Intrinsic::hexagon_F2_conv_df2uw, 9444}, // __builtin_HEXAGON_F2_conv_df2uw - {Intrinsic::hexagon_F2_conv_df2uw_chop, 9476}, // __builtin_HEXAGON_F2_conv_df2uw_chop - {Intrinsic::hexagon_F2_conv_df2w, 9513}, // __builtin_HEXAGON_F2_conv_df2w - {Intrinsic::hexagon_F2_conv_df2w_chop, 9544}, // __builtin_HEXAGON_F2_conv_df2w_chop - {Intrinsic::hexagon_F2_conv_sf2d, 9580}, // __builtin_HEXAGON_F2_conv_sf2d - {Intrinsic::hexagon_F2_conv_sf2d_chop, 9611}, // __builtin_HEXAGON_F2_conv_sf2d_chop - {Intrinsic::hexagon_F2_conv_sf2df, 9647}, // __builtin_HEXAGON_F2_conv_sf2df - {Intrinsic::hexagon_F2_conv_sf2ud, 9679}, // __builtin_HEXAGON_F2_conv_sf2ud - {Intrinsic::hexagon_F2_conv_sf2ud_chop, 9711}, // __builtin_HEXAGON_F2_conv_sf2ud_chop - {Intrinsic::hexagon_F2_conv_sf2uw, 9748}, // __builtin_HEXAGON_F2_conv_sf2uw - {Intrinsic::hexagon_F2_conv_sf2uw_chop, 9780}, // __builtin_HEXAGON_F2_conv_sf2uw_chop - {Intrinsic::hexagon_F2_conv_sf2w, 9817}, // __builtin_HEXAGON_F2_conv_sf2w - {Intrinsic::hexagon_F2_conv_sf2w_chop, 9848}, // __builtin_HEXAGON_F2_conv_sf2w_chop - {Intrinsic::hexagon_F2_conv_ud2df, 9884}, // __builtin_HEXAGON_F2_conv_ud2df - {Intrinsic::hexagon_F2_conv_ud2sf, 9916}, // __builtin_HEXAGON_F2_conv_ud2sf - {Intrinsic::hexagon_F2_conv_uw2df, 9948}, // __builtin_HEXAGON_F2_conv_uw2df - {Intrinsic::hexagon_F2_conv_uw2sf, 9980}, // __builtin_HEXAGON_F2_conv_uw2sf - {Intrinsic::hexagon_F2_conv_w2df, 10012}, // __builtin_HEXAGON_F2_conv_w2df - {Intrinsic::hexagon_F2_conv_w2sf, 10043}, // __builtin_HEXAGON_F2_conv_w2sf - {Intrinsic::hexagon_F2_dfclass, 10074}, // __builtin_HEXAGON_F2_dfclass - {Intrinsic::hexagon_F2_dfcmpeq, 10103}, // __builtin_HEXAGON_F2_dfcmpeq - {Intrinsic::hexagon_F2_dfcmpge, 10132}, // __builtin_HEXAGON_F2_dfcmpge - {Intrinsic::hexagon_F2_dfcmpgt, 10161}, // __builtin_HEXAGON_F2_dfcmpgt - {Intrinsic::hexagon_F2_dfcmpuo, 10190}, // __builtin_HEXAGON_F2_dfcmpuo - {Intrinsic::hexagon_F2_dfimm_n, 10219}, // __builtin_HEXAGON_F2_dfimm_n - {Intrinsic::hexagon_F2_dfimm_p, 10248}, // __builtin_HEXAGON_F2_dfimm_p - {Intrinsic::hexagon_F2_sfadd, 10277}, // __builtin_HEXAGON_F2_sfadd - {Intrinsic::hexagon_F2_sfclass, 10304}, // __builtin_HEXAGON_F2_sfclass - {Intrinsic::hexagon_F2_sfcmpeq, 10333}, // __builtin_HEXAGON_F2_sfcmpeq - {Intrinsic::hexagon_F2_sfcmpge, 10362}, // __builtin_HEXAGON_F2_sfcmpge - {Intrinsic::hexagon_F2_sfcmpgt, 10391}, // __builtin_HEXAGON_F2_sfcmpgt - {Intrinsic::hexagon_F2_sfcmpuo, 10420}, // __builtin_HEXAGON_F2_sfcmpuo - {Intrinsic::hexagon_F2_sffixupd, 10449}, // __builtin_HEXAGON_F2_sffixupd - {Intrinsic::hexagon_F2_sffixupn, 10479}, // __builtin_HEXAGON_F2_sffixupn - {Intrinsic::hexagon_F2_sffixupr, 10509}, // __builtin_HEXAGON_F2_sffixupr - {Intrinsic::hexagon_F2_sffma, 10539}, // __builtin_HEXAGON_F2_sffma - {Intrinsic::hexagon_F2_sffma_lib, 10566}, // __builtin_HEXAGON_F2_sffma_lib - {Intrinsic::hexagon_F2_sffma_sc, 10597}, // __builtin_HEXAGON_F2_sffma_sc - {Intrinsic::hexagon_F2_sffms, 10627}, // __builtin_HEXAGON_F2_sffms - {Intrinsic::hexagon_F2_sffms_lib, 10654}, // __builtin_HEXAGON_F2_sffms_lib - {Intrinsic::hexagon_F2_sfimm_n, 10685}, // __builtin_HEXAGON_F2_sfimm_n - {Intrinsic::hexagon_F2_sfimm_p, 10714}, // __builtin_HEXAGON_F2_sfimm_p - {Intrinsic::hexagon_F2_sfmax, 10743}, // __builtin_HEXAGON_F2_sfmax - {Intrinsic::hexagon_F2_sfmin, 10770}, // __builtin_HEXAGON_F2_sfmin - {Intrinsic::hexagon_F2_sfmpy, 10797}, // __builtin_HEXAGON_F2_sfmpy - {Intrinsic::hexagon_F2_sfsub, 10824}, // __builtin_HEXAGON_F2_sfsub - {Intrinsic::hexagon_L2_loadw_locked, 10851}, // __builtin_HEXAGON_L2_loadw_locked - {Intrinsic::hexagon_L4_loadd_locked, 10885}, // __builtin_HEXAGON_L4_loadd_locked - {Intrinsic::hexagon_M2_acci, 10919}, // __builtin_HEXAGON_M2_acci - {Intrinsic::hexagon_M2_accii, 10945}, // __builtin_HEXAGON_M2_accii - {Intrinsic::hexagon_M2_cmaci_s0, 10972}, // __builtin_HEXAGON_M2_cmaci_s0 - {Intrinsic::hexagon_M2_cmacr_s0, 11002}, // __builtin_HEXAGON_M2_cmacr_s0 - {Intrinsic::hexagon_M2_cmacs_s0, 11032}, // __builtin_HEXAGON_M2_cmacs_s0 - {Intrinsic::hexagon_M2_cmacs_s1, 11062}, // __builtin_HEXAGON_M2_cmacs_s1 - {Intrinsic::hexagon_M2_cmacsc_s0, 11092}, // __builtin_HEXAGON_M2_cmacsc_s0 - {Intrinsic::hexagon_M2_cmacsc_s1, 11123}, // __builtin_HEXAGON_M2_cmacsc_s1 - {Intrinsic::hexagon_M2_cmpyi_s0, 11154}, // __builtin_HEXAGON_M2_cmpyi_s0 - {Intrinsic::hexagon_M2_cmpyr_s0, 11184}, // __builtin_HEXAGON_M2_cmpyr_s0 - {Intrinsic::hexagon_M2_cmpyrs_s0, 11214}, // __builtin_HEXAGON_M2_cmpyrs_s0 - {Intrinsic::hexagon_M2_cmpyrs_s1, 11245}, // __builtin_HEXAGON_M2_cmpyrs_s1 - {Intrinsic::hexagon_M2_cmpyrsc_s0, 11276}, // __builtin_HEXAGON_M2_cmpyrsc_s0 - {Intrinsic::hexagon_M2_cmpyrsc_s1, 11308}, // __builtin_HEXAGON_M2_cmpyrsc_s1 - {Intrinsic::hexagon_M2_cmpys_s0, 11340}, // __builtin_HEXAGON_M2_cmpys_s0 - {Intrinsic::hexagon_M2_cmpys_s1, 11370}, // __builtin_HEXAGON_M2_cmpys_s1 - {Intrinsic::hexagon_M2_cmpysc_s0, 11400}, // __builtin_HEXAGON_M2_cmpysc_s0 - {Intrinsic::hexagon_M2_cmpysc_s1, 11431}, // __builtin_HEXAGON_M2_cmpysc_s1 - {Intrinsic::hexagon_M2_cnacs_s0, 11462}, // __builtin_HEXAGON_M2_cnacs_s0 - {Intrinsic::hexagon_M2_cnacs_s1, 11492}, // __builtin_HEXAGON_M2_cnacs_s1 - {Intrinsic::hexagon_M2_cnacsc_s0, 11522}, // __builtin_HEXAGON_M2_cnacsc_s0 - {Intrinsic::hexagon_M2_cnacsc_s1, 11553}, // __builtin_HEXAGON_M2_cnacsc_s1 - {Intrinsic::hexagon_M2_dpmpyss_acc_s0, 11584}, // __builtin_HEXAGON_M2_dpmpyss_acc_s0 - {Intrinsic::hexagon_M2_dpmpyss_nac_s0, 11620}, // __builtin_HEXAGON_M2_dpmpyss_nac_s0 - {Intrinsic::hexagon_M2_dpmpyss_rnd_s0, 11656}, // __builtin_HEXAGON_M2_dpmpyss_rnd_s0 - {Intrinsic::hexagon_M2_dpmpyss_s0, 11692}, // __builtin_HEXAGON_M2_dpmpyss_s0 - {Intrinsic::hexagon_M2_dpmpyuu_acc_s0, 11724}, // __builtin_HEXAGON_M2_dpmpyuu_acc_s0 - {Intrinsic::hexagon_M2_dpmpyuu_nac_s0, 11760}, // __builtin_HEXAGON_M2_dpmpyuu_nac_s0 - {Intrinsic::hexagon_M2_dpmpyuu_s0, 11796}, // __builtin_HEXAGON_M2_dpmpyuu_s0 - {Intrinsic::hexagon_M2_hmmpyh_rs1, 11828}, // __builtin_HEXAGON_M2_hmmpyh_rs1 - {Intrinsic::hexagon_M2_hmmpyh_s1, 11860}, // __builtin_HEXAGON_M2_hmmpyh_s1 - {Intrinsic::hexagon_M2_hmmpyl_rs1, 11891}, // __builtin_HEXAGON_M2_hmmpyl_rs1 - {Intrinsic::hexagon_M2_hmmpyl_s1, 11923}, // __builtin_HEXAGON_M2_hmmpyl_s1 - {Intrinsic::hexagon_M2_maci, 11954}, // __builtin_HEXAGON_M2_maci - {Intrinsic::hexagon_M2_macsin, 11980}, // __builtin_HEXAGON_M2_macsin - {Intrinsic::hexagon_M2_macsip, 12008}, // __builtin_HEXAGON_M2_macsip - {Intrinsic::hexagon_M2_mmachs_rs0, 12036}, // __builtin_HEXAGON_M2_mmachs_rs0 - {Intrinsic::hexagon_M2_mmachs_rs1, 12068}, // __builtin_HEXAGON_M2_mmachs_rs1 - {Intrinsic::hexagon_M2_mmachs_s0, 12100}, // __builtin_HEXAGON_M2_mmachs_s0 - {Intrinsic::hexagon_M2_mmachs_s1, 12131}, // __builtin_HEXAGON_M2_mmachs_s1 - {Intrinsic::hexagon_M2_mmacls_rs0, 12162}, // __builtin_HEXAGON_M2_mmacls_rs0 - {Intrinsic::hexagon_M2_mmacls_rs1, 12194}, // __builtin_HEXAGON_M2_mmacls_rs1 - {Intrinsic::hexagon_M2_mmacls_s0, 12226}, // __builtin_HEXAGON_M2_mmacls_s0 - {Intrinsic::hexagon_M2_mmacls_s1, 12257}, // __builtin_HEXAGON_M2_mmacls_s1 - {Intrinsic::hexagon_M2_mmacuhs_rs0, 12288}, // __builtin_HEXAGON_M2_mmacuhs_rs0 - {Intrinsic::hexagon_M2_mmacuhs_rs1, 12321}, // __builtin_HEXAGON_M2_mmacuhs_rs1 - {Intrinsic::hexagon_M2_mmacuhs_s0, 12354}, // __builtin_HEXAGON_M2_mmacuhs_s0 - {Intrinsic::hexagon_M2_mmacuhs_s1, 12386}, // __builtin_HEXAGON_M2_mmacuhs_s1 - {Intrinsic::hexagon_M2_mmaculs_rs0, 12418}, // __builtin_HEXAGON_M2_mmaculs_rs0 - {Intrinsic::hexagon_M2_mmaculs_rs1, 12451}, // __builtin_HEXAGON_M2_mmaculs_rs1 - {Intrinsic::hexagon_M2_mmaculs_s0, 12484}, // __builtin_HEXAGON_M2_mmaculs_s0 - {Intrinsic::hexagon_M2_mmaculs_s1, 12516}, // __builtin_HEXAGON_M2_mmaculs_s1 - {Intrinsic::hexagon_M2_mmpyh_rs0, 12548}, // __builtin_HEXAGON_M2_mmpyh_rs0 - {Intrinsic::hexagon_M2_mmpyh_rs1, 12579}, // __builtin_HEXAGON_M2_mmpyh_rs1 - {Intrinsic::hexagon_M2_mmpyh_s0, 12610}, // __builtin_HEXAGON_M2_mmpyh_s0 - {Intrinsic::hexagon_M2_mmpyh_s1, 12640}, // __builtin_HEXAGON_M2_mmpyh_s1 - {Intrinsic::hexagon_M2_mmpyl_rs0, 12670}, // __builtin_HEXAGON_M2_mmpyl_rs0 - {Intrinsic::hexagon_M2_mmpyl_rs1, 12701}, // __builtin_HEXAGON_M2_mmpyl_rs1 - {Intrinsic::hexagon_M2_mmpyl_s0, 12732}, // __builtin_HEXAGON_M2_mmpyl_s0 - {Intrinsic::hexagon_M2_mmpyl_s1, 12762}, // __builtin_HEXAGON_M2_mmpyl_s1 - {Intrinsic::hexagon_M2_mmpyuh_rs0, 12792}, // __builtin_HEXAGON_M2_mmpyuh_rs0 - {Intrinsic::hexagon_M2_mmpyuh_rs1, 12824}, // __builtin_HEXAGON_M2_mmpyuh_rs1 - {Intrinsic::hexagon_M2_mmpyuh_s0, 12856}, // __builtin_HEXAGON_M2_mmpyuh_s0 - {Intrinsic::hexagon_M2_mmpyuh_s1, 12887}, // __builtin_HEXAGON_M2_mmpyuh_s1 - {Intrinsic::hexagon_M2_mmpyul_rs0, 12918}, // __builtin_HEXAGON_M2_mmpyul_rs0 - {Intrinsic::hexagon_M2_mmpyul_rs1, 12950}, // __builtin_HEXAGON_M2_mmpyul_rs1 - {Intrinsic::hexagon_M2_mmpyul_s0, 12982}, // __builtin_HEXAGON_M2_mmpyul_s0 - {Intrinsic::hexagon_M2_mmpyul_s1, 13013}, // __builtin_HEXAGON_M2_mmpyul_s1 - {Intrinsic::hexagon_M2_mpy_acc_hh_s0, 13044}, // __builtin_HEXAGON_M2_mpy_acc_hh_s0 - {Intrinsic::hexagon_M2_mpy_acc_hh_s1, 13079}, // __builtin_HEXAGON_M2_mpy_acc_hh_s1 - {Intrinsic::hexagon_M2_mpy_acc_hl_s0, 13114}, // __builtin_HEXAGON_M2_mpy_acc_hl_s0 - {Intrinsic::hexagon_M2_mpy_acc_hl_s1, 13149}, // __builtin_HEXAGON_M2_mpy_acc_hl_s1 - {Intrinsic::hexagon_M2_mpy_acc_lh_s0, 13184}, // __builtin_HEXAGON_M2_mpy_acc_lh_s0 - {Intrinsic::hexagon_M2_mpy_acc_lh_s1, 13219}, // __builtin_HEXAGON_M2_mpy_acc_lh_s1 - {Intrinsic::hexagon_M2_mpy_acc_ll_s0, 13254}, // __builtin_HEXAGON_M2_mpy_acc_ll_s0 - {Intrinsic::hexagon_M2_mpy_acc_ll_s1, 13289}, // __builtin_HEXAGON_M2_mpy_acc_ll_s1 - {Intrinsic::hexagon_M2_mpy_acc_sat_hh_s0, 13324}, // __builtin_HEXAGON_M2_mpy_acc_sat_hh_s0 - {Intrinsic::hexagon_M2_mpy_acc_sat_hh_s1, 13363}, // __builtin_HEXAGON_M2_mpy_acc_sat_hh_s1 - {Intrinsic::hexagon_M2_mpy_acc_sat_hl_s0, 13402}, // __builtin_HEXAGON_M2_mpy_acc_sat_hl_s0 - {Intrinsic::hexagon_M2_mpy_acc_sat_hl_s1, 13441}, // __builtin_HEXAGON_M2_mpy_acc_sat_hl_s1 - {Intrinsic::hexagon_M2_mpy_acc_sat_lh_s0, 13480}, // __builtin_HEXAGON_M2_mpy_acc_sat_lh_s0 - {Intrinsic::hexagon_M2_mpy_acc_sat_lh_s1, 13519}, // __builtin_HEXAGON_M2_mpy_acc_sat_lh_s1 - {Intrinsic::hexagon_M2_mpy_acc_sat_ll_s0, 13558}, // __builtin_HEXAGON_M2_mpy_acc_sat_ll_s0 - {Intrinsic::hexagon_M2_mpy_acc_sat_ll_s1, 13597}, // __builtin_HEXAGON_M2_mpy_acc_sat_ll_s1 - {Intrinsic::hexagon_M2_mpy_hh_s0, 13636}, // __builtin_HEXAGON_M2_mpy_hh_s0 - {Intrinsic::hexagon_M2_mpy_hh_s1, 13667}, // __builtin_HEXAGON_M2_mpy_hh_s1 - {Intrinsic::hexagon_M2_mpy_hl_s0, 13698}, // __builtin_HEXAGON_M2_mpy_hl_s0 - {Intrinsic::hexagon_M2_mpy_hl_s1, 13729}, // __builtin_HEXAGON_M2_mpy_hl_s1 - {Intrinsic::hexagon_M2_mpy_lh_s0, 13760}, // __builtin_HEXAGON_M2_mpy_lh_s0 - {Intrinsic::hexagon_M2_mpy_lh_s1, 13791}, // __builtin_HEXAGON_M2_mpy_lh_s1 - {Intrinsic::hexagon_M2_mpy_ll_s0, 13822}, // __builtin_HEXAGON_M2_mpy_ll_s0 - {Intrinsic::hexagon_M2_mpy_ll_s1, 13853}, // __builtin_HEXAGON_M2_mpy_ll_s1 - {Intrinsic::hexagon_M2_mpy_nac_hh_s0, 13884}, // __builtin_HEXAGON_M2_mpy_nac_hh_s0 - {Intrinsic::hexagon_M2_mpy_nac_hh_s1, 13919}, // __builtin_HEXAGON_M2_mpy_nac_hh_s1 - {Intrinsic::hexagon_M2_mpy_nac_hl_s0, 13954}, // __builtin_HEXAGON_M2_mpy_nac_hl_s0 - {Intrinsic::hexagon_M2_mpy_nac_hl_s1, 13989}, // __builtin_HEXAGON_M2_mpy_nac_hl_s1 - {Intrinsic::hexagon_M2_mpy_nac_lh_s0, 14024}, // __builtin_HEXAGON_M2_mpy_nac_lh_s0 - {Intrinsic::hexagon_M2_mpy_nac_lh_s1, 14059}, // __builtin_HEXAGON_M2_mpy_nac_lh_s1 - {Intrinsic::hexagon_M2_mpy_nac_ll_s0, 14094}, // __builtin_HEXAGON_M2_mpy_nac_ll_s0 - {Intrinsic::hexagon_M2_mpy_nac_ll_s1, 14129}, // __builtin_HEXAGON_M2_mpy_nac_ll_s1 - {Intrinsic::hexagon_M2_mpy_nac_sat_hh_s0, 14164}, // __builtin_HEXAGON_M2_mpy_nac_sat_hh_s0 - {Intrinsic::hexagon_M2_mpy_nac_sat_hh_s1, 14203}, // __builtin_HEXAGON_M2_mpy_nac_sat_hh_s1 - {Intrinsic::hexagon_M2_mpy_nac_sat_hl_s0, 14242}, // __builtin_HEXAGON_M2_mpy_nac_sat_hl_s0 - {Intrinsic::hexagon_M2_mpy_nac_sat_hl_s1, 14281}, // __builtin_HEXAGON_M2_mpy_nac_sat_hl_s1 - {Intrinsic::hexagon_M2_mpy_nac_sat_lh_s0, 14320}, // __builtin_HEXAGON_M2_mpy_nac_sat_lh_s0 - {Intrinsic::hexagon_M2_mpy_nac_sat_lh_s1, 14359}, // __builtin_HEXAGON_M2_mpy_nac_sat_lh_s1 - {Intrinsic::hexagon_M2_mpy_nac_sat_ll_s0, 14398}, // __builtin_HEXAGON_M2_mpy_nac_sat_ll_s0 - {Intrinsic::hexagon_M2_mpy_nac_sat_ll_s1, 14437}, // __builtin_HEXAGON_M2_mpy_nac_sat_ll_s1 - {Intrinsic::hexagon_M2_mpy_rnd_hh_s0, 14476}, // __builtin_HEXAGON_M2_mpy_rnd_hh_s0 - {Intrinsic::hexagon_M2_mpy_rnd_hh_s1, 14511}, // __builtin_HEXAGON_M2_mpy_rnd_hh_s1 - {Intrinsic::hexagon_M2_mpy_rnd_hl_s0, 14546}, // __builtin_HEXAGON_M2_mpy_rnd_hl_s0 - {Intrinsic::hexagon_M2_mpy_rnd_hl_s1, 14581}, // __builtin_HEXAGON_M2_mpy_rnd_hl_s1 - {Intrinsic::hexagon_M2_mpy_rnd_lh_s0, 14616}, // __builtin_HEXAGON_M2_mpy_rnd_lh_s0 - {Intrinsic::hexagon_M2_mpy_rnd_lh_s1, 14651}, // __builtin_HEXAGON_M2_mpy_rnd_lh_s1 - {Intrinsic::hexagon_M2_mpy_rnd_ll_s0, 14686}, // __builtin_HEXAGON_M2_mpy_rnd_ll_s0 - {Intrinsic::hexagon_M2_mpy_rnd_ll_s1, 14721}, // __builtin_HEXAGON_M2_mpy_rnd_ll_s1 - {Intrinsic::hexagon_M2_mpy_sat_hh_s0, 14756}, // __builtin_HEXAGON_M2_mpy_sat_hh_s0 - {Intrinsic::hexagon_M2_mpy_sat_hh_s1, 14791}, // __builtin_HEXAGON_M2_mpy_sat_hh_s1 - {Intrinsic::hexagon_M2_mpy_sat_hl_s0, 14826}, // __builtin_HEXAGON_M2_mpy_sat_hl_s0 - {Intrinsic::hexagon_M2_mpy_sat_hl_s1, 14861}, // __builtin_HEXAGON_M2_mpy_sat_hl_s1 - {Intrinsic::hexagon_M2_mpy_sat_lh_s0, 14896}, // __builtin_HEXAGON_M2_mpy_sat_lh_s0 - {Intrinsic::hexagon_M2_mpy_sat_lh_s1, 14931}, // __builtin_HEXAGON_M2_mpy_sat_lh_s1 - {Intrinsic::hexagon_M2_mpy_sat_ll_s0, 14966}, // __builtin_HEXAGON_M2_mpy_sat_ll_s0 - {Intrinsic::hexagon_M2_mpy_sat_ll_s1, 15001}, // __builtin_HEXAGON_M2_mpy_sat_ll_s1 - {Intrinsic::hexagon_M2_mpy_sat_rnd_hh_s0, 15036}, // __builtin_HEXAGON_M2_mpy_sat_rnd_hh_s0 - {Intrinsic::hexagon_M2_mpy_sat_rnd_hh_s1, 15075}, // __builtin_HEXAGON_M2_mpy_sat_rnd_hh_s1 - {Intrinsic::hexagon_M2_mpy_sat_rnd_hl_s0, 15114}, // __builtin_HEXAGON_M2_mpy_sat_rnd_hl_s0 - {Intrinsic::hexagon_M2_mpy_sat_rnd_hl_s1, 15153}, // __builtin_HEXAGON_M2_mpy_sat_rnd_hl_s1 - {Intrinsic::hexagon_M2_mpy_sat_rnd_lh_s0, 15192}, // __builtin_HEXAGON_M2_mpy_sat_rnd_lh_s0 - {Intrinsic::hexagon_M2_mpy_sat_rnd_lh_s1, 15231}, // __builtin_HEXAGON_M2_mpy_sat_rnd_lh_s1 - {Intrinsic::hexagon_M2_mpy_sat_rnd_ll_s0, 15270}, // __builtin_HEXAGON_M2_mpy_sat_rnd_ll_s0 - {Intrinsic::hexagon_M2_mpy_sat_rnd_ll_s1, 15309}, // __builtin_HEXAGON_M2_mpy_sat_rnd_ll_s1 - {Intrinsic::hexagon_M2_mpy_up, 15348}, // __builtin_HEXAGON_M2_mpy_up - {Intrinsic::hexagon_M2_mpy_up_s1, 15376}, // __builtin_HEXAGON_M2_mpy_up_s1 - {Intrinsic::hexagon_M2_mpy_up_s1_sat, 15407}, // __builtin_HEXAGON_M2_mpy_up_s1_sat - {Intrinsic::hexagon_M2_mpyd_acc_hh_s0, 15442}, // __builtin_HEXAGON_M2_mpyd_acc_hh_s0 - {Intrinsic::hexagon_M2_mpyd_acc_hh_s1, 15478}, // __builtin_HEXAGON_M2_mpyd_acc_hh_s1 - {Intrinsic::hexagon_M2_mpyd_acc_hl_s0, 15514}, // __builtin_HEXAGON_M2_mpyd_acc_hl_s0 - {Intrinsic::hexagon_M2_mpyd_acc_hl_s1, 15550}, // __builtin_HEXAGON_M2_mpyd_acc_hl_s1 - {Intrinsic::hexagon_M2_mpyd_acc_lh_s0, 15586}, // __builtin_HEXAGON_M2_mpyd_acc_lh_s0 - {Intrinsic::hexagon_M2_mpyd_acc_lh_s1, 15622}, // __builtin_HEXAGON_M2_mpyd_acc_lh_s1 - {Intrinsic::hexagon_M2_mpyd_acc_ll_s0, 15658}, // __builtin_HEXAGON_M2_mpyd_acc_ll_s0 - {Intrinsic::hexagon_M2_mpyd_acc_ll_s1, 15694}, // __builtin_HEXAGON_M2_mpyd_acc_ll_s1 - {Intrinsic::hexagon_M2_mpyd_hh_s0, 15730}, // __builtin_HEXAGON_M2_mpyd_hh_s0 - {Intrinsic::hexagon_M2_mpyd_hh_s1, 15762}, // __builtin_HEXAGON_M2_mpyd_hh_s1 - {Intrinsic::hexagon_M2_mpyd_hl_s0, 15794}, // __builtin_HEXAGON_M2_mpyd_hl_s0 - {Intrinsic::hexagon_M2_mpyd_hl_s1, 15826}, // __builtin_HEXAGON_M2_mpyd_hl_s1 - {Intrinsic::hexagon_M2_mpyd_lh_s0, 15858}, // __builtin_HEXAGON_M2_mpyd_lh_s0 - {Intrinsic::hexagon_M2_mpyd_lh_s1, 15890}, // __builtin_HEXAGON_M2_mpyd_lh_s1 - {Intrinsic::hexagon_M2_mpyd_ll_s0, 15922}, // __builtin_HEXAGON_M2_mpyd_ll_s0 - {Intrinsic::hexagon_M2_mpyd_ll_s1, 15954}, // __builtin_HEXAGON_M2_mpyd_ll_s1 - {Intrinsic::hexagon_M2_mpyd_nac_hh_s0, 15986}, // __builtin_HEXAGON_M2_mpyd_nac_hh_s0 - {Intrinsic::hexagon_M2_mpyd_nac_hh_s1, 16022}, // __builtin_HEXAGON_M2_mpyd_nac_hh_s1 - {Intrinsic::hexagon_M2_mpyd_nac_hl_s0, 16058}, // __builtin_HEXAGON_M2_mpyd_nac_hl_s0 - {Intrinsic::hexagon_M2_mpyd_nac_hl_s1, 16094}, // __builtin_HEXAGON_M2_mpyd_nac_hl_s1 - {Intrinsic::hexagon_M2_mpyd_nac_lh_s0, 16130}, // __builtin_HEXAGON_M2_mpyd_nac_lh_s0 - {Intrinsic::hexagon_M2_mpyd_nac_lh_s1, 16166}, // __builtin_HEXAGON_M2_mpyd_nac_lh_s1 - {Intrinsic::hexagon_M2_mpyd_nac_ll_s0, 16202}, // __builtin_HEXAGON_M2_mpyd_nac_ll_s0 - {Intrinsic::hexagon_M2_mpyd_nac_ll_s1, 16238}, // __builtin_HEXAGON_M2_mpyd_nac_ll_s1 - {Intrinsic::hexagon_M2_mpyd_rnd_hh_s0, 16274}, // __builtin_HEXAGON_M2_mpyd_rnd_hh_s0 - {Intrinsic::hexagon_M2_mpyd_rnd_hh_s1, 16310}, // __builtin_HEXAGON_M2_mpyd_rnd_hh_s1 - {Intrinsic::hexagon_M2_mpyd_rnd_hl_s0, 16346}, // __builtin_HEXAGON_M2_mpyd_rnd_hl_s0 - {Intrinsic::hexagon_M2_mpyd_rnd_hl_s1, 16382}, // __builtin_HEXAGON_M2_mpyd_rnd_hl_s1 - {Intrinsic::hexagon_M2_mpyd_rnd_lh_s0, 16418}, // __builtin_HEXAGON_M2_mpyd_rnd_lh_s0 - {Intrinsic::hexagon_M2_mpyd_rnd_lh_s1, 16454}, // __builtin_HEXAGON_M2_mpyd_rnd_lh_s1 - {Intrinsic::hexagon_M2_mpyd_rnd_ll_s0, 16490}, // __builtin_HEXAGON_M2_mpyd_rnd_ll_s0 - {Intrinsic::hexagon_M2_mpyd_rnd_ll_s1, 16526}, // __builtin_HEXAGON_M2_mpyd_rnd_ll_s1 - {Intrinsic::hexagon_M2_mpyi, 16562}, // __builtin_HEXAGON_M2_mpyi - {Intrinsic::hexagon_M2_mpysmi, 16588}, // __builtin_HEXAGON_M2_mpysmi - {Intrinsic::hexagon_M2_mpysu_up, 16616}, // __builtin_HEXAGON_M2_mpysu_up - {Intrinsic::hexagon_M2_mpyu_acc_hh_s0, 16646}, // __builtin_HEXAGON_M2_mpyu_acc_hh_s0 - {Intrinsic::hexagon_M2_mpyu_acc_hh_s1, 16682}, // __builtin_HEXAGON_M2_mpyu_acc_hh_s1 - {Intrinsic::hexagon_M2_mpyu_acc_hl_s0, 16718}, // __builtin_HEXAGON_M2_mpyu_acc_hl_s0 - {Intrinsic::hexagon_M2_mpyu_acc_hl_s1, 16754}, // __builtin_HEXAGON_M2_mpyu_acc_hl_s1 - {Intrinsic::hexagon_M2_mpyu_acc_lh_s0, 16790}, // __builtin_HEXAGON_M2_mpyu_acc_lh_s0 - {Intrinsic::hexagon_M2_mpyu_acc_lh_s1, 16826}, // __builtin_HEXAGON_M2_mpyu_acc_lh_s1 - {Intrinsic::hexagon_M2_mpyu_acc_ll_s0, 16862}, // __builtin_HEXAGON_M2_mpyu_acc_ll_s0 - {Intrinsic::hexagon_M2_mpyu_acc_ll_s1, 16898}, // __builtin_HEXAGON_M2_mpyu_acc_ll_s1 - {Intrinsic::hexagon_M2_mpyu_hh_s0, 16934}, // __builtin_HEXAGON_M2_mpyu_hh_s0 - {Intrinsic::hexagon_M2_mpyu_hh_s1, 16966}, // __builtin_HEXAGON_M2_mpyu_hh_s1 - {Intrinsic::hexagon_M2_mpyu_hl_s0, 16998}, // __builtin_HEXAGON_M2_mpyu_hl_s0 - {Intrinsic::hexagon_M2_mpyu_hl_s1, 17030}, // __builtin_HEXAGON_M2_mpyu_hl_s1 - {Intrinsic::hexagon_M2_mpyu_lh_s0, 17062}, // __builtin_HEXAGON_M2_mpyu_lh_s0 - {Intrinsic::hexagon_M2_mpyu_lh_s1, 17094}, // __builtin_HEXAGON_M2_mpyu_lh_s1 - {Intrinsic::hexagon_M2_mpyu_ll_s0, 17126}, // __builtin_HEXAGON_M2_mpyu_ll_s0 - {Intrinsic::hexagon_M2_mpyu_ll_s1, 17158}, // __builtin_HEXAGON_M2_mpyu_ll_s1 - {Intrinsic::hexagon_M2_mpyu_nac_hh_s0, 17190}, // __builtin_HEXAGON_M2_mpyu_nac_hh_s0 - {Intrinsic::hexagon_M2_mpyu_nac_hh_s1, 17226}, // __builtin_HEXAGON_M2_mpyu_nac_hh_s1 - {Intrinsic::hexagon_M2_mpyu_nac_hl_s0, 17262}, // __builtin_HEXAGON_M2_mpyu_nac_hl_s0 - {Intrinsic::hexagon_M2_mpyu_nac_hl_s1, 17298}, // __builtin_HEXAGON_M2_mpyu_nac_hl_s1 - {Intrinsic::hexagon_M2_mpyu_nac_lh_s0, 17334}, // __builtin_HEXAGON_M2_mpyu_nac_lh_s0 - {Intrinsic::hexagon_M2_mpyu_nac_lh_s1, 17370}, // __builtin_HEXAGON_M2_mpyu_nac_lh_s1 - {Intrinsic::hexagon_M2_mpyu_nac_ll_s0, 17406}, // __builtin_HEXAGON_M2_mpyu_nac_ll_s0 - {Intrinsic::hexagon_M2_mpyu_nac_ll_s1, 17442}, // __builtin_HEXAGON_M2_mpyu_nac_ll_s1 - {Intrinsic::hexagon_M2_mpyu_up, 17478}, // __builtin_HEXAGON_M2_mpyu_up - {Intrinsic::hexagon_M2_mpyud_acc_hh_s0, 17507}, // __builtin_HEXAGON_M2_mpyud_acc_hh_s0 - {Intrinsic::hexagon_M2_mpyud_acc_hh_s1, 17544}, // __builtin_HEXAGON_M2_mpyud_acc_hh_s1 - {Intrinsic::hexagon_M2_mpyud_acc_hl_s0, 17581}, // __builtin_HEXAGON_M2_mpyud_acc_hl_s0 - {Intrinsic::hexagon_M2_mpyud_acc_hl_s1, 17618}, // __builtin_HEXAGON_M2_mpyud_acc_hl_s1 - {Intrinsic::hexagon_M2_mpyud_acc_lh_s0, 17655}, // __builtin_HEXAGON_M2_mpyud_acc_lh_s0 - {Intrinsic::hexagon_M2_mpyud_acc_lh_s1, 17692}, // __builtin_HEXAGON_M2_mpyud_acc_lh_s1 - {Intrinsic::hexagon_M2_mpyud_acc_ll_s0, 17729}, // __builtin_HEXAGON_M2_mpyud_acc_ll_s0 - {Intrinsic::hexagon_M2_mpyud_acc_ll_s1, 17766}, // __builtin_HEXAGON_M2_mpyud_acc_ll_s1 - {Intrinsic::hexagon_M2_mpyud_hh_s0, 17803}, // __builtin_HEXAGON_M2_mpyud_hh_s0 - {Intrinsic::hexagon_M2_mpyud_hh_s1, 17836}, // __builtin_HEXAGON_M2_mpyud_hh_s1 - {Intrinsic::hexagon_M2_mpyud_hl_s0, 17869}, // __builtin_HEXAGON_M2_mpyud_hl_s0 - {Intrinsic::hexagon_M2_mpyud_hl_s1, 17902}, // __builtin_HEXAGON_M2_mpyud_hl_s1 - {Intrinsic::hexagon_M2_mpyud_lh_s0, 17935}, // __builtin_HEXAGON_M2_mpyud_lh_s0 - {Intrinsic::hexagon_M2_mpyud_lh_s1, 17968}, // __builtin_HEXAGON_M2_mpyud_lh_s1 - {Intrinsic::hexagon_M2_mpyud_ll_s0, 18001}, // __builtin_HEXAGON_M2_mpyud_ll_s0 - {Intrinsic::hexagon_M2_mpyud_ll_s1, 18034}, // __builtin_HEXAGON_M2_mpyud_ll_s1 - {Intrinsic::hexagon_M2_mpyud_nac_hh_s0, 18067}, // __builtin_HEXAGON_M2_mpyud_nac_hh_s0 - {Intrinsic::hexagon_M2_mpyud_nac_hh_s1, 18104}, // __builtin_HEXAGON_M2_mpyud_nac_hh_s1 - {Intrinsic::hexagon_M2_mpyud_nac_hl_s0, 18141}, // __builtin_HEXAGON_M2_mpyud_nac_hl_s0 - {Intrinsic::hexagon_M2_mpyud_nac_hl_s1, 18178}, // __builtin_HEXAGON_M2_mpyud_nac_hl_s1 - {Intrinsic::hexagon_M2_mpyud_nac_lh_s0, 18215}, // __builtin_HEXAGON_M2_mpyud_nac_lh_s0 - {Intrinsic::hexagon_M2_mpyud_nac_lh_s1, 18252}, // __builtin_HEXAGON_M2_mpyud_nac_lh_s1 - {Intrinsic::hexagon_M2_mpyud_nac_ll_s0, 18289}, // __builtin_HEXAGON_M2_mpyud_nac_ll_s0 - {Intrinsic::hexagon_M2_mpyud_nac_ll_s1, 18326}, // __builtin_HEXAGON_M2_mpyud_nac_ll_s1 - {Intrinsic::hexagon_M2_mpyui, 18363}, // __builtin_HEXAGON_M2_mpyui - {Intrinsic::hexagon_M2_nacci, 18390}, // __builtin_HEXAGON_M2_nacci - {Intrinsic::hexagon_M2_naccii, 18417}, // __builtin_HEXAGON_M2_naccii - {Intrinsic::hexagon_M2_subacc, 18445}, // __builtin_HEXAGON_M2_subacc - {Intrinsic::hexagon_M2_vabsdiffh, 18473}, // __builtin_HEXAGON_M2_vabsdiffh - {Intrinsic::hexagon_M2_vabsdiffw, 18504}, // __builtin_HEXAGON_M2_vabsdiffw - {Intrinsic::hexagon_M2_vcmac_s0_sat_i, 18535}, // __builtin_HEXAGON_M2_vcmac_s0_sat_i - {Intrinsic::hexagon_M2_vcmac_s0_sat_r, 18571}, // __builtin_HEXAGON_M2_vcmac_s0_sat_r - {Intrinsic::hexagon_M2_vcmpy_s0_sat_i, 18607}, // __builtin_HEXAGON_M2_vcmpy_s0_sat_i - {Intrinsic::hexagon_M2_vcmpy_s0_sat_r, 18643}, // __builtin_HEXAGON_M2_vcmpy_s0_sat_r - {Intrinsic::hexagon_M2_vcmpy_s1_sat_i, 18679}, // __builtin_HEXAGON_M2_vcmpy_s1_sat_i - {Intrinsic::hexagon_M2_vcmpy_s1_sat_r, 18715}, // __builtin_HEXAGON_M2_vcmpy_s1_sat_r - {Intrinsic::hexagon_M2_vdmacs_s0, 18751}, // __builtin_HEXAGON_M2_vdmacs_s0 - {Intrinsic::hexagon_M2_vdmacs_s1, 18782}, // __builtin_HEXAGON_M2_vdmacs_s1 - {Intrinsic::hexagon_M2_vdmpyrs_s0, 18813}, // __builtin_HEXAGON_M2_vdmpyrs_s0 - {Intrinsic::hexagon_M2_vdmpyrs_s1, 18845}, // __builtin_HEXAGON_M2_vdmpyrs_s1 - {Intrinsic::hexagon_M2_vdmpys_s0, 18877}, // __builtin_HEXAGON_M2_vdmpys_s0 - {Intrinsic::hexagon_M2_vdmpys_s1, 18908}, // __builtin_HEXAGON_M2_vdmpys_s1 - {Intrinsic::hexagon_M2_vmac2, 18939}, // __builtin_HEXAGON_M2_vmac2 - {Intrinsic::hexagon_M2_vmac2es, 18966}, // __builtin_HEXAGON_M2_vmac2es - {Intrinsic::hexagon_M2_vmac2es_s0, 18995}, // __builtin_HEXAGON_M2_vmac2es_s0 - {Intrinsic::hexagon_M2_vmac2es_s1, 19027}, // __builtin_HEXAGON_M2_vmac2es_s1 - {Intrinsic::hexagon_M2_vmac2s_s0, 19059}, // __builtin_HEXAGON_M2_vmac2s_s0 - {Intrinsic::hexagon_M2_vmac2s_s1, 19090}, // __builtin_HEXAGON_M2_vmac2s_s1 - {Intrinsic::hexagon_M2_vmac2su_s0, 19121}, // __builtin_HEXAGON_M2_vmac2su_s0 - {Intrinsic::hexagon_M2_vmac2su_s1, 19153}, // __builtin_HEXAGON_M2_vmac2su_s1 - {Intrinsic::hexagon_M2_vmpy2es_s0, 19185}, // __builtin_HEXAGON_M2_vmpy2es_s0 - {Intrinsic::hexagon_M2_vmpy2es_s1, 19217}, // __builtin_HEXAGON_M2_vmpy2es_s1 - {Intrinsic::hexagon_M2_vmpy2s_s0, 19249}, // __builtin_HEXAGON_M2_vmpy2s_s0 - {Intrinsic::hexagon_M2_vmpy2s_s0pack, 19280}, // __builtin_HEXAGON_M2_vmpy2s_s0pack - {Intrinsic::hexagon_M2_vmpy2s_s1, 19315}, // __builtin_HEXAGON_M2_vmpy2s_s1 - {Intrinsic::hexagon_M2_vmpy2s_s1pack, 19346}, // __builtin_HEXAGON_M2_vmpy2s_s1pack - {Intrinsic::hexagon_M2_vmpy2su_s0, 19381}, // __builtin_HEXAGON_M2_vmpy2su_s0 - {Intrinsic::hexagon_M2_vmpy2su_s1, 19413}, // __builtin_HEXAGON_M2_vmpy2su_s1 - {Intrinsic::hexagon_M2_vraddh, 19445}, // __builtin_HEXAGON_M2_vraddh - {Intrinsic::hexagon_M2_vradduh, 19473}, // __builtin_HEXAGON_M2_vradduh - {Intrinsic::hexagon_M2_vrcmaci_s0, 19502}, // __builtin_HEXAGON_M2_vrcmaci_s0 - {Intrinsic::hexagon_M2_vrcmaci_s0c, 19534}, // __builtin_HEXAGON_M2_vrcmaci_s0c - {Intrinsic::hexagon_M2_vrcmacr_s0, 19567}, // __builtin_HEXAGON_M2_vrcmacr_s0 - {Intrinsic::hexagon_M2_vrcmacr_s0c, 19599}, // __builtin_HEXAGON_M2_vrcmacr_s0c - {Intrinsic::hexagon_M2_vrcmpyi_s0, 19632}, // __builtin_HEXAGON_M2_vrcmpyi_s0 - {Intrinsic::hexagon_M2_vrcmpyi_s0c, 19664}, // __builtin_HEXAGON_M2_vrcmpyi_s0c - {Intrinsic::hexagon_M2_vrcmpyr_s0, 19697}, // __builtin_HEXAGON_M2_vrcmpyr_s0 - {Intrinsic::hexagon_M2_vrcmpyr_s0c, 19729}, // __builtin_HEXAGON_M2_vrcmpyr_s0c - {Intrinsic::hexagon_M2_vrcmpys_acc_s1, 19762}, // __builtin_HEXAGON_M2_vrcmpys_acc_s1 - {Intrinsic::hexagon_M2_vrcmpys_s1, 19798}, // __builtin_HEXAGON_M2_vrcmpys_s1 - {Intrinsic::hexagon_M2_vrcmpys_s1rp, 19830}, // __builtin_HEXAGON_M2_vrcmpys_s1rp - {Intrinsic::hexagon_M2_vrmac_s0, 19864}, // __builtin_HEXAGON_M2_vrmac_s0 - {Intrinsic::hexagon_M2_vrmpy_s0, 19894}, // __builtin_HEXAGON_M2_vrmpy_s0 - {Intrinsic::hexagon_M2_xor_xacc, 19924}, // __builtin_HEXAGON_M2_xor_xacc - {Intrinsic::hexagon_M4_and_and, 19954}, // __builtin_HEXAGON_M4_and_and - {Intrinsic::hexagon_M4_and_andn, 19983}, // __builtin_HEXAGON_M4_and_andn - {Intrinsic::hexagon_M4_and_or, 20013}, // __builtin_HEXAGON_M4_and_or - {Intrinsic::hexagon_M4_and_xor, 20041}, // __builtin_HEXAGON_M4_and_xor - {Intrinsic::hexagon_M4_cmpyi_wh, 20070}, // __builtin_HEXAGON_M4_cmpyi_wh - {Intrinsic::hexagon_M4_cmpyi_whc, 20100}, // __builtin_HEXAGON_M4_cmpyi_whc - {Intrinsic::hexagon_M4_cmpyr_wh, 20131}, // __builtin_HEXAGON_M4_cmpyr_wh - {Intrinsic::hexagon_M4_cmpyr_whc, 20161}, // __builtin_HEXAGON_M4_cmpyr_whc - {Intrinsic::hexagon_M4_mac_up_s1_sat, 20192}, // __builtin_HEXAGON_M4_mac_up_s1_sat - {Intrinsic::hexagon_M4_mpyri_addi, 20227}, // __builtin_HEXAGON_M4_mpyri_addi - {Intrinsic::hexagon_M4_mpyri_addr, 20259}, // __builtin_HEXAGON_M4_mpyri_addr - {Intrinsic::hexagon_M4_mpyri_addr_u2, 20291}, // __builtin_HEXAGON_M4_mpyri_addr_u2 - {Intrinsic::hexagon_M4_mpyrr_addi, 20326}, // __builtin_HEXAGON_M4_mpyrr_addi - {Intrinsic::hexagon_M4_mpyrr_addr, 20358}, // __builtin_HEXAGON_M4_mpyrr_addr - {Intrinsic::hexagon_M4_nac_up_s1_sat, 20390}, // __builtin_HEXAGON_M4_nac_up_s1_sat - {Intrinsic::hexagon_M4_or_and, 20425}, // __builtin_HEXAGON_M4_or_and - {Intrinsic::hexagon_M4_or_andn, 20453}, // __builtin_HEXAGON_M4_or_andn - {Intrinsic::hexagon_M4_or_or, 20482}, // __builtin_HEXAGON_M4_or_or - {Intrinsic::hexagon_M4_or_xor, 20509}, // __builtin_HEXAGON_M4_or_xor - {Intrinsic::hexagon_M4_pmpyw, 20537}, // __builtin_HEXAGON_M4_pmpyw - {Intrinsic::hexagon_M4_pmpyw_acc, 20564}, // __builtin_HEXAGON_M4_pmpyw_acc - {Intrinsic::hexagon_M4_vpmpyh, 20595}, // __builtin_HEXAGON_M4_vpmpyh - {Intrinsic::hexagon_M4_vpmpyh_acc, 20623}, // __builtin_HEXAGON_M4_vpmpyh_acc - {Intrinsic::hexagon_M4_vrmpyeh_acc_s0, 20655}, // __builtin_HEXAGON_M4_vrmpyeh_acc_s0 - {Intrinsic::hexagon_M4_vrmpyeh_acc_s1, 20691}, // __builtin_HEXAGON_M4_vrmpyeh_acc_s1 - {Intrinsic::hexagon_M4_vrmpyeh_s0, 20727}, // __builtin_HEXAGON_M4_vrmpyeh_s0 - {Intrinsic::hexagon_M4_vrmpyeh_s1, 20759}, // __builtin_HEXAGON_M4_vrmpyeh_s1 - {Intrinsic::hexagon_M4_vrmpyoh_acc_s0, 20791}, // __builtin_HEXAGON_M4_vrmpyoh_acc_s0 - {Intrinsic::hexagon_M4_vrmpyoh_acc_s1, 20827}, // __builtin_HEXAGON_M4_vrmpyoh_acc_s1 - {Intrinsic::hexagon_M4_vrmpyoh_s0, 20863}, // __builtin_HEXAGON_M4_vrmpyoh_s0 - {Intrinsic::hexagon_M4_vrmpyoh_s1, 20895}, // __builtin_HEXAGON_M4_vrmpyoh_s1 - {Intrinsic::hexagon_M4_xor_and, 20927}, // __builtin_HEXAGON_M4_xor_and - {Intrinsic::hexagon_M4_xor_andn, 20956}, // __builtin_HEXAGON_M4_xor_andn - {Intrinsic::hexagon_M4_xor_or, 20986}, // __builtin_HEXAGON_M4_xor_or - {Intrinsic::hexagon_M4_xor_xacc, 21014}, // __builtin_HEXAGON_M4_xor_xacc - {Intrinsic::hexagon_M5_vdmacbsu, 21044}, // __builtin_HEXAGON_M5_vdmacbsu - {Intrinsic::hexagon_M5_vdmpybsu, 21074}, // __builtin_HEXAGON_M5_vdmpybsu - {Intrinsic::hexagon_M5_vmacbsu, 21104}, // __builtin_HEXAGON_M5_vmacbsu - {Intrinsic::hexagon_M5_vmacbuu, 21133}, // __builtin_HEXAGON_M5_vmacbuu - {Intrinsic::hexagon_M5_vmpybsu, 21162}, // __builtin_HEXAGON_M5_vmpybsu - {Intrinsic::hexagon_M5_vmpybuu, 21191}, // __builtin_HEXAGON_M5_vmpybuu - {Intrinsic::hexagon_M5_vrmacbsu, 21220}, // __builtin_HEXAGON_M5_vrmacbsu - {Intrinsic::hexagon_M5_vrmacbuu, 21250}, // __builtin_HEXAGON_M5_vrmacbuu - {Intrinsic::hexagon_M5_vrmpybsu, 21280}, // __builtin_HEXAGON_M5_vrmpybsu - {Intrinsic::hexagon_M5_vrmpybuu, 21310}, // __builtin_HEXAGON_M5_vrmpybuu - {Intrinsic::hexagon_M6_vabsdiffb, 21340}, // __builtin_HEXAGON_M6_vabsdiffb - {Intrinsic::hexagon_M6_vabsdiffub, 21371}, // __builtin_HEXAGON_M6_vabsdiffub - {Intrinsic::hexagon_S2_addasl_rrri, 21403}, // __builtin_HEXAGON_S2_addasl_rrri - {Intrinsic::hexagon_S2_asl_i_p, 21436}, // __builtin_HEXAGON_S2_asl_i_p - {Intrinsic::hexagon_S2_asl_i_p_acc, 21465}, // __builtin_HEXAGON_S2_asl_i_p_acc - {Intrinsic::hexagon_S2_asl_i_p_and, 21498}, // __builtin_HEXAGON_S2_asl_i_p_and - {Intrinsic::hexagon_S2_asl_i_p_nac, 21531}, // __builtin_HEXAGON_S2_asl_i_p_nac - {Intrinsic::hexagon_S2_asl_i_p_or, 21564}, // __builtin_HEXAGON_S2_asl_i_p_or - {Intrinsic::hexagon_S2_asl_i_p_xacc, 21596}, // __builtin_HEXAGON_S2_asl_i_p_xacc - {Intrinsic::hexagon_S2_asl_i_r, 21630}, // __builtin_HEXAGON_S2_asl_i_r - {Intrinsic::hexagon_S2_asl_i_r_acc, 21659}, // __builtin_HEXAGON_S2_asl_i_r_acc - {Intrinsic::hexagon_S2_asl_i_r_and, 21692}, // __builtin_HEXAGON_S2_asl_i_r_and - {Intrinsic::hexagon_S2_asl_i_r_nac, 21725}, // __builtin_HEXAGON_S2_asl_i_r_nac - {Intrinsic::hexagon_S2_asl_i_r_or, 21758}, // __builtin_HEXAGON_S2_asl_i_r_or - {Intrinsic::hexagon_S2_asl_i_r_sat, 21790}, // __builtin_HEXAGON_S2_asl_i_r_sat - {Intrinsic::hexagon_S2_asl_i_r_xacc, 21823}, // __builtin_HEXAGON_S2_asl_i_r_xacc - {Intrinsic::hexagon_S2_asl_i_vh, 21857}, // __builtin_HEXAGON_S2_asl_i_vh - {Intrinsic::hexagon_S2_asl_i_vw, 21887}, // __builtin_HEXAGON_S2_asl_i_vw - {Intrinsic::hexagon_S2_asl_r_p, 21917}, // __builtin_HEXAGON_S2_asl_r_p - {Intrinsic::hexagon_S2_asl_r_p_acc, 21946}, // __builtin_HEXAGON_S2_asl_r_p_acc - {Intrinsic::hexagon_S2_asl_r_p_and, 21979}, // __builtin_HEXAGON_S2_asl_r_p_and - {Intrinsic::hexagon_S2_asl_r_p_nac, 22012}, // __builtin_HEXAGON_S2_asl_r_p_nac - {Intrinsic::hexagon_S2_asl_r_p_or, 22045}, // __builtin_HEXAGON_S2_asl_r_p_or - {Intrinsic::hexagon_S2_asl_r_p_xor, 22077}, // __builtin_HEXAGON_S2_asl_r_p_xor - {Intrinsic::hexagon_S2_asl_r_r, 22110}, // __builtin_HEXAGON_S2_asl_r_r - {Intrinsic::hexagon_S2_asl_r_r_acc, 22139}, // __builtin_HEXAGON_S2_asl_r_r_acc - {Intrinsic::hexagon_S2_asl_r_r_and, 22172}, // __builtin_HEXAGON_S2_asl_r_r_and - {Intrinsic::hexagon_S2_asl_r_r_nac, 22205}, // __builtin_HEXAGON_S2_asl_r_r_nac - {Intrinsic::hexagon_S2_asl_r_r_or, 22238}, // __builtin_HEXAGON_S2_asl_r_r_or - {Intrinsic::hexagon_S2_asl_r_r_sat, 22270}, // __builtin_HEXAGON_S2_asl_r_r_sat - {Intrinsic::hexagon_S2_asl_r_vh, 22303}, // __builtin_HEXAGON_S2_asl_r_vh - {Intrinsic::hexagon_S2_asl_r_vw, 22333}, // __builtin_HEXAGON_S2_asl_r_vw - {Intrinsic::hexagon_S2_asr_i_p, 22363}, // __builtin_HEXAGON_S2_asr_i_p - {Intrinsic::hexagon_S2_asr_i_p_acc, 22392}, // __builtin_HEXAGON_S2_asr_i_p_acc - {Intrinsic::hexagon_S2_asr_i_p_and, 22425}, // __builtin_HEXAGON_S2_asr_i_p_and - {Intrinsic::hexagon_S2_asr_i_p_nac, 22458}, // __builtin_HEXAGON_S2_asr_i_p_nac - {Intrinsic::hexagon_S2_asr_i_p_or, 22491}, // __builtin_HEXAGON_S2_asr_i_p_or - {Intrinsic::hexagon_S2_asr_i_p_rnd, 22523}, // __builtin_HEXAGON_S2_asr_i_p_rnd - {Intrinsic::hexagon_S2_asr_i_p_rnd_goodsyntax, 22556}, // __builtin_HEXAGON_S2_asr_i_p_rnd_goodsyntax - {Intrinsic::hexagon_S2_asr_i_r, 22600}, // __builtin_HEXAGON_S2_asr_i_r - {Intrinsic::hexagon_S2_asr_i_r_acc, 22629}, // __builtin_HEXAGON_S2_asr_i_r_acc - {Intrinsic::hexagon_S2_asr_i_r_and, 22662}, // __builtin_HEXAGON_S2_asr_i_r_and - {Intrinsic::hexagon_S2_asr_i_r_nac, 22695}, // __builtin_HEXAGON_S2_asr_i_r_nac - {Intrinsic::hexagon_S2_asr_i_r_or, 22728}, // __builtin_HEXAGON_S2_asr_i_r_or - {Intrinsic::hexagon_S2_asr_i_r_rnd, 22760}, // __builtin_HEXAGON_S2_asr_i_r_rnd - {Intrinsic::hexagon_S2_asr_i_r_rnd_goodsyntax, 22793}, // __builtin_HEXAGON_S2_asr_i_r_rnd_goodsyntax - {Intrinsic::hexagon_S2_asr_i_svw_trun, 22837}, // __builtin_HEXAGON_S2_asr_i_svw_trun - {Intrinsic::hexagon_S2_asr_i_vh, 22873}, // __builtin_HEXAGON_S2_asr_i_vh - {Intrinsic::hexagon_S2_asr_i_vw, 22903}, // __builtin_HEXAGON_S2_asr_i_vw - {Intrinsic::hexagon_S2_asr_r_p, 22933}, // __builtin_HEXAGON_S2_asr_r_p - {Intrinsic::hexagon_S2_asr_r_p_acc, 22962}, // __builtin_HEXAGON_S2_asr_r_p_acc - {Intrinsic::hexagon_S2_asr_r_p_and, 22995}, // __builtin_HEXAGON_S2_asr_r_p_and - {Intrinsic::hexagon_S2_asr_r_p_nac, 23028}, // __builtin_HEXAGON_S2_asr_r_p_nac - {Intrinsic::hexagon_S2_asr_r_p_or, 23061}, // __builtin_HEXAGON_S2_asr_r_p_or - {Intrinsic::hexagon_S2_asr_r_p_xor, 23093}, // __builtin_HEXAGON_S2_asr_r_p_xor - {Intrinsic::hexagon_S2_asr_r_r, 23126}, // __builtin_HEXAGON_S2_asr_r_r - {Intrinsic::hexagon_S2_asr_r_r_acc, 23155}, // __builtin_HEXAGON_S2_asr_r_r_acc - {Intrinsic::hexagon_S2_asr_r_r_and, 23188}, // __builtin_HEXAGON_S2_asr_r_r_and - {Intrinsic::hexagon_S2_asr_r_r_nac, 23221}, // __builtin_HEXAGON_S2_asr_r_r_nac - {Intrinsic::hexagon_S2_asr_r_r_or, 23254}, // __builtin_HEXAGON_S2_asr_r_r_or - {Intrinsic::hexagon_S2_asr_r_r_sat, 23286}, // __builtin_HEXAGON_S2_asr_r_r_sat - {Intrinsic::hexagon_S2_asr_r_svw_trun, 23319}, // __builtin_HEXAGON_S2_asr_r_svw_trun - {Intrinsic::hexagon_S2_asr_r_vh, 23355}, // __builtin_HEXAGON_S2_asr_r_vh - {Intrinsic::hexagon_S2_asr_r_vw, 23385}, // __builtin_HEXAGON_S2_asr_r_vw - {Intrinsic::hexagon_S2_brev, 23415}, // __builtin_HEXAGON_S2_brev - {Intrinsic::hexagon_S2_brevp, 23441}, // __builtin_HEXAGON_S2_brevp - {Intrinsic::hexagon_S2_cabacencbin, 23468}, // __builtin_HEXAGON_S2_cabacencbin - {Intrinsic::hexagon_S2_cl0, 23501}, // __builtin_HEXAGON_S2_cl0 - {Intrinsic::hexagon_S2_cl0p, 23526}, // __builtin_HEXAGON_S2_cl0p - {Intrinsic::hexagon_S2_cl1, 23552}, // __builtin_HEXAGON_S2_cl1 - {Intrinsic::hexagon_S2_cl1p, 23577}, // __builtin_HEXAGON_S2_cl1p - {Intrinsic::hexagon_S2_clb, 23603}, // __builtin_HEXAGON_S2_clb - {Intrinsic::hexagon_S2_clbnorm, 23628}, // __builtin_HEXAGON_S2_clbnorm - {Intrinsic::hexagon_S2_clbp, 23657}, // __builtin_HEXAGON_S2_clbp - {Intrinsic::hexagon_S2_clrbit_i, 23683}, // __builtin_HEXAGON_S2_clrbit_i - {Intrinsic::hexagon_S2_clrbit_r, 23713}, // __builtin_HEXAGON_S2_clrbit_r - {Intrinsic::hexagon_S2_ct0, 23743}, // __builtin_HEXAGON_S2_ct0 - {Intrinsic::hexagon_S2_ct0p, 23768}, // __builtin_HEXAGON_S2_ct0p - {Intrinsic::hexagon_S2_ct1, 23794}, // __builtin_HEXAGON_S2_ct1 - {Intrinsic::hexagon_S2_ct1p, 23819}, // __builtin_HEXAGON_S2_ct1p - {Intrinsic::hexagon_S2_deinterleave, 23845}, // __builtin_HEXAGON_S2_deinterleave - {Intrinsic::hexagon_S2_extractu, 23879}, // __builtin_HEXAGON_S2_extractu - {Intrinsic::hexagon_S2_extractu_rp, 23909}, // __builtin_HEXAGON_S2_extractu_rp - {Intrinsic::hexagon_S2_extractup, 23942}, // __builtin_HEXAGON_S2_extractup - {Intrinsic::hexagon_S2_extractup_rp, 23973}, // __builtin_HEXAGON_S2_extractup_rp - {Intrinsic::hexagon_S2_insert, 24007}, // __builtin_HEXAGON_S2_insert - {Intrinsic::hexagon_S2_insert_rp, 24035}, // __builtin_HEXAGON_S2_insert_rp - {Intrinsic::hexagon_S2_insertp, 24066}, // __builtin_HEXAGON_S2_insertp - {Intrinsic::hexagon_S2_insertp_rp, 24095}, // __builtin_HEXAGON_S2_insertp_rp - {Intrinsic::hexagon_S2_interleave, 24127}, // __builtin_HEXAGON_S2_interleave - {Intrinsic::hexagon_S2_lfsp, 24159}, // __builtin_HEXAGON_S2_lfsp - {Intrinsic::hexagon_S2_lsl_r_p, 24185}, // __builtin_HEXAGON_S2_lsl_r_p - {Intrinsic::hexagon_S2_lsl_r_p_acc, 24214}, // __builtin_HEXAGON_S2_lsl_r_p_acc - {Intrinsic::hexagon_S2_lsl_r_p_and, 24247}, // __builtin_HEXAGON_S2_lsl_r_p_and - {Intrinsic::hexagon_S2_lsl_r_p_nac, 24280}, // __builtin_HEXAGON_S2_lsl_r_p_nac - {Intrinsic::hexagon_S2_lsl_r_p_or, 24313}, // __builtin_HEXAGON_S2_lsl_r_p_or - {Intrinsic::hexagon_S2_lsl_r_p_xor, 24345}, // __builtin_HEXAGON_S2_lsl_r_p_xor - {Intrinsic::hexagon_S2_lsl_r_r, 24378}, // __builtin_HEXAGON_S2_lsl_r_r - {Intrinsic::hexagon_S2_lsl_r_r_acc, 24407}, // __builtin_HEXAGON_S2_lsl_r_r_acc - {Intrinsic::hexagon_S2_lsl_r_r_and, 24440}, // __builtin_HEXAGON_S2_lsl_r_r_and - {Intrinsic::hexagon_S2_lsl_r_r_nac, 24473}, // __builtin_HEXAGON_S2_lsl_r_r_nac - {Intrinsic::hexagon_S2_lsl_r_r_or, 24506}, // __builtin_HEXAGON_S2_lsl_r_r_or - {Intrinsic::hexagon_S2_lsl_r_vh, 24538}, // __builtin_HEXAGON_S2_lsl_r_vh - {Intrinsic::hexagon_S2_lsl_r_vw, 24568}, // __builtin_HEXAGON_S2_lsl_r_vw - {Intrinsic::hexagon_S2_lsr_i_p, 24598}, // __builtin_HEXAGON_S2_lsr_i_p - {Intrinsic::hexagon_S2_lsr_i_p_acc, 24627}, // __builtin_HEXAGON_S2_lsr_i_p_acc - {Intrinsic::hexagon_S2_lsr_i_p_and, 24660}, // __builtin_HEXAGON_S2_lsr_i_p_and - {Intrinsic::hexagon_S2_lsr_i_p_nac, 24693}, // __builtin_HEXAGON_S2_lsr_i_p_nac - {Intrinsic::hexagon_S2_lsr_i_p_or, 24726}, // __builtin_HEXAGON_S2_lsr_i_p_or - {Intrinsic::hexagon_S2_lsr_i_p_xacc, 24758}, // __builtin_HEXAGON_S2_lsr_i_p_xacc - {Intrinsic::hexagon_S2_lsr_i_r, 24792}, // __builtin_HEXAGON_S2_lsr_i_r - {Intrinsic::hexagon_S2_lsr_i_r_acc, 24821}, // __builtin_HEXAGON_S2_lsr_i_r_acc - {Intrinsic::hexagon_S2_lsr_i_r_and, 24854}, // __builtin_HEXAGON_S2_lsr_i_r_and - {Intrinsic::hexagon_S2_lsr_i_r_nac, 24887}, // __builtin_HEXAGON_S2_lsr_i_r_nac - {Intrinsic::hexagon_S2_lsr_i_r_or, 24920}, // __builtin_HEXAGON_S2_lsr_i_r_or - {Intrinsic::hexagon_S2_lsr_i_r_xacc, 24952}, // __builtin_HEXAGON_S2_lsr_i_r_xacc - {Intrinsic::hexagon_S2_lsr_i_vh, 24986}, // __builtin_HEXAGON_S2_lsr_i_vh - {Intrinsic::hexagon_S2_lsr_i_vw, 25016}, // __builtin_HEXAGON_S2_lsr_i_vw - {Intrinsic::hexagon_S2_lsr_r_p, 25046}, // __builtin_HEXAGON_S2_lsr_r_p - {Intrinsic::hexagon_S2_lsr_r_p_acc, 25075}, // __builtin_HEXAGON_S2_lsr_r_p_acc - {Intrinsic::hexagon_S2_lsr_r_p_and, 25108}, // __builtin_HEXAGON_S2_lsr_r_p_and - {Intrinsic::hexagon_S2_lsr_r_p_nac, 25141}, // __builtin_HEXAGON_S2_lsr_r_p_nac - {Intrinsic::hexagon_S2_lsr_r_p_or, 25174}, // __builtin_HEXAGON_S2_lsr_r_p_or - {Intrinsic::hexagon_S2_lsr_r_p_xor, 25206}, // __builtin_HEXAGON_S2_lsr_r_p_xor - {Intrinsic::hexagon_S2_lsr_r_r, 25239}, // __builtin_HEXAGON_S2_lsr_r_r - {Intrinsic::hexagon_S2_lsr_r_r_acc, 25268}, // __builtin_HEXAGON_S2_lsr_r_r_acc - {Intrinsic::hexagon_S2_lsr_r_r_and, 25301}, // __builtin_HEXAGON_S2_lsr_r_r_and - {Intrinsic::hexagon_S2_lsr_r_r_nac, 25334}, // __builtin_HEXAGON_S2_lsr_r_r_nac - {Intrinsic::hexagon_S2_lsr_r_r_or, 25367}, // __builtin_HEXAGON_S2_lsr_r_r_or - {Intrinsic::hexagon_S2_lsr_r_vh, 25399}, // __builtin_HEXAGON_S2_lsr_r_vh - {Intrinsic::hexagon_S2_lsr_r_vw, 25429}, // __builtin_HEXAGON_S2_lsr_r_vw - {Intrinsic::hexagon_S2_packhl, 25459}, // __builtin_HEXAGON_S2_packhl - {Intrinsic::hexagon_S2_parityp, 25487}, // __builtin_HEXAGON_S2_parityp - {Intrinsic::hexagon_S2_setbit_i, 25516}, // __builtin_HEXAGON_S2_setbit_i - {Intrinsic::hexagon_S2_setbit_r, 25546}, // __builtin_HEXAGON_S2_setbit_r - {Intrinsic::hexagon_S2_shuffeb, 25576}, // __builtin_HEXAGON_S2_shuffeb - {Intrinsic::hexagon_S2_shuffeh, 25605}, // __builtin_HEXAGON_S2_shuffeh - {Intrinsic::hexagon_S2_shuffob, 25634}, // __builtin_HEXAGON_S2_shuffob - {Intrinsic::hexagon_S2_shuffoh, 25663}, // __builtin_HEXAGON_S2_shuffoh - {Intrinsic::hexagon_S2_storew_locked, 25692}, // __builtin_HEXAGON_S2_storew_locked - {Intrinsic::hexagon_S2_svsathb, 25727}, // __builtin_HEXAGON_S2_svsathb - {Intrinsic::hexagon_S2_svsathub, 25756}, // __builtin_HEXAGON_S2_svsathub - {Intrinsic::hexagon_S2_tableidxb_goodsyntax, 25786}, // __builtin_HEXAGON_S2_tableidxb_goodsyntax - {Intrinsic::hexagon_S2_tableidxd_goodsyntax, 25828}, // __builtin_HEXAGON_S2_tableidxd_goodsyntax - {Intrinsic::hexagon_S2_tableidxh_goodsyntax, 25870}, // __builtin_HEXAGON_S2_tableidxh_goodsyntax - {Intrinsic::hexagon_S2_tableidxw_goodsyntax, 25912}, // __builtin_HEXAGON_S2_tableidxw_goodsyntax - {Intrinsic::hexagon_S2_togglebit_i, 25954}, // __builtin_HEXAGON_S2_togglebit_i - {Intrinsic::hexagon_S2_togglebit_r, 25987}, // __builtin_HEXAGON_S2_togglebit_r - {Intrinsic::hexagon_S2_tstbit_i, 26020}, // __builtin_HEXAGON_S2_tstbit_i - {Intrinsic::hexagon_S2_tstbit_r, 26050}, // __builtin_HEXAGON_S2_tstbit_r - {Intrinsic::hexagon_S2_valignib, 26080}, // __builtin_HEXAGON_S2_valignib - {Intrinsic::hexagon_S2_valignrb, 26110}, // __builtin_HEXAGON_S2_valignrb - {Intrinsic::hexagon_S2_vcnegh, 26140}, // __builtin_HEXAGON_S2_vcnegh - {Intrinsic::hexagon_S2_vcrotate, 26168}, // __builtin_HEXAGON_S2_vcrotate - {Intrinsic::hexagon_S2_vrcnegh, 26198}, // __builtin_HEXAGON_S2_vrcnegh - {Intrinsic::hexagon_S2_vrndpackwh, 26227}, // __builtin_HEXAGON_S2_vrndpackwh - {Intrinsic::hexagon_S2_vrndpackwhs, 26259}, // __builtin_HEXAGON_S2_vrndpackwhs - {Intrinsic::hexagon_S2_vsathb, 26292}, // __builtin_HEXAGON_S2_vsathb - {Intrinsic::hexagon_S2_vsathb_nopack, 26320}, // __builtin_HEXAGON_S2_vsathb_nopack - {Intrinsic::hexagon_S2_vsathub, 26355}, // __builtin_HEXAGON_S2_vsathub - {Intrinsic::hexagon_S2_vsathub_nopack, 26384}, // __builtin_HEXAGON_S2_vsathub_nopack - {Intrinsic::hexagon_S2_vsatwh, 26420}, // __builtin_HEXAGON_S2_vsatwh - {Intrinsic::hexagon_S2_vsatwh_nopack, 26448}, // __builtin_HEXAGON_S2_vsatwh_nopack - {Intrinsic::hexagon_S2_vsatwuh, 26483}, // __builtin_HEXAGON_S2_vsatwuh - {Intrinsic::hexagon_S2_vsatwuh_nopack, 26512}, // __builtin_HEXAGON_S2_vsatwuh_nopack - {Intrinsic::hexagon_S2_vsplatrb, 26548}, // __builtin_HEXAGON_S2_vsplatrb - {Intrinsic::hexagon_S2_vsplatrh, 26578}, // __builtin_HEXAGON_S2_vsplatrh - {Intrinsic::hexagon_S2_vspliceib, 26608}, // __builtin_HEXAGON_S2_vspliceib - {Intrinsic::hexagon_S2_vsplicerb, 26639}, // __builtin_HEXAGON_S2_vsplicerb - {Intrinsic::hexagon_S2_vsxtbh, 26670}, // __builtin_HEXAGON_S2_vsxtbh - {Intrinsic::hexagon_S2_vsxthw, 26698}, // __builtin_HEXAGON_S2_vsxthw - {Intrinsic::hexagon_S2_vtrunehb, 26726}, // __builtin_HEXAGON_S2_vtrunehb - {Intrinsic::hexagon_S2_vtrunewh, 26756}, // __builtin_HEXAGON_S2_vtrunewh - {Intrinsic::hexagon_S2_vtrunohb, 26786}, // __builtin_HEXAGON_S2_vtrunohb - {Intrinsic::hexagon_S2_vtrunowh, 26816}, // __builtin_HEXAGON_S2_vtrunowh - {Intrinsic::hexagon_S2_vzxtbh, 26846}, // __builtin_HEXAGON_S2_vzxtbh - {Intrinsic::hexagon_S2_vzxthw, 26874}, // __builtin_HEXAGON_S2_vzxthw - {Intrinsic::hexagon_S4_addaddi, 26902}, // __builtin_HEXAGON_S4_addaddi - {Intrinsic::hexagon_S4_addi_asl_ri, 26931}, // __builtin_HEXAGON_S4_addi_asl_ri - {Intrinsic::hexagon_S4_addi_lsr_ri, 26964}, // __builtin_HEXAGON_S4_addi_lsr_ri - {Intrinsic::hexagon_S4_andi_asl_ri, 26997}, // __builtin_HEXAGON_S4_andi_asl_ri - {Intrinsic::hexagon_S4_andi_lsr_ri, 27030}, // __builtin_HEXAGON_S4_andi_lsr_ri - {Intrinsic::hexagon_S4_clbaddi, 27063}, // __builtin_HEXAGON_S4_clbaddi - {Intrinsic::hexagon_S4_clbpaddi, 27092}, // __builtin_HEXAGON_S4_clbpaddi - {Intrinsic::hexagon_S4_clbpnorm, 27122}, // __builtin_HEXAGON_S4_clbpnorm - {Intrinsic::hexagon_S4_extract, 27152}, // __builtin_HEXAGON_S4_extract - {Intrinsic::hexagon_S4_extract_rp, 27181}, // __builtin_HEXAGON_S4_extract_rp - {Intrinsic::hexagon_S4_extractp, 27213}, // __builtin_HEXAGON_S4_extractp - {Intrinsic::hexagon_S4_extractp_rp, 27243}, // __builtin_HEXAGON_S4_extractp_rp - {Intrinsic::hexagon_S4_lsli, 27276}, // __builtin_HEXAGON_S4_lsli - {Intrinsic::hexagon_S4_ntstbit_i, 27302}, // __builtin_HEXAGON_S4_ntstbit_i - {Intrinsic::hexagon_S4_ntstbit_r, 27333}, // __builtin_HEXAGON_S4_ntstbit_r - {Intrinsic::hexagon_S4_or_andi, 27364}, // __builtin_HEXAGON_S4_or_andi - {Intrinsic::hexagon_S4_or_andix, 27393}, // __builtin_HEXAGON_S4_or_andix - {Intrinsic::hexagon_S4_or_ori, 27423}, // __builtin_HEXAGON_S4_or_ori - {Intrinsic::hexagon_S4_ori_asl_ri, 27451}, // __builtin_HEXAGON_S4_ori_asl_ri - {Intrinsic::hexagon_S4_ori_lsr_ri, 27483}, // __builtin_HEXAGON_S4_ori_lsr_ri - {Intrinsic::hexagon_S4_parity, 27515}, // __builtin_HEXAGON_S4_parity - {Intrinsic::hexagon_S4_stored_locked, 27543}, // __builtin_HEXAGON_S4_stored_locked - {Intrinsic::hexagon_S4_subaddi, 27578}, // __builtin_HEXAGON_S4_subaddi - {Intrinsic::hexagon_S4_subi_asl_ri, 27607}, // __builtin_HEXAGON_S4_subi_asl_ri - {Intrinsic::hexagon_S4_subi_lsr_ri, 27640}, // __builtin_HEXAGON_S4_subi_lsr_ri - {Intrinsic::hexagon_S4_vrcrotate, 27673}, // __builtin_HEXAGON_S4_vrcrotate - {Intrinsic::hexagon_S4_vrcrotate_acc, 27704}, // __builtin_HEXAGON_S4_vrcrotate_acc - {Intrinsic::hexagon_S4_vxaddsubh, 27739}, // __builtin_HEXAGON_S4_vxaddsubh - {Intrinsic::hexagon_S4_vxaddsubhr, 27770}, // __builtin_HEXAGON_S4_vxaddsubhr - {Intrinsic::hexagon_S4_vxaddsubw, 27802}, // __builtin_HEXAGON_S4_vxaddsubw - {Intrinsic::hexagon_S4_vxsubaddh, 27833}, // __builtin_HEXAGON_S4_vxsubaddh - {Intrinsic::hexagon_S4_vxsubaddhr, 27864}, // __builtin_HEXAGON_S4_vxsubaddhr - {Intrinsic::hexagon_S4_vxsubaddw, 27896}, // __builtin_HEXAGON_S4_vxsubaddw - {Intrinsic::hexagon_S5_asrhub_rnd_sat_goodsyntax, 27927}, // __builtin_HEXAGON_S5_asrhub_rnd_sat_goodsyntax - {Intrinsic::hexagon_S5_asrhub_sat, 27974}, // __builtin_HEXAGON_S5_asrhub_sat - {Intrinsic::hexagon_S5_popcountp, 28006}, // __builtin_HEXAGON_S5_popcountp - {Intrinsic::hexagon_S5_vasrhrnd_goodsyntax, 28037}, // __builtin_HEXAGON_S5_vasrhrnd_goodsyntax - {Intrinsic::hexagon_S6_rol_i_p, 28078}, // __builtin_HEXAGON_S6_rol_i_p - {Intrinsic::hexagon_S6_rol_i_p_acc, 28107}, // __builtin_HEXAGON_S6_rol_i_p_acc - {Intrinsic::hexagon_S6_rol_i_p_and, 28140}, // __builtin_HEXAGON_S6_rol_i_p_and - {Intrinsic::hexagon_S6_rol_i_p_nac, 28173}, // __builtin_HEXAGON_S6_rol_i_p_nac - {Intrinsic::hexagon_S6_rol_i_p_or, 28206}, // __builtin_HEXAGON_S6_rol_i_p_or - {Intrinsic::hexagon_S6_rol_i_p_xacc, 28238}, // __builtin_HEXAGON_S6_rol_i_p_xacc - {Intrinsic::hexagon_S6_rol_i_r, 28272}, // __builtin_HEXAGON_S6_rol_i_r - {Intrinsic::hexagon_S6_rol_i_r_acc, 28301}, // __builtin_HEXAGON_S6_rol_i_r_acc - {Intrinsic::hexagon_S6_rol_i_r_and, 28334}, // __builtin_HEXAGON_S6_rol_i_r_and - {Intrinsic::hexagon_S6_rol_i_r_nac, 28367}, // __builtin_HEXAGON_S6_rol_i_r_nac - {Intrinsic::hexagon_S6_rol_i_r_or, 28400}, // __builtin_HEXAGON_S6_rol_i_r_or - {Intrinsic::hexagon_S6_rol_i_r_xacc, 28432}, // __builtin_HEXAGON_S6_rol_i_r_xacc - {Intrinsic::hexagon_S6_vsplatrbp, 28466}, // __builtin_HEXAGON_S6_vsplatrbp - {Intrinsic::hexagon_S6_vtrunehb_ppp, 28497}, // __builtin_HEXAGON_S6_vtrunehb_ppp - {Intrinsic::hexagon_S6_vtrunohb_ppp, 28531}, // __builtin_HEXAGON_S6_vtrunohb_ppp - {Intrinsic::hexagon_V6_extractw, 28592}, // __builtin_HEXAGON_V6_extractw - {Intrinsic::hexagon_V6_extractw_128B, 28622}, // __builtin_HEXAGON_V6_extractw_128B - {Intrinsic::hexagon_V6_hi, 28657}, // __builtin_HEXAGON_V6_hi - {Intrinsic::hexagon_V6_hi_128B, 28681}, // __builtin_HEXAGON_V6_hi_128B - {Intrinsic::hexagon_V6_lo, 28710}, // __builtin_HEXAGON_V6_lo - {Intrinsic::hexagon_V6_lo_128B, 28734}, // __builtin_HEXAGON_V6_lo_128B - {Intrinsic::hexagon_V6_lvsplatw, 28763}, // __builtin_HEXAGON_V6_lvsplatw - {Intrinsic::hexagon_V6_lvsplatw_128B, 28793}, // __builtin_HEXAGON_V6_lvsplatw_128B - {Intrinsic::hexagon_V6_pred_and, 28828}, // __builtin_HEXAGON_V6_pred_and - {Intrinsic::hexagon_V6_pred_and_128B, 28858}, // __builtin_HEXAGON_V6_pred_and_128B - {Intrinsic::hexagon_V6_pred_and_n, 28893}, // __builtin_HEXAGON_V6_pred_and_n - {Intrinsic::hexagon_V6_pred_and_n_128B, 28925}, // __builtin_HEXAGON_V6_pred_and_n_128B - {Intrinsic::hexagon_V6_pred_not, 28962}, // __builtin_HEXAGON_V6_pred_not - {Intrinsic::hexagon_V6_pred_not_128B, 28992}, // __builtin_HEXAGON_V6_pred_not_128B - {Intrinsic::hexagon_V6_pred_or, 29027}, // __builtin_HEXAGON_V6_pred_or - {Intrinsic::hexagon_V6_pred_or_128B, 29056}, // __builtin_HEXAGON_V6_pred_or_128B - {Intrinsic::hexagon_V6_pred_or_n, 29090}, // __builtin_HEXAGON_V6_pred_or_n - {Intrinsic::hexagon_V6_pred_or_n_128B, 29121}, // __builtin_HEXAGON_V6_pred_or_n_128B - {Intrinsic::hexagon_V6_pred_scalar2, 29157}, // __builtin_HEXAGON_V6_pred_scalar2 - {Intrinsic::hexagon_V6_pred_scalar2_128B, 29191}, // __builtin_HEXAGON_V6_pred_scalar2_128B - {Intrinsic::hexagon_V6_pred_xor, 29230}, // __builtin_HEXAGON_V6_pred_xor - {Intrinsic::hexagon_V6_pred_xor_128B, 29260}, // __builtin_HEXAGON_V6_pred_xor_128B - {Intrinsic::hexagon_V6_vabsdiffh, 29295}, // __builtin_HEXAGON_V6_vabsdiffh - {Intrinsic::hexagon_V6_vabsdiffh_128B, 29326}, // __builtin_HEXAGON_V6_vabsdiffh_128B - {Intrinsic::hexagon_V6_vabsdiffub, 29362}, // __builtin_HEXAGON_V6_vabsdiffub - {Intrinsic::hexagon_V6_vabsdiffub_128B, 29394}, // __builtin_HEXAGON_V6_vabsdiffub_128B - {Intrinsic::hexagon_V6_vabsdiffuh, 29431}, // __builtin_HEXAGON_V6_vabsdiffuh - {Intrinsic::hexagon_V6_vabsdiffuh_128B, 29463}, // __builtin_HEXAGON_V6_vabsdiffuh_128B - {Intrinsic::hexagon_V6_vabsdiffw, 29500}, // __builtin_HEXAGON_V6_vabsdiffw - {Intrinsic::hexagon_V6_vabsdiffw_128B, 29531}, // __builtin_HEXAGON_V6_vabsdiffw_128B - {Intrinsic::hexagon_V6_vabsh, 29567}, // __builtin_HEXAGON_V6_vabsh - {Intrinsic::hexagon_V6_vabsh_128B, 29594}, // __builtin_HEXAGON_V6_vabsh_128B - {Intrinsic::hexagon_V6_vabsh_sat, 29626}, // __builtin_HEXAGON_V6_vabsh_sat - {Intrinsic::hexagon_V6_vabsh_sat_128B, 29657}, // __builtin_HEXAGON_V6_vabsh_sat_128B - {Intrinsic::hexagon_V6_vabsw, 29693}, // __builtin_HEXAGON_V6_vabsw - {Intrinsic::hexagon_V6_vabsw_128B, 29720}, // __builtin_HEXAGON_V6_vabsw_128B - {Intrinsic::hexagon_V6_vabsw_sat, 29752}, // __builtin_HEXAGON_V6_vabsw_sat - {Intrinsic::hexagon_V6_vabsw_sat_128B, 29783}, // __builtin_HEXAGON_V6_vabsw_sat_128B - {Intrinsic::hexagon_V6_vaddb, 29819}, // __builtin_HEXAGON_V6_vaddb - {Intrinsic::hexagon_V6_vaddb_128B, 29846}, // __builtin_HEXAGON_V6_vaddb_128B - {Intrinsic::hexagon_V6_vaddb_dv, 29878}, // __builtin_HEXAGON_V6_vaddb_dv - {Intrinsic::hexagon_V6_vaddb_dv_128B, 29908}, // __builtin_HEXAGON_V6_vaddb_dv_128B - {Intrinsic::hexagon_V6_vaddbnq, 29943}, // __builtin_HEXAGON_V6_vaddbnq - {Intrinsic::hexagon_V6_vaddbnq_128B, 29972}, // __builtin_HEXAGON_V6_vaddbnq_128B - {Intrinsic::hexagon_V6_vaddbq, 30006}, // __builtin_HEXAGON_V6_vaddbq - {Intrinsic::hexagon_V6_vaddbq_128B, 30034}, // __builtin_HEXAGON_V6_vaddbq_128B - {Intrinsic::hexagon_V6_vaddh, 30067}, // __builtin_HEXAGON_V6_vaddh - {Intrinsic::hexagon_V6_vaddh_128B, 30094}, // __builtin_HEXAGON_V6_vaddh_128B - {Intrinsic::hexagon_V6_vaddh_dv, 30126}, // __builtin_HEXAGON_V6_vaddh_dv - {Intrinsic::hexagon_V6_vaddh_dv_128B, 30156}, // __builtin_HEXAGON_V6_vaddh_dv_128B - {Intrinsic::hexagon_V6_vaddhnq, 30191}, // __builtin_HEXAGON_V6_vaddhnq - {Intrinsic::hexagon_V6_vaddhnq_128B, 30220}, // __builtin_HEXAGON_V6_vaddhnq_128B - {Intrinsic::hexagon_V6_vaddhq, 30254}, // __builtin_HEXAGON_V6_vaddhq - {Intrinsic::hexagon_V6_vaddhq_128B, 30282}, // __builtin_HEXAGON_V6_vaddhq_128B - {Intrinsic::hexagon_V6_vaddhsat, 30315}, // __builtin_HEXAGON_V6_vaddhsat - {Intrinsic::hexagon_V6_vaddhsat_128B, 30345}, // __builtin_HEXAGON_V6_vaddhsat_128B - {Intrinsic::hexagon_V6_vaddhsat_dv, 30380}, // __builtin_HEXAGON_V6_vaddhsat_dv - {Intrinsic::hexagon_V6_vaddhsat_dv_128B, 30413}, // __builtin_HEXAGON_V6_vaddhsat_dv_128B - {Intrinsic::hexagon_V6_vaddhw, 30451}, // __builtin_HEXAGON_V6_vaddhw - {Intrinsic::hexagon_V6_vaddhw_128B, 30479}, // __builtin_HEXAGON_V6_vaddhw_128B - {Intrinsic::hexagon_V6_vaddubh, 30512}, // __builtin_HEXAGON_V6_vaddubh - {Intrinsic::hexagon_V6_vaddubh_128B, 30541}, // __builtin_HEXAGON_V6_vaddubh_128B - {Intrinsic::hexagon_V6_vaddubsat, 30575}, // __builtin_HEXAGON_V6_vaddubsat - {Intrinsic::hexagon_V6_vaddubsat_128B, 30606}, // __builtin_HEXAGON_V6_vaddubsat_128B - {Intrinsic::hexagon_V6_vaddubsat_dv, 30642}, // __builtin_HEXAGON_V6_vaddubsat_dv - {Intrinsic::hexagon_V6_vaddubsat_dv_128B, 30676}, // __builtin_HEXAGON_V6_vaddubsat_dv_128B - {Intrinsic::hexagon_V6_vadduhsat, 30715}, // __builtin_HEXAGON_V6_vadduhsat - {Intrinsic::hexagon_V6_vadduhsat_128B, 30746}, // __builtin_HEXAGON_V6_vadduhsat_128B - {Intrinsic::hexagon_V6_vadduhsat_dv, 30782}, // __builtin_HEXAGON_V6_vadduhsat_dv - {Intrinsic::hexagon_V6_vadduhsat_dv_128B, 30816}, // __builtin_HEXAGON_V6_vadduhsat_dv_128B - {Intrinsic::hexagon_V6_vadduhw, 30855}, // __builtin_HEXAGON_V6_vadduhw - {Intrinsic::hexagon_V6_vadduhw_128B, 30884}, // __builtin_HEXAGON_V6_vadduhw_128B - {Intrinsic::hexagon_V6_vaddw, 30918}, // __builtin_HEXAGON_V6_vaddw - {Intrinsic::hexagon_V6_vaddw_128B, 30945}, // __builtin_HEXAGON_V6_vaddw_128B - {Intrinsic::hexagon_V6_vaddw_dv, 30977}, // __builtin_HEXAGON_V6_vaddw_dv - {Intrinsic::hexagon_V6_vaddw_dv_128B, 31007}, // __builtin_HEXAGON_V6_vaddw_dv_128B - {Intrinsic::hexagon_V6_vaddwnq, 31042}, // __builtin_HEXAGON_V6_vaddwnq - {Intrinsic::hexagon_V6_vaddwnq_128B, 31071}, // __builtin_HEXAGON_V6_vaddwnq_128B - {Intrinsic::hexagon_V6_vaddwq, 31105}, // __builtin_HEXAGON_V6_vaddwq - {Intrinsic::hexagon_V6_vaddwq_128B, 31133}, // __builtin_HEXAGON_V6_vaddwq_128B - {Intrinsic::hexagon_V6_vaddwsat, 31166}, // __builtin_HEXAGON_V6_vaddwsat - {Intrinsic::hexagon_V6_vaddwsat_128B, 31196}, // __builtin_HEXAGON_V6_vaddwsat_128B - {Intrinsic::hexagon_V6_vaddwsat_dv, 31231}, // __builtin_HEXAGON_V6_vaddwsat_dv - {Intrinsic::hexagon_V6_vaddwsat_dv_128B, 31264}, // __builtin_HEXAGON_V6_vaddwsat_dv_128B - {Intrinsic::hexagon_V6_valignb, 31302}, // __builtin_HEXAGON_V6_valignb - {Intrinsic::hexagon_V6_valignb_128B, 31331}, // __builtin_HEXAGON_V6_valignb_128B - {Intrinsic::hexagon_V6_valignbi, 31365}, // __builtin_HEXAGON_V6_valignbi - {Intrinsic::hexagon_V6_valignbi_128B, 31395}, // __builtin_HEXAGON_V6_valignbi_128B - {Intrinsic::hexagon_V6_vand, 31430}, // __builtin_HEXAGON_V6_vand - {Intrinsic::hexagon_V6_vand_128B, 31456}, // __builtin_HEXAGON_V6_vand_128B - {Intrinsic::hexagon_V6_vandqrt, 31487}, // __builtin_HEXAGON_V6_vandqrt - {Intrinsic::hexagon_V6_vandqrt_128B, 31516}, // __builtin_HEXAGON_V6_vandqrt_128B - {Intrinsic::hexagon_V6_vandqrt_acc, 31550}, // __builtin_HEXAGON_V6_vandqrt_acc - {Intrinsic::hexagon_V6_vandqrt_acc_128B, 31583}, // __builtin_HEXAGON_V6_vandqrt_acc_128B - {Intrinsic::hexagon_V6_vandvrt, 31621}, // __builtin_HEXAGON_V6_vandvrt - {Intrinsic::hexagon_V6_vandvrt_128B, 31650}, // __builtin_HEXAGON_V6_vandvrt_128B - {Intrinsic::hexagon_V6_vandvrt_acc, 31684}, // __builtin_HEXAGON_V6_vandvrt_acc - {Intrinsic::hexagon_V6_vandvrt_acc_128B, 31717}, // __builtin_HEXAGON_V6_vandvrt_acc_128B - {Intrinsic::hexagon_V6_vaslh, 31755}, // __builtin_HEXAGON_V6_vaslh - {Intrinsic::hexagon_V6_vaslh_128B, 31782}, // __builtin_HEXAGON_V6_vaslh_128B - {Intrinsic::hexagon_V6_vaslhv, 31814}, // __builtin_HEXAGON_V6_vaslhv - {Intrinsic::hexagon_V6_vaslhv_128B, 31842}, // __builtin_HEXAGON_V6_vaslhv_128B - {Intrinsic::hexagon_V6_vaslw, 31875}, // __builtin_HEXAGON_V6_vaslw - {Intrinsic::hexagon_V6_vaslw_128B, 31902}, // __builtin_HEXAGON_V6_vaslw_128B - {Intrinsic::hexagon_V6_vaslw_acc, 31934}, // __builtin_HEXAGON_V6_vaslw_acc - {Intrinsic::hexagon_V6_vaslw_acc_128B, 31965}, // __builtin_HEXAGON_V6_vaslw_acc_128B - {Intrinsic::hexagon_V6_vaslwv, 32001}, // __builtin_HEXAGON_V6_vaslwv - {Intrinsic::hexagon_V6_vaslwv_128B, 32029}, // __builtin_HEXAGON_V6_vaslwv_128B - {Intrinsic::hexagon_V6_vasrh, 32062}, // __builtin_HEXAGON_V6_vasrh - {Intrinsic::hexagon_V6_vasrh_128B, 32089}, // __builtin_HEXAGON_V6_vasrh_128B - {Intrinsic::hexagon_V6_vasrhbrndsat, 32121}, // __builtin_HEXAGON_V6_vasrhbrndsat - {Intrinsic::hexagon_V6_vasrhbrndsat_128B, 32155}, // __builtin_HEXAGON_V6_vasrhbrndsat_128B - {Intrinsic::hexagon_V6_vasrhubrndsat, 32194}, // __builtin_HEXAGON_V6_vasrhubrndsat - {Intrinsic::hexagon_V6_vasrhubrndsat_128B, 32229}, // __builtin_HEXAGON_V6_vasrhubrndsat_128B - {Intrinsic::hexagon_V6_vasrhubsat, 32269}, // __builtin_HEXAGON_V6_vasrhubsat - {Intrinsic::hexagon_V6_vasrhubsat_128B, 32301}, // __builtin_HEXAGON_V6_vasrhubsat_128B - {Intrinsic::hexagon_V6_vasrhv, 32338}, // __builtin_HEXAGON_V6_vasrhv - {Intrinsic::hexagon_V6_vasrhv_128B, 32366}, // __builtin_HEXAGON_V6_vasrhv_128B - {Intrinsic::hexagon_V6_vasrw, 32399}, // __builtin_HEXAGON_V6_vasrw - {Intrinsic::hexagon_V6_vasrw_128B, 32426}, // __builtin_HEXAGON_V6_vasrw_128B - {Intrinsic::hexagon_V6_vasrw_acc, 32458}, // __builtin_HEXAGON_V6_vasrw_acc - {Intrinsic::hexagon_V6_vasrw_acc_128B, 32489}, // __builtin_HEXAGON_V6_vasrw_acc_128B - {Intrinsic::hexagon_V6_vasrwh, 32525}, // __builtin_HEXAGON_V6_vasrwh - {Intrinsic::hexagon_V6_vasrwh_128B, 32553}, // __builtin_HEXAGON_V6_vasrwh_128B - {Intrinsic::hexagon_V6_vasrwhrndsat, 32586}, // __builtin_HEXAGON_V6_vasrwhrndsat - {Intrinsic::hexagon_V6_vasrwhrndsat_128B, 32620}, // __builtin_HEXAGON_V6_vasrwhrndsat_128B - {Intrinsic::hexagon_V6_vasrwhsat, 32659}, // __builtin_HEXAGON_V6_vasrwhsat - {Intrinsic::hexagon_V6_vasrwhsat_128B, 32690}, // __builtin_HEXAGON_V6_vasrwhsat_128B - {Intrinsic::hexagon_V6_vasrwuhsat, 32726}, // __builtin_HEXAGON_V6_vasrwuhsat - {Intrinsic::hexagon_V6_vasrwuhsat_128B, 32758}, // __builtin_HEXAGON_V6_vasrwuhsat_128B - {Intrinsic::hexagon_V6_vasrwv, 32795}, // __builtin_HEXAGON_V6_vasrwv - {Intrinsic::hexagon_V6_vasrwv_128B, 32823}, // __builtin_HEXAGON_V6_vasrwv_128B - {Intrinsic::hexagon_V6_vassign, 32856}, // __builtin_HEXAGON_V6_vassign - {Intrinsic::hexagon_V6_vassign_128B, 32885}, // __builtin_HEXAGON_V6_vassign_128B - {Intrinsic::hexagon_V6_vassignp, 32919}, // __builtin_HEXAGON_V6_vassignp - {Intrinsic::hexagon_V6_vassignp_128B, 32949}, // __builtin_HEXAGON_V6_vassignp_128B - {Intrinsic::hexagon_V6_vavgh, 32984}, // __builtin_HEXAGON_V6_vavgh - {Intrinsic::hexagon_V6_vavgh_128B, 33011}, // __builtin_HEXAGON_V6_vavgh_128B - {Intrinsic::hexagon_V6_vavghrnd, 33043}, // __builtin_HEXAGON_V6_vavghrnd - {Intrinsic::hexagon_V6_vavghrnd_128B, 33073}, // __builtin_HEXAGON_V6_vavghrnd_128B - {Intrinsic::hexagon_V6_vavgub, 33108}, // __builtin_HEXAGON_V6_vavgub - {Intrinsic::hexagon_V6_vavgub_128B, 33136}, // __builtin_HEXAGON_V6_vavgub_128B - {Intrinsic::hexagon_V6_vavgubrnd, 33169}, // __builtin_HEXAGON_V6_vavgubrnd - {Intrinsic::hexagon_V6_vavgubrnd_128B, 33200}, // __builtin_HEXAGON_V6_vavgubrnd_128B - {Intrinsic::hexagon_V6_vavguh, 33236}, // __builtin_HEXAGON_V6_vavguh - {Intrinsic::hexagon_V6_vavguh_128B, 33264}, // __builtin_HEXAGON_V6_vavguh_128B - {Intrinsic::hexagon_V6_vavguhrnd, 33297}, // __builtin_HEXAGON_V6_vavguhrnd - {Intrinsic::hexagon_V6_vavguhrnd_128B, 33328}, // __builtin_HEXAGON_V6_vavguhrnd_128B - {Intrinsic::hexagon_V6_vavgw, 33364}, // __builtin_HEXAGON_V6_vavgw - {Intrinsic::hexagon_V6_vavgw_128B, 33391}, // __builtin_HEXAGON_V6_vavgw_128B - {Intrinsic::hexagon_V6_vavgwrnd, 33423}, // __builtin_HEXAGON_V6_vavgwrnd - {Intrinsic::hexagon_V6_vavgwrnd_128B, 33453}, // __builtin_HEXAGON_V6_vavgwrnd_128B - {Intrinsic::hexagon_V6_vcl0h, 33488}, // __builtin_HEXAGON_V6_vcl0h - {Intrinsic::hexagon_V6_vcl0h_128B, 33515}, // __builtin_HEXAGON_V6_vcl0h_128B - {Intrinsic::hexagon_V6_vcl0w, 33547}, // __builtin_HEXAGON_V6_vcl0w - {Intrinsic::hexagon_V6_vcl0w_128B, 33574}, // __builtin_HEXAGON_V6_vcl0w_128B - {Intrinsic::hexagon_V6_vcombine, 33606}, // __builtin_HEXAGON_V6_vcombine - {Intrinsic::hexagon_V6_vcombine_128B, 33636}, // __builtin_HEXAGON_V6_vcombine_128B - {Intrinsic::hexagon_V6_vd0, 33671}, // __builtin_HEXAGON_V6_vd0 - {Intrinsic::hexagon_V6_vd0_128B, 33696}, // __builtin_HEXAGON_V6_vd0_128B - {Intrinsic::hexagon_V6_vdealb, 33726}, // __builtin_HEXAGON_V6_vdealb - {Intrinsic::hexagon_V6_vdealb4w, 33787}, // __builtin_HEXAGON_V6_vdealb4w - {Intrinsic::hexagon_V6_vdealb4w_128B, 33817}, // __builtin_HEXAGON_V6_vdealb4w_128B - {Intrinsic::hexagon_V6_vdealb_128B, 33754}, // __builtin_HEXAGON_V6_vdealb_128B - {Intrinsic::hexagon_V6_vdealh, 33852}, // __builtin_HEXAGON_V6_vdealh - {Intrinsic::hexagon_V6_vdealh_128B, 33880}, // __builtin_HEXAGON_V6_vdealh_128B - {Intrinsic::hexagon_V6_vdealvdd, 33913}, // __builtin_HEXAGON_V6_vdealvdd - {Intrinsic::hexagon_V6_vdealvdd_128B, 33943}, // __builtin_HEXAGON_V6_vdealvdd_128B - {Intrinsic::hexagon_V6_vdelta, 33978}, // __builtin_HEXAGON_V6_vdelta - {Intrinsic::hexagon_V6_vdelta_128B, 34006}, // __builtin_HEXAGON_V6_vdelta_128B - {Intrinsic::hexagon_V6_vdmpybus, 34039}, // __builtin_HEXAGON_V6_vdmpybus - {Intrinsic::hexagon_V6_vdmpybus_128B, 34069}, // __builtin_HEXAGON_V6_vdmpybus_128B - {Intrinsic::hexagon_V6_vdmpybus_acc, 34104}, // __builtin_HEXAGON_V6_vdmpybus_acc - {Intrinsic::hexagon_V6_vdmpybus_acc_128B, 34138}, // __builtin_HEXAGON_V6_vdmpybus_acc_128B - {Intrinsic::hexagon_V6_vdmpybus_dv, 34177}, // __builtin_HEXAGON_V6_vdmpybus_dv - {Intrinsic::hexagon_V6_vdmpybus_dv_128B, 34210}, // __builtin_HEXAGON_V6_vdmpybus_dv_128B - {Intrinsic::hexagon_V6_vdmpybus_dv_acc, 34248}, // __builtin_HEXAGON_V6_vdmpybus_dv_acc - {Intrinsic::hexagon_V6_vdmpybus_dv_acc_128B, 34285}, // __builtin_HEXAGON_V6_vdmpybus_dv_acc_128B - {Intrinsic::hexagon_V6_vdmpyhb, 34327}, // __builtin_HEXAGON_V6_vdmpyhb - {Intrinsic::hexagon_V6_vdmpyhb_128B, 34356}, // __builtin_HEXAGON_V6_vdmpyhb_128B - {Intrinsic::hexagon_V6_vdmpyhb_acc, 34390}, // __builtin_HEXAGON_V6_vdmpyhb_acc - {Intrinsic::hexagon_V6_vdmpyhb_acc_128B, 34423}, // __builtin_HEXAGON_V6_vdmpyhb_acc_128B - {Intrinsic::hexagon_V6_vdmpyhb_dv, 34461}, // __builtin_HEXAGON_V6_vdmpyhb_dv - {Intrinsic::hexagon_V6_vdmpyhb_dv_128B, 34493}, // __builtin_HEXAGON_V6_vdmpyhb_dv_128B - {Intrinsic::hexagon_V6_vdmpyhb_dv_acc, 34530}, // __builtin_HEXAGON_V6_vdmpyhb_dv_acc - {Intrinsic::hexagon_V6_vdmpyhb_dv_acc_128B, 34566}, // __builtin_HEXAGON_V6_vdmpyhb_dv_acc_128B - {Intrinsic::hexagon_V6_vdmpyhisat, 34607}, // __builtin_HEXAGON_V6_vdmpyhisat - {Intrinsic::hexagon_V6_vdmpyhisat_128B, 34639}, // __builtin_HEXAGON_V6_vdmpyhisat_128B - {Intrinsic::hexagon_V6_vdmpyhisat_acc, 34676}, // __builtin_HEXAGON_V6_vdmpyhisat_acc - {Intrinsic::hexagon_V6_vdmpyhisat_acc_128B, 34712}, // __builtin_HEXAGON_V6_vdmpyhisat_acc_128B - {Intrinsic::hexagon_V6_vdmpyhsat, 34753}, // __builtin_HEXAGON_V6_vdmpyhsat - {Intrinsic::hexagon_V6_vdmpyhsat_128B, 34784}, // __builtin_HEXAGON_V6_vdmpyhsat_128B - {Intrinsic::hexagon_V6_vdmpyhsat_acc, 34820}, // __builtin_HEXAGON_V6_vdmpyhsat_acc - {Intrinsic::hexagon_V6_vdmpyhsat_acc_128B, 34855}, // __builtin_HEXAGON_V6_vdmpyhsat_acc_128B - {Intrinsic::hexagon_V6_vdmpyhsuisat, 34895}, // __builtin_HEXAGON_V6_vdmpyhsuisat - {Intrinsic::hexagon_V6_vdmpyhsuisat_128B, 34929}, // __builtin_HEXAGON_V6_vdmpyhsuisat_128B - {Intrinsic::hexagon_V6_vdmpyhsuisat_acc, 34968}, // __builtin_HEXAGON_V6_vdmpyhsuisat_acc - {Intrinsic::hexagon_V6_vdmpyhsuisat_acc_128B, 35006}, // __builtin_HEXAGON_V6_vdmpyhsuisat_acc_128B - {Intrinsic::hexagon_V6_vdmpyhsusat, 35049}, // __builtin_HEXAGON_V6_vdmpyhsusat - {Intrinsic::hexagon_V6_vdmpyhsusat_128B, 35082}, // __builtin_HEXAGON_V6_vdmpyhsusat_128B - {Intrinsic::hexagon_V6_vdmpyhsusat_acc, 35120}, // __builtin_HEXAGON_V6_vdmpyhsusat_acc - {Intrinsic::hexagon_V6_vdmpyhsusat_acc_128B, 35157}, // __builtin_HEXAGON_V6_vdmpyhsusat_acc_128B - {Intrinsic::hexagon_V6_vdmpyhvsat, 35199}, // __builtin_HEXAGON_V6_vdmpyhvsat - {Intrinsic::hexagon_V6_vdmpyhvsat_128B, 35231}, // __builtin_HEXAGON_V6_vdmpyhvsat_128B - {Intrinsic::hexagon_V6_vdmpyhvsat_acc, 35268}, // __builtin_HEXAGON_V6_vdmpyhvsat_acc - {Intrinsic::hexagon_V6_vdmpyhvsat_acc_128B, 35304}, // __builtin_HEXAGON_V6_vdmpyhvsat_acc_128B - {Intrinsic::hexagon_V6_vdsaduh, 35345}, // __builtin_HEXAGON_V6_vdsaduh - {Intrinsic::hexagon_V6_vdsaduh_128B, 35374}, // __builtin_HEXAGON_V6_vdsaduh_128B - {Intrinsic::hexagon_V6_vdsaduh_acc, 35408}, // __builtin_HEXAGON_V6_vdsaduh_acc - {Intrinsic::hexagon_V6_vdsaduh_acc_128B, 35441}, // __builtin_HEXAGON_V6_vdsaduh_acc_128B - {Intrinsic::hexagon_V6_veqb, 35479}, // __builtin_HEXAGON_V6_veqb - {Intrinsic::hexagon_V6_veqb_128B, 35505}, // __builtin_HEXAGON_V6_veqb_128B - {Intrinsic::hexagon_V6_veqb_and, 35536}, // __builtin_HEXAGON_V6_veqb_and - {Intrinsic::hexagon_V6_veqb_and_128B, 35566}, // __builtin_HEXAGON_V6_veqb_and_128B - {Intrinsic::hexagon_V6_veqb_or, 35601}, // __builtin_HEXAGON_V6_veqb_or - {Intrinsic::hexagon_V6_veqb_or_128B, 35630}, // __builtin_HEXAGON_V6_veqb_or_128B - {Intrinsic::hexagon_V6_veqb_xor, 35664}, // __builtin_HEXAGON_V6_veqb_xor - {Intrinsic::hexagon_V6_veqb_xor_128B, 35694}, // __builtin_HEXAGON_V6_veqb_xor_128B - {Intrinsic::hexagon_V6_veqh, 35729}, // __builtin_HEXAGON_V6_veqh - {Intrinsic::hexagon_V6_veqh_128B, 35755}, // __builtin_HEXAGON_V6_veqh_128B - {Intrinsic::hexagon_V6_veqh_and, 35786}, // __builtin_HEXAGON_V6_veqh_and - {Intrinsic::hexagon_V6_veqh_and_128B, 35816}, // __builtin_HEXAGON_V6_veqh_and_128B - {Intrinsic::hexagon_V6_veqh_or, 35851}, // __builtin_HEXAGON_V6_veqh_or - {Intrinsic::hexagon_V6_veqh_or_128B, 35880}, // __builtin_HEXAGON_V6_veqh_or_128B - {Intrinsic::hexagon_V6_veqh_xor, 35914}, // __builtin_HEXAGON_V6_veqh_xor - {Intrinsic::hexagon_V6_veqh_xor_128B, 35944}, // __builtin_HEXAGON_V6_veqh_xor_128B - {Intrinsic::hexagon_V6_veqw, 35979}, // __builtin_HEXAGON_V6_veqw - {Intrinsic::hexagon_V6_veqw_128B, 36005}, // __builtin_HEXAGON_V6_veqw_128B - {Intrinsic::hexagon_V6_veqw_and, 36036}, // __builtin_HEXAGON_V6_veqw_and - {Intrinsic::hexagon_V6_veqw_and_128B, 36066}, // __builtin_HEXAGON_V6_veqw_and_128B - {Intrinsic::hexagon_V6_veqw_or, 36101}, // __builtin_HEXAGON_V6_veqw_or - {Intrinsic::hexagon_V6_veqw_or_128B, 36130}, // __builtin_HEXAGON_V6_veqw_or_128B - {Intrinsic::hexagon_V6_veqw_xor, 36164}, // __builtin_HEXAGON_V6_veqw_xor - {Intrinsic::hexagon_V6_veqw_xor_128B, 36194}, // __builtin_HEXAGON_V6_veqw_xor_128B - {Intrinsic::hexagon_V6_vgtb, 36229}, // __builtin_HEXAGON_V6_vgtb - {Intrinsic::hexagon_V6_vgtb_128B, 36255}, // __builtin_HEXAGON_V6_vgtb_128B - {Intrinsic::hexagon_V6_vgtb_and, 36286}, // __builtin_HEXAGON_V6_vgtb_and - {Intrinsic::hexagon_V6_vgtb_and_128B, 36316}, // __builtin_HEXAGON_V6_vgtb_and_128B - {Intrinsic::hexagon_V6_vgtb_or, 36351}, // __builtin_HEXAGON_V6_vgtb_or - {Intrinsic::hexagon_V6_vgtb_or_128B, 36380}, // __builtin_HEXAGON_V6_vgtb_or_128B - {Intrinsic::hexagon_V6_vgtb_xor, 36414}, // __builtin_HEXAGON_V6_vgtb_xor - {Intrinsic::hexagon_V6_vgtb_xor_128B, 36444}, // __builtin_HEXAGON_V6_vgtb_xor_128B - {Intrinsic::hexagon_V6_vgth, 36479}, // __builtin_HEXAGON_V6_vgth - {Intrinsic::hexagon_V6_vgth_128B, 36505}, // __builtin_HEXAGON_V6_vgth_128B - {Intrinsic::hexagon_V6_vgth_and, 36536}, // __builtin_HEXAGON_V6_vgth_and - {Intrinsic::hexagon_V6_vgth_and_128B, 36566}, // __builtin_HEXAGON_V6_vgth_and_128B - {Intrinsic::hexagon_V6_vgth_or, 36601}, // __builtin_HEXAGON_V6_vgth_or - {Intrinsic::hexagon_V6_vgth_or_128B, 36630}, // __builtin_HEXAGON_V6_vgth_or_128B - {Intrinsic::hexagon_V6_vgth_xor, 36664}, // __builtin_HEXAGON_V6_vgth_xor - {Intrinsic::hexagon_V6_vgth_xor_128B, 36694}, // __builtin_HEXAGON_V6_vgth_xor_128B - {Intrinsic::hexagon_V6_vgtub, 36729}, // __builtin_HEXAGON_V6_vgtub - {Intrinsic::hexagon_V6_vgtub_128B, 36756}, // __builtin_HEXAGON_V6_vgtub_128B - {Intrinsic::hexagon_V6_vgtub_and, 36788}, // __builtin_HEXAGON_V6_vgtub_and - {Intrinsic::hexagon_V6_vgtub_and_128B, 36819}, // __builtin_HEXAGON_V6_vgtub_and_128B - {Intrinsic::hexagon_V6_vgtub_or, 36855}, // __builtin_HEXAGON_V6_vgtub_or - {Intrinsic::hexagon_V6_vgtub_or_128B, 36885}, // __builtin_HEXAGON_V6_vgtub_or_128B - {Intrinsic::hexagon_V6_vgtub_xor, 36920}, // __builtin_HEXAGON_V6_vgtub_xor - {Intrinsic::hexagon_V6_vgtub_xor_128B, 36951}, // __builtin_HEXAGON_V6_vgtub_xor_128B - {Intrinsic::hexagon_V6_vgtuh, 36987}, // __builtin_HEXAGON_V6_vgtuh - {Intrinsic::hexagon_V6_vgtuh_128B, 37014}, // __builtin_HEXAGON_V6_vgtuh_128B - {Intrinsic::hexagon_V6_vgtuh_and, 37046}, // __builtin_HEXAGON_V6_vgtuh_and - {Intrinsic::hexagon_V6_vgtuh_and_128B, 37077}, // __builtin_HEXAGON_V6_vgtuh_and_128B - {Intrinsic::hexagon_V6_vgtuh_or, 37113}, // __builtin_HEXAGON_V6_vgtuh_or - {Intrinsic::hexagon_V6_vgtuh_or_128B, 37143}, // __builtin_HEXAGON_V6_vgtuh_or_128B - {Intrinsic::hexagon_V6_vgtuh_xor, 37178}, // __builtin_HEXAGON_V6_vgtuh_xor - {Intrinsic::hexagon_V6_vgtuh_xor_128B, 37209}, // __builtin_HEXAGON_V6_vgtuh_xor_128B - {Intrinsic::hexagon_V6_vgtuw, 37245}, // __builtin_HEXAGON_V6_vgtuw - {Intrinsic::hexagon_V6_vgtuw_128B, 37272}, // __builtin_HEXAGON_V6_vgtuw_128B - {Intrinsic::hexagon_V6_vgtuw_and, 37304}, // __builtin_HEXAGON_V6_vgtuw_and - {Intrinsic::hexagon_V6_vgtuw_and_128B, 37335}, // __builtin_HEXAGON_V6_vgtuw_and_128B - {Intrinsic::hexagon_V6_vgtuw_or, 37371}, // __builtin_HEXAGON_V6_vgtuw_or - {Intrinsic::hexagon_V6_vgtuw_or_128B, 37401}, // __builtin_HEXAGON_V6_vgtuw_or_128B - {Intrinsic::hexagon_V6_vgtuw_xor, 37436}, // __builtin_HEXAGON_V6_vgtuw_xor - {Intrinsic::hexagon_V6_vgtuw_xor_128B, 37467}, // __builtin_HEXAGON_V6_vgtuw_xor_128B - {Intrinsic::hexagon_V6_vgtw, 37503}, // __builtin_HEXAGON_V6_vgtw - {Intrinsic::hexagon_V6_vgtw_128B, 37529}, // __builtin_HEXAGON_V6_vgtw_128B - {Intrinsic::hexagon_V6_vgtw_and, 37560}, // __builtin_HEXAGON_V6_vgtw_and - {Intrinsic::hexagon_V6_vgtw_and_128B, 37590}, // __builtin_HEXAGON_V6_vgtw_and_128B - {Intrinsic::hexagon_V6_vgtw_or, 37625}, // __builtin_HEXAGON_V6_vgtw_or - {Intrinsic::hexagon_V6_vgtw_or_128B, 37654}, // __builtin_HEXAGON_V6_vgtw_or_128B - {Intrinsic::hexagon_V6_vgtw_xor, 37688}, // __builtin_HEXAGON_V6_vgtw_xor - {Intrinsic::hexagon_V6_vgtw_xor_128B, 37718}, // __builtin_HEXAGON_V6_vgtw_xor_128B - {Intrinsic::hexagon_V6_vinsertwr, 37753}, // __builtin_HEXAGON_V6_vinsertwr - {Intrinsic::hexagon_V6_vinsertwr_128B, 37784}, // __builtin_HEXAGON_V6_vinsertwr_128B - {Intrinsic::hexagon_V6_vlalignb, 37820}, // __builtin_HEXAGON_V6_vlalignb - {Intrinsic::hexagon_V6_vlalignb_128B, 37850}, // __builtin_HEXAGON_V6_vlalignb_128B - {Intrinsic::hexagon_V6_vlalignbi, 37885}, // __builtin_HEXAGON_V6_vlalignbi - {Intrinsic::hexagon_V6_vlalignbi_128B, 37916}, // __builtin_HEXAGON_V6_vlalignbi_128B - {Intrinsic::hexagon_V6_vlsrh, 37952}, // __builtin_HEXAGON_V6_vlsrh - {Intrinsic::hexagon_V6_vlsrh_128B, 37979}, // __builtin_HEXAGON_V6_vlsrh_128B - {Intrinsic::hexagon_V6_vlsrhv, 38011}, // __builtin_HEXAGON_V6_vlsrhv - {Intrinsic::hexagon_V6_vlsrhv_128B, 38039}, // __builtin_HEXAGON_V6_vlsrhv_128B - {Intrinsic::hexagon_V6_vlsrw, 38072}, // __builtin_HEXAGON_V6_vlsrw - {Intrinsic::hexagon_V6_vlsrw_128B, 38099}, // __builtin_HEXAGON_V6_vlsrw_128B - {Intrinsic::hexagon_V6_vlsrwv, 38131}, // __builtin_HEXAGON_V6_vlsrwv - {Intrinsic::hexagon_V6_vlsrwv_128B, 38159}, // __builtin_HEXAGON_V6_vlsrwv_128B - {Intrinsic::hexagon_V6_vlutb, 38192}, // __builtin_HEXAGON_V6_vlutb - {Intrinsic::hexagon_V6_vlutb_128B, 38219}, // __builtin_HEXAGON_V6_vlutb_128B - {Intrinsic::hexagon_V6_vlutb_acc, 38251}, // __builtin_HEXAGON_V6_vlutb_acc - {Intrinsic::hexagon_V6_vlutb_acc_128B, 38282}, // __builtin_HEXAGON_V6_vlutb_acc_128B - {Intrinsic::hexagon_V6_vlutb_dv, 38318}, // __builtin_HEXAGON_V6_vlutb_dv - {Intrinsic::hexagon_V6_vlutb_dv_128B, 38348}, // __builtin_HEXAGON_V6_vlutb_dv_128B - {Intrinsic::hexagon_V6_vlutb_dv_acc, 38383}, // __builtin_HEXAGON_V6_vlutb_dv_acc - {Intrinsic::hexagon_V6_vlutb_dv_acc_128B, 38417}, // __builtin_HEXAGON_V6_vlutb_dv_acc_128B - {Intrinsic::hexagon_V6_vlutvvb, 38456}, // __builtin_HEXAGON_V6_vlutvvb - {Intrinsic::hexagon_V6_vlutvvb_128B, 38485}, // __builtin_HEXAGON_V6_vlutvvb_128B - {Intrinsic::hexagon_V6_vlutvvb_oracc, 38519}, // __builtin_HEXAGON_V6_vlutvvb_oracc - {Intrinsic::hexagon_V6_vlutvvb_oracc_128B, 38554}, // __builtin_HEXAGON_V6_vlutvvb_oracc_128B - {Intrinsic::hexagon_V6_vlutvwh, 38594}, // __builtin_HEXAGON_V6_vlutvwh - {Intrinsic::hexagon_V6_vlutvwh_128B, 38623}, // __builtin_HEXAGON_V6_vlutvwh_128B - {Intrinsic::hexagon_V6_vlutvwh_oracc, 38657}, // __builtin_HEXAGON_V6_vlutvwh_oracc - {Intrinsic::hexagon_V6_vlutvwh_oracc_128B, 38692}, // __builtin_HEXAGON_V6_vlutvwh_oracc_128B - {Intrinsic::hexagon_V6_vmaxh, 38732}, // __builtin_HEXAGON_V6_vmaxh - {Intrinsic::hexagon_V6_vmaxh_128B, 38759}, // __builtin_HEXAGON_V6_vmaxh_128B - {Intrinsic::hexagon_V6_vmaxub, 38791}, // __builtin_HEXAGON_V6_vmaxub - {Intrinsic::hexagon_V6_vmaxub_128B, 38819}, // __builtin_HEXAGON_V6_vmaxub_128B - {Intrinsic::hexagon_V6_vmaxuh, 38852}, // __builtin_HEXAGON_V6_vmaxuh - {Intrinsic::hexagon_V6_vmaxuh_128B, 38880}, // __builtin_HEXAGON_V6_vmaxuh_128B - {Intrinsic::hexagon_V6_vmaxw, 38913}, // __builtin_HEXAGON_V6_vmaxw - {Intrinsic::hexagon_V6_vmaxw_128B, 38940}, // __builtin_HEXAGON_V6_vmaxw_128B - {Intrinsic::hexagon_V6_vminh, 38972}, // __builtin_HEXAGON_V6_vminh - {Intrinsic::hexagon_V6_vminh_128B, 38999}, // __builtin_HEXAGON_V6_vminh_128B - {Intrinsic::hexagon_V6_vminub, 39031}, // __builtin_HEXAGON_V6_vminub - {Intrinsic::hexagon_V6_vminub_128B, 39059}, // __builtin_HEXAGON_V6_vminub_128B - {Intrinsic::hexagon_V6_vminuh, 39092}, // __builtin_HEXAGON_V6_vminuh - {Intrinsic::hexagon_V6_vminuh_128B, 39120}, // __builtin_HEXAGON_V6_vminuh_128B - {Intrinsic::hexagon_V6_vminw, 39153}, // __builtin_HEXAGON_V6_vminw - {Intrinsic::hexagon_V6_vminw_128B, 39180}, // __builtin_HEXAGON_V6_vminw_128B - {Intrinsic::hexagon_V6_vmpabus, 39212}, // __builtin_HEXAGON_V6_vmpabus - {Intrinsic::hexagon_V6_vmpabus_128B, 39241}, // __builtin_HEXAGON_V6_vmpabus_128B - {Intrinsic::hexagon_V6_vmpabus_acc, 39275}, // __builtin_HEXAGON_V6_vmpabus_acc - {Intrinsic::hexagon_V6_vmpabus_acc_128B, 39308}, // __builtin_HEXAGON_V6_vmpabus_acc_128B - {Intrinsic::hexagon_V6_vmpabusv, 39346}, // __builtin_HEXAGON_V6_vmpabusv - {Intrinsic::hexagon_V6_vmpabusv_128B, 39376}, // __builtin_HEXAGON_V6_vmpabusv_128B - {Intrinsic::hexagon_V6_vmpabuuv, 39411}, // __builtin_HEXAGON_V6_vmpabuuv - {Intrinsic::hexagon_V6_vmpabuuv_128B, 39441}, // __builtin_HEXAGON_V6_vmpabuuv_128B - {Intrinsic::hexagon_V6_vmpahb, 39476}, // __builtin_HEXAGON_V6_vmpahb - {Intrinsic::hexagon_V6_vmpahb_128B, 39504}, // __builtin_HEXAGON_V6_vmpahb_128B - {Intrinsic::hexagon_V6_vmpahb_acc, 39537}, // __builtin_HEXAGON_V6_vmpahb_acc - {Intrinsic::hexagon_V6_vmpahb_acc_128B, 39569}, // __builtin_HEXAGON_V6_vmpahb_acc_128B - {Intrinsic::hexagon_V6_vmpybus, 39606}, // __builtin_HEXAGON_V6_vmpybus - {Intrinsic::hexagon_V6_vmpybus_128B, 39635}, // __builtin_HEXAGON_V6_vmpybus_128B - {Intrinsic::hexagon_V6_vmpybus_acc, 39669}, // __builtin_HEXAGON_V6_vmpybus_acc - {Intrinsic::hexagon_V6_vmpybus_acc_128B, 39702}, // __builtin_HEXAGON_V6_vmpybus_acc_128B - {Intrinsic::hexagon_V6_vmpybusv, 39740}, // __builtin_HEXAGON_V6_vmpybusv - {Intrinsic::hexagon_V6_vmpybusv_128B, 39770}, // __builtin_HEXAGON_V6_vmpybusv_128B - {Intrinsic::hexagon_V6_vmpybusv_acc, 39805}, // __builtin_HEXAGON_V6_vmpybusv_acc - {Intrinsic::hexagon_V6_vmpybusv_acc_128B, 39839}, // __builtin_HEXAGON_V6_vmpybusv_acc_128B - {Intrinsic::hexagon_V6_vmpybv, 39878}, // __builtin_HEXAGON_V6_vmpybv - {Intrinsic::hexagon_V6_vmpybv_128B, 39906}, // __builtin_HEXAGON_V6_vmpybv_128B - {Intrinsic::hexagon_V6_vmpybv_acc, 39939}, // __builtin_HEXAGON_V6_vmpybv_acc - {Intrinsic::hexagon_V6_vmpybv_acc_128B, 39971}, // __builtin_HEXAGON_V6_vmpybv_acc_128B - {Intrinsic::hexagon_V6_vmpyewuh, 40008}, // __builtin_HEXAGON_V6_vmpyewuh - {Intrinsic::hexagon_V6_vmpyewuh_128B, 40038}, // __builtin_HEXAGON_V6_vmpyewuh_128B - {Intrinsic::hexagon_V6_vmpyh, 40073}, // __builtin_HEXAGON_V6_vmpyh - {Intrinsic::hexagon_V6_vmpyh_128B, 40100}, // __builtin_HEXAGON_V6_vmpyh_128B - {Intrinsic::hexagon_V6_vmpyhsat_acc, 40132}, // __builtin_HEXAGON_V6_vmpyhsat_acc - {Intrinsic::hexagon_V6_vmpyhsat_acc_128B, 40166}, // __builtin_HEXAGON_V6_vmpyhsat_acc_128B - {Intrinsic::hexagon_V6_vmpyhsrs, 40205}, // __builtin_HEXAGON_V6_vmpyhsrs - {Intrinsic::hexagon_V6_vmpyhsrs_128B, 40235}, // __builtin_HEXAGON_V6_vmpyhsrs_128B - {Intrinsic::hexagon_V6_vmpyhss, 40270}, // __builtin_HEXAGON_V6_vmpyhss - {Intrinsic::hexagon_V6_vmpyhss_128B, 40299}, // __builtin_HEXAGON_V6_vmpyhss_128B - {Intrinsic::hexagon_V6_vmpyhus, 40333}, // __builtin_HEXAGON_V6_vmpyhus - {Intrinsic::hexagon_V6_vmpyhus_128B, 40362}, // __builtin_HEXAGON_V6_vmpyhus_128B - {Intrinsic::hexagon_V6_vmpyhus_acc, 40396}, // __builtin_HEXAGON_V6_vmpyhus_acc - {Intrinsic::hexagon_V6_vmpyhus_acc_128B, 40429}, // __builtin_HEXAGON_V6_vmpyhus_acc_128B - {Intrinsic::hexagon_V6_vmpyhv, 40467}, // __builtin_HEXAGON_V6_vmpyhv - {Intrinsic::hexagon_V6_vmpyhv_128B, 40495}, // __builtin_HEXAGON_V6_vmpyhv_128B - {Intrinsic::hexagon_V6_vmpyhv_acc, 40528}, // __builtin_HEXAGON_V6_vmpyhv_acc - {Intrinsic::hexagon_V6_vmpyhv_acc_128B, 40560}, // __builtin_HEXAGON_V6_vmpyhv_acc_128B - {Intrinsic::hexagon_V6_vmpyhvsrs, 40597}, // __builtin_HEXAGON_V6_vmpyhvsrs - {Intrinsic::hexagon_V6_vmpyhvsrs_128B, 40628}, // __builtin_HEXAGON_V6_vmpyhvsrs_128B - {Intrinsic::hexagon_V6_vmpyieoh, 40664}, // __builtin_HEXAGON_V6_vmpyieoh - {Intrinsic::hexagon_V6_vmpyieoh_128B, 40694}, // __builtin_HEXAGON_V6_vmpyieoh_128B - {Intrinsic::hexagon_V6_vmpyiewh_acc, 40729}, // __builtin_HEXAGON_V6_vmpyiewh_acc - {Intrinsic::hexagon_V6_vmpyiewh_acc_128B, 40763}, // __builtin_HEXAGON_V6_vmpyiewh_acc_128B - {Intrinsic::hexagon_V6_vmpyiewuh, 40802}, // __builtin_HEXAGON_V6_vmpyiewuh - {Intrinsic::hexagon_V6_vmpyiewuh_128B, 40833}, // __builtin_HEXAGON_V6_vmpyiewuh_128B - {Intrinsic::hexagon_V6_vmpyiewuh_acc, 40869}, // __builtin_HEXAGON_V6_vmpyiewuh_acc - {Intrinsic::hexagon_V6_vmpyiewuh_acc_128B, 40904}, // __builtin_HEXAGON_V6_vmpyiewuh_acc_128B - {Intrinsic::hexagon_V6_vmpyih, 40944}, // __builtin_HEXAGON_V6_vmpyih - {Intrinsic::hexagon_V6_vmpyih_128B, 40972}, // __builtin_HEXAGON_V6_vmpyih_128B - {Intrinsic::hexagon_V6_vmpyih_acc, 41005}, // __builtin_HEXAGON_V6_vmpyih_acc - {Intrinsic::hexagon_V6_vmpyih_acc_128B, 41037}, // __builtin_HEXAGON_V6_vmpyih_acc_128B - {Intrinsic::hexagon_V6_vmpyihb, 41074}, // __builtin_HEXAGON_V6_vmpyihb - {Intrinsic::hexagon_V6_vmpyihb_128B, 41103}, // __builtin_HEXAGON_V6_vmpyihb_128B - {Intrinsic::hexagon_V6_vmpyihb_acc, 41137}, // __builtin_HEXAGON_V6_vmpyihb_acc - {Intrinsic::hexagon_V6_vmpyihb_acc_128B, 41170}, // __builtin_HEXAGON_V6_vmpyihb_acc_128B - {Intrinsic::hexagon_V6_vmpyiowh, 41208}, // __builtin_HEXAGON_V6_vmpyiowh - {Intrinsic::hexagon_V6_vmpyiowh_128B, 41238}, // __builtin_HEXAGON_V6_vmpyiowh_128B - {Intrinsic::hexagon_V6_vmpyiwb, 41273}, // __builtin_HEXAGON_V6_vmpyiwb - {Intrinsic::hexagon_V6_vmpyiwb_128B, 41302}, // __builtin_HEXAGON_V6_vmpyiwb_128B - {Intrinsic::hexagon_V6_vmpyiwb_acc, 41336}, // __builtin_HEXAGON_V6_vmpyiwb_acc - {Intrinsic::hexagon_V6_vmpyiwb_acc_128B, 41369}, // __builtin_HEXAGON_V6_vmpyiwb_acc_128B - {Intrinsic::hexagon_V6_vmpyiwh, 41407}, // __builtin_HEXAGON_V6_vmpyiwh - {Intrinsic::hexagon_V6_vmpyiwh_128B, 41436}, // __builtin_HEXAGON_V6_vmpyiwh_128B - {Intrinsic::hexagon_V6_vmpyiwh_acc, 41470}, // __builtin_HEXAGON_V6_vmpyiwh_acc - {Intrinsic::hexagon_V6_vmpyiwh_acc_128B, 41503}, // __builtin_HEXAGON_V6_vmpyiwh_acc_128B - {Intrinsic::hexagon_V6_vmpyowh, 41541}, // __builtin_HEXAGON_V6_vmpyowh - {Intrinsic::hexagon_V6_vmpyowh_128B, 41570}, // __builtin_HEXAGON_V6_vmpyowh_128B - {Intrinsic::hexagon_V6_vmpyowh_rnd, 41604}, // __builtin_HEXAGON_V6_vmpyowh_rnd - {Intrinsic::hexagon_V6_vmpyowh_rnd_128B, 41637}, // __builtin_HEXAGON_V6_vmpyowh_rnd_128B - {Intrinsic::hexagon_V6_vmpyowh_rnd_sacc, 41675}, // __builtin_HEXAGON_V6_vmpyowh_rnd_sacc - {Intrinsic::hexagon_V6_vmpyowh_rnd_sacc_128B, 41713}, // __builtin_HEXAGON_V6_vmpyowh_rnd_sacc_128B - {Intrinsic::hexagon_V6_vmpyowh_sacc, 41756}, // __builtin_HEXAGON_V6_vmpyowh_sacc - {Intrinsic::hexagon_V6_vmpyowh_sacc_128B, 41790}, // __builtin_HEXAGON_V6_vmpyowh_sacc_128B - {Intrinsic::hexagon_V6_vmpyub, 41829}, // __builtin_HEXAGON_V6_vmpyub - {Intrinsic::hexagon_V6_vmpyub_128B, 41857}, // __builtin_HEXAGON_V6_vmpyub_128B - {Intrinsic::hexagon_V6_vmpyub_acc, 41890}, // __builtin_HEXAGON_V6_vmpyub_acc - {Intrinsic::hexagon_V6_vmpyub_acc_128B, 41922}, // __builtin_HEXAGON_V6_vmpyub_acc_128B - {Intrinsic::hexagon_V6_vmpyubv, 41959}, // __builtin_HEXAGON_V6_vmpyubv - {Intrinsic::hexagon_V6_vmpyubv_128B, 41988}, // __builtin_HEXAGON_V6_vmpyubv_128B - {Intrinsic::hexagon_V6_vmpyubv_acc, 42022}, // __builtin_HEXAGON_V6_vmpyubv_acc - {Intrinsic::hexagon_V6_vmpyubv_acc_128B, 42055}, // __builtin_HEXAGON_V6_vmpyubv_acc_128B - {Intrinsic::hexagon_V6_vmpyuh, 42093}, // __builtin_HEXAGON_V6_vmpyuh - {Intrinsic::hexagon_V6_vmpyuh_128B, 42121}, // __builtin_HEXAGON_V6_vmpyuh_128B - {Intrinsic::hexagon_V6_vmpyuh_acc, 42154}, // __builtin_HEXAGON_V6_vmpyuh_acc - {Intrinsic::hexagon_V6_vmpyuh_acc_128B, 42186}, // __builtin_HEXAGON_V6_vmpyuh_acc_128B - {Intrinsic::hexagon_V6_vmpyuhv, 42223}, // __builtin_HEXAGON_V6_vmpyuhv - {Intrinsic::hexagon_V6_vmpyuhv_128B, 42252}, // __builtin_HEXAGON_V6_vmpyuhv_128B - {Intrinsic::hexagon_V6_vmpyuhv_acc, 42286}, // __builtin_HEXAGON_V6_vmpyuhv_acc - {Intrinsic::hexagon_V6_vmpyuhv_acc_128B, 42319}, // __builtin_HEXAGON_V6_vmpyuhv_acc_128B - {Intrinsic::hexagon_V6_vmux, 42357}, // __builtin_HEXAGON_V6_vmux - {Intrinsic::hexagon_V6_vmux_128B, 42383}, // __builtin_HEXAGON_V6_vmux_128B - {Intrinsic::hexagon_V6_vnavgh, 42414}, // __builtin_HEXAGON_V6_vnavgh - {Intrinsic::hexagon_V6_vnavgh_128B, 42442}, // __builtin_HEXAGON_V6_vnavgh_128B - {Intrinsic::hexagon_V6_vnavgub, 42475}, // __builtin_HEXAGON_V6_vnavgub - {Intrinsic::hexagon_V6_vnavgub_128B, 42504}, // __builtin_HEXAGON_V6_vnavgub_128B - {Intrinsic::hexagon_V6_vnavgw, 42538}, // __builtin_HEXAGON_V6_vnavgw - {Intrinsic::hexagon_V6_vnavgw_128B, 42566}, // __builtin_HEXAGON_V6_vnavgw_128B - {Intrinsic::hexagon_V6_vnormamth, 42599}, // __builtin_HEXAGON_V6_vnormamth - {Intrinsic::hexagon_V6_vnormamth_128B, 42630}, // __builtin_HEXAGON_V6_vnormamth_128B - {Intrinsic::hexagon_V6_vnormamtw, 42666}, // __builtin_HEXAGON_V6_vnormamtw - {Intrinsic::hexagon_V6_vnormamtw_128B, 42697}, // __builtin_HEXAGON_V6_vnormamtw_128B - {Intrinsic::hexagon_V6_vnot, 42733}, // __builtin_HEXAGON_V6_vnot - {Intrinsic::hexagon_V6_vnot_128B, 42759}, // __builtin_HEXAGON_V6_vnot_128B - {Intrinsic::hexagon_V6_vor, 42790}, // __builtin_HEXAGON_V6_vor - {Intrinsic::hexagon_V6_vor_128B, 42815}, // __builtin_HEXAGON_V6_vor_128B - {Intrinsic::hexagon_V6_vpackeb, 42845}, // __builtin_HEXAGON_V6_vpackeb - {Intrinsic::hexagon_V6_vpackeb_128B, 42874}, // __builtin_HEXAGON_V6_vpackeb_128B - {Intrinsic::hexagon_V6_vpackeh, 42908}, // __builtin_HEXAGON_V6_vpackeh - {Intrinsic::hexagon_V6_vpackeh_128B, 42937}, // __builtin_HEXAGON_V6_vpackeh_128B - {Intrinsic::hexagon_V6_vpackhb_sat, 42971}, // __builtin_HEXAGON_V6_vpackhb_sat - {Intrinsic::hexagon_V6_vpackhb_sat_128B, 43004}, // __builtin_HEXAGON_V6_vpackhb_sat_128B - {Intrinsic::hexagon_V6_vpackhub_sat, 43042}, // __builtin_HEXAGON_V6_vpackhub_sat - {Intrinsic::hexagon_V6_vpackhub_sat_128B, 43076}, // __builtin_HEXAGON_V6_vpackhub_sat_128B - {Intrinsic::hexagon_V6_vpackob, 43115}, // __builtin_HEXAGON_V6_vpackob - {Intrinsic::hexagon_V6_vpackob_128B, 43144}, // __builtin_HEXAGON_V6_vpackob_128B - {Intrinsic::hexagon_V6_vpackoh, 43178}, // __builtin_HEXAGON_V6_vpackoh - {Intrinsic::hexagon_V6_vpackoh_128B, 43207}, // __builtin_HEXAGON_V6_vpackoh_128B - {Intrinsic::hexagon_V6_vpackwh_sat, 43241}, // __builtin_HEXAGON_V6_vpackwh_sat - {Intrinsic::hexagon_V6_vpackwh_sat_128B, 43274}, // __builtin_HEXAGON_V6_vpackwh_sat_128B - {Intrinsic::hexagon_V6_vpackwuh_sat, 43312}, // __builtin_HEXAGON_V6_vpackwuh_sat - {Intrinsic::hexagon_V6_vpackwuh_sat_128B, 43346}, // __builtin_HEXAGON_V6_vpackwuh_sat_128B - {Intrinsic::hexagon_V6_vpopcounth, 43385}, // __builtin_HEXAGON_V6_vpopcounth - {Intrinsic::hexagon_V6_vpopcounth_128B, 43417}, // __builtin_HEXAGON_V6_vpopcounth_128B - {Intrinsic::hexagon_V6_vrdelta, 43454}, // __builtin_HEXAGON_V6_vrdelta - {Intrinsic::hexagon_V6_vrdelta_128B, 43483}, // __builtin_HEXAGON_V6_vrdelta_128B - {Intrinsic::hexagon_V6_vrmpybus, 43517}, // __builtin_HEXAGON_V6_vrmpybus - {Intrinsic::hexagon_V6_vrmpybus_128B, 43547}, // __builtin_HEXAGON_V6_vrmpybus_128B - {Intrinsic::hexagon_V6_vrmpybus_acc, 43582}, // __builtin_HEXAGON_V6_vrmpybus_acc - {Intrinsic::hexagon_V6_vrmpybus_acc_128B, 43616}, // __builtin_HEXAGON_V6_vrmpybus_acc_128B - {Intrinsic::hexagon_V6_vrmpybusi, 43655}, // __builtin_HEXAGON_V6_vrmpybusi - {Intrinsic::hexagon_V6_vrmpybusi_128B, 43686}, // __builtin_HEXAGON_V6_vrmpybusi_128B - {Intrinsic::hexagon_V6_vrmpybusi_acc, 43722}, // __builtin_HEXAGON_V6_vrmpybusi_acc - {Intrinsic::hexagon_V6_vrmpybusi_acc_128B, 43757}, // __builtin_HEXAGON_V6_vrmpybusi_acc_128B - {Intrinsic::hexagon_V6_vrmpybusv, 43797}, // __builtin_HEXAGON_V6_vrmpybusv - {Intrinsic::hexagon_V6_vrmpybusv_128B, 43828}, // __builtin_HEXAGON_V6_vrmpybusv_128B - {Intrinsic::hexagon_V6_vrmpybusv_acc, 43864}, // __builtin_HEXAGON_V6_vrmpybusv_acc - {Intrinsic::hexagon_V6_vrmpybusv_acc_128B, 43899}, // __builtin_HEXAGON_V6_vrmpybusv_acc_128B - {Intrinsic::hexagon_V6_vrmpybv, 43939}, // __builtin_HEXAGON_V6_vrmpybv - {Intrinsic::hexagon_V6_vrmpybv_128B, 43968}, // __builtin_HEXAGON_V6_vrmpybv_128B - {Intrinsic::hexagon_V6_vrmpybv_acc, 44002}, // __builtin_HEXAGON_V6_vrmpybv_acc - {Intrinsic::hexagon_V6_vrmpybv_acc_128B, 44035}, // __builtin_HEXAGON_V6_vrmpybv_acc_128B - {Intrinsic::hexagon_V6_vrmpyub, 44073}, // __builtin_HEXAGON_V6_vrmpyub - {Intrinsic::hexagon_V6_vrmpyub_128B, 44102}, // __builtin_HEXAGON_V6_vrmpyub_128B - {Intrinsic::hexagon_V6_vrmpyub_acc, 44136}, // __builtin_HEXAGON_V6_vrmpyub_acc - {Intrinsic::hexagon_V6_vrmpyub_acc_128B, 44169}, // __builtin_HEXAGON_V6_vrmpyub_acc_128B - {Intrinsic::hexagon_V6_vrmpyubi, 44207}, // __builtin_HEXAGON_V6_vrmpyubi - {Intrinsic::hexagon_V6_vrmpyubi_128B, 44237}, // __builtin_HEXAGON_V6_vrmpyubi_128B - {Intrinsic::hexagon_V6_vrmpyubi_acc, 44272}, // __builtin_HEXAGON_V6_vrmpyubi_acc - {Intrinsic::hexagon_V6_vrmpyubi_acc_128B, 44306}, // __builtin_HEXAGON_V6_vrmpyubi_acc_128B - {Intrinsic::hexagon_V6_vrmpyubv, 44345}, // __builtin_HEXAGON_V6_vrmpyubv - {Intrinsic::hexagon_V6_vrmpyubv_128B, 44375}, // __builtin_HEXAGON_V6_vrmpyubv_128B - {Intrinsic::hexagon_V6_vrmpyubv_acc, 44410}, // __builtin_HEXAGON_V6_vrmpyubv_acc - {Intrinsic::hexagon_V6_vrmpyubv_acc_128B, 44444}, // __builtin_HEXAGON_V6_vrmpyubv_acc_128B - {Intrinsic::hexagon_V6_vror, 44483}, // __builtin_HEXAGON_V6_vror - {Intrinsic::hexagon_V6_vror_128B, 44509}, // __builtin_HEXAGON_V6_vror_128B - {Intrinsic::hexagon_V6_vroundhb, 44540}, // __builtin_HEXAGON_V6_vroundhb - {Intrinsic::hexagon_V6_vroundhb_128B, 44570}, // __builtin_HEXAGON_V6_vroundhb_128B - {Intrinsic::hexagon_V6_vroundhub, 44605}, // __builtin_HEXAGON_V6_vroundhub - {Intrinsic::hexagon_V6_vroundhub_128B, 44636}, // __builtin_HEXAGON_V6_vroundhub_128B - {Intrinsic::hexagon_V6_vroundwh, 44672}, // __builtin_HEXAGON_V6_vroundwh - {Intrinsic::hexagon_V6_vroundwh_128B, 44702}, // __builtin_HEXAGON_V6_vroundwh_128B - {Intrinsic::hexagon_V6_vroundwuh, 44737}, // __builtin_HEXAGON_V6_vroundwuh - {Intrinsic::hexagon_V6_vroundwuh_128B, 44768}, // __builtin_HEXAGON_V6_vroundwuh_128B - {Intrinsic::hexagon_V6_vrsadubi, 44804}, // __builtin_HEXAGON_V6_vrsadubi - {Intrinsic::hexagon_V6_vrsadubi_128B, 44834}, // __builtin_HEXAGON_V6_vrsadubi_128B - {Intrinsic::hexagon_V6_vrsadubi_acc, 44869}, // __builtin_HEXAGON_V6_vrsadubi_acc - {Intrinsic::hexagon_V6_vrsadubi_acc_128B, 44903}, // __builtin_HEXAGON_V6_vrsadubi_acc_128B - {Intrinsic::hexagon_V6_vsathub, 44942}, // __builtin_HEXAGON_V6_vsathub - {Intrinsic::hexagon_V6_vsathub_128B, 44971}, // __builtin_HEXAGON_V6_vsathub_128B - {Intrinsic::hexagon_V6_vsatwh, 45005}, // __builtin_HEXAGON_V6_vsatwh - {Intrinsic::hexagon_V6_vsatwh_128B, 45033}, // __builtin_HEXAGON_V6_vsatwh_128B - {Intrinsic::hexagon_V6_vsb, 45066}, // __builtin_HEXAGON_V6_vsb - {Intrinsic::hexagon_V6_vsb_128B, 45091}, // __builtin_HEXAGON_V6_vsb_128B - {Intrinsic::hexagon_V6_vsh, 45121}, // __builtin_HEXAGON_V6_vsh - {Intrinsic::hexagon_V6_vsh_128B, 45146}, // __builtin_HEXAGON_V6_vsh_128B - {Intrinsic::hexagon_V6_vshufeh, 45176}, // __builtin_HEXAGON_V6_vshufeh - {Intrinsic::hexagon_V6_vshufeh_128B, 45205}, // __builtin_HEXAGON_V6_vshufeh_128B - {Intrinsic::hexagon_V6_vshuffb, 45239}, // __builtin_HEXAGON_V6_vshuffb - {Intrinsic::hexagon_V6_vshuffb_128B, 45268}, // __builtin_HEXAGON_V6_vshuffb_128B - {Intrinsic::hexagon_V6_vshuffeb, 45302}, // __builtin_HEXAGON_V6_vshuffeb - {Intrinsic::hexagon_V6_vshuffeb_128B, 45332}, // __builtin_HEXAGON_V6_vshuffeb_128B - {Intrinsic::hexagon_V6_vshuffh, 45367}, // __builtin_HEXAGON_V6_vshuffh - {Intrinsic::hexagon_V6_vshuffh_128B, 45396}, // __builtin_HEXAGON_V6_vshuffh_128B - {Intrinsic::hexagon_V6_vshuffob, 45430}, // __builtin_HEXAGON_V6_vshuffob - {Intrinsic::hexagon_V6_vshuffob_128B, 45460}, // __builtin_HEXAGON_V6_vshuffob_128B - {Intrinsic::hexagon_V6_vshuffvdd, 45495}, // __builtin_HEXAGON_V6_vshuffvdd - {Intrinsic::hexagon_V6_vshuffvdd_128B, 45526}, // __builtin_HEXAGON_V6_vshuffvdd_128B - {Intrinsic::hexagon_V6_vshufoeb, 45562}, // __builtin_HEXAGON_V6_vshufoeb - {Intrinsic::hexagon_V6_vshufoeb_128B, 45592}, // __builtin_HEXAGON_V6_vshufoeb_128B - {Intrinsic::hexagon_V6_vshufoeh, 45627}, // __builtin_HEXAGON_V6_vshufoeh - {Intrinsic::hexagon_V6_vshufoeh_128B, 45657}, // __builtin_HEXAGON_V6_vshufoeh_128B - {Intrinsic::hexagon_V6_vshufoh, 45692}, // __builtin_HEXAGON_V6_vshufoh - {Intrinsic::hexagon_V6_vshufoh_128B, 45721}, // __builtin_HEXAGON_V6_vshufoh_128B - {Intrinsic::hexagon_V6_vsubb, 45755}, // __builtin_HEXAGON_V6_vsubb - {Intrinsic::hexagon_V6_vsubb_128B, 45782}, // __builtin_HEXAGON_V6_vsubb_128B - {Intrinsic::hexagon_V6_vsubb_dv, 45814}, // __builtin_HEXAGON_V6_vsubb_dv - {Intrinsic::hexagon_V6_vsubb_dv_128B, 45844}, // __builtin_HEXAGON_V6_vsubb_dv_128B - {Intrinsic::hexagon_V6_vsubbnq, 45879}, // __builtin_HEXAGON_V6_vsubbnq - {Intrinsic::hexagon_V6_vsubbnq_128B, 45908}, // __builtin_HEXAGON_V6_vsubbnq_128B - {Intrinsic::hexagon_V6_vsubbq, 45942}, // __builtin_HEXAGON_V6_vsubbq - {Intrinsic::hexagon_V6_vsubbq_128B, 45970}, // __builtin_HEXAGON_V6_vsubbq_128B - {Intrinsic::hexagon_V6_vsubh, 46003}, // __builtin_HEXAGON_V6_vsubh - {Intrinsic::hexagon_V6_vsubh_128B, 46030}, // __builtin_HEXAGON_V6_vsubh_128B - {Intrinsic::hexagon_V6_vsubh_dv, 46062}, // __builtin_HEXAGON_V6_vsubh_dv - {Intrinsic::hexagon_V6_vsubh_dv_128B, 46092}, // __builtin_HEXAGON_V6_vsubh_dv_128B - {Intrinsic::hexagon_V6_vsubhnq, 46127}, // __builtin_HEXAGON_V6_vsubhnq - {Intrinsic::hexagon_V6_vsubhnq_128B, 46156}, // __builtin_HEXAGON_V6_vsubhnq_128B - {Intrinsic::hexagon_V6_vsubhq, 46190}, // __builtin_HEXAGON_V6_vsubhq - {Intrinsic::hexagon_V6_vsubhq_128B, 46218}, // __builtin_HEXAGON_V6_vsubhq_128B - {Intrinsic::hexagon_V6_vsubhsat, 46251}, // __builtin_HEXAGON_V6_vsubhsat - {Intrinsic::hexagon_V6_vsubhsat_128B, 46281}, // __builtin_HEXAGON_V6_vsubhsat_128B - {Intrinsic::hexagon_V6_vsubhsat_dv, 46316}, // __builtin_HEXAGON_V6_vsubhsat_dv - {Intrinsic::hexagon_V6_vsubhsat_dv_128B, 46349}, // __builtin_HEXAGON_V6_vsubhsat_dv_128B - {Intrinsic::hexagon_V6_vsubhw, 46387}, // __builtin_HEXAGON_V6_vsubhw - {Intrinsic::hexagon_V6_vsubhw_128B, 46415}, // __builtin_HEXAGON_V6_vsubhw_128B - {Intrinsic::hexagon_V6_vsububh, 46448}, // __builtin_HEXAGON_V6_vsububh - {Intrinsic::hexagon_V6_vsububh_128B, 46477}, // __builtin_HEXAGON_V6_vsububh_128B - {Intrinsic::hexagon_V6_vsububsat, 46511}, // __builtin_HEXAGON_V6_vsububsat - {Intrinsic::hexagon_V6_vsububsat_128B, 46542}, // __builtin_HEXAGON_V6_vsububsat_128B - {Intrinsic::hexagon_V6_vsububsat_dv, 46578}, // __builtin_HEXAGON_V6_vsububsat_dv - {Intrinsic::hexagon_V6_vsububsat_dv_128B, 46612}, // __builtin_HEXAGON_V6_vsububsat_dv_128B - {Intrinsic::hexagon_V6_vsubuhsat, 46651}, // __builtin_HEXAGON_V6_vsubuhsat - {Intrinsic::hexagon_V6_vsubuhsat_128B, 46682}, // __builtin_HEXAGON_V6_vsubuhsat_128B - {Intrinsic::hexagon_V6_vsubuhsat_dv, 46718}, // __builtin_HEXAGON_V6_vsubuhsat_dv - {Intrinsic::hexagon_V6_vsubuhsat_dv_128B, 46752}, // __builtin_HEXAGON_V6_vsubuhsat_dv_128B - {Intrinsic::hexagon_V6_vsubuhw, 46791}, // __builtin_HEXAGON_V6_vsubuhw - {Intrinsic::hexagon_V6_vsubuhw_128B, 46820}, // __builtin_HEXAGON_V6_vsubuhw_128B - {Intrinsic::hexagon_V6_vsubw, 46854}, // __builtin_HEXAGON_V6_vsubw - {Intrinsic::hexagon_V6_vsubw_128B, 46881}, // __builtin_HEXAGON_V6_vsubw_128B - {Intrinsic::hexagon_V6_vsubw_dv, 46913}, // __builtin_HEXAGON_V6_vsubw_dv - {Intrinsic::hexagon_V6_vsubw_dv_128B, 46943}, // __builtin_HEXAGON_V6_vsubw_dv_128B - {Intrinsic::hexagon_V6_vsubwnq, 46978}, // __builtin_HEXAGON_V6_vsubwnq - {Intrinsic::hexagon_V6_vsubwnq_128B, 47007}, // __builtin_HEXAGON_V6_vsubwnq_128B - {Intrinsic::hexagon_V6_vsubwq, 47041}, // __builtin_HEXAGON_V6_vsubwq - {Intrinsic::hexagon_V6_vsubwq_128B, 47069}, // __builtin_HEXAGON_V6_vsubwq_128B - {Intrinsic::hexagon_V6_vsubwsat, 47102}, // __builtin_HEXAGON_V6_vsubwsat - {Intrinsic::hexagon_V6_vsubwsat_128B, 47132}, // __builtin_HEXAGON_V6_vsubwsat_128B - {Intrinsic::hexagon_V6_vsubwsat_dv, 47167}, // __builtin_HEXAGON_V6_vsubwsat_dv - {Intrinsic::hexagon_V6_vsubwsat_dv_128B, 47200}, // __builtin_HEXAGON_V6_vsubwsat_dv_128B - {Intrinsic::hexagon_V6_vswap, 47238}, // __builtin_HEXAGON_V6_vswap - {Intrinsic::hexagon_V6_vswap_128B, 47265}, // __builtin_HEXAGON_V6_vswap_128B - {Intrinsic::hexagon_V6_vtmpyb, 47297}, // __builtin_HEXAGON_V6_vtmpyb - {Intrinsic::hexagon_V6_vtmpyb_128B, 47325}, // __builtin_HEXAGON_V6_vtmpyb_128B - {Intrinsic::hexagon_V6_vtmpyb_acc, 47358}, // __builtin_HEXAGON_V6_vtmpyb_acc - {Intrinsic::hexagon_V6_vtmpyb_acc_128B, 47390}, // __builtin_HEXAGON_V6_vtmpyb_acc_128B - {Intrinsic::hexagon_V6_vtmpybus, 47427}, // __builtin_HEXAGON_V6_vtmpybus - {Intrinsic::hexagon_V6_vtmpybus_128B, 47457}, // __builtin_HEXAGON_V6_vtmpybus_128B - {Intrinsic::hexagon_V6_vtmpybus_acc, 47492}, // __builtin_HEXAGON_V6_vtmpybus_acc - {Intrinsic::hexagon_V6_vtmpybus_acc_128B, 47526}, // __builtin_HEXAGON_V6_vtmpybus_acc_128B - {Intrinsic::hexagon_V6_vtmpyhb, 47565}, // __builtin_HEXAGON_V6_vtmpyhb - {Intrinsic::hexagon_V6_vtmpyhb_128B, 47594}, // __builtin_HEXAGON_V6_vtmpyhb_128B - {Intrinsic::hexagon_V6_vtmpyhb_acc, 47628}, // __builtin_HEXAGON_V6_vtmpyhb_acc - {Intrinsic::hexagon_V6_vtmpyhb_acc_128B, 47661}, // __builtin_HEXAGON_V6_vtmpyhb_acc_128B - {Intrinsic::hexagon_V6_vunpackb, 47699}, // __builtin_HEXAGON_V6_vunpackb - {Intrinsic::hexagon_V6_vunpackb_128B, 47729}, // __builtin_HEXAGON_V6_vunpackb_128B - {Intrinsic::hexagon_V6_vunpackh, 47764}, // __builtin_HEXAGON_V6_vunpackh - {Intrinsic::hexagon_V6_vunpackh_128B, 47794}, // __builtin_HEXAGON_V6_vunpackh_128B - {Intrinsic::hexagon_V6_vunpackob, 47829}, // __builtin_HEXAGON_V6_vunpackob - {Intrinsic::hexagon_V6_vunpackob_128B, 47860}, // __builtin_HEXAGON_V6_vunpackob_128B - {Intrinsic::hexagon_V6_vunpackoh, 47896}, // __builtin_HEXAGON_V6_vunpackoh - {Intrinsic::hexagon_V6_vunpackoh_128B, 47927}, // __builtin_HEXAGON_V6_vunpackoh_128B - {Intrinsic::hexagon_V6_vunpackub, 47963}, // __builtin_HEXAGON_V6_vunpackub - {Intrinsic::hexagon_V6_vunpackub_128B, 47994}, // __builtin_HEXAGON_V6_vunpackub_128B - {Intrinsic::hexagon_V6_vunpackuh, 48030}, // __builtin_HEXAGON_V6_vunpackuh - {Intrinsic::hexagon_V6_vunpackuh_128B, 48061}, // __builtin_HEXAGON_V6_vunpackuh_128B - {Intrinsic::hexagon_V6_vxor, 48097}, // __builtin_HEXAGON_V6_vxor - {Intrinsic::hexagon_V6_vxor_128B, 48123}, // __builtin_HEXAGON_V6_vxor_128B - {Intrinsic::hexagon_V6_vzb, 48154}, // __builtin_HEXAGON_V6_vzb - {Intrinsic::hexagon_V6_vzb_128B, 48179}, // __builtin_HEXAGON_V6_vzb_128B - {Intrinsic::hexagon_V6_vzh, 48209}, // __builtin_HEXAGON_V6_vzh - {Intrinsic::hexagon_V6_vzh_128B, 48234}, // __builtin_HEXAGON_V6_vzh_128B - {Intrinsic::hexagon_prefetch, 48714}, // __builtin_HEXAGON_prefetch - {Intrinsic::hexagon_SI_to_SXTHI_asrh, 28565}, // __builtin_SI_to_SXTHI_asrh - {Intrinsic::hexagon_mm256i_vaddw, 48690}, // __builtin__mm256i_vaddw - {Intrinsic::hexagon_brev_ldb, 48264}, // __builtin_brev_ldb - {Intrinsic::hexagon_brev_ldd, 48283}, // __builtin_brev_ldd - {Intrinsic::hexagon_brev_ldh, 48302}, // __builtin_brev_ldh - {Intrinsic::hexagon_brev_ldub, 48321}, // __builtin_brev_ldub - {Intrinsic::hexagon_brev_lduh, 48341}, // __builtin_brev_lduh - {Intrinsic::hexagon_brev_ldw, 48361}, // __builtin_brev_ldw - {Intrinsic::hexagon_brev_stb, 48380}, // __builtin_brev_stb - {Intrinsic::hexagon_brev_std, 48399}, // __builtin_brev_std - {Intrinsic::hexagon_brev_sth, 48418}, // __builtin_brev_sth - {Intrinsic::hexagon_brev_sthhi, 48437}, // __builtin_brev_sthhi - {Intrinsic::hexagon_brev_stw, 48458}, // __builtin_brev_stw - {Intrinsic::hexagon_circ_ldb, 48477}, // __builtin_circ_ldb - {Intrinsic::hexagon_circ_ldd, 48496}, // __builtin_circ_ldd - {Intrinsic::hexagon_circ_ldh, 48515}, // __builtin_circ_ldh - {Intrinsic::hexagon_circ_ldub, 48534}, // __builtin_circ_ldub - {Intrinsic::hexagon_circ_lduh, 48554}, // __builtin_circ_lduh - {Intrinsic::hexagon_circ_ldw, 48574}, // __builtin_circ_ldw - {Intrinsic::hexagon_circ_stb, 48593}, // __builtin_circ_stb - {Intrinsic::hexagon_circ_std, 48612}, // __builtin_circ_std - {Intrinsic::hexagon_circ_sth, 48631}, // __builtin_circ_sth - {Intrinsic::hexagon_circ_sthhi, 48650}, // __builtin_circ_sthhi - {Intrinsic::hexagon_circ_stw, 48671}, // __builtin_circ_stw - }; - auto I = std::lower_bound(std::begin(hexagonNames), - std::end(hexagonNames), - BuiltinNameStr); - if (I != std::end(hexagonNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "mips") { - static const BuiltinEntry mipsNames[] = { - {Intrinsic::mips_absq_s_ph, 48741}, // __builtin_mips_absq_s_ph - {Intrinsic::mips_absq_s_qb, 48766}, // __builtin_mips_absq_s_qb - {Intrinsic::mips_absq_s_w, 48791}, // __builtin_mips_absq_s_w - {Intrinsic::mips_addq_ph, 48903}, // __builtin_mips_addq_ph - {Intrinsic::mips_addq_s_ph, 48926}, // __builtin_mips_addq_s_ph - {Intrinsic::mips_addq_s_w, 48951}, // __builtin_mips_addq_s_w - {Intrinsic::mips_addqh_ph, 48975}, // __builtin_mips_addqh_ph - {Intrinsic::mips_addqh_r_ph, 48999}, // __builtin_mips_addqh_r_ph - {Intrinsic::mips_addqh_r_w, 49025}, // __builtin_mips_addqh_r_w - {Intrinsic::mips_addqh_w, 49050}, // __builtin_mips_addqh_w - {Intrinsic::mips_addsc, 49349}, // __builtin_mips_addsc - {Intrinsic::mips_addu_ph, 49370}, // __builtin_mips_addu_ph - {Intrinsic::mips_addu_qb, 49393}, // __builtin_mips_addu_qb - {Intrinsic::mips_addu_s_ph, 49416}, // __builtin_mips_addu_s_ph - {Intrinsic::mips_addu_s_qb, 49441}, // __builtin_mips_addu_s_qb - {Intrinsic::mips_adduh_qb, 49466}, // __builtin_mips_adduh_qb - {Intrinsic::mips_adduh_r_qb, 49490}, // __builtin_mips_adduh_r_qb - {Intrinsic::mips_addwc, 49688}, // __builtin_mips_addwc - {Intrinsic::mips_append, 49750}, // __builtin_mips_append - {Intrinsic::mips_balign, 50316}, // __builtin_mips_balign - {Intrinsic::mips_bitrev, 50870}, // __builtin_mips_bitrev - {Intrinsic::mips_bposge32, 51248}, // __builtin_mips_bposge32 - {Intrinsic::mips_cmp_eq_ph, 52487}, // __builtin_mips_cmp_eq_ph - {Intrinsic::mips_cmp_le_ph, 52512}, // __builtin_mips_cmp_le_ph - {Intrinsic::mips_cmp_lt_ph, 52537}, // __builtin_mips_cmp_lt_ph - {Intrinsic::mips_cmpgdu_eq_qb, 52562}, // __builtin_mips_cmpgdu_eq_qb - {Intrinsic::mips_cmpgdu_le_qb, 52590}, // __builtin_mips_cmpgdu_le_qb - {Intrinsic::mips_cmpgdu_lt_qb, 52618}, // __builtin_mips_cmpgdu_lt_qb - {Intrinsic::mips_cmpgu_eq_qb, 52646}, // __builtin_mips_cmpgu_eq_qb - {Intrinsic::mips_cmpgu_le_qb, 52673}, // __builtin_mips_cmpgu_le_qb - {Intrinsic::mips_cmpgu_lt_qb, 52700}, // __builtin_mips_cmpgu_lt_qb - {Intrinsic::mips_cmpu_eq_qb, 52727}, // __builtin_mips_cmpu_eq_qb - {Intrinsic::mips_cmpu_le_qb, 52753}, // __builtin_mips_cmpu_le_qb - {Intrinsic::mips_cmpu_lt_qb, 52779}, // __builtin_mips_cmpu_lt_qb - {Intrinsic::mips_dlsa, 53186}, // __builtin_mips_dlsa - {Intrinsic::mips_dpa_w_ph, 53344}, // __builtin_mips_dpa_w_ph - {Intrinsic::mips_dpaq_s_w_ph, 53512}, // __builtin_mips_dpaq_s_w_ph - {Intrinsic::mips_dpaq_sa_l_w, 53539}, // __builtin_mips_dpaq_sa_l_w - {Intrinsic::mips_dpaqx_s_w_ph, 53566}, // __builtin_mips_dpaqx_s_w_ph - {Intrinsic::mips_dpaqx_sa_w_ph, 53594}, // __builtin_mips_dpaqx_sa_w_ph - {Intrinsic::mips_dpau_h_qbl, 53623}, // __builtin_mips_dpau_h_qbl - {Intrinsic::mips_dpau_h_qbr, 53649}, // __builtin_mips_dpau_h_qbr - {Intrinsic::mips_dpax_w_ph, 53675}, // __builtin_mips_dpax_w_ph - {Intrinsic::mips_dps_w_ph, 53700}, // __builtin_mips_dps_w_ph - {Intrinsic::mips_dpsq_s_w_ph, 53724}, // __builtin_mips_dpsq_s_w_ph - {Intrinsic::mips_dpsq_sa_l_w, 53751}, // __builtin_mips_dpsq_sa_l_w - {Intrinsic::mips_dpsqx_s_w_ph, 53778}, // __builtin_mips_dpsqx_s_w_ph - {Intrinsic::mips_dpsqx_sa_w_ph, 53806}, // __builtin_mips_dpsqx_sa_w_ph - {Intrinsic::mips_dpsu_h_qbl, 53835}, // __builtin_mips_dpsu_h_qbl - {Intrinsic::mips_dpsu_h_qbr, 53861}, // __builtin_mips_dpsu_h_qbr - {Intrinsic::mips_dpsx_w_ph, 54031}, // __builtin_mips_dpsx_w_ph - {Intrinsic::mips_extp, 54056}, // __builtin_mips_extp - {Intrinsic::mips_extpdp, 54076}, // __builtin_mips_extpdp - {Intrinsic::mips_extr_r_w, 54098}, // __builtin_mips_extr_r_w - {Intrinsic::mips_extr_rs_w, 54122}, // __builtin_mips_extr_rs_w - {Intrinsic::mips_extr_s_h, 54147}, // __builtin_mips_extr_s_h - {Intrinsic::mips_extr_w, 54171}, // __builtin_mips_extr_w - {Intrinsic::mips_insv, 57223}, // __builtin_mips_insv - {Intrinsic::mips_lbux, 57331}, // __builtin_mips_lbux - {Intrinsic::mips_lhx, 57507}, // __builtin_mips_lhx - {Intrinsic::mips_lsa, 57526}, // __builtin_mips_lsa - {Intrinsic::mips_lwx, 57545}, // __builtin_mips_lwx - {Intrinsic::mips_madd, 57564}, // __builtin_mips_madd - {Intrinsic::mips_maddu, 57678}, // __builtin_mips_maddu - {Intrinsic::mips_maq_s_w_phl, 57787}, // __builtin_mips_maq_s_w_phl - {Intrinsic::mips_maq_s_w_phr, 57814}, // __builtin_mips_maq_s_w_phr - {Intrinsic::mips_maq_sa_w_phl, 57841}, // __builtin_mips_maq_sa_w_phl - {Intrinsic::mips_maq_sa_w_phr, 57869}, // __builtin_mips_maq_sa_w_phr - {Intrinsic::mips_modsub, 58969}, // __builtin_mips_modsub - {Intrinsic::mips_msub, 59012}, // __builtin_mips_msub - {Intrinsic::mips_msubu, 59126}, // __builtin_mips_msubu - {Intrinsic::mips_mthlip, 59235}, // __builtin_mips_mthlip - {Intrinsic::mips_mul_ph, 59257}, // __builtin_mips_mul_ph - {Intrinsic::mips_mul_s_ph, 59323}, // __builtin_mips_mul_s_ph - {Intrinsic::mips_muleq_s_w_phl, 59347}, // __builtin_mips_muleq_s_w_phl - {Intrinsic::mips_muleq_s_w_phr, 59376}, // __builtin_mips_muleq_s_w_phr - {Intrinsic::mips_muleu_s_ph_qbl, 59405}, // __builtin_mips_muleu_s_ph_qbl - {Intrinsic::mips_muleu_s_ph_qbr, 59435}, // __builtin_mips_muleu_s_ph_qbr - {Intrinsic::mips_mulq_rs_ph, 59465}, // __builtin_mips_mulq_rs_ph - {Intrinsic::mips_mulq_rs_w, 59491}, // __builtin_mips_mulq_rs_w - {Intrinsic::mips_mulq_s_ph, 59516}, // __builtin_mips_mulq_s_ph - {Intrinsic::mips_mulq_s_w, 59541}, // __builtin_mips_mulq_s_w - {Intrinsic::mips_mulsa_w_ph, 59611}, // __builtin_mips_mulsa_w_ph - {Intrinsic::mips_mulsaq_s_w_ph, 59637}, // __builtin_mips_mulsaq_s_w_ph - {Intrinsic::mips_mult, 59666}, // __builtin_mips_mult - {Intrinsic::mips_multu, 59686}, // __builtin_mips_multu - {Intrinsic::mips_packrl_ph, 60039}, // __builtin_mips_packrl_ph - {Intrinsic::mips_pick_ph, 60324}, // __builtin_mips_pick_ph - {Intrinsic::mips_pick_qb, 60347}, // __builtin_mips_pick_qb - {Intrinsic::mips_preceq_w_phl, 60370}, // __builtin_mips_preceq_w_phl - {Intrinsic::mips_preceq_w_phr, 60398}, // __builtin_mips_preceq_w_phr - {Intrinsic::mips_precequ_ph_qbl, 60426}, // __builtin_mips_precequ_ph_qbl - {Intrinsic::mips_precequ_ph_qbla, 60456}, // __builtin_mips_precequ_ph_qbla - {Intrinsic::mips_precequ_ph_qbr, 60487}, // __builtin_mips_precequ_ph_qbr - {Intrinsic::mips_precequ_ph_qbra, 60517}, // __builtin_mips_precequ_ph_qbra - {Intrinsic::mips_preceu_ph_qbl, 60548}, // __builtin_mips_preceu_ph_qbl - {Intrinsic::mips_preceu_ph_qbla, 60577}, // __builtin_mips_preceu_ph_qbla - {Intrinsic::mips_preceu_ph_qbr, 60607}, // __builtin_mips_preceu_ph_qbr - {Intrinsic::mips_preceu_ph_qbra, 60636}, // __builtin_mips_preceu_ph_qbra - {Intrinsic::mips_precr_qb_ph, 60666}, // __builtin_mips_precr_qb_ph - {Intrinsic::mips_precr_sra_ph_w, 60693}, // __builtin_mips_precr_sra_ph_w - {Intrinsic::mips_precr_sra_r_ph_w, 60723}, // __builtin_mips_precr_sra_r_ph_w - {Intrinsic::mips_precrq_ph_w, 60755}, // __builtin_mips_precrq_ph_w - {Intrinsic::mips_precrq_qb_ph, 60782}, // __builtin_mips_precrq_qb_ph - {Intrinsic::mips_precrq_rs_ph_w, 60810}, // __builtin_mips_precrq_rs_ph_w - {Intrinsic::mips_precrqu_s_qb_ph, 60840}, // __builtin_mips_precrqu_s_qb_ph - {Intrinsic::mips_prepend, 60871}, // __builtin_mips_prepend - {Intrinsic::mips_raddu_w_qb, 60894}, // __builtin_mips_raddu_w_qb - {Intrinsic::mips_rddsp, 60920}, // __builtin_mips_rddsp - {Intrinsic::mips_repl_ph, 60941}, // __builtin_mips_repl_ph - {Intrinsic::mips_repl_qb, 60964}, // __builtin_mips_repl_qb - {Intrinsic::mips_shilo, 61223}, // __builtin_mips_shilo - {Intrinsic::mips_shll_ph, 61244}, // __builtin_mips_shll_ph - {Intrinsic::mips_shll_qb, 61267}, // __builtin_mips_shll_qb - {Intrinsic::mips_shll_s_ph, 61290}, // __builtin_mips_shll_s_ph - {Intrinsic::mips_shll_s_w, 61315}, // __builtin_mips_shll_s_w - {Intrinsic::mips_shra_ph, 61339}, // __builtin_mips_shra_ph - {Intrinsic::mips_shra_qb, 61362}, // __builtin_mips_shra_qb - {Intrinsic::mips_shra_r_ph, 61385}, // __builtin_mips_shra_r_ph - {Intrinsic::mips_shra_r_qb, 61410}, // __builtin_mips_shra_r_qb - {Intrinsic::mips_shra_r_w, 61435}, // __builtin_mips_shra_r_w - {Intrinsic::mips_shrl_ph, 61459}, // __builtin_mips_shrl_ph - {Intrinsic::mips_shrl_qb, 61482}, // __builtin_mips_shrl_qb - {Intrinsic::mips_subq_ph, 62761}, // __builtin_mips_subq_ph - {Intrinsic::mips_subq_s_ph, 62784}, // __builtin_mips_subq_s_ph - {Intrinsic::mips_subq_s_w, 62809}, // __builtin_mips_subq_s_w - {Intrinsic::mips_subqh_ph, 62833}, // __builtin_mips_subqh_ph - {Intrinsic::mips_subqh_r_ph, 62857}, // __builtin_mips_subqh_r_ph - {Intrinsic::mips_subqh_r_w, 62883}, // __builtin_mips_subqh_r_w - {Intrinsic::mips_subqh_w, 62908}, // __builtin_mips_subqh_w - {Intrinsic::mips_subu_ph, 63315}, // __builtin_mips_subu_ph - {Intrinsic::mips_subu_qb, 63338}, // __builtin_mips_subu_qb - {Intrinsic::mips_subu_s_ph, 63361}, // __builtin_mips_subu_s_ph - {Intrinsic::mips_subu_s_qb, 63386}, // __builtin_mips_subu_s_qb - {Intrinsic::mips_subuh_qb, 63411}, // __builtin_mips_subuh_qb - {Intrinsic::mips_subuh_r_qb, 63435}, // __builtin_mips_subuh_r_qb - {Intrinsic::mips_wrdsp, 63717}, // __builtin_mips_wrdsp - {Intrinsic::mips_add_a_b, 48815}, // __builtin_msa_add_a_b - {Intrinsic::mips_add_a_d, 48837}, // __builtin_msa_add_a_d - {Intrinsic::mips_add_a_h, 48859}, // __builtin_msa_add_a_h - {Intrinsic::mips_add_a_w, 48881}, // __builtin_msa_add_a_w - {Intrinsic::mips_adds_a_b, 49073}, // __builtin_msa_adds_a_b - {Intrinsic::mips_adds_a_d, 49096}, // __builtin_msa_adds_a_d - {Intrinsic::mips_adds_a_h, 49119}, // __builtin_msa_adds_a_h - {Intrinsic::mips_adds_a_w, 49142}, // __builtin_msa_adds_a_w - {Intrinsic::mips_adds_s_b, 49165}, // __builtin_msa_adds_s_b - {Intrinsic::mips_adds_s_d, 49188}, // __builtin_msa_adds_s_d - {Intrinsic::mips_adds_s_h, 49211}, // __builtin_msa_adds_s_h - {Intrinsic::mips_adds_s_w, 49234}, // __builtin_msa_adds_s_w - {Intrinsic::mips_adds_u_b, 49257}, // __builtin_msa_adds_u_b - {Intrinsic::mips_adds_u_d, 49280}, // __builtin_msa_adds_u_d - {Intrinsic::mips_adds_u_h, 49303}, // __builtin_msa_adds_u_h - {Intrinsic::mips_adds_u_w, 49326}, // __builtin_msa_adds_u_w - {Intrinsic::mips_addv_b, 49516}, // __builtin_msa_addv_b - {Intrinsic::mips_addv_d, 49537}, // __builtin_msa_addv_d - {Intrinsic::mips_addv_h, 49558}, // __builtin_msa_addv_h - {Intrinsic::mips_addv_w, 49579}, // __builtin_msa_addv_w - {Intrinsic::mips_addvi_b, 49600}, // __builtin_msa_addvi_b - {Intrinsic::mips_addvi_d, 49622}, // __builtin_msa_addvi_d - {Intrinsic::mips_addvi_h, 49644}, // __builtin_msa_addvi_h - {Intrinsic::mips_addvi_w, 49666}, // __builtin_msa_addvi_w - {Intrinsic::mips_and_v, 49709}, // __builtin_msa_and_v - {Intrinsic::mips_andi_b, 49729}, // __builtin_msa_andi_b - {Intrinsic::mips_asub_s_b, 49772}, // __builtin_msa_asub_s_b - {Intrinsic::mips_asub_s_d, 49795}, // __builtin_msa_asub_s_d - {Intrinsic::mips_asub_s_h, 49818}, // __builtin_msa_asub_s_h - {Intrinsic::mips_asub_s_w, 49841}, // __builtin_msa_asub_s_w - {Intrinsic::mips_asub_u_b, 49864}, // __builtin_msa_asub_u_b - {Intrinsic::mips_asub_u_d, 49887}, // __builtin_msa_asub_u_d - {Intrinsic::mips_asub_u_h, 49910}, // __builtin_msa_asub_u_h - {Intrinsic::mips_asub_u_w, 49933}, // __builtin_msa_asub_u_w - {Intrinsic::mips_ave_s_b, 49956}, // __builtin_msa_ave_s_b - {Intrinsic::mips_ave_s_d, 49978}, // __builtin_msa_ave_s_d - {Intrinsic::mips_ave_s_h, 50000}, // __builtin_msa_ave_s_h - {Intrinsic::mips_ave_s_w, 50022}, // __builtin_msa_ave_s_w - {Intrinsic::mips_ave_u_b, 50044}, // __builtin_msa_ave_u_b - {Intrinsic::mips_ave_u_d, 50066}, // __builtin_msa_ave_u_d - {Intrinsic::mips_ave_u_h, 50088}, // __builtin_msa_ave_u_h - {Intrinsic::mips_ave_u_w, 50110}, // __builtin_msa_ave_u_w - {Intrinsic::mips_aver_s_b, 50132}, // __builtin_msa_aver_s_b - {Intrinsic::mips_aver_s_d, 50155}, // __builtin_msa_aver_s_d - {Intrinsic::mips_aver_s_h, 50178}, // __builtin_msa_aver_s_h - {Intrinsic::mips_aver_s_w, 50201}, // __builtin_msa_aver_s_w - {Intrinsic::mips_aver_u_b, 50224}, // __builtin_msa_aver_u_b - {Intrinsic::mips_aver_u_d, 50247}, // __builtin_msa_aver_u_d - {Intrinsic::mips_aver_u_h, 50270}, // __builtin_msa_aver_u_h - {Intrinsic::mips_aver_u_w, 50293}, // __builtin_msa_aver_u_w - {Intrinsic::mips_bclr_b, 50338}, // __builtin_msa_bclr_b - {Intrinsic::mips_bclr_d, 50359}, // __builtin_msa_bclr_d - {Intrinsic::mips_bclr_h, 50380}, // __builtin_msa_bclr_h - {Intrinsic::mips_bclr_w, 50401}, // __builtin_msa_bclr_w - {Intrinsic::mips_bclri_b, 50422}, // __builtin_msa_bclri_b - {Intrinsic::mips_bclri_d, 50444}, // __builtin_msa_bclri_d - {Intrinsic::mips_bclri_h, 50466}, // __builtin_msa_bclri_h - {Intrinsic::mips_bclri_w, 50488}, // __builtin_msa_bclri_w - {Intrinsic::mips_binsl_b, 50510}, // __builtin_msa_binsl_b - {Intrinsic::mips_binsl_d, 50532}, // __builtin_msa_binsl_d - {Intrinsic::mips_binsl_h, 50554}, // __builtin_msa_binsl_h - {Intrinsic::mips_binsl_w, 50576}, // __builtin_msa_binsl_w - {Intrinsic::mips_binsli_b, 50598}, // __builtin_msa_binsli_b - {Intrinsic::mips_binsli_d, 50621}, // __builtin_msa_binsli_d - {Intrinsic::mips_binsli_h, 50644}, // __builtin_msa_binsli_h - {Intrinsic::mips_binsli_w, 50667}, // __builtin_msa_binsli_w - {Intrinsic::mips_binsr_b, 50690}, // __builtin_msa_binsr_b - {Intrinsic::mips_binsr_d, 50712}, // __builtin_msa_binsr_d - {Intrinsic::mips_binsr_h, 50734}, // __builtin_msa_binsr_h - {Intrinsic::mips_binsr_w, 50756}, // __builtin_msa_binsr_w - {Intrinsic::mips_binsri_b, 50778}, // __builtin_msa_binsri_b - {Intrinsic::mips_binsri_d, 50801}, // __builtin_msa_binsri_d - {Intrinsic::mips_binsri_h, 50824}, // __builtin_msa_binsri_h - {Intrinsic::mips_binsri_w, 50847}, // __builtin_msa_binsri_w - {Intrinsic::mips_bmnz_v, 50892}, // __builtin_msa_bmnz_v - {Intrinsic::mips_bmnzi_b, 50913}, // __builtin_msa_bmnzi_b - {Intrinsic::mips_bmz_v, 50935}, // __builtin_msa_bmz_v - {Intrinsic::mips_bmzi_b, 50955}, // __builtin_msa_bmzi_b - {Intrinsic::mips_bneg_b, 50976}, // __builtin_msa_bneg_b - {Intrinsic::mips_bneg_d, 50997}, // __builtin_msa_bneg_d - {Intrinsic::mips_bneg_h, 51018}, // __builtin_msa_bneg_h - {Intrinsic::mips_bneg_w, 51039}, // __builtin_msa_bneg_w - {Intrinsic::mips_bnegi_b, 51060}, // __builtin_msa_bnegi_b - {Intrinsic::mips_bnegi_d, 51082}, // __builtin_msa_bnegi_d - {Intrinsic::mips_bnegi_h, 51104}, // __builtin_msa_bnegi_h - {Intrinsic::mips_bnegi_w, 51126}, // __builtin_msa_bnegi_w - {Intrinsic::mips_bnz_b, 51148}, // __builtin_msa_bnz_b - {Intrinsic::mips_bnz_d, 51168}, // __builtin_msa_bnz_d - {Intrinsic::mips_bnz_h, 51188}, // __builtin_msa_bnz_h - {Intrinsic::mips_bnz_v, 51208}, // __builtin_msa_bnz_v - {Intrinsic::mips_bnz_w, 51228}, // __builtin_msa_bnz_w - {Intrinsic::mips_bsel_v, 51272}, // __builtin_msa_bsel_v - {Intrinsic::mips_bseli_b, 51293}, // __builtin_msa_bseli_b - {Intrinsic::mips_bset_b, 51315}, // __builtin_msa_bset_b - {Intrinsic::mips_bset_d, 51336}, // __builtin_msa_bset_d - {Intrinsic::mips_bset_h, 51357}, // __builtin_msa_bset_h - {Intrinsic::mips_bset_w, 51378}, // __builtin_msa_bset_w - {Intrinsic::mips_bseti_b, 51399}, // __builtin_msa_bseti_b - {Intrinsic::mips_bseti_d, 51421}, // __builtin_msa_bseti_d - {Intrinsic::mips_bseti_h, 51443}, // __builtin_msa_bseti_h - {Intrinsic::mips_bseti_w, 51465}, // __builtin_msa_bseti_w - {Intrinsic::mips_bz_b, 51487}, // __builtin_msa_bz_b - {Intrinsic::mips_bz_d, 51506}, // __builtin_msa_bz_d - {Intrinsic::mips_bz_h, 51525}, // __builtin_msa_bz_h - {Intrinsic::mips_bz_v, 51544}, // __builtin_msa_bz_v - {Intrinsic::mips_bz_w, 51563}, // __builtin_msa_bz_w - {Intrinsic::mips_ceq_b, 51582}, // __builtin_msa_ceq_b - {Intrinsic::mips_ceq_d, 51602}, // __builtin_msa_ceq_d - {Intrinsic::mips_ceq_h, 51622}, // __builtin_msa_ceq_h - {Intrinsic::mips_ceq_w, 51642}, // __builtin_msa_ceq_w - {Intrinsic::mips_ceqi_b, 51662}, // __builtin_msa_ceqi_b - {Intrinsic::mips_ceqi_d, 51683}, // __builtin_msa_ceqi_d - {Intrinsic::mips_ceqi_h, 51704}, // __builtin_msa_ceqi_h - {Intrinsic::mips_ceqi_w, 51725}, // __builtin_msa_ceqi_w - {Intrinsic::mips_cfcmsa, 51746}, // __builtin_msa_cfcmsa - {Intrinsic::mips_cle_s_b, 51767}, // __builtin_msa_cle_s_b - {Intrinsic::mips_cle_s_d, 51789}, // __builtin_msa_cle_s_d - {Intrinsic::mips_cle_s_h, 51811}, // __builtin_msa_cle_s_h - {Intrinsic::mips_cle_s_w, 51833}, // __builtin_msa_cle_s_w - {Intrinsic::mips_cle_u_b, 51855}, // __builtin_msa_cle_u_b - {Intrinsic::mips_cle_u_d, 51877}, // __builtin_msa_cle_u_d - {Intrinsic::mips_cle_u_h, 51899}, // __builtin_msa_cle_u_h - {Intrinsic::mips_cle_u_w, 51921}, // __builtin_msa_cle_u_w - {Intrinsic::mips_clei_s_b, 51943}, // __builtin_msa_clei_s_b - {Intrinsic::mips_clei_s_d, 51966}, // __builtin_msa_clei_s_d - {Intrinsic::mips_clei_s_h, 51989}, // __builtin_msa_clei_s_h - {Intrinsic::mips_clei_s_w, 52012}, // __builtin_msa_clei_s_w - {Intrinsic::mips_clei_u_b, 52035}, // __builtin_msa_clei_u_b - {Intrinsic::mips_clei_u_d, 52058}, // __builtin_msa_clei_u_d - {Intrinsic::mips_clei_u_h, 52081}, // __builtin_msa_clei_u_h - {Intrinsic::mips_clei_u_w, 52104}, // __builtin_msa_clei_u_w - {Intrinsic::mips_clt_s_b, 52127}, // __builtin_msa_clt_s_b - {Intrinsic::mips_clt_s_d, 52149}, // __builtin_msa_clt_s_d - {Intrinsic::mips_clt_s_h, 52171}, // __builtin_msa_clt_s_h - {Intrinsic::mips_clt_s_w, 52193}, // __builtin_msa_clt_s_w - {Intrinsic::mips_clt_u_b, 52215}, // __builtin_msa_clt_u_b - {Intrinsic::mips_clt_u_d, 52237}, // __builtin_msa_clt_u_d - {Intrinsic::mips_clt_u_h, 52259}, // __builtin_msa_clt_u_h - {Intrinsic::mips_clt_u_w, 52281}, // __builtin_msa_clt_u_w - {Intrinsic::mips_clti_s_b, 52303}, // __builtin_msa_clti_s_b - {Intrinsic::mips_clti_s_d, 52326}, // __builtin_msa_clti_s_d - {Intrinsic::mips_clti_s_h, 52349}, // __builtin_msa_clti_s_h - {Intrinsic::mips_clti_s_w, 52372}, // __builtin_msa_clti_s_w - {Intrinsic::mips_clti_u_b, 52395}, // __builtin_msa_clti_u_b - {Intrinsic::mips_clti_u_d, 52418}, // __builtin_msa_clti_u_d - {Intrinsic::mips_clti_u_h, 52441}, // __builtin_msa_clti_u_h - {Intrinsic::mips_clti_u_w, 52464}, // __builtin_msa_clti_u_w - {Intrinsic::mips_copy_s_b, 52805}, // __builtin_msa_copy_s_b - {Intrinsic::mips_copy_s_d, 52828}, // __builtin_msa_copy_s_d - {Intrinsic::mips_copy_s_h, 52851}, // __builtin_msa_copy_s_h - {Intrinsic::mips_copy_s_w, 52874}, // __builtin_msa_copy_s_w - {Intrinsic::mips_copy_u_b, 52897}, // __builtin_msa_copy_u_b - {Intrinsic::mips_copy_u_d, 52920}, // __builtin_msa_copy_u_d - {Intrinsic::mips_copy_u_h, 52943}, // __builtin_msa_copy_u_h - {Intrinsic::mips_copy_u_w, 52966}, // __builtin_msa_copy_u_w - {Intrinsic::mips_ctcmsa, 52989}, // __builtin_msa_ctcmsa - {Intrinsic::mips_div_s_b, 53010}, // __builtin_msa_div_s_b - {Intrinsic::mips_div_s_d, 53032}, // __builtin_msa_div_s_d - {Intrinsic::mips_div_s_h, 53054}, // __builtin_msa_div_s_h - {Intrinsic::mips_div_s_w, 53076}, // __builtin_msa_div_s_w - {Intrinsic::mips_div_u_b, 53098}, // __builtin_msa_div_u_b - {Intrinsic::mips_div_u_d, 53120}, // __builtin_msa_div_u_d - {Intrinsic::mips_div_u_h, 53142}, // __builtin_msa_div_u_h - {Intrinsic::mips_div_u_w, 53164}, // __builtin_msa_div_u_w - {Intrinsic::mips_dotp_s_d, 53206}, // __builtin_msa_dotp_s_d - {Intrinsic::mips_dotp_s_h, 53229}, // __builtin_msa_dotp_s_h - {Intrinsic::mips_dotp_s_w, 53252}, // __builtin_msa_dotp_s_w - {Intrinsic::mips_dotp_u_d, 53275}, // __builtin_msa_dotp_u_d - {Intrinsic::mips_dotp_u_h, 53298}, // __builtin_msa_dotp_u_h - {Intrinsic::mips_dotp_u_w, 53321}, // __builtin_msa_dotp_u_w - {Intrinsic::mips_dpadd_s_d, 53368}, // __builtin_msa_dpadd_s_d - {Intrinsic::mips_dpadd_s_h, 53392}, // __builtin_msa_dpadd_s_h - {Intrinsic::mips_dpadd_s_w, 53416}, // __builtin_msa_dpadd_s_w - {Intrinsic::mips_dpadd_u_d, 53440}, // __builtin_msa_dpadd_u_d - {Intrinsic::mips_dpadd_u_h, 53464}, // __builtin_msa_dpadd_u_h - {Intrinsic::mips_dpadd_u_w, 53488}, // __builtin_msa_dpadd_u_w - {Intrinsic::mips_dpsub_s_d, 53887}, // __builtin_msa_dpsub_s_d - {Intrinsic::mips_dpsub_s_h, 53911}, // __builtin_msa_dpsub_s_h - {Intrinsic::mips_dpsub_s_w, 53935}, // __builtin_msa_dpsub_s_w - {Intrinsic::mips_dpsub_u_d, 53959}, // __builtin_msa_dpsub_u_d - {Intrinsic::mips_dpsub_u_h, 53983}, // __builtin_msa_dpsub_u_h - {Intrinsic::mips_dpsub_u_w, 54007}, // __builtin_msa_dpsub_u_w - {Intrinsic::mips_fadd_d, 54193}, // __builtin_msa_fadd_d - {Intrinsic::mips_fadd_w, 54214}, // __builtin_msa_fadd_w - {Intrinsic::mips_fcaf_d, 54235}, // __builtin_msa_fcaf_d - {Intrinsic::mips_fcaf_w, 54256}, // __builtin_msa_fcaf_w - {Intrinsic::mips_fceq_d, 54277}, // __builtin_msa_fceq_d - {Intrinsic::mips_fceq_w, 54298}, // __builtin_msa_fceq_w - {Intrinsic::mips_fclass_d, 54319}, // __builtin_msa_fclass_d - {Intrinsic::mips_fclass_w, 54342}, // __builtin_msa_fclass_w - {Intrinsic::mips_fcle_d, 54365}, // __builtin_msa_fcle_d - {Intrinsic::mips_fcle_w, 54386}, // __builtin_msa_fcle_w - {Intrinsic::mips_fclt_d, 54407}, // __builtin_msa_fclt_d - {Intrinsic::mips_fclt_w, 54428}, // __builtin_msa_fclt_w - {Intrinsic::mips_fcne_d, 54449}, // __builtin_msa_fcne_d - {Intrinsic::mips_fcne_w, 54470}, // __builtin_msa_fcne_w - {Intrinsic::mips_fcor_d, 54491}, // __builtin_msa_fcor_d - {Intrinsic::mips_fcor_w, 54512}, // __builtin_msa_fcor_w - {Intrinsic::mips_fcueq_d, 54533}, // __builtin_msa_fcueq_d - {Intrinsic::mips_fcueq_w, 54555}, // __builtin_msa_fcueq_w - {Intrinsic::mips_fcule_d, 54577}, // __builtin_msa_fcule_d - {Intrinsic::mips_fcule_w, 54599}, // __builtin_msa_fcule_w - {Intrinsic::mips_fcult_d, 54621}, // __builtin_msa_fcult_d - {Intrinsic::mips_fcult_w, 54643}, // __builtin_msa_fcult_w - {Intrinsic::mips_fcun_d, 54665}, // __builtin_msa_fcun_d - {Intrinsic::mips_fcun_w, 54686}, // __builtin_msa_fcun_w - {Intrinsic::mips_fcune_d, 54707}, // __builtin_msa_fcune_d - {Intrinsic::mips_fcune_w, 54729}, // __builtin_msa_fcune_w - {Intrinsic::mips_fdiv_d, 54751}, // __builtin_msa_fdiv_d - {Intrinsic::mips_fdiv_w, 54772}, // __builtin_msa_fdiv_w - {Intrinsic::mips_fexdo_h, 54793}, // __builtin_msa_fexdo_h - {Intrinsic::mips_fexdo_w, 54815}, // __builtin_msa_fexdo_w - {Intrinsic::mips_fexp2_d, 54837}, // __builtin_msa_fexp2_d - {Intrinsic::mips_fexp2_w, 54859}, // __builtin_msa_fexp2_w - {Intrinsic::mips_fexupl_d, 54881}, // __builtin_msa_fexupl_d - {Intrinsic::mips_fexupl_w, 54904}, // __builtin_msa_fexupl_w - {Intrinsic::mips_fexupr_d, 54927}, // __builtin_msa_fexupr_d - {Intrinsic::mips_fexupr_w, 54950}, // __builtin_msa_fexupr_w - {Intrinsic::mips_ffint_s_d, 54973}, // __builtin_msa_ffint_s_d - {Intrinsic::mips_ffint_s_w, 54997}, // __builtin_msa_ffint_s_w - {Intrinsic::mips_ffint_u_d, 55021}, // __builtin_msa_ffint_u_d - {Intrinsic::mips_ffint_u_w, 55045}, // __builtin_msa_ffint_u_w - {Intrinsic::mips_ffql_d, 55069}, // __builtin_msa_ffql_d - {Intrinsic::mips_ffql_w, 55090}, // __builtin_msa_ffql_w - {Intrinsic::mips_ffqr_d, 55111}, // __builtin_msa_ffqr_d - {Intrinsic::mips_ffqr_w, 55132}, // __builtin_msa_ffqr_w - {Intrinsic::mips_fill_b, 55153}, // __builtin_msa_fill_b - {Intrinsic::mips_fill_d, 55174}, // __builtin_msa_fill_d - {Intrinsic::mips_fill_h, 55195}, // __builtin_msa_fill_h - {Intrinsic::mips_fill_w, 55216}, // __builtin_msa_fill_w - {Intrinsic::mips_flog2_d, 55237}, // __builtin_msa_flog2_d - {Intrinsic::mips_flog2_w, 55259}, // __builtin_msa_flog2_w - {Intrinsic::mips_fmadd_d, 55281}, // __builtin_msa_fmadd_d - {Intrinsic::mips_fmadd_w, 55303}, // __builtin_msa_fmadd_w - {Intrinsic::mips_fmax_a_d, 55325}, // __builtin_msa_fmax_a_d - {Intrinsic::mips_fmax_a_w, 55348}, // __builtin_msa_fmax_a_w - {Intrinsic::mips_fmax_d, 55371}, // __builtin_msa_fmax_d - {Intrinsic::mips_fmax_w, 55392}, // __builtin_msa_fmax_w - {Intrinsic::mips_fmin_a_d, 55413}, // __builtin_msa_fmin_a_d - {Intrinsic::mips_fmin_a_w, 55436}, // __builtin_msa_fmin_a_w - {Intrinsic::mips_fmin_d, 55459}, // __builtin_msa_fmin_d - {Intrinsic::mips_fmin_w, 55480}, // __builtin_msa_fmin_w - {Intrinsic::mips_fmsub_d, 55501}, // __builtin_msa_fmsub_d - {Intrinsic::mips_fmsub_w, 55523}, // __builtin_msa_fmsub_w - {Intrinsic::mips_fmul_d, 55545}, // __builtin_msa_fmul_d - {Intrinsic::mips_fmul_w, 55566}, // __builtin_msa_fmul_w - {Intrinsic::mips_frcp_d, 55587}, // __builtin_msa_frcp_d - {Intrinsic::mips_frcp_w, 55608}, // __builtin_msa_frcp_w - {Intrinsic::mips_frint_d, 55629}, // __builtin_msa_frint_d - {Intrinsic::mips_frint_w, 55651}, // __builtin_msa_frint_w - {Intrinsic::mips_frsqrt_d, 55673}, // __builtin_msa_frsqrt_d - {Intrinsic::mips_frsqrt_w, 55696}, // __builtin_msa_frsqrt_w - {Intrinsic::mips_fsaf_d, 55719}, // __builtin_msa_fsaf_d - {Intrinsic::mips_fsaf_w, 55740}, // __builtin_msa_fsaf_w - {Intrinsic::mips_fseq_d, 55761}, // __builtin_msa_fseq_d - {Intrinsic::mips_fseq_w, 55782}, // __builtin_msa_fseq_w - {Intrinsic::mips_fsle_d, 55803}, // __builtin_msa_fsle_d - {Intrinsic::mips_fsle_w, 55824}, // __builtin_msa_fsle_w - {Intrinsic::mips_fslt_d, 55845}, // __builtin_msa_fslt_d - {Intrinsic::mips_fslt_w, 55866}, // __builtin_msa_fslt_w - {Intrinsic::mips_fsne_d, 55887}, // __builtin_msa_fsne_d - {Intrinsic::mips_fsne_w, 55908}, // __builtin_msa_fsne_w - {Intrinsic::mips_fsor_d, 55929}, // __builtin_msa_fsor_d - {Intrinsic::mips_fsor_w, 55950}, // __builtin_msa_fsor_w - {Intrinsic::mips_fsqrt_d, 55971}, // __builtin_msa_fsqrt_d - {Intrinsic::mips_fsqrt_w, 55993}, // __builtin_msa_fsqrt_w - {Intrinsic::mips_fsub_d, 56015}, // __builtin_msa_fsub_d - {Intrinsic::mips_fsub_w, 56036}, // __builtin_msa_fsub_w - {Intrinsic::mips_fsueq_d, 56057}, // __builtin_msa_fsueq_d - {Intrinsic::mips_fsueq_w, 56079}, // __builtin_msa_fsueq_w - {Intrinsic::mips_fsule_d, 56101}, // __builtin_msa_fsule_d - {Intrinsic::mips_fsule_w, 56123}, // __builtin_msa_fsule_w - {Intrinsic::mips_fsult_d, 56145}, // __builtin_msa_fsult_d - {Intrinsic::mips_fsult_w, 56167}, // __builtin_msa_fsult_w - {Intrinsic::mips_fsun_d, 56189}, // __builtin_msa_fsun_d - {Intrinsic::mips_fsun_w, 56210}, // __builtin_msa_fsun_w - {Intrinsic::mips_fsune_d, 56231}, // __builtin_msa_fsune_d - {Intrinsic::mips_fsune_w, 56253}, // __builtin_msa_fsune_w - {Intrinsic::mips_ftint_s_d, 56275}, // __builtin_msa_ftint_s_d - {Intrinsic::mips_ftint_s_w, 56299}, // __builtin_msa_ftint_s_w - {Intrinsic::mips_ftint_u_d, 56323}, // __builtin_msa_ftint_u_d - {Intrinsic::mips_ftint_u_w, 56347}, // __builtin_msa_ftint_u_w - {Intrinsic::mips_ftq_h, 56371}, // __builtin_msa_ftq_h - {Intrinsic::mips_ftq_w, 56391}, // __builtin_msa_ftq_w - {Intrinsic::mips_ftrunc_s_d, 56411}, // __builtin_msa_ftrunc_s_d - {Intrinsic::mips_ftrunc_s_w, 56436}, // __builtin_msa_ftrunc_s_w - {Intrinsic::mips_ftrunc_u_d, 56461}, // __builtin_msa_ftrunc_u_d - {Intrinsic::mips_ftrunc_u_w, 56486}, // __builtin_msa_ftrunc_u_w - {Intrinsic::mips_hadd_s_d, 56511}, // __builtin_msa_hadd_s_d - {Intrinsic::mips_hadd_s_h, 56534}, // __builtin_msa_hadd_s_h - {Intrinsic::mips_hadd_s_w, 56557}, // __builtin_msa_hadd_s_w - {Intrinsic::mips_hadd_u_d, 56580}, // __builtin_msa_hadd_u_d - {Intrinsic::mips_hadd_u_h, 56603}, // __builtin_msa_hadd_u_h - {Intrinsic::mips_hadd_u_w, 56626}, // __builtin_msa_hadd_u_w - {Intrinsic::mips_hsub_s_d, 56649}, // __builtin_msa_hsub_s_d - {Intrinsic::mips_hsub_s_h, 56672}, // __builtin_msa_hsub_s_h - {Intrinsic::mips_hsub_s_w, 56695}, // __builtin_msa_hsub_s_w - {Intrinsic::mips_hsub_u_d, 56718}, // __builtin_msa_hsub_u_d - {Intrinsic::mips_hsub_u_h, 56741}, // __builtin_msa_hsub_u_h - {Intrinsic::mips_hsub_u_w, 56764}, // __builtin_msa_hsub_u_w - {Intrinsic::mips_ilvev_b, 56787}, // __builtin_msa_ilvev_b - {Intrinsic::mips_ilvev_d, 56809}, // __builtin_msa_ilvev_d - {Intrinsic::mips_ilvev_h, 56831}, // __builtin_msa_ilvev_h - {Intrinsic::mips_ilvev_w, 56853}, // __builtin_msa_ilvev_w - {Intrinsic::mips_ilvl_b, 56875}, // __builtin_msa_ilvl_b - {Intrinsic::mips_ilvl_d, 56896}, // __builtin_msa_ilvl_d - {Intrinsic::mips_ilvl_h, 56917}, // __builtin_msa_ilvl_h - {Intrinsic::mips_ilvl_w, 56938}, // __builtin_msa_ilvl_w - {Intrinsic::mips_ilvod_b, 56959}, // __builtin_msa_ilvod_b - {Intrinsic::mips_ilvod_d, 56981}, // __builtin_msa_ilvod_d - {Intrinsic::mips_ilvod_h, 57003}, // __builtin_msa_ilvod_h - {Intrinsic::mips_ilvod_w, 57025}, // __builtin_msa_ilvod_w - {Intrinsic::mips_ilvr_b, 57047}, // __builtin_msa_ilvr_b - {Intrinsic::mips_ilvr_d, 57068}, // __builtin_msa_ilvr_d - {Intrinsic::mips_ilvr_h, 57089}, // __builtin_msa_ilvr_h - {Intrinsic::mips_ilvr_w, 57110}, // __builtin_msa_ilvr_w - {Intrinsic::mips_insert_b, 57131}, // __builtin_msa_insert_b - {Intrinsic::mips_insert_d, 57154}, // __builtin_msa_insert_d - {Intrinsic::mips_insert_h, 57177}, // __builtin_msa_insert_h - {Intrinsic::mips_insert_w, 57200}, // __builtin_msa_insert_w - {Intrinsic::mips_insve_b, 57243}, // __builtin_msa_insve_b - {Intrinsic::mips_insve_d, 57265}, // __builtin_msa_insve_d - {Intrinsic::mips_insve_h, 57287}, // __builtin_msa_insve_h - {Intrinsic::mips_insve_w, 57309}, // __builtin_msa_insve_w - {Intrinsic::mips_ld_b, 57351}, // __builtin_msa_ld_b - {Intrinsic::mips_ld_d, 57370}, // __builtin_msa_ld_d - {Intrinsic::mips_ld_h, 57389}, // __builtin_msa_ld_h - {Intrinsic::mips_ld_w, 57408}, // __builtin_msa_ld_w - {Intrinsic::mips_ldi_b, 57427}, // __builtin_msa_ldi_b - {Intrinsic::mips_ldi_d, 57447}, // __builtin_msa_ldi_d - {Intrinsic::mips_ldi_h, 57467}, // __builtin_msa_ldi_h - {Intrinsic::mips_ldi_w, 57487}, // __builtin_msa_ldi_w - {Intrinsic::mips_madd_q_h, 57584}, // __builtin_msa_madd_q_h - {Intrinsic::mips_madd_q_w, 57607}, // __builtin_msa_madd_q_w - {Intrinsic::mips_maddr_q_h, 57630}, // __builtin_msa_maddr_q_h - {Intrinsic::mips_maddr_q_w, 57654}, // __builtin_msa_maddr_q_w - {Intrinsic::mips_maddv_b, 57699}, // __builtin_msa_maddv_b - {Intrinsic::mips_maddv_d, 57721}, // __builtin_msa_maddv_d - {Intrinsic::mips_maddv_h, 57743}, // __builtin_msa_maddv_h - {Intrinsic::mips_maddv_w, 57765}, // __builtin_msa_maddv_w - {Intrinsic::mips_max_a_b, 57897}, // __builtin_msa_max_a_b - {Intrinsic::mips_max_a_d, 57919}, // __builtin_msa_max_a_d - {Intrinsic::mips_max_a_h, 57941}, // __builtin_msa_max_a_h - {Intrinsic::mips_max_a_w, 57963}, // __builtin_msa_max_a_w - {Intrinsic::mips_max_s_b, 57985}, // __builtin_msa_max_s_b - {Intrinsic::mips_max_s_d, 58007}, // __builtin_msa_max_s_d - {Intrinsic::mips_max_s_h, 58029}, // __builtin_msa_max_s_h - {Intrinsic::mips_max_s_w, 58051}, // __builtin_msa_max_s_w - {Intrinsic::mips_max_u_b, 58073}, // __builtin_msa_max_u_b - {Intrinsic::mips_max_u_d, 58095}, // __builtin_msa_max_u_d - {Intrinsic::mips_max_u_h, 58117}, // __builtin_msa_max_u_h - {Intrinsic::mips_max_u_w, 58139}, // __builtin_msa_max_u_w - {Intrinsic::mips_maxi_s_b, 58161}, // __builtin_msa_maxi_s_b - {Intrinsic::mips_maxi_s_d, 58184}, // __builtin_msa_maxi_s_d - {Intrinsic::mips_maxi_s_h, 58207}, // __builtin_msa_maxi_s_h - {Intrinsic::mips_maxi_s_w, 58230}, // __builtin_msa_maxi_s_w - {Intrinsic::mips_maxi_u_b, 58253}, // __builtin_msa_maxi_u_b - {Intrinsic::mips_maxi_u_d, 58276}, // __builtin_msa_maxi_u_d - {Intrinsic::mips_maxi_u_h, 58299}, // __builtin_msa_maxi_u_h - {Intrinsic::mips_maxi_u_w, 58322}, // __builtin_msa_maxi_u_w - {Intrinsic::mips_min_a_b, 58345}, // __builtin_msa_min_a_b - {Intrinsic::mips_min_a_d, 58367}, // __builtin_msa_min_a_d - {Intrinsic::mips_min_a_h, 58389}, // __builtin_msa_min_a_h - {Intrinsic::mips_min_a_w, 58411}, // __builtin_msa_min_a_w - {Intrinsic::mips_min_s_b, 58433}, // __builtin_msa_min_s_b - {Intrinsic::mips_min_s_d, 58455}, // __builtin_msa_min_s_d - {Intrinsic::mips_min_s_h, 58477}, // __builtin_msa_min_s_h - {Intrinsic::mips_min_s_w, 58499}, // __builtin_msa_min_s_w - {Intrinsic::mips_min_u_b, 58521}, // __builtin_msa_min_u_b - {Intrinsic::mips_min_u_d, 58543}, // __builtin_msa_min_u_d - {Intrinsic::mips_min_u_h, 58565}, // __builtin_msa_min_u_h - {Intrinsic::mips_min_u_w, 58587}, // __builtin_msa_min_u_w - {Intrinsic::mips_mini_s_b, 58609}, // __builtin_msa_mini_s_b - {Intrinsic::mips_mini_s_d, 58632}, // __builtin_msa_mini_s_d - {Intrinsic::mips_mini_s_h, 58655}, // __builtin_msa_mini_s_h - {Intrinsic::mips_mini_s_w, 58678}, // __builtin_msa_mini_s_w - {Intrinsic::mips_mini_u_b, 58701}, // __builtin_msa_mini_u_b - {Intrinsic::mips_mini_u_d, 58724}, // __builtin_msa_mini_u_d - {Intrinsic::mips_mini_u_h, 58747}, // __builtin_msa_mini_u_h - {Intrinsic::mips_mini_u_w, 58770}, // __builtin_msa_mini_u_w - {Intrinsic::mips_mod_s_b, 58793}, // __builtin_msa_mod_s_b - {Intrinsic::mips_mod_s_d, 58815}, // __builtin_msa_mod_s_d - {Intrinsic::mips_mod_s_h, 58837}, // __builtin_msa_mod_s_h - {Intrinsic::mips_mod_s_w, 58859}, // __builtin_msa_mod_s_w - {Intrinsic::mips_mod_u_b, 58881}, // __builtin_msa_mod_u_b - {Intrinsic::mips_mod_u_d, 58903}, // __builtin_msa_mod_u_d - {Intrinsic::mips_mod_u_h, 58925}, // __builtin_msa_mod_u_h - {Intrinsic::mips_mod_u_w, 58947}, // __builtin_msa_mod_u_w - {Intrinsic::mips_move_v, 58991}, // __builtin_msa_move_v - {Intrinsic::mips_msub_q_h, 59032}, // __builtin_msa_msub_q_h - {Intrinsic::mips_msub_q_w, 59055}, // __builtin_msa_msub_q_w - {Intrinsic::mips_msubr_q_h, 59078}, // __builtin_msa_msubr_q_h - {Intrinsic::mips_msubr_q_w, 59102}, // __builtin_msa_msubr_q_w - {Intrinsic::mips_msubv_b, 59147}, // __builtin_msa_msubv_b - {Intrinsic::mips_msubv_d, 59169}, // __builtin_msa_msubv_d - {Intrinsic::mips_msubv_h, 59191}, // __builtin_msa_msubv_h - {Intrinsic::mips_msubv_w, 59213}, // __builtin_msa_msubv_w - {Intrinsic::mips_mul_q_h, 59279}, // __builtin_msa_mul_q_h - {Intrinsic::mips_mul_q_w, 59301}, // __builtin_msa_mul_q_w - {Intrinsic::mips_mulr_q_h, 59565}, // __builtin_msa_mulr_q_h - {Intrinsic::mips_mulr_q_w, 59588}, // __builtin_msa_mulr_q_w - {Intrinsic::mips_mulv_b, 59707}, // __builtin_msa_mulv_b - {Intrinsic::mips_mulv_d, 59728}, // __builtin_msa_mulv_d - {Intrinsic::mips_mulv_h, 59749}, // __builtin_msa_mulv_h - {Intrinsic::mips_mulv_w, 59770}, // __builtin_msa_mulv_w - {Intrinsic::mips_nloc_b, 59791}, // __builtin_msa_nloc_b - {Intrinsic::mips_nloc_d, 59812}, // __builtin_msa_nloc_d - {Intrinsic::mips_nloc_h, 59833}, // __builtin_msa_nloc_h - {Intrinsic::mips_nloc_w, 59854}, // __builtin_msa_nloc_w - {Intrinsic::mips_nlzc_b, 59875}, // __builtin_msa_nlzc_b - {Intrinsic::mips_nlzc_d, 59896}, // __builtin_msa_nlzc_d - {Intrinsic::mips_nlzc_h, 59917}, // __builtin_msa_nlzc_h - {Intrinsic::mips_nlzc_w, 59938}, // __builtin_msa_nlzc_w - {Intrinsic::mips_nor_v, 59959}, // __builtin_msa_nor_v - {Intrinsic::mips_nori_b, 59979}, // __builtin_msa_nori_b - {Intrinsic::mips_or_v, 60000}, // __builtin_msa_or_v - {Intrinsic::mips_ori_b, 60019}, // __builtin_msa_ori_b - {Intrinsic::mips_pckev_b, 60064}, // __builtin_msa_pckev_b - {Intrinsic::mips_pckev_d, 60086}, // __builtin_msa_pckev_d - {Intrinsic::mips_pckev_h, 60108}, // __builtin_msa_pckev_h - {Intrinsic::mips_pckev_w, 60130}, // __builtin_msa_pckev_w - {Intrinsic::mips_pckod_b, 60152}, // __builtin_msa_pckod_b - {Intrinsic::mips_pckod_d, 60174}, // __builtin_msa_pckod_d - {Intrinsic::mips_pckod_h, 60196}, // __builtin_msa_pckod_h - {Intrinsic::mips_pckod_w, 60218}, // __builtin_msa_pckod_w - {Intrinsic::mips_pcnt_b, 60240}, // __builtin_msa_pcnt_b - {Intrinsic::mips_pcnt_d, 60261}, // __builtin_msa_pcnt_d - {Intrinsic::mips_pcnt_h, 60282}, // __builtin_msa_pcnt_h - {Intrinsic::mips_pcnt_w, 60303}, // __builtin_msa_pcnt_w - {Intrinsic::mips_sat_s_b, 60987}, // __builtin_msa_sat_s_b - {Intrinsic::mips_sat_s_d, 61009}, // __builtin_msa_sat_s_d - {Intrinsic::mips_sat_s_h, 61031}, // __builtin_msa_sat_s_h - {Intrinsic::mips_sat_s_w, 61053}, // __builtin_msa_sat_s_w - {Intrinsic::mips_sat_u_b, 61075}, // __builtin_msa_sat_u_b - {Intrinsic::mips_sat_u_d, 61097}, // __builtin_msa_sat_u_d - {Intrinsic::mips_sat_u_h, 61119}, // __builtin_msa_sat_u_h - {Intrinsic::mips_sat_u_w, 61141}, // __builtin_msa_sat_u_w - {Intrinsic::mips_shf_b, 61163}, // __builtin_msa_shf_b - {Intrinsic::mips_shf_h, 61183}, // __builtin_msa_shf_h - {Intrinsic::mips_shf_w, 61203}, // __builtin_msa_shf_w - {Intrinsic::mips_sld_b, 61505}, // __builtin_msa_sld_b - {Intrinsic::mips_sld_d, 61525}, // __builtin_msa_sld_d - {Intrinsic::mips_sld_h, 61545}, // __builtin_msa_sld_h - {Intrinsic::mips_sld_w, 61565}, // __builtin_msa_sld_w - {Intrinsic::mips_sldi_b, 61585}, // __builtin_msa_sldi_b - {Intrinsic::mips_sldi_d, 61606}, // __builtin_msa_sldi_d - {Intrinsic::mips_sldi_h, 61627}, // __builtin_msa_sldi_h - {Intrinsic::mips_sldi_w, 61648}, // __builtin_msa_sldi_w - {Intrinsic::mips_sll_b, 61669}, // __builtin_msa_sll_b - {Intrinsic::mips_sll_d, 61689}, // __builtin_msa_sll_d - {Intrinsic::mips_sll_h, 61709}, // __builtin_msa_sll_h - {Intrinsic::mips_sll_w, 61729}, // __builtin_msa_sll_w - {Intrinsic::mips_slli_b, 61749}, // __builtin_msa_slli_b - {Intrinsic::mips_slli_d, 61770}, // __builtin_msa_slli_d - {Intrinsic::mips_slli_h, 61791}, // __builtin_msa_slli_h - {Intrinsic::mips_slli_w, 61812}, // __builtin_msa_slli_w - {Intrinsic::mips_splat_b, 61833}, // __builtin_msa_splat_b - {Intrinsic::mips_splat_d, 61855}, // __builtin_msa_splat_d - {Intrinsic::mips_splat_h, 61877}, // __builtin_msa_splat_h - {Intrinsic::mips_splat_w, 61899}, // __builtin_msa_splat_w - {Intrinsic::mips_splati_b, 61921}, // __builtin_msa_splati_b - {Intrinsic::mips_splati_d, 61944}, // __builtin_msa_splati_d - {Intrinsic::mips_splati_h, 61967}, // __builtin_msa_splati_h - {Intrinsic::mips_splati_w, 61990}, // __builtin_msa_splati_w - {Intrinsic::mips_sra_b, 62013}, // __builtin_msa_sra_b - {Intrinsic::mips_sra_d, 62033}, // __builtin_msa_sra_d - {Intrinsic::mips_sra_h, 62053}, // __builtin_msa_sra_h - {Intrinsic::mips_sra_w, 62073}, // __builtin_msa_sra_w - {Intrinsic::mips_srai_b, 62093}, // __builtin_msa_srai_b - {Intrinsic::mips_srai_d, 62114}, // __builtin_msa_srai_d - {Intrinsic::mips_srai_h, 62135}, // __builtin_msa_srai_h - {Intrinsic::mips_srai_w, 62156}, // __builtin_msa_srai_w - {Intrinsic::mips_srar_b, 62177}, // __builtin_msa_srar_b - {Intrinsic::mips_srar_d, 62198}, // __builtin_msa_srar_d - {Intrinsic::mips_srar_h, 62219}, // __builtin_msa_srar_h - {Intrinsic::mips_srar_w, 62240}, // __builtin_msa_srar_w - {Intrinsic::mips_srari_b, 62261}, // __builtin_msa_srari_b - {Intrinsic::mips_srari_d, 62283}, // __builtin_msa_srari_d - {Intrinsic::mips_srari_h, 62305}, // __builtin_msa_srari_h - {Intrinsic::mips_srari_w, 62327}, // __builtin_msa_srari_w - {Intrinsic::mips_srl_b, 62349}, // __builtin_msa_srl_b - {Intrinsic::mips_srl_d, 62369}, // __builtin_msa_srl_d - {Intrinsic::mips_srl_h, 62389}, // __builtin_msa_srl_h - {Intrinsic::mips_srl_w, 62409}, // __builtin_msa_srl_w - {Intrinsic::mips_srli_b, 62429}, // __builtin_msa_srli_b - {Intrinsic::mips_srli_d, 62450}, // __builtin_msa_srli_d - {Intrinsic::mips_srli_h, 62471}, // __builtin_msa_srli_h - {Intrinsic::mips_srli_w, 62492}, // __builtin_msa_srli_w - {Intrinsic::mips_srlr_b, 62513}, // __builtin_msa_srlr_b - {Intrinsic::mips_srlr_d, 62534}, // __builtin_msa_srlr_d - {Intrinsic::mips_srlr_h, 62555}, // __builtin_msa_srlr_h - {Intrinsic::mips_srlr_w, 62576}, // __builtin_msa_srlr_w - {Intrinsic::mips_srlri_b, 62597}, // __builtin_msa_srlri_b - {Intrinsic::mips_srlri_d, 62619}, // __builtin_msa_srlri_d - {Intrinsic::mips_srlri_h, 62641}, // __builtin_msa_srlri_h - {Intrinsic::mips_srlri_w, 62663}, // __builtin_msa_srlri_w - {Intrinsic::mips_st_b, 62685}, // __builtin_msa_st_b - {Intrinsic::mips_st_d, 62704}, // __builtin_msa_st_d - {Intrinsic::mips_st_h, 62723}, // __builtin_msa_st_h - {Intrinsic::mips_st_w, 62742}, // __builtin_msa_st_w - {Intrinsic::mips_subs_s_b, 62931}, // __builtin_msa_subs_s_b - {Intrinsic::mips_subs_s_d, 62954}, // __builtin_msa_subs_s_d - {Intrinsic::mips_subs_s_h, 62977}, // __builtin_msa_subs_s_h - {Intrinsic::mips_subs_s_w, 63000}, // __builtin_msa_subs_s_w - {Intrinsic::mips_subs_u_b, 63023}, // __builtin_msa_subs_u_b - {Intrinsic::mips_subs_u_d, 63046}, // __builtin_msa_subs_u_d - {Intrinsic::mips_subs_u_h, 63069}, // __builtin_msa_subs_u_h - {Intrinsic::mips_subs_u_w, 63092}, // __builtin_msa_subs_u_w - {Intrinsic::mips_subsus_u_b, 63115}, // __builtin_msa_subsus_u_b - {Intrinsic::mips_subsus_u_d, 63140}, // __builtin_msa_subsus_u_d - {Intrinsic::mips_subsus_u_h, 63165}, // __builtin_msa_subsus_u_h - {Intrinsic::mips_subsus_u_w, 63190}, // __builtin_msa_subsus_u_w - {Intrinsic::mips_subsuu_s_b, 63215}, // __builtin_msa_subsuu_s_b - {Intrinsic::mips_subsuu_s_d, 63240}, // __builtin_msa_subsuu_s_d - {Intrinsic::mips_subsuu_s_h, 63265}, // __builtin_msa_subsuu_s_h - {Intrinsic::mips_subsuu_s_w, 63290}, // __builtin_msa_subsuu_s_w - {Intrinsic::mips_subv_b, 63461}, // __builtin_msa_subv_b - {Intrinsic::mips_subv_d, 63482}, // __builtin_msa_subv_d - {Intrinsic::mips_subv_h, 63503}, // __builtin_msa_subv_h - {Intrinsic::mips_subv_w, 63524}, // __builtin_msa_subv_w - {Intrinsic::mips_subvi_b, 63545}, // __builtin_msa_subvi_b - {Intrinsic::mips_subvi_d, 63567}, // __builtin_msa_subvi_d - {Intrinsic::mips_subvi_h, 63589}, // __builtin_msa_subvi_h - {Intrinsic::mips_subvi_w, 63611}, // __builtin_msa_subvi_w - {Intrinsic::mips_vshf_b, 63633}, // __builtin_msa_vshf_b - {Intrinsic::mips_vshf_d, 63654}, // __builtin_msa_vshf_d - {Intrinsic::mips_vshf_h, 63675}, // __builtin_msa_vshf_h - {Intrinsic::mips_vshf_w, 63696}, // __builtin_msa_vshf_w - {Intrinsic::mips_xor_v, 63738}, // __builtin_msa_xor_v - {Intrinsic::mips_xori_b, 63758}, // __builtin_msa_xori_b - }; - auto I = std::lower_bound(std::begin(mipsNames), - std::end(mipsNames), - BuiltinNameStr); - if (I != std::end(mipsNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "nvvm") { - static const BuiltinEntry nvvmNames[] = { - {Intrinsic::nvvm_abs_i, 63779}, // __nvvm_abs_i - {Intrinsic::nvvm_abs_ll, 63792}, // __nvvm_abs_ll - {Intrinsic::nvvm_add_rm_d, 63806}, // __nvvm_add_rm_d - {Intrinsic::nvvm_add_rm_f, 63822}, // __nvvm_add_rm_f - {Intrinsic::nvvm_add_rm_ftz_f, 63838}, // __nvvm_add_rm_ftz_f - {Intrinsic::nvvm_add_rn_d, 63858}, // __nvvm_add_rn_d - {Intrinsic::nvvm_add_rn_f, 63874}, // __nvvm_add_rn_f - {Intrinsic::nvvm_add_rn_ftz_f, 63890}, // __nvvm_add_rn_ftz_f - {Intrinsic::nvvm_add_rp_d, 63910}, // __nvvm_add_rp_d - {Intrinsic::nvvm_add_rp_f, 63926}, // __nvvm_add_rp_f - {Intrinsic::nvvm_add_rp_ftz_f, 63942}, // __nvvm_add_rp_ftz_f - {Intrinsic::nvvm_add_rz_d, 63962}, // __nvvm_add_rz_d - {Intrinsic::nvvm_add_rz_f, 63978}, // __nvvm_add_rz_f - {Intrinsic::nvvm_add_rz_ftz_f, 63994}, // __nvvm_add_rz_ftz_f - {Intrinsic::nvvm_barrier0_and, 64044}, // __nvvm_bar0_and - {Intrinsic::nvvm_barrier0_or, 64060}, // __nvvm_bar0_or - {Intrinsic::nvvm_barrier0_popc, 64075}, // __nvvm_bar0_popc - {Intrinsic::nvvm_bar_sync, 64014}, // __nvvm_bar_sync - {Intrinsic::nvvm_bitcast_d2ll, 64092}, // __nvvm_bitcast_d2ll - {Intrinsic::nvvm_bitcast_f2i, 64112}, // __nvvm_bitcast_f2i - {Intrinsic::nvvm_bitcast_i2f, 64131}, // __nvvm_bitcast_i2f - {Intrinsic::nvvm_bitcast_ll2d, 64150}, // __nvvm_bitcast_ll2d - {Intrinsic::nvvm_brev32, 64170}, // __nvvm_brev32 - {Intrinsic::nvvm_brev64, 64184}, // __nvvm_brev64 - {Intrinsic::nvvm_ceil_d, 64198}, // __nvvm_ceil_d - {Intrinsic::nvvm_ceil_f, 64212}, // __nvvm_ceil_f - {Intrinsic::nvvm_ceil_ftz_f, 64226}, // __nvvm_ceil_ftz_f - {Intrinsic::nvvm_clz_i, 64244}, // __nvvm_clz_i - {Intrinsic::nvvm_clz_ll, 64257}, // __nvvm_clz_ll - {Intrinsic::nvvm_cos_approx_f, 64271}, // __nvvm_cos_approx_f - {Intrinsic::nvvm_cos_approx_ftz_f, 64291}, // __nvvm_cos_approx_ftz_f - {Intrinsic::nvvm_d2f_rm, 64315}, // __nvvm_d2f_rm - {Intrinsic::nvvm_d2f_rm_ftz, 64329}, // __nvvm_d2f_rm_ftz - {Intrinsic::nvvm_d2f_rn, 64347}, // __nvvm_d2f_rn - {Intrinsic::nvvm_d2f_rn_ftz, 64361}, // __nvvm_d2f_rn_ftz - {Intrinsic::nvvm_d2f_rp, 64379}, // __nvvm_d2f_rp - {Intrinsic::nvvm_d2f_rp_ftz, 64393}, // __nvvm_d2f_rp_ftz - {Intrinsic::nvvm_d2f_rz, 64411}, // __nvvm_d2f_rz - {Intrinsic::nvvm_d2f_rz_ftz, 64425}, // __nvvm_d2f_rz_ftz - {Intrinsic::nvvm_d2i_hi, 64443}, // __nvvm_d2i_hi - {Intrinsic::nvvm_d2i_lo, 64457}, // __nvvm_d2i_lo - {Intrinsic::nvvm_d2i_rm, 64471}, // __nvvm_d2i_rm - {Intrinsic::nvvm_d2i_rn, 64485}, // __nvvm_d2i_rn - {Intrinsic::nvvm_d2i_rp, 64499}, // __nvvm_d2i_rp - {Intrinsic::nvvm_d2i_rz, 64513}, // __nvvm_d2i_rz - {Intrinsic::nvvm_d2ll_rm, 64527}, // __nvvm_d2ll_rm - {Intrinsic::nvvm_d2ll_rn, 64542}, // __nvvm_d2ll_rn - {Intrinsic::nvvm_d2ll_rp, 64557}, // __nvvm_d2ll_rp - {Intrinsic::nvvm_d2ll_rz, 64572}, // __nvvm_d2ll_rz - {Intrinsic::nvvm_d2ui_rm, 64587}, // __nvvm_d2ui_rm - {Intrinsic::nvvm_d2ui_rn, 64602}, // __nvvm_d2ui_rn - {Intrinsic::nvvm_d2ui_rp, 64617}, // __nvvm_d2ui_rp - {Intrinsic::nvvm_d2ui_rz, 64632}, // __nvvm_d2ui_rz - {Intrinsic::nvvm_d2ull_rm, 64647}, // __nvvm_d2ull_rm - {Intrinsic::nvvm_d2ull_rn, 64663}, // __nvvm_d2ull_rn - {Intrinsic::nvvm_d2ull_rp, 64679}, // __nvvm_d2ull_rp - {Intrinsic::nvvm_d2ull_rz, 64695}, // __nvvm_d2ull_rz - {Intrinsic::nvvm_div_approx_f, 64711}, // __nvvm_div_approx_f - {Intrinsic::nvvm_div_approx_ftz_f, 64731}, // __nvvm_div_approx_ftz_f - {Intrinsic::nvvm_div_rm_d, 64755}, // __nvvm_div_rm_d - {Intrinsic::nvvm_div_rm_f, 64771}, // __nvvm_div_rm_f - {Intrinsic::nvvm_div_rm_ftz_f, 64787}, // __nvvm_div_rm_ftz_f - {Intrinsic::nvvm_div_rn_d, 64807}, // __nvvm_div_rn_d - {Intrinsic::nvvm_div_rn_f, 64823}, // __nvvm_div_rn_f - {Intrinsic::nvvm_div_rn_ftz_f, 64839}, // __nvvm_div_rn_ftz_f - {Intrinsic::nvvm_div_rp_d, 64859}, // __nvvm_div_rp_d - {Intrinsic::nvvm_div_rp_f, 64875}, // __nvvm_div_rp_f - {Intrinsic::nvvm_div_rp_ftz_f, 64891}, // __nvvm_div_rp_ftz_f - {Intrinsic::nvvm_div_rz_d, 64911}, // __nvvm_div_rz_d - {Intrinsic::nvvm_div_rz_f, 64927}, // __nvvm_div_rz_f - {Intrinsic::nvvm_div_rz_ftz_f, 64943}, // __nvvm_div_rz_ftz_f - {Intrinsic::nvvm_ex2_approx_d, 64963}, // __nvvm_ex2_approx_d - {Intrinsic::nvvm_ex2_approx_f, 64983}, // __nvvm_ex2_approx_f - {Intrinsic::nvvm_ex2_approx_ftz_f, 65003}, // __nvvm_ex2_approx_ftz_f - {Intrinsic::nvvm_f2h_rn, 65027}, // __nvvm_f2h_rn - {Intrinsic::nvvm_f2h_rn_ftz, 65041}, // __nvvm_f2h_rn_ftz - {Intrinsic::nvvm_f2i_rm, 65059}, // __nvvm_f2i_rm - {Intrinsic::nvvm_f2i_rm_ftz, 65073}, // __nvvm_f2i_rm_ftz - {Intrinsic::nvvm_f2i_rn, 65091}, // __nvvm_f2i_rn - {Intrinsic::nvvm_f2i_rn_ftz, 65105}, // __nvvm_f2i_rn_ftz - {Intrinsic::nvvm_f2i_rp, 65123}, // __nvvm_f2i_rp - {Intrinsic::nvvm_f2i_rp_ftz, 65137}, // __nvvm_f2i_rp_ftz - {Intrinsic::nvvm_f2i_rz, 65155}, // __nvvm_f2i_rz - {Intrinsic::nvvm_f2i_rz_ftz, 65169}, // __nvvm_f2i_rz_ftz - {Intrinsic::nvvm_f2ll_rm, 65187}, // __nvvm_f2ll_rm - {Intrinsic::nvvm_f2ll_rm_ftz, 65202}, // __nvvm_f2ll_rm_ftz - {Intrinsic::nvvm_f2ll_rn, 65221}, // __nvvm_f2ll_rn - {Intrinsic::nvvm_f2ll_rn_ftz, 65236}, // __nvvm_f2ll_rn_ftz - {Intrinsic::nvvm_f2ll_rp, 65255}, // __nvvm_f2ll_rp - {Intrinsic::nvvm_f2ll_rp_ftz, 65270}, // __nvvm_f2ll_rp_ftz - {Intrinsic::nvvm_f2ll_rz, 65289}, // __nvvm_f2ll_rz - {Intrinsic::nvvm_f2ll_rz_ftz, 65304}, // __nvvm_f2ll_rz_ftz - {Intrinsic::nvvm_f2ui_rm, 65323}, // __nvvm_f2ui_rm - {Intrinsic::nvvm_f2ui_rm_ftz, 65338}, // __nvvm_f2ui_rm_ftz - {Intrinsic::nvvm_f2ui_rn, 65357}, // __nvvm_f2ui_rn - {Intrinsic::nvvm_f2ui_rn_ftz, 65372}, // __nvvm_f2ui_rn_ftz - {Intrinsic::nvvm_f2ui_rp, 65391}, // __nvvm_f2ui_rp - {Intrinsic::nvvm_f2ui_rp_ftz, 65406}, // __nvvm_f2ui_rp_ftz - {Intrinsic::nvvm_f2ui_rz, 65425}, // __nvvm_f2ui_rz - {Intrinsic::nvvm_f2ui_rz_ftz, 65440}, // __nvvm_f2ui_rz_ftz - {Intrinsic::nvvm_f2ull_rm, 65459}, // __nvvm_f2ull_rm - {Intrinsic::nvvm_f2ull_rm_ftz, 65475}, // __nvvm_f2ull_rm_ftz - {Intrinsic::nvvm_f2ull_rn, 65495}, // __nvvm_f2ull_rn - {Intrinsic::nvvm_f2ull_rn_ftz, 65511}, // __nvvm_f2ull_rn_ftz - {Intrinsic::nvvm_f2ull_rp, 65531}, // __nvvm_f2ull_rp - {Intrinsic::nvvm_f2ull_rp_ftz, 65547}, // __nvvm_f2ull_rp_ftz - {Intrinsic::nvvm_f2ull_rz, 65567}, // __nvvm_f2ull_rz - {Intrinsic::nvvm_f2ull_rz_ftz, 65583}, // __nvvm_f2ull_rz_ftz - {Intrinsic::nvvm_fabs_d, 65603}, // __nvvm_fabs_d - {Intrinsic::nvvm_fabs_f, 65617}, // __nvvm_fabs_f - {Intrinsic::nvvm_fabs_ftz_f, 65631}, // __nvvm_fabs_ftz_f - {Intrinsic::nvvm_floor_d, 65649}, // __nvvm_floor_d - {Intrinsic::nvvm_floor_f, 65664}, // __nvvm_floor_f - {Intrinsic::nvvm_floor_ftz_f, 65679}, // __nvvm_floor_ftz_f - {Intrinsic::nvvm_fma_rm_d, 65698}, // __nvvm_fma_rm_d - {Intrinsic::nvvm_fma_rm_f, 65714}, // __nvvm_fma_rm_f - {Intrinsic::nvvm_fma_rm_ftz_f, 65730}, // __nvvm_fma_rm_ftz_f - {Intrinsic::nvvm_fma_rn_d, 65750}, // __nvvm_fma_rn_d - {Intrinsic::nvvm_fma_rn_f, 65766}, // __nvvm_fma_rn_f - {Intrinsic::nvvm_fma_rn_ftz_f, 65782}, // __nvvm_fma_rn_ftz_f - {Intrinsic::nvvm_fma_rp_d, 65802}, // __nvvm_fma_rp_d - {Intrinsic::nvvm_fma_rp_f, 65818}, // __nvvm_fma_rp_f - {Intrinsic::nvvm_fma_rp_ftz_f, 65834}, // __nvvm_fma_rp_ftz_f - {Intrinsic::nvvm_fma_rz_d, 65854}, // __nvvm_fma_rz_d - {Intrinsic::nvvm_fma_rz_f, 65870}, // __nvvm_fma_rz_f - {Intrinsic::nvvm_fma_rz_ftz_f, 65886}, // __nvvm_fma_rz_ftz_f - {Intrinsic::nvvm_fmax_d, 65906}, // __nvvm_fmax_d - {Intrinsic::nvvm_fmax_f, 65920}, // __nvvm_fmax_f - {Intrinsic::nvvm_fmax_ftz_f, 65934}, // __nvvm_fmax_ftz_f - {Intrinsic::nvvm_fmin_d, 65952}, // __nvvm_fmin_d - {Intrinsic::nvvm_fmin_f, 65966}, // __nvvm_fmin_f - {Intrinsic::nvvm_fmin_ftz_f, 65980}, // __nvvm_fmin_ftz_f - {Intrinsic::nvvm_h2f, 65998}, // __nvvm_h2f - {Intrinsic::nvvm_i2d_rm, 66009}, // __nvvm_i2d_rm - {Intrinsic::nvvm_i2d_rn, 66023}, // __nvvm_i2d_rn - {Intrinsic::nvvm_i2d_rp, 66037}, // __nvvm_i2d_rp - {Intrinsic::nvvm_i2d_rz, 66051}, // __nvvm_i2d_rz - {Intrinsic::nvvm_i2f_rm, 66065}, // __nvvm_i2f_rm - {Intrinsic::nvvm_i2f_rn, 66079}, // __nvvm_i2f_rn - {Intrinsic::nvvm_i2f_rp, 66093}, // __nvvm_i2f_rp - {Intrinsic::nvvm_i2f_rz, 66107}, // __nvvm_i2f_rz - {Intrinsic::nvvm_isspacep_const, 66121}, // __nvvm_isspacep_const - {Intrinsic::nvvm_isspacep_global, 66143}, // __nvvm_isspacep_global - {Intrinsic::nvvm_isspacep_local, 66166}, // __nvvm_isspacep_local - {Intrinsic::nvvm_isspacep_shared, 66188}, // __nvvm_isspacep_shared - {Intrinsic::nvvm_istypep_sampler, 66211}, // __nvvm_istypep_sampler - {Intrinsic::nvvm_istypep_surface, 66234}, // __nvvm_istypep_surface - {Intrinsic::nvvm_istypep_texture, 66257}, // __nvvm_istypep_texture - {Intrinsic::nvvm_lg2_approx_d, 66280}, // __nvvm_lg2_approx_d - {Intrinsic::nvvm_lg2_approx_f, 66300}, // __nvvm_lg2_approx_f - {Intrinsic::nvvm_lg2_approx_ftz_f, 66320}, // __nvvm_lg2_approx_ftz_f - {Intrinsic::nvvm_ll2d_rm, 66344}, // __nvvm_ll2d_rm - {Intrinsic::nvvm_ll2d_rn, 66359}, // __nvvm_ll2d_rn - {Intrinsic::nvvm_ll2d_rp, 66374}, // __nvvm_ll2d_rp - {Intrinsic::nvvm_ll2d_rz, 66389}, // __nvvm_ll2d_rz - {Intrinsic::nvvm_ll2f_rm, 66404}, // __nvvm_ll2f_rm - {Intrinsic::nvvm_ll2f_rn, 66419}, // __nvvm_ll2f_rn - {Intrinsic::nvvm_ll2f_rp, 66434}, // __nvvm_ll2f_rp - {Intrinsic::nvvm_ll2f_rz, 66449}, // __nvvm_ll2f_rz - {Intrinsic::nvvm_lohi_i2d, 66464}, // __nvvm_lohi_i2d - {Intrinsic::nvvm_max_i, 66480}, // __nvvm_max_i - {Intrinsic::nvvm_max_ll, 66493}, // __nvvm_max_ll - {Intrinsic::nvvm_max_ui, 66507}, // __nvvm_max_ui - {Intrinsic::nvvm_max_ull, 66521}, // __nvvm_max_ull - {Intrinsic::nvvm_membar_cta, 66536}, // __nvvm_membar_cta - {Intrinsic::nvvm_membar_gl, 66554}, // __nvvm_membar_gl - {Intrinsic::nvvm_membar_sys, 66571}, // __nvvm_membar_sys - {Intrinsic::nvvm_min_i, 66589}, // __nvvm_min_i - {Intrinsic::nvvm_min_ll, 66602}, // __nvvm_min_ll - {Intrinsic::nvvm_min_ui, 66616}, // __nvvm_min_ui - {Intrinsic::nvvm_min_ull, 66630}, // __nvvm_min_ull - {Intrinsic::nvvm_mul24_i, 66853}, // __nvvm_mul24_i - {Intrinsic::nvvm_mul24_ui, 66868}, // __nvvm_mul24_ui - {Intrinsic::nvvm_mul_rm_d, 66645}, // __nvvm_mul_rm_d - {Intrinsic::nvvm_mul_rm_f, 66661}, // __nvvm_mul_rm_f - {Intrinsic::nvvm_mul_rm_ftz_f, 66677}, // __nvvm_mul_rm_ftz_f - {Intrinsic::nvvm_mul_rn_d, 66697}, // __nvvm_mul_rn_d - {Intrinsic::nvvm_mul_rn_f, 66713}, // __nvvm_mul_rn_f - {Intrinsic::nvvm_mul_rn_ftz_f, 66729}, // __nvvm_mul_rn_ftz_f - {Intrinsic::nvvm_mul_rp_d, 66749}, // __nvvm_mul_rp_d - {Intrinsic::nvvm_mul_rp_f, 66765}, // __nvvm_mul_rp_f - {Intrinsic::nvvm_mul_rp_ftz_f, 66781}, // __nvvm_mul_rp_ftz_f - {Intrinsic::nvvm_mul_rz_d, 66801}, // __nvvm_mul_rz_d - {Intrinsic::nvvm_mul_rz_f, 66817}, // __nvvm_mul_rz_f - {Intrinsic::nvvm_mul_rz_ftz_f, 66833}, // __nvvm_mul_rz_ftz_f - {Intrinsic::nvvm_mulhi_i, 66884}, // __nvvm_mulhi_i - {Intrinsic::nvvm_mulhi_ll, 66899}, // __nvvm_mulhi_ll - {Intrinsic::nvvm_mulhi_ui, 66915}, // __nvvm_mulhi_ui - {Intrinsic::nvvm_mulhi_ull, 66931}, // __nvvm_mulhi_ull - {Intrinsic::nvvm_popc_i, 66948}, // __nvvm_popc_i - {Intrinsic::nvvm_popc_ll, 66962}, // __nvvm_popc_ll - {Intrinsic::nvvm_prmt, 66977}, // __nvvm_prmt - {Intrinsic::nvvm_rcp_approx_ftz_d, 66989}, // __nvvm_rcp_approx_ftz_d - {Intrinsic::nvvm_rcp_rm_d, 67013}, // __nvvm_rcp_rm_d - {Intrinsic::nvvm_rcp_rm_f, 67029}, // __nvvm_rcp_rm_f - {Intrinsic::nvvm_rcp_rm_ftz_f, 67045}, // __nvvm_rcp_rm_ftz_f - {Intrinsic::nvvm_rcp_rn_d, 67065}, // __nvvm_rcp_rn_d - {Intrinsic::nvvm_rcp_rn_f, 67081}, // __nvvm_rcp_rn_f - {Intrinsic::nvvm_rcp_rn_ftz_f, 67097}, // __nvvm_rcp_rn_ftz_f - {Intrinsic::nvvm_rcp_rp_d, 67117}, // __nvvm_rcp_rp_d - {Intrinsic::nvvm_rcp_rp_f, 67133}, // __nvvm_rcp_rp_f - {Intrinsic::nvvm_rcp_rp_ftz_f, 67149}, // __nvvm_rcp_rp_ftz_f - {Intrinsic::nvvm_rcp_rz_d, 67169}, // __nvvm_rcp_rz_d - {Intrinsic::nvvm_rcp_rz_f, 67185}, // __nvvm_rcp_rz_f - {Intrinsic::nvvm_rcp_rz_ftz_f, 67201}, // __nvvm_rcp_rz_ftz_f - {Intrinsic::nvvm_read_ptx_sreg_clock, 67221}, // __nvvm_read_ptx_sreg_clock - {Intrinsic::nvvm_read_ptx_sreg_clock64, 67248}, // __nvvm_read_ptx_sreg_clock64 - {Intrinsic::nvvm_read_ptx_sreg_ctaid_w, 67277}, // __nvvm_read_ptx_sreg_ctaid_w - {Intrinsic::nvvm_read_ptx_sreg_ctaid_x, 67306}, // __nvvm_read_ptx_sreg_ctaid_x - {Intrinsic::nvvm_read_ptx_sreg_ctaid_y, 67335}, // __nvvm_read_ptx_sreg_ctaid_y - {Intrinsic::nvvm_read_ptx_sreg_ctaid_z, 67364}, // __nvvm_read_ptx_sreg_ctaid_z - {Intrinsic::nvvm_read_ptx_sreg_envreg0, 67393}, // __nvvm_read_ptx_sreg_envreg0 - {Intrinsic::nvvm_read_ptx_sreg_envreg1, 67422}, // __nvvm_read_ptx_sreg_envreg1 - {Intrinsic::nvvm_read_ptx_sreg_envreg10, 67451}, // __nvvm_read_ptx_sreg_envreg10 - {Intrinsic::nvvm_read_ptx_sreg_envreg11, 67481}, // __nvvm_read_ptx_sreg_envreg11 - {Intrinsic::nvvm_read_ptx_sreg_envreg12, 67511}, // __nvvm_read_ptx_sreg_envreg12 - {Intrinsic::nvvm_read_ptx_sreg_envreg13, 67541}, // __nvvm_read_ptx_sreg_envreg13 - {Intrinsic::nvvm_read_ptx_sreg_envreg14, 67571}, // __nvvm_read_ptx_sreg_envreg14 - {Intrinsic::nvvm_read_ptx_sreg_envreg15, 67601}, // __nvvm_read_ptx_sreg_envreg15 - {Intrinsic::nvvm_read_ptx_sreg_envreg16, 67631}, // __nvvm_read_ptx_sreg_envreg16 - {Intrinsic::nvvm_read_ptx_sreg_envreg17, 67661}, // __nvvm_read_ptx_sreg_envreg17 - {Intrinsic::nvvm_read_ptx_sreg_envreg18, 67691}, // __nvvm_read_ptx_sreg_envreg18 - {Intrinsic::nvvm_read_ptx_sreg_envreg19, 67721}, // __nvvm_read_ptx_sreg_envreg19 - {Intrinsic::nvvm_read_ptx_sreg_envreg2, 67751}, // __nvvm_read_ptx_sreg_envreg2 - {Intrinsic::nvvm_read_ptx_sreg_envreg20, 67780}, // __nvvm_read_ptx_sreg_envreg20 - {Intrinsic::nvvm_read_ptx_sreg_envreg21, 67810}, // __nvvm_read_ptx_sreg_envreg21 - {Intrinsic::nvvm_read_ptx_sreg_envreg22, 67840}, // __nvvm_read_ptx_sreg_envreg22 - {Intrinsic::nvvm_read_ptx_sreg_envreg23, 67870}, // __nvvm_read_ptx_sreg_envreg23 - {Intrinsic::nvvm_read_ptx_sreg_envreg24, 67900}, // __nvvm_read_ptx_sreg_envreg24 - {Intrinsic::nvvm_read_ptx_sreg_envreg25, 67930}, // __nvvm_read_ptx_sreg_envreg25 - {Intrinsic::nvvm_read_ptx_sreg_envreg26, 67960}, // __nvvm_read_ptx_sreg_envreg26 - {Intrinsic::nvvm_read_ptx_sreg_envreg27, 67990}, // __nvvm_read_ptx_sreg_envreg27 - {Intrinsic::nvvm_read_ptx_sreg_envreg28, 68020}, // __nvvm_read_ptx_sreg_envreg28 - {Intrinsic::nvvm_read_ptx_sreg_envreg29, 68050}, // __nvvm_read_ptx_sreg_envreg29 - {Intrinsic::nvvm_read_ptx_sreg_envreg3, 68080}, // __nvvm_read_ptx_sreg_envreg3 - {Intrinsic::nvvm_read_ptx_sreg_envreg30, 68109}, // __nvvm_read_ptx_sreg_envreg30 - {Intrinsic::nvvm_read_ptx_sreg_envreg31, 68139}, // __nvvm_read_ptx_sreg_envreg31 - {Intrinsic::nvvm_read_ptx_sreg_envreg4, 68169}, // __nvvm_read_ptx_sreg_envreg4 - {Intrinsic::nvvm_read_ptx_sreg_envreg5, 68198}, // __nvvm_read_ptx_sreg_envreg5 - {Intrinsic::nvvm_read_ptx_sreg_envreg6, 68227}, // __nvvm_read_ptx_sreg_envreg6 - {Intrinsic::nvvm_read_ptx_sreg_envreg7, 68256}, // __nvvm_read_ptx_sreg_envreg7 - {Intrinsic::nvvm_read_ptx_sreg_envreg8, 68285}, // __nvvm_read_ptx_sreg_envreg8 - {Intrinsic::nvvm_read_ptx_sreg_envreg9, 68314}, // __nvvm_read_ptx_sreg_envreg9 - {Intrinsic::nvvm_read_ptx_sreg_gridid, 68343}, // __nvvm_read_ptx_sreg_gridid - {Intrinsic::nvvm_read_ptx_sreg_laneid, 68371}, // __nvvm_read_ptx_sreg_laneid - {Intrinsic::nvvm_read_ptx_sreg_lanemask_eq, 68399}, // __nvvm_read_ptx_sreg_lanemask_eq - {Intrinsic::nvvm_read_ptx_sreg_lanemask_ge, 68432}, // __nvvm_read_ptx_sreg_lanemask_ge - {Intrinsic::nvvm_read_ptx_sreg_lanemask_gt, 68465}, // __nvvm_read_ptx_sreg_lanemask_gt - {Intrinsic::nvvm_read_ptx_sreg_lanemask_le, 68498}, // __nvvm_read_ptx_sreg_lanemask_le - {Intrinsic::nvvm_read_ptx_sreg_lanemask_lt, 68531}, // __nvvm_read_ptx_sreg_lanemask_lt - {Intrinsic::nvvm_read_ptx_sreg_nctaid_w, 68564}, // __nvvm_read_ptx_sreg_nctaid_w - {Intrinsic::nvvm_read_ptx_sreg_nctaid_x, 68594}, // __nvvm_read_ptx_sreg_nctaid_x - {Intrinsic::nvvm_read_ptx_sreg_nctaid_y, 68624}, // __nvvm_read_ptx_sreg_nctaid_y - {Intrinsic::nvvm_read_ptx_sreg_nctaid_z, 68654}, // __nvvm_read_ptx_sreg_nctaid_z - {Intrinsic::nvvm_read_ptx_sreg_nsmid, 68684}, // __nvvm_read_ptx_sreg_nsmid - {Intrinsic::nvvm_read_ptx_sreg_ntid_w, 68711}, // __nvvm_read_ptx_sreg_ntid_w - {Intrinsic::nvvm_read_ptx_sreg_ntid_x, 68739}, // __nvvm_read_ptx_sreg_ntid_x - {Intrinsic::nvvm_read_ptx_sreg_ntid_y, 68767}, // __nvvm_read_ptx_sreg_ntid_y - {Intrinsic::nvvm_read_ptx_sreg_ntid_z, 68795}, // __nvvm_read_ptx_sreg_ntid_z - {Intrinsic::nvvm_read_ptx_sreg_nwarpid, 68823}, // __nvvm_read_ptx_sreg_nwarpid - {Intrinsic::nvvm_read_ptx_sreg_pm0, 68852}, // __nvvm_read_ptx_sreg_pm0 - {Intrinsic::nvvm_read_ptx_sreg_pm1, 68877}, // __nvvm_read_ptx_sreg_pm1 - {Intrinsic::nvvm_read_ptx_sreg_pm2, 68902}, // __nvvm_read_ptx_sreg_pm2 - {Intrinsic::nvvm_read_ptx_sreg_pm3, 68927}, // __nvvm_read_ptx_sreg_pm3 - {Intrinsic::nvvm_read_ptx_sreg_smid, 68952}, // __nvvm_read_ptx_sreg_smid - {Intrinsic::nvvm_read_ptx_sreg_tid_w, 68978}, // __nvvm_read_ptx_sreg_tid_w - {Intrinsic::nvvm_read_ptx_sreg_tid_x, 69005}, // __nvvm_read_ptx_sreg_tid_x - {Intrinsic::nvvm_read_ptx_sreg_tid_y, 69032}, // __nvvm_read_ptx_sreg_tid_y - {Intrinsic::nvvm_read_ptx_sreg_tid_z, 69059}, // __nvvm_read_ptx_sreg_tid_z - {Intrinsic::nvvm_read_ptx_sreg_warpid, 69086}, // __nvvm_read_ptx_sreg_warpid - {Intrinsic::nvvm_read_ptx_sreg_warpsize, 69114}, // __nvvm_read_ptx_sreg_warpsize - {Intrinsic::nvvm_rotate_b32, 69144}, // __nvvm_rotate_b32 - {Intrinsic::nvvm_rotate_b64, 69162}, // __nvvm_rotate_b64 - {Intrinsic::nvvm_rotate_right_b64, 69180}, // __nvvm_rotate_right_b64 - {Intrinsic::nvvm_round_d, 69204}, // __nvvm_round_d - {Intrinsic::nvvm_round_f, 69219}, // __nvvm_round_f - {Intrinsic::nvvm_round_ftz_f, 69234}, // __nvvm_round_ftz_f - {Intrinsic::nvvm_rsqrt_approx_d, 69253}, // __nvvm_rsqrt_approx_d - {Intrinsic::nvvm_rsqrt_approx_f, 69275}, // __nvvm_rsqrt_approx_f - {Intrinsic::nvvm_rsqrt_approx_ftz_f, 69297}, // __nvvm_rsqrt_approx_ftz_f - {Intrinsic::nvvm_sad_i, 69323}, // __nvvm_sad_i - {Intrinsic::nvvm_sad_ui, 69336}, // __nvvm_sad_ui - {Intrinsic::nvvm_saturate_d, 69350}, // __nvvm_saturate_d - {Intrinsic::nvvm_saturate_f, 69368}, // __nvvm_saturate_f - {Intrinsic::nvvm_saturate_ftz_f, 69386}, // __nvvm_saturate_ftz_f - {Intrinsic::nvvm_shfl_bfly_f32, 69408}, // __nvvm_shfl_bfly_f32 - {Intrinsic::nvvm_shfl_bfly_i32, 69429}, // __nvvm_shfl_bfly_i32 - {Intrinsic::nvvm_shfl_down_f32, 69450}, // __nvvm_shfl_down_f32 - {Intrinsic::nvvm_shfl_down_i32, 69471}, // __nvvm_shfl_down_i32 - {Intrinsic::nvvm_shfl_idx_f32, 69492}, // __nvvm_shfl_idx_f32 - {Intrinsic::nvvm_shfl_idx_i32, 69512}, // __nvvm_shfl_idx_i32 - {Intrinsic::nvvm_shfl_up_f32, 69532}, // __nvvm_shfl_up_f32 - {Intrinsic::nvvm_shfl_up_i32, 69551}, // __nvvm_shfl_up_i32 - {Intrinsic::nvvm_sin_approx_f, 69570}, // __nvvm_sin_approx_f - {Intrinsic::nvvm_sin_approx_ftz_f, 69590}, // __nvvm_sin_approx_ftz_f - {Intrinsic::nvvm_sqrt_approx_f, 69614}, // __nvvm_sqrt_approx_f - {Intrinsic::nvvm_sqrt_approx_ftz_f, 69635}, // __nvvm_sqrt_approx_ftz_f - {Intrinsic::nvvm_sqrt_f, 69660}, // __nvvm_sqrt_f - {Intrinsic::nvvm_sqrt_rm_d, 69674}, // __nvvm_sqrt_rm_d - {Intrinsic::nvvm_sqrt_rm_f, 69691}, // __nvvm_sqrt_rm_f - {Intrinsic::nvvm_sqrt_rm_ftz_f, 69708}, // __nvvm_sqrt_rm_ftz_f - {Intrinsic::nvvm_sqrt_rn_d, 69729}, // __nvvm_sqrt_rn_d - {Intrinsic::nvvm_sqrt_rn_f, 69746}, // __nvvm_sqrt_rn_f - {Intrinsic::nvvm_sqrt_rn_ftz_f, 69763}, // __nvvm_sqrt_rn_ftz_f - {Intrinsic::nvvm_sqrt_rp_d, 69784}, // __nvvm_sqrt_rp_d - {Intrinsic::nvvm_sqrt_rp_f, 69801}, // __nvvm_sqrt_rp_f - {Intrinsic::nvvm_sqrt_rp_ftz_f, 69818}, // __nvvm_sqrt_rp_ftz_f - {Intrinsic::nvvm_sqrt_rz_d, 69839}, // __nvvm_sqrt_rz_d - {Intrinsic::nvvm_sqrt_rz_f, 69856}, // __nvvm_sqrt_rz_f - {Intrinsic::nvvm_sqrt_rz_ftz_f, 69873}, // __nvvm_sqrt_rz_ftz_f - {Intrinsic::nvvm_suq_array_size, 69894}, // __nvvm_suq_array_size - {Intrinsic::nvvm_suq_channel_data_type, 69916}, // __nvvm_suq_channel_data_type - {Intrinsic::nvvm_suq_channel_order, 69945}, // __nvvm_suq_channel_order - {Intrinsic::nvvm_suq_depth, 69970}, // __nvvm_suq_depth - {Intrinsic::nvvm_suq_height, 69987}, // __nvvm_suq_height - {Intrinsic::nvvm_suq_width, 70005}, // __nvvm_suq_width - {Intrinsic::nvvm_sust_b_1d_array_i16_clamp, 70022}, // __nvvm_sust_b_1d_array_i16_clamp - {Intrinsic::nvvm_sust_b_1d_array_i16_trap, 70055}, // __nvvm_sust_b_1d_array_i16_trap - {Intrinsic::nvvm_sust_b_1d_array_i16_zero, 70087}, // __nvvm_sust_b_1d_array_i16_zero - {Intrinsic::nvvm_sust_b_1d_array_i32_clamp, 70119}, // __nvvm_sust_b_1d_array_i32_clamp - {Intrinsic::nvvm_sust_b_1d_array_i32_trap, 70152}, // __nvvm_sust_b_1d_array_i32_trap - {Intrinsic::nvvm_sust_b_1d_array_i32_zero, 70184}, // __nvvm_sust_b_1d_array_i32_zero - {Intrinsic::nvvm_sust_b_1d_array_i64_clamp, 70216}, // __nvvm_sust_b_1d_array_i64_clamp - {Intrinsic::nvvm_sust_b_1d_array_i64_trap, 70249}, // __nvvm_sust_b_1d_array_i64_trap - {Intrinsic::nvvm_sust_b_1d_array_i64_zero, 70281}, // __nvvm_sust_b_1d_array_i64_zero - {Intrinsic::nvvm_sust_b_1d_array_i8_clamp, 70313}, // __nvvm_sust_b_1d_array_i8_clamp - {Intrinsic::nvvm_sust_b_1d_array_i8_trap, 70345}, // __nvvm_sust_b_1d_array_i8_trap - {Intrinsic::nvvm_sust_b_1d_array_i8_zero, 70376}, // __nvvm_sust_b_1d_array_i8_zero - {Intrinsic::nvvm_sust_b_1d_array_v2i16_clamp, 70407}, // __nvvm_sust_b_1d_array_v2i16_clamp - {Intrinsic::nvvm_sust_b_1d_array_v2i16_trap, 70442}, // __nvvm_sust_b_1d_array_v2i16_trap - {Intrinsic::nvvm_sust_b_1d_array_v2i16_zero, 70476}, // __nvvm_sust_b_1d_array_v2i16_zero - {Intrinsic::nvvm_sust_b_1d_array_v2i32_clamp, 70510}, // __nvvm_sust_b_1d_array_v2i32_clamp - {Intrinsic::nvvm_sust_b_1d_array_v2i32_trap, 70545}, // __nvvm_sust_b_1d_array_v2i32_trap - {Intrinsic::nvvm_sust_b_1d_array_v2i32_zero, 70579}, // __nvvm_sust_b_1d_array_v2i32_zero - {Intrinsic::nvvm_sust_b_1d_array_v2i64_clamp, 70613}, // __nvvm_sust_b_1d_array_v2i64_clamp - {Intrinsic::nvvm_sust_b_1d_array_v2i64_trap, 70648}, // __nvvm_sust_b_1d_array_v2i64_trap - {Intrinsic::nvvm_sust_b_1d_array_v2i64_zero, 70682}, // __nvvm_sust_b_1d_array_v2i64_zero - {Intrinsic::nvvm_sust_b_1d_array_v2i8_clamp, 70716}, // __nvvm_sust_b_1d_array_v2i8_clamp - {Intrinsic::nvvm_sust_b_1d_array_v2i8_trap, 70750}, // __nvvm_sust_b_1d_array_v2i8_trap - {Intrinsic::nvvm_sust_b_1d_array_v2i8_zero, 70783}, // __nvvm_sust_b_1d_array_v2i8_zero - {Intrinsic::nvvm_sust_b_1d_array_v4i16_clamp, 70816}, // __nvvm_sust_b_1d_array_v4i16_clamp - {Intrinsic::nvvm_sust_b_1d_array_v4i16_trap, 70851}, // __nvvm_sust_b_1d_array_v4i16_trap - {Intrinsic::nvvm_sust_b_1d_array_v4i16_zero, 70885}, // __nvvm_sust_b_1d_array_v4i16_zero - {Intrinsic::nvvm_sust_b_1d_array_v4i32_clamp, 70919}, // __nvvm_sust_b_1d_array_v4i32_clamp - {Intrinsic::nvvm_sust_b_1d_array_v4i32_trap, 70954}, // __nvvm_sust_b_1d_array_v4i32_trap - {Intrinsic::nvvm_sust_b_1d_array_v4i32_zero, 70988}, // __nvvm_sust_b_1d_array_v4i32_zero - {Intrinsic::nvvm_sust_b_1d_array_v4i8_clamp, 71022}, // __nvvm_sust_b_1d_array_v4i8_clamp - {Intrinsic::nvvm_sust_b_1d_array_v4i8_trap, 71056}, // __nvvm_sust_b_1d_array_v4i8_trap - {Intrinsic::nvvm_sust_b_1d_array_v4i8_zero, 71089}, // __nvvm_sust_b_1d_array_v4i8_zero - {Intrinsic::nvvm_sust_b_1d_i16_clamp, 71122}, // __nvvm_sust_b_1d_i16_clamp - {Intrinsic::nvvm_sust_b_1d_i16_trap, 71149}, // __nvvm_sust_b_1d_i16_trap - {Intrinsic::nvvm_sust_b_1d_i16_zero, 71175}, // __nvvm_sust_b_1d_i16_zero - {Intrinsic::nvvm_sust_b_1d_i32_clamp, 71201}, // __nvvm_sust_b_1d_i32_clamp - {Intrinsic::nvvm_sust_b_1d_i32_trap, 71228}, // __nvvm_sust_b_1d_i32_trap - {Intrinsic::nvvm_sust_b_1d_i32_zero, 71254}, // __nvvm_sust_b_1d_i32_zero - {Intrinsic::nvvm_sust_b_1d_i64_clamp, 71280}, // __nvvm_sust_b_1d_i64_clamp - {Intrinsic::nvvm_sust_b_1d_i64_trap, 71307}, // __nvvm_sust_b_1d_i64_trap - {Intrinsic::nvvm_sust_b_1d_i64_zero, 71333}, // __nvvm_sust_b_1d_i64_zero - {Intrinsic::nvvm_sust_b_1d_i8_clamp, 71359}, // __nvvm_sust_b_1d_i8_clamp - {Intrinsic::nvvm_sust_b_1d_i8_trap, 71385}, // __nvvm_sust_b_1d_i8_trap - {Intrinsic::nvvm_sust_b_1d_i8_zero, 71410}, // __nvvm_sust_b_1d_i8_zero - {Intrinsic::nvvm_sust_b_1d_v2i16_clamp, 71435}, // __nvvm_sust_b_1d_v2i16_clamp - {Intrinsic::nvvm_sust_b_1d_v2i16_trap, 71464}, // __nvvm_sust_b_1d_v2i16_trap - {Intrinsic::nvvm_sust_b_1d_v2i16_zero, 71492}, // __nvvm_sust_b_1d_v2i16_zero - {Intrinsic::nvvm_sust_b_1d_v2i32_clamp, 71520}, // __nvvm_sust_b_1d_v2i32_clamp - {Intrinsic::nvvm_sust_b_1d_v2i32_trap, 71549}, // __nvvm_sust_b_1d_v2i32_trap - {Intrinsic::nvvm_sust_b_1d_v2i32_zero, 71577}, // __nvvm_sust_b_1d_v2i32_zero - {Intrinsic::nvvm_sust_b_1d_v2i64_clamp, 71605}, // __nvvm_sust_b_1d_v2i64_clamp - {Intrinsic::nvvm_sust_b_1d_v2i64_trap, 71634}, // __nvvm_sust_b_1d_v2i64_trap - {Intrinsic::nvvm_sust_b_1d_v2i64_zero, 71662}, // __nvvm_sust_b_1d_v2i64_zero - {Intrinsic::nvvm_sust_b_1d_v2i8_clamp, 71690}, // __nvvm_sust_b_1d_v2i8_clamp - {Intrinsic::nvvm_sust_b_1d_v2i8_trap, 71718}, // __nvvm_sust_b_1d_v2i8_trap - {Intrinsic::nvvm_sust_b_1d_v2i8_zero, 71745}, // __nvvm_sust_b_1d_v2i8_zero - {Intrinsic::nvvm_sust_b_1d_v4i16_clamp, 71772}, // __nvvm_sust_b_1d_v4i16_clamp - {Intrinsic::nvvm_sust_b_1d_v4i16_trap, 71801}, // __nvvm_sust_b_1d_v4i16_trap - {Intrinsic::nvvm_sust_b_1d_v4i16_zero, 71829}, // __nvvm_sust_b_1d_v4i16_zero - {Intrinsic::nvvm_sust_b_1d_v4i32_clamp, 71857}, // __nvvm_sust_b_1d_v4i32_clamp - {Intrinsic::nvvm_sust_b_1d_v4i32_trap, 71886}, // __nvvm_sust_b_1d_v4i32_trap - {Intrinsic::nvvm_sust_b_1d_v4i32_zero, 71914}, // __nvvm_sust_b_1d_v4i32_zero - {Intrinsic::nvvm_sust_b_1d_v4i8_clamp, 71942}, // __nvvm_sust_b_1d_v4i8_clamp - {Intrinsic::nvvm_sust_b_1d_v4i8_trap, 71970}, // __nvvm_sust_b_1d_v4i8_trap - {Intrinsic::nvvm_sust_b_1d_v4i8_zero, 71997}, // __nvvm_sust_b_1d_v4i8_zero - {Intrinsic::nvvm_sust_b_2d_array_i16_clamp, 72024}, // __nvvm_sust_b_2d_array_i16_clamp - {Intrinsic::nvvm_sust_b_2d_array_i16_trap, 72057}, // __nvvm_sust_b_2d_array_i16_trap - {Intrinsic::nvvm_sust_b_2d_array_i16_zero, 72089}, // __nvvm_sust_b_2d_array_i16_zero - {Intrinsic::nvvm_sust_b_2d_array_i32_clamp, 72121}, // __nvvm_sust_b_2d_array_i32_clamp - {Intrinsic::nvvm_sust_b_2d_array_i32_trap, 72154}, // __nvvm_sust_b_2d_array_i32_trap - {Intrinsic::nvvm_sust_b_2d_array_i32_zero, 72186}, // __nvvm_sust_b_2d_array_i32_zero - {Intrinsic::nvvm_sust_b_2d_array_i64_clamp, 72218}, // __nvvm_sust_b_2d_array_i64_clamp - {Intrinsic::nvvm_sust_b_2d_array_i64_trap, 72251}, // __nvvm_sust_b_2d_array_i64_trap - {Intrinsic::nvvm_sust_b_2d_array_i64_zero, 72283}, // __nvvm_sust_b_2d_array_i64_zero - {Intrinsic::nvvm_sust_b_2d_array_i8_clamp, 72315}, // __nvvm_sust_b_2d_array_i8_clamp - {Intrinsic::nvvm_sust_b_2d_array_i8_trap, 72347}, // __nvvm_sust_b_2d_array_i8_trap - {Intrinsic::nvvm_sust_b_2d_array_i8_zero, 72378}, // __nvvm_sust_b_2d_array_i8_zero - {Intrinsic::nvvm_sust_b_2d_array_v2i16_clamp, 72409}, // __nvvm_sust_b_2d_array_v2i16_clamp - {Intrinsic::nvvm_sust_b_2d_array_v2i16_trap, 72444}, // __nvvm_sust_b_2d_array_v2i16_trap - {Intrinsic::nvvm_sust_b_2d_array_v2i16_zero, 72478}, // __nvvm_sust_b_2d_array_v2i16_zero - {Intrinsic::nvvm_sust_b_2d_array_v2i32_clamp, 72512}, // __nvvm_sust_b_2d_array_v2i32_clamp - {Intrinsic::nvvm_sust_b_2d_array_v2i32_trap, 72547}, // __nvvm_sust_b_2d_array_v2i32_trap - {Intrinsic::nvvm_sust_b_2d_array_v2i32_zero, 72581}, // __nvvm_sust_b_2d_array_v2i32_zero - {Intrinsic::nvvm_sust_b_2d_array_v2i64_clamp, 72615}, // __nvvm_sust_b_2d_array_v2i64_clamp - {Intrinsic::nvvm_sust_b_2d_array_v2i64_trap, 72650}, // __nvvm_sust_b_2d_array_v2i64_trap - {Intrinsic::nvvm_sust_b_2d_array_v2i64_zero, 72684}, // __nvvm_sust_b_2d_array_v2i64_zero - {Intrinsic::nvvm_sust_b_2d_array_v2i8_clamp, 72718}, // __nvvm_sust_b_2d_array_v2i8_clamp - {Intrinsic::nvvm_sust_b_2d_array_v2i8_trap, 72752}, // __nvvm_sust_b_2d_array_v2i8_trap - {Intrinsic::nvvm_sust_b_2d_array_v2i8_zero, 72785}, // __nvvm_sust_b_2d_array_v2i8_zero - {Intrinsic::nvvm_sust_b_2d_array_v4i16_clamp, 72818}, // __nvvm_sust_b_2d_array_v4i16_clamp - {Intrinsic::nvvm_sust_b_2d_array_v4i16_trap, 72853}, // __nvvm_sust_b_2d_array_v4i16_trap - {Intrinsic::nvvm_sust_b_2d_array_v4i16_zero, 72887}, // __nvvm_sust_b_2d_array_v4i16_zero - {Intrinsic::nvvm_sust_b_2d_array_v4i32_clamp, 72921}, // __nvvm_sust_b_2d_array_v4i32_clamp - {Intrinsic::nvvm_sust_b_2d_array_v4i32_trap, 72956}, // __nvvm_sust_b_2d_array_v4i32_trap - {Intrinsic::nvvm_sust_b_2d_array_v4i32_zero, 72990}, // __nvvm_sust_b_2d_array_v4i32_zero - {Intrinsic::nvvm_sust_b_2d_array_v4i8_clamp, 73024}, // __nvvm_sust_b_2d_array_v4i8_clamp - {Intrinsic::nvvm_sust_b_2d_array_v4i8_trap, 73058}, // __nvvm_sust_b_2d_array_v4i8_trap - {Intrinsic::nvvm_sust_b_2d_array_v4i8_zero, 73091}, // __nvvm_sust_b_2d_array_v4i8_zero - {Intrinsic::nvvm_sust_b_2d_i16_clamp, 73124}, // __nvvm_sust_b_2d_i16_clamp - {Intrinsic::nvvm_sust_b_2d_i16_trap, 73151}, // __nvvm_sust_b_2d_i16_trap - {Intrinsic::nvvm_sust_b_2d_i16_zero, 73177}, // __nvvm_sust_b_2d_i16_zero - {Intrinsic::nvvm_sust_b_2d_i32_clamp, 73203}, // __nvvm_sust_b_2d_i32_clamp - {Intrinsic::nvvm_sust_b_2d_i32_trap, 73230}, // __nvvm_sust_b_2d_i32_trap - {Intrinsic::nvvm_sust_b_2d_i32_zero, 73256}, // __nvvm_sust_b_2d_i32_zero - {Intrinsic::nvvm_sust_b_2d_i64_clamp, 73282}, // __nvvm_sust_b_2d_i64_clamp - {Intrinsic::nvvm_sust_b_2d_i64_trap, 73309}, // __nvvm_sust_b_2d_i64_trap - {Intrinsic::nvvm_sust_b_2d_i64_zero, 73335}, // __nvvm_sust_b_2d_i64_zero - {Intrinsic::nvvm_sust_b_2d_i8_clamp, 73361}, // __nvvm_sust_b_2d_i8_clamp - {Intrinsic::nvvm_sust_b_2d_i8_trap, 73387}, // __nvvm_sust_b_2d_i8_trap - {Intrinsic::nvvm_sust_b_2d_i8_zero, 73412}, // __nvvm_sust_b_2d_i8_zero - {Intrinsic::nvvm_sust_b_2d_v2i16_clamp, 73437}, // __nvvm_sust_b_2d_v2i16_clamp - {Intrinsic::nvvm_sust_b_2d_v2i16_trap, 73466}, // __nvvm_sust_b_2d_v2i16_trap - {Intrinsic::nvvm_sust_b_2d_v2i16_zero, 73494}, // __nvvm_sust_b_2d_v2i16_zero - {Intrinsic::nvvm_sust_b_2d_v2i32_clamp, 73522}, // __nvvm_sust_b_2d_v2i32_clamp - {Intrinsic::nvvm_sust_b_2d_v2i32_trap, 73551}, // __nvvm_sust_b_2d_v2i32_trap - {Intrinsic::nvvm_sust_b_2d_v2i32_zero, 73579}, // __nvvm_sust_b_2d_v2i32_zero - {Intrinsic::nvvm_sust_b_2d_v2i64_clamp, 73607}, // __nvvm_sust_b_2d_v2i64_clamp - {Intrinsic::nvvm_sust_b_2d_v2i64_trap, 73636}, // __nvvm_sust_b_2d_v2i64_trap - {Intrinsic::nvvm_sust_b_2d_v2i64_zero, 73664}, // __nvvm_sust_b_2d_v2i64_zero - {Intrinsic::nvvm_sust_b_2d_v2i8_clamp, 73692}, // __nvvm_sust_b_2d_v2i8_clamp - {Intrinsic::nvvm_sust_b_2d_v2i8_trap, 73720}, // __nvvm_sust_b_2d_v2i8_trap - {Intrinsic::nvvm_sust_b_2d_v2i8_zero, 73747}, // __nvvm_sust_b_2d_v2i8_zero - {Intrinsic::nvvm_sust_b_2d_v4i16_clamp, 73774}, // __nvvm_sust_b_2d_v4i16_clamp - {Intrinsic::nvvm_sust_b_2d_v4i16_trap, 73803}, // __nvvm_sust_b_2d_v4i16_trap - {Intrinsic::nvvm_sust_b_2d_v4i16_zero, 73831}, // __nvvm_sust_b_2d_v4i16_zero - {Intrinsic::nvvm_sust_b_2d_v4i32_clamp, 73859}, // __nvvm_sust_b_2d_v4i32_clamp - {Intrinsic::nvvm_sust_b_2d_v4i32_trap, 73888}, // __nvvm_sust_b_2d_v4i32_trap - {Intrinsic::nvvm_sust_b_2d_v4i32_zero, 73916}, // __nvvm_sust_b_2d_v4i32_zero - {Intrinsic::nvvm_sust_b_2d_v4i8_clamp, 73944}, // __nvvm_sust_b_2d_v4i8_clamp - {Intrinsic::nvvm_sust_b_2d_v4i8_trap, 73972}, // __nvvm_sust_b_2d_v4i8_trap - {Intrinsic::nvvm_sust_b_2d_v4i8_zero, 73999}, // __nvvm_sust_b_2d_v4i8_zero - {Intrinsic::nvvm_sust_b_3d_i16_clamp, 74026}, // __nvvm_sust_b_3d_i16_clamp - {Intrinsic::nvvm_sust_b_3d_i16_trap, 74053}, // __nvvm_sust_b_3d_i16_trap - {Intrinsic::nvvm_sust_b_3d_i16_zero, 74079}, // __nvvm_sust_b_3d_i16_zero - {Intrinsic::nvvm_sust_b_3d_i32_clamp, 74105}, // __nvvm_sust_b_3d_i32_clamp - {Intrinsic::nvvm_sust_b_3d_i32_trap, 74132}, // __nvvm_sust_b_3d_i32_trap - {Intrinsic::nvvm_sust_b_3d_i32_zero, 74158}, // __nvvm_sust_b_3d_i32_zero - {Intrinsic::nvvm_sust_b_3d_i64_clamp, 74184}, // __nvvm_sust_b_3d_i64_clamp - {Intrinsic::nvvm_sust_b_3d_i64_trap, 74211}, // __nvvm_sust_b_3d_i64_trap - {Intrinsic::nvvm_sust_b_3d_i64_zero, 74237}, // __nvvm_sust_b_3d_i64_zero - {Intrinsic::nvvm_sust_b_3d_i8_clamp, 74263}, // __nvvm_sust_b_3d_i8_clamp - {Intrinsic::nvvm_sust_b_3d_i8_trap, 74289}, // __nvvm_sust_b_3d_i8_trap - {Intrinsic::nvvm_sust_b_3d_i8_zero, 74314}, // __nvvm_sust_b_3d_i8_zero - {Intrinsic::nvvm_sust_b_3d_v2i16_clamp, 74339}, // __nvvm_sust_b_3d_v2i16_clamp - {Intrinsic::nvvm_sust_b_3d_v2i16_trap, 74368}, // __nvvm_sust_b_3d_v2i16_trap - {Intrinsic::nvvm_sust_b_3d_v2i16_zero, 74396}, // __nvvm_sust_b_3d_v2i16_zero - {Intrinsic::nvvm_sust_b_3d_v2i32_clamp, 74424}, // __nvvm_sust_b_3d_v2i32_clamp - {Intrinsic::nvvm_sust_b_3d_v2i32_trap, 74453}, // __nvvm_sust_b_3d_v2i32_trap - {Intrinsic::nvvm_sust_b_3d_v2i32_zero, 74481}, // __nvvm_sust_b_3d_v2i32_zero - {Intrinsic::nvvm_sust_b_3d_v2i64_clamp, 74509}, // __nvvm_sust_b_3d_v2i64_clamp - {Intrinsic::nvvm_sust_b_3d_v2i64_trap, 74538}, // __nvvm_sust_b_3d_v2i64_trap - {Intrinsic::nvvm_sust_b_3d_v2i64_zero, 74566}, // __nvvm_sust_b_3d_v2i64_zero - {Intrinsic::nvvm_sust_b_3d_v2i8_clamp, 74594}, // __nvvm_sust_b_3d_v2i8_clamp - {Intrinsic::nvvm_sust_b_3d_v2i8_trap, 74622}, // __nvvm_sust_b_3d_v2i8_trap - {Intrinsic::nvvm_sust_b_3d_v2i8_zero, 74649}, // __nvvm_sust_b_3d_v2i8_zero - {Intrinsic::nvvm_sust_b_3d_v4i16_clamp, 74676}, // __nvvm_sust_b_3d_v4i16_clamp - {Intrinsic::nvvm_sust_b_3d_v4i16_trap, 74705}, // __nvvm_sust_b_3d_v4i16_trap - {Intrinsic::nvvm_sust_b_3d_v4i16_zero, 74733}, // __nvvm_sust_b_3d_v4i16_zero - {Intrinsic::nvvm_sust_b_3d_v4i32_clamp, 74761}, // __nvvm_sust_b_3d_v4i32_clamp - {Intrinsic::nvvm_sust_b_3d_v4i32_trap, 74790}, // __nvvm_sust_b_3d_v4i32_trap - {Intrinsic::nvvm_sust_b_3d_v4i32_zero, 74818}, // __nvvm_sust_b_3d_v4i32_zero - {Intrinsic::nvvm_sust_b_3d_v4i8_clamp, 74846}, // __nvvm_sust_b_3d_v4i8_clamp - {Intrinsic::nvvm_sust_b_3d_v4i8_trap, 74874}, // __nvvm_sust_b_3d_v4i8_trap - {Intrinsic::nvvm_sust_b_3d_v4i8_zero, 74901}, // __nvvm_sust_b_3d_v4i8_zero - {Intrinsic::nvvm_sust_p_1d_array_i16_trap, 74928}, // __nvvm_sust_p_1d_array_i16_trap - {Intrinsic::nvvm_sust_p_1d_array_i32_trap, 74960}, // __nvvm_sust_p_1d_array_i32_trap - {Intrinsic::nvvm_sust_p_1d_array_i8_trap, 74992}, // __nvvm_sust_p_1d_array_i8_trap - {Intrinsic::nvvm_sust_p_1d_array_v2i16_trap, 75023}, // __nvvm_sust_p_1d_array_v2i16_trap - {Intrinsic::nvvm_sust_p_1d_array_v2i32_trap, 75057}, // __nvvm_sust_p_1d_array_v2i32_trap - {Intrinsic::nvvm_sust_p_1d_array_v2i8_trap, 75091}, // __nvvm_sust_p_1d_array_v2i8_trap - {Intrinsic::nvvm_sust_p_1d_array_v4i16_trap, 75124}, // __nvvm_sust_p_1d_array_v4i16_trap - {Intrinsic::nvvm_sust_p_1d_array_v4i32_trap, 75158}, // __nvvm_sust_p_1d_array_v4i32_trap - {Intrinsic::nvvm_sust_p_1d_array_v4i8_trap, 75192}, // __nvvm_sust_p_1d_array_v4i8_trap - {Intrinsic::nvvm_sust_p_1d_i16_trap, 75225}, // __nvvm_sust_p_1d_i16_trap - {Intrinsic::nvvm_sust_p_1d_i32_trap, 75251}, // __nvvm_sust_p_1d_i32_trap - {Intrinsic::nvvm_sust_p_1d_i8_trap, 75277}, // __nvvm_sust_p_1d_i8_trap - {Intrinsic::nvvm_sust_p_1d_v2i16_trap, 75302}, // __nvvm_sust_p_1d_v2i16_trap - {Intrinsic::nvvm_sust_p_1d_v2i32_trap, 75330}, // __nvvm_sust_p_1d_v2i32_trap - {Intrinsic::nvvm_sust_p_1d_v2i8_trap, 75358}, // __nvvm_sust_p_1d_v2i8_trap - {Intrinsic::nvvm_sust_p_1d_v4i16_trap, 75385}, // __nvvm_sust_p_1d_v4i16_trap - {Intrinsic::nvvm_sust_p_1d_v4i32_trap, 75413}, // __nvvm_sust_p_1d_v4i32_trap - {Intrinsic::nvvm_sust_p_1d_v4i8_trap, 75441}, // __nvvm_sust_p_1d_v4i8_trap - {Intrinsic::nvvm_sust_p_2d_array_i16_trap, 75468}, // __nvvm_sust_p_2d_array_i16_trap - {Intrinsic::nvvm_sust_p_2d_array_i32_trap, 75500}, // __nvvm_sust_p_2d_array_i32_trap - {Intrinsic::nvvm_sust_p_2d_array_i8_trap, 75532}, // __nvvm_sust_p_2d_array_i8_trap - {Intrinsic::nvvm_sust_p_2d_array_v2i16_trap, 75563}, // __nvvm_sust_p_2d_array_v2i16_trap - {Intrinsic::nvvm_sust_p_2d_array_v2i32_trap, 75597}, // __nvvm_sust_p_2d_array_v2i32_trap - {Intrinsic::nvvm_sust_p_2d_array_v2i8_trap, 75631}, // __nvvm_sust_p_2d_array_v2i8_trap - {Intrinsic::nvvm_sust_p_2d_array_v4i16_trap, 75664}, // __nvvm_sust_p_2d_array_v4i16_trap - {Intrinsic::nvvm_sust_p_2d_array_v4i32_trap, 75698}, // __nvvm_sust_p_2d_array_v4i32_trap - {Intrinsic::nvvm_sust_p_2d_array_v4i8_trap, 75732}, // __nvvm_sust_p_2d_array_v4i8_trap - {Intrinsic::nvvm_sust_p_2d_i16_trap, 75765}, // __nvvm_sust_p_2d_i16_trap - {Intrinsic::nvvm_sust_p_2d_i32_trap, 75791}, // __nvvm_sust_p_2d_i32_trap - {Intrinsic::nvvm_sust_p_2d_i8_trap, 75817}, // __nvvm_sust_p_2d_i8_trap - {Intrinsic::nvvm_sust_p_2d_v2i16_trap, 75842}, // __nvvm_sust_p_2d_v2i16_trap - {Intrinsic::nvvm_sust_p_2d_v2i32_trap, 75870}, // __nvvm_sust_p_2d_v2i32_trap - {Intrinsic::nvvm_sust_p_2d_v2i8_trap, 75898}, // __nvvm_sust_p_2d_v2i8_trap - {Intrinsic::nvvm_sust_p_2d_v4i16_trap, 75925}, // __nvvm_sust_p_2d_v4i16_trap - {Intrinsic::nvvm_sust_p_2d_v4i32_trap, 75953}, // __nvvm_sust_p_2d_v4i32_trap - {Intrinsic::nvvm_sust_p_2d_v4i8_trap, 75981}, // __nvvm_sust_p_2d_v4i8_trap - {Intrinsic::nvvm_sust_p_3d_i16_trap, 76008}, // __nvvm_sust_p_3d_i16_trap - {Intrinsic::nvvm_sust_p_3d_i32_trap, 76034}, // __nvvm_sust_p_3d_i32_trap - {Intrinsic::nvvm_sust_p_3d_i8_trap, 76060}, // __nvvm_sust_p_3d_i8_trap - {Intrinsic::nvvm_sust_p_3d_v2i16_trap, 76085}, // __nvvm_sust_p_3d_v2i16_trap - {Intrinsic::nvvm_sust_p_3d_v2i32_trap, 76113}, // __nvvm_sust_p_3d_v2i32_trap - {Intrinsic::nvvm_sust_p_3d_v2i8_trap, 76141}, // __nvvm_sust_p_3d_v2i8_trap - {Intrinsic::nvvm_sust_p_3d_v4i16_trap, 76168}, // __nvvm_sust_p_3d_v4i16_trap - {Intrinsic::nvvm_sust_p_3d_v4i32_trap, 76196}, // __nvvm_sust_p_3d_v4i32_trap - {Intrinsic::nvvm_sust_p_3d_v4i8_trap, 76224}, // __nvvm_sust_p_3d_v4i8_trap - {Intrinsic::nvvm_swap_lo_hi_b64, 76251}, // __nvvm_swap_lo_hi_b64 - {Intrinsic::nvvm_trunc_d, 76273}, // __nvvm_trunc_d - {Intrinsic::nvvm_trunc_f, 76288}, // __nvvm_trunc_f - {Intrinsic::nvvm_trunc_ftz_f, 76303}, // __nvvm_trunc_ftz_f - {Intrinsic::nvvm_txq_array_size, 76322}, // __nvvm_txq_array_size - {Intrinsic::nvvm_txq_channel_data_type, 76344}, // __nvvm_txq_channel_data_type - {Intrinsic::nvvm_txq_channel_order, 76373}, // __nvvm_txq_channel_order - {Intrinsic::nvvm_txq_depth, 76398}, // __nvvm_txq_depth - {Intrinsic::nvvm_txq_height, 76415}, // __nvvm_txq_height - {Intrinsic::nvvm_txq_num_mipmap_levels, 76433}, // __nvvm_txq_num_mipmap_levels - {Intrinsic::nvvm_txq_num_samples, 76462}, // __nvvm_txq_num_samples - {Intrinsic::nvvm_txq_width, 76485}, // __nvvm_txq_width - {Intrinsic::nvvm_ui2d_rm, 76502}, // __nvvm_ui2d_rm - {Intrinsic::nvvm_ui2d_rn, 76517}, // __nvvm_ui2d_rn - {Intrinsic::nvvm_ui2d_rp, 76532}, // __nvvm_ui2d_rp - {Intrinsic::nvvm_ui2d_rz, 76547}, // __nvvm_ui2d_rz - {Intrinsic::nvvm_ui2f_rm, 76562}, // __nvvm_ui2f_rm - {Intrinsic::nvvm_ui2f_rn, 76577}, // __nvvm_ui2f_rn - {Intrinsic::nvvm_ui2f_rp, 76592}, // __nvvm_ui2f_rp - {Intrinsic::nvvm_ui2f_rz, 76607}, // __nvvm_ui2f_rz - {Intrinsic::nvvm_ull2d_rm, 76622}, // __nvvm_ull2d_rm - {Intrinsic::nvvm_ull2d_rn, 76638}, // __nvvm_ull2d_rn - {Intrinsic::nvvm_ull2d_rp, 76654}, // __nvvm_ull2d_rp - {Intrinsic::nvvm_ull2d_rz, 76670}, // __nvvm_ull2d_rz - {Intrinsic::nvvm_ull2f_rm, 76686}, // __nvvm_ull2f_rm - {Intrinsic::nvvm_ull2f_rn, 76702}, // __nvvm_ull2f_rn - {Intrinsic::nvvm_ull2f_rp, 76718}, // __nvvm_ull2f_rp - {Intrinsic::nvvm_ull2f_rz, 76734}, // __nvvm_ull2f_rz - {Intrinsic::nvvm_barrier0, 64030}, // __syncthreads - }; - auto I = std::lower_bound(std::begin(nvvmNames), - std::end(nvvmNames), - BuiltinNameStr); - if (I != std::end(nvvmNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "ppc") { - static const BuiltinEntry ppcNames[] = { - {Intrinsic::ppc_altivec_crypto_vcipher, 76750}, // __builtin_altivec_crypto_vcipher - {Intrinsic::ppc_altivec_crypto_vcipherlast, 76783}, // __builtin_altivec_crypto_vcipherlast - {Intrinsic::ppc_altivec_crypto_vncipher, 76820}, // __builtin_altivec_crypto_vncipher - {Intrinsic::ppc_altivec_crypto_vncipherlast, 76854}, // __builtin_altivec_crypto_vncipherlast - {Intrinsic::ppc_altivec_crypto_vpermxor, 76892}, // __builtin_altivec_crypto_vpermxor - {Intrinsic::ppc_altivec_crypto_vpmsumb, 76926}, // __builtin_altivec_crypto_vpmsumb - {Intrinsic::ppc_altivec_crypto_vpmsumd, 76959}, // __builtin_altivec_crypto_vpmsumd - {Intrinsic::ppc_altivec_crypto_vpmsumh, 76992}, // __builtin_altivec_crypto_vpmsumh - {Intrinsic::ppc_altivec_crypto_vpmsumw, 77025}, // __builtin_altivec_crypto_vpmsumw - {Intrinsic::ppc_altivec_crypto_vsbox, 77058}, // __builtin_altivec_crypto_vsbox - {Intrinsic::ppc_altivec_crypto_vshasigmad, 77089}, // __builtin_altivec_crypto_vshasigmad - {Intrinsic::ppc_altivec_crypto_vshasigmaw, 77125}, // __builtin_altivec_crypto_vshasigmaw - {Intrinsic::ppc_altivec_dss, 77161}, // __builtin_altivec_dss - {Intrinsic::ppc_altivec_dssall, 77183}, // __builtin_altivec_dssall - {Intrinsic::ppc_altivec_dst, 77208}, // __builtin_altivec_dst - {Intrinsic::ppc_altivec_dstst, 77230}, // __builtin_altivec_dstst - {Intrinsic::ppc_altivec_dststt, 77254}, // __builtin_altivec_dststt - {Intrinsic::ppc_altivec_dstt, 77279}, // __builtin_altivec_dstt - {Intrinsic::ppc_altivec_mfvscr, 77302}, // __builtin_altivec_mfvscr - {Intrinsic::ppc_altivec_mtvscr, 77327}, // __builtin_altivec_mtvscr - {Intrinsic::ppc_altivec_vaddcuq, 77352}, // __builtin_altivec_vaddcuq - {Intrinsic::ppc_altivec_vaddcuw, 77378}, // __builtin_altivec_vaddcuw - {Intrinsic::ppc_altivec_vaddecuq, 77404}, // __builtin_altivec_vaddecuq - {Intrinsic::ppc_altivec_vaddeuqm, 77431}, // __builtin_altivec_vaddeuqm - {Intrinsic::ppc_altivec_vaddsbs, 77458}, // __builtin_altivec_vaddsbs - {Intrinsic::ppc_altivec_vaddshs, 77484}, // __builtin_altivec_vaddshs - {Intrinsic::ppc_altivec_vaddsws, 77510}, // __builtin_altivec_vaddsws - {Intrinsic::ppc_altivec_vaddubs, 77536}, // __builtin_altivec_vaddubs - {Intrinsic::ppc_altivec_vadduhs, 77562}, // __builtin_altivec_vadduhs - {Intrinsic::ppc_altivec_vadduws, 77588}, // __builtin_altivec_vadduws - {Intrinsic::ppc_altivec_vavgsb, 77614}, // __builtin_altivec_vavgsb - {Intrinsic::ppc_altivec_vavgsh, 77639}, // __builtin_altivec_vavgsh - {Intrinsic::ppc_altivec_vavgsw, 77664}, // __builtin_altivec_vavgsw - {Intrinsic::ppc_altivec_vavgub, 77689}, // __builtin_altivec_vavgub - {Intrinsic::ppc_altivec_vavguh, 77714}, // __builtin_altivec_vavguh - {Intrinsic::ppc_altivec_vavguw, 77739}, // __builtin_altivec_vavguw - {Intrinsic::ppc_altivec_vbpermq, 77764}, // __builtin_altivec_vbpermq - {Intrinsic::ppc_altivec_vcfsx, 77790}, // __builtin_altivec_vcfsx - {Intrinsic::ppc_altivec_vcfux, 77814}, // __builtin_altivec_vcfux - {Intrinsic::ppc_altivec_vcmpbfp, 77838}, // __builtin_altivec_vcmpbfp - {Intrinsic::ppc_altivec_vcmpbfp_p, 77864}, // __builtin_altivec_vcmpbfp_p - {Intrinsic::ppc_altivec_vcmpeqfp, 77892}, // __builtin_altivec_vcmpeqfp - {Intrinsic::ppc_altivec_vcmpeqfp_p, 77919}, // __builtin_altivec_vcmpeqfp_p - {Intrinsic::ppc_altivec_vcmpequb, 77948}, // __builtin_altivec_vcmpequb - {Intrinsic::ppc_altivec_vcmpequb_p, 77975}, // __builtin_altivec_vcmpequb_p - {Intrinsic::ppc_altivec_vcmpequd, 78004}, // __builtin_altivec_vcmpequd - {Intrinsic::ppc_altivec_vcmpequd_p, 78031}, // __builtin_altivec_vcmpequd_p - {Intrinsic::ppc_altivec_vcmpequh, 78060}, // __builtin_altivec_vcmpequh - {Intrinsic::ppc_altivec_vcmpequh_p, 78087}, // __builtin_altivec_vcmpequh_p - {Intrinsic::ppc_altivec_vcmpequw, 78116}, // __builtin_altivec_vcmpequw - {Intrinsic::ppc_altivec_vcmpequw_p, 78143}, // __builtin_altivec_vcmpequw_p - {Intrinsic::ppc_altivec_vcmpgefp, 78172}, // __builtin_altivec_vcmpgefp - {Intrinsic::ppc_altivec_vcmpgefp_p, 78199}, // __builtin_altivec_vcmpgefp_p - {Intrinsic::ppc_altivec_vcmpgtfp, 78228}, // __builtin_altivec_vcmpgtfp - {Intrinsic::ppc_altivec_vcmpgtfp_p, 78255}, // __builtin_altivec_vcmpgtfp_p - {Intrinsic::ppc_altivec_vcmpgtsb, 78284}, // __builtin_altivec_vcmpgtsb - {Intrinsic::ppc_altivec_vcmpgtsb_p, 78311}, // __builtin_altivec_vcmpgtsb_p - {Intrinsic::ppc_altivec_vcmpgtsd, 78340}, // __builtin_altivec_vcmpgtsd - {Intrinsic::ppc_altivec_vcmpgtsd_p, 78367}, // __builtin_altivec_vcmpgtsd_p - {Intrinsic::ppc_altivec_vcmpgtsh, 78396}, // __builtin_altivec_vcmpgtsh - {Intrinsic::ppc_altivec_vcmpgtsh_p, 78423}, // __builtin_altivec_vcmpgtsh_p - {Intrinsic::ppc_altivec_vcmpgtsw, 78452}, // __builtin_altivec_vcmpgtsw - {Intrinsic::ppc_altivec_vcmpgtsw_p, 78479}, // __builtin_altivec_vcmpgtsw_p - {Intrinsic::ppc_altivec_vcmpgtub, 78508}, // __builtin_altivec_vcmpgtub - {Intrinsic::ppc_altivec_vcmpgtub_p, 78535}, // __builtin_altivec_vcmpgtub_p - {Intrinsic::ppc_altivec_vcmpgtud, 78564}, // __builtin_altivec_vcmpgtud - {Intrinsic::ppc_altivec_vcmpgtud_p, 78591}, // __builtin_altivec_vcmpgtud_p - {Intrinsic::ppc_altivec_vcmpgtuh, 78620}, // __builtin_altivec_vcmpgtuh - {Intrinsic::ppc_altivec_vcmpgtuh_p, 78647}, // __builtin_altivec_vcmpgtuh_p - {Intrinsic::ppc_altivec_vcmpgtuw, 78676}, // __builtin_altivec_vcmpgtuw - {Intrinsic::ppc_altivec_vcmpgtuw_p, 78703}, // __builtin_altivec_vcmpgtuw_p - {Intrinsic::ppc_altivec_vctsxs, 78732}, // __builtin_altivec_vctsxs - {Intrinsic::ppc_altivec_vctuxs, 78757}, // __builtin_altivec_vctuxs - {Intrinsic::ppc_altivec_vexptefp, 78782}, // __builtin_altivec_vexptefp - {Intrinsic::ppc_altivec_vgbbd, 78809}, // __builtin_altivec_vgbbd - {Intrinsic::ppc_altivec_vlogefp, 78833}, // __builtin_altivec_vlogefp - {Intrinsic::ppc_altivec_vmaddfp, 78859}, // __builtin_altivec_vmaddfp - {Intrinsic::ppc_altivec_vmaxfp, 78885}, // __builtin_altivec_vmaxfp - {Intrinsic::ppc_altivec_vmaxsb, 78910}, // __builtin_altivec_vmaxsb - {Intrinsic::ppc_altivec_vmaxsd, 78935}, // __builtin_altivec_vmaxsd - {Intrinsic::ppc_altivec_vmaxsh, 78960}, // __builtin_altivec_vmaxsh - {Intrinsic::ppc_altivec_vmaxsw, 78985}, // __builtin_altivec_vmaxsw - {Intrinsic::ppc_altivec_vmaxub, 79010}, // __builtin_altivec_vmaxub - {Intrinsic::ppc_altivec_vmaxud, 79035}, // __builtin_altivec_vmaxud - {Intrinsic::ppc_altivec_vmaxuh, 79060}, // __builtin_altivec_vmaxuh - {Intrinsic::ppc_altivec_vmaxuw, 79085}, // __builtin_altivec_vmaxuw - {Intrinsic::ppc_altivec_vmhaddshs, 79110}, // __builtin_altivec_vmhaddshs - {Intrinsic::ppc_altivec_vmhraddshs, 79138}, // __builtin_altivec_vmhraddshs - {Intrinsic::ppc_altivec_vminfp, 79167}, // __builtin_altivec_vminfp - {Intrinsic::ppc_altivec_vminsb, 79192}, // __builtin_altivec_vminsb - {Intrinsic::ppc_altivec_vminsd, 79217}, // __builtin_altivec_vminsd - {Intrinsic::ppc_altivec_vminsh, 79242}, // __builtin_altivec_vminsh - {Intrinsic::ppc_altivec_vminsw, 79267}, // __builtin_altivec_vminsw - {Intrinsic::ppc_altivec_vminub, 79292}, // __builtin_altivec_vminub - {Intrinsic::ppc_altivec_vminud, 79317}, // __builtin_altivec_vminud - {Intrinsic::ppc_altivec_vminuh, 79342}, // __builtin_altivec_vminuh - {Intrinsic::ppc_altivec_vminuw, 79367}, // __builtin_altivec_vminuw - {Intrinsic::ppc_altivec_vmladduhm, 79392}, // __builtin_altivec_vmladduhm - {Intrinsic::ppc_altivec_vmsummbm, 79420}, // __builtin_altivec_vmsummbm - {Intrinsic::ppc_altivec_vmsumshm, 79447}, // __builtin_altivec_vmsumshm - {Intrinsic::ppc_altivec_vmsumshs, 79474}, // __builtin_altivec_vmsumshs - {Intrinsic::ppc_altivec_vmsumubm, 79501}, // __builtin_altivec_vmsumubm - {Intrinsic::ppc_altivec_vmsumuhm, 79528}, // __builtin_altivec_vmsumuhm - {Intrinsic::ppc_altivec_vmsumuhs, 79555}, // __builtin_altivec_vmsumuhs - {Intrinsic::ppc_altivec_vmulesb, 79582}, // __builtin_altivec_vmulesb - {Intrinsic::ppc_altivec_vmulesh, 79608}, // __builtin_altivec_vmulesh - {Intrinsic::ppc_altivec_vmulesw, 79634}, // __builtin_altivec_vmulesw - {Intrinsic::ppc_altivec_vmuleub, 79660}, // __builtin_altivec_vmuleub - {Intrinsic::ppc_altivec_vmuleuh, 79686}, // __builtin_altivec_vmuleuh - {Intrinsic::ppc_altivec_vmuleuw, 79712}, // __builtin_altivec_vmuleuw - {Intrinsic::ppc_altivec_vmulosb, 79738}, // __builtin_altivec_vmulosb - {Intrinsic::ppc_altivec_vmulosh, 79764}, // __builtin_altivec_vmulosh - {Intrinsic::ppc_altivec_vmulosw, 79790}, // __builtin_altivec_vmulosw - {Intrinsic::ppc_altivec_vmuloub, 79816}, // __builtin_altivec_vmuloub - {Intrinsic::ppc_altivec_vmulouh, 79842}, // __builtin_altivec_vmulouh - {Intrinsic::ppc_altivec_vmulouw, 79868}, // __builtin_altivec_vmulouw - {Intrinsic::ppc_altivec_vnmsubfp, 79894}, // __builtin_altivec_vnmsubfp - {Intrinsic::ppc_altivec_vperm, 79921}, // __builtin_altivec_vperm_4si - {Intrinsic::ppc_altivec_vpkpx, 79949}, // __builtin_altivec_vpkpx - {Intrinsic::ppc_altivec_vpksdss, 79973}, // __builtin_altivec_vpksdss - {Intrinsic::ppc_altivec_vpksdus, 79999}, // __builtin_altivec_vpksdus - {Intrinsic::ppc_altivec_vpkshss, 80025}, // __builtin_altivec_vpkshss - {Intrinsic::ppc_altivec_vpkshus, 80051}, // __builtin_altivec_vpkshus - {Intrinsic::ppc_altivec_vpkswss, 80077}, // __builtin_altivec_vpkswss - {Intrinsic::ppc_altivec_vpkswus, 80103}, // __builtin_altivec_vpkswus - {Intrinsic::ppc_altivec_vpkudus, 80129}, // __builtin_altivec_vpkudus - {Intrinsic::ppc_altivec_vpkuhus, 80155}, // __builtin_altivec_vpkuhus - {Intrinsic::ppc_altivec_vpkuwus, 80181}, // __builtin_altivec_vpkuwus - {Intrinsic::ppc_altivec_vrefp, 80207}, // __builtin_altivec_vrefp - {Intrinsic::ppc_altivec_vrfim, 80231}, // __builtin_altivec_vrfim - {Intrinsic::ppc_altivec_vrfin, 80255}, // __builtin_altivec_vrfin - {Intrinsic::ppc_altivec_vrfip, 80279}, // __builtin_altivec_vrfip - {Intrinsic::ppc_altivec_vrfiz, 80303}, // __builtin_altivec_vrfiz - {Intrinsic::ppc_altivec_vrlb, 80327}, // __builtin_altivec_vrlb - {Intrinsic::ppc_altivec_vrld, 80350}, // __builtin_altivec_vrld - {Intrinsic::ppc_altivec_vrlh, 80373}, // __builtin_altivec_vrlh - {Intrinsic::ppc_altivec_vrlw, 80396}, // __builtin_altivec_vrlw - {Intrinsic::ppc_altivec_vrsqrtefp, 80419}, // __builtin_altivec_vrsqrtefp - {Intrinsic::ppc_altivec_vsel, 80447}, // __builtin_altivec_vsel_4si - {Intrinsic::ppc_altivec_vsl, 80474}, // __builtin_altivec_vsl - {Intrinsic::ppc_altivec_vslb, 80496}, // __builtin_altivec_vslb - {Intrinsic::ppc_altivec_vslh, 80519}, // __builtin_altivec_vslh - {Intrinsic::ppc_altivec_vslo, 80542}, // __builtin_altivec_vslo - {Intrinsic::ppc_altivec_vslw, 80565}, // __builtin_altivec_vslw - {Intrinsic::ppc_altivec_vsr, 80588}, // __builtin_altivec_vsr - {Intrinsic::ppc_altivec_vsrab, 80610}, // __builtin_altivec_vsrab - {Intrinsic::ppc_altivec_vsrah, 80634}, // __builtin_altivec_vsrah - {Intrinsic::ppc_altivec_vsraw, 80658}, // __builtin_altivec_vsraw - {Intrinsic::ppc_altivec_vsrb, 80682}, // __builtin_altivec_vsrb - {Intrinsic::ppc_altivec_vsrh, 80705}, // __builtin_altivec_vsrh - {Intrinsic::ppc_altivec_vsro, 80728}, // __builtin_altivec_vsro - {Intrinsic::ppc_altivec_vsrw, 80751}, // __builtin_altivec_vsrw - {Intrinsic::ppc_altivec_vsubcuq, 80774}, // __builtin_altivec_vsubcuq - {Intrinsic::ppc_altivec_vsubcuw, 80800}, // __builtin_altivec_vsubcuw - {Intrinsic::ppc_altivec_vsubecuq, 80826}, // __builtin_altivec_vsubecuq - {Intrinsic::ppc_altivec_vsubeuqm, 80853}, // __builtin_altivec_vsubeuqm - {Intrinsic::ppc_altivec_vsubsbs, 80880}, // __builtin_altivec_vsubsbs - {Intrinsic::ppc_altivec_vsubshs, 80906}, // __builtin_altivec_vsubshs - {Intrinsic::ppc_altivec_vsubsws, 80932}, // __builtin_altivec_vsubsws - {Intrinsic::ppc_altivec_vsububs, 80958}, // __builtin_altivec_vsububs - {Intrinsic::ppc_altivec_vsubuhs, 80984}, // __builtin_altivec_vsubuhs - {Intrinsic::ppc_altivec_vsubuws, 81010}, // __builtin_altivec_vsubuws - {Intrinsic::ppc_altivec_vsum2sws, 81036}, // __builtin_altivec_vsum2sws - {Intrinsic::ppc_altivec_vsum4sbs, 81063}, // __builtin_altivec_vsum4sbs - {Intrinsic::ppc_altivec_vsum4shs, 81090}, // __builtin_altivec_vsum4shs - {Intrinsic::ppc_altivec_vsum4ubs, 81117}, // __builtin_altivec_vsum4ubs - {Intrinsic::ppc_altivec_vsumsws, 81144}, // __builtin_altivec_vsumsws - {Intrinsic::ppc_altivec_vupkhpx, 81170}, // __builtin_altivec_vupkhpx - {Intrinsic::ppc_altivec_vupkhsb, 81196}, // __builtin_altivec_vupkhsb - {Intrinsic::ppc_altivec_vupkhsh, 81222}, // __builtin_altivec_vupkhsh - {Intrinsic::ppc_altivec_vupkhsw, 81248}, // __builtin_altivec_vupkhsw - {Intrinsic::ppc_altivec_vupklpx, 81274}, // __builtin_altivec_vupklpx - {Intrinsic::ppc_altivec_vupklsb, 81300}, // __builtin_altivec_vupklsb - {Intrinsic::ppc_altivec_vupklsh, 81326}, // __builtin_altivec_vupklsh - {Intrinsic::ppc_altivec_vupklsw, 81352}, // __builtin_altivec_vupklsw - {Intrinsic::ppc_bpermd, 81378}, // __builtin_bpermd - {Intrinsic::ppc_divde, 81395}, // __builtin_divde - {Intrinsic::ppc_divdeu, 81411}, // __builtin_divdeu - {Intrinsic::ppc_divwe, 81428}, // __builtin_divwe - {Intrinsic::ppc_divweu, 81444}, // __builtin_divweu - {Intrinsic::ppc_get_texasr, 81461}, // __builtin_get_texasr - {Intrinsic::ppc_get_texasru, 81482}, // __builtin_get_texasru - {Intrinsic::ppc_get_tfhar, 81504}, // __builtin_get_tfhar - {Intrinsic::ppc_get_tfiar, 81524}, // __builtin_get_tfiar - {Intrinsic::ppc_qpx_qvfabs, 81544}, // __builtin_qpx_qvfabs - {Intrinsic::ppc_qpx_qvfadd, 81565}, // __builtin_qpx_qvfadd - {Intrinsic::ppc_qpx_qvfadds, 81586}, // __builtin_qpx_qvfadds - {Intrinsic::ppc_qpx_qvfcfid, 81608}, // __builtin_qpx_qvfcfid - {Intrinsic::ppc_qpx_qvfcfids, 81630}, // __builtin_qpx_qvfcfids - {Intrinsic::ppc_qpx_qvfcfidu, 81653}, // __builtin_qpx_qvfcfidu - {Intrinsic::ppc_qpx_qvfcfidus, 81676}, // __builtin_qpx_qvfcfidus - {Intrinsic::ppc_qpx_qvfcmpeq, 81700}, // __builtin_qpx_qvfcmpeq - {Intrinsic::ppc_qpx_qvfcmpgt, 81723}, // __builtin_qpx_qvfcmpgt - {Intrinsic::ppc_qpx_qvfcmplt, 81746}, // __builtin_qpx_qvfcmplt - {Intrinsic::ppc_qpx_qvfcpsgn, 81769}, // __builtin_qpx_qvfcpsgn - {Intrinsic::ppc_qpx_qvfctid, 81792}, // __builtin_qpx_qvfctid - {Intrinsic::ppc_qpx_qvfctidu, 81814}, // __builtin_qpx_qvfctidu - {Intrinsic::ppc_qpx_qvfctiduz, 81837}, // __builtin_qpx_qvfctiduz - {Intrinsic::ppc_qpx_qvfctidz, 81861}, // __builtin_qpx_qvfctidz - {Intrinsic::ppc_qpx_qvfctiw, 81884}, // __builtin_qpx_qvfctiw - {Intrinsic::ppc_qpx_qvfctiwu, 81906}, // __builtin_qpx_qvfctiwu - {Intrinsic::ppc_qpx_qvfctiwuz, 81929}, // __builtin_qpx_qvfctiwuz - {Intrinsic::ppc_qpx_qvfctiwz, 81953}, // __builtin_qpx_qvfctiwz - {Intrinsic::ppc_qpx_qvflogical, 81976}, // __builtin_qpx_qvflogical - {Intrinsic::ppc_qpx_qvfmadd, 82001}, // __builtin_qpx_qvfmadd - {Intrinsic::ppc_qpx_qvfmadds, 82023}, // __builtin_qpx_qvfmadds - {Intrinsic::ppc_qpx_qvfmsub, 82046}, // __builtin_qpx_qvfmsub - {Intrinsic::ppc_qpx_qvfmsubs, 82068}, // __builtin_qpx_qvfmsubs - {Intrinsic::ppc_qpx_qvfmul, 82091}, // __builtin_qpx_qvfmul - {Intrinsic::ppc_qpx_qvfmuls, 82112}, // __builtin_qpx_qvfmuls - {Intrinsic::ppc_qpx_qvfnabs, 82134}, // __builtin_qpx_qvfnabs - {Intrinsic::ppc_qpx_qvfneg, 82156}, // __builtin_qpx_qvfneg - {Intrinsic::ppc_qpx_qvfnmadd, 82177}, // __builtin_qpx_qvfnmadd - {Intrinsic::ppc_qpx_qvfnmadds, 82200}, // __builtin_qpx_qvfnmadds - {Intrinsic::ppc_qpx_qvfnmsub, 82224}, // __builtin_qpx_qvfnmsub - {Intrinsic::ppc_qpx_qvfnmsubs, 82247}, // __builtin_qpx_qvfnmsubs - {Intrinsic::ppc_qpx_qvfperm, 82271}, // __builtin_qpx_qvfperm - {Intrinsic::ppc_qpx_qvfre, 82293}, // __builtin_qpx_qvfre - {Intrinsic::ppc_qpx_qvfres, 82313}, // __builtin_qpx_qvfres - {Intrinsic::ppc_qpx_qvfrim, 82334}, // __builtin_qpx_qvfrim - {Intrinsic::ppc_qpx_qvfrin, 82355}, // __builtin_qpx_qvfrin - {Intrinsic::ppc_qpx_qvfrip, 82376}, // __builtin_qpx_qvfrip - {Intrinsic::ppc_qpx_qvfriz, 82397}, // __builtin_qpx_qvfriz - {Intrinsic::ppc_qpx_qvfrsp, 82418}, // __builtin_qpx_qvfrsp - {Intrinsic::ppc_qpx_qvfrsqrte, 82439}, // __builtin_qpx_qvfrsqrte - {Intrinsic::ppc_qpx_qvfrsqrtes, 82463}, // __builtin_qpx_qvfrsqrtes - {Intrinsic::ppc_qpx_qvfsel, 82488}, // __builtin_qpx_qvfsel - {Intrinsic::ppc_qpx_qvfsub, 82509}, // __builtin_qpx_qvfsub - {Intrinsic::ppc_qpx_qvfsubs, 82530}, // __builtin_qpx_qvfsubs - {Intrinsic::ppc_qpx_qvftstnan, 82552}, // __builtin_qpx_qvftstnan - {Intrinsic::ppc_qpx_qvfxmadd, 82576}, // __builtin_qpx_qvfxmadd - {Intrinsic::ppc_qpx_qvfxmadds, 82599}, // __builtin_qpx_qvfxmadds - {Intrinsic::ppc_qpx_qvfxmul, 82623}, // __builtin_qpx_qvfxmul - {Intrinsic::ppc_qpx_qvfxmuls, 82645}, // __builtin_qpx_qvfxmuls - {Intrinsic::ppc_qpx_qvfxxcpnmadd, 82668}, // __builtin_qpx_qvfxxcpnmadd - {Intrinsic::ppc_qpx_qvfxxcpnmadds, 82695}, // __builtin_qpx_qvfxxcpnmadds - {Intrinsic::ppc_qpx_qvfxxmadd, 82723}, // __builtin_qpx_qvfxxmadd - {Intrinsic::ppc_qpx_qvfxxmadds, 82747}, // __builtin_qpx_qvfxxmadds - {Intrinsic::ppc_qpx_qvfxxnpmadd, 82772}, // __builtin_qpx_qvfxxnpmadd - {Intrinsic::ppc_qpx_qvfxxnpmadds, 82798}, // __builtin_qpx_qvfxxnpmadds - {Intrinsic::ppc_qpx_qvgpci, 82825}, // __builtin_qpx_qvgpci - {Intrinsic::ppc_qpx_qvlfcd, 82846}, // __builtin_qpx_qvlfcd - {Intrinsic::ppc_qpx_qvlfcda, 82867}, // __builtin_qpx_qvlfcda - {Intrinsic::ppc_qpx_qvlfcs, 82889}, // __builtin_qpx_qvlfcs - {Intrinsic::ppc_qpx_qvlfcsa, 82910}, // __builtin_qpx_qvlfcsa - {Intrinsic::ppc_qpx_qvlfd, 82932}, // __builtin_qpx_qvlfd - {Intrinsic::ppc_qpx_qvlfda, 82952}, // __builtin_qpx_qvlfda - {Intrinsic::ppc_qpx_qvlfiwa, 82973}, // __builtin_qpx_qvlfiwa - {Intrinsic::ppc_qpx_qvlfiwaa, 82995}, // __builtin_qpx_qvlfiwaa - {Intrinsic::ppc_qpx_qvlfiwz, 83018}, // __builtin_qpx_qvlfiwz - {Intrinsic::ppc_qpx_qvlfiwza, 83040}, // __builtin_qpx_qvlfiwza - {Intrinsic::ppc_qpx_qvlfs, 83063}, // __builtin_qpx_qvlfs - {Intrinsic::ppc_qpx_qvlfsa, 83083}, // __builtin_qpx_qvlfsa - {Intrinsic::ppc_qpx_qvlpcld, 83104}, // __builtin_qpx_qvlpcld - {Intrinsic::ppc_qpx_qvlpcls, 83126}, // __builtin_qpx_qvlpcls - {Intrinsic::ppc_qpx_qvlpcrd, 83148}, // __builtin_qpx_qvlpcrd - {Intrinsic::ppc_qpx_qvlpcrs, 83170}, // __builtin_qpx_qvlpcrs - {Intrinsic::ppc_qpx_qvstfcd, 83192}, // __builtin_qpx_qvstfcd - {Intrinsic::ppc_qpx_qvstfcda, 83214}, // __builtin_qpx_qvstfcda - {Intrinsic::ppc_qpx_qvstfcs, 83237}, // __builtin_qpx_qvstfcs - {Intrinsic::ppc_qpx_qvstfcsa, 83259}, // __builtin_qpx_qvstfcsa - {Intrinsic::ppc_qpx_qvstfd, 83282}, // __builtin_qpx_qvstfd - {Intrinsic::ppc_qpx_qvstfda, 83303}, // __builtin_qpx_qvstfda - {Intrinsic::ppc_qpx_qvstfiw, 83325}, // __builtin_qpx_qvstfiw - {Intrinsic::ppc_qpx_qvstfiwa, 83347}, // __builtin_qpx_qvstfiwa - {Intrinsic::ppc_qpx_qvstfs, 83370}, // __builtin_qpx_qvstfs - {Intrinsic::ppc_qpx_qvstfsa, 83391}, // __builtin_qpx_qvstfsa - {Intrinsic::ppc_set_texasr, 83413}, // __builtin_set_texasr - {Intrinsic::ppc_set_texasru, 83434}, // __builtin_set_texasru - {Intrinsic::ppc_set_tfhar, 83456}, // __builtin_set_tfhar - {Intrinsic::ppc_set_tfiar, 83476}, // __builtin_set_tfiar - {Intrinsic::ppc_tabort, 83496}, // __builtin_tabort - {Intrinsic::ppc_tabortdc, 83513}, // __builtin_tabortdc - {Intrinsic::ppc_tabortdci, 83532}, // __builtin_tabortdci - {Intrinsic::ppc_tabortwc, 83552}, // __builtin_tabortwc - {Intrinsic::ppc_tabortwci, 83571}, // __builtin_tabortwci - {Intrinsic::ppc_tbegin, 83591}, // __builtin_tbegin - {Intrinsic::ppc_tcheck, 83608}, // __builtin_tcheck - {Intrinsic::ppc_tend, 83625}, // __builtin_tend - {Intrinsic::ppc_tendall, 83640}, // __builtin_tendall - {Intrinsic::ppc_trechkpt, 83658}, // __builtin_trechkpt - {Intrinsic::ppc_treclaim, 83677}, // __builtin_treclaim - {Intrinsic::ppc_tresume, 83696}, // __builtin_tresume - {Intrinsic::ppc_tsr, 83714}, // __builtin_tsr - {Intrinsic::ppc_tsuspend, 83728}, // __builtin_tsuspend - {Intrinsic::ppc_ttest, 83747}, // __builtin_ttest - {Intrinsic::ppc_vsx_xsmaxdp, 83763}, // __builtin_vsx_xsmaxdp - {Intrinsic::ppc_vsx_xsmindp, 83785}, // __builtin_vsx_xsmindp - {Intrinsic::ppc_vsx_xvcmpeqdp, 83807}, // __builtin_vsx_xvcmpeqdp - {Intrinsic::ppc_vsx_xvcmpeqdp_p, 83831}, // __builtin_vsx_xvcmpeqdp_p - {Intrinsic::ppc_vsx_xvcmpeqsp, 83857}, // __builtin_vsx_xvcmpeqsp - {Intrinsic::ppc_vsx_xvcmpeqsp_p, 83881}, // __builtin_vsx_xvcmpeqsp_p - {Intrinsic::ppc_vsx_xvcmpgedp, 83907}, // __builtin_vsx_xvcmpgedp - {Intrinsic::ppc_vsx_xvcmpgedp_p, 83931}, // __builtin_vsx_xvcmpgedp_p - {Intrinsic::ppc_vsx_xvcmpgesp, 83957}, // __builtin_vsx_xvcmpgesp - {Intrinsic::ppc_vsx_xvcmpgesp_p, 83981}, // __builtin_vsx_xvcmpgesp_p - {Intrinsic::ppc_vsx_xvcmpgtdp, 84007}, // __builtin_vsx_xvcmpgtdp - {Intrinsic::ppc_vsx_xvcmpgtdp_p, 84031}, // __builtin_vsx_xvcmpgtdp_p - {Intrinsic::ppc_vsx_xvcmpgtsp, 84057}, // __builtin_vsx_xvcmpgtsp - {Intrinsic::ppc_vsx_xvcmpgtsp_p, 84081}, // __builtin_vsx_xvcmpgtsp_p - {Intrinsic::ppc_vsx_xvdivdp, 84107}, // __builtin_vsx_xvdivdp - {Intrinsic::ppc_vsx_xvdivsp, 84129}, // __builtin_vsx_xvdivsp - {Intrinsic::ppc_vsx_xvmaxdp, 84151}, // __builtin_vsx_xvmaxdp - {Intrinsic::ppc_vsx_xvmaxsp, 84173}, // __builtin_vsx_xvmaxsp - {Intrinsic::ppc_vsx_xvmindp, 84195}, // __builtin_vsx_xvmindp - {Intrinsic::ppc_vsx_xvminsp, 84217}, // __builtin_vsx_xvminsp - {Intrinsic::ppc_vsx_xvredp, 84239}, // __builtin_vsx_xvredp - {Intrinsic::ppc_vsx_xvresp, 84260}, // __builtin_vsx_xvresp - {Intrinsic::ppc_vsx_xvrsqrtedp, 84281}, // __builtin_vsx_xvrsqrtedp - {Intrinsic::ppc_vsx_xvrsqrtesp, 84306}, // __builtin_vsx_xvrsqrtesp - {Intrinsic::ppc_vsx_xxleqv, 84331}, // __builtin_vsx_xxleqv - }; - auto I = std::lower_bound(std::begin(ppcNames), - std::end(ppcNames), - BuiltinNameStr); - if (I != std::end(ppcNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "r600") { - static const BuiltinEntry r600Names[] = { - {Intrinsic::r600_group_barrier, 84352}, // __builtin_r600_group_barrier - {Intrinsic::r600_implicitarg_ptr, 84381}, // __builtin_r600_implicitarg_ptr - {Intrinsic::r600_rat_store_typed, 84412}, // __builtin_r600_rat_store_typed - {Intrinsic::r600_read_global_size_x, 84443}, // __builtin_r600_read_global_size_x - {Intrinsic::r600_read_global_size_y, 84477}, // __builtin_r600_read_global_size_y - {Intrinsic::r600_read_global_size_z, 84511}, // __builtin_r600_read_global_size_z - {Intrinsic::r600_read_ngroups_x, 84545}, // __builtin_r600_read_ngroups_x - {Intrinsic::r600_read_ngroups_y, 84575}, // __builtin_r600_read_ngroups_y - {Intrinsic::r600_read_ngroups_z, 84605}, // __builtin_r600_read_ngroups_z - {Intrinsic::r600_read_tgid_x, 84635}, // __builtin_r600_read_tgid_x - {Intrinsic::r600_read_tgid_y, 84662}, // __builtin_r600_read_tgid_y - {Intrinsic::r600_read_tgid_z, 84689}, // __builtin_r600_read_tgid_z - }; - auto I = std::lower_bound(std::begin(r600Names), - std::end(r600Names), - BuiltinNameStr); - if (I != std::end(r600Names) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "s390") { - static const BuiltinEntry s390Names[] = { - {Intrinsic::s390_lcbb, 84743}, // __builtin_s390_lcbb - {Intrinsic::s390_vaccb, 84783}, // __builtin_s390_vaccb - {Intrinsic::s390_vacccq, 84804}, // __builtin_s390_vacccq - {Intrinsic::s390_vaccf, 84826}, // __builtin_s390_vaccf - {Intrinsic::s390_vaccg, 84847}, // __builtin_s390_vaccg - {Intrinsic::s390_vacch, 84868}, // __builtin_s390_vacch - {Intrinsic::s390_vaccq, 84889}, // __builtin_s390_vaccq - {Intrinsic::s390_vacq, 84910}, // __builtin_s390_vacq - {Intrinsic::s390_vaq, 84930}, // __builtin_s390_vaq - {Intrinsic::s390_vavgb, 84949}, // __builtin_s390_vavgb - {Intrinsic::s390_vavgf, 84970}, // __builtin_s390_vavgf - {Intrinsic::s390_vavgg, 84991}, // __builtin_s390_vavgg - {Intrinsic::s390_vavgh, 85012}, // __builtin_s390_vavgh - {Intrinsic::s390_vavglb, 85033}, // __builtin_s390_vavglb - {Intrinsic::s390_vavglf, 85055}, // __builtin_s390_vavglf - {Intrinsic::s390_vavglg, 85077}, // __builtin_s390_vavglg - {Intrinsic::s390_vavglh, 85099}, // __builtin_s390_vavglh - {Intrinsic::s390_vcksm, 85121}, // __builtin_s390_vcksm - {Intrinsic::s390_verimb, 85142}, // __builtin_s390_verimb - {Intrinsic::s390_verimf, 85164}, // __builtin_s390_verimf - {Intrinsic::s390_verimg, 85186}, // __builtin_s390_verimg - {Intrinsic::s390_verimh, 85208}, // __builtin_s390_verimh - {Intrinsic::s390_verllb, 85230}, // __builtin_s390_verllb - {Intrinsic::s390_verllf, 85252}, // __builtin_s390_verllf - {Intrinsic::s390_verllg, 85274}, // __builtin_s390_verllg - {Intrinsic::s390_verllh, 85296}, // __builtin_s390_verllh - {Intrinsic::s390_verllvb, 85318}, // __builtin_s390_verllvb - {Intrinsic::s390_verllvf, 85341}, // __builtin_s390_verllvf - {Intrinsic::s390_verllvg, 85364}, // __builtin_s390_verllvg - {Intrinsic::s390_verllvh, 85387}, // __builtin_s390_verllvh - {Intrinsic::s390_vfaeb, 85410}, // __builtin_s390_vfaeb - {Intrinsic::s390_vfaef, 85431}, // __builtin_s390_vfaef - {Intrinsic::s390_vfaeh, 85452}, // __builtin_s390_vfaeh - {Intrinsic::s390_vfaezb, 85473}, // __builtin_s390_vfaezb - {Intrinsic::s390_vfaezf, 85495}, // __builtin_s390_vfaezf - {Intrinsic::s390_vfaezh, 85517}, // __builtin_s390_vfaezh - {Intrinsic::s390_vfeeb, 85539}, // __builtin_s390_vfeeb - {Intrinsic::s390_vfeef, 85560}, // __builtin_s390_vfeef - {Intrinsic::s390_vfeeh, 85581}, // __builtin_s390_vfeeh - {Intrinsic::s390_vfeezb, 85602}, // __builtin_s390_vfeezb - {Intrinsic::s390_vfeezf, 85624}, // __builtin_s390_vfeezf - {Intrinsic::s390_vfeezh, 85646}, // __builtin_s390_vfeezh - {Intrinsic::s390_vfeneb, 85668}, // __builtin_s390_vfeneb - {Intrinsic::s390_vfenef, 85690}, // __builtin_s390_vfenef - {Intrinsic::s390_vfeneh, 85712}, // __builtin_s390_vfeneh - {Intrinsic::s390_vfenezb, 85734}, // __builtin_s390_vfenezb - {Intrinsic::s390_vfenezf, 85757}, // __builtin_s390_vfenezf - {Intrinsic::s390_vfenezh, 85780}, // __builtin_s390_vfenezh - {Intrinsic::s390_vgfmab, 85803}, // __builtin_s390_vgfmab - {Intrinsic::s390_vgfmaf, 85825}, // __builtin_s390_vgfmaf - {Intrinsic::s390_vgfmag, 85847}, // __builtin_s390_vgfmag - {Intrinsic::s390_vgfmah, 85869}, // __builtin_s390_vgfmah - {Intrinsic::s390_vgfmb, 85891}, // __builtin_s390_vgfmb - {Intrinsic::s390_vgfmf, 85912}, // __builtin_s390_vgfmf - {Intrinsic::s390_vgfmg, 85933}, // __builtin_s390_vgfmg - {Intrinsic::s390_vgfmh, 85954}, // __builtin_s390_vgfmh - {Intrinsic::s390_vistrb, 85975}, // __builtin_s390_vistrb - {Intrinsic::s390_vistrf, 85997}, // __builtin_s390_vistrf - {Intrinsic::s390_vistrh, 86019}, // __builtin_s390_vistrh - {Intrinsic::s390_vlbb, 86041}, // __builtin_s390_vlbb - {Intrinsic::s390_vll, 86061}, // __builtin_s390_vll - {Intrinsic::s390_vmaeb, 86080}, // __builtin_s390_vmaeb - {Intrinsic::s390_vmaef, 86101}, // __builtin_s390_vmaef - {Intrinsic::s390_vmaeh, 86122}, // __builtin_s390_vmaeh - {Intrinsic::s390_vmahb, 86143}, // __builtin_s390_vmahb - {Intrinsic::s390_vmahf, 86164}, // __builtin_s390_vmahf - {Intrinsic::s390_vmahh, 86185}, // __builtin_s390_vmahh - {Intrinsic::s390_vmaleb, 86206}, // __builtin_s390_vmaleb - {Intrinsic::s390_vmalef, 86228}, // __builtin_s390_vmalef - {Intrinsic::s390_vmaleh, 86250}, // __builtin_s390_vmaleh - {Intrinsic::s390_vmalhb, 86272}, // __builtin_s390_vmalhb - {Intrinsic::s390_vmalhf, 86294}, // __builtin_s390_vmalhf - {Intrinsic::s390_vmalhh, 86316}, // __builtin_s390_vmalhh - {Intrinsic::s390_vmalob, 86338}, // __builtin_s390_vmalob - {Intrinsic::s390_vmalof, 86360}, // __builtin_s390_vmalof - {Intrinsic::s390_vmaloh, 86382}, // __builtin_s390_vmaloh - {Intrinsic::s390_vmaob, 86404}, // __builtin_s390_vmaob - {Intrinsic::s390_vmaof, 86425}, // __builtin_s390_vmaof - {Intrinsic::s390_vmaoh, 86446}, // __builtin_s390_vmaoh - {Intrinsic::s390_vmeb, 86467}, // __builtin_s390_vmeb - {Intrinsic::s390_vmef, 86487}, // __builtin_s390_vmef - {Intrinsic::s390_vmeh, 86507}, // __builtin_s390_vmeh - {Intrinsic::s390_vmhb, 86527}, // __builtin_s390_vmhb - {Intrinsic::s390_vmhf, 86547}, // __builtin_s390_vmhf - {Intrinsic::s390_vmhh, 86567}, // __builtin_s390_vmhh - {Intrinsic::s390_vmleb, 86587}, // __builtin_s390_vmleb - {Intrinsic::s390_vmlef, 86608}, // __builtin_s390_vmlef - {Intrinsic::s390_vmleh, 86629}, // __builtin_s390_vmleh - {Intrinsic::s390_vmlhb, 86650}, // __builtin_s390_vmlhb - {Intrinsic::s390_vmlhf, 86671}, // __builtin_s390_vmlhf - {Intrinsic::s390_vmlhh, 86692}, // __builtin_s390_vmlhh - {Intrinsic::s390_vmlob, 86713}, // __builtin_s390_vmlob - {Intrinsic::s390_vmlof, 86734}, // __builtin_s390_vmlof - {Intrinsic::s390_vmloh, 86755}, // __builtin_s390_vmloh - {Intrinsic::s390_vmob, 86776}, // __builtin_s390_vmob - {Intrinsic::s390_vmof, 86796}, // __builtin_s390_vmof - {Intrinsic::s390_vmoh, 86816}, // __builtin_s390_vmoh - {Intrinsic::s390_vpdi, 86836}, // __builtin_s390_vpdi - {Intrinsic::s390_vperm, 86856}, // __builtin_s390_vperm - {Intrinsic::s390_vpklsf, 86877}, // __builtin_s390_vpklsf - {Intrinsic::s390_vpklsg, 86899}, // __builtin_s390_vpklsg - {Intrinsic::s390_vpklsh, 86921}, // __builtin_s390_vpklsh - {Intrinsic::s390_vpksf, 86943}, // __builtin_s390_vpksf - {Intrinsic::s390_vpksg, 86964}, // __builtin_s390_vpksg - {Intrinsic::s390_vpksh, 86985}, // __builtin_s390_vpksh - {Intrinsic::s390_vsbcbiq, 87006}, // __builtin_s390_vsbcbiq - {Intrinsic::s390_vsbiq, 87029}, // __builtin_s390_vsbiq - {Intrinsic::s390_vscbib, 87050}, // __builtin_s390_vscbib - {Intrinsic::s390_vscbif, 87072}, // __builtin_s390_vscbif - {Intrinsic::s390_vscbig, 87094}, // __builtin_s390_vscbig - {Intrinsic::s390_vscbih, 87116}, // __builtin_s390_vscbih - {Intrinsic::s390_vscbiq, 87138}, // __builtin_s390_vscbiq - {Intrinsic::s390_vsl, 87160}, // __builtin_s390_vsl - {Intrinsic::s390_vslb, 87179}, // __builtin_s390_vslb - {Intrinsic::s390_vsldb, 87199}, // __builtin_s390_vsldb - {Intrinsic::s390_vsq, 87220}, // __builtin_s390_vsq - {Intrinsic::s390_vsra, 87239}, // __builtin_s390_vsra - {Intrinsic::s390_vsrab, 87259}, // __builtin_s390_vsrab - {Intrinsic::s390_vsrl, 87280}, // __builtin_s390_vsrl - {Intrinsic::s390_vsrlb, 87300}, // __builtin_s390_vsrlb - {Intrinsic::s390_vstl, 87321}, // __builtin_s390_vstl - {Intrinsic::s390_vstrcb, 87341}, // __builtin_s390_vstrcb - {Intrinsic::s390_vstrcf, 87363}, // __builtin_s390_vstrcf - {Intrinsic::s390_vstrch, 87385}, // __builtin_s390_vstrch - {Intrinsic::s390_vstrczb, 87407}, // __builtin_s390_vstrczb - {Intrinsic::s390_vstrczf, 87430}, // __builtin_s390_vstrczf - {Intrinsic::s390_vstrczh, 87453}, // __builtin_s390_vstrczh - {Intrinsic::s390_vsumb, 87476}, // __builtin_s390_vsumb - {Intrinsic::s390_vsumgf, 87497}, // __builtin_s390_vsumgf - {Intrinsic::s390_vsumgh, 87519}, // __builtin_s390_vsumgh - {Intrinsic::s390_vsumh, 87541}, // __builtin_s390_vsumh - {Intrinsic::s390_vsumqf, 87562}, // __builtin_s390_vsumqf - {Intrinsic::s390_vsumqg, 87584}, // __builtin_s390_vsumqg - {Intrinsic::s390_vtm, 87606}, // __builtin_s390_vtm - {Intrinsic::s390_vuphb, 87625}, // __builtin_s390_vuphb - {Intrinsic::s390_vuphf, 87646}, // __builtin_s390_vuphf - {Intrinsic::s390_vuphh, 87667}, // __builtin_s390_vuphh - {Intrinsic::s390_vuplb, 87688}, // __builtin_s390_vuplb - {Intrinsic::s390_vuplf, 87709}, // __builtin_s390_vuplf - {Intrinsic::s390_vuplhb, 87730}, // __builtin_s390_vuplhb - {Intrinsic::s390_vuplhf, 87752}, // __builtin_s390_vuplhf - {Intrinsic::s390_vuplhh, 87774}, // __builtin_s390_vuplhh - {Intrinsic::s390_vuplhw, 87796}, // __builtin_s390_vuplhw - {Intrinsic::s390_vupllb, 87818}, // __builtin_s390_vupllb - {Intrinsic::s390_vupllf, 87840}, // __builtin_s390_vupllf - {Intrinsic::s390_vupllh, 87862}, // __builtin_s390_vupllh - {Intrinsic::s390_tend, 83625}, // __builtin_tend - {Intrinsic::s390_ppa_txassist, 84763}, // __builtin_tx_assist - {Intrinsic::s390_etnd, 84716}, // __builtin_tx_nesting_depth - }; - auto I = std::lower_bound(std::begin(s390Names), - std::end(s390Names), - BuiltinNameStr); - if (I != std::end(s390Names) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "x86") { - static const BuiltinEntry x86Names[] = { - {Intrinsic::x86_addcarry_u32, 88392}, // __builtin_ia32_addcarry_u32 - {Intrinsic::x86_addcarry_u64, 88420}, // __builtin_ia32_addcarry_u64 - {Intrinsic::x86_addcarryx_u32, 88448}, // __builtin_ia32_addcarryx_u32 - {Intrinsic::x86_addcarryx_u64, 88477}, // __builtin_ia32_addcarryx_u64 - {Intrinsic::x86_avx512_mask_add_pd_128, 95108}, // __builtin_ia32_addpd128_mask - {Intrinsic::x86_avx512_mask_add_pd_256, 95137}, // __builtin_ia32_addpd256_mask - {Intrinsic::x86_avx512_mask_add_pd_512, 95166}, // __builtin_ia32_addpd512_mask - {Intrinsic::x86_avx512_mask_add_ps_128, 95195}, // __builtin_ia32_addps128_mask - {Intrinsic::x86_avx512_mask_add_ps_256, 95224}, // __builtin_ia32_addps256_mask - {Intrinsic::x86_avx512_mask_add_ps_512, 95253}, // __builtin_ia32_addps512_mask - {Intrinsic::x86_avx512_mask_add_sd_round, 95282}, // __builtin_ia32_addsd_round_mask - {Intrinsic::x86_avx512_mask_add_ss_round, 95314}, // __builtin_ia32_addss_round_mask - {Intrinsic::x86_sse3_addsub_pd, 134803}, // __builtin_ia32_addsubpd - {Intrinsic::x86_avx_addsub_pd_256, 88673}, // __builtin_ia32_addsubpd256 - {Intrinsic::x86_sse3_addsub_ps, 134827}, // __builtin_ia32_addsubps - {Intrinsic::x86_avx_addsub_ps_256, 88700}, // __builtin_ia32_addsubps256 - {Intrinsic::x86_aesni_aesdec, 88506}, // __builtin_ia32_aesdec128 - {Intrinsic::x86_aesni_aesdeclast, 88531}, // __builtin_ia32_aesdeclast128 - {Intrinsic::x86_aesni_aesenc, 88560}, // __builtin_ia32_aesenc128 - {Intrinsic::x86_aesni_aesenclast, 88585}, // __builtin_ia32_aesenclast128 - {Intrinsic::x86_aesni_aesimc, 88614}, // __builtin_ia32_aesimc128 - {Intrinsic::x86_aesni_aeskeygenassist, 88639}, // __builtin_ia32_aeskeygenassist128 - {Intrinsic::x86_avx512_mask_valign_d_128, 119650}, // __builtin_ia32_alignd128_mask - {Intrinsic::x86_avx512_mask_valign_d_256, 119680}, // __builtin_ia32_alignd256_mask - {Intrinsic::x86_avx512_mask_valign_d_512, 119710}, // __builtin_ia32_alignd512_mask - {Intrinsic::x86_avx512_mask_valign_q_128, 119740}, // __builtin_ia32_alignq128_mask - {Intrinsic::x86_avx512_mask_valign_q_256, 119770}, // __builtin_ia32_alignq256_mask - {Intrinsic::x86_avx512_mask_valign_q_512, 119800}, // __builtin_ia32_alignq512_mask - {Intrinsic::x86_avx512_mask_andn_pd_128, 95520}, // __builtin_ia32_andnpd128_mask - {Intrinsic::x86_avx512_mask_andn_pd_256, 95550}, // __builtin_ia32_andnpd256_mask - {Intrinsic::x86_avx512_mask_andn_pd_512, 95580}, // __builtin_ia32_andnpd512_mask - {Intrinsic::x86_avx512_mask_andn_ps_128, 95610}, // __builtin_ia32_andnps128_mask - {Intrinsic::x86_avx512_mask_andn_ps_256, 95640}, // __builtin_ia32_andnps256_mask - {Intrinsic::x86_avx512_mask_andn_ps_512, 95670}, // __builtin_ia32_andnps512_mask - {Intrinsic::x86_avx512_mask_and_pd_128, 95346}, // __builtin_ia32_andpd128_mask - {Intrinsic::x86_avx512_mask_and_pd_256, 95375}, // __builtin_ia32_andpd256_mask - {Intrinsic::x86_avx512_mask_and_pd_512, 95404}, // __builtin_ia32_andpd512_mask - {Intrinsic::x86_avx512_mask_and_ps_128, 95433}, // __builtin_ia32_andps128_mask - {Intrinsic::x86_avx512_mask_and_ps_256, 95462}, // __builtin_ia32_andps256_mask - {Intrinsic::x86_avx512_mask_and_ps_512, 95491}, // __builtin_ia32_andps512_mask - {Intrinsic::x86_bmi_bextr_32, 128821}, // __builtin_ia32_bextr_u32 - {Intrinsic::x86_bmi_bextr_64, 128846}, // __builtin_ia32_bextr_u64 - {Intrinsic::x86_tbm_bextri_u32, 136801}, // __builtin_ia32_bextri_u32 - {Intrinsic::x86_tbm_bextri_u64, 136827}, // __builtin_ia32_bextri_u64 - {Intrinsic::x86_sse41_blendvpd, 135004}, // __builtin_ia32_blendvpd - {Intrinsic::x86_avx_blendv_pd_256, 88727}, // __builtin_ia32_blendvpd256 - {Intrinsic::x86_sse41_blendvps, 135028}, // __builtin_ia32_blendvps - {Intrinsic::x86_avx_blendv_ps_256, 88754}, // __builtin_ia32_blendvps256 - {Intrinsic::x86_avx512_mask_broadcastf32x2_256, 95700}, // __builtin_ia32_broadcastf32x2_256_mask - {Intrinsic::x86_avx512_mask_broadcastf32x2_512, 95739}, // __builtin_ia32_broadcastf32x2_512_mask - {Intrinsic::x86_avx512_mask_broadcastf32x4_256, 95778}, // __builtin_ia32_broadcastf32x4_256_mask - {Intrinsic::x86_avx512_mask_broadcastf32x4_512, 95817}, // __builtin_ia32_broadcastf32x4_512 - {Intrinsic::x86_avx512_mask_broadcastf32x8_512, 95851}, // __builtin_ia32_broadcastf32x8_512_mask - {Intrinsic::x86_avx512_mask_broadcastf64x2_256, 95890}, // __builtin_ia32_broadcastf64x2_256_mask - {Intrinsic::x86_avx512_mask_broadcastf64x2_512, 95929}, // __builtin_ia32_broadcastf64x2_512_mask - {Intrinsic::x86_avx512_mask_broadcastf64x4_512, 95968}, // __builtin_ia32_broadcastf64x4_512 - {Intrinsic::x86_avx512_mask_broadcasti32x2_128, 96002}, // __builtin_ia32_broadcasti32x2_128_mask - {Intrinsic::x86_avx512_mask_broadcasti32x2_256, 96041}, // __builtin_ia32_broadcasti32x2_256_mask - {Intrinsic::x86_avx512_mask_broadcasti32x2_512, 96080}, // __builtin_ia32_broadcasti32x2_512_mask - {Intrinsic::x86_avx512_mask_broadcasti32x4_256, 96119}, // __builtin_ia32_broadcasti32x4_256_mask - {Intrinsic::x86_avx512_mask_broadcasti32x4_512, 96158}, // __builtin_ia32_broadcasti32x4_512 - {Intrinsic::x86_avx512_mask_broadcasti32x8_512, 96192}, // __builtin_ia32_broadcasti32x8_512_mask - {Intrinsic::x86_avx512_mask_broadcasti64x2_256, 96231}, // __builtin_ia32_broadcasti64x2_256_mask - {Intrinsic::x86_avx512_mask_broadcasti64x2_512, 96270}, // __builtin_ia32_broadcasti64x2_512_mask - {Intrinsic::x86_avx512_mask_broadcasti64x4_512, 96309}, // __builtin_ia32_broadcasti64x4_512 - {Intrinsic::x86_avx512_broadcastmb_128, 92705}, // __builtin_ia32_broadcastmb128 - {Intrinsic::x86_avx512_broadcastmb_256, 92735}, // __builtin_ia32_broadcastmb256 - {Intrinsic::x86_avx512_broadcastmb_512, 92765}, // __builtin_ia32_broadcastmb512 - {Intrinsic::x86_avx512_broadcastmw_128, 92795}, // __builtin_ia32_broadcastmw128 - {Intrinsic::x86_avx512_broadcastmw_256, 92825}, // __builtin_ia32_broadcastmw256 - {Intrinsic::x86_avx512_broadcastmw_512, 92855}, // __builtin_ia32_broadcastmw512 - {Intrinsic::x86_bmi_bzhi_64, 128894}, // __builtin_ia32_bzhi_di - {Intrinsic::x86_bmi_bzhi_32, 128871}, // __builtin_ia32_bzhi_si - {Intrinsic::x86_sse2_clflush, 132994}, // __builtin_ia32_clflush - {Intrinsic::x86_clflushopt, 129009}, // __builtin_ia32_clflushopt - {Intrinsic::x86_avx512_mask_cmp_pd_128, 96343}, // __builtin_ia32_cmppd128_mask - {Intrinsic::x86_avx512_mask_cmp_pd_256, 96372}, // __builtin_ia32_cmppd256_mask - {Intrinsic::x86_avx512_mask_cmp_pd_512, 96401}, // __builtin_ia32_cmppd512_mask - {Intrinsic::x86_avx512_mask_cmp_ps_128, 96430}, // __builtin_ia32_cmpps128_mask - {Intrinsic::x86_avx512_mask_cmp_ps_256, 96459}, // __builtin_ia32_cmpps256_mask - {Intrinsic::x86_avx512_mask_cmp_ps_512, 96488}, // __builtin_ia32_cmpps512_mask - {Intrinsic::x86_sse2_cmp_sd, 133017}, // __builtin_ia32_cmpsd - {Intrinsic::x86_avx512_mask_cmp_sd, 96517}, // __builtin_ia32_cmpsd_mask - {Intrinsic::x86_sse_cmp_ss, 132119}, // __builtin_ia32_cmpss - {Intrinsic::x86_avx512_mask_cmp_ss, 96543}, // __builtin_ia32_cmpss_mask - {Intrinsic::x86_sse_comieq_ss, 132140}, // __builtin_ia32_comieq - {Intrinsic::x86_sse_comige_ss, 132162}, // __builtin_ia32_comige - {Intrinsic::x86_sse_comigt_ss, 132184}, // __builtin_ia32_comigt - {Intrinsic::x86_sse_comile_ss, 132206}, // __builtin_ia32_comile - {Intrinsic::x86_sse_comilt_ss, 132228}, // __builtin_ia32_comilt - {Intrinsic::x86_sse_comineq_ss, 132250}, // __builtin_ia32_comineq - {Intrinsic::x86_sse2_comieq_sd, 133038}, // __builtin_ia32_comisdeq - {Intrinsic::x86_sse2_comige_sd, 133062}, // __builtin_ia32_comisdge - {Intrinsic::x86_sse2_comigt_sd, 133086}, // __builtin_ia32_comisdgt - {Intrinsic::x86_sse2_comile_sd, 133110}, // __builtin_ia32_comisdle - {Intrinsic::x86_sse2_comilt_sd, 133134}, // __builtin_ia32_comisdlt - {Intrinsic::x86_sse2_comineq_sd, 133158}, // __builtin_ia32_comisdneq - {Intrinsic::x86_avx512_mask_compress_pd_128, 96671}, // __builtin_ia32_compressdf128_mask - {Intrinsic::x86_avx512_mask_compress_pd_256, 96705}, // __builtin_ia32_compressdf256_mask - {Intrinsic::x86_avx512_mask_compress_pd_512, 96739}, // __builtin_ia32_compressdf512_mask - {Intrinsic::x86_avx512_mask_compress_q_128, 96875}, // __builtin_ia32_compressdi128_mask - {Intrinsic::x86_avx512_mask_compress_q_256, 96909}, // __builtin_ia32_compressdi256_mask - {Intrinsic::x86_avx512_mask_compress_q_512, 96943}, // __builtin_ia32_compressdi512_mask - {Intrinsic::x86_avx512_mask_compress_ps_128, 96773}, // __builtin_ia32_compresssf128_mask - {Intrinsic::x86_avx512_mask_compress_ps_256, 96807}, // __builtin_ia32_compresssf256_mask - {Intrinsic::x86_avx512_mask_compress_ps_512, 96841}, // __builtin_ia32_compresssf512_mask - {Intrinsic::x86_avx512_mask_compress_d_128, 96569}, // __builtin_ia32_compresssi128_mask - {Intrinsic::x86_avx512_mask_compress_d_256, 96603}, // __builtin_ia32_compresssi256_mask - {Intrinsic::x86_avx512_mask_compress_d_512, 96637}, // __builtin_ia32_compresssi512_mask - {Intrinsic::x86_avx512_mask_compress_store_pd_128, 97094}, // __builtin_ia32_compressstoredf128_mask - {Intrinsic::x86_avx512_mask_compress_store_pd_256, 97133}, // __builtin_ia32_compressstoredf256_mask - {Intrinsic::x86_avx512_mask_compress_store_pd_512, 97172}, // __builtin_ia32_compressstoredf512_mask - {Intrinsic::x86_avx512_mask_compress_store_q_128, 97328}, // __builtin_ia32_compressstoredi128_mask - {Intrinsic::x86_avx512_mask_compress_store_q_256, 97367}, // __builtin_ia32_compressstoredi256_mask - {Intrinsic::x86_avx512_mask_compress_store_q_512, 97406}, // __builtin_ia32_compressstoredi512_mask - {Intrinsic::x86_avx512_mask_compress_store_ps_128, 97211}, // __builtin_ia32_compressstoresf128_mask - {Intrinsic::x86_avx512_mask_compress_store_ps_256, 97250}, // __builtin_ia32_compressstoresf256_mask - {Intrinsic::x86_avx512_mask_compress_store_ps_512, 97289}, // __builtin_ia32_compressstoresf512_mask - {Intrinsic::x86_avx512_mask_compress_store_d_128, 96977}, // __builtin_ia32_compressstoresi128_mask - {Intrinsic::x86_avx512_mask_compress_store_d_256, 97016}, // __builtin_ia32_compressstoresi256_mask - {Intrinsic::x86_avx512_mask_compress_store_d_512, 97055}, // __builtin_ia32_compressstoresi512_mask - {Intrinsic::x86_sse42_crc32_64_64, 135515}, // __builtin_ia32_crc32di - {Intrinsic::x86_sse42_crc32_32_16, 135446}, // __builtin_ia32_crc32hi - {Intrinsic::x86_sse42_crc32_32_8, 135492}, // __builtin_ia32_crc32qi - {Intrinsic::x86_sse42_crc32_32_32, 135469}, // __builtin_ia32_crc32si - {Intrinsic::x86_avx512_cvtb2mask_128, 92885}, // __builtin_ia32_cvtb2mask128 - {Intrinsic::x86_avx512_cvtb2mask_256, 92913}, // __builtin_ia32_cvtb2mask256 - {Intrinsic::x86_avx512_cvtb2mask_512, 92941}, // __builtin_ia32_cvtb2mask512 - {Intrinsic::x86_avx512_cvtd2mask_128, 92969}, // __builtin_ia32_cvtd2mask128 - {Intrinsic::x86_avx512_cvtd2mask_256, 92997}, // __builtin_ia32_cvtd2mask256 - {Intrinsic::x86_avx512_cvtd2mask_512, 93025}, // __builtin_ia32_cvtd2mask512 - {Intrinsic::x86_avx512_mask_cvtdq2pd_128, 97667}, // __builtin_ia32_cvtdq2pd128_mask - {Intrinsic::x86_avx512_mask_cvtdq2pd_256, 97699}, // __builtin_ia32_cvtdq2pd256_mask - {Intrinsic::x86_avx512_mask_cvtdq2pd_512, 97731}, // __builtin_ia32_cvtdq2pd512_mask - {Intrinsic::x86_sse2_cvtdq2ps, 133183}, // __builtin_ia32_cvtdq2ps - {Intrinsic::x86_avx512_mask_cvtdq2ps_128, 97763}, // __builtin_ia32_cvtdq2ps128_mask - {Intrinsic::x86_avx_cvtdq2_ps_256, 88862}, // __builtin_ia32_cvtdq2ps256 - {Intrinsic::x86_avx512_mask_cvtdq2ps_256, 97795}, // __builtin_ia32_cvtdq2ps256_mask - {Intrinsic::x86_avx512_mask_cvtdq2ps_512, 97827}, // __builtin_ia32_cvtdq2ps512_mask - {Intrinsic::x86_avx512_cvtmask2b_128, 93053}, // __builtin_ia32_cvtmask2b128 - {Intrinsic::x86_avx512_cvtmask2b_256, 93081}, // __builtin_ia32_cvtmask2b256 - {Intrinsic::x86_avx512_cvtmask2b_512, 93109}, // __builtin_ia32_cvtmask2b512 - {Intrinsic::x86_avx512_cvtmask2d_128, 93137}, // __builtin_ia32_cvtmask2d128 - {Intrinsic::x86_avx512_cvtmask2d_256, 93165}, // __builtin_ia32_cvtmask2d256 - {Intrinsic::x86_avx512_cvtmask2d_512, 93193}, // __builtin_ia32_cvtmask2d512 - {Intrinsic::x86_avx512_cvtmask2q_128, 93221}, // __builtin_ia32_cvtmask2q128 - {Intrinsic::x86_avx512_cvtmask2q_256, 93249}, // __builtin_ia32_cvtmask2q256 - {Intrinsic::x86_avx512_cvtmask2q_512, 93277}, // __builtin_ia32_cvtmask2q512 - {Intrinsic::x86_avx512_cvtmask2w_128, 93305}, // __builtin_ia32_cvtmask2w128 - {Intrinsic::x86_avx512_cvtmask2w_256, 93333}, // __builtin_ia32_cvtmask2w256 - {Intrinsic::x86_avx512_cvtmask2w_512, 93361}, // __builtin_ia32_cvtmask2w512 - {Intrinsic::x86_sse2_cvtpd2dq, 133207}, // __builtin_ia32_cvtpd2dq - {Intrinsic::x86_avx512_mask_cvtpd2dq_128, 97859}, // __builtin_ia32_cvtpd2dq128_mask - {Intrinsic::x86_avx_cvt_pd2dq_256, 88808}, // __builtin_ia32_cvtpd2dq256 - {Intrinsic::x86_avx512_mask_cvtpd2dq_256, 97891}, // __builtin_ia32_cvtpd2dq256_mask - {Intrinsic::x86_avx512_mask_cvtpd2dq_512, 97923}, // __builtin_ia32_cvtpd2dq512_mask - {Intrinsic::x86_sse_cvtpd2pi, 132273}, // __builtin_ia32_cvtpd2pi - {Intrinsic::x86_sse2_cvtpd2ps, 133231}, // __builtin_ia32_cvtpd2ps - {Intrinsic::x86_avx_cvt_pd2_ps_256, 88781}, // __builtin_ia32_cvtpd2ps256 - {Intrinsic::x86_avx512_mask_cvtpd2ps_256, 97984}, // __builtin_ia32_cvtpd2ps256_mask - {Intrinsic::x86_avx512_mask_cvtpd2ps_512, 98016}, // __builtin_ia32_cvtpd2ps512_mask - {Intrinsic::x86_avx512_mask_cvtpd2ps, 97955}, // __builtin_ia32_cvtpd2ps_mask - {Intrinsic::x86_avx512_mask_cvtpd2qq_128, 98048}, // __builtin_ia32_cvtpd2qq128_mask - {Intrinsic::x86_avx512_mask_cvtpd2qq_256, 98080}, // __builtin_ia32_cvtpd2qq256_mask - {Intrinsic::x86_avx512_mask_cvtpd2qq_512, 98112}, // __builtin_ia32_cvtpd2qq512_mask - {Intrinsic::x86_avx512_mask_cvtpd2udq_128, 98144}, // __builtin_ia32_cvtpd2udq128_mask - {Intrinsic::x86_avx512_mask_cvtpd2udq_256, 98177}, // __builtin_ia32_cvtpd2udq256_mask - {Intrinsic::x86_avx512_mask_cvtpd2udq_512, 98210}, // __builtin_ia32_cvtpd2udq512_mask - {Intrinsic::x86_avx512_mask_cvtpd2uqq_128, 98243}, // __builtin_ia32_cvtpd2uqq128_mask - {Intrinsic::x86_avx512_mask_cvtpd2uqq_256, 98276}, // __builtin_ia32_cvtpd2uqq256_mask - {Intrinsic::x86_avx512_mask_cvtpd2uqq_512, 98309}, // __builtin_ia32_cvtpd2uqq512_mask - {Intrinsic::x86_sse_cvtpi2pd, 132297}, // __builtin_ia32_cvtpi2pd - {Intrinsic::x86_sse_cvtpi2ps, 132321}, // __builtin_ia32_cvtpi2ps - {Intrinsic::x86_sse2_cvtps2dq, 133255}, // __builtin_ia32_cvtps2dq - {Intrinsic::x86_avx512_mask_cvtps2dq_128, 98342}, // __builtin_ia32_cvtps2dq128_mask - {Intrinsic::x86_avx_cvt_ps2dq_256, 88835}, // __builtin_ia32_cvtps2dq256 - {Intrinsic::x86_avx512_mask_cvtps2dq_256, 98374}, // __builtin_ia32_cvtps2dq256_mask - {Intrinsic::x86_avx512_mask_cvtps2dq_512, 98406}, // __builtin_ia32_cvtps2dq512_mask - {Intrinsic::x86_avx512_mask_cvtps2pd_128, 98438}, // __builtin_ia32_cvtps2pd128_mask - {Intrinsic::x86_avx512_mask_cvtps2pd_256, 98470}, // __builtin_ia32_cvtps2pd256_mask - {Intrinsic::x86_avx512_mask_cvtps2pd_512, 98502}, // __builtin_ia32_cvtps2pd512_mask - {Intrinsic::x86_sse_cvtps2pi, 132345}, // __builtin_ia32_cvtps2pi - {Intrinsic::x86_avx512_mask_cvtps2qq_128, 98534}, // __builtin_ia32_cvtps2qq128_mask - {Intrinsic::x86_avx512_mask_cvtps2qq_256, 98566}, // __builtin_ia32_cvtps2qq256_mask - {Intrinsic::x86_avx512_mask_cvtps2qq_512, 98598}, // __builtin_ia32_cvtps2qq512_mask - {Intrinsic::x86_avx512_mask_cvtps2udq_128, 98630}, // __builtin_ia32_cvtps2udq128_mask - {Intrinsic::x86_avx512_mask_cvtps2udq_256, 98663}, // __builtin_ia32_cvtps2udq256_mask - {Intrinsic::x86_avx512_mask_cvtps2udq_512, 98696}, // __builtin_ia32_cvtps2udq512_mask - {Intrinsic::x86_avx512_mask_cvtps2uqq_128, 98729}, // __builtin_ia32_cvtps2uqq128_mask - {Intrinsic::x86_avx512_mask_cvtps2uqq_256, 98762}, // __builtin_ia32_cvtps2uqq256_mask - {Intrinsic::x86_avx512_mask_cvtps2uqq_512, 98795}, // __builtin_ia32_cvtps2uqq512_mask - {Intrinsic::x86_avx512_cvtq2mask_128, 93389}, // __builtin_ia32_cvtq2mask128 - {Intrinsic::x86_avx512_cvtq2mask_256, 93417}, // __builtin_ia32_cvtq2mask256 - {Intrinsic::x86_avx512_cvtq2mask_512, 93445}, // __builtin_ia32_cvtq2mask512 - {Intrinsic::x86_avx512_mask_cvtqq2pd_128, 98828}, // __builtin_ia32_cvtqq2pd128_mask - {Intrinsic::x86_avx512_mask_cvtqq2pd_256, 98860}, // __builtin_ia32_cvtqq2pd256_mask - {Intrinsic::x86_avx512_mask_cvtqq2pd_512, 98892}, // __builtin_ia32_cvtqq2pd512_mask - {Intrinsic::x86_avx512_mask_cvtqq2ps_128, 98924}, // __builtin_ia32_cvtqq2ps128_mask - {Intrinsic::x86_avx512_mask_cvtqq2ps_256, 98956}, // __builtin_ia32_cvtqq2ps256_mask - {Intrinsic::x86_avx512_mask_cvtqq2ps_512, 98988}, // __builtin_ia32_cvtqq2ps512_mask - {Intrinsic::x86_sse2_cvtsd2si, 133279}, // __builtin_ia32_cvtsd2si - {Intrinsic::x86_sse2_cvtsd2si64, 133303}, // __builtin_ia32_cvtsd2si64 - {Intrinsic::x86_sse2_cvtsd2ss, 133329}, // __builtin_ia32_cvtsd2ss - {Intrinsic::x86_avx512_mask_cvtsd2ss_round, 99020}, // __builtin_ia32_cvtsd2ss_round_mask - {Intrinsic::x86_sse2_cvtsi2sd, 133353}, // __builtin_ia32_cvtsi2sd - {Intrinsic::x86_avx512_cvtsi2sd32, 93473}, // __builtin_ia32_cvtsi2sd32 - {Intrinsic::x86_avx512_cvtsi2sd64, 93499}, // __builtin_ia32_cvtsi2sd64 - {Intrinsic::x86_sse_cvtsi2ss, 132369}, // __builtin_ia32_cvtsi2ss - {Intrinsic::x86_avx512_cvtsi2ss32, 93525}, // __builtin_ia32_cvtsi2ss32 - {Intrinsic::x86_avx512_cvtsi2ss64, 93551}, // __builtin_ia32_cvtsi2ss64 - {Intrinsic::x86_sse2_cvtsi642sd, 133377}, // __builtin_ia32_cvtsi642sd - {Intrinsic::x86_sse_cvtsi642ss, 132393}, // __builtin_ia32_cvtsi642ss - {Intrinsic::x86_sse2_cvtss2sd, 133403}, // __builtin_ia32_cvtss2sd - {Intrinsic::x86_avx512_mask_cvtss2sd_round, 99055}, // __builtin_ia32_cvtss2sd_round_mask - {Intrinsic::x86_sse_cvtss2si, 132419}, // __builtin_ia32_cvtss2si - {Intrinsic::x86_sse_cvtss2si64, 132443}, // __builtin_ia32_cvtss2si64 - {Intrinsic::x86_sse2_cvttpd2dq, 133427}, // __builtin_ia32_cvttpd2dq - {Intrinsic::x86_avx512_mask_cvttpd2dq_128, 99090}, // __builtin_ia32_cvttpd2dq128_mask - {Intrinsic::x86_avx_cvtt_pd2dq_256, 88889}, // __builtin_ia32_cvttpd2dq256 - {Intrinsic::x86_avx512_mask_cvttpd2dq_256, 99123}, // __builtin_ia32_cvttpd2dq256_mask - {Intrinsic::x86_avx512_mask_cvttpd2dq_512, 99156}, // __builtin_ia32_cvttpd2dq512_mask - {Intrinsic::x86_sse_cvttpd2pi, 132469}, // __builtin_ia32_cvttpd2pi - {Intrinsic::x86_avx512_mask_cvttpd2qq_128, 99189}, // __builtin_ia32_cvttpd2qq128_mask - {Intrinsic::x86_avx512_mask_cvttpd2qq_256, 99222}, // __builtin_ia32_cvttpd2qq256_mask - {Intrinsic::x86_avx512_mask_cvttpd2qq_512, 99255}, // __builtin_ia32_cvttpd2qq512_mask - {Intrinsic::x86_avx512_mask_cvttpd2udq_128, 99288}, // __builtin_ia32_cvttpd2udq128_mask - {Intrinsic::x86_avx512_mask_cvttpd2udq_256, 99322}, // __builtin_ia32_cvttpd2udq256_mask - {Intrinsic::x86_avx512_mask_cvttpd2udq_512, 99356}, // __builtin_ia32_cvttpd2udq512_mask - {Intrinsic::x86_avx512_mask_cvttpd2uqq_128, 99390}, // __builtin_ia32_cvttpd2uqq128_mask - {Intrinsic::x86_avx512_mask_cvttpd2uqq_256, 99424}, // __builtin_ia32_cvttpd2uqq256_mask - {Intrinsic::x86_avx512_mask_cvttpd2uqq_512, 99458}, // __builtin_ia32_cvttpd2uqq512_mask - {Intrinsic::x86_sse2_cvttps2dq, 133452}, // __builtin_ia32_cvttps2dq - {Intrinsic::x86_avx512_mask_cvttps2dq_128, 99492}, // __builtin_ia32_cvttps2dq128_mask - {Intrinsic::x86_avx_cvtt_ps2dq_256, 88917}, // __builtin_ia32_cvttps2dq256 - {Intrinsic::x86_avx512_mask_cvttps2dq_256, 99525}, // __builtin_ia32_cvttps2dq256_mask - {Intrinsic::x86_avx512_mask_cvttps2dq_512, 99558}, // __builtin_ia32_cvttps2dq512_mask - {Intrinsic::x86_sse_cvttps2pi, 132494}, // __builtin_ia32_cvttps2pi - {Intrinsic::x86_avx512_mask_cvttps2qq_128, 99591}, // __builtin_ia32_cvttps2qq128_mask - {Intrinsic::x86_avx512_mask_cvttps2qq_256, 99624}, // __builtin_ia32_cvttps2qq256_mask - {Intrinsic::x86_avx512_mask_cvttps2qq_512, 99657}, // __builtin_ia32_cvttps2qq512_mask - {Intrinsic::x86_avx512_mask_cvttps2udq_128, 99690}, // __builtin_ia32_cvttps2udq128_mask - {Intrinsic::x86_avx512_mask_cvttps2udq_256, 99724}, // __builtin_ia32_cvttps2udq256_mask - {Intrinsic::x86_avx512_mask_cvttps2udq_512, 99758}, // __builtin_ia32_cvttps2udq512_mask - {Intrinsic::x86_avx512_mask_cvttps2uqq_128, 99792}, // __builtin_ia32_cvttps2uqq128_mask - {Intrinsic::x86_avx512_mask_cvttps2uqq_256, 99826}, // __builtin_ia32_cvttps2uqq256_mask - {Intrinsic::x86_avx512_mask_cvttps2uqq_512, 99860}, // __builtin_ia32_cvttps2uqq512_mask - {Intrinsic::x86_sse2_cvttsd2si, 133477}, // __builtin_ia32_cvttsd2si - {Intrinsic::x86_sse2_cvttsd2si64, 133502}, // __builtin_ia32_cvttsd2si64 - {Intrinsic::x86_sse_cvttss2si, 132519}, // __builtin_ia32_cvttss2si - {Intrinsic::x86_sse_cvttss2si64, 132544}, // __builtin_ia32_cvttss2si64 - {Intrinsic::x86_avx512_mask_cvtudq2pd_128, 99894}, // __builtin_ia32_cvtudq2pd128_mask - {Intrinsic::x86_avx512_mask_cvtudq2pd_256, 99927}, // __builtin_ia32_cvtudq2pd256_mask - {Intrinsic::x86_avx512_mask_cvtudq2pd_512, 99960}, // __builtin_ia32_cvtudq2pd512_mask - {Intrinsic::x86_avx512_mask_cvtudq2ps_128, 99993}, // __builtin_ia32_cvtudq2ps128_mask - {Intrinsic::x86_avx512_mask_cvtudq2ps_256, 100026}, // __builtin_ia32_cvtudq2ps256_mask - {Intrinsic::x86_avx512_mask_cvtudq2ps_512, 100059}, // __builtin_ia32_cvtudq2ps512_mask - {Intrinsic::x86_avx512_mask_cvtuqq2pd_128, 100092}, // __builtin_ia32_cvtuqq2pd128_mask - {Intrinsic::x86_avx512_mask_cvtuqq2pd_256, 100125}, // __builtin_ia32_cvtuqq2pd256_mask - {Intrinsic::x86_avx512_mask_cvtuqq2pd_512, 100158}, // __builtin_ia32_cvtuqq2pd512_mask - {Intrinsic::x86_avx512_mask_cvtuqq2ps_128, 100191}, // __builtin_ia32_cvtuqq2ps128_mask - {Intrinsic::x86_avx512_mask_cvtuqq2ps_256, 100224}, // __builtin_ia32_cvtuqq2ps256_mask - {Intrinsic::x86_avx512_mask_cvtuqq2ps_512, 100257}, // __builtin_ia32_cvtuqq2ps512_mask - {Intrinsic::x86_avx512_cvtusi2sd, 93805}, // __builtin_ia32_cvtusi2sd32 - {Intrinsic::x86_avx512_cvtusi642sd, 93859}, // __builtin_ia32_cvtusi2sd64 - {Intrinsic::x86_avx512_cvtusi2ss, 93832}, // __builtin_ia32_cvtusi2ss32 - {Intrinsic::x86_avx512_cvtusi642ss, 93886}, // __builtin_ia32_cvtusi2ss64 - {Intrinsic::x86_avx512_cvtw2mask_128, 93913}, // __builtin_ia32_cvtw2mask128 - {Intrinsic::x86_avx512_cvtw2mask_256, 93941}, // __builtin_ia32_cvtw2mask256 - {Intrinsic::x86_avx512_cvtw2mask_512, 93969}, // __builtin_ia32_cvtw2mask512 - {Intrinsic::x86_avx512_mask_dbpsadbw_128, 100290}, // __builtin_ia32_dbpsadbw128_mask - {Intrinsic::x86_avx512_mask_dbpsadbw_256, 100322}, // __builtin_ia32_dbpsadbw256_mask - {Intrinsic::x86_avx512_mask_dbpsadbw_512, 100354}, // __builtin_ia32_dbpsadbw512_mask - {Intrinsic::x86_avx512_mask_div_pd_256, 100412}, // __builtin_ia32_divpd256_mask - {Intrinsic::x86_avx512_mask_div_pd_512, 100441}, // __builtin_ia32_divpd512_mask - {Intrinsic::x86_avx512_mask_div_pd_128, 100386}, // __builtin_ia32_divpd_mask - {Intrinsic::x86_avx512_mask_div_ps_256, 100496}, // __builtin_ia32_divps256_mask - {Intrinsic::x86_avx512_mask_div_ps_512, 100525}, // __builtin_ia32_divps512_mask - {Intrinsic::x86_avx512_mask_div_ps_128, 100470}, // __builtin_ia32_divps_mask - {Intrinsic::x86_avx512_mask_div_sd_round, 100554}, // __builtin_ia32_divsd_round_mask - {Intrinsic::x86_avx512_mask_div_ss_round, 100586}, // __builtin_ia32_divss_round_mask - {Intrinsic::x86_sse41_dppd, 135052}, // __builtin_ia32_dppd - {Intrinsic::x86_sse41_dpps, 135072}, // __builtin_ia32_dpps - {Intrinsic::x86_avx_dp_ps_256, 88945}, // __builtin_ia32_dpps256 - {Intrinsic::x86_mmx_emms, 130091}, // __builtin_ia32_emms - {Intrinsic::x86_avx512_exp2_pd, 93997}, // __builtin_ia32_exp2pd_mask - {Intrinsic::x86_avx512_exp2_ps, 94024}, // __builtin_ia32_exp2ps_mask - {Intrinsic::x86_avx512_mask_expand_pd_128, 101146}, // __builtin_ia32_expanddf128_mask - {Intrinsic::x86_avx512_mask_expand_pd_256, 101178}, // __builtin_ia32_expanddf256_mask - {Intrinsic::x86_avx512_mask_expand_pd_512, 101210}, // __builtin_ia32_expanddf512_mask - {Intrinsic::x86_avx512_mask_expand_q_128, 101338}, // __builtin_ia32_expanddi128_mask - {Intrinsic::x86_avx512_mask_expand_q_256, 101370}, // __builtin_ia32_expanddi256_mask - {Intrinsic::x86_avx512_mask_expand_q_512, 101402}, // __builtin_ia32_expanddi512_mask - {Intrinsic::x86_avx512_mask_expand_load_pd_128, 100822}, // __builtin_ia32_expandloaddf128_mask - {Intrinsic::x86_avx512_mask_expand_load_pd_256, 100858}, // __builtin_ia32_expandloaddf256_mask - {Intrinsic::x86_avx512_mask_expand_load_pd_512, 100894}, // __builtin_ia32_expandloaddf512_mask - {Intrinsic::x86_avx512_mask_expand_load_q_128, 101038}, // __builtin_ia32_expandloaddi128_mask - {Intrinsic::x86_avx512_mask_expand_load_q_256, 101074}, // __builtin_ia32_expandloaddi256_mask - {Intrinsic::x86_avx512_mask_expand_load_q_512, 101110}, // __builtin_ia32_expandloaddi512_mask - {Intrinsic::x86_avx512_mask_expand_load_ps_128, 100930}, // __builtin_ia32_expandloadsf128_mask - {Intrinsic::x86_avx512_mask_expand_load_ps_256, 100966}, // __builtin_ia32_expandloadsf256_mask - {Intrinsic::x86_avx512_mask_expand_load_ps_512, 101002}, // __builtin_ia32_expandloadsf512_mask - {Intrinsic::x86_avx512_mask_expand_load_d_128, 100714}, // __builtin_ia32_expandloadsi128_mask - {Intrinsic::x86_avx512_mask_expand_load_d_256, 100750}, // __builtin_ia32_expandloadsi256_mask - {Intrinsic::x86_avx512_mask_expand_load_d_512, 100786}, // __builtin_ia32_expandloadsi512_mask - {Intrinsic::x86_avx512_mask_expand_ps_128, 101242}, // __builtin_ia32_expandsf128_mask - {Intrinsic::x86_avx512_mask_expand_ps_256, 101274}, // __builtin_ia32_expandsf256_mask - {Intrinsic::x86_avx512_mask_expand_ps_512, 101306}, // __builtin_ia32_expandsf512_mask - {Intrinsic::x86_avx512_mask_expand_d_128, 100618}, // __builtin_ia32_expandsi128_mask - {Intrinsic::x86_avx512_mask_expand_d_256, 100650}, // __builtin_ia32_expandsi256_mask - {Intrinsic::x86_avx512_mask_expand_d_512, 100682}, // __builtin_ia32_expandsi512_mask - {Intrinsic::x86_avx512_mask_vextractf32x4_256, 120022}, // __builtin_ia32_extractf32x4_256_mask - {Intrinsic::x86_avx512_mask_vextractf32x4_512, 120059}, // __builtin_ia32_extractf32x4_mask - {Intrinsic::x86_avx512_mask_vextractf32x8_512, 120092}, // __builtin_ia32_extractf32x8_mask - {Intrinsic::x86_avx512_mask_vextractf64x2_256, 120125}, // __builtin_ia32_extractf64x2_256_mask - {Intrinsic::x86_avx512_mask_vextractf64x2_512, 120162}, // __builtin_ia32_extractf64x2_512_mask - {Intrinsic::x86_avx512_mask_vextractf64x4_512, 120199}, // __builtin_ia32_extractf64x4_mask - {Intrinsic::x86_avx512_mask_vextracti32x4_256, 120232}, // __builtin_ia32_extracti32x4_256_mask - {Intrinsic::x86_avx512_mask_vextracti32x4_512, 120269}, // __builtin_ia32_extracti32x4_mask - {Intrinsic::x86_avx512_mask_vextracti32x8_512, 120302}, // __builtin_ia32_extracti32x8_mask - {Intrinsic::x86_avx512_mask_vextracti64x2_256, 120335}, // __builtin_ia32_extracti64x2_256_mask - {Intrinsic::x86_avx512_mask_vextracti64x2_512, 120372}, // __builtin_ia32_extracti64x2_512_mask - {Intrinsic::x86_avx512_mask_vextracti64x4_512, 120409}, // __builtin_ia32_extracti64x4_mask - {Intrinsic::x86_sse4a_extrq, 135940}, // __builtin_ia32_extrq - {Intrinsic::x86_sse4a_extrqi, 135961}, // __builtin_ia32_extrqi - {Intrinsic::x86_mmx_femms, 130111}, // __builtin_ia32_femms - {Intrinsic::x86_avx512_mask_fixupimm_pd_128, 101434}, // __builtin_ia32_fixupimmpd128_mask - {Intrinsic::x86_avx512_maskz_fixupimm_pd_128, 124272}, // __builtin_ia32_fixupimmpd128_maskz - {Intrinsic::x86_avx512_mask_fixupimm_pd_256, 101468}, // __builtin_ia32_fixupimmpd256_mask - {Intrinsic::x86_avx512_maskz_fixupimm_pd_256, 124307}, // __builtin_ia32_fixupimmpd256_maskz - {Intrinsic::x86_avx512_mask_fixupimm_pd_512, 101502}, // __builtin_ia32_fixupimmpd512_mask - {Intrinsic::x86_avx512_maskz_fixupimm_pd_512, 124342}, // __builtin_ia32_fixupimmpd512_maskz - {Intrinsic::x86_avx512_mask_fixupimm_ps_128, 101536}, // __builtin_ia32_fixupimmps128_mask - {Intrinsic::x86_avx512_maskz_fixupimm_ps_128, 124377}, // __builtin_ia32_fixupimmps128_maskz - {Intrinsic::x86_avx512_mask_fixupimm_ps_256, 101570}, // __builtin_ia32_fixupimmps256_mask - {Intrinsic::x86_avx512_maskz_fixupimm_ps_256, 124412}, // __builtin_ia32_fixupimmps256_maskz - {Intrinsic::x86_avx512_mask_fixupimm_ps_512, 101604}, // __builtin_ia32_fixupimmps512_mask - {Intrinsic::x86_avx512_maskz_fixupimm_ps_512, 124447}, // __builtin_ia32_fixupimmps512_maskz - {Intrinsic::x86_avx512_mask_fixupimm_sd, 101638}, // __builtin_ia32_fixupimmsd_mask - {Intrinsic::x86_avx512_maskz_fixupimm_sd, 124482}, // __builtin_ia32_fixupimmsd_maskz - {Intrinsic::x86_avx512_mask_fixupimm_ss, 101669}, // __builtin_ia32_fixupimmss_mask - {Intrinsic::x86_avx512_maskz_fixupimm_ss, 124514}, // __builtin_ia32_fixupimmss_maskz - {Intrinsic::x86_avx512_mask_fpclass_pd_128, 101700}, // __builtin_ia32_fpclasspd128_mask - {Intrinsic::x86_avx512_mask_fpclass_pd_256, 101733}, // __builtin_ia32_fpclasspd256_mask - {Intrinsic::x86_avx512_mask_fpclass_pd_512, 101766}, // __builtin_ia32_fpclasspd512_mask - {Intrinsic::x86_avx512_mask_fpclass_ps_128, 101799}, // __builtin_ia32_fpclassps128_mask - {Intrinsic::x86_avx512_mask_fpclass_ps_256, 101832}, // __builtin_ia32_fpclassps256_mask - {Intrinsic::x86_avx512_mask_fpclass_ps_512, 101865}, // __builtin_ia32_fpclassps512_mask - {Intrinsic::x86_avx512_mask_fpclass_sd, 101898}, // __builtin_ia32_fpclasssd_mask - {Intrinsic::x86_avx512_mask_fpclass_ss, 101928}, // __builtin_ia32_fpclassss_mask - {Intrinsic::x86_fxrstor, 129997}, // __builtin_ia32_fxrstor - {Intrinsic::x86_fxrstor64, 130020}, // __builtin_ia32_fxrstor64 - {Intrinsic::x86_fxsave, 130045}, // __builtin_ia32_fxsave - {Intrinsic::x86_fxsave64, 130067}, // __builtin_ia32_fxsave64 - {Intrinsic::x86_avx512_gather3div2_df, 94279}, // __builtin_ia32_gather3div2df - {Intrinsic::x86_avx512_gather3div2_di, 94308}, // __builtin_ia32_gather3div2di - {Intrinsic::x86_avx512_gather3div4_df, 94337}, // __builtin_ia32_gather3div4df - {Intrinsic::x86_avx512_gather3div4_di, 94366}, // __builtin_ia32_gather3div4di - {Intrinsic::x86_avx512_gather3div4_sf, 94395}, // __builtin_ia32_gather3div4sf - {Intrinsic::x86_avx512_gather3div4_si, 94424}, // __builtin_ia32_gather3div4si - {Intrinsic::x86_avx512_gather3div8_sf, 94453}, // __builtin_ia32_gather3div8sf - {Intrinsic::x86_avx512_gather3div8_si, 94482}, // __builtin_ia32_gather3div8si - {Intrinsic::x86_avx512_gather3siv2_df, 94511}, // __builtin_ia32_gather3siv2df - {Intrinsic::x86_avx512_gather3siv2_di, 94540}, // __builtin_ia32_gather3siv2di - {Intrinsic::x86_avx512_gather3siv4_df, 94569}, // __builtin_ia32_gather3siv4df - {Intrinsic::x86_avx512_gather3siv4_di, 94598}, // __builtin_ia32_gather3siv4di - {Intrinsic::x86_avx512_gather3siv4_sf, 94627}, // __builtin_ia32_gather3siv4sf - {Intrinsic::x86_avx512_gather3siv4_si, 94656}, // __builtin_ia32_gather3siv4si - {Intrinsic::x86_avx512_gather3siv8_sf, 94685}, // __builtin_ia32_gather3siv8sf - {Intrinsic::x86_avx512_gather3siv8_si, 94714}, // __builtin_ia32_gather3siv8si - {Intrinsic::x86_avx2_gather_d_d, 90345}, // __builtin_ia32_gatherd_d - {Intrinsic::x86_avx2_gather_d_d_256, 90370}, // __builtin_ia32_gatherd_d256 - {Intrinsic::x86_avx2_gather_d_pd, 90398}, // __builtin_ia32_gatherd_pd - {Intrinsic::x86_avx2_gather_d_pd_256, 90424}, // __builtin_ia32_gatherd_pd256 - {Intrinsic::x86_avx2_gather_d_ps, 90453}, // __builtin_ia32_gatherd_ps - {Intrinsic::x86_avx2_gather_d_ps_256, 90479}, // __builtin_ia32_gatherd_ps256 - {Intrinsic::x86_avx2_gather_d_q, 90508}, // __builtin_ia32_gatherd_q - {Intrinsic::x86_avx2_gather_d_q_256, 90533}, // __builtin_ia32_gatherd_q256 - {Intrinsic::x86_avx512_gather_qps_512, 94250}, // __builtin_ia32_gatherdiv16sf - {Intrinsic::x86_avx512_gather_qpi_512, 94193}, // __builtin_ia32_gatherdiv16si - {Intrinsic::x86_avx512_gather_qpd_512, 94165}, // __builtin_ia32_gatherdiv8df - {Intrinsic::x86_avx512_gather_qpq_512, 94222}, // __builtin_ia32_gatherdiv8di - {Intrinsic::x86_avx512_gatherpf_dpd_512, 94743}, // __builtin_ia32_gatherpfdpd - {Intrinsic::x86_avx512_gatherpf_dps_512, 94770}, // __builtin_ia32_gatherpfdps - {Intrinsic::x86_avx512_gatherpf_qpd_512, 94797}, // __builtin_ia32_gatherpfqpd - {Intrinsic::x86_avx512_gatherpf_qps_512, 94824}, // __builtin_ia32_gatherpfqps - {Intrinsic::x86_avx2_gather_q_d, 90561}, // __builtin_ia32_gatherq_d - {Intrinsic::x86_avx2_gather_q_d_256, 90586}, // __builtin_ia32_gatherq_d256 - {Intrinsic::x86_avx2_gather_q_pd, 90614}, // __builtin_ia32_gatherq_pd - {Intrinsic::x86_avx2_gather_q_pd_256, 90640}, // __builtin_ia32_gatherq_pd256 - {Intrinsic::x86_avx2_gather_q_ps, 90669}, // __builtin_ia32_gatherq_ps - {Intrinsic::x86_avx2_gather_q_ps_256, 90695}, // __builtin_ia32_gatherq_ps256 - {Intrinsic::x86_avx2_gather_q_q, 90724}, // __builtin_ia32_gatherq_q - {Intrinsic::x86_avx2_gather_q_q_256, 90749}, // __builtin_ia32_gatherq_q256 - {Intrinsic::x86_avx512_gather_dps_512, 94136}, // __builtin_ia32_gathersiv16sf - {Intrinsic::x86_avx512_gather_dpi_512, 94079}, // __builtin_ia32_gathersiv16si - {Intrinsic::x86_avx512_gather_dpd_512, 94051}, // __builtin_ia32_gathersiv8df - {Intrinsic::x86_avx512_gather_dpq_512, 94108}, // __builtin_ia32_gathersiv8di - {Intrinsic::x86_avx512_mask_getexp_pd_128, 101958}, // __builtin_ia32_getexppd128_mask - {Intrinsic::x86_avx512_mask_getexp_pd_256, 101990}, // __builtin_ia32_getexppd256_mask - {Intrinsic::x86_avx512_mask_getexp_pd_512, 102022}, // __builtin_ia32_getexppd512_mask - {Intrinsic::x86_avx512_mask_getexp_ps_128, 102054}, // __builtin_ia32_getexpps128_mask - {Intrinsic::x86_avx512_mask_getexp_ps_256, 102086}, // __builtin_ia32_getexpps256_mask - {Intrinsic::x86_avx512_mask_getexp_ps_512, 102118}, // __builtin_ia32_getexpps512_mask - {Intrinsic::x86_avx512_mask_getexp_sd, 102150}, // __builtin_ia32_getexpsd128_round_mask - {Intrinsic::x86_avx512_mask_getexp_ss, 102188}, // __builtin_ia32_getexpss128_round_mask - {Intrinsic::x86_avx512_mask_getmant_pd_128, 102226}, // __builtin_ia32_getmantpd128_mask - {Intrinsic::x86_avx512_mask_getmant_pd_256, 102259}, // __builtin_ia32_getmantpd256_mask - {Intrinsic::x86_avx512_mask_getmant_pd_512, 102292}, // __builtin_ia32_getmantpd512_mask - {Intrinsic::x86_avx512_mask_getmant_ps_128, 102325}, // __builtin_ia32_getmantps128_mask - {Intrinsic::x86_avx512_mask_getmant_ps_256, 102358}, // __builtin_ia32_getmantps256_mask - {Intrinsic::x86_avx512_mask_getmant_ps_512, 102391}, // __builtin_ia32_getmantps512_mask - {Intrinsic::x86_avx512_mask_getmant_sd, 102424}, // __builtin_ia32_getmantsd_round_mask - {Intrinsic::x86_avx512_mask_getmant_ss, 102460}, // __builtin_ia32_getmantss_round_mask - {Intrinsic::x86_sse3_hadd_pd, 134851}, // __builtin_ia32_haddpd - {Intrinsic::x86_avx_hadd_pd_256, 88968}, // __builtin_ia32_haddpd256 - {Intrinsic::x86_sse3_hadd_ps, 134873}, // __builtin_ia32_haddps - {Intrinsic::x86_avx_hadd_ps_256, 88993}, // __builtin_ia32_haddps256 - {Intrinsic::x86_sse3_hsub_pd, 134895}, // __builtin_ia32_hsubpd - {Intrinsic::x86_avx_hsub_pd_256, 89018}, // __builtin_ia32_hsubpd256 - {Intrinsic::x86_sse3_hsub_ps, 134917}, // __builtin_ia32_hsubps - {Intrinsic::x86_avx_hsub_ps_256, 89043}, // __builtin_ia32_hsubps256 - {Intrinsic::x86_avx512_mask_insertf32x4_256, 102496}, // __builtin_ia32_insertf32x4_256_mask - {Intrinsic::x86_avx512_mask_insertf32x4_512, 102532}, // __builtin_ia32_insertf32x4_mask - {Intrinsic::x86_avx512_mask_insertf32x8_512, 102564}, // __builtin_ia32_insertf32x8_mask - {Intrinsic::x86_avx512_mask_insertf64x2_256, 102596}, // __builtin_ia32_insertf64x2_256_mask - {Intrinsic::x86_avx512_mask_insertf64x2_512, 102632}, // __builtin_ia32_insertf64x2_512_mask - {Intrinsic::x86_avx512_mask_insertf64x4_512, 102668}, // __builtin_ia32_insertf64x4_mask - {Intrinsic::x86_avx512_mask_inserti32x4_256, 102700}, // __builtin_ia32_inserti32x4_256_mask - {Intrinsic::x86_avx512_mask_inserti32x4_512, 102736}, // __builtin_ia32_inserti32x4_mask - {Intrinsic::x86_avx512_mask_inserti32x8_512, 102768}, // __builtin_ia32_inserti32x8_mask - {Intrinsic::x86_avx512_mask_inserti64x2_256, 102800}, // __builtin_ia32_inserti64x2_256_mask - {Intrinsic::x86_avx512_mask_inserti64x2_512, 102836}, // __builtin_ia32_inserti64x2_512_mask - {Intrinsic::x86_avx512_mask_inserti64x4_512, 102872}, // __builtin_ia32_inserti64x4_mask - {Intrinsic::x86_sse41_insertps, 135092}, // __builtin_ia32_insertps128 - {Intrinsic::x86_sse4a_insertq, 135983}, // __builtin_ia32_insertq - {Intrinsic::x86_sse4a_insertqi, 136006}, // __builtin_ia32_insertqi - {Intrinsic::x86_avx512_kand_w, 94851}, // __builtin_ia32_kandhi - {Intrinsic::x86_avx512_kandn_w, 94873}, // __builtin_ia32_kandnhi - {Intrinsic::x86_avx512_knot_w, 94896}, // __builtin_ia32_knothi - {Intrinsic::x86_avx512_kor_w, 94918}, // __builtin_ia32_korhi - {Intrinsic::x86_avx512_kortestc_w, 94939}, // __builtin_ia32_kortestchi - {Intrinsic::x86_avx512_kortestz_w, 94965}, // __builtin_ia32_kortestzhi - {Intrinsic::x86_avx512_kunpck_dq, 95015}, // __builtin_ia32_kunpckdi - {Intrinsic::x86_avx512_kunpck_bw, 94991}, // __builtin_ia32_kunpckhi - {Intrinsic::x86_avx512_kunpck_wd, 95039}, // __builtin_ia32_kunpcksi - {Intrinsic::x86_avx512_kxnor_w, 95063}, // __builtin_ia32_kxnorhi - {Intrinsic::x86_avx512_kxor_w, 95086}, // __builtin_ia32_kxorhi - {Intrinsic::x86_sse3_ldu_dq, 134939}, // __builtin_ia32_lddqu - {Intrinsic::x86_avx_ldu_dq_256, 89068}, // __builtin_ia32_lddqu256 - {Intrinsic::x86_sse2_lfence, 133529}, // __builtin_ia32_lfence - {Intrinsic::x86_avx2_maskload_d, 90777}, // __builtin_ia32_maskloadd - {Intrinsic::x86_avx2_maskload_d_256, 90802}, // __builtin_ia32_maskloadd256 - {Intrinsic::x86_avx_maskload_pd, 89092}, // __builtin_ia32_maskloadpd - {Intrinsic::x86_avx_maskload_pd_256, 89118}, // __builtin_ia32_maskloadpd256 - {Intrinsic::x86_avx_maskload_ps, 89147}, // __builtin_ia32_maskloadps - {Intrinsic::x86_avx_maskload_ps_256, 89173}, // __builtin_ia32_maskloadps256 - {Intrinsic::x86_avx2_maskload_q, 90830}, // __builtin_ia32_maskloadq - {Intrinsic::x86_avx2_maskload_q_256, 90855}, // __builtin_ia32_maskloadq256 - {Intrinsic::x86_sse2_maskmov_dqu, 133551}, // __builtin_ia32_maskmovdqu - {Intrinsic::x86_mmx_maskmovq, 130132}, // __builtin_ia32_maskmovq - {Intrinsic::x86_avx2_maskstore_d, 90883}, // __builtin_ia32_maskstored - {Intrinsic::x86_avx2_maskstore_d_256, 90909}, // __builtin_ia32_maskstored256 - {Intrinsic::x86_avx_maskstore_pd, 89202}, // __builtin_ia32_maskstorepd - {Intrinsic::x86_avx_maskstore_pd_256, 89229}, // __builtin_ia32_maskstorepd256 - {Intrinsic::x86_avx_maskstore_ps, 89259}, // __builtin_ia32_maskstoreps - {Intrinsic::x86_avx_maskstore_ps_256, 89286}, // __builtin_ia32_maskstoreps256 - {Intrinsic::x86_avx2_maskstore_q, 90938}, // __builtin_ia32_maskstoreq - {Intrinsic::x86_avx2_maskstore_q_256, 90964}, // __builtin_ia32_maskstoreq256 - {Intrinsic::x86_sse2_max_pd, 133577}, // __builtin_ia32_maxpd - {Intrinsic::x86_avx_max_pd_256, 89316}, // __builtin_ia32_maxpd256 - {Intrinsic::x86_avx512_mask_max_pd_256, 102930}, // __builtin_ia32_maxpd256_mask - {Intrinsic::x86_avx512_mask_max_pd_512, 102959}, // __builtin_ia32_maxpd512_mask - {Intrinsic::x86_avx512_mask_max_pd_128, 102904}, // __builtin_ia32_maxpd_mask - {Intrinsic::x86_sse_max_ps, 132571}, // __builtin_ia32_maxps - {Intrinsic::x86_avx_max_ps_256, 89340}, // __builtin_ia32_maxps256 - {Intrinsic::x86_avx512_mask_max_ps_256, 103014}, // __builtin_ia32_maxps256_mask - {Intrinsic::x86_avx512_mask_max_ps_512, 103043}, // __builtin_ia32_maxps512_mask - {Intrinsic::x86_avx512_mask_max_ps_128, 102988}, // __builtin_ia32_maxps_mask - {Intrinsic::x86_sse2_max_sd, 133598}, // __builtin_ia32_maxsd - {Intrinsic::x86_avx512_mask_max_sd_round, 103072}, // __builtin_ia32_maxsd_round_mask - {Intrinsic::x86_sse_max_ss, 132592}, // __builtin_ia32_maxss - {Intrinsic::x86_avx512_mask_max_ss_round, 103104}, // __builtin_ia32_maxss_round_mask - {Intrinsic::x86_sse2_mfence, 133619}, // __builtin_ia32_mfence - {Intrinsic::x86_sse2_min_pd, 133641}, // __builtin_ia32_minpd - {Intrinsic::x86_avx_min_pd_256, 89364}, // __builtin_ia32_minpd256 - {Intrinsic::x86_avx512_mask_min_pd_256, 103162}, // __builtin_ia32_minpd256_mask - {Intrinsic::x86_avx512_mask_min_pd_512, 103191}, // __builtin_ia32_minpd512_mask - {Intrinsic::x86_avx512_mask_min_pd_128, 103136}, // __builtin_ia32_minpd_mask - {Intrinsic::x86_sse_min_ps, 132613}, // __builtin_ia32_minps - {Intrinsic::x86_avx_min_ps_256, 89388}, // __builtin_ia32_minps256 - {Intrinsic::x86_avx512_mask_min_ps_256, 103246}, // __builtin_ia32_minps256_mask - {Intrinsic::x86_avx512_mask_min_ps_512, 103275}, // __builtin_ia32_minps512_mask - {Intrinsic::x86_avx512_mask_min_ps_128, 103220}, // __builtin_ia32_minps_mask - {Intrinsic::x86_sse2_min_sd, 133662}, // __builtin_ia32_minsd - {Intrinsic::x86_avx512_mask_min_sd_round, 103304}, // __builtin_ia32_minsd_round_mask - {Intrinsic::x86_sse_min_ss, 132634}, // __builtin_ia32_minss - {Intrinsic::x86_avx512_mask_min_ss_round, 103336}, // __builtin_ia32_minss_round_mask - {Intrinsic::x86_sse3_monitor, 134960}, // __builtin_ia32_monitor - {Intrinsic::x86_monitorx, 131678}, // __builtin_ia32_monitorx - {Intrinsic::x86_sse2_movmsk_pd, 133683}, // __builtin_ia32_movmskpd - {Intrinsic::x86_avx_movmsk_pd_256, 89412}, // __builtin_ia32_movmskpd256 - {Intrinsic::x86_sse_movmsk_ps, 132655}, // __builtin_ia32_movmskps - {Intrinsic::x86_avx_movmsk_ps_256, 89439}, // __builtin_ia32_movmskps256 - {Intrinsic::x86_sse41_movntdqa, 135119}, // __builtin_ia32_movntdqa - {Intrinsic::x86_avx2_movntdqa, 90993}, // __builtin_ia32_movntdqa256 - {Intrinsic::x86_avx512_movntdqa, 126102}, // __builtin_ia32_movntdqa512 - {Intrinsic::x86_mmx_movnt_dq, 130156}, // __builtin_ia32_movntq - {Intrinsic::x86_avx512_mask_move_sd, 103368}, // __builtin_ia32_movsd_mask - {Intrinsic::x86_avx512_mask_move_ss, 103394}, // __builtin_ia32_movss_mask - {Intrinsic::x86_sse41_mpsadbw, 135143}, // __builtin_ia32_mpsadbw128 - {Intrinsic::x86_avx2_mpsadbw, 91020}, // __builtin_ia32_mpsadbw256 - {Intrinsic::x86_avx512_mask_mul_pd_256, 103446}, // __builtin_ia32_mulpd256_mask - {Intrinsic::x86_avx512_mask_mul_pd_512, 103475}, // __builtin_ia32_mulpd512_mask - {Intrinsic::x86_avx512_mask_mul_pd_128, 103420}, // __builtin_ia32_mulpd_mask - {Intrinsic::x86_avx512_mask_mul_ps_256, 103530}, // __builtin_ia32_mulps256_mask - {Intrinsic::x86_avx512_mask_mul_ps_512, 103559}, // __builtin_ia32_mulps512_mask - {Intrinsic::x86_avx512_mask_mul_ps_128, 103504}, // __builtin_ia32_mulps_mask - {Intrinsic::x86_avx512_mask_mul_sd_round, 103588}, // __builtin_ia32_mulsd_round_mask - {Intrinsic::x86_avx512_mask_mul_ss_round, 103620}, // __builtin_ia32_mulss_round_mask - {Intrinsic::x86_sse3_mwait, 134983}, // __builtin_ia32_mwait - {Intrinsic::x86_mwaitx, 131702}, // __builtin_ia32_mwaitx - {Intrinsic::x86_avx512_mask_or_pd_128, 103652}, // __builtin_ia32_orpd128_mask - {Intrinsic::x86_avx512_mask_or_pd_256, 103680}, // __builtin_ia32_orpd256_mask - {Intrinsic::x86_avx512_mask_or_pd_512, 103708}, // __builtin_ia32_orpd512_mask - {Intrinsic::x86_avx512_mask_or_ps_128, 103736}, // __builtin_ia32_orps128_mask - {Intrinsic::x86_avx512_mask_or_ps_256, 103764}, // __builtin_ia32_orps256_mask - {Intrinsic::x86_avx512_mask_or_ps_512, 103792}, // __builtin_ia32_orps512_mask - {Intrinsic::x86_ssse3_pabs_b, 136030}, // __builtin_ia32_pabsb - {Intrinsic::x86_ssse3_pabs_b_128, 136051}, // __builtin_ia32_pabsb128 - {Intrinsic::x86_avx512_mask_pabs_b_128, 103820}, // __builtin_ia32_pabsb128_mask - {Intrinsic::x86_avx2_pabs_b, 91046}, // __builtin_ia32_pabsb256 - {Intrinsic::x86_avx512_mask_pabs_b_256, 103849}, // __builtin_ia32_pabsb256_mask - {Intrinsic::x86_avx512_mask_pabs_b_512, 103878}, // __builtin_ia32_pabsb512_mask - {Intrinsic::x86_ssse3_pabs_d, 136075}, // __builtin_ia32_pabsd - {Intrinsic::x86_ssse3_pabs_d_128, 136096}, // __builtin_ia32_pabsd128 - {Intrinsic::x86_avx512_mask_pabs_d_128, 103907}, // __builtin_ia32_pabsd128_mask - {Intrinsic::x86_avx2_pabs_d, 91070}, // __builtin_ia32_pabsd256 - {Intrinsic::x86_avx512_mask_pabs_d_256, 103936}, // __builtin_ia32_pabsd256_mask - {Intrinsic::x86_avx512_mask_pabs_d_512, 103965}, // __builtin_ia32_pabsd512_mask - {Intrinsic::x86_avx512_mask_pabs_q_128, 103994}, // __builtin_ia32_pabsq128_mask - {Intrinsic::x86_avx512_mask_pabs_q_256, 104023}, // __builtin_ia32_pabsq256_mask - {Intrinsic::x86_avx512_mask_pabs_q_512, 104052}, // __builtin_ia32_pabsq512_mask - {Intrinsic::x86_ssse3_pabs_w, 136120}, // __builtin_ia32_pabsw - {Intrinsic::x86_ssse3_pabs_w_128, 136141}, // __builtin_ia32_pabsw128 - {Intrinsic::x86_avx512_mask_pabs_w_128, 104081}, // __builtin_ia32_pabsw128_mask - {Intrinsic::x86_avx2_pabs_w, 91094}, // __builtin_ia32_pabsw256 - {Intrinsic::x86_avx512_mask_pabs_w_256, 104110}, // __builtin_ia32_pabsw256_mask - {Intrinsic::x86_avx512_mask_pabs_w_512, 104139}, // __builtin_ia32_pabsw512_mask - {Intrinsic::x86_mmx_packssdw, 130178}, // __builtin_ia32_packssdw - {Intrinsic::x86_sse2_packssdw_128, 133707}, // __builtin_ia32_packssdw128 - {Intrinsic::x86_avx512_mask_packssdw_128, 104168}, // __builtin_ia32_packssdw128_mask - {Intrinsic::x86_avx2_packssdw, 91118}, // __builtin_ia32_packssdw256 - {Intrinsic::x86_avx512_mask_packssdw_256, 104200}, // __builtin_ia32_packssdw256_mask - {Intrinsic::x86_avx512_mask_packssdw_512, 104232}, // __builtin_ia32_packssdw512_mask - {Intrinsic::x86_mmx_packsswb, 130202}, // __builtin_ia32_packsswb - {Intrinsic::x86_sse2_packsswb_128, 133734}, // __builtin_ia32_packsswb128 - {Intrinsic::x86_avx512_mask_packsswb_128, 104264}, // __builtin_ia32_packsswb128_mask - {Intrinsic::x86_avx2_packsswb, 91145}, // __builtin_ia32_packsswb256 - {Intrinsic::x86_avx512_mask_packsswb_256, 104296}, // __builtin_ia32_packsswb256_mask - {Intrinsic::x86_avx512_mask_packsswb_512, 104328}, // __builtin_ia32_packsswb512_mask - {Intrinsic::x86_sse41_packusdw, 135169}, // __builtin_ia32_packusdw128 - {Intrinsic::x86_avx512_mask_packusdw_128, 104360}, // __builtin_ia32_packusdw128_mask - {Intrinsic::x86_avx2_packusdw, 91172}, // __builtin_ia32_packusdw256 - {Intrinsic::x86_avx512_mask_packusdw_256, 104392}, // __builtin_ia32_packusdw256_mask - {Intrinsic::x86_avx512_mask_packusdw_512, 104424}, // __builtin_ia32_packusdw512_mask - {Intrinsic::x86_mmx_packuswb, 130226}, // __builtin_ia32_packuswb - {Intrinsic::x86_sse2_packuswb_128, 133761}, // __builtin_ia32_packuswb128 - {Intrinsic::x86_avx512_mask_packuswb_128, 104456}, // __builtin_ia32_packuswb128_mask - {Intrinsic::x86_avx2_packuswb, 91199}, // __builtin_ia32_packuswb256 - {Intrinsic::x86_avx512_mask_packuswb_256, 104488}, // __builtin_ia32_packuswb256_mask - {Intrinsic::x86_avx512_mask_packuswb_512, 104520}, // __builtin_ia32_packuswb512_mask - {Intrinsic::x86_mmx_padd_b, 130250}, // __builtin_ia32_paddb - {Intrinsic::x86_avx512_mask_padd_b_128, 104552}, // __builtin_ia32_paddb128_mask - {Intrinsic::x86_avx512_mask_padd_b_256, 104581}, // __builtin_ia32_paddb256_mask - {Intrinsic::x86_avx512_mask_padd_b_512, 104610}, // __builtin_ia32_paddb512_mask - {Intrinsic::x86_mmx_padd_d, 130271}, // __builtin_ia32_paddd - {Intrinsic::x86_avx512_mask_padd_d_128, 104639}, // __builtin_ia32_paddd128_mask - {Intrinsic::x86_avx512_mask_padd_d_256, 104668}, // __builtin_ia32_paddd256_mask - {Intrinsic::x86_avx512_mask_padd_d_512, 104697}, // __builtin_ia32_paddd512_mask - {Intrinsic::x86_mmx_padd_q, 130292}, // __builtin_ia32_paddq - {Intrinsic::x86_avx512_mask_padd_q_128, 104726}, // __builtin_ia32_paddq128_mask - {Intrinsic::x86_avx512_mask_padd_q_256, 104755}, // __builtin_ia32_paddq256_mask - {Intrinsic::x86_avx512_mask_padd_q_512, 104784}, // __builtin_ia32_paddq512_mask - {Intrinsic::x86_mmx_padds_b, 130334}, // __builtin_ia32_paddsb - {Intrinsic::x86_sse2_padds_b, 133788}, // __builtin_ia32_paddsb128 - {Intrinsic::x86_avx512_mask_padds_b_128, 104900}, // __builtin_ia32_paddsb128_mask - {Intrinsic::x86_avx2_padds_b, 91226}, // __builtin_ia32_paddsb256 - {Intrinsic::x86_avx512_mask_padds_b_256, 104930}, // __builtin_ia32_paddsb256_mask - {Intrinsic::x86_avx512_mask_padds_b_512, 104960}, // __builtin_ia32_paddsb512_mask - {Intrinsic::x86_mmx_padds_w, 130356}, // __builtin_ia32_paddsw - {Intrinsic::x86_sse2_padds_w, 133813}, // __builtin_ia32_paddsw128 - {Intrinsic::x86_avx512_mask_padds_w_128, 104990}, // __builtin_ia32_paddsw128_mask - {Intrinsic::x86_avx2_padds_w, 91251}, // __builtin_ia32_paddsw256 - {Intrinsic::x86_avx512_mask_padds_w_256, 105020}, // __builtin_ia32_paddsw256_mask - {Intrinsic::x86_avx512_mask_padds_w_512, 105050}, // __builtin_ia32_paddsw512_mask - {Intrinsic::x86_mmx_paddus_b, 130378}, // __builtin_ia32_paddusb - {Intrinsic::x86_sse2_paddus_b, 133838}, // __builtin_ia32_paddusb128 - {Intrinsic::x86_avx512_mask_paddus_b_128, 105080}, // __builtin_ia32_paddusb128_mask - {Intrinsic::x86_avx2_paddus_b, 91276}, // __builtin_ia32_paddusb256 - {Intrinsic::x86_avx512_mask_paddus_b_256, 105111}, // __builtin_ia32_paddusb256_mask - {Intrinsic::x86_avx512_mask_paddus_b_512, 105142}, // __builtin_ia32_paddusb512_mask - {Intrinsic::x86_mmx_paddus_w, 130401}, // __builtin_ia32_paddusw - {Intrinsic::x86_sse2_paddus_w, 133864}, // __builtin_ia32_paddusw128 - {Intrinsic::x86_avx512_mask_paddus_w_128, 105173}, // __builtin_ia32_paddusw128_mask - {Intrinsic::x86_avx2_paddus_w, 91302}, // __builtin_ia32_paddusw256 - {Intrinsic::x86_avx512_mask_paddus_w_256, 105204}, // __builtin_ia32_paddusw256_mask - {Intrinsic::x86_avx512_mask_paddus_w_512, 105235}, // __builtin_ia32_paddusw512_mask - {Intrinsic::x86_mmx_padd_w, 130313}, // __builtin_ia32_paddw - {Intrinsic::x86_avx512_mask_padd_w_128, 104813}, // __builtin_ia32_paddw128_mask - {Intrinsic::x86_avx512_mask_padd_w_256, 104842}, // __builtin_ia32_paddw256_mask - {Intrinsic::x86_avx512_mask_padd_w_512, 104871}, // __builtin_ia32_paddw512_mask - {Intrinsic::x86_mmx_palignr_b, 130424}, // __builtin_ia32_palignr - {Intrinsic::x86_mmx_pand, 130447}, // __builtin_ia32_pand - {Intrinsic::x86_mmx_pandn, 130467}, // __builtin_ia32_pandn - {Intrinsic::x86_sse2_pause, 133890}, // __builtin_ia32_pause - {Intrinsic::x86_mmx_pavg_b, 130488}, // __builtin_ia32_pavgb - {Intrinsic::x86_sse2_pavg_b, 133911}, // __builtin_ia32_pavgb128 - {Intrinsic::x86_avx512_mask_pavg_b_128, 105266}, // __builtin_ia32_pavgb128_mask - {Intrinsic::x86_avx2_pavg_b, 91328}, // __builtin_ia32_pavgb256 - {Intrinsic::x86_avx512_mask_pavg_b_256, 105295}, // __builtin_ia32_pavgb256_mask - {Intrinsic::x86_avx512_mask_pavg_b_512, 105324}, // __builtin_ia32_pavgb512_mask - {Intrinsic::x86_3dnow_pavgusb, 87884}, // __builtin_ia32_pavgusb - {Intrinsic::x86_mmx_pavg_w, 130509}, // __builtin_ia32_pavgw - {Intrinsic::x86_sse2_pavg_w, 133935}, // __builtin_ia32_pavgw128 - {Intrinsic::x86_avx512_mask_pavg_w_128, 105353}, // __builtin_ia32_pavgw128_mask - {Intrinsic::x86_avx2_pavg_w, 91352}, // __builtin_ia32_pavgw256 - {Intrinsic::x86_avx512_mask_pavg_w_256, 105382}, // __builtin_ia32_pavgw256_mask - {Intrinsic::x86_avx512_mask_pavg_w_512, 105411}, // __builtin_ia32_pavgw512_mask - {Intrinsic::x86_sse41_pblendvb, 135196}, // __builtin_ia32_pblendvb128 - {Intrinsic::x86_avx2_pblendvb, 91376}, // __builtin_ia32_pblendvb256 - {Intrinsic::x86_avx512_mask_pbroadcast_b_gpr_128, 105440}, // __builtin_ia32_pbroadcastb128_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_b_gpr_256, 105479}, // __builtin_ia32_pbroadcastb256_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_b_gpr_512, 105518}, // __builtin_ia32_pbroadcastb512_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_d_gpr_128, 105557}, // __builtin_ia32_pbroadcastd128_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_d_gpr_256, 105596}, // __builtin_ia32_pbroadcastd256_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_d_gpr_512, 105635}, // __builtin_ia32_pbroadcastd512_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_q_gpr_128, 105674}, // __builtin_ia32_pbroadcastq128_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_q_gpr_256, 105713}, // __builtin_ia32_pbroadcastq256_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_q_gpr_512, 105752}, // __builtin_ia32_pbroadcastq512_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_q_mem_512, 105791}, // __builtin_ia32_pbroadcastq512_mem_mask - {Intrinsic::x86_avx512_mask_pbroadcast_w_gpr_128, 105830}, // __builtin_ia32_pbroadcastw128_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_w_gpr_256, 105869}, // __builtin_ia32_pbroadcastw256_gpr_mask - {Intrinsic::x86_avx512_mask_pbroadcast_w_gpr_512, 105908}, // __builtin_ia32_pbroadcastw512_gpr_mask - {Intrinsic::x86_pclmulqdq, 131724}, // __builtin_ia32_pclmulqdq128 - {Intrinsic::x86_mmx_pcmpeq_b, 130530}, // __builtin_ia32_pcmpeqb - {Intrinsic::x86_mmx_pcmpeq_d, 130553}, // __builtin_ia32_pcmpeqd - {Intrinsic::x86_mmx_pcmpeq_w, 130576}, // __builtin_ia32_pcmpeqw - {Intrinsic::x86_sse42_pcmpestri128, 135538}, // __builtin_ia32_pcmpestri128 - {Intrinsic::x86_sse42_pcmpestria128, 135566}, // __builtin_ia32_pcmpestria128 - {Intrinsic::x86_sse42_pcmpestric128, 135595}, // __builtin_ia32_pcmpestric128 - {Intrinsic::x86_sse42_pcmpestrio128, 135624}, // __builtin_ia32_pcmpestrio128 - {Intrinsic::x86_sse42_pcmpestris128, 135653}, // __builtin_ia32_pcmpestris128 - {Intrinsic::x86_sse42_pcmpestriz128, 135682}, // __builtin_ia32_pcmpestriz128 - {Intrinsic::x86_sse42_pcmpestrm128, 135711}, // __builtin_ia32_pcmpestrm128 - {Intrinsic::x86_mmx_pcmpgt_b, 130599}, // __builtin_ia32_pcmpgtb - {Intrinsic::x86_mmx_pcmpgt_d, 130622}, // __builtin_ia32_pcmpgtd - {Intrinsic::x86_mmx_pcmpgt_w, 130645}, // __builtin_ia32_pcmpgtw - {Intrinsic::x86_sse42_pcmpistri128, 135739}, // __builtin_ia32_pcmpistri128 - {Intrinsic::x86_sse42_pcmpistria128, 135767}, // __builtin_ia32_pcmpistria128 - {Intrinsic::x86_sse42_pcmpistric128, 135796}, // __builtin_ia32_pcmpistric128 - {Intrinsic::x86_sse42_pcmpistrio128, 135825}, // __builtin_ia32_pcmpistrio128 - {Intrinsic::x86_sse42_pcmpistris128, 135854}, // __builtin_ia32_pcmpistris128 - {Intrinsic::x86_sse42_pcmpistriz128, 135883}, // __builtin_ia32_pcmpistriz128 - {Intrinsic::x86_sse42_pcmpistrm128, 135912}, // __builtin_ia32_pcmpistrm128 - {Intrinsic::x86_bmi_pdep_64, 128940}, // __builtin_ia32_pdep_di - {Intrinsic::x86_bmi_pdep_32, 128917}, // __builtin_ia32_pdep_si - {Intrinsic::x86_avx2_vperm2i128, 92680}, // __builtin_ia32_permti256 - {Intrinsic::x86_avx512_mask_permvar_df_256, 105947}, // __builtin_ia32_permvardf256_mask - {Intrinsic::x86_avx512_mask_permvar_df_512, 105980}, // __builtin_ia32_permvardf512_mask - {Intrinsic::x86_avx512_mask_permvar_di_256, 106013}, // __builtin_ia32_permvardi256_mask - {Intrinsic::x86_avx512_mask_permvar_di_512, 106046}, // __builtin_ia32_permvardi512_mask - {Intrinsic::x86_avx512_mask_permvar_hi_128, 106079}, // __builtin_ia32_permvarhi128_mask - {Intrinsic::x86_avx512_mask_permvar_hi_256, 106112}, // __builtin_ia32_permvarhi256_mask - {Intrinsic::x86_avx512_mask_permvar_hi_512, 106145}, // __builtin_ia32_permvarhi512_mask - {Intrinsic::x86_avx512_mask_permvar_qi_128, 106178}, // __builtin_ia32_permvarqi128_mask - {Intrinsic::x86_avx512_mask_permvar_qi_256, 106211}, // __builtin_ia32_permvarqi256_mask - {Intrinsic::x86_avx512_mask_permvar_qi_512, 106244}, // __builtin_ia32_permvarqi512_mask - {Intrinsic::x86_avx2_permps, 91431}, // __builtin_ia32_permvarsf256 - {Intrinsic::x86_avx512_mask_permvar_sf_256, 106277}, // __builtin_ia32_permvarsf256_mask - {Intrinsic::x86_avx512_mask_permvar_sf_512, 106310}, // __builtin_ia32_permvarsf512_mask - {Intrinsic::x86_avx2_permd, 91403}, // __builtin_ia32_permvarsi256 - {Intrinsic::x86_avx512_mask_permvar_si_256, 106343}, // __builtin_ia32_permvarsi256_mask - {Intrinsic::x86_avx512_mask_permvar_si_512, 106376}, // __builtin_ia32_permvarsi512_mask - {Intrinsic::x86_bmi_pext_64, 128986}, // __builtin_ia32_pext_di - {Intrinsic::x86_bmi_pext_32, 128963}, // __builtin_ia32_pext_si - {Intrinsic::x86_3dnow_pf2id, 87907}, // __builtin_ia32_pf2id - {Intrinsic::x86_3dnowa_pf2iw, 88305}, // __builtin_ia32_pf2iw - {Intrinsic::x86_3dnow_pfacc, 87928}, // __builtin_ia32_pfacc - {Intrinsic::x86_3dnow_pfadd, 87949}, // __builtin_ia32_pfadd - {Intrinsic::x86_3dnow_pfcmpeq, 87970}, // __builtin_ia32_pfcmpeq - {Intrinsic::x86_3dnow_pfcmpge, 87993}, // __builtin_ia32_pfcmpge - {Intrinsic::x86_3dnow_pfcmpgt, 88016}, // __builtin_ia32_pfcmpgt - {Intrinsic::x86_3dnow_pfmax, 88039}, // __builtin_ia32_pfmax - {Intrinsic::x86_3dnow_pfmin, 88060}, // __builtin_ia32_pfmin - {Intrinsic::x86_3dnow_pfmul, 88081}, // __builtin_ia32_pfmul - {Intrinsic::x86_3dnowa_pfnacc, 88326}, // __builtin_ia32_pfnacc - {Intrinsic::x86_3dnowa_pfpnacc, 88348}, // __builtin_ia32_pfpnacc - {Intrinsic::x86_3dnow_pfrcp, 88102}, // __builtin_ia32_pfrcp - {Intrinsic::x86_3dnow_pfrcpit1, 88123}, // __builtin_ia32_pfrcpit1 - {Intrinsic::x86_3dnow_pfrcpit2, 88147}, // __builtin_ia32_pfrcpit2 - {Intrinsic::x86_3dnow_pfrsqit1, 88171}, // __builtin_ia32_pfrsqit1 - {Intrinsic::x86_3dnow_pfrsqrt, 88195}, // __builtin_ia32_pfrsqrt - {Intrinsic::x86_3dnow_pfsub, 88218}, // __builtin_ia32_pfsub - {Intrinsic::x86_3dnow_pfsubr, 88239}, // __builtin_ia32_pfsubr - {Intrinsic::x86_ssse3_phadd_d, 136165}, // __builtin_ia32_phaddd - {Intrinsic::x86_ssse3_phadd_d_128, 136187}, // __builtin_ia32_phaddd128 - {Intrinsic::x86_avx2_phadd_d, 91459}, // __builtin_ia32_phaddd256 - {Intrinsic::x86_ssse3_phadd_sw, 136212}, // __builtin_ia32_phaddsw - {Intrinsic::x86_ssse3_phadd_sw_128, 136235}, // __builtin_ia32_phaddsw128 - {Intrinsic::x86_avx2_phadd_sw, 91484}, // __builtin_ia32_phaddsw256 - {Intrinsic::x86_ssse3_phadd_w, 136261}, // __builtin_ia32_phaddw - {Intrinsic::x86_ssse3_phadd_w_128, 136283}, // __builtin_ia32_phaddw128 - {Intrinsic::x86_avx2_phadd_w, 91510}, // __builtin_ia32_phaddw256 - {Intrinsic::x86_sse41_phminposuw, 135223}, // __builtin_ia32_phminposuw128 - {Intrinsic::x86_ssse3_phsub_d, 136308}, // __builtin_ia32_phsubd - {Intrinsic::x86_ssse3_phsub_d_128, 136330}, // __builtin_ia32_phsubd128 - {Intrinsic::x86_avx2_phsub_d, 91535}, // __builtin_ia32_phsubd256 - {Intrinsic::x86_ssse3_phsub_sw, 136355}, // __builtin_ia32_phsubsw - {Intrinsic::x86_ssse3_phsub_sw_128, 136378}, // __builtin_ia32_phsubsw128 - {Intrinsic::x86_avx2_phsub_sw, 91560}, // __builtin_ia32_phsubsw256 - {Intrinsic::x86_ssse3_phsub_w, 136404}, // __builtin_ia32_phsubw - {Intrinsic::x86_ssse3_phsub_w_128, 136426}, // __builtin_ia32_phsubw128 - {Intrinsic::x86_avx2_phsub_w, 91586}, // __builtin_ia32_phsubw256 - {Intrinsic::x86_3dnow_pi2fd, 88261}, // __builtin_ia32_pi2fd - {Intrinsic::x86_3dnowa_pi2fw, 88371}, // __builtin_ia32_pi2fw - {Intrinsic::x86_ssse3_pmadd_ub_sw, 136451}, // __builtin_ia32_pmaddubsw - {Intrinsic::x86_ssse3_pmadd_ub_sw_128, 136476}, // __builtin_ia32_pmaddubsw128 - {Intrinsic::x86_avx512_mask_pmaddubs_w_128, 106409}, // __builtin_ia32_pmaddubsw128_mask - {Intrinsic::x86_avx2_pmadd_ub_sw, 91611}, // __builtin_ia32_pmaddubsw256 - {Intrinsic::x86_avx512_mask_pmaddubs_w_256, 106442}, // __builtin_ia32_pmaddubsw256_mask - {Intrinsic::x86_avx512_mask_pmaddubs_w_512, 106475}, // __builtin_ia32_pmaddubsw512_mask - {Intrinsic::x86_mmx_pmadd_wd, 130724}, // __builtin_ia32_pmaddwd - {Intrinsic::x86_sse2_pmadd_wd, 133959}, // __builtin_ia32_pmaddwd128 - {Intrinsic::x86_avx512_mask_pmaddw_d_128, 106508}, // __builtin_ia32_pmaddwd128_mask - {Intrinsic::x86_avx2_pmadd_wd, 91639}, // __builtin_ia32_pmaddwd256 - {Intrinsic::x86_avx512_mask_pmaddw_d_256, 106539}, // __builtin_ia32_pmaddwd256_mask - {Intrinsic::x86_avx512_mask_pmaddw_d_512, 106570}, // __builtin_ia32_pmaddwd512_mask - {Intrinsic::x86_avx512_mask_pmaxs_b_128, 106601}, // __builtin_ia32_pmaxsb128_mask - {Intrinsic::x86_avx512_mask_pmaxs_b_256, 106631}, // __builtin_ia32_pmaxsb256_mask - {Intrinsic::x86_avx512_mask_pmaxs_b_512, 106661}, // __builtin_ia32_pmaxsb512_mask - {Intrinsic::x86_avx512_mask_pmaxs_d_128, 106691}, // __builtin_ia32_pmaxsd128_mask - {Intrinsic::x86_avx512_mask_pmaxs_d_256, 106721}, // __builtin_ia32_pmaxsd256_mask - {Intrinsic::x86_avx512_mask_pmaxs_d_512, 106751}, // __builtin_ia32_pmaxsd512_mask - {Intrinsic::x86_avx512_mask_pmaxs_q_128, 106781}, // __builtin_ia32_pmaxsq128_mask - {Intrinsic::x86_avx512_mask_pmaxs_q_256, 106811}, // __builtin_ia32_pmaxsq256_mask - {Intrinsic::x86_avx512_mask_pmaxs_q_512, 106841}, // __builtin_ia32_pmaxsq512_mask - {Intrinsic::x86_mmx_pmaxs_w, 130747}, // __builtin_ia32_pmaxsw - {Intrinsic::x86_avx512_mask_pmaxs_w_128, 106871}, // __builtin_ia32_pmaxsw128_mask - {Intrinsic::x86_avx512_mask_pmaxs_w_256, 106901}, // __builtin_ia32_pmaxsw256_mask - {Intrinsic::x86_avx512_mask_pmaxs_w_512, 106931}, // __builtin_ia32_pmaxsw512_mask - {Intrinsic::x86_mmx_pmaxu_b, 130769}, // __builtin_ia32_pmaxub - {Intrinsic::x86_avx512_mask_pmaxu_b_128, 106961}, // __builtin_ia32_pmaxub128_mask - {Intrinsic::x86_avx512_mask_pmaxu_b_256, 106991}, // __builtin_ia32_pmaxub256_mask - {Intrinsic::x86_avx512_mask_pmaxu_b_512, 107021}, // __builtin_ia32_pmaxub512_mask - {Intrinsic::x86_avx512_mask_pmaxu_d_128, 107051}, // __builtin_ia32_pmaxud128_mask - {Intrinsic::x86_avx512_mask_pmaxu_d_256, 107081}, // __builtin_ia32_pmaxud256_mask - {Intrinsic::x86_avx512_mask_pmaxu_d_512, 107111}, // __builtin_ia32_pmaxud512_mask - {Intrinsic::x86_avx512_mask_pmaxu_q_128, 107141}, // __builtin_ia32_pmaxuq128_mask - {Intrinsic::x86_avx512_mask_pmaxu_q_256, 107171}, // __builtin_ia32_pmaxuq256_mask - {Intrinsic::x86_avx512_mask_pmaxu_q_512, 107201}, // __builtin_ia32_pmaxuq512_mask - {Intrinsic::x86_avx512_mask_pmaxu_w_128, 107231}, // __builtin_ia32_pmaxuw128_mask - {Intrinsic::x86_avx512_mask_pmaxu_w_256, 107261}, // __builtin_ia32_pmaxuw256_mask - {Intrinsic::x86_avx512_mask_pmaxu_w_512, 107291}, // __builtin_ia32_pmaxuw512_mask - {Intrinsic::x86_avx512_mask_pmins_b_128, 107321}, // __builtin_ia32_pminsb128_mask - {Intrinsic::x86_avx512_mask_pmins_b_256, 107351}, // __builtin_ia32_pminsb256_mask - {Intrinsic::x86_avx512_mask_pmins_b_512, 107381}, // __builtin_ia32_pminsb512_mask - {Intrinsic::x86_avx512_mask_pmins_d_128, 107411}, // __builtin_ia32_pminsd128_mask - {Intrinsic::x86_avx512_mask_pmins_d_256, 107441}, // __builtin_ia32_pminsd256_mask - {Intrinsic::x86_avx512_mask_pmins_d_512, 107471}, // __builtin_ia32_pminsd512_mask - {Intrinsic::x86_avx512_mask_pmins_q_128, 107501}, // __builtin_ia32_pminsq128_mask - {Intrinsic::x86_avx512_mask_pmins_q_256, 107531}, // __builtin_ia32_pminsq256_mask - {Intrinsic::x86_avx512_mask_pmins_q_512, 107561}, // __builtin_ia32_pminsq512_mask - {Intrinsic::x86_mmx_pmins_w, 130791}, // __builtin_ia32_pminsw - {Intrinsic::x86_avx512_mask_pmins_w_128, 107591}, // __builtin_ia32_pminsw128_mask - {Intrinsic::x86_avx512_mask_pmins_w_256, 107621}, // __builtin_ia32_pminsw256_mask - {Intrinsic::x86_avx512_mask_pmins_w_512, 107651}, // __builtin_ia32_pminsw512_mask - {Intrinsic::x86_mmx_pminu_b, 130813}, // __builtin_ia32_pminub - {Intrinsic::x86_avx512_mask_pminu_b_128, 107681}, // __builtin_ia32_pminub128_mask - {Intrinsic::x86_avx512_mask_pminu_b_256, 107711}, // __builtin_ia32_pminub256_mask - {Intrinsic::x86_avx512_mask_pminu_b_512, 107741}, // __builtin_ia32_pminub512_mask - {Intrinsic::x86_avx512_mask_pminu_d_128, 107771}, // __builtin_ia32_pminud128_mask - {Intrinsic::x86_avx512_mask_pminu_d_256, 107801}, // __builtin_ia32_pminud256_mask - {Intrinsic::x86_avx512_mask_pminu_d_512, 107831}, // __builtin_ia32_pminud512_mask - {Intrinsic::x86_avx512_mask_pminu_q_128, 107861}, // __builtin_ia32_pminuq128_mask - {Intrinsic::x86_avx512_mask_pminu_q_256, 107891}, // __builtin_ia32_pminuq256_mask - {Intrinsic::x86_avx512_mask_pminu_q_512, 107921}, // __builtin_ia32_pminuq512_mask - {Intrinsic::x86_avx512_mask_pminu_w_128, 107951}, // __builtin_ia32_pminuw128_mask - {Intrinsic::x86_avx512_mask_pminu_w_256, 107981}, // __builtin_ia32_pminuw256_mask - {Intrinsic::x86_avx512_mask_pminu_w_512, 108011}, // __builtin_ia32_pminuw512_mask - {Intrinsic::x86_avx512_mask_pmov_db_128, 108041}, // __builtin_ia32_pmovdb128_mask - {Intrinsic::x86_avx512_mask_pmov_db_mem_128, 108131}, // __builtin_ia32_pmovdb128mem_mask - {Intrinsic::x86_avx512_mask_pmov_db_256, 108071}, // __builtin_ia32_pmovdb256_mask - {Intrinsic::x86_avx512_mask_pmov_db_mem_256, 108164}, // __builtin_ia32_pmovdb256mem_mask - {Intrinsic::x86_avx512_mask_pmov_db_512, 108101}, // __builtin_ia32_pmovdb512_mask - {Intrinsic::x86_avx512_mask_pmov_db_mem_512, 108197}, // __builtin_ia32_pmovdb512mem_mask - {Intrinsic::x86_avx512_mask_pmov_dw_128, 108230}, // __builtin_ia32_pmovdw128_mask - {Intrinsic::x86_avx512_mask_pmov_dw_mem_128, 108320}, // __builtin_ia32_pmovdw128mem_mask - {Intrinsic::x86_avx512_mask_pmov_dw_256, 108260}, // __builtin_ia32_pmovdw256_mask - {Intrinsic::x86_avx512_mask_pmov_dw_mem_256, 108353}, // __builtin_ia32_pmovdw256mem_mask - {Intrinsic::x86_avx512_mask_pmov_dw_512, 108290}, // __builtin_ia32_pmovdw512_mask - {Intrinsic::x86_avx512_mask_pmov_dw_mem_512, 108386}, // __builtin_ia32_pmovdw512mem_mask - {Intrinsic::x86_mmx_pmovmskb, 130835}, // __builtin_ia32_pmovmskb - {Intrinsic::x86_sse2_pmovmskb_128, 133985}, // __builtin_ia32_pmovmskb128 - {Intrinsic::x86_avx2_pmovmskb, 91665}, // __builtin_ia32_pmovmskb256 - {Intrinsic::x86_avx512_mask_pmov_qb_128, 108419}, // __builtin_ia32_pmovqb128_mask - {Intrinsic::x86_avx512_mask_pmov_qb_mem_128, 108509}, // __builtin_ia32_pmovqb128mem_mask - {Intrinsic::x86_avx512_mask_pmov_qb_256, 108449}, // __builtin_ia32_pmovqb256_mask - {Intrinsic::x86_avx512_mask_pmov_qb_mem_256, 108542}, // __builtin_ia32_pmovqb256mem_mask - {Intrinsic::x86_avx512_mask_pmov_qb_512, 108479}, // __builtin_ia32_pmovqb512_mask - {Intrinsic::x86_avx512_mask_pmov_qb_mem_512, 108575}, // __builtin_ia32_pmovqb512mem_mask - {Intrinsic::x86_avx512_mask_pmov_qd_128, 108608}, // __builtin_ia32_pmovqd128_mask - {Intrinsic::x86_avx512_mask_pmov_qd_mem_128, 108698}, // __builtin_ia32_pmovqd128mem_mask - {Intrinsic::x86_avx512_mask_pmov_qd_256, 108638}, // __builtin_ia32_pmovqd256_mask - {Intrinsic::x86_avx512_mask_pmov_qd_mem_256, 108731}, // __builtin_ia32_pmovqd256mem_mask - {Intrinsic::x86_avx512_mask_pmov_qd_512, 108668}, // __builtin_ia32_pmovqd512_mask - {Intrinsic::x86_avx512_mask_pmov_qd_mem_512, 108764}, // __builtin_ia32_pmovqd512mem_mask - {Intrinsic::x86_avx512_mask_pmov_qw_128, 108797}, // __builtin_ia32_pmovqw128_mask - {Intrinsic::x86_avx512_mask_pmov_qw_mem_128, 108887}, // __builtin_ia32_pmovqw128mem_mask - {Intrinsic::x86_avx512_mask_pmov_qw_256, 108827}, // __builtin_ia32_pmovqw256_mask - {Intrinsic::x86_avx512_mask_pmov_qw_mem_256, 108920}, // __builtin_ia32_pmovqw256mem_mask - {Intrinsic::x86_avx512_mask_pmov_qw_512, 108857}, // __builtin_ia32_pmovqw512_mask - {Intrinsic::x86_avx512_mask_pmov_qw_mem_512, 108953}, // __builtin_ia32_pmovqw512mem_mask - {Intrinsic::x86_avx512_mask_pmovs_db_128, 109175}, // __builtin_ia32_pmovsdb128_mask - {Intrinsic::x86_avx512_mask_pmovs_db_mem_128, 109268}, // __builtin_ia32_pmovsdb128mem_mask - {Intrinsic::x86_avx512_mask_pmovs_db_256, 109206}, // __builtin_ia32_pmovsdb256_mask - {Intrinsic::x86_avx512_mask_pmovs_db_mem_256, 109302}, // __builtin_ia32_pmovsdb256mem_mask - {Intrinsic::x86_avx512_mask_pmovs_db_512, 109237}, // __builtin_ia32_pmovsdb512_mask - {Intrinsic::x86_avx512_mask_pmovs_db_mem_512, 109336}, // __builtin_ia32_pmovsdb512mem_mask - {Intrinsic::x86_avx512_mask_pmovs_dw_128, 109370}, // __builtin_ia32_pmovsdw128_mask - {Intrinsic::x86_avx512_mask_pmovs_dw_mem_128, 109463}, // __builtin_ia32_pmovsdw128mem_mask - {Intrinsic::x86_avx512_mask_pmovs_dw_256, 109401}, // __builtin_ia32_pmovsdw256_mask - {Intrinsic::x86_avx512_mask_pmovs_dw_mem_256, 109497}, // __builtin_ia32_pmovsdw256mem_mask - {Intrinsic::x86_avx512_mask_pmovs_dw_512, 109432}, // __builtin_ia32_pmovsdw512_mask - {Intrinsic::x86_avx512_mask_pmovs_dw_mem_512, 109531}, // __builtin_ia32_pmovsdw512mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qb_128, 109565}, // __builtin_ia32_pmovsqb128_mask - {Intrinsic::x86_avx512_mask_pmovs_qb_mem_128, 109658}, // __builtin_ia32_pmovsqb128mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qb_256, 109596}, // __builtin_ia32_pmovsqb256_mask - {Intrinsic::x86_avx512_mask_pmovs_qb_mem_256, 109692}, // __builtin_ia32_pmovsqb256mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qb_512, 109627}, // __builtin_ia32_pmovsqb512_mask - {Intrinsic::x86_avx512_mask_pmovs_qb_mem_512, 109726}, // __builtin_ia32_pmovsqb512mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qd_128, 109760}, // __builtin_ia32_pmovsqd128_mask - {Intrinsic::x86_avx512_mask_pmovs_qd_mem_128, 109853}, // __builtin_ia32_pmovsqd128mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qd_256, 109791}, // __builtin_ia32_pmovsqd256_mask - {Intrinsic::x86_avx512_mask_pmovs_qd_mem_256, 109887}, // __builtin_ia32_pmovsqd256mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qd_512, 109822}, // __builtin_ia32_pmovsqd512_mask - {Intrinsic::x86_avx512_mask_pmovs_qd_mem_512, 109921}, // __builtin_ia32_pmovsqd512mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qw_128, 109955}, // __builtin_ia32_pmovsqw128_mask - {Intrinsic::x86_avx512_mask_pmovs_qw_mem_128, 110048}, // __builtin_ia32_pmovsqw128mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qw_256, 109986}, // __builtin_ia32_pmovsqw256_mask - {Intrinsic::x86_avx512_mask_pmovs_qw_mem_256, 110082}, // __builtin_ia32_pmovsqw256mem_mask - {Intrinsic::x86_avx512_mask_pmovs_qw_512, 110017}, // __builtin_ia32_pmovsqw512_mask - {Intrinsic::x86_avx512_mask_pmovs_qw_mem_512, 110116}, // __builtin_ia32_pmovsqw512mem_mask - {Intrinsic::x86_avx512_mask_pmovs_wb_128, 110150}, // __builtin_ia32_pmovswb128_mask - {Intrinsic::x86_avx512_mask_pmovs_wb_mem_128, 110243}, // __builtin_ia32_pmovswb128mem_mask - {Intrinsic::x86_avx512_mask_pmovs_wb_256, 110181}, // __builtin_ia32_pmovswb256_mask - {Intrinsic::x86_avx512_mask_pmovs_wb_mem_256, 110277}, // __builtin_ia32_pmovswb256mem_mask - {Intrinsic::x86_avx512_mask_pmovs_wb_512, 110212}, // __builtin_ia32_pmovswb512_mask - {Intrinsic::x86_avx512_mask_pmovs_wb_mem_512, 110311}, // __builtin_ia32_pmovswb512mem_mask - {Intrinsic::x86_avx512_mask_pmovsxb_d_128, 110345}, // __builtin_ia32_pmovsxbd128_mask - {Intrinsic::x86_avx512_mask_pmovsxb_d_256, 110377}, // __builtin_ia32_pmovsxbd256_mask - {Intrinsic::x86_avx512_mask_pmovsxb_d_512, 110409}, // __builtin_ia32_pmovsxbd512_mask - {Intrinsic::x86_avx512_mask_pmovsxb_q_128, 110441}, // __builtin_ia32_pmovsxbq128_mask - {Intrinsic::x86_avx512_mask_pmovsxb_q_256, 110473}, // __builtin_ia32_pmovsxbq256_mask - {Intrinsic::x86_avx512_mask_pmovsxb_q_512, 110505}, // __builtin_ia32_pmovsxbq512_mask - {Intrinsic::x86_avx512_mask_pmovsxb_w_128, 110537}, // __builtin_ia32_pmovsxbw128_mask - {Intrinsic::x86_avx512_mask_pmovsxb_w_256, 110569}, // __builtin_ia32_pmovsxbw256_mask - {Intrinsic::x86_avx512_mask_pmovsxb_w_512, 110601}, // __builtin_ia32_pmovsxbw512_mask - {Intrinsic::x86_avx512_mask_pmovsxd_q_128, 110633}, // __builtin_ia32_pmovsxdq128_mask - {Intrinsic::x86_avx512_mask_pmovsxd_q_256, 110665}, // __builtin_ia32_pmovsxdq256_mask - {Intrinsic::x86_avx512_mask_pmovsxd_q_512, 110697}, // __builtin_ia32_pmovsxdq512_mask - {Intrinsic::x86_avx512_mask_pmovsxw_d_128, 110729}, // __builtin_ia32_pmovsxwd128_mask - {Intrinsic::x86_avx512_mask_pmovsxw_d_256, 110761}, // __builtin_ia32_pmovsxwd256_mask - {Intrinsic::x86_avx512_mask_pmovsxw_d_512, 110793}, // __builtin_ia32_pmovsxwd512_mask - {Intrinsic::x86_avx512_mask_pmovsxw_q_128, 110825}, // __builtin_ia32_pmovsxwq128_mask - {Intrinsic::x86_avx512_mask_pmovsxw_q_256, 110857}, // __builtin_ia32_pmovsxwq256_mask - {Intrinsic::x86_avx512_mask_pmovsxw_q_512, 110889}, // __builtin_ia32_pmovsxwq512_mask - {Intrinsic::x86_avx512_mask_pmovus_db_128, 110921}, // __builtin_ia32_pmovusdb128_mask - {Intrinsic::x86_avx512_mask_pmovus_db_mem_128, 111017}, // __builtin_ia32_pmovusdb128mem_mask - {Intrinsic::x86_avx512_mask_pmovus_db_256, 110953}, // __builtin_ia32_pmovusdb256_mask - {Intrinsic::x86_avx512_mask_pmovus_db_mem_256, 111052}, // __builtin_ia32_pmovusdb256mem_mask - {Intrinsic::x86_avx512_mask_pmovus_db_512, 110985}, // __builtin_ia32_pmovusdb512_mask - {Intrinsic::x86_avx512_mask_pmovus_db_mem_512, 111087}, // __builtin_ia32_pmovusdb512mem_mask - {Intrinsic::x86_avx512_mask_pmovus_dw_128, 111122}, // __builtin_ia32_pmovusdw128_mask - {Intrinsic::x86_avx512_mask_pmovus_dw_mem_128, 111218}, // __builtin_ia32_pmovusdw128mem_mask - {Intrinsic::x86_avx512_mask_pmovus_dw_256, 111154}, // __builtin_ia32_pmovusdw256_mask - {Intrinsic::x86_avx512_mask_pmovus_dw_mem_256, 111253}, // __builtin_ia32_pmovusdw256mem_mask - {Intrinsic::x86_avx512_mask_pmovus_dw_512, 111186}, // __builtin_ia32_pmovusdw512_mask - {Intrinsic::x86_avx512_mask_pmovus_dw_mem_512, 111288}, // __builtin_ia32_pmovusdw512mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qb_128, 111323}, // __builtin_ia32_pmovusqb128_mask - {Intrinsic::x86_avx512_mask_pmovus_qb_mem_128, 111419}, // __builtin_ia32_pmovusqb128mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qb_256, 111355}, // __builtin_ia32_pmovusqb256_mask - {Intrinsic::x86_avx512_mask_pmovus_qb_mem_256, 111454}, // __builtin_ia32_pmovusqb256mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qb_512, 111387}, // __builtin_ia32_pmovusqb512_mask - {Intrinsic::x86_avx512_mask_pmovus_qb_mem_512, 111489}, // __builtin_ia32_pmovusqb512mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qd_128, 111524}, // __builtin_ia32_pmovusqd128_mask - {Intrinsic::x86_avx512_mask_pmovus_qd_mem_128, 111620}, // __builtin_ia32_pmovusqd128mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qd_256, 111556}, // __builtin_ia32_pmovusqd256_mask - {Intrinsic::x86_avx512_mask_pmovus_qd_mem_256, 111655}, // __builtin_ia32_pmovusqd256mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qd_512, 111588}, // __builtin_ia32_pmovusqd512_mask - {Intrinsic::x86_avx512_mask_pmovus_qd_mem_512, 111690}, // __builtin_ia32_pmovusqd512mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qw_128, 111725}, // __builtin_ia32_pmovusqw128_mask - {Intrinsic::x86_avx512_mask_pmovus_qw_mem_128, 111821}, // __builtin_ia32_pmovusqw128mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qw_256, 111757}, // __builtin_ia32_pmovusqw256_mask - {Intrinsic::x86_avx512_mask_pmovus_qw_mem_256, 111856}, // __builtin_ia32_pmovusqw256mem_mask - {Intrinsic::x86_avx512_mask_pmovus_qw_512, 111789}, // __builtin_ia32_pmovusqw512_mask - {Intrinsic::x86_avx512_mask_pmovus_qw_mem_512, 111891}, // __builtin_ia32_pmovusqw512mem_mask - {Intrinsic::x86_avx512_mask_pmovus_wb_128, 111926}, // __builtin_ia32_pmovuswb128_mask - {Intrinsic::x86_avx512_mask_pmovus_wb_mem_128, 112022}, // __builtin_ia32_pmovuswb128mem_mask - {Intrinsic::x86_avx512_mask_pmovus_wb_256, 111958}, // __builtin_ia32_pmovuswb256_mask - {Intrinsic::x86_avx512_mask_pmovus_wb_mem_256, 112057}, // __builtin_ia32_pmovuswb256mem_mask - {Intrinsic::x86_avx512_mask_pmovus_wb_512, 111990}, // __builtin_ia32_pmovuswb512_mask - {Intrinsic::x86_avx512_mask_pmovus_wb_mem_512, 112092}, // __builtin_ia32_pmovuswb512mem_mask - {Intrinsic::x86_avx512_mask_pmov_wb_128, 108986}, // __builtin_ia32_pmovwb128_mask - {Intrinsic::x86_avx512_mask_pmov_wb_mem_128, 109076}, // __builtin_ia32_pmovwb128mem_mask - {Intrinsic::x86_avx512_mask_pmov_wb_256, 109016}, // __builtin_ia32_pmovwb256_mask - {Intrinsic::x86_avx512_mask_pmov_wb_mem_256, 109109}, // __builtin_ia32_pmovwb256mem_mask - {Intrinsic::x86_avx512_mask_pmov_wb_512, 109046}, // __builtin_ia32_pmovwb512_mask - {Intrinsic::x86_avx512_mask_pmov_wb_mem_512, 109142}, // __builtin_ia32_pmovwb512mem_mask - {Intrinsic::x86_avx512_mask_pmovzxb_d_128, 112127}, // __builtin_ia32_pmovzxbd128_mask - {Intrinsic::x86_avx512_mask_pmovzxb_d_256, 112159}, // __builtin_ia32_pmovzxbd256_mask - {Intrinsic::x86_avx512_pmovzxbd, 126129}, // __builtin_ia32_pmovzxbd512 - {Intrinsic::x86_avx512_mask_pmovzxb_d_512, 112191}, // __builtin_ia32_pmovzxbd512_mask - {Intrinsic::x86_avx512_mask_pmovzxb_q_128, 112223}, // __builtin_ia32_pmovzxbq128_mask - {Intrinsic::x86_avx512_mask_pmovzxb_q_256, 112255}, // __builtin_ia32_pmovzxbq256_mask - {Intrinsic::x86_avx512_pmovzxbq, 126156}, // __builtin_ia32_pmovzxbq512 - {Intrinsic::x86_avx512_mask_pmovzxb_q_512, 112287}, // __builtin_ia32_pmovzxbq512_mask - {Intrinsic::x86_avx512_mask_pmovzxb_w_128, 112319}, // __builtin_ia32_pmovzxbw128_mask - {Intrinsic::x86_avx512_mask_pmovzxb_w_256, 112351}, // __builtin_ia32_pmovzxbw256_mask - {Intrinsic::x86_avx512_mask_pmovzxb_w_512, 112383}, // __builtin_ia32_pmovzxbw512_mask - {Intrinsic::x86_avx512_mask_pmovzxd_q_128, 112415}, // __builtin_ia32_pmovzxdq128_mask - {Intrinsic::x86_avx512_mask_pmovzxd_q_256, 112447}, // __builtin_ia32_pmovzxdq256_mask - {Intrinsic::x86_avx512_pmovzxdq, 126183}, // __builtin_ia32_pmovzxdq512 - {Intrinsic::x86_avx512_mask_pmovzxd_q_512, 112479}, // __builtin_ia32_pmovzxdq512_mask - {Intrinsic::x86_avx512_mask_pmovzxw_d_128, 112511}, // __builtin_ia32_pmovzxwd128_mask - {Intrinsic::x86_avx512_mask_pmovzxw_d_256, 112543}, // __builtin_ia32_pmovzxwd256_mask - {Intrinsic::x86_avx512_pmovzxwd, 126210}, // __builtin_ia32_pmovzxwd512 - {Intrinsic::x86_avx512_mask_pmovzxw_d_512, 112575}, // __builtin_ia32_pmovzxwd512_mask - {Intrinsic::x86_avx512_mask_pmovzxw_q_128, 112607}, // __builtin_ia32_pmovzxwq128_mask - {Intrinsic::x86_avx512_mask_pmovzxw_q_256, 112639}, // __builtin_ia32_pmovzxwq256_mask - {Intrinsic::x86_avx512_pmovzxwq, 126237}, // __builtin_ia32_pmovzxwq512 - {Intrinsic::x86_avx512_mask_pmovzxw_q_512, 112671}, // __builtin_ia32_pmovzxwq512_mask - {Intrinsic::x86_sse41_pmuldq, 135252}, // __builtin_ia32_pmuldq128 - {Intrinsic::x86_avx512_mask_pmul_dq_128, 112703}, // __builtin_ia32_pmuldq128_mask - {Intrinsic::x86_avx2_pmul_dq, 91692}, // __builtin_ia32_pmuldq256 - {Intrinsic::x86_avx512_mask_pmul_dq_256, 112733}, // __builtin_ia32_pmuldq256_mask - {Intrinsic::x86_avx512_mask_pmul_dq_512, 112763}, // __builtin_ia32_pmuldq512_mask - {Intrinsic::x86_ssse3_pmul_hr_sw, 136504}, // __builtin_ia32_pmulhrsw - {Intrinsic::x86_ssse3_pmul_hr_sw_128, 136528}, // __builtin_ia32_pmulhrsw128 - {Intrinsic::x86_avx512_mask_pmul_hr_sw_128, 112793}, // __builtin_ia32_pmulhrsw128_mask - {Intrinsic::x86_avx2_pmul_hr_sw, 91717}, // __builtin_ia32_pmulhrsw256 - {Intrinsic::x86_avx512_mask_pmul_hr_sw_256, 112825}, // __builtin_ia32_pmulhrsw256_mask - {Intrinsic::x86_avx512_mask_pmul_hr_sw_512, 112857}, // __builtin_ia32_pmulhrsw512_mask - {Intrinsic::x86_3dnow_pmulhrw, 88282}, // __builtin_ia32_pmulhrw - {Intrinsic::x86_mmx_pmulhu_w, 130881}, // __builtin_ia32_pmulhuw - {Intrinsic::x86_sse2_pmulhu_w, 134037}, // __builtin_ia32_pmulhuw128 - {Intrinsic::x86_avx512_mask_pmulhu_w_128, 112979}, // __builtin_ia32_pmulhuw128_mask - {Intrinsic::x86_avx2_pmulhu_w, 91769}, // __builtin_ia32_pmulhuw256 - {Intrinsic::x86_avx512_mask_pmulhu_w_256, 113010}, // __builtin_ia32_pmulhuw256_mask - {Intrinsic::x86_avx512_mask_pmulhu_w_512, 113041}, // __builtin_ia32_pmulhuw512_mask - {Intrinsic::x86_mmx_pmulh_w, 130859}, // __builtin_ia32_pmulhw - {Intrinsic::x86_sse2_pmulh_w, 134012}, // __builtin_ia32_pmulhw128 - {Intrinsic::x86_avx512_mask_pmulh_w_128, 112889}, // __builtin_ia32_pmulhw128_mask - {Intrinsic::x86_avx2_pmulh_w, 91744}, // __builtin_ia32_pmulhw256 - {Intrinsic::x86_avx512_mask_pmulh_w_256, 112919}, // __builtin_ia32_pmulhw256_mask - {Intrinsic::x86_avx512_mask_pmulh_w_512, 112949}, // __builtin_ia32_pmulhw512_mask - {Intrinsic::x86_avx512_mask_pmull_d_128, 113072}, // __builtin_ia32_pmulld128_mask - {Intrinsic::x86_avx512_mask_pmull_d_256, 113102}, // __builtin_ia32_pmulld256_mask - {Intrinsic::x86_avx512_mask_pmull_d_512, 113132}, // __builtin_ia32_pmulld512_mask - {Intrinsic::x86_avx512_mask_pmull_q_128, 113162}, // __builtin_ia32_pmullq128_mask - {Intrinsic::x86_avx512_mask_pmull_q_256, 113192}, // __builtin_ia32_pmullq256_mask - {Intrinsic::x86_avx512_mask_pmull_q_512, 113222}, // __builtin_ia32_pmullq512_mask - {Intrinsic::x86_mmx_pmull_w, 130904}, // __builtin_ia32_pmullw - {Intrinsic::x86_avx512_mask_pmull_w_128, 113252}, // __builtin_ia32_pmullw128_mask - {Intrinsic::x86_avx512_mask_pmull_w_256, 113282}, // __builtin_ia32_pmullw256_mask - {Intrinsic::x86_avx512_mask_pmull_w_512, 113312}, // __builtin_ia32_pmullw512_mask - {Intrinsic::x86_mmx_pmulu_dq, 130926}, // __builtin_ia32_pmuludq - {Intrinsic::x86_sse2_pmulu_dq, 134063}, // __builtin_ia32_pmuludq128 - {Intrinsic::x86_avx512_mask_pmulu_dq_128, 113456}, // __builtin_ia32_pmuludq128_mask - {Intrinsic::x86_avx2_pmulu_dq, 91795}, // __builtin_ia32_pmuludq256 - {Intrinsic::x86_avx512_mask_pmulu_dq_256, 113487}, // __builtin_ia32_pmuludq256_mask - {Intrinsic::x86_avx512_mask_pmulu_dq_512, 113518}, // __builtin_ia32_pmuludq512_mask - {Intrinsic::x86_mmx_por, 130949}, // __builtin_ia32_por - {Intrinsic::x86_avx512_mask_prol_d_128, 113549}, // __builtin_ia32_prold128_mask - {Intrinsic::x86_avx512_mask_prol_d_256, 113578}, // __builtin_ia32_prold256_mask - {Intrinsic::x86_avx512_mask_prol_d_512, 113607}, // __builtin_ia32_prold512_mask - {Intrinsic::x86_avx512_mask_prol_q_128, 113636}, // __builtin_ia32_prolq128_mask - {Intrinsic::x86_avx512_mask_prol_q_256, 113665}, // __builtin_ia32_prolq256_mask - {Intrinsic::x86_avx512_mask_prol_q_512, 113694}, // __builtin_ia32_prolq512_mask - {Intrinsic::x86_avx512_mask_prolv_d_128, 113723}, // __builtin_ia32_prolvd128_mask - {Intrinsic::x86_avx512_mask_prolv_d_256, 113753}, // __builtin_ia32_prolvd256_mask - {Intrinsic::x86_avx512_mask_prolv_d_512, 113783}, // __builtin_ia32_prolvd512_mask - {Intrinsic::x86_avx512_mask_prolv_q_128, 113813}, // __builtin_ia32_prolvq128_mask - {Intrinsic::x86_avx512_mask_prolv_q_256, 113843}, // __builtin_ia32_prolvq256_mask - {Intrinsic::x86_avx512_mask_prolv_q_512, 113873}, // __builtin_ia32_prolvq512_mask - {Intrinsic::x86_avx512_mask_pror_d_128, 113903}, // __builtin_ia32_prord128_mask - {Intrinsic::x86_avx512_mask_pror_d_256, 113932}, // __builtin_ia32_prord256_mask - {Intrinsic::x86_avx512_mask_pror_d_512, 113961}, // __builtin_ia32_prord512_mask - {Intrinsic::x86_avx512_mask_pror_q_128, 113990}, // __builtin_ia32_prorq128_mask - {Intrinsic::x86_avx512_mask_pror_q_256, 114019}, // __builtin_ia32_prorq256_mask - {Intrinsic::x86_avx512_mask_pror_q_512, 114048}, // __builtin_ia32_prorq512_mask - {Intrinsic::x86_avx512_mask_prorv_d_128, 114077}, // __builtin_ia32_prorvd128_mask - {Intrinsic::x86_avx512_mask_prorv_d_256, 114107}, // __builtin_ia32_prorvd256_mask - {Intrinsic::x86_avx512_mask_prorv_d_512, 114137}, // __builtin_ia32_prorvd512_mask - {Intrinsic::x86_avx512_mask_prorv_q_128, 114167}, // __builtin_ia32_prorvq128_mask - {Intrinsic::x86_avx512_mask_prorv_q_256, 114197}, // __builtin_ia32_prorvq256_mask - {Intrinsic::x86_avx512_mask_prorv_q_512, 114227}, // __builtin_ia32_prorvq512_mask - {Intrinsic::x86_mmx_psad_bw, 130968}, // __builtin_ia32_psadbw - {Intrinsic::x86_sse2_psad_bw, 134089}, // __builtin_ia32_psadbw128 - {Intrinsic::x86_avx2_psad_bw, 91821}, // __builtin_ia32_psadbw256 - {Intrinsic::x86_avx512_psad_bw_512, 126264}, // __builtin_ia32_psadbw512 - {Intrinsic::x86_ssse3_pshuf_b, 136555}, // __builtin_ia32_pshufb - {Intrinsic::x86_ssse3_pshuf_b_128, 136577}, // __builtin_ia32_pshufb128 - {Intrinsic::x86_avx512_mask_pshuf_b_128, 114257}, // __builtin_ia32_pshufb128_mask - {Intrinsic::x86_avx2_pshuf_b, 91846}, // __builtin_ia32_pshufb256 - {Intrinsic::x86_avx512_mask_pshuf_b_256, 114287}, // __builtin_ia32_pshufb256_mask - {Intrinsic::x86_avx512_mask_pshuf_b_512, 114317}, // __builtin_ia32_pshufb512_mask - {Intrinsic::x86_sse_pshuf_w, 132679}, // __builtin_ia32_pshufw - {Intrinsic::x86_ssse3_psign_b, 136602}, // __builtin_ia32_psignb - {Intrinsic::x86_ssse3_psign_b_128, 136624}, // __builtin_ia32_psignb128 - {Intrinsic::x86_avx2_psign_b, 91871}, // __builtin_ia32_psignb256 - {Intrinsic::x86_ssse3_psign_d, 136649}, // __builtin_ia32_psignd - {Intrinsic::x86_ssse3_psign_d_128, 136671}, // __builtin_ia32_psignd128 - {Intrinsic::x86_avx2_psign_d, 91896}, // __builtin_ia32_psignd256 - {Intrinsic::x86_ssse3_psign_w, 136696}, // __builtin_ia32_psignw - {Intrinsic::x86_ssse3_psign_w_128, 136718}, // __builtin_ia32_psignw128 - {Intrinsic::x86_avx2_psign_w, 91921}, // __builtin_ia32_psignw256 - {Intrinsic::x86_mmx_psll_d, 130990}, // __builtin_ia32_pslld - {Intrinsic::x86_sse2_psll_d, 134114}, // __builtin_ia32_pslld128 - {Intrinsic::x86_avx512_mask_psll_d_128, 114376}, // __builtin_ia32_pslld128_mask - {Intrinsic::x86_avx2_psll_d, 91946}, // __builtin_ia32_pslld256 - {Intrinsic::x86_avx512_mask_psll_d_256, 114405}, // __builtin_ia32_pslld256_mask - {Intrinsic::x86_avx512_mask_psll_d, 114347}, // __builtin_ia32_pslld512_mask - {Intrinsic::x86_mmx_pslli_d, 131053}, // __builtin_ia32_pslldi - {Intrinsic::x86_sse2_pslli_d, 134186}, // __builtin_ia32_pslldi128 - {Intrinsic::x86_avx512_mask_psll_di_128, 114434}, // __builtin_ia32_pslldi128_mask - {Intrinsic::x86_avx2_pslli_d, 92018}, // __builtin_ia32_pslldi256 - {Intrinsic::x86_avx512_mask_psll_di_256, 114464}, // __builtin_ia32_pslldi256_mask - {Intrinsic::x86_avx512_mask_psll_di_512, 114494}, // __builtin_ia32_pslldi512_mask - {Intrinsic::x86_mmx_psll_q, 131011}, // __builtin_ia32_psllq - {Intrinsic::x86_sse2_psll_q, 134138}, // __builtin_ia32_psllq128 - {Intrinsic::x86_avx512_mask_psll_q_128, 114553}, // __builtin_ia32_psllq128_mask - {Intrinsic::x86_avx2_psll_q, 91970}, // __builtin_ia32_psllq256 - {Intrinsic::x86_avx512_mask_psll_q_256, 114582}, // __builtin_ia32_psllq256_mask - {Intrinsic::x86_avx512_mask_psll_q, 114524}, // __builtin_ia32_psllq512_mask - {Intrinsic::x86_mmx_pslli_q, 131075}, // __builtin_ia32_psllqi - {Intrinsic::x86_sse2_pslli_q, 134211}, // __builtin_ia32_psllqi128 - {Intrinsic::x86_avx512_mask_psll_qi_128, 114611}, // __builtin_ia32_psllqi128_mask - {Intrinsic::x86_avx2_pslli_q, 92043}, // __builtin_ia32_psllqi256 - {Intrinsic::x86_avx512_mask_psll_qi_256, 114641}, // __builtin_ia32_psllqi256_mask - {Intrinsic::x86_avx512_mask_psll_qi_512, 114671}, // __builtin_ia32_psllqi512_mask - {Intrinsic::x86_avx512_mask_psllv16_hi, 114937}, // __builtin_ia32_psllv16hi_mask - {Intrinsic::x86_avx512_mask_psllv_d, 114878}, // __builtin_ia32_psllv16si_mask - {Intrinsic::x86_avx2_psllv_q, 92141}, // __builtin_ia32_psllv2di - {Intrinsic::x86_avx512_mask_psllv2_di, 114967}, // __builtin_ia32_psllv2di_mask - {Intrinsic::x86_avx512_mask_psllv32hi, 114996}, // __builtin_ia32_psllv32hi_mask - {Intrinsic::x86_avx2_psllv_q_256, 92165}, // __builtin_ia32_psllv4di - {Intrinsic::x86_avx512_mask_psllv4_di, 115026}, // __builtin_ia32_psllv4di_mask - {Intrinsic::x86_avx2_psllv_d, 92093}, // __builtin_ia32_psllv4si - {Intrinsic::x86_avx512_mask_psllv4_si, 115055}, // __builtin_ia32_psllv4si_mask - {Intrinsic::x86_avx512_mask_psllv_q, 114908}, // __builtin_ia32_psllv8di_mask - {Intrinsic::x86_avx512_mask_psllv8_hi, 115084}, // __builtin_ia32_psllv8hi_mask - {Intrinsic::x86_avx2_psllv_d_256, 92117}, // __builtin_ia32_psllv8si - {Intrinsic::x86_avx512_mask_psllv8_si, 115113}, // __builtin_ia32_psllv8si_mask - {Intrinsic::x86_mmx_psll_w, 131032}, // __builtin_ia32_psllw - {Intrinsic::x86_sse2_psll_w, 134162}, // __builtin_ia32_psllw128 - {Intrinsic::x86_avx512_mask_psll_w_128, 114701}, // __builtin_ia32_psllw128_mask - {Intrinsic::x86_avx2_psll_w, 91994}, // __builtin_ia32_psllw256 - {Intrinsic::x86_avx512_mask_psll_w_256, 114730}, // __builtin_ia32_psllw256_mask - {Intrinsic::x86_avx512_mask_psll_w_512, 114759}, // __builtin_ia32_psllw512_mask - {Intrinsic::x86_mmx_pslli_w, 131097}, // __builtin_ia32_psllwi - {Intrinsic::x86_sse2_pslli_w, 134236}, // __builtin_ia32_psllwi128 - {Intrinsic::x86_avx512_mask_psll_wi_128, 114788}, // __builtin_ia32_psllwi128_mask - {Intrinsic::x86_avx2_pslli_w, 92068}, // __builtin_ia32_psllwi256 - {Intrinsic::x86_avx512_mask_psll_wi_256, 114818}, // __builtin_ia32_psllwi256_mask - {Intrinsic::x86_avx512_mask_psll_wi_512, 114848}, // __builtin_ia32_psllwi512_mask - {Intrinsic::x86_mmx_psra_d, 131119}, // __builtin_ia32_psrad - {Intrinsic::x86_sse2_psra_d, 134261}, // __builtin_ia32_psrad128 - {Intrinsic::x86_avx512_mask_psra_d_128, 115171}, // __builtin_ia32_psrad128_mask - {Intrinsic::x86_avx2_psra_d, 92189}, // __builtin_ia32_psrad256 - {Intrinsic::x86_avx512_mask_psra_d_256, 115200}, // __builtin_ia32_psrad256_mask - {Intrinsic::x86_avx512_mask_psra_d, 115142}, // __builtin_ia32_psrad512_mask - {Intrinsic::x86_mmx_psrai_d, 131161}, // __builtin_ia32_psradi - {Intrinsic::x86_sse2_psrai_d, 134309}, // __builtin_ia32_psradi128 - {Intrinsic::x86_avx512_mask_psra_di_128, 115229}, // __builtin_ia32_psradi128_mask - {Intrinsic::x86_avx2_psrai_d, 92237}, // __builtin_ia32_psradi256 - {Intrinsic::x86_avx512_mask_psra_di_256, 115259}, // __builtin_ia32_psradi256_mask - {Intrinsic::x86_avx512_mask_psra_di_512, 115289}, // __builtin_ia32_psradi512_mask - {Intrinsic::x86_avx512_mask_psra_q_128, 115348}, // __builtin_ia32_psraq128_mask - {Intrinsic::x86_avx512_mask_psra_q_256, 115377}, // __builtin_ia32_psraq256_mask - {Intrinsic::x86_avx512_mask_psra_q, 115319}, // __builtin_ia32_psraq512_mask - {Intrinsic::x86_avx512_mask_psra_qi_128, 115406}, // __builtin_ia32_psraqi128_mask - {Intrinsic::x86_avx512_mask_psra_qi_256, 115436}, // __builtin_ia32_psraqi256_mask - {Intrinsic::x86_avx512_mask_psra_qi_512, 115466}, // __builtin_ia32_psraqi512_mask - {Intrinsic::x86_avx512_mask_psrav16_hi, 115792}, // __builtin_ia32_psrav16hi_mask - {Intrinsic::x86_avx512_mask_psrav_d, 115673}, // __builtin_ia32_psrav16si_mask - {Intrinsic::x86_avx512_mask_psrav32_hi, 115822}, // __builtin_ia32_psrav32hi_mask - {Intrinsic::x86_avx2_psrav_d, 92287}, // __builtin_ia32_psrav4si - {Intrinsic::x86_avx512_mask_psrav4_si, 115852}, // __builtin_ia32_psrav4si_mask - {Intrinsic::x86_avx512_mask_psrav_q, 115703}, // __builtin_ia32_psrav8di_mask - {Intrinsic::x86_avx512_mask_psrav8_hi, 115881}, // __builtin_ia32_psrav8hi_mask - {Intrinsic::x86_avx2_psrav_d_256, 92311}, // __builtin_ia32_psrav8si - {Intrinsic::x86_avx512_mask_psrav8_si, 115910}, // __builtin_ia32_psrav8si_mask - {Intrinsic::x86_avx512_mask_psrav_q_128, 115732}, // __builtin_ia32_psravq128_mask - {Intrinsic::x86_avx512_mask_psrav_q_256, 115762}, // __builtin_ia32_psravq256_mask - {Intrinsic::x86_mmx_psra_w, 131140}, // __builtin_ia32_psraw - {Intrinsic::x86_sse2_psra_w, 134285}, // __builtin_ia32_psraw128 - {Intrinsic::x86_avx512_mask_psra_w_128, 115496}, // __builtin_ia32_psraw128_mask - {Intrinsic::x86_avx2_psra_w, 92213}, // __builtin_ia32_psraw256 - {Intrinsic::x86_avx512_mask_psra_w_256, 115525}, // __builtin_ia32_psraw256_mask - {Intrinsic::x86_avx512_mask_psra_w_512, 115554}, // __builtin_ia32_psraw512_mask - {Intrinsic::x86_mmx_psrai_w, 131183}, // __builtin_ia32_psrawi - {Intrinsic::x86_sse2_psrai_w, 134334}, // __builtin_ia32_psrawi128 - {Intrinsic::x86_avx512_mask_psra_wi_128, 115583}, // __builtin_ia32_psrawi128_mask - {Intrinsic::x86_avx2_psrai_w, 92262}, // __builtin_ia32_psrawi256 - {Intrinsic::x86_avx512_mask_psra_wi_256, 115613}, // __builtin_ia32_psrawi256_mask - {Intrinsic::x86_avx512_mask_psra_wi_512, 115643}, // __builtin_ia32_psrawi512_mask - {Intrinsic::x86_mmx_psrl_d, 131205}, // __builtin_ia32_psrld - {Intrinsic::x86_sse2_psrl_d, 134359}, // __builtin_ia32_psrld128 - {Intrinsic::x86_avx512_mask_psrl_d_128, 115968}, // __builtin_ia32_psrld128_mask - {Intrinsic::x86_avx2_psrl_d, 92335}, // __builtin_ia32_psrld256 - {Intrinsic::x86_avx512_mask_psrl_d_256, 115997}, // __builtin_ia32_psrld256_mask - {Intrinsic::x86_avx512_mask_psrl_d, 115939}, // __builtin_ia32_psrld512_mask - {Intrinsic::x86_mmx_psrli_d, 131268}, // __builtin_ia32_psrldi - {Intrinsic::x86_sse2_psrli_d, 134431}, // __builtin_ia32_psrldi128 - {Intrinsic::x86_avx512_mask_psrl_di_128, 116026}, // __builtin_ia32_psrldi128_mask - {Intrinsic::x86_avx2_psrli_d, 92407}, // __builtin_ia32_psrldi256 - {Intrinsic::x86_avx512_mask_psrl_di_256, 116056}, // __builtin_ia32_psrldi256_mask - {Intrinsic::x86_avx512_mask_psrl_di_512, 116086}, // __builtin_ia32_psrldi512_mask - {Intrinsic::x86_mmx_psrl_q, 131226}, // __builtin_ia32_psrlq - {Intrinsic::x86_sse2_psrl_q, 134383}, // __builtin_ia32_psrlq128 - {Intrinsic::x86_avx512_mask_psrl_q_128, 116145}, // __builtin_ia32_psrlq128_mask - {Intrinsic::x86_avx2_psrl_q, 92359}, // __builtin_ia32_psrlq256 - {Intrinsic::x86_avx512_mask_psrl_q_256, 116174}, // __builtin_ia32_psrlq256_mask - {Intrinsic::x86_avx512_mask_psrl_q, 116116}, // __builtin_ia32_psrlq512_mask - {Intrinsic::x86_mmx_psrli_q, 131290}, // __builtin_ia32_psrlqi - {Intrinsic::x86_sse2_psrli_q, 134456}, // __builtin_ia32_psrlqi128 - {Intrinsic::x86_avx512_mask_psrl_qi_128, 116203}, // __builtin_ia32_psrlqi128_mask - {Intrinsic::x86_avx2_psrli_q, 92432}, // __builtin_ia32_psrlqi256 - {Intrinsic::x86_avx512_mask_psrl_qi_256, 116233}, // __builtin_ia32_psrlqi256_mask - {Intrinsic::x86_avx512_mask_psrl_qi_512, 116263}, // __builtin_ia32_psrlqi512_mask - {Intrinsic::x86_avx512_mask_psrlv16_hi, 116529}, // __builtin_ia32_psrlv16hi_mask - {Intrinsic::x86_avx512_mask_psrlv_d, 116470}, // __builtin_ia32_psrlv16si_mask - {Intrinsic::x86_avx2_psrlv_q, 92530}, // __builtin_ia32_psrlv2di - {Intrinsic::x86_avx512_mask_psrlv2_di, 116559}, // __builtin_ia32_psrlv2di_mask - {Intrinsic::x86_avx512_mask_psrlv32hi, 116588}, // __builtin_ia32_psrlv32hi_mask - {Intrinsic::x86_avx2_psrlv_q_256, 92554}, // __builtin_ia32_psrlv4di - {Intrinsic::x86_avx512_mask_psrlv4_di, 116618}, // __builtin_ia32_psrlv4di_mask - {Intrinsic::x86_avx2_psrlv_d, 92482}, // __builtin_ia32_psrlv4si - {Intrinsic::x86_avx512_mask_psrlv4_si, 116647}, // __builtin_ia32_psrlv4si_mask - {Intrinsic::x86_avx512_mask_psrlv_q, 116500}, // __builtin_ia32_psrlv8di_mask - {Intrinsic::x86_avx512_mask_psrlv8_hi, 116676}, // __builtin_ia32_psrlv8hi_mask - {Intrinsic::x86_avx2_psrlv_d_256, 92506}, // __builtin_ia32_psrlv8si - {Intrinsic::x86_avx512_mask_psrlv8_si, 116705}, // __builtin_ia32_psrlv8si_mask - {Intrinsic::x86_mmx_psrl_w, 131247}, // __builtin_ia32_psrlw - {Intrinsic::x86_sse2_psrl_w, 134407}, // __builtin_ia32_psrlw128 - {Intrinsic::x86_avx512_mask_psrl_w_128, 116293}, // __builtin_ia32_psrlw128_mask - {Intrinsic::x86_avx2_psrl_w, 92383}, // __builtin_ia32_psrlw256 - {Intrinsic::x86_avx512_mask_psrl_w_256, 116322}, // __builtin_ia32_psrlw256_mask - {Intrinsic::x86_avx512_mask_psrl_w_512, 116351}, // __builtin_ia32_psrlw512_mask - {Intrinsic::x86_mmx_psrli_w, 131312}, // __builtin_ia32_psrlwi - {Intrinsic::x86_sse2_psrli_w, 134481}, // __builtin_ia32_psrlwi128 - {Intrinsic::x86_avx512_mask_psrl_wi_128, 116380}, // __builtin_ia32_psrlwi128_mask - {Intrinsic::x86_avx2_psrli_w, 92457}, // __builtin_ia32_psrlwi256 - {Intrinsic::x86_avx512_mask_psrl_wi_256, 116410}, // __builtin_ia32_psrlwi256_mask - {Intrinsic::x86_avx512_mask_psrl_wi_512, 116440}, // __builtin_ia32_psrlwi512_mask - {Intrinsic::x86_mmx_psub_b, 131334}, // __builtin_ia32_psubb - {Intrinsic::x86_avx512_mask_psub_b_128, 116734}, // __builtin_ia32_psubb128_mask - {Intrinsic::x86_avx512_mask_psub_b_256, 116763}, // __builtin_ia32_psubb256_mask - {Intrinsic::x86_avx512_mask_psub_b_512, 116792}, // __builtin_ia32_psubb512_mask - {Intrinsic::x86_mmx_psub_d, 131355}, // __builtin_ia32_psubd - {Intrinsic::x86_avx512_mask_psub_d_128, 116821}, // __builtin_ia32_psubd128_mask - {Intrinsic::x86_avx512_mask_psub_d_256, 116850}, // __builtin_ia32_psubd256_mask - {Intrinsic::x86_avx512_mask_psub_d_512, 116879}, // __builtin_ia32_psubd512_mask - {Intrinsic::x86_mmx_psub_q, 131376}, // __builtin_ia32_psubq - {Intrinsic::x86_avx512_mask_psub_q_128, 116908}, // __builtin_ia32_psubq128_mask - {Intrinsic::x86_avx512_mask_psub_q_256, 116937}, // __builtin_ia32_psubq256_mask - {Intrinsic::x86_avx512_mask_psub_q_512, 116966}, // __builtin_ia32_psubq512_mask - {Intrinsic::x86_mmx_psubs_b, 131418}, // __builtin_ia32_psubsb - {Intrinsic::x86_sse2_psubs_b, 134506}, // __builtin_ia32_psubsb128 - {Intrinsic::x86_avx512_mask_psubs_b_128, 117082}, // __builtin_ia32_psubsb128_mask - {Intrinsic::x86_avx2_psubs_b, 92578}, // __builtin_ia32_psubsb256 - {Intrinsic::x86_avx512_mask_psubs_b_256, 117112}, // __builtin_ia32_psubsb256_mask - {Intrinsic::x86_avx512_mask_psubs_b_512, 117142}, // __builtin_ia32_psubsb512_mask - {Intrinsic::x86_mmx_psubs_w, 131440}, // __builtin_ia32_psubsw - {Intrinsic::x86_sse2_psubs_w, 134531}, // __builtin_ia32_psubsw128 - {Intrinsic::x86_avx512_mask_psubs_w_128, 117172}, // __builtin_ia32_psubsw128_mask - {Intrinsic::x86_avx2_psubs_w, 92603}, // __builtin_ia32_psubsw256 - {Intrinsic::x86_avx512_mask_psubs_w_256, 117202}, // __builtin_ia32_psubsw256_mask - {Intrinsic::x86_avx512_mask_psubs_w_512, 117232}, // __builtin_ia32_psubsw512_mask - {Intrinsic::x86_mmx_psubus_b, 131462}, // __builtin_ia32_psubusb - {Intrinsic::x86_sse2_psubus_b, 134556}, // __builtin_ia32_psubusb128 - {Intrinsic::x86_avx512_mask_psubus_b_128, 117262}, // __builtin_ia32_psubusb128_mask - {Intrinsic::x86_avx2_psubus_b, 92628}, // __builtin_ia32_psubusb256 - {Intrinsic::x86_avx512_mask_psubus_b_256, 117293}, // __builtin_ia32_psubusb256_mask - {Intrinsic::x86_avx512_mask_psubus_b_512, 117324}, // __builtin_ia32_psubusb512_mask - {Intrinsic::x86_mmx_psubus_w, 131485}, // __builtin_ia32_psubusw - {Intrinsic::x86_sse2_psubus_w, 134582}, // __builtin_ia32_psubusw128 - {Intrinsic::x86_avx512_mask_psubus_w_128, 117355}, // __builtin_ia32_psubusw128_mask - {Intrinsic::x86_avx2_psubus_w, 92654}, // __builtin_ia32_psubusw256 - {Intrinsic::x86_avx512_mask_psubus_w_256, 117386}, // __builtin_ia32_psubusw256_mask - {Intrinsic::x86_avx512_mask_psubus_w_512, 117417}, // __builtin_ia32_psubusw512_mask - {Intrinsic::x86_mmx_psub_w, 131397}, // __builtin_ia32_psubw - {Intrinsic::x86_avx512_mask_psub_w_128, 116995}, // __builtin_ia32_psubw128_mask - {Intrinsic::x86_avx512_mask_psub_w_256, 117024}, // __builtin_ia32_psubw256_mask - {Intrinsic::x86_avx512_mask_psub_w_512, 117053}, // __builtin_ia32_psubw512_mask - {Intrinsic::x86_avx512_mask_pternlog_d_128, 117448}, // __builtin_ia32_pternlogd128_mask - {Intrinsic::x86_avx512_maskz_pternlog_d_128, 124546}, // __builtin_ia32_pternlogd128_maskz - {Intrinsic::x86_avx512_mask_pternlog_d_256, 117481}, // __builtin_ia32_pternlogd256_mask - {Intrinsic::x86_avx512_maskz_pternlog_d_256, 124580}, // __builtin_ia32_pternlogd256_maskz - {Intrinsic::x86_avx512_mask_pternlog_d_512, 117514}, // __builtin_ia32_pternlogd512_mask - {Intrinsic::x86_avx512_maskz_pternlog_d_512, 124614}, // __builtin_ia32_pternlogd512_maskz - {Intrinsic::x86_avx512_mask_pternlog_q_128, 117547}, // __builtin_ia32_pternlogq128_mask - {Intrinsic::x86_avx512_maskz_pternlog_q_128, 124648}, // __builtin_ia32_pternlogq128_maskz - {Intrinsic::x86_avx512_mask_pternlog_q_256, 117580}, // __builtin_ia32_pternlogq256_mask - {Intrinsic::x86_avx512_maskz_pternlog_q_256, 124682}, // __builtin_ia32_pternlogq256_maskz - {Intrinsic::x86_avx512_mask_pternlog_q_512, 117613}, // __builtin_ia32_pternlogq512_mask - {Intrinsic::x86_avx512_maskz_pternlog_q_512, 124716}, // __builtin_ia32_pternlogq512_maskz - {Intrinsic::x86_sse41_ptestc, 135277}, // __builtin_ia32_ptestc128 - {Intrinsic::x86_avx_ptestc_256, 89466}, // __builtin_ia32_ptestc256 - {Intrinsic::x86_avx512_ptestm_b_128, 126289}, // __builtin_ia32_ptestmb128 - {Intrinsic::x86_avx512_ptestm_b_256, 126315}, // __builtin_ia32_ptestmb256 - {Intrinsic::x86_avx512_ptestm_b_512, 126341}, // __builtin_ia32_ptestmb512 - {Intrinsic::x86_avx512_ptestm_d_128, 126367}, // __builtin_ia32_ptestmd128 - {Intrinsic::x86_avx512_ptestm_d_256, 126393}, // __builtin_ia32_ptestmd256 - {Intrinsic::x86_avx512_ptestm_d_512, 126419}, // __builtin_ia32_ptestmd512 - {Intrinsic::x86_avx512_ptestm_q_128, 126445}, // __builtin_ia32_ptestmq128 - {Intrinsic::x86_avx512_ptestm_q_256, 126471}, // __builtin_ia32_ptestmq256 - {Intrinsic::x86_avx512_ptestm_q_512, 126497}, // __builtin_ia32_ptestmq512 - {Intrinsic::x86_avx512_ptestm_w_128, 126523}, // __builtin_ia32_ptestmw128 - {Intrinsic::x86_avx512_ptestm_w_256, 126549}, // __builtin_ia32_ptestmw256 - {Intrinsic::x86_avx512_ptestm_w_512, 126575}, // __builtin_ia32_ptestmw512 - {Intrinsic::x86_avx512_ptestnm_b_128, 126601}, // __builtin_ia32_ptestnmb128 - {Intrinsic::x86_avx512_ptestnm_b_256, 126628}, // __builtin_ia32_ptestnmb256 - {Intrinsic::x86_avx512_ptestnm_b_512, 126655}, // __builtin_ia32_ptestnmb512 - {Intrinsic::x86_avx512_ptestnm_d_128, 126682}, // __builtin_ia32_ptestnmd128 - {Intrinsic::x86_avx512_ptestnm_d_256, 126709}, // __builtin_ia32_ptestnmd256 - {Intrinsic::x86_avx512_ptestnm_d_512, 126736}, // __builtin_ia32_ptestnmd512 - {Intrinsic::x86_avx512_ptestnm_q_128, 126763}, // __builtin_ia32_ptestnmq128 - {Intrinsic::x86_avx512_ptestnm_q_256, 126790}, // __builtin_ia32_ptestnmq256 - {Intrinsic::x86_avx512_ptestnm_q_512, 126817}, // __builtin_ia32_ptestnmq512 - {Intrinsic::x86_avx512_ptestnm_w_128, 126844}, // __builtin_ia32_ptestnmw128 - {Intrinsic::x86_avx512_ptestnm_w_256, 126871}, // __builtin_ia32_ptestnmw256 - {Intrinsic::x86_avx512_ptestnm_w_512, 126898}, // __builtin_ia32_ptestnmw512 - {Intrinsic::x86_sse41_ptestnzc, 135302}, // __builtin_ia32_ptestnzc128 - {Intrinsic::x86_avx_ptestnzc_256, 89491}, // __builtin_ia32_ptestnzc256 - {Intrinsic::x86_sse41_ptestz, 135329}, // __builtin_ia32_ptestz128 - {Intrinsic::x86_avx_ptestz_256, 89518}, // __builtin_ia32_ptestz256 - {Intrinsic::x86_mmx_punpckhbw, 131508}, // __builtin_ia32_punpckhbw - {Intrinsic::x86_mmx_punpckhdq, 131533}, // __builtin_ia32_punpckhdq - {Intrinsic::x86_mmx_punpckhwd, 131558}, // __builtin_ia32_punpckhwd - {Intrinsic::x86_mmx_punpcklbw, 131583}, // __builtin_ia32_punpcklbw - {Intrinsic::x86_mmx_punpckldq, 131608}, // __builtin_ia32_punpckldq - {Intrinsic::x86_mmx_punpcklwd, 131633}, // __builtin_ia32_punpcklwd - {Intrinsic::x86_mmx_pxor, 131658}, // __builtin_ia32_pxor - {Intrinsic::x86_avx512_mask_range_pd_128, 117646}, // __builtin_ia32_rangepd128_mask - {Intrinsic::x86_avx512_mask_range_pd_256, 117677}, // __builtin_ia32_rangepd256_mask - {Intrinsic::x86_avx512_mask_range_pd_512, 117708}, // __builtin_ia32_rangepd512_mask - {Intrinsic::x86_avx512_mask_range_ps_128, 117739}, // __builtin_ia32_rangeps128_mask - {Intrinsic::x86_avx512_mask_range_ps_256, 117770}, // __builtin_ia32_rangeps256_mask - {Intrinsic::x86_avx512_mask_range_ps_512, 117801}, // __builtin_ia32_rangeps512_mask - {Intrinsic::x86_avx512_mask_range_sd, 117832}, // __builtin_ia32_rangesd128_round_mask - {Intrinsic::x86_avx512_mask_range_ss, 117869}, // __builtin_ia32_rangess128_round_mask - {Intrinsic::x86_avx512_rcp14_pd_128, 126925}, // __builtin_ia32_rcp14pd128_mask - {Intrinsic::x86_avx512_rcp14_pd_256, 126956}, // __builtin_ia32_rcp14pd256_mask - {Intrinsic::x86_avx512_rcp14_pd_512, 126987}, // __builtin_ia32_rcp14pd512_mask - {Intrinsic::x86_avx512_rcp14_ps_128, 127018}, // __builtin_ia32_rcp14ps128_mask - {Intrinsic::x86_avx512_rcp14_ps_256, 127049}, // __builtin_ia32_rcp14ps256_mask - {Intrinsic::x86_avx512_rcp14_ps_512, 127080}, // __builtin_ia32_rcp14ps512_mask - {Intrinsic::x86_avx512_rcp14_sd, 127111}, // __builtin_ia32_rcp14sd_mask - {Intrinsic::x86_avx512_rcp14_ss, 127139}, // __builtin_ia32_rcp14ss_mask - {Intrinsic::x86_avx512_rcp28_pd, 127167}, // __builtin_ia32_rcp28pd_mask - {Intrinsic::x86_avx512_rcp28_ps, 127195}, // __builtin_ia32_rcp28ps_mask - {Intrinsic::x86_avx512_rcp28_sd, 127223}, // __builtin_ia32_rcp28sd_round_mask - {Intrinsic::x86_avx512_rcp28_ss, 127257}, // __builtin_ia32_rcp28ss_round_mask - {Intrinsic::x86_sse_rcp_ps, 132701}, // __builtin_ia32_rcpps - {Intrinsic::x86_avx_rcp_ps_256, 89543}, // __builtin_ia32_rcpps256 - {Intrinsic::x86_sse_rcp_ss, 132722}, // __builtin_ia32_rcpss - {Intrinsic::x86_rdfsbase_32, 131752}, // __builtin_ia32_rdfsbase32 - {Intrinsic::x86_rdfsbase_64, 131778}, // __builtin_ia32_rdfsbase64 - {Intrinsic::x86_rdgsbase_32, 131804}, // __builtin_ia32_rdgsbase32 - {Intrinsic::x86_rdgsbase_64, 131830}, // __builtin_ia32_rdgsbase64 - {Intrinsic::x86_rdpkru, 131856}, // __builtin_ia32_rdpkru - {Intrinsic::x86_rdpmc, 131878}, // __builtin_ia32_rdpmc - {Intrinsic::x86_rdtsc, 131899}, // __builtin_ia32_rdtsc - {Intrinsic::x86_rdtscp, 131920}, // __builtin_ia32_rdtscp - {Intrinsic::x86_flags_read_u32, 129035}, // __builtin_ia32_readeflags_u32 - {Intrinsic::x86_flags_read_u64, 129065}, // __builtin_ia32_readeflags_u64 - {Intrinsic::x86_avx512_mask_reduce_pd_128, 117906}, // __builtin_ia32_reducepd128_mask - {Intrinsic::x86_avx512_mask_reduce_pd_256, 117938}, // __builtin_ia32_reducepd256_mask - {Intrinsic::x86_avx512_mask_reduce_pd_512, 117970}, // __builtin_ia32_reducepd512_mask - {Intrinsic::x86_avx512_mask_reduce_ps_128, 118002}, // __builtin_ia32_reduceps128_mask - {Intrinsic::x86_avx512_mask_reduce_ps_256, 118034}, // __builtin_ia32_reduceps256_mask - {Intrinsic::x86_avx512_mask_reduce_ps_512, 118066}, // __builtin_ia32_reduceps512_mask - {Intrinsic::x86_avx512_mask_reduce_sd, 118098}, // __builtin_ia32_reducesd_mask - {Intrinsic::x86_avx512_mask_reduce_ss, 118127}, // __builtin_ia32_reducess_mask - {Intrinsic::x86_avx512_mask_rndscale_pd_128, 118156}, // __builtin_ia32_rndscalepd_128_mask - {Intrinsic::x86_avx512_mask_rndscale_pd_256, 118191}, // __builtin_ia32_rndscalepd_256_mask - {Intrinsic::x86_avx512_mask_rndscale_pd_512, 118226}, // __builtin_ia32_rndscalepd_mask - {Intrinsic::x86_avx512_mask_rndscale_ps_128, 118257}, // __builtin_ia32_rndscaleps_128_mask - {Intrinsic::x86_avx512_mask_rndscale_ps_256, 118292}, // __builtin_ia32_rndscaleps_256_mask - {Intrinsic::x86_avx512_mask_rndscale_ps_512, 118327}, // __builtin_ia32_rndscaleps_mask - {Intrinsic::x86_avx512_mask_rndscale_sd, 118358}, // __builtin_ia32_rndscalesd_round_mask - {Intrinsic::x86_avx512_mask_rndscale_ss, 118395}, // __builtin_ia32_rndscaless_round_mask - {Intrinsic::x86_sse41_round_pd, 135354}, // __builtin_ia32_roundpd - {Intrinsic::x86_avx_round_pd_256, 89567}, // __builtin_ia32_roundpd256 - {Intrinsic::x86_sse41_round_ps, 135377}, // __builtin_ia32_roundps - {Intrinsic::x86_avx_round_ps_256, 89593}, // __builtin_ia32_roundps256 - {Intrinsic::x86_sse41_round_sd, 135400}, // __builtin_ia32_roundsd - {Intrinsic::x86_sse41_round_ss, 135423}, // __builtin_ia32_roundss - {Intrinsic::x86_avx512_rsqrt14_pd_128, 127291}, // __builtin_ia32_rsqrt14pd128_mask - {Intrinsic::x86_avx512_rsqrt14_pd_256, 127324}, // __builtin_ia32_rsqrt14pd256_mask - {Intrinsic::x86_avx512_rsqrt14_pd_512, 127357}, // __builtin_ia32_rsqrt14pd512_mask - {Intrinsic::x86_avx512_rsqrt14_ps_128, 127390}, // __builtin_ia32_rsqrt14ps128_mask - {Intrinsic::x86_avx512_rsqrt14_ps_256, 127423}, // __builtin_ia32_rsqrt14ps256_mask - {Intrinsic::x86_avx512_rsqrt14_ps_512, 127456}, // __builtin_ia32_rsqrt14ps512_mask - {Intrinsic::x86_avx512_rsqrt14_sd, 127489}, // __builtin_ia32_rsqrt14sd_mask - {Intrinsic::x86_avx512_rsqrt14_ss, 127519}, // __builtin_ia32_rsqrt14ss_mask - {Intrinsic::x86_avx512_rsqrt28_pd, 127549}, // __builtin_ia32_rsqrt28pd_mask - {Intrinsic::x86_avx512_rsqrt28_ps, 127579}, // __builtin_ia32_rsqrt28ps_mask - {Intrinsic::x86_avx512_rsqrt28_sd, 127609}, // __builtin_ia32_rsqrt28sd_round_mask - {Intrinsic::x86_avx512_rsqrt28_ss, 127645}, // __builtin_ia32_rsqrt28ss_round_mask - {Intrinsic::x86_sse_rsqrt_ps, 132743}, // __builtin_ia32_rsqrtps - {Intrinsic::x86_avx_rsqrt_ps_256, 89619}, // __builtin_ia32_rsqrtps256 - {Intrinsic::x86_sse_rsqrt_ss, 132766}, // __builtin_ia32_rsqrtss - {Intrinsic::x86_avx512_mask_scalef_pd_128, 118432}, // __builtin_ia32_scalefpd128_mask - {Intrinsic::x86_avx512_mask_scalef_pd_256, 118464}, // __builtin_ia32_scalefpd256_mask - {Intrinsic::x86_avx512_mask_scalef_pd_512, 118496}, // __builtin_ia32_scalefpd512_mask - {Intrinsic::x86_avx512_mask_scalef_ps_128, 118528}, // __builtin_ia32_scalefps128_mask - {Intrinsic::x86_avx512_mask_scalef_ps_256, 118560}, // __builtin_ia32_scalefps256_mask - {Intrinsic::x86_avx512_mask_scalef_ps_512, 118592}, // __builtin_ia32_scalefps512_mask - {Intrinsic::x86_avx512_mask_scalef_sd, 118624}, // __builtin_ia32_scalefsd_round_mask - {Intrinsic::x86_avx512_mask_scalef_ss, 118659}, // __builtin_ia32_scalefss_round_mask - {Intrinsic::x86_avx512_scatter_qps_512, 127887}, // __builtin_ia32_scatterdiv16sf - {Intrinsic::x86_avx512_scatter_qpi_512, 127828}, // __builtin_ia32_scatterdiv16si - {Intrinsic::x86_avx512_scatterdiv2_df, 127917}, // __builtin_ia32_scatterdiv2df - {Intrinsic::x86_avx512_scatterdiv2_di, 127946}, // __builtin_ia32_scatterdiv2di - {Intrinsic::x86_avx512_scatterdiv4_df, 127975}, // __builtin_ia32_scatterdiv4df - {Intrinsic::x86_avx512_scatterdiv4_di, 128004}, // __builtin_ia32_scatterdiv4di - {Intrinsic::x86_avx512_scatterdiv4_sf, 128033}, // __builtin_ia32_scatterdiv4sf - {Intrinsic::x86_avx512_scatterdiv4_si, 128062}, // __builtin_ia32_scatterdiv4si - {Intrinsic::x86_avx512_scatter_qpd_512, 127799}, // __builtin_ia32_scatterdiv8df - {Intrinsic::x86_avx512_scatter_qpq_512, 127858}, // __builtin_ia32_scatterdiv8di - {Intrinsic::x86_avx512_scatterdiv8_sf, 128091}, // __builtin_ia32_scatterdiv8sf - {Intrinsic::x86_avx512_scatterdiv8_si, 128120}, // __builtin_ia32_scatterdiv8si - {Intrinsic::x86_avx512_scatterpf_dpd_512, 128149}, // __builtin_ia32_scatterpfdpd - {Intrinsic::x86_avx512_scatterpf_dps_512, 128177}, // __builtin_ia32_scatterpfdps - {Intrinsic::x86_avx512_scatterpf_qpd_512, 128205}, // __builtin_ia32_scatterpfqpd - {Intrinsic::x86_avx512_scatterpf_qps_512, 128233}, // __builtin_ia32_scatterpfqps - {Intrinsic::x86_avx512_scatter_dps_512, 127769}, // __builtin_ia32_scattersiv16sf - {Intrinsic::x86_avx512_scatter_dpi_512, 127710}, // __builtin_ia32_scattersiv16si - {Intrinsic::x86_avx512_scattersiv2_df, 128261}, // __builtin_ia32_scattersiv2df - {Intrinsic::x86_avx512_scattersiv2_di, 128290}, // __builtin_ia32_scattersiv2di - {Intrinsic::x86_avx512_scattersiv4_df, 128319}, // __builtin_ia32_scattersiv4df - {Intrinsic::x86_avx512_scattersiv4_di, 128348}, // __builtin_ia32_scattersiv4di - {Intrinsic::x86_avx512_scattersiv4_sf, 128377}, // __builtin_ia32_scattersiv4sf - {Intrinsic::x86_avx512_scattersiv4_si, 128406}, // __builtin_ia32_scattersiv4si - {Intrinsic::x86_avx512_scatter_dpd_512, 127681}, // __builtin_ia32_scattersiv8df - {Intrinsic::x86_avx512_scatter_dpq_512, 127740}, // __builtin_ia32_scattersiv8di - {Intrinsic::x86_avx512_scattersiv8_sf, 128435}, // __builtin_ia32_scattersiv8sf - {Intrinsic::x86_avx512_scattersiv8_si, 128464}, // __builtin_ia32_scattersiv8si - {Intrinsic::x86_sse_sfence, 132789}, // __builtin_ia32_sfence - {Intrinsic::x86_sha1msg1, 131942}, // __builtin_ia32_sha1msg1 - {Intrinsic::x86_sha1msg2, 131966}, // __builtin_ia32_sha1msg2 - {Intrinsic::x86_sha1nexte, 131990}, // __builtin_ia32_sha1nexte - {Intrinsic::x86_sha1rnds4, 132015}, // __builtin_ia32_sha1rnds4 - {Intrinsic::x86_sha256msg1, 132040}, // __builtin_ia32_sha256msg1 - {Intrinsic::x86_sha256msg2, 132066}, // __builtin_ia32_sha256msg2 - {Intrinsic::x86_sha256rnds2, 132092}, // __builtin_ia32_sha256rnds2 - {Intrinsic::x86_avx512_mask_shuf_f32x4_256, 118725}, // __builtin_ia32_shuf_f32x4_256_mask - {Intrinsic::x86_avx512_mask_shuf_f32x4, 118694}, // __builtin_ia32_shuf_f32x4_mask - {Intrinsic::x86_avx512_mask_shuf_f64x2_256, 118791}, // __builtin_ia32_shuf_f64x2_256_mask - {Intrinsic::x86_avx512_mask_shuf_f64x2, 118760}, // __builtin_ia32_shuf_f64x2_mask - {Intrinsic::x86_avx512_mask_shuf_i32x4_256, 118857}, // __builtin_ia32_shuf_i32x4_256_mask - {Intrinsic::x86_avx512_mask_shuf_i32x4, 118826}, // __builtin_ia32_shuf_i32x4_mask - {Intrinsic::x86_avx512_mask_shuf_i64x2_256, 118923}, // __builtin_ia32_shuf_i64x2_256_mask - {Intrinsic::x86_avx512_mask_shuf_i64x2, 118892}, // __builtin_ia32_shuf_i64x2_mask - {Intrinsic::x86_avx512_mask_shuf_pd_128, 118958}, // __builtin_ia32_shufpd128_mask - {Intrinsic::x86_avx512_mask_shuf_pd_256, 118988}, // __builtin_ia32_shufpd256_mask - {Intrinsic::x86_avx512_mask_shuf_pd_512, 119018}, // __builtin_ia32_shufpd512_mask - {Intrinsic::x86_avx512_mask_shuf_ps_128, 119048}, // __builtin_ia32_shufps128_mask - {Intrinsic::x86_avx512_mask_shuf_ps_256, 119078}, // __builtin_ia32_shufps256_mask - {Intrinsic::x86_avx512_mask_shuf_ps_512, 119108}, // __builtin_ia32_shufps512_mask - {Intrinsic::x86_sse2_sqrt_pd, 134608}, // __builtin_ia32_sqrtpd - {Intrinsic::x86_avx512_mask_sqrt_pd_128, 119138}, // __builtin_ia32_sqrtpd128_mask - {Intrinsic::x86_avx_sqrt_pd_256, 89645}, // __builtin_ia32_sqrtpd256 - {Intrinsic::x86_avx512_mask_sqrt_pd_256, 119168}, // __builtin_ia32_sqrtpd256_mask - {Intrinsic::x86_avx512_mask_sqrt_pd_512, 119198}, // __builtin_ia32_sqrtpd512_mask - {Intrinsic::x86_sse_sqrt_ps, 132811}, // __builtin_ia32_sqrtps - {Intrinsic::x86_avx512_mask_sqrt_ps_128, 119228}, // __builtin_ia32_sqrtps128_mask - {Intrinsic::x86_avx_sqrt_ps_256, 89670}, // __builtin_ia32_sqrtps256 - {Intrinsic::x86_avx512_mask_sqrt_ps_256, 119258}, // __builtin_ia32_sqrtps256_mask - {Intrinsic::x86_avx512_mask_sqrt_ps_512, 119288}, // __builtin_ia32_sqrtps512_mask - {Intrinsic::x86_sse2_sqrt_sd, 134630}, // __builtin_ia32_sqrtsd - {Intrinsic::x86_avx512_mask_sqrt_sd, 119318}, // __builtin_ia32_sqrtsd_round_mask - {Intrinsic::x86_sse_sqrt_ss, 132833}, // __builtin_ia32_sqrtss - {Intrinsic::x86_avx512_mask_sqrt_ss, 119351}, // __builtin_ia32_sqrtss_round_mask - {Intrinsic::x86_avx512_mask_store_ss, 119384}, // __builtin_ia32_storess_mask - {Intrinsic::x86_subborrow_u32, 136743}, // __builtin_ia32_subborrow_u32 - {Intrinsic::x86_subborrow_u64, 136772}, // __builtin_ia32_subborrow_u64 - {Intrinsic::x86_avx512_mask_sub_pd_128, 119412}, // __builtin_ia32_subpd128_mask - {Intrinsic::x86_avx512_mask_sub_pd_256, 119441}, // __builtin_ia32_subpd256_mask - {Intrinsic::x86_avx512_mask_sub_pd_512, 119470}, // __builtin_ia32_subpd512_mask - {Intrinsic::x86_avx512_mask_sub_ps_128, 119499}, // __builtin_ia32_subps128_mask - {Intrinsic::x86_avx512_mask_sub_ps_256, 119528}, // __builtin_ia32_subps256_mask - {Intrinsic::x86_avx512_mask_sub_ps_512, 119557}, // __builtin_ia32_subps512_mask - {Intrinsic::x86_avx512_mask_sub_sd_round, 119586}, // __builtin_ia32_subsd_round_mask - {Intrinsic::x86_avx512_mask_sub_ss_round, 119618}, // __builtin_ia32_subss_round_mask - {Intrinsic::x86_sse_ucomieq_ss, 132855}, // __builtin_ia32_ucomieq - {Intrinsic::x86_sse_ucomige_ss, 132878}, // __builtin_ia32_ucomige - {Intrinsic::x86_sse_ucomigt_ss, 132901}, // __builtin_ia32_ucomigt - {Intrinsic::x86_sse_ucomile_ss, 132924}, // __builtin_ia32_ucomile - {Intrinsic::x86_sse_ucomilt_ss, 132947}, // __builtin_ia32_ucomilt - {Intrinsic::x86_sse_ucomineq_ss, 132970}, // __builtin_ia32_ucomineq - {Intrinsic::x86_sse2_ucomieq_sd, 134652}, // __builtin_ia32_ucomisdeq - {Intrinsic::x86_sse2_ucomige_sd, 134677}, // __builtin_ia32_ucomisdge - {Intrinsic::x86_sse2_ucomigt_sd, 134702}, // __builtin_ia32_ucomisdgt - {Intrinsic::x86_sse2_ucomile_sd, 134727}, // __builtin_ia32_ucomisdle - {Intrinsic::x86_sse2_ucomilt_sd, 134752}, // __builtin_ia32_ucomisdlt - {Intrinsic::x86_sse2_ucomineq_sd, 134777}, // __builtin_ia32_ucomisdneq - {Intrinsic::x86_avx_vbroadcastf128_pd_256, 89695}, // __builtin_ia32_vbroadcastf128_pd256 - {Intrinsic::x86_avx_vbroadcastf128_ps_256, 89731}, // __builtin_ia32_vbroadcastf128_ps256 - {Intrinsic::x86_avx512_vbroadcast_sd_512, 128493}, // __builtin_ia32_vbroadcastsd512 - {Intrinsic::x86_avx512_vbroadcast_ss_512, 128524}, // __builtin_ia32_vbroadcastss512 - {Intrinsic::x86_avx512_vcomi_sd, 128555}, // __builtin_ia32_vcomisd - {Intrinsic::x86_avx512_vcomi_ss, 128578}, // __builtin_ia32_vcomiss - {Intrinsic::x86_vcvtph2ps_128, 136853}, // __builtin_ia32_vcvtph2ps - {Intrinsic::x86_vcvtph2ps_256, 136878}, // __builtin_ia32_vcvtph2ps256 - {Intrinsic::x86_avx512_mask_vcvtph2ps_256, 119860}, // __builtin_ia32_vcvtph2ps256_mask - {Intrinsic::x86_avx512_mask_vcvtph2ps_512, 119893}, // __builtin_ia32_vcvtph2ps512_mask - {Intrinsic::x86_avx512_mask_vcvtph2ps_128, 119830}, // __builtin_ia32_vcvtph2ps_mask - {Intrinsic::x86_vcvtps2ph_128, 136906}, // __builtin_ia32_vcvtps2ph - {Intrinsic::x86_vcvtps2ph_256, 136931}, // __builtin_ia32_vcvtps2ph256 - {Intrinsic::x86_avx512_mask_vcvtps2ph_256, 119956}, // __builtin_ia32_vcvtps2ph256_mask - {Intrinsic::x86_avx512_mask_vcvtps2ph_512, 119989}, // __builtin_ia32_vcvtps2ph512_mask - {Intrinsic::x86_avx512_mask_vcvtps2ph_128, 119926}, // __builtin_ia32_vcvtps2ph_mask - {Intrinsic::x86_avx512_vcvtsd2si32, 128601}, // __builtin_ia32_vcvtsd2si32 - {Intrinsic::x86_avx512_vcvtsd2si64, 128628}, // __builtin_ia32_vcvtsd2si64 - {Intrinsic::x86_avx512_vcvtsd2usi32, 128655}, // __builtin_ia32_vcvtsd2usi32 - {Intrinsic::x86_avx512_vcvtsd2usi64, 128683}, // __builtin_ia32_vcvtsd2usi64 - {Intrinsic::x86_avx512_vcvtss2si32, 128711}, // __builtin_ia32_vcvtss2si32 - {Intrinsic::x86_avx512_vcvtss2si64, 128738}, // __builtin_ia32_vcvtss2si64 - {Intrinsic::x86_avx512_vcvtss2usi32, 128765}, // __builtin_ia32_vcvtss2usi32 - {Intrinsic::x86_avx512_vcvtss2usi64, 128793}, // __builtin_ia32_vcvtss2usi64 - {Intrinsic::x86_avx512_cvttsd2si, 93577}, // __builtin_ia32_vcvttsd2si32 - {Intrinsic::x86_avx512_cvttsd2si64, 93605}, // __builtin_ia32_vcvttsd2si64 - {Intrinsic::x86_avx512_cvttsd2usi, 93633}, // __builtin_ia32_vcvttsd2usi32 - {Intrinsic::x86_avx512_cvttsd2usi64, 93662}, // __builtin_ia32_vcvttsd2usi64 - {Intrinsic::x86_avx512_cvttss2si, 93691}, // __builtin_ia32_vcvttss2si32 - {Intrinsic::x86_avx512_cvttss2si64, 93719}, // __builtin_ia32_vcvttss2si64 - {Intrinsic::x86_avx512_cvttss2usi, 93747}, // __builtin_ia32_vcvttss2usi32 - {Intrinsic::x86_avx512_cvttss2usi64, 93776}, // __builtin_ia32_vcvttss2usi64 - {Intrinsic::x86_mmx_pextr_w, 130668}, // __builtin_ia32_vec_ext_v4hi - {Intrinsic::x86_mmx_pinsr_w, 130696}, // __builtin_ia32_vec_set_v4hi - {Intrinsic::x86_fma_vfmadd_pd, 129157}, // __builtin_ia32_vfmaddpd - {Intrinsic::x86_avx512_mask_vfmadd_pd_128, 120442}, // __builtin_ia32_vfmaddpd128_mask - {Intrinsic::x86_avx512_mask3_vfmadd_pd_128, 123178}, // __builtin_ia32_vfmaddpd128_mask3 - {Intrinsic::x86_avx512_maskz_vfmadd_pd_128, 124750}, // __builtin_ia32_vfmaddpd128_maskz - {Intrinsic::x86_fma_vfmadd_pd_256, 129181}, // __builtin_ia32_vfmaddpd256 - {Intrinsic::x86_avx512_mask_vfmadd_pd_256, 120474}, // __builtin_ia32_vfmaddpd256_mask - {Intrinsic::x86_avx512_mask3_vfmadd_pd_256, 123211}, // __builtin_ia32_vfmaddpd256_mask3 - {Intrinsic::x86_avx512_maskz_vfmadd_pd_256, 124783}, // __builtin_ia32_vfmaddpd256_maskz - {Intrinsic::x86_avx512_mask_vfmadd_pd_512, 120506}, // __builtin_ia32_vfmaddpd512_mask - {Intrinsic::x86_avx512_mask3_vfmadd_pd_512, 123244}, // __builtin_ia32_vfmaddpd512_mask3 - {Intrinsic::x86_avx512_maskz_vfmadd_pd_512, 124816}, // __builtin_ia32_vfmaddpd512_maskz - {Intrinsic::x86_fma_vfmadd_ps, 129208}, // __builtin_ia32_vfmaddps - {Intrinsic::x86_avx512_mask_vfmadd_ps_128, 120538}, // __builtin_ia32_vfmaddps128_mask - {Intrinsic::x86_avx512_mask3_vfmadd_ps_128, 123277}, // __builtin_ia32_vfmaddps128_mask3 - {Intrinsic::x86_avx512_maskz_vfmadd_ps_128, 124849}, // __builtin_ia32_vfmaddps128_maskz - {Intrinsic::x86_fma_vfmadd_ps_256, 129232}, // __builtin_ia32_vfmaddps256 - {Intrinsic::x86_avx512_mask_vfmadd_ps_256, 120570}, // __builtin_ia32_vfmaddps256_mask - {Intrinsic::x86_avx512_mask3_vfmadd_ps_256, 123310}, // __builtin_ia32_vfmaddps256_mask3 - {Intrinsic::x86_avx512_maskz_vfmadd_ps_256, 124882}, // __builtin_ia32_vfmaddps256_maskz - {Intrinsic::x86_avx512_mask_vfmadd_ps_512, 120602}, // __builtin_ia32_vfmaddps512_mask - {Intrinsic::x86_avx512_mask3_vfmadd_ps_512, 123343}, // __builtin_ia32_vfmaddps512_mask3 - {Intrinsic::x86_avx512_maskz_vfmadd_ps_512, 124915}, // __builtin_ia32_vfmaddps512_maskz - {Intrinsic::x86_fma_vfmadd_sd, 129259}, // __builtin_ia32_vfmaddsd - {Intrinsic::x86_avx512_mask_vfmadd_sd, 120634}, // __builtin_ia32_vfmaddsd3_mask - {Intrinsic::x86_avx512_mask3_vfmadd_sd, 123376}, // __builtin_ia32_vfmaddsd3_mask3 - {Intrinsic::x86_avx512_maskz_vfmadd_sd, 124948}, // __builtin_ia32_vfmaddsd3_maskz - {Intrinsic::x86_fma_vfmadd_ss, 129283}, // __builtin_ia32_vfmaddss - {Intrinsic::x86_avx512_mask_vfmadd_ss, 120664}, // __builtin_ia32_vfmaddss3_mask - {Intrinsic::x86_avx512_mask3_vfmadd_ss, 123407}, // __builtin_ia32_vfmaddss3_mask3 - {Intrinsic::x86_avx512_maskz_vfmadd_ss, 124979}, // __builtin_ia32_vfmaddss3_maskz - {Intrinsic::x86_fma_vfmaddsub_pd, 129307}, // __builtin_ia32_vfmaddsubpd - {Intrinsic::x86_avx512_mask_vfmaddsub_pd_128, 120694}, // __builtin_ia32_vfmaddsubpd128_mask - {Intrinsic::x86_avx512_mask3_vfmaddsub_pd_128, 123438}, // __builtin_ia32_vfmaddsubpd128_mask3 - {Intrinsic::x86_avx512_maskz_vfmaddsub_pd_128, 125010}, // __builtin_ia32_vfmaddsubpd128_maskz - {Intrinsic::x86_fma_vfmaddsub_pd_256, 129334}, // __builtin_ia32_vfmaddsubpd256 - {Intrinsic::x86_avx512_mask_vfmaddsub_pd_256, 120729}, // __builtin_ia32_vfmaddsubpd256_mask - {Intrinsic::x86_avx512_mask3_vfmaddsub_pd_256, 123474}, // __builtin_ia32_vfmaddsubpd256_mask3 - {Intrinsic::x86_avx512_maskz_vfmaddsub_pd_256, 125046}, // __builtin_ia32_vfmaddsubpd256_maskz - {Intrinsic::x86_avx512_mask_vfmaddsub_pd_512, 120764}, // __builtin_ia32_vfmaddsubpd512_mask - {Intrinsic::x86_avx512_mask3_vfmaddsub_pd_512, 123510}, // __builtin_ia32_vfmaddsubpd512_mask3 - {Intrinsic::x86_avx512_maskz_vfmaddsub_pd_512, 125082}, // __builtin_ia32_vfmaddsubpd512_maskz - {Intrinsic::x86_fma_vfmaddsub_ps, 129364}, // __builtin_ia32_vfmaddsubps - {Intrinsic::x86_avx512_mask_vfmaddsub_ps_128, 120799}, // __builtin_ia32_vfmaddsubps128_mask - {Intrinsic::x86_avx512_mask3_vfmaddsub_ps_128, 123546}, // __builtin_ia32_vfmaddsubps128_mask3 - {Intrinsic::x86_avx512_maskz_vfmaddsub_ps_128, 125118}, // __builtin_ia32_vfmaddsubps128_maskz - {Intrinsic::x86_fma_vfmaddsub_ps_256, 129391}, // __builtin_ia32_vfmaddsubps256 - {Intrinsic::x86_avx512_mask_vfmaddsub_ps_256, 120834}, // __builtin_ia32_vfmaddsubps256_mask - {Intrinsic::x86_avx512_mask3_vfmaddsub_ps_256, 123582}, // __builtin_ia32_vfmaddsubps256_mask3 - {Intrinsic::x86_avx512_maskz_vfmaddsub_ps_256, 125154}, // __builtin_ia32_vfmaddsubps256_maskz - {Intrinsic::x86_avx512_mask_vfmaddsub_ps_512, 120869}, // __builtin_ia32_vfmaddsubps512_mask - {Intrinsic::x86_avx512_mask3_vfmaddsub_ps_512, 123618}, // __builtin_ia32_vfmaddsubps512_mask3 - {Intrinsic::x86_avx512_maskz_vfmaddsub_ps_512, 125190}, // __builtin_ia32_vfmaddsubps512_maskz - {Intrinsic::x86_fma_vfmsubadd_pd, 129571}, // __builtin_ia32_vfmsubaddpd - {Intrinsic::x86_avx512_mask3_vfmsubadd_pd_128, 123852}, // __builtin_ia32_vfmsubaddpd128_mask3 - {Intrinsic::x86_fma_vfmsubadd_pd_256, 129598}, // __builtin_ia32_vfmsubaddpd256 - {Intrinsic::x86_avx512_mask3_vfmsubadd_pd_256, 123888}, // __builtin_ia32_vfmsubaddpd256_mask3 - {Intrinsic::x86_avx512_mask3_vfmsubadd_pd_512, 123924}, // __builtin_ia32_vfmsubaddpd512_mask3 - {Intrinsic::x86_fma_vfmsubadd_ps, 129628}, // __builtin_ia32_vfmsubaddps - {Intrinsic::x86_avx512_mask3_vfmsubadd_ps_128, 123960}, // __builtin_ia32_vfmsubaddps128_mask3 - {Intrinsic::x86_fma_vfmsubadd_ps_256, 129655}, // __builtin_ia32_vfmsubaddps256 - {Intrinsic::x86_avx512_mask3_vfmsubadd_ps_256, 123996}, // __builtin_ia32_vfmsubaddps256_mask3 - {Intrinsic::x86_avx512_mask3_vfmsubadd_ps_512, 124032}, // __builtin_ia32_vfmsubaddps512_mask3 - {Intrinsic::x86_fma_vfmsub_pd, 129421}, // __builtin_ia32_vfmsubpd - {Intrinsic::x86_avx512_mask3_vfmsub_pd_128, 123654}, // __builtin_ia32_vfmsubpd128_mask3 - {Intrinsic::x86_fma_vfmsub_pd_256, 129445}, // __builtin_ia32_vfmsubpd256 - {Intrinsic::x86_avx512_mask3_vfmsub_pd_256, 123687}, // __builtin_ia32_vfmsubpd256_mask3 - {Intrinsic::x86_avx512_mask3_vfmsub_pd_512, 123720}, // __builtin_ia32_vfmsubpd512_mask3 - {Intrinsic::x86_fma_vfmsub_ps, 129472}, // __builtin_ia32_vfmsubps - {Intrinsic::x86_avx512_mask3_vfmsub_ps_128, 123753}, // __builtin_ia32_vfmsubps128_mask3 - {Intrinsic::x86_fma_vfmsub_ps_256, 129496}, // __builtin_ia32_vfmsubps256 - {Intrinsic::x86_avx512_mask3_vfmsub_ps_256, 123786}, // __builtin_ia32_vfmsubps256_mask3 - {Intrinsic::x86_avx512_mask3_vfmsub_ps_512, 123819}, // __builtin_ia32_vfmsubps512_mask3 - {Intrinsic::x86_fma_vfmsub_sd, 129523}, // __builtin_ia32_vfmsubsd - {Intrinsic::x86_fma_vfmsub_ss, 129547}, // __builtin_ia32_vfmsubss - {Intrinsic::x86_fma_vfnmadd_pd, 129685}, // __builtin_ia32_vfnmaddpd - {Intrinsic::x86_avx512_mask_vfnmadd_pd_128, 120904}, // __builtin_ia32_vfnmaddpd128_mask - {Intrinsic::x86_fma_vfnmadd_pd_256, 129710}, // __builtin_ia32_vfnmaddpd256 - {Intrinsic::x86_avx512_mask_vfnmadd_pd_256, 120937}, // __builtin_ia32_vfnmaddpd256_mask - {Intrinsic::x86_avx512_mask_vfnmadd_pd_512, 120970}, // __builtin_ia32_vfnmaddpd512_mask - {Intrinsic::x86_fma_vfnmadd_ps, 129738}, // __builtin_ia32_vfnmaddps - {Intrinsic::x86_avx512_mask_vfnmadd_ps_128, 121003}, // __builtin_ia32_vfnmaddps128_mask - {Intrinsic::x86_fma_vfnmadd_ps_256, 129763}, // __builtin_ia32_vfnmaddps256 - {Intrinsic::x86_avx512_mask_vfnmadd_ps_256, 121036}, // __builtin_ia32_vfnmaddps256_mask - {Intrinsic::x86_avx512_mask_vfnmadd_ps_512, 121069}, // __builtin_ia32_vfnmaddps512_mask - {Intrinsic::x86_fma_vfnmadd_sd, 129791}, // __builtin_ia32_vfnmaddsd - {Intrinsic::x86_fma_vfnmadd_ss, 129816}, // __builtin_ia32_vfnmaddss - {Intrinsic::x86_fma_vfnmsub_pd, 129841}, // __builtin_ia32_vfnmsubpd - {Intrinsic::x86_avx512_mask_vfnmsub_pd_128, 121102}, // __builtin_ia32_vfnmsubpd128_mask - {Intrinsic::x86_avx512_mask3_vfnmsub_pd_128, 124068}, // __builtin_ia32_vfnmsubpd128_mask3 - {Intrinsic::x86_fma_vfnmsub_pd_256, 129866}, // __builtin_ia32_vfnmsubpd256 - {Intrinsic::x86_avx512_mask_vfnmsub_pd_256, 121135}, // __builtin_ia32_vfnmsubpd256_mask - {Intrinsic::x86_avx512_mask3_vfnmsub_pd_256, 124102}, // __builtin_ia32_vfnmsubpd256_mask3 - {Intrinsic::x86_avx512_mask_vfnmsub_pd_512, 121168}, // __builtin_ia32_vfnmsubpd512_mask - {Intrinsic::x86_avx512_mask3_vfnmsub_pd_512, 124136}, // __builtin_ia32_vfnmsubpd512_mask3 - {Intrinsic::x86_fma_vfnmsub_ps, 129894}, // __builtin_ia32_vfnmsubps - {Intrinsic::x86_avx512_mask_vfnmsub_ps_128, 121201}, // __builtin_ia32_vfnmsubps128_mask - {Intrinsic::x86_avx512_mask3_vfnmsub_ps_128, 124170}, // __builtin_ia32_vfnmsubps128_mask3 - {Intrinsic::x86_fma_vfnmsub_ps_256, 129919}, // __builtin_ia32_vfnmsubps256 - {Intrinsic::x86_avx512_mask_vfnmsub_ps_256, 121234}, // __builtin_ia32_vfnmsubps256_mask - {Intrinsic::x86_avx512_mask3_vfnmsub_ps_256, 124204}, // __builtin_ia32_vfnmsubps256_mask3 - {Intrinsic::x86_avx512_mask_vfnmsub_ps_512, 121267}, // __builtin_ia32_vfnmsubps512_mask - {Intrinsic::x86_avx512_mask3_vfnmsub_ps_512, 124238}, // __builtin_ia32_vfnmsubps512_mask3 - {Intrinsic::x86_fma_vfnmsub_sd, 129947}, // __builtin_ia32_vfnmsubsd - {Intrinsic::x86_fma_vfnmsub_ss, 129972}, // __builtin_ia32_vfnmsubss - {Intrinsic::x86_xop_vfrcz_pd, 137149}, // __builtin_ia32_vfrczpd - {Intrinsic::x86_xop_vfrcz_pd_256, 137172}, // __builtin_ia32_vfrczpd256 - {Intrinsic::x86_xop_vfrcz_ps, 137198}, // __builtin_ia32_vfrczps - {Intrinsic::x86_xop_vfrcz_ps_256, 137221}, // __builtin_ia32_vfrczps256 - {Intrinsic::x86_xop_vfrcz_sd, 137247}, // __builtin_ia32_vfrczsd - {Intrinsic::x86_xop_vfrcz_ss, 137270}, // __builtin_ia32_vfrczss - {Intrinsic::x86_xop_vpcmov, 137293}, // __builtin_ia32_vpcmov - {Intrinsic::x86_xop_vpcmov_256, 137315}, // __builtin_ia32_vpcmov_256 - {Intrinsic::x86_xop_vpcomb, 137341}, // __builtin_ia32_vpcomb - {Intrinsic::x86_xop_vpcomd, 137363}, // __builtin_ia32_vpcomd - {Intrinsic::x86_xop_vpcomq, 137385}, // __builtin_ia32_vpcomq - {Intrinsic::x86_xop_vpcomub, 137407}, // __builtin_ia32_vpcomub - {Intrinsic::x86_xop_vpcomud, 137430}, // __builtin_ia32_vpcomud - {Intrinsic::x86_xop_vpcomuq, 137453}, // __builtin_ia32_vpcomuq - {Intrinsic::x86_xop_vpcomuw, 137476}, // __builtin_ia32_vpcomuw - {Intrinsic::x86_xop_vpcomw, 137499}, // __builtin_ia32_vpcomw - {Intrinsic::x86_avx512_mask_conflict_q_128, 97556}, // __builtin_ia32_vpconflictdi_128_mask - {Intrinsic::x86_avx512_mask_conflict_q_256, 97593}, // __builtin_ia32_vpconflictdi_256_mask - {Intrinsic::x86_avx512_mask_conflict_q_512, 97630}, // __builtin_ia32_vpconflictdi_512_mask - {Intrinsic::x86_avx512_mask_conflict_d_128, 97445}, // __builtin_ia32_vpconflictsi_128_mask - {Intrinsic::x86_avx512_mask_conflict_d_256, 97482}, // __builtin_ia32_vpconflictsi_256_mask - {Intrinsic::x86_avx512_mask_conflict_d_512, 97519}, // __builtin_ia32_vpconflictsi_512_mask - {Intrinsic::x86_avx_vperm2f128_pd_256, 89767}, // __builtin_ia32_vperm2f128_pd256 - {Intrinsic::x86_avx_vperm2f128_ps_256, 89799}, // __builtin_ia32_vperm2f128_ps256 - {Intrinsic::x86_avx_vperm2f128_si_256, 89831}, // __builtin_ia32_vperm2f128_si256 - {Intrinsic::x86_avx512_mask_vpermi2var_d_128, 121300}, // __builtin_ia32_vpermi2vard128_mask - {Intrinsic::x86_avx512_mask_vpermi2var_d_256, 121335}, // __builtin_ia32_vpermi2vard256_mask - {Intrinsic::x86_avx512_mask_vpermi2var_d_512, 121370}, // __builtin_ia32_vpermi2vard512_mask - {Intrinsic::x86_avx512_mask_vpermi2var_hi_128, 121405}, // __builtin_ia32_vpermi2varhi128_mask - {Intrinsic::x86_avx512_mask_vpermi2var_hi_256, 121441}, // __builtin_ia32_vpermi2varhi256_mask - {Intrinsic::x86_avx512_mask_vpermi2var_hi_512, 121477}, // __builtin_ia32_vpermi2varhi512_mask - {Intrinsic::x86_avx512_mask_vpermi2var_pd_128, 121513}, // __builtin_ia32_vpermi2varpd128_mask - {Intrinsic::x86_avx512_mask_vpermi2var_pd_256, 121549}, // __builtin_ia32_vpermi2varpd256_mask - {Intrinsic::x86_avx512_mask_vpermi2var_pd_512, 121585}, // __builtin_ia32_vpermi2varpd512_mask - {Intrinsic::x86_avx512_mask_vpermi2var_ps_128, 121621}, // __builtin_ia32_vpermi2varps128_mask - {Intrinsic::x86_avx512_mask_vpermi2var_ps_256, 121657}, // __builtin_ia32_vpermi2varps256_mask - {Intrinsic::x86_avx512_mask_vpermi2var_ps_512, 121693}, // __builtin_ia32_vpermi2varps512_mask - {Intrinsic::x86_avx512_mask_vpermi2var_q_128, 121729}, // __builtin_ia32_vpermi2varq128_mask - {Intrinsic::x86_avx512_mask_vpermi2var_q_256, 121764}, // __builtin_ia32_vpermi2varq256_mask - {Intrinsic::x86_avx512_mask_vpermi2var_q_512, 121799}, // __builtin_ia32_vpermi2varq512_mask - {Intrinsic::x86_avx512_mask_vpermi2var_qi_128, 121834}, // __builtin_ia32_vpermi2varqi128_mask - {Intrinsic::x86_avx512_mask_vpermi2var_qi_256, 121870}, // __builtin_ia32_vpermi2varqi256_mask - {Intrinsic::x86_avx512_mask_vpermi2var_qi_512, 121906}, // __builtin_ia32_vpermi2varqi512_mask - {Intrinsic::x86_xop_vpermil2pd, 137521}, // __builtin_ia32_vpermil2pd - {Intrinsic::x86_xop_vpermil2pd_256, 137547}, // __builtin_ia32_vpermil2pd256 - {Intrinsic::x86_xop_vpermil2ps, 137576}, // __builtin_ia32_vpermil2ps - {Intrinsic::x86_xop_vpermil2ps_256, 137602}, // __builtin_ia32_vpermil2ps256 - {Intrinsic::x86_avx_vpermilvar_pd, 89863}, // __builtin_ia32_vpermilvarpd - {Intrinsic::x86_avx_vpermilvar_pd_256, 89891}, // __builtin_ia32_vpermilvarpd256 - {Intrinsic::x86_avx512_mask_vpermilvar_pd_256, 121975}, // __builtin_ia32_vpermilvarpd256_mask - {Intrinsic::x86_avx512_mask_vpermilvar_pd_512, 122011}, // __builtin_ia32_vpermilvarpd512_mask - {Intrinsic::x86_avx512_mask_vpermilvar_pd_128, 121942}, // __builtin_ia32_vpermilvarpd_mask - {Intrinsic::x86_avx_vpermilvar_ps, 89922}, // __builtin_ia32_vpermilvarps - {Intrinsic::x86_avx_vpermilvar_ps_256, 89950}, // __builtin_ia32_vpermilvarps256 - {Intrinsic::x86_avx512_mask_vpermilvar_ps_256, 122080}, // __builtin_ia32_vpermilvarps256_mask - {Intrinsic::x86_avx512_mask_vpermilvar_ps_512, 122116}, // __builtin_ia32_vpermilvarps512_mask - {Intrinsic::x86_avx512_mask_vpermilvar_ps_128, 122047}, // __builtin_ia32_vpermilvarps_mask - {Intrinsic::x86_avx512_mask_vpermt2var_d_128, 122152}, // __builtin_ia32_vpermt2vard128_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_d_128, 125226}, // __builtin_ia32_vpermt2vard128_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_d_256, 122187}, // __builtin_ia32_vpermt2vard256_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_d_256, 125262}, // __builtin_ia32_vpermt2vard256_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_d_512, 122222}, // __builtin_ia32_vpermt2vard512_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_d_512, 125298}, // __builtin_ia32_vpermt2vard512_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_hi_128, 122257}, // __builtin_ia32_vpermt2varhi128_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_hi_128, 125334}, // __builtin_ia32_vpermt2varhi128_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_hi_256, 122293}, // __builtin_ia32_vpermt2varhi256_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_hi_256, 125371}, // __builtin_ia32_vpermt2varhi256_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_hi_512, 122329}, // __builtin_ia32_vpermt2varhi512_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_hi_512, 125408}, // __builtin_ia32_vpermt2varhi512_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_pd_128, 122365}, // __builtin_ia32_vpermt2varpd128_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_pd_128, 125445}, // __builtin_ia32_vpermt2varpd128_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_pd_256, 122401}, // __builtin_ia32_vpermt2varpd256_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_pd_256, 125482}, // __builtin_ia32_vpermt2varpd256_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_pd_512, 122437}, // __builtin_ia32_vpermt2varpd512_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_pd_512, 125519}, // __builtin_ia32_vpermt2varpd512_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_ps_128, 122473}, // __builtin_ia32_vpermt2varps128_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_ps_128, 125556}, // __builtin_ia32_vpermt2varps128_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_ps_256, 122509}, // __builtin_ia32_vpermt2varps256_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_ps_256, 125593}, // __builtin_ia32_vpermt2varps256_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_ps_512, 122545}, // __builtin_ia32_vpermt2varps512_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_ps_512, 125630}, // __builtin_ia32_vpermt2varps512_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_q_128, 122581}, // __builtin_ia32_vpermt2varq128_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_q_128, 125667}, // __builtin_ia32_vpermt2varq128_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_q_256, 122616}, // __builtin_ia32_vpermt2varq256_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_q_256, 125703}, // __builtin_ia32_vpermt2varq256_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_q_512, 122651}, // __builtin_ia32_vpermt2varq512_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_q_512, 125739}, // __builtin_ia32_vpermt2varq512_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_qi_128, 122686}, // __builtin_ia32_vpermt2varqi128_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_qi_128, 125775}, // __builtin_ia32_vpermt2varqi128_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_qi_256, 122722}, // __builtin_ia32_vpermt2varqi256_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_qi_256, 125812}, // __builtin_ia32_vpermt2varqi256_maskz - {Intrinsic::x86_avx512_mask_vpermt2var_qi_512, 122758}, // __builtin_ia32_vpermt2varqi512_mask - {Intrinsic::x86_avx512_maskz_vpermt2var_qi_512, 125849}, // __builtin_ia32_vpermt2varqi512_maskz - {Intrinsic::x86_xop_vphaddbd, 137631}, // __builtin_ia32_vphaddbd - {Intrinsic::x86_xop_vphaddbq, 137655}, // __builtin_ia32_vphaddbq - {Intrinsic::x86_xop_vphaddbw, 137679}, // __builtin_ia32_vphaddbw - {Intrinsic::x86_xop_vphadddq, 137703}, // __builtin_ia32_vphadddq - {Intrinsic::x86_xop_vphaddubd, 137727}, // __builtin_ia32_vphaddubd - {Intrinsic::x86_xop_vphaddubq, 137752}, // __builtin_ia32_vphaddubq - {Intrinsic::x86_xop_vphaddubw, 137777}, // __builtin_ia32_vphaddubw - {Intrinsic::x86_xop_vphaddudq, 137802}, // __builtin_ia32_vphaddudq - {Intrinsic::x86_xop_vphadduwd, 137827}, // __builtin_ia32_vphadduwd - {Intrinsic::x86_xop_vphadduwq, 137852}, // __builtin_ia32_vphadduwq - {Intrinsic::x86_xop_vphaddwd, 137877}, // __builtin_ia32_vphaddwd - {Intrinsic::x86_xop_vphaddwq, 137901}, // __builtin_ia32_vphaddwq - {Intrinsic::x86_xop_vphsubbw, 137925}, // __builtin_ia32_vphsubbw - {Intrinsic::x86_xop_vphsubdq, 137949}, // __builtin_ia32_vphsubdq - {Intrinsic::x86_xop_vphsubwd, 137973}, // __builtin_ia32_vphsubwd - {Intrinsic::x86_xop_vpmacsdd, 137997}, // __builtin_ia32_vpmacsdd - {Intrinsic::x86_xop_vpmacsdqh, 138021}, // __builtin_ia32_vpmacsdqh - {Intrinsic::x86_xop_vpmacsdql, 138046}, // __builtin_ia32_vpmacsdql - {Intrinsic::x86_xop_vpmacssdd, 138071}, // __builtin_ia32_vpmacssdd - {Intrinsic::x86_xop_vpmacssdqh, 138096}, // __builtin_ia32_vpmacssdqh - {Intrinsic::x86_xop_vpmacssdql, 138122}, // __builtin_ia32_vpmacssdql - {Intrinsic::x86_xop_vpmacsswd, 138148}, // __builtin_ia32_vpmacsswd - {Intrinsic::x86_xop_vpmacssww, 138173}, // __builtin_ia32_vpmacssww - {Intrinsic::x86_xop_vpmacswd, 138198}, // __builtin_ia32_vpmacswd - {Intrinsic::x86_xop_vpmacsww, 138222}, // __builtin_ia32_vpmacsww - {Intrinsic::x86_xop_vpmadcsswd, 138246}, // __builtin_ia32_vpmadcsswd - {Intrinsic::x86_xop_vpmadcswd, 138272}, // __builtin_ia32_vpmadcswd - {Intrinsic::x86_avx512_mask_vpmadd52h_uq_128, 122794}, // __builtin_ia32_vpmadd52huq128_mask - {Intrinsic::x86_avx512_maskz_vpmadd52h_uq_128, 125886}, // __builtin_ia32_vpmadd52huq128_maskz - {Intrinsic::x86_avx512_mask_vpmadd52h_uq_256, 122829}, // __builtin_ia32_vpmadd52huq256_mask - {Intrinsic::x86_avx512_maskz_vpmadd52h_uq_256, 125922}, // __builtin_ia32_vpmadd52huq256_maskz - {Intrinsic::x86_avx512_mask_vpmadd52h_uq_512, 122864}, // __builtin_ia32_vpmadd52huq512_mask - {Intrinsic::x86_avx512_maskz_vpmadd52h_uq_512, 125958}, // __builtin_ia32_vpmadd52huq512_maskz - {Intrinsic::x86_avx512_mask_vpmadd52l_uq_128, 122899}, // __builtin_ia32_vpmadd52luq128_mask - {Intrinsic::x86_avx512_maskz_vpmadd52l_uq_128, 125994}, // __builtin_ia32_vpmadd52luq128_maskz - {Intrinsic::x86_avx512_mask_vpmadd52l_uq_256, 122934}, // __builtin_ia32_vpmadd52luq256_mask - {Intrinsic::x86_avx512_maskz_vpmadd52l_uq_256, 126030}, // __builtin_ia32_vpmadd52luq256_maskz - {Intrinsic::x86_avx512_mask_vpmadd52l_uq_512, 122969}, // __builtin_ia32_vpmadd52luq512_mask - {Intrinsic::x86_avx512_maskz_vpmadd52l_uq_512, 126066}, // __builtin_ia32_vpmadd52luq512_maskz - {Intrinsic::x86_avx512_mask_pmultishift_qb_128, 113342}, // __builtin_ia32_vpmultishiftqb128_mask - {Intrinsic::x86_avx512_mask_pmultishift_qb_256, 113380}, // __builtin_ia32_vpmultishiftqb256_mask - {Intrinsic::x86_avx512_mask_pmultishift_qb_512, 113418}, // __builtin_ia32_vpmultishiftqb512_mask - {Intrinsic::x86_xop_vpperm, 138297}, // __builtin_ia32_vpperm - {Intrinsic::x86_xop_vprotb, 138319}, // __builtin_ia32_vprotb - {Intrinsic::x86_xop_vprotbi, 138341}, // __builtin_ia32_vprotbi - {Intrinsic::x86_xop_vprotd, 138364}, // __builtin_ia32_vprotd - {Intrinsic::x86_xop_vprotdi, 138386}, // __builtin_ia32_vprotdi - {Intrinsic::x86_xop_vprotq, 138409}, // __builtin_ia32_vprotq - {Intrinsic::x86_xop_vprotqi, 138431}, // __builtin_ia32_vprotqi - {Intrinsic::x86_xop_vprotw, 138454}, // __builtin_ia32_vprotw - {Intrinsic::x86_xop_vprotwi, 138476}, // __builtin_ia32_vprotwi - {Intrinsic::x86_xop_vpshab, 138499}, // __builtin_ia32_vpshab - {Intrinsic::x86_xop_vpshad, 138521}, // __builtin_ia32_vpshad - {Intrinsic::x86_xop_vpshaq, 138543}, // __builtin_ia32_vpshaq - {Intrinsic::x86_xop_vpshaw, 138565}, // __builtin_ia32_vpshaw - {Intrinsic::x86_xop_vpshlb, 138587}, // __builtin_ia32_vpshlb - {Intrinsic::x86_xop_vpshld, 138609}, // __builtin_ia32_vpshld - {Intrinsic::x86_xop_vpshlq, 138631}, // __builtin_ia32_vpshlq - {Intrinsic::x86_xop_vpshlw, 138653}, // __builtin_ia32_vpshlw - {Intrinsic::x86_avx_vtestc_pd, 89981}, // __builtin_ia32_vtestcpd - {Intrinsic::x86_avx_vtestc_pd_256, 90005}, // __builtin_ia32_vtestcpd256 - {Intrinsic::x86_avx_vtestc_ps, 90032}, // __builtin_ia32_vtestcps - {Intrinsic::x86_avx_vtestc_ps_256, 90056}, // __builtin_ia32_vtestcps256 - {Intrinsic::x86_avx_vtestnzc_pd, 90083}, // __builtin_ia32_vtestnzcpd - {Intrinsic::x86_avx_vtestnzc_pd_256, 90109}, // __builtin_ia32_vtestnzcpd256 - {Intrinsic::x86_avx_vtestnzc_ps, 90138}, // __builtin_ia32_vtestnzcps - {Intrinsic::x86_avx_vtestnzc_ps_256, 90164}, // __builtin_ia32_vtestnzcps256 - {Intrinsic::x86_avx_vtestz_pd, 90193}, // __builtin_ia32_vtestzpd - {Intrinsic::x86_avx_vtestz_pd_256, 90217}, // __builtin_ia32_vtestzpd256 - {Intrinsic::x86_avx_vtestz_ps, 90244}, // __builtin_ia32_vtestzps - {Intrinsic::x86_avx_vtestz_ps_256, 90268}, // __builtin_ia32_vtestzps256 - {Intrinsic::x86_avx_vzeroall, 90295}, // __builtin_ia32_vzeroall - {Intrinsic::x86_avx_vzeroupper, 90319}, // __builtin_ia32_vzeroupper - {Intrinsic::x86_wrfsbase_32, 136959}, // __builtin_ia32_wrfsbase32 - {Intrinsic::x86_wrfsbase_64, 136985}, // __builtin_ia32_wrfsbase64 - {Intrinsic::x86_wrgsbase_32, 137011}, // __builtin_ia32_wrgsbase32 - {Intrinsic::x86_wrgsbase_64, 137037}, // __builtin_ia32_wrgsbase64 - {Intrinsic::x86_flags_write_u32, 129095}, // __builtin_ia32_writeeflags_u32 - {Intrinsic::x86_flags_write_u64, 129126}, // __builtin_ia32_writeeflags_u64 - {Intrinsic::x86_wrpkru, 137063}, // __builtin_ia32_wrpkru - {Intrinsic::x86_xabort, 137085}, // __builtin_ia32_xabort - {Intrinsic::x86_xbegin, 137107}, // __builtin_ia32_xbegin - {Intrinsic::x86_xend, 137129}, // __builtin_ia32_xend - {Intrinsic::x86_avx512_mask_xor_pd_128, 123004}, // __builtin_ia32_xorpd128_mask - {Intrinsic::x86_avx512_mask_xor_pd_256, 123033}, // __builtin_ia32_xorpd256_mask - {Intrinsic::x86_avx512_mask_xor_pd_512, 123062}, // __builtin_ia32_xorpd512_mask - {Intrinsic::x86_avx512_mask_xor_ps_128, 123091}, // __builtin_ia32_xorps128_mask - {Intrinsic::x86_avx512_mask_xor_ps_256, 123120}, // __builtin_ia32_xorps256_mask - {Intrinsic::x86_avx512_mask_xor_ps_512, 123149}, // __builtin_ia32_xorps512_mask - {Intrinsic::x86_xtest, 138675}, // __builtin_ia32_xtest - }; - auto I = std::lower_bound(std::begin(x86Names), - std::end(x86Names), - BuiltinNameStr); - if (I != std::end(x86Names) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - if (TargetPrefix == "xcore") { - static const BuiltinEntry xcoreNames[] = { - {Intrinsic::xcore_bitrev, 138696}, // __builtin_bitrev - {Intrinsic::xcore_getid, 138713}, // __builtin_getid - {Intrinsic::xcore_getps, 138729}, // __builtin_getps - {Intrinsic::xcore_setps, 138745}, // __builtin_setps - }; - auto I = std::lower_bound(std::begin(xcoreNames), - std::end(xcoreNames), - BuiltinNameStr); - if (I != std::end(xcoreNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - return Intrinsic::not_intrinsic; -} -#endif - -// Get the LLVM intrinsic that corresponds to a builtin. -// This is used by the C front-end. The builtin name is passed -// in as BuiltinName, and a target prefix (e.g. 'ppc') is passed -// in as TargetPrefix. The result is assigned to 'IntrinsicID'. -#ifdef GET_LLVM_INTRINSIC_FOR_MS_BUILTIN -Intrinsic::ID Intrinsic::getIntrinsicForMSBuiltin(const char *TargetPrefixStr, const char *BuiltinNameStr) { - static const char BuiltinNames[] = { - '_', '_', 'd', 'm', 'b', '\000', '_', '_', 'd', 's', 'b', '\000', '_', '_', 'i', - 's', 'b', '\000', '_', 'M', 'o', 'v', 'e', 'F', 'r', 'o', 'm', 'C', 'o', 'p', - 'r', 'o', 'c', 'e', 's', 's', 'o', 'r', '\000', '_', 'M', 'o', 'v', 'e', 'F', - 'r', 'o', 'm', 'C', 'o', 'p', 'r', 'o', 'c', 'e', 's', 's', 'o', 'r', '2', - '\000', - }; - - struct BuiltinEntry { - Intrinsic::ID IntrinID; - unsigned StrTabOffset; - const char *getName() const { - return &BuiltinNames[StrTabOffset]; - } - bool operator<(const char *RHS) const { - return strcmp(getName(), RHS) < 0; - } - }; - StringRef BuiltinName(BuiltinNameStr); - StringRef TargetPrefix(TargetPrefixStr); - - if (TargetPrefix == "arm") { - static const BuiltinEntry armNames[] = { - {Intrinsic::arm_mrc, 18}, // _MoveFromCoprocessor - {Intrinsic::arm_mrc2, 39}, // _MoveFromCoprocessor2 - {Intrinsic::arm_dmb, 0}, // __dmb - {Intrinsic::arm_dsb, 6}, // __dsb - {Intrinsic::arm_isb, 12}, // __isb - }; - auto I = std::lower_bound(std::begin(armNames), - std::end(armNames), - BuiltinNameStr); - if (I != std::end(armNames) && - strcmp(I->getName(), BuiltinNameStr) == 0) - return I->IntrinID; - } - return Intrinsic::not_intrinsic; -} -#endif - -#if defined(_MSC_VER) && defined(setjmp_undefined_for_msvc) -// let's return it to _setjmp state -# pragma pop_macro("setjmp") -# undef setjmp_undefined_for_msvc -#endif - diff --git a/llvm/include/llvm/IR/Intrinsics.h b/llvm/include/llvm/IR/Intrinsics.h deleted file mode 100644 index 7a87c216..00000000 --- a/llvm/include/llvm/IR/Intrinsics.h +++ /dev/null @@ -1,161 +0,0 @@ -//===-- llvm/Instrinsics.h - LLVM Intrinsic Function Handling ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a set of enums which allow processing of intrinsic -// functions. Values of these enum types are returned by -// Function::getIntrinsicID. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_INTRINSICS_H -#define LLVM_IR_INTRINSICS_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/None.h" -#include "llvm/ADT/Optional.h" -#include - -namespace llvm { - -class Type; -class FunctionType; -class Function; -class LLVMContext; -class Module; -class AttributeSet; - -/// This namespace contains an enum with a value for every intrinsic/builtin -/// function known by LLVM. The enum values are returned by -/// Function::getIntrinsicID(). -namespace Intrinsic { - enum ID : unsigned { - not_intrinsic = 0, // Must be zero - - // Get the intrinsic enums generated from Intrinsics.td -#define GET_INTRINSIC_ENUM_VALUES -#include "llvm/IR/Intrinsics.gen" -#undef GET_INTRINSIC_ENUM_VALUES - , num_intrinsics - }; - - /// Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx". - std::string getName(ID id, ArrayRef Tys = None); - - /// Return the function type for an intrinsic. - FunctionType *getType(LLVMContext &Context, ID id, - ArrayRef Tys = None); - - /// Returns true if the intrinsic can be overloaded. - bool isOverloaded(ID id); - - /// Returns true if the intrinsic is a leaf, i.e. it does not make any calls - /// itself. Most intrinsics are leafs, the exceptions being the patchpoint - /// and statepoint intrinsics. These call (or invoke) their "target" argument. - bool isLeaf(ID id); - - /// Return the attributes for an intrinsic. - AttributeSet getAttributes(LLVMContext &C, ID id); - - /// Create or insert an LLVM Function declaration for an intrinsic, and return - /// it. - /// - /// The Tys parameter is for intrinsics with overloaded types (e.g., those - /// using iAny, fAny, vAny, or iPTRAny). For a declaration of an overloaded - /// intrinsic, Tys must provide exactly one type for each overloaded type in - /// the intrinsic. - Function *getDeclaration(Module *M, ID id, ArrayRef Tys = None); - - /// Looks up Name in NameTable via binary search. NameTable must be sorted - /// and all entries must start with "llvm.". If NameTable contains an exact - /// match for Name or a prefix of Name followed by a dot, its index in - /// NameTable is returned. Otherwise, -1 is returned. - int lookupLLVMIntrinsicByName(ArrayRef NameTable, - StringRef Name); - - /// Map a GCC builtin name to an intrinsic ID. - ID getIntrinsicForGCCBuiltin(const char *Prefix, const char *BuiltinName); - - /// Map a MS builtin name to an intrinsic ID. - ID getIntrinsicForMSBuiltin(const char *Prefix, const char *BuiltinName); - - /// This is a type descriptor which explains the type requirements of an - /// intrinsic. This is returned by getIntrinsicInfoTableEntries. - struct IITDescriptor { - enum IITDescriptorKind { - Void, VarArg, MMX, Token, Metadata, Half, Float, Double, - Integer, Vector, Pointer, Struct, - Argument, ExtendArgument, TruncArgument, HalfVecArgument, - SameVecWidthArgument, PtrToArgument, VecOfPtrsToElt - } Kind; - - union { - unsigned Integer_Width; - unsigned Float_Width; - unsigned Vector_Width; - unsigned Pointer_AddressSpace; - unsigned Struct_NumElements; - unsigned Argument_Info; - }; - - enum ArgKind { - AK_Any, - AK_AnyInteger, - AK_AnyFloat, - AK_AnyVector, - AK_AnyPointer - }; - unsigned getArgumentNumber() const { - assert(Kind == Argument || Kind == ExtendArgument || - Kind == TruncArgument || Kind == HalfVecArgument || - Kind == SameVecWidthArgument || Kind == PtrToArgument || - Kind == VecOfPtrsToElt); - return Argument_Info >> 3; - } - ArgKind getArgumentKind() const { - assert(Kind == Argument || Kind == ExtendArgument || - Kind == TruncArgument || Kind == HalfVecArgument || - Kind == SameVecWidthArgument || Kind == PtrToArgument || - Kind == VecOfPtrsToElt); - return (ArgKind)(Argument_Info & 7); - } - - static IITDescriptor get(IITDescriptorKind K, unsigned Field) { - IITDescriptor Result = { K, { Field } }; - return Result; - } - }; - - /// Return the IIT table descriptor for the specified intrinsic into an array - /// of IITDescriptors. - void getIntrinsicInfoTableEntries(ID id, SmallVectorImpl &T); - - /// Match the specified type (which comes from an intrinsic argument or return - /// value) with the type constraints specified by the .td file. If the given - /// type is an overloaded type it is pushed to the ArgTys vector. - /// - /// Returns false if the given type matches with the constraints, true - /// otherwise. - bool matchIntrinsicType(Type *Ty, ArrayRef &Infos, - SmallVectorImpl &ArgTys); - - /// Verify if the intrinsic has variable arguments. This method is intended to - /// be called after all the fixed arguments have been matched first. - /// - /// This method returns true on error. - bool matchIntrinsicVarArg(bool isVarArg, ArrayRef &Infos); - - // Checks if the intrinsic name matches with its signature and if not - // returns the declaration with the same signature and remangled name. - llvm::Optional remangleIntrinsicFunction(Function *F); - -} // End Intrinsic namespace - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td deleted file mode 100644 index e9264ec5..00000000 --- a/llvm/include/llvm/IR/Intrinsics.td +++ /dev/null @@ -1,705 +0,0 @@ -//===- Intrinsics.td - Defines all LLVM intrinsics ---------*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines properties of all LLVM intrinsics. -// -//===----------------------------------------------------------------------===// - -include "llvm/CodeGen/ValueTypes.td" - -//===----------------------------------------------------------------------===// -// Properties we keep track of for intrinsics. -//===----------------------------------------------------------------------===// - -class IntrinsicProperty; - -// Intr*Mem - Memory properties. If no property is set, the worst case -// is assumed (it may read and write any memory it can get access to and it may -// have other side effects). - -// IntrNoMem - The intrinsic does not access memory or have any other side -// effects. It may be CSE'd deleted if dead, etc. -def IntrNoMem : IntrinsicProperty; - -// IntrReadMem - This intrinsic only reads from memory. It does not write to -// memory and has no other side effects. Therefore, it cannot be moved across -// potentially aliasing stores. However, it can be reordered otherwise and can -// be deleted if dead. -def IntrReadMem : IntrinsicProperty; - -// IntrWriteMem - This intrinsic only writes to memory, but does not read from -// memory, and has no other side effects. This means dead stores before calls -// to this intrinsics may be removed. -def IntrWriteMem : IntrinsicProperty; - -// IntrArgMemOnly - This intrinsic only accesses memory that its pointer-typed -// argument(s) points to, but may access an unspecified amount. Other than -// reads from and (possibly volatile) writes to memory, it has no side effects. -def IntrArgMemOnly : IntrinsicProperty; - -// Commutative - This intrinsic is commutative: X op Y == Y op X. -def Commutative : IntrinsicProperty; - -// Throws - This intrinsic can throw. -def Throws : IntrinsicProperty; - -// NoCapture - The specified argument pointer is not captured by the intrinsic. -class NoCapture : IntrinsicProperty { - int ArgNo = argNo; -} - -// Returned - The specified argument is always the return value of the -// intrinsic. -class Returned : IntrinsicProperty { - int ArgNo = argNo; -} - -// ReadOnly - The specified argument pointer is not written to through the -// pointer by the intrinsic. -class ReadOnly : IntrinsicProperty { - int ArgNo = argNo; -} - -// WriteOnly - The intrinsic does not read memory through the specified -// argument pointer. -class WriteOnly : IntrinsicProperty { - int ArgNo = argNo; -} - -// ReadNone - The specified argument pointer is not dereferenced by the -// intrinsic. -class ReadNone : IntrinsicProperty { - int ArgNo = argNo; -} - -def IntrNoReturn : IntrinsicProperty; - -// IntrNoduplicate - Calls to this intrinsic cannot be duplicated. -// Parallels the noduplicate attribute on LLVM IR functions. -def IntrNoDuplicate : IntrinsicProperty; - -// IntrConvergent - Calls to this intrinsic are convergent and may not be made -// control-dependent on any additional values. -// Parallels the convergent attribute on LLVM IR functions. -def IntrConvergent : IntrinsicProperty; - -//===----------------------------------------------------------------------===// -// Types used by intrinsics. -//===----------------------------------------------------------------------===// - -class LLVMType { - ValueType VT = vt; -} - -class LLVMQualPointerType - : LLVMType{ - LLVMType ElTy = elty; - int AddrSpace = addrspace; -} - -class LLVMPointerType - : LLVMQualPointerType; - -class LLVMAnyPointerType - : LLVMType{ - LLVMType ElTy = elty; -} - -// Match the type of another intrinsic parameter. Number is an index into the -// list of overloaded types for the intrinsic, excluding all the fixed types. -// The Number value must refer to a previously listed type. For example: -// Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_anyfloat_ty, LLVMMatchType<0>]> -// has two overloaded types, the 2nd and 3rd arguments. LLVMMatchType<0> -// refers to the first overloaded type, which is the 2nd argument. -class LLVMMatchType - : LLVMType{ - int Number = num; -} - -// Match the type of another intrinsic parameter that is expected to be based on -// an integral type (i.e. either iN or ), but change the scalar size to -// be twice as wide or half as wide as the other type. This is only useful when -// the intrinsic is overloaded, so the matched type should be declared as iAny. -class LLVMExtendedType : LLVMMatchType; -class LLVMTruncatedType : LLVMMatchType; -class LLVMVectorSameWidth - : LLVMMatchType { - ValueType ElTy = elty.VT; -} -class LLVMPointerTo : LLVMMatchType; -class LLVMVectorOfPointersToElt : LLVMMatchType; - -// Match the type of another intrinsic parameter that is expected to be a -// vector type, but change the element count to be half as many -class LLVMHalfElementsVectorType : LLVMMatchType; - -def llvm_void_ty : LLVMType; -def llvm_any_ty : LLVMType; -def llvm_anyint_ty : LLVMType; -def llvm_anyfloat_ty : LLVMType; -def llvm_anyvector_ty : LLVMType; -def llvm_i1_ty : LLVMType; -def llvm_i8_ty : LLVMType; -def llvm_i16_ty : LLVMType; -def llvm_i32_ty : LLVMType; -def llvm_i64_ty : LLVMType; -def llvm_half_ty : LLVMType; -def llvm_float_ty : LLVMType; -def llvm_double_ty : LLVMType; -def llvm_f80_ty : LLVMType; -def llvm_f128_ty : LLVMType; -def llvm_ppcf128_ty : LLVMType; -def llvm_ptr_ty : LLVMPointerType; // i8* -def llvm_ptrptr_ty : LLVMPointerType; // i8** -def llvm_anyptr_ty : LLVMAnyPointerType; // (space)i8* -def llvm_empty_ty : LLVMType; // { } -def llvm_descriptor_ty : LLVMPointerType; // { }* -def llvm_metadata_ty : LLVMType; // !{...} -def llvm_token_ty : LLVMType; // token - -def llvm_x86mmx_ty : LLVMType; -def llvm_ptrx86mmx_ty : LLVMPointerType; // <1 x i64>* - -def llvm_v2i1_ty : LLVMType; // 2 x i1 -def llvm_v4i1_ty : LLVMType; // 4 x i1 -def llvm_v8i1_ty : LLVMType; // 8 x i1 -def llvm_v16i1_ty : LLVMType; // 16 x i1 -def llvm_v32i1_ty : LLVMType; // 32 x i1 -def llvm_v64i1_ty : LLVMType; // 64 x i1 -def llvm_v512i1_ty : LLVMType; // 512 x i1 -def llvm_v1024i1_ty : LLVMType; //1024 x i1 - -def llvm_v1i8_ty : LLVMType; // 1 x i8 -def llvm_v2i8_ty : LLVMType; // 2 x i8 -def llvm_v4i8_ty : LLVMType; // 4 x i8 -def llvm_v8i8_ty : LLVMType; // 8 x i8 -def llvm_v16i8_ty : LLVMType; // 16 x i8 -def llvm_v32i8_ty : LLVMType; // 32 x i8 -def llvm_v64i8_ty : LLVMType; // 64 x i8 -def llvm_v128i8_ty : LLVMType; //128 x i8 -def llvm_v256i8_ty : LLVMType; //256 x i8 - -def llvm_v1i16_ty : LLVMType; // 1 x i16 -def llvm_v2i16_ty : LLVMType; // 2 x i16 -def llvm_v4i16_ty : LLVMType; // 4 x i16 -def llvm_v8i16_ty : LLVMType; // 8 x i16 -def llvm_v16i16_ty : LLVMType; // 16 x i16 -def llvm_v32i16_ty : LLVMType; // 32 x i16 -def llvm_v64i16_ty : LLVMType; // 64 x i16 -def llvm_v128i16_ty : LLVMType; //128 x i16 - -def llvm_v1i32_ty : LLVMType; // 1 x i32 -def llvm_v2i32_ty : LLVMType; // 2 x i32 -def llvm_v4i32_ty : LLVMType; // 4 x i32 -def llvm_v8i32_ty : LLVMType; // 8 x i32 -def llvm_v16i32_ty : LLVMType; // 16 x i32 -def llvm_v32i32_ty : LLVMType; // 32 x i32 -def llvm_v64i32_ty : LLVMType; // 64 x i32 - -def llvm_v1i64_ty : LLVMType; // 1 x i64 -def llvm_v2i64_ty : LLVMType; // 2 x i64 -def llvm_v4i64_ty : LLVMType; // 4 x i64 -def llvm_v8i64_ty : LLVMType; // 8 x i64 -def llvm_v16i64_ty : LLVMType; // 16 x i64 -def llvm_v32i64_ty : LLVMType; // 32 x i64 - -def llvm_v1i128_ty : LLVMType; // 1 x i128 - -def llvm_v2f16_ty : LLVMType; // 2 x half (__fp16) -def llvm_v4f16_ty : LLVMType; // 4 x half (__fp16) -def llvm_v8f16_ty : LLVMType; // 8 x half (__fp16) -def llvm_v1f32_ty : LLVMType; // 1 x float -def llvm_v2f32_ty : LLVMType; // 2 x float -def llvm_v4f32_ty : LLVMType; // 4 x float -def llvm_v8f32_ty : LLVMType; // 8 x float -def llvm_v16f32_ty : LLVMType; // 16 x float -def llvm_v1f64_ty : LLVMType; // 1 x double -def llvm_v2f64_ty : LLVMType; // 2 x double -def llvm_v4f64_ty : LLVMType; // 4 x double -def llvm_v8f64_ty : LLVMType; // 8 x double - -def llvm_vararg_ty : LLVMType; // this means vararg here - - -//===----------------------------------------------------------------------===// -// Intrinsic Definitions. -//===----------------------------------------------------------------------===// - -// Intrinsic class - This is used to define one LLVM intrinsic. The name of the -// intrinsic definition should start with "int_", then match the LLVM intrinsic -// name with the "llvm." prefix removed, and all "."s turned into "_"s. For -// example, llvm.bswap.i16 -> int_bswap_i16. -// -// * RetTypes is a list containing the return types expected for the -// intrinsic. -// * ParamTypes is a list containing the parameter types expected for the -// intrinsic. -// * Properties can be set to describe the behavior of the intrinsic. -// -class SDPatternOperator; -class Intrinsic ret_types, - list param_types = [], - list properties = [], - string name = ""> : SDPatternOperator { - string LLVMName = name; - string TargetPrefix = ""; // Set to a prefix for target-specific intrinsics. - list RetTypes = ret_types; - list ParamTypes = param_types; - list IntrProperties = properties; - - bit isTarget = 0; -} - -/// GCCBuiltin - If this intrinsic exactly corresponds to a GCC builtin, this -/// specifies the name of the builtin. This provides automatic CBE and CFE -/// support. -class GCCBuiltin { - string GCCBuiltinName = name; -} - -class MSBuiltin { - string MSBuiltinName = name; -} - - -//===--------------- Variable Argument Handling Intrinsics ----------------===// -// - -def int_vastart : Intrinsic<[], [llvm_ptr_ty], [], "llvm.va_start">; -def int_vacopy : Intrinsic<[], [llvm_ptr_ty, llvm_ptr_ty], [], - "llvm.va_copy">; -def int_vaend : Intrinsic<[], [llvm_ptr_ty], [], "llvm.va_end">; - -//===------------------- Garbage Collection Intrinsics --------------------===// -// -def int_gcroot : Intrinsic<[], - [llvm_ptrptr_ty, llvm_ptr_ty]>; -def int_gcread : Intrinsic<[llvm_ptr_ty], - [llvm_ptr_ty, llvm_ptrptr_ty], - [IntrReadMem, IntrArgMemOnly]>; -def int_gcwrite : Intrinsic<[], - [llvm_ptr_ty, llvm_ptr_ty, llvm_ptrptr_ty], - [IntrArgMemOnly, NoCapture<1>, NoCapture<2>]>; - -//===--------------------- Code Generator Intrinsics ----------------------===// -// -def int_returnaddress : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_frameaddress : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_read_register : Intrinsic<[llvm_anyint_ty], [llvm_metadata_ty], - [IntrReadMem], "llvm.read_register">; -def int_write_register : Intrinsic<[], [llvm_metadata_ty, llvm_anyint_ty], - [], "llvm.write_register">; - -// Gets the address of the local variable area. This is typically a copy of the -// stack, frame, or base pointer depending on the type of prologue. -def int_localaddress : Intrinsic<[llvm_ptr_ty], [], [IntrNoMem]>; - -// Escapes local variables to allow access from other functions. -def int_localescape : Intrinsic<[], [llvm_vararg_ty]>; - -// Given a function and the localaddress of a parent frame, returns a pointer -// to an escaped allocation indicated by the index. -def int_localrecover : Intrinsic<[llvm_ptr_ty], - [llvm_ptr_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrNoMem]>; -// Note: we treat stacksave/stackrestore as writemem because we don't otherwise -// model their dependencies on allocas. -def int_stacksave : Intrinsic<[llvm_ptr_ty]>, - GCCBuiltin<"__builtin_stack_save">; -def int_stackrestore : Intrinsic<[], [llvm_ptr_ty]>, - GCCBuiltin<"__builtin_stack_restore">; - -def int_get_dynamic_area_offset : Intrinsic<[llvm_anyint_ty]>; - -def int_thread_pointer : Intrinsic<[llvm_ptr_ty], [], [IntrNoMem]>, - GCCBuiltin<"__builtin_thread_pointer">; - -// IntrArgMemOnly is more pessimistic than strictly necessary for prefetch, -// however it does conveniently prevent the prefetch from being reordered -// with respect to nearby accesses to the same memory. -def int_prefetch : Intrinsic<[], - [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty], - [IntrArgMemOnly, NoCapture<0>]>; -def int_pcmarker : Intrinsic<[], [llvm_i32_ty]>; - -def int_readcyclecounter : Intrinsic<[llvm_i64_ty]>; - -// The assume intrinsic is marked as arbitrarily writing so that proper -// control dependencies will be maintained. -def int_assume : Intrinsic<[], [llvm_i1_ty], []>; - -// Stack Protector Intrinsic - The stackprotector intrinsic writes the stack -// guard to the correct place on the stack frame. -def int_stackprotector : Intrinsic<[], [llvm_ptr_ty, llvm_ptrptr_ty], []>; -def int_stackguard : Intrinsic<[llvm_ptr_ty], [], []>; - -// A counter increment for instrumentation based profiling. -def int_instrprof_increment : Intrinsic<[], - [llvm_ptr_ty, llvm_i64_ty, - llvm_i32_ty, llvm_i32_ty], - []>; - -// A call to profile runtime for value profiling of target expressions -// through instrumentation based profiling. -def int_instrprof_value_profile : Intrinsic<[], - [llvm_ptr_ty, llvm_i64_ty, - llvm_i64_ty, llvm_i32_ty, - llvm_i32_ty], - []>; - -//===------------------- Standard C Library Intrinsics --------------------===// -// - -def int_memcpy : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyptr_ty, llvm_anyint_ty, - llvm_i32_ty, llvm_i1_ty], - [IntrArgMemOnly, NoCapture<0>, NoCapture<1>, - WriteOnly<0>, ReadOnly<1>]>; -def int_memmove : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyptr_ty, llvm_anyint_ty, - llvm_i32_ty, llvm_i1_ty], - [IntrArgMemOnly, NoCapture<0>, NoCapture<1>, - ReadOnly<1>]>; -def int_memset : Intrinsic<[], - [llvm_anyptr_ty, llvm_i8_ty, llvm_anyint_ty, - llvm_i32_ty, llvm_i1_ty], - [IntrArgMemOnly, NoCapture<0>, WriteOnly<0>]>; - -let IntrProperties = [IntrNoMem] in { - def int_fma : Intrinsic<[llvm_anyfloat_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, - LLVMMatchType<0>]>; - def int_fmuladd : Intrinsic<[llvm_anyfloat_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, - LLVMMatchType<0>]>; - - // These functions do not read memory, but are sensitive to the - // rounding mode. LLVM purposely does not model changes to the FP - // environment so they can be treated as readnone. - def int_sqrt : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_powi : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, llvm_i32_ty]>; - def int_sin : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_cos : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_pow : Intrinsic<[llvm_anyfloat_ty], - [LLVMMatchType<0>, LLVMMatchType<0>]>; - def int_log : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_log10: Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_log2 : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_exp : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_exp2 : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_fabs : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_copysign : Intrinsic<[llvm_anyfloat_ty], - [LLVMMatchType<0>, LLVMMatchType<0>]>; - def int_floor : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_ceil : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_trunc : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_rint : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_nearbyint : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_round : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; - def int_canonicalize : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>], - [IntrNoMem]>; -} - -def int_minnum : Intrinsic<[llvm_anyfloat_ty], - [LLVMMatchType<0>, LLVMMatchType<0>], [IntrNoMem, Commutative] ->; -def int_maxnum : Intrinsic<[llvm_anyfloat_ty], - [LLVMMatchType<0>, LLVMMatchType<0>], [IntrNoMem, Commutative] ->; - -// NOTE: these are internal interfaces. -def int_setjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; -def int_longjmp : Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty], [IntrNoReturn]>; -def int_sigsetjmp : Intrinsic<[llvm_i32_ty] , [llvm_ptr_ty, llvm_i32_ty]>; -def int_siglongjmp : Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty], [IntrNoReturn]>; - -// Internal interface for object size checking -def int_objectsize : Intrinsic<[llvm_anyint_ty], [llvm_anyptr_ty, llvm_i1_ty], - [IntrNoMem]>, - GCCBuiltin<"__builtin_object_size">; - -//===------------------------- Expect Intrinsics --------------------------===// -// -def int_expect : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, - LLVMMatchType<0>], [IntrNoMem]>; - -//===-------------------- Bit Manipulation Intrinsics ---------------------===// -// - -// None of these intrinsics accesses memory at all. -let IntrProperties = [IntrNoMem] in { - def int_bswap: Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>; - def int_ctpop: Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>; - def int_ctlz : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i1_ty]>; - def int_cttz : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, llvm_i1_ty]>; - def int_bitreverse : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>]>; -} - -//===------------------------ Debugger Intrinsics -------------------------===// -// - -// None of these intrinsics accesses memory at all...but that doesn't mean the -// optimizers can change them aggressively. Special handling needed in a few -// places. -let IntrProperties = [IntrNoMem] in { - def int_dbg_declare : Intrinsic<[], - [llvm_metadata_ty, - llvm_metadata_ty, - llvm_metadata_ty]>; - def int_dbg_value : Intrinsic<[], - [llvm_metadata_ty, llvm_i64_ty, - llvm_metadata_ty, - llvm_metadata_ty]>; -} - -//===------------------ Exception Handling Intrinsics----------------------===// -// - -// The result of eh.typeid.for depends on the enclosing function, but inside a -// given function it is 'const' and may be CSE'd etc. -def int_eh_typeid_for : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>; - -def int_eh_return_i32 : Intrinsic<[], [llvm_i32_ty, llvm_ptr_ty]>; -def int_eh_return_i64 : Intrinsic<[], [llvm_i64_ty, llvm_ptr_ty]>; - -// eh.exceptionpointer returns the pointer to the exception caught by -// the given `catchpad`. -def int_eh_exceptionpointer : Intrinsic<[llvm_anyptr_ty], [llvm_token_ty], - [IntrNoMem]>; - -// Gets the exception code from a catchpad token. Only used on some platforms. -def int_eh_exceptioncode : Intrinsic<[llvm_i32_ty], [llvm_token_ty], [IntrNoMem]>; - -// __builtin_unwind_init is an undocumented GCC intrinsic that causes all -// callee-saved registers to be saved and restored (regardless of whether they -// are used) in the calling function. It is used by libgcc_eh. -def int_eh_unwind_init: Intrinsic<[]>, - GCCBuiltin<"__builtin_unwind_init">; - -def int_eh_dwarf_cfa : Intrinsic<[llvm_ptr_ty], [llvm_i32_ty]>; - -let IntrProperties = [IntrNoMem] in { - def int_eh_sjlj_lsda : Intrinsic<[llvm_ptr_ty]>; - def int_eh_sjlj_callsite : Intrinsic<[], [llvm_i32_ty]>; -} -def int_eh_sjlj_functioncontext : Intrinsic<[], [llvm_ptr_ty]>; -def int_eh_sjlj_setjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; -def int_eh_sjlj_longjmp : Intrinsic<[], [llvm_ptr_ty], [IntrNoReturn]>; -def int_eh_sjlj_setup_dispatch : Intrinsic<[], []>; - -//===---------------- Generic Variable Attribute Intrinsics----------------===// -// -def int_var_annotation : Intrinsic<[], - [llvm_ptr_ty, llvm_ptr_ty, - llvm_ptr_ty, llvm_i32_ty], - [], "llvm.var.annotation">; -def int_ptr_annotation : Intrinsic<[LLVMAnyPointerType], - [LLVMMatchType<0>, llvm_ptr_ty, llvm_ptr_ty, - llvm_i32_ty], - [], "llvm.ptr.annotation">; -def int_annotation : Intrinsic<[llvm_anyint_ty], - [LLVMMatchType<0>, llvm_ptr_ty, - llvm_ptr_ty, llvm_i32_ty], - [], "llvm.annotation">; - -//===------------------------ Trampoline Intrinsics -----------------------===// -// -def int_init_trampoline : Intrinsic<[], - [llvm_ptr_ty, llvm_ptr_ty, llvm_ptr_ty], - [IntrArgMemOnly, NoCapture<0>]>, - GCCBuiltin<"__builtin_init_trampoline">; - -def int_adjust_trampoline : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty], - [IntrReadMem, IntrArgMemOnly]>, - GCCBuiltin<"__builtin_adjust_trampoline">; - -//===------------------------ Overflow Intrinsics -------------------------===// -// - -// Expose the carry flag from add operations on two integrals. -def int_sadd_with_overflow : Intrinsic<[llvm_anyint_ty, llvm_i1_ty], - [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; -def int_uadd_with_overflow : Intrinsic<[llvm_anyint_ty, llvm_i1_ty], - [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - -def int_ssub_with_overflow : Intrinsic<[llvm_anyint_ty, llvm_i1_ty], - [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; -def int_usub_with_overflow : Intrinsic<[llvm_anyint_ty, llvm_i1_ty], - [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - -def int_smul_with_overflow : Intrinsic<[llvm_anyint_ty, llvm_i1_ty], - [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; -def int_umul_with_overflow : Intrinsic<[llvm_anyint_ty, llvm_i1_ty], - [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - -//===------------------------- Memory Use Markers -------------------------===// -// -def int_lifetime_start : Intrinsic<[], - [llvm_i64_ty, llvm_ptr_ty], - [IntrArgMemOnly, NoCapture<1>]>; -def int_lifetime_end : Intrinsic<[], - [llvm_i64_ty, llvm_ptr_ty], - [IntrArgMemOnly, NoCapture<1>]>; -def int_invariant_start : Intrinsic<[llvm_descriptor_ty], - [llvm_i64_ty, llvm_ptr_ty], - [IntrArgMemOnly, NoCapture<1>]>; -def int_invariant_end : Intrinsic<[], - [llvm_descriptor_ty, llvm_i64_ty, - llvm_ptr_ty], - [IntrArgMemOnly, NoCapture<2>]>; - -def int_invariant_group_barrier : Intrinsic<[llvm_ptr_ty], - [llvm_ptr_ty], - [IntrNoMem]>; - -//===------------------------ Stackmap Intrinsics -------------------------===// -// -def int_experimental_stackmap : Intrinsic<[], - [llvm_i64_ty, llvm_i32_ty, llvm_vararg_ty], - [Throws]>; -def int_experimental_patchpoint_void : Intrinsic<[], - [llvm_i64_ty, llvm_i32_ty, - llvm_ptr_ty, llvm_i32_ty, - llvm_vararg_ty], - [Throws]>; -def int_experimental_patchpoint_i64 : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, - llvm_ptr_ty, llvm_i32_ty, - llvm_vararg_ty], - [Throws]>; - - -//===------------------------ Garbage Collection Intrinsics ---------------===// -// These are documented in docs/Statepoint.rst - -def int_experimental_gc_statepoint : Intrinsic<[llvm_token_ty], - [llvm_i64_ty, llvm_i32_ty, - llvm_anyptr_ty, llvm_i32_ty, - llvm_i32_ty, llvm_vararg_ty], - [Throws]>; - -def int_experimental_gc_result : Intrinsic<[llvm_any_ty], [llvm_token_ty], - [IntrReadMem]>; -def int_experimental_gc_relocate : Intrinsic<[llvm_any_ty], - [llvm_token_ty, llvm_i32_ty, llvm_i32_ty], - [IntrReadMem]>; - -//===-------------------------- Other Intrinsics --------------------------===// -// -def int_flt_rounds : Intrinsic<[llvm_i32_ty]>, - GCCBuiltin<"__builtin_flt_rounds">; -def int_trap : Intrinsic<[], [], [IntrNoReturn]>, - GCCBuiltin<"__builtin_trap">; -def int_debugtrap : Intrinsic<[]>, - GCCBuiltin<"__builtin_debugtrap">; - -// Support for dynamic deoptimization (or de-specialization) -def int_experimental_deoptimize : Intrinsic<[llvm_any_ty], [llvm_vararg_ty], - [Throws]>; - -// Support for speculative runtime guards -def int_experimental_guard : Intrinsic<[], [llvm_i1_ty, llvm_vararg_ty], - [Throws]>; - -// NOP: calls/invokes to this intrinsic are removed by codegen -def int_donothing : Intrinsic<[], [], [IntrNoMem]>; - -// Intrisics to support half precision floating point format -let IntrProperties = [IntrNoMem] in { -def int_convert_to_fp16 : Intrinsic<[llvm_i16_ty], [llvm_anyfloat_ty]>; -def int_convert_from_fp16 : Intrinsic<[llvm_anyfloat_ty], [llvm_i16_ty]>; -} - -// These convert intrinsics are to support various conversions between -// various types with rounding and saturation. NOTE: avoid using these -// intrinsics as they might be removed sometime in the future and -// most targets don't support them. -def int_convertff : Intrinsic<[llvm_anyfloat_ty], - [llvm_anyfloat_ty, llvm_i32_ty, llvm_i32_ty]>; -def int_convertfsi : Intrinsic<[llvm_anyfloat_ty], - [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; -def int_convertfui : Intrinsic<[llvm_anyfloat_ty], - [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; -def int_convertsif : Intrinsic<[llvm_anyint_ty], - [llvm_anyfloat_ty, llvm_i32_ty, llvm_i32_ty]>; -def int_convertuif : Intrinsic<[llvm_anyint_ty], - [llvm_anyfloat_ty, llvm_i32_ty, llvm_i32_ty]>; -def int_convertss : Intrinsic<[llvm_anyint_ty], - [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; -def int_convertsu : Intrinsic<[llvm_anyint_ty], - [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; -def int_convertus : Intrinsic<[llvm_anyint_ty], - [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; -def int_convertuu : Intrinsic<[llvm_anyint_ty], - [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; - -// Clear cache intrinsic, default to ignore (ie. emit nothing) -// maps to void __clear_cache() on supporting platforms -def int_clear_cache : Intrinsic<[], [llvm_ptr_ty, llvm_ptr_ty], - [], "llvm.clear_cache">; - -//===-------------------------- Masked Intrinsics -------------------------===// -// -def int_masked_store : Intrinsic<[], [llvm_anyvector_ty, - LLVMAnyPointerType>, - llvm_i32_ty, - LLVMVectorSameWidth<0, llvm_i1_ty>], - [IntrArgMemOnly]>; - -def int_masked_load : Intrinsic<[llvm_anyvector_ty], - [LLVMAnyPointerType>, llvm_i32_ty, - LLVMVectorSameWidth<0, llvm_i1_ty>, LLVMMatchType<0>], - [IntrReadMem, IntrArgMemOnly]>; - -def int_masked_gather: Intrinsic<[llvm_anyvector_ty], - [LLVMVectorOfPointersToElt<0>, llvm_i32_ty, - LLVMVectorSameWidth<0, llvm_i1_ty>, - LLVMMatchType<0>], - [IntrReadMem]>; - -def int_masked_scatter: Intrinsic<[], - [llvm_anyvector_ty, - LLVMVectorOfPointersToElt<0>, llvm_i32_ty, - LLVMVectorSameWidth<0, llvm_i1_ty>]>; - -// Test whether a pointer is associated with a type metadata identifier. -def int_type_test : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty, llvm_metadata_ty], - [IntrNoMem]>; - -// Safely loads a function pointer from a virtual table pointer using type metadata. -def int_type_checked_load : Intrinsic<[llvm_ptr_ty, llvm_i1_ty], - [llvm_ptr_ty, llvm_i32_ty, llvm_metadata_ty], - [IntrNoMem]>; - -def int_load_relative: Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty, llvm_anyint_ty], - [IntrReadMem, IntrArgMemOnly]>; - -//===----------------------------------------------------------------------===// -// Target-specific intrinsics -//===----------------------------------------------------------------------===// - -include "llvm/IR/IntrinsicsPowerPC.td" -include "llvm/IR/IntrinsicsX86.td" -include "llvm/IR/IntrinsicsARM.td" -include "llvm/IR/IntrinsicsAArch64.td" -include "llvm/IR/IntrinsicsXCore.td" -include "llvm/IR/IntrinsicsHexagon.td" -include "llvm/IR/IntrinsicsNVVM.td" -include "llvm/IR/IntrinsicsMips.td" -include "llvm/IR/IntrinsicsAMDGPU.td" -include "llvm/IR/IntrinsicsBPF.td" -include "llvm/IR/IntrinsicsSystemZ.td" -include "llvm/IR/IntrinsicsWebAssembly.td" diff --git a/llvm/include/llvm/IR/IntrinsicsAArch64.td b/llvm/include/llvm/IR/IntrinsicsAArch64.td deleted file mode 100644 index d1e33177..00000000 --- a/llvm/include/llvm/IR/IntrinsicsAArch64.td +++ /dev/null @@ -1,655 +0,0 @@ -//===- IntrinsicsAARCH64.td - Defines AARCH64 intrinsics ---*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the AARCH64-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -let TargetPrefix = "aarch64" in { - -def int_aarch64_ldxr : Intrinsic<[llvm_i64_ty], [llvm_anyptr_ty]>; -def int_aarch64_ldaxr : Intrinsic<[llvm_i64_ty], [llvm_anyptr_ty]>; -def int_aarch64_stxr : Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_anyptr_ty]>; -def int_aarch64_stlxr : Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_anyptr_ty]>; - -def int_aarch64_ldxp : Intrinsic<[llvm_i64_ty, llvm_i64_ty], [llvm_ptr_ty]>; -def int_aarch64_ldaxp : Intrinsic<[llvm_i64_ty, llvm_i64_ty], [llvm_ptr_ty]>; -def int_aarch64_stxp : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_ptr_ty]>; -def int_aarch64_stlxp : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_ptr_ty]>; - -def int_aarch64_clrex : Intrinsic<[]>; - -def int_aarch64_sdiv : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, - LLVMMatchType<0>], [IntrNoMem]>; -def int_aarch64_udiv : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, - LLVMMatchType<0>], [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// HINT - -def int_aarch64_hint : Intrinsic<[], [llvm_i32_ty]>; - -//===----------------------------------------------------------------------===// -// RBIT - -def int_aarch64_rbit : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], - [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// Data Barrier Instructions - -def int_aarch64_dmb : GCCBuiltin<"__builtin_arm_dmb">, Intrinsic<[], [llvm_i32_ty]>; -def int_aarch64_dsb : GCCBuiltin<"__builtin_arm_dsb">, Intrinsic<[], [llvm_i32_ty]>; -def int_aarch64_isb : GCCBuiltin<"__builtin_arm_isb">, Intrinsic<[], [llvm_i32_ty]>; - -} - -//===----------------------------------------------------------------------===// -// Advanced SIMD (NEON) - -let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.". - class AdvSIMD_2Scalar_Float_Intrinsic - : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - - class AdvSIMD_FPToIntRounding_Intrinsic - : Intrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty], [IntrNoMem]>; - - class AdvSIMD_1IntArg_Intrinsic - : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>], [IntrNoMem]>; - class AdvSIMD_1FloatArg_Intrinsic - : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem]>; - class AdvSIMD_1VectorArg_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMMatchType<0>], [IntrNoMem]>; - class AdvSIMD_1VectorArg_Expand_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty], [IntrNoMem]>; - class AdvSIMD_1VectorArg_Long_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMTruncatedType<0>], [IntrNoMem]>; - class AdvSIMD_1IntArg_Narrow_Intrinsic - : Intrinsic<[llvm_anyint_ty], [llvm_anyint_ty], [IntrNoMem]>; - class AdvSIMD_1VectorArg_Narrow_Intrinsic - : Intrinsic<[llvm_anyint_ty], [LLVMExtendedType<0>], [IntrNoMem]>; - class AdvSIMD_1VectorArg_Int_Across_Intrinsic - : Intrinsic<[llvm_anyint_ty], [llvm_anyvector_ty], [IntrNoMem]>; - class AdvSIMD_1VectorArg_Float_Across_Intrinsic - : Intrinsic<[llvm_anyfloat_ty], [llvm_anyvector_ty], [IntrNoMem]>; - - class AdvSIMD_2IntArg_Intrinsic - : Intrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_2FloatArg_Intrinsic - : Intrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Compare_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty, LLVMMatchType<1>], - [IntrNoMem]>; - class AdvSIMD_2Arg_FloatCompare_Intrinsic - : Intrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty, LLVMMatchType<1>], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Long_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMTruncatedType<0>, LLVMTruncatedType<0>], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Wide_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, LLVMTruncatedType<0>], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Narrow_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMExtendedType<0>, LLVMExtendedType<0>], - [IntrNoMem]>; - class AdvSIMD_2Arg_Scalar_Narrow_Intrinsic - : Intrinsic<[llvm_anyint_ty], - [LLVMExtendedType<0>, llvm_i32_ty], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Scalar_Expand_BySize_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [llvm_anyvector_ty], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Scalar_Wide_BySize_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMTruncatedType<0>], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Scalar_Wide_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMTruncatedType<0>, llvm_i32_ty], - [IntrNoMem]>; - class AdvSIMD_2VectorArg_Tied_Narrow_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMHalfElementsVectorType<0>, llvm_anyvector_ty], - [IntrNoMem]>; - - class AdvSIMD_3VectorArg_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_3VectorArg_Scalar_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, llvm_i32_ty], - [IntrNoMem]>; - class AdvSIMD_3VectorArg_Tied_Narrow_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMHalfElementsVectorType<0>, llvm_anyvector_ty, - LLVMMatchType<1>], [IntrNoMem]>; - class AdvSIMD_3VectorArg_Scalar_Tied_Narrow_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMHalfElementsVectorType<0>, llvm_anyvector_ty, llvm_i32_ty], - [IntrNoMem]>; - class AdvSIMD_CvtFxToFP_Intrinsic - : Intrinsic<[llvm_anyfloat_ty], [llvm_anyint_ty, llvm_i32_ty], - [IntrNoMem]>; - class AdvSIMD_CvtFPToFx_Intrinsic - : Intrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty, llvm_i32_ty], - [IntrNoMem]>; -} - -// Arithmetic ops - -let TargetPrefix = "aarch64", IntrProperties = [IntrNoMem] in { - // Vector Add Across Lanes - def int_aarch64_neon_saddv : AdvSIMD_1VectorArg_Int_Across_Intrinsic; - def int_aarch64_neon_uaddv : AdvSIMD_1VectorArg_Int_Across_Intrinsic; - def int_aarch64_neon_faddv : AdvSIMD_1VectorArg_Float_Across_Intrinsic; - - // Vector Long Add Across Lanes - def int_aarch64_neon_saddlv : AdvSIMD_1VectorArg_Int_Across_Intrinsic; - def int_aarch64_neon_uaddlv : AdvSIMD_1VectorArg_Int_Across_Intrinsic; - - // Vector Halving Add - def int_aarch64_neon_shadd : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_uhadd : AdvSIMD_2VectorArg_Intrinsic; - - // Vector Rounding Halving Add - def int_aarch64_neon_srhadd : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_urhadd : AdvSIMD_2VectorArg_Intrinsic; - - // Vector Saturating Add - def int_aarch64_neon_sqadd : AdvSIMD_2IntArg_Intrinsic; - def int_aarch64_neon_suqadd : AdvSIMD_2IntArg_Intrinsic; - def int_aarch64_neon_usqadd : AdvSIMD_2IntArg_Intrinsic; - def int_aarch64_neon_uqadd : AdvSIMD_2IntArg_Intrinsic; - - // Vector Add High-Half - // FIXME: this is a legacy intrinsic for aarch64_simd.h. Remove it when that - // header is no longer supported. - def int_aarch64_neon_addhn : AdvSIMD_2VectorArg_Narrow_Intrinsic; - - // Vector Rounding Add High-Half - def int_aarch64_neon_raddhn : AdvSIMD_2VectorArg_Narrow_Intrinsic; - - // Vector Saturating Doubling Multiply High - def int_aarch64_neon_sqdmulh : AdvSIMD_2IntArg_Intrinsic; - - // Vector Saturating Rounding Doubling Multiply High - def int_aarch64_neon_sqrdmulh : AdvSIMD_2IntArg_Intrinsic; - - // Vector Polynominal Multiply - def int_aarch64_neon_pmul : AdvSIMD_2VectorArg_Intrinsic; - - // Vector Long Multiply - def int_aarch64_neon_smull : AdvSIMD_2VectorArg_Long_Intrinsic; - def int_aarch64_neon_umull : AdvSIMD_2VectorArg_Long_Intrinsic; - def int_aarch64_neon_pmull : AdvSIMD_2VectorArg_Long_Intrinsic; - - // 64-bit polynomial multiply really returns an i128, which is not legal. Fake - // it with a v16i8. - def int_aarch64_neon_pmull64 : - Intrinsic<[llvm_v16i8_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>; - - // Vector Extending Multiply - def int_aarch64_neon_fmulx : AdvSIMD_2FloatArg_Intrinsic { - let IntrProperties = [IntrNoMem, Commutative]; - } - - // Vector Saturating Doubling Long Multiply - def int_aarch64_neon_sqdmull : AdvSIMD_2VectorArg_Long_Intrinsic; - def int_aarch64_neon_sqdmulls_scalar - : Intrinsic<[llvm_i64_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - - // Vector Halving Subtract - def int_aarch64_neon_shsub : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_uhsub : AdvSIMD_2VectorArg_Intrinsic; - - // Vector Saturating Subtract - def int_aarch64_neon_sqsub : AdvSIMD_2IntArg_Intrinsic; - def int_aarch64_neon_uqsub : AdvSIMD_2IntArg_Intrinsic; - - // Vector Subtract High-Half - // FIXME: this is a legacy intrinsic for aarch64_simd.h. Remove it when that - // header is no longer supported. - def int_aarch64_neon_subhn : AdvSIMD_2VectorArg_Narrow_Intrinsic; - - // Vector Rounding Subtract High-Half - def int_aarch64_neon_rsubhn : AdvSIMD_2VectorArg_Narrow_Intrinsic; - - // Vector Compare Absolute Greater-than-or-equal - def int_aarch64_neon_facge : AdvSIMD_2Arg_FloatCompare_Intrinsic; - - // Vector Compare Absolute Greater-than - def int_aarch64_neon_facgt : AdvSIMD_2Arg_FloatCompare_Intrinsic; - - // Vector Absolute Difference - def int_aarch64_neon_sabd : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_uabd : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_fabd : AdvSIMD_2VectorArg_Intrinsic; - - // Scalar Absolute Difference - def int_aarch64_sisd_fabd : AdvSIMD_2Scalar_Float_Intrinsic; - - // Vector Max - def int_aarch64_neon_smax : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_umax : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_fmax : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_fmaxnmp : AdvSIMD_2VectorArg_Intrinsic; - - // Vector Max Across Lanes - def int_aarch64_neon_smaxv : AdvSIMD_1VectorArg_Int_Across_Intrinsic; - def int_aarch64_neon_umaxv : AdvSIMD_1VectorArg_Int_Across_Intrinsic; - def int_aarch64_neon_fmaxv : AdvSIMD_1VectorArg_Float_Across_Intrinsic; - def int_aarch64_neon_fmaxnmv : AdvSIMD_1VectorArg_Float_Across_Intrinsic; - - // Vector Min - def int_aarch64_neon_smin : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_umin : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_fmin : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_fminnmp : AdvSIMD_2VectorArg_Intrinsic; - - // Vector Min/Max Number - def int_aarch64_neon_fminnm : AdvSIMD_2FloatArg_Intrinsic; - def int_aarch64_neon_fmaxnm : AdvSIMD_2FloatArg_Intrinsic; - - // Vector Min Across Lanes - def int_aarch64_neon_sminv : AdvSIMD_1VectorArg_Int_Across_Intrinsic; - def int_aarch64_neon_uminv : AdvSIMD_1VectorArg_Int_Across_Intrinsic; - def int_aarch64_neon_fminv : AdvSIMD_1VectorArg_Float_Across_Intrinsic; - def int_aarch64_neon_fminnmv : AdvSIMD_1VectorArg_Float_Across_Intrinsic; - - // Pairwise Add - def int_aarch64_neon_addp : AdvSIMD_2VectorArg_Intrinsic; - - // Long Pairwise Add - // FIXME: In theory, we shouldn't need intrinsics for saddlp or - // uaddlp, but tblgen's type inference currently can't handle the - // pattern fragments this ends up generating. - def int_aarch64_neon_saddlp : AdvSIMD_1VectorArg_Expand_Intrinsic; - def int_aarch64_neon_uaddlp : AdvSIMD_1VectorArg_Expand_Intrinsic; - - // Folding Maximum - def int_aarch64_neon_smaxp : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_umaxp : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_fmaxp : AdvSIMD_2VectorArg_Intrinsic; - - // Folding Minimum - def int_aarch64_neon_sminp : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_uminp : AdvSIMD_2VectorArg_Intrinsic; - def int_aarch64_neon_fminp : AdvSIMD_2VectorArg_Intrinsic; - - // Reciprocal Estimate/Step - def int_aarch64_neon_frecps : AdvSIMD_2FloatArg_Intrinsic; - def int_aarch64_neon_frsqrts : AdvSIMD_2FloatArg_Intrinsic; - - // Reciprocal Exponent - def int_aarch64_neon_frecpx : AdvSIMD_1FloatArg_Intrinsic; - - // Vector Saturating Shift Left - def int_aarch64_neon_sqshl : AdvSIMD_2IntArg_Intrinsic; - def int_aarch64_neon_uqshl : AdvSIMD_2IntArg_Intrinsic; - - // Vector Rounding Shift Left - def int_aarch64_neon_srshl : AdvSIMD_2IntArg_Intrinsic; - def int_aarch64_neon_urshl : AdvSIMD_2IntArg_Intrinsic; - - // Vector Saturating Rounding Shift Left - def int_aarch64_neon_sqrshl : AdvSIMD_2IntArg_Intrinsic; - def int_aarch64_neon_uqrshl : AdvSIMD_2IntArg_Intrinsic; - - // Vector Signed->Unsigned Shift Left by Constant - def int_aarch64_neon_sqshlu : AdvSIMD_2IntArg_Intrinsic; - - // Vector Signed->Unsigned Narrowing Saturating Shift Right by Constant - def int_aarch64_neon_sqshrun : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic; - - // Vector Signed->Unsigned Rounding Narrowing Saturating Shift Right by Const - def int_aarch64_neon_sqrshrun : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic; - - // Vector Narrowing Shift Right by Constant - def int_aarch64_neon_sqshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic; - def int_aarch64_neon_uqshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic; - - // Vector Rounding Narrowing Shift Right by Constant - def int_aarch64_neon_rshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic; - - // Vector Rounding Narrowing Saturating Shift Right by Constant - def int_aarch64_neon_sqrshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic; - def int_aarch64_neon_uqrshrn : AdvSIMD_2Arg_Scalar_Narrow_Intrinsic; - - // Vector Shift Left - def int_aarch64_neon_sshl : AdvSIMD_2IntArg_Intrinsic; - def int_aarch64_neon_ushl : AdvSIMD_2IntArg_Intrinsic; - - // Vector Widening Shift Left by Constant - def int_aarch64_neon_shll : AdvSIMD_2VectorArg_Scalar_Wide_BySize_Intrinsic; - def int_aarch64_neon_sshll : AdvSIMD_2VectorArg_Scalar_Wide_Intrinsic; - def int_aarch64_neon_ushll : AdvSIMD_2VectorArg_Scalar_Wide_Intrinsic; - - // Vector Shift Right by Constant and Insert - def int_aarch64_neon_vsri : AdvSIMD_3VectorArg_Scalar_Intrinsic; - - // Vector Shift Left by Constant and Insert - def int_aarch64_neon_vsli : AdvSIMD_3VectorArg_Scalar_Intrinsic; - - // Vector Saturating Narrow - def int_aarch64_neon_scalar_sqxtn: AdvSIMD_1IntArg_Narrow_Intrinsic; - def int_aarch64_neon_scalar_uqxtn : AdvSIMD_1IntArg_Narrow_Intrinsic; - def int_aarch64_neon_sqxtn : AdvSIMD_1VectorArg_Narrow_Intrinsic; - def int_aarch64_neon_uqxtn : AdvSIMD_1VectorArg_Narrow_Intrinsic; - - // Vector Saturating Extract and Unsigned Narrow - def int_aarch64_neon_scalar_sqxtun : AdvSIMD_1IntArg_Narrow_Intrinsic; - def int_aarch64_neon_sqxtun : AdvSIMD_1VectorArg_Narrow_Intrinsic; - - // Vector Absolute Value - def int_aarch64_neon_abs : AdvSIMD_1IntArg_Intrinsic; - - // Vector Saturating Absolute Value - def int_aarch64_neon_sqabs : AdvSIMD_1IntArg_Intrinsic; - - // Vector Saturating Negation - def int_aarch64_neon_sqneg : AdvSIMD_1IntArg_Intrinsic; - - // Vector Count Leading Sign Bits - def int_aarch64_neon_cls : AdvSIMD_1VectorArg_Intrinsic; - - // Vector Reciprocal Estimate - def int_aarch64_neon_urecpe : AdvSIMD_1VectorArg_Intrinsic; - def int_aarch64_neon_frecpe : AdvSIMD_1FloatArg_Intrinsic; - - // Vector Square Root Estimate - def int_aarch64_neon_ursqrte : AdvSIMD_1VectorArg_Intrinsic; - def int_aarch64_neon_frsqrte : AdvSIMD_1FloatArg_Intrinsic; - - // Vector Bitwise Reverse - def int_aarch64_neon_rbit : AdvSIMD_1VectorArg_Intrinsic; - - // Vector Conversions Between Half-Precision and Single-Precision. - def int_aarch64_neon_vcvtfp2hf - : Intrinsic<[llvm_v4i16_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_aarch64_neon_vcvthf2fp - : Intrinsic<[llvm_v4f32_ty], [llvm_v4i16_ty], [IntrNoMem]>; - - // Vector Conversions Between Floating-point and Fixed-point. - def int_aarch64_neon_vcvtfp2fxs : AdvSIMD_CvtFPToFx_Intrinsic; - def int_aarch64_neon_vcvtfp2fxu : AdvSIMD_CvtFPToFx_Intrinsic; - def int_aarch64_neon_vcvtfxs2fp : AdvSIMD_CvtFxToFP_Intrinsic; - def int_aarch64_neon_vcvtfxu2fp : AdvSIMD_CvtFxToFP_Intrinsic; - - // Vector FP->Int Conversions - def int_aarch64_neon_fcvtas : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtau : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtms : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtmu : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtns : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtnu : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtps : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtpu : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtzs : AdvSIMD_FPToIntRounding_Intrinsic; - def int_aarch64_neon_fcvtzu : AdvSIMD_FPToIntRounding_Intrinsic; - - // Vector FP Rounding: only ties to even is unrepresented by a normal - // intrinsic. - def int_aarch64_neon_frintn : AdvSIMD_1FloatArg_Intrinsic; - - // Scalar FP->Int conversions - - // Vector FP Inexact Narrowing - def int_aarch64_neon_fcvtxn : AdvSIMD_1VectorArg_Expand_Intrinsic; - - // Scalar FP Inexact Narrowing - def int_aarch64_sisd_fcvtxn : Intrinsic<[llvm_float_ty], [llvm_double_ty], - [IntrNoMem]>; -} - -let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.". - class AdvSIMD_2Vector2Index_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [llvm_anyvector_ty, llvm_i64_ty, LLVMMatchType<0>, llvm_i64_ty], - [IntrNoMem]>; -} - -// Vector element to element moves -def int_aarch64_neon_vcopy_lane: AdvSIMD_2Vector2Index_Intrinsic; - -let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.". - class AdvSIMD_1Vec_Load_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMAnyPointerType>], - [IntrReadMem, IntrArgMemOnly]>; - class AdvSIMD_1Vec_Store_Lane_Intrinsic - : Intrinsic<[], [llvm_anyvector_ty, llvm_i64_ty, llvm_anyptr_ty], - [IntrArgMemOnly, NoCapture<2>]>; - - class AdvSIMD_2Vec_Load_Intrinsic - : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>], - [LLVMAnyPointerType>], - [IntrReadMem, IntrArgMemOnly]>; - class AdvSIMD_2Vec_Load_Lane_Intrinsic - : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>], - [LLVMMatchType<0>, LLVMMatchType<0>, - llvm_i64_ty, llvm_anyptr_ty], - [IntrReadMem, IntrArgMemOnly]>; - class AdvSIMD_2Vec_Store_Intrinsic - : Intrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>, - LLVMAnyPointerType>], - [IntrArgMemOnly, NoCapture<2>]>; - class AdvSIMD_2Vec_Store_Lane_Intrinsic - : Intrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>, - llvm_i64_ty, llvm_anyptr_ty], - [IntrArgMemOnly, NoCapture<3>]>; - - class AdvSIMD_3Vec_Load_Intrinsic - : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, LLVMMatchType<0>], - [LLVMAnyPointerType>], - [IntrReadMem, IntrArgMemOnly]>; - class AdvSIMD_3Vec_Load_Lane_Intrinsic - : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, LLVMMatchType<0>], - [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>, - llvm_i64_ty, llvm_anyptr_ty], - [IntrReadMem, IntrArgMemOnly]>; - class AdvSIMD_3Vec_Store_Intrinsic - : Intrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMAnyPointerType>], - [IntrArgMemOnly, NoCapture<3>]>; - class AdvSIMD_3Vec_Store_Lane_Intrinsic - : Intrinsic<[], [llvm_anyvector_ty, - LLVMMatchType<0>, LLVMMatchType<0>, - llvm_i64_ty, llvm_anyptr_ty], - [IntrArgMemOnly, NoCapture<4>]>; - - class AdvSIMD_4Vec_Load_Intrinsic - : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>], - [LLVMAnyPointerType>], - [IntrReadMem, IntrArgMemOnly]>; - class AdvSIMD_4Vec_Load_Lane_Intrinsic - : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>], - [LLVMMatchType<0>, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>, - llvm_i64_ty, llvm_anyptr_ty], - [IntrReadMem, IntrArgMemOnly]>; - class AdvSIMD_4Vec_Store_Intrinsic - : Intrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>, - LLVMAnyPointerType>], - [IntrArgMemOnly, NoCapture<4>]>; - class AdvSIMD_4Vec_Store_Lane_Intrinsic - : Intrinsic<[], [llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>, - llvm_i64_ty, llvm_anyptr_ty], - [IntrArgMemOnly, NoCapture<5>]>; -} - -// Memory ops - -def int_aarch64_neon_ld1x2 : AdvSIMD_2Vec_Load_Intrinsic; -def int_aarch64_neon_ld1x3 : AdvSIMD_3Vec_Load_Intrinsic; -def int_aarch64_neon_ld1x4 : AdvSIMD_4Vec_Load_Intrinsic; - -def int_aarch64_neon_st1x2 : AdvSIMD_2Vec_Store_Intrinsic; -def int_aarch64_neon_st1x3 : AdvSIMD_3Vec_Store_Intrinsic; -def int_aarch64_neon_st1x4 : AdvSIMD_4Vec_Store_Intrinsic; - -def int_aarch64_neon_ld2 : AdvSIMD_2Vec_Load_Intrinsic; -def int_aarch64_neon_ld3 : AdvSIMD_3Vec_Load_Intrinsic; -def int_aarch64_neon_ld4 : AdvSIMD_4Vec_Load_Intrinsic; - -def int_aarch64_neon_ld2lane : AdvSIMD_2Vec_Load_Lane_Intrinsic; -def int_aarch64_neon_ld3lane : AdvSIMD_3Vec_Load_Lane_Intrinsic; -def int_aarch64_neon_ld4lane : AdvSIMD_4Vec_Load_Lane_Intrinsic; - -def int_aarch64_neon_ld2r : AdvSIMD_2Vec_Load_Intrinsic; -def int_aarch64_neon_ld3r : AdvSIMD_3Vec_Load_Intrinsic; -def int_aarch64_neon_ld4r : AdvSIMD_4Vec_Load_Intrinsic; - -def int_aarch64_neon_st2 : AdvSIMD_2Vec_Store_Intrinsic; -def int_aarch64_neon_st3 : AdvSIMD_3Vec_Store_Intrinsic; -def int_aarch64_neon_st4 : AdvSIMD_4Vec_Store_Intrinsic; - -def int_aarch64_neon_st2lane : AdvSIMD_2Vec_Store_Lane_Intrinsic; -def int_aarch64_neon_st3lane : AdvSIMD_3Vec_Store_Lane_Intrinsic; -def int_aarch64_neon_st4lane : AdvSIMD_4Vec_Store_Lane_Intrinsic; - -let TargetPrefix = "aarch64" in { // All intrinsics start with "llvm.aarch64.". - class AdvSIMD_Tbl1_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [llvm_v16i8_ty, LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_Tbl2_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, LLVMMatchType<0>], [IntrNoMem]>; - class AdvSIMD_Tbl3_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty, - LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_Tbl4_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty, - LLVMMatchType<0>], - [IntrNoMem]>; - - class AdvSIMD_Tbx1_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, llvm_v16i8_ty, LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_Tbx2_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, llvm_v16i8_ty, llvm_v16i8_ty, - LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_Tbx3_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, LLVMMatchType<0>], - [IntrNoMem]>; - class AdvSIMD_Tbx4_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_v16i8_ty, LLVMMatchType<0>], - [IntrNoMem]>; -} -def int_aarch64_neon_tbl1 : AdvSIMD_Tbl1_Intrinsic; -def int_aarch64_neon_tbl2 : AdvSIMD_Tbl2_Intrinsic; -def int_aarch64_neon_tbl3 : AdvSIMD_Tbl3_Intrinsic; -def int_aarch64_neon_tbl4 : AdvSIMD_Tbl4_Intrinsic; - -def int_aarch64_neon_tbx1 : AdvSIMD_Tbx1_Intrinsic; -def int_aarch64_neon_tbx2 : AdvSIMD_Tbx2_Intrinsic; -def int_aarch64_neon_tbx3 : AdvSIMD_Tbx3_Intrinsic; -def int_aarch64_neon_tbx4 : AdvSIMD_Tbx4_Intrinsic; - -let TargetPrefix = "aarch64" in { - class Crypto_AES_DataKey_Intrinsic - : Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; - - class Crypto_AES_Data_Intrinsic - : Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>; - - // SHA intrinsic taking 5 words of the hash (v4i32, i32) and 4 of the schedule - // (v4i32). - class Crypto_SHA_5Hash4Schedule_Intrinsic - : Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - - // SHA intrinsic taking 5 words of the hash (v4i32, i32) and 4 of the schedule - // (v4i32). - class Crypto_SHA_1Hash_Intrinsic - : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>; - - // SHA intrinsic taking 8 words of the schedule - class Crypto_SHA_8Schedule_Intrinsic - : Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - - // SHA intrinsic taking 12 words of the schedule - class Crypto_SHA_12Schedule_Intrinsic - : Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - - // SHA intrinsic taking 8 words of the hash and 4 of the schedule. - class Crypto_SHA_8Hash4Schedule_Intrinsic - : Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -} - -// AES -def int_aarch64_crypto_aese : Crypto_AES_DataKey_Intrinsic; -def int_aarch64_crypto_aesd : Crypto_AES_DataKey_Intrinsic; -def int_aarch64_crypto_aesmc : Crypto_AES_Data_Intrinsic; -def int_aarch64_crypto_aesimc : Crypto_AES_Data_Intrinsic; - -// SHA1 -def int_aarch64_crypto_sha1c : Crypto_SHA_5Hash4Schedule_Intrinsic; -def int_aarch64_crypto_sha1p : Crypto_SHA_5Hash4Schedule_Intrinsic; -def int_aarch64_crypto_sha1m : Crypto_SHA_5Hash4Schedule_Intrinsic; -def int_aarch64_crypto_sha1h : Crypto_SHA_1Hash_Intrinsic; - -def int_aarch64_crypto_sha1su0 : Crypto_SHA_12Schedule_Intrinsic; -def int_aarch64_crypto_sha1su1 : Crypto_SHA_8Schedule_Intrinsic; - -// SHA256 -def int_aarch64_crypto_sha256h : Crypto_SHA_8Hash4Schedule_Intrinsic; -def int_aarch64_crypto_sha256h2 : Crypto_SHA_8Hash4Schedule_Intrinsic; -def int_aarch64_crypto_sha256su0 : Crypto_SHA_8Schedule_Intrinsic; -def int_aarch64_crypto_sha256su1 : Crypto_SHA_12Schedule_Intrinsic; - -//===----------------------------------------------------------------------===// -// CRC32 - -let TargetPrefix = "aarch64" in { - -def int_aarch64_crc32b : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_aarch64_crc32cb : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_aarch64_crc32h : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_aarch64_crc32ch : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_aarch64_crc32w : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_aarch64_crc32cw : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_aarch64_crc32x : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i64_ty], - [IntrNoMem]>; -def int_aarch64_crc32cx : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i64_ty], - [IntrNoMem]>; -} diff --git a/llvm/include/llvm/IR/IntrinsicsAMDGPU.td b/llvm/include/llvm/IR/IntrinsicsAMDGPU.td deleted file mode 100644 index 9bf2a4dd..00000000 --- a/llvm/include/llvm/IR/IntrinsicsAMDGPU.td +++ /dev/null @@ -1,432 +0,0 @@ -//===- IntrinsicsAMDGPU.td - Defines AMDGPU intrinsics -----*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the R600-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -class AMDGPUReadPreloadRegisterIntrinsic - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>; - -class AMDGPUReadPreloadRegisterIntrinsicNamed - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, GCCBuiltin; - -let TargetPrefix = "r600" in { - -multiclass AMDGPUReadPreloadRegisterIntrinsic_xyz { - def _x : AMDGPUReadPreloadRegisterIntrinsic; - def _y : AMDGPUReadPreloadRegisterIntrinsic; - def _z : AMDGPUReadPreloadRegisterIntrinsic; -} - -multiclass AMDGPUReadPreloadRegisterIntrinsic_xyz_named { - def _x : AMDGPUReadPreloadRegisterIntrinsicNamed; - def _y : AMDGPUReadPreloadRegisterIntrinsicNamed; - def _z : AMDGPUReadPreloadRegisterIntrinsicNamed; -} - -defm int_r600_read_global_size : AMDGPUReadPreloadRegisterIntrinsic_xyz_named - <"__builtin_r600_read_global_size">; -defm int_r600_read_ngroups : AMDGPUReadPreloadRegisterIntrinsic_xyz_named - <"__builtin_r600_read_ngroups">; -defm int_r600_read_tgid : AMDGPUReadPreloadRegisterIntrinsic_xyz_named - <"__builtin_r600_read_tgid">; - -defm int_r600_read_local_size : AMDGPUReadPreloadRegisterIntrinsic_xyz; -defm int_r600_read_tidig : AMDGPUReadPreloadRegisterIntrinsic_xyz; - -def int_r600_read_workdim : AMDGPUReadPreloadRegisterIntrinsic; - -def int_r600_group_barrier : GCCBuiltin<"__builtin_r600_group_barrier">, - Intrinsic<[], [], [IntrConvergent]>; - -// AS 7 is PARAM_I_ADDRESS, used for kernel arguments -def int_r600_implicitarg_ptr : - GCCBuiltin<"__builtin_r600_implicitarg_ptr">, - Intrinsic<[LLVMQualPointerType], [], [IntrNoMem]>; - -def int_r600_rat_store_typed : - // 1st parameter: Data - // 2nd parameter: Index - // 3rd parameter: Constant RAT ID - Intrinsic<[], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty], []>, - GCCBuiltin<"__builtin_r600_rat_store_typed">; - -def int_r600_recipsqrt_ieee : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -def int_r600_recipsqrt_clamped : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -} // End TargetPrefix = "r600" - -let TargetPrefix = "amdgcn" in { - -defm int_amdgcn_workitem_id : AMDGPUReadPreloadRegisterIntrinsic_xyz; -defm int_amdgcn_workgroup_id : AMDGPUReadPreloadRegisterIntrinsic_xyz_named - <"__builtin_amdgcn_workgroup_id">; - -def int_amdgcn_s_barrier : GCCBuiltin<"__builtin_amdgcn_s_barrier">, - Intrinsic<[], [], [IntrConvergent]>; - -def int_amdgcn_s_waitcnt : Intrinsic<[], [llvm_i32_ty], []>; - -def int_amdgcn_div_scale : Intrinsic< - // 1st parameter: Numerator - // 2nd parameter: Denominator - // 3rd parameter: Constant to select select between first and - // second. (0 = first, 1 = second). - [llvm_anyfloat_ty, llvm_i1_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, llvm_i1_ty], - [IntrNoMem] ->; - -def int_amdgcn_div_fmas : Intrinsic<[llvm_anyfloat_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>, llvm_i1_ty], - [IntrNoMem] ->; - -def int_amdgcn_div_fixup : Intrinsic<[llvm_anyfloat_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem] ->; - -def int_amdgcn_trig_preop : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>, llvm_i32_ty], [IntrNoMem] ->; - -def int_amdgcn_sin : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -def int_amdgcn_cos : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -def int_amdgcn_log_clamp : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -def int_amdgcn_rcp : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -def int_amdgcn_rsq : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -def int_amdgcn_rsq_legacy : GCCBuiltin<"__builtin_amdgcn_rsq_legacy">, - Intrinsic< - [llvm_float_ty], [llvm_float_ty], [IntrNoMem] ->; - -def int_amdgcn_rsq_clamp : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem]>; - -def int_amdgcn_ldexp : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>, llvm_i32_ty], [IntrNoMem] ->; - -def int_amdgcn_frexp_mant : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -def int_amdgcn_frexp_exp : Intrinsic< - [llvm_i32_ty], [llvm_anyfloat_ty], [IntrNoMem] ->; - -// v_fract is buggy on SI/CI. It mishandles infinities, may return 1.0 -// and always uses rtz, so is not suitable for implementing the OpenCL -// fract function. It should be ok on VI. -def int_amdgcn_fract : Intrinsic< - [llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem] ->; - -def int_amdgcn_class : Intrinsic< - [llvm_i1_ty], [llvm_anyfloat_ty, llvm_i32_ty], [IntrNoMem] ->; - -def int_amdgcn_cubeid : GCCBuiltin<"__builtin_amdgcn_cubeid">, - Intrinsic<[llvm_float_ty], - [llvm_float_ty, llvm_float_ty, llvm_float_ty], [IntrNoMem] ->; - -def int_amdgcn_cubema : GCCBuiltin<"__builtin_amdgcn_cubema">, - Intrinsic<[llvm_float_ty], - [llvm_float_ty, llvm_float_ty, llvm_float_ty], [IntrNoMem] ->; - -def int_amdgcn_cubesc : GCCBuiltin<"__builtin_amdgcn_cubesc">, - Intrinsic<[llvm_float_ty], - [llvm_float_ty, llvm_float_ty, llvm_float_ty], [IntrNoMem] ->; - -def int_amdgcn_cubetc : GCCBuiltin<"__builtin_amdgcn_cubetc">, - Intrinsic<[llvm_float_ty], - [llvm_float_ty, llvm_float_ty, llvm_float_ty], [IntrNoMem] ->; - -// TODO: Do we want an ordering for these? -def int_amdgcn_atomic_inc : Intrinsic<[llvm_anyint_ty], - [llvm_anyptr_ty, LLVMMatchType<0>], - [IntrArgMemOnly, NoCapture<0>] ->; - -def int_amdgcn_atomic_dec : Intrinsic<[llvm_anyint_ty], - [llvm_anyptr_ty, LLVMMatchType<0>], - [IntrArgMemOnly, NoCapture<0>] ->; - -class AMDGPUImageLoad : Intrinsic < - [llvm_v4f32_ty], // vdata(VGPR) - [llvm_anyint_ty, // vaddr(VGPR) - llvm_v8i32_ty, // rsrc(SGPR) - llvm_i32_ty, // dmask(imm) - llvm_i1_ty, // r128(imm) - llvm_i1_ty, // da(imm) - llvm_i1_ty, // glc(imm) - llvm_i1_ty], // slc(imm) - [IntrReadMem]>; - -def int_amdgcn_image_load : AMDGPUImageLoad; -def int_amdgcn_image_load_mip : AMDGPUImageLoad; - -class AMDGPUImageStore : Intrinsic < - [], - [llvm_v4f32_ty, // vdata(VGPR) - llvm_anyint_ty, // vaddr(VGPR) - llvm_v8i32_ty, // rsrc(SGPR) - llvm_i32_ty, // dmask(imm) - llvm_i1_ty, // r128(imm) - llvm_i1_ty, // da(imm) - llvm_i1_ty, // glc(imm) - llvm_i1_ty], // slc(imm) - []>; - -def int_amdgcn_image_store : AMDGPUImageStore; -def int_amdgcn_image_store_mip : AMDGPUImageStore; - -class AMDGPUImageAtomic : Intrinsic < - [llvm_i32_ty], - [llvm_i32_ty, // vdata(VGPR) - llvm_anyint_ty, // vaddr(VGPR) - llvm_v8i32_ty, // rsrc(SGPR) - llvm_i1_ty, // r128(imm) - llvm_i1_ty, // da(imm) - llvm_i1_ty], // slc(imm) - []>; - -def int_amdgcn_image_atomic_swap : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_add : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_sub : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_smin : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_umin : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_smax : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_umax : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_and : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_or : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_xor : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_inc : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_dec : AMDGPUImageAtomic; -def int_amdgcn_image_atomic_cmpswap : Intrinsic < - [llvm_i32_ty], - [llvm_i32_ty, // src(VGPR) - llvm_i32_ty, // cmp(VGPR) - llvm_anyint_ty, // vaddr(VGPR) - llvm_v8i32_ty, // rsrc(SGPR) - llvm_i1_ty, // r128(imm) - llvm_i1_ty, // da(imm) - llvm_i1_ty], // slc(imm) - []>; - -class AMDGPUBufferLoad : Intrinsic < - [llvm_anyfloat_ty], - [llvm_v4i32_ty, // rsrc(SGPR) - llvm_i32_ty, // vindex(VGPR) - llvm_i32_ty, // offset(SGPR/VGPR/imm) - llvm_i1_ty, // glc(imm) - llvm_i1_ty], // slc(imm) - [IntrReadMem]>; -def int_amdgcn_buffer_load_format : AMDGPUBufferLoad; -def int_amdgcn_buffer_load : AMDGPUBufferLoad; - -class AMDGPUBufferStore : Intrinsic < - [], - [llvm_anyfloat_ty, // vdata(VGPR) -- can currently only select f32, v2f32, v4f32 - llvm_v4i32_ty, // rsrc(SGPR) - llvm_i32_ty, // vindex(VGPR) - llvm_i32_ty, // offset(SGPR/VGPR/imm) - llvm_i1_ty, // glc(imm) - llvm_i1_ty], // slc(imm) - [IntrWriteMem]>; -def int_amdgcn_buffer_store_format : AMDGPUBufferStore; -def int_amdgcn_buffer_store : AMDGPUBufferStore; - -class AMDGPUBufferAtomic : Intrinsic < - [llvm_i32_ty], - [llvm_i32_ty, // vdata(VGPR) - llvm_v4i32_ty, // rsrc(SGPR) - llvm_i32_ty, // vindex(VGPR) - llvm_i32_ty, // offset(SGPR/VGPR/imm) - llvm_i1_ty], // slc(imm) - []>; -def int_amdgcn_buffer_atomic_swap : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_add : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_sub : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_smin : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_umin : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_smax : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_umax : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_and : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_or : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_xor : AMDGPUBufferAtomic; -def int_amdgcn_buffer_atomic_cmpswap : Intrinsic< - [llvm_i32_ty], - [llvm_i32_ty, // src(VGPR) - llvm_i32_ty, // cmp(VGPR) - llvm_v4i32_ty, // rsrc(SGPR) - llvm_i32_ty, // vindex(VGPR) - llvm_i32_ty, // offset(SGPR/VGPR/imm) - llvm_i1_ty], // slc(imm) - []>; - -def int_amdgcn_read_workdim : AMDGPUReadPreloadRegisterIntrinsic; - - -def int_amdgcn_buffer_wbinvl1_sc : - GCCBuiltin<"__builtin_amdgcn_buffer_wbinvl1_sc">, - Intrinsic<[], [], []>; - -def int_amdgcn_buffer_wbinvl1 : - GCCBuiltin<"__builtin_amdgcn_buffer_wbinvl1">, - Intrinsic<[], [], []>; - -def int_amdgcn_s_dcache_inv : - GCCBuiltin<"__builtin_amdgcn_s_dcache_inv">, - Intrinsic<[], [], []>; - -def int_amdgcn_s_memtime : - GCCBuiltin<"__builtin_amdgcn_s_memtime">, - Intrinsic<[llvm_i64_ty], [], []>; - -def int_amdgcn_s_sleep : - GCCBuiltin<"__builtin_amdgcn_s_sleep">, - Intrinsic<[], [llvm_i32_ty], []> { -} - -def int_amdgcn_s_getreg : - GCCBuiltin<"__builtin_amdgcn_s_getreg">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrReadMem]>; - -def int_amdgcn_groupstaticsize : - GCCBuiltin<"__builtin_amdgcn_groupstaticsize">, - Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>; - -def int_amdgcn_dispatch_ptr : - GCCBuiltin<"__builtin_amdgcn_dispatch_ptr">, - Intrinsic<[LLVMQualPointerType], [], [IntrNoMem]>; - -def int_amdgcn_queue_ptr : - GCCBuiltin<"__builtin_amdgcn_queue_ptr">, - Intrinsic<[LLVMQualPointerType], [], [IntrNoMem]>; - -def int_amdgcn_kernarg_segment_ptr : - GCCBuiltin<"__builtin_amdgcn_kernarg_segment_ptr">, - Intrinsic<[LLVMQualPointerType], [], [IntrNoMem]>; - -def int_amdgcn_implicitarg_ptr : - GCCBuiltin<"__builtin_amdgcn_implicitarg_ptr">, - Intrinsic<[LLVMQualPointerType], [], [IntrNoMem]>; - -// __builtin_amdgcn_interp_p1 , , , -def int_amdgcn_interp_p1 : - GCCBuiltin<"__builtin_amdgcn_interp_p1">, - Intrinsic<[llvm_float_ty], - [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; // This intrinsic reads from lds, but the memory - // values are constant, so it behaves like IntrNoMem. - -// __builtin_amdgcn_interp_p2 , , , , -def int_amdgcn_interp_p2 : - GCCBuiltin<"__builtin_amdgcn_interp_p2">, - Intrinsic<[llvm_float_ty], - [llvm_float_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; // See int_amdgcn_v_interp_p1 for why this is - // IntrNoMem. - -// Pixel shaders only: whether the current pixel is live (i.e. not a helper -// invocation for derivative computation). -def int_amdgcn_ps_live : Intrinsic < - [llvm_i1_ty], - [], - [IntrNoMem]>; - -def int_amdgcn_mbcnt_lo : - GCCBuiltin<"__builtin_amdgcn_mbcnt_lo">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_amdgcn_mbcnt_hi : - GCCBuiltin<"__builtin_amdgcn_mbcnt_hi">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - -// llvm.amdgcn.ds.swizzle src offset -def int_amdgcn_ds_swizzle : - GCCBuiltin<"__builtin_amdgcn_ds_swizzle">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem, IntrConvergent]>; - -// llvm.amdgcn.lerp -def int_amdgcn_lerp : - GCCBuiltin<"__builtin_amdgcn_lerp">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// CI+ Intrinsics -//===----------------------------------------------------------------------===// - -def int_amdgcn_s_dcache_inv_vol : - GCCBuiltin<"__builtin_amdgcn_s_dcache_inv_vol">, - Intrinsic<[], [], []>; - -def int_amdgcn_buffer_wbinvl1_vol : - GCCBuiltin<"__builtin_amdgcn_buffer_wbinvl1_vol">, - Intrinsic<[], [], []>; - -//===----------------------------------------------------------------------===// -// VI Intrinsics -//===----------------------------------------------------------------------===// - -// llvm.amdgcn.mov.dpp.i32 -def int_amdgcn_mov_dpp : - Intrinsic<[llvm_anyint_ty], - [LLVMMatchType<0>, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i1_ty], [IntrNoMem, IntrConvergent]>; - -def int_amdgcn_s_dcache_wb : - GCCBuiltin<"__builtin_amdgcn_s_dcache_wb">, - Intrinsic<[], [], []>; - -def int_amdgcn_s_dcache_wb_vol : - GCCBuiltin<"__builtin_amdgcn_s_dcache_wb_vol">, - Intrinsic<[], [], []>; - -def int_amdgcn_s_memrealtime : - GCCBuiltin<"__builtin_amdgcn_s_memrealtime">, - Intrinsic<[llvm_i64_ty], [], []>; - -// llvm.amdgcn.ds.permute -def int_amdgcn_ds_permute : - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem, IntrConvergent]>; - -// llvm.amdgcn.ds.bpermute -def int_amdgcn_ds_bpermute : - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem, IntrConvergent]>; - -} diff --git a/llvm/include/llvm/IR/IntrinsicsARM.td b/llvm/include/llvm/IR/IntrinsicsARM.td deleted file mode 100644 index 09959859..00000000 --- a/llvm/include/llvm/IR/IntrinsicsARM.td +++ /dev/null @@ -1,537 +0,0 @@ -//===- IntrinsicsARM.td - Defines ARM intrinsics -----------*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the ARM-specific intrinsics. -// -//===----------------------------------------------------------------------===// - - -//===----------------------------------------------------------------------===// -// TLS - -let TargetPrefix = "arm" in { // All intrinsics start with "llvm.arm.". - -// A space-consuming intrinsic primarily for testing ARMConstantIslands. The -// first argument is the number of bytes this "instruction" takes up, the second -// and return value are essentially chains, used to force ordering during ISel. -def int_arm_space : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], []>; - -//===----------------------------------------------------------------------===// -// Saturating Arithmetic - -def int_arm_qadd : GCCBuiltin<"__builtin_arm_qadd">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; -def int_arm_qsub : GCCBuiltin<"__builtin_arm_qsub">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_arm_ssat : GCCBuiltin<"__builtin_arm_ssat">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_arm_usat : GCCBuiltin<"__builtin_arm_usat">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// Load, Store and Clear exclusive - -def int_arm_ldrex : Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty]>; -def int_arm_strex : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_anyptr_ty]>; - -def int_arm_ldaex : Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty]>; -def int_arm_stlex : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_anyptr_ty]>; - -def int_arm_clrex : Intrinsic<[]>; - -def int_arm_strexd : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, - llvm_ptr_ty]>; -def int_arm_ldrexd : Intrinsic<[llvm_i32_ty, llvm_i32_ty], [llvm_ptr_ty]>; - -def int_arm_stlexd : Intrinsic<[llvm_i32_ty], - [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty]>; -def int_arm_ldaexd : Intrinsic<[llvm_i32_ty, llvm_i32_ty], [llvm_ptr_ty]>; - -//===----------------------------------------------------------------------===// -// Data barrier instructions -def int_arm_dmb : GCCBuiltin<"__builtin_arm_dmb">, MSBuiltin<"__dmb">, - Intrinsic<[], [llvm_i32_ty]>; -def int_arm_dsb : GCCBuiltin<"__builtin_arm_dsb">, MSBuiltin<"__dsb">, - Intrinsic<[], [llvm_i32_ty]>; -def int_arm_isb : GCCBuiltin<"__builtin_arm_isb">, MSBuiltin<"__isb">, - Intrinsic<[], [llvm_i32_ty]>; - -//===----------------------------------------------------------------------===// -// VFP - -def int_arm_get_fpscr : GCCBuiltin<"__builtin_arm_get_fpscr">, - Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>; -def int_arm_set_fpscr : GCCBuiltin<"__builtin_arm_set_fpscr">, - Intrinsic<[], [llvm_i32_ty], []>; -def int_arm_vcvtr : Intrinsic<[llvm_float_ty], [llvm_anyfloat_ty], - [IntrNoMem]>; -def int_arm_vcvtru : Intrinsic<[llvm_float_ty], [llvm_anyfloat_ty], - [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// Coprocessor - -def int_arm_ldc : GCCBuiltin<"__builtin_arm_ldc">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], []>; -def int_arm_ldcl : GCCBuiltin<"__builtin_arm_ldcl">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], []>; -def int_arm_ldc2 : GCCBuiltin<"__builtin_arm_ldc2">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], []>; -def int_arm_ldc2l : GCCBuiltin<"__builtin_arm_ldc2l">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], []>; - -def int_arm_stc : GCCBuiltin<"__builtin_arm_stc">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], []>; -def int_arm_stcl : GCCBuiltin<"__builtin_arm_stcl">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], []>; -def int_arm_stc2 : GCCBuiltin<"__builtin_arm_stc2">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], []>; -def int_arm_stc2l : GCCBuiltin<"__builtin_arm_stc2l">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], []>; - -// Move to coprocessor -def int_arm_mcr : GCCBuiltin<"__builtin_arm_mcr">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; -def int_arm_mcr2 : GCCBuiltin<"__builtin_arm_mcr2">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; - -// Move from coprocessor -def int_arm_mrc : GCCBuiltin<"__builtin_arm_mrc">, - MSBuiltin<"_MoveFromCoprocessor">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], []>; -def int_arm_mrc2 : GCCBuiltin<"__builtin_arm_mrc2">, - MSBuiltin<"_MoveFromCoprocessor2">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], []>; - -// Coprocessor data processing -def int_arm_cdp : GCCBuiltin<"__builtin_arm_cdp">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; -def int_arm_cdp2 : GCCBuiltin<"__builtin_arm_cdp2">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; - -// Move from two registers to coprocessor -def int_arm_mcrr : Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], []>; -def int_arm_mcrr2 : Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], []>; - -def int_arm_mrrc : Intrinsic<[llvm_i32_ty, llvm_i32_ty], [llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], []>; -def int_arm_mrrc2 : Intrinsic<[llvm_i32_ty, llvm_i32_ty], [llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], []>; - -//===----------------------------------------------------------------------===// -// CRC32 - -def int_arm_crc32b : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_arm_crc32cb : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_arm_crc32h : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_arm_crc32ch : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_arm_crc32w : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_arm_crc32cw : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// HINT - -def int_arm_hint : Intrinsic<[], [llvm_i32_ty]>; -def int_arm_dbg : Intrinsic<[], [llvm_i32_ty]>; - -//===----------------------------------------------------------------------===// -// RBIT - -def int_arm_rbit : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// UND (reserved undefined sequence) - -def int_arm_undefined : Intrinsic<[], [llvm_i32_ty]>; - -//===----------------------------------------------------------------------===// -// Advanced SIMD (NEON) - -// The following classes do not correspond directly to GCC builtins. -class Neon_1Arg_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMMatchType<0>], [IntrNoMem]>; -class Neon_1Arg_Narrow_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMExtendedType<0>], [IntrNoMem]>; -class Neon_2Arg_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; -class Neon_2Arg_Narrow_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMExtendedType<0>, LLVMExtendedType<0>], - [IntrNoMem]>; -class Neon_2Arg_Long_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [LLVMTruncatedType<0>, LLVMTruncatedType<0>], - [IntrNoMem]>; -class Neon_3Arg_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; -class Neon_3Arg_Long_Intrinsic - : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, LLVMTruncatedType<0>, LLVMTruncatedType<0>], - [IntrNoMem]>; -class Neon_CvtFxToFP_Intrinsic - : Intrinsic<[llvm_anyfloat_ty], [llvm_anyint_ty, llvm_i32_ty], [IntrNoMem]>; -class Neon_CvtFPToFx_Intrinsic - : Intrinsic<[llvm_anyint_ty], [llvm_anyfloat_ty, llvm_i32_ty], [IntrNoMem]>; -class Neon_CvtFPtoInt_1Arg_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty], [IntrNoMem]>; - -class Neon_Compare_Intrinsic - : Intrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty, LLVMMatchType<1>], - [IntrNoMem]>; - -// The table operands for VTBL and VTBX consist of 1 to 4 v8i8 vectors. -// Besides the table, VTBL has one other v8i8 argument and VTBX has two. -// Overall, the classes range from 2 to 6 v8i8 arguments. -class Neon_Tbl2Arg_Intrinsic - : Intrinsic<[llvm_v8i8_ty], - [llvm_v8i8_ty, llvm_v8i8_ty], [IntrNoMem]>; -class Neon_Tbl3Arg_Intrinsic - : Intrinsic<[llvm_v8i8_ty], - [llvm_v8i8_ty, llvm_v8i8_ty, llvm_v8i8_ty], [IntrNoMem]>; -class Neon_Tbl4Arg_Intrinsic - : Intrinsic<[llvm_v8i8_ty], - [llvm_v8i8_ty, llvm_v8i8_ty, llvm_v8i8_ty, llvm_v8i8_ty], - [IntrNoMem]>; -class Neon_Tbl5Arg_Intrinsic - : Intrinsic<[llvm_v8i8_ty], - [llvm_v8i8_ty, llvm_v8i8_ty, llvm_v8i8_ty, llvm_v8i8_ty, - llvm_v8i8_ty], [IntrNoMem]>; -class Neon_Tbl6Arg_Intrinsic - : Intrinsic<[llvm_v8i8_ty], - [llvm_v8i8_ty, llvm_v8i8_ty, llvm_v8i8_ty, llvm_v8i8_ty, - llvm_v8i8_ty, llvm_v8i8_ty], [IntrNoMem]>; - -// Arithmetic ops - -let IntrProperties = [IntrNoMem, Commutative] in { - - // Vector Add. - def int_arm_neon_vhadds : Neon_2Arg_Intrinsic; - def int_arm_neon_vhaddu : Neon_2Arg_Intrinsic; - def int_arm_neon_vrhadds : Neon_2Arg_Intrinsic; - def int_arm_neon_vrhaddu : Neon_2Arg_Intrinsic; - def int_arm_neon_vqadds : Neon_2Arg_Intrinsic; - def int_arm_neon_vqaddu : Neon_2Arg_Intrinsic; - def int_arm_neon_vraddhn : Neon_2Arg_Narrow_Intrinsic; - - // Vector Multiply. - def int_arm_neon_vmulp : Neon_2Arg_Intrinsic; - def int_arm_neon_vqdmulh : Neon_2Arg_Intrinsic; - def int_arm_neon_vqrdmulh : Neon_2Arg_Intrinsic; - def int_arm_neon_vmulls : Neon_2Arg_Long_Intrinsic; - def int_arm_neon_vmullu : Neon_2Arg_Long_Intrinsic; - def int_arm_neon_vmullp : Neon_2Arg_Long_Intrinsic; - def int_arm_neon_vqdmull : Neon_2Arg_Long_Intrinsic; - - // Vector Maximum. - def int_arm_neon_vmaxs : Neon_2Arg_Intrinsic; - def int_arm_neon_vmaxu : Neon_2Arg_Intrinsic; - def int_arm_neon_vmaxnm : Neon_2Arg_Intrinsic; - - // Vector Minimum. - def int_arm_neon_vmins : Neon_2Arg_Intrinsic; - def int_arm_neon_vminu : Neon_2Arg_Intrinsic; - def int_arm_neon_vminnm : Neon_2Arg_Intrinsic; - - // Vector Reciprocal Step. - def int_arm_neon_vrecps : Neon_2Arg_Intrinsic; - - // Vector Reciprocal Square Root Step. - def int_arm_neon_vrsqrts : Neon_2Arg_Intrinsic; -} - -// Vector Subtract. -def int_arm_neon_vhsubs : Neon_2Arg_Intrinsic; -def int_arm_neon_vhsubu : Neon_2Arg_Intrinsic; -def int_arm_neon_vqsubs : Neon_2Arg_Intrinsic; -def int_arm_neon_vqsubu : Neon_2Arg_Intrinsic; -def int_arm_neon_vrsubhn : Neon_2Arg_Narrow_Intrinsic; - -// Vector Absolute Compare. -def int_arm_neon_vacge : Neon_Compare_Intrinsic; -def int_arm_neon_vacgt : Neon_Compare_Intrinsic; - -// Vector Absolute Differences. -def int_arm_neon_vabds : Neon_2Arg_Intrinsic; -def int_arm_neon_vabdu : Neon_2Arg_Intrinsic; - -// Vector Pairwise Add. -def int_arm_neon_vpadd : Neon_2Arg_Intrinsic; - -// Vector Pairwise Add Long. -// Note: This is different than the other "long" NEON intrinsics because -// the result vector has half as many elements as the source vector. -// The source and destination vector types must be specified separately. -def int_arm_neon_vpaddls : Intrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty], - [IntrNoMem]>; -def int_arm_neon_vpaddlu : Intrinsic<[llvm_anyvector_ty], [llvm_anyvector_ty], - [IntrNoMem]>; - -// Vector Pairwise Add and Accumulate Long. -// Note: This is similar to vpaddl but the destination vector also appears -// as the first argument. -def int_arm_neon_vpadals : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, llvm_anyvector_ty], - [IntrNoMem]>; -def int_arm_neon_vpadalu : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, llvm_anyvector_ty], - [IntrNoMem]>; - -// Vector Pairwise Maximum and Minimum. -def int_arm_neon_vpmaxs : Neon_2Arg_Intrinsic; -def int_arm_neon_vpmaxu : Neon_2Arg_Intrinsic; -def int_arm_neon_vpmins : Neon_2Arg_Intrinsic; -def int_arm_neon_vpminu : Neon_2Arg_Intrinsic; - -// Vector Shifts: -// -// The various saturating and rounding vector shift operations need to be -// represented by intrinsics in LLVM, and even the basic VSHL variable shift -// operation cannot be safely translated to LLVM's shift operators. VSHL can -// be used for both left and right shifts, or even combinations of the two, -// depending on the signs of the shift amounts. It also has well-defined -// behavior for shift amounts that LLVM leaves undefined. Only basic shifts -// by constants can be represented with LLVM's shift operators. -// -// The shift counts for these intrinsics are always vectors, even for constant -// shifts, where the constant is replicated. For consistency with VSHL (and -// other variable shift instructions), left shifts have positive shift counts -// and right shifts have negative shift counts. This convention is also used -// for constant right shift intrinsics, and to help preserve sanity, the -// intrinsic names use "shift" instead of either "shl" or "shr". Where -// applicable, signed and unsigned versions of the intrinsics are -// distinguished with "s" and "u" suffixes. A few NEON shift instructions, -// such as VQSHLU, take signed operands but produce unsigned results; these -// use a "su" suffix. - -// Vector Shift. -def int_arm_neon_vshifts : Neon_2Arg_Intrinsic; -def int_arm_neon_vshiftu : Neon_2Arg_Intrinsic; - -// Vector Rounding Shift. -def int_arm_neon_vrshifts : Neon_2Arg_Intrinsic; -def int_arm_neon_vrshiftu : Neon_2Arg_Intrinsic; -def int_arm_neon_vrshiftn : Neon_2Arg_Narrow_Intrinsic; - -// Vector Saturating Shift. -def int_arm_neon_vqshifts : Neon_2Arg_Intrinsic; -def int_arm_neon_vqshiftu : Neon_2Arg_Intrinsic; -def int_arm_neon_vqshiftsu : Neon_2Arg_Intrinsic; -def int_arm_neon_vqshiftns : Neon_2Arg_Narrow_Intrinsic; -def int_arm_neon_vqshiftnu : Neon_2Arg_Narrow_Intrinsic; -def int_arm_neon_vqshiftnsu : Neon_2Arg_Narrow_Intrinsic; - -// Vector Saturating Rounding Shift. -def int_arm_neon_vqrshifts : Neon_2Arg_Intrinsic; -def int_arm_neon_vqrshiftu : Neon_2Arg_Intrinsic; -def int_arm_neon_vqrshiftns : Neon_2Arg_Narrow_Intrinsic; -def int_arm_neon_vqrshiftnu : Neon_2Arg_Narrow_Intrinsic; -def int_arm_neon_vqrshiftnsu : Neon_2Arg_Narrow_Intrinsic; - -// Vector Shift and Insert. -def int_arm_neon_vshiftins : Neon_3Arg_Intrinsic; - -// Vector Absolute Value and Saturating Absolute Value. -def int_arm_neon_vabs : Neon_1Arg_Intrinsic; -def int_arm_neon_vqabs : Neon_1Arg_Intrinsic; - -// Vector Saturating Negate. -def int_arm_neon_vqneg : Neon_1Arg_Intrinsic; - -// Vector Count Leading Sign/Zero Bits. -def int_arm_neon_vcls : Neon_1Arg_Intrinsic; - -// Vector Reciprocal Estimate. -def int_arm_neon_vrecpe : Neon_1Arg_Intrinsic; - -// Vector Reciprocal Square Root Estimate. -def int_arm_neon_vrsqrte : Neon_1Arg_Intrinsic; - -// Vector Conversions Between Floating-point and Integer -def int_arm_neon_vcvtau : Neon_CvtFPtoInt_1Arg_Intrinsic; -def int_arm_neon_vcvtas : Neon_CvtFPtoInt_1Arg_Intrinsic; -def int_arm_neon_vcvtnu : Neon_CvtFPtoInt_1Arg_Intrinsic; -def int_arm_neon_vcvtns : Neon_CvtFPtoInt_1Arg_Intrinsic; -def int_arm_neon_vcvtpu : Neon_CvtFPtoInt_1Arg_Intrinsic; -def int_arm_neon_vcvtps : Neon_CvtFPtoInt_1Arg_Intrinsic; -def int_arm_neon_vcvtmu : Neon_CvtFPtoInt_1Arg_Intrinsic; -def int_arm_neon_vcvtms : Neon_CvtFPtoInt_1Arg_Intrinsic; - -// Vector Conversions Between Floating-point and Fixed-point. -def int_arm_neon_vcvtfp2fxs : Neon_CvtFPToFx_Intrinsic; -def int_arm_neon_vcvtfp2fxu : Neon_CvtFPToFx_Intrinsic; -def int_arm_neon_vcvtfxs2fp : Neon_CvtFxToFP_Intrinsic; -def int_arm_neon_vcvtfxu2fp : Neon_CvtFxToFP_Intrinsic; - -// Vector Conversions Between Half-Precision and Single-Precision. -def int_arm_neon_vcvtfp2hf - : Intrinsic<[llvm_v4i16_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_arm_neon_vcvthf2fp - : Intrinsic<[llvm_v4f32_ty], [llvm_v4i16_ty], [IntrNoMem]>; - -// Narrowing Saturating Vector Moves. -def int_arm_neon_vqmovns : Neon_1Arg_Narrow_Intrinsic; -def int_arm_neon_vqmovnu : Neon_1Arg_Narrow_Intrinsic; -def int_arm_neon_vqmovnsu : Neon_1Arg_Narrow_Intrinsic; - -// Vector Table Lookup. -// The first 1-4 arguments are the table. -def int_arm_neon_vtbl1 : Neon_Tbl2Arg_Intrinsic; -def int_arm_neon_vtbl2 : Neon_Tbl3Arg_Intrinsic; -def int_arm_neon_vtbl3 : Neon_Tbl4Arg_Intrinsic; -def int_arm_neon_vtbl4 : Neon_Tbl5Arg_Intrinsic; - -// Vector Table Extension. -// Some elements of the destination vector may not be updated, so the original -// value of that vector is passed as the first argument. The next 1-4 -// arguments after that are the table. -def int_arm_neon_vtbx1 : Neon_Tbl3Arg_Intrinsic; -def int_arm_neon_vtbx2 : Neon_Tbl4Arg_Intrinsic; -def int_arm_neon_vtbx3 : Neon_Tbl5Arg_Intrinsic; -def int_arm_neon_vtbx4 : Neon_Tbl6Arg_Intrinsic; - -// Vector Rounding -def int_arm_neon_vrintn : Neon_1Arg_Intrinsic; -def int_arm_neon_vrintx : Neon_1Arg_Intrinsic; -def int_arm_neon_vrinta : Neon_1Arg_Intrinsic; -def int_arm_neon_vrintz : Neon_1Arg_Intrinsic; -def int_arm_neon_vrintm : Neon_1Arg_Intrinsic; -def int_arm_neon_vrintp : Neon_1Arg_Intrinsic; - -// De-interleaving vector loads from N-element structures. -// Source operands are the address and alignment. -def int_arm_neon_vld1 : Intrinsic<[llvm_anyvector_ty], - [llvm_anyptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; -def int_arm_neon_vld2 : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>], - [llvm_anyptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; -def int_arm_neon_vld3 : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>], - [llvm_anyptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; -def int_arm_neon_vld4 : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>], - [llvm_anyptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - -// Vector load N-element structure to one lane. -// Source operands are: the address, the N input vectors (since only one -// lane is assigned), the lane number, and the alignment. -def int_arm_neon_vld2lane : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>], - [llvm_anyptr_ty, LLVMMatchType<0>, - LLVMMatchType<0>, llvm_i32_ty, - llvm_i32_ty], [IntrReadMem, IntrArgMemOnly]>; -def int_arm_neon_vld3lane : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>], - [llvm_anyptr_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>, - llvm_i32_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; -def int_arm_neon_vld4lane : Intrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>], - [llvm_anyptr_ty, LLVMMatchType<0>, - LLVMMatchType<0>, LLVMMatchType<0>, - LLVMMatchType<0>, llvm_i32_ty, - llvm_i32_ty], [IntrReadMem, IntrArgMemOnly]>; - -// Interleaving vector stores from N-element structures. -// Source operands are: the address, the N vectors, and the alignment. -def int_arm_neon_vst1 : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyvector_ty, - llvm_i32_ty], [IntrArgMemOnly]>; -def int_arm_neon_vst2 : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyvector_ty, - LLVMMatchType<1>, llvm_i32_ty], - [IntrArgMemOnly]>; -def int_arm_neon_vst3 : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyvector_ty, - LLVMMatchType<1>, LLVMMatchType<1>, - llvm_i32_ty], [IntrArgMemOnly]>; -def int_arm_neon_vst4 : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyvector_ty, - LLVMMatchType<1>, LLVMMatchType<1>, - LLVMMatchType<1>, llvm_i32_ty], - [IntrArgMemOnly]>; - -// Vector store N-element structure from one lane. -// Source operands are: the address, the N vectors, the lane number, and -// the alignment. -def int_arm_neon_vst2lane : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyvector_ty, - LLVMMatchType<1>, llvm_i32_ty, - llvm_i32_ty], [IntrArgMemOnly]>; -def int_arm_neon_vst3lane : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyvector_ty, - LLVMMatchType<1>, LLVMMatchType<1>, - llvm_i32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; -def int_arm_neon_vst4lane : Intrinsic<[], - [llvm_anyptr_ty, llvm_anyvector_ty, - LLVMMatchType<1>, LLVMMatchType<1>, - LLVMMatchType<1>, llvm_i32_ty, - llvm_i32_ty], [IntrArgMemOnly]>; - -// Vector bitwise select. -def int_arm_neon_vbsl : Intrinsic<[llvm_anyvector_ty], - [LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>], - [IntrNoMem]>; - - -// Crypto instructions -class AES_1Arg_Intrinsic : Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty], [IntrNoMem]>; -class AES_2Arg_Intrinsic : Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - -class SHA_1Arg_Intrinsic : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], - [IntrNoMem]>; -class SHA_2Arg_Intrinsic : Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -class SHA_3Arg_i32_Intrinsic : Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -class SHA_3Arg_v4i32_Intrinsic : Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty,llvm_v4i32_ty], - [IntrNoMem]>; - -def int_arm_neon_aesd : AES_2Arg_Intrinsic; -def int_arm_neon_aese : AES_2Arg_Intrinsic; -def int_arm_neon_aesimc : AES_1Arg_Intrinsic; -def int_arm_neon_aesmc : AES_1Arg_Intrinsic; -def int_arm_neon_sha1h : SHA_1Arg_Intrinsic; -def int_arm_neon_sha1su1 : SHA_2Arg_Intrinsic; -def int_arm_neon_sha256su0 : SHA_2Arg_Intrinsic; -def int_arm_neon_sha1c : SHA_3Arg_i32_Intrinsic; -def int_arm_neon_sha1m : SHA_3Arg_i32_Intrinsic; -def int_arm_neon_sha1p : SHA_3Arg_i32_Intrinsic; -def int_arm_neon_sha1su0: SHA_3Arg_v4i32_Intrinsic; -def int_arm_neon_sha256h: SHA_3Arg_v4i32_Intrinsic; -def int_arm_neon_sha256h2: SHA_3Arg_v4i32_Intrinsic; -def int_arm_neon_sha256su1: SHA_3Arg_v4i32_Intrinsic; - -} // end TargetPrefix diff --git a/llvm/include/llvm/IR/IntrinsicsBPF.td b/llvm/include/llvm/IR/IntrinsicsBPF.td deleted file mode 100644 index 94eca8e4..00000000 --- a/llvm/include/llvm/IR/IntrinsicsBPF.td +++ /dev/null @@ -1,24 +0,0 @@ -//===- IntrinsicsBPF.td - Defines BPF intrinsics -----------*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the BPF-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -// Specialized loads from packet -let TargetPrefix = "bpf" in { // All intrinsics start with "llvm.bpf." - def int_bpf_load_byte : GCCBuiltin<"__builtin_bpf_load_byte">, - Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>; - def int_bpf_load_half : GCCBuiltin<"__builtin_bpf_load_half">, - Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>; - def int_bpf_load_word : GCCBuiltin<"__builtin_bpf_load_word">, - Intrinsic<[llvm_i64_ty], [llvm_ptr_ty, llvm_i64_ty], [IntrReadMem]>; - def int_bpf_pseudo : GCCBuiltin<"__builtin_bpf_pseudo">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty]>; -} diff --git a/llvm/include/llvm/IR/IntrinsicsHexagon.td b/llvm/include/llvm/IR/IntrinsicsHexagon.td deleted file mode 100644 index 6519f051..00000000 --- a/llvm/include/llvm/IR/IntrinsicsHexagon.td +++ /dev/null @@ -1,9373 +0,0 @@ -//===- IntrinsicsHexagon.td - Defines Hexagon intrinsics ---*- tablegen -*-===// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the Hexagon-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -//===----------------------------------------------------------------------===// -// Definitions for all Hexagon intrinsics. -// -// All Hexagon intrinsics start with "llvm.hexagon.". -let TargetPrefix = "hexagon" in { - /// Hexagon_Intrinsic - Base class for all Hexagon intrinsics. - class Hexagon_Intrinsic ret_types, - list param_types, - list properties> - : GCCBuiltin, - Intrinsic; -} - -//===----------------------------------------------------------------------===// -// -// DEF_FUNCTION_TYPE_1(QI_ftype_MEM,BT_BOOL,BT_PTR) -> -// Hexagon_qi_mem_Intrinsic -// -class Hexagon_qi_mem_Intrinsic - : Hexagon_Intrinsic; - -// -// DEF_FUNCTION_TYPE_1(void_ftype_SI,BT_VOID,BT_INT) -> -// Hexagon_void_si_Intrinsic -// -class Hexagon_void_si_Intrinsic - : Hexagon_Intrinsic; - -// -// DEF_FUNCTION_TYPE_1(HI_ftype_SI,BT_I16,BT_INT) -> -// Hexagon_hi_si_Intrinsic -// -class Hexagon_hi_si_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_1(SI_ftype_SI,BT_INT,BT_INT) -> -// Hexagon_si_si_Intrinsic -// -class Hexagon_si_si_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_1(DI_ftype_SI,BT_LONGLONG,BT_INT) -> -// Hexagon_di_si_Intrinsic -// -class Hexagon_di_si_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_1(SI_ftype_DI,BT_INT,BT_LONGLONG) -> -// Hexagon_si_di_Intrinsic -// -class Hexagon_si_di_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_1(DI_ftype_DI,BT_LONGLONG,BT_LONGLONG) -> -// Hexagon_di_di_Intrinsic -// -class Hexagon_di_di_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_1(QI_ftype_QI,BT_BOOL,BT_BOOL) -> -// Hexagon_qi_qi_Intrinsic -// -class Hexagon_qi_qi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_1(QI_ftype_SI,BT_BOOL,BT_INT) -> -// Hexagon_qi_si_Intrinsic -// -class Hexagon_qi_si_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_1(DI_ftype_QI,BT_LONGLONG,BT_BOOL) -> -// Hexagon_di_qi_Intrinsic -// -class Hexagon_di_qi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_1(SI_ftype_QI,BT_INT,BT_BOOL) -> -// Hexagon_si_qi_Intrinsic -// -class Hexagon_si_qi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(QI_ftype_SISI,BT_BOOL,BT_INT,BT_INT) -> -// Hexagon_qi_sisi_Intrinsic -// -class Hexagon_qi_sisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(void_ftype_SISI,BT_VOID,BT_INT,BT_INT) -> -// Hexagon_void_sisi_Intrinsic -// -class Hexagon_void_sisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(SI_ftype_SISI,BT_INT,BT_INT,BT_INT) -> -// Hexagon_si_sisi_Intrinsic -// -class Hexagon_si_sisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(USI_ftype_SISI,BT_UINT,BT_INT,BT_INT) -> -// Hexagon_usi_sisi_Intrinsic -// -class Hexagon_usi_sisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(DI_ftype_SISI,BT_LONGLONG,BT_INT,BT_INT) -> -// Hexagon_di_sisi_Intrinsic -// -class Hexagon_di_sisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(UDI_ftype_SISI,BT_ULONGLONG,BT_INT,BT_INT) -> -// Hexagon_udi_sisi_Intrinsic -// -class Hexagon_udi_sisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(DI_ftype_SIDI,BT_LONGLONG,BT_INT,BT_LONGLONG) -> -// Hexagon_di_sidi_Intrinsic -// -class Hexagon_di_sidi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(DI_ftype_DISI,BT_LONGLONG,BT_LONGLONG,BT_INT) -> -// Hexagon_di_disi_Intrinsic -// -class Hexagon_di_disi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(SI_ftype_SIDI,BT_INT,BT_INT,BT_LONGLONG) -> -// Hexagon_si_sidi_Intrinsic -// -class Hexagon_si_sidi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(SI_ftype_DIDI,BT_INT,BT_LONGLONG,BT_LONGLONG) -> -// Hexagon_si_didi_Intrinsic -// -class Hexagon_si_didi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(DI_ftype_DIDI,BT_LONGLONG,BT_LONGLONG,BT_LONGLONG) -> -// Hexagon_di_didi_Intrinsic -// -class Hexagon_di_didi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(UDI_ftype_DIDI,BT_ULONGLONG,BT_LONGLONG,BT_LONGLONG) -> -// Hexagon_udi_didi_Intrinsic -// -class Hexagon_udi_didi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(SI_ftype_DISI,BT_INT,BT_LONGLONG,BT_INT) -> -// Hexagon_si_disi_Intrinsic -// -class Hexagon_si_disi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(QI_ftype_DIDI,BT_BOOL,BT_LONGLONG,BT_LONGLONG) -> -// Hexagon_qi_didi_Intrinsic -// -class Hexagon_qi_didi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(QI_ftype_SIDI,BT_BOOL,BT_INT,BT_LONGLONG) -> -// Hexagon_qi_didi_Intrinsic -// -class Hexagon_qi_sidi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(QI_ftype_DISI,BT_BOOL,BT_LONGLONG,BT_INT) -> -// Hexagon_qi_disi_Intrinsic -// -class Hexagon_qi_disi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(QI_ftype_QIQI,BT_BOOL,BT_BOOL,BT_BOOL) -> -// Hexagon_qi_qiqi_Intrinsic -// -class Hexagon_qi_qiqi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(QI_ftype_QIQIQI,BT_BOOL,BT_BOOL,BT_BOOL) -> -// Hexagon_qi_qiqiqi_Intrinsic -// -class Hexagon_qi_qiqiqi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(SI_ftype_QIQI,BT_INT,BT_BOOL,BT_BOOL) -> -// Hexagon_si_qiqi_Intrinsic -// -class Hexagon_si_qiqi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_2(SI_ftype_QISI,BT_INT,BT_BOOL,BT_INT) -> -// Hexagon_si_qisi_Intrinsic -// -class Hexagon_si_qisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(void_ftype_SISISI,BT_VOID,BT_INT,BT_INT,BT_INT) -> -// Hexagon_void_sisisi_Intrinsic -// -class Hexagon_void_sisisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(SI_ftype_SISISI,BT_INT,BT_INT,BT_INT,BT_INT) -> -// Hexagon_si_sisisi_Intrinsic -// -class Hexagon_si_sisisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(DI_ftype_SISISI,BT_LONGLONG,BT_INT,BT_INT,BT_INT) -> -// Hexagon_di_sisisi_Intrinsic -// -class Hexagon_di_sisisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(SI_ftype_DISISI,BT_INT,BT_LONGLONG,BT_INT,BT_INT) -> -// Hexagon_si_disisi_Intrinsic -// -class Hexagon_si_disisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(DI_ftype_DISISI,BT_LONGLONG,BT_LONGLONG,BT_INT,BT_INT) -> -// Hexagon_di_disisi_Intrinsic -// -class Hexagon_di_disisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(SI_ftype_SIDISI,BT_INT,BT_INT,BT_LONGLONG,BT_INT) -> -// Hexagon_si_sidisi_Intrinsic -// -class Hexagon_si_sidisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(DI_ftype_DIDISI,BT_LONGLONG,BT_LONGLONG, -// BT_LONGLONG,BT_INT) -> -// Hexagon_di_didisi_Intrinsic -// -class Hexagon_di_didisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(SI_ftype_SIDIDI,BT_INT,BT_INT,BT_LONGLONG,BT_LONGLONG) -> -// Hexagon_si_sididi_Intrinsic -// -class Hexagon_si_sididi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(DI_ftype_DIDIDI,BT_LONGLONG,BT_LONGLONG,BT_LONGLONG, -// BT_LONGLONG) -> -// Hexagon_di_dididi_Intrinsic -// -class Hexagon_di_dididi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(SI_ftype_SISIDI,BT_INT,BT_INT,BT_INT,BT_LONGLONG) -> -// Hexagon_si_sisidi_Intrinsic -// -class Hexagon_si_sisidi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(SI_ftype_QISISI,BT_INT,BT_BOOL,BT_INT,BT_INT) -> -// Hexagon_si_qisisi_Intrinsic -// -class Hexagon_si_qisisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(DI_ftype_QISISI,BT_LONGLONG,BT_BOOL,BT_INT,BT_INT) -> -// Hexagon_di_qisisi_Intrinsic -// -class Hexagon_di_qisisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(DI_ftype_QIDIDI,BT_LONGLONG,BT_BOOL,BT_LONGLONG, -// BT_LONGLONG) -> -// Hexagon_di_qididi_Intrinsic -// -class Hexagon_di_qididi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_3(DI_ftype_DIDIQI,BT_LONGLONG,BT_LONGLONG,BT_LONGLONG, -// BT_BOOL) -> -// Hexagon_di_didiqi_Intrinsic -// -class Hexagon_di_didiqi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_4(SI_ftype_SISISISI,BT_INT,BT_INT,BT_INT,BT_INT,BT_INT) -> -// Hexagon_si_sisisisi_Intrinsic -// -class Hexagon_si_sisisisi_Intrinsic - : Hexagon_Intrinsic; -// -// DEF_FUNCTION_TYPE_4(DI_ftype_DIDISISI,BT_LONGLONG,BT_LONGLONG, -// BT_LONGLONG,BT_INT,BT_INT) -> -// Hexagon_di_didisisi_Intrinsic -// -class Hexagon_di_didisisi_Intrinsic - : Hexagon_Intrinsic; - -class Hexagon_mem_memmemsi_Intrinsic - : Hexagon_Intrinsic; - -class Hexagon_mem_memsisi_Intrinsic - : Hexagon_Intrinsic; - -class Hexagon_mem_memdisi_Intrinsic - : Hexagon_Intrinsic; - -class Hexagon_mem_memmemsisi_Intrinsic - : Hexagon_Intrinsic; - -class Hexagon_mem_memsisisi_Intrinsic - : Hexagon_Intrinsic; - -class Hexagon_mem_memdisisi_Intrinsic - : Hexagon_Intrinsic; - -class Hexagon_v256_v256v256_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_sf_df_Intrinsic -// -class Hexagon_sf_si_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_sf_df_Intrinsic -// -class Hexagon_sf_df_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_sf_di_Intrinsic -// -class Hexagon_sf_di_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_df_sf_Intrinsic -// -class Hexagon_df_sf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_di_sf_Intrinsic -// -class Hexagon_di_sf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_sf_sf_Intrinsic -// -class Hexagon_sf_sf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_si_sf_Intrinsic -// -class Hexagon_si_sf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_si_df_Intrinsic -// -class Hexagon_si_df_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_sf_sfsf_Intrinsic -// -class Hexagon_sf_sfsf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_si_sfsf_Intrinsic -// -class Hexagon_si_sfsf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_si_sfsi_Intrinsic -// -class Hexagon_si_sfsi_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_qi_sfqi_Intrinsic -// -class Hexagon_qi_sfqi_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_sf_sfsfsf_Intrinsic -// -class Hexagon_sf_sfsfsf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_sf_sfsfsfqi_Intrinsic -// -class Hexagon_sf_sfsfsfqi_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_di_dididi_Intrinsic -// -class Hexagon_di_dididisi_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_df_si_Intrinsic -// -class Hexagon_df_si_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_df_di_Intrinsic -// -class Hexagon_df_di_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_di_df_Intrinsic -// -class Hexagon_di_df_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_df_df_Intrinsic -// -class Hexagon_df_df_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_df_dfdf_Intrinsic -// -class Hexagon_df_dfdf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_si_dfdf_Intrinsic -// -class Hexagon_si_dfdf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_si_dfsi_Intrinsic -// -class Hexagon_si_dfsi_Intrinsic - : Hexagon_Intrinsic; -// -// -// Hexagon_df_dfdfdf_Intrinsic -// -class Hexagon_df_dfdfdf_Intrinsic - : Hexagon_Intrinsic; -// -// Hexagon_df_dfdfdf_Intrinsic -// -class Hexagon_df_dfdfdfqi_Intrinsic - : Hexagon_Intrinsic; - - -// This one below will not be auto-generated, -// so make sure, you don't overwrite this one. -// -// BUILTIN_INFO(SI_to_SXTHI_asrh,SI_ftype_SI,1) -// -def int_hexagon_SI_to_SXTHI_asrh : -Hexagon_si_si_Intrinsic<"SI_to_SXTHI_asrh">; -// -// BUILTIN_INFO_NONCONST(brev_ldd,PTR_ftype_PTRPTRSI,3) -// -def int_hexagon_brev_ldd : -Hexagon_mem_memmemsi_Intrinsic<"brev_ldd">; -// -// BUILTIN_INFO_NONCONST(brev_ldw,PTR_ftype_PTRPTRSI,3) -// -def int_hexagon_brev_ldw : -Hexagon_mem_memmemsi_Intrinsic<"brev_ldw">; -// -// BUILTIN_INFO_NONCONST(brev_ldh,PTR_ftype_PTRPTRSI,3) -// -def int_hexagon_brev_ldh : -Hexagon_mem_memmemsi_Intrinsic<"brev_ldh">; -// -// BUILTIN_INFO_NONCONST(brev_lduh,PTR_ftype_PTRPTRSI,3) -// -def int_hexagon_brev_lduh : -Hexagon_mem_memmemsi_Intrinsic<"brev_lduh">; -// -// BUILTIN_INFO_NONCONST(brev_ldb,PTR_ftype_PTRPTRSI,3) -// -def int_hexagon_brev_ldb : -Hexagon_mem_memmemsi_Intrinsic<"brev_ldb">; -// -// BUILTIN_INFO_NONCONST(brev_ldub,PTR_ftype_PTRPTRSI,3) -// -def int_hexagon_brev_ldub : -Hexagon_mem_memmemsi_Intrinsic<"brev_ldub">; -// -// BUILTIN_INFO_NONCONST(circ_ldd,PTR_ftype_PTRPTRSISI,4) -// -def int_hexagon_circ_ldd : -Hexagon_mem_memmemsisi_Intrinsic<"circ_ldd">; -// -// BUILTIN_INFO_NONCONST(circ_ldw,PTR_ftype_PTRPTRSISI,4) -// -def int_hexagon_circ_ldw : -Hexagon_mem_memmemsisi_Intrinsic<"circ_ldw">; -// -// BUILTIN_INFO_NONCONST(circ_ldh,PTR_ftype_PTRPTRSISI,4) -// -def int_hexagon_circ_ldh : -Hexagon_mem_memmemsisi_Intrinsic<"circ_ldh">; -// -// BUILTIN_INFO_NONCONST(circ_lduh,PTR_ftype_PTRPTRSISI,4) -// -def int_hexagon_circ_lduh : -Hexagon_mem_memmemsisi_Intrinsic<"circ_lduh">; -// -// BUILTIN_INFO_NONCONST(circ_ldb,PTR_ftype_PTRPTRSISI,4) -// -def int_hexagon_circ_ldb : -Hexagon_mem_memmemsisi_Intrinsic<"circ_ldb">; -// -// BUILTIN_INFO_NONCONST(circ_ldub,PTR_ftype_PTRPTRSISI,4) -// -def int_hexagon_circ_ldub : -Hexagon_mem_memmemsisi_Intrinsic<"circ_ldub">; - -// -// BUILTIN_INFO_NONCONST(brev_stb,PTR_ftype_PTRSISI,3) -// -def int_hexagon_brev_stb : -Hexagon_mem_memsisi_Intrinsic<"brev_stb">; -// -// BUILTIN_INFO_NONCONST(brev_sthhi,PTR_ftype_PTRSISI,3) -// -def int_hexagon_brev_sthhi : -Hexagon_mem_memsisi_Intrinsic<"brev_sthhi">; -// -// BUILTIN_INFO_NONCONST(brev_sth,PTR_ftype_PTRSISI,3) -// -def int_hexagon_brev_sth : -Hexagon_mem_memsisi_Intrinsic<"brev_sth">; -// -// BUILTIN_INFO_NONCONST(brev_stw,PTR_ftype_PTRSISI,3) -// -def int_hexagon_brev_stw : -Hexagon_mem_memsisi_Intrinsic<"brev_stw">; -// -// BUILTIN_INFO_NONCONST(brev_std,PTR_ftype_PTRSISI,3) -// -def int_hexagon_brev_std : -Hexagon_mem_memdisi_Intrinsic<"brev_std">; -// -// BUILTIN_INFO_NONCONST(circ_std,PTR_ftype_PTRDISISI,4) -// -def int_hexagon_circ_std : -Hexagon_mem_memdisisi_Intrinsic<"circ_std">; -// -// BUILTIN_INFO_NONCONST(circ_stw,PTR_ftype_PTRSISISI,4) -// -def int_hexagon_circ_stw : -Hexagon_mem_memsisisi_Intrinsic<"circ_stw">; -// -// BUILTIN_INFO_NONCONST(circ_sth,PTR_ftype_PTRSISISI,4) -// -def int_hexagon_circ_sth : -Hexagon_mem_memsisisi_Intrinsic<"circ_sth">; -// -// BUILTIN_INFO_NONCONST(circ_sthhi,PTR_ftype_PTRSISISI,4) -// -def int_hexagon_circ_sthhi : -Hexagon_mem_memsisisi_Intrinsic<"circ_sthhi">; -// -// BUILTIN_INFO_NONCONST(circ_stb,PTR_ftype_PTRSISISI,4) -// -def int_hexagon_circ_stb : -Hexagon_mem_memsisisi_Intrinsic<"circ_stb">; - - -def int_hexagon_mm256i_vaddw : -Hexagon_v256_v256v256_Intrinsic<"_mm256i_vaddw">; - - -// This one above will not be auto-generated, -// so make sure, you don't overwrite this one. -// -// BUILTIN_INFO(HEXAGON.C2_cmpeq,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpeq : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpeq">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpgt,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpgt : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpgt">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpgtu,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpgtu : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpgtu">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpeqp,QI_ftype_DIDI,2) -// -def int_hexagon_C2_cmpeqp : -Hexagon_si_didi_Intrinsic<"HEXAGON_C2_cmpeqp">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpgtp,QI_ftype_DIDI,2) -// -def int_hexagon_C2_cmpgtp : -Hexagon_si_didi_Intrinsic<"HEXAGON_C2_cmpgtp">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpgtup,QI_ftype_DIDI,2) -// -def int_hexagon_C2_cmpgtup : -Hexagon_si_didi_Intrinsic<"HEXAGON_C2_cmpgtup">; -// -// BUILTIN_INFO(HEXAGON.A4_rcmpeqi,SI_ftype_SISI,2) -// -def int_hexagon_A4_rcmpeqi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_rcmpeqi">; -// -// BUILTIN_INFO(HEXAGON.A4_rcmpneqi,SI_ftype_SISI,2) -// -def int_hexagon_A4_rcmpneqi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_rcmpneqi">; -// -// BUILTIN_INFO(HEXAGON.A4_rcmpeq,SI_ftype_SISI,2) -// -def int_hexagon_A4_rcmpeq : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_rcmpeq">; -// -// BUILTIN_INFO(HEXAGON.A4_rcmpneq,SI_ftype_SISI,2) -// -def int_hexagon_A4_rcmpneq : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_rcmpneq">; -// -// BUILTIN_INFO(HEXAGON.C2_bitsset,QI_ftype_SISI,2) -// -def int_hexagon_C2_bitsset : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_bitsset">; -// -// BUILTIN_INFO(HEXAGON.C2_bitsclr,QI_ftype_SISI,2) -// -def int_hexagon_C2_bitsclr : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_bitsclr">; -// -// BUILTIN_INFO(HEXAGON.C4_nbitsset,QI_ftype_SISI,2) -// -def int_hexagon_C4_nbitsset : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_nbitsset">; -// -// BUILTIN_INFO(HEXAGON.C4_nbitsclr,QI_ftype_SISI,2) -// -def int_hexagon_C4_nbitsclr : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_nbitsclr">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpeqi,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpeqi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpeqi">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpgti,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpgti : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpgti">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpgtui,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpgtui : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpgtui">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpgei,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpgei : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpgei">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpgeui,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpgeui : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpgeui">; -// -// BUILTIN_INFO(HEXAGON.C2_cmplt,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmplt : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmplt">; -// -// BUILTIN_INFO(HEXAGON.C2_cmpltu,QI_ftype_SISI,2) -// -def int_hexagon_C2_cmpltu : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_cmpltu">; -// -// BUILTIN_INFO(HEXAGON.C2_bitsclri,QI_ftype_SISI,2) -// -def int_hexagon_C2_bitsclri : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_bitsclri">; -// -// BUILTIN_INFO(HEXAGON.C4_nbitsclri,QI_ftype_SISI,2) -// -def int_hexagon_C4_nbitsclri : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_nbitsclri">; -// -// BUILTIN_INFO(HEXAGON.C4_cmpneqi,QI_ftype_SISI,2) -// -def int_hexagon_C4_cmpneqi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_cmpneqi">; -// -// BUILTIN_INFO(HEXAGON.C4_cmpltei,QI_ftype_SISI,2) -// -def int_hexagon_C4_cmpltei : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_cmpltei">; -// -// BUILTIN_INFO(HEXAGON.C4_cmplteui,QI_ftype_SISI,2) -// -def int_hexagon_C4_cmplteui : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_cmplteui">; -// -// BUILTIN_INFO(HEXAGON.C4_cmpneq,QI_ftype_SISI,2) -// -def int_hexagon_C4_cmpneq : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_cmpneq">; -// -// BUILTIN_INFO(HEXAGON.C4_cmplte,QI_ftype_SISI,2) -// -def int_hexagon_C4_cmplte : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_cmplte">; -// -// BUILTIN_INFO(HEXAGON.C4_cmplteu,QI_ftype_SISI,2) -// -def int_hexagon_C4_cmplteu : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C4_cmplteu">; -// -// BUILTIN_INFO(HEXAGON.C2_and,QI_ftype_QIQI,2) -// -def int_hexagon_C2_and : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_and">; -// -// BUILTIN_INFO(HEXAGON.C2_or,QI_ftype_QIQI,2) -// -def int_hexagon_C2_or : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_or">; -// -// BUILTIN_INFO(HEXAGON.C2_xor,QI_ftype_QIQI,2) -// -def int_hexagon_C2_xor : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_xor">; -// -// BUILTIN_INFO(HEXAGON.C2_andn,QI_ftype_QIQI,2) -// -def int_hexagon_C2_andn : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_andn">; -// -// BUILTIN_INFO(HEXAGON.C2_not,QI_ftype_QI,1) -// -def int_hexagon_C2_not : -Hexagon_si_si_Intrinsic<"HEXAGON_C2_not">; -// -// BUILTIN_INFO(HEXAGON.C2_orn,QI_ftype_QIQI,2) -// -def int_hexagon_C2_orn : -Hexagon_si_sisi_Intrinsic<"HEXAGON_C2_orn">; -// -// BUILTIN_INFO(HEXAGON.C4_and_and,QI_ftype_QIQIQI,3) -// -def int_hexagon_C4_and_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_C4_and_and">; -// -// BUILTIN_INFO(HEXAGON.C4_and_or,QI_ftype_QIQIQI,3) -// -def int_hexagon_C4_and_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_C4_and_or">; -// -// BUILTIN_INFO(HEXAGON.C4_or_and,QI_ftype_QIQIQI,3) -// -def int_hexagon_C4_or_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_C4_or_and">; -// -// BUILTIN_INFO(HEXAGON.C4_or_or,QI_ftype_QIQIQI,3) -// -def int_hexagon_C4_or_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_C4_or_or">; -// -// BUILTIN_INFO(HEXAGON.C4_and_andn,QI_ftype_QIQIQI,3) -// -def int_hexagon_C4_and_andn : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_C4_and_andn">; -// -// BUILTIN_INFO(HEXAGON.C4_and_orn,QI_ftype_QIQIQI,3) -// -def int_hexagon_C4_and_orn : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_C4_and_orn">; -// -// BUILTIN_INFO(HEXAGON.C4_or_andn,QI_ftype_QIQIQI,3) -// -def int_hexagon_C4_or_andn : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_C4_or_andn">; -// -// BUILTIN_INFO(HEXAGON.C4_or_orn,QI_ftype_QIQIQI,3) -// -def int_hexagon_C4_or_orn : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_C4_or_orn">; -// -// BUILTIN_INFO(HEXAGON.C2_pxfer_map,QI_ftype_QI,1) -// -def int_hexagon_C2_pxfer_map : -Hexagon_si_qi_Intrinsic<"HEXAGON_C2_pxfer_map">; -// -// BUILTIN_INFO(HEXAGON.C2_any8,QI_ftype_QI,1) -// -def int_hexagon_C2_any8 : -Hexagon_si_qi_Intrinsic<"HEXAGON_C2_any8">; -// -// BUILTIN_INFO(HEXAGON.C2_all8,QI_ftype_QI,1) -// -def int_hexagon_C2_all8 : -Hexagon_si_qi_Intrinsic<"HEXAGON_C2_all8">; -// -// BUILTIN_INFO(HEXAGON.C2_vitpack,SI_ftype_QIQI,2) -// -def int_hexagon_C2_vitpack : -Hexagon_si_qiqi_Intrinsic<"HEXAGON_C2_vitpack">; -// -// BUILTIN_INFO(HEXAGON.C2_mux,SI_ftype_QISISI,3) -// -def int_hexagon_C2_mux : -Hexagon_si_qisisi_Intrinsic<"HEXAGON_C2_mux">; -// -// BUILTIN_INFO(HEXAGON.C2_muxii,SI_ftype_QISISI,3) -// -def int_hexagon_C2_muxii : -Hexagon_si_qisisi_Intrinsic<"HEXAGON_C2_muxii">; -// -// BUILTIN_INFO(HEXAGON.C2_muxir,SI_ftype_QISISI,3) -// -def int_hexagon_C2_muxir : -Hexagon_si_qisisi_Intrinsic<"HEXAGON_C2_muxir">; -// -// BUILTIN_INFO(HEXAGON.C2_muxri,SI_ftype_QISISI,3) -// -def int_hexagon_C2_muxri : -Hexagon_si_qisisi_Intrinsic<"HEXAGON_C2_muxri">; -// -// BUILTIN_INFO(HEXAGON.C2_vmux,DI_ftype_QIDIDI,3) -// -def int_hexagon_C2_vmux : -Hexagon_di_qididi_Intrinsic<"HEXAGON_C2_vmux">; -// -// BUILTIN_INFO(HEXAGON.C2_mask,DI_ftype_QI,1) -// -def int_hexagon_C2_mask : -Hexagon_di_qi_Intrinsic<"HEXAGON_C2_mask">; -// -// BUILTIN_INFO(HEXAGON.A2_vcmpbeq,QI_ftype_DIDI,2) -// -def int_hexagon_A2_vcmpbeq : -Hexagon_si_didi_Intrinsic<"HEXAGON_A2_vcmpbeq">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpbeqi,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmpbeqi : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmpbeqi">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpbeq_any,QI_ftype_DIDI,2) -// -def int_hexagon_A4_vcmpbeq_any : -Hexagon_si_didi_Intrinsic<"HEXAGON_A4_vcmpbeq_any">; -// -// BUILTIN_INFO(HEXAGON.A2_vcmpbgtu,QI_ftype_DIDI,2) -// -def int_hexagon_A2_vcmpbgtu : -Hexagon_si_didi_Intrinsic<"HEXAGON_A2_vcmpbgtu">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpbgtui,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmpbgtui : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmpbgtui">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpbgt,QI_ftype_DIDI,2) -// -def int_hexagon_A4_vcmpbgt : -Hexagon_si_didi_Intrinsic<"HEXAGON_A4_vcmpbgt">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpbgti,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmpbgti : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmpbgti">; -// -// BUILTIN_INFO(HEXAGON.A4_cmpbeq,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmpbeq : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmpbeq">; -// -// BUILTIN_INFO(HEXAGON.A4_cmpbeqi,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmpbeqi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmpbeqi">; -// -// BUILTIN_INFO(HEXAGON.A4_cmpbgtu,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmpbgtu : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmpbgtu">; -// -// BUILTIN_INFO(HEXAGON.A4_cmpbgtui,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmpbgtui : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmpbgtui">; -// -// BUILTIN_INFO(HEXAGON.A4_cmpbgt,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmpbgt : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmpbgt">; -// -// BUILTIN_INFO(HEXAGON.A4_cmpbgti,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmpbgti : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmpbgti">; -// -// BUILTIN_INFO(HEXAGON.A2_vcmpheq,QI_ftype_DIDI,2) -// -def int_hexagon_A2_vcmpheq : -Hexagon_si_didi_Intrinsic<"HEXAGON_A2_vcmpheq">; -// -// BUILTIN_INFO(HEXAGON.A2_vcmphgt,QI_ftype_DIDI,2) -// -def int_hexagon_A2_vcmphgt : -Hexagon_si_didi_Intrinsic<"HEXAGON_A2_vcmphgt">; -// -// BUILTIN_INFO(HEXAGON.A2_vcmphgtu,QI_ftype_DIDI,2) -// -def int_hexagon_A2_vcmphgtu : -Hexagon_si_didi_Intrinsic<"HEXAGON_A2_vcmphgtu">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpheqi,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmpheqi : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmpheqi">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmphgti,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmphgti : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmphgti">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmphgtui,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmphgtui : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmphgtui">; -// -// BUILTIN_INFO(HEXAGON.A4_cmpheq,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmpheq : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmpheq">; -// -// BUILTIN_INFO(HEXAGON.A4_cmphgt,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmphgt : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmphgt">; -// -// BUILTIN_INFO(HEXAGON.A4_cmphgtu,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmphgtu : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmphgtu">; -// -// BUILTIN_INFO(HEXAGON.A4_cmpheqi,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmpheqi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmpheqi">; -// -// BUILTIN_INFO(HEXAGON.A4_cmphgti,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmphgti : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmphgti">; -// -// BUILTIN_INFO(HEXAGON.A4_cmphgtui,QI_ftype_SISI,2) -// -def int_hexagon_A4_cmphgtui : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cmphgtui">; -// -// BUILTIN_INFO(HEXAGON.A2_vcmpweq,QI_ftype_DIDI,2) -// -def int_hexagon_A2_vcmpweq : -Hexagon_si_didi_Intrinsic<"HEXAGON_A2_vcmpweq">; -// -// BUILTIN_INFO(HEXAGON.A2_vcmpwgt,QI_ftype_DIDI,2) -// -def int_hexagon_A2_vcmpwgt : -Hexagon_si_didi_Intrinsic<"HEXAGON_A2_vcmpwgt">; -// -// BUILTIN_INFO(HEXAGON.A2_vcmpwgtu,QI_ftype_DIDI,2) -// -def int_hexagon_A2_vcmpwgtu : -Hexagon_si_didi_Intrinsic<"HEXAGON_A2_vcmpwgtu">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpweqi,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmpweqi : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmpweqi">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpwgti,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmpwgti : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmpwgti">; -// -// BUILTIN_INFO(HEXAGON.A4_vcmpwgtui,QI_ftype_DISI,2) -// -def int_hexagon_A4_vcmpwgtui : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_vcmpwgtui">; -// -// BUILTIN_INFO(HEXAGON.A4_boundscheck,QI_ftype_SIDI,2) -// -def int_hexagon_A4_boundscheck : -Hexagon_si_sidi_Intrinsic<"HEXAGON_A4_boundscheck">; -// -// BUILTIN_INFO(HEXAGON.A4_tlbmatch,QI_ftype_DISI,2) -// -def int_hexagon_A4_tlbmatch : -Hexagon_si_disi_Intrinsic<"HEXAGON_A4_tlbmatch">; -// -// BUILTIN_INFO(HEXAGON.C2_tfrpr,SI_ftype_QI,1) -// -def int_hexagon_C2_tfrpr : -Hexagon_si_qi_Intrinsic<"HEXAGON_C2_tfrpr">; -// -// BUILTIN_INFO(HEXAGON.C2_tfrrp,QI_ftype_SI,1) -// -def int_hexagon_C2_tfrrp : -Hexagon_si_si_Intrinsic<"HEXAGON_C2_tfrrp">; -// -// BUILTIN_INFO(HEXAGON.C4_fastcorner9,QI_ftype_QIQI,2) -// -def int_hexagon_C4_fastcorner9 : -Hexagon_si_qiqi_Intrinsic<"HEXAGON_C4_fastcorner9">; -// -// BUILTIN_INFO(HEXAGON.C4_fastcorner9_not,QI_ftype_QIQI,2) -// -def int_hexagon_C4_fastcorner9_not : -Hexagon_si_qiqi_Intrinsic<"HEXAGON_C4_fastcorner9_not">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_hh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_hh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_hh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_hh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_hl_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_hl_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_hl_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_hl_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_lh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_lh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_lh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_lh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_ll_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_ll_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_ll_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_ll_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_hh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_hh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_hh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_hh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_hl_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_hl_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_hl_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_hl_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_lh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_lh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_lh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_lh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_ll_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_ll_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_ll_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_ll_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_sat_hh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_sat_hh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_sat_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_sat_hh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_sat_hh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_sat_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_sat_hl_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_sat_hl_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_sat_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_sat_hl_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_sat_hl_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_sat_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_sat_lh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_sat_lh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_sat_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_sat_lh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_sat_lh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_sat_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_sat_ll_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_sat_ll_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_sat_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_acc_sat_ll_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_acc_sat_ll_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_acc_sat_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_sat_hh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_sat_hh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_sat_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_sat_hh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_sat_hh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_sat_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_sat_hl_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_sat_hl_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_sat_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_sat_hl_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_sat_hl_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_sat_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_sat_lh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_sat_lh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_sat_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_sat_lh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_sat_lh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_sat_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_sat_ll_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_sat_ll_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_sat_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_nac_sat_ll_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpy_nac_sat_ll_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpy_nac_sat_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_hh_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_hh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_hh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_hh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_hl_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_hl_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_hl_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_hl_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_lh_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_lh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_lh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_lh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_ll_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_ll_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_ll_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_ll_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_hh_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_hh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_hh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_hh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_hl_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_hl_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_hl_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_hl_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_lh_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_lh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_lh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_lh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_ll_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_ll_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_ll_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_ll_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_rnd_hh_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_rnd_hh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_rnd_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_rnd_hh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_rnd_hh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_rnd_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_rnd_hl_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_rnd_hl_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_rnd_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_rnd_hl_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_rnd_hl_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_rnd_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_rnd_lh_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_rnd_lh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_rnd_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_rnd_lh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_rnd_lh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_rnd_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_rnd_ll_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_rnd_ll_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_rnd_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_rnd_ll_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_rnd_ll_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_rnd_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_rnd_hh_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_rnd_hh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_rnd_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_rnd_hh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_rnd_hh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_rnd_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_rnd_hl_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_rnd_hl_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_rnd_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_rnd_hl_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_rnd_hl_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_rnd_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_rnd_lh_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_rnd_lh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_rnd_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_rnd_lh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_rnd_lh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_rnd_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_rnd_ll_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_rnd_ll_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_rnd_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_sat_rnd_ll_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_sat_rnd_ll_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_sat_rnd_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_acc_hh_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_acc_hh_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_acc_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_acc_hh_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_acc_hh_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_acc_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_acc_hl_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_acc_hl_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_acc_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_acc_hl_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_acc_hl_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_acc_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_acc_lh_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_acc_lh_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_acc_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_acc_lh_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_acc_lh_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_acc_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_acc_ll_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_acc_ll_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_acc_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_acc_ll_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_acc_ll_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_acc_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_nac_hh_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_nac_hh_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_nac_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_nac_hh_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_nac_hh_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_nac_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_nac_hl_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_nac_hl_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_nac_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_nac_hl_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_nac_hl_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_nac_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_nac_lh_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_nac_lh_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_nac_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_nac_lh_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_nac_lh_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_nac_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_nac_ll_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_nac_ll_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_nac_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_nac_ll_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyd_nac_ll_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyd_nac_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_hh_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_hh_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_hh_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_hh_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_hl_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_hl_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_hl_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_hl_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_lh_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_lh_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_lh_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_lh_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_ll_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_ll_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_ll_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_ll_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_rnd_hh_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_rnd_hh_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_rnd_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_rnd_hh_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_rnd_hh_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_rnd_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_rnd_hl_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_rnd_hl_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_rnd_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_rnd_hl_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_rnd_hl_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_rnd_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_rnd_lh_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_rnd_lh_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_rnd_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_rnd_lh_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_rnd_lh_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_rnd_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_rnd_ll_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_rnd_ll_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_rnd_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyd_rnd_ll_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_mpyd_rnd_ll_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyd_rnd_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_acc_hh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_acc_hh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_acc_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_acc_hh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_acc_hh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_acc_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_acc_hl_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_acc_hl_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_acc_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_acc_hl_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_acc_hl_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_acc_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_acc_lh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_acc_lh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_acc_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_acc_lh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_acc_lh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_acc_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_acc_ll_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_acc_ll_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_acc_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_acc_ll_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_acc_ll_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_acc_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_nac_hh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_nac_hh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_nac_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_nac_hh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_nac_hh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_nac_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_nac_hl_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_nac_hl_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_nac_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_nac_hl_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_nac_hl_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_nac_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_nac_lh_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_nac_lh_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_nac_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_nac_lh_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_nac_lh_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_nac_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_nac_ll_s0,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_nac_ll_s0 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_nac_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_nac_ll_s1,SI_ftype_SISISI,3) -// -def int_hexagon_M2_mpyu_nac_ll_s1 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_mpyu_nac_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_hh_s0,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_hh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_hh_s1,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_hh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_hl_s0,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_hl_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_hl_s1,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_hl_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_lh_s0,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_lh_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_lh_s1,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_lh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_ll_s0,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_ll_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_ll_s1,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_ll_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_acc_hh_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_acc_hh_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_acc_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_acc_hh_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_acc_hh_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_acc_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_acc_hl_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_acc_hl_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_acc_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_acc_hl_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_acc_hl_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_acc_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_acc_lh_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_acc_lh_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_acc_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_acc_lh_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_acc_lh_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_acc_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_acc_ll_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_acc_ll_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_acc_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_acc_ll_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_acc_ll_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_acc_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_nac_hh_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_nac_hh_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_nac_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_nac_hh_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_nac_hh_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_nac_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_nac_hl_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_nac_hl_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_nac_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_nac_hl_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_nac_hl_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_nac_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_nac_lh_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_nac_lh_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_nac_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_nac_lh_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_nac_lh_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_nac_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_nac_ll_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_nac_ll_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_nac_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_nac_ll_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_mpyud_nac_ll_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_mpyud_nac_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_hh_s0,UDI_ftype_SISI,2) -// -def int_hexagon_M2_mpyud_hh_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyud_hh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_hh_s1,UDI_ftype_SISI,2) -// -def int_hexagon_M2_mpyud_hh_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyud_hh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_hl_s0,UDI_ftype_SISI,2) -// -def int_hexagon_M2_mpyud_hl_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyud_hl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_hl_s1,UDI_ftype_SISI,2) -// -def int_hexagon_M2_mpyud_hl_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyud_hl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_lh_s0,UDI_ftype_SISI,2) -// -def int_hexagon_M2_mpyud_lh_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyud_lh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_lh_s1,UDI_ftype_SISI,2) -// -def int_hexagon_M2_mpyud_lh_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyud_lh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_ll_s0,UDI_ftype_SISI,2) -// -def int_hexagon_M2_mpyud_ll_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyud_ll_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyud_ll_s1,UDI_ftype_SISI,2) -// -def int_hexagon_M2_mpyud_ll_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_mpyud_ll_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpysmi,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpysmi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpysmi">; -// -// BUILTIN_INFO(HEXAGON.M2_macsip,SI_ftype_SISISI,3) -// -def int_hexagon_M2_macsip : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_macsip">; -// -// BUILTIN_INFO(HEXAGON.M2_macsin,SI_ftype_SISISI,3) -// -def int_hexagon_M2_macsin : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_macsin">; -// -// BUILTIN_INFO(HEXAGON.M2_dpmpyss_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_dpmpyss_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_dpmpyss_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_dpmpyss_acc_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_dpmpyss_acc_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_dpmpyss_acc_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_dpmpyss_nac_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_dpmpyss_nac_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_dpmpyss_nac_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_dpmpyuu_s0,UDI_ftype_SISI,2) -// -def int_hexagon_M2_dpmpyuu_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_dpmpyuu_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_dpmpyuu_acc_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_dpmpyuu_acc_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_dpmpyuu_acc_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_dpmpyuu_nac_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_dpmpyuu_nac_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_dpmpyuu_nac_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_up,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_up : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_up">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_up_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_up_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_up_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mpy_up_s1_sat,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpy_up_s1_sat : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpy_up_s1_sat">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyu_up,USI_ftype_SISI,2) -// -def int_hexagon_M2_mpyu_up : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyu_up">; -// -// BUILTIN_INFO(HEXAGON.M2_mpysu_up,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpysu_up : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpysu_up">; -// -// BUILTIN_INFO(HEXAGON.M2_dpmpyss_rnd_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_dpmpyss_rnd_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_dpmpyss_rnd_s0">; -// -// BUILTIN_INFO(HEXAGON.M4_mac_up_s1_sat,SI_ftype_SISISI,3) -// -def int_hexagon_M4_mac_up_s1_sat : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_mac_up_s1_sat">; -// -// BUILTIN_INFO(HEXAGON.M4_nac_up_s1_sat,SI_ftype_SISISI,3) -// -def int_hexagon_M4_nac_up_s1_sat : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_nac_up_s1_sat">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyi,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpyi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyi">; -// -// BUILTIN_INFO(HEXAGON.M2_mpyui,SI_ftype_SISI,2) -// -def int_hexagon_M2_mpyui : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_mpyui">; -// -// BUILTIN_INFO(HEXAGON.M2_maci,SI_ftype_SISISI,3) -// -def int_hexagon_M2_maci : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_maci">; -// -// BUILTIN_INFO(HEXAGON.M2_acci,SI_ftype_SISISI,3) -// -def int_hexagon_M2_acci : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_acci">; -// -// BUILTIN_INFO(HEXAGON.M2_accii,SI_ftype_SISISI,3) -// -def int_hexagon_M2_accii : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_accii">; -// -// BUILTIN_INFO(HEXAGON.M2_nacci,SI_ftype_SISISI,3) -// -def int_hexagon_M2_nacci : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_nacci">; -// -// BUILTIN_INFO(HEXAGON.M2_naccii,SI_ftype_SISISI,3) -// -def int_hexagon_M2_naccii : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_naccii">; -// -// BUILTIN_INFO(HEXAGON.M2_subacc,SI_ftype_SISISI,3) -// -def int_hexagon_M2_subacc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_subacc">; -// -// BUILTIN_INFO(HEXAGON.M4_mpyrr_addr,SI_ftype_SISISI,3) -// -def int_hexagon_M4_mpyrr_addr : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_mpyrr_addr">; -// -// BUILTIN_INFO(HEXAGON.M4_mpyri_addr_u2,SI_ftype_SISISI,3) -// -def int_hexagon_M4_mpyri_addr_u2 : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_mpyri_addr_u2">; -// -// BUILTIN_INFO(HEXAGON.M4_mpyri_addr,SI_ftype_SISISI,3) -// -def int_hexagon_M4_mpyri_addr : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_mpyri_addr">; -// -// BUILTIN_INFO(HEXAGON.M4_mpyri_addi,SI_ftype_SISISI,3) -// -def int_hexagon_M4_mpyri_addi : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_mpyri_addi">; -// -// BUILTIN_INFO(HEXAGON.M4_mpyrr_addi,SI_ftype_SISISI,3) -// -def int_hexagon_M4_mpyrr_addi : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_mpyrr_addi">; -// -// BUILTIN_INFO(HEXAGON.M2_vmpy2s_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_vmpy2s_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_vmpy2s_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vmpy2s_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_vmpy2s_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_vmpy2s_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vmac2s_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_vmac2s_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_vmac2s_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vmac2s_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_vmac2s_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_vmac2s_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vmpy2su_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_vmpy2su_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_vmpy2su_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vmpy2su_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_vmpy2su_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_vmpy2su_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vmac2su_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_vmac2su_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_vmac2su_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vmac2su_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_vmac2su_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_vmac2su_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vmpy2s_s0pack,SI_ftype_SISI,2) -// -def int_hexagon_M2_vmpy2s_s0pack : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_vmpy2s_s0pack">; -// -// BUILTIN_INFO(HEXAGON.M2_vmpy2s_s1pack,SI_ftype_SISI,2) -// -def int_hexagon_M2_vmpy2s_s1pack : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_vmpy2s_s1pack">; -// -// BUILTIN_INFO(HEXAGON.M2_vmac2,DI_ftype_DISISI,3) -// -def int_hexagon_M2_vmac2 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_vmac2">; -// -// BUILTIN_INFO(HEXAGON.M2_vmpy2es_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vmpy2es_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vmpy2es_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vmpy2es_s1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vmpy2es_s1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vmpy2es_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vmac2es_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vmac2es_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vmac2es_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vmac2es_s1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vmac2es_s1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vmac2es_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vmac2es,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vmac2es : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vmac2es">; -// -// BUILTIN_INFO(HEXAGON.M2_vrmac_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vrmac_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vrmac_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vrmpy_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vrmpy_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vrmpy_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vdmpyrs_s0,SI_ftype_DIDI,2) -// -def int_hexagon_M2_vdmpyrs_s0 : -Hexagon_si_didi_Intrinsic<"HEXAGON_M2_vdmpyrs_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vdmpyrs_s1,SI_ftype_DIDI,2) -// -def int_hexagon_M2_vdmpyrs_s1 : -Hexagon_si_didi_Intrinsic<"HEXAGON_M2_vdmpyrs_s1">; -// -// BUILTIN_INFO(HEXAGON.M5_vrmpybuu,DI_ftype_DIDI,2) -// -def int_hexagon_M5_vrmpybuu : -Hexagon_di_didi_Intrinsic<"HEXAGON_M5_vrmpybuu">; -// -// BUILTIN_INFO(HEXAGON.M5_vrmacbuu,DI_ftype_DIDIDI,3) -// -def int_hexagon_M5_vrmacbuu : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M5_vrmacbuu">; -// -// BUILTIN_INFO(HEXAGON.M5_vrmpybsu,DI_ftype_DIDI,2) -// -def int_hexagon_M5_vrmpybsu : -Hexagon_di_didi_Intrinsic<"HEXAGON_M5_vrmpybsu">; -// -// BUILTIN_INFO(HEXAGON.M5_vrmacbsu,DI_ftype_DIDIDI,3) -// -def int_hexagon_M5_vrmacbsu : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M5_vrmacbsu">; -// -// BUILTIN_INFO(HEXAGON.M5_vmpybuu,DI_ftype_SISI,2) -// -def int_hexagon_M5_vmpybuu : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M5_vmpybuu">; -// -// BUILTIN_INFO(HEXAGON.M5_vmpybsu,DI_ftype_SISI,2) -// -def int_hexagon_M5_vmpybsu : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M5_vmpybsu">; -// -// BUILTIN_INFO(HEXAGON.M5_vmacbuu,DI_ftype_DISISI,3) -// -def int_hexagon_M5_vmacbuu : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M5_vmacbuu">; -// -// BUILTIN_INFO(HEXAGON.M5_vmacbsu,DI_ftype_DISISI,3) -// -def int_hexagon_M5_vmacbsu : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M5_vmacbsu">; -// -// BUILTIN_INFO(HEXAGON.M5_vdmpybsu,DI_ftype_DIDI,2) -// -def int_hexagon_M5_vdmpybsu : -Hexagon_di_didi_Intrinsic<"HEXAGON_M5_vdmpybsu">; -// -// BUILTIN_INFO(HEXAGON.M5_vdmacbsu,DI_ftype_DIDIDI,3) -// -def int_hexagon_M5_vdmacbsu : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M5_vdmacbsu">; -// -// BUILTIN_INFO(HEXAGON.M2_vdmacs_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vdmacs_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vdmacs_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vdmacs_s1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vdmacs_s1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vdmacs_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vdmpys_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vdmpys_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vdmpys_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vdmpys_s1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vdmpys_s1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vdmpys_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpyrs_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_cmpyrs_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_cmpyrs_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpyrs_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_cmpyrs_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_cmpyrs_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpyrsc_s0,SI_ftype_SISI,2) -// -def int_hexagon_M2_cmpyrsc_s0 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_cmpyrsc_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpyrsc_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_cmpyrsc_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_cmpyrsc_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_cmacs_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cmacs_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cmacs_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cmacs_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cmacs_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cmacs_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_cmacsc_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cmacsc_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cmacsc_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cmacsc_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cmacsc_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cmacsc_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpys_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_cmpys_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_cmpys_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpys_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_cmpys_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_cmpys_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpysc_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_cmpysc_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_cmpysc_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpysc_s1,DI_ftype_SISI,2) -// -def int_hexagon_M2_cmpysc_s1 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_cmpysc_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_cnacs_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cnacs_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cnacs_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cnacs_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cnacs_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cnacs_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_cnacsc_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cnacsc_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cnacsc_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cnacsc_s1,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cnacsc_s1 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cnacsc_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmpys_s1,DI_ftype_DISI,2) -// -def int_hexagon_M2_vrcmpys_s1 : -Hexagon_di_disi_Intrinsic<"HEXAGON_M2_vrcmpys_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmpys_acc_s1,DI_ftype_DIDISI,3) -// -def int_hexagon_M2_vrcmpys_acc_s1 : -Hexagon_di_didisi_Intrinsic<"HEXAGON_M2_vrcmpys_acc_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmpys_s1rp,SI_ftype_DISI,2) -// -def int_hexagon_M2_vrcmpys_s1rp : -Hexagon_si_disi_Intrinsic<"HEXAGON_M2_vrcmpys_s1rp">; -// -// BUILTIN_INFO(HEXAGON.M2_mmacls_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmacls_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmacls_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmacls_s1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmacls_s1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmacls_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmachs_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmachs_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmachs_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmachs_s1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmachs_s1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmachs_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyl_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyl_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyl_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyl_s1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyl_s1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyh_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyh_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyh_s1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyh_s1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmacls_rs0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmacls_rs0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmacls_rs0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmacls_rs1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmacls_rs1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmacls_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmachs_rs0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmachs_rs0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmachs_rs0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmachs_rs1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmachs_rs1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmachs_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyl_rs0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyl_rs0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyl_rs0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyl_rs1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyl_rs1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyl_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyh_rs0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyh_rs0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyh_rs0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyh_rs1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyh_rs1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyh_rs1">; -// -// BUILTIN_INFO(HEXAGON.M4_vrmpyeh_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M4_vrmpyeh_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M4_vrmpyeh_s0">; -// -// BUILTIN_INFO(HEXAGON.M4_vrmpyeh_s1,DI_ftype_DIDI,2) -// -def int_hexagon_M4_vrmpyeh_s1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M4_vrmpyeh_s1">; -// -// BUILTIN_INFO(HEXAGON.M4_vrmpyeh_acc_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M4_vrmpyeh_acc_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M4_vrmpyeh_acc_s0">; -// -// BUILTIN_INFO(HEXAGON.M4_vrmpyeh_acc_s1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M4_vrmpyeh_acc_s1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M4_vrmpyeh_acc_s1">; -// -// BUILTIN_INFO(HEXAGON.M4_vrmpyoh_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M4_vrmpyoh_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M4_vrmpyoh_s0">; -// -// BUILTIN_INFO(HEXAGON.M4_vrmpyoh_s1,DI_ftype_DIDI,2) -// -def int_hexagon_M4_vrmpyoh_s1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M4_vrmpyoh_s1">; -// -// BUILTIN_INFO(HEXAGON.M4_vrmpyoh_acc_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M4_vrmpyoh_acc_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M4_vrmpyoh_acc_s0">; -// -// BUILTIN_INFO(HEXAGON.M4_vrmpyoh_acc_s1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M4_vrmpyoh_acc_s1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M4_vrmpyoh_acc_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_hmmpyl_rs1,SI_ftype_SISI,2) -// -def int_hexagon_M2_hmmpyl_rs1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_hmmpyl_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_hmmpyh_rs1,SI_ftype_SISI,2) -// -def int_hexagon_M2_hmmpyh_rs1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_hmmpyh_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_hmmpyl_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_hmmpyl_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_hmmpyl_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_hmmpyh_s1,SI_ftype_SISI,2) -// -def int_hexagon_M2_hmmpyh_s1 : -Hexagon_si_sisi_Intrinsic<"HEXAGON_M2_hmmpyh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmaculs_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmaculs_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmaculs_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmaculs_s1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmaculs_s1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmaculs_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmacuhs_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmacuhs_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmacuhs_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmacuhs_s1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmacuhs_s1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmacuhs_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyul_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyul_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyul_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyul_s1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyul_s1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyul_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyuh_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyuh_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyuh_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyuh_s1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyuh_s1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyuh_s1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmaculs_rs0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmaculs_rs0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmaculs_rs0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmaculs_rs1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmaculs_rs1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmaculs_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmacuhs_rs0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmacuhs_rs0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmacuhs_rs0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmacuhs_rs1,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_mmacuhs_rs1 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_mmacuhs_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyul_rs0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyul_rs0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyul_rs0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyul_rs1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyul_rs1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyul_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyuh_rs0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyuh_rs0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyuh_rs0">; -// -// BUILTIN_INFO(HEXAGON.M2_mmpyuh_rs1,DI_ftype_DIDI,2) -// -def int_hexagon_M2_mmpyuh_rs1 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_mmpyuh_rs1">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmaci_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vrcmaci_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vrcmaci_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmacr_s0,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vrcmacr_s0 : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vrcmacr_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmaci_s0c,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vrcmaci_s0c : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vrcmaci_s0c">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmacr_s0c,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vrcmacr_s0c : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vrcmacr_s0c">; -// -// BUILTIN_INFO(HEXAGON.M2_cmaci_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cmaci_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cmaci_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cmacr_s0,DI_ftype_DISISI,3) -// -def int_hexagon_M2_cmacr_s0 : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M2_cmacr_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmpyi_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vrcmpyi_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vrcmpyi_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmpyr_s0,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vrcmpyr_s0 : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vrcmpyr_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmpyi_s0c,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vrcmpyi_s0c : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vrcmpyi_s0c">; -// -// BUILTIN_INFO(HEXAGON.M2_vrcmpyr_s0c,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vrcmpyr_s0c : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vrcmpyr_s0c">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpyi_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_cmpyi_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_cmpyi_s0">; -// -// BUILTIN_INFO(HEXAGON.M2_cmpyr_s0,DI_ftype_SISI,2) -// -def int_hexagon_M2_cmpyr_s0 : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M2_cmpyr_s0">; -// -// BUILTIN_INFO(HEXAGON.M4_cmpyi_wh,SI_ftype_DISI,2) -// -def int_hexagon_M4_cmpyi_wh : -Hexagon_si_disi_Intrinsic<"HEXAGON_M4_cmpyi_wh">; -// -// BUILTIN_INFO(HEXAGON.M4_cmpyr_wh,SI_ftype_DISI,2) -// -def int_hexagon_M4_cmpyr_wh : -Hexagon_si_disi_Intrinsic<"HEXAGON_M4_cmpyr_wh">; -// -// BUILTIN_INFO(HEXAGON.M4_cmpyi_whc,SI_ftype_DISI,2) -// -def int_hexagon_M4_cmpyi_whc : -Hexagon_si_disi_Intrinsic<"HEXAGON_M4_cmpyi_whc">; -// -// BUILTIN_INFO(HEXAGON.M4_cmpyr_whc,SI_ftype_DISI,2) -// -def int_hexagon_M4_cmpyr_whc : -Hexagon_si_disi_Intrinsic<"HEXAGON_M4_cmpyr_whc">; -// -// BUILTIN_INFO(HEXAGON.M2_vcmpy_s0_sat_i,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vcmpy_s0_sat_i : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vcmpy_s0_sat_i">; -// -// BUILTIN_INFO(HEXAGON.M2_vcmpy_s0_sat_r,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vcmpy_s0_sat_r : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vcmpy_s0_sat_r">; -// -// BUILTIN_INFO(HEXAGON.M2_vcmpy_s1_sat_i,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vcmpy_s1_sat_i : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vcmpy_s1_sat_i">; -// -// BUILTIN_INFO(HEXAGON.M2_vcmpy_s1_sat_r,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vcmpy_s1_sat_r : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vcmpy_s1_sat_r">; -// -// BUILTIN_INFO(HEXAGON.M2_vcmac_s0_sat_i,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vcmac_s0_sat_i : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vcmac_s0_sat_i">; -// -// BUILTIN_INFO(HEXAGON.M2_vcmac_s0_sat_r,DI_ftype_DIDIDI,3) -// -def int_hexagon_M2_vcmac_s0_sat_r : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M2_vcmac_s0_sat_r">; -// -// BUILTIN_INFO(HEXAGON.S2_vcrotate,DI_ftype_DISI,2) -// -def int_hexagon_S2_vcrotate : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_vcrotate">; -// -// BUILTIN_INFO(HEXAGON.S4_vrcrotate_acc,DI_ftype_DIDISISI,4) -// -def int_hexagon_S4_vrcrotate_acc : -Hexagon_di_didisisi_Intrinsic<"HEXAGON_S4_vrcrotate_acc">; -// -// BUILTIN_INFO(HEXAGON.S4_vrcrotate,DI_ftype_DISISI,3) -// -def int_hexagon_S4_vrcrotate : -Hexagon_di_disisi_Intrinsic<"HEXAGON_S4_vrcrotate">; -// -// BUILTIN_INFO(HEXAGON.S2_vcnegh,DI_ftype_DISI,2) -// -def int_hexagon_S2_vcnegh : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_vcnegh">; -// -// BUILTIN_INFO(HEXAGON.S2_vrcnegh,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_vrcnegh : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_vrcnegh">; -// -// BUILTIN_INFO(HEXAGON.M4_pmpyw,DI_ftype_SISI,2) -// -def int_hexagon_M4_pmpyw : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M4_pmpyw">; -// -// BUILTIN_INFO(HEXAGON.M4_vpmpyh,DI_ftype_SISI,2) -// -def int_hexagon_M4_vpmpyh : -Hexagon_di_sisi_Intrinsic<"HEXAGON_M4_vpmpyh">; -// -// BUILTIN_INFO(HEXAGON.M4_pmpyw_acc,DI_ftype_DISISI,3) -// -def int_hexagon_M4_pmpyw_acc : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M4_pmpyw_acc">; -// -// BUILTIN_INFO(HEXAGON.M4_vpmpyh_acc,DI_ftype_DISISI,3) -// -def int_hexagon_M4_vpmpyh_acc : -Hexagon_di_disisi_Intrinsic<"HEXAGON_M4_vpmpyh_acc">; -// -// BUILTIN_INFO(HEXAGON.A2_add,SI_ftype_SISI,2) -// -def int_hexagon_A2_add : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_add">; -// -// BUILTIN_INFO(HEXAGON.A2_sub,SI_ftype_SISI,2) -// -def int_hexagon_A2_sub : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_sub">; -// -// BUILTIN_INFO(HEXAGON.A2_addsat,SI_ftype_SISI,2) -// -def int_hexagon_A2_addsat : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addsat">; -// -// BUILTIN_INFO(HEXAGON.A2_subsat,SI_ftype_SISI,2) -// -def int_hexagon_A2_subsat : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subsat">; -// -// BUILTIN_INFO(HEXAGON.A2_addi,SI_ftype_SISI,2) -// -def int_hexagon_A2_addi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addi">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_l16_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_l16_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_l16_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_l16_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_l16_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_l16_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_l16_sat_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_l16_sat_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_l16_sat_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_l16_sat_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_l16_sat_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_l16_sat_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_l16_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_l16_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_l16_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_l16_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_l16_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_l16_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_l16_sat_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_l16_sat_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_l16_sat_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_l16_sat_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_l16_sat_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_l16_sat_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_h16_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_h16_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_h16_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_h16_lh,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_h16_lh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_h16_lh">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_h16_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_h16_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_h16_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_h16_hh,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_h16_hh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_h16_hh">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_h16_sat_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_h16_sat_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_h16_sat_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_h16_sat_lh,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_h16_sat_lh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_h16_sat_lh">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_h16_sat_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_h16_sat_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_h16_sat_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_addh_h16_sat_hh,SI_ftype_SISI,2) -// -def int_hexagon_A2_addh_h16_sat_hh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_addh_h16_sat_hh">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_h16_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_h16_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_h16_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_h16_lh,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_h16_lh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_h16_lh">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_h16_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_h16_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_h16_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_h16_hh,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_h16_hh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_h16_hh">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_h16_sat_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_h16_sat_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_h16_sat_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_h16_sat_lh,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_h16_sat_lh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_h16_sat_lh">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_h16_sat_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_h16_sat_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_h16_sat_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_subh_h16_sat_hh,SI_ftype_SISI,2) -// -def int_hexagon_A2_subh_h16_sat_hh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subh_h16_sat_hh">; -// -// BUILTIN_INFO(HEXAGON.A2_aslh,SI_ftype_SI,1) -// -def int_hexagon_A2_aslh : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_aslh">; -// -// BUILTIN_INFO(HEXAGON.A2_asrh,SI_ftype_SI,1) -// -def int_hexagon_A2_asrh : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_asrh">; -// -// BUILTIN_INFO(HEXAGON.A2_addp,DI_ftype_DIDI,2) -// -def int_hexagon_A2_addp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_addp">; -// -// BUILTIN_INFO(HEXAGON.A2_addpsat,DI_ftype_DIDI,2) -// -def int_hexagon_A2_addpsat : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_addpsat">; -// -// BUILTIN_INFO(HEXAGON.A2_addsp,DI_ftype_SIDI,2) -// -def int_hexagon_A2_addsp : -Hexagon_di_sidi_Intrinsic<"HEXAGON_A2_addsp">; -// -// BUILTIN_INFO(HEXAGON.A2_subp,DI_ftype_DIDI,2) -// -def int_hexagon_A2_subp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_subp">; -// -// BUILTIN_INFO(HEXAGON.A2_neg,SI_ftype_SI,1) -// -def int_hexagon_A2_neg : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_neg">; -// -// BUILTIN_INFO(HEXAGON.A2_negsat,SI_ftype_SI,1) -// -def int_hexagon_A2_negsat : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_negsat">; -// -// BUILTIN_INFO(HEXAGON.A2_abs,SI_ftype_SI,1) -// -def int_hexagon_A2_abs : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_abs">; -// -// BUILTIN_INFO(HEXAGON.A2_abssat,SI_ftype_SI,1) -// -def int_hexagon_A2_abssat : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_abssat">; -// -// BUILTIN_INFO(HEXAGON.A2_vconj,DI_ftype_DI,1) -// -def int_hexagon_A2_vconj : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_vconj">; -// -// BUILTIN_INFO(HEXAGON.A2_negp,DI_ftype_DI,1) -// -def int_hexagon_A2_negp : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_negp">; -// -// BUILTIN_INFO(HEXAGON.A2_absp,DI_ftype_DI,1) -// -def int_hexagon_A2_absp : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_absp">; -// -// BUILTIN_INFO(HEXAGON.A2_max,SI_ftype_SISI,2) -// -def int_hexagon_A2_max : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_max">; -// -// BUILTIN_INFO(HEXAGON.A2_maxu,USI_ftype_SISI,2) -// -def int_hexagon_A2_maxu : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_maxu">; -// -// BUILTIN_INFO(HEXAGON.A2_min,SI_ftype_SISI,2) -// -def int_hexagon_A2_min : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_min">; -// -// BUILTIN_INFO(HEXAGON.A2_minu,USI_ftype_SISI,2) -// -def int_hexagon_A2_minu : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_minu">; -// -// BUILTIN_INFO(HEXAGON.A2_maxp,DI_ftype_DIDI,2) -// -def int_hexagon_A2_maxp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_maxp">; -// -// BUILTIN_INFO(HEXAGON.A2_maxup,UDI_ftype_DIDI,2) -// -def int_hexagon_A2_maxup : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_maxup">; -// -// BUILTIN_INFO(HEXAGON.A2_minp,DI_ftype_DIDI,2) -// -def int_hexagon_A2_minp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_minp">; -// -// BUILTIN_INFO(HEXAGON.A2_minup,UDI_ftype_DIDI,2) -// -def int_hexagon_A2_minup : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_minup">; -// -// BUILTIN_INFO(HEXAGON.A2_tfr,SI_ftype_SI,1) -// -def int_hexagon_A2_tfr : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_tfr">; -// -// BUILTIN_INFO(HEXAGON.A2_tfrsi,SI_ftype_SI,1) -// -def int_hexagon_A2_tfrsi : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_tfrsi">; -// -// BUILTIN_INFO(HEXAGON.A2_tfrp,DI_ftype_DI,1) -// -def int_hexagon_A2_tfrp : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_tfrp">; -// -// BUILTIN_INFO(HEXAGON.A2_tfrpi,DI_ftype_SI,1) -// -def int_hexagon_A2_tfrpi : -Hexagon_di_si_Intrinsic<"HEXAGON_A2_tfrpi">; -// -// BUILTIN_INFO(HEXAGON.A2_zxtb,SI_ftype_SI,1) -// -def int_hexagon_A2_zxtb : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_zxtb">; -// -// BUILTIN_INFO(HEXAGON.A2_sxtb,SI_ftype_SI,1) -// -def int_hexagon_A2_sxtb : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_sxtb">; -// -// BUILTIN_INFO(HEXAGON.A2_zxth,SI_ftype_SI,1) -// -def int_hexagon_A2_zxth : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_zxth">; -// -// BUILTIN_INFO(HEXAGON.A2_sxth,SI_ftype_SI,1) -// -def int_hexagon_A2_sxth : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_sxth">; -// -// BUILTIN_INFO(HEXAGON.A2_combinew,DI_ftype_SISI,2) -// -def int_hexagon_A2_combinew : -Hexagon_di_sisi_Intrinsic<"HEXAGON_A2_combinew">; -// -// BUILTIN_INFO(HEXAGON.A4_combineri,DI_ftype_SISI,2) -// -def int_hexagon_A4_combineri : -Hexagon_di_sisi_Intrinsic<"HEXAGON_A4_combineri">; -// -// BUILTIN_INFO(HEXAGON.A4_combineir,DI_ftype_SISI,2) -// -def int_hexagon_A4_combineir : -Hexagon_di_sisi_Intrinsic<"HEXAGON_A4_combineir">; -// -// BUILTIN_INFO(HEXAGON.A2_combineii,DI_ftype_SISI,2) -// -def int_hexagon_A2_combineii : -Hexagon_di_sisi_Intrinsic<"HEXAGON_A2_combineii">; -// -// BUILTIN_INFO(HEXAGON.A2_combine_hh,SI_ftype_SISI,2) -// -def int_hexagon_A2_combine_hh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_combine_hh">; -// -// BUILTIN_INFO(HEXAGON.A2_combine_hl,SI_ftype_SISI,2) -// -def int_hexagon_A2_combine_hl : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_combine_hl">; -// -// BUILTIN_INFO(HEXAGON.A2_combine_lh,SI_ftype_SISI,2) -// -def int_hexagon_A2_combine_lh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_combine_lh">; -// -// BUILTIN_INFO(HEXAGON.A2_combine_ll,SI_ftype_SISI,2) -// -def int_hexagon_A2_combine_ll : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_combine_ll">; -// -// BUILTIN_INFO(HEXAGON.A2_tfril,SI_ftype_SISI,2) -// -def int_hexagon_A2_tfril : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_tfril">; -// -// BUILTIN_INFO(HEXAGON.A2_tfrih,SI_ftype_SISI,2) -// -def int_hexagon_A2_tfrih : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_tfrih">; -// -// BUILTIN_INFO(HEXAGON.A2_and,SI_ftype_SISI,2) -// -def int_hexagon_A2_and : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_and">; -// -// BUILTIN_INFO(HEXAGON.A2_or,SI_ftype_SISI,2) -// -def int_hexagon_A2_or : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_or">; -// -// BUILTIN_INFO(HEXAGON.A2_xor,SI_ftype_SISI,2) -// -def int_hexagon_A2_xor : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_xor">; -// -// BUILTIN_INFO(HEXAGON.A2_not,SI_ftype_SI,1) -// -def int_hexagon_A2_not : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_not">; -// -// BUILTIN_INFO(HEXAGON.M2_xor_xacc,SI_ftype_SISISI,3) -// -def int_hexagon_M2_xor_xacc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M2_xor_xacc">; -// -// BUILTIN_INFO(HEXAGON.M4_xor_xacc,DI_ftype_DIDIDI,3) -// -def int_hexagon_M4_xor_xacc : -Hexagon_di_dididi_Intrinsic<"HEXAGON_M4_xor_xacc">; -// -// BUILTIN_INFO(HEXAGON.A4_andn,SI_ftype_SISI,2) -// -def int_hexagon_A4_andn : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_andn">; -// -// BUILTIN_INFO(HEXAGON.A4_orn,SI_ftype_SISI,2) -// -def int_hexagon_A4_orn : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_orn">; -// -// BUILTIN_INFO(HEXAGON.A4_andnp,DI_ftype_DIDI,2) -// -def int_hexagon_A4_andnp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A4_andnp">; -// -// BUILTIN_INFO(HEXAGON.A4_ornp,DI_ftype_DIDI,2) -// -def int_hexagon_A4_ornp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A4_ornp">; -// -// BUILTIN_INFO(HEXAGON.S4_addaddi,SI_ftype_SISISI,3) -// -def int_hexagon_S4_addaddi : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_addaddi">; -// -// BUILTIN_INFO(HEXAGON.S4_subaddi,SI_ftype_SISISI,3) -// -def int_hexagon_S4_subaddi : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_subaddi">; -// -// BUILTIN_INFO(HEXAGON.M4_and_and,SI_ftype_SISISI,3) -// -def int_hexagon_M4_and_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_and_and">; -// -// BUILTIN_INFO(HEXAGON.M4_and_andn,SI_ftype_SISISI,3) -// -def int_hexagon_M4_and_andn : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_and_andn">; -// -// BUILTIN_INFO(HEXAGON.M4_and_or,SI_ftype_SISISI,3) -// -def int_hexagon_M4_and_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_and_or">; -// -// BUILTIN_INFO(HEXAGON.M4_and_xor,SI_ftype_SISISI,3) -// -def int_hexagon_M4_and_xor : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_and_xor">; -// -// BUILTIN_INFO(HEXAGON.M4_or_and,SI_ftype_SISISI,3) -// -def int_hexagon_M4_or_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_or_and">; -// -// BUILTIN_INFO(HEXAGON.M4_or_andn,SI_ftype_SISISI,3) -// -def int_hexagon_M4_or_andn : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_or_andn">; -// -// BUILTIN_INFO(HEXAGON.M4_or_or,SI_ftype_SISISI,3) -// -def int_hexagon_M4_or_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_or_or">; -// -// BUILTIN_INFO(HEXAGON.M4_or_xor,SI_ftype_SISISI,3) -// -def int_hexagon_M4_or_xor : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_or_xor">; -// -// BUILTIN_INFO(HEXAGON.S4_or_andix,SI_ftype_SISISI,3) -// -def int_hexagon_S4_or_andix : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_or_andix">; -// -// BUILTIN_INFO(HEXAGON.S4_or_andi,SI_ftype_SISISI,3) -// -def int_hexagon_S4_or_andi : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_or_andi">; -// -// BUILTIN_INFO(HEXAGON.S4_or_ori,SI_ftype_SISISI,3) -// -def int_hexagon_S4_or_ori : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_or_ori">; -// -// BUILTIN_INFO(HEXAGON.M4_xor_and,SI_ftype_SISISI,3) -// -def int_hexagon_M4_xor_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_xor_and">; -// -// BUILTIN_INFO(HEXAGON.M4_xor_or,SI_ftype_SISISI,3) -// -def int_hexagon_M4_xor_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_xor_or">; -// -// BUILTIN_INFO(HEXAGON.M4_xor_andn,SI_ftype_SISISI,3) -// -def int_hexagon_M4_xor_andn : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_M4_xor_andn">; -// -// BUILTIN_INFO(HEXAGON.A2_subri,SI_ftype_SISI,2) -// -def int_hexagon_A2_subri : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_subri">; -// -// BUILTIN_INFO(HEXAGON.A2_andir,SI_ftype_SISI,2) -// -def int_hexagon_A2_andir : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_andir">; -// -// BUILTIN_INFO(HEXAGON.A2_orir,SI_ftype_SISI,2) -// -def int_hexagon_A2_orir : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_orir">; -// -// BUILTIN_INFO(HEXAGON.A2_andp,DI_ftype_DIDI,2) -// -def int_hexagon_A2_andp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_andp">; -// -// BUILTIN_INFO(HEXAGON.A2_orp,DI_ftype_DIDI,2) -// -def int_hexagon_A2_orp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_orp">; -// -// BUILTIN_INFO(HEXAGON.A2_xorp,DI_ftype_DIDI,2) -// -def int_hexagon_A2_xorp : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_xorp">; -// -// BUILTIN_INFO(HEXAGON.A2_notp,DI_ftype_DI,1) -// -def int_hexagon_A2_notp : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_notp">; -// -// BUILTIN_INFO(HEXAGON.A2_sxtw,DI_ftype_SI,1) -// -def int_hexagon_A2_sxtw : -Hexagon_di_si_Intrinsic<"HEXAGON_A2_sxtw">; -// -// BUILTIN_INFO(HEXAGON.A2_sat,SI_ftype_DI,1) -// -def int_hexagon_A2_sat : -Hexagon_si_di_Intrinsic<"HEXAGON_A2_sat">; -// -// BUILTIN_INFO(HEXAGON.A2_roundsat,SI_ftype_DI,1) -// -def int_hexagon_A2_roundsat : -Hexagon_si_di_Intrinsic<"HEXAGON_A2_roundsat">; -// -// BUILTIN_INFO(HEXAGON.A2_sath,SI_ftype_SI,1) -// -def int_hexagon_A2_sath : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_sath">; -// -// BUILTIN_INFO(HEXAGON.A2_satuh,SI_ftype_SI,1) -// -def int_hexagon_A2_satuh : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_satuh">; -// -// BUILTIN_INFO(HEXAGON.A2_satub,SI_ftype_SI,1) -// -def int_hexagon_A2_satub : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_satub">; -// -// BUILTIN_INFO(HEXAGON.A2_satb,SI_ftype_SI,1) -// -def int_hexagon_A2_satb : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_satb">; -// -// BUILTIN_INFO(HEXAGON.A2_vaddub,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vaddub : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vaddub">; -// -// BUILTIN_INFO(HEXAGON.A2_vaddb_map,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vaddb_map : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vaddb_map">; -// -// BUILTIN_INFO(HEXAGON.A2_vaddubs,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vaddubs : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vaddubs">; -// -// BUILTIN_INFO(HEXAGON.A2_vaddh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vaddh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vaddh">; -// -// BUILTIN_INFO(HEXAGON.A2_vaddhs,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vaddhs : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vaddhs">; -// -// BUILTIN_INFO(HEXAGON.A2_vadduhs,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vadduhs : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vadduhs">; -// -// BUILTIN_INFO(HEXAGON.A5_vaddhubs,SI_ftype_DIDI,2) -// -def int_hexagon_A5_vaddhubs : -Hexagon_si_didi_Intrinsic<"HEXAGON_A5_vaddhubs">; -// -// BUILTIN_INFO(HEXAGON.A2_vaddw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vaddw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vaddw">; -// -// BUILTIN_INFO(HEXAGON.A2_vaddws,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vaddws : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vaddws">; -// -// BUILTIN_INFO(HEXAGON.S4_vxaddsubw,DI_ftype_DIDI,2) -// -def int_hexagon_S4_vxaddsubw : -Hexagon_di_didi_Intrinsic<"HEXAGON_S4_vxaddsubw">; -// -// BUILTIN_INFO(HEXAGON.S4_vxsubaddw,DI_ftype_DIDI,2) -// -def int_hexagon_S4_vxsubaddw : -Hexagon_di_didi_Intrinsic<"HEXAGON_S4_vxsubaddw">; -// -// BUILTIN_INFO(HEXAGON.S4_vxaddsubh,DI_ftype_DIDI,2) -// -def int_hexagon_S4_vxaddsubh : -Hexagon_di_didi_Intrinsic<"HEXAGON_S4_vxaddsubh">; -// -// BUILTIN_INFO(HEXAGON.S4_vxsubaddh,DI_ftype_DIDI,2) -// -def int_hexagon_S4_vxsubaddh : -Hexagon_di_didi_Intrinsic<"HEXAGON_S4_vxsubaddh">; -// -// BUILTIN_INFO(HEXAGON.S4_vxaddsubhr,DI_ftype_DIDI,2) -// -def int_hexagon_S4_vxaddsubhr : -Hexagon_di_didi_Intrinsic<"HEXAGON_S4_vxaddsubhr">; -// -// BUILTIN_INFO(HEXAGON.S4_vxsubaddhr,DI_ftype_DIDI,2) -// -def int_hexagon_S4_vxsubaddhr : -Hexagon_di_didi_Intrinsic<"HEXAGON_S4_vxsubaddhr">; -// -// BUILTIN_INFO(HEXAGON.A2_svavgh,SI_ftype_SISI,2) -// -def int_hexagon_A2_svavgh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svavgh">; -// -// BUILTIN_INFO(HEXAGON.A2_svavghs,SI_ftype_SISI,2) -// -def int_hexagon_A2_svavghs : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svavghs">; -// -// BUILTIN_INFO(HEXAGON.A2_svnavgh,SI_ftype_SISI,2) -// -def int_hexagon_A2_svnavgh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svnavgh">; -// -// BUILTIN_INFO(HEXAGON.A2_svaddh,SI_ftype_SISI,2) -// -def int_hexagon_A2_svaddh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svaddh">; -// -// BUILTIN_INFO(HEXAGON.A2_svaddhs,SI_ftype_SISI,2) -// -def int_hexagon_A2_svaddhs : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svaddhs">; -// -// BUILTIN_INFO(HEXAGON.A2_svadduhs,SI_ftype_SISI,2) -// -def int_hexagon_A2_svadduhs : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svadduhs">; -// -// BUILTIN_INFO(HEXAGON.A2_svsubh,SI_ftype_SISI,2) -// -def int_hexagon_A2_svsubh : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svsubh">; -// -// BUILTIN_INFO(HEXAGON.A2_svsubhs,SI_ftype_SISI,2) -// -def int_hexagon_A2_svsubhs : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svsubhs">; -// -// BUILTIN_INFO(HEXAGON.A2_svsubuhs,SI_ftype_SISI,2) -// -def int_hexagon_A2_svsubuhs : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A2_svsubuhs">; -// -// BUILTIN_INFO(HEXAGON.A2_vraddub,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vraddub : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vraddub">; -// -// BUILTIN_INFO(HEXAGON.A2_vraddub_acc,DI_ftype_DIDIDI,3) -// -def int_hexagon_A2_vraddub_acc : -Hexagon_di_dididi_Intrinsic<"HEXAGON_A2_vraddub_acc">; -// -// BUILTIN_INFO(HEXAGON.M2_vraddh,SI_ftype_DIDI,2) -// -def int_hexagon_M2_vraddh : -Hexagon_si_didi_Intrinsic<"HEXAGON_M2_vraddh">; -// -// BUILTIN_INFO(HEXAGON.M2_vradduh,SI_ftype_DIDI,2) -// -def int_hexagon_M2_vradduh : -Hexagon_si_didi_Intrinsic<"HEXAGON_M2_vradduh">; -// -// BUILTIN_INFO(HEXAGON.A2_vsubub,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vsubub : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vsubub">; -// -// BUILTIN_INFO(HEXAGON.A2_vsubb_map,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vsubb_map : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vsubb_map">; -// -// BUILTIN_INFO(HEXAGON.A2_vsububs,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vsububs : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vsububs">; -// -// BUILTIN_INFO(HEXAGON.A2_vsubh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vsubh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vsubh">; -// -// BUILTIN_INFO(HEXAGON.A2_vsubhs,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vsubhs : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vsubhs">; -// -// BUILTIN_INFO(HEXAGON.A2_vsubuhs,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vsubuhs : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vsubuhs">; -// -// BUILTIN_INFO(HEXAGON.A2_vsubw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vsubw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vsubw">; -// -// BUILTIN_INFO(HEXAGON.A2_vsubws,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vsubws : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vsubws">; -// -// BUILTIN_INFO(HEXAGON.A2_vabsh,DI_ftype_DI,1) -// -def int_hexagon_A2_vabsh : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_vabsh">; -// -// BUILTIN_INFO(HEXAGON.A2_vabshsat,DI_ftype_DI,1) -// -def int_hexagon_A2_vabshsat : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_vabshsat">; -// -// BUILTIN_INFO(HEXAGON.A2_vabsw,DI_ftype_DI,1) -// -def int_hexagon_A2_vabsw : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_vabsw">; -// -// BUILTIN_INFO(HEXAGON.A2_vabswsat,DI_ftype_DI,1) -// -def int_hexagon_A2_vabswsat : -Hexagon_di_di_Intrinsic<"HEXAGON_A2_vabswsat">; -// -// BUILTIN_INFO(HEXAGON.M2_vabsdiffw,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vabsdiffw : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vabsdiffw">; -// -// BUILTIN_INFO(HEXAGON.M2_vabsdiffh,DI_ftype_DIDI,2) -// -def int_hexagon_M2_vabsdiffh : -Hexagon_di_didi_Intrinsic<"HEXAGON_M2_vabsdiffh">; -// -// BUILTIN_INFO(HEXAGON.A2_vrsadub,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vrsadub : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vrsadub">; -// -// BUILTIN_INFO(HEXAGON.A2_vrsadub_acc,DI_ftype_DIDIDI,3) -// -def int_hexagon_A2_vrsadub_acc : -Hexagon_di_dididi_Intrinsic<"HEXAGON_A2_vrsadub_acc">; -// -// BUILTIN_INFO(HEXAGON.A2_vavgub,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavgub : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavgub">; -// -// BUILTIN_INFO(HEXAGON.A2_vavguh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavguh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavguh">; -// -// BUILTIN_INFO(HEXAGON.A2_vavgh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavgh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavgh">; -// -// BUILTIN_INFO(HEXAGON.A2_vnavgh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vnavgh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vnavgh">; -// -// BUILTIN_INFO(HEXAGON.A2_vavgw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavgw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavgw">; -// -// BUILTIN_INFO(HEXAGON.A2_vnavgw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vnavgw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vnavgw">; -// -// BUILTIN_INFO(HEXAGON.A2_vavgwr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavgwr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavgwr">; -// -// BUILTIN_INFO(HEXAGON.A2_vnavgwr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vnavgwr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vnavgwr">; -// -// BUILTIN_INFO(HEXAGON.A2_vavgwcr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavgwcr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavgwcr">; -// -// BUILTIN_INFO(HEXAGON.A2_vnavgwcr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vnavgwcr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vnavgwcr">; -// -// BUILTIN_INFO(HEXAGON.A2_vavghcr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavghcr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavghcr">; -// -// BUILTIN_INFO(HEXAGON.A2_vnavghcr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vnavghcr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vnavghcr">; -// -// BUILTIN_INFO(HEXAGON.A2_vavguw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavguw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavguw">; -// -// BUILTIN_INFO(HEXAGON.A2_vavguwr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavguwr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavguwr">; -// -// BUILTIN_INFO(HEXAGON.A2_vavgubr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavgubr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavgubr">; -// -// BUILTIN_INFO(HEXAGON.A2_vavguhr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavguhr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavguhr">; -// -// BUILTIN_INFO(HEXAGON.A2_vavghr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vavghr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vavghr">; -// -// BUILTIN_INFO(HEXAGON.A2_vnavghr,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vnavghr : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vnavghr">; -// -// BUILTIN_INFO(HEXAGON.A4_round_ri,SI_ftype_SISI,2) -// -def int_hexagon_A4_round_ri : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_round_ri">; -// -// BUILTIN_INFO(HEXAGON.A4_round_rr,SI_ftype_SISI,2) -// -def int_hexagon_A4_round_rr : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_round_rr">; -// -// BUILTIN_INFO(HEXAGON.A4_round_ri_sat,SI_ftype_SISI,2) -// -def int_hexagon_A4_round_ri_sat : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_round_ri_sat">; -// -// BUILTIN_INFO(HEXAGON.A4_round_rr_sat,SI_ftype_SISI,2) -// -def int_hexagon_A4_round_rr_sat : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_round_rr_sat">; -// -// BUILTIN_INFO(HEXAGON.A4_cround_ri,SI_ftype_SISI,2) -// -def int_hexagon_A4_cround_ri : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cround_ri">; -// -// BUILTIN_INFO(HEXAGON.A4_cround_rr,SI_ftype_SISI,2) -// -def int_hexagon_A4_cround_rr : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_cround_rr">; -// -// BUILTIN_INFO(HEXAGON.A4_vrminh,DI_ftype_DIDISI,3) -// -def int_hexagon_A4_vrminh : -Hexagon_di_didisi_Intrinsic<"HEXAGON_A4_vrminh">; -// -// BUILTIN_INFO(HEXAGON.A4_vrmaxh,DI_ftype_DIDISI,3) -// -def int_hexagon_A4_vrmaxh : -Hexagon_di_didisi_Intrinsic<"HEXAGON_A4_vrmaxh">; -// -// BUILTIN_INFO(HEXAGON.A4_vrminuh,DI_ftype_DIDISI,3) -// -def int_hexagon_A4_vrminuh : -Hexagon_di_didisi_Intrinsic<"HEXAGON_A4_vrminuh">; -// -// BUILTIN_INFO(HEXAGON.A4_vrmaxuh,DI_ftype_DIDISI,3) -// -def int_hexagon_A4_vrmaxuh : -Hexagon_di_didisi_Intrinsic<"HEXAGON_A4_vrmaxuh">; -// -// BUILTIN_INFO(HEXAGON.A4_vrminw,DI_ftype_DIDISI,3) -// -def int_hexagon_A4_vrminw : -Hexagon_di_didisi_Intrinsic<"HEXAGON_A4_vrminw">; -// -// BUILTIN_INFO(HEXAGON.A4_vrmaxw,DI_ftype_DIDISI,3) -// -def int_hexagon_A4_vrmaxw : -Hexagon_di_didisi_Intrinsic<"HEXAGON_A4_vrmaxw">; -// -// BUILTIN_INFO(HEXAGON.A4_vrminuw,DI_ftype_DIDISI,3) -// -def int_hexagon_A4_vrminuw : -Hexagon_di_didisi_Intrinsic<"HEXAGON_A4_vrminuw">; -// -// BUILTIN_INFO(HEXAGON.A4_vrmaxuw,DI_ftype_DIDISI,3) -// -def int_hexagon_A4_vrmaxuw : -Hexagon_di_didisi_Intrinsic<"HEXAGON_A4_vrmaxuw">; -// -// BUILTIN_INFO(HEXAGON.A2_vminb,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vminb : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vminb">; -// -// BUILTIN_INFO(HEXAGON.A2_vmaxb,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vmaxb : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vmaxb">; -// -// BUILTIN_INFO(HEXAGON.A2_vminub,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vminub : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vminub">; -// -// BUILTIN_INFO(HEXAGON.A2_vmaxub,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vmaxub : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vmaxub">; -// -// BUILTIN_INFO(HEXAGON.A2_vminh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vminh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vminh">; -// -// BUILTIN_INFO(HEXAGON.A2_vmaxh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vmaxh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vmaxh">; -// -// BUILTIN_INFO(HEXAGON.A2_vminuh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vminuh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vminuh">; -// -// BUILTIN_INFO(HEXAGON.A2_vmaxuh,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vmaxuh : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vmaxuh">; -// -// BUILTIN_INFO(HEXAGON.A2_vminw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vminw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vminw">; -// -// BUILTIN_INFO(HEXAGON.A2_vmaxw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vmaxw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vmaxw">; -// -// BUILTIN_INFO(HEXAGON.A2_vminuw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vminuw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vminuw">; -// -// BUILTIN_INFO(HEXAGON.A2_vmaxuw,DI_ftype_DIDI,2) -// -def int_hexagon_A2_vmaxuw : -Hexagon_di_didi_Intrinsic<"HEXAGON_A2_vmaxuw">; -// -// BUILTIN_INFO(HEXAGON.A4_modwrapu,SI_ftype_SISI,2) -// -def int_hexagon_A4_modwrapu : -Hexagon_si_sisi_Intrinsic<"HEXAGON_A4_modwrapu">; -// -// BUILTIN_INFO(HEXAGON.F2_sfadd,SF_ftype_SFSF,2) -// -def int_hexagon_F2_sfadd : -Hexagon_sf_sfsf_Intrinsic<"HEXAGON_F2_sfadd">; -// -// BUILTIN_INFO(HEXAGON.F2_sfsub,SF_ftype_SFSF,2) -// -def int_hexagon_F2_sfsub : -Hexagon_sf_sfsf_Intrinsic<"HEXAGON_F2_sfsub">; -// -// BUILTIN_INFO(HEXAGON.F2_sfmpy,SF_ftype_SFSF,2) -// -def int_hexagon_F2_sfmpy : -Hexagon_sf_sfsf_Intrinsic<"HEXAGON_F2_sfmpy">; -// -// BUILTIN_INFO(HEXAGON.F2_sffma,SF_ftype_SFSFSF,3) -// -def int_hexagon_F2_sffma : -Hexagon_sf_sfsfsf_Intrinsic<"HEXAGON_F2_sffma">; -// -// BUILTIN_INFO(HEXAGON.F2_sffma_sc,SF_ftype_SFSFSFQI,4) -// -def int_hexagon_F2_sffma_sc : -Hexagon_sf_sfsfsfqi_Intrinsic<"HEXAGON_F2_sffma_sc">; -// -// BUILTIN_INFO(HEXAGON.F2_sffms,SF_ftype_SFSFSF,3) -// -def int_hexagon_F2_sffms : -Hexagon_sf_sfsfsf_Intrinsic<"HEXAGON_F2_sffms">; -// -// BUILTIN_INFO(HEXAGON.F2_sffma_lib,SF_ftype_SFSFSF,3) -// -def int_hexagon_F2_sffma_lib : -Hexagon_sf_sfsfsf_Intrinsic<"HEXAGON_F2_sffma_lib">; -// -// BUILTIN_INFO(HEXAGON.F2_sffms_lib,SF_ftype_SFSFSF,3) -// -def int_hexagon_F2_sffms_lib : -Hexagon_sf_sfsfsf_Intrinsic<"HEXAGON_F2_sffms_lib">; -// -// BUILTIN_INFO(HEXAGON.F2_sfcmpeq,QI_ftype_SFSF,2) -// -def int_hexagon_F2_sfcmpeq : -Hexagon_si_sfsf_Intrinsic<"HEXAGON_F2_sfcmpeq">; -// -// BUILTIN_INFO(HEXAGON.F2_sfcmpgt,QI_ftype_SFSF,2) -// -def int_hexagon_F2_sfcmpgt : -Hexagon_si_sfsf_Intrinsic<"HEXAGON_F2_sfcmpgt">; -// -// BUILTIN_INFO(HEXAGON.F2_sfcmpge,QI_ftype_SFSF,2) -// -def int_hexagon_F2_sfcmpge : -Hexagon_si_sfsf_Intrinsic<"HEXAGON_F2_sfcmpge">; -// -// BUILTIN_INFO(HEXAGON.F2_sfcmpuo,QI_ftype_SFSF,2) -// -def int_hexagon_F2_sfcmpuo : -Hexagon_si_sfsf_Intrinsic<"HEXAGON_F2_sfcmpuo">; -// -// BUILTIN_INFO(HEXAGON.F2_sfmax,SF_ftype_SFSF,2) -// -def int_hexagon_F2_sfmax : -Hexagon_sf_sfsf_Intrinsic<"HEXAGON_F2_sfmax">; -// -// BUILTIN_INFO(HEXAGON.F2_sfmin,SF_ftype_SFSF,2) -// -def int_hexagon_F2_sfmin : -Hexagon_sf_sfsf_Intrinsic<"HEXAGON_F2_sfmin">; -// -// BUILTIN_INFO(HEXAGON.F2_sfclass,QI_ftype_SFSI,2) -// -def int_hexagon_F2_sfclass : -Hexagon_si_sfsi_Intrinsic<"HEXAGON_F2_sfclass">; -// -// BUILTIN_INFO(HEXAGON.F2_sfimm_p,SF_ftype_SI,1) -// -def int_hexagon_F2_sfimm_p : -Hexagon_sf_si_Intrinsic<"HEXAGON_F2_sfimm_p">; -// -// BUILTIN_INFO(HEXAGON.F2_sfimm_n,SF_ftype_SI,1) -// -def int_hexagon_F2_sfimm_n : -Hexagon_sf_si_Intrinsic<"HEXAGON_F2_sfimm_n">; -// -// BUILTIN_INFO(HEXAGON.F2_sffixupn,SF_ftype_SFSF,2) -// -def int_hexagon_F2_sffixupn : -Hexagon_sf_sfsf_Intrinsic<"HEXAGON_F2_sffixupn">; -// -// BUILTIN_INFO(HEXAGON.F2_sffixupd,SF_ftype_SFSF,2) -// -def int_hexagon_F2_sffixupd : -Hexagon_sf_sfsf_Intrinsic<"HEXAGON_F2_sffixupd">; -// -// BUILTIN_INFO(HEXAGON.F2_sffixupr,SF_ftype_SF,1) -// -def int_hexagon_F2_sffixupr : -Hexagon_sf_sf_Intrinsic<"HEXAGON_F2_sffixupr">; -// -// BUILTIN_INFO(HEXAGON.F2_dfcmpeq,QI_ftype_DFDF,2) -// -def int_hexagon_F2_dfcmpeq : -Hexagon_si_dfdf_Intrinsic<"HEXAGON_F2_dfcmpeq">; -// -// BUILTIN_INFO(HEXAGON.F2_dfcmpgt,QI_ftype_DFDF,2) -// -def int_hexagon_F2_dfcmpgt : -Hexagon_si_dfdf_Intrinsic<"HEXAGON_F2_dfcmpgt">; -// -// BUILTIN_INFO(HEXAGON.F2_dfcmpge,QI_ftype_DFDF,2) -// -def int_hexagon_F2_dfcmpge : -Hexagon_si_dfdf_Intrinsic<"HEXAGON_F2_dfcmpge">; -// -// BUILTIN_INFO(HEXAGON.F2_dfcmpuo,QI_ftype_DFDF,2) -// -def int_hexagon_F2_dfcmpuo : -Hexagon_si_dfdf_Intrinsic<"HEXAGON_F2_dfcmpuo">; -// -// BUILTIN_INFO(HEXAGON.F2_dfclass,QI_ftype_DFSI,2) -// -def int_hexagon_F2_dfclass : -Hexagon_si_dfsi_Intrinsic<"HEXAGON_F2_dfclass">; -// -// BUILTIN_INFO(HEXAGON.F2_dfimm_p,DF_ftype_SI,1) -// -def int_hexagon_F2_dfimm_p : -Hexagon_df_si_Intrinsic<"HEXAGON_F2_dfimm_p">; -// -// BUILTIN_INFO(HEXAGON.F2_dfimm_n,DF_ftype_SI,1) -// -def int_hexagon_F2_dfimm_n : -Hexagon_df_si_Intrinsic<"HEXAGON_F2_dfimm_n">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2df,DF_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2df : -Hexagon_df_sf_Intrinsic<"HEXAGON_F2_conv_sf2df">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2sf,SF_ftype_DF,1) -// -def int_hexagon_F2_conv_df2sf : -Hexagon_sf_df_Intrinsic<"HEXAGON_F2_conv_df2sf">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_uw2sf,SF_ftype_SI,1) -// -def int_hexagon_F2_conv_uw2sf : -Hexagon_sf_si_Intrinsic<"HEXAGON_F2_conv_uw2sf">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_uw2df,DF_ftype_SI,1) -// -def int_hexagon_F2_conv_uw2df : -Hexagon_df_si_Intrinsic<"HEXAGON_F2_conv_uw2df">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_w2sf,SF_ftype_SI,1) -// -def int_hexagon_F2_conv_w2sf : -Hexagon_sf_si_Intrinsic<"HEXAGON_F2_conv_w2sf">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_w2df,DF_ftype_SI,1) -// -def int_hexagon_F2_conv_w2df : -Hexagon_df_si_Intrinsic<"HEXAGON_F2_conv_w2df">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_ud2sf,SF_ftype_DI,1) -// -def int_hexagon_F2_conv_ud2sf : -Hexagon_sf_di_Intrinsic<"HEXAGON_F2_conv_ud2sf">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_ud2df,DF_ftype_DI,1) -// -def int_hexagon_F2_conv_ud2df : -Hexagon_df_di_Intrinsic<"HEXAGON_F2_conv_ud2df">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_d2sf,SF_ftype_DI,1) -// -def int_hexagon_F2_conv_d2sf : -Hexagon_sf_di_Intrinsic<"HEXAGON_F2_conv_d2sf">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_d2df,DF_ftype_DI,1) -// -def int_hexagon_F2_conv_d2df : -Hexagon_df_di_Intrinsic<"HEXAGON_F2_conv_d2df">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2uw,SI_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2uw : -Hexagon_si_sf_Intrinsic<"HEXAGON_F2_conv_sf2uw">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2w,SI_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2w : -Hexagon_si_sf_Intrinsic<"HEXAGON_F2_conv_sf2w">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2ud,DI_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2ud : -Hexagon_di_sf_Intrinsic<"HEXAGON_F2_conv_sf2ud">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2d,DI_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2d : -Hexagon_di_sf_Intrinsic<"HEXAGON_F2_conv_sf2d">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2uw,SI_ftype_DF,1) -// -def int_hexagon_F2_conv_df2uw : -Hexagon_si_df_Intrinsic<"HEXAGON_F2_conv_df2uw">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2w,SI_ftype_DF,1) -// -def int_hexagon_F2_conv_df2w : -Hexagon_si_df_Intrinsic<"HEXAGON_F2_conv_df2w">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2ud,DI_ftype_DF,1) -// -def int_hexagon_F2_conv_df2ud : -Hexagon_di_df_Intrinsic<"HEXAGON_F2_conv_df2ud">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2d,DI_ftype_DF,1) -// -def int_hexagon_F2_conv_df2d : -Hexagon_di_df_Intrinsic<"HEXAGON_F2_conv_df2d">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2uw_chop,SI_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2uw_chop : -Hexagon_si_sf_Intrinsic<"HEXAGON_F2_conv_sf2uw_chop">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2w_chop,SI_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2w_chop : -Hexagon_si_sf_Intrinsic<"HEXAGON_F2_conv_sf2w_chop">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2ud_chop,DI_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2ud_chop : -Hexagon_di_sf_Intrinsic<"HEXAGON_F2_conv_sf2ud_chop">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_sf2d_chop,DI_ftype_SF,1) -// -def int_hexagon_F2_conv_sf2d_chop : -Hexagon_di_sf_Intrinsic<"HEXAGON_F2_conv_sf2d_chop">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2uw_chop,SI_ftype_DF,1) -// -def int_hexagon_F2_conv_df2uw_chop : -Hexagon_si_df_Intrinsic<"HEXAGON_F2_conv_df2uw_chop">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2w_chop,SI_ftype_DF,1) -// -def int_hexagon_F2_conv_df2w_chop : -Hexagon_si_df_Intrinsic<"HEXAGON_F2_conv_df2w_chop">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2ud_chop,DI_ftype_DF,1) -// -def int_hexagon_F2_conv_df2ud_chop : -Hexagon_di_df_Intrinsic<"HEXAGON_F2_conv_df2ud_chop">; -// -// BUILTIN_INFO(HEXAGON.F2_conv_df2d_chop,DI_ftype_DF,1) -// -def int_hexagon_F2_conv_df2d_chop : -Hexagon_di_df_Intrinsic<"HEXAGON_F2_conv_df2d_chop">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_asr_r_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asr_r_r">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_asl_r_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asl_r_r">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_lsr_r_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_lsr_r_r">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_lsl_r_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_lsl_r_r">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_p,DI_ftype_DISI,2) -// -def int_hexagon_S2_asr_r_p : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asr_r_p">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_p,DI_ftype_DISI,2) -// -def int_hexagon_S2_asl_r_p : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asl_r_p">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_p,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsr_r_p : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsr_r_p">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_p,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsl_r_p : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsl_r_p">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_r_acc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asr_r_r_acc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asr_r_r_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_r_acc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_r_r_acc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_r_r_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_r_acc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_r_r_acc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_r_r_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_r_acc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsl_r_r_acc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsl_r_r_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_p_acc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_r_p_acc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_r_p_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_p_acc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_r_p_acc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_r_p_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_p_acc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_r_p_acc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_r_p_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_p_acc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsl_r_p_acc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsl_r_p_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_r_nac,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asr_r_r_nac : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asr_r_r_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_r_nac,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_r_r_nac : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_r_r_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_r_nac,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_r_r_nac : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_r_r_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_r_nac,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsl_r_r_nac : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsl_r_r_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_p_nac,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_r_p_nac : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_r_p_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_p_nac,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_r_p_nac : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_r_p_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_p_nac,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_r_p_nac : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_r_p_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_p_nac,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsl_r_p_nac : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsl_r_p_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_r_and,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asr_r_r_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asr_r_r_and">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_r_and,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_r_r_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_r_r_and">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_r_and,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_r_r_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_r_r_and">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_r_and,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsl_r_r_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsl_r_r_and">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_r_or,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asr_r_r_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asr_r_r_or">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_r_or,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_r_r_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_r_r_or">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_r_or,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_r_r_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_r_r_or">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_r_or,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsl_r_r_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsl_r_r_or">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_p_and,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_r_p_and : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_r_p_and">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_p_and,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_r_p_and : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_r_p_and">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_p_and,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_r_p_and : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_r_p_and">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_p_and,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsl_r_p_and : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsl_r_p_and">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_p_or,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_r_p_or : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_r_p_or">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_p_or,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_r_p_or : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_r_p_or">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_p_or,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_r_p_or : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_r_p_or">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_p_or,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsl_r_p_or : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsl_r_p_or">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_p_xor,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_r_p_xor : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_r_p_xor">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_p_xor,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_r_p_xor : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_r_p_xor">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_p_xor,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_r_p_xor : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_r_p_xor">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_p_xor,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsl_r_p_xor : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsl_r_p_xor">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_r_sat,SI_ftype_SISI,2) -// -def int_hexagon_S2_asr_r_r_sat : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asr_r_r_sat">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_r_sat,SI_ftype_SISI,2) -// -def int_hexagon_S2_asl_r_r_sat : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asl_r_r_sat">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_asr_i_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asr_i_r">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_lsr_i_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_lsr_i_r">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_asl_i_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asl_i_r">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_p,DI_ftype_DISI,2) -// -def int_hexagon_S2_asr_i_p : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asr_i_p">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_p,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsr_i_p : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsr_i_p">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_p,DI_ftype_DISI,2) -// -def int_hexagon_S2_asl_i_p : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asl_i_p">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_r_acc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asr_i_r_acc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asr_i_r_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_r_acc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_i_r_acc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_i_r_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_r_acc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_i_r_acc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_i_r_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_p_acc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_i_p_acc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_i_p_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_p_acc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_i_p_acc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_i_p_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_p_acc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_i_p_acc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_i_p_acc">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_r_nac,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asr_i_r_nac : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asr_i_r_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_r_nac,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_i_r_nac : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_i_r_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_r_nac,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_i_r_nac : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_i_r_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_p_nac,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_i_p_nac : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_i_p_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_p_nac,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_i_p_nac : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_i_p_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_p_nac,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_i_p_nac : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_i_p_nac">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_r_xacc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_i_r_xacc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_i_r_xacc">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_r_xacc,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_i_r_xacc : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_i_r_xacc">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_p_xacc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_i_p_xacc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_i_p_xacc">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_p_xacc,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_i_p_xacc : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_i_p_xacc">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_r_and,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asr_i_r_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asr_i_r_and">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_r_and,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_i_r_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_i_r_and">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_r_and,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_i_r_and : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_i_r_and">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_r_or,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asr_i_r_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asr_i_r_or">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_r_or,SI_ftype_SISISI,3) -// -def int_hexagon_S2_lsr_i_r_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_lsr_i_r_or">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_r_or,SI_ftype_SISISI,3) -// -def int_hexagon_S2_asl_i_r_or : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_asl_i_r_or">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_p_and,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_i_p_and : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_i_p_and">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_p_and,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_i_p_and : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_i_p_and">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_p_and,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_i_p_and : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_i_p_and">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_p_or,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asr_i_p_or : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asr_i_p_or">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_p_or,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_lsr_i_p_or : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_lsr_i_p_or">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_p_or,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_asl_i_p_or : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_asl_i_p_or">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_r_sat,SI_ftype_SISI,2) -// -def int_hexagon_S2_asl_i_r_sat : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asl_i_r_sat">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_r_rnd,SI_ftype_SISI,2) -// -def int_hexagon_S2_asr_i_r_rnd : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asr_i_r_rnd">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_r_rnd_goodsyntax,SI_ftype_SISI,2) -// -def int_hexagon_S2_asr_i_r_rnd_goodsyntax : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_asr_i_r_rnd_goodsyntax">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_p_rnd,DI_ftype_DISI,2) -// -def int_hexagon_S2_asr_i_p_rnd : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asr_i_p_rnd">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_p_rnd_goodsyntax,DI_ftype_DISI,2) -// -def int_hexagon_S2_asr_i_p_rnd_goodsyntax : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asr_i_p_rnd_goodsyntax">; -// -// BUILTIN_INFO(HEXAGON.S4_lsli,SI_ftype_SISI,2) -// -def int_hexagon_S4_lsli : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S4_lsli">; -// -// BUILTIN_INFO(HEXAGON.S2_addasl_rrri,SI_ftype_SISISI,3) -// -def int_hexagon_S2_addasl_rrri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_addasl_rrri">; -// -// BUILTIN_INFO(HEXAGON.S4_andi_asl_ri,SI_ftype_SISISI,3) -// -def int_hexagon_S4_andi_asl_ri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_andi_asl_ri">; -// -// BUILTIN_INFO(HEXAGON.S4_ori_asl_ri,SI_ftype_SISISI,3) -// -def int_hexagon_S4_ori_asl_ri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_ori_asl_ri">; -// -// BUILTIN_INFO(HEXAGON.S4_addi_asl_ri,SI_ftype_SISISI,3) -// -def int_hexagon_S4_addi_asl_ri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_addi_asl_ri">; -// -// BUILTIN_INFO(HEXAGON.S4_subi_asl_ri,SI_ftype_SISISI,3) -// -def int_hexagon_S4_subi_asl_ri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_subi_asl_ri">; -// -// BUILTIN_INFO(HEXAGON.S4_andi_lsr_ri,SI_ftype_SISISI,3) -// -def int_hexagon_S4_andi_lsr_ri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_andi_lsr_ri">; -// -// BUILTIN_INFO(HEXAGON.S4_ori_lsr_ri,SI_ftype_SISISI,3) -// -def int_hexagon_S4_ori_lsr_ri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_ori_lsr_ri">; -// -// BUILTIN_INFO(HEXAGON.S4_addi_lsr_ri,SI_ftype_SISISI,3) -// -def int_hexagon_S4_addi_lsr_ri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_addi_lsr_ri">; -// -// BUILTIN_INFO(HEXAGON.S4_subi_lsr_ri,SI_ftype_SISISI,3) -// -def int_hexagon_S4_subi_lsr_ri : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_subi_lsr_ri">; -// -// BUILTIN_INFO(HEXAGON.S2_valignib,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_valignib : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_valignib">; -// -// BUILTIN_INFO(HEXAGON.S2_valignrb,DI_ftype_DIDIQI,3) -// -def int_hexagon_S2_valignrb : -Hexagon_di_didiqi_Intrinsic<"HEXAGON_S2_valignrb">; -// -// BUILTIN_INFO(HEXAGON.S2_vspliceib,DI_ftype_DIDISI,3) -// -def int_hexagon_S2_vspliceib : -Hexagon_di_didisi_Intrinsic<"HEXAGON_S2_vspliceib">; -// -// BUILTIN_INFO(HEXAGON.S2_vsplicerb,DI_ftype_DIDIQI,3) -// -def int_hexagon_S2_vsplicerb : -Hexagon_di_didiqi_Intrinsic<"HEXAGON_S2_vsplicerb">; -// -// BUILTIN_INFO(HEXAGON.S2_vsplatrh,DI_ftype_SI,1) -// -def int_hexagon_S2_vsplatrh : -Hexagon_di_si_Intrinsic<"HEXAGON_S2_vsplatrh">; -// -// BUILTIN_INFO(HEXAGON.S2_vsplatrb,SI_ftype_SI,1) -// -def int_hexagon_S2_vsplatrb : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_vsplatrb">; -// -// BUILTIN_INFO(HEXAGON.S2_insert,SI_ftype_SISISISI,4) -// -def int_hexagon_S2_insert : -Hexagon_si_sisisisi_Intrinsic<"HEXAGON_S2_insert">; -// -// BUILTIN_INFO(HEXAGON.S2_tableidxb_goodsyntax,SI_ftype_SISISISI,4) -// -def int_hexagon_S2_tableidxb_goodsyntax : -Hexagon_si_sisisisi_Intrinsic<"HEXAGON_S2_tableidxb_goodsyntax">; -// -// BUILTIN_INFO(HEXAGON.S2_tableidxh_goodsyntax,SI_ftype_SISISISI,4) -// -def int_hexagon_S2_tableidxh_goodsyntax : -Hexagon_si_sisisisi_Intrinsic<"HEXAGON_S2_tableidxh_goodsyntax">; -// -// BUILTIN_INFO(HEXAGON.S2_tableidxw_goodsyntax,SI_ftype_SISISISI,4) -// -def int_hexagon_S2_tableidxw_goodsyntax : -Hexagon_si_sisisisi_Intrinsic<"HEXAGON_S2_tableidxw_goodsyntax">; -// -// BUILTIN_INFO(HEXAGON.S2_tableidxd_goodsyntax,SI_ftype_SISISISI,4) -// -def int_hexagon_S2_tableidxd_goodsyntax : -Hexagon_si_sisisisi_Intrinsic<"HEXAGON_S2_tableidxd_goodsyntax">; -// -// BUILTIN_INFO(HEXAGON.A4_bitspliti,DI_ftype_SISI,2) -// -def int_hexagon_A4_bitspliti : -Hexagon_di_sisi_Intrinsic<"HEXAGON_A4_bitspliti">; -// -// BUILTIN_INFO(HEXAGON.A4_bitsplit,DI_ftype_SISI,2) -// -def int_hexagon_A4_bitsplit : -Hexagon_di_sisi_Intrinsic<"HEXAGON_A4_bitsplit">; -// -// BUILTIN_INFO(HEXAGON.S4_extract,SI_ftype_SISISI,3) -// -def int_hexagon_S4_extract : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S4_extract">; -// -// BUILTIN_INFO(HEXAGON.S2_extractu,SI_ftype_SISISI,3) -// -def int_hexagon_S2_extractu : -Hexagon_si_sisisi_Intrinsic<"HEXAGON_S2_extractu">; -// -// BUILTIN_INFO(HEXAGON.S2_insertp,DI_ftype_DIDISISI,4) -// -def int_hexagon_S2_insertp : -Hexagon_di_didisisi_Intrinsic<"HEXAGON_S2_insertp">; -// -// BUILTIN_INFO(HEXAGON.S4_extractp,DI_ftype_DISISI,3) -// -def int_hexagon_S4_extractp : -Hexagon_di_disisi_Intrinsic<"HEXAGON_S4_extractp">; -// -// BUILTIN_INFO(HEXAGON.S2_extractup,DI_ftype_DISISI,3) -// -def int_hexagon_S2_extractup : -Hexagon_di_disisi_Intrinsic<"HEXAGON_S2_extractup">; -// -// BUILTIN_INFO(HEXAGON.S2_insert_rp,SI_ftype_SISIDI,3) -// -def int_hexagon_S2_insert_rp : -Hexagon_si_sisidi_Intrinsic<"HEXAGON_S2_insert_rp">; -// -// BUILTIN_INFO(HEXAGON.S4_extract_rp,SI_ftype_SIDI,2) -// -def int_hexagon_S4_extract_rp : -Hexagon_si_sidi_Intrinsic<"HEXAGON_S4_extract_rp">; -// -// BUILTIN_INFO(HEXAGON.S2_extractu_rp,SI_ftype_SIDI,2) -// -def int_hexagon_S2_extractu_rp : -Hexagon_si_sidi_Intrinsic<"HEXAGON_S2_extractu_rp">; -// -// BUILTIN_INFO(HEXAGON.S2_insertp_rp,DI_ftype_DIDIDI,3) -// -def int_hexagon_S2_insertp_rp : -Hexagon_di_dididi_Intrinsic<"HEXAGON_S2_insertp_rp">; -// -// BUILTIN_INFO(HEXAGON.S4_extractp_rp,DI_ftype_DIDI,2) -// -def int_hexagon_S4_extractp_rp : -Hexagon_di_didi_Intrinsic<"HEXAGON_S4_extractp_rp">; -// -// BUILTIN_INFO(HEXAGON.S2_extractup_rp,DI_ftype_DIDI,2) -// -def int_hexagon_S2_extractup_rp : -Hexagon_di_didi_Intrinsic<"HEXAGON_S2_extractup_rp">; -// -// BUILTIN_INFO(HEXAGON.S2_tstbit_i,QI_ftype_SISI,2) -// -def int_hexagon_S2_tstbit_i : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_tstbit_i">; -// -// BUILTIN_INFO(HEXAGON.S4_ntstbit_i,QI_ftype_SISI,2) -// -def int_hexagon_S4_ntstbit_i : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S4_ntstbit_i">; -// -// BUILTIN_INFO(HEXAGON.S2_setbit_i,SI_ftype_SISI,2) -// -def int_hexagon_S2_setbit_i : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_setbit_i">; -// -// BUILTIN_INFO(HEXAGON.S2_togglebit_i,SI_ftype_SISI,2) -// -def int_hexagon_S2_togglebit_i : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_togglebit_i">; -// -// BUILTIN_INFO(HEXAGON.S2_clrbit_i,SI_ftype_SISI,2) -// -def int_hexagon_S2_clrbit_i : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_clrbit_i">; -// -// BUILTIN_INFO(HEXAGON.S2_tstbit_r,QI_ftype_SISI,2) -// -def int_hexagon_S2_tstbit_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_tstbit_r">; -// -// BUILTIN_INFO(HEXAGON.S4_ntstbit_r,QI_ftype_SISI,2) -// -def int_hexagon_S4_ntstbit_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S4_ntstbit_r">; -// -// BUILTIN_INFO(HEXAGON.S2_setbit_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_setbit_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_setbit_r">; -// -// BUILTIN_INFO(HEXAGON.S2_togglebit_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_togglebit_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_togglebit_r">; -// -// BUILTIN_INFO(HEXAGON.S2_clrbit_r,SI_ftype_SISI,2) -// -def int_hexagon_S2_clrbit_r : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S2_clrbit_r">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_vh,DI_ftype_DISI,2) -// -def int_hexagon_S2_asr_i_vh : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asr_i_vh">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_vh,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsr_i_vh : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsr_i_vh">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_vh,DI_ftype_DISI,2) -// -def int_hexagon_S2_asl_i_vh : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asl_i_vh">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_vh,DI_ftype_DISI,2) -// -def int_hexagon_S2_asr_r_vh : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asr_r_vh">; -// -// BUILTIN_INFO(HEXAGON.S5_asrhub_rnd_sat_goodsyntax,SI_ftype_DISI,2) -// -def int_hexagon_S5_asrhub_rnd_sat_goodsyntax : -Hexagon_si_disi_Intrinsic<"HEXAGON_S5_asrhub_rnd_sat_goodsyntax">; -// -// BUILTIN_INFO(HEXAGON.S5_asrhub_sat,SI_ftype_DISI,2) -// -def int_hexagon_S5_asrhub_sat : -Hexagon_si_disi_Intrinsic<"HEXAGON_S5_asrhub_sat">; -// -// BUILTIN_INFO(HEXAGON.S5_vasrhrnd_goodsyntax,DI_ftype_DISI,2) -// -def int_hexagon_S5_vasrhrnd_goodsyntax : -Hexagon_di_disi_Intrinsic<"HEXAGON_S5_vasrhrnd_goodsyntax">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_vh,DI_ftype_DISI,2) -// -def int_hexagon_S2_asl_r_vh : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asl_r_vh">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_vh,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsr_r_vh : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsr_r_vh">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_vh,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsl_r_vh : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsl_r_vh">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_vw,DI_ftype_DISI,2) -// -def int_hexagon_S2_asr_i_vw : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asr_i_vw">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_i_svw_trun,SI_ftype_DISI,2) -// -def int_hexagon_S2_asr_i_svw_trun : -Hexagon_si_disi_Intrinsic<"HEXAGON_S2_asr_i_svw_trun">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_svw_trun,SI_ftype_DISI,2) -// -def int_hexagon_S2_asr_r_svw_trun : -Hexagon_si_disi_Intrinsic<"HEXAGON_S2_asr_r_svw_trun">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_i_vw,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsr_i_vw : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsr_i_vw">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_i_vw,DI_ftype_DISI,2) -// -def int_hexagon_S2_asl_i_vw : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asl_i_vw">; -// -// BUILTIN_INFO(HEXAGON.S2_asr_r_vw,DI_ftype_DISI,2) -// -def int_hexagon_S2_asr_r_vw : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asr_r_vw">; -// -// BUILTIN_INFO(HEXAGON.S2_asl_r_vw,DI_ftype_DISI,2) -// -def int_hexagon_S2_asl_r_vw : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_asl_r_vw">; -// -// BUILTIN_INFO(HEXAGON.S2_lsr_r_vw,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsr_r_vw : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsr_r_vw">; -// -// BUILTIN_INFO(HEXAGON.S2_lsl_r_vw,DI_ftype_DISI,2) -// -def int_hexagon_S2_lsl_r_vw : -Hexagon_di_disi_Intrinsic<"HEXAGON_S2_lsl_r_vw">; -// -// BUILTIN_INFO(HEXAGON.S2_vrndpackwh,SI_ftype_DI,1) -// -def int_hexagon_S2_vrndpackwh : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_vrndpackwh">; -// -// BUILTIN_INFO(HEXAGON.S2_vrndpackwhs,SI_ftype_DI,1) -// -def int_hexagon_S2_vrndpackwhs : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_vrndpackwhs">; -// -// BUILTIN_INFO(HEXAGON.S2_vsxtbh,DI_ftype_SI,1) -// -def int_hexagon_S2_vsxtbh : -Hexagon_di_si_Intrinsic<"HEXAGON_S2_vsxtbh">; -// -// BUILTIN_INFO(HEXAGON.S2_vzxtbh,DI_ftype_SI,1) -// -def int_hexagon_S2_vzxtbh : -Hexagon_di_si_Intrinsic<"HEXAGON_S2_vzxtbh">; -// -// BUILTIN_INFO(HEXAGON.S2_vsathub,SI_ftype_DI,1) -// -def int_hexagon_S2_vsathub : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_vsathub">; -// -// BUILTIN_INFO(HEXAGON.S2_svsathub,SI_ftype_SI,1) -// -def int_hexagon_S2_svsathub : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_svsathub">; -// -// BUILTIN_INFO(HEXAGON.S2_svsathb,SI_ftype_SI,1) -// -def int_hexagon_S2_svsathb : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_svsathb">; -// -// BUILTIN_INFO(HEXAGON.S2_vsathb,SI_ftype_DI,1) -// -def int_hexagon_S2_vsathb : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_vsathb">; -// -// BUILTIN_INFO(HEXAGON.S2_vtrunohb,SI_ftype_DI,1) -// -def int_hexagon_S2_vtrunohb : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_vtrunohb">; -// -// BUILTIN_INFO(HEXAGON.S2_vtrunewh,DI_ftype_DIDI,2) -// -def int_hexagon_S2_vtrunewh : -Hexagon_di_didi_Intrinsic<"HEXAGON_S2_vtrunewh">; -// -// BUILTIN_INFO(HEXAGON.S2_vtrunowh,DI_ftype_DIDI,2) -// -def int_hexagon_S2_vtrunowh : -Hexagon_di_didi_Intrinsic<"HEXAGON_S2_vtrunowh">; -// -// BUILTIN_INFO(HEXAGON.S2_vtrunehb,SI_ftype_DI,1) -// -def int_hexagon_S2_vtrunehb : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_vtrunehb">; -// -// BUILTIN_INFO(HEXAGON.S2_vsxthw,DI_ftype_SI,1) -// -def int_hexagon_S2_vsxthw : -Hexagon_di_si_Intrinsic<"HEXAGON_S2_vsxthw">; -// -// BUILTIN_INFO(HEXAGON.S2_vzxthw,DI_ftype_SI,1) -// -def int_hexagon_S2_vzxthw : -Hexagon_di_si_Intrinsic<"HEXAGON_S2_vzxthw">; -// -// BUILTIN_INFO(HEXAGON.S2_vsatwh,SI_ftype_DI,1) -// -def int_hexagon_S2_vsatwh : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_vsatwh">; -// -// BUILTIN_INFO(HEXAGON.S2_vsatwuh,SI_ftype_DI,1) -// -def int_hexagon_S2_vsatwuh : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_vsatwuh">; -// -// BUILTIN_INFO(HEXAGON.S2_packhl,DI_ftype_SISI,2) -// -def int_hexagon_S2_packhl : -Hexagon_di_sisi_Intrinsic<"HEXAGON_S2_packhl">; -// -// BUILTIN_INFO(HEXAGON.A2_swiz,SI_ftype_SI,1) -// -def int_hexagon_A2_swiz : -Hexagon_si_si_Intrinsic<"HEXAGON_A2_swiz">; -// -// BUILTIN_INFO(HEXAGON.S2_vsathub_nopack,DI_ftype_DI,1) -// -def int_hexagon_S2_vsathub_nopack : -Hexagon_di_di_Intrinsic<"HEXAGON_S2_vsathub_nopack">; -// -// BUILTIN_INFO(HEXAGON.S2_vsathb_nopack,DI_ftype_DI,1) -// -def int_hexagon_S2_vsathb_nopack : -Hexagon_di_di_Intrinsic<"HEXAGON_S2_vsathb_nopack">; -// -// BUILTIN_INFO(HEXAGON.S2_vsatwh_nopack,DI_ftype_DI,1) -// -def int_hexagon_S2_vsatwh_nopack : -Hexagon_di_di_Intrinsic<"HEXAGON_S2_vsatwh_nopack">; -// -// BUILTIN_INFO(HEXAGON.S2_vsatwuh_nopack,DI_ftype_DI,1) -// -def int_hexagon_S2_vsatwuh_nopack : -Hexagon_di_di_Intrinsic<"HEXAGON_S2_vsatwuh_nopack">; -// -// BUILTIN_INFO(HEXAGON.S2_shuffob,DI_ftype_DIDI,2) -// -def int_hexagon_S2_shuffob : -Hexagon_di_didi_Intrinsic<"HEXAGON_S2_shuffob">; -// -// BUILTIN_INFO(HEXAGON.S2_shuffeb,DI_ftype_DIDI,2) -// -def int_hexagon_S2_shuffeb : -Hexagon_di_didi_Intrinsic<"HEXAGON_S2_shuffeb">; -// -// BUILTIN_INFO(HEXAGON.S2_shuffoh,DI_ftype_DIDI,2) -// -def int_hexagon_S2_shuffoh : -Hexagon_di_didi_Intrinsic<"HEXAGON_S2_shuffoh">; -// -// BUILTIN_INFO(HEXAGON.S2_shuffeh,DI_ftype_DIDI,2) -// -def int_hexagon_S2_shuffeh : -Hexagon_di_didi_Intrinsic<"HEXAGON_S2_shuffeh">; -// -// BUILTIN_INFO(HEXAGON.S5_popcountp,SI_ftype_DI,1) -// -def int_hexagon_S5_popcountp : -Hexagon_si_di_Intrinsic<"HEXAGON_S5_popcountp">; -// -// BUILTIN_INFO(HEXAGON.S4_parity,SI_ftype_SISI,2) -// -def int_hexagon_S4_parity : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S4_parity">; -// -// BUILTIN_INFO(HEXAGON.S2_parityp,SI_ftype_DIDI,2) -// -def int_hexagon_S2_parityp : -Hexagon_si_didi_Intrinsic<"HEXAGON_S2_parityp">; -// -// BUILTIN_INFO(HEXAGON.S2_lfsp,DI_ftype_DIDI,2) -// -def int_hexagon_S2_lfsp : -Hexagon_di_didi_Intrinsic<"HEXAGON_S2_lfsp">; -// -// BUILTIN_INFO(HEXAGON.S2_clbnorm,SI_ftype_SI,1) -// -def int_hexagon_S2_clbnorm : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_clbnorm">; -// -// BUILTIN_INFO(HEXAGON.S4_clbaddi,SI_ftype_SISI,2) -// -def int_hexagon_S4_clbaddi : -Hexagon_si_sisi_Intrinsic<"HEXAGON_S4_clbaddi">; -// -// BUILTIN_INFO(HEXAGON.S4_clbpnorm,SI_ftype_DI,1) -// -def int_hexagon_S4_clbpnorm : -Hexagon_si_di_Intrinsic<"HEXAGON_S4_clbpnorm">; -// -// BUILTIN_INFO(HEXAGON.S4_clbpaddi,SI_ftype_DISI,2) -// -def int_hexagon_S4_clbpaddi : -Hexagon_si_disi_Intrinsic<"HEXAGON_S4_clbpaddi">; -// -// BUILTIN_INFO(HEXAGON.S2_clb,SI_ftype_SI,1) -// -def int_hexagon_S2_clb : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_clb">; -// -// BUILTIN_INFO(HEXAGON.S2_cl0,SI_ftype_SI,1) -// -def int_hexagon_S2_cl0 : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_cl0">; -// -// BUILTIN_INFO(HEXAGON.S2_cl1,SI_ftype_SI,1) -// -def int_hexagon_S2_cl1 : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_cl1">; -// -// BUILTIN_INFO(HEXAGON.S2_clbp,SI_ftype_DI,1) -// -def int_hexagon_S2_clbp : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_clbp">; -// -// BUILTIN_INFO(HEXAGON.S2_cl0p,SI_ftype_DI,1) -// -def int_hexagon_S2_cl0p : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_cl0p">; -// -// BUILTIN_INFO(HEXAGON.S2_cl1p,SI_ftype_DI,1) -// -def int_hexagon_S2_cl1p : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_cl1p">; -// -// BUILTIN_INFO(HEXAGON.S2_brev,SI_ftype_SI,1) -// -def int_hexagon_S2_brev : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_brev">; -// -// BUILTIN_INFO(HEXAGON.S2_brevp,DI_ftype_DI,1) -// -def int_hexagon_S2_brevp : -Hexagon_di_di_Intrinsic<"HEXAGON_S2_brevp">; -// -// BUILTIN_INFO(HEXAGON.S2_ct0,SI_ftype_SI,1) -// -def int_hexagon_S2_ct0 : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_ct0">; -// -// BUILTIN_INFO(HEXAGON.S2_ct1,SI_ftype_SI,1) -// -def int_hexagon_S2_ct1 : -Hexagon_si_si_Intrinsic<"HEXAGON_S2_ct1">; -// -// BUILTIN_INFO(HEXAGON.S2_ct0p,SI_ftype_DI,1) -// -def int_hexagon_S2_ct0p : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_ct0p">; -// -// BUILTIN_INFO(HEXAGON.S2_ct1p,SI_ftype_DI,1) -// -def int_hexagon_S2_ct1p : -Hexagon_si_di_Intrinsic<"HEXAGON_S2_ct1p">; -// -// BUILTIN_INFO(HEXAGON.S2_interleave,DI_ftype_DI,1) -// -def int_hexagon_S2_interleave : -Hexagon_di_di_Intrinsic<"HEXAGON_S2_interleave">; -// -// BUILTIN_INFO(HEXAGON.S2_deinterleave,DI_ftype_DI,1) -// -def int_hexagon_S2_deinterleave : -Hexagon_di_di_Intrinsic<"HEXAGON_S2_deinterleave">; -// -// BUILTIN_INFO(HEXAGON.dcfetch_A,v_ftype_DI*,1) -// -def int_hexagon_prefetch : -Hexagon_void_si_Intrinsic<"HEXAGON_prefetch">; - -def llvm_ptr32_ty : LLVMPointerType; -def llvm_ptr64_ty : LLVMPointerType; - -// Mark locked loads as read/write to prevent any accidental reordering. -def int_hexagon_L2_loadw_locked : -Hexagon_Intrinsic<"HEXAGON_L2_loadw_locked", [llvm_i32_ty], [llvm_ptr32_ty], - [IntrArgMemOnly, NoCapture<0>]>; -def int_hexagon_L4_loadd_locked : -Hexagon_Intrinsic<"HEXAGON_L4_loadd_locked", [llvm_i64_ty], [llvm_ptr64_ty], - [IntrArgMemOnly, NoCapture<0>]>; - -def int_hexagon_S2_storew_locked : -Hexagon_Intrinsic<"HEXAGON_S2_storew_locked", [llvm_i32_ty], - [llvm_ptr32_ty, llvm_i32_ty], [IntrArgMemOnly, NoCapture<0>]>; -def int_hexagon_S4_stored_locked : -Hexagon_Intrinsic<"HEXAGON_S4_stored_locked", [llvm_i32_ty], - [llvm_ptr64_ty, llvm_i64_ty], [IntrArgMemOnly, NoCapture<0>]>; - -// V60 - -class Hexagon_v2048v2048_Intrinsic_T - : Hexagon_Intrinsic; - -// tag : V6_hi_W -// tag : V6_lo_W -class Hexagon_v512v1024_Intrinsic_T - : Hexagon_Intrinsic; - -// tag : V6_hi_W_128B -// tag : V6_lo_W_128B -class Hexagon_v1024v2048_Intrinsic_T - : Hexagon_Intrinsic; - -class Hexagon_v1024v1024_Intrinsic_T - : Hexagon_Intrinsic; - -// BUILTIN_INFO(HEXAGON.V6_hi_W,VI_ftype_VI,1) -// tag : V6_hi -def int_hexagon_V6_hi : -Hexagon_v512v1024_Intrinsic_T<"HEXAGON_V6_hi">; - -// BUILTIN_INFO(HEXAGON.V6_lo_W,VI_ftype_VI,1) -// tag : V6_lo -def int_hexagon_V6_lo : -Hexagon_v512v1024_Intrinsic_T<"HEXAGON_V6_lo">; - -// BUILTIN_INFO(HEXAGON.V6_hi_W,VI_ftype_VI,1) -// tag : V6_hi_128B -def int_hexagon_V6_hi_128B : -Hexagon_v1024v2048_Intrinsic_T<"HEXAGON_V6_hi_128B">; - -// BUILTIN_INFO(HEXAGON.V6_lo_W,VI_ftype_VI,1) -// tag : V6_lo_128B -def int_hexagon_V6_lo_128B : -Hexagon_v1024v2048_Intrinsic_T<"HEXAGON_V6_lo_128B">; - -// BUILTIN_INFO(HEXAGON.V6_vassignp,VI_ftype_VI,1) -// tag : V6_vassignp -def int_hexagon_V6_vassignp : -Hexagon_v1024v1024_Intrinsic_T<"HEXAGON_V6_vassignp">; - -// BUILTIN_INFO(HEXAGON.V6_vassignp,VI_ftype_VI,1) -// tag : V6_vassignp_128B -def int_hexagon_V6_vassignp_128B : -Hexagon_v2048v2048_Intrinsic_T<"HEXAGON_V6_vassignp_128B">; - - - -// -// Hexagon_iii_Intrinsic -// tag : S6_rol_i_r -class Hexagon_iii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_LLiLLii_Intrinsic -// tag : S6_rol_i_p -class Hexagon_LLiLLii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_iiii_Intrinsic -// tag : S6_rol_i_r_acc -class Hexagon_iiii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_LLiLLiLLii_Intrinsic -// tag : S6_rol_i_p_acc -class Hexagon_LLiLLiLLii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512v512i_Intrinsic -// tag : V6_valignb -class Hexagon_v512v512v512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v1024i_Intrinsic -// tag : V6_valignb_128B -class Hexagon_v1024v1024v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512i_Intrinsic -// tag : V6_vror -class Hexagon_v512v512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024i_Intrinsic -// tag : V6_vror_128B -class Hexagon_v1024v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v512_Intrinsic -// tag : V6_vunpackub -class Hexagon_v1024v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v1024_Intrinsic -// tag : V6_vunpackub_128B -class Hexagon_v2048v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v512_Intrinsic -// tag : V6_vunpackob -class Hexagon_v1024v1024v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048v1024_Intrinsic -// tag : V6_vunpackob_128B -class Hexagon_v2048v2048v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512v512_Intrinsic -// tag : V6_vpackeb -class Hexagon_v512v512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v1024_Intrinsic -// tag : V6_vpackeb_128B -class Hexagon_v1024v1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048i_Intrinsic -// tag : V6_vdmpybus_dv_128B -class Hexagon_v2048v2048i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048v2048i_Intrinsic -// tag : V6_vdmpybus_dv_acc_128B -class Hexagon_v2048v2048v2048i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512v512v512_Intrinsic -// tag : V6_vdmpyhvsat_acc -class Hexagon_v512v512v512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v1024v1024_Intrinsic -// tag : V6_vdmpyhvsat_acc_128B -class Hexagon_v1024v1024v1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v1024i_Intrinsic -// tag : V6_vdmpyhisat -class Hexagon_v512v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v2048i_Intrinsic -// tag : V6_vdmpyhisat_128B -class Hexagon_v1024v2048i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512v1024i_Intrinsic -// tag : V6_vdmpyhisat_acc -class Hexagon_v512v512v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v2048i_Intrinsic -// tag : V6_vdmpyhisat_acc_128B -class Hexagon_v1024v1024v2048i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024ii_Intrinsic -// tag : V6_vrmpyubi -class Hexagon_v1024v1024ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048ii_Intrinsic -// tag : V6_vrmpyubi_128B -class Hexagon_v2048v2048ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v1024ii_Intrinsic -// tag : V6_vrmpyubi_acc -class Hexagon_v1024v1024v1024ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048v2048ii_Intrinsic -// tag : V6_vrmpyubi_acc_128B -class Hexagon_v2048v2048v2048ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048v2048_Intrinsic -// tag : V6_vaddb_dv_128B -class Hexagon_v2048v2048v2048_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v512v512_Intrinsic -// tag : V6_vaddubh -class Hexagon_v1024v512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v1024v1024_Intrinsic -// tag : V6_vaddubh_128B -class Hexagon_v2048v1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512_Intrinsic -// tag : V6_vd0 -class Hexagon_v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024_Intrinsic -// tag : V6_vd0_128B -class Hexagon_v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v64iv512v512_Intrinsic -// tag : V6_vaddbq -class Hexagon_v512v64iv512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v128iv1024v1024_Intrinsic -// tag : V6_vaddbq_128B -class Hexagon_v1024v128iv1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512_Intrinsic -// tag : V6_vabsh -class Hexagon_v512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024_Intrinsic -// tag : V6_vabsh_128B -class Hexagon_v1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v512v512_Intrinsic -// tag : V6_vmpybv_acc -class Hexagon_v1024v1024v512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048v1024v1024_Intrinsic -// tag : V6_vmpybv_acc_128B -class Hexagon_v2048v2048v1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v512i_Intrinsic -// tag : V6_vmpyub -class Hexagon_v1024v512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v1024i_Intrinsic -// tag : V6_vmpyub_128B -class Hexagon_v2048v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v512i_Intrinsic -// tag : V6_vmpyub_acc -class Hexagon_v1024v1024v512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048v1024i_Intrinsic -// tag : V6_vmpyub_acc_128B -class Hexagon_v2048v2048v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v64ii_Intrinsic -// tag : V6_vandqrt -class Hexagon_v512v64ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v128ii_Intrinsic -// tag : V6_vandqrt_128B -class Hexagon_v1024v128ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512v64ii_Intrinsic -// tag : V6_vandqrt_acc -class Hexagon_v512v512v64ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v128ii_Intrinsic -// tag : V6_vandqrt_acc_128B -class Hexagon_v1024v1024v128ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v64iv512i_Intrinsic -// tag : V6_vandvrt -class Hexagon_v64iv512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v128iv1024i_Intrinsic -// tag : V6_vandvrt_128B -class Hexagon_v128iv1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v64iv64iv512i_Intrinsic -// tag : V6_vandvrt_acc -class Hexagon_v64iv64iv512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v128iv128iv1024i_Intrinsic -// tag : V6_vandvrt_acc_128B -class Hexagon_v128iv128iv1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v64iv512v512_Intrinsic -// tag : V6_vgtw -class Hexagon_v64iv512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v128iv1024v1024_Intrinsic -// tag : V6_vgtw_128B -class Hexagon_v128iv1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v64iv64iv512v512_Intrinsic -// tag : V6_vgtw_and -class Hexagon_v64iv64iv512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v128iv128iv1024v1024_Intrinsic -// tag : V6_vgtw_and_128B -class Hexagon_v128iv128iv1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v64iv64iv64i_Intrinsic -// tag : V6_pred_or -class Hexagon_v64iv64iv64i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v128iv128iv128i_Intrinsic -// tag : V6_pred_or_128B -class Hexagon_v128iv128iv128i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v64iv64i_Intrinsic -// tag : V6_pred_not -class Hexagon_v64iv64i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v128iv128i_Intrinsic -// tag : V6_pred_not_128B -class Hexagon_v128iv128i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v64ii_Intrinsic -// tag : V6_pred_scalar2 -class Hexagon_v64ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v128ii_Intrinsic -// tag : V6_pred_scalar2_128B -class Hexagon_v128ii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v64iv512v512_Intrinsic -// tag : V6_vswap -class Hexagon_v1024v64iv512v512_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v128iv1024v1024_Intrinsic -// tag : V6_vswap_128B -class Hexagon_v2048v128iv1024v1024_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v512v512i_Intrinsic -// tag : V6_vshuffvdd -class Hexagon_v1024v512v512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v1024v1024i_Intrinsic -// tag : V6_vshuffvdd_128B -class Hexagon_v2048v1024v1024i_Intrinsic - : Hexagon_Intrinsic; - - -// -// Hexagon_iv512i_Intrinsic -// tag : V6_extractw -class Hexagon_iv512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_iv1024i_Intrinsic -// tag : V6_extractw_128B -class Hexagon_iv1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512i_Intrinsic -// tag : V6_lvsplatw -class Hexagon_v512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024i_Intrinsic -// tag : V6_lvsplatw_128B -class Hexagon_v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512LLii_Intrinsic -// tag : V6_vlutb -class Hexagon_v512v512LLii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024LLii_Intrinsic -// tag : V6_vlutb_128B -class Hexagon_v1024v1024LLii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512v512LLii_Intrinsic -// tag : V6_vlutb_acc -class Hexagon_v512v512v512LLii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v1024LLii_Intrinsic -// tag : V6_vlutb_acc_128B -class Hexagon_v1024v1024v1024LLii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048LLii_Intrinsic -// tag : V6_vlutb_dv_128B -class Hexagon_v2048v2048LLii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048v2048LLii_Intrinsic -// tag : V6_vlutb_dv_acc_128B -class Hexagon_v2048v2048v2048LLii_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v512v512v512v512i_Intrinsic -// tag : V6_vlutvvb_oracc -class Hexagon_v512v512v512v512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v1024v1024i_Intrinsic -// tag : V6_vlutvvb_oracc_128B -class Hexagon_v1024v1024v1024v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v1024v1024v512v512i_Intrinsic -// tag : V6_vlutvwh_oracc -class Hexagon_v1024v1024v512v512i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_v2048v2048v1024v1024i_Intrinsic -// tag : V6_vlutvwh_oracc_128B -class Hexagon_v2048v2048v1024v1024i_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_LLiLLiLLi_Intrinsic -// tag : M6_vabsdiffb -class Hexagon_LLiLLiLLi_Intrinsic - : Hexagon_Intrinsic; - -// -// Hexagon_LLii_Intrinsic -// tag : S6_vsplatrbp -class Hexagon_LLii_Intrinsic - : Hexagon_Intrinsic; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_r,SI_ftype_SISI,2) -// tag : S6_rol_i_r -def int_hexagon_S6_rol_i_r : -Hexagon_iii_Intrinsic<"HEXAGON_S6_rol_i_r">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_p,DI_ftype_DISI,2) -// tag : S6_rol_i_p -def int_hexagon_S6_rol_i_p : -Hexagon_LLiLLii_Intrinsic<"HEXAGON_S6_rol_i_p">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_r_acc,SI_ftype_SISISI,3) -// tag : S6_rol_i_r_acc -def int_hexagon_S6_rol_i_r_acc : -Hexagon_iiii_Intrinsic<"HEXAGON_S6_rol_i_r_acc">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_p_acc,DI_ftype_DIDISI,3) -// tag : S6_rol_i_p_acc -def int_hexagon_S6_rol_i_p_acc : -Hexagon_LLiLLiLLii_Intrinsic<"HEXAGON_S6_rol_i_p_acc">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_r_nac,SI_ftype_SISISI,3) -// tag : S6_rol_i_r_nac -def int_hexagon_S6_rol_i_r_nac : -Hexagon_iiii_Intrinsic<"HEXAGON_S6_rol_i_r_nac">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_p_nac,DI_ftype_DIDISI,3) -// tag : S6_rol_i_p_nac -def int_hexagon_S6_rol_i_p_nac : -Hexagon_LLiLLiLLii_Intrinsic<"HEXAGON_S6_rol_i_p_nac">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_r_xacc,SI_ftype_SISISI,3) -// tag : S6_rol_i_r_xacc -def int_hexagon_S6_rol_i_r_xacc : -Hexagon_iiii_Intrinsic<"HEXAGON_S6_rol_i_r_xacc">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_p_xacc,DI_ftype_DIDISI,3) -// tag : S6_rol_i_p_xacc -def int_hexagon_S6_rol_i_p_xacc : -Hexagon_LLiLLiLLii_Intrinsic<"HEXAGON_S6_rol_i_p_xacc">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_r_and,SI_ftype_SISISI,3) -// tag : S6_rol_i_r_and -def int_hexagon_S6_rol_i_r_and : -Hexagon_iiii_Intrinsic<"HEXAGON_S6_rol_i_r_and">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_r_or,SI_ftype_SISISI,3) -// tag : S6_rol_i_r_or -def int_hexagon_S6_rol_i_r_or : -Hexagon_iiii_Intrinsic<"HEXAGON_S6_rol_i_r_or">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_p_and,DI_ftype_DIDISI,3) -// tag : S6_rol_i_p_and -def int_hexagon_S6_rol_i_p_and : -Hexagon_LLiLLiLLii_Intrinsic<"HEXAGON_S6_rol_i_p_and">; - -// -// BUILTIN_INFO(HEXAGON.S6_rol_i_p_or,DI_ftype_DIDISI,3) -// tag : S6_rol_i_p_or -def int_hexagon_S6_rol_i_p_or : -Hexagon_LLiLLiLLii_Intrinsic<"HEXAGON_S6_rol_i_p_or">; - -// -// BUILTIN_INFO(HEXAGON.S2_cabacencbin,DI_ftype_DIDIQI,3) -// tag : S2_cabacencbin -def int_hexagon_S2_cabacencbin : -Hexagon_LLiLLiLLii_Intrinsic<"HEXAGON_S2_cabacencbin">; - -// -// BUILTIN_INFO(HEXAGON.V6_valignb,VI_ftype_VIVISI,3) -// tag : V6_valignb -def int_hexagon_V6_valignb : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_valignb">; - -// -// BUILTIN_INFO(HEXAGON.V6_valignb_128B,VI_ftype_VIVISI,3) -// tag : V6_valignb_128B -def int_hexagon_V6_valignb_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_valignb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlalignb,VI_ftype_VIVISI,3) -// tag : V6_vlalignb -def int_hexagon_V6_vlalignb : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vlalignb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlalignb_128B,VI_ftype_VIVISI,3) -// tag : V6_vlalignb_128B -def int_hexagon_V6_vlalignb_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vlalignb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_valignbi,VI_ftype_VIVISI,3) -// tag : V6_valignbi -def int_hexagon_V6_valignbi : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_valignbi">; - -// -// BUILTIN_INFO(HEXAGON.V6_valignbi_128B,VI_ftype_VIVISI,3) -// tag : V6_valignbi_128B -def int_hexagon_V6_valignbi_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_valignbi_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlalignbi,VI_ftype_VIVISI,3) -// tag : V6_vlalignbi -def int_hexagon_V6_vlalignbi : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vlalignbi">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlalignbi_128B,VI_ftype_VIVISI,3) -// tag : V6_vlalignbi_128B -def int_hexagon_V6_vlalignbi_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vlalignbi_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vror,VI_ftype_VISI,2) -// tag : V6_vror -def int_hexagon_V6_vror : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vror">; - -// -// BUILTIN_INFO(HEXAGON.V6_vror_128B,VI_ftype_VISI,2) -// tag : V6_vror_128B -def int_hexagon_V6_vror_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vror_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackub,VD_ftype_VI,1) -// tag : V6_vunpackub -def int_hexagon_V6_vunpackub : -Hexagon_v1024v512_Intrinsic<"HEXAGON_V6_vunpackub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackub_128B,VD_ftype_VI,1) -// tag : V6_vunpackub_128B -def int_hexagon_V6_vunpackub_128B : -Hexagon_v2048v1024_Intrinsic<"HEXAGON_V6_vunpackub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackb,VD_ftype_VI,1) -// tag : V6_vunpackb -def int_hexagon_V6_vunpackb : -Hexagon_v1024v512_Intrinsic<"HEXAGON_V6_vunpackb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackb_128B,VD_ftype_VI,1) -// tag : V6_vunpackb_128B -def int_hexagon_V6_vunpackb_128B : -Hexagon_v2048v1024_Intrinsic<"HEXAGON_V6_vunpackb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackuh,VD_ftype_VI,1) -// tag : V6_vunpackuh -def int_hexagon_V6_vunpackuh : -Hexagon_v1024v512_Intrinsic<"HEXAGON_V6_vunpackuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackuh_128B,VD_ftype_VI,1) -// tag : V6_vunpackuh_128B -def int_hexagon_V6_vunpackuh_128B : -Hexagon_v2048v1024_Intrinsic<"HEXAGON_V6_vunpackuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackh,VD_ftype_VI,1) -// tag : V6_vunpackh -def int_hexagon_V6_vunpackh : -Hexagon_v1024v512_Intrinsic<"HEXAGON_V6_vunpackh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackh_128B,VD_ftype_VI,1) -// tag : V6_vunpackh_128B -def int_hexagon_V6_vunpackh_128B : -Hexagon_v2048v1024_Intrinsic<"HEXAGON_V6_vunpackh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackob,VD_ftype_VDVI,2) -// tag : V6_vunpackob -def int_hexagon_V6_vunpackob : -Hexagon_v1024v1024v512_Intrinsic<"HEXAGON_V6_vunpackob">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackob_128B,VD_ftype_VDVI,2) -// tag : V6_vunpackob_128B -def int_hexagon_V6_vunpackob_128B : -Hexagon_v2048v2048v1024_Intrinsic<"HEXAGON_V6_vunpackob_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackoh,VD_ftype_VDVI,2) -// tag : V6_vunpackoh -def int_hexagon_V6_vunpackoh : -Hexagon_v1024v1024v512_Intrinsic<"HEXAGON_V6_vunpackoh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vunpackoh_128B,VD_ftype_VDVI,2) -// tag : V6_vunpackoh_128B -def int_hexagon_V6_vunpackoh_128B : -Hexagon_v2048v2048v1024_Intrinsic<"HEXAGON_V6_vunpackoh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackeb,VI_ftype_VIVI,2) -// tag : V6_vpackeb -def int_hexagon_V6_vpackeb : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vpackeb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackeb_128B,VI_ftype_VIVI,2) -// tag : V6_vpackeb_128B -def int_hexagon_V6_vpackeb_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vpackeb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackeh,VI_ftype_VIVI,2) -// tag : V6_vpackeh -def int_hexagon_V6_vpackeh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vpackeh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackeh_128B,VI_ftype_VIVI,2) -// tag : V6_vpackeh_128B -def int_hexagon_V6_vpackeh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vpackeh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackob,VI_ftype_VIVI,2) -// tag : V6_vpackob -def int_hexagon_V6_vpackob : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vpackob">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackob_128B,VI_ftype_VIVI,2) -// tag : V6_vpackob_128B -def int_hexagon_V6_vpackob_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vpackob_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackoh,VI_ftype_VIVI,2) -// tag : V6_vpackoh -def int_hexagon_V6_vpackoh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vpackoh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackoh_128B,VI_ftype_VIVI,2) -// tag : V6_vpackoh_128B -def int_hexagon_V6_vpackoh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vpackoh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackhub_sat,VI_ftype_VIVI,2) -// tag : V6_vpackhub_sat -def int_hexagon_V6_vpackhub_sat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vpackhub_sat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackhub_sat_128B,VI_ftype_VIVI,2) -// tag : V6_vpackhub_sat_128B -def int_hexagon_V6_vpackhub_sat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vpackhub_sat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackhb_sat,VI_ftype_VIVI,2) -// tag : V6_vpackhb_sat -def int_hexagon_V6_vpackhb_sat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vpackhb_sat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackhb_sat_128B,VI_ftype_VIVI,2) -// tag : V6_vpackhb_sat_128B -def int_hexagon_V6_vpackhb_sat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vpackhb_sat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackwuh_sat,VI_ftype_VIVI,2) -// tag : V6_vpackwuh_sat -def int_hexagon_V6_vpackwuh_sat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vpackwuh_sat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackwuh_sat_128B,VI_ftype_VIVI,2) -// tag : V6_vpackwuh_sat_128B -def int_hexagon_V6_vpackwuh_sat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vpackwuh_sat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackwh_sat,VI_ftype_VIVI,2) -// tag : V6_vpackwh_sat -def int_hexagon_V6_vpackwh_sat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vpackwh_sat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpackwh_sat_128B,VI_ftype_VIVI,2) -// tag : V6_vpackwh_sat_128B -def int_hexagon_V6_vpackwh_sat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vpackwh_sat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vzb,VD_ftype_VI,1) -// tag : V6_vzb -def int_hexagon_V6_vzb : -Hexagon_v1024v512_Intrinsic<"HEXAGON_V6_vzb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vzb_128B,VD_ftype_VI,1) -// tag : V6_vzb_128B -def int_hexagon_V6_vzb_128B : -Hexagon_v2048v1024_Intrinsic<"HEXAGON_V6_vzb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsb,VD_ftype_VI,1) -// tag : V6_vsb -def int_hexagon_V6_vsb : -Hexagon_v1024v512_Intrinsic<"HEXAGON_V6_vsb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsb_128B,VD_ftype_VI,1) -// tag : V6_vsb_128B -def int_hexagon_V6_vsb_128B : -Hexagon_v2048v1024_Intrinsic<"HEXAGON_V6_vsb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vzh,VD_ftype_VI,1) -// tag : V6_vzh -def int_hexagon_V6_vzh : -Hexagon_v1024v512_Intrinsic<"HEXAGON_V6_vzh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vzh_128B,VD_ftype_VI,1) -// tag : V6_vzh_128B -def int_hexagon_V6_vzh_128B : -Hexagon_v2048v1024_Intrinsic<"HEXAGON_V6_vzh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsh,VD_ftype_VI,1) -// tag : V6_vsh -def int_hexagon_V6_vsh : -Hexagon_v1024v512_Intrinsic<"HEXAGON_V6_vsh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsh_128B,VD_ftype_VI,1) -// tag : V6_vsh_128B -def int_hexagon_V6_vsh_128B : -Hexagon_v2048v1024_Intrinsic<"HEXAGON_V6_vsh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpybus,VI_ftype_VISI,2) -// tag : V6_vdmpybus -def int_hexagon_V6_vdmpybus : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vdmpybus">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpybus_128B,VI_ftype_VISI,2) -// tag : V6_vdmpybus_128B -def int_hexagon_V6_vdmpybus_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpybus_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpybus_acc,VI_ftype_VIVISI,3) -// tag : V6_vdmpybus_acc -def int_hexagon_V6_vdmpybus_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vdmpybus_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpybus_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vdmpybus_acc_128B -def int_hexagon_V6_vdmpybus_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpybus_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpybus_dv,VD_ftype_VDSI,2) -// tag : V6_vdmpybus_dv -def int_hexagon_V6_vdmpybus_dv : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpybus_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpybus_dv_128B,VD_ftype_VDSI,2) -// tag : V6_vdmpybus_dv_128B -def int_hexagon_V6_vdmpybus_dv_128B : -Hexagon_v2048v2048i_Intrinsic<"HEXAGON_V6_vdmpybus_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpybus_dv_acc,VD_ftype_VDVDSI,3) -// tag : V6_vdmpybus_dv_acc -def int_hexagon_V6_vdmpybus_dv_acc : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpybus_dv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpybus_dv_acc_128B,VD_ftype_VDVDSI,3) -// tag : V6_vdmpybus_dv_acc_128B -def int_hexagon_V6_vdmpybus_dv_acc_128B : -Hexagon_v2048v2048v2048i_Intrinsic<"HEXAGON_V6_vdmpybus_dv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhb,VI_ftype_VISI,2) -// tag : V6_vdmpyhb -def int_hexagon_V6_vdmpyhb : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vdmpyhb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhb_128B,VI_ftype_VISI,2) -// tag : V6_vdmpyhb_128B -def int_hexagon_V6_vdmpyhb_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpyhb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhb_acc,VI_ftype_VIVISI,3) -// tag : V6_vdmpyhb_acc -def int_hexagon_V6_vdmpyhb_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vdmpyhb_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhb_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vdmpyhb_acc_128B -def int_hexagon_V6_vdmpyhb_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpyhb_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhb_dv,VD_ftype_VDSI,2) -// tag : V6_vdmpyhb_dv -def int_hexagon_V6_vdmpyhb_dv : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpyhb_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhb_dv_128B,VD_ftype_VDSI,2) -// tag : V6_vdmpyhb_dv_128B -def int_hexagon_V6_vdmpyhb_dv_128B : -Hexagon_v2048v2048i_Intrinsic<"HEXAGON_V6_vdmpyhb_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhb_dv_acc,VD_ftype_VDVDSI,3) -// tag : V6_vdmpyhb_dv_acc -def int_hexagon_V6_vdmpyhb_dv_acc : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpyhb_dv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhb_dv_acc_128B,VD_ftype_VDVDSI,3) -// tag : V6_vdmpyhb_dv_acc_128B -def int_hexagon_V6_vdmpyhb_dv_acc_128B : -Hexagon_v2048v2048v2048i_Intrinsic<"HEXAGON_V6_vdmpyhb_dv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhvsat,VI_ftype_VIVI,2) -// tag : V6_vdmpyhvsat -def int_hexagon_V6_vdmpyhvsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vdmpyhvsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhvsat_128B,VI_ftype_VIVI,2) -// tag : V6_vdmpyhvsat_128B -def int_hexagon_V6_vdmpyhvsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vdmpyhvsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhvsat_acc,VI_ftype_VIVIVI,3) -// tag : V6_vdmpyhvsat_acc -def int_hexagon_V6_vdmpyhvsat_acc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vdmpyhvsat_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhvsat_acc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vdmpyhvsat_acc_128B -def int_hexagon_V6_vdmpyhvsat_acc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vdmpyhvsat_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsat,VI_ftype_VISI,2) -// tag : V6_vdmpyhsat -def int_hexagon_V6_vdmpyhsat : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vdmpyhsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsat_128B,VI_ftype_VISI,2) -// tag : V6_vdmpyhsat_128B -def int_hexagon_V6_vdmpyhsat_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpyhsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsat_acc,VI_ftype_VIVISI,3) -// tag : V6_vdmpyhsat_acc -def int_hexagon_V6_vdmpyhsat_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vdmpyhsat_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsat_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vdmpyhsat_acc_128B -def int_hexagon_V6_vdmpyhsat_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpyhsat_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhisat,VI_ftype_VDSI,2) -// tag : V6_vdmpyhisat -def int_hexagon_V6_vdmpyhisat : -Hexagon_v512v1024i_Intrinsic<"HEXAGON_V6_vdmpyhisat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhisat_128B,VI_ftype_VDSI,2) -// tag : V6_vdmpyhisat_128B -def int_hexagon_V6_vdmpyhisat_128B : -Hexagon_v1024v2048i_Intrinsic<"HEXAGON_V6_vdmpyhisat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhisat_acc,VI_ftype_VIVDSI,3) -// tag : V6_vdmpyhisat_acc -def int_hexagon_V6_vdmpyhisat_acc : -Hexagon_v512v512v1024i_Intrinsic<"HEXAGON_V6_vdmpyhisat_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhisat_acc_128B,VI_ftype_VIVDSI,3) -// tag : V6_vdmpyhisat_acc_128B -def int_hexagon_V6_vdmpyhisat_acc_128B : -Hexagon_v1024v1024v2048i_Intrinsic<"HEXAGON_V6_vdmpyhisat_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsusat,VI_ftype_VISI,2) -// tag : V6_vdmpyhsusat -def int_hexagon_V6_vdmpyhsusat : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vdmpyhsusat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsusat_128B,VI_ftype_VISI,2) -// tag : V6_vdmpyhsusat_128B -def int_hexagon_V6_vdmpyhsusat_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpyhsusat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsusat_acc,VI_ftype_VIVISI,3) -// tag : V6_vdmpyhsusat_acc -def int_hexagon_V6_vdmpyhsusat_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vdmpyhsusat_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsusat_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vdmpyhsusat_acc_128B -def int_hexagon_V6_vdmpyhsusat_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vdmpyhsusat_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsuisat,VI_ftype_VDSI,2) -// tag : V6_vdmpyhsuisat -def int_hexagon_V6_vdmpyhsuisat : -Hexagon_v512v1024i_Intrinsic<"HEXAGON_V6_vdmpyhsuisat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsuisat_128B,VI_ftype_VDSI,2) -// tag : V6_vdmpyhsuisat_128B -def int_hexagon_V6_vdmpyhsuisat_128B : -Hexagon_v1024v2048i_Intrinsic<"HEXAGON_V6_vdmpyhsuisat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsuisat_acc,VI_ftype_VIVDSI,3) -// tag : V6_vdmpyhsuisat_acc -def int_hexagon_V6_vdmpyhsuisat_acc : -Hexagon_v512v512v1024i_Intrinsic<"HEXAGON_V6_vdmpyhsuisat_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdmpyhsuisat_acc_128B,VI_ftype_VIVDSI,3) -// tag : V6_vdmpyhsuisat_acc_128B -def int_hexagon_V6_vdmpyhsuisat_acc_128B : -Hexagon_v1024v1024v2048i_Intrinsic<"HEXAGON_V6_vdmpyhsuisat_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpyb,VD_ftype_VDSI,2) -// tag : V6_vtmpyb -def int_hexagon_V6_vtmpyb : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vtmpyb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpyb_128B,VD_ftype_VDSI,2) -// tag : V6_vtmpyb_128B -def int_hexagon_V6_vtmpyb_128B : -Hexagon_v2048v2048i_Intrinsic<"HEXAGON_V6_vtmpyb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpyb_acc,VD_ftype_VDVDSI,3) -// tag : V6_vtmpyb_acc -def int_hexagon_V6_vtmpyb_acc : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vtmpyb_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpyb_acc_128B,VD_ftype_VDVDSI,3) -// tag : V6_vtmpyb_acc_128B -def int_hexagon_V6_vtmpyb_acc_128B : -Hexagon_v2048v2048v2048i_Intrinsic<"HEXAGON_V6_vtmpyb_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpybus,VD_ftype_VDSI,2) -// tag : V6_vtmpybus -def int_hexagon_V6_vtmpybus : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vtmpybus">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpybus_128B,VD_ftype_VDSI,2) -// tag : V6_vtmpybus_128B -def int_hexagon_V6_vtmpybus_128B : -Hexagon_v2048v2048i_Intrinsic<"HEXAGON_V6_vtmpybus_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpybus_acc,VD_ftype_VDVDSI,3) -// tag : V6_vtmpybus_acc -def int_hexagon_V6_vtmpybus_acc : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vtmpybus_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpybus_acc_128B,VD_ftype_VDVDSI,3) -// tag : V6_vtmpybus_acc_128B -def int_hexagon_V6_vtmpybus_acc_128B : -Hexagon_v2048v2048v2048i_Intrinsic<"HEXAGON_V6_vtmpybus_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpyhb,VD_ftype_VDSI,2) -// tag : V6_vtmpyhb -def int_hexagon_V6_vtmpyhb : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vtmpyhb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpyhb_128B,VD_ftype_VDSI,2) -// tag : V6_vtmpyhb_128B -def int_hexagon_V6_vtmpyhb_128B : -Hexagon_v2048v2048i_Intrinsic<"HEXAGON_V6_vtmpyhb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpyhb_acc,VD_ftype_VDVDSI,3) -// tag : V6_vtmpyhb_acc -def int_hexagon_V6_vtmpyhb_acc : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vtmpyhb_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vtmpyhb_acc_128B,VD_ftype_VDVDSI,3) -// tag : V6_vtmpyhb_acc_128B -def int_hexagon_V6_vtmpyhb_acc_128B : -Hexagon_v2048v2048v2048i_Intrinsic<"HEXAGON_V6_vtmpyhb_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyub,VI_ftype_VISI,2) -// tag : V6_vrmpyub -def int_hexagon_V6_vrmpyub : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vrmpyub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyub_128B,VI_ftype_VISI,2) -// tag : V6_vrmpyub_128B -def int_hexagon_V6_vrmpyub_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vrmpyub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyub_acc,VI_ftype_VIVISI,3) -// tag : V6_vrmpyub_acc -def int_hexagon_V6_vrmpyub_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vrmpyub_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyub_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vrmpyub_acc_128B -def int_hexagon_V6_vrmpyub_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vrmpyub_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyubv,VI_ftype_VIVI,2) -// tag : V6_vrmpyubv -def int_hexagon_V6_vrmpyubv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vrmpyubv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyubv_128B,VI_ftype_VIVI,2) -// tag : V6_vrmpyubv_128B -def int_hexagon_V6_vrmpyubv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vrmpyubv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyubv_acc,VI_ftype_VIVIVI,3) -// tag : V6_vrmpyubv_acc -def int_hexagon_V6_vrmpyubv_acc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vrmpyubv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyubv_acc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vrmpyubv_acc_128B -def int_hexagon_V6_vrmpyubv_acc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vrmpyubv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybv,VI_ftype_VIVI,2) -// tag : V6_vrmpybv -def int_hexagon_V6_vrmpybv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vrmpybv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybv_128B,VI_ftype_VIVI,2) -// tag : V6_vrmpybv_128B -def int_hexagon_V6_vrmpybv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vrmpybv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybv_acc,VI_ftype_VIVIVI,3) -// tag : V6_vrmpybv_acc -def int_hexagon_V6_vrmpybv_acc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vrmpybv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybv_acc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vrmpybv_acc_128B -def int_hexagon_V6_vrmpybv_acc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vrmpybv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyubi,VD_ftype_VDSISI,3) -// tag : V6_vrmpyubi -def int_hexagon_V6_vrmpyubi : -Hexagon_v1024v1024ii_Intrinsic<"HEXAGON_V6_vrmpyubi">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyubi_128B,VD_ftype_VDSISI,3) -// tag : V6_vrmpyubi_128B -def int_hexagon_V6_vrmpyubi_128B : -Hexagon_v2048v2048ii_Intrinsic<"HEXAGON_V6_vrmpyubi_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyubi_acc,VD_ftype_VDVDSISI,4) -// tag : V6_vrmpyubi_acc -def int_hexagon_V6_vrmpyubi_acc : -Hexagon_v1024v1024v1024ii_Intrinsic<"HEXAGON_V6_vrmpyubi_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpyubi_acc_128B,VD_ftype_VDVDSISI,4) -// tag : V6_vrmpyubi_acc_128B -def int_hexagon_V6_vrmpyubi_acc_128B : -Hexagon_v2048v2048v2048ii_Intrinsic<"HEXAGON_V6_vrmpyubi_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybus,VI_ftype_VISI,2) -// tag : V6_vrmpybus -def int_hexagon_V6_vrmpybus : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vrmpybus">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybus_128B,VI_ftype_VISI,2) -// tag : V6_vrmpybus_128B -def int_hexagon_V6_vrmpybus_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vrmpybus_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybus_acc,VI_ftype_VIVISI,3) -// tag : V6_vrmpybus_acc -def int_hexagon_V6_vrmpybus_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vrmpybus_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybus_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vrmpybus_acc_128B -def int_hexagon_V6_vrmpybus_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vrmpybus_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybusi,VD_ftype_VDSISI,3) -// tag : V6_vrmpybusi -def int_hexagon_V6_vrmpybusi : -Hexagon_v1024v1024ii_Intrinsic<"HEXAGON_V6_vrmpybusi">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybusi_128B,VD_ftype_VDSISI,3) -// tag : V6_vrmpybusi_128B -def int_hexagon_V6_vrmpybusi_128B : -Hexagon_v2048v2048ii_Intrinsic<"HEXAGON_V6_vrmpybusi_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybusi_acc,VD_ftype_VDVDSISI,4) -// tag : V6_vrmpybusi_acc -def int_hexagon_V6_vrmpybusi_acc : -Hexagon_v1024v1024v1024ii_Intrinsic<"HEXAGON_V6_vrmpybusi_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybusi_acc_128B,VD_ftype_VDVDSISI,4) -// tag : V6_vrmpybusi_acc_128B -def int_hexagon_V6_vrmpybusi_acc_128B : -Hexagon_v2048v2048v2048ii_Intrinsic<"HEXAGON_V6_vrmpybusi_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybusv,VI_ftype_VIVI,2) -// tag : V6_vrmpybusv -def int_hexagon_V6_vrmpybusv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vrmpybusv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybusv_128B,VI_ftype_VIVI,2) -// tag : V6_vrmpybusv_128B -def int_hexagon_V6_vrmpybusv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vrmpybusv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybusv_acc,VI_ftype_VIVIVI,3) -// tag : V6_vrmpybusv_acc -def int_hexagon_V6_vrmpybusv_acc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vrmpybusv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrmpybusv_acc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vrmpybusv_acc_128B -def int_hexagon_V6_vrmpybusv_acc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vrmpybusv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdsaduh,VD_ftype_VDSI,2) -// tag : V6_vdsaduh -def int_hexagon_V6_vdsaduh : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vdsaduh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdsaduh_128B,VD_ftype_VDSI,2) -// tag : V6_vdsaduh_128B -def int_hexagon_V6_vdsaduh_128B : -Hexagon_v2048v2048i_Intrinsic<"HEXAGON_V6_vdsaduh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdsaduh_acc,VD_ftype_VDVDSI,3) -// tag : V6_vdsaduh_acc -def int_hexagon_V6_vdsaduh_acc : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vdsaduh_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdsaduh_acc_128B,VD_ftype_VDVDSI,3) -// tag : V6_vdsaduh_acc_128B -def int_hexagon_V6_vdsaduh_acc_128B : -Hexagon_v2048v2048v2048i_Intrinsic<"HEXAGON_V6_vdsaduh_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrsadubi,VD_ftype_VDSISI,3) -// tag : V6_vrsadubi -def int_hexagon_V6_vrsadubi : -Hexagon_v1024v1024ii_Intrinsic<"HEXAGON_V6_vrsadubi">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrsadubi_128B,VD_ftype_VDSISI,3) -// tag : V6_vrsadubi_128B -def int_hexagon_V6_vrsadubi_128B : -Hexagon_v2048v2048ii_Intrinsic<"HEXAGON_V6_vrsadubi_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrsadubi_acc,VD_ftype_VDVDSISI,4) -// tag : V6_vrsadubi_acc -def int_hexagon_V6_vrsadubi_acc : -Hexagon_v1024v1024v1024ii_Intrinsic<"HEXAGON_V6_vrsadubi_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrsadubi_acc_128B,VD_ftype_VDVDSISI,4) -// tag : V6_vrsadubi_acc_128B -def int_hexagon_V6_vrsadubi_acc_128B : -Hexagon_v2048v2048v2048ii_Intrinsic<"HEXAGON_V6_vrsadubi_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrw,VI_ftype_VISI,2) -// tag : V6_vasrw -def int_hexagon_V6_vasrw : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vasrw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrw_128B,VI_ftype_VISI,2) -// tag : V6_vasrw_128B -def int_hexagon_V6_vasrw_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vasrw_128B">; - - -// -// BUILTIN_INFO(HEXAGON.V6_vaslw,VI_ftype_VISI,2) -// tag : V6_vaslw -def int_hexagon_V6_vaslw : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vaslw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslw_128B,VI_ftype_VISI,2) -// tag : V6_vaslw_128B -def int_hexagon_V6_vaslw_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vaslw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlsrw,VI_ftype_VISI,2) -// tag : V6_vlsrw -def int_hexagon_V6_vlsrw : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vlsrw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlsrw_128B,VI_ftype_VISI,2) -// tag : V6_vlsrw_128B -def int_hexagon_V6_vlsrw_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vlsrw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwv,VI_ftype_VIVI,2) -// tag : V6_vasrwv -def int_hexagon_V6_vasrwv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vasrwv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwv_128B,VI_ftype_VIVI,2) -// tag : V6_vasrwv_128B -def int_hexagon_V6_vasrwv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vasrwv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslwv,VI_ftype_VIVI,2) -// tag : V6_vaslwv -def int_hexagon_V6_vaslwv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vaslwv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslwv_128B,VI_ftype_VIVI,2) -// tag : V6_vaslwv_128B -def int_hexagon_V6_vaslwv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaslwv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlsrwv,VI_ftype_VIVI,2) -// tag : V6_vlsrwv -def int_hexagon_V6_vlsrwv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vlsrwv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlsrwv_128B,VI_ftype_VIVI,2) -// tag : V6_vlsrwv_128B -def int_hexagon_V6_vlsrwv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vlsrwv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrh,VI_ftype_VISI,2) -// tag : V6_vasrh -def int_hexagon_V6_vasrh : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vasrh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrh_128B,VI_ftype_VISI,2) -// tag : V6_vasrh_128B -def int_hexagon_V6_vasrh_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vasrh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslh,VI_ftype_VISI,2) -// tag : V6_vaslh -def int_hexagon_V6_vaslh : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vaslh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslh_128B,VI_ftype_VISI,2) -// tag : V6_vaslh_128B -def int_hexagon_V6_vaslh_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vaslh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlsrh,VI_ftype_VISI,2) -// tag : V6_vlsrh -def int_hexagon_V6_vlsrh : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vlsrh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlsrh_128B,VI_ftype_VISI,2) -// tag : V6_vlsrh_128B -def int_hexagon_V6_vlsrh_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vlsrh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrhv,VI_ftype_VIVI,2) -// tag : V6_vasrhv -def int_hexagon_V6_vasrhv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vasrhv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrhv_128B,VI_ftype_VIVI,2) -// tag : V6_vasrhv_128B -def int_hexagon_V6_vasrhv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vasrhv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslhv,VI_ftype_VIVI,2) -// tag : V6_vaslhv -def int_hexagon_V6_vaslhv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vaslhv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslhv_128B,VI_ftype_VIVI,2) -// tag : V6_vaslhv_128B -def int_hexagon_V6_vaslhv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaslhv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlsrhv,VI_ftype_VIVI,2) -// tag : V6_vlsrhv -def int_hexagon_V6_vlsrhv : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vlsrhv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlsrhv_128B,VI_ftype_VIVI,2) -// tag : V6_vlsrhv_128B -def int_hexagon_V6_vlsrhv_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vlsrhv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwh,VI_ftype_VIVISI,3) -// tag : V6_vasrwh -def int_hexagon_V6_vasrwh : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vasrwh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwh_128B,VI_ftype_VIVISI,3) -// tag : V6_vasrwh_128B -def int_hexagon_V6_vasrwh_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vasrwh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwhsat,VI_ftype_VIVISI,3) -// tag : V6_vasrwhsat -def int_hexagon_V6_vasrwhsat : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vasrwhsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwhsat_128B,VI_ftype_VIVISI,3) -// tag : V6_vasrwhsat_128B -def int_hexagon_V6_vasrwhsat_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vasrwhsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwhrndsat,VI_ftype_VIVISI,3) -// tag : V6_vasrwhrndsat -def int_hexagon_V6_vasrwhrndsat : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vasrwhrndsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwhrndsat_128B,VI_ftype_VIVISI,3) -// tag : V6_vasrwhrndsat_128B -def int_hexagon_V6_vasrwhrndsat_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vasrwhrndsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwuhsat,VI_ftype_VIVISI,3) -// tag : V6_vasrwuhsat -def int_hexagon_V6_vasrwuhsat : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vasrwuhsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrwuhsat_128B,VI_ftype_VIVISI,3) -// tag : V6_vasrwuhsat_128B -def int_hexagon_V6_vasrwuhsat_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vasrwuhsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vroundwh,VI_ftype_VIVI,2) -// tag : V6_vroundwh -def int_hexagon_V6_vroundwh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vroundwh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vroundwh_128B,VI_ftype_VIVI,2) -// tag : V6_vroundwh_128B -def int_hexagon_V6_vroundwh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vroundwh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vroundwuh,VI_ftype_VIVI,2) -// tag : V6_vroundwuh -def int_hexagon_V6_vroundwuh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vroundwuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vroundwuh_128B,VI_ftype_VIVI,2) -// tag : V6_vroundwuh_128B -def int_hexagon_V6_vroundwuh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vroundwuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrhubsat,VI_ftype_VIVISI,3) -// tag : V6_vasrhubsat -def int_hexagon_V6_vasrhubsat : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vasrhubsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrhubsat_128B,VI_ftype_VIVISI,3) -// tag : V6_vasrhubsat_128B -def int_hexagon_V6_vasrhubsat_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vasrhubsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrhubrndsat,VI_ftype_VIVISI,3) -// tag : V6_vasrhubrndsat -def int_hexagon_V6_vasrhubrndsat : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vasrhubrndsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrhubrndsat_128B,VI_ftype_VIVISI,3) -// tag : V6_vasrhubrndsat_128B -def int_hexagon_V6_vasrhubrndsat_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vasrhubrndsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrhbrndsat,VI_ftype_VIVISI,3) -// tag : V6_vasrhbrndsat -def int_hexagon_V6_vasrhbrndsat : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vasrhbrndsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrhbrndsat_128B,VI_ftype_VIVISI,3) -// tag : V6_vasrhbrndsat_128B -def int_hexagon_V6_vasrhbrndsat_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vasrhbrndsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vroundhb,VI_ftype_VIVI,2) -// tag : V6_vroundhb -def int_hexagon_V6_vroundhb : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vroundhb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vroundhb_128B,VI_ftype_VIVI,2) -// tag : V6_vroundhb_128B -def int_hexagon_V6_vroundhb_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vroundhb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vroundhub,VI_ftype_VIVI,2) -// tag : V6_vroundhub -def int_hexagon_V6_vroundhub : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vroundhub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vroundhub_128B,VI_ftype_VIVI,2) -// tag : V6_vroundhub_128B -def int_hexagon_V6_vroundhub_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vroundhub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslw_acc,VI_ftype_VIVISI,3) -// tag : V6_vaslw_acc -def int_hexagon_V6_vaslw_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vaslw_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaslw_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vaslw_acc_128B -def int_hexagon_V6_vaslw_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vaslw_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrw_acc,VI_ftype_VIVISI,3) -// tag : V6_vasrw_acc -def int_hexagon_V6_vasrw_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vasrw_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vasrw_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vasrw_acc_128B -def int_hexagon_V6_vasrw_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vasrw_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddb,VI_ftype_VIVI,2) -// tag : V6_vaddb -def int_hexagon_V6_vaddb : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vaddb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddb_128B,VI_ftype_VIVI,2) -// tag : V6_vaddb_128B -def int_hexagon_V6_vaddb_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubb,VI_ftype_VIVI,2) -// tag : V6_vsubb -def int_hexagon_V6_vsubb : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsubb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubb_128B,VI_ftype_VIVI,2) -// tag : V6_vsubb_128B -def int_hexagon_V6_vsubb_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddb_dv,VD_ftype_VDVD,2) -// tag : V6_vaddb_dv -def int_hexagon_V6_vaddb_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddb_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddb_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vaddb_dv_128B -def int_hexagon_V6_vaddb_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vaddb_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubb_dv,VD_ftype_VDVD,2) -// tag : V6_vsubb_dv -def int_hexagon_V6_vsubb_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubb_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubb_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vsubb_dv_128B -def int_hexagon_V6_vsubb_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vsubb_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddh,VI_ftype_VIVI,2) -// tag : V6_vaddh -def int_hexagon_V6_vaddh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vaddh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddh_128B,VI_ftype_VIVI,2) -// tag : V6_vaddh_128B -def int_hexagon_V6_vaddh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubh,VI_ftype_VIVI,2) -// tag : V6_vsubh -def int_hexagon_V6_vsubh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsubh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubh_128B,VI_ftype_VIVI,2) -// tag : V6_vsubh_128B -def int_hexagon_V6_vsubh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddh_dv,VD_ftype_VDVD,2) -// tag : V6_vaddh_dv -def int_hexagon_V6_vaddh_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddh_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddh_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vaddh_dv_128B -def int_hexagon_V6_vaddh_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vaddh_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubh_dv,VD_ftype_VDVD,2) -// tag : V6_vsubh_dv -def int_hexagon_V6_vsubh_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubh_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubh_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vsubh_dv_128B -def int_hexagon_V6_vsubh_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vsubh_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddw,VI_ftype_VIVI,2) -// tag : V6_vaddw -def int_hexagon_V6_vaddw : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vaddw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddw_128B,VI_ftype_VIVI,2) -// tag : V6_vaddw_128B -def int_hexagon_V6_vaddw_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubw,VI_ftype_VIVI,2) -// tag : V6_vsubw -def int_hexagon_V6_vsubw : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsubw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubw_128B,VI_ftype_VIVI,2) -// tag : V6_vsubw_128B -def int_hexagon_V6_vsubw_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddw_dv,VD_ftype_VDVD,2) -// tag : V6_vaddw_dv -def int_hexagon_V6_vaddw_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddw_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddw_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vaddw_dv_128B -def int_hexagon_V6_vaddw_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vaddw_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubw_dv,VD_ftype_VDVD,2) -// tag : V6_vsubw_dv -def int_hexagon_V6_vsubw_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubw_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubw_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vsubw_dv_128B -def int_hexagon_V6_vsubw_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vsubw_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddubsat,VI_ftype_VIVI,2) -// tag : V6_vaddubsat -def int_hexagon_V6_vaddubsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vaddubsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddubsat_128B,VI_ftype_VIVI,2) -// tag : V6_vaddubsat_128B -def int_hexagon_V6_vaddubsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddubsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddubsat_dv,VD_ftype_VDVD,2) -// tag : V6_vaddubsat_dv -def int_hexagon_V6_vaddubsat_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddubsat_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddubsat_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vaddubsat_dv_128B -def int_hexagon_V6_vaddubsat_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vaddubsat_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsububsat,VI_ftype_VIVI,2) -// tag : V6_vsububsat -def int_hexagon_V6_vsububsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsububsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsububsat_128B,VI_ftype_VIVI,2) -// tag : V6_vsububsat_128B -def int_hexagon_V6_vsububsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsububsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsububsat_dv,VD_ftype_VDVD,2) -// tag : V6_vsububsat_dv -def int_hexagon_V6_vsububsat_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsububsat_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsububsat_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vsububsat_dv_128B -def int_hexagon_V6_vsububsat_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vsububsat_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vadduhsat,VI_ftype_VIVI,2) -// tag : V6_vadduhsat -def int_hexagon_V6_vadduhsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vadduhsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vadduhsat_128B,VI_ftype_VIVI,2) -// tag : V6_vadduhsat_128B -def int_hexagon_V6_vadduhsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vadduhsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vadduhsat_dv,VD_ftype_VDVD,2) -// tag : V6_vadduhsat_dv -def int_hexagon_V6_vadduhsat_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vadduhsat_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vadduhsat_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vadduhsat_dv_128B -def int_hexagon_V6_vadduhsat_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vadduhsat_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubuhsat,VI_ftype_VIVI,2) -// tag : V6_vsubuhsat -def int_hexagon_V6_vsubuhsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsubuhsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubuhsat_128B,VI_ftype_VIVI,2) -// tag : V6_vsubuhsat_128B -def int_hexagon_V6_vsubuhsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubuhsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubuhsat_dv,VD_ftype_VDVD,2) -// tag : V6_vsubuhsat_dv -def int_hexagon_V6_vsubuhsat_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubuhsat_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubuhsat_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vsubuhsat_dv_128B -def int_hexagon_V6_vsubuhsat_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vsubuhsat_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhsat,VI_ftype_VIVI,2) -// tag : V6_vaddhsat -def int_hexagon_V6_vaddhsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vaddhsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhsat_128B,VI_ftype_VIVI,2) -// tag : V6_vaddhsat_128B -def int_hexagon_V6_vaddhsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddhsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhsat_dv,VD_ftype_VDVD,2) -// tag : V6_vaddhsat_dv -def int_hexagon_V6_vaddhsat_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddhsat_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhsat_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vaddhsat_dv_128B -def int_hexagon_V6_vaddhsat_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vaddhsat_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhsat,VI_ftype_VIVI,2) -// tag : V6_vsubhsat -def int_hexagon_V6_vsubhsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsubhsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhsat_128B,VI_ftype_VIVI,2) -// tag : V6_vsubhsat_128B -def int_hexagon_V6_vsubhsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubhsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhsat_dv,VD_ftype_VDVD,2) -// tag : V6_vsubhsat_dv -def int_hexagon_V6_vsubhsat_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubhsat_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhsat_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vsubhsat_dv_128B -def int_hexagon_V6_vsubhsat_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vsubhsat_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddwsat,VI_ftype_VIVI,2) -// tag : V6_vaddwsat -def int_hexagon_V6_vaddwsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vaddwsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddwsat_128B,VI_ftype_VIVI,2) -// tag : V6_vaddwsat_128B -def int_hexagon_V6_vaddwsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddwsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddwsat_dv,VD_ftype_VDVD,2) -// tag : V6_vaddwsat_dv -def int_hexagon_V6_vaddwsat_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vaddwsat_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddwsat_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vaddwsat_dv_128B -def int_hexagon_V6_vaddwsat_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vaddwsat_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubwsat,VI_ftype_VIVI,2) -// tag : V6_vsubwsat -def int_hexagon_V6_vsubwsat : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsubwsat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubwsat_128B,VI_ftype_VIVI,2) -// tag : V6_vsubwsat_128B -def int_hexagon_V6_vsubwsat_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubwsat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubwsat_dv,VD_ftype_VDVD,2) -// tag : V6_vsubwsat_dv -def int_hexagon_V6_vsubwsat_dv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsubwsat_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubwsat_dv_128B,VD_ftype_VDVD,2) -// tag : V6_vsubwsat_dv_128B -def int_hexagon_V6_vsubwsat_dv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vsubwsat_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgub,VI_ftype_VIVI,2) -// tag : V6_vavgub -def int_hexagon_V6_vavgub : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vavgub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgub_128B,VI_ftype_VIVI,2) -// tag : V6_vavgub_128B -def int_hexagon_V6_vavgub_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vavgub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgubrnd,VI_ftype_VIVI,2) -// tag : V6_vavgubrnd -def int_hexagon_V6_vavgubrnd : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vavgubrnd">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgubrnd_128B,VI_ftype_VIVI,2) -// tag : V6_vavgubrnd_128B -def int_hexagon_V6_vavgubrnd_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vavgubrnd_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavguh,VI_ftype_VIVI,2) -// tag : V6_vavguh -def int_hexagon_V6_vavguh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vavguh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavguh_128B,VI_ftype_VIVI,2) -// tag : V6_vavguh_128B -def int_hexagon_V6_vavguh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vavguh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavguhrnd,VI_ftype_VIVI,2) -// tag : V6_vavguhrnd -def int_hexagon_V6_vavguhrnd : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vavguhrnd">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavguhrnd_128B,VI_ftype_VIVI,2) -// tag : V6_vavguhrnd_128B -def int_hexagon_V6_vavguhrnd_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vavguhrnd_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgh,VI_ftype_VIVI,2) -// tag : V6_vavgh -def int_hexagon_V6_vavgh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vavgh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgh_128B,VI_ftype_VIVI,2) -// tag : V6_vavgh_128B -def int_hexagon_V6_vavgh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vavgh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavghrnd,VI_ftype_VIVI,2) -// tag : V6_vavghrnd -def int_hexagon_V6_vavghrnd : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vavghrnd">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavghrnd_128B,VI_ftype_VIVI,2) -// tag : V6_vavghrnd_128B -def int_hexagon_V6_vavghrnd_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vavghrnd_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnavgh,VI_ftype_VIVI,2) -// tag : V6_vnavgh -def int_hexagon_V6_vnavgh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vnavgh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnavgh_128B,VI_ftype_VIVI,2) -// tag : V6_vnavgh_128B -def int_hexagon_V6_vnavgh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vnavgh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgw,VI_ftype_VIVI,2) -// tag : V6_vavgw -def int_hexagon_V6_vavgw : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vavgw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgw_128B,VI_ftype_VIVI,2) -// tag : V6_vavgw_128B -def int_hexagon_V6_vavgw_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vavgw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgwrnd,VI_ftype_VIVI,2) -// tag : V6_vavgwrnd -def int_hexagon_V6_vavgwrnd : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vavgwrnd">; - -// -// BUILTIN_INFO(HEXAGON.V6_vavgwrnd_128B,VI_ftype_VIVI,2) -// tag : V6_vavgwrnd_128B -def int_hexagon_V6_vavgwrnd_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vavgwrnd_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnavgw,VI_ftype_VIVI,2) -// tag : V6_vnavgw -def int_hexagon_V6_vnavgw : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vnavgw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnavgw_128B,VI_ftype_VIVI,2) -// tag : V6_vnavgw_128B -def int_hexagon_V6_vnavgw_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vnavgw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsdiffub,VI_ftype_VIVI,2) -// tag : V6_vabsdiffub -def int_hexagon_V6_vabsdiffub : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vabsdiffub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsdiffub_128B,VI_ftype_VIVI,2) -// tag : V6_vabsdiffub_128B -def int_hexagon_V6_vabsdiffub_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vabsdiffub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsdiffuh,VI_ftype_VIVI,2) -// tag : V6_vabsdiffuh -def int_hexagon_V6_vabsdiffuh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vabsdiffuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsdiffuh_128B,VI_ftype_VIVI,2) -// tag : V6_vabsdiffuh_128B -def int_hexagon_V6_vabsdiffuh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vabsdiffuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsdiffh,VI_ftype_VIVI,2) -// tag : V6_vabsdiffh -def int_hexagon_V6_vabsdiffh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vabsdiffh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsdiffh_128B,VI_ftype_VIVI,2) -// tag : V6_vabsdiffh_128B -def int_hexagon_V6_vabsdiffh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vabsdiffh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsdiffw,VI_ftype_VIVI,2) -// tag : V6_vabsdiffw -def int_hexagon_V6_vabsdiffw : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vabsdiffw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsdiffw_128B,VI_ftype_VIVI,2) -// tag : V6_vabsdiffw_128B -def int_hexagon_V6_vabsdiffw_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vabsdiffw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnavgub,VI_ftype_VIVI,2) -// tag : V6_vnavgub -def int_hexagon_V6_vnavgub : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vnavgub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnavgub_128B,VI_ftype_VIVI,2) -// tag : V6_vnavgub_128B -def int_hexagon_V6_vnavgub_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vnavgub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddubh,VD_ftype_VIVI,2) -// tag : V6_vaddubh -def int_hexagon_V6_vaddubh : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vaddubh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddubh_128B,VD_ftype_VIVI,2) -// tag : V6_vaddubh_128B -def int_hexagon_V6_vaddubh_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vaddubh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsububh,VD_ftype_VIVI,2) -// tag : V6_vsububh -def int_hexagon_V6_vsububh : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vsububh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsububh_128B,VD_ftype_VIVI,2) -// tag : V6_vsububh_128B -def int_hexagon_V6_vsububh_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vsububh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhw,VD_ftype_VIVI,2) -// tag : V6_vaddhw -def int_hexagon_V6_vaddhw : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vaddhw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhw_128B,VD_ftype_VIVI,2) -// tag : V6_vaddhw_128B -def int_hexagon_V6_vaddhw_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vaddhw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhw,VD_ftype_VIVI,2) -// tag : V6_vsubhw -def int_hexagon_V6_vsubhw : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vsubhw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhw_128B,VD_ftype_VIVI,2) -// tag : V6_vsubhw_128B -def int_hexagon_V6_vsubhw_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vsubhw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vadduhw,VD_ftype_VIVI,2) -// tag : V6_vadduhw -def int_hexagon_V6_vadduhw : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vadduhw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vadduhw_128B,VD_ftype_VIVI,2) -// tag : V6_vadduhw_128B -def int_hexagon_V6_vadduhw_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vadduhw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubuhw,VD_ftype_VIVI,2) -// tag : V6_vsubuhw -def int_hexagon_V6_vsubuhw : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vsubuhw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubuhw_128B,VD_ftype_VIVI,2) -// tag : V6_vsubuhw_128B -def int_hexagon_V6_vsubuhw_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vsubuhw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vd0,VI_ftype_,0) -// tag : V6_vd0 -def int_hexagon_V6_vd0 : -Hexagon_v512_Intrinsic<"HEXAGON_V6_vd0">; - -// -// BUILTIN_INFO(HEXAGON.V6_vd0_128B,VI_ftype_,0) -// tag : V6_vd0_128B -def int_hexagon_V6_vd0_128B : -Hexagon_v1024_Intrinsic<"HEXAGON_V6_vd0_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddbq,VI_ftype_QVVIVI,3) -// tag : V6_vaddbq -def int_hexagon_V6_vaddbq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vaddbq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddbq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vaddbq_128B -def int_hexagon_V6_vaddbq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vaddbq_128B">; - - -// -// BUILTIN_INFO(HEXAGON.V6_vsubbq,VI_ftype_QVVIVI,3) -// tag : V6_vsubbq -def int_hexagon_V6_vsubbq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vsubbq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubbq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vsubbq_128B -def int_hexagon_V6_vsubbq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vsubbq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddbnq,VI_ftype_QVVIVI,3) -// tag : V6_vaddbnq -def int_hexagon_V6_vaddbnq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vaddbnq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddbnq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vaddbnq_128B -def int_hexagon_V6_vaddbnq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vaddbnq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubbnq,VI_ftype_QVVIVI,3) -// tag : V6_vsubbnq -def int_hexagon_V6_vsubbnq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vsubbnq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubbnq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vsubbnq_128B -def int_hexagon_V6_vsubbnq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vsubbnq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhq,VI_ftype_QVVIVI,3) -// tag : V6_vaddhq -def int_hexagon_V6_vaddhq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vaddhq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vaddhq_128B -def int_hexagon_V6_vaddhq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vaddhq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhq,VI_ftype_QVVIVI,3) -// tag : V6_vsubhq -def int_hexagon_V6_vsubhq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vsubhq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vsubhq_128B -def int_hexagon_V6_vsubhq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vsubhq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhnq,VI_ftype_QVVIVI,3) -// tag : V6_vaddhnq -def int_hexagon_V6_vaddhnq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vaddhnq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddhnq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vaddhnq_128B -def int_hexagon_V6_vaddhnq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vaddhnq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhnq,VI_ftype_QVVIVI,3) -// tag : V6_vsubhnq -def int_hexagon_V6_vsubhnq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vsubhnq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubhnq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vsubhnq_128B -def int_hexagon_V6_vsubhnq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vsubhnq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddwq,VI_ftype_QVVIVI,3) -// tag : V6_vaddwq -def int_hexagon_V6_vaddwq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vaddwq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddwq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vaddwq_128B -def int_hexagon_V6_vaddwq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vaddwq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubwq,VI_ftype_QVVIVI,3) -// tag : V6_vsubwq -def int_hexagon_V6_vsubwq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vsubwq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubwq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vsubwq_128B -def int_hexagon_V6_vsubwq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vsubwq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddwnq,VI_ftype_QVVIVI,3) -// tag : V6_vaddwnq -def int_hexagon_V6_vaddwnq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vaddwnq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vaddwnq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vaddwnq_128B -def int_hexagon_V6_vaddwnq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vaddwnq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubwnq,VI_ftype_QVVIVI,3) -// tag : V6_vsubwnq -def int_hexagon_V6_vsubwnq : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vsubwnq">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsubwnq_128B,VI_ftype_QVVIVI,3) -// tag : V6_vsubwnq_128B -def int_hexagon_V6_vsubwnq_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vsubwnq_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsh,VI_ftype_VI,1) -// tag : V6_vabsh -def int_hexagon_V6_vabsh : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vabsh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsh_128B,VI_ftype_VI,1) -// tag : V6_vabsh_128B -def int_hexagon_V6_vabsh_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vabsh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsh_sat,VI_ftype_VI,1) -// tag : V6_vabsh_sat -def int_hexagon_V6_vabsh_sat : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vabsh_sat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsh_sat_128B,VI_ftype_VI,1) -// tag : V6_vabsh_sat_128B -def int_hexagon_V6_vabsh_sat_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vabsh_sat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsw,VI_ftype_VI,1) -// tag : V6_vabsw -def int_hexagon_V6_vabsw : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vabsw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsw_128B,VI_ftype_VI,1) -// tag : V6_vabsw_128B -def int_hexagon_V6_vabsw_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vabsw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsw_sat,VI_ftype_VI,1) -// tag : V6_vabsw_sat -def int_hexagon_V6_vabsw_sat : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vabsw_sat">; - -// -// BUILTIN_INFO(HEXAGON.V6_vabsw_sat_128B,VI_ftype_VI,1) -// tag : V6_vabsw_sat_128B -def int_hexagon_V6_vabsw_sat_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vabsw_sat_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybv,VD_ftype_VIVI,2) -// tag : V6_vmpybv -def int_hexagon_V6_vmpybv : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vmpybv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybv_128B,VD_ftype_VIVI,2) -// tag : V6_vmpybv_128B -def int_hexagon_V6_vmpybv_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpybv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybv_acc,VD_ftype_VDVIVI,3) -// tag : V6_vmpybv_acc -def int_hexagon_V6_vmpybv_acc : -Hexagon_v1024v1024v512v512_Intrinsic<"HEXAGON_V6_vmpybv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybv_acc_128B,VD_ftype_VDVIVI,3) -// tag : V6_vmpybv_acc_128B -def int_hexagon_V6_vmpybv_acc_128B : -Hexagon_v2048v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpybv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyubv,VD_ftype_VIVI,2) -// tag : V6_vmpyubv -def int_hexagon_V6_vmpyubv : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vmpyubv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyubv_128B,VD_ftype_VIVI,2) -// tag : V6_vmpyubv_128B -def int_hexagon_V6_vmpyubv_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpyubv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyubv_acc,VD_ftype_VDVIVI,3) -// tag : V6_vmpyubv_acc -def int_hexagon_V6_vmpyubv_acc : -Hexagon_v1024v1024v512v512_Intrinsic<"HEXAGON_V6_vmpyubv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyubv_acc_128B,VD_ftype_VDVIVI,3) -// tag : V6_vmpyubv_acc_128B -def int_hexagon_V6_vmpyubv_acc_128B : -Hexagon_v2048v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpyubv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybusv,VD_ftype_VIVI,2) -// tag : V6_vmpybusv -def int_hexagon_V6_vmpybusv : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vmpybusv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybusv_128B,VD_ftype_VIVI,2) -// tag : V6_vmpybusv_128B -def int_hexagon_V6_vmpybusv_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpybusv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybusv_acc,VD_ftype_VDVIVI,3) -// tag : V6_vmpybusv_acc -def int_hexagon_V6_vmpybusv_acc : -Hexagon_v1024v1024v512v512_Intrinsic<"HEXAGON_V6_vmpybusv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybusv_acc_128B,VD_ftype_VDVIVI,3) -// tag : V6_vmpybusv_acc_128B -def int_hexagon_V6_vmpybusv_acc_128B : -Hexagon_v2048v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpybusv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpabusv,VD_ftype_VDVD,2) -// tag : V6_vmpabusv -def int_hexagon_V6_vmpabusv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpabusv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpabusv_128B,VD_ftype_VDVD,2) -// tag : V6_vmpabusv_128B -def int_hexagon_V6_vmpabusv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vmpabusv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpabuuv,VD_ftype_VDVD,2) -// tag : V6_vmpabuuv -def int_hexagon_V6_vmpabuuv : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpabuuv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpabuuv_128B,VD_ftype_VDVD,2) -// tag : V6_vmpabuuv_128B -def int_hexagon_V6_vmpabuuv_128B : -Hexagon_v2048v2048v2048_Intrinsic<"HEXAGON_V6_vmpabuuv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhv,VD_ftype_VIVI,2) -// tag : V6_vmpyhv -def int_hexagon_V6_vmpyhv : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vmpyhv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhv_128B,VD_ftype_VIVI,2) -// tag : V6_vmpyhv_128B -def int_hexagon_V6_vmpyhv_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpyhv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhv_acc,VD_ftype_VDVIVI,3) -// tag : V6_vmpyhv_acc -def int_hexagon_V6_vmpyhv_acc : -Hexagon_v1024v1024v512v512_Intrinsic<"HEXAGON_V6_vmpyhv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhv_acc_128B,VD_ftype_VDVIVI,3) -// tag : V6_vmpyhv_acc_128B -def int_hexagon_V6_vmpyhv_acc_128B : -Hexagon_v2048v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpyhv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyuhv,VD_ftype_VIVI,2) -// tag : V6_vmpyuhv -def int_hexagon_V6_vmpyuhv : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vmpyuhv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyuhv_128B,VD_ftype_VIVI,2) -// tag : V6_vmpyuhv_128B -def int_hexagon_V6_vmpyuhv_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpyuhv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyuhv_acc,VD_ftype_VDVIVI,3) -// tag : V6_vmpyuhv_acc -def int_hexagon_V6_vmpyuhv_acc : -Hexagon_v1024v1024v512v512_Intrinsic<"HEXAGON_V6_vmpyuhv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyuhv_acc_128B,VD_ftype_VDVIVI,3) -// tag : V6_vmpyuhv_acc_128B -def int_hexagon_V6_vmpyuhv_acc_128B : -Hexagon_v2048v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpyuhv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhvsrs,VI_ftype_VIVI,2) -// tag : V6_vmpyhvsrs -def int_hexagon_V6_vmpyhvsrs : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmpyhvsrs">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhvsrs_128B,VI_ftype_VIVI,2) -// tag : V6_vmpyhvsrs_128B -def int_hexagon_V6_vmpyhvsrs_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyhvsrs_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhus,VD_ftype_VIVI,2) -// tag : V6_vmpyhus -def int_hexagon_V6_vmpyhus : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vmpyhus">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhus_128B,VD_ftype_VIVI,2) -// tag : V6_vmpyhus_128B -def int_hexagon_V6_vmpyhus_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpyhus_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhus_acc,VD_ftype_VDVIVI,3) -// tag : V6_vmpyhus_acc -def int_hexagon_V6_vmpyhus_acc : -Hexagon_v1024v1024v512v512_Intrinsic<"HEXAGON_V6_vmpyhus_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhus_acc_128B,VD_ftype_VDVIVI,3) -// tag : V6_vmpyhus_acc_128B -def int_hexagon_V6_vmpyhus_acc_128B : -Hexagon_v2048v2048v1024v1024_Intrinsic<"HEXAGON_V6_vmpyhus_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyih,VI_ftype_VIVI,2) -// tag : V6_vmpyih -def int_hexagon_V6_vmpyih : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmpyih">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyih_128B,VI_ftype_VIVI,2) -// tag : V6_vmpyih_128B -def int_hexagon_V6_vmpyih_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyih_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyih_acc,VI_ftype_VIVIVI,3) -// tag : V6_vmpyih_acc -def int_hexagon_V6_vmpyih_acc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vmpyih_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyih_acc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vmpyih_acc_128B -def int_hexagon_V6_vmpyih_acc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyih_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyewuh,VI_ftype_VIVI,2) -// tag : V6_vmpyewuh -def int_hexagon_V6_vmpyewuh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmpyewuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyewuh_128B,VI_ftype_VIVI,2) -// tag : V6_vmpyewuh_128B -def int_hexagon_V6_vmpyewuh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyewuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyowh,VI_ftype_VIVI,2) -// tag : V6_vmpyowh -def int_hexagon_V6_vmpyowh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmpyowh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyowh_128B,VI_ftype_VIVI,2) -// tag : V6_vmpyowh_128B -def int_hexagon_V6_vmpyowh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyowh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyowh_rnd,VI_ftype_VIVI,2) -// tag : V6_vmpyowh_rnd -def int_hexagon_V6_vmpyowh_rnd : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmpyowh_rnd">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyowh_rnd_128B,VI_ftype_VIVI,2) -// tag : V6_vmpyowh_rnd_128B -def int_hexagon_V6_vmpyowh_rnd_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyowh_rnd_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyowh_sacc,VI_ftype_VIVIVI,3) -// tag : V6_vmpyowh_sacc -def int_hexagon_V6_vmpyowh_sacc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vmpyowh_sacc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyowh_sacc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vmpyowh_sacc_128B -def int_hexagon_V6_vmpyowh_sacc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyowh_sacc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyowh_rnd_sacc,VI_ftype_VIVIVI,3) -// tag : V6_vmpyowh_rnd_sacc -def int_hexagon_V6_vmpyowh_rnd_sacc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vmpyowh_rnd_sacc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyowh_rnd_sacc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vmpyowh_rnd_sacc_128B -def int_hexagon_V6_vmpyowh_rnd_sacc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyowh_rnd_sacc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyieoh,VI_ftype_VIVI,2) -// tag : V6_vmpyieoh -def int_hexagon_V6_vmpyieoh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmpyieoh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyieoh_128B,VI_ftype_VIVI,2) -// tag : V6_vmpyieoh_128B -def int_hexagon_V6_vmpyieoh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyieoh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiewuh,VI_ftype_VIVI,2) -// tag : V6_vmpyiewuh -def int_hexagon_V6_vmpyiewuh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmpyiewuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiewuh_128B,VI_ftype_VIVI,2) -// tag : V6_vmpyiewuh_128B -def int_hexagon_V6_vmpyiewuh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyiewuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiowh,VI_ftype_VIVI,2) -// tag : V6_vmpyiowh -def int_hexagon_V6_vmpyiowh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmpyiowh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiowh_128B,VI_ftype_VIVI,2) -// tag : V6_vmpyiowh_128B -def int_hexagon_V6_vmpyiowh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyiowh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiewh_acc,VI_ftype_VIVIVI,3) -// tag : V6_vmpyiewh_acc -def int_hexagon_V6_vmpyiewh_acc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vmpyiewh_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiewh_acc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vmpyiewh_acc_128B -def int_hexagon_V6_vmpyiewh_acc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyiewh_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiewuh_acc,VI_ftype_VIVIVI,3) -// tag : V6_vmpyiewuh_acc -def int_hexagon_V6_vmpyiewuh_acc : -Hexagon_v512v512v512v512_Intrinsic<"HEXAGON_V6_vmpyiewuh_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiewuh_acc_128B,VI_ftype_VIVIVI,3) -// tag : V6_vmpyiewuh_acc_128B -def int_hexagon_V6_vmpyiewuh_acc_128B : -Hexagon_v1024v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmpyiewuh_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyub,VD_ftype_VISI,2) -// tag : V6_vmpyub -def int_hexagon_V6_vmpyub : -Hexagon_v1024v512i_Intrinsic<"HEXAGON_V6_vmpyub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyub_128B,VD_ftype_VISI,2) -// tag : V6_vmpyub_128B -def int_hexagon_V6_vmpyub_128B : -Hexagon_v2048v1024i_Intrinsic<"HEXAGON_V6_vmpyub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyub_acc,VD_ftype_VDVISI,3) -// tag : V6_vmpyub_acc -def int_hexagon_V6_vmpyub_acc : -Hexagon_v1024v1024v512i_Intrinsic<"HEXAGON_V6_vmpyub_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyub_acc_128B,VD_ftype_VDVISI,3) -// tag : V6_vmpyub_acc_128B -def int_hexagon_V6_vmpyub_acc_128B : -Hexagon_v2048v2048v1024i_Intrinsic<"HEXAGON_V6_vmpyub_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybus,VD_ftype_VISI,2) -// tag : V6_vmpybus -def int_hexagon_V6_vmpybus : -Hexagon_v1024v512i_Intrinsic<"HEXAGON_V6_vmpybus">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybus_128B,VD_ftype_VISI,2) -// tag : V6_vmpybus_128B -def int_hexagon_V6_vmpybus_128B : -Hexagon_v2048v1024i_Intrinsic<"HEXAGON_V6_vmpybus_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybus_acc,VD_ftype_VDVISI,3) -// tag : V6_vmpybus_acc -def int_hexagon_V6_vmpybus_acc : -Hexagon_v1024v1024v512i_Intrinsic<"HEXAGON_V6_vmpybus_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpybus_acc_128B,VD_ftype_VDVISI,3) -// tag : V6_vmpybus_acc_128B -def int_hexagon_V6_vmpybus_acc_128B : -Hexagon_v2048v2048v1024i_Intrinsic<"HEXAGON_V6_vmpybus_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpabus,VD_ftype_VDSI,2) -// tag : V6_vmpabus -def int_hexagon_V6_vmpabus : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vmpabus">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpabus_128B,VD_ftype_VDSI,2) -// tag : V6_vmpabus_128B -def int_hexagon_V6_vmpabus_128B : -Hexagon_v2048v2048i_Intrinsic<"HEXAGON_V6_vmpabus_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpabus_acc,VD_ftype_VDVDSI,3) -// tag : V6_vmpabus_acc -def int_hexagon_V6_vmpabus_acc : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vmpabus_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpabus_acc_128B,VD_ftype_VDVDSI,3) -// tag : V6_vmpabus_acc_128B -def int_hexagon_V6_vmpabus_acc_128B : -Hexagon_v2048v2048v2048i_Intrinsic<"HEXAGON_V6_vmpabus_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpahb,VD_ftype_VDSI,2) -// tag : V6_vmpahb -def int_hexagon_V6_vmpahb : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vmpahb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpahb_128B,VD_ftype_VDSI,2) -// tag : V6_vmpahb_128B -def int_hexagon_V6_vmpahb_128B : -Hexagon_v2048v2048i_Intrinsic<"HEXAGON_V6_vmpahb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpahb_acc,VD_ftype_VDVDSI,3) -// tag : V6_vmpahb_acc -def int_hexagon_V6_vmpahb_acc : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vmpahb_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpahb_acc_128B,VD_ftype_VDVDSI,3) -// tag : V6_vmpahb_acc_128B -def int_hexagon_V6_vmpahb_acc_128B : -Hexagon_v2048v2048v2048i_Intrinsic<"HEXAGON_V6_vmpahb_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyh,VD_ftype_VISI,2) -// tag : V6_vmpyh -def int_hexagon_V6_vmpyh : -Hexagon_v1024v512i_Intrinsic<"HEXAGON_V6_vmpyh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyh_128B,VD_ftype_VISI,2) -// tag : V6_vmpyh_128B -def int_hexagon_V6_vmpyh_128B : -Hexagon_v2048v1024i_Intrinsic<"HEXAGON_V6_vmpyh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhsat_acc,VD_ftype_VDVISI,3) -// tag : V6_vmpyhsat_acc -def int_hexagon_V6_vmpyhsat_acc : -Hexagon_v1024v1024v512i_Intrinsic<"HEXAGON_V6_vmpyhsat_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhsat_acc_128B,VD_ftype_VDVISI,3) -// tag : V6_vmpyhsat_acc_128B -def int_hexagon_V6_vmpyhsat_acc_128B : -Hexagon_v2048v2048v1024i_Intrinsic<"HEXAGON_V6_vmpyhsat_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhss,VI_ftype_VISI,2) -// tag : V6_vmpyhss -def int_hexagon_V6_vmpyhss : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vmpyhss">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhss_128B,VI_ftype_VISI,2) -// tag : V6_vmpyhss_128B -def int_hexagon_V6_vmpyhss_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vmpyhss_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhsrs,VI_ftype_VISI,2) -// tag : V6_vmpyhsrs -def int_hexagon_V6_vmpyhsrs : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vmpyhsrs">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyhsrs_128B,VI_ftype_VISI,2) -// tag : V6_vmpyhsrs_128B -def int_hexagon_V6_vmpyhsrs_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vmpyhsrs_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyuh,VD_ftype_VISI,2) -// tag : V6_vmpyuh -def int_hexagon_V6_vmpyuh : -Hexagon_v1024v512i_Intrinsic<"HEXAGON_V6_vmpyuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyuh_128B,VD_ftype_VISI,2) -// tag : V6_vmpyuh_128B -def int_hexagon_V6_vmpyuh_128B : -Hexagon_v2048v1024i_Intrinsic<"HEXAGON_V6_vmpyuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyuh_acc,VD_ftype_VDVISI,3) -// tag : V6_vmpyuh_acc -def int_hexagon_V6_vmpyuh_acc : -Hexagon_v1024v1024v512i_Intrinsic<"HEXAGON_V6_vmpyuh_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyuh_acc_128B,VD_ftype_VDVISI,3) -// tag : V6_vmpyuh_acc_128B -def int_hexagon_V6_vmpyuh_acc_128B : -Hexagon_v2048v2048v1024i_Intrinsic<"HEXAGON_V6_vmpyuh_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyihb,VI_ftype_VISI,2) -// tag : V6_vmpyihb -def int_hexagon_V6_vmpyihb : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vmpyihb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyihb_128B,VI_ftype_VISI,2) -// tag : V6_vmpyihb_128B -def int_hexagon_V6_vmpyihb_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vmpyihb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyihb_acc,VI_ftype_VIVISI,3) -// tag : V6_vmpyihb_acc -def int_hexagon_V6_vmpyihb_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vmpyihb_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyihb_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vmpyihb_acc_128B -def int_hexagon_V6_vmpyihb_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vmpyihb_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiwb,VI_ftype_VISI,2) -// tag : V6_vmpyiwb -def int_hexagon_V6_vmpyiwb : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vmpyiwb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiwb_128B,VI_ftype_VISI,2) -// tag : V6_vmpyiwb_128B -def int_hexagon_V6_vmpyiwb_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vmpyiwb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiwb_acc,VI_ftype_VIVISI,3) -// tag : V6_vmpyiwb_acc -def int_hexagon_V6_vmpyiwb_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vmpyiwb_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiwb_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vmpyiwb_acc_128B -def int_hexagon_V6_vmpyiwb_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vmpyiwb_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiwh,VI_ftype_VISI,2) -// tag : V6_vmpyiwh -def int_hexagon_V6_vmpyiwh : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vmpyiwh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiwh_128B,VI_ftype_VISI,2) -// tag : V6_vmpyiwh_128B -def int_hexagon_V6_vmpyiwh_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vmpyiwh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiwh_acc,VI_ftype_VIVISI,3) -// tag : V6_vmpyiwh_acc -def int_hexagon_V6_vmpyiwh_acc : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vmpyiwh_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmpyiwh_acc_128B,VI_ftype_VIVISI,3) -// tag : V6_vmpyiwh_acc_128B -def int_hexagon_V6_vmpyiwh_acc_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vmpyiwh_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vand,VI_ftype_VIVI,2) -// tag : V6_vand -def int_hexagon_V6_vand : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vand">; - -// -// BUILTIN_INFO(HEXAGON.V6_vand_128B,VI_ftype_VIVI,2) -// tag : V6_vand_128B -def int_hexagon_V6_vand_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vand_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vor,VI_ftype_VIVI,2) -// tag : V6_vor -def int_hexagon_V6_vor : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vor">; - -// -// BUILTIN_INFO(HEXAGON.V6_vor_128B,VI_ftype_VIVI,2) -// tag : V6_vor_128B -def int_hexagon_V6_vor_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vxor,VI_ftype_VIVI,2) -// tag : V6_vxor -def int_hexagon_V6_vxor : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vxor">; - -// -// BUILTIN_INFO(HEXAGON.V6_vxor_128B,VI_ftype_VIVI,2) -// tag : V6_vxor_128B -def int_hexagon_V6_vxor_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vxor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnot,VI_ftype_VI,1) -// tag : V6_vnot -def int_hexagon_V6_vnot : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vnot">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnot_128B,VI_ftype_VI,1) -// tag : V6_vnot_128B -def int_hexagon_V6_vnot_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vnot_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vandqrt,VI_ftype_QVSI,2) -// tag : V6_vandqrt -def int_hexagon_V6_vandqrt : -Hexagon_v512v64ii_Intrinsic<"HEXAGON_V6_vandqrt">; - -// -// BUILTIN_INFO(HEXAGON.V6_vandqrt_128B,VI_ftype_QVSI,2) -// tag : V6_vandqrt_128B -def int_hexagon_V6_vandqrt_128B : -Hexagon_v1024v128ii_Intrinsic<"HEXAGON_V6_vandqrt_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vandqrt_acc,VI_ftype_VIQVSI,3) -// tag : V6_vandqrt_acc -def int_hexagon_V6_vandqrt_acc : -Hexagon_v512v512v64ii_Intrinsic<"HEXAGON_V6_vandqrt_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vandqrt_acc_128B,VI_ftype_VIQVSI,3) -// tag : V6_vandqrt_acc_128B -def int_hexagon_V6_vandqrt_acc_128B : -Hexagon_v1024v1024v128ii_Intrinsic<"HEXAGON_V6_vandqrt_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vandvrt,QV_ftype_VISI,2) -// tag : V6_vandvrt -def int_hexagon_V6_vandvrt : -Hexagon_v64iv512i_Intrinsic<"HEXAGON_V6_vandvrt">; - -// -// BUILTIN_INFO(HEXAGON.V6_vandvrt_128B,QV_ftype_VISI,2) -// tag : V6_vandvrt_128B -def int_hexagon_V6_vandvrt_128B : -Hexagon_v128iv1024i_Intrinsic<"HEXAGON_V6_vandvrt_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vandvrt_acc,QV_ftype_QVVISI,3) -// tag : V6_vandvrt_acc -def int_hexagon_V6_vandvrt_acc : -Hexagon_v64iv64iv512i_Intrinsic<"HEXAGON_V6_vandvrt_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vandvrt_acc_128B,QV_ftype_QVVISI,3) -// tag : V6_vandvrt_acc_128B -def int_hexagon_V6_vandvrt_acc_128B : -Hexagon_v128iv128iv1024i_Intrinsic<"HEXAGON_V6_vandvrt_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtw,QV_ftype_VIVI,2) -// tag : V6_vgtw -def int_hexagon_V6_vgtw : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_vgtw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtw_128B,QV_ftype_VIVI,2) -// tag : V6_vgtw_128B -def int_hexagon_V6_vgtw_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtw_and,QV_ftype_QVVIVI,3) -// tag : V6_vgtw_and -def int_hexagon_V6_vgtw_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtw_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtw_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtw_and_128B -def int_hexagon_V6_vgtw_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtw_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtw_or,QV_ftype_QVVIVI,3) -// tag : V6_vgtw_or -def int_hexagon_V6_vgtw_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtw_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtw_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtw_or_128B -def int_hexagon_V6_vgtw_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtw_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtw_xor,QV_ftype_QVVIVI,3) -// tag : V6_vgtw_xor -def int_hexagon_V6_vgtw_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtw_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtw_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtw_xor_128B -def int_hexagon_V6_vgtw_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtw_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqw,QV_ftype_VIVI,2) -// tag : V6_veqw -def int_hexagon_V6_veqw : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_veqw">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqw_128B,QV_ftype_VIVI,2) -// tag : V6_veqw_128B -def int_hexagon_V6_veqw_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_veqw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqw_and,QV_ftype_QVVIVI,3) -// tag : V6_veqw_and -def int_hexagon_V6_veqw_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqw_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqw_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqw_and_128B -def int_hexagon_V6_veqw_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqw_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqw_or,QV_ftype_QVVIVI,3) -// tag : V6_veqw_or -def int_hexagon_V6_veqw_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqw_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqw_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqw_or_128B -def int_hexagon_V6_veqw_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqw_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqw_xor,QV_ftype_QVVIVI,3) -// tag : V6_veqw_xor -def int_hexagon_V6_veqw_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqw_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqw_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqw_xor_128B -def int_hexagon_V6_veqw_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqw_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgth,QV_ftype_VIVI,2) -// tag : V6_vgth -def int_hexagon_V6_vgth : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_vgth">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgth_128B,QV_ftype_VIVI,2) -// tag : V6_vgth_128B -def int_hexagon_V6_vgth_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_vgth_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgth_and,QV_ftype_QVVIVI,3) -// tag : V6_vgth_and -def int_hexagon_V6_vgth_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgth_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgth_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgth_and_128B -def int_hexagon_V6_vgth_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgth_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgth_or,QV_ftype_QVVIVI,3) -// tag : V6_vgth_or -def int_hexagon_V6_vgth_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgth_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgth_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgth_or_128B -def int_hexagon_V6_vgth_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgth_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgth_xor,QV_ftype_QVVIVI,3) -// tag : V6_vgth_xor -def int_hexagon_V6_vgth_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgth_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgth_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgth_xor_128B -def int_hexagon_V6_vgth_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgth_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqh,QV_ftype_VIVI,2) -// tag : V6_veqh -def int_hexagon_V6_veqh : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_veqh">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqh_128B,QV_ftype_VIVI,2) -// tag : V6_veqh_128B -def int_hexagon_V6_veqh_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_veqh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqh_and,QV_ftype_QVVIVI,3) -// tag : V6_veqh_and -def int_hexagon_V6_veqh_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqh_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqh_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqh_and_128B -def int_hexagon_V6_veqh_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqh_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqh_or,QV_ftype_QVVIVI,3) -// tag : V6_veqh_or -def int_hexagon_V6_veqh_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqh_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqh_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqh_or_128B -def int_hexagon_V6_veqh_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqh_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqh_xor,QV_ftype_QVVIVI,3) -// tag : V6_veqh_xor -def int_hexagon_V6_veqh_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqh_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqh_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqh_xor_128B -def int_hexagon_V6_veqh_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqh_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtb,QV_ftype_VIVI,2) -// tag : V6_vgtb -def int_hexagon_V6_vgtb : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_vgtb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtb_128B,QV_ftype_VIVI,2) -// tag : V6_vgtb_128B -def int_hexagon_V6_vgtb_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtb_and,QV_ftype_QVVIVI,3) -// tag : V6_vgtb_and -def int_hexagon_V6_vgtb_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtb_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtb_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtb_and_128B -def int_hexagon_V6_vgtb_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtb_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtb_or,QV_ftype_QVVIVI,3) -// tag : V6_vgtb_or -def int_hexagon_V6_vgtb_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtb_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtb_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtb_or_128B -def int_hexagon_V6_vgtb_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtb_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtb_xor,QV_ftype_QVVIVI,3) -// tag : V6_vgtb_xor -def int_hexagon_V6_vgtb_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtb_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtb_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtb_xor_128B -def int_hexagon_V6_vgtb_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtb_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqb,QV_ftype_VIVI,2) -// tag : V6_veqb -def int_hexagon_V6_veqb : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_veqb">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqb_128B,QV_ftype_VIVI,2) -// tag : V6_veqb_128B -def int_hexagon_V6_veqb_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_veqb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqb_and,QV_ftype_QVVIVI,3) -// tag : V6_veqb_and -def int_hexagon_V6_veqb_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqb_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqb_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqb_and_128B -def int_hexagon_V6_veqb_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqb_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqb_or,QV_ftype_QVVIVI,3) -// tag : V6_veqb_or -def int_hexagon_V6_veqb_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqb_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqb_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqb_or_128B -def int_hexagon_V6_veqb_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqb_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqb_xor,QV_ftype_QVVIVI,3) -// tag : V6_veqb_xor -def int_hexagon_V6_veqb_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_veqb_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_veqb_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_veqb_xor_128B -def int_hexagon_V6_veqb_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_veqb_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuw,QV_ftype_VIVI,2) -// tag : V6_vgtuw -def int_hexagon_V6_vgtuw : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_vgtuw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuw_128B,QV_ftype_VIVI,2) -// tag : V6_vgtuw_128B -def int_hexagon_V6_vgtuw_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtuw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuw_and,QV_ftype_QVVIVI,3) -// tag : V6_vgtuw_and -def int_hexagon_V6_vgtuw_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtuw_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuw_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtuw_and_128B -def int_hexagon_V6_vgtuw_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtuw_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuw_or,QV_ftype_QVVIVI,3) -// tag : V6_vgtuw_or -def int_hexagon_V6_vgtuw_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtuw_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuw_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtuw_or_128B -def int_hexagon_V6_vgtuw_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtuw_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuw_xor,QV_ftype_QVVIVI,3) -// tag : V6_vgtuw_xor -def int_hexagon_V6_vgtuw_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtuw_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuw_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtuw_xor_128B -def int_hexagon_V6_vgtuw_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtuw_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuh,QV_ftype_VIVI,2) -// tag : V6_vgtuh -def int_hexagon_V6_vgtuh : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_vgtuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuh_128B,QV_ftype_VIVI,2) -// tag : V6_vgtuh_128B -def int_hexagon_V6_vgtuh_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuh_and,QV_ftype_QVVIVI,3) -// tag : V6_vgtuh_and -def int_hexagon_V6_vgtuh_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtuh_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuh_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtuh_and_128B -def int_hexagon_V6_vgtuh_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtuh_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuh_or,QV_ftype_QVVIVI,3) -// tag : V6_vgtuh_or -def int_hexagon_V6_vgtuh_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtuh_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuh_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtuh_or_128B -def int_hexagon_V6_vgtuh_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtuh_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuh_xor,QV_ftype_QVVIVI,3) -// tag : V6_vgtuh_xor -def int_hexagon_V6_vgtuh_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtuh_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtuh_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtuh_xor_128B -def int_hexagon_V6_vgtuh_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtuh_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtub,QV_ftype_VIVI,2) -// tag : V6_vgtub -def int_hexagon_V6_vgtub : -Hexagon_v64iv512v512_Intrinsic<"HEXAGON_V6_vgtub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtub_128B,QV_ftype_VIVI,2) -// tag : V6_vgtub_128B -def int_hexagon_V6_vgtub_128B : -Hexagon_v128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtub_and,QV_ftype_QVVIVI,3) -// tag : V6_vgtub_and -def int_hexagon_V6_vgtub_and : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtub_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtub_and_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtub_and_128B -def int_hexagon_V6_vgtub_and_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtub_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtub_or,QV_ftype_QVVIVI,3) -// tag : V6_vgtub_or -def int_hexagon_V6_vgtub_or : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtub_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtub_or_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtub_or_128B -def int_hexagon_V6_vgtub_or_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtub_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtub_xor,QV_ftype_QVVIVI,3) -// tag : V6_vgtub_xor -def int_hexagon_V6_vgtub_xor : -Hexagon_v64iv64iv512v512_Intrinsic<"HEXAGON_V6_vgtub_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_vgtub_xor_128B,QV_ftype_QVVIVI,3) -// tag : V6_vgtub_xor_128B -def int_hexagon_V6_vgtub_xor_128B : -Hexagon_v128iv128iv1024v1024_Intrinsic<"HEXAGON_V6_vgtub_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_or,QV_ftype_QVQV,2) -// tag : V6_pred_or -def int_hexagon_V6_pred_or : -Hexagon_v64iv64iv64i_Intrinsic<"HEXAGON_V6_pred_or">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_or_128B,QV_ftype_QVQV,2) -// tag : V6_pred_or_128B -def int_hexagon_V6_pred_or_128B : -Hexagon_v128iv128iv128i_Intrinsic<"HEXAGON_V6_pred_or_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_and,QV_ftype_QVQV,2) -// tag : V6_pred_and -def int_hexagon_V6_pred_and : -Hexagon_v64iv64iv64i_Intrinsic<"HEXAGON_V6_pred_and">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_and_128B,QV_ftype_QVQV,2) -// tag : V6_pred_and_128B -def int_hexagon_V6_pred_and_128B : -Hexagon_v128iv128iv128i_Intrinsic<"HEXAGON_V6_pred_and_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_not,QV_ftype_QV,1) -// tag : V6_pred_not -def int_hexagon_V6_pred_not : -Hexagon_v64iv64i_Intrinsic<"HEXAGON_V6_pred_not">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_not_128B,QV_ftype_QV,1) -// tag : V6_pred_not_128B -def int_hexagon_V6_pred_not_128B : -Hexagon_v128iv128i_Intrinsic<"HEXAGON_V6_pred_not_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_xor,QV_ftype_QVQV,2) -// tag : V6_pred_xor -def int_hexagon_V6_pred_xor : -Hexagon_v64iv64iv64i_Intrinsic<"HEXAGON_V6_pred_xor">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_xor_128B,QV_ftype_QVQV,2) -// tag : V6_pred_xor_128B -def int_hexagon_V6_pred_xor_128B : -Hexagon_v128iv128iv128i_Intrinsic<"HEXAGON_V6_pred_xor_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_and_n,QV_ftype_QVQV,2) -// tag : V6_pred_and_n -def int_hexagon_V6_pred_and_n : -Hexagon_v64iv64iv64i_Intrinsic<"HEXAGON_V6_pred_and_n">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_and_n_128B,QV_ftype_QVQV,2) -// tag : V6_pred_and_n_128B -def int_hexagon_V6_pred_and_n_128B : -Hexagon_v128iv128iv128i_Intrinsic<"HEXAGON_V6_pred_and_n_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_or_n,QV_ftype_QVQV,2) -// tag : V6_pred_or_n -def int_hexagon_V6_pred_or_n : -Hexagon_v64iv64iv64i_Intrinsic<"HEXAGON_V6_pred_or_n">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_or_n_128B,QV_ftype_QVQV,2) -// tag : V6_pred_or_n_128B -def int_hexagon_V6_pred_or_n_128B : -Hexagon_v128iv128iv128i_Intrinsic<"HEXAGON_V6_pred_or_n_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_scalar2,QV_ftype_SI,1) -// tag : V6_pred_scalar2 -def int_hexagon_V6_pred_scalar2 : -Hexagon_v64ii_Intrinsic<"HEXAGON_V6_pred_scalar2">; - -// -// BUILTIN_INFO(HEXAGON.V6_pred_scalar2_128B,QV_ftype_SI,1) -// tag : V6_pred_scalar2_128B -def int_hexagon_V6_pred_scalar2_128B : -Hexagon_v128ii_Intrinsic<"HEXAGON_V6_pred_scalar2_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmux,VI_ftype_QVVIVI,3) -// tag : V6_vmux -def int_hexagon_V6_vmux : -Hexagon_v512v64iv512v512_Intrinsic<"HEXAGON_V6_vmux">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmux_128B,VI_ftype_QVVIVI,3) -// tag : V6_vmux_128B -def int_hexagon_V6_vmux_128B : -Hexagon_v1024v128iv1024v1024_Intrinsic<"HEXAGON_V6_vmux_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vswap,VD_ftype_QVVIVI,3) -// tag : V6_vswap -def int_hexagon_V6_vswap : -Hexagon_v1024v64iv512v512_Intrinsic<"HEXAGON_V6_vswap">; - -// -// BUILTIN_INFO(HEXAGON.V6_vswap_128B,VD_ftype_QVVIVI,3) -// tag : V6_vswap_128B -def int_hexagon_V6_vswap_128B : -Hexagon_v2048v128iv1024v1024_Intrinsic<"HEXAGON_V6_vswap_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmaxub,VI_ftype_VIVI,2) -// tag : V6_vmaxub -def int_hexagon_V6_vmaxub : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmaxub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmaxub_128B,VI_ftype_VIVI,2) -// tag : V6_vmaxub_128B -def int_hexagon_V6_vmaxub_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmaxub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vminub,VI_ftype_VIVI,2) -// tag : V6_vminub -def int_hexagon_V6_vminub : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vminub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vminub_128B,VI_ftype_VIVI,2) -// tag : V6_vminub_128B -def int_hexagon_V6_vminub_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vminub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmaxuh,VI_ftype_VIVI,2) -// tag : V6_vmaxuh -def int_hexagon_V6_vmaxuh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmaxuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmaxuh_128B,VI_ftype_VIVI,2) -// tag : V6_vmaxuh_128B -def int_hexagon_V6_vmaxuh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmaxuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vminuh,VI_ftype_VIVI,2) -// tag : V6_vminuh -def int_hexagon_V6_vminuh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vminuh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vminuh_128B,VI_ftype_VIVI,2) -// tag : V6_vminuh_128B -def int_hexagon_V6_vminuh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vminuh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmaxh,VI_ftype_VIVI,2) -// tag : V6_vmaxh -def int_hexagon_V6_vmaxh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmaxh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmaxh_128B,VI_ftype_VIVI,2) -// tag : V6_vmaxh_128B -def int_hexagon_V6_vmaxh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmaxh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vminh,VI_ftype_VIVI,2) -// tag : V6_vminh -def int_hexagon_V6_vminh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vminh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vminh_128B,VI_ftype_VIVI,2) -// tag : V6_vminh_128B -def int_hexagon_V6_vminh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vminh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmaxw,VI_ftype_VIVI,2) -// tag : V6_vmaxw -def int_hexagon_V6_vmaxw : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vmaxw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vmaxw_128B,VI_ftype_VIVI,2) -// tag : V6_vmaxw_128B -def int_hexagon_V6_vmaxw_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vmaxw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vminw,VI_ftype_VIVI,2) -// tag : V6_vminw -def int_hexagon_V6_vminw : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vminw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vminw_128B,VI_ftype_VIVI,2) -// tag : V6_vminw_128B -def int_hexagon_V6_vminw_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vminw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsathub,VI_ftype_VIVI,2) -// tag : V6_vsathub -def int_hexagon_V6_vsathub : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsathub">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsathub_128B,VI_ftype_VIVI,2) -// tag : V6_vsathub_128B -def int_hexagon_V6_vsathub_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsathub_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsatwh,VI_ftype_VIVI,2) -// tag : V6_vsatwh -def int_hexagon_V6_vsatwh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vsatwh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vsatwh_128B,VI_ftype_VIVI,2) -// tag : V6_vsatwh_128B -def int_hexagon_V6_vsatwh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vsatwh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffeb,VI_ftype_VIVI,2) -// tag : V6_vshuffeb -def int_hexagon_V6_vshuffeb : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vshuffeb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffeb_128B,VI_ftype_VIVI,2) -// tag : V6_vshuffeb_128B -def int_hexagon_V6_vshuffeb_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vshuffeb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffob,VI_ftype_VIVI,2) -// tag : V6_vshuffob -def int_hexagon_V6_vshuffob : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vshuffob">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffob_128B,VI_ftype_VIVI,2) -// tag : V6_vshuffob_128B -def int_hexagon_V6_vshuffob_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vshuffob_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshufeh,VI_ftype_VIVI,2) -// tag : V6_vshufeh -def int_hexagon_V6_vshufeh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vshufeh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshufeh_128B,VI_ftype_VIVI,2) -// tag : V6_vshufeh_128B -def int_hexagon_V6_vshufeh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vshufeh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshufoh,VI_ftype_VIVI,2) -// tag : V6_vshufoh -def int_hexagon_V6_vshufoh : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vshufoh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshufoh_128B,VI_ftype_VIVI,2) -// tag : V6_vshufoh_128B -def int_hexagon_V6_vshufoh_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vshufoh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffvdd,VD_ftype_VIVISI,3) -// tag : V6_vshuffvdd -def int_hexagon_V6_vshuffvdd : -Hexagon_v1024v512v512i_Intrinsic<"HEXAGON_V6_vshuffvdd">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffvdd_128B,VD_ftype_VIVISI,3) -// tag : V6_vshuffvdd_128B -def int_hexagon_V6_vshuffvdd_128B : -Hexagon_v2048v1024v1024i_Intrinsic<"HEXAGON_V6_vshuffvdd_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdealvdd,VD_ftype_VIVISI,3) -// tag : V6_vdealvdd -def int_hexagon_V6_vdealvdd : -Hexagon_v1024v512v512i_Intrinsic<"HEXAGON_V6_vdealvdd">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdealvdd_128B,VD_ftype_VIVISI,3) -// tag : V6_vdealvdd_128B -def int_hexagon_V6_vdealvdd_128B : -Hexagon_v2048v1024v1024i_Intrinsic<"HEXAGON_V6_vdealvdd_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshufoeh,VD_ftype_VIVI,2) -// tag : V6_vshufoeh -def int_hexagon_V6_vshufoeh : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vshufoeh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshufoeh_128B,VD_ftype_VIVI,2) -// tag : V6_vshufoeh_128B -def int_hexagon_V6_vshufoeh_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vshufoeh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshufoeb,VD_ftype_VIVI,2) -// tag : V6_vshufoeb -def int_hexagon_V6_vshufoeb : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vshufoeb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshufoeb_128B,VD_ftype_VIVI,2) -// tag : V6_vshufoeb_128B -def int_hexagon_V6_vshufoeb_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vshufoeb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdealh,VI_ftype_VI,1) -// tag : V6_vdealh -def int_hexagon_V6_vdealh : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vdealh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdealh_128B,VI_ftype_VI,1) -// tag : V6_vdealh_128B -def int_hexagon_V6_vdealh_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vdealh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdealb,VI_ftype_VI,1) -// tag : V6_vdealb -def int_hexagon_V6_vdealb : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vdealb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdealb_128B,VI_ftype_VI,1) -// tag : V6_vdealb_128B -def int_hexagon_V6_vdealb_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vdealb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdealb4w,VI_ftype_VIVI,2) -// tag : V6_vdealb4w -def int_hexagon_V6_vdealb4w : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vdealb4w">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdealb4w_128B,VI_ftype_VIVI,2) -// tag : V6_vdealb4w_128B -def int_hexagon_V6_vdealb4w_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vdealb4w_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffh,VI_ftype_VI,1) -// tag : V6_vshuffh -def int_hexagon_V6_vshuffh : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vshuffh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffh_128B,VI_ftype_VI,1) -// tag : V6_vshuffh_128B -def int_hexagon_V6_vshuffh_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vshuffh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffb,VI_ftype_VI,1) -// tag : V6_vshuffb -def int_hexagon_V6_vshuffb : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vshuffb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vshuffb_128B,VI_ftype_VI,1) -// tag : V6_vshuffb_128B -def int_hexagon_V6_vshuffb_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vshuffb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_extractw,SI_ftype_VISI,2) -// tag : V6_extractw -def int_hexagon_V6_extractw : -Hexagon_iv512i_Intrinsic<"HEXAGON_V6_extractw">; - -// -// BUILTIN_INFO(HEXAGON.V6_extractw_128B,SI_ftype_VISI,2) -// tag : V6_extractw_128B -def int_hexagon_V6_extractw_128B : -Hexagon_iv1024i_Intrinsic<"HEXAGON_V6_extractw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vinsertwr,VI_ftype_VISI,2) -// tag : V6_vinsertwr -def int_hexagon_V6_vinsertwr : -Hexagon_v512v512i_Intrinsic<"HEXAGON_V6_vinsertwr">; - -// -// BUILTIN_INFO(HEXAGON.V6_vinsertwr_128B,VI_ftype_VISI,2) -// tag : V6_vinsertwr_128B -def int_hexagon_V6_vinsertwr_128B : -Hexagon_v1024v1024i_Intrinsic<"HEXAGON_V6_vinsertwr_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_lvsplatw,VI_ftype_SI,1) -// tag : V6_lvsplatw -def int_hexagon_V6_lvsplatw : -Hexagon_v512i_Intrinsic<"HEXAGON_V6_lvsplatw">; - -// -// BUILTIN_INFO(HEXAGON.V6_lvsplatw_128B,VI_ftype_SI,1) -// tag : V6_lvsplatw_128B -def int_hexagon_V6_lvsplatw_128B : -Hexagon_v1024i_Intrinsic<"HEXAGON_V6_lvsplatw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vassign,VI_ftype_VI,1) -// tag : V6_vassign -def int_hexagon_V6_vassign : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vassign">; - -// -// BUILTIN_INFO(HEXAGON.V6_vassign_128B,VI_ftype_VI,1) -// tag : V6_vassign_128B -def int_hexagon_V6_vassign_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vassign_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vcombine,VD_ftype_VIVI,2) -// tag : V6_vcombine -def int_hexagon_V6_vcombine : -Hexagon_v1024v512v512_Intrinsic<"HEXAGON_V6_vcombine">; - -// -// BUILTIN_INFO(HEXAGON.V6_vcombine_128B,VD_ftype_VIVI,2) -// tag : V6_vcombine_128B -def int_hexagon_V6_vcombine_128B : -Hexagon_v2048v1024v1024_Intrinsic<"HEXAGON_V6_vcombine_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutb,VI_ftype_VIDISI,3) -// tag : V6_vlutb -def int_hexagon_V6_vlutb : -Hexagon_v512v512LLii_Intrinsic<"HEXAGON_V6_vlutb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutb_128B,VI_ftype_VIDISI,3) -// tag : V6_vlutb_128B -def int_hexagon_V6_vlutb_128B : -Hexagon_v1024v1024LLii_Intrinsic<"HEXAGON_V6_vlutb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutb_acc,VI_ftype_VIVIDISI,4) -// tag : V6_vlutb_acc -def int_hexagon_V6_vlutb_acc : -Hexagon_v512v512v512LLii_Intrinsic<"HEXAGON_V6_vlutb_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutb_acc_128B,VI_ftype_VIVIDISI,4) -// tag : V6_vlutb_acc_128B -def int_hexagon_V6_vlutb_acc_128B : -Hexagon_v1024v1024v1024LLii_Intrinsic<"HEXAGON_V6_vlutb_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutb_dv,VD_ftype_VDDISI,3) -// tag : V6_vlutb_dv -def int_hexagon_V6_vlutb_dv : -Hexagon_v1024v1024LLii_Intrinsic<"HEXAGON_V6_vlutb_dv">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutb_dv_128B,VD_ftype_VDDISI,3) -// tag : V6_vlutb_dv_128B -def int_hexagon_V6_vlutb_dv_128B : -Hexagon_v2048v2048LLii_Intrinsic<"HEXAGON_V6_vlutb_dv_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutb_dv_acc,VD_ftype_VDVDDISI,4) -// tag : V6_vlutb_dv_acc -def int_hexagon_V6_vlutb_dv_acc : -Hexagon_v1024v1024v1024LLii_Intrinsic<"HEXAGON_V6_vlutb_dv_acc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutb_dv_acc_128B,VD_ftype_VDVDDISI,4) -// tag : V6_vlutb_dv_acc_128B -def int_hexagon_V6_vlutb_dv_acc_128B : -Hexagon_v2048v2048v2048LLii_Intrinsic<"HEXAGON_V6_vlutb_dv_acc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdelta,VI_ftype_VIVI,2) -// tag : V6_vdelta -def int_hexagon_V6_vdelta : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vdelta">; - -// -// BUILTIN_INFO(HEXAGON.V6_vdelta_128B,VI_ftype_VIVI,2) -// tag : V6_vdelta_128B -def int_hexagon_V6_vdelta_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vdelta_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrdelta,VI_ftype_VIVI,2) -// tag : V6_vrdelta -def int_hexagon_V6_vrdelta : -Hexagon_v512v512v512_Intrinsic<"HEXAGON_V6_vrdelta">; - -// -// BUILTIN_INFO(HEXAGON.V6_vrdelta_128B,VI_ftype_VIVI,2) -// tag : V6_vrdelta_128B -def int_hexagon_V6_vrdelta_128B : -Hexagon_v1024v1024v1024_Intrinsic<"HEXAGON_V6_vrdelta_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vcl0w,VI_ftype_VI,1) -// tag : V6_vcl0w -def int_hexagon_V6_vcl0w : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vcl0w">; - -// -// BUILTIN_INFO(HEXAGON.V6_vcl0w_128B,VI_ftype_VI,1) -// tag : V6_vcl0w_128B -def int_hexagon_V6_vcl0w_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vcl0w_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vcl0h,VI_ftype_VI,1) -// tag : V6_vcl0h -def int_hexagon_V6_vcl0h : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vcl0h">; - -// -// BUILTIN_INFO(HEXAGON.V6_vcl0h_128B,VI_ftype_VI,1) -// tag : V6_vcl0h_128B -def int_hexagon_V6_vcl0h_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vcl0h_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnormamtw,VI_ftype_VI,1) -// tag : V6_vnormamtw -def int_hexagon_V6_vnormamtw : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vnormamtw">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnormamtw_128B,VI_ftype_VI,1) -// tag : V6_vnormamtw_128B -def int_hexagon_V6_vnormamtw_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vnormamtw_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnormamth,VI_ftype_VI,1) -// tag : V6_vnormamth -def int_hexagon_V6_vnormamth : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vnormamth">; - -// -// BUILTIN_INFO(HEXAGON.V6_vnormamth_128B,VI_ftype_VI,1) -// tag : V6_vnormamth_128B -def int_hexagon_V6_vnormamth_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vnormamth_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpopcounth,VI_ftype_VI,1) -// tag : V6_vpopcounth -def int_hexagon_V6_vpopcounth : -Hexagon_v512v512_Intrinsic<"HEXAGON_V6_vpopcounth">; - -// -// BUILTIN_INFO(HEXAGON.V6_vpopcounth_128B,VI_ftype_VI,1) -// tag : V6_vpopcounth_128B -def int_hexagon_V6_vpopcounth_128B : -Hexagon_v1024v1024_Intrinsic<"HEXAGON_V6_vpopcounth_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutvvb,VI_ftype_VIVISI,3) -// tag : V6_vlutvvb -def int_hexagon_V6_vlutvvb : -Hexagon_v512v512v512i_Intrinsic<"HEXAGON_V6_vlutvvb">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutvvb_128B,VI_ftype_VIVISI,3) -// tag : V6_vlutvvb_128B -def int_hexagon_V6_vlutvvb_128B : -Hexagon_v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vlutvvb_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutvvb_oracc,VI_ftype_VIVIVISI,4) -// tag : V6_vlutvvb_oracc -def int_hexagon_V6_vlutvvb_oracc : -Hexagon_v512v512v512v512i_Intrinsic<"HEXAGON_V6_vlutvvb_oracc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutvvb_oracc_128B,VI_ftype_VIVIVISI,4) -// tag : V6_vlutvvb_oracc_128B -def int_hexagon_V6_vlutvvb_oracc_128B : -Hexagon_v1024v1024v1024v1024i_Intrinsic<"HEXAGON_V6_vlutvvb_oracc_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutvwh,VD_ftype_VIVISI,3) -// tag : V6_vlutvwh -def int_hexagon_V6_vlutvwh : -Hexagon_v1024v512v512i_Intrinsic<"HEXAGON_V6_vlutvwh">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutvwh_128B,VD_ftype_VIVISI,3) -// tag : V6_vlutvwh_128B -def int_hexagon_V6_vlutvwh_128B : -Hexagon_v2048v1024v1024i_Intrinsic<"HEXAGON_V6_vlutvwh_128B">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutvwh_oracc,VD_ftype_VDVIVISI,4) -// tag : V6_vlutvwh_oracc -def int_hexagon_V6_vlutvwh_oracc : -Hexagon_v1024v1024v512v512i_Intrinsic<"HEXAGON_V6_vlutvwh_oracc">; - -// -// BUILTIN_INFO(HEXAGON.V6_vlutvwh_oracc_128B,VD_ftype_VDVIVISI,4) -// tag : V6_vlutvwh_oracc_128B -def int_hexagon_V6_vlutvwh_oracc_128B : -Hexagon_v2048v2048v1024v1024i_Intrinsic<"HEXAGON_V6_vlutvwh_oracc_128B">; - -// -// BUILTIN_INFO(HEXAGON.M6_vabsdiffb,DI_ftype_DIDI,2) -// tag : M6_vabsdiffb -def int_hexagon_M6_vabsdiffb : -Hexagon_LLiLLiLLi_Intrinsic<"HEXAGON_M6_vabsdiffb">; - -// -// BUILTIN_INFO(HEXAGON.M6_vabsdiffub,DI_ftype_DIDI,2) -// tag : M6_vabsdiffub -def int_hexagon_M6_vabsdiffub : -Hexagon_LLiLLiLLi_Intrinsic<"HEXAGON_M6_vabsdiffub">; - -// -// BUILTIN_INFO(HEXAGON.S6_vsplatrbp,DI_ftype_SI,1) -// tag : S6_vsplatrbp -def int_hexagon_S6_vsplatrbp : -Hexagon_LLii_Intrinsic<"HEXAGON_S6_vsplatrbp">; - -// -// BUILTIN_INFO(HEXAGON.S6_vtrunehb_ppp,DI_ftype_DIDI,2) -// tag : S6_vtrunehb_ppp -def int_hexagon_S6_vtrunehb_ppp : -Hexagon_LLiLLiLLi_Intrinsic<"HEXAGON_S6_vtrunehb_ppp">; - -// -// BUILTIN_INFO(HEXAGON.S6_vtrunohb_ppp,DI_ftype_DIDI,2) -// tag : S6_vtrunohb_ppp -def int_hexagon_S6_vtrunohb_ppp : -Hexagon_LLiLLiLLi_Intrinsic<"HEXAGON_S6_vtrunohb_ppp">; diff --git a/llvm/include/llvm/IR/IntrinsicsMips.td b/llvm/include/llvm/IR/IntrinsicsMips.td deleted file mode 100644 index 421a79be..00000000 --- a/llvm/include/llvm/IR/IntrinsicsMips.td +++ /dev/null @@ -1,1771 +0,0 @@ -//===- IntrinsicsMips.td - Defines Mips intrinsics ---------*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the MIPS-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -//===----------------------------------------------------------------------===// -// MIPS DSP data types -def mips_v2q15_ty: LLVMType; -def mips_v4q7_ty: LLVMType; -def mips_q31_ty: LLVMType; - -let TargetPrefix = "mips" in { // All intrinsics start with "llvm.mips.". - -//===----------------------------------------------------------------------===// -// MIPS DSP Rev 1 - -//===----------------------------------------------------------------------===// -// Addition/subtraction - -def int_mips_addu_qb : GCCBuiltin<"__builtin_mips_addu_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_addu_s_qb : GCCBuiltin<"__builtin_mips_addu_s_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_subu_qb : GCCBuiltin<"__builtin_mips_subu_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_subu_s_qb : GCCBuiltin<"__builtin_mips_subu_s_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrNoMem]>; - -def int_mips_addq_ph : GCCBuiltin<"__builtin_mips_addq_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], - [Commutative, IntrNoMem]>; -def int_mips_addq_s_ph : GCCBuiltin<"__builtin_mips_addq_s_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], - [Commutative, IntrNoMem]>; -def int_mips_subq_ph : GCCBuiltin<"__builtin_mips_subq_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>; -def int_mips_subq_s_ph : GCCBuiltin<"__builtin_mips_subq_s_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>; - -def int_mips_madd: GCCBuiltin<"__builtin_mips_madd">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; -def int_mips_maddu: GCCBuiltin<"__builtin_mips_maddu">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - -def int_mips_msub: GCCBuiltin<"__builtin_mips_msub">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_msubu: GCCBuiltin<"__builtin_mips_msubu">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_addq_s_w: GCCBuiltin<"__builtin_mips_addq_s_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [Commutative]>; -def int_mips_subq_s_w: GCCBuiltin<"__builtin_mips_subq_s_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], []>; - -def int_mips_addsc: GCCBuiltin<"__builtin_mips_addsc">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [Commutative]>; -def int_mips_addwc: GCCBuiltin<"__builtin_mips_addwc">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [Commutative]>; - -def int_mips_modsub: GCCBuiltin<"__builtin_mips_modsub">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_raddu_w_qb: GCCBuiltin<"__builtin_mips_raddu_w_qb">, - Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty], [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// Absolute value - -def int_mips_absq_s_ph: GCCBuiltin<"__builtin_mips_absq_s_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty], []>; -def int_mips_absq_s_w: GCCBuiltin<"__builtin_mips_absq_s_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty], []>; - -//===----------------------------------------------------------------------===// -// Precision reduce/expand - -def int_mips_precrq_qb_ph: GCCBuiltin<"__builtin_mips_precrq_qb_ph">, - Intrinsic<[llvm_v4i8_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>; -def int_mips_precrqu_s_qb_ph: GCCBuiltin<"__builtin_mips_precrqu_s_qb_ph">, - Intrinsic<[llvm_v4i8_ty], [mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_precrq_ph_w: GCCBuiltin<"__builtin_mips_precrq_ph_w">, - Intrinsic<[mips_v2q15_ty], [mips_q31_ty, mips_q31_ty], [IntrNoMem]>; -def int_mips_precrq_rs_ph_w: GCCBuiltin<"__builtin_mips_precrq_rs_ph_w">, - Intrinsic<[mips_v2q15_ty], [mips_q31_ty, mips_q31_ty], []>; -def int_mips_preceq_w_phl: GCCBuiltin<"__builtin_mips_preceq_w_phl">, - Intrinsic<[mips_q31_ty], [mips_v2q15_ty], [IntrNoMem]>; -def int_mips_preceq_w_phr: GCCBuiltin<"__builtin_mips_preceq_w_phr">, - Intrinsic<[mips_q31_ty], [mips_v2q15_ty], [IntrNoMem]>; -def int_mips_precequ_ph_qbl: GCCBuiltin<"__builtin_mips_precequ_ph_qbl">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_precequ_ph_qbr: GCCBuiltin<"__builtin_mips_precequ_ph_qbr">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_precequ_ph_qbla: GCCBuiltin<"__builtin_mips_precequ_ph_qbla">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_precequ_ph_qbra: GCCBuiltin<"__builtin_mips_precequ_ph_qbra">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_preceu_ph_qbl: GCCBuiltin<"__builtin_mips_preceu_ph_qbl">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_preceu_ph_qbr: GCCBuiltin<"__builtin_mips_preceu_ph_qbr">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_preceu_ph_qbla: GCCBuiltin<"__builtin_mips_preceu_ph_qbla">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_preceu_ph_qbra: GCCBuiltin<"__builtin_mips_preceu_ph_qbra">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty], [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// Shift - -def int_mips_shll_qb: GCCBuiltin<"__builtin_mips_shll_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_i32_ty], []>; -def int_mips_shrl_qb: GCCBuiltin<"__builtin_mips_shrl_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_shll_ph: GCCBuiltin<"__builtin_mips_shll_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, llvm_i32_ty], []>; -def int_mips_shll_s_ph: GCCBuiltin<"__builtin_mips_shll_s_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, llvm_i32_ty], []>; -def int_mips_shra_ph: GCCBuiltin<"__builtin_mips_shra_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_shra_r_ph: GCCBuiltin<"__builtin_mips_shra_r_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_shll_s_w: GCCBuiltin<"__builtin_mips_shll_s_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, llvm_i32_ty], []>; -def int_mips_shra_r_w: GCCBuiltin<"__builtin_mips_shra_r_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_shilo: GCCBuiltin<"__builtin_mips_shilo">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty], [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// Multiplication - -def int_mips_muleu_s_ph_qbl: GCCBuiltin<"__builtin_mips_muleu_s_ph_qbl">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty, mips_v2q15_ty], []>; -def int_mips_muleu_s_ph_qbr: GCCBuiltin<"__builtin_mips_muleu_s_ph_qbr">, - Intrinsic<[mips_v2q15_ty], [llvm_v4i8_ty, mips_v2q15_ty], []>; -def int_mips_mulq_rs_ph: GCCBuiltin<"__builtin_mips_mulq_rs_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>; -def int_mips_muleq_s_w_phl: GCCBuiltin<"__builtin_mips_muleq_s_w_phl">, - Intrinsic<[mips_q31_ty], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>; -def int_mips_muleq_s_w_phr: GCCBuiltin<"__builtin_mips_muleq_s_w_phr">, - Intrinsic<[mips_q31_ty], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>; -def int_mips_mulsaq_s_w_ph: GCCBuiltin<"__builtin_mips_mulsaq_s_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_maq_s_w_phl: GCCBuiltin<"__builtin_mips_maq_s_w_phl">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_maq_s_w_phr: GCCBuiltin<"__builtin_mips_maq_s_w_phr">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_maq_sa_w_phl: GCCBuiltin<"__builtin_mips_maq_sa_w_phl">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_maq_sa_w_phr: GCCBuiltin<"__builtin_mips_maq_sa_w_phr">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_mult: GCCBuiltin<"__builtin_mips_mult">, - Intrinsic<[llvm_i64_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; -def int_mips_multu: GCCBuiltin<"__builtin_mips_multu">, - Intrinsic<[llvm_i64_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - -//===----------------------------------------------------------------------===// -// Dot product with accumulate/subtract - -def int_mips_dpau_h_qbl: GCCBuiltin<"__builtin_mips_dpau_h_qbl">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v4i8_ty, llvm_v4i8_ty], - [IntrNoMem]>; -def int_mips_dpau_h_qbr: GCCBuiltin<"__builtin_mips_dpau_h_qbr">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v4i8_ty, llvm_v4i8_ty], - [IntrNoMem]>; -def int_mips_dpsu_h_qbl: GCCBuiltin<"__builtin_mips_dpsu_h_qbl">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v4i8_ty, llvm_v4i8_ty], - [IntrNoMem]>; -def int_mips_dpsu_h_qbr: GCCBuiltin<"__builtin_mips_dpsu_h_qbr">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v4i8_ty, llvm_v4i8_ty], - [IntrNoMem]>; -def int_mips_dpaq_s_w_ph: GCCBuiltin<"__builtin_mips_dpaq_s_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_dpsq_s_w_ph: GCCBuiltin<"__builtin_mips_dpsq_s_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_dpaq_sa_l_w: GCCBuiltin<"__builtin_mips_dpaq_sa_l_w">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_q31_ty, mips_q31_ty], []>; -def int_mips_dpsq_sa_l_w: GCCBuiltin<"__builtin_mips_dpsq_sa_l_w">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_q31_ty, mips_q31_ty], []>; - -//===----------------------------------------------------------------------===// -// Comparison - -def int_mips_cmpu_eq_qb: GCCBuiltin<"__builtin_mips_cmpu_eq_qb">, - Intrinsic<[], [llvm_v4i8_ty, llvm_v4i8_ty], [Commutative]>; -def int_mips_cmpu_lt_qb: GCCBuiltin<"__builtin_mips_cmpu_lt_qb">, - Intrinsic<[], [llvm_v4i8_ty, llvm_v4i8_ty], []>; -def int_mips_cmpu_le_qb: GCCBuiltin<"__builtin_mips_cmpu_le_qb">, - Intrinsic<[], [llvm_v4i8_ty, llvm_v4i8_ty], []>; -def int_mips_cmpgu_eq_qb: GCCBuiltin<"__builtin_mips_cmpgu_eq_qb">, - Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [Commutative]>; -def int_mips_cmpgu_lt_qb: GCCBuiltin<"__builtin_mips_cmpgu_lt_qb">, - Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], []>; -def int_mips_cmpgu_le_qb: GCCBuiltin<"__builtin_mips_cmpgu_le_qb">, - Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], []>; -def int_mips_cmp_eq_ph: GCCBuiltin<"__builtin_mips_cmp_eq_ph">, - Intrinsic<[], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>; -def int_mips_cmp_lt_ph: GCCBuiltin<"__builtin_mips_cmp_lt_ph">, - Intrinsic<[], [mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_cmp_le_ph: GCCBuiltin<"__builtin_mips_cmp_le_ph">, - Intrinsic<[], [mips_v2q15_ty, mips_v2q15_ty], []>; - -//===----------------------------------------------------------------------===// -// Extracting - -def int_mips_extr_s_h: GCCBuiltin<"__builtin_mips_extr_s_h">, - Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>; -def int_mips_extr_w: GCCBuiltin<"__builtin_mips_extr_w">, - Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>; -def int_mips_extr_rs_w: GCCBuiltin<"__builtin_mips_extr_rs_w">, - Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>; -def int_mips_extr_r_w: GCCBuiltin<"__builtin_mips_extr_r_w">, - Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>; -def int_mips_extp: GCCBuiltin<"__builtin_mips_extp">, - Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>; -def int_mips_extpdp: GCCBuiltin<"__builtin_mips_extpdp">, - Intrinsic<[llvm_i32_ty], [llvm_i64_ty, llvm_i32_ty], []>; - -//===----------------------------------------------------------------------===// -// Misc - -def int_mips_wrdsp: GCCBuiltin<"__builtin_mips_wrdsp">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], []>; -def int_mips_rddsp: GCCBuiltin<"__builtin_mips_rddsp">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrReadMem]>; - -def int_mips_insv: GCCBuiltin<"__builtin_mips_insv">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrReadMem]>; -def int_mips_bitrev: GCCBuiltin<"__builtin_mips_bitrev">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>; - -def int_mips_packrl_ph: GCCBuiltin<"__builtin_mips_packrl_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>; - -def int_mips_repl_qb: GCCBuiltin<"__builtin_mips_repl_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_mips_repl_ph: GCCBuiltin<"__builtin_mips_repl_ph">, - Intrinsic<[mips_v2q15_ty], [llvm_i32_ty], [IntrNoMem]>; - -def int_mips_pick_qb: GCCBuiltin<"__builtin_mips_pick_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrReadMem]>; -def int_mips_pick_ph: GCCBuiltin<"__builtin_mips_pick_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrReadMem]>; - -def int_mips_mthlip: GCCBuiltin<"__builtin_mips_mthlip">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty], []>; - -def int_mips_bposge32: GCCBuiltin<"__builtin_mips_bposge32">, - Intrinsic<[llvm_i32_ty], [], [IntrReadMem]>; - -def int_mips_lbux: GCCBuiltin<"__builtin_mips_lbux">, - Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], [IntrReadMem, IntrArgMemOnly]>; -def int_mips_lhx: GCCBuiltin<"__builtin_mips_lhx">, - Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], [IntrReadMem, IntrArgMemOnly]>; -def int_mips_lwx: GCCBuiltin<"__builtin_mips_lwx">, - Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], [IntrReadMem, IntrArgMemOnly]>; - -//===----------------------------------------------------------------------===// -// MIPS DSP Rev 2 - -def int_mips_absq_s_qb: GCCBuiltin<"__builtin_mips_absq_s_qb">, - Intrinsic<[mips_v4q7_ty], [mips_v4q7_ty], []>; - -def int_mips_addqh_ph: GCCBuiltin<"__builtin_mips_addqh_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], - [IntrNoMem, Commutative]>; -def int_mips_addqh_r_ph: GCCBuiltin<"__builtin_mips_addqh_r_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], - [IntrNoMem, Commutative]>; -def int_mips_addqh_w: GCCBuiltin<"__builtin_mips_addqh_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], - [IntrNoMem, Commutative]>; -def int_mips_addqh_r_w: GCCBuiltin<"__builtin_mips_addqh_r_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], - [IntrNoMem, Commutative]>; - -def int_mips_addu_ph: GCCBuiltin<"__builtin_mips_addu_ph">, - Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], [Commutative]>; -def int_mips_addu_s_ph: GCCBuiltin<"__builtin_mips_addu_s_ph">, - Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], [Commutative]>; - -def int_mips_adduh_qb: GCCBuiltin<"__builtin_mips_adduh_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], - [IntrNoMem, Commutative]>; -def int_mips_adduh_r_qb: GCCBuiltin<"__builtin_mips_adduh_r_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], - [IntrNoMem, Commutative]>; - -def int_mips_append: GCCBuiltin<"__builtin_mips_append">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_balign: GCCBuiltin<"__builtin_mips_balign">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_cmpgdu_eq_qb: GCCBuiltin<"__builtin_mips_cmpgdu_eq_qb">, - Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [Commutative]>; -def int_mips_cmpgdu_lt_qb: GCCBuiltin<"__builtin_mips_cmpgdu_lt_qb">, - Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], []>; -def int_mips_cmpgdu_le_qb: GCCBuiltin<"__builtin_mips_cmpgdu_le_qb">, - Intrinsic<[llvm_i32_ty], [llvm_v4i8_ty, llvm_v4i8_ty], []>; - -def int_mips_dpa_w_ph: GCCBuiltin<"__builtin_mips_dpa_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty], - [IntrNoMem]>; -def int_mips_dps_w_ph: GCCBuiltin<"__builtin_mips_dps_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty], - [IntrNoMem]>; - -def int_mips_dpaqx_s_w_ph: GCCBuiltin<"__builtin_mips_dpaqx_s_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_dpaqx_sa_w_ph: GCCBuiltin<"__builtin_mips_dpaqx_sa_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_dpax_w_ph: GCCBuiltin<"__builtin_mips_dpax_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty], - [IntrNoMem]>; -def int_mips_dpsx_w_ph: GCCBuiltin<"__builtin_mips_dpsx_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty], - [IntrNoMem]>; -def int_mips_dpsqx_s_w_ph: GCCBuiltin<"__builtin_mips_dpsqx_s_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; -def int_mips_dpsqx_sa_w_ph: GCCBuiltin<"__builtin_mips_dpsqx_sa_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, mips_v2q15_ty, mips_v2q15_ty], []>; - -def int_mips_mul_ph: GCCBuiltin<"__builtin_mips_mul_ph">, - Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], [Commutative]>; -def int_mips_mul_s_ph: GCCBuiltin<"__builtin_mips_mul_s_ph">, - Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], [Commutative]>; - -def int_mips_mulq_rs_w: GCCBuiltin<"__builtin_mips_mulq_rs_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [Commutative]>; -def int_mips_mulq_s_ph: GCCBuiltin<"__builtin_mips_mulq_s_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [Commutative]>; -def int_mips_mulq_s_w: GCCBuiltin<"__builtin_mips_mulq_s_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [Commutative]>; -def int_mips_mulsa_w_ph: GCCBuiltin<"__builtin_mips_mulsa_w_ph">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_v2i16_ty, llvm_v2i16_ty], - [IntrNoMem]>; - -def int_mips_precr_qb_ph: GCCBuiltin<"__builtin_mips_precr_qb_ph">, - Intrinsic<[llvm_v4i8_ty], [llvm_v2i16_ty, llvm_v2i16_ty], []>; -def int_mips_precr_sra_ph_w: GCCBuiltin<"__builtin_mips_precr_sra_ph_w">, - Intrinsic<[llvm_v2i16_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_precr_sra_r_ph_w: GCCBuiltin<"__builtin_mips_precr_sra_r_ph_w">, - Intrinsic<[llvm_v2i16_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_prepend: GCCBuiltin<"__builtin_mips_prepend">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_shra_qb: GCCBuiltin<"__builtin_mips_shra_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_shra_r_qb: GCCBuiltin<"__builtin_mips_shra_r_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_shrl_ph: GCCBuiltin<"__builtin_mips_shrl_ph">, - Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_subqh_ph: GCCBuiltin<"__builtin_mips_subqh_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>; -def int_mips_subqh_r_ph: GCCBuiltin<"__builtin_mips_subqh_r_ph">, - Intrinsic<[mips_v2q15_ty], [mips_v2q15_ty, mips_v2q15_ty], [IntrNoMem]>; -def int_mips_subqh_w: GCCBuiltin<"__builtin_mips_subqh_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [IntrNoMem]>; -def int_mips_subqh_r_w: GCCBuiltin<"__builtin_mips_subqh_r_w">, - Intrinsic<[mips_q31_ty], [mips_q31_ty, mips_q31_ty], [IntrNoMem]>; - -def int_mips_subu_ph: GCCBuiltin<"__builtin_mips_subu_ph">, - Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], []>; -def int_mips_subu_s_ph: GCCBuiltin<"__builtin_mips_subu_s_ph">, - Intrinsic<[llvm_v2i16_ty], [llvm_v2i16_ty, llvm_v2i16_ty], []>; - -def int_mips_subuh_qb: GCCBuiltin<"__builtin_mips_subuh_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrNoMem]>; -def int_mips_subuh_r_qb: GCCBuiltin<"__builtin_mips_subuh_r_qb">, - Intrinsic<[llvm_v4i8_ty], [llvm_v4i8_ty, llvm_v4i8_ty], [IntrNoMem]>; - -//===----------------------------------------------------------------------===// -// MIPS MSA - -//===----------------------------------------------------------------------===// -// Addition/subtraction - -def int_mips_add_a_b : GCCBuiltin<"__builtin_msa_add_a_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_add_a_h : GCCBuiltin<"__builtin_msa_add_a_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_add_a_w : GCCBuiltin<"__builtin_msa_add_a_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_add_a_d : GCCBuiltin<"__builtin_msa_add_a_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_adds_a_b : GCCBuiltin<"__builtin_msa_adds_a_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_a_h : GCCBuiltin<"__builtin_msa_adds_a_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_a_w : GCCBuiltin<"__builtin_msa_adds_a_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_a_d : GCCBuiltin<"__builtin_msa_adds_a_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_adds_s_b : GCCBuiltin<"__builtin_msa_adds_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_s_h : GCCBuiltin<"__builtin_msa_adds_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_s_w : GCCBuiltin<"__builtin_msa_adds_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_s_d : GCCBuiltin<"__builtin_msa_adds_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_adds_u_b : GCCBuiltin<"__builtin_msa_adds_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_u_h : GCCBuiltin<"__builtin_msa_adds_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_u_w : GCCBuiltin<"__builtin_msa_adds_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_adds_u_d : GCCBuiltin<"__builtin_msa_adds_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_addv_b : GCCBuiltin<"__builtin_msa_addv_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_addv_h : GCCBuiltin<"__builtin_msa_addv_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_addv_w : GCCBuiltin<"__builtin_msa_addv_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_addv_d : GCCBuiltin<"__builtin_msa_addv_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_addvi_b : GCCBuiltin<"__builtin_msa_addvi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_addvi_h : GCCBuiltin<"__builtin_msa_addvi_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_addvi_w : GCCBuiltin<"__builtin_msa_addvi_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_addvi_d : GCCBuiltin<"__builtin_msa_addvi_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], - [Commutative, IntrNoMem]>; - -def int_mips_and_v : GCCBuiltin<"__builtin_msa_and_v">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; - -def int_mips_andi_b : GCCBuiltin<"__builtin_msa_andi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_asub_s_b : GCCBuiltin<"__builtin_msa_asub_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_asub_s_h : GCCBuiltin<"__builtin_msa_asub_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_asub_s_w : GCCBuiltin<"__builtin_msa_asub_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_asub_s_d : GCCBuiltin<"__builtin_msa_asub_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_asub_u_b : GCCBuiltin<"__builtin_msa_asub_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_asub_u_h : GCCBuiltin<"__builtin_msa_asub_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_asub_u_w : GCCBuiltin<"__builtin_msa_asub_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_asub_u_d : GCCBuiltin<"__builtin_msa_asub_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_ave_s_b : GCCBuiltin<"__builtin_msa_ave_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_ave_s_h : GCCBuiltin<"__builtin_msa_ave_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_ave_s_w : GCCBuiltin<"__builtin_msa_ave_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_ave_s_d : GCCBuiltin<"__builtin_msa_ave_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_ave_u_b : GCCBuiltin<"__builtin_msa_ave_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_ave_u_h : GCCBuiltin<"__builtin_msa_ave_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_ave_u_w : GCCBuiltin<"__builtin_msa_ave_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_ave_u_d : GCCBuiltin<"__builtin_msa_ave_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_aver_s_b : GCCBuiltin<"__builtin_msa_aver_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_aver_s_h : GCCBuiltin<"__builtin_msa_aver_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_aver_s_w : GCCBuiltin<"__builtin_msa_aver_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_aver_s_d : GCCBuiltin<"__builtin_msa_aver_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_aver_u_b : GCCBuiltin<"__builtin_msa_aver_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [Commutative, IntrNoMem]>; -def int_mips_aver_u_h : GCCBuiltin<"__builtin_msa_aver_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [Commutative, IntrNoMem]>; -def int_mips_aver_u_w : GCCBuiltin<"__builtin_msa_aver_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [Commutative, IntrNoMem]>; -def int_mips_aver_u_d : GCCBuiltin<"__builtin_msa_aver_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [Commutative, IntrNoMem]>; - -def int_mips_bclr_b : GCCBuiltin<"__builtin_msa_bclr_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_bclr_h : GCCBuiltin<"__builtin_msa_bclr_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_bclr_w : GCCBuiltin<"__builtin_msa_bclr_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_bclr_d : GCCBuiltin<"__builtin_msa_bclr_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_bclri_b : GCCBuiltin<"__builtin_msa_bclri_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bclri_h : GCCBuiltin<"__builtin_msa_bclri_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bclri_w : GCCBuiltin<"__builtin_msa_bclri_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bclri_d : GCCBuiltin<"__builtin_msa_bclri_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_binsl_b : GCCBuiltin<"__builtin_msa_binsl_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_binsl_h : GCCBuiltin<"__builtin_msa_binsl_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_binsl_w : GCCBuiltin<"__builtin_msa_binsl_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -def int_mips_binsl_d : GCCBuiltin<"__builtin_msa_binsl_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - -def int_mips_binsli_b : GCCBuiltin<"__builtin_msa_binsli_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_binsli_h : GCCBuiltin<"__builtin_msa_binsli_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_binsli_w : GCCBuiltin<"__builtin_msa_binsli_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_binsli_d : GCCBuiltin<"__builtin_msa_binsli_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_binsr_b : GCCBuiltin<"__builtin_msa_binsr_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_binsr_h : GCCBuiltin<"__builtin_msa_binsr_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_binsr_w : GCCBuiltin<"__builtin_msa_binsr_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -def int_mips_binsr_d : GCCBuiltin<"__builtin_msa_binsr_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - -def int_mips_binsri_b : GCCBuiltin<"__builtin_msa_binsri_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_binsri_h : GCCBuiltin<"__builtin_msa_binsri_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_binsri_w : GCCBuiltin<"__builtin_msa_binsri_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_binsri_d : GCCBuiltin<"__builtin_msa_binsri_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_bmnz_v : GCCBuiltin<"__builtin_msa_bmnz_v">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - -def int_mips_bmnzi_b : GCCBuiltin<"__builtin_msa_bmnzi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_bmz_v : GCCBuiltin<"__builtin_msa_bmz_v">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - -def int_mips_bmzi_b : GCCBuiltin<"__builtin_msa_bmzi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_bneg_b : GCCBuiltin<"__builtin_msa_bneg_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_bneg_h : GCCBuiltin<"__builtin_msa_bneg_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_bneg_w : GCCBuiltin<"__builtin_msa_bneg_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_bneg_d : GCCBuiltin<"__builtin_msa_bneg_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_bnegi_b : GCCBuiltin<"__builtin_msa_bnegi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bnegi_h : GCCBuiltin<"__builtin_msa_bnegi_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bnegi_w : GCCBuiltin<"__builtin_msa_bnegi_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bnegi_d : GCCBuiltin<"__builtin_msa_bnegi_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_bnz_b : GCCBuiltin<"__builtin_msa_bnz_b">, - Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_bnz_h : GCCBuiltin<"__builtin_msa_bnz_h">, - Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_bnz_w : GCCBuiltin<"__builtin_msa_bnz_w">, - Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_bnz_d : GCCBuiltin<"__builtin_msa_bnz_d">, - Intrinsic<[llvm_i32_ty], [llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_bnz_v : GCCBuiltin<"__builtin_msa_bnz_v">, - Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>; - -def int_mips_bsel_v : GCCBuiltin<"__builtin_msa_bsel_v">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - -def int_mips_bseli_b : GCCBuiltin<"__builtin_msa_bseli_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_bset_b : GCCBuiltin<"__builtin_msa_bset_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_bset_h : GCCBuiltin<"__builtin_msa_bset_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_bset_w : GCCBuiltin<"__builtin_msa_bset_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_bset_d : GCCBuiltin<"__builtin_msa_bset_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_bseti_b : GCCBuiltin<"__builtin_msa_bseti_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bseti_h : GCCBuiltin<"__builtin_msa_bseti_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bseti_w : GCCBuiltin<"__builtin_msa_bseti_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_bseti_d : GCCBuiltin<"__builtin_msa_bseti_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_bz_b : GCCBuiltin<"__builtin_msa_bz_b">, - Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_bz_h : GCCBuiltin<"__builtin_msa_bz_h">, - Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_bz_w : GCCBuiltin<"__builtin_msa_bz_w">, - Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_bz_d : GCCBuiltin<"__builtin_msa_bz_d">, - Intrinsic<[llvm_i32_ty], [llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_bz_v : GCCBuiltin<"__builtin_msa_bz_v">, - Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>; - -def int_mips_ceq_b : GCCBuiltin<"__builtin_msa_ceq_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_ceq_h : GCCBuiltin<"__builtin_msa_ceq_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_ceq_w : GCCBuiltin<"__builtin_msa_ceq_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_ceq_d : GCCBuiltin<"__builtin_msa_ceq_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_ceqi_b : GCCBuiltin<"__builtin_msa_ceqi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_ceqi_h : GCCBuiltin<"__builtin_msa_ceqi_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_ceqi_w : GCCBuiltin<"__builtin_msa_ceqi_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_ceqi_d : GCCBuiltin<"__builtin_msa_ceqi_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_cfcmsa : GCCBuiltin<"__builtin_msa_cfcmsa">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; - -def int_mips_cle_s_b : GCCBuiltin<"__builtin_msa_cle_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_cle_s_h : GCCBuiltin<"__builtin_msa_cle_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_cle_s_w : GCCBuiltin<"__builtin_msa_cle_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_cle_s_d : GCCBuiltin<"__builtin_msa_cle_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_cle_u_b : GCCBuiltin<"__builtin_msa_cle_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_cle_u_h : GCCBuiltin<"__builtin_msa_cle_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_cle_u_w : GCCBuiltin<"__builtin_msa_cle_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_cle_u_d : GCCBuiltin<"__builtin_msa_cle_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_clei_s_b : GCCBuiltin<"__builtin_msa_clei_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clei_s_h : GCCBuiltin<"__builtin_msa_clei_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clei_s_w : GCCBuiltin<"__builtin_msa_clei_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clei_s_d : GCCBuiltin<"__builtin_msa_clei_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_clei_u_b : GCCBuiltin<"__builtin_msa_clei_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clei_u_h : GCCBuiltin<"__builtin_msa_clei_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clei_u_w : GCCBuiltin<"__builtin_msa_clei_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clei_u_d : GCCBuiltin<"__builtin_msa_clei_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_clt_s_b : GCCBuiltin<"__builtin_msa_clt_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_clt_s_h : GCCBuiltin<"__builtin_msa_clt_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_clt_s_w : GCCBuiltin<"__builtin_msa_clt_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_clt_s_d : GCCBuiltin<"__builtin_msa_clt_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_clt_u_b : GCCBuiltin<"__builtin_msa_clt_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_clt_u_h : GCCBuiltin<"__builtin_msa_clt_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_clt_u_w : GCCBuiltin<"__builtin_msa_clt_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_clt_u_d : GCCBuiltin<"__builtin_msa_clt_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_clti_s_b : GCCBuiltin<"__builtin_msa_clti_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clti_s_h : GCCBuiltin<"__builtin_msa_clti_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clti_s_w : GCCBuiltin<"__builtin_msa_clti_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clti_s_d : GCCBuiltin<"__builtin_msa_clti_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_clti_u_b : GCCBuiltin<"__builtin_msa_clti_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clti_u_h : GCCBuiltin<"__builtin_msa_clti_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clti_u_w : GCCBuiltin<"__builtin_msa_clti_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_clti_u_d : GCCBuiltin<"__builtin_msa_clti_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_copy_s_b : GCCBuiltin<"__builtin_msa_copy_s_b">, - Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_copy_s_h : GCCBuiltin<"__builtin_msa_copy_s_h">, - Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_copy_s_w : GCCBuiltin<"__builtin_msa_copy_s_w">, - Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_copy_s_d : GCCBuiltin<"__builtin_msa_copy_s_d">, - Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_copy_u_b : GCCBuiltin<"__builtin_msa_copy_u_b">, - Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_copy_u_h : GCCBuiltin<"__builtin_msa_copy_u_h">, - Intrinsic<[llvm_i32_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_copy_u_w : GCCBuiltin<"__builtin_msa_copy_u_w">, - Intrinsic<[llvm_i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_copy_u_d : GCCBuiltin<"__builtin_msa_copy_u_d">, - Intrinsic<[llvm_i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_ctcmsa : GCCBuiltin<"__builtin_msa_ctcmsa">, - Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], []>; - -def int_mips_div_s_b : GCCBuiltin<"__builtin_msa_div_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_div_s_h : GCCBuiltin<"__builtin_msa_div_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_div_s_w : GCCBuiltin<"__builtin_msa_div_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_div_s_d : GCCBuiltin<"__builtin_msa_div_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_div_u_b : GCCBuiltin<"__builtin_msa_div_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_div_u_h : GCCBuiltin<"__builtin_msa_div_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_div_u_w : GCCBuiltin<"__builtin_msa_div_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_div_u_d : GCCBuiltin<"__builtin_msa_div_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -// This instruction is part of the MSA spec but it does not share the -// __builtin_msa prefix because it operates on GP registers. -def int_mips_dlsa : GCCBuiltin<"__builtin_mips_dlsa">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_dotp_s_h : GCCBuiltin<"__builtin_msa_dotp_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_dotp_s_w : GCCBuiltin<"__builtin_msa_dotp_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_dotp_s_d : GCCBuiltin<"__builtin_msa_dotp_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_dotp_u_h : GCCBuiltin<"__builtin_msa_dotp_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_dotp_u_w : GCCBuiltin<"__builtin_msa_dotp_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_dotp_u_d : GCCBuiltin<"__builtin_msa_dotp_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_dpadd_s_h : GCCBuiltin<"__builtin_msa_dpadd_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_dpadd_s_w : GCCBuiltin<"__builtin_msa_dpadd_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_dpadd_s_d : GCCBuiltin<"__builtin_msa_dpadd_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - -def int_mips_dpadd_u_h : GCCBuiltin<"__builtin_msa_dpadd_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_dpadd_u_w : GCCBuiltin<"__builtin_msa_dpadd_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_dpadd_u_d : GCCBuiltin<"__builtin_msa_dpadd_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - -def int_mips_dpsub_s_h : GCCBuiltin<"__builtin_msa_dpsub_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_dpsub_s_w : GCCBuiltin<"__builtin_msa_dpsub_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_dpsub_s_d : GCCBuiltin<"__builtin_msa_dpsub_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - -def int_mips_dpsub_u_h : GCCBuiltin<"__builtin_msa_dpsub_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_dpsub_u_w : GCCBuiltin<"__builtin_msa_dpsub_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_dpsub_u_d : GCCBuiltin<"__builtin_msa_dpsub_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - -def int_mips_fadd_w : GCCBuiltin<"__builtin_msa_fadd_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fadd_d : GCCBuiltin<"__builtin_msa_fadd_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcaf_w : GCCBuiltin<"__builtin_msa_fcaf_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcaf_d : GCCBuiltin<"__builtin_msa_fcaf_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fceq_w : GCCBuiltin<"__builtin_msa_fceq_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fceq_d : GCCBuiltin<"__builtin_msa_fceq_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcle_w : GCCBuiltin<"__builtin_msa_fcle_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcle_d : GCCBuiltin<"__builtin_msa_fcle_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fclt_w : GCCBuiltin<"__builtin_msa_fclt_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fclt_d : GCCBuiltin<"__builtin_msa_fclt_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fclass_w : GCCBuiltin<"__builtin_msa_fclass_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fclass_d : GCCBuiltin<"__builtin_msa_fclass_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcne_w : GCCBuiltin<"__builtin_msa_fcne_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcne_d : GCCBuiltin<"__builtin_msa_fcne_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcor_w : GCCBuiltin<"__builtin_msa_fcor_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcor_d : GCCBuiltin<"__builtin_msa_fcor_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcueq_w : GCCBuiltin<"__builtin_msa_fcueq_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcueq_d : GCCBuiltin<"__builtin_msa_fcueq_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcule_w : GCCBuiltin<"__builtin_msa_fcule_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcule_d : GCCBuiltin<"__builtin_msa_fcule_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcult_w : GCCBuiltin<"__builtin_msa_fcult_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcult_d : GCCBuiltin<"__builtin_msa_fcult_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcun_w : GCCBuiltin<"__builtin_msa_fcun_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcun_d : GCCBuiltin<"__builtin_msa_fcun_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fcune_w : GCCBuiltin<"__builtin_msa_fcune_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fcune_d : GCCBuiltin<"__builtin_msa_fcune_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fdiv_w : GCCBuiltin<"__builtin_msa_fdiv_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fdiv_d : GCCBuiltin<"__builtin_msa_fdiv_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fexdo_h : GCCBuiltin<"__builtin_msa_fexdo_h">, - Intrinsic<[llvm_v8f16_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fexdo_w : GCCBuiltin<"__builtin_msa_fexdo_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fexp2_w : GCCBuiltin<"__builtin_msa_fexp2_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_fexp2_d : GCCBuiltin<"__builtin_msa_fexp2_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_fexupl_w : GCCBuiltin<"__builtin_msa_fexupl_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v8f16_ty], [IntrNoMem]>; -def int_mips_fexupl_d : GCCBuiltin<"__builtin_msa_fexupl_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v4f32_ty], [IntrNoMem]>; - -def int_mips_fexupr_w : GCCBuiltin<"__builtin_msa_fexupr_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v8f16_ty], [IntrNoMem]>; -def int_mips_fexupr_d : GCCBuiltin<"__builtin_msa_fexupr_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v4f32_ty], [IntrNoMem]>; - -def int_mips_ffint_s_w : GCCBuiltin<"__builtin_msa_ffint_s_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_ffint_s_d : GCCBuiltin<"__builtin_msa_ffint_s_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_ffint_u_w : GCCBuiltin<"__builtin_msa_ffint_u_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_ffint_u_d : GCCBuiltin<"__builtin_msa_ffint_u_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_ffql_w : GCCBuiltin<"__builtin_msa_ffql_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_ffql_d : GCCBuiltin<"__builtin_msa_ffql_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_ffqr_w : GCCBuiltin<"__builtin_msa_ffqr_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_ffqr_d : GCCBuiltin<"__builtin_msa_ffqr_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_fill_b : GCCBuiltin<"__builtin_msa_fill_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_mips_fill_h : GCCBuiltin<"__builtin_msa_fill_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_mips_fill_w : GCCBuiltin<"__builtin_msa_fill_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_mips_fill_d : GCCBuiltin<"__builtin_msa_fill_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_i64_ty], [IntrNoMem]>; - -def int_mips_flog2_w : GCCBuiltin<"__builtin_msa_flog2_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_flog2_d : GCCBuiltin<"__builtin_msa_flog2_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fmadd_w : GCCBuiltin<"__builtin_msa_fmadd_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; -def int_mips_fmadd_d : GCCBuiltin<"__builtin_msa_fmadd_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - -def int_mips_fmax_w : GCCBuiltin<"__builtin_msa_fmax_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fmax_d : GCCBuiltin<"__builtin_msa_fmax_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fmax_a_w : GCCBuiltin<"__builtin_msa_fmax_a_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fmax_a_d : GCCBuiltin<"__builtin_msa_fmax_a_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fmin_w : GCCBuiltin<"__builtin_msa_fmin_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fmin_d : GCCBuiltin<"__builtin_msa_fmin_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fmin_a_w : GCCBuiltin<"__builtin_msa_fmin_a_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fmin_a_d : GCCBuiltin<"__builtin_msa_fmin_a_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fmsub_w : GCCBuiltin<"__builtin_msa_fmsub_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; -def int_mips_fmsub_d : GCCBuiltin<"__builtin_msa_fmsub_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - -def int_mips_fmul_w : GCCBuiltin<"__builtin_msa_fmul_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fmul_d : GCCBuiltin<"__builtin_msa_fmul_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_frint_w : GCCBuiltin<"__builtin_msa_frint_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_frint_d : GCCBuiltin<"__builtin_msa_frint_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_frcp_w : GCCBuiltin<"__builtin_msa_frcp_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_frcp_d : GCCBuiltin<"__builtin_msa_frcp_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_frsqrt_w : GCCBuiltin<"__builtin_msa_frsqrt_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_frsqrt_d : GCCBuiltin<"__builtin_msa_frsqrt_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsaf_w : GCCBuiltin<"__builtin_msa_fsaf_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsaf_d : GCCBuiltin<"__builtin_msa_fsaf_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fseq_w : GCCBuiltin<"__builtin_msa_fseq_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fseq_d : GCCBuiltin<"__builtin_msa_fseq_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsle_w : GCCBuiltin<"__builtin_msa_fsle_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsle_d : GCCBuiltin<"__builtin_msa_fsle_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fslt_w : GCCBuiltin<"__builtin_msa_fslt_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fslt_d : GCCBuiltin<"__builtin_msa_fslt_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsne_w : GCCBuiltin<"__builtin_msa_fsne_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsne_d : GCCBuiltin<"__builtin_msa_fsne_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsor_w : GCCBuiltin<"__builtin_msa_fsor_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsor_d : GCCBuiltin<"__builtin_msa_fsor_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsqrt_w : GCCBuiltin<"__builtin_msa_fsqrt_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsqrt_d : GCCBuiltin<"__builtin_msa_fsqrt_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsub_w : GCCBuiltin<"__builtin_msa_fsub_w">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsub_d : GCCBuiltin<"__builtin_msa_fsub_d">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsueq_w : GCCBuiltin<"__builtin_msa_fsueq_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsueq_d : GCCBuiltin<"__builtin_msa_fsueq_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsule_w : GCCBuiltin<"__builtin_msa_fsule_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsule_d : GCCBuiltin<"__builtin_msa_fsule_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsult_w : GCCBuiltin<"__builtin_msa_fsult_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsult_d : GCCBuiltin<"__builtin_msa_fsult_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsun_w : GCCBuiltin<"__builtin_msa_fsun_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsun_d : GCCBuiltin<"__builtin_msa_fsun_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_fsune_w : GCCBuiltin<"__builtin_msa_fsune_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_fsune_d : GCCBuiltin<"__builtin_msa_fsune_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_ftint_s_w : GCCBuiltin<"__builtin_msa_ftint_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_ftint_s_d : GCCBuiltin<"__builtin_msa_ftint_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_ftint_u_w : GCCBuiltin<"__builtin_msa_ftint_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_ftint_u_d : GCCBuiltin<"__builtin_msa_ftint_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_ftq_h : GCCBuiltin<"__builtin_msa_ftq_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_ftq_w : GCCBuiltin<"__builtin_msa_ftq_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_ftrunc_s_w : GCCBuiltin<"__builtin_msa_ftrunc_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_ftrunc_s_d : GCCBuiltin<"__builtin_msa_ftrunc_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_ftrunc_u_w : GCCBuiltin<"__builtin_msa_ftrunc_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_mips_ftrunc_u_d : GCCBuiltin<"__builtin_msa_ftrunc_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -def int_mips_hadd_s_h : GCCBuiltin<"__builtin_msa_hadd_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_hadd_s_w : GCCBuiltin<"__builtin_msa_hadd_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_hadd_s_d : GCCBuiltin<"__builtin_msa_hadd_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_hadd_u_h : GCCBuiltin<"__builtin_msa_hadd_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_hadd_u_w : GCCBuiltin<"__builtin_msa_hadd_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_hadd_u_d : GCCBuiltin<"__builtin_msa_hadd_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_hsub_s_h : GCCBuiltin<"__builtin_msa_hsub_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_hsub_s_w : GCCBuiltin<"__builtin_msa_hsub_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_hsub_s_d : GCCBuiltin<"__builtin_msa_hsub_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_hsub_u_h : GCCBuiltin<"__builtin_msa_hsub_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_hsub_u_w : GCCBuiltin<"__builtin_msa_hsub_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_hsub_u_d : GCCBuiltin<"__builtin_msa_hsub_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_ilvev_b : GCCBuiltin<"__builtin_msa_ilvev_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_ilvev_h : GCCBuiltin<"__builtin_msa_ilvev_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_ilvev_w : GCCBuiltin<"__builtin_msa_ilvev_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_ilvev_d : GCCBuiltin<"__builtin_msa_ilvev_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_ilvl_b : GCCBuiltin<"__builtin_msa_ilvl_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_ilvl_h : GCCBuiltin<"__builtin_msa_ilvl_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_ilvl_w : GCCBuiltin<"__builtin_msa_ilvl_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_ilvl_d : GCCBuiltin<"__builtin_msa_ilvl_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_ilvod_b : GCCBuiltin<"__builtin_msa_ilvod_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_ilvod_h : GCCBuiltin<"__builtin_msa_ilvod_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_ilvod_w : GCCBuiltin<"__builtin_msa_ilvod_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_ilvod_d : GCCBuiltin<"__builtin_msa_ilvod_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_ilvr_b : GCCBuiltin<"__builtin_msa_ilvr_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_ilvr_h : GCCBuiltin<"__builtin_msa_ilvr_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_ilvr_w : GCCBuiltin<"__builtin_msa_ilvr_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_ilvr_d : GCCBuiltin<"__builtin_msa_ilvr_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_insert_b : GCCBuiltin<"__builtin_msa_insert_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_insert_h : GCCBuiltin<"__builtin_msa_insert_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_insert_w : GCCBuiltin<"__builtin_msa_insert_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_insert_d : GCCBuiltin<"__builtin_msa_insert_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty, llvm_i64_ty], - [IntrNoMem]>; - -def int_mips_insve_b : GCCBuiltin<"__builtin_msa_insve_b">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_insve_h : GCCBuiltin<"__builtin_msa_insve_h">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i16_ty, llvm_i32_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_insve_w : GCCBuiltin<"__builtin_msa_insve_w">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -def int_mips_insve_d : GCCBuiltin<"__builtin_msa_insve_d">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_i32_ty, llvm_v2i64_ty], - [IntrNoMem]>; - -def int_mips_ld_b : GCCBuiltin<"__builtin_msa_ld_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; -def int_mips_ld_h : GCCBuiltin<"__builtin_msa_ld_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; -def int_mips_ld_w : GCCBuiltin<"__builtin_msa_ld_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; -def int_mips_ld_d : GCCBuiltin<"__builtin_msa_ld_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - -def int_mips_ldi_b : GCCBuiltin<"__builtin_msa_ldi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_mips_ldi_h : GCCBuiltin<"__builtin_msa_ldi_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_mips_ldi_w : GCCBuiltin<"__builtin_msa_ldi_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_i32_ty], [IntrNoMem]>; -def int_mips_ldi_d : GCCBuiltin<"__builtin_msa_ldi_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_i32_ty], [IntrNoMem]>; - -// This instruction is part of the MSA spec but it does not share the -// __builtin_msa prefix because it operates on the GPR registers. -def int_mips_lsa : GCCBuiltin<"__builtin_mips_lsa">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_madd_q_h : GCCBuiltin<"__builtin_msa_madd_q_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_madd_q_w : GCCBuiltin<"__builtin_msa_madd_q_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - -def int_mips_maddr_q_h : GCCBuiltin<"__builtin_msa_maddr_q_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_maddr_q_w : GCCBuiltin<"__builtin_msa_maddr_q_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - -def int_mips_maddv_b : GCCBuiltin<"__builtin_msa_maddv_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_maddv_h : GCCBuiltin<"__builtin_msa_maddv_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_maddv_w : GCCBuiltin<"__builtin_msa_maddv_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -def int_mips_maddv_d : GCCBuiltin<"__builtin_msa_maddv_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - -def int_mips_max_a_b : GCCBuiltin<"__builtin_msa_max_a_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_max_a_h : GCCBuiltin<"__builtin_msa_max_a_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_max_a_w : GCCBuiltin<"__builtin_msa_max_a_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_max_a_d : GCCBuiltin<"__builtin_msa_max_a_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_max_s_b : GCCBuiltin<"__builtin_msa_max_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_max_s_h : GCCBuiltin<"__builtin_msa_max_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_max_s_w : GCCBuiltin<"__builtin_msa_max_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_max_s_d : GCCBuiltin<"__builtin_msa_max_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_max_u_b : GCCBuiltin<"__builtin_msa_max_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_max_u_h : GCCBuiltin<"__builtin_msa_max_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_max_u_w : GCCBuiltin<"__builtin_msa_max_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_max_u_d : GCCBuiltin<"__builtin_msa_max_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_maxi_s_b : GCCBuiltin<"__builtin_msa_maxi_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_maxi_s_h : GCCBuiltin<"__builtin_msa_maxi_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_maxi_s_w : GCCBuiltin<"__builtin_msa_maxi_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_maxi_s_d : GCCBuiltin<"__builtin_msa_maxi_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_maxi_u_b : GCCBuiltin<"__builtin_msa_maxi_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_maxi_u_h : GCCBuiltin<"__builtin_msa_maxi_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_maxi_u_w : GCCBuiltin<"__builtin_msa_maxi_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_maxi_u_d : GCCBuiltin<"__builtin_msa_maxi_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_min_a_b : GCCBuiltin<"__builtin_msa_min_a_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_min_a_h : GCCBuiltin<"__builtin_msa_min_a_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_min_a_w : GCCBuiltin<"__builtin_msa_min_a_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_min_a_d : GCCBuiltin<"__builtin_msa_min_a_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_min_s_b : GCCBuiltin<"__builtin_msa_min_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_min_s_h : GCCBuiltin<"__builtin_msa_min_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_min_s_w : GCCBuiltin<"__builtin_msa_min_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_min_s_d : GCCBuiltin<"__builtin_msa_min_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_min_u_b : GCCBuiltin<"__builtin_msa_min_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_min_u_h : GCCBuiltin<"__builtin_msa_min_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_min_u_w : GCCBuiltin<"__builtin_msa_min_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_min_u_d : GCCBuiltin<"__builtin_msa_min_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_mini_s_b : GCCBuiltin<"__builtin_msa_mini_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_mini_s_h : GCCBuiltin<"__builtin_msa_mini_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_mini_s_w : GCCBuiltin<"__builtin_msa_mini_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_mini_s_d : GCCBuiltin<"__builtin_msa_mini_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_mini_u_b : GCCBuiltin<"__builtin_msa_mini_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_mini_u_h : GCCBuiltin<"__builtin_msa_mini_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_mini_u_w : GCCBuiltin<"__builtin_msa_mini_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_mini_u_d : GCCBuiltin<"__builtin_msa_mini_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_mod_s_b : GCCBuiltin<"__builtin_msa_mod_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_mod_s_h : GCCBuiltin<"__builtin_msa_mod_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_mod_s_w : GCCBuiltin<"__builtin_msa_mod_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_mod_s_d : GCCBuiltin<"__builtin_msa_mod_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_mod_u_b : GCCBuiltin<"__builtin_msa_mod_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_mod_u_h : GCCBuiltin<"__builtin_msa_mod_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_mod_u_w : GCCBuiltin<"__builtin_msa_mod_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_mod_u_d : GCCBuiltin<"__builtin_msa_mod_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_move_v : GCCBuiltin<"__builtin_msa_move_v">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>; - -def int_mips_msub_q_h : GCCBuiltin<"__builtin_msa_msub_q_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_msub_q_w : GCCBuiltin<"__builtin_msa_msub_q_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - -def int_mips_msubr_q_h : GCCBuiltin<"__builtin_msa_msubr_q_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_msubr_q_w : GCCBuiltin<"__builtin_msa_msubr_q_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - -def int_mips_msubv_b : GCCBuiltin<"__builtin_msa_msubv_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_msubv_h : GCCBuiltin<"__builtin_msa_msubv_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_msubv_w : GCCBuiltin<"__builtin_msa_msubv_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -def int_mips_msubv_d : GCCBuiltin<"__builtin_msa_msubv_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - -def int_mips_mul_q_h : GCCBuiltin<"__builtin_msa_mul_q_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_mul_q_w : GCCBuiltin<"__builtin_msa_mul_q_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_mulr_q_h : GCCBuiltin<"__builtin_msa_mulr_q_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_mulr_q_w : GCCBuiltin<"__builtin_msa_mulr_q_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - -def int_mips_mulv_b : GCCBuiltin<"__builtin_msa_mulv_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_mulv_h : GCCBuiltin<"__builtin_msa_mulv_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_mulv_w : GCCBuiltin<"__builtin_msa_mulv_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_mulv_d : GCCBuiltin<"__builtin_msa_mulv_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_nloc_b : GCCBuiltin<"__builtin_msa_nloc_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_nloc_h : GCCBuiltin<"__builtin_msa_nloc_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_nloc_w : GCCBuiltin<"__builtin_msa_nloc_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_nloc_d : GCCBuiltin<"__builtin_msa_nloc_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_nlzc_b : GCCBuiltin<"__builtin_msa_nlzc_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_nlzc_h : GCCBuiltin<"__builtin_msa_nlzc_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_nlzc_w : GCCBuiltin<"__builtin_msa_nlzc_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_nlzc_d : GCCBuiltin<"__builtin_msa_nlzc_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_nor_v : GCCBuiltin<"__builtin_msa_nor_v">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; - -def int_mips_nori_b : GCCBuiltin<"__builtin_msa_nori_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_or_v : GCCBuiltin<"__builtin_msa_or_v">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; - -def int_mips_ori_b : GCCBuiltin<"__builtin_msa_ori_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_pckev_b : GCCBuiltin<"__builtin_msa_pckev_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_pckev_h : GCCBuiltin<"__builtin_msa_pckev_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_pckev_w : GCCBuiltin<"__builtin_msa_pckev_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_pckev_d : GCCBuiltin<"__builtin_msa_pckev_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_pckod_b : GCCBuiltin<"__builtin_msa_pckod_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_pckod_h : GCCBuiltin<"__builtin_msa_pckod_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_pckod_w : GCCBuiltin<"__builtin_msa_pckod_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_pckod_d : GCCBuiltin<"__builtin_msa_pckod_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_pcnt_b : GCCBuiltin<"__builtin_msa_pcnt_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_pcnt_h : GCCBuiltin<"__builtin_msa_pcnt_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_pcnt_w : GCCBuiltin<"__builtin_msa_pcnt_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_pcnt_d : GCCBuiltin<"__builtin_msa_pcnt_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_sat_s_b : GCCBuiltin<"__builtin_msa_sat_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sat_s_h : GCCBuiltin<"__builtin_msa_sat_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sat_s_w : GCCBuiltin<"__builtin_msa_sat_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sat_s_d : GCCBuiltin<"__builtin_msa_sat_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_sat_u_b : GCCBuiltin<"__builtin_msa_sat_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sat_u_h : GCCBuiltin<"__builtin_msa_sat_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sat_u_w : GCCBuiltin<"__builtin_msa_sat_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sat_u_d : GCCBuiltin<"__builtin_msa_sat_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_shf_b : GCCBuiltin<"__builtin_msa_shf_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_shf_h : GCCBuiltin<"__builtin_msa_shf_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_shf_w : GCCBuiltin<"__builtin_msa_shf_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_sld_b : GCCBuiltin<"__builtin_msa_sld_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sld_h : GCCBuiltin<"__builtin_msa_sld_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sld_w : GCCBuiltin<"__builtin_msa_sld_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_sld_d : GCCBuiltin<"__builtin_msa_sld_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_sldi_b : GCCBuiltin<"__builtin_msa_sldi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_sldi_h : GCCBuiltin<"__builtin_msa_sldi_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_sldi_w : GCCBuiltin<"__builtin_msa_sldi_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_mips_sldi_d : GCCBuiltin<"__builtin_msa_sldi_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], - [IntrNoMem]>; - -def int_mips_sll_b : GCCBuiltin<"__builtin_msa_sll_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_sll_h : GCCBuiltin<"__builtin_msa_sll_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_sll_w : GCCBuiltin<"__builtin_msa_sll_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_sll_d : GCCBuiltin<"__builtin_msa_sll_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_slli_b : GCCBuiltin<"__builtin_msa_slli_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_slli_h : GCCBuiltin<"__builtin_msa_slli_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_slli_w : GCCBuiltin<"__builtin_msa_slli_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_slli_d : GCCBuiltin<"__builtin_msa_slli_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_splat_b : GCCBuiltin<"__builtin_msa_splat_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_splat_h : GCCBuiltin<"__builtin_msa_splat_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_splat_w : GCCBuiltin<"__builtin_msa_splat_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_splat_d : GCCBuiltin<"__builtin_msa_splat_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_splati_b : GCCBuiltin<"__builtin_msa_splati_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_splati_h : GCCBuiltin<"__builtin_msa_splati_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_splati_w : GCCBuiltin<"__builtin_msa_splati_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_splati_d : GCCBuiltin<"__builtin_msa_splati_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_sra_b : GCCBuiltin<"__builtin_msa_sra_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_sra_h : GCCBuiltin<"__builtin_msa_sra_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_sra_w : GCCBuiltin<"__builtin_msa_sra_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_sra_d : GCCBuiltin<"__builtin_msa_sra_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_srai_b : GCCBuiltin<"__builtin_msa_srai_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srai_h : GCCBuiltin<"__builtin_msa_srai_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srai_w : GCCBuiltin<"__builtin_msa_srai_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srai_d : GCCBuiltin<"__builtin_msa_srai_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_srar_b : GCCBuiltin<"__builtin_msa_srar_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_srar_h : GCCBuiltin<"__builtin_msa_srar_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_srar_w : GCCBuiltin<"__builtin_msa_srar_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_srar_d : GCCBuiltin<"__builtin_msa_srar_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_srari_b : GCCBuiltin<"__builtin_msa_srari_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srari_h : GCCBuiltin<"__builtin_msa_srari_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srari_w : GCCBuiltin<"__builtin_msa_srari_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srari_d : GCCBuiltin<"__builtin_msa_srari_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_srl_b : GCCBuiltin<"__builtin_msa_srl_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_srl_h : GCCBuiltin<"__builtin_msa_srl_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_srl_w : GCCBuiltin<"__builtin_msa_srl_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_srl_d : GCCBuiltin<"__builtin_msa_srl_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_srli_b : GCCBuiltin<"__builtin_msa_srli_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srli_h : GCCBuiltin<"__builtin_msa_srli_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srli_w : GCCBuiltin<"__builtin_msa_srli_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srli_d : GCCBuiltin<"__builtin_msa_srli_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_srlr_b : GCCBuiltin<"__builtin_msa_srlr_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_srlr_h : GCCBuiltin<"__builtin_msa_srlr_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_srlr_w : GCCBuiltin<"__builtin_msa_srlr_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_srlr_d : GCCBuiltin<"__builtin_msa_srlr_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_srlri_b : GCCBuiltin<"__builtin_msa_srlri_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srlri_h : GCCBuiltin<"__builtin_msa_srlri_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srlri_w : GCCBuiltin<"__builtin_msa_srlri_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_srlri_d : GCCBuiltin<"__builtin_msa_srlri_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_st_b : GCCBuiltin<"__builtin_msa_st_b">, - Intrinsic<[], [llvm_v16i8_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrArgMemOnly]>; -def int_mips_st_h : GCCBuiltin<"__builtin_msa_st_h">, - Intrinsic<[], [llvm_v8i16_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrArgMemOnly]>; -def int_mips_st_w : GCCBuiltin<"__builtin_msa_st_w">, - Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrArgMemOnly]>; -def int_mips_st_d : GCCBuiltin<"__builtin_msa_st_d">, - Intrinsic<[], [llvm_v2i64_ty, llvm_ptr_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - -def int_mips_subs_s_b : GCCBuiltin<"__builtin_msa_subs_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_subs_s_h : GCCBuiltin<"__builtin_msa_subs_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_subs_s_w : GCCBuiltin<"__builtin_msa_subs_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_subs_s_d : GCCBuiltin<"__builtin_msa_subs_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_subs_u_b : GCCBuiltin<"__builtin_msa_subs_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_subs_u_h : GCCBuiltin<"__builtin_msa_subs_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_subs_u_w : GCCBuiltin<"__builtin_msa_subs_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_subs_u_d : GCCBuiltin<"__builtin_msa_subs_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_subsus_u_b : GCCBuiltin<"__builtin_msa_subsus_u_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_subsus_u_h : GCCBuiltin<"__builtin_msa_subsus_u_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_subsus_u_w : GCCBuiltin<"__builtin_msa_subsus_u_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_subsus_u_d : GCCBuiltin<"__builtin_msa_subsus_u_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_subsuu_s_b : GCCBuiltin<"__builtin_msa_subsuu_s_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_subsuu_s_h : GCCBuiltin<"__builtin_msa_subsuu_s_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_subsuu_s_w : GCCBuiltin<"__builtin_msa_subsuu_s_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_subsuu_s_d : GCCBuiltin<"__builtin_msa_subsuu_s_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_subv_b : GCCBuiltin<"__builtin_msa_subv_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; -def int_mips_subv_h : GCCBuiltin<"__builtin_msa_subv_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; -def int_mips_subv_w : GCCBuiltin<"__builtin_msa_subv_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -def int_mips_subv_d : GCCBuiltin<"__builtin_msa_subv_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; - -def int_mips_subvi_b : GCCBuiltin<"__builtin_msa_subvi_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_subvi_h : GCCBuiltin<"__builtin_msa_subvi_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_subvi_w : GCCBuiltin<"__builtin_msa_subvi_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_mips_subvi_d : GCCBuiltin<"__builtin_msa_subvi_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i32_ty], [IntrNoMem]>; - -def int_mips_vshf_b : GCCBuiltin<"__builtin_msa_vshf_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -def int_mips_vshf_h : GCCBuiltin<"__builtin_msa_vshf_h">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -def int_mips_vshf_w : GCCBuiltin<"__builtin_msa_vshf_w">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -def int_mips_vshf_d : GCCBuiltin<"__builtin_msa_vshf_d">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - -def int_mips_xor_v : GCCBuiltin<"__builtin_msa_xor_v">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; - -def int_mips_xori_b : GCCBuiltin<"__builtin_msa_xori_b">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem]>; -} diff --git a/llvm/include/llvm/IR/IntrinsicsNVVM.td b/llvm/include/llvm/IR/IntrinsicsNVVM.td deleted file mode 100644 index 6919ec47..00000000 --- a/llvm/include/llvm/IR/IntrinsicsNVVM.td +++ /dev/null @@ -1,3734 +0,0 @@ -//===- IntrinsicsNVVM.td - Defines NVVM intrinsics ---------*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the NVVM-specific intrinsics for use with NVPTX. -// -//===----------------------------------------------------------------------===// - -def llvm_anyi64ptr_ty : LLVMAnyPointerType; // (space)i64* - -// -// MISC -// - -let TargetPrefix = "nvvm" in { - def int_nvvm_clz_i : GCCBuiltin<"__nvvm_clz_i">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_clz_ll : GCCBuiltin<"__nvvm_clz_ll">, - Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem]>; - - def int_nvvm_popc_i : GCCBuiltin<"__nvvm_popc_i">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_popc_ll : GCCBuiltin<"__nvvm_popc_ll">, - Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem]>; - - def int_nvvm_prmt : GCCBuiltin<"__nvvm_prmt">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - -// -// Min Max -// - - def int_nvvm_min_i : GCCBuiltin<"__nvvm_min_i">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_min_ui : GCCBuiltin<"__nvvm_min_ui">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_min_ll : GCCBuiltin<"__nvvm_min_ll">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_min_ull : GCCBuiltin<"__nvvm_min_ull">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_max_i : GCCBuiltin<"__nvvm_max_i">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_max_ui : GCCBuiltin<"__nvvm_max_ui">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_max_ll : GCCBuiltin<"__nvvm_max_ll">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_max_ull : GCCBuiltin<"__nvvm_max_ull">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_fmin_f : GCCBuiltin<"__nvvm_fmin_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fmin_ftz_f : GCCBuiltin<"__nvvm_fmin_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_fmax_f : GCCBuiltin<"__nvvm_fmax_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty] - , [IntrNoMem, Commutative]>; - def int_nvvm_fmax_ftz_f : GCCBuiltin<"__nvvm_fmax_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_fmin_d : GCCBuiltin<"__nvvm_fmin_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fmax_d : GCCBuiltin<"__nvvm_fmax_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - -// -// Multiplication -// - - def int_nvvm_mulhi_i : GCCBuiltin<"__nvvm_mulhi_i">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mulhi_ui : GCCBuiltin<"__nvvm_mulhi_ui">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_mulhi_ll : GCCBuiltin<"__nvvm_mulhi_ll">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mulhi_ull : GCCBuiltin<"__nvvm_mulhi_ull">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_mul_rn_ftz_f : GCCBuiltin<"__nvvm_mul_rn_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rn_f : GCCBuiltin<"__nvvm_mul_rn_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rz_ftz_f : GCCBuiltin<"__nvvm_mul_rz_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rz_f : GCCBuiltin<"__nvvm_mul_rz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rm_ftz_f : GCCBuiltin<"__nvvm_mul_rm_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rm_f : GCCBuiltin<"__nvvm_mul_rm_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rp_ftz_f : GCCBuiltin<"__nvvm_mul_rp_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rp_f : GCCBuiltin<"__nvvm_mul_rp_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_mul_rn_d : GCCBuiltin<"__nvvm_mul_rn_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rz_d : GCCBuiltin<"__nvvm_mul_rz_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rm_d : GCCBuiltin<"__nvvm_mul_rm_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul_rp_d : GCCBuiltin<"__nvvm_mul_rp_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_mul24_i : GCCBuiltin<"__nvvm_mul24_i">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_mul24_ui : GCCBuiltin<"__nvvm_mul24_ui">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - -// -// Div -// - - def int_nvvm_div_approx_ftz_f : GCCBuiltin<"__nvvm_div_approx_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_div_approx_f : GCCBuiltin<"__nvvm_div_approx_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_div_rn_ftz_f : GCCBuiltin<"__nvvm_div_rn_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_div_rn_f : GCCBuiltin<"__nvvm_div_rn_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_div_rz_ftz_f : GCCBuiltin<"__nvvm_div_rz_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_div_rz_f : GCCBuiltin<"__nvvm_div_rz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_div_rm_ftz_f : GCCBuiltin<"__nvvm_div_rm_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_div_rm_f : GCCBuiltin<"__nvvm_div_rm_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_div_rp_ftz_f : GCCBuiltin<"__nvvm_div_rp_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_div_rp_f : GCCBuiltin<"__nvvm_div_rp_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_div_rn_d : GCCBuiltin<"__nvvm_div_rn_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_div_rz_d : GCCBuiltin<"__nvvm_div_rz_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_div_rm_d : GCCBuiltin<"__nvvm_div_rm_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_div_rp_d : GCCBuiltin<"__nvvm_div_rp_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - -// -// Brev -// - - def int_nvvm_brev32 : GCCBuiltin<"__nvvm_brev32">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_brev64 : GCCBuiltin<"__nvvm_brev64">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty], [IntrNoMem]>; - -// -// Sad -// - - def int_nvvm_sad_i : GCCBuiltin<"__nvvm_sad_i">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_sad_ui : GCCBuiltin<"__nvvm_sad_ui">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - -// -// Floor Ceil -// - - def int_nvvm_floor_ftz_f : GCCBuiltin<"__nvvm_floor_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_floor_f : GCCBuiltin<"__nvvm_floor_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_floor_d : GCCBuiltin<"__nvvm_floor_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_ceil_ftz_f : GCCBuiltin<"__nvvm_ceil_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_ceil_f : GCCBuiltin<"__nvvm_ceil_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_ceil_d : GCCBuiltin<"__nvvm_ceil_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Abs -// - - def int_nvvm_abs_i : GCCBuiltin<"__nvvm_abs_i">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_abs_ll : GCCBuiltin<"__nvvm_abs_ll">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty], [IntrNoMem]>; - - def int_nvvm_fabs_ftz_f : GCCBuiltin<"__nvvm_fabs_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_fabs_f : GCCBuiltin<"__nvvm_fabs_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_fabs_d : GCCBuiltin<"__nvvm_fabs_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Round -// - - def int_nvvm_round_ftz_f : GCCBuiltin<"__nvvm_round_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_round_f : GCCBuiltin<"__nvvm_round_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_round_d : GCCBuiltin<"__nvvm_round_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Trunc -// - - def int_nvvm_trunc_ftz_f : GCCBuiltin<"__nvvm_trunc_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_trunc_f : GCCBuiltin<"__nvvm_trunc_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_trunc_d : GCCBuiltin<"__nvvm_trunc_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Saturate -// - - def int_nvvm_saturate_ftz_f : GCCBuiltin<"__nvvm_saturate_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_saturate_f : GCCBuiltin<"__nvvm_saturate_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_saturate_d : GCCBuiltin<"__nvvm_saturate_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Exp2 Log2 -// - - def int_nvvm_ex2_approx_ftz_f : GCCBuiltin<"__nvvm_ex2_approx_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_ex2_approx_f : GCCBuiltin<"__nvvm_ex2_approx_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_ex2_approx_d : GCCBuiltin<"__nvvm_ex2_approx_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_lg2_approx_ftz_f : GCCBuiltin<"__nvvm_lg2_approx_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_lg2_approx_f : GCCBuiltin<"__nvvm_lg2_approx_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_lg2_approx_d : GCCBuiltin<"__nvvm_lg2_approx_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Sin Cos -// - - def int_nvvm_sin_approx_ftz_f : GCCBuiltin<"__nvvm_sin_approx_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sin_approx_f : GCCBuiltin<"__nvvm_sin_approx_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_cos_approx_ftz_f : GCCBuiltin<"__nvvm_cos_approx_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_cos_approx_f : GCCBuiltin<"__nvvm_cos_approx_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - -// -// Fma -// - - def int_nvvm_fma_rn_ftz_f : GCCBuiltin<"__nvvm_fma_rn_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rn_f : GCCBuiltin<"__nvvm_fma_rn_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rz_ftz_f : GCCBuiltin<"__nvvm_fma_rz_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rz_f : GCCBuiltin<"__nvvm_fma_rz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rm_ftz_f : GCCBuiltin<"__nvvm_fma_rm_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rm_f : GCCBuiltin<"__nvvm_fma_rm_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rp_ftz_f : GCCBuiltin<"__nvvm_fma_rp_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rp_f : GCCBuiltin<"__nvvm_fma_rp_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_fma_rn_d : GCCBuiltin<"__nvvm_fma_rn_d">, - Intrinsic<[llvm_double_ty], - [llvm_double_ty, llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rz_d : GCCBuiltin<"__nvvm_fma_rz_d">, - Intrinsic<[llvm_double_ty], - [llvm_double_ty, llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rm_d : GCCBuiltin<"__nvvm_fma_rm_d">, - Intrinsic<[llvm_double_ty], - [llvm_double_ty, llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_fma_rp_d : GCCBuiltin<"__nvvm_fma_rp_d">, - Intrinsic<[llvm_double_ty], - [llvm_double_ty, llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - -// -// Rcp -// - - def int_nvvm_rcp_rn_ftz_f : GCCBuiltin<"__nvvm_rcp_rn_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rcp_rn_f : GCCBuiltin<"__nvvm_rcp_rn_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rcp_rz_ftz_f : GCCBuiltin<"__nvvm_rcp_rz_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rcp_rz_f : GCCBuiltin<"__nvvm_rcp_rz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rcp_rm_ftz_f : GCCBuiltin<"__nvvm_rcp_rm_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rcp_rm_f : GCCBuiltin<"__nvvm_rcp_rm_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rcp_rp_ftz_f : GCCBuiltin<"__nvvm_rcp_rp_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rcp_rp_f : GCCBuiltin<"__nvvm_rcp_rp_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_rcp_rn_d : GCCBuiltin<"__nvvm_rcp_rn_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_rcp_rz_d : GCCBuiltin<"__nvvm_rcp_rz_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_rcp_rm_d : GCCBuiltin<"__nvvm_rcp_rm_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_rcp_rp_d : GCCBuiltin<"__nvvm_rcp_rp_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_rcp_approx_ftz_d : GCCBuiltin<"__nvvm_rcp_approx_ftz_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Sqrt -// - - def int_nvvm_sqrt_f : GCCBuiltin<"__nvvm_sqrt_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rn_ftz_f : GCCBuiltin<"__nvvm_sqrt_rn_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rn_f : GCCBuiltin<"__nvvm_sqrt_rn_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rz_ftz_f : GCCBuiltin<"__nvvm_sqrt_rz_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rz_f : GCCBuiltin<"__nvvm_sqrt_rz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rm_ftz_f : GCCBuiltin<"__nvvm_sqrt_rm_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rm_f : GCCBuiltin<"__nvvm_sqrt_rm_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rp_ftz_f : GCCBuiltin<"__nvvm_sqrt_rp_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rp_f : GCCBuiltin<"__nvvm_sqrt_rp_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_approx_ftz_f : GCCBuiltin<"__nvvm_sqrt_approx_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_sqrt_approx_f : GCCBuiltin<"__nvvm_sqrt_approx_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_sqrt_rn_d : GCCBuiltin<"__nvvm_sqrt_rn_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rz_d : GCCBuiltin<"__nvvm_sqrt_rz_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rm_d : GCCBuiltin<"__nvvm_sqrt_rm_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_sqrt_rp_d : GCCBuiltin<"__nvvm_sqrt_rp_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Rsqrt -// - - def int_nvvm_rsqrt_approx_ftz_f : GCCBuiltin<"__nvvm_rsqrt_approx_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rsqrt_approx_f : GCCBuiltin<"__nvvm_rsqrt_approx_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_rsqrt_approx_d : GCCBuiltin<"__nvvm_rsqrt_approx_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty], [IntrNoMem]>; - -// -// Add -// - - def int_nvvm_add_rn_ftz_f : GCCBuiltin<"__nvvm_add_rn_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rn_f : GCCBuiltin<"__nvvm_add_rn_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rz_ftz_f : GCCBuiltin<"__nvvm_add_rz_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rz_f : GCCBuiltin<"__nvvm_add_rz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rm_ftz_f : GCCBuiltin<"__nvvm_add_rm_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rm_f : GCCBuiltin<"__nvvm_add_rm_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rp_ftz_f : GCCBuiltin<"__nvvm_add_rp_ftz_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rp_f : GCCBuiltin<"__nvvm_add_rp_f">, - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_float_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_add_rn_d : GCCBuiltin<"__nvvm_add_rn_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rz_d : GCCBuiltin<"__nvvm_add_rz_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rm_d : GCCBuiltin<"__nvvm_add_rm_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - def int_nvvm_add_rp_d : GCCBuiltin<"__nvvm_add_rp_d">, - Intrinsic<[llvm_double_ty], [llvm_double_ty, llvm_double_ty], - [IntrNoMem, Commutative]>; - -// -// Convert -// - - def int_nvvm_d2f_rn_ftz : GCCBuiltin<"__nvvm_d2f_rn_ftz">, - Intrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2f_rn : GCCBuiltin<"__nvvm_d2f_rn">, - Intrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2f_rz_ftz : GCCBuiltin<"__nvvm_d2f_rz_ftz">, - Intrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2f_rz : GCCBuiltin<"__nvvm_d2f_rz">, - Intrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2f_rm_ftz : GCCBuiltin<"__nvvm_d2f_rm_ftz">, - Intrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2f_rm : GCCBuiltin<"__nvvm_d2f_rm">, - Intrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2f_rp_ftz : GCCBuiltin<"__nvvm_d2f_rp_ftz">, - Intrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2f_rp : GCCBuiltin<"__nvvm_d2f_rp">, - Intrinsic<[llvm_float_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_d2i_rn : GCCBuiltin<"__nvvm_d2i_rn">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2i_rz : GCCBuiltin<"__nvvm_d2i_rz">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2i_rm : GCCBuiltin<"__nvvm_d2i_rm">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2i_rp : GCCBuiltin<"__nvvm_d2i_rp">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_d2ui_rn : GCCBuiltin<"__nvvm_d2ui_rn">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ui_rz : GCCBuiltin<"__nvvm_d2ui_rz">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ui_rm : GCCBuiltin<"__nvvm_d2ui_rm">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ui_rp : GCCBuiltin<"__nvvm_d2ui_rp">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_i2d_rn : GCCBuiltin<"__nvvm_i2d_rn">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_i2d_rz : GCCBuiltin<"__nvvm_i2d_rz">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_i2d_rm : GCCBuiltin<"__nvvm_i2d_rm">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_i2d_rp : GCCBuiltin<"__nvvm_i2d_rp">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem]>; - - def int_nvvm_ui2d_rn : GCCBuiltin<"__nvvm_ui2d_rn">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_ui2d_rz : GCCBuiltin<"__nvvm_ui2d_rz">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_ui2d_rm : GCCBuiltin<"__nvvm_ui2d_rm">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_ui2d_rp : GCCBuiltin<"__nvvm_ui2d_rp">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty], [IntrNoMem]>; - - def int_nvvm_f2i_rn_ftz : GCCBuiltin<"__nvvm_f2i_rn_ftz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2i_rn : GCCBuiltin<"__nvvm_f2i_rn">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2i_rz_ftz : GCCBuiltin<"__nvvm_f2i_rz_ftz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2i_rz : GCCBuiltin<"__nvvm_f2i_rz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2i_rm_ftz : GCCBuiltin<"__nvvm_f2i_rm_ftz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2i_rm : GCCBuiltin<"__nvvm_f2i_rm">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2i_rp_ftz : GCCBuiltin<"__nvvm_f2i_rp_ftz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2i_rp : GCCBuiltin<"__nvvm_f2i_rp">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_f2ui_rn_ftz : GCCBuiltin<"__nvvm_f2ui_rn_ftz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ui_rn : GCCBuiltin<"__nvvm_f2ui_rn">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ui_rz_ftz : GCCBuiltin<"__nvvm_f2ui_rz_ftz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ui_rz : GCCBuiltin<"__nvvm_f2ui_rz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ui_rm_ftz : GCCBuiltin<"__nvvm_f2ui_rm_ftz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ui_rm : GCCBuiltin<"__nvvm_f2ui_rm">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ui_rp_ftz : GCCBuiltin<"__nvvm_f2ui_rp_ftz">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ui_rp : GCCBuiltin<"__nvvm_f2ui_rp">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_i2f_rn : GCCBuiltin<"__nvvm_i2f_rn">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_i2f_rz : GCCBuiltin<"__nvvm_i2f_rz">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_i2f_rm : GCCBuiltin<"__nvvm_i2f_rm">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_i2f_rp : GCCBuiltin<"__nvvm_i2f_rp">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - - def int_nvvm_ui2f_rn : GCCBuiltin<"__nvvm_ui2f_rn">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_ui2f_rz : GCCBuiltin<"__nvvm_ui2f_rz">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_ui2f_rm : GCCBuiltin<"__nvvm_ui2f_rm">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_nvvm_ui2f_rp : GCCBuiltin<"__nvvm_ui2f_rp">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - - def int_nvvm_lohi_i2d : GCCBuiltin<"__nvvm_lohi_i2d">, - Intrinsic<[llvm_double_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, Commutative]>; - - def int_nvvm_d2i_lo : GCCBuiltin<"__nvvm_d2i_lo">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2i_hi : GCCBuiltin<"__nvvm_d2i_hi">, - Intrinsic<[llvm_i32_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_f2ll_rn_ftz : GCCBuiltin<"__nvvm_f2ll_rn_ftz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ll_rn : GCCBuiltin<"__nvvm_f2ll_rn">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ll_rz_ftz : GCCBuiltin<"__nvvm_f2ll_rz_ftz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ll_rz : GCCBuiltin<"__nvvm_f2ll_rz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ll_rm_ftz : GCCBuiltin<"__nvvm_f2ll_rm_ftz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ll_rm : GCCBuiltin<"__nvvm_f2ll_rm">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ll_rp_ftz : GCCBuiltin<"__nvvm_f2ll_rp_ftz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ll_rp : GCCBuiltin<"__nvvm_f2ll_rp">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_f2ull_rn_ftz : GCCBuiltin<"__nvvm_f2ull_rn_ftz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ull_rn : GCCBuiltin<"__nvvm_f2ull_rn">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ull_rz_ftz : GCCBuiltin<"__nvvm_f2ull_rz_ftz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ull_rz : GCCBuiltin<"__nvvm_f2ull_rz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ull_rm_ftz : GCCBuiltin<"__nvvm_f2ull_rm_ftz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ull_rm : GCCBuiltin<"__nvvm_f2ull_rm">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ull_rp_ftz : GCCBuiltin<"__nvvm_f2ull_rp_ftz">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2ull_rp : GCCBuiltin<"__nvvm_f2ull_rp">, - Intrinsic<[llvm_i64_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_d2ll_rn : GCCBuiltin<"__nvvm_d2ll_rn">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ll_rz : GCCBuiltin<"__nvvm_d2ll_rz">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ll_rm : GCCBuiltin<"__nvvm_d2ll_rm">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ll_rp : GCCBuiltin<"__nvvm_d2ll_rp">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_d2ull_rn : GCCBuiltin<"__nvvm_d2ull_rn">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ull_rz : GCCBuiltin<"__nvvm_d2ull_rz">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ull_rm : GCCBuiltin<"__nvvm_d2ull_rm">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - def int_nvvm_d2ull_rp : GCCBuiltin<"__nvvm_d2ull_rp">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - - def int_nvvm_ll2f_rn : GCCBuiltin<"__nvvm_ll2f_rn">, - Intrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ll2f_rz : GCCBuiltin<"__nvvm_ll2f_rz">, - Intrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ll2f_rm : GCCBuiltin<"__nvvm_ll2f_rm">, - Intrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ll2f_rp : GCCBuiltin<"__nvvm_ll2f_rp">, - Intrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ull2f_rn : GCCBuiltin<"__nvvm_ull2f_rn">, - Intrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ull2f_rz : GCCBuiltin<"__nvvm_ull2f_rz">, - Intrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ull2f_rm : GCCBuiltin<"__nvvm_ull2f_rm">, - Intrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ull2f_rp : GCCBuiltin<"__nvvm_ull2f_rp">, - Intrinsic<[llvm_float_ty], [llvm_i64_ty], [IntrNoMem]>; - - def int_nvvm_ll2d_rn : GCCBuiltin<"__nvvm_ll2d_rn">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ll2d_rz : GCCBuiltin<"__nvvm_ll2d_rz">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ll2d_rm : GCCBuiltin<"__nvvm_ll2d_rm">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ll2d_rp : GCCBuiltin<"__nvvm_ll2d_rp">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ull2d_rn : GCCBuiltin<"__nvvm_ull2d_rn">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ull2d_rz : GCCBuiltin<"__nvvm_ull2d_rz">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ull2d_rm : GCCBuiltin<"__nvvm_ull2d_rm">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_ull2d_rp : GCCBuiltin<"__nvvm_ull2d_rp">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - - def int_nvvm_f2h_rn_ftz : GCCBuiltin<"__nvvm_f2h_rn_ftz">, - Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_f2h_rn : GCCBuiltin<"__nvvm_f2h_rn">, - Intrinsic<[llvm_i16_ty], [llvm_float_ty], [IntrNoMem]>; - - def int_nvvm_h2f : GCCBuiltin<"__nvvm_h2f">, - Intrinsic<[llvm_float_ty], [llvm_i16_ty], [IntrNoMem]>; - -// -// Bitcast -// - - def int_nvvm_bitcast_f2i : GCCBuiltin<"__nvvm_bitcast_f2i">, - Intrinsic<[llvm_i32_ty], [llvm_float_ty], [IntrNoMem]>; - def int_nvvm_bitcast_i2f : GCCBuiltin<"__nvvm_bitcast_i2f">, - Intrinsic<[llvm_float_ty], [llvm_i32_ty], [IntrNoMem]>; - - def int_nvvm_bitcast_ll2d : GCCBuiltin<"__nvvm_bitcast_ll2d">, - Intrinsic<[llvm_double_ty], [llvm_i64_ty], [IntrNoMem]>; - def int_nvvm_bitcast_d2ll : GCCBuiltin<"__nvvm_bitcast_d2ll">, - Intrinsic<[llvm_i64_ty], [llvm_double_ty], [IntrNoMem]>; - - -// Atomic not available as an llvm intrinsic. - def int_nvvm_atomic_load_add_f32 : Intrinsic<[llvm_float_ty], - [LLVMAnyPointerType, llvm_float_ty], - [IntrArgMemOnly, NoCapture<0>]>; - def int_nvvm_atomic_load_inc_32 : Intrinsic<[llvm_i32_ty], - [LLVMAnyPointerType, llvm_i32_ty], - [IntrArgMemOnly, NoCapture<0>]>; - def int_nvvm_atomic_load_dec_32 : Intrinsic<[llvm_i32_ty], - [LLVMAnyPointerType, llvm_i32_ty], - [IntrArgMemOnly, NoCapture<0>]>; - -// Bar.Sync - - // The builtin for "bar.sync 0" is called __syncthreads. Unlike most of the - // intrinsics in this file, this one is a user-facing API. - def int_nvvm_barrier0 : GCCBuiltin<"__syncthreads">, - Intrinsic<[], [], [IntrConvergent]>; - def int_nvvm_barrier0_popc : GCCBuiltin<"__nvvm_bar0_popc">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent]>; - def int_nvvm_barrier0_and : GCCBuiltin<"__nvvm_bar0_and">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent]>; - def int_nvvm_barrier0_or : GCCBuiltin<"__nvvm_bar0_or">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent]>; - - def int_nvvm_bar_sync : - Intrinsic<[], [llvm_i32_ty], [IntrConvergent]>, - GCCBuiltin<"__nvvm_bar_sync">; - - // Membar - def int_nvvm_membar_cta : GCCBuiltin<"__nvvm_membar_cta">, - Intrinsic<[], [], []>; - def int_nvvm_membar_gl : GCCBuiltin<"__nvvm_membar_gl">, - Intrinsic<[], [], []>; - def int_nvvm_membar_sys : GCCBuiltin<"__nvvm_membar_sys">, - Intrinsic<[], [], []>; - -// Generated within nvvm. Use for ldu on sm_20 or later. Second arg is the -// pointer's alignment. -def int_nvvm_ldu_global_i : Intrinsic<[llvm_anyint_ty], - [LLVMAnyPointerType>, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly, NoCapture<0>], - "llvm.nvvm.ldu.global.i">; -def int_nvvm_ldu_global_f : Intrinsic<[llvm_anyfloat_ty], - [LLVMAnyPointerType>, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly, NoCapture<0>], - "llvm.nvvm.ldu.global.f">; -def int_nvvm_ldu_global_p : Intrinsic<[llvm_anyptr_ty], - [LLVMAnyPointerType>, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly, NoCapture<0>], - "llvm.nvvm.ldu.global.p">; - -// Generated within nvvm. Use for ldg on sm_35 or later. Second arg is the -// pointer's alignment. -def int_nvvm_ldg_global_i : Intrinsic<[llvm_anyint_ty], - [LLVMAnyPointerType>, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly, NoCapture<0>], - "llvm.nvvm.ldg.global.i">; -def int_nvvm_ldg_global_f : Intrinsic<[llvm_anyfloat_ty], - [LLVMAnyPointerType>, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly, NoCapture<0>], - "llvm.nvvm.ldg.global.f">; -def int_nvvm_ldg_global_p : Intrinsic<[llvm_anyptr_ty], - [LLVMAnyPointerType>, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly, NoCapture<0>], - "llvm.nvvm.ldg.global.p">; - -// Use for generic pointers -// - These intrinsics are used to convert address spaces. -// - The input pointer and output pointer must have the same type, except for -// the address-space. (This restriction is not enforced here as there is -// currently no way to describe it). -// - This complements the llvm bitcast, which can be used to cast one type -// of pointer to another type of pointer, while the address space remains -// the same. -def int_nvvm_ptr_local_to_gen: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], [IntrNoMem], - "llvm.nvvm.ptr.local.to.gen">; -def int_nvvm_ptr_shared_to_gen: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], [IntrNoMem], - "llvm.nvvm.ptr.shared.to.gen">; -def int_nvvm_ptr_global_to_gen: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], [IntrNoMem], - "llvm.nvvm.ptr.global.to.gen">; -def int_nvvm_ptr_constant_to_gen: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], [IntrNoMem], - "llvm.nvvm.ptr.constant.to.gen">; - -def int_nvvm_ptr_gen_to_global: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], [IntrNoMem], - "llvm.nvvm.ptr.gen.to.global">; -def int_nvvm_ptr_gen_to_shared: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], [IntrNoMem], - "llvm.nvvm.ptr.gen.to.shared">; -def int_nvvm_ptr_gen_to_local: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], [IntrNoMem], - "llvm.nvvm.ptr.gen.to.local">; -def int_nvvm_ptr_gen_to_constant: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], [IntrNoMem], - "llvm.nvvm.ptr.gen.to.constant">; - -// Used in nvvm internally to help address space opt and ptx code generation -// This is for params that are passed to kernel functions by pointer by-val. -def int_nvvm_ptr_gen_to_param: Intrinsic<[llvm_anyptr_ty], - [llvm_anyptr_ty], - [IntrNoMem], - "llvm.nvvm.ptr.gen.to.param">; - -// Move intrinsics, used in nvvm internally - -def int_nvvm_move_i16 : Intrinsic<[llvm_i16_ty], [llvm_i16_ty], [IntrNoMem], - "llvm.nvvm.move.i16">; -def int_nvvm_move_i32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoMem], - "llvm.nvvm.move.i32">; -def int_nvvm_move_i64 : Intrinsic<[llvm_i64_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.move.i64">; -def int_nvvm_move_float : Intrinsic<[llvm_float_ty], [llvm_float_ty], - [IntrNoMem], "llvm.nvvm.move.float">; -def int_nvvm_move_double : Intrinsic<[llvm_double_ty], [llvm_double_ty], - [IntrNoMem], "llvm.nvvm.move.double">; -def int_nvvm_move_ptr : Intrinsic<[llvm_anyptr_ty], [llvm_anyptr_ty], - [IntrNoMem, NoCapture<0>], "llvm.nvvm.move.ptr">; - - -// For getting the handle from a texture or surface variable -def int_nvvm_texsurf_handle - : Intrinsic<[llvm_i64_ty], [llvm_metadata_ty, llvm_anyi64ptr_ty], - [IntrNoMem], "llvm.nvvm.texsurf.handle">; -def int_nvvm_texsurf_handle_internal - : Intrinsic<[llvm_i64_ty], [llvm_anyptr_ty], - [IntrNoMem], "llvm.nvvm.texsurf.handle.internal">; - -/// Error / Warn -def int_nvvm_compiler_error : - Intrinsic<[], [llvm_anyptr_ty], [], "llvm.nvvm.compiler.error">; -def int_nvvm_compiler_warn : - Intrinsic<[], [llvm_anyptr_ty], [], "llvm.nvvm.compiler.warn">; - -def int_nvvm_reflect : - Intrinsic<[llvm_i32_ty], [llvm_anyptr_ty], [IntrNoMem], "llvm.nvvm.reflect">; - -// isspacep.{const, global, local, shared} -def int_nvvm_isspacep_const - : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty], [IntrNoMem], - "llvm.nvvm.isspacep.const">, - GCCBuiltin<"__nvvm_isspacep_const">; -def int_nvvm_isspacep_global - : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty], [IntrNoMem], - "llvm.nvvm.isspacep.global">, - GCCBuiltin<"__nvvm_isspacep_global">; -def int_nvvm_isspacep_local - : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty], [IntrNoMem], - "llvm.nvvm.isspacep.local">, - GCCBuiltin<"__nvvm_isspacep_local">; -def int_nvvm_isspacep_shared - : Intrinsic<[llvm_i1_ty], [llvm_ptr_ty], [IntrNoMem], - "llvm.nvvm.isspacep.shared">, - GCCBuiltin<"__nvvm_isspacep_shared">; - -// Environment register read -def int_nvvm_read_ptx_sreg_envreg0 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg0">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg0">; -def int_nvvm_read_ptx_sreg_envreg1 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg1">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg1">; -def int_nvvm_read_ptx_sreg_envreg2 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg2">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg2">; -def int_nvvm_read_ptx_sreg_envreg3 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg3">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg3">; -def int_nvvm_read_ptx_sreg_envreg4 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg4">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg4">; -def int_nvvm_read_ptx_sreg_envreg5 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg5">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg5">; -def int_nvvm_read_ptx_sreg_envreg6 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg6">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg6">; -def int_nvvm_read_ptx_sreg_envreg7 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg7">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg7">; -def int_nvvm_read_ptx_sreg_envreg8 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg8">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg8">; -def int_nvvm_read_ptx_sreg_envreg9 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg9">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg9">; -def int_nvvm_read_ptx_sreg_envreg10 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg10">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg10">; -def int_nvvm_read_ptx_sreg_envreg11 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg11">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg11">; -def int_nvvm_read_ptx_sreg_envreg12 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg12">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg12">; -def int_nvvm_read_ptx_sreg_envreg13 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg13">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg13">; -def int_nvvm_read_ptx_sreg_envreg14 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg14">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg14">; -def int_nvvm_read_ptx_sreg_envreg15 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg15">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg15">; -def int_nvvm_read_ptx_sreg_envreg16 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg16">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg16">; -def int_nvvm_read_ptx_sreg_envreg17 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg17">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg17">; -def int_nvvm_read_ptx_sreg_envreg18 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg18">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg18">; -def int_nvvm_read_ptx_sreg_envreg19 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg19">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg19">; -def int_nvvm_read_ptx_sreg_envreg20 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg20">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg20">; -def int_nvvm_read_ptx_sreg_envreg21 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg21">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg21">; -def int_nvvm_read_ptx_sreg_envreg22 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg22">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg22">; -def int_nvvm_read_ptx_sreg_envreg23 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg23">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg23">; -def int_nvvm_read_ptx_sreg_envreg24 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg24">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg24">; -def int_nvvm_read_ptx_sreg_envreg25 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg25">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg25">; -def int_nvvm_read_ptx_sreg_envreg26 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg26">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg26">; -def int_nvvm_read_ptx_sreg_envreg27 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg27">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg27">; -def int_nvvm_read_ptx_sreg_envreg28 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg28">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg28">; -def int_nvvm_read_ptx_sreg_envreg29 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg29">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg29">; -def int_nvvm_read_ptx_sreg_envreg30 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg30">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg30">; -def int_nvvm_read_ptx_sreg_envreg31 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem], - "llvm.nvvm.read.ptx.sreg.envreg31">, - GCCBuiltin<"__nvvm_read_ptx_sreg_envreg31">; - - -// Texture Fetch -// texmode_independent -def int_nvvm_tex_1d_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.1d.v4f32.s32">; -def int_nvvm_tex_1d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.v4f32.f32">; -def int_nvvm_tex_1d_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.level.v4f32.f32">; -def int_nvvm_tex_1d_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.1d.grad.v4f32.f32">; -def int_nvvm_tex_1d_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.1d.v4s32.s32">; -def int_nvvm_tex_1d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.v4s32.f32">; -def int_nvvm_tex_1d_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.level.v4s32.f32">; -def int_nvvm_tex_1d_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.1d.grad.v4s32.f32">; -def int_nvvm_tex_1d_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.1d.v4u32.s32">; -def int_nvvm_tex_1d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.v4u32.f32">; -def int_nvvm_tex_1d_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.level.v4u32.f32">; -def int_nvvm_tex_1d_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.1d.grad.v4u32.f32">; - -def int_nvvm_tex_1d_array_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.1d.array.v4f32.s32">; -def int_nvvm_tex_1d_array_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.v4f32.f32">; -def int_nvvm_tex_1d_array_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.level.v4f32.f32">; -def int_nvvm_tex_1d_array_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.grad.v4f32.f32">; -def int_nvvm_tex_1d_array_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.1d.array.v4s32.s32">; -def int_nvvm_tex_1d_array_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.v4s32.f32">; -def int_nvvm_tex_1d_array_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.level.v4s32.f32">; -def int_nvvm_tex_1d_array_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.grad.v4s32.f32">; -def int_nvvm_tex_1d_array_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.1d.array.v4u32.s32">; -def int_nvvm_tex_1d_array_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.v4u32.f32">; -def int_nvvm_tex_1d_array_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.level.v4u32.f32">; -def int_nvvm_tex_1d_array_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.1d.array.grad.v4u32.f32">; - -def int_nvvm_tex_2d_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.2d.v4f32.s32">; -def int_nvvm_tex_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.v4f32.f32">; -def int_nvvm_tex_2d_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.level.v4f32.f32">; -def int_nvvm_tex_2d_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.grad.v4f32.f32">; -def int_nvvm_tex_2d_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.2d.v4s32.s32">; -def int_nvvm_tex_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.v4s32.f32">; -def int_nvvm_tex_2d_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.level.v4s32.f32">; -def int_nvvm_tex_2d_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.grad.v4s32.f32">; -def int_nvvm_tex_2d_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.2d.v4u32.s32">; -def int_nvvm_tex_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.v4u32.f32">; -def int_nvvm_tex_2d_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.level.v4u32.f32">; -def int_nvvm_tex_2d_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.grad.v4u32.f32">; - -def int_nvvm_tex_2d_array_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty], [], - "llvm.nvvm.tex.2d.array.v4f32.s32">; -def int_nvvm_tex_2d_array_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.v4f32.f32">; -def int_nvvm_tex_2d_array_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.level.v4f32.f32">; -def int_nvvm_tex_2d_array_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.grad.v4f32.f32">; -def int_nvvm_tex_2d_array_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty], [], - "llvm.nvvm.tex.2d.array.v4s32.s32">; -def int_nvvm_tex_2d_array_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.v4s32.f32">; -def int_nvvm_tex_2d_array_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.level.v4s32.f32">; -def int_nvvm_tex_2d_array_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.grad.v4s32.f32">; -def int_nvvm_tex_2d_array_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty], [], - "llvm.nvvm.tex.2d.array.v4u32.s32">; -def int_nvvm_tex_2d_array_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.v4u32.f32">; -def int_nvvm_tex_2d_array_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.level.v4u32.f32">; -def int_nvvm_tex_2d_array_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.2d.array.grad.v4u32.f32">; - -def int_nvvm_tex_3d_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [], "llvm.nvvm.tex.3d.v4f32.s32">; -def int_nvvm_tex_3d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.3d.v4f32.f32">; -def int_nvvm_tex_3d_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.3d.level.v4f32.f32">; -def int_nvvm_tex_3d_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.3d.grad.v4f32.f32">; -def int_nvvm_tex_3d_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [], "llvm.nvvm.tex.3d.v4s32.s32">; -def int_nvvm_tex_3d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.3d.v4s32.f32">; -def int_nvvm_tex_3d_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.3d.level.v4s32.f32">; -def int_nvvm_tex_3d_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.3d.grad.v4s32.f32">; -def int_nvvm_tex_3d_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [], "llvm.nvvm.tex.3d.v4u32.s32">; -def int_nvvm_tex_3d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.3d.v4u32.f32">; -def int_nvvm_tex_3d_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.3d.level.v4u32.f32">; -def int_nvvm_tex_3d_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.3d.grad.v4u32.f32">; - -def int_nvvm_tex_cube_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.v4f32.f32">; -def int_nvvm_tex_cube_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.level.v4f32.f32">; -def int_nvvm_tex_cube_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.v4s32.f32">; -def int_nvvm_tex_cube_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.level.v4s32.f32">; -def int_nvvm_tex_cube_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.v4u32.f32">; -def int_nvvm_tex_cube_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.level.v4u32.f32">; - -def int_nvvm_tex_cube_array_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.array.v4f32.f32">; -def int_nvvm_tex_cube_array_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.array.level.v4f32.f32">; -def int_nvvm_tex_cube_array_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.array.v4s32.f32">; -def int_nvvm_tex_cube_array_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.array.level.v4s32.f32">; -def int_nvvm_tex_cube_array_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.array.v4u32.f32">; -def int_nvvm_tex_cube_array_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.cube.array.level.v4u32.f32">; - -def int_nvvm_tld4_r_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.r.2d.v4f32.f32">; -def int_nvvm_tld4_g_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.g.2d.v4f32.f32">; -def int_nvvm_tld4_b_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.b.2d.v4f32.f32">; -def int_nvvm_tld4_a_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.a.2d.v4f32.f32">; -def int_nvvm_tld4_r_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.r.2d.v4s32.f32">; -def int_nvvm_tld4_g_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.g.2d.v4s32.f32">; -def int_nvvm_tld4_b_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.b.2d.v4s32.f32">; -def int_nvvm_tld4_a_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.a.2d.v4s32.f32">; -def int_nvvm_tld4_r_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.r.2d.v4u32.f32">; -def int_nvvm_tld4_g_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.g.2d.v4u32.f32">; -def int_nvvm_tld4_b_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.b.2d.v4u32.f32">; -def int_nvvm_tld4_a_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.a.2d.v4u32.f32">; - - -// texmode_unified -def int_nvvm_tex_unified_1d_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.1d.v4f32.s32">; -def int_nvvm_tex_unified_1d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.v4f32.f32">; -def int_nvvm_tex_unified_1d_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.level.v4f32.f32">; -def int_nvvm_tex_unified_1d_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.grad.v4f32.f32">; -def int_nvvm_tex_unified_1d_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.1d.v4s32.s32">; -def int_nvvm_tex_unified_1d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.v4s32.f32">; -def int_nvvm_tex_unified_1d_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.level.v4s32.f32">; -def int_nvvm_tex_unified_1d_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.grad.v4s32.f32">; -def int_nvvm_tex_unified_1d_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.1d.v4u32.s32">; -def int_nvvm_tex_unified_1d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.v4u32.f32">; -def int_nvvm_tex_unified_1d_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.level.v4u32.f32">; -def int_nvvm_tex_unified_1d_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.grad.v4u32.f32">; - -def int_nvvm_tex_unified_1d_array_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.1d.array.v4f32.s32">; -def int_nvvm_tex_unified_1d_array_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.v4f32.f32">; -def int_nvvm_tex_unified_1d_array_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.level.v4f32.f32">; -def int_nvvm_tex_unified_1d_array_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.grad.v4f32.f32">; -def int_nvvm_tex_unified_1d_array_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.1d.array.v4s32.s32">; -def int_nvvm_tex_unified_1d_array_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.v4s32.f32">; -def int_nvvm_tex_unified_1d_array_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.level.v4s32.f32">; -def int_nvvm_tex_unified_1d_array_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.grad.v4s32.f32">; -def int_nvvm_tex_unified_1d_array_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.1d.array.v4u32.s32">; -def int_nvvm_tex_unified_1d_array_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.v4u32.f32">; -def int_nvvm_tex_unified_1d_array_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.level.v4u32.f32">; -def int_nvvm_tex_unified_1d_array_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.1d.array.grad.v4u32.f32">; - -def int_nvvm_tex_unified_2d_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.2d.v4f32.s32">; -def int_nvvm_tex_unified_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.v4f32.f32">; -def int_nvvm_tex_unified_2d_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.level.v4f32.f32">; -def int_nvvm_tex_unified_2d_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.grad.v4f32.f32">; -def int_nvvm_tex_unified_2d_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.2d.v4s32.s32">; -def int_nvvm_tex_unified_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.v4s32.f32">; -def int_nvvm_tex_unified_2d_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.level.v4s32.f32">; -def int_nvvm_tex_unified_2d_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.grad.v4s32.f32">; -def int_nvvm_tex_unified_2d_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.tex.unified.2d.v4u32.s32">; -def int_nvvm_tex_unified_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.v4u32.f32">; -def int_nvvm_tex_unified_2d_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.level.v4u32.f32">; -def int_nvvm_tex_unified_2d_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.grad.v4u32.f32">; - -def int_nvvm_tex_unified_2d_array_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty], [], - "llvm.nvvm.tex.unified.2d.array.v4f32.s32">; -def int_nvvm_tex_unified_2d_array_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.v4f32.f32">; -def int_nvvm_tex_unified_2d_array_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.level.v4f32.f32">; -def int_nvvm_tex_unified_2d_array_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.grad.v4f32.f32">; -def int_nvvm_tex_unified_2d_array_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty], [], - "llvm.nvvm.tex.unified.2d.array.v4s32.s32">; -def int_nvvm_tex_unified_2d_array_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.v4s32.f32">; -def int_nvvm_tex_unified_2d_array_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.level.v4s32.f32">; -def int_nvvm_tex_unified_2d_array_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.grad.v4s32.f32">; -def int_nvvm_tex_unified_2d_array_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty], [], - "llvm.nvvm.tex.unified.2d.array.v4u32.s32">; -def int_nvvm_tex_unified_2d_array_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.v4u32.f32">; -def int_nvvm_tex_unified_2d_array_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.level.v4u32.f32">; -def int_nvvm_tex_unified_2d_array_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.2d.array.grad.v4u32.f32">; - -def int_nvvm_tex_unified_3d_v4f32_s32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [], "llvm.nvvm.tex.unified.3d.v4f32.s32">; -def int_nvvm_tex_unified_3d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.v4f32.f32">; -def int_nvvm_tex_unified_3d_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.level.v4f32.f32">; -def int_nvvm_tex_unified_3d_grad_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.grad.v4f32.f32">; -def int_nvvm_tex_unified_3d_v4s32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [], "llvm.nvvm.tex.unified.3d.v4s32.s32">; -def int_nvvm_tex_unified_3d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.v4s32.f32">; -def int_nvvm_tex_unified_3d_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.level.v4s32.f32">; -def int_nvvm_tex_unified_3d_grad_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.grad.v4s32.f32">; -def int_nvvm_tex_unified_3d_v4u32_s32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [], "llvm.nvvm.tex.unified.3d.v4u32.s32">; -def int_nvvm_tex_unified_3d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.v4u32.f32">; -def int_nvvm_tex_unified_3d_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.level.v4u32.f32">; -def int_nvvm_tex_unified_3d_grad_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.3d.grad.v4u32.f32">; - -def int_nvvm_tex_unified_cube_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.v4f32.f32">; -def int_nvvm_tex_unified_cube_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.level.v4f32.f32">; -def int_nvvm_tex_unified_cube_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.v4s32.f32">; -def int_nvvm_tex_unified_cube_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.level.v4s32.f32">; -def int_nvvm_tex_unified_cube_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.v4u32.f32">; -def int_nvvm_tex_unified_cube_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.level.v4u32.f32">; - -def int_nvvm_tex_unified_cube_array_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.array.v4f32.f32">; -def int_nvvm_tex_unified_cube_array_level_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.array.level.v4f32.f32">; -def int_nvvm_tex_unified_cube_array_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.array.v4s32.f32">; -def int_nvvm_tex_unified_cube_array_level_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.array.level.v4s32.f32">; -def int_nvvm_tex_unified_cube_array_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.array.v4u32.f32">; -def int_nvvm_tex_unified_cube_array_level_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, - llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tex.unified.cube.array.level.v4u32.f32">; - -def int_nvvm_tld4_unified_r_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.r.2d.v4f32.f32">; -def int_nvvm_tld4_unified_g_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.g.2d.v4f32.f32">; -def int_nvvm_tld4_unified_b_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.b.2d.v4f32.f32">; -def int_nvvm_tld4_unified_a_2d_v4f32_f32 - : Intrinsic<[llvm_float_ty, llvm_float_ty, llvm_float_ty, llvm_float_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.a.2d.v4f32.f32">; -def int_nvvm_tld4_unified_r_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.r.2d.v4s32.f32">; -def int_nvvm_tld4_unified_g_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.g.2d.v4s32.f32">; -def int_nvvm_tld4_unified_b_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.b.2d.v4s32.f32">; -def int_nvvm_tld4_unified_a_2d_v4s32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.a.2d.v4s32.f32">; -def int_nvvm_tld4_unified_r_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.r.2d.v4u32.f32">; -def int_nvvm_tld4_unified_g_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.g.2d.v4u32.f32">; -def int_nvvm_tld4_unified_b_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.b.2d.v4u32.f32">; -def int_nvvm_tld4_unified_a_2d_v4u32_f32 - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_float_ty, llvm_float_ty], [], - "llvm.nvvm.tld4.unified.a.2d.v4u32.f32">; - - -//=== Surface Load -// .clamp variants -def int_nvvm_suld_1d_i8_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i8.clamp">; -def int_nvvm_suld_1d_i16_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i16.clamp">; -def int_nvvm_suld_1d_i32_clamp - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i32.clamp">; -def int_nvvm_suld_1d_i64_clamp - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i64.clamp">; -def int_nvvm_suld_1d_v2i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i8.clamp">; -def int_nvvm_suld_1d_v2i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i16.clamp">; -def int_nvvm_suld_1d_v2i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i32.clamp">; -def int_nvvm_suld_1d_v2i64_clamp - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i64.clamp">; -def int_nvvm_suld_1d_v4i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i8.clamp">; -def int_nvvm_suld_1d_v4i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i16.clamp">; -def int_nvvm_suld_1d_v4i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i32.clamp">; - -def int_nvvm_suld_1d_array_i8_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i8.clamp">; -def int_nvvm_suld_1d_array_i16_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i16.clamp">; -def int_nvvm_suld_1d_array_i32_clamp - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i32.clamp">; -def int_nvvm_suld_1d_array_i64_clamp - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i64.clamp">; -def int_nvvm_suld_1d_array_v2i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i8.clamp">; -def int_nvvm_suld_1d_array_v2i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i16.clamp">; -def int_nvvm_suld_1d_array_v2i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i32.clamp">; -def int_nvvm_suld_1d_array_v2i64_clamp - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i64.clamp">; -def int_nvvm_suld_1d_array_v4i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i8.clamp">; -def int_nvvm_suld_1d_array_v4i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i16.clamp">; -def int_nvvm_suld_1d_array_v4i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i32.clamp">; - -def int_nvvm_suld_2d_i8_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i8.clamp">; -def int_nvvm_suld_2d_i16_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i16.clamp">; -def int_nvvm_suld_2d_i32_clamp - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i32.clamp">; -def int_nvvm_suld_2d_i64_clamp - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i64.clamp">; -def int_nvvm_suld_2d_v2i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i8.clamp">; -def int_nvvm_suld_2d_v2i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i16.clamp">; -def int_nvvm_suld_2d_v2i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i32.clamp">; -def int_nvvm_suld_2d_v2i64_clamp - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i64.clamp">; -def int_nvvm_suld_2d_v4i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i8.clamp">; -def int_nvvm_suld_2d_v4i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i16.clamp">; -def int_nvvm_suld_2d_v4i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i32.clamp">; - -def int_nvvm_suld_2d_array_i8_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i8.clamp">; -def int_nvvm_suld_2d_array_i16_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i16.clamp">; -def int_nvvm_suld_2d_array_i32_clamp - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i32.clamp">; -def int_nvvm_suld_2d_array_i64_clamp - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i64.clamp">; -def int_nvvm_suld_2d_array_v2i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i8.clamp">; -def int_nvvm_suld_2d_array_v2i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i16.clamp">; -def int_nvvm_suld_2d_array_v2i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i32.clamp">; -def int_nvvm_suld_2d_array_v2i64_clamp - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i64.clamp">; -def int_nvvm_suld_2d_array_v4i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i8.clamp">; -def int_nvvm_suld_2d_array_v4i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i16.clamp">; -def int_nvvm_suld_2d_array_v4i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i32.clamp">; - -def int_nvvm_suld_3d_i8_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i8.clamp">; -def int_nvvm_suld_3d_i16_clamp - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i16.clamp">; -def int_nvvm_suld_3d_i32_clamp - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i32.clamp">; -def int_nvvm_suld_3d_i64_clamp - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i64.clamp">; -def int_nvvm_suld_3d_v2i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i8.clamp">; -def int_nvvm_suld_3d_v2i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i16.clamp">; -def int_nvvm_suld_3d_v2i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i32.clamp">; -def int_nvvm_suld_3d_v2i64_clamp - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i64.clamp">; -def int_nvvm_suld_3d_v4i8_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i8.clamp">; -def int_nvvm_suld_3d_v4i16_clamp - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i16.clamp">; -def int_nvvm_suld_3d_v4i32_clamp - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i32.clamp">; - -// .trap variants -def int_nvvm_suld_1d_i8_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i8.trap">; -def int_nvvm_suld_1d_i16_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i16.trap">; -def int_nvvm_suld_1d_i32_trap - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i32.trap">; -def int_nvvm_suld_1d_i64_trap - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i64.trap">; -def int_nvvm_suld_1d_v2i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i8.trap">; -def int_nvvm_suld_1d_v2i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i16.trap">; -def int_nvvm_suld_1d_v2i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i32.trap">; -def int_nvvm_suld_1d_v2i64_trap - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i64.trap">; -def int_nvvm_suld_1d_v4i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i8.trap">; -def int_nvvm_suld_1d_v4i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i16.trap">; -def int_nvvm_suld_1d_v4i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i32.trap">; - -def int_nvvm_suld_1d_array_i8_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i8.trap">; -def int_nvvm_suld_1d_array_i16_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i16.trap">; -def int_nvvm_suld_1d_array_i32_trap - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i32.trap">; -def int_nvvm_suld_1d_array_i64_trap - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i64.trap">; -def int_nvvm_suld_1d_array_v2i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i8.trap">; -def int_nvvm_suld_1d_array_v2i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i16.trap">; -def int_nvvm_suld_1d_array_v2i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i32.trap">; -def int_nvvm_suld_1d_array_v2i64_trap - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i64.trap">; -def int_nvvm_suld_1d_array_v4i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i8.trap">; -def int_nvvm_suld_1d_array_v4i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i16.trap">; -def int_nvvm_suld_1d_array_v4i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i32.trap">; - -def int_nvvm_suld_2d_i8_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i8.trap">; -def int_nvvm_suld_2d_i16_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i16.trap">; -def int_nvvm_suld_2d_i32_trap - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i32.trap">; -def int_nvvm_suld_2d_i64_trap - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i64.trap">; -def int_nvvm_suld_2d_v2i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i8.trap">; -def int_nvvm_suld_2d_v2i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i16.trap">; -def int_nvvm_suld_2d_v2i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i32.trap">; -def int_nvvm_suld_2d_v2i64_trap - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i64.trap">; -def int_nvvm_suld_2d_v4i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i8.trap">; -def int_nvvm_suld_2d_v4i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i16.trap">; -def int_nvvm_suld_2d_v4i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i32.trap">; - -def int_nvvm_suld_2d_array_i8_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i8.trap">; -def int_nvvm_suld_2d_array_i16_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i16.trap">; -def int_nvvm_suld_2d_array_i32_trap - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i32.trap">; -def int_nvvm_suld_2d_array_i64_trap - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i64.trap">; -def int_nvvm_suld_2d_array_v2i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i8.trap">; -def int_nvvm_suld_2d_array_v2i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i16.trap">; -def int_nvvm_suld_2d_array_v2i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i32.trap">; -def int_nvvm_suld_2d_array_v2i64_trap - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i64.trap">; -def int_nvvm_suld_2d_array_v4i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i8.trap">; -def int_nvvm_suld_2d_array_v4i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i16.trap">; -def int_nvvm_suld_2d_array_v4i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i32.trap">; - -def int_nvvm_suld_3d_i8_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i8.trap">; -def int_nvvm_suld_3d_i16_trap - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i16.trap">; -def int_nvvm_suld_3d_i32_trap - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i32.trap">; -def int_nvvm_suld_3d_i64_trap - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i64.trap">; -def int_nvvm_suld_3d_v2i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i8.trap">; -def int_nvvm_suld_3d_v2i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i16.trap">; -def int_nvvm_suld_3d_v2i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i32.trap">; -def int_nvvm_suld_3d_v2i64_trap - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i64.trap">; -def int_nvvm_suld_3d_v4i8_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i8.trap">; -def int_nvvm_suld_3d_v4i16_trap - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i16.trap">; -def int_nvvm_suld_3d_v4i32_trap - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i32.trap">; - -// .zero variants -def int_nvvm_suld_1d_i8_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i8.zero">; -def int_nvvm_suld_1d_i16_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i16.zero">; -def int_nvvm_suld_1d_i32_zero - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i32.zero">; -def int_nvvm_suld_1d_i64_zero - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.i64.zero">; -def int_nvvm_suld_1d_v2i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i8.zero">; -def int_nvvm_suld_1d_v2i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i16.zero">; -def int_nvvm_suld_1d_v2i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i32.zero">; -def int_nvvm_suld_1d_v2i64_zero - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v2i64.zero">; -def int_nvvm_suld_1d_v4i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i8.zero">; -def int_nvvm_suld_1d_v4i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i16.zero">; -def int_nvvm_suld_1d_v4i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.v4i32.zero">; - -def int_nvvm_suld_1d_array_i8_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i8.zero">; -def int_nvvm_suld_1d_array_i16_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i16.zero">; -def int_nvvm_suld_1d_array_i32_zero - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i32.zero">; -def int_nvvm_suld_1d_array_i64_zero - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.i64.zero">; -def int_nvvm_suld_1d_array_v2i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i8.zero">; -def int_nvvm_suld_1d_array_v2i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i16.zero">; -def int_nvvm_suld_1d_array_v2i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i32.zero">; -def int_nvvm_suld_1d_array_v2i64_zero - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v2i64.zero">; -def int_nvvm_suld_1d_array_v4i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i8.zero">; -def int_nvvm_suld_1d_array_v4i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i16.zero">; -def int_nvvm_suld_1d_array_v4i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.1d.array.v4i32.zero">; - -def int_nvvm_suld_2d_i8_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i8.zero">; -def int_nvvm_suld_2d_i16_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i16.zero">; -def int_nvvm_suld_2d_i32_zero - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i32.zero">; -def int_nvvm_suld_2d_i64_zero - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.i64.zero">; -def int_nvvm_suld_2d_v2i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i8.zero">; -def int_nvvm_suld_2d_v2i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i16.zero">; -def int_nvvm_suld_2d_v2i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i32.zero">; -def int_nvvm_suld_2d_v2i64_zero - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v2i64.zero">; -def int_nvvm_suld_2d_v4i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i8.zero">; -def int_nvvm_suld_2d_v4i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i16.zero">; -def int_nvvm_suld_2d_v4i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.v4i32.zero">; - -def int_nvvm_suld_2d_array_i8_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i8.zero">; -def int_nvvm_suld_2d_array_i16_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i16.zero">; -def int_nvvm_suld_2d_array_i32_zero - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i32.zero">; -def int_nvvm_suld_2d_array_i64_zero - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.i64.zero">; -def int_nvvm_suld_2d_array_v2i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i8.zero">; -def int_nvvm_suld_2d_array_v2i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i16.zero">; -def int_nvvm_suld_2d_array_v2i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i32.zero">; -def int_nvvm_suld_2d_array_v2i64_zero - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v2i64.zero">; -def int_nvvm_suld_2d_array_v4i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i8.zero">; -def int_nvvm_suld_2d_array_v4i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i16.zero">; -def int_nvvm_suld_2d_array_v4i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.2d.array.v4i32.zero">; - -def int_nvvm_suld_3d_i8_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i8.zero">; -def int_nvvm_suld_3d_i16_zero - : Intrinsic<[llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i16.zero">; -def int_nvvm_suld_3d_i32_zero - : Intrinsic<[llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i32.zero">; -def int_nvvm_suld_3d_i64_zero - : Intrinsic<[llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.i64.zero">; -def int_nvvm_suld_3d_v2i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i8.zero">; -def int_nvvm_suld_3d_v2i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i16.zero">; -def int_nvvm_suld_3d_v2i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i32.zero">; -def int_nvvm_suld_3d_v2i64_zero - : Intrinsic<[llvm_i64_ty, llvm_i64_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v2i64.zero">; -def int_nvvm_suld_3d_v4i8_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i8.zero">; -def int_nvvm_suld_3d_v4i16_zero - : Intrinsic<[llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i16.zero">; -def int_nvvm_suld_3d_v4i32_zero - : Intrinsic<[llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.suld.3d.v4i32.zero">; - -//===- Texture Query ------------------------------------------------------===// - -def int_nvvm_txq_channel_order - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.txq.channel.order">, - GCCBuiltin<"__nvvm_txq_channel_order">; -def int_nvvm_txq_channel_data_type - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.txq.channel.data.type">, - GCCBuiltin<"__nvvm_txq_channel_data_type">; -def int_nvvm_txq_width - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.txq.width">, - GCCBuiltin<"__nvvm_txq_width">; -def int_nvvm_txq_height - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.txq.height">, - GCCBuiltin<"__nvvm_txq_height">; -def int_nvvm_txq_depth - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.txq.depth">, - GCCBuiltin<"__nvvm_txq_depth">; -def int_nvvm_txq_array_size - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.txq.array.size">, - GCCBuiltin<"__nvvm_txq_array_size">; -def int_nvvm_txq_num_samples - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.txq.num.samples">, - GCCBuiltin<"__nvvm_txq_num_samples">; -def int_nvvm_txq_num_mipmap_levels - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.txq.num.mipmap.levels">, - GCCBuiltin<"__nvvm_txq_num_mipmap_levels">; - -//===- Surface Query ------------------------------------------------------===// - -def int_nvvm_suq_channel_order - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.suq.channel.order">, - GCCBuiltin<"__nvvm_suq_channel_order">; -def int_nvvm_suq_channel_data_type - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.suq.channel.data.type">, - GCCBuiltin<"__nvvm_suq_channel_data_type">; -def int_nvvm_suq_width - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.suq.width">, - GCCBuiltin<"__nvvm_suq_width">; -def int_nvvm_suq_height - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.suq.height">, - GCCBuiltin<"__nvvm_suq_height">; -def int_nvvm_suq_depth - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.suq.depth">, - GCCBuiltin<"__nvvm_suq_depth">; -def int_nvvm_suq_array_size - : Intrinsic<[llvm_i32_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.suq.array.size">, - GCCBuiltin<"__nvvm_suq_array_size">; - - -//===- Handle Query -------------------------------------------------------===// - -def int_nvvm_istypep_sampler - : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.istypep.sampler">, - GCCBuiltin<"__nvvm_istypep_sampler">; -def int_nvvm_istypep_surface - : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.istypep.surface">, - GCCBuiltin<"__nvvm_istypep_surface">; -def int_nvvm_istypep_texture - : Intrinsic<[llvm_i1_ty], [llvm_i64_ty], [IntrNoMem], - "llvm.nvvm.istypep.texture">, - GCCBuiltin<"__nvvm_istypep_texture">; - - - -//===- Surface Stores -----------------------------------------------------===// - -// Unformatted -// .clamp variant -def int_nvvm_sust_b_1d_i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_i8_clamp">; -def int_nvvm_sust_b_1d_i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_i16_clamp">; -def int_nvvm_sust_b_1d_i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_i32_clamp">; -def int_nvvm_sust_b_1d_i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_i64_clamp">; -def int_nvvm_sust_b_1d_v2i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v2i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i8_clamp">; -def int_nvvm_sust_b_1d_v2i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v2i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i16_clamp">; -def int_nvvm_sust_b_1d_v2i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.v2i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i32_clamp">; -def int_nvvm_sust_b_1d_v2i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.v2i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i64_clamp">; -def int_nvvm_sust_b_1d_v4i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v4i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i8_clamp">; -def int_nvvm_sust_b_1d_v4i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v4i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i16_clamp">; -def int_nvvm_sust_b_1d_v4i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.v4i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i32_clamp">; - - -def int_nvvm_sust_b_1d_array_i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i8_clamp">; -def int_nvvm_sust_b_1d_array_i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i16_clamp">; -def int_nvvm_sust_b_1d_array_i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i32_clamp">; -def int_nvvm_sust_b_1d_array_i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.array.i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i64_clamp">; -def int_nvvm_sust_b_1d_array_v2i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i8_clamp">; -def int_nvvm_sust_b_1d_array_v2i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i16_clamp">; -def int_nvvm_sust_b_1d_array_v2i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i32_clamp">; -def int_nvvm_sust_b_1d_array_v2i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i64_clamp">; -def int_nvvm_sust_b_1d_array_v4i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i8_clamp">; -def int_nvvm_sust_b_1d_array_v4i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i16_clamp">; -def int_nvvm_sust_b_1d_array_v4i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i32_clamp">; - - -def int_nvvm_sust_b_2d_i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_i8_clamp">; -def int_nvvm_sust_b_2d_i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_i16_clamp">; -def int_nvvm_sust_b_2d_i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_i32_clamp">; -def int_nvvm_sust_b_2d_i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_i64_clamp">; -def int_nvvm_sust_b_2d_v2i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v2i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i8_clamp">; -def int_nvvm_sust_b_2d_v2i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v2i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i16_clamp">; -def int_nvvm_sust_b_2d_v2i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.v2i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i32_clamp">; -def int_nvvm_sust_b_2d_v2i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.v2i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i64_clamp">; -def int_nvvm_sust_b_2d_v4i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v4i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i8_clamp">; -def int_nvvm_sust_b_2d_v4i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v4i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i16_clamp">; -def int_nvvm_sust_b_2d_v4i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.v4i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i32_clamp">; - - -def int_nvvm_sust_b_2d_array_i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i8_clamp">; -def int_nvvm_sust_b_2d_array_i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i16_clamp">; -def int_nvvm_sust_b_2d_array_i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i32_clamp">; -def int_nvvm_sust_b_2d_array_i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.array.i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i64_clamp">; -def int_nvvm_sust_b_2d_array_v2i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i8_clamp">; -def int_nvvm_sust_b_2d_array_v2i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i16_clamp">; -def int_nvvm_sust_b_2d_array_v2i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i32_clamp">; -def int_nvvm_sust_b_2d_array_v2i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i64_clamp">; -def int_nvvm_sust_b_2d_array_v4i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i8_clamp">; -def int_nvvm_sust_b_2d_array_v4i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i16_clamp">; -def int_nvvm_sust_b_2d_array_v4i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i32_clamp">; - - -def int_nvvm_sust_b_3d_i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_i8_clamp">; -def int_nvvm_sust_b_3d_i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_i16_clamp">; -def int_nvvm_sust_b_3d_i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_i32_clamp">; -def int_nvvm_sust_b_3d_i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.3d.i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_i64_clamp">; -def int_nvvm_sust_b_3d_v2i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v2i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i8_clamp">; -def int_nvvm_sust_b_3d_v2i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v2i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i16_clamp">; -def int_nvvm_sust_b_3d_v2i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.v2i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i32_clamp">; -def int_nvvm_sust_b_3d_v2i64_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.3d.v2i64.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i64_clamp">; -def int_nvvm_sust_b_3d_v4i8_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v4i8.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i8_clamp">; -def int_nvvm_sust_b_3d_v4i16_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v4i16.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i16_clamp">; -def int_nvvm_sust_b_3d_v4i32_clamp - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.v4i32.clamp">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i32_clamp">; - - -// .trap variant -def int_nvvm_sust_b_1d_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.i8.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_i8_trap">; -def int_nvvm_sust_b_1d_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.i16.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_i16_trap">; -def int_nvvm_sust_b_1d_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.i32.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_i32_trap">; -def int_nvvm_sust_b_1d_i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.i64.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_i64_trap">; -def int_nvvm_sust_b_1d_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i8_trap">; -def int_nvvm_sust_b_1d_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i16_trap">; -def int_nvvm_sust_b_1d_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i32_trap">; -def int_nvvm_sust_b_1d_v2i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.v2i64.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i64_trap">; -def int_nvvm_sust_b_1d_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i8_trap">; -def int_nvvm_sust_b_1d_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i16_trap">; -def int_nvvm_sust_b_1d_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i32_trap">; - - -def int_nvvm_sust_b_1d_array_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.i8.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i8_trap">; -def int_nvvm_sust_b_1d_array_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.i16.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i16_trap">; -def int_nvvm_sust_b_1d_array_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.i32.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i32_trap">; -def int_nvvm_sust_b_1d_array_i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.array.i64.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i64_trap">; -def int_nvvm_sust_b_1d_array_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i8_trap">; -def int_nvvm_sust_b_1d_array_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i16_trap">; -def int_nvvm_sust_b_1d_array_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i32_trap">; -def int_nvvm_sust_b_1d_array_v2i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i64.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i64_trap">; -def int_nvvm_sust_b_1d_array_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i8_trap">; -def int_nvvm_sust_b_1d_array_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i16_trap">; -def int_nvvm_sust_b_1d_array_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i32_trap">; - - -def int_nvvm_sust_b_2d_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.i8.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_i8_trap">; -def int_nvvm_sust_b_2d_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.i16.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_i16_trap">; -def int_nvvm_sust_b_2d_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.i32.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_i32_trap">; -def int_nvvm_sust_b_2d_i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.i64.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_i64_trap">; -def int_nvvm_sust_b_2d_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i8_trap">; -def int_nvvm_sust_b_2d_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i16_trap">; -def int_nvvm_sust_b_2d_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i32_trap">; -def int_nvvm_sust_b_2d_v2i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.v2i64.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i64_trap">; -def int_nvvm_sust_b_2d_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i8_trap">; -def int_nvvm_sust_b_2d_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i16_trap">; -def int_nvvm_sust_b_2d_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i32_trap">; - - -def int_nvvm_sust_b_2d_array_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.i8.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i8_trap">; -def int_nvvm_sust_b_2d_array_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.i16.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i16_trap">; -def int_nvvm_sust_b_2d_array_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.i32.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i32_trap">; -def int_nvvm_sust_b_2d_array_i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.array.i64.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i64_trap">; -def int_nvvm_sust_b_2d_array_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i8_trap">; -def int_nvvm_sust_b_2d_array_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i16_trap">; -def int_nvvm_sust_b_2d_array_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i32_trap">; -def int_nvvm_sust_b_2d_array_v2i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i64.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i64_trap">; -def int_nvvm_sust_b_2d_array_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i8_trap">; -def int_nvvm_sust_b_2d_array_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i16_trap">; -def int_nvvm_sust_b_2d_array_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i32_trap">; - - -def int_nvvm_sust_b_3d_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.i8.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_i8_trap">; -def int_nvvm_sust_b_3d_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.i16.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_i16_trap">; -def int_nvvm_sust_b_3d_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.i32.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_i32_trap">; -def int_nvvm_sust_b_3d_i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.3d.i64.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_i64_trap">; -def int_nvvm_sust_b_3d_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i8_trap">; -def int_nvvm_sust_b_3d_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i16_trap">; -def int_nvvm_sust_b_3d_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i32_trap">; -def int_nvvm_sust_b_3d_v2i64_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.3d.v2i64.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i64_trap">; -def int_nvvm_sust_b_3d_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i8_trap">; -def int_nvvm_sust_b_3d_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i16_trap">; -def int_nvvm_sust_b_3d_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i32_trap">; - - -// .zero variant -def int_nvvm_sust_b_1d_i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.i8.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_i8_zero">; -def int_nvvm_sust_b_1d_i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.i16.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_i16_zero">; -def int_nvvm_sust_b_1d_i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.i32.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_i32_zero">; -def int_nvvm_sust_b_1d_i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.i64.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_i64_zero">; -def int_nvvm_sust_b_1d_v2i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v2i8.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i8_zero">; -def int_nvvm_sust_b_1d_v2i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v2i16.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i16_zero">; -def int_nvvm_sust_b_1d_v2i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.v2i32.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i32_zero">; -def int_nvvm_sust_b_1d_v2i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.v2i64.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_v2i64_zero">; -def int_nvvm_sust_b_1d_v4i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v4i8.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i8_zero">; -def int_nvvm_sust_b_1d_v4i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.v4i16.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i16_zero">; -def int_nvvm_sust_b_1d_v4i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.v4i32.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_v4i32_zero">; - - -def int_nvvm_sust_b_1d_array_i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.i8.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i8_zero">; -def int_nvvm_sust_b_1d_array_i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.i16.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i16_zero">; -def int_nvvm_sust_b_1d_array_i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.i32.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i32_zero">; -def int_nvvm_sust_b_1d_array_i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.array.i64.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_i64_zero">; -def int_nvvm_sust_b_1d_array_v2i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i8.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i8_zero">; -def int_nvvm_sust_b_1d_array_v2i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i16.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i16_zero">; -def int_nvvm_sust_b_1d_array_v2i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i32.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i32_zero">; -def int_nvvm_sust_b_1d_array_v2i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.1d.array.v2i64.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v2i64_zero">; -def int_nvvm_sust_b_1d_array_v4i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i8.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i8_zero">; -def int_nvvm_sust_b_1d_array_v4i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i16.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i16_zero">; -def int_nvvm_sust_b_1d_array_v4i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.1d.array.v4i32.zero">, - GCCBuiltin<"__nvvm_sust_b_1d_array_v4i32_zero">; - - -def int_nvvm_sust_b_2d_i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.i8.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_i8_zero">; -def int_nvvm_sust_b_2d_i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.i16.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_i16_zero">; -def int_nvvm_sust_b_2d_i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.i32.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_i32_zero">; -def int_nvvm_sust_b_2d_i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.i64.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_i64_zero">; -def int_nvvm_sust_b_2d_v2i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v2i8.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i8_zero">; -def int_nvvm_sust_b_2d_v2i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v2i16.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i16_zero">; -def int_nvvm_sust_b_2d_v2i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.v2i32.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i32_zero">; -def int_nvvm_sust_b_2d_v2i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.v2i64.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_v2i64_zero">; -def int_nvvm_sust_b_2d_v4i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v4i8.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i8_zero">; -def int_nvvm_sust_b_2d_v4i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.v4i16.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i16_zero">; -def int_nvvm_sust_b_2d_v4i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.v4i32.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_v4i32_zero">; - - -def int_nvvm_sust_b_2d_array_i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.i8.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i8_zero">; -def int_nvvm_sust_b_2d_array_i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.i16.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i16_zero">; -def int_nvvm_sust_b_2d_array_i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.i32.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i32_zero">; -def int_nvvm_sust_b_2d_array_i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.array.i64.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_i64_zero">; -def int_nvvm_sust_b_2d_array_v2i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i8.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i8_zero">; -def int_nvvm_sust_b_2d_array_v2i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i16.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i16_zero">; -def int_nvvm_sust_b_2d_array_v2i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i32.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i32_zero">; -def int_nvvm_sust_b_2d_array_v2i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.2d.array.v2i64.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v2i64_zero">; -def int_nvvm_sust_b_2d_array_v4i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i8.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i8_zero">; -def int_nvvm_sust_b_2d_array_v4i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i16.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i16_zero">; -def int_nvvm_sust_b_2d_array_v4i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.2d.array.v4i32.zero">, - GCCBuiltin<"__nvvm_sust_b_2d_array_v4i32_zero">; - - -def int_nvvm_sust_b_3d_i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.i8.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_i8_zero">; -def int_nvvm_sust_b_3d_i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.i16.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_i16_zero">; -def int_nvvm_sust_b_3d_i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.i32.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_i32_zero">; -def int_nvvm_sust_b_3d_i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.3d.i64.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_i64_zero">; -def int_nvvm_sust_b_3d_v2i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v2i8.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i8_zero">; -def int_nvvm_sust_b_3d_v2i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v2i16.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i16_zero">; -def int_nvvm_sust_b_3d_v2i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.v2i32.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i32_zero">; -def int_nvvm_sust_b_3d_v2i64_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i64_ty, llvm_i64_ty], [], - "llvm.nvvm.sust.b.3d.v2i64.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_v2i64_zero">; -def int_nvvm_sust_b_3d_v4i8_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v4i8.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i8_zero">; -def int_nvvm_sust_b_3d_v4i16_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.b.3d.v4i16.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i16_zero">; -def int_nvvm_sust_b_3d_v4i32_zero - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.b.3d.v4i32.zero">, - GCCBuiltin<"__nvvm_sust_b_3d_v4i32_zero">; - - - -// Formatted - -def int_nvvm_sust_p_1d_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.i8.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_i8_trap">; -def int_nvvm_sust_p_1d_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.i16.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_i16_trap">; -def int_nvvm_sust_p_1d_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.1d.i32.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_i32_trap">; -def int_nvvm_sust_p_1d_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_v2i8_trap">; -def int_nvvm_sust_p_1d_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_v2i16_trap">; -def int_nvvm_sust_p_1d_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.1d.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_v2i32_trap">; -def int_nvvm_sust_p_1d_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_v4i8_trap">; -def int_nvvm_sust_p_1d_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_v4i16_trap">; -def int_nvvm_sust_p_1d_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.1d.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_v4i32_trap">; - - -def int_nvvm_sust_p_1d_array_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.array.i8.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_i8_trap">; -def int_nvvm_sust_p_1d_array_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.array.i16.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_i16_trap">; -def int_nvvm_sust_p_1d_array_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.1d.array.i32.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_i32_trap">; -def int_nvvm_sust_p_1d_array_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.array.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_v2i8_trap">; -def int_nvvm_sust_p_1d_array_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.array.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_v2i16_trap">; -def int_nvvm_sust_p_1d_array_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.1d.array.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_v2i32_trap">; -def int_nvvm_sust_p_1d_array_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.array.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_v4i8_trap">; -def int_nvvm_sust_p_1d_array_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.1d.array.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_v4i16_trap">; -def int_nvvm_sust_p_1d_array_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.1d.array.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_p_1d_array_v4i32_trap">; - - -def int_nvvm_sust_p_2d_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.i8.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_i8_trap">; -def int_nvvm_sust_p_2d_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.i16.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_i16_trap">; -def int_nvvm_sust_p_2d_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.2d.i32.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_i32_trap">; -def int_nvvm_sust_p_2d_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_v2i8_trap">; -def int_nvvm_sust_p_2d_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_v2i16_trap">; -def int_nvvm_sust_p_2d_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.2d.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_v2i32_trap">; -def int_nvvm_sust_p_2d_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_v4i8_trap">; -def int_nvvm_sust_p_2d_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i16_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_v4i16_trap">; -def int_nvvm_sust_p_2d_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.2d.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_v4i32_trap">; - - -def int_nvvm_sust_p_2d_array_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.array.i8.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_i8_trap">; -def int_nvvm_sust_p_2d_array_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.array.i16.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_i16_trap">; -def int_nvvm_sust_p_2d_array_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.2d.array.i32.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_i32_trap">; -def int_nvvm_sust_p_2d_array_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.array.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_v2i8_trap">; -def int_nvvm_sust_p_2d_array_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.array.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_v2i16_trap">; -def int_nvvm_sust_p_2d_array_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.2d.array.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_v2i32_trap">; -def int_nvvm_sust_p_2d_array_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.array.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_v4i8_trap">; -def int_nvvm_sust_p_2d_array_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.2d.array.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_v4i16_trap">; -def int_nvvm_sust_p_2d_array_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.2d.array.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_p_2d_array_v4i32_trap">; - - -def int_nvvm_sust_p_3d_i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.3d.i8.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_i8_trap">; -def int_nvvm_sust_p_3d_i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.3d.i16.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_i16_trap">; -def int_nvvm_sust_p_3d_i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.3d.i32.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_i32_trap">; -def int_nvvm_sust_p_3d_v2i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.3d.v2i8.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_v2i8_trap">; -def int_nvvm_sust_p_3d_v2i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.3d.v2i16.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_v2i16_trap">; -def int_nvvm_sust_p_3d_v2i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.3d.v2i32.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_v2i32_trap">; -def int_nvvm_sust_p_3d_v4i8_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.3d.v4i8.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_v4i8_trap">; -def int_nvvm_sust_p_3d_v4i16_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i16_ty, llvm_i16_ty, llvm_i16_ty], [], - "llvm.nvvm.sust.p.3d.v4i16.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_v4i16_trap">; -def int_nvvm_sust_p_3d_v4i32_trap - : Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, - llvm_i32_ty, llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [], - "llvm.nvvm.sust.p.3d.v4i32.trap">, - GCCBuiltin<"__nvvm_sust_p_3d_v4i32_trap">; - - -def int_nvvm_rotate_b32 - : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem], "llvm.nvvm.rotate.b32">, - GCCBuiltin<"__nvvm_rotate_b32">; - -def int_nvvm_rotate_b64 - :Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty], - [IntrNoMem], "llvm.nvvm.rotate.b64">, - GCCBuiltin<"__nvvm_rotate_b64">; - -def int_nvvm_rotate_right_b64 - : Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i32_ty], - [IntrNoMem], "llvm.nvvm.rotate.right.b64">, - GCCBuiltin<"__nvvm_rotate_right_b64">; - -def int_nvvm_swap_lo_hi_b64 - : Intrinsic<[llvm_i64_ty], [llvm_i64_ty], - [IntrNoMem], "llvm.nvvm.swap.lo.hi.b64">, - GCCBuiltin<"__nvvm_swap_lo_hi_b64">; - - -// Accessing special registers. -multiclass PTXReadSRegIntrinsic_v4i32 { -// FIXME: Do we need the 128-bit integer type version? -// def _r64 : Intrinsic<[llvm_i128_ty], [], [IntrNoMem]>; - -// FIXME: Enable this once v4i32 support is enabled in back-end. -// def _v4i16 : Intrinsic<[llvm_v4i32_ty], [], [IntrNoMem]>; - - def _x : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, - GCCBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_x">; - def _y : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, - GCCBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_y">; - def _z : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, - GCCBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_z">; - def _w : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, - GCCBuiltin<"__nvvm_read_ptx_sreg_" # regname # "_w">; -} - -class PTXReadSRegIntrinsic_r32 - : Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>, - GCCBuiltin<"__nvvm_read_ptx_sreg_" # name>; - -class PTXReadSRegIntrinsic_r64 - : Intrinsic<[llvm_i64_ty], [], [IntrNoMem]>, - GCCBuiltin<"__nvvm_read_ptx_sreg_" # name>; - -defm int_nvvm_read_ptx_sreg_tid : PTXReadSRegIntrinsic_v4i32<"tid">; -defm int_nvvm_read_ptx_sreg_ntid : PTXReadSRegIntrinsic_v4i32<"ntid">; - -def int_nvvm_read_ptx_sreg_laneid : PTXReadSRegIntrinsic_r32<"laneid">; -def int_nvvm_read_ptx_sreg_warpid : PTXReadSRegIntrinsic_r32<"warpid">; -def int_nvvm_read_ptx_sreg_nwarpid : PTXReadSRegIntrinsic_r32<"nwarpid">; - -defm int_nvvm_read_ptx_sreg_ctaid : PTXReadSRegIntrinsic_v4i32<"ctaid">; -defm int_nvvm_read_ptx_sreg_nctaid : PTXReadSRegIntrinsic_v4i32<"nctaid">; - -def int_nvvm_read_ptx_sreg_smid : PTXReadSRegIntrinsic_r32<"smid">; -def int_nvvm_read_ptx_sreg_nsmid : PTXReadSRegIntrinsic_r32<"nsmid">; -def int_nvvm_read_ptx_sreg_gridid : PTXReadSRegIntrinsic_r32<"gridid">; - -def int_nvvm_read_ptx_sreg_lanemask_eq : - PTXReadSRegIntrinsic_r32<"lanemask_eq">; -def int_nvvm_read_ptx_sreg_lanemask_le : - PTXReadSRegIntrinsic_r32<"lanemask_le">; -def int_nvvm_read_ptx_sreg_lanemask_lt : - PTXReadSRegIntrinsic_r32<"lanemask_lt">; -def int_nvvm_read_ptx_sreg_lanemask_ge : - PTXReadSRegIntrinsic_r32<"lanemask_ge">; -def int_nvvm_read_ptx_sreg_lanemask_gt : - PTXReadSRegIntrinsic_r32<"lanemask_gt">; - -def int_nvvm_read_ptx_sreg_clock : PTXReadSRegIntrinsic_r32<"clock">; -def int_nvvm_read_ptx_sreg_clock64 : PTXReadSRegIntrinsic_r64<"clock64">; - -def int_nvvm_read_ptx_sreg_pm0 : PTXReadSRegIntrinsic_r32<"pm0">; -def int_nvvm_read_ptx_sreg_pm1 : PTXReadSRegIntrinsic_r32<"pm1">; -def int_nvvm_read_ptx_sreg_pm2 : PTXReadSRegIntrinsic_r32<"pm2">; -def int_nvvm_read_ptx_sreg_pm3 : PTXReadSRegIntrinsic_r32<"pm3">; - -def int_nvvm_read_ptx_sreg_warpsize : PTXReadSRegIntrinsic_r32<"warpsize">; - -// -// SHUFFLE -// - -// shfl.down.b32 dest, val, offset, mask_and_clamp -def int_nvvm_shfl_down_i32 : - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.down.i32">, - GCCBuiltin<"__nvvm_shfl_down_i32">; -def int_nvvm_shfl_down_f32 : - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.down.f32">, - GCCBuiltin<"__nvvm_shfl_down_f32">; - -// shfl.up.b32 dest, val, offset, mask_and_clamp -def int_nvvm_shfl_up_i32 : - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.up.i32">, - GCCBuiltin<"__nvvm_shfl_up_i32">; -def int_nvvm_shfl_up_f32 : - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.up.f32">, - GCCBuiltin<"__nvvm_shfl_up_f32">; - -// shfl.bfly.b32 dest, val, offset, mask_and_clamp -def int_nvvm_shfl_bfly_i32 : - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.bfly.i32">, - GCCBuiltin<"__nvvm_shfl_bfly_i32">; -def int_nvvm_shfl_bfly_f32 : - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.bfly.f32">, - GCCBuiltin<"__nvvm_shfl_bfly_f32">; - -// shfl.idx.b32 dest, val, lane, mask_and_clamp -def int_nvvm_shfl_idx_i32 : - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.idx.i32">, - GCCBuiltin<"__nvvm_shfl_idx_i32">; -def int_nvvm_shfl_idx_f32 : - Intrinsic<[llvm_float_ty], [llvm_float_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem, IntrConvergent], "llvm.nvvm.shfl.idx.f32">, - GCCBuiltin<"__nvvm_shfl_idx_f32">; -} diff --git a/llvm/include/llvm/IR/IntrinsicsPowerPC.td b/llvm/include/llvm/IR/IntrinsicsPowerPC.td deleted file mode 100644 index e195c0eb..00000000 --- a/llvm/include/llvm/IR/IntrinsicsPowerPC.td +++ /dev/null @@ -1,985 +0,0 @@ -//===- IntrinsicsPowerPC.td - Defines PowerPC intrinsics ---*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the PowerPC-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -//===----------------------------------------------------------------------===// -// Definitions for all PowerPC intrinsics. -// - -// Non-altivec intrinsics. -let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". - // dcba/dcbf/dcbi/dcbst/dcbt/dcbz/dcbzl(PPC970) instructions. - def int_ppc_dcba : Intrinsic<[], [llvm_ptr_ty], []>; - def int_ppc_dcbf : Intrinsic<[], [llvm_ptr_ty], []>; - def int_ppc_dcbi : Intrinsic<[], [llvm_ptr_ty], []>; - def int_ppc_dcbst : Intrinsic<[], [llvm_ptr_ty], []>; - def int_ppc_dcbt : Intrinsic<[], [llvm_ptr_ty], - [IntrArgMemOnly, NoCapture<0>]>; - def int_ppc_dcbtst: Intrinsic<[], [llvm_ptr_ty], - [IntrArgMemOnly, NoCapture<0>]>; - def int_ppc_dcbz : Intrinsic<[], [llvm_ptr_ty], []>; - def int_ppc_dcbzl : Intrinsic<[], [llvm_ptr_ty], []>; - - // sync instruction (i.e. sync 0, a.k.a hwsync) - def int_ppc_sync : Intrinsic<[], [], []>; - // lwsync is sync 1 - def int_ppc_lwsync : Intrinsic<[], [], []>; - - // Intrinsics used to generate ctr-based loops. These should only be - // generated by the PowerPC backend! - def int_ppc_mtctr : Intrinsic<[], [llvm_anyint_ty], []>; - def int_ppc_is_decremented_ctr_nonzero : Intrinsic<[llvm_i1_ty], [], []>; - - // Intrinsics for [double]word extended forms of divide instructions - def int_ppc_divwe : GCCBuiltin<"__builtin_divwe">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_ppc_divweu : GCCBuiltin<"__builtin_divweu">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_ppc_divde : GCCBuiltin<"__builtin_divde">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem]>; - def int_ppc_divdeu : GCCBuiltin<"__builtin_divdeu">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem]>; - - // Bit permute doubleword - def int_ppc_bpermd : GCCBuiltin<"__builtin_bpermd">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem]>; -} - - -let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.". - /// PowerPC_Vec_Intrinsic - Base class for all altivec intrinsics. - class PowerPC_Vec_Intrinsic ret_types, - list param_types, - list properties> - : GCCBuiltin, - Intrinsic; - - /// PowerPC_VSX_Intrinsic - Base class for all VSX intrinsics. - class PowerPC_VSX_Intrinsic ret_types, - list param_types, - list properties> - : GCCBuiltin, - Intrinsic; -} - -//===----------------------------------------------------------------------===// -// PowerPC Altivec Intrinsic Class Definitions. -// - -/// PowerPC_Vec_FF_Intrinsic - A PowerPC intrinsic that takes one v4f32 -/// vector and returns one. These intrinsics have no side effects. -class PowerPC_Vec_FF_Intrinsic - : PowerPC_Vec_Intrinsic; - -/// PowerPC_Vec_FFF_Intrinsic - A PowerPC intrinsic that takes two v4f32 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_Vec_FFF_Intrinsic - : PowerPC_Vec_Intrinsic; - -/// PowerPC_Vec_BBB_Intrinsic - A PowerPC intrinsic that takes two v16i8 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_Vec_BBB_Intrinsic - : PowerPC_Vec_Intrinsic; - -/// PowerPC_Vec_HHH_Intrinsic - A PowerPC intrinsic that takes two v8i16 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_Vec_HHH_Intrinsic - : PowerPC_Vec_Intrinsic; - -/// PowerPC_Vec_WWW_Intrinsic - A PowerPC intrinsic that takes two v4i32 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_Vec_WWW_Intrinsic - : PowerPC_Vec_Intrinsic; - -/// PowerPC_Vec_DDD_Intrinsic - A PowerPC intrinsic that takes two v2i64 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_Vec_DDD_Intrinsic - : PowerPC_Vec_Intrinsic; - -/// PowerPC_Vec_QQQ_Intrinsic - A PowerPC intrinsic that takes two v1i128 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_Vec_QQQ_Intrinsic - : PowerPC_Vec_Intrinsic; - -//===----------------------------------------------------------------------===// -// PowerPC VSX Intrinsic Class Definitions. -// - -/// PowerPC_VSX_Vec_DDD_Intrinsic - A PowerPC intrinsic that takes two v2f64 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_VSX_Vec_DDD_Intrinsic - : PowerPC_VSX_Intrinsic; - -/// PowerPC_VSX_Vec_FFF_Intrinsic - A PowerPC intrinsic that takes two v4f32 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_VSX_Vec_FFF_Intrinsic - : PowerPC_VSX_Intrinsic; - -/// PowerPC_VSX_Sca_DDD_Intrinsic - A PowerPC intrinsic that takes two f64 -/// scalars and returns one. These intrinsics have no side effects. -class PowerPC_VSX_Sca_DDD_Intrinsic - : PowerPC_VSX_Intrinsic; - -//===----------------------------------------------------------------------===// -// PowerPC Altivec Intrinsic Definitions. - -let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". - // Data Stream Control. - def int_ppc_altivec_dss : GCCBuiltin<"__builtin_altivec_dss">, - Intrinsic<[], [llvm_i32_ty], []>; - def int_ppc_altivec_dssall : GCCBuiltin<"__builtin_altivec_dssall">, - Intrinsic<[], [], []>; - def int_ppc_altivec_dst : GCCBuiltin<"__builtin_altivec_dst">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], - []>; - def int_ppc_altivec_dstt : GCCBuiltin<"__builtin_altivec_dstt">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], - []>; - def int_ppc_altivec_dstst : GCCBuiltin<"__builtin_altivec_dstst">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], - []>; - def int_ppc_altivec_dststt : GCCBuiltin<"__builtin_altivec_dststt">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], - []>; - - // VSCR access. - def int_ppc_altivec_mfvscr : GCCBuiltin<"__builtin_altivec_mfvscr">, - Intrinsic<[llvm_v8i16_ty], [], [IntrReadMem]>; - def int_ppc_altivec_mtvscr : GCCBuiltin<"__builtin_altivec_mtvscr">, - Intrinsic<[], [llvm_v4i32_ty], []>; - - - // Loads. These don't map directly to GCC builtins because they represent the - // source address with a single pointer. - def int_ppc_altivec_lvx : - Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_ppc_altivec_lvxl : - Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_ppc_altivec_lvebx : - Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_ppc_altivec_lvehx : - Intrinsic<[llvm_v8i16_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_ppc_altivec_lvewx : - Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - - // Stores. These don't map directly to GCC builtins because they represent the - // source address with a single pointer. - def int_ppc_altivec_stvx : - Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty], - [IntrArgMemOnly]>; - def int_ppc_altivec_stvxl : - Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty], - [IntrArgMemOnly]>; - def int_ppc_altivec_stvebx : - Intrinsic<[], [llvm_v16i8_ty, llvm_ptr_ty], - [IntrArgMemOnly]>; - def int_ppc_altivec_stvehx : - Intrinsic<[], [llvm_v8i16_ty, llvm_ptr_ty], - [IntrArgMemOnly]>; - def int_ppc_altivec_stvewx : - Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty], - [IntrArgMemOnly]>; - - // Comparisons setting a vector. - def int_ppc_altivec_vcmpbfp : GCCBuiltin<"__builtin_altivec_vcmpbfp">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpeqfp : GCCBuiltin<"__builtin_altivec_vcmpeqfp">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgefp : GCCBuiltin<"__builtin_altivec_vcmpgefp">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtfp : GCCBuiltin<"__builtin_altivec_vcmpgtfp">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vcmpequd : GCCBuiltin<"__builtin_altivec_vcmpequd">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtsd : GCCBuiltin<"__builtin_altivec_vcmpgtsd">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtud : GCCBuiltin<"__builtin_altivec_vcmpgtud">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vcmpequw : GCCBuiltin<"__builtin_altivec_vcmpequw">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtsw : GCCBuiltin<"__builtin_altivec_vcmpgtsw">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtuw : GCCBuiltin<"__builtin_altivec_vcmpgtuw">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vcmpequh : GCCBuiltin<"__builtin_altivec_vcmpequh">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtsh : GCCBuiltin<"__builtin_altivec_vcmpgtsh">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtuh : GCCBuiltin<"__builtin_altivec_vcmpgtuh">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vcmpequb : GCCBuiltin<"__builtin_altivec_vcmpequb">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtsb : GCCBuiltin<"__builtin_altivec_vcmpgtsb">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtub : GCCBuiltin<"__builtin_altivec_vcmpgtub">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - - // Predicate Comparisons. The first operand specifies interpretation of CR6. - def int_ppc_altivec_vcmpbfp_p : GCCBuiltin<"__builtin_altivec_vcmpbfp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpeqfp_p : GCCBuiltin<"__builtin_altivec_vcmpeqfp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgefp_p : GCCBuiltin<"__builtin_altivec_vcmpgefp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtfp_p : GCCBuiltin<"__builtin_altivec_vcmpgtfp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vcmpequd_p : GCCBuiltin<"__builtin_altivec_vcmpequd_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2i64_ty,llvm_v2i64_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtsd_p : GCCBuiltin<"__builtin_altivec_vcmpgtsd_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2i64_ty,llvm_v2i64_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtud_p : GCCBuiltin<"__builtin_altivec_vcmpgtud_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2i64_ty,llvm_v2i64_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vcmpequw_p : GCCBuiltin<"__builtin_altivec_vcmpequw_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtsw_p : GCCBuiltin<"__builtin_altivec_vcmpgtsw_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtuw_p : GCCBuiltin<"__builtin_altivec_vcmpgtuw_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4i32_ty,llvm_v4i32_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vcmpequh_p : GCCBuiltin<"__builtin_altivec_vcmpequh_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtsh_p : GCCBuiltin<"__builtin_altivec_vcmpgtsh_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtuh_p : GCCBuiltin<"__builtin_altivec_vcmpgtuh_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v8i16_ty,llvm_v8i16_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vcmpequb_p : GCCBuiltin<"__builtin_altivec_vcmpequb_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtsb_p : GCCBuiltin<"__builtin_altivec_vcmpgtsb_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcmpgtub_p : GCCBuiltin<"__builtin_altivec_vcmpgtub_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v16i8_ty,llvm_v16i8_ty], - [IntrNoMem]>; -} - -// Vector average. -def int_ppc_altivec_vavgsb : PowerPC_Vec_BBB_Intrinsic<"vavgsb">; -def int_ppc_altivec_vavgsh : PowerPC_Vec_HHH_Intrinsic<"vavgsh">; -def int_ppc_altivec_vavgsw : PowerPC_Vec_WWW_Intrinsic<"vavgsw">; -def int_ppc_altivec_vavgub : PowerPC_Vec_BBB_Intrinsic<"vavgub">; -def int_ppc_altivec_vavguh : PowerPC_Vec_HHH_Intrinsic<"vavguh">; -def int_ppc_altivec_vavguw : PowerPC_Vec_WWW_Intrinsic<"vavguw">; - -// Vector maximum. -def int_ppc_altivec_vmaxfp : PowerPC_Vec_FFF_Intrinsic<"vmaxfp">; -def int_ppc_altivec_vmaxsb : PowerPC_Vec_BBB_Intrinsic<"vmaxsb">; -def int_ppc_altivec_vmaxsh : PowerPC_Vec_HHH_Intrinsic<"vmaxsh">; -def int_ppc_altivec_vmaxsw : PowerPC_Vec_WWW_Intrinsic<"vmaxsw">; -def int_ppc_altivec_vmaxsd : PowerPC_Vec_DDD_Intrinsic<"vmaxsd">; -def int_ppc_altivec_vmaxub : PowerPC_Vec_BBB_Intrinsic<"vmaxub">; -def int_ppc_altivec_vmaxuh : PowerPC_Vec_HHH_Intrinsic<"vmaxuh">; -def int_ppc_altivec_vmaxuw : PowerPC_Vec_WWW_Intrinsic<"vmaxuw">; -def int_ppc_altivec_vmaxud : PowerPC_Vec_DDD_Intrinsic<"vmaxud">; - -// Vector minimum. -def int_ppc_altivec_vminfp : PowerPC_Vec_FFF_Intrinsic<"vminfp">; -def int_ppc_altivec_vminsb : PowerPC_Vec_BBB_Intrinsic<"vminsb">; -def int_ppc_altivec_vminsh : PowerPC_Vec_HHH_Intrinsic<"vminsh">; -def int_ppc_altivec_vminsw : PowerPC_Vec_WWW_Intrinsic<"vminsw">; -def int_ppc_altivec_vminsd : PowerPC_Vec_DDD_Intrinsic<"vminsd">; -def int_ppc_altivec_vminub : PowerPC_Vec_BBB_Intrinsic<"vminub">; -def int_ppc_altivec_vminuh : PowerPC_Vec_HHH_Intrinsic<"vminuh">; -def int_ppc_altivec_vminuw : PowerPC_Vec_WWW_Intrinsic<"vminuw">; -def int_ppc_altivec_vminud : PowerPC_Vec_DDD_Intrinsic<"vminud">; - -// Saturating adds. -def int_ppc_altivec_vaddubs : PowerPC_Vec_BBB_Intrinsic<"vaddubs">; -def int_ppc_altivec_vaddsbs : PowerPC_Vec_BBB_Intrinsic<"vaddsbs">; -def int_ppc_altivec_vadduhs : PowerPC_Vec_HHH_Intrinsic<"vadduhs">; -def int_ppc_altivec_vaddshs : PowerPC_Vec_HHH_Intrinsic<"vaddshs">; -def int_ppc_altivec_vadduws : PowerPC_Vec_WWW_Intrinsic<"vadduws">; -def int_ppc_altivec_vaddsws : PowerPC_Vec_WWW_Intrinsic<"vaddsws">; -def int_ppc_altivec_vaddcuw : PowerPC_Vec_WWW_Intrinsic<"vaddcuw">; -def int_ppc_altivec_vaddcuq : PowerPC_Vec_QQQ_Intrinsic<"vaddcuq">; - -// Saturating subs. -def int_ppc_altivec_vsububs : PowerPC_Vec_BBB_Intrinsic<"vsububs">; -def int_ppc_altivec_vsubsbs : PowerPC_Vec_BBB_Intrinsic<"vsubsbs">; -def int_ppc_altivec_vsubuhs : PowerPC_Vec_HHH_Intrinsic<"vsubuhs">; -def int_ppc_altivec_vsubshs : PowerPC_Vec_HHH_Intrinsic<"vsubshs">; -def int_ppc_altivec_vsubuws : PowerPC_Vec_WWW_Intrinsic<"vsubuws">; -def int_ppc_altivec_vsubsws : PowerPC_Vec_WWW_Intrinsic<"vsubsws">; -def int_ppc_altivec_vsubcuw : PowerPC_Vec_WWW_Intrinsic<"vsubcuw">; -def int_ppc_altivec_vsubcuq : PowerPC_Vec_QQQ_Intrinsic<"vsubcuq">; - -let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.". - // Saturating multiply-adds. - def int_ppc_altivec_vmhaddshs : GCCBuiltin<"__builtin_altivec_vmhaddshs">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; - def int_ppc_altivec_vmhraddshs : GCCBuiltin<"__builtin_altivec_vmhraddshs">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty], [IntrNoMem]>; - - def int_ppc_altivec_vmaddfp : GCCBuiltin<"__builtin_altivec_vmaddfp">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; - def int_ppc_altivec_vnmsubfp : GCCBuiltin<"__builtin_altivec_vnmsubfp">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; - - // Vector Multiply Sum Intructions. - def int_ppc_altivec_vmsummbm : GCCBuiltin<"__builtin_altivec_vmsummbm">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_ppc_altivec_vmsumshm : GCCBuiltin<"__builtin_altivec_vmsumshm">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_ppc_altivec_vmsumshs : GCCBuiltin<"__builtin_altivec_vmsumshs">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_ppc_altivec_vmsumubm : GCCBuiltin<"__builtin_altivec_vmsumubm">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_ppc_altivec_vmsumuhm : GCCBuiltin<"__builtin_altivec_vmsumuhm">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_ppc_altivec_vmsumuhs : GCCBuiltin<"__builtin_altivec_vmsumuhs">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v4i32_ty], [IntrNoMem]>; - - // Vector Multiply Intructions. - def int_ppc_altivec_vmulesb : GCCBuiltin<"__builtin_altivec_vmulesb">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmulesh : GCCBuiltin<"__builtin_altivec_vmulesh">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmulesw : GCCBuiltin<"__builtin_altivec_vmulesw">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmuleub : GCCBuiltin<"__builtin_altivec_vmuleub">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmuleuh : GCCBuiltin<"__builtin_altivec_vmuleuh">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmuleuw : GCCBuiltin<"__builtin_altivec_vmuleuw">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vmulosb : GCCBuiltin<"__builtin_altivec_vmulosb">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmulosh : GCCBuiltin<"__builtin_altivec_vmulosh">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmulosw : GCCBuiltin<"__builtin_altivec_vmulosw">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmuloub : GCCBuiltin<"__builtin_altivec_vmuloub">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmulouh : GCCBuiltin<"__builtin_altivec_vmulouh">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vmulouw : GCCBuiltin<"__builtin_altivec_vmulouw">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - - // Vector Sum Intructions. - def int_ppc_altivec_vsumsws : GCCBuiltin<"__builtin_altivec_vsumsws">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vsum2sws : GCCBuiltin<"__builtin_altivec_vsum2sws">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vsum4sbs : GCCBuiltin<"__builtin_altivec_vsum4sbs">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vsum4shs : GCCBuiltin<"__builtin_altivec_vsum4shs">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vsum4ubs : GCCBuiltin<"__builtin_altivec_vsum4ubs">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, llvm_v4i32_ty], - [IntrNoMem]>; - - // Other multiplies. - def int_ppc_altivec_vmladduhm : GCCBuiltin<"__builtin_altivec_vmladduhm">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - - // Packs. - def int_ppc_altivec_vpkpx : GCCBuiltin<"__builtin_altivec_vpkpx">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vpkshss : GCCBuiltin<"__builtin_altivec_vpkshss">, - Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vpkshus : GCCBuiltin<"__builtin_altivec_vpkshus">, - Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_ppc_altivec_vpkswss : GCCBuiltin<"__builtin_altivec_vpkswss">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vpkswus : GCCBuiltin<"__builtin_altivec_vpkswus">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vpksdss : GCCBuiltin<"__builtin_altivec_vpksdss">, - Intrinsic<[llvm_v4i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_ppc_altivec_vpksdus : GCCBuiltin<"__builtin_altivec_vpksdus">, - Intrinsic<[llvm_v4i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - // vpkuhum is lowered to a shuffle. - def int_ppc_altivec_vpkuhus : GCCBuiltin<"__builtin_altivec_vpkuhus">, - Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - // vpkuwum is lowered to a shuffle. - def int_ppc_altivec_vpkuwus : GCCBuiltin<"__builtin_altivec_vpkuwus">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - // vpkudum is lowered to a shuffle. - def int_ppc_altivec_vpkudus : GCCBuiltin<"__builtin_altivec_vpkudus">, - Intrinsic<[llvm_v4i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - - // Unpacks. - def int_ppc_altivec_vupkhpx : GCCBuiltin<"__builtin_altivec_vupkhpx">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_ppc_altivec_vupkhsb : GCCBuiltin<"__builtin_altivec_vupkhsb">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_ppc_altivec_vupkhsh : GCCBuiltin<"__builtin_altivec_vupkhsh">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_ppc_altivec_vupkhsw : GCCBuiltin<"__builtin_altivec_vupkhsw">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem]>; - def int_ppc_altivec_vupklpx : GCCBuiltin<"__builtin_altivec_vupklpx">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_ppc_altivec_vupklsb : GCCBuiltin<"__builtin_altivec_vupklsb">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_ppc_altivec_vupklsh : GCCBuiltin<"__builtin_altivec_vupklsh">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_ppc_altivec_vupklsw : GCCBuiltin<"__builtin_altivec_vupklsw">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem]>; - - - // FP <-> integer conversion. - def int_ppc_altivec_vcfsx : GCCBuiltin<"__builtin_altivec_vcfsx">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vcfux : GCCBuiltin<"__builtin_altivec_vcfux">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vctsxs : GCCBuiltin<"__builtin_altivec_vctsxs">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_ppc_altivec_vctuxs : GCCBuiltin<"__builtin_altivec_vctuxs">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_ppc_altivec_vrfim : GCCBuiltin<"__builtin_altivec_vrfim">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_ppc_altivec_vrfin : GCCBuiltin<"__builtin_altivec_vrfin">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_ppc_altivec_vrfip : GCCBuiltin<"__builtin_altivec_vrfip">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_ppc_altivec_vrfiz : GCCBuiltin<"__builtin_altivec_vrfiz">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - - // Add Extended Quadword - def int_ppc_altivec_vaddeuqm : GCCBuiltin<"__builtin_altivec_vaddeuqm">, - Intrinsic<[llvm_v1i128_ty], - [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty], - [IntrNoMem]>; - def int_ppc_altivec_vaddecuq : GCCBuiltin<"__builtin_altivec_vaddecuq">, - Intrinsic<[llvm_v1i128_ty], - [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty], - [IntrNoMem]>; - - // Sub Extended Quadword - def int_ppc_altivec_vsubeuqm : GCCBuiltin<"__builtin_altivec_vsubeuqm">, - Intrinsic<[llvm_v1i128_ty], - [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty], - [IntrNoMem]>; - def int_ppc_altivec_vsubecuq : GCCBuiltin<"__builtin_altivec_vsubecuq">, - Intrinsic<[llvm_v1i128_ty], - [llvm_v1i128_ty, llvm_v1i128_ty, llvm_v1i128_ty], - [IntrNoMem]>; -} - -def int_ppc_altivec_vsl : PowerPC_Vec_WWW_Intrinsic<"vsl">; -def int_ppc_altivec_vslo : PowerPC_Vec_WWW_Intrinsic<"vslo">; - -def int_ppc_altivec_vslb : PowerPC_Vec_BBB_Intrinsic<"vslb">; -def int_ppc_altivec_vslh : PowerPC_Vec_HHH_Intrinsic<"vslh">; -def int_ppc_altivec_vslw : PowerPC_Vec_WWW_Intrinsic<"vslw">; - -// Right Shifts. -def int_ppc_altivec_vsr : PowerPC_Vec_WWW_Intrinsic<"vsr">; -def int_ppc_altivec_vsro : PowerPC_Vec_WWW_Intrinsic<"vsro">; - -def int_ppc_altivec_vsrb : PowerPC_Vec_BBB_Intrinsic<"vsrb">; -def int_ppc_altivec_vsrh : PowerPC_Vec_HHH_Intrinsic<"vsrh">; -def int_ppc_altivec_vsrw : PowerPC_Vec_WWW_Intrinsic<"vsrw">; -def int_ppc_altivec_vsrab : PowerPC_Vec_BBB_Intrinsic<"vsrab">; -def int_ppc_altivec_vsrah : PowerPC_Vec_HHH_Intrinsic<"vsrah">; -def int_ppc_altivec_vsraw : PowerPC_Vec_WWW_Intrinsic<"vsraw">; - -// Rotates. -def int_ppc_altivec_vrlb : PowerPC_Vec_BBB_Intrinsic<"vrlb">; -def int_ppc_altivec_vrlh : PowerPC_Vec_HHH_Intrinsic<"vrlh">; -def int_ppc_altivec_vrlw : PowerPC_Vec_WWW_Intrinsic<"vrlw">; -def int_ppc_altivec_vrld : PowerPC_Vec_DDD_Intrinsic<"vrld">; - -let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.". - // Miscellaneous. - def int_ppc_altivec_lvsl : - Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrNoMem]>; - def int_ppc_altivec_lvsr : - Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrNoMem]>; - - def int_ppc_altivec_vperm : GCCBuiltin<"__builtin_altivec_vperm_4si">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v16i8_ty], [IntrNoMem]>; - def int_ppc_altivec_vsel : GCCBuiltin<"__builtin_altivec_vsel_4si">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - def int_ppc_altivec_vgbbd : GCCBuiltin<"__builtin_altivec_vgbbd">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_ppc_altivec_vbpermq : GCCBuiltin<"__builtin_altivec_vbpermq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; -} - -def int_ppc_altivec_vexptefp : PowerPC_Vec_FF_Intrinsic<"vexptefp">; -def int_ppc_altivec_vlogefp : PowerPC_Vec_FF_Intrinsic<"vlogefp">; -def int_ppc_altivec_vrefp : PowerPC_Vec_FF_Intrinsic<"vrefp">; -def int_ppc_altivec_vrsqrtefp : PowerPC_Vec_FF_Intrinsic<"vrsqrtefp">; - -// Power8 Intrinsics -// Crypto -let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.". - def int_ppc_altivec_crypto_vsbox : - GCCBuiltin<"__builtin_altivec_crypto_vsbox">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], [IntrNoMem]>; - def int_ppc_altivec_crypto_vpermxor : - GCCBuiltin<"__builtin_altivec_crypto_vpermxor">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_v16i8_ty], [IntrNoMem]>; - -def int_ppc_altivec_crypto_vshasigmad : - GCCBuiltin<"__builtin_altivec_crypto_vshasigmad">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; -def int_ppc_altivec_crypto_vshasigmaw : - GCCBuiltin<"__builtin_altivec_crypto_vshasigmaw">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; -} -def int_ppc_altivec_crypto_vcipher : - PowerPC_Vec_DDD_Intrinsic<"crypto_vcipher">; -def int_ppc_altivec_crypto_vcipherlast : - PowerPC_Vec_DDD_Intrinsic<"crypto_vcipherlast">; -def int_ppc_altivec_crypto_vncipher : - PowerPC_Vec_DDD_Intrinsic<"crypto_vncipher">; -def int_ppc_altivec_crypto_vncipherlast : - PowerPC_Vec_DDD_Intrinsic<"crypto_vncipherlast">; -def int_ppc_altivec_crypto_vpmsumb : - PowerPC_Vec_BBB_Intrinsic<"crypto_vpmsumb">; -def int_ppc_altivec_crypto_vpmsumh : - PowerPC_Vec_HHH_Intrinsic<"crypto_vpmsumh">; -def int_ppc_altivec_crypto_vpmsumw : - PowerPC_Vec_WWW_Intrinsic<"crypto_vpmsumw">; -def int_ppc_altivec_crypto_vpmsumd : - PowerPC_Vec_DDD_Intrinsic<"crypto_vpmsumd">; - -//===----------------------------------------------------------------------===// -// PowerPC VSX Intrinsic Definitions. - -let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". - -// Vector load. -def int_ppc_vsx_lxvw4x : - Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; -def int_ppc_vsx_lxvd2x : - Intrinsic<[llvm_v2f64_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - -// Vector store. -def int_ppc_vsx_stxvw4x : - Intrinsic<[], [llvm_v4i32_ty, llvm_ptr_ty], [IntrArgMemOnly]>; -def int_ppc_vsx_stxvd2x : - Intrinsic<[], [llvm_v2f64_ty, llvm_ptr_ty], [IntrArgMemOnly]>; - -// Vector and scalar maximum. -def int_ppc_vsx_xvmaxdp : PowerPC_VSX_Vec_DDD_Intrinsic<"xvmaxdp">; -def int_ppc_vsx_xvmaxsp : PowerPC_VSX_Vec_FFF_Intrinsic<"xvmaxsp">; -def int_ppc_vsx_xsmaxdp : PowerPC_VSX_Sca_DDD_Intrinsic<"xsmaxdp">; - -// Vector and scalar minimum. -def int_ppc_vsx_xvmindp : PowerPC_VSX_Vec_DDD_Intrinsic<"xvmindp">; -def int_ppc_vsx_xvminsp : PowerPC_VSX_Vec_FFF_Intrinsic<"xvminsp">; -def int_ppc_vsx_xsmindp : PowerPC_VSX_Sca_DDD_Intrinsic<"xsmindp">; - -// Vector divide. -def int_ppc_vsx_xvdivdp : PowerPC_VSX_Vec_DDD_Intrinsic<"xvdivdp">; -def int_ppc_vsx_xvdivsp : PowerPC_VSX_Vec_FFF_Intrinsic<"xvdivsp">; - -// Vector round-to-infinity (ceil) -def int_ppc_vsx_xvrspip : - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_ppc_vsx_xvrdpip : - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -// Vector reciprocal estimate -def int_ppc_vsx_xvresp : GCCBuiltin<"__builtin_vsx_xvresp">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_ppc_vsx_xvredp : GCCBuiltin<"__builtin_vsx_xvredp">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -// Vector rsqrte -def int_ppc_vsx_xvrsqrtesp : GCCBuiltin<"__builtin_vsx_xvrsqrtesp">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -def int_ppc_vsx_xvrsqrtedp : GCCBuiltin<"__builtin_vsx_xvrsqrtedp">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - -// Vector compare -def int_ppc_vsx_xvcmpeqdp : - PowerPC_VSX_Intrinsic<"xvcmpeqdp", [llvm_v2i64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; -def int_ppc_vsx_xvcmpeqdp_p : GCCBuiltin<"__builtin_vsx_xvcmpeqdp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2f64_ty,llvm_v2f64_ty], - [IntrNoMem]>; -def int_ppc_vsx_xvcmpeqsp : - PowerPC_VSX_Intrinsic<"xvcmpeqsp", [llvm_v4i32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_ppc_vsx_xvcmpeqsp_p : GCCBuiltin<"__builtin_vsx_xvcmpeqsp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty], - [IntrNoMem]>; -def int_ppc_vsx_xvcmpgedp : - PowerPC_VSX_Intrinsic<"xvcmpgedp", [llvm_v2i64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; -def int_ppc_vsx_xvcmpgedp_p : GCCBuiltin<"__builtin_vsx_xvcmpgedp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2f64_ty,llvm_v2f64_ty], - [IntrNoMem]>; -def int_ppc_vsx_xvcmpgesp : - PowerPC_VSX_Intrinsic<"xvcmpgesp", [llvm_v4i32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_ppc_vsx_xvcmpgesp_p : GCCBuiltin<"__builtin_vsx_xvcmpgesp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty], - [IntrNoMem]>; -def int_ppc_vsx_xvcmpgtdp : - PowerPC_VSX_Intrinsic<"xvcmpgtdp", [llvm_v2i64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty], [IntrNoMem]>; -def int_ppc_vsx_xvcmpgtdp_p : GCCBuiltin<"__builtin_vsx_xvcmpgtdp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v2f64_ty,llvm_v2f64_ty], - [IntrNoMem]>; -def int_ppc_vsx_xvcmpgtsp : - PowerPC_VSX_Intrinsic<"xvcmpgtsp", [llvm_v4i32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty], [IntrNoMem]>; -def int_ppc_vsx_xvcmpgtsp_p : GCCBuiltin<"__builtin_vsx_xvcmpgtsp_p">, - Intrinsic<[llvm_i32_ty],[llvm_i32_ty,llvm_v4f32_ty,llvm_v4f32_ty], - [IntrNoMem]>; -def int_ppc_vsx_xxleqv : - PowerPC_VSX_Intrinsic<"xxleqv", [llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// PowerPC QPX Intrinsics. -// - -let TargetPrefix = "ppc" in { // All PPC intrinsics start with "llvm.ppc.". - /// PowerPC_QPX_Intrinsic - Base class for all QPX intrinsics. - class PowerPC_QPX_Intrinsic ret_types, - list param_types, - list properties> - : GCCBuiltin, - Intrinsic; -} - -//===----------------------------------------------------------------------===// -// PowerPC QPX Intrinsic Class Definitions. -// - -/// PowerPC_QPX_FF_Intrinsic - A PowerPC intrinsic that takes one v4f64 -/// vector and returns one. These intrinsics have no side effects. -class PowerPC_QPX_FF_Intrinsic - : PowerPC_QPX_Intrinsic; - -/// PowerPC_QPX_FFF_Intrinsic - A PowerPC intrinsic that takes two v4f64 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_QPX_FFF_Intrinsic - : PowerPC_QPX_Intrinsic; - -/// PowerPC_QPX_FFFF_Intrinsic - A PowerPC intrinsic that takes three v4f64 -/// vectors and returns one. These intrinsics have no side effects. -class PowerPC_QPX_FFFF_Intrinsic - : PowerPC_QPX_Intrinsic; - -/// PowerPC_QPX_Load_Intrinsic - A PowerPC intrinsic that takes a pointer -/// and returns a v4f64. -class PowerPC_QPX_Load_Intrinsic - : PowerPC_QPX_Intrinsic; - -/// PowerPC_QPX_LoadPerm_Intrinsic - A PowerPC intrinsic that takes a pointer -/// and returns a v4f64 permutation. -class PowerPC_QPX_LoadPerm_Intrinsic - : PowerPC_QPX_Intrinsic; - -/// PowerPC_QPX_Store_Intrinsic - A PowerPC intrinsic that takes a pointer -/// and stores a v4f64. -class PowerPC_QPX_Store_Intrinsic - : PowerPC_QPX_Intrinsic; - -//===----------------------------------------------------------------------===// -// PowerPC QPX Intrinsic Definitions. - -let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". - // Add Instructions - def int_ppc_qpx_qvfadd : PowerPC_QPX_FFF_Intrinsic<"qvfadd">; - def int_ppc_qpx_qvfadds : PowerPC_QPX_FFF_Intrinsic<"qvfadds">; - def int_ppc_qpx_qvfsub : PowerPC_QPX_FFF_Intrinsic<"qvfsub">; - def int_ppc_qpx_qvfsubs : PowerPC_QPX_FFF_Intrinsic<"qvfsubs">; - - // Estimate Instructions - def int_ppc_qpx_qvfre : PowerPC_QPX_FF_Intrinsic<"qvfre">; - def int_ppc_qpx_qvfres : PowerPC_QPX_FF_Intrinsic<"qvfres">; - def int_ppc_qpx_qvfrsqrte : PowerPC_QPX_FF_Intrinsic<"qvfrsqrte">; - def int_ppc_qpx_qvfrsqrtes : PowerPC_QPX_FF_Intrinsic<"qvfrsqrtes">; - - // Multiply Instructions - def int_ppc_qpx_qvfmul : PowerPC_QPX_FFF_Intrinsic<"qvfmul">; - def int_ppc_qpx_qvfmuls : PowerPC_QPX_FFF_Intrinsic<"qvfmuls">; - def int_ppc_qpx_qvfxmul : PowerPC_QPX_FFF_Intrinsic<"qvfxmul">; - def int_ppc_qpx_qvfxmuls : PowerPC_QPX_FFF_Intrinsic<"qvfxmuls">; - - // Multiply-add instructions - def int_ppc_qpx_qvfmadd : PowerPC_QPX_FFFF_Intrinsic<"qvfmadd">; - def int_ppc_qpx_qvfmadds : PowerPC_QPX_FFFF_Intrinsic<"qvfmadds">; - def int_ppc_qpx_qvfnmadd : PowerPC_QPX_FFFF_Intrinsic<"qvfnmadd">; - def int_ppc_qpx_qvfnmadds : PowerPC_QPX_FFFF_Intrinsic<"qvfnmadds">; - def int_ppc_qpx_qvfmsub : PowerPC_QPX_FFFF_Intrinsic<"qvfmsub">; - def int_ppc_qpx_qvfmsubs : PowerPC_QPX_FFFF_Intrinsic<"qvfmsubs">; - def int_ppc_qpx_qvfnmsub : PowerPC_QPX_FFFF_Intrinsic<"qvfnmsub">; - def int_ppc_qpx_qvfnmsubs : PowerPC_QPX_FFFF_Intrinsic<"qvfnmsubs">; - def int_ppc_qpx_qvfxmadd : PowerPC_QPX_FFFF_Intrinsic<"qvfxmadd">; - def int_ppc_qpx_qvfxmadds : PowerPC_QPX_FFFF_Intrinsic<"qvfxmadds">; - def int_ppc_qpx_qvfxxnpmadd : PowerPC_QPX_FFFF_Intrinsic<"qvfxxnpmadd">; - def int_ppc_qpx_qvfxxnpmadds : PowerPC_QPX_FFFF_Intrinsic<"qvfxxnpmadds">; - def int_ppc_qpx_qvfxxcpnmadd : PowerPC_QPX_FFFF_Intrinsic<"qvfxxcpnmadd">; - def int_ppc_qpx_qvfxxcpnmadds : PowerPC_QPX_FFFF_Intrinsic<"qvfxxcpnmadds">; - def int_ppc_qpx_qvfxxmadd : PowerPC_QPX_FFFF_Intrinsic<"qvfxxmadd">; - def int_ppc_qpx_qvfxxmadds : PowerPC_QPX_FFFF_Intrinsic<"qvfxxmadds">; - - // Select Instruction - def int_ppc_qpx_qvfsel : PowerPC_QPX_FFFF_Intrinsic<"qvfsel">; - - // Permute Instruction - def int_ppc_qpx_qvfperm : PowerPC_QPX_FFFF_Intrinsic<"qvfperm">; - - // Convert and Round Instructions - def int_ppc_qpx_qvfctid : PowerPC_QPX_FF_Intrinsic<"qvfctid">; - def int_ppc_qpx_qvfctidu : PowerPC_QPX_FF_Intrinsic<"qvfctidu">; - def int_ppc_qpx_qvfctidz : PowerPC_QPX_FF_Intrinsic<"qvfctidz">; - def int_ppc_qpx_qvfctiduz : PowerPC_QPX_FF_Intrinsic<"qvfctiduz">; - def int_ppc_qpx_qvfctiw : PowerPC_QPX_FF_Intrinsic<"qvfctiw">; - def int_ppc_qpx_qvfctiwu : PowerPC_QPX_FF_Intrinsic<"qvfctiwu">; - def int_ppc_qpx_qvfctiwz : PowerPC_QPX_FF_Intrinsic<"qvfctiwz">; - def int_ppc_qpx_qvfctiwuz : PowerPC_QPX_FF_Intrinsic<"qvfctiwuz">; - def int_ppc_qpx_qvfcfid : PowerPC_QPX_FF_Intrinsic<"qvfcfid">; - def int_ppc_qpx_qvfcfidu : PowerPC_QPX_FF_Intrinsic<"qvfcfidu">; - def int_ppc_qpx_qvfcfids : PowerPC_QPX_FF_Intrinsic<"qvfcfids">; - def int_ppc_qpx_qvfcfidus : PowerPC_QPX_FF_Intrinsic<"qvfcfidus">; - def int_ppc_qpx_qvfrsp : PowerPC_QPX_FF_Intrinsic<"qvfrsp">; - def int_ppc_qpx_qvfriz : PowerPC_QPX_FF_Intrinsic<"qvfriz">; - def int_ppc_qpx_qvfrin : PowerPC_QPX_FF_Intrinsic<"qvfrin">; - def int_ppc_qpx_qvfrip : PowerPC_QPX_FF_Intrinsic<"qvfrip">; - def int_ppc_qpx_qvfrim : PowerPC_QPX_FF_Intrinsic<"qvfrim">; - - // Move Instructions - def int_ppc_qpx_qvfneg : PowerPC_QPX_FF_Intrinsic<"qvfneg">; - def int_ppc_qpx_qvfabs : PowerPC_QPX_FF_Intrinsic<"qvfabs">; - def int_ppc_qpx_qvfnabs : PowerPC_QPX_FF_Intrinsic<"qvfnabs">; - def int_ppc_qpx_qvfcpsgn : PowerPC_QPX_FFF_Intrinsic<"qvfcpsgn">; - - // Compare Instructions - def int_ppc_qpx_qvftstnan : PowerPC_QPX_FFF_Intrinsic<"qvftstnan">; - def int_ppc_qpx_qvfcmplt : PowerPC_QPX_FFF_Intrinsic<"qvfcmplt">; - def int_ppc_qpx_qvfcmpgt : PowerPC_QPX_FFF_Intrinsic<"qvfcmpgt">; - def int_ppc_qpx_qvfcmpeq : PowerPC_QPX_FFF_Intrinsic<"qvfcmpeq">; - - // Load instructions - def int_ppc_qpx_qvlfd : PowerPC_QPX_Load_Intrinsic<"qvlfd">; - def int_ppc_qpx_qvlfda : PowerPC_QPX_Load_Intrinsic<"qvlfda">; - def int_ppc_qpx_qvlfs : PowerPC_QPX_Load_Intrinsic<"qvlfs">; - def int_ppc_qpx_qvlfsa : PowerPC_QPX_Load_Intrinsic<"qvlfsa">; - - def int_ppc_qpx_qvlfcda : PowerPC_QPX_Load_Intrinsic<"qvlfcda">; - def int_ppc_qpx_qvlfcd : PowerPC_QPX_Load_Intrinsic<"qvlfcd">; - def int_ppc_qpx_qvlfcsa : PowerPC_QPX_Load_Intrinsic<"qvlfcsa">; - def int_ppc_qpx_qvlfcs : PowerPC_QPX_Load_Intrinsic<"qvlfcs">; - def int_ppc_qpx_qvlfiwaa : PowerPC_QPX_Load_Intrinsic<"qvlfiwaa">; - def int_ppc_qpx_qvlfiwa : PowerPC_QPX_Load_Intrinsic<"qvlfiwa">; - def int_ppc_qpx_qvlfiwza : PowerPC_QPX_Load_Intrinsic<"qvlfiwza">; - def int_ppc_qpx_qvlfiwz : PowerPC_QPX_Load_Intrinsic<"qvlfiwz">; - - def int_ppc_qpx_qvlpcld : PowerPC_QPX_LoadPerm_Intrinsic<"qvlpcld">; - def int_ppc_qpx_qvlpcls : PowerPC_QPX_LoadPerm_Intrinsic<"qvlpcls">; - def int_ppc_qpx_qvlpcrd : PowerPC_QPX_LoadPerm_Intrinsic<"qvlpcrd">; - def int_ppc_qpx_qvlpcrs : PowerPC_QPX_LoadPerm_Intrinsic<"qvlpcrs">; - - // Store instructions - def int_ppc_qpx_qvstfd : PowerPC_QPX_Store_Intrinsic<"qvstfd">; - def int_ppc_qpx_qvstfda : PowerPC_QPX_Store_Intrinsic<"qvstfda">; - def int_ppc_qpx_qvstfs : PowerPC_QPX_Store_Intrinsic<"qvstfs">; - def int_ppc_qpx_qvstfsa : PowerPC_QPX_Store_Intrinsic<"qvstfsa">; - - def int_ppc_qpx_qvstfcda : PowerPC_QPX_Store_Intrinsic<"qvstfcda">; - def int_ppc_qpx_qvstfcd : PowerPC_QPX_Store_Intrinsic<"qvstfcd">; - def int_ppc_qpx_qvstfcsa : PowerPC_QPX_Store_Intrinsic<"qvstfcsa">; - def int_ppc_qpx_qvstfcs : PowerPC_QPX_Store_Intrinsic<"qvstfcs">; - def int_ppc_qpx_qvstfiwa : PowerPC_QPX_Store_Intrinsic<"qvstfiwa">; - def int_ppc_qpx_qvstfiw : PowerPC_QPX_Store_Intrinsic<"qvstfiw">; - - // Logical and permutation formation - def int_ppc_qpx_qvflogical : PowerPC_QPX_Intrinsic<"qvflogical", - [llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_ppc_qpx_qvgpci : PowerPC_QPX_Intrinsic<"qvgpci", - [llvm_v4f64_ty], [llvm_i32_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// PowerPC HTM Intrinsic Definitions. - -let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". - -def int_ppc_tbegin : GCCBuiltin<"__builtin_tbegin">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; -def int_ppc_tend : GCCBuiltin<"__builtin_tend">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; - -def int_ppc_tabort : GCCBuiltin<"__builtin_tabort">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; -def int_ppc_tabortwc : GCCBuiltin<"__builtin_tabortwc">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; -def int_ppc_tabortwci : GCCBuiltin<"__builtin_tabortwci">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; -def int_ppc_tabortdc : GCCBuiltin<"__builtin_tabortdc">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; -def int_ppc_tabortdci : GCCBuiltin<"__builtin_tabortdci">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>; - -def int_ppc_tcheck : GCCBuiltin<"__builtin_tcheck">, - Intrinsic<[llvm_i32_ty], [], []>; -def int_ppc_treclaim : GCCBuiltin<"__builtin_treclaim">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; -def int_ppc_trechkpt : GCCBuiltin<"__builtin_trechkpt">, - Intrinsic<[llvm_i32_ty], [], []>; -def int_ppc_tsr : GCCBuiltin<"__builtin_tsr">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], []>; - -def int_ppc_get_texasr : GCCBuiltin<"__builtin_get_texasr">, - Intrinsic<[llvm_i64_ty], [], []>; -def int_ppc_get_texasru : GCCBuiltin<"__builtin_get_texasru">, - Intrinsic<[llvm_i64_ty], [], []>; -def int_ppc_get_tfhar : GCCBuiltin<"__builtin_get_tfhar">, - Intrinsic<[llvm_i64_ty], [], []>; -def int_ppc_get_tfiar : GCCBuiltin<"__builtin_get_tfiar">, - Intrinsic<[llvm_i64_ty], [], []>; - -def int_ppc_set_texasr : GCCBuiltin<"__builtin_set_texasr">, - Intrinsic<[], [llvm_i64_ty], []>; -def int_ppc_set_texasru : GCCBuiltin<"__builtin_set_texasru">, - Intrinsic<[], [llvm_i64_ty], []>; -def int_ppc_set_tfhar : GCCBuiltin<"__builtin_set_tfhar">, - Intrinsic<[], [llvm_i64_ty], []>; -def int_ppc_set_tfiar : GCCBuiltin<"__builtin_set_tfiar">, - Intrinsic<[], [llvm_i64_ty], []>; - -// Extended mnemonics -def int_ppc_tendall : GCCBuiltin<"__builtin_tendall">, - Intrinsic<[llvm_i32_ty], [], []>; -def int_ppc_tresume : GCCBuiltin<"__builtin_tresume">, - Intrinsic<[llvm_i32_ty], [], []>; -def int_ppc_tsuspend : GCCBuiltin<"__builtin_tsuspend">, - Intrinsic<[llvm_i32_ty], [], []>; - -def int_ppc_ttest : GCCBuiltin<"__builtin_ttest">, - Intrinsic<[llvm_i64_ty], [], []>; -} diff --git a/llvm/include/llvm/IR/IntrinsicsSystemZ.td b/llvm/include/llvm/IR/IntrinsicsSystemZ.td deleted file mode 100644 index bfc15b9b..00000000 --- a/llvm/include/llvm/IR/IntrinsicsSystemZ.td +++ /dev/null @@ -1,387 +0,0 @@ -//===- IntrinsicsSystemZ.td - Defines SystemZ intrinsics ---*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the SystemZ-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -class SystemZUnaryConv - : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[result], [arg], [IntrNoMem]>; - -class SystemZUnary - : SystemZUnaryConv; - -class SystemZUnaryConvCC - : Intrinsic<[result, llvm_i32_ty], [arg], [IntrNoMem]>; - -class SystemZUnaryCC - : SystemZUnaryConvCC; - -class SystemZBinaryConv - : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[result], [arg, arg], [IntrNoMem]>; - -class SystemZBinary - : SystemZBinaryConv; - -class SystemZBinaryInt - : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[type], [type, llvm_i32_ty], [IntrNoMem]>; - -class SystemZBinaryConvCC - : Intrinsic<[result, llvm_i32_ty], [arg, arg], [IntrNoMem]>; - -class SystemZBinaryConvIntCC - : Intrinsic<[result, llvm_i32_ty], [arg, llvm_i32_ty], [IntrNoMem]>; - -class SystemZBinaryCC - : SystemZBinaryConvCC; - -class SystemZTernaryConv - : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[result], [arg, arg, result], [IntrNoMem]>; - -class SystemZTernary - : SystemZTernaryConv; - -class SystemZTernaryInt - : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[type], [type, type, llvm_i32_ty], [IntrNoMem]>; - -class SystemZTernaryIntCC - : Intrinsic<[type, llvm_i32_ty], [type, type, llvm_i32_ty], [IntrNoMem]>; - -class SystemZQuaternaryInt - : GCCBuiltin<"__builtin_s390_" ## name>, - Intrinsic<[type], [type, type, type, llvm_i32_ty], [IntrNoMem]>; - -class SystemZQuaternaryIntCC - : Intrinsic<[type, llvm_i32_ty], [type, type, type, llvm_i32_ty], - [IntrNoMem]>; - -multiclass SystemZUnaryExtBHF { - def b : SystemZUnaryConv; - def h : SystemZUnaryConv; - def f : SystemZUnaryConv; -} - -multiclass SystemZUnaryExtBHWF { - def b : SystemZUnaryConv; - def hw : SystemZUnaryConv; - def f : SystemZUnaryConv; -} - -multiclass SystemZUnaryBHF { - def b : SystemZUnary; - def h : SystemZUnary; - def f : SystemZUnary; -} - -multiclass SystemZUnaryBHFG : SystemZUnaryBHF { - def g : SystemZUnary; -} - -multiclass SystemZUnaryCCBHF { - def bs : SystemZUnaryCC; - def hs : SystemZUnaryCC; - def fs : SystemZUnaryCC; -} - -multiclass SystemZBinaryTruncHFG { - def h : SystemZBinaryConv; - def f : SystemZBinaryConv; - def g : SystemZBinaryConv; -} - -multiclass SystemZBinaryTruncCCHFG { - def hs : SystemZBinaryConvCC; - def fs : SystemZBinaryConvCC; - def gs : SystemZBinaryConvCC; -} - -multiclass SystemZBinaryExtBHF { - def b : SystemZBinaryConv; - def h : SystemZBinaryConv; - def f : SystemZBinaryConv; -} - -multiclass SystemZBinaryExtBHFG : SystemZBinaryExtBHF { - def g : SystemZBinaryConv; -} - -multiclass SystemZBinaryBHF { - def b : SystemZBinary; - def h : SystemZBinary; - def f : SystemZBinary; -} - -multiclass SystemZBinaryBHFG : SystemZBinaryBHF { - def g : SystemZBinary; -} - -multiclass SystemZBinaryIntBHFG { - def b : SystemZBinaryInt; - def h : SystemZBinaryInt; - def f : SystemZBinaryInt; - def g : SystemZBinaryInt; -} - -multiclass SystemZBinaryCCBHF { - def bs : SystemZBinaryCC; - def hs : SystemZBinaryCC; - def fs : SystemZBinaryCC; -} - -multiclass SystemZCompareBHFG { - def bs : SystemZBinaryCC; - def hs : SystemZBinaryCC; - def fs : SystemZBinaryCC; - def gs : SystemZBinaryCC; -} - -multiclass SystemZTernaryExtBHF { - def b : SystemZTernaryConv; - def h : SystemZTernaryConv; - def f : SystemZTernaryConv; -} - -multiclass SystemZTernaryExtBHFG : SystemZTernaryExtBHF { - def g : SystemZTernaryConv; -} - -multiclass SystemZTernaryBHF { - def b : SystemZTernary; - def h : SystemZTernary; - def f : SystemZTernary; -} - -multiclass SystemZTernaryIntBHF { - def b : SystemZTernaryInt; - def h : SystemZTernaryInt; - def f : SystemZTernaryInt; -} - -multiclass SystemZTernaryIntCCBHF { - def bs : SystemZTernaryIntCC; - def hs : SystemZTernaryIntCC; - def fs : SystemZTernaryIntCC; -} - -multiclass SystemZQuaternaryIntBHF { - def b : SystemZQuaternaryInt; - def h : SystemZQuaternaryInt; - def f : SystemZQuaternaryInt; -} - -multiclass SystemZQuaternaryIntBHFG : SystemZQuaternaryIntBHF { - def g : SystemZQuaternaryInt; -} - -multiclass SystemZQuaternaryIntCCBHF { - def bs : SystemZQuaternaryIntCC; - def hs : SystemZQuaternaryIntCC; - def fs : SystemZQuaternaryIntCC; -} - -//===----------------------------------------------------------------------===// -// -// Transactional-execution intrinsics -// -//===----------------------------------------------------------------------===// - -let TargetPrefix = "s390" in { - def int_s390_tbegin : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrNoDuplicate]>; - - def int_s390_tbegin_nofloat : Intrinsic<[llvm_i32_ty], - [llvm_ptr_ty, llvm_i32_ty], - [IntrNoDuplicate]>; - - def int_s390_tbeginc : Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty], - [IntrNoDuplicate]>; - - def int_s390_tabort : Intrinsic<[], [llvm_i64_ty], - [IntrNoReturn, Throws]>; - - def int_s390_tend : GCCBuiltin<"__builtin_tend">, - Intrinsic<[llvm_i32_ty], []>; - - def int_s390_etnd : GCCBuiltin<"__builtin_tx_nesting_depth">, - Intrinsic<[llvm_i32_ty], [], [IntrNoMem]>; - - def int_s390_ntstg : Intrinsic<[], [llvm_i64_ty, llvm_ptr64_ty], - [IntrArgMemOnly]>; - - def int_s390_ppa_txassist : GCCBuiltin<"__builtin_tx_assist">, - Intrinsic<[], [llvm_i32_ty]>; -} - -//===----------------------------------------------------------------------===// -// -// Vector intrinsics -// -//===----------------------------------------------------------------------===// - -let TargetPrefix = "s390" in { - def int_s390_lcbb : GCCBuiltin<"__builtin_s390_lcbb">, - Intrinsic<[llvm_i32_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_s390_vlbb : GCCBuiltin<"__builtin_s390_vlbb">, - Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_s390_vll : GCCBuiltin<"__builtin_s390_vll">, - Intrinsic<[llvm_v16i8_ty], [llvm_i32_ty, llvm_ptr_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_s390_vpdi : GCCBuiltin<"__builtin_s390_vpdi">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_s390_vperm : GCCBuiltin<"__builtin_s390_vperm">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - - defm int_s390_vpks : SystemZBinaryTruncHFG<"vpks">; - defm int_s390_vpks : SystemZBinaryTruncCCHFG; - - defm int_s390_vpkls : SystemZBinaryTruncHFG<"vpkls">; - defm int_s390_vpkls : SystemZBinaryTruncCCHFG; - - def int_s390_vstl : GCCBuiltin<"__builtin_s390_vstl">, - Intrinsic<[], [llvm_v16i8_ty, llvm_i32_ty, llvm_ptr_ty], - // In fact write-only but there's no property - // for that. - [IntrArgMemOnly]>; - - defm int_s390_vupl : SystemZUnaryExtBHWF<"vupl">; - defm int_s390_vupll : SystemZUnaryExtBHF<"vupll">; - - defm int_s390_vuph : SystemZUnaryExtBHF<"vuph">; - defm int_s390_vuplh : SystemZUnaryExtBHF<"vuplh">; - - defm int_s390_vacc : SystemZBinaryBHFG<"vacc">; - - def int_s390_vaq : SystemZBinary<"vaq", llvm_v16i8_ty>; - def int_s390_vacq : SystemZTernary<"vacq", llvm_v16i8_ty>; - def int_s390_vaccq : SystemZBinary<"vaccq", llvm_v16i8_ty>; - def int_s390_vacccq : SystemZTernary<"vacccq", llvm_v16i8_ty>; - - defm int_s390_vavg : SystemZBinaryBHFG<"vavg">; - defm int_s390_vavgl : SystemZBinaryBHFG<"vavgl">; - - def int_s390_vcksm : SystemZBinary<"vcksm", llvm_v4i32_ty>; - - defm int_s390_vgfm : SystemZBinaryExtBHFG<"vgfm">; - defm int_s390_vgfma : SystemZTernaryExtBHFG<"vgfma">; - - defm int_s390_vmah : SystemZTernaryBHF<"vmah">; - defm int_s390_vmalh : SystemZTernaryBHF<"vmalh">; - defm int_s390_vmae : SystemZTernaryExtBHF<"vmae">; - defm int_s390_vmale : SystemZTernaryExtBHF<"vmale">; - defm int_s390_vmao : SystemZTernaryExtBHF<"vmao">; - defm int_s390_vmalo : SystemZTernaryExtBHF<"vmalo">; - - defm int_s390_vmh : SystemZBinaryBHF<"vmh">; - defm int_s390_vmlh : SystemZBinaryBHF<"vmlh">; - defm int_s390_vme : SystemZBinaryExtBHF<"vme">; - defm int_s390_vmle : SystemZBinaryExtBHF<"vmle">; - defm int_s390_vmo : SystemZBinaryExtBHF<"vmo">; - defm int_s390_vmlo : SystemZBinaryExtBHF<"vmlo">; - - defm int_s390_verllv : SystemZBinaryBHFG<"verllv">; - defm int_s390_verll : SystemZBinaryIntBHFG<"verll">; - defm int_s390_verim : SystemZQuaternaryIntBHFG<"verim">; - - def int_s390_vsl : SystemZBinary<"vsl", llvm_v16i8_ty>; - def int_s390_vslb : SystemZBinary<"vslb", llvm_v16i8_ty>; - def int_s390_vsra : SystemZBinary<"vsra", llvm_v16i8_ty>; - def int_s390_vsrab : SystemZBinary<"vsrab", llvm_v16i8_ty>; - def int_s390_vsrl : SystemZBinary<"vsrl", llvm_v16i8_ty>; - def int_s390_vsrlb : SystemZBinary<"vsrlb", llvm_v16i8_ty>; - - def int_s390_vsldb : GCCBuiltin<"__builtin_s390_vsldb">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - defm int_s390_vscbi : SystemZBinaryBHFG<"vscbi">; - - def int_s390_vsq : SystemZBinary<"vsq", llvm_v16i8_ty>; - def int_s390_vsbiq : SystemZTernary<"vsbiq", llvm_v16i8_ty>; - def int_s390_vscbiq : SystemZBinary<"vscbiq", llvm_v16i8_ty>; - def int_s390_vsbcbiq : SystemZTernary<"vsbcbiq", llvm_v16i8_ty>; - - def int_s390_vsumb : SystemZBinaryConv<"vsumb", llvm_v4i32_ty, llvm_v16i8_ty>; - def int_s390_vsumh : SystemZBinaryConv<"vsumh", llvm_v4i32_ty, llvm_v8i16_ty>; - - def int_s390_vsumgh : SystemZBinaryConv<"vsumgh", llvm_v2i64_ty, - llvm_v8i16_ty>; - def int_s390_vsumgf : SystemZBinaryConv<"vsumgf", llvm_v2i64_ty, - llvm_v4i32_ty>; - - def int_s390_vsumqf : SystemZBinaryConv<"vsumqf", llvm_v16i8_ty, - llvm_v4i32_ty>; - def int_s390_vsumqg : SystemZBinaryConv<"vsumqg", llvm_v16i8_ty, - llvm_v2i64_ty>; - - def int_s390_vtm : SystemZBinaryConv<"vtm", llvm_i32_ty, llvm_v16i8_ty>; - - defm int_s390_vceq : SystemZCompareBHFG<"vceq">; - defm int_s390_vch : SystemZCompareBHFG<"vch">; - defm int_s390_vchl : SystemZCompareBHFG<"vchl">; - - defm int_s390_vfae : SystemZTernaryIntBHF<"vfae">; - defm int_s390_vfae : SystemZTernaryIntCCBHF; - defm int_s390_vfaez : SystemZTernaryIntBHF<"vfaez">; - defm int_s390_vfaez : SystemZTernaryIntCCBHF; - - defm int_s390_vfee : SystemZBinaryBHF<"vfee">; - defm int_s390_vfee : SystemZBinaryCCBHF; - defm int_s390_vfeez : SystemZBinaryBHF<"vfeez">; - defm int_s390_vfeez : SystemZBinaryCCBHF; - - defm int_s390_vfene : SystemZBinaryBHF<"vfene">; - defm int_s390_vfene : SystemZBinaryCCBHF; - defm int_s390_vfenez : SystemZBinaryBHF<"vfenez">; - defm int_s390_vfenez : SystemZBinaryCCBHF; - - defm int_s390_vistr : SystemZUnaryBHF<"vistr">; - defm int_s390_vistr : SystemZUnaryCCBHF; - - defm int_s390_vstrc : SystemZQuaternaryIntBHF<"vstrc">; - defm int_s390_vstrc : SystemZQuaternaryIntCCBHF; - defm int_s390_vstrcz : SystemZQuaternaryIntBHF<"vstrcz">; - defm int_s390_vstrcz : SystemZQuaternaryIntCCBHF; - - def int_s390_vfcedbs : SystemZBinaryConvCC; - def int_s390_vfchdbs : SystemZBinaryConvCC; - def int_s390_vfchedbs : SystemZBinaryConvCC; - - def int_s390_vftcidb : SystemZBinaryConvIntCC; - - def int_s390_vfidb : Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// -// Misc intrinsics -// -//===----------------------------------------------------------------------===// - -let TargetPrefix = "s390" in { - def int_s390_tdc : Intrinsic<[llvm_i32_ty], [llvm_anyfloat_ty, llvm_i64_ty], - [IntrNoMem]>; -} diff --git a/llvm/include/llvm/IR/IntrinsicsWebAssembly.td b/llvm/include/llvm/IR/IntrinsicsWebAssembly.td deleted file mode 100644 index 4234c466..00000000 --- a/llvm/include/llvm/IR/IntrinsicsWebAssembly.td +++ /dev/null @@ -1,22 +0,0 @@ -//===- IntrinsicsWebAssembly.td - Defines wasm intrinsics --*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// \brief This file defines all of the WebAssembly-specific intrinsics. -/// -//===----------------------------------------------------------------------===// - -let TargetPrefix = "wasm" in { // All intrinsics start with "llvm.wasm.". - -// Note that current_memory is not IntrNoMem because it must be sequenced with -// respect to grow_memory calls. -def int_wasm_current_memory : Intrinsic<[llvm_anyint_ty], [], [IntrReadMem]>; -def int_wasm_grow_memory : Intrinsic<[], [llvm_anyint_ty], []>; - -} diff --git a/llvm/include/llvm/IR/IntrinsicsX86.td b/llvm/include/llvm/IR/IntrinsicsX86.td deleted file mode 100644 index b965f082..00000000 --- a/llvm/include/llvm/IR/IntrinsicsX86.td +++ /dev/null @@ -1,7440 +0,0 @@ -//===- IntrinsicsX86.td - Defines X86 intrinsics -----------*- tablegen -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the X86-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -//===----------------------------------------------------------------------===// -// Interrupt traps -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_int : Intrinsic<[], [llvm_i8_ty]>; -} - -//===----------------------------------------------------------------------===// -// SEH intrinsics for Windows -let TargetPrefix = "x86" in { - def int_x86_seh_lsda : Intrinsic<[llvm_ptr_ty], [llvm_ptr_ty], [IntrNoMem]>; - - // Marks the EH registration node created in LLVM IR prior to code generation. - def int_x86_seh_ehregnode : Intrinsic<[], [llvm_ptr_ty], []>; - - // Marks the EH guard slot node created in LLVM IR prior to code generation. - def int_x86_seh_ehguard : Intrinsic<[], [llvm_ptr_ty], []>; - - // Given a pointer to the end of an EH registration object, returns the true - // parent frame address that can be used with llvm.localrecover. - def int_x86_seh_recoverfp : Intrinsic<[llvm_ptr_ty], - [llvm_ptr_ty, llvm_ptr_ty], - [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// FLAGS. -let TargetPrefix = "x86" in { - def int_x86_flags_read_u32 : GCCBuiltin<"__builtin_ia32_readeflags_u32">, - Intrinsic<[llvm_i32_ty], [], []>; - def int_x86_flags_read_u64 : GCCBuiltin<"__builtin_ia32_readeflags_u64">, - Intrinsic<[llvm_i64_ty], [], []>; - def int_x86_flags_write_u32 : GCCBuiltin<"__builtin_ia32_writeeflags_u32">, - Intrinsic<[], [llvm_i32_ty], []>; - def int_x86_flags_write_u64 : GCCBuiltin<"__builtin_ia32_writeeflags_u64">, - Intrinsic<[], [llvm_i64_ty], []>; -} - -//===----------------------------------------------------------------------===// -// Read Time Stamp Counter. -let TargetPrefix = "x86" in { - def int_x86_rdtsc : GCCBuiltin<"__builtin_ia32_rdtsc">, - Intrinsic<[llvm_i64_ty], [], []>; - def int_x86_rdtscp : GCCBuiltin<"__builtin_ia32_rdtscp">, - Intrinsic<[llvm_i64_ty], [llvm_ptr_ty], [IntrArgMemOnly]>; -} - -// Read Performance-Monitoring Counter. -let TargetPrefix = "x86" in { - def int_x86_rdpmc : GCCBuiltin<"__builtin_ia32_rdpmc">, - Intrinsic<[llvm_i64_ty], [llvm_i32_ty], []>; -} - -//===----------------------------------------------------------------------===// -// 3DNow! - -let TargetPrefix = "x86" in { - def int_x86_3dnow_pavgusb : GCCBuiltin<"__builtin_ia32_pavgusb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pf2id : GCCBuiltin<"__builtin_ia32_pf2id">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_3dnow_pfacc : GCCBuiltin<"__builtin_ia32_pfacc">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfadd : GCCBuiltin<"__builtin_ia32_pfadd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfcmpeq : GCCBuiltin<"__builtin_ia32_pfcmpeq">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfcmpge : GCCBuiltin<"__builtin_ia32_pfcmpge">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfcmpgt : GCCBuiltin<"__builtin_ia32_pfcmpgt">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfmax : GCCBuiltin<"__builtin_ia32_pfmax">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfmin : GCCBuiltin<"__builtin_ia32_pfmin">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfmul : GCCBuiltin<"__builtin_ia32_pfmul">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfrcp : GCCBuiltin<"__builtin_ia32_pfrcp">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_3dnow_pfrcpit1 : GCCBuiltin<"__builtin_ia32_pfrcpit1">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfrcpit2 : GCCBuiltin<"__builtin_ia32_pfrcpit2">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfrsqrt : GCCBuiltin<"__builtin_ia32_pfrsqrt">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_3dnow_pfrsqit1 : GCCBuiltin<"__builtin_ia32_pfrsqit1">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfsub : GCCBuiltin<"__builtin_ia32_pfsub">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pfsubr : GCCBuiltin<"__builtin_ia32_pfsubr">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnow_pi2fd : GCCBuiltin<"__builtin_ia32_pi2fd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_3dnow_pmulhrw : GCCBuiltin<"__builtin_ia32_pmulhrw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// 3DNow! extensions - -let TargetPrefix = "x86" in { - def int_x86_3dnowa_pf2iw : GCCBuiltin<"__builtin_ia32_pf2iw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_3dnowa_pfnacc : GCCBuiltin<"__builtin_ia32_pfnacc">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnowa_pfpnacc : GCCBuiltin<"__builtin_ia32_pfpnacc">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_3dnowa_pi2fw : GCCBuiltin<"__builtin_ia32_pi2fw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_3dnowa_pswapd : - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// SSE1 - -// Arithmetic ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse_add_ss : - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_sub_ss : - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_mul_ss : - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_div_ss : - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_sqrt_ss : GCCBuiltin<"__builtin_ia32_sqrtss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_sse_sqrt_ps : GCCBuiltin<"__builtin_ia32_sqrtps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_sse_rcp_ss : GCCBuiltin<"__builtin_ia32_rcpss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_sse_rcp_ps : GCCBuiltin<"__builtin_ia32_rcpps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_sse_rsqrt_ss : GCCBuiltin<"__builtin_ia32_rsqrtss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_sse_rsqrt_ps : GCCBuiltin<"__builtin_ia32_rsqrtps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_sse_min_ss : GCCBuiltin<"__builtin_ia32_minss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_min_ps : GCCBuiltin<"__builtin_ia32_minps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_max_ss : GCCBuiltin<"__builtin_ia32_maxss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_max_ps : GCCBuiltin<"__builtin_ia32_maxps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; -} - -// Comparison ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse_cmp_ss : GCCBuiltin<"__builtin_ia32_cmpss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_sse_cmp_ps : - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_sse_comieq_ss : GCCBuiltin<"__builtin_ia32_comieq">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_comilt_ss : GCCBuiltin<"__builtin_ia32_comilt">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_comile_ss : GCCBuiltin<"__builtin_ia32_comile">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_comigt_ss : GCCBuiltin<"__builtin_ia32_comigt">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_comige_ss : GCCBuiltin<"__builtin_ia32_comige">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_comineq_ss : GCCBuiltin<"__builtin_ia32_comineq">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_ucomieq_ss : GCCBuiltin<"__builtin_ia32_ucomieq">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_ucomilt_ss : GCCBuiltin<"__builtin_ia32_ucomilt">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_ucomile_ss : GCCBuiltin<"__builtin_ia32_ucomile">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_ucomigt_ss : GCCBuiltin<"__builtin_ia32_ucomigt">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_ucomige_ss : GCCBuiltin<"__builtin_ia32_ucomige">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_ucomineq_ss : GCCBuiltin<"__builtin_ia32_ucomineq">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; -} - - -// Conversion ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse_cvtss2si : GCCBuiltin<"__builtin_ia32_cvtss2si">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_cvtss2si64 : GCCBuiltin<"__builtin_ia32_cvtss2si64">, - Intrinsic<[llvm_i64_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_cvttss2si : GCCBuiltin<"__builtin_ia32_cvttss2si">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_cvttss2si64 : GCCBuiltin<"__builtin_ia32_cvttss2si64">, - Intrinsic<[llvm_i64_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_cvtsi2ss : GCCBuiltin<"__builtin_ia32_cvtsi2ss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse_cvtsi642ss : GCCBuiltin<"__builtin_ia32_cvtsi642ss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_i64_ty], [IntrNoMem]>; - - def int_x86_sse_cvtps2pi : GCCBuiltin<"__builtin_ia32_cvtps2pi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_cvttps2pi: GCCBuiltin<"__builtin_ia32_cvttps2pi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_cvtpi2ps : GCCBuiltin<"__builtin_ia32_cvtpi2ps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_x86mmx_ty], [IntrNoMem]>; -} - -// Cacheability support ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse_sfence : GCCBuiltin<"__builtin_ia32_sfence">, - Intrinsic<[], [], []>; -} - -// Control register. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse_stmxcsr : - Intrinsic<[], [llvm_ptr_ty], []>; - def int_x86_sse_ldmxcsr : - Intrinsic<[], [llvm_ptr_ty], []>; -} - -// Misc. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse_movmsk_ps : GCCBuiltin<"__builtin_ia32_movmskps">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// SSE2 - -// FP arithmetic ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse2_add_sd : - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_sub_sd : - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_mul_sd : - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_div_sd : - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_sqrt_sd : GCCBuiltin<"__builtin_ia32_sqrtsd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_sse2_sqrt_pd : GCCBuiltin<"__builtin_ia32_sqrtpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_sse2_min_sd : GCCBuiltin<"__builtin_ia32_minsd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_min_pd : GCCBuiltin<"__builtin_ia32_minpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_max_sd : GCCBuiltin<"__builtin_ia32_maxsd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_max_pd : GCCBuiltin<"__builtin_ia32_maxpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; -} - -// FP comparison ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse2_cmp_sd : GCCBuiltin<"__builtin_ia32_cmpsd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_sse2_cmp_pd : - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_sse2_comieq_sd : GCCBuiltin<"__builtin_ia32_comisdeq">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_comilt_sd : GCCBuiltin<"__builtin_ia32_comisdlt">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_comile_sd : GCCBuiltin<"__builtin_ia32_comisdle">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_comigt_sd : GCCBuiltin<"__builtin_ia32_comisdgt">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_comige_sd : GCCBuiltin<"__builtin_ia32_comisdge">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_comineq_sd : GCCBuiltin<"__builtin_ia32_comisdneq">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_ucomieq_sd : GCCBuiltin<"__builtin_ia32_ucomisdeq">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_ucomilt_sd : GCCBuiltin<"__builtin_ia32_ucomisdlt">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_ucomile_sd : GCCBuiltin<"__builtin_ia32_ucomisdle">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_ucomigt_sd : GCCBuiltin<"__builtin_ia32_ucomisdgt">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_ucomige_sd : GCCBuiltin<"__builtin_ia32_ucomisdge">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_ucomineq_sd : GCCBuiltin<"__builtin_ia32_ucomisdneq">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; -} - -// Integer arithmetic ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse2_padds_b : GCCBuiltin<"__builtin_ia32_paddsb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_padds_w : GCCBuiltin<"__builtin_ia32_paddsw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_paddus_b : GCCBuiltin<"__builtin_ia32_paddusb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_paddus_w : GCCBuiltin<"__builtin_ia32_paddusw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_psubs_b : GCCBuiltin<"__builtin_ia32_psubsb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_sse2_psubs_w : GCCBuiltin<"__builtin_ia32_psubsw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_sse2_psubus_b : GCCBuiltin<"__builtin_ia32_psubusb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_sse2_psubus_w : GCCBuiltin<"__builtin_ia32_psubusw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_sse2_pmulhu_w : GCCBuiltin<"__builtin_ia32_pmulhuw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_pmulh_w : GCCBuiltin<"__builtin_ia32_pmulhw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_pmulu_dq : GCCBuiltin<"__builtin_ia32_pmuludq128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_pmadd_wd : GCCBuiltin<"__builtin_ia32_pmaddwd128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_pavg_b : GCCBuiltin<"__builtin_ia32_pavgb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_pavg_w : GCCBuiltin<"__builtin_ia32_pavgw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem, Commutative]>; - def int_x86_sse2_psad_bw : GCCBuiltin<"__builtin_ia32_psadbw128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem, Commutative]>; -} - -// Integer shift ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse2_psll_w : GCCBuiltin<"__builtin_ia32_psllw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_sse2_psll_d : GCCBuiltin<"__builtin_ia32_pslld128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_sse2_psll_q : GCCBuiltin<"__builtin_ia32_psllq128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty], [IntrNoMem]>; - def int_x86_sse2_psrl_w : GCCBuiltin<"__builtin_ia32_psrlw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_sse2_psrl_d : GCCBuiltin<"__builtin_ia32_psrld128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_sse2_psrl_q : GCCBuiltin<"__builtin_ia32_psrlq128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty], [IntrNoMem]>; - def int_x86_sse2_psra_w : GCCBuiltin<"__builtin_ia32_psraw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_sse2_psra_d : GCCBuiltin<"__builtin_ia32_psrad128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - - def int_x86_sse2_pslli_w : GCCBuiltin<"__builtin_ia32_psllwi128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_pslli_d : GCCBuiltin<"__builtin_ia32_pslldi128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_pslli_q : GCCBuiltin<"__builtin_ia32_psllqi128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_psrli_w : GCCBuiltin<"__builtin_ia32_psrlwi128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_psrli_d : GCCBuiltin<"__builtin_ia32_psrldi128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_psrli_q : GCCBuiltin<"__builtin_ia32_psrlqi128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_psrai_w : GCCBuiltin<"__builtin_ia32_psrawi128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_psrai_d : GCCBuiltin<"__builtin_ia32_psradi128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_i32_ty], [IntrNoMem]>; -} - -// Conversion ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse2_cvtdq2ps : GCCBuiltin<"__builtin_ia32_cvtdq2ps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_sse2_cvtpd2dq : GCCBuiltin<"__builtin_ia32_cvtpd2dq">, - Intrinsic<[llvm_v4i32_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_cvttpd2dq : GCCBuiltin<"__builtin_ia32_cvttpd2dq">, - Intrinsic<[llvm_v4i32_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_cvtpd2ps : GCCBuiltin<"__builtin_ia32_cvtpd2ps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_cvtps2dq : GCCBuiltin<"__builtin_ia32_cvtps2dq">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse2_cvttps2dq : GCCBuiltin<"__builtin_ia32_cvttps2dq">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse2_cvtsd2si : GCCBuiltin<"__builtin_ia32_cvtsd2si">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_cvtsd2si64 : GCCBuiltin<"__builtin_ia32_cvtsd2si64">, - Intrinsic<[llvm_i64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_cvttsd2si : GCCBuiltin<"__builtin_ia32_cvttsd2si">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_cvttsd2si64 : GCCBuiltin<"__builtin_ia32_cvttsd2si64">, - Intrinsic<[llvm_i64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_cvtsi2sd : GCCBuiltin<"__builtin_ia32_cvtsi2sd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse2_cvtsi642sd : GCCBuiltin<"__builtin_ia32_cvtsi642sd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_i64_ty], [IntrNoMem]>; - def int_x86_sse2_cvtsd2ss : GCCBuiltin<"__builtin_ia32_cvtsd2ss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_cvtss2sd : GCCBuiltin<"__builtin_ia32_cvtss2sd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse_cvtpd2pi : GCCBuiltin<"__builtin_ia32_cvtpd2pi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse_cvttpd2pi: GCCBuiltin<"__builtin_ia32_cvttpd2pi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse_cvtpi2pd : GCCBuiltin<"__builtin_ia32_cvtpi2pd">, - Intrinsic<[llvm_v2f64_ty], [llvm_x86mmx_ty], [IntrNoMem]>; -} - -// Misc. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse2_packsswb_128 : GCCBuiltin<"__builtin_ia32_packsswb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_sse2_packssdw_128 : GCCBuiltin<"__builtin_ia32_packssdw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_sse2_packuswb_128 : GCCBuiltin<"__builtin_ia32_packuswb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_sse2_movmsk_pd : GCCBuiltin<"__builtin_ia32_movmskpd">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse2_pmovmskb_128 : GCCBuiltin<"__builtin_ia32_pmovmskb128">, - Intrinsic<[llvm_i32_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_sse2_maskmov_dqu : GCCBuiltin<"__builtin_ia32_maskmovdqu">, - Intrinsic<[], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_ptr_ty], []>; - def int_x86_sse2_clflush : GCCBuiltin<"__builtin_ia32_clflush">, - Intrinsic<[], [llvm_ptr_ty], []>; - def int_x86_sse2_lfence : GCCBuiltin<"__builtin_ia32_lfence">, - Intrinsic<[], [], []>; - def int_x86_sse2_mfence : GCCBuiltin<"__builtin_ia32_mfence">, - Intrinsic<[], [], []>; - def int_x86_sse2_pause : GCCBuiltin<"__builtin_ia32_pause">, - Intrinsic<[], [], []>; -} - -//===----------------------------------------------------------------------===// -// SSE3 - -// Addition / subtraction ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse3_addsub_ps : GCCBuiltin<"__builtin_ia32_addsubps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse3_addsub_pd : GCCBuiltin<"__builtin_ia32_addsubpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; -} - -// Horizontal ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse3_hadd_ps : GCCBuiltin<"__builtin_ia32_haddps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse3_hadd_pd : GCCBuiltin<"__builtin_ia32_haddpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_sse3_hsub_ps : GCCBuiltin<"__builtin_ia32_hsubps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_sse3_hsub_pd : GCCBuiltin<"__builtin_ia32_hsubpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; -} - -// Specialized unaligned load. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse3_ldu_dq : GCCBuiltin<"__builtin_ia32_lddqu">, - Intrinsic<[llvm_v16i8_ty], [llvm_ptr_ty], [IntrReadMem]>; -} - -// Thread synchronization ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse3_monitor : GCCBuiltin<"__builtin_ia32_monitor">, - Intrinsic<[], [llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_sse3_mwait : GCCBuiltin<"__builtin_ia32_mwait">, - Intrinsic<[], [llvm_i32_ty, - llvm_i32_ty], []>; -} - -//===----------------------------------------------------------------------===// -// SSSE3 - -// Horizontal arithmetic ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_ssse3_phadd_w : GCCBuiltin<"__builtin_ia32_phaddw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_phadd_w_128 : GCCBuiltin<"__builtin_ia32_phaddw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - - def int_x86_ssse3_phadd_d : GCCBuiltin<"__builtin_ia32_phaddd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_phadd_d_128 : GCCBuiltin<"__builtin_ia32_phaddd128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - - def int_x86_ssse3_phadd_sw : GCCBuiltin<"__builtin_ia32_phaddsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_phadd_sw_128 : GCCBuiltin<"__builtin_ia32_phaddsw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - - def int_x86_ssse3_phsub_w : GCCBuiltin<"__builtin_ia32_phsubw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_phsub_w_128 : GCCBuiltin<"__builtin_ia32_phsubw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - - def int_x86_ssse3_phsub_d : GCCBuiltin<"__builtin_ia32_phsubd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_phsub_d_128 : GCCBuiltin<"__builtin_ia32_phsubd128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - - def int_x86_ssse3_phsub_sw : GCCBuiltin<"__builtin_ia32_phsubsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_phsub_sw_128 : GCCBuiltin<"__builtin_ia32_phsubsw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - - def int_x86_ssse3_pmadd_ub_sw : GCCBuiltin<"__builtin_ia32_pmaddubsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_pmadd_ub_sw_128 : GCCBuiltin<"__builtin_ia32_pmaddubsw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem]>; -} - -// Packed multiply high with round and scale -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_ssse3_pmul_hr_sw : GCCBuiltin<"__builtin_ia32_pmulhrsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_ssse3_pmul_hr_sw_128 : GCCBuiltin<"__builtin_ia32_pmulhrsw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem, Commutative]>; -} - -// Shuffle ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_ssse3_pshuf_b : GCCBuiltin<"__builtin_ia32_pshufb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_pshuf_b_128 : GCCBuiltin<"__builtin_ia32_pshufb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_sse_pshuf_w : GCCBuiltin<"__builtin_ia32_pshufw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_i8_ty], - [IntrNoMem]>; -} - -// Sign ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_ssse3_psign_b : GCCBuiltin<"__builtin_ia32_psignb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_psign_b_128 : GCCBuiltin<"__builtin_ia32_psignb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty], [IntrNoMem]>; - - def int_x86_ssse3_psign_w : GCCBuiltin<"__builtin_ia32_psignw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_psign_w_128 : GCCBuiltin<"__builtin_ia32_psignw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - - def int_x86_ssse3_psign_d : GCCBuiltin<"__builtin_ia32_psignd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_psign_d_128 : GCCBuiltin<"__builtin_ia32_psignd128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; -} - -// Absolute value ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_ssse3_pabs_b : GCCBuiltin<"__builtin_ia32_pabsb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_pabs_b_128 : GCCBuiltin<"__builtin_ia32_pabsb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty], [IntrNoMem]>; - - def int_x86_ssse3_pabs_w : GCCBuiltin<"__builtin_ia32_pabsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_pabs_w_128 : GCCBuiltin<"__builtin_ia32_pabsw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], [IntrNoMem]>; - - def int_x86_ssse3_pabs_d : GCCBuiltin<"__builtin_ia32_pabsd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_ssse3_pabs_d_128 : GCCBuiltin<"__builtin_ia32_pabsd128">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// SSE4.1 - -// FP rounding ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_round_ss : GCCBuiltin<"__builtin_ia32_roundss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse41_round_ps : GCCBuiltin<"__builtin_ia32_roundps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse41_round_sd : GCCBuiltin<"__builtin_ia32_roundsd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_sse41_round_pd : GCCBuiltin<"__builtin_ia32_roundpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_i32_ty], [IntrNoMem]>; -} - -// Vector min element -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_phminposuw : GCCBuiltin<"__builtin_ia32_phminposuw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty], - [IntrNoMem]>; -} - -// Advanced Encryption Standard (AES) Instructions -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_aesni_aesimc : GCCBuiltin<"__builtin_ia32_aesimc128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_aesni_aesenc : GCCBuiltin<"__builtin_ia32_aesenc128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_aesni_aesenclast : GCCBuiltin<"__builtin_ia32_aesenclast128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_aesni_aesdec : GCCBuiltin<"__builtin_ia32_aesdec128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_aesni_aesdeclast : GCCBuiltin<"__builtin_ia32_aesdeclast128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_aesni_aeskeygenassist : - GCCBuiltin<"__builtin_ia32_aeskeygenassist128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; -} - -// PCLMUL instruction -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_pclmulqdq : GCCBuiltin<"__builtin_ia32_pclmulqdq128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; -} - -// Vector pack -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_packusdw : GCCBuiltin<"__builtin_ia32_packusdw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; -} - -// Vector multiply -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_pmuldq : GCCBuiltin<"__builtin_ia32_pmuldq128">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem, Commutative]>; -} - -// Vector insert -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_insertps : GCCBuiltin<"__builtin_ia32_insertps128">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; -} - -// Vector blend -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_pblendvb : GCCBuiltin<"__builtin_ia32_pblendvb128">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty,llvm_v16i8_ty], - [IntrNoMem]>; - def int_x86_sse41_blendvpd : GCCBuiltin<"__builtin_ia32_blendvpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty,llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_sse41_blendvps : GCCBuiltin<"__builtin_ia32_blendvps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty,llvm_v4f32_ty], - [IntrNoMem]>; -} - -// Vector dot product -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_dppd : GCCBuiltin<"__builtin_ia32_dppd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem, Commutative]>; - def int_x86_sse41_dpps : GCCBuiltin<"__builtin_ia32_dpps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem, Commutative]>; -} - -// Vector sum of absolute differences -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_mpsadbw : GCCBuiltin<"__builtin_ia32_mpsadbw128">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty,llvm_i8_ty], - [IntrNoMem, Commutative]>; -} - -// Cacheability support ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_movntdqa : GCCBuiltin<"__builtin_ia32_movntdqa">, - Intrinsic<[llvm_v2i64_ty], [llvm_ptr_ty], [IntrReadMem]>; -} - -// Test instruction with bitwise comparison. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse41_ptestz : GCCBuiltin<"__builtin_ia32_ptestz128">, - Intrinsic<[llvm_i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_sse41_ptestc : GCCBuiltin<"__builtin_ia32_ptestc128">, - Intrinsic<[llvm_i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_sse41_ptestnzc : GCCBuiltin<"__builtin_ia32_ptestnzc128">, - Intrinsic<[llvm_i32_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// SSE4.2 - -// Miscellaneous -// CRC Instruction -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse42_crc32_32_8 : GCCBuiltin<"__builtin_ia32_crc32qi">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_crc32_32_16 : GCCBuiltin<"__builtin_ia32_crc32hi">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_sse42_crc32_32_32 : GCCBuiltin<"__builtin_ia32_crc32si">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_sse42_crc32_64_64 : GCCBuiltin<"__builtin_ia32_crc32di">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem]>; -} - -// String/text processing ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse42_pcmpistrm128 : GCCBuiltin<"__builtin_ia32_pcmpistrm128">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpistri128 : GCCBuiltin<"__builtin_ia32_pcmpistri128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpistria128 : GCCBuiltin<"__builtin_ia32_pcmpistria128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpistric128 : GCCBuiltin<"__builtin_ia32_pcmpistric128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpistrio128 : GCCBuiltin<"__builtin_ia32_pcmpistrio128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpistris128 : GCCBuiltin<"__builtin_ia32_pcmpistris128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpistriz128 : GCCBuiltin<"__builtin_ia32_pcmpistriz128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpestrm128 : GCCBuiltin<"__builtin_ia32_pcmpestrm128">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpestri128 : GCCBuiltin<"__builtin_ia32_pcmpestri128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpestria128 : GCCBuiltin<"__builtin_ia32_pcmpestria128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpestric128 : GCCBuiltin<"__builtin_ia32_pcmpestric128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpestrio128 : GCCBuiltin<"__builtin_ia32_pcmpestrio128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpestris128 : GCCBuiltin<"__builtin_ia32_pcmpestris128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse42_pcmpestriz128 : GCCBuiltin<"__builtin_ia32_pcmpestriz128">, - Intrinsic<[llvm_i32_ty], - [llvm_v16i8_ty, llvm_i32_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i8_ty], - [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// SSE4A - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_sse4a_extrqi : GCCBuiltin<"__builtin_ia32_extrqi">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sse4a_extrq : GCCBuiltin<"__builtin_ia32_extrq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v16i8_ty], [IntrNoMem]>; - - def int_x86_sse4a_insertqi : GCCBuiltin<"__builtin_ia32_insertqi">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_i8_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_sse4a_insertq : GCCBuiltin<"__builtin_ia32_insertq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// AVX - -// Arithmetic ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_addsub_pd_256 : GCCBuiltin<"__builtin_ia32_addsubpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_addsub_ps_256 : GCCBuiltin<"__builtin_ia32_addsubps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty], [IntrNoMem]>; - def int_x86_avx_max_pd_256 : GCCBuiltin<"__builtin_ia32_maxpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_max_ps_256 : GCCBuiltin<"__builtin_ia32_maxps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty], [IntrNoMem]>; - def int_x86_avx_min_pd_256 : GCCBuiltin<"__builtin_ia32_minpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_min_ps_256 : GCCBuiltin<"__builtin_ia32_minps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty], [IntrNoMem]>; - - def int_x86_avx_sqrt_pd_256 : GCCBuiltin<"__builtin_ia32_sqrtpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_sqrt_ps_256 : GCCBuiltin<"__builtin_ia32_sqrtps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty], [IntrNoMem]>; - - def int_x86_avx_rsqrt_ps_256 : GCCBuiltin<"__builtin_ia32_rsqrtps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty], [IntrNoMem]>; - - def int_x86_avx_rcp_ps_256 : GCCBuiltin<"__builtin_ia32_rcpps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty], [IntrNoMem]>; - - def int_x86_avx_round_pd_256 : GCCBuiltin<"__builtin_ia32_roundpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx_round_ps_256 : GCCBuiltin<"__builtin_ia32_roundps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_i32_ty], [IntrNoMem]>; -} - -// Horizontal ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_hadd_pd_256 : GCCBuiltin<"__builtin_ia32_haddpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_hsub_ps_256 : GCCBuiltin<"__builtin_ia32_hsubps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty], [IntrNoMem]>; - def int_x86_avx_hsub_pd_256 : GCCBuiltin<"__builtin_ia32_hsubpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_hadd_ps_256 : GCCBuiltin<"__builtin_ia32_haddps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty], [IntrNoMem]>; -} - -// Vector permutation -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_vpermilvar_pd : GCCBuiltin<"__builtin_ia32_vpermilvarpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_v2i64_ty], [IntrNoMem]>; - def int_x86_avx_vpermilvar_ps : GCCBuiltin<"__builtin_ia32_vpermilvarps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - - def int_x86_avx_vpermilvar_pd_256 : - GCCBuiltin<"__builtin_ia32_vpermilvarpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4i64_ty], [IntrNoMem]>; - def int_x86_avx_vpermilvar_ps_256 : - GCCBuiltin<"__builtin_ia32_vpermilvarps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8i32_ty], [IntrNoMem]>; - - def int_x86_avx_vperm2f128_pd_256 : - GCCBuiltin<"__builtin_ia32_vperm2f128_pd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx_vperm2f128_ps_256 : - GCCBuiltin<"__builtin_ia32_vperm2f128_ps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx_vperm2f128_si_256 : - GCCBuiltin<"__builtin_ia32_vperm2f128_si256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_d_128 : - GCCBuiltin<"__builtin_ia32_vpermi2vard128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_d_256 : - GCCBuiltin<"__builtin_ia32_vpermi2vard256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_d_512 : - GCCBuiltin<"__builtin_ia32_vpermi2vard512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_hi_128 : - GCCBuiltin<"__builtin_ia32_vpermi2varhi128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_hi_256 : - GCCBuiltin<"__builtin_ia32_vpermi2varhi256_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v16i16_ty, llvm_v16i16_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_hi_512 : - GCCBuiltin<"__builtin_ia32_vpermi2varhi512_mask">, - Intrinsic<[llvm_v32i16_ty], - [llvm_v32i16_ty, llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_pd_128 : - GCCBuiltin<"__builtin_ia32_vpermi2varpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_pd_256 : - GCCBuiltin<"__builtin_ia32_vpermi2varpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_pd_512 : - GCCBuiltin<"__builtin_ia32_vpermi2varpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8i64_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_ps_128 : - GCCBuiltin<"__builtin_ia32_vpermi2varps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_ps_256 : - GCCBuiltin<"__builtin_ia32_vpermi2varps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_ps_512 : - GCCBuiltin<"__builtin_ia32_vpermi2varps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16i32_ty, llvm_v16f32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_q_128 : - GCCBuiltin<"__builtin_ia32_vpermi2varq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_q_256 : - GCCBuiltin<"__builtin_ia32_vpermi2varq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_q_512 : - GCCBuiltin<"__builtin_ia32_vpermi2varq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_d_512: - GCCBuiltin<"__builtin_ia32_vpermt2vard512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_q_512: - GCCBuiltin<"__builtin_ia32_vpermt2varq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_ps_512: - GCCBuiltin<"__builtin_ia32_vpermt2varps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16i32_ty, - llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_pd_512: - GCCBuiltin<"__builtin_ia32_vpermt2varpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8i64_ty, - llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_d_128 : - GCCBuiltin<"__builtin_ia32_vpermt2vard128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_d_128 : - GCCBuiltin<"__builtin_ia32_vpermt2vard128_maskz">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_d_256 : - GCCBuiltin<"__builtin_ia32_vpermt2vard256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_d_256 : - GCCBuiltin<"__builtin_ia32_vpermt2vard256_maskz">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_d_512 : - GCCBuiltin<"__builtin_ia32_vpermt2vard512_maskz">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_hi_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varhi128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_hi_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varhi128_maskz">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_hi_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varhi256_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v16i16_ty, llvm_v16i16_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_hi_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varhi256_maskz">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v16i16_ty, llvm_v16i16_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_hi_512 : - GCCBuiltin<"__builtin_ia32_vpermt2varhi512_mask">, - Intrinsic<[llvm_v32i16_ty], - [llvm_v32i16_ty, llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_hi_512 : - GCCBuiltin<"__builtin_ia32_vpermt2varhi512_maskz">, - Intrinsic<[llvm_v32i16_ty], - [llvm_v32i16_ty, llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_pd_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2i64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_pd_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varpd128_maskz">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2i64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_pd_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4i64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_pd_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varpd256_maskz">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4i64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_pd_512 : - GCCBuiltin<"__builtin_ia32_vpermt2varpd512_maskz">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8i64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_ps_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4i32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_ps_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varps128_maskz">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4i32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_ps_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8i32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_ps_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varps256_maskz">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8i32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_ps_512 : - GCCBuiltin<"__builtin_ia32_vpermt2varps512_maskz">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16i32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_q_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_q_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varq128_maskz">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_q_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_q_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varq256_maskz">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_q_512 : - GCCBuiltin<"__builtin_ia32_vpermt2varq512_maskz">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_qi_128 : - GCCBuiltin<"__builtin_ia32_vpermi2varqi128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_qi_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varqi128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_qi_128 : - GCCBuiltin<"__builtin_ia32_vpermt2varqi128_maskz">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_qi_256 : - GCCBuiltin<"__builtin_ia32_vpermi2varqi256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_qi_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varqi256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_qi_256 : - GCCBuiltin<"__builtin_ia32_vpermt2varqi256_maskz">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermi2var_qi_512 : - GCCBuiltin<"__builtin_ia32_vpermi2varqi512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, - llvm_v64i8_ty, llvm_v64i8_ty, llvm_i64_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermt2var_qi_512 : - GCCBuiltin<"__builtin_ia32_vpermt2varqi512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, - llvm_v64i8_ty, llvm_v64i8_ty, llvm_i64_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vpermt2var_qi_512 : - GCCBuiltin<"__builtin_ia32_vpermt2varqi512_maskz">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, - llvm_v64i8_ty, llvm_v64i8_ty, llvm_i64_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermilvar_pd_256 : - GCCBuiltin<"__builtin_ia32_vpermilvarpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermilvar_pd_512 : - GCCBuiltin<"__builtin_ia32_vpermilvarpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8i64_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermilvar_pd_128 : - GCCBuiltin<"__builtin_ia32_vpermilvarpd_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermilvar_ps_256 : - GCCBuiltin<"__builtin_ia32_vpermilvarps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermilvar_ps_512 : - GCCBuiltin<"__builtin_ia32_vpermilvarps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16i32_ty, llvm_v16f32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vpermilvar_ps_128 : - GCCBuiltin<"__builtin_ia32_vpermilvarps_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pshuf_b_128 : - GCCBuiltin<"__builtin_ia32_pshufb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pshuf_b_256 : - GCCBuiltin<"__builtin_ia32_pshufb256_mask">, - Intrinsic<[llvm_v32i8_ty], - [llvm_v32i8_ty, llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pshuf_b_512 : - GCCBuiltin<"__builtin_ia32_pshufb512_mask">, - Intrinsic<[llvm_v64i8_ty], - [llvm_v64i8_ty, llvm_v64i8_ty, llvm_v64i8_ty, llvm_i64_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_f32x4_256 : - GCCBuiltin<"__builtin_ia32_shuf_f32x4_256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_f32x4 : - GCCBuiltin<"__builtin_ia32_shuf_f32x4_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_i32_ty, llvm_v16f32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_f64x2_256 : - GCCBuiltin<"__builtin_ia32_shuf_f64x2_256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_f64x2 : - GCCBuiltin<"__builtin_ia32_shuf_f64x2_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_i32_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_i32x4_256 : - GCCBuiltin<"__builtin_ia32_shuf_i32x4_256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_i32x4 : - GCCBuiltin<"__builtin_ia32_shuf_i32x4_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_i64x2_256 : - GCCBuiltin<"__builtin_ia32_shuf_i64x2_256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_i64x2 : - GCCBuiltin<"__builtin_ia32_shuf_i64x2_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_i32_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_pd_128 : - GCCBuiltin<"__builtin_ia32_shufpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_i32_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_pd_256 : - GCCBuiltin<"__builtin_ia32_shufpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_pd_512 : - GCCBuiltin<"__builtin_ia32_shufpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_i32_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_ps_128 : - GCCBuiltin<"__builtin_ia32_shufps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_ps_256 : - GCCBuiltin<"__builtin_ia32_shufps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_shuf_ps_512 : - GCCBuiltin<"__builtin_ia32_shufps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_i32_ty, llvm_v16f32_ty, llvm_i16_ty], - [IntrNoMem]>; -} - -// Vector blend -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_blendv_pd_256 : GCCBuiltin<"__builtin_ia32_blendvpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4f64_ty, llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_blendv_ps_256 : GCCBuiltin<"__builtin_ia32_blendvps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty, llvm_v8f32_ty], [IntrNoMem]>; -} - -// Vector dot product -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_dp_ps_256 : GCCBuiltin<"__builtin_ia32_dpps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; -} - -// Vector compare -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_cmp_pd_256 : - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx_cmp_ps_256 : - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; -} - -// Vector convert -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_cvtdq2_ps_256 : GCCBuiltin<"__builtin_ia32_cvtdq2ps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8i32_ty], [IntrNoMem]>; - def int_x86_avx_cvt_pd2_ps_256 : GCCBuiltin<"__builtin_ia32_cvtpd2ps256">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_cvt_ps2dq_256 : GCCBuiltin<"__builtin_ia32_cvtps2dq256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8f32_ty], [IntrNoMem]>; - def int_x86_avx_cvtt_pd2dq_256 : GCCBuiltin<"__builtin_ia32_cvttpd2dq256">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_cvt_pd2dq_256 : GCCBuiltin<"__builtin_ia32_cvtpd2dq256">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_cvtt_ps2dq_256 : GCCBuiltin<"__builtin_ia32_cvttps2dq256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8f32_ty], [IntrNoMem]>; -} - -// Vector bit test -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_vtestz_pd : GCCBuiltin<"__builtin_ia32_vtestzpd">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_avx_vtestc_pd : GCCBuiltin<"__builtin_ia32_vtestcpd">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_avx_vtestnzc_pd : GCCBuiltin<"__builtin_ia32_vtestnzcpd">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_avx_vtestz_ps : GCCBuiltin<"__builtin_ia32_vtestzps">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_avx_vtestc_ps : GCCBuiltin<"__builtin_ia32_vtestcps">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_avx_vtestnzc_ps : GCCBuiltin<"__builtin_ia32_vtestnzcps">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_avx_vtestz_pd_256 : GCCBuiltin<"__builtin_ia32_vtestzpd256">, - Intrinsic<[llvm_i32_ty], [llvm_v4f64_ty, - llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_vtestc_pd_256 : GCCBuiltin<"__builtin_ia32_vtestcpd256">, - Intrinsic<[llvm_i32_ty], [llvm_v4f64_ty, - llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_vtestnzc_pd_256 : GCCBuiltin<"__builtin_ia32_vtestnzcpd256">, - Intrinsic<[llvm_i32_ty], [llvm_v4f64_ty, - llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_vtestz_ps_256 : GCCBuiltin<"__builtin_ia32_vtestzps256">, - Intrinsic<[llvm_i32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty], [IntrNoMem]>; - def int_x86_avx_vtestc_ps_256 : GCCBuiltin<"__builtin_ia32_vtestcps256">, - Intrinsic<[llvm_i32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty], [IntrNoMem]>; - def int_x86_avx_vtestnzc_ps_256 : GCCBuiltin<"__builtin_ia32_vtestnzcps256">, - Intrinsic<[llvm_i32_ty], [llvm_v8f32_ty, - llvm_v8f32_ty], [IntrNoMem]>; - def int_x86_avx_ptestz_256 : GCCBuiltin<"__builtin_ia32_ptestz256">, - Intrinsic<[llvm_i32_ty], [llvm_v4i64_ty, - llvm_v4i64_ty], [IntrNoMem]>; - def int_x86_avx_ptestc_256 : GCCBuiltin<"__builtin_ia32_ptestc256">, - Intrinsic<[llvm_i32_ty], [llvm_v4i64_ty, - llvm_v4i64_ty], [IntrNoMem]>; - def int_x86_avx_ptestnzc_256 : GCCBuiltin<"__builtin_ia32_ptestnzc256">, - Intrinsic<[llvm_i32_ty], [llvm_v4i64_ty, - llvm_v4i64_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_d_512 : GCCBuiltin<"__builtin_ia32_ptestmd512">, - Intrinsic<[llvm_i16_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_q_512 : GCCBuiltin<"__builtin_ia32_ptestmq512">, - Intrinsic<[llvm_i8_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_ptestm_b_128 : GCCBuiltin<"__builtin_ia32_ptestmb128">, - Intrinsic<[llvm_i16_ty], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_b_256 : GCCBuiltin<"__builtin_ia32_ptestmb256">, - Intrinsic<[llvm_i32_ty], [llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_b_512 : GCCBuiltin<"__builtin_ia32_ptestmb512">, - Intrinsic<[llvm_i64_ty], [llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_d_128 : GCCBuiltin<"__builtin_ia32_ptestmd128">, - Intrinsic<[llvm_i8_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_d_256 : GCCBuiltin<"__builtin_ia32_ptestmd256">, - Intrinsic<[llvm_i8_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_q_128 : GCCBuiltin<"__builtin_ia32_ptestmq128">, - Intrinsic<[llvm_i8_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_q_256 : GCCBuiltin<"__builtin_ia32_ptestmq256">, - Intrinsic<[llvm_i8_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_w_128 : GCCBuiltin<"__builtin_ia32_ptestmw128">, - Intrinsic<[llvm_i8_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_w_256 : GCCBuiltin<"__builtin_ia32_ptestmw256">, - Intrinsic<[llvm_i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_ptestm_w_512 : GCCBuiltin<"__builtin_ia32_ptestmw512">, - Intrinsic<[llvm_i32_ty], [llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_ptestnm_b_128 : GCCBuiltin<"__builtin_ia32_ptestnmb128">, - Intrinsic<[llvm_i16_ty], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_b_256 : GCCBuiltin<"__builtin_ia32_ptestnmb256">, - Intrinsic<[llvm_i32_ty], [llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_b_512 : GCCBuiltin<"__builtin_ia32_ptestnmb512">, - Intrinsic<[llvm_i64_ty], [llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_d_128 : GCCBuiltin<"__builtin_ia32_ptestnmd128">, - Intrinsic<[llvm_i8_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_d_256 : GCCBuiltin<"__builtin_ia32_ptestnmd256">, - Intrinsic<[llvm_i8_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_d_512 : GCCBuiltin<"__builtin_ia32_ptestnmd512">, - Intrinsic<[llvm_i16_ty], [llvm_v16i32_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_q_128 : GCCBuiltin<"__builtin_ia32_ptestnmq128">, - Intrinsic<[llvm_i8_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_q_256 : GCCBuiltin<"__builtin_ia32_ptestnmq256">, - Intrinsic<[llvm_i8_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_q_512 : GCCBuiltin<"__builtin_ia32_ptestnmq512">, - Intrinsic<[llvm_i8_ty], [llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_w_128 : GCCBuiltin<"__builtin_ia32_ptestnmw128">, - Intrinsic<[llvm_i8_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_w_256 : GCCBuiltin<"__builtin_ia32_ptestnmw256">, - Intrinsic<[llvm_i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_ptestnm_w_512 : GCCBuiltin<"__builtin_ia32_ptestnmw512">, - Intrinsic<[llvm_i32_ty], [llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_fpclass_pd_128 : - GCCBuiltin<"__builtin_ia32_fpclasspd128_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v2f64_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fpclass_pd_256 : - GCCBuiltin<"__builtin_ia32_fpclasspd256_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v4f64_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fpclass_pd_512 : - GCCBuiltin<"__builtin_ia32_fpclasspd512_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v8f64_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fpclass_ps_128 : - GCCBuiltin<"__builtin_ia32_fpclassps128_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fpclass_ps_256 : - GCCBuiltin<"__builtin_ia32_fpclassps256_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v8f32_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fpclass_ps_512 : - GCCBuiltin<"__builtin_ia32_fpclassps512_mask">, - Intrinsic<[llvm_i16_ty], [llvm_v16f32_ty, llvm_i32_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fpclass_sd : - GCCBuiltin<"__builtin_ia32_fpclasssd_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v2f64_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fpclass_ss : - GCCBuiltin<"__builtin_ia32_fpclassss_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v4f32_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; -} - -// Vector extract sign mask -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_movmsk_pd_256 : GCCBuiltin<"__builtin_ia32_movmskpd256">, - Intrinsic<[llvm_i32_ty], [llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_avx_movmsk_ps_256 : GCCBuiltin<"__builtin_ia32_movmskps256">, - Intrinsic<[llvm_i32_ty], [llvm_v8f32_ty], [IntrNoMem]>; -} - -// Vector zero -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_vzeroall : GCCBuiltin<"__builtin_ia32_vzeroall">, - Intrinsic<[], [], []>; - def int_x86_avx_vzeroupper : GCCBuiltin<"__builtin_ia32_vzeroupper">, - Intrinsic<[], [], []>; -} - -// Vector load with broadcast -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_vbroadcastf128_pd_256 : - GCCBuiltin<"__builtin_ia32_vbroadcastf128_pd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx_vbroadcastf128_ps_256 : - GCCBuiltin<"__builtin_ia32_vbroadcastf128_ps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; -} - -// SIMD load ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_ldu_dq_256 : GCCBuiltin<"__builtin_ia32_lddqu256">, - Intrinsic<[llvm_v32i8_ty], [llvm_ptr_ty], [IntrReadMem]>; -} - -// Conditional load ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_maskload_pd : GCCBuiltin<"__builtin_ia32_maskloadpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_ptr_ty, llvm_v2i64_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx_maskload_ps : GCCBuiltin<"__builtin_ia32_maskloadps">, - Intrinsic<[llvm_v4f32_ty], [llvm_ptr_ty, llvm_v4i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx_maskload_pd_256 : GCCBuiltin<"__builtin_ia32_maskloadpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_ptr_ty, llvm_v4i64_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx_maskload_ps_256 : GCCBuiltin<"__builtin_ia32_maskloadps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_ptr_ty, llvm_v8i32_ty], - [IntrReadMem, IntrArgMemOnly]>; -} - -// Conditional move ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_mask_move_ss : - GCCBuiltin<"__builtin_ia32_movss_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_move_sd : - GCCBuiltin<"__builtin_ia32_movsd_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; -} - -// Conditional store ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx_maskstore_pd : GCCBuiltin<"__builtin_ia32_maskstorepd">, - Intrinsic<[], [llvm_ptr_ty, - llvm_v2i64_ty, llvm_v2f64_ty], [IntrArgMemOnly]>; - def int_x86_avx_maskstore_ps : GCCBuiltin<"__builtin_ia32_maskstoreps">, - Intrinsic<[], [llvm_ptr_ty, - llvm_v4i32_ty, llvm_v4f32_ty], [IntrArgMemOnly]>; - def int_x86_avx_maskstore_pd_256 : - GCCBuiltin<"__builtin_ia32_maskstorepd256">, - Intrinsic<[], [llvm_ptr_ty, - llvm_v4i64_ty, llvm_v4f64_ty], [IntrArgMemOnly]>; - def int_x86_avx_maskstore_ps_256 : - GCCBuiltin<"__builtin_ia32_maskstoreps256">, - Intrinsic<[], [llvm_ptr_ty, - llvm_v8i32_ty, llvm_v8f32_ty], [IntrArgMemOnly]>; - - def int_x86_avx512_mask_store_ss : - GCCBuiltin<"__builtin_ia32_storess_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; -} - -//===----------------------------------------------------------------------===// -// AVX2 - -// Integer arithmetic ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_padds_b : GCCBuiltin<"__builtin_ia32_paddsb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_padds_w : GCCBuiltin<"__builtin_ia32_paddsw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_paddus_b : GCCBuiltin<"__builtin_ia32_paddusb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_paddus_w : GCCBuiltin<"__builtin_ia32_paddusw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_psubs_b : GCCBuiltin<"__builtin_ia32_psubsb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem]>; - def int_x86_avx2_psubs_w : GCCBuiltin<"__builtin_ia32_psubsw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_psubus_b : GCCBuiltin<"__builtin_ia32_psubusb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem]>; - def int_x86_avx2_psubus_w : GCCBuiltin<"__builtin_ia32_psubusw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_pmulhu_w : GCCBuiltin<"__builtin_ia32_pmulhuw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_pmulh_w : GCCBuiltin<"__builtin_ia32_pmulhw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_pmulu_dq : GCCBuiltin<"__builtin_ia32_pmuludq256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v8i32_ty, - llvm_v8i32_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_pmul_dq : GCCBuiltin<"__builtin_ia32_pmuldq256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v8i32_ty, - llvm_v8i32_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_pmadd_wd : GCCBuiltin<"__builtin_ia32_pmaddwd256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_pavg_b : GCCBuiltin<"__builtin_ia32_pavgb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_pavg_w : GCCBuiltin<"__builtin_ia32_pavgw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_psad_bw : GCCBuiltin<"__builtin_ia32_psadbw256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem, Commutative]>; -} - -// Vector min, max -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_mask_pmaxs_b_128 : GCCBuiltin<"__builtin_ia32_pmaxsb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_b_256 : GCCBuiltin<"__builtin_ia32_pmaxsb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_b_512 : GCCBuiltin<"__builtin_ia32_pmaxsb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_b_128 : GCCBuiltin<"__builtin_ia32_pmaxub128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_b_256 : GCCBuiltin<"__builtin_ia32_pmaxub256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_b_512 : GCCBuiltin<"__builtin_ia32_pmaxub512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_w_128 : GCCBuiltin<"__builtin_ia32_pmaxsw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_w_256 : GCCBuiltin<"__builtin_ia32_pmaxsw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_w_512 : GCCBuiltin<"__builtin_ia32_pmaxsw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty],[IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_w_128 : GCCBuiltin<"__builtin_ia32_pmaxuw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_w_256 : GCCBuiltin<"__builtin_ia32_pmaxuw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_w_512 : GCCBuiltin<"__builtin_ia32_pmaxuw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty],[IntrNoMem]>; - def int_x86_avx512_mask_pmins_b_128 : GCCBuiltin<"__builtin_ia32_pminsb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty,llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_b_256 : GCCBuiltin<"__builtin_ia32_pminsb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_b_512 : GCCBuiltin<"__builtin_ia32_pminsb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_b_128 : GCCBuiltin<"__builtin_ia32_pminub128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_b_256 : GCCBuiltin<"__builtin_ia32_pminub256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_b_512 : GCCBuiltin<"__builtin_ia32_pminub512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_w_128 : GCCBuiltin<"__builtin_ia32_pminsw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_w_256 : GCCBuiltin<"__builtin_ia32_pminsw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_w_512 : GCCBuiltin<"__builtin_ia32_pminsw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty],[IntrNoMem]>; - def int_x86_avx512_mask_pminu_w_128 : GCCBuiltin<"__builtin_ia32_pminuw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_w_256 : GCCBuiltin<"__builtin_ia32_pminuw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_w_512 : GCCBuiltin<"__builtin_ia32_pminuw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_d_512 : GCCBuiltin<"__builtin_ia32_pmaxud512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_d_256 : GCCBuiltin<"__builtin_ia32_pmaxud256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_d_128 : GCCBuiltin<"__builtin_ia32_pmaxud128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_d_512 : GCCBuiltin<"__builtin_ia32_pmaxsd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_d_256 : GCCBuiltin<"__builtin_ia32_pmaxsd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_d_128 : GCCBuiltin<"__builtin_ia32_pmaxsd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_q_512 : GCCBuiltin<"__builtin_ia32_pmaxuq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_q_256 : GCCBuiltin<"__builtin_ia32_pmaxuq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxu_q_128 : GCCBuiltin<"__builtin_ia32_pmaxuq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_q_512 : GCCBuiltin<"__builtin_ia32_pmaxsq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_q_256 : GCCBuiltin<"__builtin_ia32_pmaxsq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaxs_q_128 : GCCBuiltin<"__builtin_ia32_pmaxsq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_d_512 : GCCBuiltin<"__builtin_ia32_pminud512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_d_256 : GCCBuiltin<"__builtin_ia32_pminud256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_d_128 : GCCBuiltin<"__builtin_ia32_pminud128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_d_512 : GCCBuiltin<"__builtin_ia32_pminsd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_d_256 : GCCBuiltin<"__builtin_ia32_pminsd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_d_128 : GCCBuiltin<"__builtin_ia32_pminsd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_q_512 : GCCBuiltin<"__builtin_ia32_pminuq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_q_256 : GCCBuiltin<"__builtin_ia32_pminuq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pminu_q_128 : GCCBuiltin<"__builtin_ia32_pminuq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_q_512 : GCCBuiltin<"__builtin_ia32_pminsq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_q_256 : GCCBuiltin<"__builtin_ia32_pminsq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmins_q_128 : GCCBuiltin<"__builtin_ia32_pminsq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; -} - -// Integer shift ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_psll_w : GCCBuiltin<"__builtin_ia32_psllw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_avx2_psll_d : GCCBuiltin<"__builtin_ia32_pslld256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_avx2_psll_q : GCCBuiltin<"__builtin_ia32_psllq256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v2i64_ty], [IntrNoMem]>; - def int_x86_avx2_psrl_w : GCCBuiltin<"__builtin_ia32_psrlw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_avx2_psrl_d : GCCBuiltin<"__builtin_ia32_psrld256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_avx2_psrl_q : GCCBuiltin<"__builtin_ia32_psrlq256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v2i64_ty], [IntrNoMem]>; - def int_x86_avx2_psra_w : GCCBuiltin<"__builtin_ia32_psraw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_avx2_psra_d : GCCBuiltin<"__builtin_ia32_psrad256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v4i32_ty], [IntrNoMem]>; - - def int_x86_avx2_pslli_w : GCCBuiltin<"__builtin_ia32_psllwi256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx2_pslli_d : GCCBuiltin<"__builtin_ia32_pslldi256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx2_pslli_q : GCCBuiltin<"__builtin_ia32_psllqi256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx2_psrli_w : GCCBuiltin<"__builtin_ia32_psrlwi256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx2_psrli_d : GCCBuiltin<"__builtin_ia32_psrldi256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx2_psrli_q : GCCBuiltin<"__builtin_ia32_psrlqi256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx2_psrai_w : GCCBuiltin<"__builtin_ia32_psrawi256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx2_psrai_d : GCCBuiltin<"__builtin_ia32_psradi256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_psrl_w_128 : GCCBuiltin<"__builtin_ia32_psrlw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_w_256 : GCCBuiltin<"__builtin_ia32_psrlw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v8i16_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_w_512 : GCCBuiltin<"__builtin_ia32_psrlw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_v8i16_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_wi_128 : GCCBuiltin<"__builtin_ia32_psrlwi128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_i32_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_wi_256 : GCCBuiltin<"__builtin_ia32_psrlwi256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_i32_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_wi_512 : GCCBuiltin<"__builtin_ia32_psrlwi512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_i32_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_psra_w_128 : GCCBuiltin<"__builtin_ia32_psraw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_w_256 : GCCBuiltin<"__builtin_ia32_psraw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v8i16_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_w_512 : GCCBuiltin<"__builtin_ia32_psraw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_v8i16_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_wi_128 : GCCBuiltin<"__builtin_ia32_psrawi128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_i32_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_wi_256 : GCCBuiltin<"__builtin_ia32_psrawi256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_i32_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_wi_512 : GCCBuiltin<"__builtin_ia32_psrawi512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_i32_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_psll_d : GCCBuiltin<"__builtin_ia32_pslld512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v4i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_q : GCCBuiltin<"__builtin_ia32_psllq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v2i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_d : GCCBuiltin<"__builtin_ia32_psrld512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v4i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_q : GCCBuiltin<"__builtin_ia32_psrlq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v2i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_d : GCCBuiltin<"__builtin_ia32_psrad512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v4i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_q : GCCBuiltin<"__builtin_ia32_psraq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v2i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_psll_w_128 : GCCBuiltin<"__builtin_ia32_psllw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_w_256 : GCCBuiltin<"__builtin_ia32_psllw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v8i16_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_w_512 : GCCBuiltin<"__builtin_ia32_psllw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_v8i16_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_wi_128 : GCCBuiltin<"__builtin_ia32_psllwi128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_i32_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_wi_256 : GCCBuiltin<"__builtin_ia32_psllwi256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_i32_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_wi_512 : GCCBuiltin<"__builtin_ia32_psllwi512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_i32_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psllv16_hi : GCCBuiltin<"__builtin_ia32_psllv16hi_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psllv2_di : GCCBuiltin<"__builtin_ia32_psllv2di_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psllv32hi : GCCBuiltin<"__builtin_ia32_psllv32hi_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psllv4_di : GCCBuiltin<"__builtin_ia32_psllv4di_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psllv4_si : GCCBuiltin<"__builtin_ia32_psllv4si_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psllv8_hi : GCCBuiltin<"__builtin_ia32_psllv8hi_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psllv8_si : GCCBuiltin<"__builtin_ia32_psllv8si_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_psra_d_128 : GCCBuiltin<"__builtin_ia32_psrad128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_d_256 : GCCBuiltin<"__builtin_ia32_psrad256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v4i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_di_128 : GCCBuiltin<"__builtin_ia32_psradi128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_di_256 : GCCBuiltin<"__builtin_ia32_psradi256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_di_512 : GCCBuiltin<"__builtin_ia32_psradi512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_q_128 : GCCBuiltin<"__builtin_ia32_psraq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_q_256 : GCCBuiltin<"__builtin_ia32_psraq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v2i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_qi_128 : GCCBuiltin<"__builtin_ia32_psraqi128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_i32_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_qi_256 : GCCBuiltin<"__builtin_ia32_psraqi256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_i32_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psra_qi_512 : GCCBuiltin<"__builtin_ia32_psraqi512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_i32_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_psrl_d_128: GCCBuiltin<"__builtin_ia32_psrld128_mask">, - Intrinsic<[llvm_v4i32_ty], [ llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty ], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_d_256: GCCBuiltin<"__builtin_ia32_psrld256_mask">, - Intrinsic<[llvm_v8i32_ty], [ llvm_v8i32_ty, - llvm_v4i32_ty, llvm_v8i32_ty, llvm_i8_ty ], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_di_128: GCCBuiltin<"__builtin_ia32_psrldi128_mask">, - Intrinsic<[llvm_v4i32_ty], [ llvm_v4i32_ty, - llvm_i32_ty, llvm_v4i32_ty, llvm_i8_ty ], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_di_256: GCCBuiltin<"__builtin_ia32_psrldi256_mask">, - Intrinsic<[llvm_v8i32_ty], [ llvm_v8i32_ty, - llvm_i32_ty, llvm_v8i32_ty, llvm_i8_ty ], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_di_512: GCCBuiltin<"__builtin_ia32_psrldi512_mask">, - Intrinsic<[llvm_v16i32_ty], [ llvm_v16i32_ty, - llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty ], [IntrNoMem]>; - - def int_x86_avx512_mask_psrl_q_128: GCCBuiltin<"__builtin_ia32_psrlq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_q_256: GCCBuiltin<"__builtin_ia32_psrlq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v2i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_qi_128: GCCBuiltin<"__builtin_ia32_psrlqi128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_i32_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_qi_256: GCCBuiltin<"__builtin_ia32_psrlqi256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_i32_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrl_qi_512: GCCBuiltin<"__builtin_ia32_psrlqi512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_i32_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmultishift_qb_128: - GCCBuiltin<"__builtin_ia32_vpmultishiftqb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmultishift_qb_256: - GCCBuiltin<"__builtin_ia32_vpmultishiftqb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmultishift_qb_512: - GCCBuiltin<"__builtin_ia32_vpmultishiftqb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, - llvm_v64i8_ty, llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; -} - -// Pack ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_packsswb : GCCBuiltin<"__builtin_ia32_packsswb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_packssdw : GCCBuiltin<"__builtin_ia32_packssdw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v8i32_ty, - llvm_v8i32_ty], [IntrNoMem]>; - def int_x86_avx2_packuswb : GCCBuiltin<"__builtin_ia32_packuswb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_packusdw : GCCBuiltin<"__builtin_ia32_packusdw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v8i32_ty, - llvm_v8i32_ty], [IntrNoMem]>; -} - -// Absolute value ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_pabs_b : GCCBuiltin<"__builtin_ia32_pabsb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty], [IntrNoMem]>; - def int_x86_avx2_pabs_w : GCCBuiltin<"__builtin_ia32_pabsw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_pabs_d : GCCBuiltin<"__builtin_ia32_pabsd256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_b_128 : - GCCBuiltin<"__builtin_ia32_pabsb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_b_256 : - GCCBuiltin<"__builtin_ia32_pabsb256_mask">, - Intrinsic<[llvm_v32i8_ty], - [llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_b_512 : - GCCBuiltin<"__builtin_ia32_pabsb512_mask">, - Intrinsic<[llvm_v64i8_ty], - [llvm_v64i8_ty, llvm_v64i8_ty, llvm_i64_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_d_128 : - GCCBuiltin<"__builtin_ia32_pabsd128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_d_256 : - GCCBuiltin<"__builtin_ia32_pabsd256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_d_512 : - GCCBuiltin<"__builtin_ia32_pabsd512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_q_128 : - GCCBuiltin<"__builtin_ia32_pabsq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_q_256 : - GCCBuiltin<"__builtin_ia32_pabsq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_q_512 : - GCCBuiltin<"__builtin_ia32_pabsq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_w_128 : - GCCBuiltin<"__builtin_ia32_pabsw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_w_256 : - GCCBuiltin<"__builtin_ia32_pabsw256_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v16i16_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pabs_w_512 : - GCCBuiltin<"__builtin_ia32_pabsw512_mask">, - Intrinsic<[llvm_v32i16_ty], - [llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty], - [IntrNoMem]>; -} - -// Horizontal arithmetic ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_phadd_w : GCCBuiltin<"__builtin_ia32_phaddw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_phadd_d : GCCBuiltin<"__builtin_ia32_phaddd256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty], [IntrNoMem]>; - def int_x86_avx2_phadd_sw : GCCBuiltin<"__builtin_ia32_phaddsw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_phsub_w : GCCBuiltin<"__builtin_ia32_phsubw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_phsub_d : GCCBuiltin<"__builtin_ia32_phsubd256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty], [IntrNoMem]>; - def int_x86_avx2_phsub_sw : GCCBuiltin<"__builtin_ia32_phsubsw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_pmadd_ub_sw : GCCBuiltin<"__builtin_ia32_pmaddubsw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem]>; -} - -// Sign ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_psign_b : GCCBuiltin<"__builtin_ia32_psignb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem]>; - def int_x86_avx2_psign_w : GCCBuiltin<"__builtin_ia32_psignw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx2_psign_d : GCCBuiltin<"__builtin_ia32_psignd256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty], [IntrNoMem]>; -} - -// Packed multiply high with round and scale -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_pmul_hr_sw : GCCBuiltin<"__builtin_ia32_pmulhrsw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty], [IntrNoMem, Commutative]>; - def int_x86_avx512_mask_pmul_hr_sw_128 : GCCBuiltin<"__builtin_ia32_pmulhrsw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmul_hr_sw_256 : GCCBuiltin<"__builtin_ia32_pmulhrsw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmul_hr_sw_512 : GCCBuiltin<"__builtin_ia32_pmulhrsw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; -} - -// Vector blend -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_pblendvb : GCCBuiltin<"__builtin_ia32_pblendvb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem]>; -} - -// Vector load with broadcast -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_mask_pbroadcast_b_gpr_128 : - GCCBuiltin<"__builtin_ia32_pbroadcastb128_gpr_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_i8_ty, llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pbroadcast_b_gpr_256 : - GCCBuiltin<"__builtin_ia32_pbroadcastb256_gpr_mask">, - Intrinsic<[llvm_v32i8_ty], - [llvm_i8_ty, llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pbroadcast_b_gpr_512 : - GCCBuiltin<"__builtin_ia32_pbroadcastb512_gpr_mask">, - Intrinsic<[llvm_v64i8_ty], - [llvm_i8_ty, llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pbroadcast_w_gpr_128 : - GCCBuiltin<"__builtin_ia32_pbroadcastw128_gpr_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_i16_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pbroadcast_w_gpr_256 : - GCCBuiltin<"__builtin_ia32_pbroadcastw256_gpr_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_i16_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pbroadcast_w_gpr_512 : - GCCBuiltin<"__builtin_ia32_pbroadcastw512_gpr_mask">, - Intrinsic<[llvm_v32i16_ty], - [llvm_i16_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pbroadcast_d_gpr_128 : - GCCBuiltin<"__builtin_ia32_pbroadcastd128_gpr_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pbroadcast_d_gpr_256 : - GCCBuiltin<"__builtin_ia32_pbroadcastd256_gpr_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pbroadcast_d_gpr_512 : - GCCBuiltin<"__builtin_ia32_pbroadcastd512_gpr_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pbroadcast_q_gpr_128 : - GCCBuiltin<"__builtin_ia32_pbroadcastq128_gpr_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pbroadcast_q_gpr_256 : - GCCBuiltin<"__builtin_ia32_pbroadcastq256_gpr_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pbroadcast_q_gpr_512 : - GCCBuiltin<"__builtin_ia32_pbroadcastq512_gpr_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pbroadcast_q_mem_512 : - GCCBuiltin<"__builtin_ia32_pbroadcastq512_mem_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; -} - -// Vector permutation -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_permd : GCCBuiltin<"__builtin_ia32_permvarsi256">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty], - [IntrNoMem]>; - def int_x86_avx2_permps : GCCBuiltin<"__builtin_ia32_permvarsf256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8i32_ty], - [IntrNoMem]>; - def int_x86_avx2_vperm2i128 : GCCBuiltin<"__builtin_ia32_permti256">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; -} - -// Vector extract and insert -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_mask_vextractf32x4_512 : - GCCBuiltin<"__builtin_ia32_extractf32x4_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v16f32_ty, llvm_i32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextracti32x4_512 : - GCCBuiltin<"__builtin_ia32_extracti32x4_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i32_ty, llvm_i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextractf32x4_256 : - GCCBuiltin<"__builtin_ia32_extractf32x4_256_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v8f32_ty, llvm_i32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextracti32x4_256 : - GCCBuiltin<"__builtin_ia32_extracti32x4_256_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i32_ty, llvm_i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextractf64x2_256 : - GCCBuiltin<"__builtin_ia32_extractf64x2_256_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v4f64_ty, llvm_i32_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextracti64x2_256 : - GCCBuiltin<"__builtin_ia32_extracti64x2_256_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i64_ty, llvm_i32_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextractf64x2_512 : - GCCBuiltin<"__builtin_ia32_extractf64x2_512_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v8f64_ty, llvm_i32_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextracti64x2_512 : - GCCBuiltin<"__builtin_ia32_extracti64x2_512_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v8i64_ty, llvm_i32_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextractf32x8_512 : - GCCBuiltin<"__builtin_ia32_extractf32x8_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v16f32_ty, llvm_i32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextracti32x8_512 : - GCCBuiltin<"__builtin_ia32_extracti32x8_mask">, - Intrinsic<[llvm_v8i32_ty],[llvm_v16i32_ty, llvm_i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextractf64x4_512 : - GCCBuiltin<"__builtin_ia32_extractf64x4_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v8f64_ty, llvm_i32_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vextracti64x4_512 : - GCCBuiltin<"__builtin_ia32_extracti64x4_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v8i64_ty, llvm_i32_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_insertf32x4_256 : - GCCBuiltin<"__builtin_ia32_insertf32x4_256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v4f32_ty, llvm_i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_insertf32x4_512 : - GCCBuiltin<"__builtin_ia32_insertf32x4_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v4f32_ty, llvm_i32_ty, llvm_v16f32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_insertf32x8_512 : - GCCBuiltin<"__builtin_ia32_insertf32x8_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v8f32_ty, llvm_i32_ty, llvm_v16f32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_insertf64x2_256 : - GCCBuiltin<"__builtin_ia32_insertf64x2_256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v2f64_ty, llvm_i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_insertf64x2_512 : - GCCBuiltin<"__builtin_ia32_insertf64x2_512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v2f64_ty, llvm_i32_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_insertf64x4_512 : - GCCBuiltin<"__builtin_ia32_insertf64x4_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v4f64_ty, llvm_i32_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_inserti32x4_256 : - GCCBuiltin<"__builtin_ia32_inserti32x4_256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v4i32_ty, llvm_i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_inserti32x4_512 : - GCCBuiltin<"__builtin_ia32_inserti32x4_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v4i32_ty, llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_inserti32x8_512 : - GCCBuiltin<"__builtin_ia32_inserti32x8_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v8i32_ty, llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_inserti64x2_256 : - GCCBuiltin<"__builtin_ia32_inserti64x2_256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v2i64_ty, llvm_i32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_inserti64x2_512 : - GCCBuiltin<"__builtin_ia32_inserti64x2_512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v2i64_ty, llvm_i32_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_inserti64x4_512 : - GCCBuiltin<"__builtin_ia32_inserti64x4_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v4i64_ty, llvm_i32_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; -} - -// Conditional load ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_maskload_d : GCCBuiltin<"__builtin_ia32_maskloadd">, - Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_v4i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_maskload_q : GCCBuiltin<"__builtin_ia32_maskloadq">, - Intrinsic<[llvm_v2i64_ty], [llvm_ptr_ty, llvm_v2i64_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_maskload_d_256 : GCCBuiltin<"__builtin_ia32_maskloadd256">, - Intrinsic<[llvm_v8i32_ty], [llvm_ptr_ty, llvm_v8i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_maskload_q_256 : GCCBuiltin<"__builtin_ia32_maskloadq256">, - Intrinsic<[llvm_v4i64_ty], [llvm_ptr_ty, llvm_v4i64_ty], - [IntrReadMem, IntrArgMemOnly]>; -} - -// Conditional store ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_maskstore_d : GCCBuiltin<"__builtin_ia32_maskstored">, - Intrinsic<[], [llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx2_maskstore_q : GCCBuiltin<"__builtin_ia32_maskstoreq">, - Intrinsic<[], [llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i64_ty], - [IntrArgMemOnly]>; - def int_x86_avx2_maskstore_d_256 : - GCCBuiltin<"__builtin_ia32_maskstored256">, - Intrinsic<[], [llvm_ptr_ty, llvm_v8i32_ty, llvm_v8i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx2_maskstore_q_256 : - GCCBuiltin<"__builtin_ia32_maskstoreq256">, - Intrinsic<[], [llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i64_ty], - [IntrArgMemOnly]>; -} - -// Variable bit shift ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_psllv_d : GCCBuiltin<"__builtin_ia32_psllv4si">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_avx2_psllv_d_256 : GCCBuiltin<"__builtin_ia32_psllv8si">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty], - [IntrNoMem]>; - def int_x86_avx2_psllv_q : GCCBuiltin<"__builtin_ia32_psllv2di">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_avx2_psllv_q_256 : GCCBuiltin<"__builtin_ia32_psllv4di">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty], - [IntrNoMem]>; - - def int_x86_avx2_psrlv_d : GCCBuiltin<"__builtin_ia32_psrlv4si">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_avx2_psrlv_d_256 : GCCBuiltin<"__builtin_ia32_psrlv8si">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty], - [IntrNoMem]>; - def int_x86_avx2_psrlv_q : GCCBuiltin<"__builtin_ia32_psrlv2di">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_avx2_psrlv_q_256 : GCCBuiltin<"__builtin_ia32_psrlv4di">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty], - [IntrNoMem]>; - - def int_x86_avx2_psrav_d : GCCBuiltin<"__builtin_ia32_psrav4si">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_avx2_psrav_d_256 : GCCBuiltin<"__builtin_ia32_psrav8si">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_psllv_d : GCCBuiltin<"__builtin_ia32_psllv16si_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_psllv_q : GCCBuiltin<"__builtin_ia32_psllv8di_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_psrav_d : GCCBuiltin<"__builtin_ia32_psrav16si_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_psrav_q : GCCBuiltin<"__builtin_ia32_psrav8di_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_psrlv_d : GCCBuiltin<"__builtin_ia32_psrlv16si_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_psrlv_q : GCCBuiltin<"__builtin_ia32_psrlv8di_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_psll_d_128 : GCCBuiltin<"__builtin_ia32_pslld128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_d_256 : GCCBuiltin<"__builtin_ia32_pslld256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v4i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_di_128 : GCCBuiltin<"__builtin_ia32_pslldi128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_di_256 : GCCBuiltin<"__builtin_ia32_pslldi256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_di_512 : GCCBuiltin<"__builtin_ia32_pslldi512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_q_128 : GCCBuiltin<"__builtin_ia32_psllq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_q_256 : GCCBuiltin<"__builtin_ia32_psllq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v2i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_qi_128 : GCCBuiltin<"__builtin_ia32_psllqi128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_i32_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_qi_256 : GCCBuiltin<"__builtin_ia32_psllqi256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_i32_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psll_qi_512 : GCCBuiltin<"__builtin_ia32_psllqi512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_i32_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_psrav16_hi : GCCBuiltin<"__builtin_ia32_psrav16hi_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrav32_hi : GCCBuiltin<"__builtin_ia32_psrav32hi_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrav4_si : GCCBuiltin<"__builtin_ia32_psrav4si_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrav8_hi : GCCBuiltin<"__builtin_ia32_psrav8hi_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrav8_si : GCCBuiltin<"__builtin_ia32_psrav8si_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrav_q_128 : GCCBuiltin<"__builtin_ia32_psravq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrav_q_256 : GCCBuiltin<"__builtin_ia32_psravq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_psrlv16_hi : GCCBuiltin<"__builtin_ia32_psrlv16hi_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrlv2_di : GCCBuiltin<"__builtin_ia32_psrlv2di_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrlv32hi : GCCBuiltin<"__builtin_ia32_psrlv32hi_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrlv4_di : GCCBuiltin<"__builtin_ia32_psrlv4di_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrlv4_si : GCCBuiltin<"__builtin_ia32_psrlv4si_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrlv8_hi : GCCBuiltin<"__builtin_ia32_psrlv8hi_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psrlv8_si : GCCBuiltin<"__builtin_ia32_psrlv8si_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_prorv_d_128 : GCCBuiltin<"__builtin_ia32_prorvd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prorv_d_256 : GCCBuiltin<"__builtin_ia32_prorvd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prorv_d_512 : GCCBuiltin<"__builtin_ia32_prorvd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prorv_q_128 : GCCBuiltin<"__builtin_ia32_prorvq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prorv_q_256 : GCCBuiltin<"__builtin_ia32_prorvq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prorv_q_512 : GCCBuiltin<"__builtin_ia32_prorvq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_prol_d_128 : GCCBuiltin<"__builtin_ia32_prold128_mask">, - Intrinsic<[llvm_v4i32_ty] , [llvm_v4i32_ty, - llvm_i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prol_d_256 : GCCBuiltin<"__builtin_ia32_prold256_mask">, - Intrinsic<[llvm_v8i32_ty] , [llvm_v8i32_ty, - llvm_i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prol_d_512 : GCCBuiltin<"__builtin_ia32_prold512_mask">, - Intrinsic<[llvm_v16i32_ty] , [llvm_v16i32_ty, - llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prol_q_128 : GCCBuiltin<"__builtin_ia32_prolq128_mask">, - Intrinsic<[llvm_v2i64_ty] , [llvm_v2i64_ty, - llvm_i32_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prol_q_256 : GCCBuiltin<"__builtin_ia32_prolq256_mask">, - Intrinsic<[llvm_v4i64_ty] , [llvm_v4i64_ty, - llvm_i32_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prol_q_512 : GCCBuiltin<"__builtin_ia32_prolq512_mask">, - Intrinsic<[llvm_v8i64_ty] , [llvm_v8i64_ty, - llvm_i32_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - - def int_x86_avx512_mask_prolv_d_128 : GCCBuiltin<"__builtin_ia32_prolvd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prolv_d_256 : GCCBuiltin<"__builtin_ia32_prolvd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prolv_d_512 : GCCBuiltin<"__builtin_ia32_prolvd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prolv_q_128 : GCCBuiltin<"__builtin_ia32_prolvq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prolv_q_256 : GCCBuiltin<"__builtin_ia32_prolvq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_prolv_q_512 : GCCBuiltin<"__builtin_ia32_prolvq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pror_d_128 : GCCBuiltin<"__builtin_ia32_prord128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, - llvm_i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pror_d_256 : GCCBuiltin<"__builtin_ia32_prord256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pror_d_512 : GCCBuiltin<"__builtin_ia32_prord512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pror_q_128 : GCCBuiltin<"__builtin_ia32_prorq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, - llvm_i32_ty, llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pror_q_256 : GCCBuiltin<"__builtin_ia32_prorq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_i32_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pror_q_512 : GCCBuiltin<"__builtin_ia32_prorq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_i32_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - -} - -// Gather ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_gather_d_pd : GCCBuiltin<"__builtin_ia32_gatherd_pd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_d_pd_256 : GCCBuiltin<"__builtin_ia32_gatherd_pd256">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_q_pd : GCCBuiltin<"__builtin_ia32_gatherq_pd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_q_pd_256 : GCCBuiltin<"__builtin_ia32_gatherq_pd256">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_d_ps : GCCBuiltin<"__builtin_ia32_gatherd_ps">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_d_ps_256 : GCCBuiltin<"__builtin_ia32_gatherd_ps256">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_q_ps : GCCBuiltin<"__builtin_ia32_gatherq_ps">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_q_ps_256 : GCCBuiltin<"__builtin_ia32_gatherq_ps256">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx2_gather_d_q : GCCBuiltin<"__builtin_ia32_gatherd_q">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_d_q_256 : GCCBuiltin<"__builtin_ia32_gatherd_q256">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_q_q : GCCBuiltin<"__builtin_ia32_gatherq_q">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_q_q_256 : GCCBuiltin<"__builtin_ia32_gatherq_q256">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_d_d : GCCBuiltin<"__builtin_ia32_gatherd_d">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_d_d_256 : GCCBuiltin<"__builtin_ia32_gatherd_d256">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_q_d : GCCBuiltin<"__builtin_ia32_gatherq_d">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx2_gather_q_d_256 : GCCBuiltin<"__builtin_ia32_gatherq_d256">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrReadMem, IntrArgMemOnly]>; -} - -// Misc. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx2_pmovmskb : GCCBuiltin<"__builtin_ia32_pmovmskb256">, - Intrinsic<[llvm_i32_ty], [llvm_v32i8_ty], [IntrNoMem]>; - def int_x86_avx2_pshuf_b : GCCBuiltin<"__builtin_ia32_pshufb256">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty], [IntrNoMem]>; - def int_x86_avx2_mpsadbw : GCCBuiltin<"__builtin_ia32_mpsadbw256">, - Intrinsic<[llvm_v16i16_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_i8_ty], [IntrNoMem, Commutative]>; - def int_x86_avx2_movntdqa : GCCBuiltin<"__builtin_ia32_movntdqa256">, - Intrinsic<[llvm_v4i64_ty], [llvm_ptr_ty], [IntrReadMem]>; -} - -//===----------------------------------------------------------------------===// -// FMA3 and FMA4 - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_fma_vfmadd_ss : GCCBuiltin<"__builtin_ia32_vfmaddss">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmadd_sd : GCCBuiltin<"__builtin_ia32_vfmaddsd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfmadd_ps : GCCBuiltin<"__builtin_ia32_vfmaddps">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmadd_pd : GCCBuiltin<"__builtin_ia32_vfmaddpd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfmadd_ps_256 : GCCBuiltin<"__builtin_ia32_vfmaddps256">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmadd_pd_256 : GCCBuiltin<"__builtin_ia32_vfmaddpd256">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty], - [IntrNoMem]>; - - def int_x86_fma_vfmsub_ss : GCCBuiltin<"__builtin_ia32_vfmsubss">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsub_sd : GCCBuiltin<"__builtin_ia32_vfmsubsd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsub_ps : GCCBuiltin<"__builtin_ia32_vfmsubps">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsub_pd : GCCBuiltin<"__builtin_ia32_vfmsubpd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsub_ps_256 : GCCBuiltin<"__builtin_ia32_vfmsubps256">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsub_pd_256 : GCCBuiltin<"__builtin_ia32_vfmsubpd256">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmadd_ss : GCCBuiltin<"__builtin_ia32_vfnmaddss">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmadd_sd : GCCBuiltin<"__builtin_ia32_vfnmaddsd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmadd_ps : GCCBuiltin<"__builtin_ia32_vfnmaddps">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmadd_pd : GCCBuiltin<"__builtin_ia32_vfnmaddpd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmadd_ps_256 : GCCBuiltin<"__builtin_ia32_vfnmaddps256">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmadd_pd_256 : GCCBuiltin<"__builtin_ia32_vfnmaddpd256">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmsub_ss : GCCBuiltin<"__builtin_ia32_vfnmsubss">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmsub_sd : GCCBuiltin<"__builtin_ia32_vfnmsubsd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmsub_ps : GCCBuiltin<"__builtin_ia32_vfnmsubps">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmsub_pd : GCCBuiltin<"__builtin_ia32_vfnmsubpd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmsub_ps_256 : GCCBuiltin<"__builtin_ia32_vfnmsubps256">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfnmsub_pd_256 : GCCBuiltin<"__builtin_ia32_vfnmsubpd256">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfmaddsub_ps : GCCBuiltin<"__builtin_ia32_vfmaddsubps">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmaddsub_pd : GCCBuiltin<"__builtin_ia32_vfmaddsubpd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfmaddsub_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps256">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmaddsub_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd256">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsubadd_ps : GCCBuiltin<"__builtin_ia32_vfmsubaddps">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsubadd_pd : GCCBuiltin<"__builtin_ia32_vfmsubaddpd">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsubadd_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmsubaddps256">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty], - [IntrNoMem]>; - def int_x86_fma_vfmsubadd_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmsubaddpd256">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmadd_pd_128 : - GCCBuiltin<"__builtin_ia32_vfmaddpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmadd_pd_128 : - GCCBuiltin<"__builtin_ia32_vfmaddpd128_mask3">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmadd_pd_128 : - GCCBuiltin<"__builtin_ia32_vfmaddpd128_maskz">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmadd_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmaddpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmadd_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmaddpd256_mask3">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmadd_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmaddpd256_maskz">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmadd_pd_512 : - GCCBuiltin<"__builtin_ia32_vfmaddpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmadd_pd_512 : - GCCBuiltin<"__builtin_ia32_vfmaddpd512_mask3">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmadd_pd_512 : - GCCBuiltin<"__builtin_ia32_vfmaddpd512_maskz">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vfmadd_ps_128 : - GCCBuiltin<"__builtin_ia32_vfmaddps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmadd_ps_128 : - GCCBuiltin<"__builtin_ia32_vfmaddps128_mask3">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmadd_ps_128 : - GCCBuiltin<"__builtin_ia32_vfmaddps128_maskz">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmadd_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmaddps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmadd_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmaddps256_mask3">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmadd_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmaddps256_maskz">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmadd_ps_512 : - GCCBuiltin<"__builtin_ia32_vfmaddps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmadd_ps_512 : - GCCBuiltin<"__builtin_ia32_vfmaddps512_mask3">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmadd_ps_512 : - GCCBuiltin<"__builtin_ia32_vfmaddps512_maskz">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vfmaddsub_pd_128 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmaddsub_pd_128 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd128_mask3">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmaddsub_pd_128 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd128_maskz">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmaddsub_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmaddsub_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd256_mask3">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmaddsub_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd256_maskz">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmaddsub_pd_512 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmaddsub_pd_512 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd512_mask3">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmaddsub_pd_512 : - GCCBuiltin<"__builtin_ia32_vfmaddsubpd512_maskz">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vfmaddsub_ps_128 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmaddsub_ps_128 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps128_mask3">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmaddsub_ps_128 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps128_maskz">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmaddsub_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmaddsub_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps256_mask3">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmaddsub_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps256_maskz">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfmaddsub_ps_512 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmaddsub_ps_512 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps512_mask3">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmaddsub_ps_512 : - GCCBuiltin<"__builtin_ia32_vfmaddsubps512_maskz">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - - def int_x86_avx512_mask_vfmadd_sd : - GCCBuiltin<"__builtin_ia32_vfmaddsd3_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vfmadd_ss : - GCCBuiltin<"__builtin_ia32_vfmaddss3_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmadd_sd : - GCCBuiltin<"__builtin_ia32_vfmaddsd3_maskz">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_vfmadd_ss : - GCCBuiltin<"__builtin_ia32_vfmaddss3_maskz">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmadd_sd : - GCCBuiltin<"__builtin_ia32_vfmaddsd3_mask3">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmadd_ss : - GCCBuiltin<"__builtin_ia32_vfmaddss3_mask3">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsub_pd_128 : - GCCBuiltin<"__builtin_ia32_vfmsubpd128_mask3">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsub_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmsubpd256_mask3">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsub_pd_512 : - GCCBuiltin<"__builtin_ia32_vfmsubpd512_mask3">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsub_ps_128 : - GCCBuiltin<"__builtin_ia32_vfmsubps128_mask3">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsub_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmsubps256_mask3">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsub_ps_512 : - GCCBuiltin<"__builtin_ia32_vfmsubps512_mask3">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsubadd_pd_128 : - GCCBuiltin<"__builtin_ia32_vfmsubaddpd128_mask3">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsubadd_pd_256 : - GCCBuiltin<"__builtin_ia32_vfmsubaddpd256_mask3">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsubadd_pd_512 : - GCCBuiltin<"__builtin_ia32_vfmsubaddpd512_mask3">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsubadd_ps_128 : - GCCBuiltin<"__builtin_ia32_vfmsubaddps128_mask3">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsubadd_ps_256 : - GCCBuiltin<"__builtin_ia32_vfmsubaddps256_mask3">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfmsubadd_ps_512 : - GCCBuiltin<"__builtin_ia32_vfmsubaddps512_mask3">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmadd_pd_128 : - GCCBuiltin<"__builtin_ia32_vfnmaddpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmadd_pd_256 : - GCCBuiltin<"__builtin_ia32_vfnmaddpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmadd_pd_512 : - GCCBuiltin<"__builtin_ia32_vfnmaddpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmadd_ps_128 : - GCCBuiltin<"__builtin_ia32_vfnmaddps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmadd_ps_256 : - GCCBuiltin<"__builtin_ia32_vfnmaddps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmadd_ps_512 : - GCCBuiltin<"__builtin_ia32_vfnmaddps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmsub_pd_128 : - GCCBuiltin<"__builtin_ia32_vfnmsubpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfnmsub_pd_128 : - GCCBuiltin<"__builtin_ia32_vfnmsubpd128_mask3">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmsub_pd_256 : - GCCBuiltin<"__builtin_ia32_vfnmsubpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfnmsub_pd_256 : - GCCBuiltin<"__builtin_ia32_vfnmsubpd256_mask3">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmsub_pd_512 : - GCCBuiltin<"__builtin_ia32_vfnmsubpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfnmsub_pd_512 : - GCCBuiltin<"__builtin_ia32_vfnmsubpd512_mask3">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8f64_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmsub_ps_128 : - GCCBuiltin<"__builtin_ia32_vfnmsubps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfnmsub_ps_128 : - GCCBuiltin<"__builtin_ia32_vfnmsubps128_mask3">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmsub_ps_256 : - GCCBuiltin<"__builtin_ia32_vfnmsubps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask3_vfnmsub_ps_256 : - GCCBuiltin<"__builtin_ia32_vfnmsubps256_mask3">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_vfnmsub_ps_512 : - GCCBuiltin<"__builtin_ia32_vfnmsubps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask3_vfnmsub_ps_512 : - GCCBuiltin<"__builtin_ia32_vfnmsubps512_mask3">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16f32_ty, llvm_i16_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_vpmadd52h_uq_128 : - GCCBuiltin<"__builtin_ia32_vpmadd52huq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_vpmadd52h_uq_128 : - GCCBuiltin<"__builtin_ia32_vpmadd52huq128_maskz">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vpmadd52l_uq_128 : - GCCBuiltin<"__builtin_ia32_vpmadd52luq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_vpmadd52l_uq_128 : - GCCBuiltin<"__builtin_ia32_vpmadd52luq128_maskz">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vpmadd52h_uq_256 : - GCCBuiltin<"__builtin_ia32_vpmadd52huq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_vpmadd52h_uq_256 : - GCCBuiltin<"__builtin_ia32_vpmadd52huq256_maskz">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vpmadd52l_uq_256 : - GCCBuiltin<"__builtin_ia32_vpmadd52luq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_vpmadd52l_uq_256 : - GCCBuiltin<"__builtin_ia32_vpmadd52luq256_maskz">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vpmadd52h_uq_512 : - GCCBuiltin<"__builtin_ia32_vpmadd52huq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_vpmadd52h_uq_512 : - GCCBuiltin<"__builtin_ia32_vpmadd52huq512_maskz">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vpmadd52l_uq_512 : - GCCBuiltin<"__builtin_ia32_vpmadd52luq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_vpmadd52l_uq_512 : - GCCBuiltin<"__builtin_ia32_vpmadd52luq512_maskz">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// XOP - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_xop_vpermil2pd : GCCBuiltin<"__builtin_ia32_vpermil2pd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_xop_vpermil2pd_256 : - GCCBuiltin<"__builtin_ia32_vpermil2pd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_xop_vpermil2ps : GCCBuiltin<"__builtin_ia32_vpermil2ps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_xop_vpermil2ps_256 : - GCCBuiltin<"__builtin_ia32_vpermil2ps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_xop_vfrcz_pd : GCCBuiltin<"__builtin_ia32_vfrczpd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_xop_vfrcz_ps : GCCBuiltin<"__builtin_ia32_vfrczps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_xop_vfrcz_sd : GCCBuiltin<"__builtin_ia32_vfrczsd">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty], [IntrNoMem]>; - def int_x86_xop_vfrcz_ss : GCCBuiltin<"__builtin_ia32_vfrczss">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>; - def int_x86_xop_vfrcz_pd_256 : GCCBuiltin<"__builtin_ia32_vfrczpd256">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty], [IntrNoMem]>; - def int_x86_xop_vfrcz_ps_256 : GCCBuiltin<"__builtin_ia32_vfrczps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty], [IntrNoMem]>; - - def int_x86_xop_vpcmov : - GCCBuiltin<"__builtin_ia32_vpcmov">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_xop_vpcmov_256 : - GCCBuiltin<"__builtin_ia32_vpcmov_256">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_v4i64_ty], - [IntrNoMem]>; - - def int_x86_xop_vpcomb : GCCBuiltin<"__builtin_ia32_vpcomb">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_xop_vpcomw : GCCBuiltin<"__builtin_ia32_vpcomw">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_xop_vpcomd : GCCBuiltin<"__builtin_ia32_vpcomd">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_xop_vpcomq : GCCBuiltin<"__builtin_ia32_vpcomq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_xop_vpcomub : GCCBuiltin<"__builtin_ia32_vpcomub">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_xop_vpcomuw : GCCBuiltin<"__builtin_ia32_vpcomuw">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_xop_vpcomud : GCCBuiltin<"__builtin_ia32_vpcomud">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_xop_vpcomuq : GCCBuiltin<"__builtin_ia32_vpcomuq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_xop_vphaddbd : - GCCBuiltin<"__builtin_ia32_vphaddbd">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_xop_vphaddbq : - GCCBuiltin<"__builtin_ia32_vphaddbq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_xop_vphaddbw : - GCCBuiltin<"__builtin_ia32_vphaddbw">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_xop_vphadddq : - GCCBuiltin<"__builtin_ia32_vphadddq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_xop_vphaddubd : - GCCBuiltin<"__builtin_ia32_vphaddubd">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_xop_vphaddubq : - GCCBuiltin<"__builtin_ia32_vphaddubq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_xop_vphaddubw : - GCCBuiltin<"__builtin_ia32_vphaddubw">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_xop_vphaddudq : - GCCBuiltin<"__builtin_ia32_vphaddudq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_xop_vphadduwd : - GCCBuiltin<"__builtin_ia32_vphadduwd">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_xop_vphadduwq : - GCCBuiltin<"__builtin_ia32_vphadduwq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_xop_vphaddwd : - GCCBuiltin<"__builtin_ia32_vphaddwd">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_xop_vphaddwq : - GCCBuiltin<"__builtin_ia32_vphaddwq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_xop_vphsubbw : - GCCBuiltin<"__builtin_ia32_vphsubbw">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_xop_vphsubdq : - GCCBuiltin<"__builtin_ia32_vphsubdq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_xop_vphsubwd : - GCCBuiltin<"__builtin_ia32_vphsubwd">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_xop_vpmacsdd : - GCCBuiltin<"__builtin_ia32_vpmacsdd">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacsdqh : - GCCBuiltin<"__builtin_ia32_vpmacsdqh">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacsdql : - GCCBuiltin<"__builtin_ia32_vpmacsdql">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacssdd : - GCCBuiltin<"__builtin_ia32_vpmacssdd">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacssdqh : - GCCBuiltin<"__builtin_ia32_vpmacssdqh">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacssdql : - GCCBuiltin<"__builtin_ia32_vpmacssdql">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacsswd : - GCCBuiltin<"__builtin_ia32_vpmacsswd">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacssww : - GCCBuiltin<"__builtin_ia32_vpmacssww">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacswd : - GCCBuiltin<"__builtin_ia32_vpmacswd">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vpmacsww : - GCCBuiltin<"__builtin_ia32_vpmacsww">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_x86_xop_vpmadcsswd : - GCCBuiltin<"__builtin_ia32_vpmadcsswd">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vpmadcswd : - GCCBuiltin<"__builtin_ia32_vpmadcswd">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vpperm : - GCCBuiltin<"__builtin_ia32_vpperm">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - - def int_x86_xop_vprotb : GCCBuiltin<"__builtin_ia32_vprotb">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_x86_xop_vprotd : GCCBuiltin<"__builtin_ia32_vprotd">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vprotq : GCCBuiltin<"__builtin_ia32_vprotq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_xop_vprotw : GCCBuiltin<"__builtin_ia32_vprotw">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_x86_xop_vprotbi : GCCBuiltin<"__builtin_ia32_vprotbi">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_xop_vprotdi : GCCBuiltin<"__builtin_ia32_vprotdi">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_xop_vprotqi : GCCBuiltin<"__builtin_ia32_vprotqi">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_xop_vprotwi : GCCBuiltin<"__builtin_ia32_vprotwi">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_xop_vpshab : - GCCBuiltin<"__builtin_ia32_vpshab">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_x86_xop_vpshad : - GCCBuiltin<"__builtin_ia32_vpshad">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vpshaq : - GCCBuiltin<"__builtin_ia32_vpshaq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_xop_vpshaw : - GCCBuiltin<"__builtin_ia32_vpshaw">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; - def int_x86_xop_vpshlb : - GCCBuiltin<"__builtin_ia32_vpshlb">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty], - [IntrNoMem]>; - def int_x86_xop_vpshld : - GCCBuiltin<"__builtin_ia32_vpshld">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_xop_vpshlq : - GCCBuiltin<"__builtin_ia32_vpshlq">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty], - [IntrNoMem]>; - def int_x86_xop_vpshlw : - GCCBuiltin<"__builtin_ia32_vpshlw">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty], - [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// MMX - -// Empty MMX state op. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_mmx_emms : GCCBuiltin<"__builtin_ia32_emms">, - Intrinsic<[], [], []>; - def int_x86_mmx_femms : GCCBuiltin<"__builtin_ia32_femms">, - Intrinsic<[], [], []>; -} - -// Integer arithmetic ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - // Addition - def int_x86_mmx_padd_b : GCCBuiltin<"__builtin_ia32_paddb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_padd_w : GCCBuiltin<"__builtin_ia32_paddw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_padd_d : GCCBuiltin<"__builtin_ia32_paddd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_padd_q : GCCBuiltin<"__builtin_ia32_paddq">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - - def int_x86_mmx_padds_b : GCCBuiltin<"__builtin_ia32_paddsb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_padds_w : GCCBuiltin<"__builtin_ia32_paddsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - - def int_x86_mmx_paddus_b : GCCBuiltin<"__builtin_ia32_paddusb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_paddus_w : GCCBuiltin<"__builtin_ia32_paddusw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - - // Subtraction - def int_x86_mmx_psub_b : GCCBuiltin<"__builtin_ia32_psubb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_psub_w : GCCBuiltin<"__builtin_ia32_psubw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_psub_d : GCCBuiltin<"__builtin_ia32_psubd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_psub_q : GCCBuiltin<"__builtin_ia32_psubq">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - - def int_x86_mmx_psubs_b : GCCBuiltin<"__builtin_ia32_psubsb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_psubs_w : GCCBuiltin<"__builtin_ia32_psubsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - - def int_x86_mmx_psubus_b : GCCBuiltin<"__builtin_ia32_psubusb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_psubus_w : GCCBuiltin<"__builtin_ia32_psubusw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - - // Multiplication - def int_x86_mmx_pmulh_w : GCCBuiltin<"__builtin_ia32_pmulhw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pmull_w : GCCBuiltin<"__builtin_ia32_pmullw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pmulhu_w : GCCBuiltin<"__builtin_ia32_pmulhuw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pmulu_dq : GCCBuiltin<"__builtin_ia32_pmuludq">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pmadd_wd : GCCBuiltin<"__builtin_ia32_pmaddwd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - - // Bitwise operations - def int_x86_mmx_pand : GCCBuiltin<"__builtin_ia32_pand">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_pandn : GCCBuiltin<"__builtin_ia32_pandn">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_por : GCCBuiltin<"__builtin_ia32_por">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_pxor : GCCBuiltin<"__builtin_ia32_pxor">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - - // Averages - def int_x86_mmx_pavg_b : GCCBuiltin<"__builtin_ia32_pavgb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pavg_w : GCCBuiltin<"__builtin_ia32_pavgw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - - // Maximum - def int_x86_mmx_pmaxu_b : GCCBuiltin<"__builtin_ia32_pmaxub">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pmaxs_w : GCCBuiltin<"__builtin_ia32_pmaxsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - - // Minimum - def int_x86_mmx_pminu_b : GCCBuiltin<"__builtin_ia32_pminub">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pmins_w : GCCBuiltin<"__builtin_ia32_pminsw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - - // Packed sum of absolute differences - def int_x86_mmx_psad_bw : GCCBuiltin<"__builtin_ia32_psadbw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; -} - -// Integer shift ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - // Shift left logical - def int_x86_mmx_psll_w : GCCBuiltin<"__builtin_ia32_psllw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_psll_d : GCCBuiltin<"__builtin_ia32_pslld">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_psll_q : GCCBuiltin<"__builtin_ia32_psllq">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - - def int_x86_mmx_psrl_w : GCCBuiltin<"__builtin_ia32_psrlw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_psrl_d : GCCBuiltin<"__builtin_ia32_psrld">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_psrl_q : GCCBuiltin<"__builtin_ia32_psrlq">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - - def int_x86_mmx_psra_w : GCCBuiltin<"__builtin_ia32_psraw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_psra_d : GCCBuiltin<"__builtin_ia32_psrad">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - - def int_x86_mmx_pslli_w : GCCBuiltin<"__builtin_ia32_psllwi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_mmx_pslli_d : GCCBuiltin<"__builtin_ia32_pslldi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_mmx_pslli_q : GCCBuiltin<"__builtin_ia32_psllqi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_mmx_psrli_w : GCCBuiltin<"__builtin_ia32_psrlwi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_mmx_psrli_d : GCCBuiltin<"__builtin_ia32_psrldi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_mmx_psrli_q : GCCBuiltin<"__builtin_ia32_psrlqi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty], [IntrNoMem]>; - - def int_x86_mmx_psrai_w : GCCBuiltin<"__builtin_ia32_psrawi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_mmx_psrai_d : GCCBuiltin<"__builtin_ia32_psradi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty], [IntrNoMem]>; -} -// Permute -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_mask_permvar_df_256 : GCCBuiltin<"__builtin_ia32_permvardf256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, - llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_df_512 : GCCBuiltin<"__builtin_ia32_permvardf512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, - llvm_v8i64_ty, llvm_v8f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_di_256 : GCCBuiltin<"__builtin_ia32_permvardi256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, - llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_di_512 : GCCBuiltin<"__builtin_ia32_permvardi512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, - llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_hi_128 : GCCBuiltin<"__builtin_ia32_permvarhi128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, - llvm_v8i16_ty, llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_hi_256 : GCCBuiltin<"__builtin_ia32_permvarhi256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, - llvm_v16i16_ty, llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_hi_512 : GCCBuiltin<"__builtin_ia32_permvarhi512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, - llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_qi_128 : GCCBuiltin<"__builtin_ia32_permvarqi128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, - llvm_v16i8_ty, llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_qi_256 : GCCBuiltin<"__builtin_ia32_permvarqi256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, - llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_qi_512 : GCCBuiltin<"__builtin_ia32_permvarqi512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, - llvm_v64i8_ty, llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_sf_256 : GCCBuiltin<"__builtin_ia32_permvarsf256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, - llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_sf_512 : GCCBuiltin<"__builtin_ia32_permvarsf512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, - llvm_v16i32_ty, llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_si_256 : GCCBuiltin<"__builtin_ia32_permvarsi256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, - llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_permvar_si_512 : GCCBuiltin<"__builtin_ia32_permvarsi512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, - llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; -} -// Pack ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_mmx_packsswb : GCCBuiltin<"__builtin_ia32_packsswb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_packssdw : GCCBuiltin<"__builtin_ia32_packssdw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_packuswb : GCCBuiltin<"__builtin_ia32_packuswb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; -} - -// Unpacking ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_mmx_punpckhbw : GCCBuiltin<"__builtin_ia32_punpckhbw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_punpckhwd : GCCBuiltin<"__builtin_ia32_punpckhwd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_punpckhdq : GCCBuiltin<"__builtin_ia32_punpckhdq">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_punpcklbw : GCCBuiltin<"__builtin_ia32_punpcklbw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_punpcklwd : GCCBuiltin<"__builtin_ia32_punpcklwd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; - def int_x86_mmx_punpckldq : GCCBuiltin<"__builtin_ia32_punpckldq">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, llvm_x86mmx_ty], - [IntrNoMem]>; -} - -// Integer comparison ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_mmx_pcmpeq_b : GCCBuiltin<"__builtin_ia32_pcmpeqb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pcmpeq_w : GCCBuiltin<"__builtin_ia32_pcmpeqw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - def int_x86_mmx_pcmpeq_d : GCCBuiltin<"__builtin_ia32_pcmpeqd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem, Commutative]>; - - def int_x86_mmx_pcmpgt_b : GCCBuiltin<"__builtin_ia32_pcmpgtb">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_pcmpgt_w : GCCBuiltin<"__builtin_ia32_pcmpgtw">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; - def int_x86_mmx_pcmpgt_d : GCCBuiltin<"__builtin_ia32_pcmpgtd">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty], [IntrNoMem]>; -} - -// Misc. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_mmx_maskmovq : GCCBuiltin<"__builtin_ia32_maskmovq">, - Intrinsic<[], [llvm_x86mmx_ty, llvm_x86mmx_ty, llvm_ptr_ty], []>; - - def int_x86_mmx_pmovmskb : GCCBuiltin<"__builtin_ia32_pmovmskb">, - Intrinsic<[llvm_i32_ty], [llvm_x86mmx_ty], [IntrNoMem]>; - - def int_x86_mmx_movnt_dq : GCCBuiltin<"__builtin_ia32_movntq">, - Intrinsic<[], [llvm_ptrx86mmx_ty, llvm_x86mmx_ty], []>; - - def int_x86_mmx_palignr_b : GCCBuiltin<"__builtin_ia32_palignr">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_x86mmx_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_mmx_pextr_w : GCCBuiltin<"__builtin_ia32_vec_ext_v4hi">, - Intrinsic<[llvm_i32_ty], [llvm_x86mmx_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_mmx_pinsr_w : GCCBuiltin<"__builtin_ia32_vec_set_v4hi">, - Intrinsic<[llvm_x86mmx_ty], [llvm_x86mmx_ty, - llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// BMI - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_bmi_bextr_32 : GCCBuiltin<"__builtin_ia32_bextr_u32">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_bmi_bextr_64 : GCCBuiltin<"__builtin_ia32_bextr_u64">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_bmi_bzhi_32 : GCCBuiltin<"__builtin_ia32_bzhi_si">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_bmi_bzhi_64 : GCCBuiltin<"__builtin_ia32_bzhi_di">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_bmi_pdep_32 : GCCBuiltin<"__builtin_ia32_pdep_si">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_bmi_pdep_64 : GCCBuiltin<"__builtin_ia32_pdep_di">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_bmi_pext_32 : GCCBuiltin<"__builtin_ia32_pext_si">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_bmi_pext_64 : GCCBuiltin<"__builtin_ia32_pext_di">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// FS/GS Base - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_rdfsbase_32 : GCCBuiltin<"__builtin_ia32_rdfsbase32">, - Intrinsic<[llvm_i32_ty], []>; - def int_x86_rdgsbase_32 : GCCBuiltin<"__builtin_ia32_rdgsbase32">, - Intrinsic<[llvm_i32_ty], []>; - def int_x86_rdfsbase_64 : GCCBuiltin<"__builtin_ia32_rdfsbase64">, - Intrinsic<[llvm_i64_ty], []>; - def int_x86_rdgsbase_64 : GCCBuiltin<"__builtin_ia32_rdgsbase64">, - Intrinsic<[llvm_i64_ty], []>; - def int_x86_wrfsbase_32 : GCCBuiltin<"__builtin_ia32_wrfsbase32">, - Intrinsic<[], [llvm_i32_ty]>; - def int_x86_wrgsbase_32 : GCCBuiltin<"__builtin_ia32_wrgsbase32">, - Intrinsic<[], [llvm_i32_ty]>; - def int_x86_wrfsbase_64 : GCCBuiltin<"__builtin_ia32_wrfsbase64">, - Intrinsic<[], [llvm_i64_ty]>; - def int_x86_wrgsbase_64 : GCCBuiltin<"__builtin_ia32_wrgsbase64">, - Intrinsic<[], [llvm_i64_ty]>; -} - -//===----------------------------------------------------------------------===// -// FXSR -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_fxrstor : GCCBuiltin<"__builtin_ia32_fxrstor">, - Intrinsic<[], [llvm_ptr_ty], []>; - def int_x86_fxrstor64 : GCCBuiltin<"__builtin_ia32_fxrstor64">, - Intrinsic<[], [llvm_ptr_ty], []>; - def int_x86_fxsave : GCCBuiltin<"__builtin_ia32_fxsave">, - Intrinsic<[], [llvm_ptr_ty], []>; - def int_x86_fxsave64 : GCCBuiltin<"__builtin_ia32_fxsave64">, - Intrinsic<[], [llvm_ptr_ty], []>; -} - -//===----------------------------------------------------------------------===// -// XSAVE -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_xsave : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xsave64 : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xrstor : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xrstor64 : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xsaveopt : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xsaveopt64 : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xrstors : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xrstors64 : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xsavec : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xsavec64 : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xsaves : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; - def int_x86_xsaves64 : - Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty], []>; -} - -//===----------------------------------------------------------------------===// -// CLFLUSHOPT -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_clflushopt : GCCBuiltin<"__builtin_ia32_clflushopt">, - Intrinsic<[], [llvm_ptr_ty], []>; -} - -//===----------------------------------------------------------------------===// -// Support protection key -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_rdpkru : GCCBuiltin <"__builtin_ia32_rdpkru">, - Intrinsic<[llvm_i32_ty], [], []>; - def int_x86_wrpkru : GCCBuiltin<"__builtin_ia32_wrpkru">, - Intrinsic<[], [llvm_i32_ty], []>; -} -//===----------------------------------------------------------------------===// -// Half float conversion - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_vcvtph2ps_128 : GCCBuiltin<"__builtin_ia32_vcvtph2ps">, - Intrinsic<[llvm_v4f32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_vcvtph2ps_256 : GCCBuiltin<"__builtin_ia32_vcvtph2ps256">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_vcvtps2ph_128 : GCCBuiltin<"__builtin_ia32_vcvtps2ph">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4f32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_vcvtps2ph_256 : GCCBuiltin<"__builtin_ia32_vcvtps2ph256">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8f32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_vcvtph2ps_512 : GCCBuiltin<"__builtin_ia32_vcvtph2ps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16i16_ty, llvm_v16f32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vcvtph2ps_256 : GCCBuiltin<"__builtin_ia32_vcvtph2ps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8i16_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vcvtph2ps_128 : GCCBuiltin<"__builtin_ia32_vcvtph2ps_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v8i16_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vcvtps2ph_512 : GCCBuiltin<"__builtin_ia32_vcvtps2ph512_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16f32_ty, llvm_i32_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vcvtps2ph_256 : GCCBuiltin<"__builtin_ia32_vcvtps2ph256_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8f32_ty, llvm_i32_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_vcvtps2ph_128 : GCCBuiltin<"__builtin_ia32_vcvtps2ph_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4f32_ty, llvm_i32_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// TBM - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_tbm_bextri_u32 : GCCBuiltin<"__builtin_ia32_bextri_u32">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_tbm_bextri_u64 : GCCBuiltin<"__builtin_ia32_bextri_u64">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// RDRAND intrinsics - Return a random value and whether it is valid. -// RDSEED intrinsics - Return a NIST SP800-90B & C compliant random value and -// whether it is valid. - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - // These are declared side-effecting so they don't get eliminated by CSE or - // LICM. - def int_x86_rdrand_16 : Intrinsic<[llvm_i16_ty, llvm_i32_ty], [], []>; - def int_x86_rdrand_32 : Intrinsic<[llvm_i32_ty, llvm_i32_ty], [], []>; - def int_x86_rdrand_64 : Intrinsic<[llvm_i64_ty, llvm_i32_ty], [], []>; - def int_x86_rdseed_16 : Intrinsic<[llvm_i16_ty, llvm_i32_ty], [], []>; - def int_x86_rdseed_32 : Intrinsic<[llvm_i32_ty, llvm_i32_ty], [], []>; - def int_x86_rdseed_64 : Intrinsic<[llvm_i64_ty, llvm_i32_ty], [], []>; -} - -//===----------------------------------------------------------------------===// -// ADX - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_addcarryx_u32: GCCBuiltin<"__builtin_ia32_addcarryx_u32">, - Intrinsic<[llvm_i8_ty], [llvm_i8_ty, llvm_i32_ty, llvm_i32_ty, - llvm_ptr_ty], [IntrArgMemOnly]>; - def int_x86_addcarryx_u64: GCCBuiltin<"__builtin_ia32_addcarryx_u64">, - Intrinsic<[llvm_i8_ty], [llvm_i8_ty, llvm_i64_ty, llvm_i64_ty, - llvm_ptr_ty], [IntrArgMemOnly]>; - def int_x86_addcarry_u32: GCCBuiltin<"__builtin_ia32_addcarry_u32">, - Intrinsic<[llvm_i8_ty], [llvm_i8_ty, llvm_i32_ty, llvm_i32_ty, - llvm_ptr_ty], [IntrArgMemOnly]>; - def int_x86_addcarry_u64: GCCBuiltin<"__builtin_ia32_addcarry_u64">, - Intrinsic<[llvm_i8_ty], [llvm_i8_ty, llvm_i64_ty, llvm_i64_ty, - llvm_ptr_ty], [IntrArgMemOnly]>; - def int_x86_subborrow_u32: GCCBuiltin<"__builtin_ia32_subborrow_u32">, - Intrinsic<[llvm_i8_ty], [llvm_i8_ty, llvm_i32_ty, llvm_i32_ty, - llvm_ptr_ty], [IntrArgMemOnly]>; - def int_x86_subborrow_u64: GCCBuiltin<"__builtin_ia32_subborrow_u64">, - Intrinsic<[llvm_i8_ty], [llvm_i8_ty, llvm_i64_ty, llvm_i64_ty, - llvm_ptr_ty], [IntrArgMemOnly]>; -} - -//===----------------------------------------------------------------------===// -// RTM intrinsics. Transactional Memory support. - -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_xbegin : GCCBuiltin<"__builtin_ia32_xbegin">, - Intrinsic<[llvm_i32_ty], [], []>; - def int_x86_xend : GCCBuiltin<"__builtin_ia32_xend">, - Intrinsic<[], [], []>; - def int_x86_xabort : GCCBuiltin<"__builtin_ia32_xabort">, - Intrinsic<[], [llvm_i8_ty], []>; - def int_x86_xtest : GCCBuiltin<"__builtin_ia32_xtest">, - Intrinsic<[llvm_i32_ty], [], []>; -} - -//===----------------------------------------------------------------------===// -// AVX512 - -// Mask ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - // Mask instructions - // 16-bit mask - def int_x86_avx512_kand_w : GCCBuiltin<"__builtin_ia32_kandhi">, - Intrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_kandn_w : GCCBuiltin<"__builtin_ia32_kandnhi">, - Intrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_knot_w : GCCBuiltin<"__builtin_ia32_knothi">, - Intrinsic<[llvm_i16_ty], [llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_kor_w : GCCBuiltin<"__builtin_ia32_korhi">, - Intrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_kxor_w : GCCBuiltin<"__builtin_ia32_kxorhi">, - Intrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_kxnor_w : GCCBuiltin<"__builtin_ia32_kxnorhi">, - Intrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_kunpck_bw : GCCBuiltin<"__builtin_ia32_kunpckhi">, - Intrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_kunpck_wd : GCCBuiltin<"__builtin_ia32_kunpcksi">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_kunpck_dq : GCCBuiltin<"__builtin_ia32_kunpckdi">, - Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty], - [IntrNoMem]>; - def int_x86_avx512_kortestz_w : GCCBuiltin<"__builtin_ia32_kortestzhi">, - Intrinsic<[llvm_i32_ty], [llvm_i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_kortestc_w : GCCBuiltin<"__builtin_ia32_kortestchi">, - Intrinsic<[llvm_i32_ty], [llvm_i16_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pmovsxb_d_128 : GCCBuiltin<"__builtin_ia32_pmovsxbd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxb_d_256 : GCCBuiltin<"__builtin_ia32_pmovsxbd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v16i8_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxb_d_512 : GCCBuiltin<"__builtin_ia32_pmovsxbd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i8_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxb_q_128 : GCCBuiltin<"__builtin_ia32_pmovsxbq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v16i8_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxb_q_256 : GCCBuiltin<"__builtin_ia32_pmovsxbq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v16i8_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxb_q_512 : GCCBuiltin<"__builtin_ia32_pmovsxbq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v16i8_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxb_w_128 : GCCBuiltin<"__builtin_ia32_pmovsxbw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxb_w_256 : GCCBuiltin<"__builtin_ia32_pmovsxbw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i8_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxb_w_512 : GCCBuiltin<"__builtin_ia32_pmovsxbw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i8_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxd_q_128 : GCCBuiltin<"__builtin_ia32_pmovsxdq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxd_q_256 : GCCBuiltin<"__builtin_ia32_pmovsxdq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i32_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxd_q_512 : GCCBuiltin<"__builtin_ia32_pmovsxdq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i32_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxw_d_128 : GCCBuiltin<"__builtin_ia32_pmovsxwd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxw_d_256 : GCCBuiltin<"__builtin_ia32_pmovsxwd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i16_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxw_d_512 : GCCBuiltin<"__builtin_ia32_pmovsxwd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i16_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxw_q_128 : GCCBuiltin<"__builtin_ia32_pmovsxwq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v8i16_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxw_q_256 : GCCBuiltin<"__builtin_ia32_pmovsxwq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v8i16_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovsxw_q_512 : GCCBuiltin<"__builtin_ia32_pmovsxwq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i16_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; -} - -// Conversion ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_cvttss2si : GCCBuiltin<"__builtin_ia32_vcvttss2si32">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvttss2si64 : GCCBuiltin<"__builtin_ia32_vcvttss2si64">, - Intrinsic<[llvm_i64_ty], [llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvttss2usi : GCCBuiltin<"__builtin_ia32_vcvttss2usi32">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvttss2usi64 : GCCBuiltin<"__builtin_ia32_vcvttss2usi64">, - Intrinsic<[llvm_i64_ty], [llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtusi2ss : GCCBuiltin<"__builtin_ia32_cvtusi2ss32">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtusi642ss : GCCBuiltin<"__builtin_ia32_cvtusi2ss64">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_i64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvttsd2si : GCCBuiltin<"__builtin_ia32_vcvttsd2si32">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvttsd2si64 : GCCBuiltin<"__builtin_ia32_vcvttsd2si64">, - Intrinsic<[llvm_i64_ty], [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvttsd2usi : GCCBuiltin<"__builtin_ia32_vcvttsd2usi32">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvttsd2usi64 : GCCBuiltin<"__builtin_ia32_vcvttsd2usi64">, - Intrinsic<[llvm_i64_ty], [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtusi2sd : GCCBuiltin<"__builtin_ia32_cvtusi2sd32">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtusi642sd : GCCBuiltin<"__builtin_ia32_cvtusi2sd64">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_i64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcvtss2usi32 : GCCBuiltin<"__builtin_ia32_vcvtss2usi32">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcvtss2usi64 : GCCBuiltin<"__builtin_ia32_vcvtss2usi64">, - Intrinsic<[llvm_i64_ty], [llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcvtss2si32 : GCCBuiltin<"__builtin_ia32_vcvtss2si32">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcvtss2si64 : GCCBuiltin<"__builtin_ia32_vcvtss2si64">, - Intrinsic<[llvm_i64_ty], [llvm_v4f32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcvtsd2usi32 : GCCBuiltin<"__builtin_ia32_vcvtsd2usi32">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcvtsd2usi64 : GCCBuiltin<"__builtin_ia32_vcvtsd2usi64">, - Intrinsic<[llvm_i64_ty], [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcvtsd2si32 : GCCBuiltin<"__builtin_ia32_vcvtsd2si32">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcvtsd2si64 : GCCBuiltin<"__builtin_ia32_vcvtsd2si64">, - Intrinsic<[llvm_i64_ty], [llvm_v2f64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtsi2ss32 : GCCBuiltin<"__builtin_ia32_cvtsi2ss32">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtsi2ss64 : GCCBuiltin<"__builtin_ia32_cvtsi2ss64">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, - llvm_i64_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtsi2sd32 : GCCBuiltin<"__builtin_ia32_cvtsi2sd32">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtsi2sd64 : GCCBuiltin<"__builtin_ia32_cvtsi2sd64">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, - llvm_i64_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_cvtb2mask_128 : GCCBuiltin<"__builtin_ia32_cvtb2mask128">, - Intrinsic<[llvm_i16_ty], [llvm_v16i8_ty], [IntrNoMem]>; - def int_x86_avx512_cvtb2mask_256 : GCCBuiltin<"__builtin_ia32_cvtb2mask256">, - Intrinsic<[llvm_i32_ty], [llvm_v32i8_ty], [IntrNoMem]>; - def int_x86_avx512_cvtb2mask_512 : GCCBuiltin<"__builtin_ia32_cvtb2mask512">, - Intrinsic<[llvm_i64_ty], [llvm_v64i8_ty], [IntrNoMem]>; - - def int_x86_avx512_cvtw2mask_128 : GCCBuiltin<"__builtin_ia32_cvtw2mask128">, - Intrinsic<[llvm_i8_ty], [llvm_v8i16_ty], [IntrNoMem]>; - def int_x86_avx512_cvtw2mask_256 : GCCBuiltin<"__builtin_ia32_cvtw2mask256">, - Intrinsic<[llvm_i16_ty], [llvm_v16i16_ty], [IntrNoMem]>; - def int_x86_avx512_cvtw2mask_512 : GCCBuiltin<"__builtin_ia32_cvtw2mask512">, - Intrinsic<[llvm_i32_ty], [llvm_v32i16_ty], [IntrNoMem]>; - - def int_x86_avx512_cvtd2mask_128 : GCCBuiltin<"__builtin_ia32_cvtd2mask128">, - Intrinsic<[llvm_i8_ty], [llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtd2mask_256 : GCCBuiltin<"__builtin_ia32_cvtd2mask256">, - Intrinsic<[llvm_i8_ty], [llvm_v8i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtd2mask_512 : GCCBuiltin<"__builtin_ia32_cvtd2mask512">, - Intrinsic<[llvm_i16_ty], [llvm_v16i32_ty], [IntrNoMem]>; - - def int_x86_avx512_cvtq2mask_128 : GCCBuiltin<"__builtin_ia32_cvtq2mask128">, - Intrinsic<[llvm_i8_ty], [llvm_v2i64_ty], [IntrNoMem]>; - def int_x86_avx512_cvtq2mask_256 : GCCBuiltin<"__builtin_ia32_cvtq2mask256">, - Intrinsic<[llvm_i8_ty], [llvm_v4i64_ty], [IntrNoMem]>; - def int_x86_avx512_cvtq2mask_512 : GCCBuiltin<"__builtin_ia32_cvtq2mask512">, - Intrinsic<[llvm_i8_ty], [llvm_v8i64_ty], [IntrNoMem]>; - - def int_x86_avx512_cvtmask2b_128 : GCCBuiltin<"__builtin_ia32_cvtmask2b128">, - Intrinsic<[llvm_v16i8_ty], [llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_cvtmask2b_256 : GCCBuiltin<"__builtin_ia32_cvtmask2b256">, - Intrinsic<[llvm_v32i8_ty], [llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_cvtmask2b_512 : GCCBuiltin<"__builtin_ia32_cvtmask2b512">, - Intrinsic<[llvm_v64i8_ty], [llvm_i64_ty], [IntrNoMem]>; - - def int_x86_avx512_cvtmask2w_128 : GCCBuiltin<"__builtin_ia32_cvtmask2w128">, - Intrinsic<[llvm_v8i16_ty], [llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_cvtmask2w_256 : GCCBuiltin<"__builtin_ia32_cvtmask2w256">, - Intrinsic<[llvm_v16i16_ty], [llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_cvtmask2w_512 : GCCBuiltin<"__builtin_ia32_cvtmask2w512">, - Intrinsic<[llvm_v32i16_ty], [llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_cvtmask2d_128 : GCCBuiltin<"__builtin_ia32_cvtmask2d128">, - Intrinsic<[llvm_v4i32_ty], [llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_cvtmask2d_256 : GCCBuiltin<"__builtin_ia32_cvtmask2d256">, - Intrinsic<[llvm_v8i32_ty], [llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_cvtmask2d_512 : GCCBuiltin<"__builtin_ia32_cvtmask2d512">, - Intrinsic<[llvm_v16i32_ty], [llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_cvtmask2q_128 : GCCBuiltin<"__builtin_ia32_cvtmask2q128">, - Intrinsic<[llvm_v2i64_ty], [llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_cvtmask2q_256 : GCCBuiltin<"__builtin_ia32_cvtmask2q256">, - Intrinsic<[llvm_v4i64_ty], [llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_cvtmask2q_512 : GCCBuiltin<"__builtin_ia32_cvtmask2q512">, - Intrinsic<[llvm_v8i64_ty], [llvm_i8_ty], [IntrNoMem]>; - -} - -// Pack ops. -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_mask_packsswb_128 : GCCBuiltin<"__builtin_ia32_packsswb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packsswb_256 : GCCBuiltin<"__builtin_ia32_packsswb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v16i16_ty,llvm_v16i16_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packsswb_512 : GCCBuiltin<"__builtin_ia32_packsswb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v32i16_ty,llvm_v32i16_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packssdw_128 : GCCBuiltin<"__builtin_ia32_packssdw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packssdw_256 : GCCBuiltin<"__builtin_ia32_packssdw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packssdw_512 : GCCBuiltin<"__builtin_ia32_packssdw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packuswb_128 : GCCBuiltin<"__builtin_ia32_packuswb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packuswb_256 : GCCBuiltin<"__builtin_ia32_packuswb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v16i16_ty,llvm_v16i16_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packuswb_512 : GCCBuiltin<"__builtin_ia32_packuswb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v32i16_ty,llvm_v32i16_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packusdw_128 : GCCBuiltin<"__builtin_ia32_packusdw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packusdw_256 : GCCBuiltin<"__builtin_ia32_packusdw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_packusdw_512 : GCCBuiltin<"__builtin_ia32_packusdw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; -} - -// Vector convert -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_mask_cvtdq2pd_128 : - GCCBuiltin<"__builtin_ia32_cvtdq2pd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v4i32_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtdq2pd_256 : - GCCBuiltin<"__builtin_ia32_cvtdq2pd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtdq2pd_512 : - GCCBuiltin<"__builtin_ia32_cvtdq2pd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8i32_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtdq2ps_128 : - GCCBuiltin<"__builtin_ia32_cvtdq2ps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtdq2ps_256 : - GCCBuiltin<"__builtin_ia32_cvtdq2ps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtdq2ps_512 : - GCCBuiltin<"__builtin_ia32_cvtdq2ps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16i32_ty, llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2dq_128 : - GCCBuiltin<"__builtin_ia32_cvtpd2dq128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2f64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2dq_256 : - GCCBuiltin<"__builtin_ia32_cvtpd2dq256_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4f64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2dq_512 : - GCCBuiltin<"__builtin_ia32_cvtpd2dq512_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8f64_ty, llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2ps_256 : - GCCBuiltin<"__builtin_ia32_cvtpd2ps256_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2ps_512 : - GCCBuiltin<"__builtin_ia32_cvtpd2ps512_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f64_ty, llvm_v8f32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtsd2ss_round : - GCCBuiltin<"__builtin_ia32_cvtsd2ss_round_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v2f64_ty, llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtss2sd_round : - GCCBuiltin<"__builtin_ia32_cvtss2sd_round_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v4f32_ty, llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2ps : - GCCBuiltin<"__builtin_ia32_cvtpd2ps_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v2f64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2qq_128 : - GCCBuiltin<"__builtin_ia32_cvtpd2qq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2f64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2qq_256 : - GCCBuiltin<"__builtin_ia32_cvtpd2qq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4f64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2qq_512 : - GCCBuiltin<"__builtin_ia32_cvtpd2qq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8f64_ty, llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2udq_128 : - GCCBuiltin<"__builtin_ia32_cvtpd2udq128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2f64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2udq_256 : - GCCBuiltin<"__builtin_ia32_cvtpd2udq256_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4f64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2udq_512 : - GCCBuiltin<"__builtin_ia32_cvtpd2udq512_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8f64_ty, llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2uqq_128 : - GCCBuiltin<"__builtin_ia32_cvtpd2uqq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2f64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2uqq_256 : - GCCBuiltin<"__builtin_ia32_cvtpd2uqq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4f64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtpd2uqq_512 : - GCCBuiltin<"__builtin_ia32_cvtpd2uqq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8f64_ty, llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2dq_128 : - GCCBuiltin<"__builtin_ia32_cvtps2dq128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4f32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2dq_256 : - GCCBuiltin<"__builtin_ia32_cvtps2dq256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8f32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2dq_512 : - GCCBuiltin<"__builtin_ia32_cvtps2dq512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16f32_ty, llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2pd_128 : - GCCBuiltin<"__builtin_ia32_cvtps2pd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v4f32_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2pd_256 : - GCCBuiltin<"__builtin_ia32_cvtps2pd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2pd_512 : - GCCBuiltin<"__builtin_ia32_cvtps2pd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f32_ty, llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2qq_128 : - GCCBuiltin<"__builtin_ia32_cvtps2qq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v4f32_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2qq_256 : - GCCBuiltin<"__builtin_ia32_cvtps2qq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4f32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2qq_512 : - GCCBuiltin<"__builtin_ia32_cvtps2qq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8f32_ty, llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2udq_128 : - GCCBuiltin<"__builtin_ia32_cvtps2udq128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4f32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2udq_256 : - GCCBuiltin<"__builtin_ia32_cvtps2udq256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8f32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2udq_512 : - GCCBuiltin<"__builtin_ia32_cvtps2udq512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16f32_ty, llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2uqq_128 : - GCCBuiltin<"__builtin_ia32_cvtps2uqq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v4f32_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2uqq_256 : - GCCBuiltin<"__builtin_ia32_cvtps2uqq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4f32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtps2uqq_512 : - GCCBuiltin<"__builtin_ia32_cvtps2uqq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8f32_ty, llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtqq2pd_128 : - GCCBuiltin<"__builtin_ia32_cvtqq2pd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtqq2pd_256 : - GCCBuiltin<"__builtin_ia32_cvtqq2pd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtqq2pd_512 : - GCCBuiltin<"__builtin_ia32_cvtqq2pd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8i64_ty, llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtqq2ps_128 : - GCCBuiltin<"__builtin_ia32_cvtqq2ps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v2i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtqq2ps_256 : - GCCBuiltin<"__builtin_ia32_cvtqq2ps256_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtqq2ps_512 : - GCCBuiltin<"__builtin_ia32_cvtqq2ps512_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8i64_ty, llvm_v8f32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2dq_128 : - GCCBuiltin<"__builtin_ia32_cvttpd2dq128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2f64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2dq_256 : - GCCBuiltin<"__builtin_ia32_cvttpd2dq256_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4f64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2dq_512 : - GCCBuiltin<"__builtin_ia32_cvttpd2dq512_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8f64_ty, llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2qq_128 : - GCCBuiltin<"__builtin_ia32_cvttpd2qq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2f64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2qq_256 : - GCCBuiltin<"__builtin_ia32_cvttpd2qq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4f64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2qq_512 : - GCCBuiltin<"__builtin_ia32_cvttpd2qq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8f64_ty, llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2udq_128 : - GCCBuiltin<"__builtin_ia32_cvttpd2udq128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2f64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2udq_256 : - GCCBuiltin<"__builtin_ia32_cvttpd2udq256_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4f64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2udq_512 : - GCCBuiltin<"__builtin_ia32_cvttpd2udq512_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8f64_ty, llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2uqq_128 : - GCCBuiltin<"__builtin_ia32_cvttpd2uqq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2f64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2uqq_256 : - GCCBuiltin<"__builtin_ia32_cvttpd2uqq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4f64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttpd2uqq_512 : - GCCBuiltin<"__builtin_ia32_cvttpd2uqq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8f64_ty, llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2dq_128 : - GCCBuiltin<"__builtin_ia32_cvttps2dq128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4f32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2dq_256 : - GCCBuiltin<"__builtin_ia32_cvttps2dq256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8f32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2dq_512 : - GCCBuiltin<"__builtin_ia32_cvttps2dq512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16f32_ty, llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2qq_128 : - GCCBuiltin<"__builtin_ia32_cvttps2qq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v4f32_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2qq_256 : - GCCBuiltin<"__builtin_ia32_cvttps2qq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4f32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2qq_512 : - GCCBuiltin<"__builtin_ia32_cvttps2qq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8f32_ty, llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2udq_128 : - GCCBuiltin<"__builtin_ia32_cvttps2udq128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4f32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2udq_256 : - GCCBuiltin<"__builtin_ia32_cvttps2udq256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8f32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2udq_512 : - GCCBuiltin<"__builtin_ia32_cvttps2udq512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16f32_ty, llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2uqq_128 : - GCCBuiltin<"__builtin_ia32_cvttps2uqq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v4f32_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2uqq_256 : - GCCBuiltin<"__builtin_ia32_cvttps2uqq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4f32_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvttps2uqq_512 : - GCCBuiltin<"__builtin_ia32_cvttps2uqq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8f32_ty, llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtudq2pd_128 : - GCCBuiltin<"__builtin_ia32_cvtudq2pd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v4i32_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtudq2pd_256 : - GCCBuiltin<"__builtin_ia32_cvtudq2pd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtudq2pd_512 : - GCCBuiltin<"__builtin_ia32_cvtudq2pd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8i32_ty, llvm_v8f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtudq2ps_128 : - GCCBuiltin<"__builtin_ia32_cvtudq2ps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtudq2ps_256 : - GCCBuiltin<"__builtin_ia32_cvtudq2ps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtudq2ps_512 : - GCCBuiltin<"__builtin_ia32_cvtudq2ps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16i32_ty, llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtuqq2pd_128 : - GCCBuiltin<"__builtin_ia32_cvtuqq2pd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtuqq2pd_256 : - GCCBuiltin<"__builtin_ia32_cvtuqq2pd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtuqq2pd_512 : - GCCBuiltin<"__builtin_ia32_cvtuqq2pd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8i64_ty, llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtuqq2ps_128 : - GCCBuiltin<"__builtin_ia32_cvtuqq2ps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v2i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtuqq2ps_256 : - GCCBuiltin<"__builtin_ia32_cvtuqq2ps256_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4i64_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_cvtuqq2ps_512 : - GCCBuiltin<"__builtin_ia32_cvtuqq2ps512_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8i64_ty, llvm_v8f32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_rndscale_pd_128 : GCCBuiltin<"__builtin_ia32_rndscalepd_128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_i32_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_rndscale_pd_256 : GCCBuiltin<"__builtin_ia32_rndscalepd_256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_i32_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_rndscale_pd_512 : GCCBuiltin<"__builtin_ia32_rndscalepd_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_i32_ty, llvm_v8f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_rndscale_ps_128 : GCCBuiltin<"__builtin_ia32_rndscaleps_128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_rndscale_ps_256 : GCCBuiltin<"__builtin_ia32_rndscaleps_256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_i32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_rndscale_ps_512 : GCCBuiltin<"__builtin_ia32_rndscaleps_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_i32_ty, llvm_v16f32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_reduce_pd_128 : GCCBuiltin<"__builtin_ia32_reducepd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_i32_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_reduce_pd_256 : GCCBuiltin<"__builtin_ia32_reducepd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_i32_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_reduce_pd_512 : GCCBuiltin<"__builtin_ia32_reducepd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_i32_ty, llvm_v8f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_reduce_ps_128 : GCCBuiltin<"__builtin_ia32_reduceps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_i32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_reduce_ps_256 : GCCBuiltin<"__builtin_ia32_reduceps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_i32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_reduce_ps_512 : GCCBuiltin<"__builtin_ia32_reduceps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_i32_ty, llvm_v16f32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; -def int_x86_avx512_mask_range_pd_128 : GCCBuiltin<"__builtin_ia32_rangepd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_i32_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; -def int_x86_avx512_mask_range_pd_256 : GCCBuiltin<"__builtin_ia32_rangepd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, llvm_i32_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; -def int_x86_avx512_mask_range_pd_512 : GCCBuiltin<"__builtin_ia32_rangepd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, llvm_i32_ty, - llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; -def int_x86_avx512_mask_range_ps_128 : GCCBuiltin<"__builtin_ia32_rangeps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_i32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; -def int_x86_avx512_mask_range_ps_256 : GCCBuiltin<"__builtin_ia32_rangeps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, llvm_i32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; -def int_x86_avx512_mask_range_ps_512 : GCCBuiltin<"__builtin_ia32_rangeps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, llvm_i32_ty, - llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; -} - -// Vector load with broadcast -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_vbroadcast_ss_512 : - GCCBuiltin<"__builtin_ia32_vbroadcastss512">, - Intrinsic<[llvm_v16f32_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_vbroadcast_sd_512 : - GCCBuiltin<"__builtin_ia32_vbroadcastsd512">, - Intrinsic<[llvm_v8f64_ty], [llvm_ptr_ty], [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_mask_broadcastf32x2_256 : - GCCBuiltin<"__builtin_ia32_broadcastf32x2_256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v4f32_ty, llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcastf32x2_512 : - GCCBuiltin<"__builtin_ia32_broadcastf32x2_512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v4f32_ty, llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti32x2_128 : - GCCBuiltin<"__builtin_ia32_broadcasti32x2_128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti32x2_256 : - GCCBuiltin<"__builtin_ia32_broadcasti32x2_256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v4i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti32x2_512 : - GCCBuiltin<"__builtin_ia32_broadcasti32x2_512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v4i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcastf32x4_256 : - GCCBuiltin<"__builtin_ia32_broadcastf32x4_256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v4f32_ty, llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcastf32x4_512 : - GCCBuiltin<"__builtin_ia32_broadcastf32x4_512">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v4f32_ty, llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcastf32x8_512 : - GCCBuiltin<"__builtin_ia32_broadcastf32x8_512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v8f32_ty, llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcastf64x2_256 : - GCCBuiltin<"__builtin_ia32_broadcastf64x2_256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v2f64_ty, llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcastf64x2_512 : - GCCBuiltin<"__builtin_ia32_broadcastf64x2_512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v2f64_ty, llvm_v8f64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcastf64x4_512 : - GCCBuiltin<"__builtin_ia32_broadcastf64x4_512">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v4f64_ty, llvm_v8f64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti32x4_256 : - GCCBuiltin<"__builtin_ia32_broadcasti32x4_256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v4i32_ty, llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti32x4_512 : - GCCBuiltin<"__builtin_ia32_broadcasti32x4_512">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v4i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti32x8_512 : - GCCBuiltin<"__builtin_ia32_broadcasti32x8_512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v8i32_ty, llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti64x2_256 : - GCCBuiltin<"__builtin_ia32_broadcasti64x2_256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v2i64_ty, llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti64x2_512 : - GCCBuiltin<"__builtin_ia32_broadcasti64x2_512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v2i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_broadcasti64x4_512 : - GCCBuiltin<"__builtin_ia32_broadcasti64x4_512">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v4i64_ty, llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_broadcastmw_512 : - GCCBuiltin<"__builtin_ia32_broadcastmw512">, - Intrinsic<[llvm_v16i32_ty], [llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_broadcastmw_256 : - GCCBuiltin<"__builtin_ia32_broadcastmw256">, - Intrinsic<[llvm_v8i32_ty], [llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_broadcastmw_128 : - GCCBuiltin<"__builtin_ia32_broadcastmw128">, - Intrinsic<[llvm_v4i32_ty], [llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_broadcastmb_512 : - GCCBuiltin<"__builtin_ia32_broadcastmb512">, - Intrinsic<[llvm_v8i64_ty], [llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_broadcastmb_256 : - GCCBuiltin<"__builtin_ia32_broadcastmb256">, - Intrinsic<[llvm_v4i64_ty], [llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_broadcastmb_128 : - GCCBuiltin<"__builtin_ia32_broadcastmb128">, - Intrinsic<[llvm_v2i64_ty], [llvm_i8_ty], [IntrNoMem]>; -} - -// Vector sign and zero extend -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - def int_x86_avx512_pmovzxbq : GCCBuiltin<"__builtin_ia32_pmovzxbq512">, - Intrinsic<[llvm_v8i64_ty], [llvm_v16i8_ty], - [IntrNoMem]>; - def int_x86_avx512_pmovzxwd : GCCBuiltin<"__builtin_ia32_pmovzxwd512">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i16_ty], - [IntrNoMem]>; - def int_x86_avx512_pmovzxbd : GCCBuiltin<"__builtin_ia32_pmovzxbd512">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i8_ty], - [IntrNoMem]>; - def int_x86_avx512_pmovzxwq : GCCBuiltin<"__builtin_ia32_pmovzxwq512">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i16_ty], - [IntrNoMem]>; - def int_x86_avx512_pmovzxdq : GCCBuiltin<"__builtin_ia32_pmovzxdq512">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_pmovzxb_d_128 : GCCBuiltin<"__builtin_ia32_pmovzxbd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v16i8_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxb_d_256 : GCCBuiltin<"__builtin_ia32_pmovzxbd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v16i8_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxb_d_512 : GCCBuiltin<"__builtin_ia32_pmovzxbd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i8_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxb_q_128 : GCCBuiltin<"__builtin_ia32_pmovzxbq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v16i8_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxb_q_256 : GCCBuiltin<"__builtin_ia32_pmovzxbq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v16i8_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxb_q_512 : GCCBuiltin<"__builtin_ia32_pmovzxbq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v16i8_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxb_w_128 : GCCBuiltin<"__builtin_ia32_pmovzxbw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v16i8_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxb_w_256 : GCCBuiltin<"__builtin_ia32_pmovzxbw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i8_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxb_w_512 : GCCBuiltin<"__builtin_ia32_pmovzxbw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i8_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxd_q_128 : GCCBuiltin<"__builtin_ia32_pmovzxdq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxd_q_256 : GCCBuiltin<"__builtin_ia32_pmovzxdq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i32_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxd_q_512 : GCCBuiltin<"__builtin_ia32_pmovzxdq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i32_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxw_d_128 : GCCBuiltin<"__builtin_ia32_pmovzxwd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v8i16_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxw_d_256 : GCCBuiltin<"__builtin_ia32_pmovzxwd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i16_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxw_d_512 : GCCBuiltin<"__builtin_ia32_pmovzxwd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i16_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxw_q_128 : GCCBuiltin<"__builtin_ia32_pmovzxwq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v8i16_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxw_q_256 : GCCBuiltin<"__builtin_ia32_pmovzxwq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v8i16_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmovzxw_q_512 : GCCBuiltin<"__builtin_ia32_pmovzxwq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i16_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - -} - -// Arithmetic ops -let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". - - def int_x86_avx512_mask_add_ps_128 : GCCBuiltin<"__builtin_ia32_addps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_add_ps_256 : GCCBuiltin<"__builtin_ia32_addps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_add_ps_512 : GCCBuiltin<"__builtin_ia32_addps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_add_pd_128 : GCCBuiltin<"__builtin_ia32_addpd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_add_pd_256 : GCCBuiltin<"__builtin_ia32_addpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_add_pd_512 : GCCBuiltin<"__builtin_ia32_addpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sub_ps_128 : GCCBuiltin<"__builtin_ia32_subps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sub_ps_256 : GCCBuiltin<"__builtin_ia32_subps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sub_ps_512 : GCCBuiltin<"__builtin_ia32_subps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sub_pd_128 : GCCBuiltin<"__builtin_ia32_subpd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sub_pd_256 : GCCBuiltin<"__builtin_ia32_subpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sub_pd_512 : GCCBuiltin<"__builtin_ia32_subpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_mul_ps_128 : GCCBuiltin<"__builtin_ia32_mulps_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_mul_ps_256 : GCCBuiltin<"__builtin_ia32_mulps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_mul_ps_512 : GCCBuiltin<"__builtin_ia32_mulps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_mul_pd_128 : GCCBuiltin<"__builtin_ia32_mulpd_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_mul_pd_256 : GCCBuiltin<"__builtin_ia32_mulpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_mul_pd_512 : GCCBuiltin<"__builtin_ia32_mulpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_div_ps_128 : GCCBuiltin<"__builtin_ia32_divps_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_div_ps_256 : GCCBuiltin<"__builtin_ia32_divps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_div_ps_512 : GCCBuiltin<"__builtin_ia32_divps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_div_pd_128 : GCCBuiltin<"__builtin_ia32_divpd_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_div_pd_256 : GCCBuiltin<"__builtin_ia32_divpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_div_pd_512 : GCCBuiltin<"__builtin_ia32_divpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_max_ps_128 : GCCBuiltin<"__builtin_ia32_maxps_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_max_ps_256 : GCCBuiltin<"__builtin_ia32_maxps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_max_ps_512 : GCCBuiltin<"__builtin_ia32_maxps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_max_pd_128 : GCCBuiltin<"__builtin_ia32_maxpd_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_max_pd_256 : GCCBuiltin<"__builtin_ia32_maxpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_max_pd_512 : GCCBuiltin<"__builtin_ia32_maxpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_min_ps_128 : GCCBuiltin<"__builtin_ia32_minps_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_min_ps_256 : GCCBuiltin<"__builtin_ia32_minps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_min_ps_512 : GCCBuiltin<"__builtin_ia32_minps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_min_pd_128 : GCCBuiltin<"__builtin_ia32_minpd_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_min_pd_256 : GCCBuiltin<"__builtin_ia32_minpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_min_pd_512 : GCCBuiltin<"__builtin_ia32_minpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_add_ss_round : GCCBuiltin<"__builtin_ia32_addss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_div_ss_round : GCCBuiltin<"__builtin_ia32_divss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_mul_ss_round : GCCBuiltin<"__builtin_ia32_mulss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sub_ss_round : GCCBuiltin<"__builtin_ia32_subss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_max_ss_round : GCCBuiltin<"__builtin_ia32_maxss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_min_ss_round : GCCBuiltin<"__builtin_ia32_minss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_add_sd_round : GCCBuiltin<"__builtin_ia32_addsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_div_sd_round : GCCBuiltin<"__builtin_ia32_divsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_mul_sd_round : GCCBuiltin<"__builtin_ia32_mulsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sub_sd_round : GCCBuiltin<"__builtin_ia32_subsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_max_sd_round : GCCBuiltin<"__builtin_ia32_maxsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_min_sd_round : GCCBuiltin<"__builtin_ia32_minsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_rndscale_ss : GCCBuiltin<"__builtin_ia32_rndscaless_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_rndscale_sd : GCCBuiltin<"__builtin_ia32_rndscalesd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_range_ss : GCCBuiltin<"__builtin_ia32_rangess128_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_range_sd : GCCBuiltin<"__builtin_ia32_rangesd128_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_reduce_ss : GCCBuiltin<"__builtin_ia32_reducess_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_reduce_sd : GCCBuiltin<"__builtin_ia32_reducesd_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty, llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_scalef_sd : GCCBuiltin<"__builtin_ia32_scalefsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_scalef_ss : GCCBuiltin<"__builtin_ia32_scalefss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_scalef_pd_128 : GCCBuiltin<"__builtin_ia32_scalefpd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_scalef_pd_256 : GCCBuiltin<"__builtin_ia32_scalefpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty],[IntrNoMem]>; - def int_x86_avx512_mask_scalef_pd_512 : GCCBuiltin<"__builtin_ia32_scalefpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_scalef_ps_128 : GCCBuiltin<"__builtin_ia32_scalefps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_scalef_ps_256 : GCCBuiltin<"__builtin_ia32_scalefps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_scalef_ps_512 : GCCBuiltin<"__builtin_ia32_scalefps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_sqrt_ss : GCCBuiltin<"__builtin_ia32_sqrtss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sqrt_sd : GCCBuiltin<"__builtin_ia32_sqrtsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_sqrt_pd_128 : GCCBuiltin<"__builtin_ia32_sqrtpd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sqrt_pd_256 : GCCBuiltin<"__builtin_ia32_sqrtpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sqrt_pd_512 : GCCBuiltin<"__builtin_ia32_sqrtpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sqrt_ps_128 : GCCBuiltin<"__builtin_ia32_sqrtps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sqrt_ps_256 : GCCBuiltin<"__builtin_ia32_sqrtps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_sqrt_ps_512 : GCCBuiltin<"__builtin_ia32_sqrtps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_fixupimm_pd_128 : - GCCBuiltin<"__builtin_ia32_fixupimmpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2i64_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_maskz_fixupimm_pd_128 : - GCCBuiltin<"__builtin_ia32_fixupimmpd128_maskz">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2i64_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fixupimm_pd_256 : - GCCBuiltin<"__builtin_ia32_fixupimmpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4i64_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_maskz_fixupimm_pd_256 : - GCCBuiltin<"__builtin_ia32_fixupimmpd256_maskz">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_v4f64_ty, llvm_v4i64_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fixupimm_pd_512 : - GCCBuiltin<"__builtin_ia32_fixupimmpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8i64_ty, llvm_i32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_fixupimm_pd_512 : - GCCBuiltin<"__builtin_ia32_fixupimmpd512_maskz">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty, llvm_v8f64_ty, llvm_v8i64_ty, llvm_i32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_fixupimm_ps_128 : - GCCBuiltin<"__builtin_ia32_fixupimmps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4i32_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_maskz_fixupimm_ps_128 : - GCCBuiltin<"__builtin_ia32_fixupimmps128_maskz">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4i32_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fixupimm_ps_256 : - GCCBuiltin<"__builtin_ia32_fixupimmps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8i32_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_maskz_fixupimm_ps_256 : - GCCBuiltin<"__builtin_ia32_fixupimmps256_maskz">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_v8f32_ty, llvm_v8i32_ty, llvm_i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_fixupimm_ps_512 : - GCCBuiltin<"__builtin_ia32_fixupimmps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_fixupimm_ps_512 : - GCCBuiltin<"__builtin_ia32_fixupimmps512_maskz">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty, llvm_v16f32_ty, llvm_v16i32_ty, llvm_i32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_fixupimm_sd : - GCCBuiltin<"__builtin_ia32_fixupimmsd_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2i64_ty, llvm_i32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_fixupimm_sd : - GCCBuiltin<"__builtin_ia32_fixupimmsd_maskz">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2i64_ty, llvm_i32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_fixupimm_ss : - GCCBuiltin<"__builtin_ia32_fixupimmss_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4i32_ty, llvm_i32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_maskz_fixupimm_ss : - GCCBuiltin<"__builtin_ia32_fixupimmss_maskz">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4i32_ty, llvm_i32_ty, llvm_i8_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_getexp_pd_128 : GCCBuiltin<"__builtin_ia32_getexppd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_getexp_pd_256 : GCCBuiltin<"__builtin_ia32_getexppd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_getexp_pd_512 : GCCBuiltin<"__builtin_ia32_getexppd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_getexp_ps_128 : GCCBuiltin<"__builtin_ia32_getexpps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_getexp_ps_256 : GCCBuiltin<"__builtin_ia32_getexpps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_getexp_ps_512 : GCCBuiltin<"__builtin_ia32_getexpps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_getexp_ss : GCCBuiltin<"__builtin_ia32_getexpss128_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_getexp_sd : GCCBuiltin<"__builtin_ia32_getexpsd128_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_getmant_pd_128 : - GCCBuiltin<"__builtin_ia32_getmantpd128_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty,llvm_i32_ty, llvm_v2f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_getmant_pd_256 : - GCCBuiltin<"__builtin_ia32_getmantpd256_mask">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty,llvm_i32_ty, llvm_v4f64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_getmant_pd_512 : - GCCBuiltin<"__builtin_ia32_getmantpd512_mask">, - Intrinsic<[llvm_v8f64_ty], - [llvm_v8f64_ty,llvm_i32_ty, llvm_v8f64_ty, llvm_i8_ty,llvm_i32_ty ], - [IntrNoMem]>; - - def int_x86_avx512_mask_getmant_ps_128 : - GCCBuiltin<"__builtin_ia32_getmantps128_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_i32_ty, llvm_v4f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_getmant_ps_256 : - GCCBuiltin<"__builtin_ia32_getmantps256_mask">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_i32_ty, llvm_v8f32_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_getmant_ps_512 : - GCCBuiltin<"__builtin_ia32_getmantps512_mask">, - Intrinsic<[llvm_v16f32_ty], - [llvm_v16f32_ty,llvm_i32_ty, llvm_v16f32_ty,llvm_i16_ty,llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_getmant_ss : - GCCBuiltin<"__builtin_ia32_getmantss_round_mask">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_v4f32_ty, llvm_i32_ty, llvm_v4f32_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_getmant_sd : - GCCBuiltin<"__builtin_ia32_getmantsd_round_mask">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_v2f64_ty, llvm_i32_ty, llvm_v2f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_rsqrt14_ss : GCCBuiltin<"__builtin_ia32_rsqrt14ss_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rsqrt14_sd : GCCBuiltin<"__builtin_ia32_rsqrt14sd_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_rsqrt14_pd_128 : GCCBuiltin<"__builtin_ia32_rsqrt14pd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rsqrt14_pd_256 : GCCBuiltin<"__builtin_ia32_rsqrt14pd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rsqrt14_pd_512 : GCCBuiltin<"__builtin_ia32_rsqrt14pd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rsqrt14_ps_128 : GCCBuiltin<"__builtin_ia32_rsqrt14ps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rsqrt14_ps_256 : GCCBuiltin<"__builtin_ia32_rsqrt14ps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rsqrt14_ps_512 : GCCBuiltin<"__builtin_ia32_rsqrt14ps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_rcp14_ss : GCCBuiltin<"__builtin_ia32_rcp14ss_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rcp14_sd : GCCBuiltin<"__builtin_ia32_rcp14sd_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_rcp14_pd_128 : GCCBuiltin<"__builtin_ia32_rcp14pd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rcp14_pd_256 : GCCBuiltin<"__builtin_ia32_rcp14pd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rcp14_pd_512 : GCCBuiltin<"__builtin_ia32_rcp14pd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rcp14_ps_128 : GCCBuiltin<"__builtin_ia32_rcp14ps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rcp14_ps_256 : GCCBuiltin<"__builtin_ia32_rcp14ps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_rcp14_ps_512 : GCCBuiltin<"__builtin_ia32_rcp14ps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_rcp28_ps : GCCBuiltin<"__builtin_ia32_rcp28ps_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_rcp28_pd : GCCBuiltin<"__builtin_ia32_rcp28pd_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_exp2_ps : GCCBuiltin<"__builtin_ia32_exp2ps_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_exp2_pd : GCCBuiltin<"__builtin_ia32_exp2pd_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_rcp28_ss : GCCBuiltin<"__builtin_ia32_rcp28ss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_rcp28_sd : GCCBuiltin<"__builtin_ia32_rcp28sd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_rsqrt28_ps : GCCBuiltin<"__builtin_ia32_rsqrt28ps_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_rsqrt28_pd : GCCBuiltin<"__builtin_ia32_rsqrt28pd_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_rsqrt28_ss : GCCBuiltin<"__builtin_ia32_rsqrt28ss_round_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_rsqrt28_sd : GCCBuiltin<"__builtin_ia32_rsqrt28sd_round_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrNoMem]>; -def int_x86_avx512_psad_bw_512 : GCCBuiltin<"__builtin_ia32_psadbw512">, - Intrinsic<[llvm_v8i64_ty], [llvm_v64i8_ty, llvm_v64i8_ty], - [IntrNoMem]>; -} -// FP logical ops -let TargetPrefix = "x86" in { - def int_x86_avx512_mask_and_pd_128 : GCCBuiltin<"__builtin_ia32_andpd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_and_pd_256 : GCCBuiltin<"__builtin_ia32_andpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_and_pd_512 : GCCBuiltin<"__builtin_ia32_andpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_and_ps_128 : GCCBuiltin<"__builtin_ia32_andps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_and_ps_256 : GCCBuiltin<"__builtin_ia32_andps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_and_ps_512 : GCCBuiltin<"__builtin_ia32_andps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_andn_pd_128 : GCCBuiltin<"__builtin_ia32_andnpd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_andn_pd_256 : GCCBuiltin<"__builtin_ia32_andnpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_andn_pd_512 : GCCBuiltin<"__builtin_ia32_andnpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_andn_ps_128 : GCCBuiltin<"__builtin_ia32_andnps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_andn_ps_256 : GCCBuiltin<"__builtin_ia32_andnps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_andn_ps_512 : GCCBuiltin<"__builtin_ia32_andnps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_or_pd_128 : GCCBuiltin<"__builtin_ia32_orpd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_or_pd_256 : GCCBuiltin<"__builtin_ia32_orpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_or_pd_512 : GCCBuiltin<"__builtin_ia32_orpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_or_ps_128 : GCCBuiltin<"__builtin_ia32_orps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_or_ps_256 : GCCBuiltin<"__builtin_ia32_orps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_or_ps_512 : GCCBuiltin<"__builtin_ia32_orps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_xor_pd_128 : GCCBuiltin<"__builtin_ia32_xorpd128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_xor_pd_256 : GCCBuiltin<"__builtin_ia32_xorpd256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_v4f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_xor_pd_512 : GCCBuiltin<"__builtin_ia32_xorpd512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_v8f64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_xor_ps_128 : GCCBuiltin<"__builtin_ia32_xorps128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_xor_ps_256 : GCCBuiltin<"__builtin_ia32_xorps256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_v8f32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_xor_ps_512 : GCCBuiltin<"__builtin_ia32_xorps512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_v16f32_ty, llvm_i16_ty], [IntrNoMem]>; -} -// Integer arithmetic ops -let TargetPrefix = "x86" in { - def int_x86_avx512_mask_padd_b_128 : GCCBuiltin<"__builtin_ia32_paddb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_b_256 : GCCBuiltin<"__builtin_ia32_paddb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_b_512 : GCCBuiltin<"__builtin_ia32_paddb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_w_128 : GCCBuiltin<"__builtin_ia32_paddw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_w_256 : GCCBuiltin<"__builtin_ia32_paddw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_w_512 : GCCBuiltin<"__builtin_ia32_paddw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padds_b_128 : GCCBuiltin<"__builtin_ia32_paddsb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padds_b_256 : GCCBuiltin<"__builtin_ia32_paddsb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padds_b_512 : GCCBuiltin<"__builtin_ia32_paddsb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padds_w_128 : GCCBuiltin<"__builtin_ia32_paddsw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padds_w_256 : GCCBuiltin<"__builtin_ia32_paddsw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padds_w_512 : GCCBuiltin<"__builtin_ia32_paddsw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_paddus_b_128 : GCCBuiltin<"__builtin_ia32_paddusb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_paddus_b_256 : GCCBuiltin<"__builtin_ia32_paddusb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_paddus_b_512 : GCCBuiltin<"__builtin_ia32_paddusb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_paddus_w_128 : GCCBuiltin<"__builtin_ia32_paddusw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_paddus_w_256 : GCCBuiltin<"__builtin_ia32_paddusw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_paddus_w_512 : GCCBuiltin<"__builtin_ia32_paddusw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_d_128 : GCCBuiltin<"__builtin_ia32_paddd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_d_256 : GCCBuiltin<"__builtin_ia32_paddd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_d_512 : GCCBuiltin<"__builtin_ia32_paddd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_q_128 : GCCBuiltin<"__builtin_ia32_paddq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_q_256 : GCCBuiltin<"__builtin_ia32_paddq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_padd_q_512 : GCCBuiltin<"__builtin_ia32_paddq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_b_128 : GCCBuiltin<"__builtin_ia32_psubb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_b_256 : GCCBuiltin<"__builtin_ia32_psubb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_b_512 : GCCBuiltin<"__builtin_ia32_psubb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_w_128 : GCCBuiltin<"__builtin_ia32_psubw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_w_256 : GCCBuiltin<"__builtin_ia32_psubw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_w_512 : GCCBuiltin<"__builtin_ia32_psubw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubs_b_128 : GCCBuiltin<"__builtin_ia32_psubsb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubs_b_256 : GCCBuiltin<"__builtin_ia32_psubsb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubs_b_512 : GCCBuiltin<"__builtin_ia32_psubsb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubs_w_128 : GCCBuiltin<"__builtin_ia32_psubsw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubs_w_256 : GCCBuiltin<"__builtin_ia32_psubsw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubs_w_512 : GCCBuiltin<"__builtin_ia32_psubsw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubus_b_128 : GCCBuiltin<"__builtin_ia32_psubusb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubus_b_256 : GCCBuiltin<"__builtin_ia32_psubusb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubus_b_512 : GCCBuiltin<"__builtin_ia32_psubusb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubus_w_128 : GCCBuiltin<"__builtin_ia32_psubusw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubus_w_256 : GCCBuiltin<"__builtin_ia32_psubusw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psubus_w_512 : GCCBuiltin<"__builtin_ia32_psubusw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_d_128 : GCCBuiltin<"__builtin_ia32_psubd128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_d_256 : GCCBuiltin<"__builtin_ia32_psubd256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_d_512 : GCCBuiltin<"__builtin_ia32_psubd512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_q_128 : GCCBuiltin<"__builtin_ia32_psubq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_q_256 : GCCBuiltin<"__builtin_ia32_psubq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_psub_q_512 : GCCBuiltin<"__builtin_ia32_psubq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulu_dq_128 : GCCBuiltin<"__builtin_ia32_pmuludq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmul_dq_128 : GCCBuiltin<"__builtin_ia32_pmuldq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulu_dq_256 : GCCBuiltin<"__builtin_ia32_pmuludq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmul_dq_256 : GCCBuiltin<"__builtin_ia32_pmuldq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulu_dq_512 : GCCBuiltin<"__builtin_ia32_pmuludq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmul_dq_512 : GCCBuiltin<"__builtin_ia32_pmuldq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_w_128 : GCCBuiltin<"__builtin_ia32_pmullw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_w_256 : GCCBuiltin<"__builtin_ia32_pmullw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_w_512 : GCCBuiltin<"__builtin_ia32_pmullw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_d_128 : GCCBuiltin<"__builtin_ia32_pmulld128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_v4i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_d_256 : GCCBuiltin<"__builtin_ia32_pmulld256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_v8i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_d_512 : GCCBuiltin<"__builtin_ia32_pmulld512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_v16i32_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_q_128 : GCCBuiltin<"__builtin_ia32_pmullq128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_v2i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_q_256 : GCCBuiltin<"__builtin_ia32_pmullq256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_v4i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmull_q_512 : GCCBuiltin<"__builtin_ia32_pmullq512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_v8i64_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulhu_w_512 : GCCBuiltin<"__builtin_ia32_pmulhuw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulh_w_512 : GCCBuiltin<"__builtin_ia32_pmulhw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulhu_w_128 : GCCBuiltin<"__builtin_ia32_pmulhuw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulhu_w_256 : GCCBuiltin<"__builtin_ia32_pmulhuw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulh_w_128 : GCCBuiltin<"__builtin_ia32_pmulhw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmulh_w_256 : GCCBuiltin<"__builtin_ia32_pmulhw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pavg_b_512 : GCCBuiltin<"__builtin_ia32_pavgb512_mask">, - Intrinsic<[llvm_v64i8_ty], [llvm_v64i8_ty, llvm_v64i8_ty, - llvm_v64i8_ty, llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pavg_w_512 : GCCBuiltin<"__builtin_ia32_pavgw512_mask">, - Intrinsic<[llvm_v32i16_ty], [llvm_v32i16_ty, llvm_v32i16_ty, - llvm_v32i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pavg_b_128 : GCCBuiltin<"__builtin_ia32_pavgb128_mask">, - Intrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_v16i8_ty, - llvm_v16i8_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pavg_b_256 : GCCBuiltin<"__builtin_ia32_pavgb256_mask">, - Intrinsic<[llvm_v32i8_ty], [llvm_v32i8_ty, llvm_v32i8_ty, - llvm_v32i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pavg_w_128 : GCCBuiltin<"__builtin_ia32_pavgw128_mask">, - Intrinsic<[llvm_v8i16_ty], [llvm_v8i16_ty, llvm_v8i16_ty, - llvm_v8i16_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pavg_w_256 : GCCBuiltin<"__builtin_ia32_pavgw256_mask">, - Intrinsic<[llvm_v16i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, - llvm_v16i16_ty, llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_pmaddw_d_128 : - GCCBuiltin<"__builtin_ia32_pmaddwd128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v8i16_ty, llvm_v8i16_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmaddw_d_256 : - GCCBuiltin<"__builtin_ia32_pmaddwd256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v16i16_ty, llvm_v16i16_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmaddw_d_512 : - GCCBuiltin<"__builtin_ia32_pmaddwd512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v32i16_ty, llvm_v32i16_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmaddubs_w_128 : - GCCBuiltin<"__builtin_ia32_pmaddubsw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmaddubs_w_256 : - GCCBuiltin<"__builtin_ia32_pmaddubsw256_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v32i8_ty, llvm_v32i8_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmaddubs_w_512 : - GCCBuiltin<"__builtin_ia32_pmaddubsw512_mask">, - Intrinsic<[llvm_v32i16_ty], - [llvm_v64i8_ty, llvm_v64i8_ty, llvm_v32i16_ty, llvm_i32_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_dbpsadbw_128 : - GCCBuiltin<"__builtin_ia32_dbpsadbw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty, llvm_v8i16_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_dbpsadbw_256 : - GCCBuiltin<"__builtin_ia32_dbpsadbw256_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty, llvm_v16i16_ty, - llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_dbpsadbw_512 : - GCCBuiltin<"__builtin_ia32_dbpsadbw512_mask">, - Intrinsic<[llvm_v32i16_ty], - [llvm_v64i8_ty, llvm_v64i8_ty, llvm_i32_ty, llvm_v32i16_ty, - llvm_i32_ty], [IntrNoMem]>; -} - -// Gather and Scatter ops -let TargetPrefix = "x86" in { - def int_x86_avx512_gather_dpd_512 : GCCBuiltin<"__builtin_ia32_gathersiv8df">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_ptr_ty, - llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_gather_dps_512 : GCCBuiltin<"__builtin_ia32_gathersiv16sf">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_ptr_ty, - llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_gather_qpd_512 : GCCBuiltin<"__builtin_ia32_gatherdiv8df">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_ptr_ty, - llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_gather_qps_512 : GCCBuiltin<"__builtin_ia32_gatherdiv16sf">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_ptr_ty, - llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - - def int_x86_avx512_gather_dpq_512 : GCCBuiltin<"__builtin_ia32_gathersiv8di">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_ptr_ty, - llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_gather_dpi_512 : GCCBuiltin<"__builtin_ia32_gathersiv16si">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_ptr_ty, - llvm_v16i32_ty, llvm_i16_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_gather_qpq_512 : GCCBuiltin<"__builtin_ia32_gatherdiv8di">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_ptr_ty, - llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_gather_qpi_512 : GCCBuiltin<"__builtin_ia32_gatherdiv16si">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_ptr_ty, - llvm_v8i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3div2_df : - GCCBuiltin<"__builtin_ia32_gather3div2df">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3div2_di : - GCCBuiltin<"__builtin_ia32_gather3div2di">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2i64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3div4_df : - GCCBuiltin<"__builtin_ia32_gather3div4df">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3div4_di : - GCCBuiltin<"__builtin_ia32_gather3div4di">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3div4_sf : - GCCBuiltin<"__builtin_ia32_gather3div4sf">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3div4_si : - GCCBuiltin<"__builtin_ia32_gather3div4si">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3div8_sf : - GCCBuiltin<"__builtin_ia32_gather3div8sf">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3div8_si : - GCCBuiltin<"__builtin_ia32_gather3div8si">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3siv2_df : - GCCBuiltin<"__builtin_ia32_gather3siv2df">, - Intrinsic<[llvm_v2f64_ty], - [llvm_v2f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3siv2_di : - GCCBuiltin<"__builtin_ia32_gather3siv2di">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3siv4_df : - GCCBuiltin<"__builtin_ia32_gather3siv4df">, - Intrinsic<[llvm_v4f64_ty], - [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3siv4_di : - GCCBuiltin<"__builtin_ia32_gather3siv4di">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3siv4_sf : - GCCBuiltin<"__builtin_ia32_gather3siv4sf">, - Intrinsic<[llvm_v4f32_ty], - [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3siv4_si : - GCCBuiltin<"__builtin_ia32_gather3siv4si">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3siv8_sf : - GCCBuiltin<"__builtin_ia32_gather3siv8sf">, - Intrinsic<[llvm_v8f32_ty], - [llvm_v8f32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_gather3siv8_si : - GCCBuiltin<"__builtin_ia32_gather3siv8si">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty, llvm_i32_ty], - [IntrReadMem, IntrArgMemOnly]>; - -// scatter - def int_x86_avx512_scatter_dpd_512 : GCCBuiltin<"__builtin_ia32_scattersiv8df">, - Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty, - llvm_v8i32_ty, llvm_v8f64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_scatter_dps_512 : GCCBuiltin<"__builtin_ia32_scattersiv16sf">, - Intrinsic<[], [llvm_ptr_ty, llvm_i16_ty, - llvm_v16i32_ty, llvm_v16f32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_scatter_qpd_512 : GCCBuiltin<"__builtin_ia32_scatterdiv8df">, - Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty, - llvm_v8i64_ty, llvm_v8f64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_scatter_qps_512 : GCCBuiltin<"__builtin_ia32_scatterdiv16sf">, - Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty, - llvm_v8i64_ty, llvm_v8f32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - - def int_x86_avx512_scatter_dpq_512 : GCCBuiltin<"__builtin_ia32_scattersiv8di">, - Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty, - llvm_v8i32_ty, llvm_v8i64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_scatter_dpi_512 : GCCBuiltin<"__builtin_ia32_scattersiv16si">, - Intrinsic<[], [llvm_ptr_ty, llvm_i16_ty, - llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_scatter_qpq_512 : GCCBuiltin<"__builtin_ia32_scatterdiv8di">, - Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty,llvm_v8i64_ty, llvm_v8i64_ty, - llvm_i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_scatter_qpi_512 : GCCBuiltin<"__builtin_ia32_scatterdiv16si">, - Intrinsic<[], [llvm_ptr_ty, llvm_i8_ty, llvm_v8i64_ty, llvm_v8i32_ty, - llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scatterdiv2_df : - GCCBuiltin<"__builtin_ia32_scatterdiv2df">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scatterdiv2_di : - GCCBuiltin<"__builtin_ia32_scatterdiv2di">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scatterdiv4_df : - GCCBuiltin<"__builtin_ia32_scatterdiv4df">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scatterdiv4_di : - GCCBuiltin<"__builtin_ia32_scatterdiv4di">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scatterdiv4_sf : - GCCBuiltin<"__builtin_ia32_scatterdiv4sf">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v2i64_ty, llvm_v4f32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scatterdiv4_si : - GCCBuiltin<"__builtin_ia32_scatterdiv4si">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v2i64_ty, llvm_v4i32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scatterdiv8_sf : - GCCBuiltin<"__builtin_ia32_scatterdiv8sf">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i64_ty, llvm_v4f32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scatterdiv8_si : - GCCBuiltin<"__builtin_ia32_scatterdiv8si">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i64_ty, llvm_v4i32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scattersiv2_df : - GCCBuiltin<"__builtin_ia32_scattersiv2df">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v2f64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scattersiv2_di : - GCCBuiltin<"__builtin_ia32_scattersiv2di">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v2i64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scattersiv4_df : - GCCBuiltin<"__builtin_ia32_scattersiv4df">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v4f64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scattersiv4_di : - GCCBuiltin<"__builtin_ia32_scattersiv4di">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v4i64_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scattersiv4_sf : - GCCBuiltin<"__builtin_ia32_scattersiv4sf">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scattersiv4_si : - GCCBuiltin<"__builtin_ia32_scattersiv4si">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scattersiv8_sf : - GCCBuiltin<"__builtin_ia32_scattersiv8sf">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - def int_x86_avx512_scattersiv8_si : - GCCBuiltin<"__builtin_ia32_scattersiv8si">, - Intrinsic<[], - [llvm_ptr_ty, llvm_i8_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - - // gather prefetch - def int_x86_avx512_gatherpf_dpd_512 : GCCBuiltin<"__builtin_ia32_gatherpfdpd">, - Intrinsic<[], [llvm_i8_ty, llvm_v8i32_ty, llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>; - def int_x86_avx512_gatherpf_dps_512 : GCCBuiltin<"__builtin_ia32_gatherpfdps">, - Intrinsic<[], [llvm_i16_ty, llvm_v16i32_ty, llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>; - def int_x86_avx512_gatherpf_qpd_512 : GCCBuiltin<"__builtin_ia32_gatherpfqpd">, - Intrinsic<[], [llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>; - def int_x86_avx512_gatherpf_qps_512 : GCCBuiltin<"__builtin_ia32_gatherpfqps">, - Intrinsic<[], [llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>; - - // scatter prefetch - def int_x86_avx512_scatterpf_dpd_512 : GCCBuiltin<"__builtin_ia32_scatterpfdpd">, - Intrinsic<[], [llvm_i8_ty, llvm_v8i32_ty, llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>; - def int_x86_avx512_scatterpf_dps_512 : GCCBuiltin<"__builtin_ia32_scatterpfdps">, - Intrinsic<[], [llvm_i16_ty, llvm_v16i32_ty, llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>; - def int_x86_avx512_scatterpf_qpd_512 : GCCBuiltin<"__builtin_ia32_scatterpfqpd">, - Intrinsic<[], [llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>; - def int_x86_avx512_scatterpf_qps_512 : GCCBuiltin<"__builtin_ia32_scatterpfqps">, - Intrinsic<[], [llvm_i8_ty, llvm_v8i64_ty, llvm_ptr_ty, - llvm_i32_ty, llvm_i32_ty], [IntrArgMemOnly]>; -} - -// AVX-512 conflict detection instruction -// Instructions that count the number of leading zero bits -let TargetPrefix = "x86" in { - def int_x86_avx512_mask_conflict_d_128 : - GCCBuiltin<"__builtin_ia32_vpconflictsi_128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_conflict_d_256 : - GCCBuiltin<"__builtin_ia32_vpconflictsi_256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_conflict_d_512 : - GCCBuiltin<"__builtin_ia32_vpconflictsi_512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_conflict_q_128 : - GCCBuiltin<"__builtin_ia32_vpconflictdi_128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_conflict_q_256 : - GCCBuiltin<"__builtin_ia32_vpconflictdi_256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_conflict_q_512 : - GCCBuiltin<"__builtin_ia32_vpconflictdi_512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_lzcnt_d_128 : - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_lzcnt_d_256 : - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_lzcnt_d_512 : - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrNoMem]>; - - def int_x86_avx512_mask_lzcnt_q_128 : - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_lzcnt_q_256 : - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_lzcnt_q_512 : - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrNoMem]>; -} - -let TargetPrefix = "x86" in { - def int_x86_avx512_mask_valign_q_512 : - GCCBuiltin<"__builtin_ia32_alignq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_i32_ty, llvm_v8i64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_valign_d_512 : - GCCBuiltin<"__builtin_ia32_alignd512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty, llvm_v16i32_ty, - llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_valign_q_256 : - GCCBuiltin<"__builtin_ia32_alignq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty, llvm_v4i64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_valign_d_256 : - GCCBuiltin<"__builtin_ia32_alignd256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty, llvm_v8i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_valign_q_128 : - GCCBuiltin<"__builtin_ia32_alignq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty, llvm_v2i64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_valign_d_128 : - GCCBuiltin<"__builtin_ia32_alignd128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty, llvm_v4i32_ty, - llvm_i8_ty], [IntrNoMem]>; -} - -// Compares -let TargetPrefix = "x86" in { - // 512-bit - def int_x86_avx512_vcomi_sd : GCCBuiltin<"__builtin_ia32_vcomisd">, - Intrinsic<[llvm_i32_ty], [llvm_v2f64_ty, - llvm_v2f64_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_vcomi_ss : GCCBuiltin<"__builtin_ia32_vcomiss">, - Intrinsic<[llvm_i32_ty], [llvm_v4f32_ty, - llvm_v4f32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_cmp_b_512: - Intrinsic<[llvm_i64_ty], [llvm_v64i8_ty, llvm_v64i8_ty, llvm_i32_ty, - llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_w_512: - Intrinsic<[llvm_i32_ty], [llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_d_512: - Intrinsic<[llvm_i16_ty], [llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty, - llvm_i16_ty], [IntrNoMem ]>; - def int_x86_avx512_mask_cmp_q_512: - Intrinsic<[llvm_i8_ty], [llvm_v8i64_ty, llvm_v8i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_ucmp_b_512: - Intrinsic<[llvm_i64_ty], [llvm_v64i8_ty, llvm_v64i8_ty, llvm_i32_ty, - llvm_i64_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_w_512: - Intrinsic<[llvm_i32_ty], [llvm_v32i16_ty, llvm_v32i16_ty, llvm_i32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_d_512: - Intrinsic<[llvm_i16_ty], [llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_q_512: - Intrinsic<[llvm_i8_ty], [llvm_v8i64_ty, llvm_v8i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - // 256-bit - def int_x86_avx512_mask_cmp_b_256: - Intrinsic<[llvm_i32_ty], [llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_w_256: - Intrinsic<[llvm_i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, llvm_i32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_d_256: - Intrinsic<[llvm_i8_ty], [llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_q_256: - Intrinsic<[llvm_i8_ty], [llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_ucmp_b_256: - Intrinsic<[llvm_i32_ty], [llvm_v32i8_ty, llvm_v32i8_ty, llvm_i32_ty, - llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_w_256: - Intrinsic<[llvm_i16_ty], [llvm_v16i16_ty, llvm_v16i16_ty, llvm_i32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_d_256: - Intrinsic<[llvm_i8_ty], [llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_q_256: - Intrinsic<[llvm_i8_ty], [llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - // 128-bit - def int_x86_avx512_mask_cmp_b_128: - Intrinsic<[llvm_i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_w_128: - Intrinsic<[llvm_i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_d_128: - Intrinsic<[llvm_i8_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_q_128: - Intrinsic<[llvm_i8_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_ucmp_b_128: - Intrinsic<[llvm_i16_ty], [llvm_v16i8_ty, llvm_v16i8_ty, llvm_i32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_w_128: - Intrinsic<[llvm_i8_ty], [llvm_v8i16_ty, llvm_v8i16_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_d_128: - Intrinsic<[llvm_i8_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_ucmp_q_128: - Intrinsic<[llvm_i8_ty], [llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; -} - -// Compress, Expand -let TargetPrefix = "x86" in { - def int_x86_avx512_mask_compress_ps_512 : - GCCBuiltin<"__builtin_ia32_compresssf512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_pd_512 : - GCCBuiltin<"__builtin_ia32_compressdf512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_ps_256 : - GCCBuiltin<"__builtin_ia32_compresssf256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_pd_256 : - GCCBuiltin<"__builtin_ia32_compressdf256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_ps_128 : - GCCBuiltin<"__builtin_ia32_compresssf128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_pd_128 : - GCCBuiltin<"__builtin_ia32_compressdf128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_compress_store_ps_512 : - GCCBuiltin<"__builtin_ia32_compressstoresf512_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v16f32_ty, - llvm_i16_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_pd_512 : - GCCBuiltin<"__builtin_ia32_compressstoredf512_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v8f64_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_ps_256 : - GCCBuiltin<"__builtin_ia32_compressstoresf256_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_pd_256 : - GCCBuiltin<"__builtin_ia32_compressstoredf256_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v4f64_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_ps_128 : - GCCBuiltin<"__builtin_ia32_compressstoresf128_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_pd_128 : - GCCBuiltin<"__builtin_ia32_compressstoredf128_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - - def int_x86_avx512_mask_compress_d_512 : - GCCBuiltin<"__builtin_ia32_compresssi512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_q_512 : - GCCBuiltin<"__builtin_ia32_compressdi512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_d_256 : - GCCBuiltin<"__builtin_ia32_compresssi256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_q_256 : - GCCBuiltin<"__builtin_ia32_compressdi256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_d_128 : - GCCBuiltin<"__builtin_ia32_compresssi128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_compress_q_128 : - GCCBuiltin<"__builtin_ia32_compressdi128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_compress_store_d_512 : - GCCBuiltin<"__builtin_ia32_compressstoresi512_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v16i32_ty, - llvm_i16_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_q_512 : - GCCBuiltin<"__builtin_ia32_compressstoredi512_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v8i64_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_d_256 : - GCCBuiltin<"__builtin_ia32_compressstoresi256_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v8i32_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_q_256 : - GCCBuiltin<"__builtin_ia32_compressstoredi256_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v4i64_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_d_128 : - GCCBuiltin<"__builtin_ia32_compressstoresi128_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v4i32_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - def int_x86_avx512_mask_compress_store_q_128 : - GCCBuiltin<"__builtin_ia32_compressstoredi128_mask">, - Intrinsic<[], [llvm_ptr_ty, llvm_v2i64_ty, - llvm_i8_ty], [IntrArgMemOnly]>; - -// expand - def int_x86_avx512_mask_expand_ps_512 : - GCCBuiltin<"__builtin_ia32_expandsf512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_pd_512 : - GCCBuiltin<"__builtin_ia32_expanddf512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_ps_256 : - GCCBuiltin<"__builtin_ia32_expandsf256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_pd_256 : - GCCBuiltin<"__builtin_ia32_expanddf256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_ps_128 : - GCCBuiltin<"__builtin_ia32_expandsf128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_pd_128 : - GCCBuiltin<"__builtin_ia32_expanddf128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_expand_load_ps_512 : - GCCBuiltin<"__builtin_ia32_expandloadsf512_mask">, - Intrinsic<[llvm_v16f32_ty], [llvm_ptr_ty, llvm_v16f32_ty, - llvm_i16_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_pd_512 : - GCCBuiltin<"__builtin_ia32_expandloaddf512_mask">, - Intrinsic<[llvm_v8f64_ty], [llvm_ptr_ty, llvm_v8f64_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_ps_256 : - GCCBuiltin<"__builtin_ia32_expandloadsf256_mask">, - Intrinsic<[llvm_v8f32_ty], [llvm_ptr_ty, llvm_v8f32_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_pd_256 : - GCCBuiltin<"__builtin_ia32_expandloaddf256_mask">, - Intrinsic<[llvm_v4f64_ty], [llvm_ptr_ty, llvm_v4f64_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_ps_128 : - GCCBuiltin<"__builtin_ia32_expandloadsf128_mask">, - Intrinsic<[llvm_v4f32_ty], [llvm_ptr_ty, llvm_v4f32_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_pd_128 : - GCCBuiltin<"__builtin_ia32_expandloaddf128_mask">, - Intrinsic<[llvm_v2f64_ty], [llvm_ptr_ty, llvm_v2f64_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - - def int_x86_avx512_mask_expand_d_512 : - GCCBuiltin<"__builtin_ia32_expandsi512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_v16i32_ty, llvm_v16i32_ty, - llvm_i16_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_q_512 : - GCCBuiltin<"__builtin_ia32_expanddi512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_v8i64_ty, llvm_v8i64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_d_256 : - GCCBuiltin<"__builtin_ia32_expandsi256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_v8i32_ty, llvm_v8i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_q_256 : - GCCBuiltin<"__builtin_ia32_expanddi256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_v4i64_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_d_128 : - GCCBuiltin<"__builtin_ia32_expandsi128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, - llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_expand_q_128 : - GCCBuiltin<"__builtin_ia32_expanddi128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_v2i64_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_expand_load_d_512 : - GCCBuiltin<"__builtin_ia32_expandloadsi512_mask">, - Intrinsic<[llvm_v16i32_ty], [llvm_ptr_ty, llvm_v16i32_ty, - llvm_i16_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_q_512 : - GCCBuiltin<"__builtin_ia32_expandloaddi512_mask">, - Intrinsic<[llvm_v8i64_ty], [llvm_ptr_ty, llvm_v8i64_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_d_256 : - GCCBuiltin<"__builtin_ia32_expandloadsi256_mask">, - Intrinsic<[llvm_v8i32_ty], [llvm_ptr_ty, llvm_v8i32_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_q_256 : - GCCBuiltin<"__builtin_ia32_expandloaddi256_mask">, - Intrinsic<[llvm_v4i64_ty], [llvm_ptr_ty, llvm_v4i64_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_d_128 : - GCCBuiltin<"__builtin_ia32_expandloadsi128_mask">, - Intrinsic<[llvm_v4i32_ty], [llvm_ptr_ty, llvm_v4i32_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - def int_x86_avx512_mask_expand_load_q_128 : - GCCBuiltin<"__builtin_ia32_expandloaddi128_mask">, - Intrinsic<[llvm_v2i64_ty], [llvm_ptr_ty, llvm_v2i64_ty, - llvm_i8_ty], [IntrReadMem, IntrArgMemOnly]>; - -} - -// truncate -let TargetPrefix = "x86" in { - def int_x86_avx512_mask_pmov_qb_128 : - GCCBuiltin<"__builtin_ia32_pmovqb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v2i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qb_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovqb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qb_128 : - GCCBuiltin<"__builtin_ia32_pmovsqb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v2i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qb_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovsqb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qb_128 : - GCCBuiltin<"__builtin_ia32_pmovusqb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v2i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qb_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovusqb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_qb_256 : - GCCBuiltin<"__builtin_ia32_pmovqb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v4i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qb_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovqb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qb_256 : - GCCBuiltin<"__builtin_ia32_pmovsqb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v4i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qb_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovsqb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qb_256 : - GCCBuiltin<"__builtin_ia32_pmovusqb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v4i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qb_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovusqb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_qb_512 : - GCCBuiltin<"__builtin_ia32_pmovqb512_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qb_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovqb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qb_512 : - GCCBuiltin<"__builtin_ia32_pmovsqb512_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qb_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovsqb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qb_512 : - GCCBuiltin<"__builtin_ia32_pmovusqb512_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i64_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qb_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovusqb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_qw_128 : - GCCBuiltin<"__builtin_ia32_pmovqw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v2i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qw_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovqw128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qw_128 : - GCCBuiltin<"__builtin_ia32_pmovsqw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v2i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qw_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovsqw128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qw_128 : - GCCBuiltin<"__builtin_ia32_pmovusqw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v2i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qw_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovusqw128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_qw_256 : - GCCBuiltin<"__builtin_ia32_pmovqw256_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v4i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qw_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovqw256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qw_256 : - GCCBuiltin<"__builtin_ia32_pmovsqw256_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v4i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qw_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovsqw256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qw_256 : - GCCBuiltin<"__builtin_ia32_pmovusqw256_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v4i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qw_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovusqw256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_qw_512 : - GCCBuiltin<"__builtin_ia32_pmovqw512_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qw_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovqw512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qw_512 : - GCCBuiltin<"__builtin_ia32_pmovsqw512_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qw_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovsqw512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qw_512 : - GCCBuiltin<"__builtin_ia32_pmovusqw512_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i64_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qw_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovusqw512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_qd_128 : - GCCBuiltin<"__builtin_ia32_pmovqd128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qd_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovqd128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qd_128 : - GCCBuiltin<"__builtin_ia32_pmovsqd128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qd_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovsqd128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qd_128 : - GCCBuiltin<"__builtin_ia32_pmovusqd128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v2i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qd_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovusqd128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v2i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_qd_256 : - GCCBuiltin<"__builtin_ia32_pmovqd256_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qd_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovqd256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qd_256 : - GCCBuiltin<"__builtin_ia32_pmovsqd256_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qd_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovsqd256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qd_256 : - GCCBuiltin<"__builtin_ia32_pmovusqd256_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i64_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qd_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovusqd256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_qd_512 : - GCCBuiltin<"__builtin_ia32_pmovqd512_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i64_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_qd_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovqd512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_qd_512 : - GCCBuiltin<"__builtin_ia32_pmovsqd512_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i64_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_qd_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovsqd512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_qd_512 : - GCCBuiltin<"__builtin_ia32_pmovusqd512_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i64_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_qd_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovusqd512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i64_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_db_128 : - GCCBuiltin<"__builtin_ia32_pmovdb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v4i32_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_db_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovdb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_db_128 : - GCCBuiltin<"__builtin_ia32_pmovsdb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v4i32_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_db_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovsdb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_db_128 : - GCCBuiltin<"__builtin_ia32_pmovusdb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v4i32_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_db_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovusdb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_db_256 : - GCCBuiltin<"__builtin_ia32_pmovdb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i32_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_db_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovdb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_db_256 : - GCCBuiltin<"__builtin_ia32_pmovsdb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i32_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_db_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovsdb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_db_256 : - GCCBuiltin<"__builtin_ia32_pmovusdb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i32_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_db_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovusdb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_db_512 : - GCCBuiltin<"__builtin_ia32_pmovdb512_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i32_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_db_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovdb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_db_512 : - GCCBuiltin<"__builtin_ia32_pmovsdb512_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i32_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_db_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovsdb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_db_512 : - GCCBuiltin<"__builtin_ia32_pmovusdb512_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i32_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_db_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovusdb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_dw_128 : - GCCBuiltin<"__builtin_ia32_pmovdw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v4i32_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_dw_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovdw128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_dw_128 : - GCCBuiltin<"__builtin_ia32_pmovsdw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v4i32_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_dw_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovsdw128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_dw_128 : - GCCBuiltin<"__builtin_ia32_pmovusdw128_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v4i32_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_dw_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovusdw128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_dw_256 : - GCCBuiltin<"__builtin_ia32_pmovdw256_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i32_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_dw_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovdw256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_dw_256 : - GCCBuiltin<"__builtin_ia32_pmovsdw256_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i32_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_dw_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovsdw256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_dw_256 : - GCCBuiltin<"__builtin_ia32_pmovusdw256_mask">, - Intrinsic<[llvm_v8i16_ty], - [llvm_v8i32_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_dw_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovusdw256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i32_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_dw_512 : - GCCBuiltin<"__builtin_ia32_pmovdw512_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v16i32_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_dw_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovdw512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_dw_512 : - GCCBuiltin<"__builtin_ia32_pmovsdw512_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v16i32_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_dw_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovsdw512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_dw_512 : - GCCBuiltin<"__builtin_ia32_pmovusdw512_mask">, - Intrinsic<[llvm_v16i16_ty], - [llvm_v16i32_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_dw_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovusdw512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i32_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_wb_128 : - GCCBuiltin<"__builtin_ia32_pmovwb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i16_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_wb_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovwb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_wb_128 : - GCCBuiltin<"__builtin_ia32_pmovswb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i16_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_wb_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovswb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_wb_128 : - GCCBuiltin<"__builtin_ia32_pmovuswb128_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v8i16_ty, llvm_v16i8_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_wb_mem_128 : - GCCBuiltin<"__builtin_ia32_pmovuswb128mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v8i16_ty, llvm_i8_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_wb_256 : - GCCBuiltin<"__builtin_ia32_pmovwb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i16_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_wb_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovwb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_wb_256 : - GCCBuiltin<"__builtin_ia32_pmovswb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i16_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_wb_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovswb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_wb_256 : - GCCBuiltin<"__builtin_ia32_pmovuswb256_mask">, - Intrinsic<[llvm_v16i8_ty], - [llvm_v16i16_ty, llvm_v16i8_ty, llvm_i16_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_wb_mem_256 : - GCCBuiltin<"__builtin_ia32_pmovuswb256mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v16i16_ty, llvm_i16_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmov_wb_512 : - GCCBuiltin<"__builtin_ia32_pmovwb512_mask">, - Intrinsic<[llvm_v32i8_ty], - [llvm_v32i16_ty, llvm_v32i8_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmov_wb_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovwb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v32i16_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovs_wb_512 : - GCCBuiltin<"__builtin_ia32_pmovswb512_mask">, - Intrinsic<[llvm_v32i8_ty], - [llvm_v32i16_ty, llvm_v32i8_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovs_wb_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovswb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v32i16_ty, llvm_i32_ty], - [IntrArgMemOnly]>; - def int_x86_avx512_mask_pmovus_wb_512 : - GCCBuiltin<"__builtin_ia32_pmovuswb512_mask">, - Intrinsic<[llvm_v32i8_ty], - [llvm_v32i16_ty, llvm_v32i8_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_x86_avx512_mask_pmovus_wb_mem_512 : - GCCBuiltin<"__builtin_ia32_pmovuswb512mem_mask">, - Intrinsic<[], - [llvm_ptr_ty, llvm_v32i16_ty, llvm_i32_ty], - [IntrArgMemOnly]>; -} - -// Bitwise ternary logic -let TargetPrefix = "x86" in { - def int_x86_avx512_mask_pternlog_d_128 : - GCCBuiltin<"__builtin_ia32_pternlogd128_mask">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_pternlog_d_128 : - GCCBuiltin<"__builtin_ia32_pternlogd128_maskz">, - Intrinsic<[llvm_v4i32_ty], - [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pternlog_d_256 : - GCCBuiltin<"__builtin_ia32_pternlogd256_mask">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_pternlog_d_256 : - GCCBuiltin<"__builtin_ia32_pternlogd256_maskz">, - Intrinsic<[llvm_v8i32_ty], - [llvm_v8i32_ty, llvm_v8i32_ty, llvm_v8i32_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pternlog_d_512 : - GCCBuiltin<"__builtin_ia32_pternlogd512_mask">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty, - llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_pternlog_d_512 : - GCCBuiltin<"__builtin_ia32_pternlogd512_maskz">, - Intrinsic<[llvm_v16i32_ty], - [llvm_v16i32_ty, llvm_v16i32_ty, llvm_v16i32_ty, llvm_i32_ty, - llvm_i16_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pternlog_q_128 : - GCCBuiltin<"__builtin_ia32_pternlogq128_mask">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_pternlog_q_128 : - GCCBuiltin<"__builtin_ia32_pternlogq128_maskz">, - Intrinsic<[llvm_v2i64_ty], - [llvm_v2i64_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pternlog_q_256 : - GCCBuiltin<"__builtin_ia32_pternlogq256_mask">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_pternlog_q_256 : - GCCBuiltin<"__builtin_ia32_pternlogq256_maskz">, - Intrinsic<[llvm_v4i64_ty], - [llvm_v4i64_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_mask_pternlog_q_512 : - GCCBuiltin<"__builtin_ia32_pternlogq512_mask">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_v8i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; - - def int_x86_avx512_maskz_pternlog_q_512 : - GCCBuiltin<"__builtin_ia32_pternlogq512_maskz">, - Intrinsic<[llvm_v8i64_ty], - [llvm_v8i64_ty, llvm_v8i64_ty, llvm_v8i64_ty, llvm_i32_ty, - llvm_i8_ty], [IntrNoMem]>; -} - -// Misc. -let TargetPrefix = "x86" in { - def int_x86_avx512_mask_cmp_ps_512 : - GCCBuiltin<"__builtin_ia32_cmpps512_mask">, - Intrinsic<[llvm_i16_ty], [llvm_v16f32_ty, llvm_v16f32_ty, - llvm_i32_ty, llvm_i16_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_pd_512 : - GCCBuiltin<"__builtin_ia32_cmppd512_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v8f64_ty, llvm_v8f64_ty, - llvm_i32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_ps_256 : - GCCBuiltin<"__builtin_ia32_cmpps256_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v8f32_ty, llvm_v8f32_ty, - llvm_i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_pd_256 : - GCCBuiltin<"__builtin_ia32_cmppd256_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v4f64_ty, llvm_v4f64_ty, - llvm_i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_ps_128 : - GCCBuiltin<"__builtin_ia32_cmpps128_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_pd_128 : - GCCBuiltin<"__builtin_ia32_cmppd128_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i32_ty, llvm_i8_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_ss : - GCCBuiltin<"__builtin_ia32_cmpss_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v4f32_ty, llvm_v4f32_ty, - llvm_i32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - def int_x86_avx512_mask_cmp_sd : - GCCBuiltin<"__builtin_ia32_cmpsd_mask">, - Intrinsic<[llvm_i8_ty], [llvm_v2f64_ty, llvm_v2f64_ty, - llvm_i32_ty, llvm_i8_ty, llvm_i32_ty], [IntrNoMem]>; - - def int_x86_avx512_movntdqa : - GCCBuiltin<"__builtin_ia32_movntdqa512">, - Intrinsic<[llvm_v8i64_ty], [llvm_ptr_ty], [IntrReadMem]>; -} - -//===----------------------------------------------------------------------===// -// SHA intrinsics -let TargetPrefix = "x86" in { - def int_x86_sha1rnds4 : GCCBuiltin<"__builtin_ia32_sha1rnds4">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], - [IntrNoMem]>; - def int_x86_sha1nexte : GCCBuiltin<"__builtin_ia32_sha1nexte">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_sha1msg1 : GCCBuiltin<"__builtin_ia32_sha1msg1">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_sha1msg2 : GCCBuiltin<"__builtin_ia32_sha1msg2">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_sha256rnds2 : GCCBuiltin<"__builtin_ia32_sha256rnds2">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty, llvm_v4i32_ty], - [IntrNoMem]>; - def int_x86_sha256msg1 : GCCBuiltin<"__builtin_ia32_sha256msg1">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; - def int_x86_sha256msg2 : GCCBuiltin<"__builtin_ia32_sha256msg2">, - Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_v4i32_ty], [IntrNoMem]>; -} - -//===----------------------------------------------------------------------===// -// Thread synchronization ops with timer. -let TargetPrefix = "x86" in { - def int_x86_monitorx - : GCCBuiltin<"__builtin_ia32_monitorx">, - Intrinsic<[], [ llvm_ptr_ty, llvm_i32_ty, llvm_i32_ty ], []>; - def int_x86_mwaitx - : GCCBuiltin<"__builtin_ia32_mwaitx">, - Intrinsic<[], [ llvm_i32_ty, llvm_i32_ty, llvm_i32_ty ], []>; -} diff --git a/llvm/include/llvm/IR/IntrinsicsXCore.td b/llvm/include/llvm/IR/IntrinsicsXCore.td deleted file mode 100644 index b614e1ed..00000000 --- a/llvm/include/llvm/IR/IntrinsicsXCore.td +++ /dev/null @@ -1,121 +0,0 @@ -//==- IntrinsicsXCore.td - XCore intrinsics -*- tablegen -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines all of the XCore-specific intrinsics. -// -//===----------------------------------------------------------------------===// - -let TargetPrefix = "xcore" in { // All intrinsics start with "llvm.xcore.". - // Miscellaneous instructions. - def int_xcore_bitrev : Intrinsic<[llvm_i32_ty],[llvm_i32_ty],[IntrNoMem]>, - GCCBuiltin<"__builtin_bitrev">; - def int_xcore_crc8 : Intrinsic<[llvm_i32_ty, llvm_i32_ty], - [llvm_i32_ty,llvm_i32_ty,llvm_i32_ty], - [IntrNoMem]>; - def int_xcore_crc32 : Intrinsic<[llvm_i32_ty], - [llvm_i32_ty,llvm_i32_ty,llvm_i32_ty], - [IntrNoMem]>; - def int_xcore_sext : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_xcore_zext : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], - [IntrNoMem]>; - def int_xcore_getid : Intrinsic<[llvm_i32_ty],[],[IntrNoMem]>, - GCCBuiltin<"__builtin_getid">; - def int_xcore_getps : Intrinsic<[llvm_i32_ty],[llvm_i32_ty]>, - GCCBuiltin<"__builtin_getps">; - def int_xcore_setps : Intrinsic<[],[llvm_i32_ty, llvm_i32_ty]>, - GCCBuiltin<"__builtin_setps">; - def int_xcore_geted : Intrinsic<[llvm_i32_ty],[]>; - def int_xcore_getet : Intrinsic<[llvm_i32_ty],[]>; - def int_xcore_setsr : Intrinsic<[],[llvm_i32_ty]>; - def int_xcore_clrsr : Intrinsic<[],[llvm_i32_ty]>; - - // Resource instructions. - def int_xcore_getr : Intrinsic<[llvm_anyptr_ty],[llvm_i32_ty]>; - def int_xcore_freer : Intrinsic<[],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_in : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty],[NoCapture<0>]>; - def int_xcore_int : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_inct : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_out : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_outt : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_outct : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_chkct : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_testct : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_testwct : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_setd : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_setc : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_inshr : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_outshr : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_setpt : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_clrpt : Intrinsic<[],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_getts : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_syncr : Intrinsic<[],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_settw : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_setv : Intrinsic<[],[llvm_anyptr_ty, llvm_ptr_ty], - [NoCapture<0>]>; - def int_xcore_setev : Intrinsic<[],[llvm_anyptr_ty, llvm_ptr_ty], - [NoCapture<0>]>; - def int_xcore_eeu : Intrinsic<[],[llvm_anyptr_ty], [NoCapture<0>]>; - def int_xcore_edu : Intrinsic<[],[llvm_anyptr_ty], [NoCapture<0>]>; - def int_xcore_setclk : Intrinsic<[],[llvm_anyptr_ty, llvm_anyptr_ty], - [NoCapture<0>, NoCapture<1>]>; - def int_xcore_setrdy : Intrinsic<[],[llvm_anyptr_ty, llvm_anyptr_ty], - [NoCapture<0>, NoCapture<1>]>; - def int_xcore_setpsc : Intrinsic<[],[llvm_anyptr_ty, llvm_i32_ty], - [NoCapture<0>]>; - def int_xcore_peek : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_endin : Intrinsic<[llvm_i32_ty],[llvm_anyptr_ty], - [NoCapture<0>]>; - - // Intrinsics for events. - def int_xcore_waitevent : Intrinsic<[llvm_ptr_ty],[], [IntrReadMem]>; - - // If any of the resources owned by the thread are ready this returns the - // vector of one of the ready resources. If no resources owned by the thread - // are ready then the operand passed to the intrinsic is returned. - def int_xcore_checkevent : Intrinsic<[llvm_ptr_ty],[llvm_ptr_ty]>; - - def int_xcore_clre : Intrinsic<[],[],[]>; - - // Intrinsics for threads. - def int_xcore_getst : Intrinsic <[llvm_anyptr_ty],[llvm_anyptr_ty], - [NoCapture<0>]>; - def int_xcore_msync : Intrinsic <[],[llvm_anyptr_ty], [NoCapture<0>]>; - def int_xcore_ssync : Intrinsic <[],[]>; - def int_xcore_mjoin : Intrinsic <[],[llvm_anyptr_ty], [NoCapture<0>]>; - def int_xcore_initsp : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty], - [NoCapture<0>]>; - def int_xcore_initpc : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty], - [NoCapture<0>]>; - def int_xcore_initlr : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty], - [NoCapture<0>]>; - def int_xcore_initcp : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty], - [NoCapture<0>]>; - def int_xcore_initdp : Intrinsic <[],[llvm_anyptr_ty, llvm_ptr_ty], - [NoCapture<0>]>; -} diff --git a/llvm/include/llvm/IR/LLVMContext.h b/llvm/include/llvm/IR/LLVMContext.h deleted file mode 100644 index dbf2b456..00000000 --- a/llvm/include/llvm/IR/LLVMContext.h +++ /dev/null @@ -1,276 +0,0 @@ -//===-- llvm/LLVMContext.h - Class for managing "global" state --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares LLVMContext, a container of "global" state in LLVM, such -// as the global type and constant uniquing tables. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_LLVMCONTEXT_H -#define LLVM_IR_LLVMCONTEXT_H - -#include "llvm/Support/CBindingWrapping.h" -#include "llvm/Support/Options.h" - -namespace llvm { - -class LLVMContextImpl; -class StringRef; -class Twine; -class Instruction; -class Module; -class MDString; -class DICompositeType; -class SMDiagnostic; -class DiagnosticInfo; -enum DiagnosticSeverity : char; -template class SmallVectorImpl; -class Function; -class DebugLoc; -class OptBisect; - -/// This is an important class for using LLVM in a threaded context. It -/// (opaquely) owns and manages the core "global" data of LLVM's core -/// infrastructure, including the type and constant uniquing tables. -/// LLVMContext itself provides no locking guarantees, so you should be careful -/// to have one context per thread. -class LLVMContext { -public: - LLVMContextImpl *const pImpl; - LLVMContext(); - ~LLVMContext(); - - // Pinned metadata names, which always have the same value. This is a - // compile-time performance optimization, not a correctness optimization. - enum { - MD_dbg = 0, // "dbg" - MD_tbaa = 1, // "tbaa" - MD_prof = 2, // "prof" - MD_fpmath = 3, // "fpmath" - MD_range = 4, // "range" - MD_tbaa_struct = 5, // "tbaa.struct" - MD_invariant_load = 6, // "invariant.load" - MD_alias_scope = 7, // "alias.scope" - MD_noalias = 8, // "noalias", - MD_nontemporal = 9, // "nontemporal" - MD_mem_parallel_loop_access = 10, // "llvm.mem.parallel_loop_access" - MD_nonnull = 11, // "nonnull" - MD_dereferenceable = 12, // "dereferenceable" - MD_dereferenceable_or_null = 13, // "dereferenceable_or_null" - MD_make_implicit = 14, // "make.implicit" - MD_unpredictable = 15, // "unpredictable" - MD_invariant_group = 16, // "invariant.group" - MD_align = 17, // "align" - MD_loop = 18, // "llvm.loop" - MD_type = 19, // "type" - }; - - /// Known operand bundle tag IDs, which always have the same value. All - /// operand bundle tags that LLVM has special knowledge of are listed here. - /// Additionally, this scheme allows LLVM to efficiently check for specific - /// operand bundle tags without comparing strings. - enum { - OB_deopt = 0, // "deopt" - OB_funclet = 1, // "funclet" - OB_gc_transition = 2, // "gc-transition" - }; - - /// getMDKindID - Return a unique non-zero ID for the specified metadata kind. - /// This ID is uniqued across modules in the current LLVMContext. - unsigned getMDKindID(StringRef Name) const; - - /// getMDKindNames - Populate client supplied SmallVector with the name for - /// custom metadata IDs registered in this LLVMContext. - void getMDKindNames(SmallVectorImpl &Result) const; - - /// getOperandBundleTags - Populate client supplied SmallVector with the - /// bundle tags registered in this LLVMContext. The bundle tags are ordered - /// by increasing bundle IDs. - /// \see LLVMContext::getOperandBundleTagID - void getOperandBundleTags(SmallVectorImpl &Result) const; - - /// getOperandBundleTagID - Maps a bundle tag to an integer ID. Every bundle - /// tag registered with an LLVMContext has an unique ID. - uint32_t getOperandBundleTagID(StringRef Tag) const; - - /// Define the GC for a function - void setGC(const Function &Fn, std::string GCName); - - /// Return the GC for a function - const std::string &getGC(const Function &Fn); - - /// Remove the GC for a function - void deleteGC(const Function &Fn); - - /// Return true if the Context runtime configuration is set to discard all - /// value names. When true, only GlobalValue names will be available in the - /// IR. - bool shouldDiscardValueNames() const; - - /// Set the Context runtime configuration to discard all value name (but - /// GlobalValue). Clients can use this flag to save memory and runtime, - /// especially in release mode. - void setDiscardValueNames(bool Discard); - - /// Whether there is a string map for uniquing debug info - /// identifiers across the context. Off by default. - bool isODRUniquingDebugTypes() const; - void enableDebugTypeODRUniquing(); - void disableDebugTypeODRUniquing(); - - typedef void (*InlineAsmDiagHandlerTy)(const SMDiagnostic&, void *Context, - unsigned LocCookie); - - /// Defines the type of a diagnostic handler. - /// \see LLVMContext::setDiagnosticHandler. - /// \see LLVMContext::diagnose. - typedef void (*DiagnosticHandlerTy)(const DiagnosticInfo &DI, void *Context); - - /// Defines the type of a yield callback. - /// \see LLVMContext::setYieldCallback. - typedef void (*YieldCallbackTy)(LLVMContext *Context, void *OpaqueHandle); - - /// setInlineAsmDiagnosticHandler - This method sets a handler that is invoked - /// when problems with inline asm are detected by the backend. The first - /// argument is a function pointer and the second is a context pointer that - /// gets passed into the DiagHandler. - /// - /// LLVMContext doesn't take ownership or interpret either of these - /// pointers. - void setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler, - void *DiagContext = nullptr); - - /// getInlineAsmDiagnosticHandler - Return the diagnostic handler set by - /// setInlineAsmDiagnosticHandler. - InlineAsmDiagHandlerTy getInlineAsmDiagnosticHandler() const; - - /// getInlineAsmDiagnosticContext - Return the diagnostic context set by - /// setInlineAsmDiagnosticHandler. - void *getInlineAsmDiagnosticContext() const; - - /// setDiagnosticHandler - This method sets a handler that is invoked - /// when the backend needs to report anything to the user. The first - /// argument is a function pointer and the second is a context pointer that - /// gets passed into the DiagHandler. The third argument should be set to - /// true if the handler only expects enabled diagnostics. - /// - /// LLVMContext doesn't take ownership or interpret either of these - /// pointers. - void setDiagnosticHandler(DiagnosticHandlerTy DiagHandler, - void *DiagContext = nullptr, - bool RespectFilters = false); - - /// getDiagnosticHandler - Return the diagnostic handler set by - /// setDiagnosticHandler. - DiagnosticHandlerTy getDiagnosticHandler() const; - - /// getDiagnosticContext - Return the diagnostic context set by - /// setDiagnosticContext. - void *getDiagnosticContext() const; - - /// \brief Return if a code hotness metric should be included in optimization - /// diagnostics. - bool getDiagnosticHotnessRequested() const; - /// \brief Set if a code hotness metric should be included in optimization - /// diagnostics. - void setDiagnosticHotnessRequested(bool Requested); - - /// \brief Get the prefix that should be printed in front of a diagnostic of - /// the given \p Severity - static const char *getDiagnosticMessagePrefix(DiagnosticSeverity Severity); - - /// \brief Report a message to the currently installed diagnostic handler. - /// - /// This function returns, in particular in the case of error reporting - /// (DI.Severity == \a DS_Error), so the caller should leave the compilation - /// process in a self-consistent state, even though the generated code - /// need not be correct. - /// - /// The diagnostic message will be implicitly prefixed with a severity keyword - /// according to \p DI.getSeverity(), i.e., "error: " for \a DS_Error, - /// "warning: " for \a DS_Warning, and "note: " for \a DS_Note. - void diagnose(const DiagnosticInfo &DI); - - /// \brief Registers a yield callback with the given context. - /// - /// The yield callback function may be called by LLVM to transfer control back - /// to the client that invoked the LLVM compilation. This can be used to yield - /// control of the thread, or perform periodic work needed by the client. - /// There is no guaranteed frequency at which callbacks must occur; in fact, - /// the client is not guaranteed to ever receive this callback. It is at the - /// sole discretion of LLVM to do so and only if it can guarantee that - /// suspending the thread won't block any forward progress in other LLVM - /// contexts in the same process. - /// - /// At a suspend point, the state of the current LLVM context is intentionally - /// undefined. No assumptions about it can or should be made. Only LLVM - /// context API calls that explicitly state that they can be used during a - /// yield callback are allowed to be used. Any other API calls into the - /// context are not supported until the yield callback function returns - /// control to LLVM. Other LLVM contexts are unaffected by this restriction. - void setYieldCallback(YieldCallbackTy Callback, void *OpaqueHandle); - - /// \brief Calls the yield callback (if applicable). - /// - /// This transfers control of the current thread back to the client, which may - /// suspend the current thread. Only call this method when LLVM doesn't hold - /// any global mutex or cannot block the execution in another LLVM context. - void yield(); - - /// emitError - Emit an error message to the currently installed error handler - /// with optional location information. This function returns, so code should - /// be prepared to drop the erroneous construct on the floor and "not crash". - /// The generated code need not be correct. The error message will be - /// implicitly prefixed with "error: " and should not end with a ".". - void emitError(unsigned LocCookie, const Twine &ErrorStr); - void emitError(const Instruction *I, const Twine &ErrorStr); - void emitError(const Twine &ErrorStr); - - /// \brief Query for a debug option's value. - /// - /// This function returns typed data populated from command line parsing. - template - ValT getOption() const { - return OptionRegistry::instance().template get(); - } - - /// \brief Access the object which manages optimization bisection for failure - /// analysis. - OptBisect &getOptBisect(); -private: - LLVMContext(LLVMContext&) = delete; - void operator=(LLVMContext&) = delete; - - /// addModule - Register a module as being instantiated in this context. If - /// the context is deleted, the module will be deleted as well. - void addModule(Module*); - - /// removeModule - Unregister a module from this context. - void removeModule(Module*); - - // Module needs access to the add/removeModule methods. - friend class Module; -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLVMContext, LLVMContextRef) - -/* Specialized opaque context conversions. - */ -inline LLVMContext **unwrap(LLVMContextRef* Tys) { - return reinterpret_cast(Tys); -} - -inline LLVMContextRef *wrap(const LLVMContext **Tys) { - return reinterpret_cast(const_cast(Tys)); -} - -} - -#endif diff --git a/llvm/include/llvm/IR/LegacyPassManager.h b/llvm/include/llvm/IR/LegacyPassManager.h deleted file mode 100644 index 5257a0ee..00000000 --- a/llvm/include/llvm/IR/LegacyPassManager.h +++ /dev/null @@ -1,103 +0,0 @@ -//===- LegacyPassManager.h - Legacy Container for Passes --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the legacy PassManager class. This class is used to hold, -// maintain, and optimize execution of Passes. The PassManager class ensures -// that analysis results are available before a pass runs, and that Pass's are -// destroyed when the PassManager is destroyed. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_LEGACYPASSMANAGER_H -#define LLVM_IR_LEGACYPASSMANAGER_H - -#include "llvm/Pass.h" -#include "llvm/Support/CBindingWrapping.h" - -namespace llvm { - -class Pass; -class Module; - -namespace legacy { - -class PassManagerImpl; -class FunctionPassManagerImpl; - -/// PassManagerBase - An abstract interface to allow code to add passes to -/// a pass manager without having to hard-code what kind of pass manager -/// it is. -class PassManagerBase { -public: - virtual ~PassManagerBase(); - - /// Add a pass to the queue of passes to run. This passes ownership of - /// the Pass to the PassManager. When the PassManager is destroyed, the pass - /// will be destroyed as well, so there is no need to delete the pass. This - /// may even destroy the pass right away if it is found to be redundant. This - /// implies that all passes MUST be allocated with 'new'. - virtual void add(Pass *P) = 0; -}; - -/// PassManager manages ModulePassManagers -class PassManager : public PassManagerBase { -public: - - PassManager(); - ~PassManager() override; - - void add(Pass *P) override; - - /// run - Execute all of the passes scheduled for execution. Keep track of - /// whether any of the passes modifies the module, and if so, return true. - bool run(Module &M); - -private: - /// PassManagerImpl_New is the actual class. PassManager is just the - /// wraper to publish simple pass manager interface - PassManagerImpl *PM; -}; - -/// FunctionPassManager manages FunctionPasses and BasicBlockPassManagers. -class FunctionPassManager : public PassManagerBase { -public: - /// FunctionPassManager ctor - This initializes the pass manager. It needs, - /// but does not take ownership of, the specified Module. - explicit FunctionPassManager(Module *M); - ~FunctionPassManager() override; - - void add(Pass *P) override; - - /// run - Execute all of the passes scheduled for execution. Keep - /// track of whether any of the passes modifies the function, and if - /// so, return true. - /// - bool run(Function &F); - - /// doInitialization - Run all of the initializers for the function passes. - /// - bool doInitialization(); - - /// doFinalization - Run all of the finalizers for the function passes. - /// - bool doFinalization(); - -private: - FunctionPassManagerImpl *FPM; - Module *M; -}; - -} // End legacy namespace - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_STDCXX_CONVERSION_FUNCTIONS(legacy::PassManagerBase, LLVMPassManagerRef) - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/LegacyPassManagers.h b/llvm/include/llvm/IR/LegacyPassManagers.h deleted file mode 100644 index 530fd716..00000000 --- a/llvm/include/llvm/IR/LegacyPassManagers.h +++ /dev/null @@ -1,507 +0,0 @@ -//===- LegacyPassManagers.h - Legacy Pass Infrastructure --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the LLVM Pass Manager infrastructure. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_LEGACYPASSMANAGERS_H -#define LLVM_IR_LEGACYPASSMANAGERS_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/FoldingSet.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Pass.h" -#include - -//===----------------------------------------------------------------------===// -// Overview: -// The Pass Manager Infrastructure manages passes. It's responsibilities are: -// -// o Manage optimization pass execution order -// o Make required Analysis information available before pass P is run -// o Release memory occupied by dead passes -// o If Analysis information is dirtied by a pass then regenerate Analysis -// information before it is consumed by another pass. -// -// Pass Manager Infrastructure uses multiple pass managers. They are -// PassManager, FunctionPassManager, MPPassManager, FPPassManager, BBPassManager. -// This class hierarchy uses multiple inheritance but pass managers do not -// derive from another pass manager. -// -// PassManager and FunctionPassManager are two top-level pass manager that -// represents the external interface of this entire pass manager infrastucture. -// -// Important classes : -// -// [o] class PMTopLevelManager; -// -// Two top level managers, PassManager and FunctionPassManager, derive from -// PMTopLevelManager. PMTopLevelManager manages information used by top level -// managers such as last user info. -// -// [o] class PMDataManager; -// -// PMDataManager manages information, e.g. list of available analysis info, -// used by a pass manager to manage execution order of passes. It also provides -// a place to implement common pass manager APIs. All pass managers derive from -// PMDataManager. -// -// [o] class BBPassManager : public FunctionPass, public PMDataManager; -// -// BBPassManager manages BasicBlockPasses. -// -// [o] class FunctionPassManager; -// -// This is a external interface used to manage FunctionPasses. This -// interface relies on FunctionPassManagerImpl to do all the tasks. -// -// [o] class FunctionPassManagerImpl : public ModulePass, PMDataManager, -// public PMTopLevelManager; -// -// FunctionPassManagerImpl is a top level manager. It manages FPPassManagers -// -// [o] class FPPassManager : public ModulePass, public PMDataManager; -// -// FPPassManager manages FunctionPasses and BBPassManagers -// -// [o] class MPPassManager : public Pass, public PMDataManager; -// -// MPPassManager manages ModulePasses and FPPassManagers -// -// [o] class PassManager; -// -// This is a external interface used by various tools to manages passes. It -// relies on PassManagerImpl to do all the tasks. -// -// [o] class PassManagerImpl : public Pass, public PMDataManager, -// public PMTopLevelManager -// -// PassManagerImpl is a top level pass manager responsible for managing -// MPPassManagers. -//===----------------------------------------------------------------------===// - -#include "llvm/Support/PrettyStackTrace.h" - -namespace llvm { -template class ArrayRef; -class Module; -class Pass; -class StringRef; -class Value; -class Timer; -class PMDataManager; - -// enums for debugging strings -enum PassDebuggingString { - EXECUTION_MSG, // "Executing Pass '" + PassName - MODIFICATION_MSG, // "Made Modification '" + PassName - FREEING_MSG, // " Freeing Pass '" + PassName - ON_BASICBLOCK_MSG, // "' on BasicBlock '" + InstructionName + "'...\n" - ON_FUNCTION_MSG, // "' on Function '" + FunctionName + "'...\n" - ON_MODULE_MSG, // "' on Module '" + ModuleName + "'...\n" - ON_REGION_MSG, // "' on Region '" + Msg + "'...\n'" - ON_LOOP_MSG, // "' on Loop '" + Msg + "'...\n'" - ON_CG_MSG // "' on Call Graph Nodes '" + Msg + "'...\n'" -}; - -/// PassManagerPrettyStackEntry - This is used to print informative information -/// about what pass is running when/if a stack trace is generated. -class PassManagerPrettyStackEntry : public PrettyStackTraceEntry { - Pass *P; - Value *V; - Module *M; - -public: - explicit PassManagerPrettyStackEntry(Pass *p) - : P(p), V(nullptr), M(nullptr) {} // When P is releaseMemory'd. - PassManagerPrettyStackEntry(Pass *p, Value &v) - : P(p), V(&v), M(nullptr) {} // When P is run on V - PassManagerPrettyStackEntry(Pass *p, Module &m) - : P(p), V(nullptr), M(&m) {} // When P is run on M - - /// print - Emit information about this stack frame to OS. - void print(raw_ostream &OS) const override; -}; - -//===----------------------------------------------------------------------===// -// PMStack -// -/// PMStack - This class implements a stack data structure of PMDataManager -/// pointers. -/// -/// Top level pass managers (see PassManager.cpp) maintain active Pass Managers -/// using PMStack. Each Pass implements assignPassManager() to connect itself -/// with appropriate manager. assignPassManager() walks PMStack to find -/// suitable manager. -class PMStack { -public: - typedef std::vector::const_reverse_iterator iterator; - iterator begin() const { return S.rbegin(); } - iterator end() const { return S.rend(); } - - void pop(); - PMDataManager *top() const { return S.back(); } - void push(PMDataManager *PM); - bool empty() const { return S.empty(); } - - void dump() const; - -private: - std::vector S; -}; - -//===----------------------------------------------------------------------===// -// PMTopLevelManager -// -/// PMTopLevelManager manages LastUser info and collects common APIs used by -/// top level pass managers. -class PMTopLevelManager { -protected: - explicit PMTopLevelManager(PMDataManager *PMDM); - - unsigned getNumContainedManagers() const { - return (unsigned)PassManagers.size(); - } - - void initializeAllAnalysisInfo(); - -private: - virtual PMDataManager *getAsPMDataManager() = 0; - virtual PassManagerType getTopLevelPassManagerType() = 0; - -public: - /// Schedule pass P for execution. Make sure that passes required by - /// P are run before P is run. Update analysis info maintained by - /// the manager. Remove dead passes. This is a recursive function. - void schedulePass(Pass *P); - - /// Set pass P as the last user of the given analysis passes. - void setLastUser(ArrayRef AnalysisPasses, Pass *P); - - /// Collect passes whose last user is P - void collectLastUses(SmallVectorImpl &LastUses, Pass *P); - - /// Find the pass that implements Analysis AID. Search immutable - /// passes and all pass managers. If desired pass is not found - /// then return NULL. - Pass *findAnalysisPass(AnalysisID AID); - - /// Retrieve the PassInfo for an analysis. - const PassInfo *findAnalysisPassInfo(AnalysisID AID) const; - - /// Find analysis usage information for the pass P. - AnalysisUsage *findAnalysisUsage(Pass *P); - - virtual ~PMTopLevelManager(); - - /// Add immutable pass and initialize it. - void addImmutablePass(ImmutablePass *P); - - inline SmallVectorImpl& getImmutablePasses() { - return ImmutablePasses; - } - - void addPassManager(PMDataManager *Manager) { - PassManagers.push_back(Manager); - } - - // Add Manager into the list of managers that are not directly - // maintained by this top level pass manager - inline void addIndirectPassManager(PMDataManager *Manager) { - IndirectPassManagers.push_back(Manager); - } - - // Print passes managed by this top level manager. - void dumpPasses() const; - void dumpArguments() const; - - // Active Pass Managers - PMStack activeStack; - -protected: - /// Collection of pass managers - SmallVector PassManagers; - -private: - /// Collection of pass managers that are not directly maintained - /// by this pass manager - SmallVector IndirectPassManagers; - - // Map to keep track of last user of the analysis pass. - // LastUser->second is the last user of Lastuser->first. - DenseMap LastUser; - - // Map to keep track of passes that are last used by a pass. - // This inverse map is initialized at PM->run() based on - // LastUser map. - DenseMap > InversedLastUser; - - /// Immutable passes are managed by top level manager. - SmallVector ImmutablePasses; - - /// Map from ID to immutable passes. - SmallDenseMap ImmutablePassMap; - - - /// A wrapper around AnalysisUsage for the purpose of uniqueing. The wrapper - /// is used to avoid needing to make AnalysisUsage itself a folding set node. - struct AUFoldingSetNode : public FoldingSetNode { - AnalysisUsage AU; - AUFoldingSetNode(const AnalysisUsage &AU) : AU(AU) {} - void Profile(FoldingSetNodeID &ID) const { - Profile(ID, AU); - } - static void Profile(FoldingSetNodeID &ID, const AnalysisUsage &AU) { - // TODO: We could consider sorting the dependency arrays within the - // AnalysisUsage (since they are conceptually unordered). - ID.AddBoolean(AU.getPreservesAll()); - auto ProfileVec = [&](const SmallVectorImpl& Vec) { - ID.AddInteger(Vec.size()); - for(AnalysisID AID : Vec) - ID.AddPointer(AID); - }; - ProfileVec(AU.getRequiredSet()); - ProfileVec(AU.getRequiredTransitiveSet()); - ProfileVec(AU.getPreservedSet()); - ProfileVec(AU.getUsedSet()); - } - }; - - // Contains all of the unique combinations of AnalysisUsage. This is helpful - // when we have multiple instances of the same pass since they'll usually - // have the same analysis usage and can share storage. - FoldingSet UniqueAnalysisUsages; - - // Allocator used for allocating UAFoldingSetNodes. This handles deletion of - // all allocated nodes in one fell swoop. - SpecificBumpPtrAllocator AUFoldingSetNodeAllocator; - - // Maps from a pass to it's associated entry in UniqueAnalysisUsages. Does - // not own the storage associated with either key or value.. - DenseMap AnUsageMap; - - /// Collection of PassInfo objects found via analysis IDs and in this top - /// level manager. This is used to memoize queries to the pass registry. - /// FIXME: This is an egregious hack because querying the pass registry is - /// either slow or racy. - mutable DenseMap AnalysisPassInfos; -}; - -//===----------------------------------------------------------------------===// -// PMDataManager - -/// PMDataManager provides the common place to manage the analysis data -/// used by pass managers. -class PMDataManager { -public: - explicit PMDataManager() : TPM(nullptr), Depth(0) { - initializeAnalysisInfo(); - } - - virtual ~PMDataManager(); - - virtual Pass *getAsPass() = 0; - - /// Augment AvailableAnalysis by adding analysis made available by pass P. - void recordAvailableAnalysis(Pass *P); - - /// verifyPreservedAnalysis -- Verify analysis presreved by pass P. - void verifyPreservedAnalysis(Pass *P); - - /// Remove Analysis that is not preserved by the pass - void removeNotPreservedAnalysis(Pass *P); - - /// Remove dead passes used by P. - void removeDeadPasses(Pass *P, StringRef Msg, - enum PassDebuggingString); - - /// Remove P. - void freePass(Pass *P, StringRef Msg, - enum PassDebuggingString); - - /// Add pass P into the PassVector. Update - /// AvailableAnalysis appropriately if ProcessAnalysis is true. - void add(Pass *P, bool ProcessAnalysis = true); - - /// Add RequiredPass into list of lower level passes required by pass P. - /// RequiredPass is run on the fly by Pass Manager when P requests it - /// through getAnalysis interface. - virtual void addLowerLevelRequiredPass(Pass *P, Pass *RequiredPass); - - virtual Pass *getOnTheFlyPass(Pass *P, AnalysisID PI, Function &F); - - /// Initialize available analysis information. - void initializeAnalysisInfo() { - AvailableAnalysis.clear(); - for (unsigned i = 0; i < PMT_Last; ++i) - InheritedAnalysis[i] = nullptr; - } - - // Return true if P preserves high level analysis used by other - // passes that are managed by this manager. - bool preserveHigherLevelAnalysis(Pass *P); - - /// Populate UsedPasses with analysis pass that are used or required by pass - /// P and are available. Populate ReqPassNotAvailable with analysis pass that - /// are required by pass P but are not available. - void collectRequiredAndUsedAnalyses( - SmallVectorImpl &UsedPasses, - SmallVectorImpl &ReqPassNotAvailable, Pass *P); - - /// All Required analyses should be available to the pass as it runs! Here - /// we fill in the AnalysisImpls member of the pass so that it can - /// successfully use the getAnalysis() method to retrieve the - /// implementations it needs. - void initializeAnalysisImpl(Pass *P); - - /// Find the pass that implements Analysis AID. If desired pass is not found - /// then return NULL. - Pass *findAnalysisPass(AnalysisID AID, bool Direction); - - // Access toplevel manager - PMTopLevelManager *getTopLevelManager() { return TPM; } - void setTopLevelManager(PMTopLevelManager *T) { TPM = T; } - - unsigned getDepth() const { return Depth; } - void setDepth(unsigned newDepth) { Depth = newDepth; } - - // Print routines used by debug-pass - void dumpLastUses(Pass *P, unsigned Offset) const; - void dumpPassArguments() const; - void dumpPassInfo(Pass *P, enum PassDebuggingString S1, - enum PassDebuggingString S2, StringRef Msg); - void dumpRequiredSet(const Pass *P) const; - void dumpPreservedSet(const Pass *P) const; - void dumpUsedSet(const Pass *P) const; - - unsigned getNumContainedPasses() const { - return (unsigned)PassVector.size(); - } - - virtual PassManagerType getPassManagerType() const { - assert ( 0 && "Invalid use of getPassManagerType"); - return PMT_Unknown; - } - - DenseMap *getAvailableAnalysis() { - return &AvailableAnalysis; - } - - // Collect AvailableAnalysis from all the active Pass Managers. - void populateInheritedAnalysis(PMStack &PMS) { - unsigned Index = 0; - for (PMStack::iterator I = PMS.begin(), E = PMS.end(); - I != E; ++I) - InheritedAnalysis[Index++] = (*I)->getAvailableAnalysis(); - } - -protected: - // Top level manager. - PMTopLevelManager *TPM; - - // Collection of pass that are managed by this manager - SmallVector PassVector; - - // Collection of Analysis provided by Parent pass manager and - // used by current pass manager. At at time there can not be more - // then PMT_Last active pass mangers. - DenseMap *InheritedAnalysis[PMT_Last]; - - /// isPassDebuggingExecutionsOrMore - Return true if -debug-pass=Executions - /// or higher is specified. - bool isPassDebuggingExecutionsOrMore() const; - -private: - void dumpAnalysisUsage(StringRef Msg, const Pass *P, - const AnalysisUsage::VectorType &Set) const; - - // Set of available Analysis. This information is used while scheduling - // pass. If a pass requires an analysis which is not available then - // the required analysis pass is scheduled to run before the pass itself is - // scheduled to run. - DenseMap AvailableAnalysis; - - // Collection of higher level analysis used by the pass managed by - // this manager. - SmallVector HigherLevelAnalysis; - - unsigned Depth; -}; - -//===----------------------------------------------------------------------===// -// FPPassManager -// -/// FPPassManager manages BBPassManagers and FunctionPasses. -/// It batches all function passes and basic block pass managers together and -/// sequence them to process one function at a time before processing next -/// function. -class FPPassManager : public ModulePass, public PMDataManager { -public: - static char ID; - explicit FPPassManager() - : ModulePass(ID), PMDataManager() { } - - /// run - Execute all of the passes scheduled for execution. Keep track of - /// whether any of the passes modifies the module, and if so, return true. - bool runOnFunction(Function &F); - bool runOnModule(Module &M) override; - - /// cleanup - After running all passes, clean up pass manager cache. - void cleanup(); - - /// doInitialization - Overrides ModulePass doInitialization for global - /// initialization tasks - /// - using ModulePass::doInitialization; - - /// doInitialization - Run all of the initializers for the function passes. - /// - bool doInitialization(Module &M) override; - - /// doFinalization - Overrides ModulePass doFinalization for global - /// finalization tasks - /// - using ModulePass::doFinalization; - - /// doFinalization - Run all of the finalizers for the function passes. - /// - bool doFinalization(Module &M) override; - - PMDataManager *getAsPMDataManager() override { return this; } - Pass *getAsPass() override { return this; } - - /// Pass Manager itself does not invalidate any analysis info. - void getAnalysisUsage(AnalysisUsage &Info) const override { - Info.setPreservesAll(); - } - - // Print passes managed by this manager - void dumpPassStructure(unsigned Offset) override; - - const char *getPassName() const override { - return "Function Pass Manager"; - } - - FunctionPass *getContainedPass(unsigned N) { - assert ( N < PassVector.size() && "Pass number out of range!"); - FunctionPass *FP = static_cast(PassVector[N]); - return FP; - } - - PassManagerType getPassManagerType() const override { - return PMT_FunctionPassManager; - } -}; - -Timer *getPassTimer(Pass *); -} - -#endif diff --git a/llvm/include/llvm/IR/LegacyPassNameParser.h b/llvm/include/llvm/IR/LegacyPassNameParser.h deleted file mode 100644 index 39ae80d7..00000000 --- a/llvm/include/llvm/IR/LegacyPassNameParser.h +++ /dev/null @@ -1,139 +0,0 @@ -//===- LegacyPassNameParser.h -----------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the PassNameParser and FilteredPassNameParser<> classes, -// which are used to add command line arguments to a utility for all of the -// passes that have been registered into the system. -// -// The PassNameParser class adds ALL passes linked into the system (that are -// creatable) as command line arguments to the tool (when instantiated with the -// appropriate command line option template). The FilteredPassNameParser<> -// template is used for the same purposes as PassNameParser, except that it only -// includes passes that have a PassType that are compatible with the filter -// (which is the template argument). -// -// Note that this is part of the legacy pass manager infrastructure and will be -// (eventually) going away. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_LEGACYPASSNAMEPARSER_H -#define LLVM_IR_LEGACYPASSNAMEPARSER_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/Pass.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/raw_ostream.h" -#include - -namespace llvm { - -//===----------------------------------------------------------------------===// -// PassNameParser class - Make use of the pass registration mechanism to -// automatically add a command line argument to opt for each pass. -// -class PassNameParser : public PassRegistrationListener, - public cl::parser { -public: - PassNameParser(cl::Option &O); - ~PassNameParser() override; - - void initialize() { - cl::parser::initialize(); - - // Add all of the passes to the map that got initialized before 'this' did. - enumeratePasses(); - } - - // ignorablePassImpl - Can be overriden in subclasses to refine the list of - // which passes we want to include. - // - virtual bool ignorablePassImpl(const PassInfo *P) const { return false; } - - inline bool ignorablePass(const PassInfo *P) const { - // Ignore non-selectable and non-constructible passes! Ignore - // non-optimizations. - return P->getPassArgument() == nullptr || *P->getPassArgument() == 0 || - P->getNormalCtor() == nullptr || ignorablePassImpl(P); - } - - // Implement the PassRegistrationListener callbacks used to populate our map - // - void passRegistered(const PassInfo *P) override { - if (ignorablePass(P)) return; - if (findOption(P->getPassArgument()) != getNumOptions()) { - errs() << "Two passes with the same argument (-" - << P->getPassArgument() << ") attempted to be registered!\n"; - llvm_unreachable(nullptr); - } - addLiteralOption(P->getPassArgument(), P, P->getPassName()); - } - void passEnumerate(const PassInfo *P) override { passRegistered(P); } - - // printOptionInfo - Print out information about this option. Override the - // default implementation to sort the table before we print... - void printOptionInfo(const cl::Option &O, size_t GlobalWidth) const override { - PassNameParser *PNP = const_cast(this); - array_pod_sort(PNP->Values.begin(), PNP->Values.end(), ValLessThan); - cl::parser::printOptionInfo(O, GlobalWidth); - } - -private: - // ValLessThan - Provide a sorting comparator for Values elements... - static int ValLessThan(const PassNameParser::OptionInfo *VT1, - const PassNameParser::OptionInfo *VT2) { - return std::strcmp(VT1->Name, VT2->Name); - } -}; - -///===----------------------------------------------------------------------===// -/// FilteredPassNameParser class - Make use of the pass registration -/// mechanism to automatically add a command line argument to opt for -/// each pass that satisfies a filter criteria. Filter should return -/// true for passes to be registered as command-line options. -/// -template -class FilteredPassNameParser : public PassNameParser { -private: - Filter filter; - -public: - bool ignorablePassImpl(const PassInfo *P) const override { - return !filter(*P); - } -}; - -///===----------------------------------------------------------------------===// -/// PassArgFilter - A filter for use with PassNameFilterParser that only -/// accepts a Pass whose Arg matches certain strings. -/// -/// Use like this: -/// -/// extern const char AllowedPassArgs[] = "-anders_aa -dse"; -/// -/// static cl::list< -/// const PassInfo*, -/// bool, -/// FilteredPassNameParser > > -/// PassList(cl::desc("Passes available:")); -/// -/// Only the -anders_aa and -dse options will be available to the user. -/// -template -class PassArgFilter { -public: - bool operator()(const PassInfo &P) const { - return(std::strstr(Args, P.getPassArgument())); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/MDBuilder.h b/llvm/include/llvm/IR/MDBuilder.h deleted file mode 100644 index 35341e32..00000000 --- a/llvm/include/llvm/IR/MDBuilder.h +++ /dev/null @@ -1,164 +0,0 @@ -//===---- llvm/MDBuilder.h - Builder for LLVM metadata ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MDBuilder class, which is used as a convenient way to -// create LLVM metadata with a consistent and simplified interface. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_MDBUILDER_H -#define LLVM_IR_MDBUILDER_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -class APInt; -template class ArrayRef; -class LLVMContext; -class Constant; -class ConstantAsMetadata; -class MDNode; -class MDString; - -class MDBuilder { - LLVMContext &Context; - -public: - MDBuilder(LLVMContext &context) : Context(context) {} - - /// \brief Return the given string as metadata. - MDString *createString(StringRef Str); - - /// \brief Return the given constant as metadata. - ConstantAsMetadata *createConstant(Constant *C); - - //===------------------------------------------------------------------===// - // FPMath metadata. - //===------------------------------------------------------------------===// - - /// \brief Return metadata with the given settings. The special value 0.0 - /// for the Accuracy parameter indicates the default (maximal precision) - /// setting. - MDNode *createFPMath(float Accuracy); - - //===------------------------------------------------------------------===// - // Prof metadata. - //===------------------------------------------------------------------===// - - /// \brief Return metadata containing two branch weights. - MDNode *createBranchWeights(uint32_t TrueWeight, uint32_t FalseWeight); - - /// \brief Return metadata containing a number of branch weights. - MDNode *createBranchWeights(ArrayRef Weights); - - /// Return metadata specifying that a branch or switch is unpredictable. - MDNode *createUnpredictable(); - - /// Return metadata containing the entry count for a function. - MDNode *createFunctionEntryCount(uint64_t Count); - - //===------------------------------------------------------------------===// - // Range metadata. - //===------------------------------------------------------------------===// - - /// \brief Return metadata describing the range [Lo, Hi). - MDNode *createRange(const APInt &Lo, const APInt &Hi); - - /// \brief Return metadata describing the range [Lo, Hi). - MDNode *createRange(Constant *Lo, Constant *Hi); - - //===------------------------------------------------------------------===// - // AA metadata. - //===------------------------------------------------------------------===// - -protected: - /// \brief Return metadata appropriate for a AA root node (scope or TBAA). - /// Each returned node is distinct from all other metadata and will never - /// be identified (uniqued) with anything else. - MDNode *createAnonymousAARoot(StringRef Name = StringRef(), - MDNode *Extra = nullptr); - -public: - /// \brief Return metadata appropriate for a TBAA root node. Each returned - /// node is distinct from all other metadata and will never be identified - /// (uniqued) with anything else. - MDNode *createAnonymousTBAARoot() { - return createAnonymousAARoot(); - } - - /// \brief Return metadata appropriate for an alias scope domain node. - /// Each returned node is distinct from all other metadata and will never - /// be identified (uniqued) with anything else. - MDNode *createAnonymousAliasScopeDomain(StringRef Name = StringRef()) { - return createAnonymousAARoot(Name); - } - - /// \brief Return metadata appropriate for an alias scope root node. - /// Each returned node is distinct from all other metadata and will never - /// be identified (uniqued) with anything else. - MDNode *createAnonymousAliasScope(MDNode *Domain, - StringRef Name = StringRef()) { - return createAnonymousAARoot(Name, Domain); - } - - /// \brief Return metadata appropriate for a TBAA root node with the given - /// name. This may be identified (uniqued) with other roots with the same - /// name. - MDNode *createTBAARoot(StringRef Name); - - /// \brief Return metadata appropriate for an alias scope domain node with - /// the given name. This may be identified (uniqued) with other roots with - /// the same name. - MDNode *createAliasScopeDomain(StringRef Name); - - /// \brief Return metadata appropriate for an alias scope node with - /// the given name. This may be identified (uniqued) with other scopes with - /// the same name and domain. - MDNode *createAliasScope(StringRef Name, MDNode *Domain); - - /// \brief Return metadata for a non-root TBAA node with the given name, - /// parent in the TBAA tree, and value for 'pointsToConstantMemory'. - MDNode *createTBAANode(StringRef Name, MDNode *Parent, - bool isConstant = false); - - struct TBAAStructField { - uint64_t Offset; - uint64_t Size; - MDNode *TBAA; - TBAAStructField(uint64_t Offset, uint64_t Size, MDNode *TBAA) : - Offset(Offset), Size(Size), TBAA(TBAA) {} - }; - - /// \brief Return metadata for a tbaa.struct node with the given - /// struct field descriptions. - MDNode *createTBAAStructNode(ArrayRef Fields); - - /// \brief Return metadata for a TBAA struct node in the type DAG - /// with the given name, a list of pairs (offset, field type in the type DAG). - MDNode * - createTBAAStructTypeNode(StringRef Name, - ArrayRef> Fields); - - /// \brief Return metadata for a TBAA scalar type node with the - /// given name, an offset and a parent in the TBAA type DAG. - MDNode *createTBAAScalarTypeNode(StringRef Name, MDNode *Parent, - uint64_t Offset = 0); - - /// \brief Return metadata for a TBAA tag node with the given - /// base type, access type and offset relative to the base type. - MDNode *createTBAAStructTagNode(MDNode *BaseType, MDNode *AccessType, - uint64_t Offset, bool IsConstant = false); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/Mangler.h b/llvm/include/llvm/IR/Mangler.h deleted file mode 100644 index 349218e3..00000000 --- a/llvm/include/llvm/IR/Mangler.h +++ /dev/null @@ -1,56 +0,0 @@ -//===-- llvm/IR/Mangler.h - Self-contained name mangler ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Unified name mangler for various backends. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_MANGLER_H -#define LLVM_IR_MANGLER_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/IR/GlobalValue.h" - -namespace llvm { - -class DataLayout; -template class SmallVectorImpl; -class Twine; -class raw_ostream; - -class Mangler { - /// We need to give global values the same name every time they are mangled. - /// This keeps track of the number we give to anonymous ones. - mutable DenseMap AnonGlobalIDs; - - /// This simple counter is used to unique value names. - mutable unsigned NextAnonGlobalID; - -public: - Mangler() : NextAnonGlobalID(1) {} - - /// Print the appropriate prefix and the specified global variable's name. - /// If the global variable doesn't have a name, this fills in a unique name - /// for the global. - void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, - bool CannotUsePrivateLabel) const; - void getNameWithPrefix(SmallVectorImpl &OutName, const GlobalValue *GV, - bool CannotUsePrivateLabel) const; - - /// Print the appropriate prefix and the specified name as the global variable - /// name. GVName must not be empty. - static void getNameWithPrefix(raw_ostream &OS, const Twine &GVName, - const DataLayout &DL); - static void getNameWithPrefix(SmallVectorImpl &OutName, - const Twine &GVName, const DataLayout &DL); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Metadata.def b/llvm/include/llvm/IR/Metadata.def deleted file mode 100644 index 607f5ef1..00000000 --- a/llvm/include/llvm/IR/Metadata.def +++ /dev/null @@ -1,124 +0,0 @@ -//===- llvm/IR/Metadata.def - Metadata definitions --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Macros for running through all types of metadata. -// -//===----------------------------------------------------------------------===// - -#if !(defined HANDLE_METADATA || defined HANDLE_METADATA_LEAF || \ - defined HANDLE_METADATA_BRANCH || defined HANDLE_MDNODE_LEAF || \ - defined HANDLE_MDNODE_LEAF_UNIQUABLE || defined HANDLE_MDNODE_BRANCH || \ - defined HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE || \ - defined HANDLE_SPECIALIZED_MDNODE_LEAF || \ - defined HANDLE_SPECIALIZED_MDNODE_BRANCH) -#error "Missing macro definition of HANDLE_METADATA*" -#endif - -// Handler for all types of metadata. -#ifndef HANDLE_METADATA -#define HANDLE_METADATA(CLASS) -#endif - -// Handler for leaf nodes in the class hierarchy. -#ifndef HANDLE_METADATA_LEAF -#define HANDLE_METADATA_LEAF(CLASS) HANDLE_METADATA(CLASS) -#endif - -// Handler for non-leaf nodes in the class hierarchy. -#ifndef HANDLE_METADATA_BRANCH -#define HANDLE_METADATA_BRANCH(CLASS) HANDLE_METADATA(CLASS) -#endif - -// Handler for specialized and uniquable leaf nodes under MDNode. Defers to -// HANDLE_MDNODE_LEAF_UNIQUABLE if it's defined, otherwise to -// HANDLE_SPECIALIZED_MDNODE_LEAF. -#ifndef HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE -#ifdef HANDLE_MDNODE_LEAF_UNIQUABLE -#define HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(CLASS) \ - HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) -#else -#define HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(CLASS) \ - HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) -#endif -#endif - -// Handler for leaf nodes under MDNode. -#ifndef HANDLE_MDNODE_LEAF_UNIQUABLE -#define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) HANDLE_MDNODE_LEAF(CLASS) -#endif - -// Handler for leaf nodes under MDNode. -#ifndef HANDLE_MDNODE_LEAF -#define HANDLE_MDNODE_LEAF(CLASS) HANDLE_METADATA_LEAF(CLASS) -#endif - -// Handler for non-leaf nodes under MDNode. -#ifndef HANDLE_MDNODE_BRANCH -#define HANDLE_MDNODE_BRANCH(CLASS) HANDLE_METADATA_BRANCH(CLASS) -#endif - -// Handler for specialized leaf nodes under MDNode. -#ifndef HANDLE_SPECIALIZED_MDNODE_LEAF -#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) HANDLE_MDNODE_LEAF(CLASS) -#endif - -// Handler for specialized non-leaf nodes under MDNode. -#ifndef HANDLE_SPECIALIZED_MDNODE_BRANCH -#define HANDLE_SPECIALIZED_MDNODE_BRANCH(CLASS) HANDLE_MDNODE_BRANCH(CLASS) -#endif - -HANDLE_METADATA_LEAF(MDString) -HANDLE_METADATA_BRANCH(ValueAsMetadata) -HANDLE_METADATA_LEAF(ConstantAsMetadata) -HANDLE_METADATA_LEAF(LocalAsMetadata) -HANDLE_METADATA_LEAF(DistinctMDOperandPlaceholder) -HANDLE_MDNODE_BRANCH(MDNode) -HANDLE_MDNODE_LEAF_UNIQUABLE(MDTuple) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DILocation) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIExpression) -HANDLE_SPECIALIZED_MDNODE_BRANCH(DINode) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(GenericDINode) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DISubrange) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIEnumerator) -HANDLE_SPECIALIZED_MDNODE_BRANCH(DIScope) -HANDLE_SPECIALIZED_MDNODE_BRANCH(DIType) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIBasicType) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIDerivedType) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DICompositeType) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DISubroutineType) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIFile) -HANDLE_SPECIALIZED_MDNODE_LEAF(DICompileUnit) -HANDLE_SPECIALIZED_MDNODE_BRANCH(DILocalScope) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DISubprogram) -HANDLE_SPECIALIZED_MDNODE_BRANCH(DILexicalBlockBase) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DILexicalBlock) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DILexicalBlockFile) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DINamespace) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIModule) -HANDLE_SPECIALIZED_MDNODE_BRANCH(DITemplateParameter) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DITemplateTypeParameter) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DITemplateValueParameter) -HANDLE_SPECIALIZED_MDNODE_BRANCH(DIVariable) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIGlobalVariable) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DILocalVariable) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIObjCProperty) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIImportedEntity) -HANDLE_SPECIALIZED_MDNODE_BRANCH(DIMacroNode) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIMacro) -HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE(DIMacroFile) - -#undef HANDLE_METADATA -#undef HANDLE_METADATA_LEAF -#undef HANDLE_METADATA_BRANCH -#undef HANDLE_MDNODE_LEAF -#undef HANDLE_MDNODE_LEAF_UNIQUABLE -#undef HANDLE_MDNODE_BRANCH -#undef HANDLE_SPECIALIZED_MDNODE_LEAF -#undef HANDLE_SPECIALIZED_MDNODE_LEAF_UNIQUABLE -#undef HANDLE_SPECIALIZED_MDNODE_BRANCH diff --git a/llvm/include/llvm/IR/Metadata.h b/llvm/include/llvm/IR/Metadata.h deleted file mode 100644 index 91f43d34..00000000 --- a/llvm/include/llvm/IR/Metadata.h +++ /dev/null @@ -1,1343 +0,0 @@ -//===- llvm/IR/Metadata.h - Metadata definitions ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// @file -/// This file contains the declarations for metadata subclasses. -/// They represent the different flavors of metadata that live in LLVM. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_METADATA_H -#define LLVM_IR_METADATA_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/PointerUnion.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/Constant.h" -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/Value.h" -#include "llvm/Support/ErrorHandling.h" -#include - -namespace llvm { - -class LLVMContext; -class Module; -class ModuleSlotTracker; - -enum LLVMConstants : uint32_t { - DEBUG_METADATA_VERSION = 3 // Current debug info version number. -}; - -/// \brief Root of the metadata hierarchy. -/// -/// This is a root class for typeless data in the IR. -class Metadata { - friend class ReplaceableMetadataImpl; - - /// \brief RTTI. - const unsigned char SubclassID; - -protected: - /// \brief Active type of storage. - enum StorageType { Uniqued, Distinct, Temporary }; - - /// \brief Storage flag for non-uniqued, otherwise unowned, metadata. - unsigned char Storage; - // TODO: expose remaining bits to subclasses. - - unsigned short SubclassData16; - unsigned SubclassData32; - -public: - enum MetadataKind { -#define HANDLE_METADATA_LEAF(CLASS) CLASS##Kind, -#include "llvm/IR/Metadata.def" - }; - -protected: - Metadata(unsigned ID, StorageType Storage) - : SubclassID(ID), Storage(Storage), SubclassData16(0), SubclassData32(0) { - static_assert(sizeof(*this) == 8, "Metdata fields poorly packed"); - } - ~Metadata() = default; - - /// \brief Default handling of a changed operand, which asserts. - /// - /// If subclasses pass themselves in as owners to a tracking node reference, - /// they must provide an implementation of this method. - void handleChangedOperand(void *, Metadata *) { - llvm_unreachable("Unimplemented in Metadata subclass"); - } - -public: - unsigned getMetadataID() const { return SubclassID; } - - /// \brief User-friendly dump. - /// - /// If \c M is provided, metadata nodes will be numbered canonically; - /// otherwise, pointer addresses are substituted. - /// - /// Note: this uses an explicit overload instead of default arguments so that - /// the nullptr version is easy to call from a debugger. - /// - /// @{ - void dump() const; - void dump(const Module *M) const; - /// @} - - /// \brief Print. - /// - /// Prints definition of \c this. - /// - /// If \c M is provided, metadata nodes will be numbered canonically; - /// otherwise, pointer addresses are substituted. - /// @{ - void print(raw_ostream &OS, const Module *M = nullptr, - bool IsForDebug = false) const; - void print(raw_ostream &OS, ModuleSlotTracker &MST, const Module *M = nullptr, - bool IsForDebug = false) const; - /// @} - - /// \brief Print as operand. - /// - /// Prints reference of \c this. - /// - /// If \c M is provided, metadata nodes will be numbered canonically; - /// otherwise, pointer addresses are substituted. - /// @{ - void printAsOperand(raw_ostream &OS, const Module *M = nullptr) const; - void printAsOperand(raw_ostream &OS, ModuleSlotTracker &MST, - const Module *M = nullptr) const; - /// @} -}; - -#define HANDLE_METADATA(CLASS) class CLASS; -#include "llvm/IR/Metadata.def" - -// Provide specializations of isa so that we don't need definitions of -// subclasses to see if the metadata is a subclass. -#define HANDLE_METADATA_LEAF(CLASS) \ - template <> struct isa_impl { \ - static inline bool doit(const Metadata &MD) { \ - return MD.getMetadataID() == Metadata::CLASS##Kind; \ - } \ - }; -#include "llvm/IR/Metadata.def" - -inline raw_ostream &operator<<(raw_ostream &OS, const Metadata &MD) { - MD.print(OS); - return OS; -} - -/// \brief Metadata wrapper in the Value hierarchy. -/// -/// A member of the \a Value hierarchy to represent a reference to metadata. -/// This allows, e.g., instrinsics to have metadata as operands. -/// -/// Notably, this is the only thing in either hierarchy that is allowed to -/// reference \a LocalAsMetadata. -class MetadataAsValue : public Value { - friend class ReplaceableMetadataImpl; - friend class LLVMContextImpl; - - Metadata *MD; - - MetadataAsValue(Type *Ty, Metadata *MD); - ~MetadataAsValue() override; - - /// \brief Drop use of metadata (during teardown). - void dropUse() { MD = nullptr; } - -public: - static MetadataAsValue *get(LLVMContext &Context, Metadata *MD); - static MetadataAsValue *getIfExists(LLVMContext &Context, Metadata *MD); - Metadata *getMetadata() const { return MD; } - - static bool classof(const Value *V) { - return V->getValueID() == MetadataAsValueVal; - } - -private: - void handleChangedMetadata(Metadata *MD); - void track(); - void untrack(); -}; - -/// \brief API for tracking metadata references through RAUW and deletion. -/// -/// Shared API for updating \a Metadata pointers in subclasses that support -/// RAUW. -/// -/// This API is not meant to be used directly. See \a TrackingMDRef for a -/// user-friendly tracking reference. -class MetadataTracking { -public: - /// \brief Track the reference to metadata. - /// - /// Register \c MD with \c *MD, if the subclass supports tracking. If \c *MD - /// gets RAUW'ed, \c MD will be updated to the new address. If \c *MD gets - /// deleted, \c MD will be set to \c nullptr. - /// - /// If tracking isn't supported, \c *MD will not change. - /// - /// \return true iff tracking is supported by \c MD. - static bool track(Metadata *&MD) { - return track(&MD, *MD, static_cast(nullptr)); - } - - /// \brief Track the reference to metadata for \a Metadata. - /// - /// As \a track(Metadata*&), but with support for calling back to \c Owner to - /// tell it that its operand changed. This could trigger \c Owner being - /// re-uniqued. - static bool track(void *Ref, Metadata &MD, Metadata &Owner) { - return track(Ref, MD, &Owner); - } - - /// \brief Track the reference to metadata for \a MetadataAsValue. - /// - /// As \a track(Metadata*&), but with support for calling back to \c Owner to - /// tell it that its operand changed. This could trigger \c Owner being - /// re-uniqued. - static bool track(void *Ref, Metadata &MD, MetadataAsValue &Owner) { - return track(Ref, MD, &Owner); - } - - /// \brief Stop tracking a reference to metadata. - /// - /// Stops \c *MD from tracking \c MD. - static void untrack(Metadata *&MD) { untrack(&MD, *MD); } - static void untrack(void *Ref, Metadata &MD); - - /// \brief Move tracking from one reference to another. - /// - /// Semantically equivalent to \c untrack(MD) followed by \c track(New), - /// except that ownership callbacks are maintained. - /// - /// Note: it is an error if \c *MD does not equal \c New. - /// - /// \return true iff tracking is supported by \c MD. - static bool retrack(Metadata *&MD, Metadata *&New) { - return retrack(&MD, *MD, &New); - } - static bool retrack(void *Ref, Metadata &MD, void *New); - - /// \brief Check whether metadata is replaceable. - static bool isReplaceable(const Metadata &MD); - - typedef PointerUnion OwnerTy; - -private: - /// \brief Track a reference to metadata for an owner. - /// - /// Generalized version of tracking. - static bool track(void *Ref, Metadata &MD, OwnerTy Owner); -}; - -/// \brief Shared implementation of use-lists for replaceable metadata. -/// -/// Most metadata cannot be RAUW'ed. This is a shared implementation of -/// use-lists and associated API for the two that support it (\a ValueAsMetadata -/// and \a TempMDNode). -class ReplaceableMetadataImpl { - friend class MetadataTracking; - -public: - typedef MetadataTracking::OwnerTy OwnerTy; - -private: - LLVMContext &Context; - uint64_t NextIndex; - SmallDenseMap, 4> UseMap; - -public: - ReplaceableMetadataImpl(LLVMContext &Context) - : Context(Context), NextIndex(0) {} - ~ReplaceableMetadataImpl() { - assert(UseMap.empty() && "Cannot destroy in-use replaceable metadata"); - } - - LLVMContext &getContext() const { return Context; } - - /// \brief Replace all uses of this with MD. - /// - /// Replace all uses of this with \c MD, which is allowed to be null. - void replaceAllUsesWith(Metadata *MD); - - /// \brief Resolve all uses of this. - /// - /// Resolve all uses of this, turning off RAUW permanently. If \c - /// ResolveUsers, call \a MDNode::resolve() on any users whose last operand - /// is resolved. - void resolveAllUses(bool ResolveUsers = true); - -private: - void addRef(void *Ref, OwnerTy Owner); - void dropRef(void *Ref); - void moveRef(void *Ref, void *New, const Metadata &MD); - - /// Lazily construct RAUW support on MD. - /// - /// If this is an unresolved MDNode, RAUW support will be created on-demand. - /// ValueAsMetadata always has RAUW support. - static ReplaceableMetadataImpl *getOrCreate(Metadata &MD); - - /// Get RAUW support on MD, if it exists. - static ReplaceableMetadataImpl *getIfExists(Metadata &MD); - - /// Check whether this node will support RAUW. - /// - /// Returns \c true unless getOrCreate() would return null. - static bool isReplaceable(const Metadata &MD); -}; - -/// \brief Value wrapper in the Metadata hierarchy. -/// -/// This is a custom value handle that allows other metadata to refer to -/// classes in the Value hierarchy. -/// -/// Because of full uniquing support, each value is only wrapped by a single \a -/// ValueAsMetadata object, so the lookup maps are far more efficient than -/// those using ValueHandleBase. -class ValueAsMetadata : public Metadata, ReplaceableMetadataImpl { - friend class ReplaceableMetadataImpl; - friend class LLVMContextImpl; - - Value *V; - - /// \brief Drop users without RAUW (during teardown). - void dropUsers() { - ReplaceableMetadataImpl::resolveAllUses(/* ResolveUsers */ false); - } - -protected: - ValueAsMetadata(unsigned ID, Value *V) - : Metadata(ID, Uniqued), ReplaceableMetadataImpl(V->getContext()), V(V) { - assert(V && "Expected valid value"); - } - ~ValueAsMetadata() = default; - -public: - static ValueAsMetadata *get(Value *V); - static ConstantAsMetadata *getConstant(Value *C) { - return cast(get(C)); - } - static LocalAsMetadata *getLocal(Value *Local) { - return cast(get(Local)); - } - - static ValueAsMetadata *getIfExists(Value *V); - static ConstantAsMetadata *getConstantIfExists(Value *C) { - return cast_or_null(getIfExists(C)); - } - static LocalAsMetadata *getLocalIfExists(Value *Local) { - return cast_or_null(getIfExists(Local)); - } - - Value *getValue() const { return V; } - Type *getType() const { return V->getType(); } - LLVMContext &getContext() const { return V->getContext(); } - - static void handleDeletion(Value *V); - static void handleRAUW(Value *From, Value *To); - -protected: - /// \brief Handle collisions after \a Value::replaceAllUsesWith(). - /// - /// RAUW isn't supported directly for \a ValueAsMetadata, but if the wrapped - /// \a Value gets RAUW'ed and the target already exists, this is used to - /// merge the two metadata nodes. - void replaceAllUsesWith(Metadata *MD) { - ReplaceableMetadataImpl::replaceAllUsesWith(MD); - } - -public: - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == LocalAsMetadataKind || - MD->getMetadataID() == ConstantAsMetadataKind; - } -}; - -class ConstantAsMetadata : public ValueAsMetadata { - friend class ValueAsMetadata; - - ConstantAsMetadata(Constant *C) - : ValueAsMetadata(ConstantAsMetadataKind, C) {} - -public: - static ConstantAsMetadata *get(Constant *C) { - return ValueAsMetadata::getConstant(C); - } - static ConstantAsMetadata *getIfExists(Constant *C) { - return ValueAsMetadata::getConstantIfExists(C); - } - - Constant *getValue() const { - return cast(ValueAsMetadata::getValue()); - } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == ConstantAsMetadataKind; - } -}; - -class LocalAsMetadata : public ValueAsMetadata { - friend class ValueAsMetadata; - - LocalAsMetadata(Value *Local) - : ValueAsMetadata(LocalAsMetadataKind, Local) { - assert(!isa(Local) && "Expected local value"); - } - -public: - static LocalAsMetadata *get(Value *Local) { - return ValueAsMetadata::getLocal(Local); - } - static LocalAsMetadata *getIfExists(Value *Local) { - return ValueAsMetadata::getLocalIfExists(Local); - } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == LocalAsMetadataKind; - } -}; - -/// \brief Transitional API for extracting constants from Metadata. -/// -/// This namespace contains transitional functions for metadata that points to -/// \a Constants. -/// -/// In prehistory -- when metadata was a subclass of \a Value -- \a MDNode -/// operands could refer to any \a Value. There's was a lot of code like this: -/// -/// \code -/// MDNode *N = ...; -/// auto *CI = dyn_cast(N->getOperand(2)); -/// \endcode -/// -/// Now that \a Value and \a Metadata are in separate hierarchies, maintaining -/// the semantics for \a isa(), \a cast(), \a dyn_cast() (etc.) requires three -/// steps: cast in the \a Metadata hierarchy, extraction of the \a Value, and -/// cast in the \a Value hierarchy. Besides creating boiler-plate, this -/// requires subtle control flow changes. -/// -/// The end-goal is to create a new type of metadata, called (e.g.) \a MDInt, -/// so that metadata can refer to numbers without traversing a bridge to the \a -/// Value hierarchy. In this final state, the code above would look like this: -/// -/// \code -/// MDNode *N = ...; -/// auto *MI = dyn_cast(N->getOperand(2)); -/// \endcode -/// -/// The API in this namespace supports the transition. \a MDInt doesn't exist -/// yet, and even once it does, changing each metadata schema to use it is its -/// own mini-project. In the meantime this API prevents us from introducing -/// complex and bug-prone control flow that will disappear in the end. In -/// particular, the above code looks like this: -/// -/// \code -/// MDNode *N = ...; -/// auto *CI = mdconst::dyn_extract(N->getOperand(2)); -/// \endcode -/// -/// The full set of provided functions includes: -/// -/// mdconst::hasa <=> isa -/// mdconst::extract <=> cast -/// mdconst::extract_or_null <=> cast_or_null -/// mdconst::dyn_extract <=> dyn_cast -/// mdconst::dyn_extract_or_null <=> dyn_cast_or_null -/// -/// The target of the cast must be a subclass of \a Constant. -namespace mdconst { - -namespace detail { -template T &make(); -template struct HasDereference { - typedef char Yes[1]; - typedef char No[2]; - template struct SFINAE {}; - - template - static Yes &hasDereference(SFINAE(*make()))> * = 0); - template static No &hasDereference(...); - - static const bool value = - sizeof(hasDereference(nullptr)) == sizeof(Yes); -}; -template struct IsValidPointer { - static const bool value = std::is_base_of::value && - HasDereference::value; -}; -template struct IsValidReference { - static const bool value = std::is_base_of::value && - std::is_convertible::value; -}; -} // end namespace detail - -/// \brief Check whether Metadata has a Value. -/// -/// As an analogue to \a isa(), check whether \c MD has an \a Value inside of -/// type \c X. -template -inline typename std::enable_if::value, bool>::type -hasa(Y &&MD) { - assert(MD && "Null pointer sent into hasa"); - if (auto *V = dyn_cast(MD)) - return isa(V->getValue()); - return false; -} -template -inline - typename std::enable_if::value, bool>::type - hasa(Y &MD) { - return hasa(&MD); -} - -/// \brief Extract a Value from Metadata. -/// -/// As an analogue to \a cast(), extract the \a Value subclass \c X from \c MD. -template -inline typename std::enable_if::value, X *>::type -extract(Y &&MD) { - return cast(cast(MD)->getValue()); -} -template -inline - typename std::enable_if::value, X *>::type - extract(Y &MD) { - return extract(&MD); -} - -/// \brief Extract a Value from Metadata, allowing null. -/// -/// As an analogue to \a cast_or_null(), extract the \a Value subclass \c X -/// from \c MD, allowing \c MD to be null. -template -inline typename std::enable_if::value, X *>::type -extract_or_null(Y &&MD) { - if (auto *V = cast_or_null(MD)) - return cast(V->getValue()); - return nullptr; -} - -/// \brief Extract a Value from Metadata, if any. -/// -/// As an analogue to \a dyn_cast_or_null(), extract the \a Value subclass \c X -/// from \c MD, return null if \c MD doesn't contain a \a Value or if the \a -/// Value it does contain is of the wrong subclass. -template -inline typename std::enable_if::value, X *>::type -dyn_extract(Y &&MD) { - if (auto *V = dyn_cast(MD)) - return dyn_cast(V->getValue()); - return nullptr; -} - -/// \brief Extract a Value from Metadata, if any, allowing null. -/// -/// As an analogue to \a dyn_cast_or_null(), extract the \a Value subclass \c X -/// from \c MD, return null if \c MD doesn't contain a \a Value or if the \a -/// Value it does contain is of the wrong subclass, allowing \c MD to be null. -template -inline typename std::enable_if::value, X *>::type -dyn_extract_or_null(Y &&MD) { - if (auto *V = dyn_cast_or_null(MD)) - return dyn_cast(V->getValue()); - return nullptr; -} - -} // end namespace mdconst - -//===----------------------------------------------------------------------===// -/// \brief A single uniqued string. -/// -/// These are used to efficiently contain a byte sequence for metadata. -/// MDString is always unnamed. -class MDString : public Metadata { - friend class StringMapEntry; - - MDString(const MDString &) = delete; - MDString &operator=(MDString &&) = delete; - MDString &operator=(const MDString &) = delete; - - StringMapEntry *Entry; - MDString() : Metadata(MDStringKind, Uniqued), Entry(nullptr) {} - -public: - static MDString *get(LLVMContext &Context, StringRef Str); - static MDString *get(LLVMContext &Context, const char *Str) { - return get(Context, Str ? StringRef(Str) : StringRef()); - } - - StringRef getString() const; - - unsigned getLength() const { return (unsigned)getString().size(); } - - typedef StringRef::iterator iterator; - - /// \brief Pointer to the first byte of the string. - iterator begin() const { return getString().begin(); } - - /// \brief Pointer to one byte past the end of the string. - iterator end() const { return getString().end(); } - - const unsigned char *bytes_begin() const { return getString().bytes_begin(); } - const unsigned char *bytes_end() const { return getString().bytes_end(); } - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast. - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == MDStringKind; - } -}; - -/// \brief A collection of metadata nodes that might be associated with a -/// memory access used by the alias-analysis infrastructure. -struct AAMDNodes { - explicit AAMDNodes(MDNode *T = nullptr, MDNode *S = nullptr, - MDNode *N = nullptr) - : TBAA(T), Scope(S), NoAlias(N) {} - - bool operator==(const AAMDNodes &A) const { - return TBAA == A.TBAA && Scope == A.Scope && NoAlias == A.NoAlias; - } - - bool operator!=(const AAMDNodes &A) const { return !(*this == A); } - - explicit operator bool() const { return TBAA || Scope || NoAlias; } - - /// \brief The tag for type-based alias analysis. - MDNode *TBAA; - - /// \brief The tag for alias scope specification (used with noalias). - MDNode *Scope; - - /// \brief The tag specifying the noalias scope. - MDNode *NoAlias; -}; - -// Specialize DenseMapInfo for AAMDNodes. -template<> -struct DenseMapInfo { - static inline AAMDNodes getEmptyKey() { - return AAMDNodes(DenseMapInfo::getEmptyKey(), - nullptr, nullptr); - } - static inline AAMDNodes getTombstoneKey() { - return AAMDNodes(DenseMapInfo::getTombstoneKey(), - nullptr, nullptr); - } - static unsigned getHashValue(const AAMDNodes &Val) { - return DenseMapInfo::getHashValue(Val.TBAA) ^ - DenseMapInfo::getHashValue(Val.Scope) ^ - DenseMapInfo::getHashValue(Val.NoAlias); - } - static bool isEqual(const AAMDNodes &LHS, const AAMDNodes &RHS) { - return LHS == RHS; - } -}; - -/// \brief Tracking metadata reference owned by Metadata. -/// -/// Similar to \a TrackingMDRef, but it's expected to be owned by an instance -/// of \a Metadata, which has the option of registering itself for callbacks to -/// re-unique itself. -/// -/// In particular, this is used by \a MDNode. -class MDOperand { - MDOperand(MDOperand &&) = delete; - MDOperand(const MDOperand &) = delete; - MDOperand &operator=(MDOperand &&) = delete; - MDOperand &operator=(const MDOperand &) = delete; - - Metadata *MD; - -public: - MDOperand() : MD(nullptr) {} - ~MDOperand() { untrack(); } - - Metadata *get() const { return MD; } - operator Metadata *() const { return get(); } - Metadata *operator->() const { return get(); } - Metadata &operator*() const { return *get(); } - - void reset() { - untrack(); - MD = nullptr; - } - void reset(Metadata *MD, Metadata *Owner) { - untrack(); - this->MD = MD; - track(Owner); - } - -private: - void track(Metadata *Owner) { - if (MD) { - if (Owner) - MetadataTracking::track(this, *MD, *Owner); - else - MetadataTracking::track(MD); - } - } - void untrack() { - assert(static_cast(this) == &MD && "Expected same address"); - if (MD) - MetadataTracking::untrack(MD); - } -}; - -template <> struct simplify_type { - typedef Metadata *SimpleType; - static SimpleType getSimplifiedValue(MDOperand &MD) { return MD.get(); } -}; - -template <> struct simplify_type { - typedef Metadata *SimpleType; - static SimpleType getSimplifiedValue(const MDOperand &MD) { return MD.get(); } -}; - -/// \brief Pointer to the context, with optional RAUW support. -/// -/// Either a raw (non-null) pointer to the \a LLVMContext, or an owned pointer -/// to \a ReplaceableMetadataImpl (which has a reference to \a LLVMContext). -class ContextAndReplaceableUses { - PointerUnion Ptr; - - ContextAndReplaceableUses() = delete; - ContextAndReplaceableUses(ContextAndReplaceableUses &&) = delete; - ContextAndReplaceableUses(const ContextAndReplaceableUses &) = delete; - ContextAndReplaceableUses &operator=(ContextAndReplaceableUses &&) = delete; - ContextAndReplaceableUses & - operator=(const ContextAndReplaceableUses &) = delete; - -public: - ContextAndReplaceableUses(LLVMContext &Context) : Ptr(&Context) {} - ContextAndReplaceableUses( - std::unique_ptr ReplaceableUses) - : Ptr(ReplaceableUses.release()) { - assert(getReplaceableUses() && "Expected non-null replaceable uses"); - } - ~ContextAndReplaceableUses() { delete getReplaceableUses(); } - - operator LLVMContext &() { return getContext(); } - - /// \brief Whether this contains RAUW support. - bool hasReplaceableUses() const { - return Ptr.is(); - } - LLVMContext &getContext() const { - if (hasReplaceableUses()) - return getReplaceableUses()->getContext(); - return *Ptr.get(); - } - ReplaceableMetadataImpl *getReplaceableUses() const { - if (hasReplaceableUses()) - return Ptr.get(); - return nullptr; - } - - /// Ensure that this has RAUW support, and then return it. - ReplaceableMetadataImpl *getOrCreateReplaceableUses() { - if (!hasReplaceableUses()) - makeReplaceable(llvm::make_unique(getContext())); - return getReplaceableUses(); - } - - /// \brief Assign RAUW support to this. - /// - /// Make this replaceable, taking ownership of \c ReplaceableUses (which must - /// not be null). - void - makeReplaceable(std::unique_ptr ReplaceableUses) { - assert(ReplaceableUses && "Expected non-null replaceable uses"); - assert(&ReplaceableUses->getContext() == &getContext() && - "Expected same context"); - delete getReplaceableUses(); - Ptr = ReplaceableUses.release(); - } - - /// \brief Drop RAUW support. - /// - /// Cede ownership of RAUW support, returning it. - std::unique_ptr takeReplaceableUses() { - assert(hasReplaceableUses() && "Expected to own replaceable uses"); - std::unique_ptr ReplaceableUses( - getReplaceableUses()); - Ptr = &ReplaceableUses->getContext(); - return ReplaceableUses; - } -}; - -struct TempMDNodeDeleter { - inline void operator()(MDNode *Node) const; -}; - -#define HANDLE_MDNODE_LEAF(CLASS) \ - typedef std::unique_ptr Temp##CLASS; -#define HANDLE_MDNODE_BRANCH(CLASS) HANDLE_MDNODE_LEAF(CLASS) -#include "llvm/IR/Metadata.def" - -/// \brief Metadata node. -/// -/// Metadata nodes can be uniqued, like constants, or distinct. Temporary -/// metadata nodes (with full support for RAUW) can be used to delay uniquing -/// until forward references are known. The basic metadata node is an \a -/// MDTuple. -/// -/// There is limited support for RAUW at construction time. At construction -/// time, if any operand is a temporary node (or an unresolved uniqued node, -/// which indicates a transitive temporary operand), the node itself will be -/// unresolved. As soon as all operands become resolved, it will drop RAUW -/// support permanently. -/// -/// If an unresolved node is part of a cycle, \a resolveCycles() needs -/// to be called on some member of the cycle once all temporary nodes have been -/// replaced. -class MDNode : public Metadata { - friend class ReplaceableMetadataImpl; - friend class LLVMContextImpl; - - MDNode(const MDNode &) = delete; - void operator=(const MDNode &) = delete; - void *operator new(size_t) = delete; - - unsigned NumOperands; - unsigned NumUnresolved; - - ContextAndReplaceableUses Context; - -protected: - void *operator new(size_t Size, unsigned NumOps); - void operator delete(void *Mem); - - /// \brief Required by std, but never called. - void operator delete(void *, unsigned) { - llvm_unreachable("Constructor throws?"); - } - - /// \brief Required by std, but never called. - void operator delete(void *, unsigned, bool) { - llvm_unreachable("Constructor throws?"); - } - - MDNode(LLVMContext &Context, unsigned ID, StorageType Storage, - ArrayRef Ops1, ArrayRef Ops2 = None); - ~MDNode() = default; - - void dropAllReferences(); - - MDOperand *mutable_begin() { return mutable_end() - NumOperands; } - MDOperand *mutable_end() { return reinterpret_cast(this); } - - typedef iterator_range mutable_op_range; - mutable_op_range mutable_operands() { - return mutable_op_range(mutable_begin(), mutable_end()); - } - -public: - static inline MDTuple *get(LLVMContext &Context, ArrayRef MDs); - static inline MDTuple *getIfExists(LLVMContext &Context, - ArrayRef MDs); - static inline MDTuple *getDistinct(LLVMContext &Context, - ArrayRef MDs); - static inline TempMDTuple getTemporary(LLVMContext &Context, - ArrayRef MDs); - - /// \brief Create a (temporary) clone of this. - TempMDNode clone() const; - - /// \brief Deallocate a node created by getTemporary. - /// - /// Calls \c replaceAllUsesWith(nullptr) before deleting, so any remaining - /// references will be reset. - static void deleteTemporary(MDNode *N); - - LLVMContext &getContext() const { return Context.getContext(); } - - /// \brief Replace a specific operand. - void replaceOperandWith(unsigned I, Metadata *New); - - /// \brief Check if node is fully resolved. - /// - /// If \a isTemporary(), this always returns \c false; if \a isDistinct(), - /// this always returns \c true. - /// - /// If \a isUniqued(), returns \c true if this has already dropped RAUW - /// support (because all operands are resolved). - /// - /// As forward declarations are resolved, their containers should get - /// resolved automatically. However, if this (or one of its operands) is - /// involved in a cycle, \a resolveCycles() needs to be called explicitly. - bool isResolved() const { return !isTemporary() && !NumUnresolved; } - - bool isUniqued() const { return Storage == Uniqued; } - bool isDistinct() const { return Storage == Distinct; } - bool isTemporary() const { return Storage == Temporary; } - - /// \brief RAUW a temporary. - /// - /// \pre \a isTemporary() must be \c true. - void replaceAllUsesWith(Metadata *MD) { - assert(isTemporary() && "Expected temporary node"); - if (Context.hasReplaceableUses()) - Context.getReplaceableUses()->replaceAllUsesWith(MD); - } - - /// \brief Resolve cycles. - /// - /// Once all forward declarations have been resolved, force cycles to be - /// resolved. - /// - /// \pre No operands (or operands' operands, etc.) have \a isTemporary(). - void resolveCycles(); - - /// \brief Replace a temporary node with a permanent one. - /// - /// Try to create a uniqued version of \c N -- in place, if possible -- and - /// return it. If \c N cannot be uniqued, return a distinct node instead. - template - static typename std::enable_if::value, T *>::type - replaceWithPermanent(std::unique_ptr N) { - return cast(N.release()->replaceWithPermanentImpl()); - } - - /// \brief Replace a temporary node with a uniqued one. - /// - /// Create a uniqued version of \c N -- in place, if possible -- and return - /// it. Takes ownership of the temporary node. - /// - /// \pre N does not self-reference. - template - static typename std::enable_if::value, T *>::type - replaceWithUniqued(std::unique_ptr N) { - return cast(N.release()->replaceWithUniquedImpl()); - } - - /// \brief Replace a temporary node with a distinct one. - /// - /// Create a distinct version of \c N -- in place, if possible -- and return - /// it. Takes ownership of the temporary node. - template - static typename std::enable_if::value, T *>::type - replaceWithDistinct(std::unique_ptr N) { - return cast(N.release()->replaceWithDistinctImpl()); - } - -private: - MDNode *replaceWithPermanentImpl(); - MDNode *replaceWithUniquedImpl(); - MDNode *replaceWithDistinctImpl(); - -protected: - /// \brief Set an operand. - /// - /// Sets the operand directly, without worrying about uniquing. - void setOperand(unsigned I, Metadata *New); - - void storeDistinctInContext(); - template - static T *storeImpl(T *N, StorageType Storage, StoreT &Store); - template static T *storeImpl(T *N, StorageType Storage); - -private: - void handleChangedOperand(void *Ref, Metadata *New); - - /// Resolve a unique, unresolved node. - void resolve(); - - /// Drop RAUW support, if any. - void dropReplaceableUses(); - - void resolveAfterOperandChange(Metadata *Old, Metadata *New); - void decrementUnresolvedOperandCount(); - void countUnresolvedOperands(); - - /// \brief Mutate this to be "uniqued". - /// - /// Mutate this so that \a isUniqued(). - /// \pre \a isTemporary(). - /// \pre already added to uniquing set. - void makeUniqued(); - - /// \brief Mutate this to be "distinct". - /// - /// Mutate this so that \a isDistinct(). - /// \pre \a isTemporary(). - void makeDistinct(); - - void deleteAsSubclass(); - MDNode *uniquify(); - void eraseFromStore(); - - template struct HasCachedHash; - template - static void dispatchRecalculateHash(NodeTy *N, std::true_type) { - N->recalculateHash(); - } - template - static void dispatchRecalculateHash(NodeTy *, std::false_type) {} - template - static void dispatchResetHash(NodeTy *N, std::true_type) { - N->setHash(0); - } - template - static void dispatchResetHash(NodeTy *, std::false_type) {} - -public: - typedef const MDOperand *op_iterator; - typedef iterator_range op_range; - - op_iterator op_begin() const { - return const_cast(this)->mutable_begin(); - } - op_iterator op_end() const { - return const_cast(this)->mutable_end(); - } - op_range operands() const { return op_range(op_begin(), op_end()); } - - const MDOperand &getOperand(unsigned I) const { - assert(I < NumOperands && "Out of range"); - return op_begin()[I]; - } - - /// \brief Return number of MDNode operands. - unsigned getNumOperands() const { return NumOperands; } - - /// \brief Methods for support type inquiry through isa, cast, and dyn_cast: - static bool classof(const Metadata *MD) { - switch (MD->getMetadataID()) { - default: - return false; -#define HANDLE_MDNODE_LEAF(CLASS) \ - case CLASS##Kind: \ - return true; -#include "llvm/IR/Metadata.def" - } - } - - /// \brief Check whether MDNode is a vtable access. - bool isTBAAVtableAccess() const; - - /// \brief Methods for metadata merging. - static MDNode *concatenate(MDNode *A, MDNode *B); - static MDNode *intersect(MDNode *A, MDNode *B); - static MDNode *getMostGenericTBAA(MDNode *A, MDNode *B); - static MDNode *getMostGenericFPMath(MDNode *A, MDNode *B); - static MDNode *getMostGenericRange(MDNode *A, MDNode *B); - static MDNode *getMostGenericAliasScope(MDNode *A, MDNode *B); - static MDNode *getMostGenericAlignmentOrDereferenceable(MDNode *A, MDNode *B); - -}; - -/// \brief Tuple of metadata. -/// -/// This is the simple \a MDNode arbitrary tuple. Nodes are uniqued by -/// default based on their operands. -class MDTuple : public MDNode { - friend class LLVMContextImpl; - friend class MDNode; - - MDTuple(LLVMContext &C, StorageType Storage, unsigned Hash, - ArrayRef Vals) - : MDNode(C, MDTupleKind, Storage, Vals) { - setHash(Hash); - } - ~MDTuple() { dropAllReferences(); } - - void setHash(unsigned Hash) { SubclassData32 = Hash; } - void recalculateHash(); - - static MDTuple *getImpl(LLVMContext &Context, ArrayRef MDs, - StorageType Storage, bool ShouldCreate = true); - - TempMDTuple cloneImpl() const { - return getTemporary(getContext(), - SmallVector(op_begin(), op_end())); - } - -public: - /// \brief Get the hash, if any. - unsigned getHash() const { return SubclassData32; } - - static MDTuple *get(LLVMContext &Context, ArrayRef MDs) { - return getImpl(Context, MDs, Uniqued); - } - static MDTuple *getIfExists(LLVMContext &Context, ArrayRef MDs) { - return getImpl(Context, MDs, Uniqued, /* ShouldCreate */ false); - } - - /// \brief Return a distinct node. - /// - /// Return a distinct node -- i.e., a node that is not uniqued. - static MDTuple *getDistinct(LLVMContext &Context, ArrayRef MDs) { - return getImpl(Context, MDs, Distinct); - } - - /// \brief Return a temporary node. - /// - /// For use in constructing cyclic MDNode structures. A temporary MDNode is - /// not uniqued, may be RAUW'd, and must be manually deleted with - /// deleteTemporary. - static TempMDTuple getTemporary(LLVMContext &Context, - ArrayRef MDs) { - return TempMDTuple(getImpl(Context, MDs, Temporary)); - } - - /// \brief Return a (temporary) clone of this. - TempMDTuple clone() const { return cloneImpl(); } - - static bool classof(const Metadata *MD) { - return MD->getMetadataID() == MDTupleKind; - } -}; - -MDTuple *MDNode::get(LLVMContext &Context, ArrayRef MDs) { - return MDTuple::get(Context, MDs); -} -MDTuple *MDNode::getIfExists(LLVMContext &Context, ArrayRef MDs) { - return MDTuple::getIfExists(Context, MDs); -} -MDTuple *MDNode::getDistinct(LLVMContext &Context, ArrayRef MDs) { - return MDTuple::getDistinct(Context, MDs); -} -TempMDTuple MDNode::getTemporary(LLVMContext &Context, - ArrayRef MDs) { - return MDTuple::getTemporary(Context, MDs); -} - -void TempMDNodeDeleter::operator()(MDNode *Node) const { - MDNode::deleteTemporary(Node); -} - -/// \brief Typed iterator through MDNode operands. -/// -/// An iterator that transforms an \a MDNode::iterator into an iterator over a -/// particular Metadata subclass. -template -class TypedMDOperandIterator - : std::iterator { - MDNode::op_iterator I = nullptr; - -public: - TypedMDOperandIterator() = default; - explicit TypedMDOperandIterator(MDNode::op_iterator I) : I(I) {} - T *operator*() const { return cast_or_null(*I); } - TypedMDOperandIterator &operator++() { - ++I; - return *this; - } - TypedMDOperandIterator operator++(int) { - TypedMDOperandIterator Temp(*this); - ++I; - return Temp; - } - bool operator==(const TypedMDOperandIterator &X) const { return I == X.I; } - bool operator!=(const TypedMDOperandIterator &X) const { return I != X.I; } -}; - -/// \brief Typed, array-like tuple of metadata. -/// -/// This is a wrapper for \a MDTuple that makes it act like an array holding a -/// particular type of metadata. -template class MDTupleTypedArrayWrapper { - const MDTuple *N = nullptr; - -public: - MDTupleTypedArrayWrapper() = default; - MDTupleTypedArrayWrapper(const MDTuple *N) : N(N) {} - - template - MDTupleTypedArrayWrapper( - const MDTupleTypedArrayWrapper &Other, - typename std::enable_if::value>::type * = - nullptr) - : N(Other.get()) {} - - template - explicit MDTupleTypedArrayWrapper( - const MDTupleTypedArrayWrapper &Other, - typename std::enable_if::value>::type * = - nullptr) - : N(Other.get()) {} - - explicit operator bool() const { return get(); } - explicit operator MDTuple *() const { return get(); } - - MDTuple *get() const { return const_cast(N); } - MDTuple *operator->() const { return get(); } - MDTuple &operator*() const { return *get(); } - - // FIXME: Fix callers and remove condition on N. - unsigned size() const { return N ? N->getNumOperands() : 0u; } - T *operator[](unsigned I) const { return cast_or_null(N->getOperand(I)); } - - // FIXME: Fix callers and remove condition on N. - typedef TypedMDOperandIterator iterator; - iterator begin() const { return N ? iterator(N->op_begin()) : iterator(); } - iterator end() const { return N ? iterator(N->op_end()) : iterator(); } -}; - -#define HANDLE_METADATA(CLASS) \ - typedef MDTupleTypedArrayWrapper CLASS##Array; -#include "llvm/IR/Metadata.def" - -/// Placeholder metadata for operands of distinct MDNodes. -/// -/// This is a lightweight placeholder for an operand of a distinct node. It's -/// purpose is to help track forward references when creating a distinct node. -/// This allows distinct nodes involved in a cycle to be constructed before -/// their operands without requiring a heavyweight temporary node with -/// full-blown RAUW support. -/// -/// Each placeholder supports only a single MDNode user. Clients should pass -/// an ID, retrieved via \a getID(), to indicate the "real" operand that this -/// should be replaced with. -/// -/// While it would be possible to implement move operators, they would be -/// fairly expensive. Leave them unimplemented to discourage their use -/// (clients can use std::deque, std::list, BumpPtrAllocator, etc.). -class DistinctMDOperandPlaceholder : public Metadata { - friend class MetadataTracking; - - Metadata **Use = nullptr; - - DistinctMDOperandPlaceholder() = delete; - DistinctMDOperandPlaceholder(DistinctMDOperandPlaceholder &&) = delete; - DistinctMDOperandPlaceholder(const DistinctMDOperandPlaceholder &) = delete; - -public: - explicit DistinctMDOperandPlaceholder(unsigned ID) - : Metadata(DistinctMDOperandPlaceholderKind, Distinct) { - SubclassData32 = ID; - } - - ~DistinctMDOperandPlaceholder() { - if (Use) - *Use = nullptr; - } - - unsigned getID() const { return SubclassData32; } - - /// Replace the use of this with MD. - void replaceUseWith(Metadata *MD) { - if (!Use) - return; - *Use = MD; - Use = nullptr; - } -}; - -//===----------------------------------------------------------------------===// -/// \brief A tuple of MDNodes. -/// -/// Despite its name, a NamedMDNode isn't itself an MDNode. NamedMDNodes belong -/// to modules, have names, and contain lists of MDNodes. -/// -/// TODO: Inherit from Metadata. -class NamedMDNode : public ilist_node { - friend struct ilist_traits; - friend class LLVMContextImpl; - friend class Module; - NamedMDNode(const NamedMDNode &) = delete; - - std::string Name; - Module *Parent; - void *Operands; // SmallVector - - void setParent(Module *M) { Parent = M; } - - explicit NamedMDNode(const Twine &N); - - template - class op_iterator_impl : - public std::iterator { - const NamedMDNode *Node; - unsigned Idx; - op_iterator_impl(const NamedMDNode *N, unsigned i) : Node(N), Idx(i) { } - - friend class NamedMDNode; - - public: - op_iterator_impl() : Node(nullptr), Idx(0) { } - - bool operator==(const op_iterator_impl &o) const { return Idx == o.Idx; } - bool operator!=(const op_iterator_impl &o) const { return Idx != o.Idx; } - op_iterator_impl &operator++() { - ++Idx; - return *this; - } - op_iterator_impl operator++(int) { - op_iterator_impl tmp(*this); - operator++(); - return tmp; - } - op_iterator_impl &operator--() { - --Idx; - return *this; - } - op_iterator_impl operator--(int) { - op_iterator_impl tmp(*this); - operator--(); - return tmp; - } - - T1 operator*() const { return Node->getOperand(Idx); } - }; - -public: - /// \brief Drop all references and remove the node from parent module. - void eraseFromParent(); - - /// \brief Remove all uses and clear node vector. - void dropAllReferences(); - - ~NamedMDNode(); - - /// \brief Get the module that holds this named metadata collection. - inline Module *getParent() { return Parent; } - inline const Module *getParent() const { return Parent; } - - MDNode *getOperand(unsigned i) const; - unsigned getNumOperands() const; - void addOperand(MDNode *M); - void setOperand(unsigned I, MDNode *New); - StringRef getName() const; - void print(raw_ostream &ROS, bool IsForDebug = false) const; - void print(raw_ostream &ROS, ModuleSlotTracker &MST, - bool IsForDebug = false) const; - void dump() const; - - // --------------------------------------------------------------------------- - // Operand Iterator interface... - // - typedef op_iterator_impl op_iterator; - op_iterator op_begin() { return op_iterator(this, 0); } - op_iterator op_end() { return op_iterator(this, getNumOperands()); } - - typedef op_iterator_impl const_op_iterator; - const_op_iterator op_begin() const { return const_op_iterator(this, 0); } - const_op_iterator op_end() const { return const_op_iterator(this, getNumOperands()); } - - inline iterator_range operands() { - return make_range(op_begin(), op_end()); - } - inline iterator_range operands() const { - return make_range(op_begin(), op_end()); - } -}; - -} // end llvm namespace - -#endif // LLVM_IR_METADATA_H diff --git a/llvm/include/llvm/IR/Module.h b/llvm/include/llvm/IR/Module.h deleted file mode 100644 index 632b27e2..00000000 --- a/llvm/include/llvm/IR/Module.h +++ /dev/null @@ -1,850 +0,0 @@ -//===-- llvm/Module.h - C++ class to represent a VM module ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// @file -/// Module.h This file contains the declarations for the Module class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_MODULE_H -#define LLVM_IR_MODULE_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/Comdat.h" -#include "llvm/IR/DataLayout.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/GlobalAlias.h" -#include "llvm/IR/GlobalIFunc.h" -#include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/Metadata.h" -#include "llvm/Support/CBindingWrapping.h" -#include "llvm/Support/CodeGen.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { -template class Optional; -class FunctionType; -class GVMaterializer; -class LLVMContext; -class RandomNumberGenerator; -class StructType; -template class SmallPtrSetImpl; - -template<> struct ilist_traits - : public ilist_default_traits { - // createSentinel is used to get hold of a node that marks the end of - // the list... - NamedMDNode *createSentinel() const { - return static_cast(&Sentinel); - } - static void destroySentinel(NamedMDNode*) {} - - NamedMDNode *provideInitialHead() const { return createSentinel(); } - NamedMDNode *ensureHead(NamedMDNode*) const { return createSentinel(); } - static void noteHead(NamedMDNode*, NamedMDNode*) {} - void addNodeToList(NamedMDNode *) {} - void removeNodeFromList(NamedMDNode *) {} - -private: - mutable ilist_node Sentinel; -}; - -/// A Module instance is used to store all the information related to an -/// LLVM module. Modules are the top level container of all other LLVM -/// Intermediate Representation (IR) objects. Each module directly contains a -/// list of globals variables, a list of functions, a list of libraries (or -/// other modules) this module depends on, a symbol table, and various data -/// about the target's characteristics. -/// -/// A module maintains a GlobalValRefMap object that is used to hold all -/// constant references to global variables in the module. When a global -/// variable is destroyed, it should have no entries in the GlobalValueRefMap. -/// @brief The main container class for the LLVM Intermediate Representation. -class Module { -/// @name Types And Enumerations -/// @{ -public: - /// The type for the list of global variables. - typedef SymbolTableList GlobalListType; - /// The type for the list of functions. - typedef SymbolTableList FunctionListType; - /// The type for the list of aliases. - typedef SymbolTableList AliasListType; - /// The type for the list of ifuncs. - typedef SymbolTableList IFuncListType; - /// The type for the list of named metadata. - typedef ilist NamedMDListType; - /// The type of the comdat "symbol" table. - typedef StringMap ComdatSymTabType; - - /// The Global Variable iterator. - typedef GlobalListType::iterator global_iterator; - /// The Global Variable constant iterator. - typedef GlobalListType::const_iterator const_global_iterator; - - /// The Function iterators. - typedef FunctionListType::iterator iterator; - /// The Function constant iterator - typedef FunctionListType::const_iterator const_iterator; - - /// The Function reverse iterator. - typedef FunctionListType::reverse_iterator reverse_iterator; - /// The Function constant reverse iterator. - typedef FunctionListType::const_reverse_iterator const_reverse_iterator; - - /// The Global Alias iterators. - typedef AliasListType::iterator alias_iterator; - /// The Global Alias constant iterator - typedef AliasListType::const_iterator const_alias_iterator; - - /// The Global IFunc iterators. - typedef IFuncListType::iterator ifunc_iterator; - /// The Global IFunc constant iterator - typedef IFuncListType::const_iterator const_ifunc_iterator; - - /// The named metadata iterators. - typedef NamedMDListType::iterator named_metadata_iterator; - /// The named metadata constant iterators. - typedef NamedMDListType::const_iterator const_named_metadata_iterator; - - /// This enumeration defines the supported behaviors of module flags. - enum ModFlagBehavior { - /// Emits an error if two values disagree, otherwise the resulting value is - /// that of the operands. - Error = 1, - - /// Emits a warning if two values disagree. The result value will be the - /// operand for the flag from the first module being linked. - Warning = 2, - - /// Adds a requirement that another module flag be present and have a - /// specified value after linking is performed. The value must be a metadata - /// pair, where the first element of the pair is the ID of the module flag - /// to be restricted, and the second element of the pair is the value the - /// module flag should be restricted to. This behavior can be used to - /// restrict the allowable results (via triggering of an error) of linking - /// IDs with the **Override** behavior. - Require = 3, - - /// Uses the specified value, regardless of the behavior or value of the - /// other module. If both modules specify **Override**, but the values - /// differ, an error will be emitted. - Override = 4, - - /// Appends the two values, which are required to be metadata nodes. - Append = 5, - - /// Appends the two values, which are required to be metadata - /// nodes. However, duplicate entries in the second list are dropped - /// during the append operation. - AppendUnique = 6, - - // Markers: - ModFlagBehaviorFirstVal = Error, - ModFlagBehaviorLastVal = AppendUnique - }; - - /// Checks if Metadata represents a valid ModFlagBehavior, and stores the - /// converted result in MFB. - static bool isValidModFlagBehavior(Metadata *MD, ModFlagBehavior &MFB); - - struct ModuleFlagEntry { - ModFlagBehavior Behavior; - MDString *Key; - Metadata *Val; - ModuleFlagEntry(ModFlagBehavior B, MDString *K, Metadata *V) - : Behavior(B), Key(K), Val(V) {} - }; - -/// @} -/// @name Member Variables -/// @{ -private: - LLVMContext &Context; ///< The LLVMContext from which types and - ///< constants are allocated. - GlobalListType GlobalList; ///< The Global Variables in the module - FunctionListType FunctionList; ///< The Functions in the module - AliasListType AliasList; ///< The Aliases in the module - IFuncListType IFuncList; ///< The IFuncs in the module - NamedMDListType NamedMDList; ///< The named metadata in the module - std::string GlobalScopeAsm; ///< Inline Asm at global scope. - ValueSymbolTable *ValSymTab; ///< Symbol table for values - ComdatSymTabType ComdatSymTab; ///< Symbol table for COMDATs - std::unique_ptr - Materializer; ///< Used to materialize GlobalValues - std::string ModuleID; ///< Human readable identifier for the module - std::string SourceFileName; ///< Original source file name for module, - ///< recorded in bitcode. - std::string TargetTriple; ///< Platform target triple Module compiled on - ///< Format: (arch)(sub)-(vendor)-(sys0-(abi) - void *NamedMDSymTab; ///< NamedMDNode names. - DataLayout DL; ///< DataLayout associated with the module - - friend class Constant; - -/// @} -/// @name Constructors -/// @{ -public: - /// The Module constructor. Note that there is no default constructor. You - /// must provide a name for the module upon construction. - explicit Module(StringRef ModuleID, LLVMContext& C); - /// The module destructor. This will dropAllReferences. - ~Module(); - -/// @} -/// @name Module Level Accessors -/// @{ - - /// Get the module identifier which is, essentially, the name of the module. - /// @returns the module identifier as a string - const std::string &getModuleIdentifier() const { return ModuleID; } - - /// Get the module's original source file name. When compiling from - /// bitcode, this is taken from a bitcode record where it was recorded. - /// For other compiles it is the same as the ModuleID, which would - /// contain the source file name. - const std::string &getSourceFileName() const { return SourceFileName; } - - /// \brief Get a short "name" for the module. - /// - /// This is useful for debugging or logging. It is essentially a convenience - /// wrapper around getModuleIdentifier(). - StringRef getName() const { return ModuleID; } - - /// Get the data layout string for the module's target platform. This is - /// equivalent to getDataLayout()->getStringRepresentation(). - const std::string &getDataLayoutStr() const { - return DL.getStringRepresentation(); - } - - /// Get the data layout for the module's target platform. - const DataLayout &getDataLayout() const; - - /// Get the target triple which is a string describing the target host. - /// @returns a string containing the target triple. - const std::string &getTargetTriple() const { return TargetTriple; } - - /// Get the global data context. - /// @returns LLVMContext - a container for LLVM's global information - LLVMContext &getContext() const { return Context; } - - /// Get any module-scope inline assembly blocks. - /// @returns a string containing the module-scope inline assembly blocks. - const std::string &getModuleInlineAsm() const { return GlobalScopeAsm; } - - /// Get a RandomNumberGenerator salted for use with this module. The - /// RNG can be seeded via -rng-seed= and is salted with the - /// ModuleID and the provided pass salt. The returned RNG should not - /// be shared across threads or passes. - /// - /// A unique RNG per pass ensures a reproducible random stream even - /// when other randomness consuming passes are added or removed. In - /// addition, the random stream will be reproducible across LLVM - /// versions when the pass does not change. - RandomNumberGenerator *createRNG(const Pass* P) const; - -/// @} -/// @name Module Level Mutators -/// @{ - - /// Set the module identifier. - void setModuleIdentifier(StringRef ID) { ModuleID = ID; } - - /// Set the module's original source file name. - void setSourceFileName(StringRef Name) { SourceFileName = Name; } - - /// Set the data layout - void setDataLayout(StringRef Desc); - void setDataLayout(const DataLayout &Other); - - /// Set the target triple. - void setTargetTriple(StringRef T) { TargetTriple = T; } - - /// Set the module-scope inline assembly blocks. - /// A trailing newline is added if the input doesn't have one. - void setModuleInlineAsm(StringRef Asm) { - GlobalScopeAsm = Asm; - if (!GlobalScopeAsm.empty() && GlobalScopeAsm.back() != '\n') - GlobalScopeAsm += '\n'; - } - - /// Append to the module-scope inline assembly blocks. - /// A trailing newline is added if the input doesn't have one. - void appendModuleInlineAsm(StringRef Asm) { - GlobalScopeAsm += Asm; - if (!GlobalScopeAsm.empty() && GlobalScopeAsm.back() != '\n') - GlobalScopeAsm += '\n'; - } - -/// @} -/// @name Generic Value Accessors -/// @{ - - /// Return the global value in the module with the specified name, of - /// arbitrary type. This method returns null if a global with the specified - /// name is not found. - GlobalValue *getNamedValue(StringRef Name) const; - - /// Return a unique non-zero ID for the specified metadata kind. This ID is - /// uniqued across modules in the current LLVMContext. - unsigned getMDKindID(StringRef Name) const; - - /// Populate client supplied SmallVector with the name for custom metadata IDs - /// registered in this LLVMContext. - void getMDKindNames(SmallVectorImpl &Result) const; - - /// Populate client supplied SmallVector with the bundle tags registered in - /// this LLVMContext. The bundle tags are ordered by increasing bundle IDs. - /// \see LLVMContext::getOperandBundleTagID - void getOperandBundleTags(SmallVectorImpl &Result) const; - - /// Return the type with the specified name, or null if there is none by that - /// name. - StructType *getTypeByName(StringRef Name) const; - - std::vector getIdentifiedStructTypes() const; - -/// @} -/// @name Function Accessors -/// @{ - - /// Look up the specified function in the module symbol table. Four - /// possibilities: - /// 1. If it does not exist, add a prototype for the function and return it. - /// 2. If it exists, and has a local linkage, the existing function is - /// renamed and a new one is inserted. - /// 3. Otherwise, if the existing function has the correct prototype, return - /// the existing function. - /// 4. Finally, the function exists but has the wrong prototype: return the - /// function with a constantexpr cast to the right prototype. - Constant *getOrInsertFunction(StringRef Name, FunctionType *T, - AttributeSet AttributeList); - - Constant *getOrInsertFunction(StringRef Name, FunctionType *T); - - /// Look up the specified function in the module symbol table. If it does not - /// exist, add a prototype for the function and return it. This function - /// guarantees to return a constant of pointer to the specified function type - /// or a ConstantExpr BitCast of that type if the named function has a - /// different type. This version of the method takes a null terminated list of - /// function arguments, which makes it easier for clients to use. - Constant *getOrInsertFunction(StringRef Name, - AttributeSet AttributeList, - Type *RetTy, ...) LLVM_END_WITH_NULL; - - /// Same as above, but without the attributes. - Constant *getOrInsertFunction(StringRef Name, Type *RetTy, ...) - LLVM_END_WITH_NULL; - - /// Look up the specified function in the module symbol table. If it does not - /// exist, return null. - Function *getFunction(StringRef Name) const; - -/// @} -/// @name Global Variable Accessors -/// @{ - - /// Look up the specified global variable in the module symbol table. If it - /// does not exist, return null. If AllowInternal is set to true, this - /// function will return types that have InternalLinkage. By default, these - /// types are not returned. - GlobalVariable *getGlobalVariable(StringRef Name) const { - return getGlobalVariable(Name, false); - } - - GlobalVariable *getGlobalVariable(StringRef Name, bool AllowInternal) const { - return const_cast(this)->getGlobalVariable(Name, AllowInternal); - } - - GlobalVariable *getGlobalVariable(StringRef Name, bool AllowInternal = false); - - /// Return the global variable in the module with the specified name, of - /// arbitrary type. This method returns null if a global with the specified - /// name is not found. - GlobalVariable *getNamedGlobal(StringRef Name) { - return getGlobalVariable(Name, true); - } - const GlobalVariable *getNamedGlobal(StringRef Name) const { - return const_cast(this)->getNamedGlobal(Name); - } - - /// Look up the specified global in the module symbol table. - /// 1. If it does not exist, add a declaration of the global and return it. - /// 2. Else, the global exists but has the wrong type: return the function - /// with a constantexpr cast to the right type. - /// 3. Finally, if the existing global is the correct declaration, return - /// the existing global. - Constant *getOrInsertGlobal(StringRef Name, Type *Ty); - -/// @} -/// @name Global Alias Accessors -/// @{ - - /// Return the global alias in the module with the specified name, of - /// arbitrary type. This method returns null if a global with the specified - /// name is not found. - GlobalAlias *getNamedAlias(StringRef Name) const; - -/// @} -/// @name Global IFunc Accessors -/// @{ - - /// Return the global ifunc in the module with the specified name, of - /// arbitrary type. This method returns null if a global with the specified - /// name is not found. - GlobalIFunc *getNamedIFunc(StringRef Name) const; - -/// @} -/// @name Named Metadata Accessors -/// @{ - - /// Return the first NamedMDNode in the module with the specified name. This - /// method returns null if a NamedMDNode with the specified name is not found. - NamedMDNode *getNamedMetadata(const Twine &Name) const; - - /// Return the named MDNode in the module with the specified name. This method - /// returns a new NamedMDNode if a NamedMDNode with the specified name is not - /// found. - NamedMDNode *getOrInsertNamedMetadata(StringRef Name); - - /// Remove the given NamedMDNode from this module and delete it. - void eraseNamedMetadata(NamedMDNode *NMD); - -/// @} -/// @name Comdat Accessors -/// @{ - - /// Return the Comdat in the module with the specified name. It is created - /// if it didn't already exist. - Comdat *getOrInsertComdat(StringRef Name); - -/// @} -/// @name Module Flags Accessors -/// @{ - - /// Returns the module flags in the provided vector. - void getModuleFlagsMetadata(SmallVectorImpl &Flags) const; - - /// Return the corresponding value if Key appears in module flags, otherwise - /// return null. - Metadata *getModuleFlag(StringRef Key) const; - - /// Returns the NamedMDNode in the module that represents module-level flags. - /// This method returns null if there are no module-level flags. - NamedMDNode *getModuleFlagsMetadata() const; - - /// Returns the NamedMDNode in the module that represents module-level flags. - /// If module-level flags aren't found, it creates the named metadata that - /// contains them. - NamedMDNode *getOrInsertModuleFlagsMetadata(); - - /// Add a module-level flag to the module-level flags metadata. It will create - /// the module-level flags named metadata if it doesn't already exist. - void addModuleFlag(ModFlagBehavior Behavior, StringRef Key, Metadata *Val); - void addModuleFlag(ModFlagBehavior Behavior, StringRef Key, Constant *Val); - void addModuleFlag(ModFlagBehavior Behavior, StringRef Key, uint32_t Val); - void addModuleFlag(MDNode *Node); - -/// @} -/// @name Materialization -/// @{ - - /// Sets the GVMaterializer to GVM. This module must not yet have a - /// Materializer. To reset the materializer for a module that already has one, - /// call materializeAll first. Destroying this module will destroy - /// its materializer without materializing any more GlobalValues. Without - /// destroying the Module, there is no way to detach or destroy a materializer - /// without materializing all the GVs it controls, to avoid leaving orphan - /// unmaterialized GVs. - void setMaterializer(GVMaterializer *GVM); - /// Retrieves the GVMaterializer, if any, for this Module. - GVMaterializer *getMaterializer() const { return Materializer.get(); } - bool isMaterialized() const { return !getMaterializer(); } - - /// Make sure the GlobalValue is fully read. If the module is corrupt, this - /// returns true and fills in the optional string with information about the - /// problem. If successful, this returns false. - std::error_code materialize(GlobalValue *GV); - - /// Make sure all GlobalValues in this Module are fully read and clear the - /// Materializer. - std::error_code materializeAll(); - - std::error_code materializeMetadata(); - -/// @} -/// @name Direct access to the globals list, functions list, and symbol table -/// @{ - - /// Get the Module's list of global variables (constant). - const GlobalListType &getGlobalList() const { return GlobalList; } - /// Get the Module's list of global variables. - GlobalListType &getGlobalList() { return GlobalList; } - static GlobalListType Module::*getSublistAccess(GlobalVariable*) { - return &Module::GlobalList; - } - /// Get the Module's list of functions (constant). - const FunctionListType &getFunctionList() const { return FunctionList; } - /// Get the Module's list of functions. - FunctionListType &getFunctionList() { return FunctionList; } - static FunctionListType Module::*getSublistAccess(Function*) { - return &Module::FunctionList; - } - /// Get the Module's list of aliases (constant). - const AliasListType &getAliasList() const { return AliasList; } - /// Get the Module's list of aliases. - AliasListType &getAliasList() { return AliasList; } - static AliasListType Module::*getSublistAccess(GlobalAlias*) { - return &Module::AliasList; - } - /// Get the Module's list of ifuncs (constant). - const IFuncListType &getIFuncList() const { return IFuncList; } - /// Get the Module's list of ifuncs. - IFuncListType &getIFuncList() { return IFuncList; } - static IFuncListType Module::*getSublistAccess(GlobalIFunc*) { - return &Module::IFuncList; - } - /// Get the Module's list of named metadata (constant). - const NamedMDListType &getNamedMDList() const { return NamedMDList; } - /// Get the Module's list of named metadata. - NamedMDListType &getNamedMDList() { return NamedMDList; } - static NamedMDListType Module::*getSublistAccess(NamedMDNode*) { - return &Module::NamedMDList; - } - /// Get the symbol table of global variable and function identifiers - const ValueSymbolTable &getValueSymbolTable() const { return *ValSymTab; } - /// Get the Module's symbol table of global variable and function identifiers. - ValueSymbolTable &getValueSymbolTable() { return *ValSymTab; } - /// Get the Module's symbol table for COMDATs (constant). - const ComdatSymTabType &getComdatSymbolTable() const { return ComdatSymTab; } - /// Get the Module's symbol table for COMDATs. - ComdatSymTabType &getComdatSymbolTable() { return ComdatSymTab; } - -/// @} -/// @name Global Variable Iteration -/// @{ - - global_iterator global_begin() { return GlobalList.begin(); } - const_global_iterator global_begin() const { return GlobalList.begin(); } - global_iterator global_end () { return GlobalList.end(); } - const_global_iterator global_end () const { return GlobalList.end(); } - bool global_empty() const { return GlobalList.empty(); } - - iterator_range globals() { - return make_range(global_begin(), global_end()); - } - iterator_range globals() const { - return make_range(global_begin(), global_end()); - } - -/// @} -/// @name Function Iteration -/// @{ - - iterator begin() { return FunctionList.begin(); } - const_iterator begin() const { return FunctionList.begin(); } - iterator end () { return FunctionList.end(); } - const_iterator end () const { return FunctionList.end(); } - reverse_iterator rbegin() { return FunctionList.rbegin(); } - const_reverse_iterator rbegin() const{ return FunctionList.rbegin(); } - reverse_iterator rend() { return FunctionList.rend(); } - const_reverse_iterator rend() const { return FunctionList.rend(); } - size_t size() const { return FunctionList.size(); } - bool empty() const { return FunctionList.empty(); } - - iterator_range functions() { - return make_range(begin(), end()); - } - iterator_range functions() const { - return make_range(begin(), end()); - } - -/// @} -/// @name Alias Iteration -/// @{ - - alias_iterator alias_begin() { return AliasList.begin(); } - const_alias_iterator alias_begin() const { return AliasList.begin(); } - alias_iterator alias_end () { return AliasList.end(); } - const_alias_iterator alias_end () const { return AliasList.end(); } - size_t alias_size () const { return AliasList.size(); } - bool alias_empty() const { return AliasList.empty(); } - - iterator_range aliases() { - return make_range(alias_begin(), alias_end()); - } - iterator_range aliases() const { - return make_range(alias_begin(), alias_end()); - } - -/// @} -/// @name IFunc Iteration -/// @{ - - ifunc_iterator ifunc_begin() { return IFuncList.begin(); } - const_ifunc_iterator ifunc_begin() const { return IFuncList.begin(); } - ifunc_iterator ifunc_end () { return IFuncList.end(); } - const_ifunc_iterator ifunc_end () const { return IFuncList.end(); } - size_t ifunc_size () const { return IFuncList.size(); } - bool ifunc_empty() const { return IFuncList.empty(); } - - iterator_range ifuncs() { - return make_range(ifunc_begin(), ifunc_end()); - } - iterator_range ifuncs() const { - return make_range(ifunc_begin(), ifunc_end()); - } - -/// @} -/// @name Convenience iterators -/// @{ - - template class global_object_iterator_t { - friend Module; - - typename std::conditional::type - function_i, - function_e; - typename std::conditional::type global_i; - - typedef - typename std::conditional::type ModuleTy; - - global_object_iterator_t(ModuleTy &M) - : function_i(M.begin()), function_e(M.end()), - global_i(M.global_begin()) {} - global_object_iterator_t(ModuleTy &M, int) - : function_i(M.end()), function_e(M.end()), global_i(M.global_end()) {} - - public: - global_object_iterator_t &operator++() { - if (function_i != function_e) - ++function_i; - else - ++global_i; - return *this; - } - - typename std::conditional::type & - operator*() const { - if (function_i != function_e) - return *function_i; - else - return *global_i; - } - - bool operator!=(const global_object_iterator_t &other) const { - return function_i != other.function_i || global_i != other.global_i; - } - }; - - typedef global_object_iterator_t global_object_iterator; - typedef global_object_iterator_t - const_global_object_iterator; - - global_object_iterator global_object_begin() { - return global_object_iterator(*this); - } - global_object_iterator global_object_end() { - return global_object_iterator(*this, 0); - } - - const_global_object_iterator global_object_begin() const { - return const_global_object_iterator(*this); - } - const_global_object_iterator global_object_end() const { - return const_global_object_iterator(*this, 0); - } - - iterator_range global_objects() { - return make_range(global_object_begin(), global_object_end()); - } - iterator_range global_objects() const { - return make_range(global_object_begin(), global_object_end()); - } - - /// @} - /// @name Named Metadata Iteration - /// @{ - - named_metadata_iterator named_metadata_begin() { return NamedMDList.begin(); } - const_named_metadata_iterator named_metadata_begin() const { - return NamedMDList.begin(); - } - - named_metadata_iterator named_metadata_end() { return NamedMDList.end(); } - const_named_metadata_iterator named_metadata_end() const { - return NamedMDList.end(); - } - - size_t named_metadata_size() const { return NamedMDList.size(); } - bool named_metadata_empty() const { return NamedMDList.empty(); } - - iterator_range named_metadata() { - return make_range(named_metadata_begin(), named_metadata_end()); - } - iterator_range named_metadata() const { - return make_range(named_metadata_begin(), named_metadata_end()); - } - - /// An iterator for DICompileUnits that skips those marked NoDebug. - class debug_compile_units_iterator - : public std::iterator { - NamedMDNode *CUs; - unsigned Idx; - void SkipNoDebugCUs(); - public: - explicit debug_compile_units_iterator(NamedMDNode *CUs, unsigned Idx) - : CUs(CUs), Idx(Idx) { - SkipNoDebugCUs(); - } - debug_compile_units_iterator &operator++() { - ++Idx; - SkipNoDebugCUs(); - return *this; - } - debug_compile_units_iterator operator++(int) { - debug_compile_units_iterator T(*this); - ++Idx; - return T; - } - bool operator==(const debug_compile_units_iterator &I) const { - return Idx == I.Idx; - } - bool operator!=(const debug_compile_units_iterator &I) const { - return Idx != I.Idx; - } - DICompileUnit *operator*() const; - DICompileUnit *operator->() const; - }; - - debug_compile_units_iterator debug_compile_units_begin() const { - auto *CUs = getNamedMetadata("llvm.dbg.cu"); - return debug_compile_units_iterator(CUs, 0); - } - - debug_compile_units_iterator debug_compile_units_end() const { - auto *CUs = getNamedMetadata("llvm.dbg.cu"); - return debug_compile_units_iterator(CUs, CUs ? CUs->getNumOperands() : 0); - } - - /// Return an iterator for all DICompileUnits listed in this Module's - /// llvm.dbg.cu named metadata node and aren't explicitly marked as - /// NoDebug. - iterator_range debug_compile_units() const { - auto *CUs = getNamedMetadata("llvm.dbg.cu"); - return make_range( - debug_compile_units_iterator(CUs, 0), - debug_compile_units_iterator(CUs, CUs ? CUs->getNumOperands() : 0)); - } -/// @} - - /// Destroy ConstantArrays in LLVMContext if they are not used. - /// ConstantArrays constructed during linking can cause quadratic memory - /// explosion. Releasing all unused constants can cause a 20% LTO compile-time - /// slowdown for a large application. - /// - /// NOTE: Constants are currently owned by LLVMContext. This can then only - /// be called where all uses of the LLVMContext are understood. - void dropTriviallyDeadConstantArrays(); - -/// @name Utility functions for printing and dumping Module objects -/// @{ - - /// Print the module to an output stream with an optional - /// AssemblyAnnotationWriter. If \c ShouldPreserveUseListOrder, then include - /// uselistorder directives so that use-lists can be recreated when reading - /// the assembly. - void print(raw_ostream &OS, AssemblyAnnotationWriter *AAW, - bool ShouldPreserveUseListOrder = false, - bool IsForDebug = false) const; - - /// Dump the module to stderr (for debugging). - void dump() const; - - /// This function causes all the subinstructions to "let go" of all references - /// that they are maintaining. This allows one to 'delete' a whole class at - /// a time, even though there may be circular references... first all - /// references are dropped, and all use counts go to zero. Then everything - /// is delete'd for real. Note that no operations are valid on an object - /// that has "dropped all references", except operator delete. - void dropAllReferences(); - -/// @} -/// @name Utility functions for querying Debug information. -/// @{ - - /// \brief Returns the Dwarf Version by checking module flags. - unsigned getDwarfVersion() const; - - /// \brief Returns the CodeView Version by checking module flags. - /// Returns zero if not present in module. - unsigned getCodeViewFlag() const; - -/// @} -/// @name Utility functions for querying and setting PIC level -/// @{ - - /// \brief Returns the PIC level (small or large model) - PICLevel::Level getPICLevel() const; - - /// \brief Set the PIC level (small or large model) - void setPICLevel(PICLevel::Level PL); -/// @} - -/// @} -/// @name Utility functions for querying and setting PIE level -/// @{ - - /// \brief Returns the PIE level (small or large model) - PIELevel::Level getPIELevel() const; - - /// \brief Set the PIE level (small or large model) - void setPIELevel(PIELevel::Level PL); -/// @} - - /// @name Utility functions for querying and setting PGO summary - /// @{ - - /// \brief Attach profile summary metadata to this module. - void setProfileSummary(Metadata *M); - - /// \brief Returns profile summary metadata - Metadata *getProfileSummary(); - /// @} -}; - -/// \brief Given "llvm.used" or "llvm.compiler.used" as a global name, collect -/// the initializer elements of that global in Set and return the global itself. -GlobalVariable *collectUsedGlobalVariables(const Module &M, - SmallPtrSetImpl &Set, - bool CompilerUsed); - -/// An raw_ostream inserter for modules. -inline raw_ostream &operator<<(raw_ostream &O, const Module &M) { - M.print(O, nullptr); - return O; -} - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Module, LLVMModuleRef) - -/* LLVMModuleProviderRef exists for historical reasons, but now just holds a - * Module. - */ -inline Module *unwrap(LLVMModuleProviderRef MP) { - return reinterpret_cast(MP); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/ModuleSlotTracker.h b/llvm/include/llvm/IR/ModuleSlotTracker.h deleted file mode 100644 index eb26fba9..00000000 --- a/llvm/include/llvm/IR/ModuleSlotTracker.h +++ /dev/null @@ -1,80 +0,0 @@ -//===-- llvm/IR/ModuleSlotTracker.h -----------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_MODULESLOTTRACKER_H -#define LLVM_IR_MODULESLOTTRACKER_H - -#include - -namespace llvm { - -class Module; -class Function; -class SlotTracker; -class Value; - -/// Manage lifetime of a slot tracker for printing IR. -/// -/// Wrapper around the \a SlotTracker used internally by \a AsmWriter. This -/// class allows callers to share the cost of incorporating the metadata in a -/// module or a function. -/// -/// If the IR changes from underneath \a ModuleSlotTracker, strings like -/// "" will be printed, or, worse, the wrong slots entirely. -class ModuleSlotTracker { - /// Storage for a slot tracker. - std::unique_ptr MachineStorage; - bool ShouldCreateStorage = false; - bool ShouldInitializeAllMetadata = false; - - const Module *M = nullptr; - const Function *F = nullptr; - SlotTracker *Machine = nullptr; - -public: - /// Wrap a preinitialized SlotTracker. - ModuleSlotTracker(SlotTracker &Machine, const Module *M, - const Function *F = nullptr); - - /// Construct a slot tracker from a module. - /// - /// If \a M is \c nullptr, uses a null slot tracker. Otherwise, initializes - /// a slot tracker, and initializes all metadata slots. \c - /// ShouldInitializeAllMetadata defaults to true because this is expected to - /// be shared between multiple callers, and otherwise MDNode references will - /// not match up. - explicit ModuleSlotTracker(const Module *M, - bool ShouldInitializeAllMetadata = true); - - /// Destructor to clean up storage. - ~ModuleSlotTracker(); - - /// Lazily creates a slot tracker. - SlotTracker *getMachine(); - - const Module *getModule() const { return M; } - const Function *getCurrentFunction() const { return F; } - - /// Incorporate the given function. - /// - /// Purge the currently incorporated function and incorporate \c F. If \c F - /// is currently incorporated, this is a no-op. - void incorporateFunction(const Function &F); - - /// Return the slot number of the specified local value. - /// - /// A function that defines this value should be incorporated prior to calling - /// this method. - /// Return -1 if the value is not in the function's SlotTracker. - int getLocalSlot(const Value *V); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h b/llvm/include/llvm/IR/ModuleSummaryIndex.h deleted file mode 100644 index 45d9bf7a..00000000 --- a/llvm/include/llvm/IR/ModuleSummaryIndex.h +++ /dev/null @@ -1,508 +0,0 @@ -//===-- llvm/ModuleSummaryIndex.h - Module Summary Index --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -/// @file -/// ModuleSummaryIndex.h This file contains the declarations the classes that -/// hold the module index and summary for function importing. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_MODULESUMMARYINDEX_H -#define LLVM_IR_MODULESUMMARYINDEX_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/DenseSet.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/IR/Module.h" - -#include - -namespace llvm { - -/// \brief Class to accumulate and hold information about a callee. -struct CalleeInfo { - /// The static number of callsites calling corresponding function. - unsigned CallsiteCount; - /// The cumulative profile count of calls to corresponding function - /// (if using PGO, otherwise 0). - uint64_t ProfileCount; - CalleeInfo() : CallsiteCount(0), ProfileCount(0) {} - CalleeInfo(unsigned CallsiteCount, uint64_t ProfileCount) - : CallsiteCount(CallsiteCount), ProfileCount(ProfileCount) {} - CalleeInfo &operator+=(uint64_t RHSProfileCount) { - CallsiteCount++; - ProfileCount += RHSProfileCount; - return *this; - } -}; - -/// Struct to hold value either by GUID or Value*, depending on whether this -/// is a combined or per-module index, respectively. -struct ValueInfo { - /// The value representation used in this instance. - enum ValueInfoKind { - VI_GUID, - VI_Value, - }; - - /// Union of the two possible value types. - union ValueUnion { - GlobalValue::GUID Id; - const Value *V; - ValueUnion(GlobalValue::GUID Id) : Id(Id) {} - ValueUnion(const Value *V) : V(V) {} - }; - - /// The value being represented. - ValueUnion TheValue; - /// The value representation. - ValueInfoKind Kind; - /// Constructor for a GUID value - ValueInfo(GlobalValue::GUID Id = 0) : TheValue(Id), Kind(VI_GUID) {} - /// Constructor for a Value* value - ValueInfo(const Value *V) : TheValue(V), Kind(VI_Value) {} - /// Accessor for GUID value - GlobalValue::GUID getGUID() const { - assert(Kind == VI_GUID && "Not a GUID type"); - return TheValue.Id; - } - /// Accessor for Value* value - const Value *getValue() const { - assert(Kind == VI_Value && "Not a Value type"); - return TheValue.V; - } - bool isGUID() const { return Kind == VI_GUID; } -}; - -/// \brief Function and variable summary information to aid decisions and -/// implementation of importing. -class GlobalValueSummary { -public: - /// \brief Sububclass discriminator (for dyn_cast<> et al.) - enum SummaryKind { AliasKind, FunctionKind, GlobalVarKind }; - - /// Group flags (Linkage, hasSection, isOptSize, etc.) as a bitfield. - struct GVFlags { - /// \brief The linkage type of the associated global value. - /// - /// One use is to flag values that have local linkage types and need to - /// have module identifier appended before placing into the combined - /// index, to disambiguate from other values with the same name. - /// In the future this will be used to update and optimize linkage - /// types based on global summary-based analysis. - unsigned Linkage : 4; - - /// Indicate if the global value is located in a specific section. - unsigned HasSection : 1; - - /// Convenience Constructors - explicit GVFlags(GlobalValue::LinkageTypes Linkage, bool HasSection) - : Linkage(Linkage), HasSection(HasSection) {} - GVFlags(const GlobalValue &GV) - : Linkage(GV.getLinkage()), HasSection(GV.hasSection()) {} - }; - -private: - /// Kind of summary for use in dyn_cast<> et al. - SummaryKind Kind; - - /// This is the hash of the name of the symbol in the original file. It is - /// identical to the GUID for global symbols, but differs for local since the - /// GUID includes the module level id in the hash. - GlobalValue::GUID OriginalName; - - /// \brief Path of module IR containing value's definition, used to locate - /// module during importing. - /// - /// This is only used during parsing of the combined index, or when - /// parsing the per-module index for creation of the combined summary index, - /// not during writing of the per-module index which doesn't contain a - /// module path string table. - StringRef ModulePath; - - GVFlags Flags; - - /// List of values referenced by this global value's definition - /// (either by the initializer of a global variable, or referenced - /// from within a function). This does not include functions called, which - /// are listed in the derived FunctionSummary object. - std::vector RefEdgeList; - -protected: - /// GlobalValueSummary constructor. - GlobalValueSummary(SummaryKind K, GVFlags Flags) : Kind(K), Flags(Flags) {} - -public: - virtual ~GlobalValueSummary() = default; - - /// Returns the hash of the original name, it is identical to the GUID for - /// externally visible symbols, but not for local ones. - GlobalValue::GUID getOriginalName() { return OriginalName; } - - /// Initialize the original name hash in this summary. - void setOriginalName(GlobalValue::GUID Name) { OriginalName = Name; } - - /// Which kind of summary subclass this is. - SummaryKind getSummaryKind() const { return Kind; } - - /// Set the path to the module containing this function, for use in - /// the combined index. - void setModulePath(StringRef ModPath) { ModulePath = ModPath; } - - /// Get the path to the module containing this function. - StringRef modulePath() const { return ModulePath; } - - /// Get the flags for this GlobalValue (see \p struct GVFlags). - GVFlags flags() { return Flags; } - - /// Return linkage type recorded for this global value. - GlobalValue::LinkageTypes linkage() const { - return static_cast(Flags.Linkage); - } - - /// Sets the linkage to the value determined by global summary-based - /// optimization. Will be applied in the ThinLTO backends. - void setLinkage(GlobalValue::LinkageTypes Linkage) { - Flags.Linkage = Linkage; - } - - /// Return true if this summary is for a GlobalValue that needs promotion - /// to be referenced from another module. - bool needsRenaming() const { return GlobalValue::isLocalLinkage(linkage()); } - - /// Return true if this global value is located in a specific section. - bool hasSection() const { return Flags.HasSection; } - - /// Record a reference from this global value to the global value identified - /// by \p RefGUID. - void addRefEdge(GlobalValue::GUID RefGUID) { RefEdgeList.push_back(RefGUID); } - - /// Record a reference from this global value to the global value identified - /// by \p RefV. - void addRefEdge(const Value *RefV) { RefEdgeList.push_back(RefV); } - - /// Record a reference from this global value to each global value identified - /// in \p RefEdges. - void addRefEdges(DenseSet &RefEdges) { - for (auto &RI : RefEdges) - addRefEdge(RI); - } - - /// Return the list of values referenced by this global value definition. - std::vector &refs() { return RefEdgeList; } - const std::vector &refs() const { return RefEdgeList; } -}; - -/// \brief Alias summary information. -class AliasSummary : public GlobalValueSummary { - GlobalValueSummary *AliaseeSummary; - -public: - /// Summary constructors. - AliasSummary(GVFlags Flags) : GlobalValueSummary(AliasKind, Flags) {} - - /// Check if this is an alias summary. - static bool classof(const GlobalValueSummary *GVS) { - return GVS->getSummaryKind() == AliasKind; - } - - void setAliasee(GlobalValueSummary *Aliasee) { AliaseeSummary = Aliasee; } - - const GlobalValueSummary &getAliasee() const { - return const_cast(this)->getAliasee(); - } - - GlobalValueSummary &getAliasee() { - assert(AliaseeSummary && "Unexpected missing aliasee summary"); - return *AliaseeSummary; - } -}; - -/// \brief Function summary information to aid decisions and implementation of -/// importing. -class FunctionSummary : public GlobalValueSummary { -public: - /// call edge pair. - typedef std::pair EdgeTy; - -private: - /// Number of instructions (ignoring debug instructions, e.g.) computed - /// during the initial compile step when the summary index is first built. - unsigned InstCount; - - /// List of call edge pairs from this function. - std::vector CallGraphEdgeList; - -public: - /// Summary constructors. - FunctionSummary(GVFlags Flags, unsigned NumInsts) - : GlobalValueSummary(FunctionKind, Flags), InstCount(NumInsts) {} - - /// Check if this is a function summary. - static bool classof(const GlobalValueSummary *GVS) { - return GVS->getSummaryKind() == FunctionKind; - } - - /// Get the instruction count recorded for this function. - unsigned instCount() const { return InstCount; } - - /// Record a call graph edge from this function to the function identified - /// by \p CalleeGUID, with \p CalleeInfo including the cumulative profile - /// count (across all calls from this function) or 0 if no PGO. - void addCallGraphEdge(GlobalValue::GUID CalleeGUID, CalleeInfo Info) { - CallGraphEdgeList.push_back(std::make_pair(CalleeGUID, Info)); - } - - /// Record a call graph edge from this function to each function GUID recorded - /// in \p CallGraphEdges. - void - addCallGraphEdges(DenseMap &CallGraphEdges) { - for (auto &EI : CallGraphEdges) - addCallGraphEdge(EI.first, EI.second); - } - - /// Record a call graph edge from this function to the function identified - /// by \p CalleeV, with \p CalleeInfo including the cumulative profile - /// count (across all calls from this function) or 0 if no PGO. - void addCallGraphEdge(const Value *CalleeV, CalleeInfo Info) { - CallGraphEdgeList.push_back(std::make_pair(CalleeV, Info)); - } - - /// Record a call graph edge from this function to each function recorded - /// in \p CallGraphEdges. - void addCallGraphEdges(DenseMap &CallGraphEdges) { - for (auto &EI : CallGraphEdges) - addCallGraphEdge(EI.first, EI.second); - } - - /// Return the list of pairs. - std::vector &calls() { return CallGraphEdgeList; } - const std::vector &calls() const { return CallGraphEdgeList; } -}; - -/// \brief Global variable summary information to aid decisions and -/// implementation of importing. -/// -/// Currently this doesn't add anything to the base \p GlobalValueSummary, -/// but is a placeholder as additional info may be added to the summary -/// for variables. -class GlobalVarSummary : public GlobalValueSummary { - -public: - /// Summary constructors. - GlobalVarSummary(GVFlags Flags) : GlobalValueSummary(GlobalVarKind, Flags) {} - - /// Check if this is a global variable summary. - static bool classof(const GlobalValueSummary *GVS) { - return GVS->getSummaryKind() == GlobalVarKind; - } -}; - -/// 160 bits SHA1 -typedef std::array ModuleHash; - -/// List of global value summary structures for a particular value held -/// in the GlobalValueMap. Requires a vector in the case of multiple -/// COMDAT values of the same name. -typedef std::vector> GlobalValueSummaryList; - -/// Map from global value GUID to corresponding summary structures. -/// Use a std::map rather than a DenseMap since it will likely incur -/// less overhead, as the value type is not very small and the size -/// of the map is unknown, resulting in inefficiencies due to repeated -/// insertions and resizing. -typedef std::map - GlobalValueSummaryMapTy; - -/// Type used for iterating through the global value summary map. -typedef GlobalValueSummaryMapTy::const_iterator const_gvsummary_iterator; -typedef GlobalValueSummaryMapTy::iterator gvsummary_iterator; - -/// String table to hold/own module path strings, which additionally holds the -/// module ID assigned to each module during the plugin step, as well as a hash -/// of the module. The StringMap makes a copy of and owns inserted strings. -typedef StringMap> ModulePathStringTableTy; - -/// Map of global value GUID to its summary, used to identify values defined in -/// a particular module, and provide efficient access to their summary. -typedef std::map GVSummaryMapTy; - -/// Class to hold module path string table and global value map, -/// and encapsulate methods for operating on them. -class ModuleSummaryIndex { -private: - /// Map from value name to list of summary instances for values of that - /// name (may be duplicates in the COMDAT case, e.g.). - GlobalValueSummaryMapTy GlobalValueMap; - - /// Holds strings for combined index, mapping to the corresponding module ID. - ModulePathStringTableTy ModulePathStringTable; - -public: - ModuleSummaryIndex() = default; - - // Disable the copy constructor and assignment operators, so - // no unexpected copying/moving occurs. - ModuleSummaryIndex(const ModuleSummaryIndex &) = delete; - void operator=(const ModuleSummaryIndex &) = delete; - - gvsummary_iterator begin() { return GlobalValueMap.begin(); } - const_gvsummary_iterator begin() const { return GlobalValueMap.begin(); } - gvsummary_iterator end() { return GlobalValueMap.end(); } - const_gvsummary_iterator end() const { return GlobalValueMap.end(); } - - /// Get the list of global value summary objects for a given value name. - const GlobalValueSummaryList &getGlobalValueSummaryList(StringRef ValueName) { - return GlobalValueMap[GlobalValue::getGUID(ValueName)]; - } - - /// Get the list of global value summary objects for a given value name. - const const_gvsummary_iterator - findGlobalValueSummaryList(StringRef ValueName) const { - return GlobalValueMap.find(GlobalValue::getGUID(ValueName)); - } - - /// Get the list of global value summary objects for a given value GUID. - const const_gvsummary_iterator - findGlobalValueSummaryList(GlobalValue::GUID ValueGUID) const { - return GlobalValueMap.find(ValueGUID); - } - - /// Add a global value summary for a value of the given name. - void addGlobalValueSummary(StringRef ValueName, - std::unique_ptr Summary) { - GlobalValueMap[GlobalValue::getGUID(ValueName)].push_back( - std::move(Summary)); - } - - /// Add a global value summary for a value of the given GUID. - void addGlobalValueSummary(GlobalValue::GUID ValueGUID, - std::unique_ptr Summary) { - GlobalValueMap[ValueGUID].push_back(std::move(Summary)); - } - - /// Find the summary for global \p GUID in module \p ModuleId, or nullptr if - /// not found. - GlobalValueSummary *findSummaryInModule(GlobalValue::GUID ValueGUID, - StringRef ModuleId) const { - auto CalleeInfoList = findGlobalValueSummaryList(ValueGUID); - if (CalleeInfoList == end()) { - return nullptr; // This function does not have a summary - } - auto Summary = - llvm::find_if(CalleeInfoList->second, - [&](const std::unique_ptr &Summary) { - return Summary->modulePath() == ModuleId; - }); - if (Summary == CalleeInfoList->second.end()) - return nullptr; - return Summary->get(); - } - - /// Returns the first GlobalValueSummary for \p GV, asserting that there - /// is only one if \p PerModuleIndex. - GlobalValueSummary *getGlobalValueSummary(const GlobalValue &GV, - bool PerModuleIndex = true) const { - assert(GV.hasName() && "Can't get GlobalValueSummary for GV with no name"); - return getGlobalValueSummary(GlobalValue::getGUID(GV.getName()), - PerModuleIndex); - } - - /// Returns the first GlobalValueSummary for \p ValueGUID, asserting that - /// there - /// is only one if \p PerModuleIndex. - GlobalValueSummary *getGlobalValueSummary(GlobalValue::GUID ValueGUID, - bool PerModuleIndex = true) const; - - /// Table of modules, containing module hash and id. - const StringMap> &modulePaths() const { - return ModulePathStringTable; - } - - /// Table of modules, containing hash and id. - StringMap> &modulePaths() { - return ModulePathStringTable; - } - - /// Get the module ID recorded for the given module path. - uint64_t getModuleId(const StringRef ModPath) const { - return ModulePathStringTable.lookup(ModPath).first; - } - - /// Get the module SHA1 hash recorded for the given module path. - const ModuleHash &getModuleHash(const StringRef ModPath) const { - auto It = ModulePathStringTable.find(ModPath); - assert(It != ModulePathStringTable.end() && "Module not registered"); - return It->second.second; - } - - /// Add the given per-module index into this module index/summary, - /// assigning it the given module ID. Each module merged in should have - /// a unique ID, necessary for consistent renaming of promoted - /// static (local) variables. - void mergeFrom(std::unique_ptr Other, - uint64_t NextModuleId); - - /// Convenience method for creating a promoted global name - /// for the given value name of a local, and its original module's ID. - static std::string getGlobalNameForLocal(StringRef Name, ModuleHash ModHash) { - SmallString<256> NewName(Name); - NewName += ".llvm."; - NewName += utohexstr(ModHash[0]); // Take the first 32 bits - return NewName.str(); - } - - /// Helper to obtain the unpromoted name for a global value (or the original - /// name if not promoted). - static StringRef getOriginalNameBeforePromote(StringRef Name) { - std::pair Pair = Name.split(".llvm."); - return Pair.first; - } - - /// Add a new module path with the given \p Hash, mapped to the given \p - /// ModID, and return an iterator to the entry in the index. - ModulePathStringTableTy::iterator - addModulePath(StringRef ModPath, uint64_t ModId, - ModuleHash Hash = ModuleHash{{0}}) { - return ModulePathStringTable.insert(std::make_pair( - ModPath, - std::make_pair(ModId, Hash))).first; - } - - /// Check if the given Module has any functions available for exporting - /// in the index. We consider any module present in the ModulePathStringTable - /// to have exported functions. - bool hasExportedFunctions(const Module &M) const { - return ModulePathStringTable.count(M.getModuleIdentifier()); - } - - /// Remove entries in the GlobalValueMap that have empty summaries due to the - /// eager nature of map entry creation during VST parsing. These would - /// also be suppressed during combined index generation in mergeFrom(), - /// but if there was only one module or this was the first module we might - /// not invoke mergeFrom. - void removeEmptySummaryEntries(); - - /// Collect for the given module the list of function it defines - /// (GUID -> Summary). - void collectDefinedFunctionsForModule(StringRef ModulePath, - GVSummaryMapTy &GVSummaryMap) const; - - /// Collect for each module the list of Summaries it defines (GUID -> - /// Summary). - void collectDefinedGVSummariesPerModule( - StringMap &ModuleToDefinedGVSummaries) const; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/NoFolder.h b/llvm/include/llvm/IR/NoFolder.h deleted file mode 100644 index 61f4817a..00000000 --- a/llvm/include/llvm/IR/NoFolder.h +++ /dev/null @@ -1,299 +0,0 @@ -//===- NoFolder.h - Constant folding helper ---------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the NoFolder class, a helper for IRBuilder. It provides -// IRBuilder with a set of methods for creating unfolded constants. This is -// useful for learners trying to understand how LLVM IR works, and who don't -// want details to be hidden by the constant folder. For general constant -// creation and folding, use ConstantExpr and the routines in -// llvm/Analysis/ConstantFolding.h. -// -// Note: since it is not actually possible to create unfolded constants, this -// class returns instructions rather than constants. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_NOFOLDER_H -#define LLVM_IR_NOFOLDER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/Instructions.h" - -namespace llvm { - -/// NoFolder - Create "constants" (actually, instructions) with no folding. -class NoFolder { -public: - explicit NoFolder() {} - - //===--------------------------------------------------------------------===// - // Binary Operators - //===--------------------------------------------------------------------===// - - Instruction *CreateAdd(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS); - if (HasNUW) BO->setHasNoUnsignedWrap(); - if (HasNSW) BO->setHasNoSignedWrap(); - return BO; - } - Instruction *CreateNSWAdd(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateNSWAdd(LHS, RHS); - } - Instruction *CreateNUWAdd(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateNUWAdd(LHS, RHS); - } - Instruction *CreateFAdd(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateFAdd(LHS, RHS); - } - Instruction *CreateSub(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS); - if (HasNUW) BO->setHasNoUnsignedWrap(); - if (HasNSW) BO->setHasNoSignedWrap(); - return BO; - } - Instruction *CreateNSWSub(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateNSWSub(LHS, RHS); - } - Instruction *CreateNUWSub(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateNUWSub(LHS, RHS); - } - Instruction *CreateFSub(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateFSub(LHS, RHS); - } - Instruction *CreateMul(Constant *LHS, Constant *RHS, - bool HasNUW = false, bool HasNSW = false) const { - BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS); - if (HasNUW) BO->setHasNoUnsignedWrap(); - if (HasNSW) BO->setHasNoSignedWrap(); - return BO; - } - Instruction *CreateNSWMul(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateNSWMul(LHS, RHS); - } - Instruction *CreateNUWMul(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateNUWMul(LHS, RHS); - } - Instruction *CreateFMul(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateFMul(LHS, RHS); - } - Instruction *CreateUDiv(Constant *LHS, Constant *RHS, - bool isExact = false) const { - if (!isExact) - return BinaryOperator::CreateUDiv(LHS, RHS); - return BinaryOperator::CreateExactUDiv(LHS, RHS); - } - Instruction *CreateExactUDiv(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateExactUDiv(LHS, RHS); - } - Instruction *CreateSDiv(Constant *LHS, Constant *RHS, - bool isExact = false) const { - if (!isExact) - return BinaryOperator::CreateSDiv(LHS, RHS); - return BinaryOperator::CreateExactSDiv(LHS, RHS); - } - Instruction *CreateExactSDiv(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateExactSDiv(LHS, RHS); - } - Instruction *CreateFDiv(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateFDiv(LHS, RHS); - } - Instruction *CreateURem(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateURem(LHS, RHS); - } - Instruction *CreateSRem(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateSRem(LHS, RHS); - } - Instruction *CreateFRem(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateFRem(LHS, RHS); - } - Instruction *CreateShl(Constant *LHS, Constant *RHS, bool HasNUW = false, - bool HasNSW = false) const { - BinaryOperator *BO = BinaryOperator::CreateShl(LHS, RHS); - if (HasNUW) BO->setHasNoUnsignedWrap(); - if (HasNSW) BO->setHasNoSignedWrap(); - return BO; - } - Instruction *CreateLShr(Constant *LHS, Constant *RHS, - bool isExact = false) const { - if (!isExact) - return BinaryOperator::CreateLShr(LHS, RHS); - return BinaryOperator::CreateExactLShr(LHS, RHS); - } - Instruction *CreateAShr(Constant *LHS, Constant *RHS, - bool isExact = false) const { - if (!isExact) - return BinaryOperator::CreateAShr(LHS, RHS); - return BinaryOperator::CreateExactAShr(LHS, RHS); - } - Instruction *CreateAnd(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateAnd(LHS, RHS); - } - Instruction *CreateOr(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateOr(LHS, RHS); - } - Instruction *CreateXor(Constant *LHS, Constant *RHS) const { - return BinaryOperator::CreateXor(LHS, RHS); - } - - Instruction *CreateBinOp(Instruction::BinaryOps Opc, - Constant *LHS, Constant *RHS) const { - return BinaryOperator::Create(Opc, LHS, RHS); - } - - //===--------------------------------------------------------------------===// - // Unary Operators - //===--------------------------------------------------------------------===// - - Instruction *CreateNeg(Constant *C, - bool HasNUW = false, bool HasNSW = false) const { - BinaryOperator *BO = BinaryOperator::CreateNeg(C); - if (HasNUW) BO->setHasNoUnsignedWrap(); - if (HasNSW) BO->setHasNoSignedWrap(); - return BO; - } - Instruction *CreateNSWNeg(Constant *C) const { - return BinaryOperator::CreateNSWNeg(C); - } - Instruction *CreateNUWNeg(Constant *C) const { - return BinaryOperator::CreateNUWNeg(C); - } - Instruction *CreateFNeg(Constant *C) const { - return BinaryOperator::CreateFNeg(C); - } - Instruction *CreateNot(Constant *C) const { - return BinaryOperator::CreateNot(C); - } - - //===--------------------------------------------------------------------===// - // Memory Instructions - //===--------------------------------------------------------------------===// - - Constant *CreateGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return ConstantExpr::getGetElementPtr(Ty, C, IdxList); - } - Constant *CreateGetElementPtr(Type *Ty, Constant *C, Constant *Idx) const { - // This form of the function only exists to avoid ambiguous overload - // warnings about whether to convert Idx to ArrayRef or - // ArrayRef. - return ConstantExpr::getGetElementPtr(Ty, C, Idx); - } - Instruction *CreateGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return GetElementPtrInst::Create(Ty, C, IdxList); - } - - Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return ConstantExpr::getInBoundsGetElementPtr(Ty, C, IdxList); - } - Constant *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - Constant *Idx) const { - // This form of the function only exists to avoid ambiguous overload - // warnings about whether to convert Idx to ArrayRef or - // ArrayRef. - return ConstantExpr::getInBoundsGetElementPtr(Ty, C, Idx); - } - Instruction *CreateInBoundsGetElementPtr(Type *Ty, Constant *C, - ArrayRef IdxList) const { - return GetElementPtrInst::CreateInBounds(Ty, C, IdxList); - } - - //===--------------------------------------------------------------------===// - // Cast/Conversion Operators - //===--------------------------------------------------------------------===// - - Instruction *CreateCast(Instruction::CastOps Op, Constant *C, - Type *DestTy) const { - return CastInst::Create(Op, C, DestTy); - } - Instruction *CreatePointerCast(Constant *C, Type *DestTy) const { - return CastInst::CreatePointerCast(C, DestTy); - } - Instruction *CreateIntCast(Constant *C, Type *DestTy, - bool isSigned) const { - return CastInst::CreateIntegerCast(C, DestTy, isSigned); - } - Instruction *CreateFPCast(Constant *C, Type *DestTy) const { - return CastInst::CreateFPCast(C, DestTy); - } - - Instruction *CreateBitCast(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::BitCast, C, DestTy); - } - Instruction *CreateIntToPtr(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::IntToPtr, C, DestTy); - } - Instruction *CreatePtrToInt(Constant *C, Type *DestTy) const { - return CreateCast(Instruction::PtrToInt, C, DestTy); - } - Instruction *CreateZExtOrBitCast(Constant *C, Type *DestTy) const { - return CastInst::CreateZExtOrBitCast(C, DestTy); - } - Instruction *CreateSExtOrBitCast(Constant *C, Type *DestTy) const { - return CastInst::CreateSExtOrBitCast(C, DestTy); - } - - Instruction *CreateTruncOrBitCast(Constant *C, Type *DestTy) const { - return CastInst::CreateTruncOrBitCast(C, DestTy); - } - - //===--------------------------------------------------------------------===// - // Compare Instructions - //===--------------------------------------------------------------------===// - - Instruction *CreateICmp(CmpInst::Predicate P, - Constant *LHS, Constant *RHS) const { - return new ICmpInst(P, LHS, RHS); - } - Instruction *CreateFCmp(CmpInst::Predicate P, - Constant *LHS, Constant *RHS) const { - return new FCmpInst(P, LHS, RHS); - } - - //===--------------------------------------------------------------------===// - // Other Instructions - //===--------------------------------------------------------------------===// - - Instruction *CreateSelect(Constant *C, - Constant *True, Constant *False) const { - return SelectInst::Create(C, True, False); - } - - Instruction *CreateExtractElement(Constant *Vec, Constant *Idx) const { - return ExtractElementInst::Create(Vec, Idx); - } - - Instruction *CreateInsertElement(Constant *Vec, Constant *NewElt, - Constant *Idx) const { - return InsertElementInst::Create(Vec, NewElt, Idx); - } - - Instruction *CreateShuffleVector(Constant *V1, Constant *V2, - Constant *Mask) const { - return new ShuffleVectorInst(V1, V2, Mask); - } - - Instruction *CreateExtractValue(Constant *Agg, - ArrayRef IdxList) const { - return ExtractValueInst::Create(Agg, IdxList); - } - - Instruction *CreateInsertValue(Constant *Agg, Constant *Val, - ArrayRef IdxList) const { - return InsertValueInst::Create(Agg, Val, IdxList); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/IR/OperandTraits.h b/llvm/include/llvm/IR/OperandTraits.h deleted file mode 100644 index e97a8009..00000000 --- a/llvm/include/llvm/IR/OperandTraits.h +++ /dev/null @@ -1,160 +0,0 @@ -//===-- llvm/OperandTraits.h - OperandTraits class definition ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the traits classes that are handy for enforcing the correct -// layout of various User subclasses. It also provides the means for accessing -// the operands in the most efficient manner. -// - -#ifndef LLVM_IR_OPERANDTRAITS_H -#define LLVM_IR_OPERANDTRAITS_H - -#include "llvm/IR/User.h" - -namespace llvm { - -//===----------------------------------------------------------------------===// -// FixedNumOperand Trait Class -//===----------------------------------------------------------------------===// - -/// FixedNumOperandTraits - determine the allocation regime of the Use array -/// when it is a prefix to the User object, and the number of Use objects is -/// known at compile time. - -template -struct FixedNumOperandTraits { - static Use *op_begin(SubClass* U) { - return reinterpret_cast(U) - ARITY; - } - static Use *op_end(SubClass* U) { - return reinterpret_cast(U); - } - static unsigned operands(const User*) { - return ARITY; - } -}; - -//===----------------------------------------------------------------------===// -// OptionalOperand Trait Class -//===----------------------------------------------------------------------===// - -/// OptionalOperandTraits - when the number of operands may change at runtime. -/// Naturally it may only decrease, because the allocations may not change. - -template -struct OptionalOperandTraits : public FixedNumOperandTraits { - static unsigned operands(const User *U) { - return U->getNumOperands(); - } -}; - -//===----------------------------------------------------------------------===// -// VariadicOperand Trait Class -//===----------------------------------------------------------------------===// - -/// VariadicOperandTraits - determine the allocation regime of the Use array -/// when it is a prefix to the User object, and the number of Use objects is -/// only known at allocation time. - -template -struct VariadicOperandTraits { - static Use *op_begin(SubClass* U) { - return reinterpret_cast(U) - static_cast(U)->getNumOperands(); - } - static Use *op_end(SubClass* U) { - return reinterpret_cast(U); - } - static unsigned operands(const User *U) { - return U->getNumOperands(); - } -}; - -//===----------------------------------------------------------------------===// -// HungoffOperand Trait Class -//===----------------------------------------------------------------------===// - -/// HungoffOperandTraits - determine the allocation regime of the Use array -/// when it is not a prefix to the User object, but allocated at an unrelated -/// heap address. -/// Assumes that the User subclass that is determined by this traits class -/// has an OperandList member of type User::op_iterator. [Note: this is now -/// trivially satisfied, because User has that member for historic reasons.] -/// -/// This is the traits class that is needed when the Use array must be -/// resizable. - -template -struct HungoffOperandTraits { - static Use *op_begin(User* U) { - return U->getOperandList(); - } - static Use *op_end(User* U) { - return U->getOperandList() + U->getNumOperands(); - } - static unsigned operands(const User *U) { - return U->getNumOperands(); - } -}; - -/// Macro for generating in-class operand accessor declarations. -/// It should only be called in the public section of the interface. -/// -#define DECLARE_TRANSPARENT_OPERAND_ACCESSORS(VALUECLASS) \ - public: \ - inline VALUECLASS *getOperand(unsigned) const; \ - inline void setOperand(unsigned, VALUECLASS*); \ - inline op_iterator op_begin(); \ - inline const_op_iterator op_begin() const; \ - inline op_iterator op_end(); \ - inline const_op_iterator op_end() const; \ - protected: \ - template inline Use &Op(); \ - template inline const Use &Op() const; \ - public: \ - inline unsigned getNumOperands() const - -/// Macro for generating out-of-class operand accessor definitions -#define DEFINE_TRANSPARENT_OPERAND_ACCESSORS(CLASS, VALUECLASS) \ -CLASS::op_iterator CLASS::op_begin() { \ - return OperandTraits::op_begin(this); \ -} \ -CLASS::const_op_iterator CLASS::op_begin() const { \ - return OperandTraits::op_begin(const_cast(this)); \ -} \ -CLASS::op_iterator CLASS::op_end() { \ - return OperandTraits::op_end(this); \ -} \ -CLASS::const_op_iterator CLASS::op_end() const { \ - return OperandTraits::op_end(const_cast(this)); \ -} \ -VALUECLASS *CLASS::getOperand(unsigned i_nocapture) const { \ - assert(i_nocapture < OperandTraits::operands(this) \ - && "getOperand() out of range!"); \ - return cast_or_null( \ - OperandTraits::op_begin(const_cast(this))[i_nocapture].get()); \ -} \ -void CLASS::setOperand(unsigned i_nocapture, VALUECLASS *Val_nocapture) { \ - assert(i_nocapture < OperandTraits::operands(this) \ - && "setOperand() out of range!"); \ - OperandTraits::op_begin(this)[i_nocapture] = Val_nocapture; \ -} \ -unsigned CLASS::getNumOperands() const { \ - return OperandTraits::operands(this); \ -} \ -template Use &CLASS::Op() { \ - return this->OpFrom(this); \ -} \ -template const Use &CLASS::Op() const { \ - return this->OpFrom(this); \ -} - - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Operator.h b/llvm/include/llvm/IR/Operator.h deleted file mode 100644 index 5880290f..00000000 --- a/llvm/include/llvm/IR/Operator.h +++ /dev/null @@ -1,498 +0,0 @@ -//===-- llvm/Operator.h - Operator utility subclass -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines various classes for working with Instructions and -// ConstantExprs. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_OPERATOR_H -#define LLVM_IR_OPERATOR_H - -#include "llvm/IR/Constants.h" -#include "llvm/IR/DataLayout.h" -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/Instruction.h" -#include "llvm/IR/Type.h" - -namespace llvm { - -class GetElementPtrInst; -class BinaryOperator; -class ConstantExpr; - -/// This is a utility class that provides an abstraction for the common -/// functionality between Instructions and ConstantExprs. -class Operator : public User { -private: - // The Operator class is intended to be used as a utility, and is never itself - // instantiated. - void *operator new(size_t, unsigned) = delete; - void *operator new(size_t s) = delete; - Operator() = delete; - -protected: - // NOTE: Cannot use = delete because it's not legal to delete - // an overridden method that's not deleted in the base class. Cannot leave - // this unimplemented because that leads to an ODR-violation. - ~Operator() override; - -public: - /// Return the opcode for this Instruction or ConstantExpr. - unsigned getOpcode() const { - if (const Instruction *I = dyn_cast(this)) - return I->getOpcode(); - return cast(this)->getOpcode(); - } - - /// If V is an Instruction or ConstantExpr, return its opcode. - /// Otherwise return UserOp1. - static unsigned getOpcode(const Value *V) { - if (const Instruction *I = dyn_cast(V)) - return I->getOpcode(); - if (const ConstantExpr *CE = dyn_cast(V)) - return CE->getOpcode(); - return Instruction::UserOp1; - } - - static inline bool classof(const Instruction *) { return true; } - static inline bool classof(const ConstantExpr *) { return true; } - static inline bool classof(const Value *V) { - return isa(V) || isa(V); - } -}; - -/// Utility class for integer arithmetic operators which may exhibit overflow - -/// Add, Sub, and Mul. It does not include SDiv, despite that operator having -/// the potential for overflow. -class OverflowingBinaryOperator : public Operator { -public: - enum { - NoUnsignedWrap = (1 << 0), - NoSignedWrap = (1 << 1) - }; - -private: - friend class Instruction; - friend class ConstantExpr; - void setHasNoUnsignedWrap(bool B) { - SubclassOptionalData = - (SubclassOptionalData & ~NoUnsignedWrap) | (B * NoUnsignedWrap); - } - void setHasNoSignedWrap(bool B) { - SubclassOptionalData = - (SubclassOptionalData & ~NoSignedWrap) | (B * NoSignedWrap); - } - -public: - /// Test whether this operation is known to never - /// undergo unsigned overflow, aka the nuw property. - bool hasNoUnsignedWrap() const { - return SubclassOptionalData & NoUnsignedWrap; - } - - /// Test whether this operation is known to never - /// undergo signed overflow, aka the nsw property. - bool hasNoSignedWrap() const { - return (SubclassOptionalData & NoSignedWrap) != 0; - } - - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Instruction::Add || - I->getOpcode() == Instruction::Sub || - I->getOpcode() == Instruction::Mul || - I->getOpcode() == Instruction::Shl; - } - static inline bool classof(const ConstantExpr *CE) { - return CE->getOpcode() == Instruction::Add || - CE->getOpcode() == Instruction::Sub || - CE->getOpcode() == Instruction::Mul || - CE->getOpcode() == Instruction::Shl; - } - static inline bool classof(const Value *V) { - return (isa(V) && classof(cast(V))) || - (isa(V) && classof(cast(V))); - } -}; - -/// A udiv or sdiv instruction, which can be marked as "exact", -/// indicating that no bits are destroyed. -class PossiblyExactOperator : public Operator { -public: - enum { - IsExact = (1 << 0) - }; - -private: - friend class Instruction; - friend class ConstantExpr; - void setIsExact(bool B) { - SubclassOptionalData = (SubclassOptionalData & ~IsExact) | (B * IsExact); - } - -public: - /// Test whether this division is known to be exact, with zero remainder. - bool isExact() const { - return SubclassOptionalData & IsExact; - } - - static bool isPossiblyExactOpcode(unsigned OpC) { - return OpC == Instruction::SDiv || - OpC == Instruction::UDiv || - OpC == Instruction::AShr || - OpC == Instruction::LShr; - } - static inline bool classof(const ConstantExpr *CE) { - return isPossiblyExactOpcode(CE->getOpcode()); - } - static inline bool classof(const Instruction *I) { - return isPossiblyExactOpcode(I->getOpcode()); - } - static inline bool classof(const Value *V) { - return (isa(V) && classof(cast(V))) || - (isa(V) && classof(cast(V))); - } -}; - -/// Convenience struct for specifying and reasoning about fast-math flags. -class FastMathFlags { -private: - friend class FPMathOperator; - unsigned Flags; - FastMathFlags(unsigned F) : Flags(F) { } - -public: - enum { - UnsafeAlgebra = (1 << 0), - NoNaNs = (1 << 1), - NoInfs = (1 << 2), - NoSignedZeros = (1 << 3), - AllowReciprocal = (1 << 4) - }; - - FastMathFlags() : Flags(0) - { } - - /// Whether any flag is set - bool any() const { return Flags != 0; } - - /// Set all the flags to false - void clear() { Flags = 0; } - - /// Flag queries - bool noNaNs() const { return 0 != (Flags & NoNaNs); } - bool noInfs() const { return 0 != (Flags & NoInfs); } - bool noSignedZeros() const { return 0 != (Flags & NoSignedZeros); } - bool allowReciprocal() const { return 0 != (Flags & AllowReciprocal); } - bool unsafeAlgebra() const { return 0 != (Flags & UnsafeAlgebra); } - - /// Flag setters - void setNoNaNs() { Flags |= NoNaNs; } - void setNoInfs() { Flags |= NoInfs; } - void setNoSignedZeros() { Flags |= NoSignedZeros; } - void setAllowReciprocal() { Flags |= AllowReciprocal; } - void setUnsafeAlgebra() { - Flags |= UnsafeAlgebra; - setNoNaNs(); - setNoInfs(); - setNoSignedZeros(); - setAllowReciprocal(); - } - - void operator&=(const FastMathFlags &OtherFlags) { - Flags &= OtherFlags.Flags; - } -}; - - -/// Utility class for floating point operations which can have -/// information about relaxed accuracy requirements attached to them. -class FPMathOperator : public Operator { -private: - friend class Instruction; - - void setHasUnsafeAlgebra(bool B) { - SubclassOptionalData = - (SubclassOptionalData & ~FastMathFlags::UnsafeAlgebra) | - (B * FastMathFlags::UnsafeAlgebra); - - // Unsafe algebra implies all the others - if (B) { - setHasNoNaNs(true); - setHasNoInfs(true); - setHasNoSignedZeros(true); - setHasAllowReciprocal(true); - } - } - void setHasNoNaNs(bool B) { - SubclassOptionalData = - (SubclassOptionalData & ~FastMathFlags::NoNaNs) | - (B * FastMathFlags::NoNaNs); - } - void setHasNoInfs(bool B) { - SubclassOptionalData = - (SubclassOptionalData & ~FastMathFlags::NoInfs) | - (B * FastMathFlags::NoInfs); - } - void setHasNoSignedZeros(bool B) { - SubclassOptionalData = - (SubclassOptionalData & ~FastMathFlags::NoSignedZeros) | - (B * FastMathFlags::NoSignedZeros); - } - void setHasAllowReciprocal(bool B) { - SubclassOptionalData = - (SubclassOptionalData & ~FastMathFlags::AllowReciprocal) | - (B * FastMathFlags::AllowReciprocal); - } - - /// Convenience function for setting multiple fast-math flags. - /// FMF is a mask of the bits to set. - void setFastMathFlags(FastMathFlags FMF) { - SubclassOptionalData |= FMF.Flags; - } - - /// Convenience function for copying all fast-math flags. - /// All values in FMF are transferred to this operator. - void copyFastMathFlags(FastMathFlags FMF) { - SubclassOptionalData = FMF.Flags; - } - -public: - /// Test whether this operation is permitted to be - /// algebraically transformed, aka the 'A' fast-math property. - bool hasUnsafeAlgebra() const { - return (SubclassOptionalData & FastMathFlags::UnsafeAlgebra) != 0; - } - - /// Test whether this operation's arguments and results are to be - /// treated as non-NaN, aka the 'N' fast-math property. - bool hasNoNaNs() const { - return (SubclassOptionalData & FastMathFlags::NoNaNs) != 0; - } - - /// Test whether this operation's arguments and results are to be - /// treated as NoN-Inf, aka the 'I' fast-math property. - bool hasNoInfs() const { - return (SubclassOptionalData & FastMathFlags::NoInfs) != 0; - } - - /// Test whether this operation can treat the sign of zero - /// as insignificant, aka the 'S' fast-math property. - bool hasNoSignedZeros() const { - return (SubclassOptionalData & FastMathFlags::NoSignedZeros) != 0; - } - - /// Test whether this operation is permitted to use - /// reciprocal instead of division, aka the 'R' fast-math property. - bool hasAllowReciprocal() const { - return (SubclassOptionalData & FastMathFlags::AllowReciprocal) != 0; - } - - /// Convenience function for getting all the fast-math flags - FastMathFlags getFastMathFlags() const { - return FastMathFlags(SubclassOptionalData); - } - - /// \brief Get the maximum error permitted by this operation in ULPs. An - /// accuracy of 0.0 means that the operation should be performed with the - /// default precision. - float getFPAccuracy() const; - - static inline bool classof(const Instruction *I) { - return I->getType()->isFPOrFPVectorTy() || - I->getOpcode() == Instruction::FCmp; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - - -/// A helper template for defining operators for individual opcodes. -template -class ConcreteOperator : public SuperClass { -public: - static inline bool classof(const Instruction *I) { - return I->getOpcode() == Opc; - } - static inline bool classof(const ConstantExpr *CE) { - return CE->getOpcode() == Opc; - } - static inline bool classof(const Value *V) { - return (isa(V) && classof(cast(V))) || - (isa(V) && classof(cast(V))); - } -}; - -class AddOperator - : public ConcreteOperator { -}; -class SubOperator - : public ConcreteOperator { -}; -class MulOperator - : public ConcreteOperator { -}; -class ShlOperator - : public ConcreteOperator { -}; - - -class SDivOperator - : public ConcreteOperator { -}; -class UDivOperator - : public ConcreteOperator { -}; -class AShrOperator - : public ConcreteOperator { -}; -class LShrOperator - : public ConcreteOperator { -}; - - -class ZExtOperator : public ConcreteOperator {}; - - -class GEPOperator - : public ConcreteOperator { - enum { - IsInBounds = (1 << 0) - }; - - friend class GetElementPtrInst; - friend class ConstantExpr; - void setIsInBounds(bool B) { - SubclassOptionalData = - (SubclassOptionalData & ~IsInBounds) | (B * IsInBounds); - } - -public: - /// Test whether this is an inbounds GEP, as defined by LangRef.html. - bool isInBounds() const { - return SubclassOptionalData & IsInBounds; - } - - inline op_iterator idx_begin() { return op_begin()+1; } - inline const_op_iterator idx_begin() const { return op_begin()+1; } - inline op_iterator idx_end() { return op_end(); } - inline const_op_iterator idx_end() const { return op_end(); } - - Value *getPointerOperand() { - return getOperand(0); - } - const Value *getPointerOperand() const { - return getOperand(0); - } - static unsigned getPointerOperandIndex() { - return 0U; // get index for modifying correct operand - } - - /// Method to return the pointer operand as a PointerType. - Type *getPointerOperandType() const { - return getPointerOperand()->getType(); - } - - Type *getSourceElementType() const; - Type *getResultElementType() const; - - /// Method to return the address space of the pointer operand. - unsigned getPointerAddressSpace() const { - return getPointerOperandType()->getPointerAddressSpace(); - } - - unsigned getNumIndices() const { // Note: always non-negative - return getNumOperands() - 1; - } - - bool hasIndices() const { - return getNumOperands() > 1; - } - - /// Return true if all of the indices of this GEP are zeros. - /// If so, the result pointer and the first operand have the same - /// value, just potentially different types. - bool hasAllZeroIndices() const { - for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) { - if (ConstantInt *C = dyn_cast(I)) - if (C->isZero()) - continue; - return false; - } - return true; - } - - /// Return true if all of the indices of this GEP are constant integers. - /// If so, the result pointer and the first operand have - /// a constant offset between them. - bool hasAllConstantIndices() const { - for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) { - if (!isa(I)) - return false; - } - return true; - } - - /// \brief Accumulate the constant address offset of this GEP if possible. - /// - /// This routine accepts an APInt into which it will accumulate the constant - /// offset of this GEP if the GEP is in fact constant. If the GEP is not - /// all-constant, it returns false and the value of the offset APInt is - /// undefined (it is *not* preserved!). The APInt passed into this routine - /// must be at exactly as wide as the IntPtr type for the address space of the - /// base GEP pointer. - bool accumulateConstantOffset(const DataLayout &DL, APInt &Offset) const; -}; - -class PtrToIntOperator - : public ConcreteOperator { - friend class PtrToInt; - friend class ConstantExpr; - -public: - Value *getPointerOperand() { - return getOperand(0); - } - const Value *getPointerOperand() const { - return getOperand(0); - } - static unsigned getPointerOperandIndex() { - return 0U; // get index for modifying correct operand - } - - /// Method to return the pointer operand as a PointerType. - Type *getPointerOperandType() const { - return getPointerOperand()->getType(); - } - - /// Method to return the address space of the pointer operand. - unsigned getPointerAddressSpace() const { - return cast(getPointerOperandType())->getAddressSpace(); - } -}; - -class BitCastOperator - : public ConcreteOperator { - friend class BitCastInst; - friend class ConstantExpr; - -public: - Type *getSrcTy() const { - return getOperand(0)->getType(); - } - - Type *getDestTy() const { - return getType(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/OptBisect.h b/llvm/include/llvm/IR/OptBisect.h deleted file mode 100644 index 9eee65e9..00000000 --- a/llvm/include/llvm/IR/OptBisect.h +++ /dev/null @@ -1,81 +0,0 @@ -//===----------- llvm/IR/OptBisect.h - LLVM Bisect support -------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// This file declares the interface for bisecting optimizations. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_OPTBISECT_H -#define LLVM_IR_OPTBISECT_H - -namespace llvm { - -class Pass; -class StringRef; -class Twine; - -/// This class implements a mechanism to disable passes and individual -/// optimizations at compile time based on a command line option -/// (-opt-bisect-limit) in order to perform a bisecting search for -/// optimization-related problems. -class OptBisect { -public: - /// \brief Default constructor, initializes the OptBisect state based on the - /// -opt-bisect-limit command line argument. - /// - /// By default, bisection is disabled. - /// - /// Clients should not instantiate this class directly. All access should go - /// through LLVMContext. - OptBisect(); - - /// Checks the bisect limit to determine if the specified pass should run. - /// - /// This function will immediate return true if bisection is disabled. If the - /// bisect limit is set to -1, the function will print a message describing - /// the pass and the bisect number assigned to it and return true. Otherwise, - /// the function will print a message with the bisect number assigned to the - /// pass and indicating whether or not the pass will be run and return true if - /// the bisect limit has not yet been exceded or false if it has. - /// - /// Most passes should not call this routine directly. Instead, it is called - /// through a helper routine provided by the pass base class. For instance, - /// function passes should call FunctionPass::skipFunction(). - template - bool shouldRunPass(const Pass *P, const UnitT &U); - - /// Checks the bisect limit to determine if the optimization described by the - /// /p Desc argument should run. - /// - /// This function will immediate return true if bisection is disabled. If the - /// bisect limit is set to -1, the function will print a message with the - /// bisect number assigned to the optimization along with the /p Desc - /// description and return true. Otherwise, the function will print a message - /// with the bisect number assigned to the optimization and indicating whether - /// or not the pass will be run and return true if the bisect limit has not - /// yet been exceded or false if it has. - /// - /// Passes may call this function to provide more fine grained control over - /// individual optimizations performed by the pass. Passes which cannot be - /// skipped entirely (such as non-optional code generation passes) may still - /// call this function to control whether or not individual optional - /// transformations are performed. - bool shouldRunCase(const Twine &Desc); - -private: - bool checkPass(const StringRef PassName, const StringRef TargetDesc); - - bool BisectEnabled = false; - unsigned LastBisectNum = 0; -}; - -} // end namespace llvm - -#endif // LLVM_IR_OPTBISECT_H diff --git a/llvm/include/llvm/IR/PassManager.h b/llvm/include/llvm/IR/PassManager.h deleted file mode 100644 index 402d04a5..00000000 --- a/llvm/include/llvm/IR/PassManager.h +++ /dev/null @@ -1,992 +0,0 @@ -//===- PassManager.h - Pass management infrastructure -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This header defines various interfaces for pass management in LLVM. There -/// is no "pass" interface in LLVM per se. Instead, an instance of any class -/// which supports a method to 'run' it over a unit of IR can be used as -/// a pass. A pass manager is generally a tool to collect a sequence of passes -/// which run over a particular IR construct, and run each of them in sequence -/// over each such construct in the containing IR construct. As there is no -/// containing IR construct for a Module, a manager for passes over modules -/// forms the base case which runs its managed passes in sequence over the -/// single module provided. -/// -/// The core IR library provides managers for running passes over -/// modules and functions. -/// -/// * FunctionPassManager can run over a Module, runs each pass over -/// a Function. -/// * ModulePassManager must be directly run, runs each pass over the Module. -/// -/// Note that the implementations of the pass managers use concept-based -/// polymorphism as outlined in the "Value Semantics and Concept-based -/// Polymorphism" talk (or its abbreviated sibling "Inheritance Is The Base -/// Class of Evil") by Sean Parent: -/// * http://github.com/sean-parent/sean-parent.github.com/wiki/Papers-and-Presentations -/// * http://www.youtube.com/watch?v=_BpMYeUFXv8 -/// * http://channel9.msdn.com/Events/GoingNative/2013/Inheritance-Is-The-Base-Class-of-Evil -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_PASSMANAGER_H -#define LLVM_IR_PASSMANAGER_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/PassManagerInternal.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/TypeName.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/Support/type_traits.h" -#include -#include -#include - -namespace llvm { - -/// \brief An abstract set of preserved analyses following a transformation pass -/// run. -/// -/// When a transformation pass is run, it can return a set of analyses whose -/// results were preserved by that transformation. The default set is "none", -/// and preserving analyses must be done explicitly. -/// -/// There is also an explicit all state which can be used (for example) when -/// the IR is not mutated at all. -class PreservedAnalyses { -public: - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - PreservedAnalyses() {} - PreservedAnalyses(const PreservedAnalyses &Arg) - : PreservedPassIDs(Arg.PreservedPassIDs) {} - PreservedAnalyses(PreservedAnalyses &&Arg) - : PreservedPassIDs(std::move(Arg.PreservedPassIDs)) {} - friend void swap(PreservedAnalyses &LHS, PreservedAnalyses &RHS) { - using std::swap; - swap(LHS.PreservedPassIDs, RHS.PreservedPassIDs); - } - PreservedAnalyses &operator=(PreservedAnalyses RHS) { - swap(*this, RHS); - return *this; - } - - /// \brief Convenience factory function for the empty preserved set. - static PreservedAnalyses none() { return PreservedAnalyses(); } - - /// \brief Construct a special preserved set that preserves all passes. - static PreservedAnalyses all() { - PreservedAnalyses PA; - PA.PreservedPassIDs.insert((void *)AllPassesID); - return PA; - } - - /// \brief Mark a particular pass as preserved, adding it to the set. - template void preserve() { preserve(PassT::ID()); } - - /// \brief Mark an abstract PassID as preserved, adding it to the set. - void preserve(void *PassID) { - if (!areAllPreserved()) - PreservedPassIDs.insert(PassID); - } - - /// \brief Intersect this set with another in place. - /// - /// This is a mutating operation on this preserved set, removing all - /// preserved passes which are not also preserved in the argument. - void intersect(const PreservedAnalyses &Arg) { - if (Arg.areAllPreserved()) - return; - if (areAllPreserved()) { - PreservedPassIDs = Arg.PreservedPassIDs; - return; - } - for (void *P : PreservedPassIDs) - if (!Arg.PreservedPassIDs.count(P)) - PreservedPassIDs.erase(P); - } - - /// \brief Intersect this set with a temporary other set in place. - /// - /// This is a mutating operation on this preserved set, removing all - /// preserved passes which are not also preserved in the argument. - void intersect(PreservedAnalyses &&Arg) { - if (Arg.areAllPreserved()) - return; - if (areAllPreserved()) { - PreservedPassIDs = std::move(Arg.PreservedPassIDs); - return; - } - for (void *P : PreservedPassIDs) - if (!Arg.PreservedPassIDs.count(P)) - PreservedPassIDs.erase(P); - } - - /// \brief Query whether a pass is marked as preserved by this set. - template bool preserved() const { - return preserved(PassT::ID()); - } - - /// \brief Query whether an abstract pass ID is marked as preserved by this - /// set. - bool preserved(void *PassID) const { - return PreservedPassIDs.count((void *)AllPassesID) || - PreservedPassIDs.count(PassID); - } - - /// \brief Query whether all of the analyses in the set are preserved. - bool preserved(PreservedAnalyses Arg) { - if (Arg.areAllPreserved()) - return areAllPreserved(); - for (void *P : Arg.PreservedPassIDs) - if (!preserved(P)) - return false; - return true; - } - - /// \brief Test whether all passes are preserved. - /// - /// This is used primarily to optimize for the case of no changes which will - /// common in many scenarios. - bool areAllPreserved() const { - return PreservedPassIDs.count((void *)AllPassesID); - } - -private: - // Note that this must not be -1 or -2 as those are already used by the - // SmallPtrSet. - static const uintptr_t AllPassesID = (intptr_t)(-3); - - SmallPtrSet PreservedPassIDs; -}; - -// Forward declare the analysis manager template. -template class AnalysisManager; - -/// A CRTP mix-in to automatically provide informational APIs needed for -/// passes. -/// -/// This provides some boiler plate for types that are passes. -template struct PassInfoMixin { - /// Returns the name of the derived pass type. - static StringRef name() { - StringRef Name = getTypeName(); - if (Name.startswith("llvm::")) - Name = Name.drop_front(strlen("llvm::")); - return Name; - } -}; - -/// A CRTP mix-in to automatically provide informational APIs needed for -/// analysis passes. -/// -/// This provides some boiler plate for types that are analysis passes. It -/// automatically mixes in \c PassInfoMixin and adds informational APIs -/// specifically used for analyses. -template -struct AnalysisInfoMixin : PassInfoMixin { - /// Returns an opaque, unique ID for this pass type. - /// - /// Note that this requires the derived type provide a static member whose - /// address can be converted to a void pointer. - /// - /// FIXME: The only reason the derived type needs to provide this rather than - /// this mixin providing it is due to broken implementations which cannot - /// correctly unique a templated static so that they have the same addresses - /// for each instantiation and are definitively emitted once for each - /// instantiation. The only currently known platform with this limitation are - /// Windows DLL builds, specifically building each part of LLVM as a DLL. If - /// we ever remove that build configuration, this mixin can provide the - /// static PassID as well. - static void *ID() { return (void *)&DerivedT::PassID; } -}; - -/// \brief Manages a sequence of passes over units of IR. -/// -/// A pass manager contains a sequence of passes to run over units of IR. It is -/// itself a valid pass over that unit of IR, and when over some given IR will -/// run each pass in sequence. This is the primary and most basic building -/// block of a pass pipeline. -/// -/// If it is run with an \c AnalysisManager argument, it will propagate -/// that analysis manager to each pass it runs, as well as calling the analysis -/// manager's invalidation routine with the PreservedAnalyses of each pass it -/// runs. -template -class PassManager : public PassInfoMixin> { -public: - /// \brief Construct a pass manager. - /// - /// It can be passed a flag to get debug logging as the passes are run. - PassManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - PassManager(PassManager &&Arg) - : Passes(std::move(Arg.Passes)), - DebugLogging(std::move(Arg.DebugLogging)) {} - PassManager &operator=(PassManager &&RHS) { - Passes = std::move(RHS.Passes); - DebugLogging = std::move(RHS.DebugLogging); - return *this; - } - - /// \brief Run all of the passes in this manager over the IR. - PreservedAnalyses run(IRUnitT &IR, AnalysisManager &AM) { - PreservedAnalyses PA = PreservedAnalyses::all(); - - if (DebugLogging) - dbgs() << "Starting " << getTypeName() << " pass manager run.\n"; - - for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx) { - if (DebugLogging) - dbgs() << "Running pass: " << Passes[Idx]->name() << " on " - << IR.getName() << "\n"; - - PreservedAnalyses PassPA = Passes[Idx]->run(IR, AM); - - // Update the analysis manager as each pass runs and potentially - // invalidates analyses. We also update the preserved set of analyses - // based on what analyses we have already handled the invalidation for - // here and don't need to invalidate when finished. - PassPA = AM.invalidate(IR, std::move(PassPA)); - - // Finally, we intersect the final preserved analyses to compute the - // aggregate preserved set for this pass manager. - PA.intersect(std::move(PassPA)); - - // FIXME: Historically, the pass managers all called the LLVM context's - // yield function here. We don't have a generic way to acquire the - // context and it isn't yet clear what the right pattern is for yielding - // in the new pass manager so it is currently omitted. - //IR.getContext().yield(); - } - - if (DebugLogging) - dbgs() << "Finished " << getTypeName() << " pass manager run.\n"; - - return PA; - } - - template void addPass(PassT Pass) { - typedef detail::PassModel PassModelT; - Passes.emplace_back(new PassModelT(std::move(Pass))); - } - -private: - typedef detail::PassConcept PassConceptT; - - PassManager(const PassManager &) = delete; - PassManager &operator=(const PassManager &) = delete; - - std::vector> Passes; - - /// \brief Flag indicating whether we should do debug logging. - bool DebugLogging; -}; - -extern template class PassManager; -/// \brief Convenience typedef for a pass manager over modules. -typedef PassManager ModulePassManager; - -extern template class PassManager; -/// \brief Convenience typedef for a pass manager over functions. -typedef PassManager FunctionPassManager; - -namespace detail { - -/// \brief A CRTP base used to implement analysis managers. -/// -/// This class template serves as the boiler plate of an analysis manager. Any -/// analysis manager can be implemented on top of this base class. Any -/// implementation will be required to provide specific hooks: -/// -/// - getResultImpl -/// - getCachedResultImpl -/// - invalidateImpl -/// -/// The details of the call pattern are within. -/// -/// Note that there is also a generic analysis manager template which implements -/// the above required functions along with common datastructures used for -/// managing analyses. This base class is factored so that if you need to -/// customize the handling of a specific IR unit, you can do so without -/// replicating *all* of the boilerplate. -template class AnalysisManagerBase { - DerivedT *derived_this() { return static_cast(this); } - const DerivedT *derived_this() const { - return static_cast(this); - } - - AnalysisManagerBase(const AnalysisManagerBase &) = delete; - AnalysisManagerBase &operator=(const AnalysisManagerBase &) = delete; - -protected: - typedef detail::AnalysisResultConcept ResultConceptT; - typedef detail::AnalysisPassConcept PassConceptT; - - // FIXME: Provide template aliases for the models when we're using C++11 in - // a mode supporting them. - - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - AnalysisManagerBase() {} - AnalysisManagerBase(AnalysisManagerBase &&Arg) - : AnalysisPasses(std::move(Arg.AnalysisPasses)) {} - AnalysisManagerBase &operator=(AnalysisManagerBase &&RHS) { - AnalysisPasses = std::move(RHS.AnalysisPasses); - return *this; - } - -public: - /// \brief Get the result of an analysis pass for this module. - /// - /// If there is not a valid cached result in the manager already, this will - /// re-run the analysis to produce a valid result. - template typename PassT::Result &getResult(IRUnitT &IR) { - assert(AnalysisPasses.count(PassT::ID()) && - "This analysis pass was not registered prior to being queried"); - - ResultConceptT &ResultConcept = - derived_this()->getResultImpl(PassT::ID(), IR); - typedef detail::AnalysisResultModel - ResultModelT; - return static_cast(ResultConcept).Result; - } - - /// \brief Get the cached result of an analysis pass for this module. - /// - /// This method never runs the analysis. - /// - /// \returns null if there is no cached result. - template - typename PassT::Result *getCachedResult(IRUnitT &IR) const { - assert(AnalysisPasses.count(PassT::ID()) && - "This analysis pass was not registered prior to being queried"); - - ResultConceptT *ResultConcept = - derived_this()->getCachedResultImpl(PassT::ID(), IR); - if (!ResultConcept) - return nullptr; - - typedef detail::AnalysisResultModel - ResultModelT; - return &static_cast(ResultConcept)->Result; - } - - /// \brief Register an analysis pass with the manager. - /// - /// The argument is a callable whose result is a pass. This allows passing in - /// a lambda to construct the pass. - /// - /// The pass type registered is the result type of calling the argument. If - /// that pass has already been registered, then the argument will not be - /// called and this function will return false. Otherwise, the pass type - /// becomes registered, with the instance provided by calling the argument - /// once, and this function returns true. - /// - /// While this returns whether or not the pass type was already registered, - /// there in't an independent way to query that as that would be prone to - /// risky use when *querying* the analysis manager. Instead, the only - /// supported use case is avoiding duplicate registry of an analysis. This - /// interface also lends itself to minimizing the number of times we have to - /// do lookups for analyses or construct complex passes only to throw them - /// away. - template bool registerPass(PassBuilderT PassBuilder) { - typedef decltype(PassBuilder()) PassT; - typedef detail::AnalysisPassModel PassModelT; - - auto &PassPtr = AnalysisPasses[PassT::ID()]; - if (PassPtr) - // Already registered this pass type! - return false; - - // Construct a new model around the instance returned by the builder. - PassPtr.reset(new PassModelT(PassBuilder())); - return true; - } - - /// \brief Invalidate a specific analysis pass for an IR module. - /// - /// Note that the analysis result can disregard invalidation. - template void invalidate(IRUnitT &IR) { - assert(AnalysisPasses.count(PassT::ID()) && - "This analysis pass was not registered prior to being invalidated"); - derived_this()->invalidateImpl(PassT::ID(), IR); - } - - /// \brief Invalidate analyses cached for an IR unit. - /// - /// Walk through all of the analyses pertaining to this unit of IR and - /// invalidate them unless they are preserved by the PreservedAnalyses set. - /// We accept the PreservedAnalyses set by value and update it with each - /// analyis pass which has been successfully invalidated and thus can be - /// preserved going forward. The updated set is returned. - PreservedAnalyses invalidate(IRUnitT &IR, PreservedAnalyses PA) { - return derived_this()->invalidateImpl(IR, std::move(PA)); - } - -protected: - /// \brief Lookup a registered analysis pass. - PassConceptT &lookupPass(void *PassID) { - typename AnalysisPassMapT::iterator PI = AnalysisPasses.find(PassID); - assert(PI != AnalysisPasses.end() && - "Analysis passes must be registered prior to being queried!"); - return *PI->second; - } - - /// \brief Lookup a registered analysis pass. - const PassConceptT &lookupPass(void *PassID) const { - typename AnalysisPassMapT::const_iterator PI = AnalysisPasses.find(PassID); - assert(PI != AnalysisPasses.end() && - "Analysis passes must be registered prior to being queried!"); - return *PI->second; - } - -private: - /// \brief Map type from module analysis pass ID to pass concept pointer. - typedef DenseMap> AnalysisPassMapT; - - /// \brief Collection of module analysis passes, indexed by ID. - AnalysisPassMapT AnalysisPasses; -}; - -} // End namespace detail - -/// \brief A generic analysis pass manager with lazy running and caching of -/// results. -/// -/// This analysis manager can be used for any IR unit where the address of the -/// IR unit sufficies as its identity. It manages the cache for a unit of IR via -/// the address of each unit of IR cached. -template -class AnalysisManager - : public detail::AnalysisManagerBase, IRUnitT> { - friend class detail::AnalysisManagerBase, IRUnitT>; - typedef detail::AnalysisManagerBase, IRUnitT> BaseT; - typedef typename BaseT::ResultConceptT ResultConceptT; - typedef typename BaseT::PassConceptT PassConceptT; - -public: - // Most public APIs are inherited from the CRTP base class. - - /// \brief Construct an empty analysis manager. - /// - /// A flag can be passed to indicate that the manager should perform debug - /// logging. - AnalysisManager(bool DebugLogging = false) : DebugLogging(DebugLogging) {} - - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - AnalysisManager(AnalysisManager &&Arg) - : BaseT(std::move(static_cast(Arg))), - AnalysisResults(std::move(Arg.AnalysisResults)), - DebugLogging(std::move(Arg.DebugLogging)) {} - AnalysisManager &operator=(AnalysisManager &&RHS) { - BaseT::operator=(std::move(static_cast(RHS))); - AnalysisResults = std::move(RHS.AnalysisResults); - DebugLogging = std::move(RHS.DebugLogging); - return *this; - } - - /// \brief Returns true if the analysis manager has an empty results cache. - bool empty() const { - assert(AnalysisResults.empty() == AnalysisResultLists.empty() && - "The storage and index of analysis results disagree on how many " - "there are!"); - return AnalysisResults.empty(); - } - - /// \brief Clear the analysis result cache. - /// - /// This routine allows cleaning up when the set of IR units itself has - /// potentially changed, and thus we can't even look up a a result and - /// invalidate it directly. Notably, this does *not* call invalidate functions - /// as there is nothing to be done for them. - void clear() { - AnalysisResults.clear(); - AnalysisResultLists.clear(); - } - -private: - AnalysisManager(const AnalysisManager &) = delete; - AnalysisManager &operator=(const AnalysisManager &) = delete; - - /// \brief Get an analysis result, running the pass if necessary. - ResultConceptT &getResultImpl(void *PassID, IRUnitT &IR) { - typename AnalysisResultMapT::iterator RI; - bool Inserted; - std::tie(RI, Inserted) = AnalysisResults.insert(std::make_pair( - std::make_pair(PassID, &IR), typename AnalysisResultListT::iterator())); - - // If we don't have a cached result for this function, look up the pass and - // run it to produce a result, which we then add to the cache. - if (Inserted) { - auto &P = this->lookupPass(PassID); - if (DebugLogging) - dbgs() << "Running analysis: " << P.name() << "\n"; - AnalysisResultListT &ResultList = AnalysisResultLists[&IR]; - ResultList.emplace_back(PassID, P.run(IR, *this)); - - // P.run may have inserted elements into AnalysisResults and invalidated - // RI. - RI = AnalysisResults.find(std::make_pair(PassID, &IR)); - assert(RI != AnalysisResults.end() && "we just inserted it!"); - - RI->second = std::prev(ResultList.end()); - } - - return *RI->second->second; - } - - /// \brief Get a cached analysis result or return null. - ResultConceptT *getCachedResultImpl(void *PassID, IRUnitT &IR) const { - typename AnalysisResultMapT::const_iterator RI = - AnalysisResults.find(std::make_pair(PassID, &IR)); - return RI == AnalysisResults.end() ? nullptr : &*RI->second->second; - } - - /// \brief Invalidate a function pass result. - void invalidateImpl(void *PassID, IRUnitT &IR) { - typename AnalysisResultMapT::iterator RI = - AnalysisResults.find(std::make_pair(PassID, &IR)); - if (RI == AnalysisResults.end()) - return; - - if (DebugLogging) - dbgs() << "Invalidating analysis: " << this->lookupPass(PassID).name() - << "\n"; - AnalysisResultLists[&IR].erase(RI->second); - AnalysisResults.erase(RI); - } - - /// \brief Invalidate the results for a function.. - PreservedAnalyses invalidateImpl(IRUnitT &IR, PreservedAnalyses PA) { - // Short circuit for a common case of all analyses being preserved. - if (PA.areAllPreserved()) - return PA; - - if (DebugLogging) - dbgs() << "Invalidating all non-preserved analyses for: " << IR.getName() - << "\n"; - - // Clear all the invalidated results associated specifically with this - // function. - SmallVector InvalidatedPassIDs; - AnalysisResultListT &ResultsList = AnalysisResultLists[&IR]; - for (typename AnalysisResultListT::iterator I = ResultsList.begin(), - E = ResultsList.end(); - I != E;) { - void *PassID = I->first; - - // Pass the invalidation down to the pass itself to see if it thinks it is - // necessary. The analysis pass can return false if no action on the part - // of the analysis manager is required for this invalidation event. - if (I->second->invalidate(IR, PA)) { - if (DebugLogging) - dbgs() << "Invalidating analysis: " << this->lookupPass(PassID).name() - << "\n"; - - InvalidatedPassIDs.push_back(I->first); - I = ResultsList.erase(I); - } else { - ++I; - } - - // After handling each pass, we mark it as preserved. Once we've - // invalidated any stale results, the rest of the system is allowed to - // start preserving this analysis again. - PA.preserve(PassID); - } - while (!InvalidatedPassIDs.empty()) - AnalysisResults.erase( - std::make_pair(InvalidatedPassIDs.pop_back_val(), &IR)); - if (ResultsList.empty()) - AnalysisResultLists.erase(&IR); - - return PA; - } - - /// \brief List of function analysis pass IDs and associated concept pointers. - /// - /// Requires iterators to be valid across appending new entries and arbitrary - /// erases. Provides both the pass ID and concept pointer such that it is - /// half of a bijection and provides storage for the actual result concept. - typedef std::list>>> - AnalysisResultListT; - - /// \brief Map type from function pointer to our custom list type. - typedef DenseMap AnalysisResultListMapT; - - /// \brief Map from function to a list of function analysis results. - /// - /// Provides linear time removal of all analysis results for a function and - /// the ultimate storage for a particular cached analysis result. - AnalysisResultListMapT AnalysisResultLists; - - /// \brief Map type from a pair of analysis ID and function pointer to an - /// iterator into a particular result list. - typedef DenseMap, - typename AnalysisResultListT::iterator> - AnalysisResultMapT; - - /// \brief Map from an analysis ID and function to a particular cached - /// analysis result. - AnalysisResultMapT AnalysisResults; - - /// \brief A flag indicating whether debug logging is enabled. - bool DebugLogging; -}; - -extern template class AnalysisManager; -/// \brief Convenience typedef for the Module analysis manager. -typedef AnalysisManager ModuleAnalysisManager; - -extern template class AnalysisManager; -/// \brief Convenience typedef for the Function analysis manager. -typedef AnalysisManager FunctionAnalysisManager; - -/// \brief A module analysis which acts as a proxy for a function analysis -/// manager. -/// -/// This primarily proxies invalidation information from the module analysis -/// manager and module pass manager to a function analysis manager. You should -/// never use a function analysis manager from within (transitively) a module -/// pass manager unless your parent module pass has received a proxy result -/// object for it. -/// -/// Note that the proxy's result is a move-only object and represents ownership -/// of the validity of the analyses in the \c FunctionAnalysisManager it -/// provides. -template -class InnerAnalysisManagerProxy - : public AnalysisInfoMixin< - InnerAnalysisManagerProxy> { -public: - class Result { - public: - explicit Result(AnalysisManagerT &AM) : AM(&AM) {} - Result(Result &&Arg) : AM(std::move(Arg.AM)) { - // We have to null out the analysis manager in the moved-from state - // because we are taking ownership of the responsibilty to clear the - // analysis state. - Arg.AM = nullptr; - } - Result &operator=(Result &&RHS) { - AM = RHS.AM; - // We have to null out the analysis manager in the moved-from state - // because we are taking ownership of the responsibilty to clear the - // analysis state. - RHS.AM = nullptr; - return *this; - } - ~Result() { - // AM is cleared in a moved from state where there is nothing to do. - if (!AM) - return; - - // Clear out the analysis manager if we're being destroyed -- it means we - // didn't even see an invalidate call when we got invalidated. - AM->clear(); - } - - /// \brief Accessor for the analysis manager. - AnalysisManagerT &getManager() { return *AM; } - - /// \brief Handler for invalidation of the module. - /// - /// If this analysis itself is preserved, then we assume that the set of \c - /// Function objects in the \c Module hasn't changed and thus we don't need - /// to invalidate *all* cached data associated with a \c Function* in the \c - /// FunctionAnalysisManager. - /// - /// Regardless of whether this analysis is marked as preserved, all of the - /// analyses in the \c FunctionAnalysisManager are potentially invalidated - /// based on the set of preserved analyses. - bool invalidate(IRUnitT &IR, const PreservedAnalyses &PA) { - // If this proxy isn't marked as preserved, then we can't even invalidate - // individual function analyses, there may be an invalid set of Function - // objects in the cache making it impossible to incrementally preserve - // them. Just clear the entire manager. - if (!PA.preserved(InnerAnalysisManagerProxy::ID())) - AM->clear(); - - // Return false to indicate that this result is still a valid proxy. - return false; - } - - private: - AnalysisManagerT *AM; - }; - - explicit InnerAnalysisManagerProxy(AnalysisManagerT &AM) : AM(&AM) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - InnerAnalysisManagerProxy(const InnerAnalysisManagerProxy &Arg) - : AM(Arg.AM) {} - InnerAnalysisManagerProxy(InnerAnalysisManagerProxy &&Arg) - : AM(std::move(Arg.AM)) {} - InnerAnalysisManagerProxy &operator=(InnerAnalysisManagerProxy RHS) { - std::swap(AM, RHS.AM); - return *this; - } - - /// \brief Run the analysis pass and create our proxy result object. - /// - /// This doesn't do any interesting work, it is primarily used to insert our - /// proxy result object into the module analysis cache so that we can proxy - /// invalidation to the function analysis manager. - /// - /// In debug builds, it will also assert that the analysis manager is empty - /// as no queries should arrive at the function analysis manager prior to - /// this analysis being requested. - Result run(IRUnitT &IR, AnalysisManager &) { return Result(*AM); } - -private: - friend AnalysisInfoMixin< - InnerAnalysisManagerProxy>; - static char PassID; - - AnalysisManagerT *AM; -}; - -template -char InnerAnalysisManagerProxy::PassID; - -extern template class InnerAnalysisManagerProxy; -/// Provide the \c FunctionAnalysisManager to \c Module proxy. -typedef InnerAnalysisManagerProxy - FunctionAnalysisManagerModuleProxy; - -/// \brief A function analysis which acts as a proxy for a module analysis -/// manager. -/// -/// This primarily provides an accessor to a parent module analysis manager to -/// function passes. Only the const interface of the module analysis manager is -/// provided to indicate that once inside of a function analysis pass you -/// cannot request a module analysis to actually run. Instead, the user must -/// rely on the \c getCachedResult API. -/// -/// This proxy *doesn't* manage the invalidation in any way. That is handled by -/// the recursive return path of each layer of the pass manager and the -/// returned PreservedAnalysis set. -template -class OuterAnalysisManagerProxy - : public AnalysisInfoMixin< - OuterAnalysisManagerProxy> { -public: - /// \brief Result proxy object for \c OuterAnalysisManagerProxy. - class Result { - public: - explicit Result(const AnalysisManagerT &AM) : AM(&AM) {} - // We have to explicitly define all the special member functions because - // MSVC refuses to generate them. - Result(const Result &Arg) : AM(Arg.AM) {} - Result(Result &&Arg) : AM(std::move(Arg.AM)) {} - Result &operator=(Result RHS) { - std::swap(AM, RHS.AM); - return *this; - } - - const AnalysisManagerT &getManager() const { return *AM; } - - /// \brief Handle invalidation by ignoring it, this pass is immutable. - bool invalidate(IRUnitT &) { return false; } - - private: - const AnalysisManagerT *AM; - }; - - OuterAnalysisManagerProxy(const AnalysisManagerT &AM) : AM(&AM) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - OuterAnalysisManagerProxy(const OuterAnalysisManagerProxy &Arg) - : AM(Arg.AM) {} - OuterAnalysisManagerProxy(OuterAnalysisManagerProxy &&Arg) - : AM(std::move(Arg.AM)) {} - OuterAnalysisManagerProxy &operator=(OuterAnalysisManagerProxy RHS) { - std::swap(AM, RHS.AM); - return *this; - } - - /// \brief Run the analysis pass and create our proxy result object. - /// Nothing to see here, it just forwards the \c AM reference into the - /// result. - Result run(IRUnitT &, AnalysisManager &) { return Result(*AM); } - -private: - friend AnalysisInfoMixin< - OuterAnalysisManagerProxy>; - static char PassID; - - const AnalysisManagerT *AM; -}; - -template -char OuterAnalysisManagerProxy::PassID; - -extern template class OuterAnalysisManagerProxy; -/// Provide the \c ModuleAnalysisManager to \c Fucntion proxy. -typedef OuterAnalysisManagerProxy - ModuleAnalysisManagerFunctionProxy; - -/// \brief Trivial adaptor that maps from a module to its functions. -/// -/// Designed to allow composition of a FunctionPass(Manager) and -/// a ModulePassManager. Note that if this pass is constructed with a pointer -/// to a \c ModuleAnalysisManager it will run the -/// \c FunctionAnalysisManagerModuleProxy analysis prior to running the function -/// pass over the module to enable a \c FunctionAnalysisManager to be used -/// within this run safely. -/// -/// Function passes run within this adaptor can rely on having exclusive access -/// to the function they are run over. They should not read or modify any other -/// functions! Other threads or systems may be manipulating other functions in -/// the module, and so their state should never be relied on. -/// FIXME: Make the above true for all of LLVM's actual passes, some still -/// violate this principle. -/// -/// Function passes can also read the module containing the function, but they -/// should not modify that module outside of the use lists of various globals. -/// For example, a function pass is not permitted to add functions to the -/// module. -/// FIXME: Make the above true for all of LLVM's actual passes, some still -/// violate this principle. -template -class ModuleToFunctionPassAdaptor - : public PassInfoMixin> { -public: - explicit ModuleToFunctionPassAdaptor(FunctionPassT Pass) - : Pass(std::move(Pass)) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - ModuleToFunctionPassAdaptor(const ModuleToFunctionPassAdaptor &Arg) - : Pass(Arg.Pass) {} - ModuleToFunctionPassAdaptor(ModuleToFunctionPassAdaptor &&Arg) - : Pass(std::move(Arg.Pass)) {} - friend void swap(ModuleToFunctionPassAdaptor &LHS, - ModuleToFunctionPassAdaptor &RHS) { - using std::swap; - swap(LHS.Pass, RHS.Pass); - } - ModuleToFunctionPassAdaptor &operator=(ModuleToFunctionPassAdaptor RHS) { - swap(*this, RHS); - return *this; - } - - /// \brief Runs the function pass across every function in the module. - PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM) { - // Setup the function analysis manager from its proxy. - FunctionAnalysisManager &FAM = - AM.getResult(M).getManager(); - - PreservedAnalyses PA = PreservedAnalyses::all(); - for (Function &F : M) { - if (F.isDeclaration()) - continue; - - PreservedAnalyses PassPA = Pass.run(F, FAM); - - // We know that the function pass couldn't have invalidated any other - // function's analyses (that's the contract of a function pass), so - // directly handle the function analysis manager's invalidation here and - // update our preserved set to reflect that these have already been - // handled. - PassPA = FAM.invalidate(F, std::move(PassPA)); - - // Then intersect the preserved set so that invalidation of module - // analyses will eventually occur when the module pass completes. - PA.intersect(std::move(PassPA)); - } - - // By definition we preserve the proxy. This precludes *any* invalidation - // of function analyses by the proxy, but that's OK because we've taken - // care to invalidate analyses in the function analysis manager - // incrementally above. - PA.preserve(); - return PA; - } - -private: - FunctionPassT Pass; -}; - -/// \brief A function to deduce a function pass type and wrap it in the -/// templated adaptor. -template -ModuleToFunctionPassAdaptor -createModuleToFunctionPassAdaptor(FunctionPassT Pass) { - return ModuleToFunctionPassAdaptor(std::move(Pass)); -} - -/// \brief A template utility pass to force an analysis result to be available. -/// -/// This is a no-op pass which simply forces a specific analysis pass's result -/// to be available when it is run. -template -struct RequireAnalysisPass : PassInfoMixin> { - /// \brief Run this pass over some unit of IR. - /// - /// This pass can be run over any unit of IR and use any analysis manager - /// provided they satisfy the basic API requirements. When this pass is - /// created, these methods can be instantiated to satisfy whatever the - /// context requires. - template - PreservedAnalyses run(IRUnitT &Arg, AnalysisManager &AM) { - (void)AM.template getResult(Arg); - - return PreservedAnalyses::all(); - } -}; - -/// \brief A template utility pass to force an analysis result to be -/// invalidated. -/// -/// This is a no-op pass which simply forces a specific analysis result to be -/// invalidated when it is run. -template -struct InvalidateAnalysisPass - : PassInfoMixin> { - /// \brief Run this pass over some unit of IR. - /// - /// This pass can be run over any unit of IR and use any analysis manager - /// provided they satisfy the basic API requirements. When this pass is - /// created, these methods can be instantiated to satisfy whatever the - /// context requires. - template - PreservedAnalyses run(IRUnitT &Arg, AnalysisManager &AM) { - // We have to directly invalidate the analysis result as we can't - // enumerate all other analyses and use the preserved set to control it. - AM.template invalidate(Arg); - - return PreservedAnalyses::all(); - } -}; - -/// \brief A utility pass that does nothing but preserves no analyses. -/// -/// As a consequence fo not preserving any analyses, this pass will force all -/// analysis passes to be re-run to produce fresh results if any are needed. -struct InvalidateAllAnalysesPass : PassInfoMixin { - /// \brief Run this pass over some unit of IR. - template - PreservedAnalyses run(IRUnitT &, AnalysisManager &) { - return PreservedAnalyses::none(); - } -}; - -} - -#endif diff --git a/llvm/include/llvm/IR/PassManagerInternal.h b/llvm/include/llvm/IR/PassManagerInternal.h deleted file mode 100644 index 4351b588..00000000 --- a/llvm/include/llvm/IR/PassManagerInternal.h +++ /dev/null @@ -1,251 +0,0 @@ -//===- PassManager internal APIs and implementation details -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This header provides internal APIs and implementation details used by the -/// pass management interfaces exposed in PassManager.h. To understand more -/// context of why these particular interfaces are needed, see that header -/// file. None of these APIs should be used elsewhere. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_PASSMANAGERINTERNAL_H -#define LLVM_IR_PASSMANAGERINTERNAL_H - -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringRef.h" - -namespace llvm { - -template class AnalysisManager; -class PreservedAnalyses; - -/// \brief Implementation details of the pass manager interfaces. -namespace detail { - -/// \brief Template for the abstract base class used to dispatch -/// polymorphically over pass objects. -template struct PassConcept { - // Boiler plate necessary for the container of derived classes. - virtual ~PassConcept() {} - - /// \brief The polymorphic API which runs the pass over a given IR entity. - /// - /// Note that actual pass object can omit the analysis manager argument if - /// desired. Also that the analysis manager may be null if there is no - /// analysis manager in the pass pipeline. - virtual PreservedAnalyses run(IRUnitT &IR, AnalysisManager &AM) = 0; - - /// \brief Polymorphic method to access the name of a pass. - virtual StringRef name() = 0; -}; - -/// \brief A template wrapper used to implement the polymorphic API. -/// -/// Can be instantiated for any object which provides a \c run method accepting -/// an \c IRUnitT& and an \c AnalysisManager&. It requires the pass to -/// be a copyable object. When the -template -struct PassModel : PassConcept { - explicit PassModel(PassT Pass) : Pass(std::move(Pass)) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - PassModel(const PassModel &Arg) : Pass(Arg.Pass) {} - PassModel(PassModel &&Arg) : Pass(std::move(Arg.Pass)) {} - friend void swap(PassModel &LHS, PassModel &RHS) { - using std::swap; - swap(LHS.Pass, RHS.Pass); - } - PassModel &operator=(PassModel RHS) { - swap(*this, RHS); - return *this; - } - - PreservedAnalysesT run(IRUnitT &IR, AnalysisManager &AM) override { - return Pass.run(IR, AM); - } - StringRef name() override { return PassT::name(); } - PassT Pass; -}; - -/// \brief Abstract concept of an analysis result. -/// -/// This concept is parameterized over the IR unit that this result pertains -/// to. -template struct AnalysisResultConcept { - virtual ~AnalysisResultConcept() {} - - /// \brief Method to try and mark a result as invalid. - /// - /// When the outer analysis manager detects a change in some underlying - /// unit of the IR, it will call this method on all of the results cached. - /// - /// This method also receives a set of preserved analyses which can be used - /// to avoid invalidation because the pass which changed the underlying IR - /// took care to update or preserve the analysis result in some way. - /// - /// \returns true if the result is indeed invalid (the default). - virtual bool invalidate(IRUnitT &IR, const PreservedAnalyses &PA) = 0; -}; - -/// \brief SFINAE metafunction for computing whether \c ResultT provides an -/// \c invalidate member function. -template class ResultHasInvalidateMethod { - typedef char SmallType; - struct BigType { - char a, b; - }; - - template - struct Checker; - - template static SmallType f(Checker *); - template static BigType f(...); - -public: - enum { Value = sizeof(f(nullptr)) == sizeof(SmallType) }; -}; - -/// \brief Wrapper to model the analysis result concept. -/// -/// By default, this will implement the invalidate method with a trivial -/// implementation so that the actual analysis result doesn't need to provide -/// an invalidation handler. It is only selected when the invalidation handler -/// is not part of the ResultT's interface. -template ::Value> -struct AnalysisResultModel; - -/// \brief Specialization of \c AnalysisResultModel which provides the default -/// invalidate functionality. -template -struct AnalysisResultModel - : AnalysisResultConcept { - explicit AnalysisResultModel(ResultT Result) : Result(std::move(Result)) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - AnalysisResultModel(const AnalysisResultModel &Arg) : Result(Arg.Result) {} - AnalysisResultModel(AnalysisResultModel &&Arg) - : Result(std::move(Arg.Result)) {} - friend void swap(AnalysisResultModel &LHS, AnalysisResultModel &RHS) { - using std::swap; - swap(LHS.Result, RHS.Result); - } - AnalysisResultModel &operator=(AnalysisResultModel RHS) { - swap(*this, RHS); - return *this; - } - - /// \brief The model bases invalidation solely on being in the preserved set. - // - // FIXME: We should actually use two different concepts for analysis results - // rather than two different models, and avoid the indirect function call for - // ones that use the trivial behavior. - bool invalidate(IRUnitT &, const PreservedAnalysesT &PA) override { - return !PA.preserved(PassT::ID()); - } - - ResultT Result; -}; - -/// \brief Specialization of \c AnalysisResultModel which delegates invalidate -/// handling to \c ResultT. -template -struct AnalysisResultModel - : AnalysisResultConcept { - explicit AnalysisResultModel(ResultT Result) : Result(std::move(Result)) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - AnalysisResultModel(const AnalysisResultModel &Arg) : Result(Arg.Result) {} - AnalysisResultModel(AnalysisResultModel &&Arg) - : Result(std::move(Arg.Result)) {} - friend void swap(AnalysisResultModel &LHS, AnalysisResultModel &RHS) { - using std::swap; - swap(LHS.Result, RHS.Result); - } - AnalysisResultModel &operator=(AnalysisResultModel RHS) { - swap(*this, RHS); - return *this; - } - - /// \brief The model delegates to the \c ResultT method. - bool invalidate(IRUnitT &IR, const PreservedAnalysesT &PA) override { - return Result.invalidate(IR, PA); - } - - ResultT Result; -}; - -/// \brief Abstract concept of an analysis pass. -/// -/// This concept is parameterized over the IR unit that it can run over and -/// produce an analysis result. -template struct AnalysisPassConcept { - virtual ~AnalysisPassConcept() {} - - /// \brief Method to run this analysis over a unit of IR. - /// \returns A unique_ptr to the analysis result object to be queried by - /// users. - virtual std::unique_ptr> - run(IRUnitT &IR, AnalysisManager &AM) = 0; - - /// \brief Polymorphic method to access the name of a pass. - virtual StringRef name() = 0; -}; - -/// \brief Wrapper to model the analysis pass concept. -/// -/// Can wrap any type which implements a suitable \c run method. The method -/// must accept an \c IRUnitT& and an \c AnalysisManager& as arguments -/// and produce an object which can be wrapped in a \c AnalysisResultModel. -template -struct AnalysisPassModel : AnalysisPassConcept { - explicit AnalysisPassModel(PassT Pass) : Pass(std::move(Pass)) {} - // We have to explicitly define all the special member functions because MSVC - // refuses to generate them. - AnalysisPassModel(const AnalysisPassModel &Arg) : Pass(Arg.Pass) {} - AnalysisPassModel(AnalysisPassModel &&Arg) : Pass(std::move(Arg.Pass)) {} - friend void swap(AnalysisPassModel &LHS, AnalysisPassModel &RHS) { - using std::swap; - swap(LHS.Pass, RHS.Pass); - } - AnalysisPassModel &operator=(AnalysisPassModel RHS) { - swap(*this, RHS); - return *this; - } - - // FIXME: Replace PassT::Result with type traits when we use C++11. - typedef AnalysisResultModel - ResultModelT; - - /// \brief The model delegates to the \c PassT::run method. - /// - /// The return is wrapped in an \c AnalysisResultModel. - std::unique_ptr> - run(IRUnitT &IR, AnalysisManager &AM) override { - return make_unique(Pass.run(IR, AM)); - } - - /// \brief The model delegates to a static \c PassT::name method. - /// - /// The returned string ref must point to constant immutable data! - StringRef name() override { return PassT::name(); } - - PassT Pass; -}; - -} // End namespace detail -} - -#endif diff --git a/llvm/include/llvm/IR/PatternMatch.h b/llvm/include/llvm/IR/PatternMatch.h deleted file mode 100644 index 7da9afcf..00000000 --- a/llvm/include/llvm/IR/PatternMatch.h +++ /dev/null @@ -1,1355 +0,0 @@ -//===- PatternMatch.h - Match on the LLVM IR --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides a simple and efficient mechanism for performing general -// tree-based pattern matches on the LLVM IR. The power of these routines is -// that it allows you to write concise patterns that are expressive and easy to -// understand. The other major advantage of this is that it allows you to -// trivially capture/bind elements in the pattern to variables. For example, -// you can do something like this: -// -// Value *Exp = ... -// Value *X, *Y; ConstantInt *C1, *C2; // (X & C1) | (Y & C2) -// if (match(Exp, m_Or(m_And(m_Value(X), m_ConstantInt(C1)), -// m_And(m_Value(Y), m_ConstantInt(C2))))) { -// ... Pattern is matched and variables are bound ... -// } -// -// This is primarily useful to things like the instruction combiner, but can -// also be useful for static analysis tools or code generators. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_PATTERNMATCH_H -#define LLVM_IR_PATTERNMATCH_H - -#include "llvm/IR/CallSite.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/Intrinsics.h" -#include "llvm/IR/Operator.h" - -namespace llvm { -namespace PatternMatch { - -template bool match(Val *V, const Pattern &P) { - return const_cast(P).match(V); -} - -template struct OneUse_match { - SubPattern_t SubPattern; - - OneUse_match(const SubPattern_t &SP) : SubPattern(SP) {} - - template bool match(OpTy *V) { - return V->hasOneUse() && SubPattern.match(V); - } -}; - -template inline OneUse_match m_OneUse(const T &SubPattern) { - return SubPattern; -} - -template struct class_match { - template bool match(ITy *V) { return isa(V); } -}; - -/// \brief Match an arbitrary value and ignore it. -inline class_match m_Value() { return class_match(); } - -/// \brief Match an arbitrary binary operation and ignore it. -inline class_match m_BinOp() { - return class_match(); -} - -/// \brief Matches any compare instruction and ignore it. -inline class_match m_Cmp() { return class_match(); } - -/// \brief Match an arbitrary ConstantInt and ignore it. -inline class_match m_ConstantInt() { - return class_match(); -} - -/// \brief Match an arbitrary undef constant. -inline class_match m_Undef() { return class_match(); } - -/// \brief Match an arbitrary Constant and ignore it. -inline class_match m_Constant() { return class_match(); } - -/// Matching combinators -template struct match_combine_or { - LTy L; - RTy R; - - match_combine_or(const LTy &Left, const RTy &Right) : L(Left), R(Right) {} - - template bool match(ITy *V) { - if (L.match(V)) - return true; - if (R.match(V)) - return true; - return false; - } -}; - -template struct match_combine_and { - LTy L; - RTy R; - - match_combine_and(const LTy &Left, const RTy &Right) : L(Left), R(Right) {} - - template bool match(ITy *V) { - if (L.match(V)) - if (R.match(V)) - return true; - return false; - } -}; - -/// Combine two pattern matchers matching L || R -template -inline match_combine_or m_CombineOr(const LTy &L, const RTy &R) { - return match_combine_or(L, R); -} - -/// Combine two pattern matchers matching L && R -template -inline match_combine_and m_CombineAnd(const LTy &L, const RTy &R) { - return match_combine_and(L, R); -} - -struct match_zero { - template bool match(ITy *V) { - if (const auto *C = dyn_cast(V)) - return C->isNullValue(); - return false; - } -}; - -/// \brief Match an arbitrary zero/null constant. This includes -/// zero_initializer for vectors and ConstantPointerNull for pointers. -inline match_zero m_Zero() { return match_zero(); } - -struct match_neg_zero { - template bool match(ITy *V) { - if (const auto *C = dyn_cast(V)) - return C->isNegativeZeroValue(); - return false; - } -}; - -/// \brief Match an arbitrary zero/null constant. This includes -/// zero_initializer for vectors and ConstantPointerNull for pointers. For -/// floating point constants, this will match negative zero but not positive -/// zero -inline match_neg_zero m_NegZero() { return match_neg_zero(); } - -/// \brief - Match an arbitrary zero/null constant. This includes -/// zero_initializer for vectors and ConstantPointerNull for pointers. For -/// floating point constants, this will match negative zero and positive zero -inline match_combine_or m_AnyZero() { - return m_CombineOr(m_Zero(), m_NegZero()); -} - -struct apint_match { - const APInt *&Res; - apint_match(const APInt *&R) : Res(R) {} - template bool match(ITy *V) { - if (auto *CI = dyn_cast(V)) { - Res = &CI->getValue(); - return true; - } - if (V->getType()->isVectorTy()) - if (const auto *C = dyn_cast(V)) - if (auto *CI = dyn_cast_or_null(C->getSplatValue())) { - Res = &CI->getValue(); - return true; - } - return false; - } -}; - -/// \brief Match a ConstantInt or splatted ConstantVector, binding the -/// specified pointer to the contained APInt. -inline apint_match m_APInt(const APInt *&Res) { return Res; } - -template struct constantint_match { - template bool match(ITy *V) { - if (const auto *CI = dyn_cast(V)) { - const APInt &CIV = CI->getValue(); - if (Val >= 0) - return CIV == static_cast(Val); - // If Val is negative, and CI is shorter than it, truncate to the right - // number of bits. If it is larger, then we have to sign extend. Just - // compare their negated values. - return -CIV == -Val; - } - return false; - } -}; - -/// \brief Match a ConstantInt with a specific value. -template inline constantint_match m_ConstantInt() { - return constantint_match(); -} - -/// \brief This helper class is used to match scalar and vector constants that -/// satisfy a specified predicate. -template struct cst_pred_ty : public Predicate { - template bool match(ITy *V) { - if (const auto *CI = dyn_cast(V)) - return this->isValue(CI->getValue()); - if (V->getType()->isVectorTy()) - if (const auto *C = dyn_cast(V)) - if (const auto *CI = dyn_cast_or_null(C->getSplatValue())) - return this->isValue(CI->getValue()); - return false; - } -}; - -/// \brief This helper class is used to match scalar and vector constants that -/// satisfy a specified predicate, and bind them to an APInt. -template struct api_pred_ty : public Predicate { - const APInt *&Res; - api_pred_ty(const APInt *&R) : Res(R) {} - template bool match(ITy *V) { - if (const auto *CI = dyn_cast(V)) - if (this->isValue(CI->getValue())) { - Res = &CI->getValue(); - return true; - } - if (V->getType()->isVectorTy()) - if (const auto *C = dyn_cast(V)) - if (auto *CI = dyn_cast_or_null(C->getSplatValue())) - if (this->isValue(CI->getValue())) { - Res = &CI->getValue(); - return true; - } - - return false; - } -}; - -struct is_one { - bool isValue(const APInt &C) { return C == 1; } -}; - -/// \brief Match an integer 1 or a vector with all elements equal to 1. -inline cst_pred_ty m_One() { return cst_pred_ty(); } -inline api_pred_ty m_One(const APInt *&V) { return V; } - -struct is_all_ones { - bool isValue(const APInt &C) { return C.isAllOnesValue(); } -}; - -/// \brief Match an integer or vector with all bits set to true. -inline cst_pred_ty m_AllOnes() { - return cst_pred_ty(); -} -inline api_pred_ty m_AllOnes(const APInt *&V) { return V; } - -struct is_sign_bit { - bool isValue(const APInt &C) { return C.isSignBit(); } -}; - -/// \brief Match an integer or vector with only the sign bit(s) set. -inline cst_pred_ty m_SignBit() { - return cst_pred_ty(); -} -inline api_pred_ty m_SignBit(const APInt *&V) { return V; } - -struct is_power2 { - bool isValue(const APInt &C) { return C.isPowerOf2(); } -}; - -/// \brief Match an integer or vector power of 2. -inline cst_pred_ty m_Power2() { return cst_pred_ty(); } -inline api_pred_ty m_Power2(const APInt *&V) { return V; } - -struct is_maxsignedvalue { - bool isValue(const APInt &C) { return C.isMaxSignedValue(); } -}; - -inline cst_pred_ty m_MaxSignedValue() { return cst_pred_ty(); } -inline api_pred_ty m_MaxSignedValue(const APInt *&V) { return V; } - -template struct bind_ty { - Class *&VR; - bind_ty(Class *&V) : VR(V) {} - - template bool match(ITy *V) { - if (auto *CV = dyn_cast(V)) { - VR = CV; - return true; - } - return false; - } -}; - -/// \brief Match a value, capturing it if we match. -inline bind_ty m_Value(Value *&V) { return V; } - -/// \brief Match an instruction, capturing it if we match. -inline bind_ty m_Instruction(Instruction *&I) { return I; } - -/// \brief Match a binary operator, capturing it if we match. -inline bind_ty m_BinOp(BinaryOperator *&I) { return I; } - -/// \brief Match a ConstantInt, capturing the value if we match. -inline bind_ty m_ConstantInt(ConstantInt *&CI) { return CI; } - -/// \brief Match a Constant, capturing the value if we match. -inline bind_ty m_Constant(Constant *&C) { return C; } - -/// \brief Match a ConstantFP, capturing the value if we match. -inline bind_ty m_ConstantFP(ConstantFP *&C) { return C; } - -/// \brief Match a specified Value*. -struct specificval_ty { - const Value *Val; - specificval_ty(const Value *V) : Val(V) {} - - template bool match(ITy *V) { return V == Val; } -}; - -/// \brief Match if we have a specific specified value. -inline specificval_ty m_Specific(const Value *V) { return V; } - -/// \brief Match a specified floating point value or vector of all elements of -/// that value. -struct specific_fpval { - double Val; - specific_fpval(double V) : Val(V) {} - - template bool match(ITy *V) { - if (const auto *CFP = dyn_cast(V)) - return CFP->isExactlyValue(Val); - if (V->getType()->isVectorTy()) - if (const auto *C = dyn_cast(V)) - if (auto *CFP = dyn_cast_or_null(C->getSplatValue())) - return CFP->isExactlyValue(Val); - return false; - } -}; - -/// \brief Match a specific floating point value or vector with all elements -/// equal to the value. -inline specific_fpval m_SpecificFP(double V) { return specific_fpval(V); } - -/// \brief Match a float 1.0 or vector with all elements equal to 1.0. -inline specific_fpval m_FPOne() { return m_SpecificFP(1.0); } - -struct bind_const_intval_ty { - uint64_t &VR; - bind_const_intval_ty(uint64_t &V) : VR(V) {} - - template bool match(ITy *V) { - if (const auto *CV = dyn_cast(V)) - if (CV->getBitWidth() <= 64) { - VR = CV->getZExtValue(); - return true; - } - return false; - } -}; - -/// \brief Match a specified integer value or vector of all elements of that -// value. -struct specific_intval { - uint64_t Val; - specific_intval(uint64_t V) : Val(V) {} - - template bool match(ITy *V) { - const auto *CI = dyn_cast(V); - if (!CI && V->getType()->isVectorTy()) - if (const auto *C = dyn_cast(V)) - CI = dyn_cast_or_null(C->getSplatValue()); - - if (CI && CI->getBitWidth() <= 64) - return CI->getZExtValue() == Val; - - return false; - } -}; - -/// \brief Match a specific integer value or vector with all elements equal to -/// the value. -inline specific_intval m_SpecificInt(uint64_t V) { return specific_intval(V); } - -/// \brief Match a ConstantInt and bind to its value. This does not match -/// ConstantInts wider than 64-bits. -inline bind_const_intval_ty m_ConstantInt(uint64_t &V) { return V; } - -//===----------------------------------------------------------------------===// -// Matcher for any binary operator. -// -template struct AnyBinaryOp_match { - LHS_t L; - RHS_t R; - - AnyBinaryOp_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {} - - template bool match(OpTy *V) { - if (auto *I = dyn_cast(V)) - return L.match(I->getOperand(0)) && R.match(I->getOperand(1)); - return false; - } -}; - -template -inline AnyBinaryOp_match m_BinOp(const LHS &L, const RHS &R) { - return AnyBinaryOp_match(L, R); -} - -//===----------------------------------------------------------------------===// -// Matchers for specific binary operators. -// - -template -struct BinaryOp_match { - LHS_t L; - RHS_t R; - - BinaryOp_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {} - - template bool match(OpTy *V) { - if (V->getValueID() == Value::InstructionVal + Opcode) { - auto *I = cast(V); - return L.match(I->getOperand(0)) && R.match(I->getOperand(1)); - } - if (auto *CE = dyn_cast(V)) - return CE->getOpcode() == Opcode && L.match(CE->getOperand(0)) && - R.match(CE->getOperand(1)); - return false; - } -}; - -template -inline BinaryOp_match m_Add(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_FAdd(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_Sub(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_FSub(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_Mul(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_FMul(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_UDiv(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_SDiv(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_FDiv(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_URem(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_SRem(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_FRem(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_And(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_Or(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_Xor(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_Shl(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_LShr(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -inline BinaryOp_match m_AShr(const LHS &L, - const RHS &R) { - return BinaryOp_match(L, R); -} - -template -struct OverflowingBinaryOp_match { - LHS_t L; - RHS_t R; - - OverflowingBinaryOp_match(const LHS_t &LHS, const RHS_t &RHS) - : L(LHS), R(RHS) {} - - template bool match(OpTy *V) { - if (auto *Op = dyn_cast(V)) { - if (Op->getOpcode() != Opcode) - return false; - if (WrapFlags & OverflowingBinaryOperator::NoUnsignedWrap && - !Op->hasNoUnsignedWrap()) - return false; - if (WrapFlags & OverflowingBinaryOperator::NoSignedWrap && - !Op->hasNoSignedWrap()) - return false; - return L.match(Op->getOperand(0)) && R.match(Op->getOperand(1)); - } - return false; - } -}; - -template -inline OverflowingBinaryOp_match -m_NSWAdd(const LHS &L, const RHS &R) { - return OverflowingBinaryOp_match( - L, R); -} -template -inline OverflowingBinaryOp_match -m_NSWSub(const LHS &L, const RHS &R) { - return OverflowingBinaryOp_match( - L, R); -} -template -inline OverflowingBinaryOp_match -m_NSWMul(const LHS &L, const RHS &R) { - return OverflowingBinaryOp_match( - L, R); -} -template -inline OverflowingBinaryOp_match -m_NSWShl(const LHS &L, const RHS &R) { - return OverflowingBinaryOp_match( - L, R); -} - -template -inline OverflowingBinaryOp_match -m_NUWAdd(const LHS &L, const RHS &R) { - return OverflowingBinaryOp_match( - L, R); -} -template -inline OverflowingBinaryOp_match -m_NUWSub(const LHS &L, const RHS &R) { - return OverflowingBinaryOp_match( - L, R); -} -template -inline OverflowingBinaryOp_match -m_NUWMul(const LHS &L, const RHS &R) { - return OverflowingBinaryOp_match( - L, R); -} -template -inline OverflowingBinaryOp_match -m_NUWShl(const LHS &L, const RHS &R) { - return OverflowingBinaryOp_match( - L, R); -} - -//===----------------------------------------------------------------------===// -// Class that matches two different binary ops. -// -template -struct BinOp2_match { - LHS_t L; - RHS_t R; - - BinOp2_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {} - - template bool match(OpTy *V) { - if (V->getValueID() == Value::InstructionVal + Opc1 || - V->getValueID() == Value::InstructionVal + Opc2) { - auto *I = cast(V); - return L.match(I->getOperand(0)) && R.match(I->getOperand(1)); - } - if (auto *CE = dyn_cast(V)) - return (CE->getOpcode() == Opc1 || CE->getOpcode() == Opc2) && - L.match(CE->getOperand(0)) && R.match(CE->getOperand(1)); - return false; - } -}; - -/// \brief Matches LShr or AShr. -template -inline BinOp2_match -m_Shr(const LHS &L, const RHS &R) { - return BinOp2_match(L, R); -} - -/// \brief Matches LShr or Shl. -template -inline BinOp2_match -m_LogicalShift(const LHS &L, const RHS &R) { - return BinOp2_match(L, R); -} - -/// \brief Matches UDiv and SDiv. -template -inline BinOp2_match -m_IDiv(const LHS &L, const RHS &R) { - return BinOp2_match(L, R); -} - -//===----------------------------------------------------------------------===// -// Class that matches exact binary ops. -// -template struct Exact_match { - SubPattern_t SubPattern; - - Exact_match(const SubPattern_t &SP) : SubPattern(SP) {} - - template bool match(OpTy *V) { - if (PossiblyExactOperator *PEO = dyn_cast(V)) - return PEO->isExact() && SubPattern.match(V); - return false; - } -}; - -template inline Exact_match m_Exact(const T &SubPattern) { - return SubPattern; -} - -//===----------------------------------------------------------------------===// -// Matchers for CmpInst classes -// - -template -struct CmpClass_match { - PredicateTy &Predicate; - LHS_t L; - RHS_t R; - - CmpClass_match(PredicateTy &Pred, const LHS_t &LHS, const RHS_t &RHS) - : Predicate(Pred), L(LHS), R(RHS) {} - - template bool match(OpTy *V) { - if (Class *I = dyn_cast(V)) - if (L.match(I->getOperand(0)) && R.match(I->getOperand(1))) { - Predicate = I->getPredicate(); - return true; - } - return false; - } -}; - -template -inline CmpClass_match -m_Cmp(CmpInst::Predicate &Pred, const LHS &L, const RHS &R) { - return CmpClass_match(Pred, L, R); -} - -template -inline CmpClass_match -m_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) { - return CmpClass_match(Pred, L, R); -} - -template -inline CmpClass_match -m_FCmp(FCmpInst::Predicate &Pred, const LHS &L, const RHS &R) { - return CmpClass_match(Pred, L, R); -} - -//===----------------------------------------------------------------------===// -// Matchers for SelectInst classes -// - -template -struct SelectClass_match { - Cond_t C; - LHS_t L; - RHS_t R; - - SelectClass_match(const Cond_t &Cond, const LHS_t &LHS, const RHS_t &RHS) - : C(Cond), L(LHS), R(RHS) {} - - template bool match(OpTy *V) { - if (auto *I = dyn_cast(V)) - return C.match(I->getOperand(0)) && L.match(I->getOperand(1)) && - R.match(I->getOperand(2)); - return false; - } -}; - -template -inline SelectClass_match m_Select(const Cond &C, const LHS &L, - const RHS &R) { - return SelectClass_match(C, L, R); -} - -/// \brief This matches a select of two constants, e.g.: -/// m_SelectCst<-1, 0>(m_Value(V)) -template -inline SelectClass_match, constantint_match> -m_SelectCst(const Cond &C) { - return m_Select(C, m_ConstantInt(), m_ConstantInt()); -} - -//===----------------------------------------------------------------------===// -// Matchers for CastInst classes -// - -template struct CastClass_match { - Op_t Op; - - CastClass_match(const Op_t &OpMatch) : Op(OpMatch) {} - - template bool match(OpTy *V) { - if (auto *O = dyn_cast(V)) - return O->getOpcode() == Opcode && Op.match(O->getOperand(0)); - return false; - } -}; - -/// \brief Matches BitCast. -template -inline CastClass_match m_BitCast(const OpTy &Op) { - return CastClass_match(Op); -} - -/// \brief Matches PtrToInt. -template -inline CastClass_match m_PtrToInt(const OpTy &Op) { - return CastClass_match(Op); -} - -/// \brief Matches Trunc. -template -inline CastClass_match m_Trunc(const OpTy &Op) { - return CastClass_match(Op); -} - -/// \brief Matches SExt. -template -inline CastClass_match m_SExt(const OpTy &Op) { - return CastClass_match(Op); -} - -/// \brief Matches ZExt. -template -inline CastClass_match m_ZExt(const OpTy &Op) { - return CastClass_match(Op); -} - -/// \brief Matches UIToFP. -template -inline CastClass_match m_UIToFP(const OpTy &Op) { - return CastClass_match(Op); -} - -/// \brief Matches SIToFP. -template -inline CastClass_match m_SIToFP(const OpTy &Op) { - return CastClass_match(Op); -} - -//===----------------------------------------------------------------------===// -// Matchers for unary operators -// - -template struct not_match { - LHS_t L; - - not_match(const LHS_t &LHS) : L(LHS) {} - - template bool match(OpTy *V) { - if (auto *O = dyn_cast(V)) - if (O->getOpcode() == Instruction::Xor) - return matchIfNot(O->getOperand(0), O->getOperand(1)); - return false; - } - -private: - bool matchIfNot(Value *LHS, Value *RHS) { - return (isa(RHS) || isa(RHS) || - // FIXME: Remove CV. - isa(RHS)) && - cast(RHS)->isAllOnesValue() && L.match(LHS); - } -}; - -template inline not_match m_Not(const LHS &L) { return L; } - -template struct neg_match { - LHS_t L; - - neg_match(const LHS_t &LHS) : L(LHS) {} - - template bool match(OpTy *V) { - if (auto *O = dyn_cast(V)) - if (O->getOpcode() == Instruction::Sub) - return matchIfNeg(O->getOperand(0), O->getOperand(1)); - return false; - } - -private: - bool matchIfNeg(Value *LHS, Value *RHS) { - return ((isa(LHS) && cast(LHS)->isZero()) || - isa(LHS)) && - L.match(RHS); - } -}; - -/// \brief Match an integer negate. -template inline neg_match m_Neg(const LHS &L) { return L; } - -template struct fneg_match { - LHS_t L; - - fneg_match(const LHS_t &LHS) : L(LHS) {} - - template bool match(OpTy *V) { - if (auto *O = dyn_cast(V)) - if (O->getOpcode() == Instruction::FSub) - return matchIfFNeg(O->getOperand(0), O->getOperand(1)); - return false; - } - -private: - bool matchIfFNeg(Value *LHS, Value *RHS) { - if (const auto *C = dyn_cast(LHS)) - return C->isNegativeZeroValue() && L.match(RHS); - return false; - } -}; - -/// \brief Match a floating point negate. -template inline fneg_match m_FNeg(const LHS &L) { - return L; -} - -//===----------------------------------------------------------------------===// -// Matchers for control flow. -// - -struct br_match { - BasicBlock *&Succ; - br_match(BasicBlock *&Succ) : Succ(Succ) {} - - template bool match(OpTy *V) { - if (auto *BI = dyn_cast(V)) - if (BI->isUnconditional()) { - Succ = BI->getSuccessor(0); - return true; - } - return false; - } -}; - -inline br_match m_UnconditionalBr(BasicBlock *&Succ) { return br_match(Succ); } - -template struct brc_match { - Cond_t Cond; - BasicBlock *&T, *&F; - brc_match(const Cond_t &C, BasicBlock *&t, BasicBlock *&f) - : Cond(C), T(t), F(f) {} - - template bool match(OpTy *V) { - if (auto *BI = dyn_cast(V)) - if (BI->isConditional() && Cond.match(BI->getCondition())) { - T = BI->getSuccessor(0); - F = BI->getSuccessor(1); - return true; - } - return false; - } -}; - -template -inline brc_match m_Br(const Cond_t &C, BasicBlock *&T, BasicBlock *&F) { - return brc_match(C, T, F); -} - -//===----------------------------------------------------------------------===// -// Matchers for max/min idioms, eg: "select (sgt x, y), x, y" -> smax(x,y). -// - -template -struct MaxMin_match { - LHS_t L; - RHS_t R; - - MaxMin_match(const LHS_t &LHS, const RHS_t &RHS) : L(LHS), R(RHS) {} - - template bool match(OpTy *V) { - // Look for "(x pred y) ? x : y" or "(x pred y) ? y : x". - auto *SI = dyn_cast(V); - if (!SI) - return false; - auto *Cmp = dyn_cast(SI->getCondition()); - if (!Cmp) - return false; - // At this point we have a select conditioned on a comparison. Check that - // it is the values returned by the select that are being compared. - Value *TrueVal = SI->getTrueValue(); - Value *FalseVal = SI->getFalseValue(); - Value *LHS = Cmp->getOperand(0); - Value *RHS = Cmp->getOperand(1); - if ((TrueVal != LHS || FalseVal != RHS) && - (TrueVal != RHS || FalseVal != LHS)) - return false; - typename CmpInst_t::Predicate Pred = - LHS == TrueVal ? Cmp->getPredicate() : Cmp->getSwappedPredicate(); - // Does "(x pred y) ? x : y" represent the desired max/min operation? - if (!Pred_t::match(Pred)) - return false; - // It does! Bind the operands. - return L.match(LHS) && R.match(RHS); - } -}; - -/// \brief Helper class for identifying signed max predicates. -struct smax_pred_ty { - static bool match(ICmpInst::Predicate Pred) { - return Pred == CmpInst::ICMP_SGT || Pred == CmpInst::ICMP_SGE; - } -}; - -/// \brief Helper class for identifying signed min predicates. -struct smin_pred_ty { - static bool match(ICmpInst::Predicate Pred) { - return Pred == CmpInst::ICMP_SLT || Pred == CmpInst::ICMP_SLE; - } -}; - -/// \brief Helper class for identifying unsigned max predicates. -struct umax_pred_ty { - static bool match(ICmpInst::Predicate Pred) { - return Pred == CmpInst::ICMP_UGT || Pred == CmpInst::ICMP_UGE; - } -}; - -/// \brief Helper class for identifying unsigned min predicates. -struct umin_pred_ty { - static bool match(ICmpInst::Predicate Pred) { - return Pred == CmpInst::ICMP_ULT || Pred == CmpInst::ICMP_ULE; - } -}; - -/// \brief Helper class for identifying ordered max predicates. -struct ofmax_pred_ty { - static bool match(FCmpInst::Predicate Pred) { - return Pred == CmpInst::FCMP_OGT || Pred == CmpInst::FCMP_OGE; - } -}; - -/// \brief Helper class for identifying ordered min predicates. -struct ofmin_pred_ty { - static bool match(FCmpInst::Predicate Pred) { - return Pred == CmpInst::FCMP_OLT || Pred == CmpInst::FCMP_OLE; - } -}; - -/// \brief Helper class for identifying unordered max predicates. -struct ufmax_pred_ty { - static bool match(FCmpInst::Predicate Pred) { - return Pred == CmpInst::FCMP_UGT || Pred == CmpInst::FCMP_UGE; - } -}; - -/// \brief Helper class for identifying unordered min predicates. -struct ufmin_pred_ty { - static bool match(FCmpInst::Predicate Pred) { - return Pred == CmpInst::FCMP_ULT || Pred == CmpInst::FCMP_ULE; - } -}; - -template -inline MaxMin_match m_SMax(const LHS &L, - const RHS &R) { - return MaxMin_match(L, R); -} - -template -inline MaxMin_match m_SMin(const LHS &L, - const RHS &R) { - return MaxMin_match(L, R); -} - -template -inline MaxMin_match m_UMax(const LHS &L, - const RHS &R) { - return MaxMin_match(L, R); -} - -template -inline MaxMin_match m_UMin(const LHS &L, - const RHS &R) { - return MaxMin_match(L, R); -} - -/// \brief Match an 'ordered' floating point maximum function. -/// Floating point has one special value 'NaN'. Therefore, there is no total -/// order. However, if we can ignore the 'NaN' value (for example, because of a -/// 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' -/// semantics. In the presence of 'NaN' we have to preserve the original -/// select(fcmp(ogt/ge, L, R), L, R) semantics matched by this predicate. -/// -/// max(L, R) iff L and R are not NaN -/// m_OrdFMax(L, R) = R iff L or R are NaN -template -inline MaxMin_match m_OrdFMax(const LHS &L, - const RHS &R) { - return MaxMin_match(L, R); -} - -/// \brief Match an 'ordered' floating point minimum function. -/// Floating point has one special value 'NaN'. Therefore, there is no total -/// order. However, if we can ignore the 'NaN' value (for example, because of a -/// 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' -/// semantics. In the presence of 'NaN' we have to preserve the original -/// select(fcmp(olt/le, L, R), L, R) semantics matched by this predicate. -/// -/// max(L, R) iff L and R are not NaN -/// m_OrdFMin(L, R) = R iff L or R are NaN -template -inline MaxMin_match m_OrdFMin(const LHS &L, - const RHS &R) { - return MaxMin_match(L, R); -} - -/// \brief Match an 'unordered' floating point maximum function. -/// Floating point has one special value 'NaN'. Therefore, there is no total -/// order. However, if we can ignore the 'NaN' value (for example, because of a -/// 'no-nans-float-math' flag) a combination of a fcmp and select has 'maximum' -/// semantics. In the presence of 'NaN' we have to preserve the original -/// select(fcmp(ugt/ge, L, R), L, R) semantics matched by this predicate. -/// -/// max(L, R) iff L and R are not NaN -/// m_UnordFMin(L, R) = L iff L or R are NaN -template -inline MaxMin_match -m_UnordFMax(const LHS &L, const RHS &R) { - return MaxMin_match(L, R); -} - -//===----------------------------------------------------------------------===// -// Matchers for overflow check patterns: e.g. (a + b) u< a -// - -template -struct UAddWithOverflow_match { - LHS_t L; - RHS_t R; - Sum_t S; - - UAddWithOverflow_match(const LHS_t &L, const RHS_t &R, const Sum_t &S) - : L(L), R(R), S(S) {} - - template bool match(OpTy *V) { - Value *ICmpLHS, *ICmpRHS; - ICmpInst::Predicate Pred; - if (!m_ICmp(Pred, m_Value(ICmpLHS), m_Value(ICmpRHS)).match(V)) - return false; - - Value *AddLHS, *AddRHS; - auto AddExpr = m_Add(m_Value(AddLHS), m_Value(AddRHS)); - - // (a + b) u< a, (a + b) u< b - if (Pred == ICmpInst::ICMP_ULT) - if (AddExpr.match(ICmpLHS) && (ICmpRHS == AddLHS || ICmpRHS == AddRHS)) - return L.match(AddLHS) && R.match(AddRHS) && S.match(ICmpLHS); - - // a >u (a + b), b >u (a + b) - if (Pred == ICmpInst::ICMP_UGT) - if (AddExpr.match(ICmpRHS) && (ICmpLHS == AddLHS || ICmpLHS == AddRHS)) - return L.match(AddLHS) && R.match(AddRHS) && S.match(ICmpRHS); - - return false; - } -}; - -/// \brief Match an icmp instruction checking for unsigned overflow on addition. -/// -/// S is matched to the addition whose result is being checked for overflow, and -/// L and R are matched to the LHS and RHS of S. -template -UAddWithOverflow_match -m_UAddWithOverflow(const LHS_t &L, const RHS_t &R, const Sum_t &S) { - return UAddWithOverflow_match(L, R, S); -} - -/// \brief Match an 'unordered' floating point minimum function. -/// Floating point has one special value 'NaN'. Therefore, there is no total -/// order. However, if we can ignore the 'NaN' value (for example, because of a -/// 'no-nans-float-math' flag) a combination of a fcmp and select has 'minimum' -/// semantics. In the presence of 'NaN' we have to preserve the original -/// select(fcmp(ult/le, L, R), L, R) semantics matched by this predicate. -/// -/// max(L, R) iff L and R are not NaN -/// m_UnordFMin(L, R) = L iff L or R are NaN -template -inline MaxMin_match -m_UnordFMin(const LHS &L, const RHS &R) { - return MaxMin_match(L, R); -} - -template struct Argument_match { - unsigned OpI; - Opnd_t Val; - Argument_match(unsigned OpIdx, const Opnd_t &V) : OpI(OpIdx), Val(V) {} - - template bool match(OpTy *V) { - CallSite CS(V); - return CS.isCall() && Val.match(CS.getArgument(OpI)); - } -}; - -/// \brief Match an argument. -template -inline Argument_match m_Argument(const Opnd_t &Op) { - return Argument_match(OpI, Op); -} - -/// \brief Intrinsic matchers. -struct IntrinsicID_match { - unsigned ID; - IntrinsicID_match(Intrinsic::ID IntrID) : ID(IntrID) {} - - template bool match(OpTy *V) { - if (const auto *CI = dyn_cast(V)) - if (const auto *F = CI->getCalledFunction()) - return F->getIntrinsicID() == ID; - return false; - } -}; - -/// Intrinsic matches are combinations of ID matchers, and argument -/// matchers. Higher arity matcher are defined recursively in terms of and-ing -/// them with lower arity matchers. Here's some convenient typedefs for up to -/// several arguments, and more can be added as needed -template -struct m_Intrinsic_Ty; -template struct m_Intrinsic_Ty { - typedef match_combine_and> Ty; -}; -template struct m_Intrinsic_Ty { - typedef match_combine_and::Ty, Argument_match> - Ty; -}; -template -struct m_Intrinsic_Ty { - typedef match_combine_and::Ty, - Argument_match> Ty; -}; -template -struct m_Intrinsic_Ty { - typedef match_combine_and::Ty, - Argument_match> Ty; -}; - -/// \brief Match intrinsic calls like this: -/// m_Intrinsic(m_Value(X)) -template inline IntrinsicID_match m_Intrinsic() { - return IntrinsicID_match(IntrID); -} - -template -inline typename m_Intrinsic_Ty::Ty m_Intrinsic(const T0 &Op0) { - return m_CombineAnd(m_Intrinsic(), m_Argument<0>(Op0)); -} - -template -inline typename m_Intrinsic_Ty::Ty m_Intrinsic(const T0 &Op0, - const T1 &Op1) { - return m_CombineAnd(m_Intrinsic(Op0), m_Argument<1>(Op1)); -} - -template -inline typename m_Intrinsic_Ty::Ty -m_Intrinsic(const T0 &Op0, const T1 &Op1, const T2 &Op2) { - return m_CombineAnd(m_Intrinsic(Op0, Op1), m_Argument<2>(Op2)); -} - -template -inline typename m_Intrinsic_Ty::Ty -m_Intrinsic(const T0 &Op0, const T1 &Op1, const T2 &Op2, const T3 &Op3) { - return m_CombineAnd(m_Intrinsic(Op0, Op1, Op2), m_Argument<3>(Op3)); -} - -// Helper intrinsic matching specializations. -template -inline typename m_Intrinsic_Ty::Ty m_BSwap(const Opnd0 &Op0) { - return m_Intrinsic(Op0); -} - -template -inline typename m_Intrinsic_Ty::Ty m_FMin(const Opnd0 &Op0, - const Opnd1 &Op1) { - return m_Intrinsic(Op0, Op1); -} - -template -inline typename m_Intrinsic_Ty::Ty m_FMax(const Opnd0 &Op0, - const Opnd1 &Op1) { - return m_Intrinsic(Op0, Op1); -} - -template struct Signum_match { - Opnd_t Val; - Signum_match(const Opnd_t &V) : Val(V) {} - - template bool match(OpTy *V) { - unsigned TypeSize = V->getType()->getScalarSizeInBits(); - if (TypeSize == 0) - return false; - - unsigned ShiftWidth = TypeSize - 1; - Value *OpL = nullptr, *OpR = nullptr; - - // This is the representation of signum we match: - // - // signum(x) == (x >> 63) | (-x >>u 63) - // - // An i1 value is its own signum, so it's correct to match - // - // signum(x) == (x >> 0) | (-x >>u 0) - // - // for i1 values. - - auto LHS = m_AShr(m_Value(OpL), m_SpecificInt(ShiftWidth)); - auto RHS = m_LShr(m_Neg(m_Value(OpR)), m_SpecificInt(ShiftWidth)); - auto Signum = m_Or(LHS, RHS); - - return Signum.match(V) && OpL == OpR && Val.match(OpL); - } -}; - -/// \brief Matches a signum pattern. -/// -/// signum(x) = -/// x > 0 -> 1 -/// x == 0 -> 0 -/// x < 0 -> -1 -template inline Signum_match m_Signum(const Val_t &V) { - return Signum_match(V); -} - -//===----------------------------------------------------------------------===// -// Matchers for two-operands operators with the operators in either order -// - -/// \brief Matches an ICmp with a predicate over LHS and RHS in either order. -/// Does not swap the predicate. -template -inline match_combine_or, - CmpClass_match> -m_c_ICmp(ICmpInst::Predicate &Pred, const LHS &L, const RHS &R) { - return m_CombineOr(m_ICmp(Pred, L, R), m_ICmp(Pred, R, L)); -} - -/// \brief Matches an And with LHS and RHS in either order. -template -inline match_combine_or, - BinaryOp_match> -m_c_And(const LHS &L, const RHS &R) { - return m_CombineOr(m_And(L, R), m_And(R, L)); -} - -/// \brief Matches an Or with LHS and RHS in either order. -template -inline match_combine_or, - BinaryOp_match> -m_c_Or(const LHS &L, const RHS &R) { - return m_CombineOr(m_Or(L, R), m_Or(R, L)); -} - -/// \brief Matches an Xor with LHS and RHS in either order. -template -inline match_combine_or, - BinaryOp_match> -m_c_Xor(const LHS &L, const RHS &R) { - return m_CombineOr(m_Xor(L, R), m_Xor(R, L)); -} - -} // end namespace PatternMatch -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/PredIteratorCache.h b/llvm/include/llvm/IR/PredIteratorCache.h deleted file mode 100644 index 118310ae..00000000 --- a/llvm/include/llvm/IR/PredIteratorCache.h +++ /dev/null @@ -1,79 +0,0 @@ -//===- PredIteratorCache.h - pred_iterator Cache ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the PredIteratorCache class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_PREDITERATORCACHE_H -#define LLVM_IR_PREDITERATORCACHE_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/IR/CFG.h" -#include "llvm/Support/Allocator.h" - -namespace llvm { - -/// PredIteratorCache - This class is an extremely trivial cache for -/// predecessor iterator queries. This is useful for code that repeatedly -/// wants the predecessor list for the same blocks. -class PredIteratorCache { - /// BlockToPredsMap - Pointer to null-terminated list. - DenseMap BlockToPredsMap; - DenseMap BlockToPredCountMap; - - /// Memory - This is the space that holds cached preds. - BumpPtrAllocator Memory; - -private: - /// GetPreds - Get a cached list for the null-terminated predecessor list of - /// the specified block. This can be used in a loop like this: - /// for (BasicBlock **PI = PredCache->GetPreds(BB); *PI; ++PI) - /// use(*PI); - /// instead of: - /// for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) - BasicBlock **GetPreds(BasicBlock *BB) { - BasicBlock **&Entry = BlockToPredsMap[BB]; - if (Entry) - return Entry; - - SmallVector PredCache(pred_begin(BB), pred_end(BB)); - PredCache.push_back(nullptr); // null terminator. - - BlockToPredCountMap[BB] = PredCache.size() - 1; - - Entry = Memory.Allocate(PredCache.size()); - std::copy(PredCache.begin(), PredCache.end(), Entry); - return Entry; - } - - unsigned GetNumPreds(BasicBlock *BB) { - GetPreds(BB); - return BlockToPredCountMap[BB]; - } - -public: - size_t size(BasicBlock *BB) { return GetNumPreds(BB); } - ArrayRef get(BasicBlock *BB) { - return makeArrayRef(GetPreds(BB), GetNumPreds(BB)); - } - - /// clear - Remove all information. - void clear() { - BlockToPredsMap.clear(); - BlockToPredCountMap.clear(); - Memory.Reset(); - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/ProfileSummary.h b/llvm/include/llvm/IR/ProfileSummary.h deleted file mode 100644 index f4248014..00000000 --- a/llvm/include/llvm/IR/ProfileSummary.h +++ /dev/null @@ -1,85 +0,0 @@ -//===-- ProfileSummary.h - Profile summary data structure. ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the profile summary data structure. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_SUPPORT_PROFILE_SUMMARY_H -#define LLVM_SUPPORT_PROFILE_SUMMARY_H - -#include -#include -#include - -#include "llvm/Support/Casting.h" - -namespace llvm { - -class LLVMContext; -class Metadata; -class MDTuple; -class MDNode; - -// The profile summary is one or more (Cutoff, MinCount, NumCounts) triplets. -// The semantics of counts depend on the type of profile. For instrumentation -// profile, counts are block counts and for sample profile, counts are -// per-line samples. Given a target counts percentile, we compute the minimum -// number of counts needed to reach this target and the minimum among these -// counts. -struct ProfileSummaryEntry { - uint32_t Cutoff; ///< The required percentile of counts. - uint64_t MinCount; ///< The minimum count for this percentile. - uint64_t NumCounts; ///< Number of counts >= the minimum count. - ProfileSummaryEntry(uint32_t TheCutoff, uint64_t TheMinCount, - uint64_t TheNumCounts) - : Cutoff(TheCutoff), MinCount(TheMinCount), NumCounts(TheNumCounts) {} -}; - -typedef std::vector SummaryEntryVector; - -class ProfileSummary { -public: - enum Kind { PSK_Instr, PSK_Sample }; - -private: - const Kind PSK; - static const char *KindStr[2]; - SummaryEntryVector DetailedSummary; - uint64_t TotalCount, MaxCount, MaxInternalCount, MaxFunctionCount; - uint32_t NumCounts, NumFunctions; - /// \brief Return detailed summary as metadata. - Metadata *getDetailedSummaryMD(LLVMContext &Context); - -public: - static const int Scale = 1000000; - ProfileSummary(Kind K, SummaryEntryVector DetailedSummary, - uint64_t TotalCount, uint64_t MaxCount, - uint64_t MaxInternalCount, uint64_t MaxFunctionCount, - uint32_t NumCounts, uint32_t NumFunctions) - : PSK(K), DetailedSummary(std::move(DetailedSummary)), - TotalCount(TotalCount), MaxCount(MaxCount), - MaxInternalCount(MaxInternalCount), MaxFunctionCount(MaxFunctionCount), - NumCounts(NumCounts), NumFunctions(NumFunctions) {} - Kind getKind() const { return PSK; } - /// \brief Return summary information as metadata. - Metadata *getMD(LLVMContext &Context); - /// \brief Construct profile summary from metdata. - static ProfileSummary *getFromMD(Metadata *MD); - SummaryEntryVector &getDetailedSummary() { return DetailedSummary; } - uint32_t getNumFunctions() { return NumFunctions; } - uint64_t getMaxFunctionCount() { return MaxFunctionCount; } - uint32_t getNumCounts() { return NumCounts; } - uint64_t getTotalCount() { return TotalCount; } - uint64_t getMaxCount() { return MaxCount; } - uint64_t getMaxInternalCount() { return MaxInternalCount; } -}; - -} // end namespace llvm -#endif diff --git a/llvm/include/llvm/IR/Statepoint.h b/llvm/include/llvm/IR/Statepoint.h deleted file mode 100644 index 5cd7fe1b..00000000 --- a/llvm/include/llvm/IR/Statepoint.h +++ /dev/null @@ -1,449 +0,0 @@ -//===-- llvm/IR/Statepoint.h - gc.statepoint utilities ------ --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains utility functions and a wrapper class analogous to -// CallSite for accessing the fields of gc.statepoint, gc.relocate, -// gc.result intrinsics; and some general utilities helpful when dealing with -// gc.statepoint. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_STATEPOINT_H -#define LLVM_IR_STATEPOINT_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/ADT/Optional.h" -#include "llvm/IR/BasicBlock.h" -#include "llvm/IR/CallSite.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/Intrinsics.h" - -namespace llvm { -/// The statepoint intrinsic accepts a set of flags as its third argument. -/// Valid values come out of this set. -enum class StatepointFlags { - None = 0, - GCTransition = 1, ///< Indicates that this statepoint is a transition from - ///< GC-aware code to code that is not GC-aware. - - MaskAll = GCTransition ///< A bitmask that includes all valid flags. -}; - -class GCRelocateInst; -class GCResultInst; -class ImmutableStatepoint; - -bool isStatepoint(ImmutableCallSite CS); -bool isStatepoint(const Value *V); -bool isStatepoint(const Value &V); - -bool isGCRelocate(ImmutableCallSite CS); -bool isGCResult(ImmutableCallSite CS); - -/// Analogous to CallSiteBase, this provides most of the actual -/// functionality for Statepoint and ImmutableStatepoint. It is -/// templatized to allow easily specializing of const and non-const -/// concrete subtypes. This is structured analogous to CallSite -/// rather than the IntrinsicInst.h helpers since we need to support -/// invokable statepoints. -template -class StatepointBase { - CallSiteTy StatepointCS; - void *operator new(size_t, unsigned) = delete; - void *operator new(size_t s) = delete; - -protected: - explicit StatepointBase(InstructionTy *I) { - if (isStatepoint(I)) { - StatepointCS = CallSiteTy(I); - assert(StatepointCS && "isStatepoint implies CallSite"); - } - } - explicit StatepointBase(CallSiteTy CS) { - if (isStatepoint(CS)) - StatepointCS = CS; - } - -public: - typedef typename CallSiteTy::arg_iterator arg_iterator; - - enum { - IDPos = 0, - NumPatchBytesPos = 1, - CalledFunctionPos = 2, - NumCallArgsPos = 3, - FlagsPos = 4, - CallArgsBeginPos = 5, - }; - - explicit operator bool() const { - // We do not assign non-statepoint CallSites to StatepointCS. - return (bool)StatepointCS; - } - - /// Return the underlying CallSite. - CallSiteTy getCallSite() const { - assert(*this && "check validity first!"); - return StatepointCS; - } - - uint64_t getFlags() const { - return cast(getCallSite().getArgument(FlagsPos)) - ->getZExtValue(); - } - - /// Return the ID associated with this statepoint. - uint64_t getID() const { - const Value *IDVal = getCallSite().getArgument(IDPos); - return cast(IDVal)->getZExtValue(); - } - - /// Return the number of patchable bytes associated with this statepoint. - uint32_t getNumPatchBytes() const { - const Value *NumPatchBytesVal = getCallSite().getArgument(NumPatchBytesPos); - uint64_t NumPatchBytes = - cast(NumPatchBytesVal)->getZExtValue(); - assert(isInt<32>(NumPatchBytes) && "should fit in 32 bits!"); - return NumPatchBytes; - } - - /// Return the value actually being called or invoked. - ValueTy *getCalledValue() const { - return getCallSite().getArgument(CalledFunctionPos); - } - - InstructionTy *getInstruction() const { - return getCallSite().getInstruction(); - } - - /// Return the function being called if this is a direct call, otherwise - /// return null (if it's an indirect call). - FunTy *getCalledFunction() const { - return dyn_cast(getCalledValue()); - } - - /// Return the caller function for this statepoint. - FunTy *getCaller() const { return getCallSite().getCaller(); } - - /// Determine if the statepoint cannot unwind. - bool doesNotThrow() const { - Function *F = getCalledFunction(); - return getCallSite().doesNotThrow() || (F ? F->doesNotThrow() : false); - } - - /// Return the type of the value returned by the call underlying the - /// statepoint. - Type *getActualReturnType() const { - auto *FTy = cast( - cast(getCalledValue()->getType())->getElementType()); - return FTy->getReturnType(); - } - - /// Number of arguments to be passed to the actual callee. - int getNumCallArgs() const { - const Value *NumCallArgsVal = getCallSite().getArgument(NumCallArgsPos); - return cast(NumCallArgsVal)->getZExtValue(); - } - - size_t arg_size() const { return getNumCallArgs(); } - typename CallSiteTy::arg_iterator arg_begin() const { - assert(CallArgsBeginPos <= (int)getCallSite().arg_size()); - return getCallSite().arg_begin() + CallArgsBeginPos; - } - typename CallSiteTy::arg_iterator arg_end() const { - auto I = arg_begin() + arg_size(); - assert((getCallSite().arg_end() - I) >= 0); - return I; - } - - ValueTy *getArgument(unsigned Index) { - assert(Index < arg_size() && "out of bounds!"); - return *(arg_begin() + Index); - } - - /// range adapter for call arguments - iterator_range call_args() const { - return make_range(arg_begin(), arg_end()); - } - - /// \brief Return true if the call or the callee has the given attribute. - bool paramHasAttr(unsigned i, Attribute::AttrKind A) const { - Function *F = getCalledFunction(); - return getCallSite().paramHasAttr(i + CallArgsBeginPos, A) || - (F ? F->getAttributes().hasAttribute(i, A) : false); - } - - /// Number of GC transition args. - int getNumTotalGCTransitionArgs() const { - const Value *NumGCTransitionArgs = *arg_end(); - return cast(NumGCTransitionArgs)->getZExtValue(); - } - typename CallSiteTy::arg_iterator gc_transition_args_begin() const { - auto I = arg_end() + 1; - assert((getCallSite().arg_end() - I) >= 0); - return I; - } - typename CallSiteTy::arg_iterator gc_transition_args_end() const { - auto I = gc_transition_args_begin() + getNumTotalGCTransitionArgs(); - assert((getCallSite().arg_end() - I) >= 0); - return I; - } - - /// range adapter for GC transition arguments - iterator_range gc_transition_args() const { - return make_range(gc_transition_args_begin(), gc_transition_args_end()); - } - - /// Number of additional arguments excluding those intended - /// for garbage collection. - int getNumTotalVMSArgs() const { - const Value *NumVMSArgs = *gc_transition_args_end(); - return cast(NumVMSArgs)->getZExtValue(); - } - - typename CallSiteTy::arg_iterator vm_state_begin() const { - auto I = gc_transition_args_end() + 1; - assert((getCallSite().arg_end() - I) >= 0); - return I; - } - typename CallSiteTy::arg_iterator vm_state_end() const { - auto I = vm_state_begin() + getNumTotalVMSArgs(); - assert((getCallSite().arg_end() - I) >= 0); - return I; - } - - /// range adapter for vm state arguments - iterator_range vm_state_args() const { - return make_range(vm_state_begin(), vm_state_end()); - } - - typename CallSiteTy::arg_iterator gc_args_begin() const { - return vm_state_end(); - } - typename CallSiteTy::arg_iterator gc_args_end() const { - return getCallSite().arg_end(); - } - - unsigned gcArgsStartIdx() const { - return gc_args_begin() - getInstruction()->op_begin(); - } - - /// range adapter for gc arguments - iterator_range gc_args() const { - return make_range(gc_args_begin(), gc_args_end()); - } - - /// Get list of all gc reloactes linked to this statepoint - /// May contain several relocations for the same base/derived pair. - /// For example this could happen due to relocations on unwinding - /// path of invoke. - std::vector getRelocates() const; - - /// Get the experimental_gc_result call tied to this statepoint. Can be - /// nullptr if there isn't a gc_result tied to this statepoint. Guaranteed to - /// be a CallInst if non-null. - const GCResultInst *getGCResult() const { - for (auto *U : getInstruction()->users()) - if (auto *GRI = dyn_cast(U)) - return GRI; - return nullptr; - } - -#ifndef NDEBUG - /// Asserts if this statepoint is malformed. Common cases for failure - /// include incorrect length prefixes for variable length sections or - /// illegal values for parameters. - void verify() { - assert(getNumCallArgs() >= 0 && - "number of arguments to actually callee can't be negative"); - - // The internal asserts in the iterator accessors do the rest. - (void)arg_begin(); - (void)arg_end(); - (void)gc_transition_args_begin(); - (void)gc_transition_args_end(); - (void)vm_state_begin(); - (void)vm_state_end(); - (void)gc_args_begin(); - (void)gc_args_end(); - } -#endif -}; - -/// A specialization of it's base class for read only access -/// to a gc.statepoint. -class ImmutableStatepoint - : public StatepointBase { - typedef StatepointBase Base; - -public: - explicit ImmutableStatepoint(const Instruction *I) : Base(I) {} - explicit ImmutableStatepoint(ImmutableCallSite CS) : Base(CS) {} -}; - -/// A specialization of it's base class for read-write access -/// to a gc.statepoint. -class Statepoint - : public StatepointBase { - typedef StatepointBase Base; - -public: - explicit Statepoint(Instruction *I) : Base(I) {} - explicit Statepoint(CallSite CS) : Base(CS) {} -}; - -/// Common base class for representing values projected from a statepoint. -/// Currently, the only projections available are gc.result and gc.relocate. -class GCProjectionInst : public IntrinsicInst { -public: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::experimental_gc_relocate || - I->getIntrinsicID() == Intrinsic::experimental_gc_result; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - /// Return true if this relocate is tied to the invoke statepoint. - /// This includes relocates which are on the unwinding path. - bool isTiedToInvoke() const { - const Value *Token = getArgOperand(0); - - return isa(Token) || isa(Token); - } - - /// The statepoint with which this gc.relocate is associated. - const Instruction *getStatepoint() const { - const Value *Token = getArgOperand(0); - - // This takes care both of relocates for call statepoints and relocates - // on normal path of invoke statepoint. - if (!isa(Token)) { - assert(isStatepoint(Token)); - return cast(Token); - } - - // This relocate is on exceptional path of an invoke statepoint - const BasicBlock *InvokeBB = - cast(Token)->getParent()->getUniquePredecessor(); - - assert(InvokeBB && "safepoints should have unique landingpads"); - assert(InvokeBB->getTerminator() && - "safepoint block should be well formed"); - assert(isStatepoint(InvokeBB->getTerminator())); - - return InvokeBB->getTerminator(); - } -}; - -/// Represents calls to the gc.relocate intrinsic. -class GCRelocateInst : public GCProjectionInst { -public: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::experimental_gc_relocate; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } - - /// The index into the associate statepoint's argument list - /// which contains the base pointer of the pointer whose - /// relocation this gc.relocate describes. - unsigned getBasePtrIndex() const { - return cast(getArgOperand(1))->getZExtValue(); - } - - /// The index into the associate statepoint's argument list which - /// contains the pointer whose relocation this gc.relocate describes. - unsigned getDerivedPtrIndex() const { - return cast(getArgOperand(2))->getZExtValue(); - } - - Value *getBasePtr() const { - ImmutableCallSite CS(getStatepoint()); - return *(CS.arg_begin() + getBasePtrIndex()); - } - - Value *getDerivedPtr() const { - ImmutableCallSite CS(getStatepoint()); - return *(CS.arg_begin() + getDerivedPtrIndex()); - } -}; - -/// Represents calls to the gc.result intrinsic. -class GCResultInst : public GCProjectionInst { -public: - static inline bool classof(const IntrinsicInst *I) { - return I->getIntrinsicID() == Intrinsic::experimental_gc_result; - } - static inline bool classof(const Value *V) { - return isa(V) && classof(cast(V)); - } -}; - -template -std::vector -StatepointBase::getRelocates() - const { - - std::vector Result; - - CallSiteTy StatepointCS = getCallSite(); - - // Search for relocated pointers. Note that working backwards from the - // gc_relocates ensures that we only get pairs which are actually relocated - // and used after the statepoint. - for (const User *U : getInstruction()->users()) - if (auto *Relocate = dyn_cast(U)) - Result.push_back(Relocate); - - if (!StatepointCS.isInvoke()) - return Result; - - // We need to scan thorough exceptional relocations if it is invoke statepoint - LandingPadInst *LandingPad = - cast(getInstruction())->getLandingPadInst(); - - // Search for gc relocates that are attached to this landingpad. - for (const User *LandingPadUser : LandingPad->users()) { - if (auto *Relocate = dyn_cast(LandingPadUser)) - Result.push_back(Relocate); - } - return Result; -} - -/// Call sites that get wrapped by a gc.statepoint (currently only in -/// RewriteStatepointsForGC and potentially in other passes in the future) can -/// have attributes that describe properties of gc.statepoint call they will be -/// eventually be wrapped in. This struct is used represent such directives. -struct StatepointDirectives { - Optional NumPatchBytes; - Optional StatepointID; - - static const uint64_t DefaultStatepointID = 0xABCDEF00; - static const uint64_t DeoptBundleStatepointID = 0xABCDEF0F; -}; - -/// Parse out statepoint directives from the function attributes present in \p -/// AS. -StatepointDirectives parseStatepointDirectivesFromAttrs(AttributeSet AS); - -/// Return \c true if the the \p Attr is an attribute that is a statepoint -/// directive. -bool isStatepointDirectiveAttr(Attribute Attr); -} - -#endif diff --git a/llvm/include/llvm/IR/SymbolTableListTraits.h b/llvm/include/llvm/IR/SymbolTableListTraits.h deleted file mode 100644 index 60e04e2f..00000000 --- a/llvm/include/llvm/IR/SymbolTableListTraits.h +++ /dev/null @@ -1,124 +0,0 @@ -//===-- llvm/SymbolTableListTraits.h - Traits for iplist --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines a generic class that is used to implement the automatic -// symbol table manipulation that occurs when you put (for example) a named -// instruction into a basic block. -// -// The way that this is implemented is by using a special traits class with the -// intrusive list that makes up the list of instructions in a basic block. When -// a new element is added to the list of instructions, the traits class is -// notified, allowing the symbol table to be updated. -// -// This generic class implements the traits class. It must be generic so that -// it can work for all uses it, which include lists of instructions, basic -// blocks, arguments, functions, global variables, etc... -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_SYMBOLTABLELISTTRAITS_H -#define LLVM_IR_SYMBOLTABLELISTTRAITS_H - -#include "llvm/ADT/ilist.h" - -namespace llvm { -class ValueSymbolTable; - -template class ilist_iterator; -template class iplist; -template struct ilist_traits; - -template -struct SymbolTableListSentinelTraits - : public ilist_embedded_sentinel_traits {}; - -/// Template metafunction to get the parent type for a symbol table list. -/// -/// Implementations create a typedef called \c type so that we only need a -/// single template parameter for the list and traits. -template struct SymbolTableListParentType {}; -class Argument; -class BasicBlock; -class Function; -class Instruction; -class GlobalVariable; -class GlobalAlias; -class GlobalIFunc; -class Module; -#define DEFINE_SYMBOL_TABLE_PARENT_TYPE(NODE, PARENT) \ - template <> struct SymbolTableListParentType { typedef PARENT type; }; -DEFINE_SYMBOL_TABLE_PARENT_TYPE(Instruction, BasicBlock) -DEFINE_SYMBOL_TABLE_PARENT_TYPE(BasicBlock, Function) -DEFINE_SYMBOL_TABLE_PARENT_TYPE(Argument, Function) -DEFINE_SYMBOL_TABLE_PARENT_TYPE(Function, Module) -DEFINE_SYMBOL_TABLE_PARENT_TYPE(GlobalVariable, Module) -DEFINE_SYMBOL_TABLE_PARENT_TYPE(GlobalAlias, Module) -DEFINE_SYMBOL_TABLE_PARENT_TYPE(GlobalIFunc, Module) -#undef DEFINE_SYMBOL_TABLE_PARENT_TYPE - -template class SymbolTableList; - -// ValueSubClass - The type of objects that I hold, e.g. Instruction. -// ItemParentClass - The type of object that owns the list, e.g. BasicBlock. -// -template -class SymbolTableListTraits - : public ilist_nextprev_traits, - public SymbolTableListSentinelTraits, - public ilist_node_traits { - typedef SymbolTableList ListTy; - typedef - typename SymbolTableListParentType::type ItemParentClass; - -public: - SymbolTableListTraits() {} - -private: - /// getListOwner - Return the object that owns this list. If this is a list - /// of instructions, it returns the BasicBlock that owns them. - ItemParentClass *getListOwner() { - size_t Offset(size_t(&((ItemParentClass*)nullptr->*ItemParentClass:: - getSublistAccess(static_cast(nullptr))))); - ListTy *Anchor(static_cast(this)); - return reinterpret_cast(reinterpret_cast(Anchor)- - Offset); - } - - static ListTy &getList(ItemParentClass *Par) { - return Par->*(Par->getSublistAccess((ValueSubClass*)nullptr)); - } - - static ValueSymbolTable *getSymTab(ItemParentClass *Par) { - return Par ? toPtr(Par->getValueSymbolTable()) : nullptr; - } - -public: - void addNodeToList(ValueSubClass *V); - void removeNodeFromList(ValueSubClass *V); - void transferNodesFromList(SymbolTableListTraits &L2, - ilist_iterator first, - ilist_iterator last); -//private: - template - void setSymTabObject(TPtr *, TPtr); - static ValueSymbolTable *toPtr(ValueSymbolTable *P) { return P; } - static ValueSymbolTable *toPtr(ValueSymbolTable &R) { return &R; } -}; - -/// List that automatically updates parent links and symbol tables. -/// -/// When nodes are inserted into and removed from this list, the associated -/// symbol table will be automatically updated. Similarly, parent links get -/// updated automatically. -template -class SymbolTableList : public iplist> {}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/TrackingMDRef.h b/llvm/include/llvm/IR/TrackingMDRef.h deleted file mode 100644 index fe513a8f..00000000 --- a/llvm/include/llvm/IR/TrackingMDRef.h +++ /dev/null @@ -1,165 +0,0 @@ -//===- llvm/IR/TrackingMDRef.h - Tracking Metadata references ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// References to metadata that track RAUW. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_TRACKINGMDREF_H -#define LLVM_IR_TRACKINGMDREF_H - -#include "llvm/IR/Metadata.h" - -namespace llvm { - -/// \brief Tracking metadata reference. -/// -/// This class behaves like \a TrackingVH, but for metadata. -class TrackingMDRef { - Metadata *MD; - -public: - TrackingMDRef() : MD(nullptr) {} - explicit TrackingMDRef(Metadata *MD) : MD(MD) { track(); } - - TrackingMDRef(TrackingMDRef &&X) : MD(X.MD) { retrack(X); } - TrackingMDRef(const TrackingMDRef &X) : MD(X.MD) { track(); } - TrackingMDRef &operator=(TrackingMDRef &&X) { - if (&X == this) - return *this; - - untrack(); - MD = X.MD; - retrack(X); - return *this; - } - TrackingMDRef &operator=(const TrackingMDRef &X) { - if (&X == this) - return *this; - - untrack(); - MD = X.MD; - track(); - return *this; - } - ~TrackingMDRef() { untrack(); } - - Metadata *get() const { return MD; } - operator Metadata *() const { return get(); } - Metadata *operator->() const { return get(); } - Metadata &operator*() const { return *get(); } - - void reset() { - untrack(); - MD = nullptr; - } - void reset(Metadata *MD) { - untrack(); - this->MD = MD; - track(); - } - - /// \brief Check whether this has a trivial destructor. - /// - /// If \c MD isn't replaceable, the destructor will be a no-op. - bool hasTrivialDestructor() const { - return !MD || !MetadataTracking::isReplaceable(*MD); - } - - bool operator==(const TrackingMDRef &X) const { return MD == X.MD; } - bool operator!=(const TrackingMDRef &X) const { return MD != X.MD; } - -private: - void track() { - if (MD) - MetadataTracking::track(MD); - } - void untrack() { - if (MD) - MetadataTracking::untrack(MD); - } - void retrack(TrackingMDRef &X) { - assert(MD == X.MD && "Expected values to match"); - if (X.MD) { - MetadataTracking::retrack(X.MD, MD); - X.MD = nullptr; - } - } -}; - -/// \brief Typed tracking ref. -/// -/// Track refererences of a particular type. It's useful to use this for \a -/// MDNode and \a ValueAsMetadata. -template class TypedTrackingMDRef { - TrackingMDRef Ref; - -public: - TypedTrackingMDRef() {} - explicit TypedTrackingMDRef(T *MD) : Ref(static_cast(MD)) {} - - TypedTrackingMDRef(TypedTrackingMDRef &&X) : Ref(std::move(X.Ref)) {} - TypedTrackingMDRef(const TypedTrackingMDRef &X) : Ref(X.Ref) {} - TypedTrackingMDRef &operator=(TypedTrackingMDRef &&X) { - Ref = std::move(X.Ref); - return *this; - } - TypedTrackingMDRef &operator=(const TypedTrackingMDRef &X) { - Ref = X.Ref; - return *this; - } - - T *get() const { return (T *)Ref.get(); } - operator T *() const { return get(); } - T *operator->() const { return get(); } - T &operator*() const { return *get(); } - - bool operator==(const TypedTrackingMDRef &X) const { return Ref == X.Ref; } - bool operator!=(const TypedTrackingMDRef &X) const { return Ref != X.Ref; } - - void reset() { Ref.reset(); } - void reset(T *MD) { Ref.reset(static_cast(MD)); } - - /// \brief Check whether this has a trivial destructor. - bool hasTrivialDestructor() const { return Ref.hasTrivialDestructor(); } -}; - -typedef TypedTrackingMDRef TrackingMDNodeRef; -typedef TypedTrackingMDRef TrackingValueAsMetadataRef; - -// Expose the underlying metadata to casting. -template <> struct simplify_type { - typedef Metadata *SimpleType; - static SimpleType getSimplifiedValue(TrackingMDRef &MD) { return MD.get(); } -}; - -template <> struct simplify_type { - typedef Metadata *SimpleType; - static SimpleType getSimplifiedValue(const TrackingMDRef &MD) { - return MD.get(); - } -}; - -template struct simplify_type> { - typedef T *SimpleType; - static SimpleType getSimplifiedValue(TypedTrackingMDRef &MD) { - return MD.get(); - } -}; - -template struct simplify_type> { - typedef T *SimpleType; - static SimpleType getSimplifiedValue(const TypedTrackingMDRef &MD) { - return MD.get(); - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/Type.h b/llvm/include/llvm/IR/Type.h deleted file mode 100644 index ef7ad733..00000000 --- a/llvm/include/llvm/IR/Type.h +++ /dev/null @@ -1,472 +0,0 @@ -//===-- llvm/Type.h - Classes for handling data types -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the Type class. For more "Type" -// stuff, look in DerivedTypes.h. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_TYPE_H -#define LLVM_IR_TYPE_H - -#include "llvm/ADT/APFloat.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/Support/CBindingWrapping.h" -#include "llvm/Support/Casting.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { - -class PointerType; -class IntegerType; -class raw_ostream; -class Module; -class LLVMContext; -class LLVMContextImpl; -class StringRef; -template struct GraphTraits; - -/// The instances of the Type class are immutable: once they are created, -/// they are never changed. Also note that only one instance of a particular -/// type is ever created. Thus seeing if two types are equal is a matter of -/// doing a trivial pointer comparison. To enforce that no two equal instances -/// are created, Type instances can only be created via static factory methods -/// in class Type and in derived classes. Once allocated, Types are never -/// free'd. -/// -class Type { -public: - //===--------------------------------------------------------------------===// - /// Definitions of all of the base types for the Type system. Based on this - /// value, you can cast to a class defined in DerivedTypes.h. - /// Note: If you add an element to this, you need to add an element to the - /// Type::getPrimitiveType function, or else things will break! - /// Also update LLVMTypeKind and LLVMGetTypeKind () in the C binding. - /// - enum TypeID { - // PrimitiveTypes - make sure LastPrimitiveTyID stays up to date. - VoidTyID = 0, ///< 0: type with no size - HalfTyID, ///< 1: 16-bit floating point type - FloatTyID, ///< 2: 32-bit floating point type - DoubleTyID, ///< 3: 64-bit floating point type - X86_FP80TyID, ///< 4: 80-bit floating point type (X87) - FP128TyID, ///< 5: 128-bit floating point type (112-bit mantissa) - PPC_FP128TyID, ///< 6: 128-bit floating point type (two 64-bits, PowerPC) - LabelTyID, ///< 7: Labels - MetadataTyID, ///< 8: Metadata - X86_MMXTyID, ///< 9: MMX vectors (64 bits, X86 specific) - TokenTyID, ///< 10: Tokens - - // Derived types... see DerivedTypes.h file. - // Make sure FirstDerivedTyID stays up to date! - IntegerTyID, ///< 11: Arbitrary bit width integers - FunctionTyID, ///< 12: Functions - StructTyID, ///< 13: Structures - ArrayTyID, ///< 14: Arrays - PointerTyID, ///< 15: Pointers - VectorTyID ///< 16: SIMD 'packed' format, or other vector type - }; - -private: - /// This refers to the LLVMContext in which this type was uniqued. - LLVMContext &Context; - - TypeID ID : 8; // The current base type of this type. - unsigned SubclassData : 24; // Space for subclasses to store data. - -protected: - friend class LLVMContextImpl; - explicit Type(LLVMContext &C, TypeID tid) - : Context(C), ID(tid), SubclassData(0), - NumContainedTys(0), ContainedTys(nullptr) {} - ~Type() = default; - - unsigned getSubclassData() const { return SubclassData; } - - void setSubclassData(unsigned val) { - SubclassData = val; - // Ensure we don't have any accidental truncation. - assert(getSubclassData() == val && "Subclass data too large for field"); - } - - /// Keeps track of how many Type*'s there are in the ContainedTys list. - unsigned NumContainedTys; - - /// A pointer to the array of Types contained by this Type. For example, this - /// includes the arguments of a function type, the elements of a structure, - /// the pointee of a pointer, the element type of an array, etc. This pointer - /// may be 0 for types that don't contain other types (Integer, Double, - /// Float). - Type * const *ContainedTys; - - static bool isSequentialType(TypeID TyID) { - return TyID == ArrayTyID || TyID == PointerTyID || TyID == VectorTyID; - } - -public: - /// Print the current type. - /// Omit the type details if \p NoDetails == true. - /// E.g., let %st = type { i32, i16 } - /// When \p NoDetails is true, we only print %st. - /// Put differently, \p NoDetails prints the type as if - /// inlined with the operands when printing an instruction. - void print(raw_ostream &O, bool IsForDebug = false, - bool NoDetails = false) const; - void dump() const; - - /// Return the LLVMContext in which this type was uniqued. - LLVMContext &getContext() const { return Context; } - - //===--------------------------------------------------------------------===// - // Accessors for working with types. - // - - /// Return the type id for the type. This will return one of the TypeID enum - /// elements defined above. - TypeID getTypeID() const { return ID; } - - /// Return true if this is 'void'. - bool isVoidTy() const { return getTypeID() == VoidTyID; } - - /// Return true if this is 'half', a 16-bit IEEE fp type. - bool isHalfTy() const { return getTypeID() == HalfTyID; } - - /// Return true if this is 'float', a 32-bit IEEE fp type. - bool isFloatTy() const { return getTypeID() == FloatTyID; } - - /// Return true if this is 'double', a 64-bit IEEE fp type. - bool isDoubleTy() const { return getTypeID() == DoubleTyID; } - - /// Return true if this is x86 long double. - bool isX86_FP80Ty() const { return getTypeID() == X86_FP80TyID; } - - /// Return true if this is 'fp128'. - bool isFP128Ty() const { return getTypeID() == FP128TyID; } - - /// Return true if this is powerpc long double. - bool isPPC_FP128Ty() const { return getTypeID() == PPC_FP128TyID; } - - /// Return true if this is one of the six floating-point types - bool isFloatingPointTy() const { - return getTypeID() == HalfTyID || getTypeID() == FloatTyID || - getTypeID() == DoubleTyID || - getTypeID() == X86_FP80TyID || getTypeID() == FP128TyID || - getTypeID() == PPC_FP128TyID; - } - - const fltSemantics &getFltSemantics() const { - switch (getTypeID()) { - case HalfTyID: return APFloat::IEEEhalf; - case FloatTyID: return APFloat::IEEEsingle; - case DoubleTyID: return APFloat::IEEEdouble; - case X86_FP80TyID: return APFloat::x87DoubleExtended; - case FP128TyID: return APFloat::IEEEquad; - case PPC_FP128TyID: return APFloat::PPCDoubleDouble; - default: llvm_unreachable("Invalid floating type"); - } - } - - /// Return true if this is X86 MMX. - bool isX86_MMXTy() const { return getTypeID() == X86_MMXTyID; } - - /// Return true if this is a FP type or a vector of FP. - bool isFPOrFPVectorTy() const { return getScalarType()->isFloatingPointTy(); } - - /// Return true if this is 'label'. - bool isLabelTy() const { return getTypeID() == LabelTyID; } - - /// Return true if this is 'metadata'. - bool isMetadataTy() const { return getTypeID() == MetadataTyID; } - - /// Return true if this is 'token'. - bool isTokenTy() const { return getTypeID() == TokenTyID; } - - /// True if this is an instance of IntegerType. - bool isIntegerTy() const { return getTypeID() == IntegerTyID; } - - /// Return true if this is an IntegerType of the given width. - bool isIntegerTy(unsigned Bitwidth) const; - - /// Return true if this is an integer type or a vector of integer types. - bool isIntOrIntVectorTy() const { return getScalarType()->isIntegerTy(); } - - /// True if this is an instance of FunctionType. - bool isFunctionTy() const { return getTypeID() == FunctionTyID; } - - /// True if this is an instance of StructType. - bool isStructTy() const { return getTypeID() == StructTyID; } - - /// True if this is an instance of ArrayType. - bool isArrayTy() const { return getTypeID() == ArrayTyID; } - - /// True if this is an instance of PointerType. - bool isPointerTy() const { return getTypeID() == PointerTyID; } - - /// Return true if this is a pointer type or a vector of pointer types. - bool isPtrOrPtrVectorTy() const { return getScalarType()->isPointerTy(); } - - /// True if this is an instance of VectorType. - bool isVectorTy() const { return getTypeID() == VectorTyID; } - - /// Return true if this type could be converted with a lossless BitCast to - /// type 'Ty'. For example, i8* to i32*. BitCasts are valid for types of the - /// same size only where no re-interpretation of the bits is done. - /// @brief Determine if this type could be losslessly bitcast to Ty - bool canLosslesslyBitCastTo(Type *Ty) const; - - /// Return true if this type is empty, that is, it has no elements or all of - /// its elements are empty. - bool isEmptyTy() const; - - /// Return true if the type is "first class", meaning it is a valid type for a - /// Value. - bool isFirstClassType() const { - return getTypeID() != FunctionTyID && getTypeID() != VoidTyID; - } - - /// Return true if the type is a valid type for a register in codegen. This - /// includes all first-class types except struct and array types. - bool isSingleValueType() const { - return isFloatingPointTy() || isX86_MMXTy() || isIntegerTy() || - isPointerTy() || isVectorTy(); - } - - /// Return true if the type is an aggregate type. This means it is valid as - /// the first operand of an insertvalue or extractvalue instruction. This - /// includes struct and array types, but does not include vector types. - bool isAggregateType() const { - return getTypeID() == StructTyID || getTypeID() == ArrayTyID; - } - - /// Return true if it makes sense to take the size of this type. To get the - /// actual size for a particular target, it is reasonable to use the - /// DataLayout subsystem to do this. - bool isSized(SmallPtrSetImpl *Visited = nullptr) const { - // If it's a primitive, it is always sized. - if (getTypeID() == IntegerTyID || isFloatingPointTy() || - getTypeID() == PointerTyID || - getTypeID() == X86_MMXTyID) - return true; - // If it is not something that can have a size (e.g. a function or label), - // it doesn't have a size. - if (getTypeID() != StructTyID && getTypeID() != ArrayTyID && - getTypeID() != VectorTyID) - return false; - // Otherwise we have to try harder to decide. - return isSizedDerivedType(Visited); - } - - /// Return the basic size of this type if it is a primitive type. These are - /// fixed by LLVM and are not target-dependent. - /// This will return zero if the type does not have a size or is not a - /// primitive type. - /// - /// Note that this may not reflect the size of memory allocated for an - /// instance of the type or the number of bytes that are written when an - /// instance of the type is stored to memory. The DataLayout class provides - /// additional query functions to provide this information. - /// - unsigned getPrimitiveSizeInBits() const LLVM_READONLY; - - /// If this is a vector type, return the getPrimitiveSizeInBits value for the - /// element type. Otherwise return the getPrimitiveSizeInBits value for this - /// type. - unsigned getScalarSizeInBits() const LLVM_READONLY; - - /// Return the width of the mantissa of this type. This is only valid on - /// floating-point types. If the FP type does not have a stable mantissa (e.g. - /// ppc long double), this method returns -1. - int getFPMantissaWidth() const; - - /// If this is a vector type, return the element type, otherwise return - /// 'this'. - Type *getScalarType() const LLVM_READONLY; - - //===--------------------------------------------------------------------===// - // Type Iteration support. - // - typedef Type * const *subtype_iterator; - subtype_iterator subtype_begin() const { return ContainedTys; } - subtype_iterator subtype_end() const { return &ContainedTys[NumContainedTys];} - ArrayRef subtypes() const { - return makeArrayRef(subtype_begin(), subtype_end()); - } - - typedef std::reverse_iterator subtype_reverse_iterator; - subtype_reverse_iterator subtype_rbegin() const { - return subtype_reverse_iterator(subtype_end()); - } - subtype_reverse_iterator subtype_rend() const { - return subtype_reverse_iterator(subtype_begin()); - } - - /// This method is used to implement the type iterator (defined at the end of - /// the file). For derived types, this returns the types 'contained' in the - /// derived type. - Type *getContainedType(unsigned i) const { - assert(i < NumContainedTys && "Index out of range!"); - return ContainedTys[i]; - } - - /// Return the number of types in the derived type. - unsigned getNumContainedTypes() const { return NumContainedTys; } - - //===--------------------------------------------------------------------===// - // Helper methods corresponding to subclass methods. This forces a cast to - // the specified subclass and calls its accessor. "getVectorNumElements" (for - // example) is shorthand for cast(Ty)->getNumElements(). This is - // only intended to cover the core methods that are frequently used, helper - // methods should not be added here. - - inline unsigned getIntegerBitWidth() const; - - inline Type *getFunctionParamType(unsigned i) const; - inline unsigned getFunctionNumParams() const; - inline bool isFunctionVarArg() const; - - inline StringRef getStructName() const; - inline unsigned getStructNumElements() const; - inline Type *getStructElementType(unsigned N) const; - - inline Type *getSequentialElementType() const { - assert(isSequentialType(getTypeID()) && "Not a sequential type!"); - return ContainedTys[0]; - } - - inline uint64_t getArrayNumElements() const; - Type *getArrayElementType() const { return getSequentialElementType(); } - - inline unsigned getVectorNumElements() const; - Type *getVectorElementType() const { return getSequentialElementType(); } - - Type *getPointerElementType() const { return getSequentialElementType(); } - - /// Get the address space of this pointer or pointer vector type. - inline unsigned getPointerAddressSpace() const; - - //===--------------------------------------------------------------------===// - // Static members exported by the Type class itself. Useful for getting - // instances of Type. - // - - /// Return a type based on an identifier. - static Type *getPrimitiveType(LLVMContext &C, TypeID IDNumber); - - //===--------------------------------------------------------------------===// - // These are the builtin types that are always available. - // - static Type *getVoidTy(LLVMContext &C); - static Type *getLabelTy(LLVMContext &C); - static Type *getHalfTy(LLVMContext &C); - static Type *getFloatTy(LLVMContext &C); - static Type *getDoubleTy(LLVMContext &C); - static Type *getMetadataTy(LLVMContext &C); - static Type *getX86_FP80Ty(LLVMContext &C); - static Type *getFP128Ty(LLVMContext &C); - static Type *getPPC_FP128Ty(LLVMContext &C); - static Type *getX86_MMXTy(LLVMContext &C); - static Type *getTokenTy(LLVMContext &C); - static IntegerType *getIntNTy(LLVMContext &C, unsigned N); - static IntegerType *getInt1Ty(LLVMContext &C); - static IntegerType *getInt8Ty(LLVMContext &C); - static IntegerType *getInt16Ty(LLVMContext &C); - static IntegerType *getInt32Ty(LLVMContext &C); - static IntegerType *getInt64Ty(LLVMContext &C); - static IntegerType *getInt128Ty(LLVMContext &C); - - //===--------------------------------------------------------------------===// - // Convenience methods for getting pointer types with one of the above builtin - // types as pointee. - // - static PointerType *getHalfPtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getFloatPtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getDoublePtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getX86_FP80PtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getFP128PtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getPPC_FP128PtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getX86_MMXPtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getIntNPtrTy(LLVMContext &C, unsigned N, unsigned AS = 0); - static PointerType *getInt1PtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getInt8PtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getInt16PtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getInt32PtrTy(LLVMContext &C, unsigned AS = 0); - static PointerType *getInt64PtrTy(LLVMContext &C, unsigned AS = 0); - - /// Return a pointer to the current type. This is equivalent to - /// PointerType::get(Foo, AddrSpace). - PointerType *getPointerTo(unsigned AddrSpace = 0) const; - -private: - /// Derived types like structures and arrays are sized iff all of the members - /// of the type are sized as well. Since asking for their size is relatively - /// uncommon, move this operation out-of-line. - bool isSizedDerivedType(SmallPtrSetImpl *Visited = nullptr) const; -}; - -// Printing of types. -static inline raw_ostream &operator<<(raw_ostream &OS, Type &T) { - T.print(OS); - return OS; -} - -// allow isa(x) to work without DerivedTypes.h included. -template <> struct isa_impl { - static inline bool doit(const Type &Ty) { - return Ty.getTypeID() == Type::PointerTyID; - } -}; - -//===----------------------------------------------------------------------===// -// Provide specializations of GraphTraits to be able to treat a type as a -// graph of sub types. - -template <> struct GraphTraits { - typedef Type NodeType; - typedef Type::subtype_iterator ChildIteratorType; - - static inline NodeType *getEntryNode(Type *T) { return T; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->subtype_begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->subtype_end(); - } -}; - -template <> struct GraphTraits { - typedef const Type NodeType; - typedef Type::subtype_iterator ChildIteratorType; - - static inline NodeType *getEntryNode(NodeType *T) { return T; } - static inline ChildIteratorType child_begin(NodeType *N) { - return N->subtype_begin(); - } - static inline ChildIteratorType child_end(NodeType *N) { - return N->subtype_end(); - } -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_ISA_CONVERSION_FUNCTIONS(Type, LLVMTypeRef) - -/* Specialized opaque type conversions. - */ -inline Type **unwrap(LLVMTypeRef* Tys) { - return reinterpret_cast(Tys); -} - -inline LLVMTypeRef *wrap(Type **Tys) { - return reinterpret_cast(const_cast(Tys)); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/TypeBuilder.h b/llvm/include/llvm/IR/TypeBuilder.h deleted file mode 100644 index d2c6f000..00000000 --- a/llvm/include/llvm/IR/TypeBuilder.h +++ /dev/null @@ -1,407 +0,0 @@ -//===---- llvm/TypeBuilder.h - Builder for LLVM types -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the TypeBuilder class, which is used as a convenient way to -// create LLVM types with a consistent and simplified interface. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_TYPEBUILDER_H -#define LLVM_IR_TYPEBUILDER_H - -#include "llvm/IR/DerivedTypes.h" -#include "llvm/IR/LLVMContext.h" -#include - -namespace llvm { - -/// TypeBuilder - This provides a uniform API for looking up types -/// known at compile time. To support cross-compilation, we define a -/// series of tag types in the llvm::types namespace, like i, -/// ieee_float, ppc_fp128, etc. TypeBuilder allows T to be -/// any of these, a native C type (whose size may depend on the host -/// compiler), or a pointer, function, or struct type built out of -/// these. TypeBuilder removes native C types from this set -/// to guarantee that its result is suitable for cross-compilation. -/// We define the primitive types, pointer types, and functions up to -/// 5 arguments here, but to use this class with your own types, -/// you'll need to specialize it. For example, say you want to call a -/// function defined externally as: -/// -/// \code{.cpp} -/// -/// struct MyType { -/// int32 a; -/// int32 *b; -/// void *array[1]; // Intended as a flexible array. -/// }; -/// int8 AFunction(struct MyType *value); -/// -/// \endcode -/// -/// You'll want to use -/// Function::Create(TypeBuilder(MyType*), true>::get(), ...) -/// to declare the function, but when you first try this, your compiler will -/// complain that TypeBuilder::get() doesn't exist. To fix this, -/// write: -/// -/// \code{.cpp} -/// -/// namespace llvm { -/// template class TypeBuilder { -/// public: -/// static StructType *get(LLVMContext &Context) { -/// // If you cache this result, be sure to cache it separately -/// // for each LLVMContext. -/// return StructType::get( -/// TypeBuilder, xcompile>::get(Context), -/// TypeBuilder*, xcompile>::get(Context), -/// TypeBuilder*[], xcompile>::get(Context), -/// nullptr); -/// } -/// -/// // You may find this a convenient place to put some constants -/// // to help with getelementptr. They don't have any effect on -/// // the operation of TypeBuilder. -/// enum Fields { -/// FIELD_A, -/// FIELD_B, -/// FIELD_ARRAY -/// }; -/// } -/// } // namespace llvm -/// -/// \endcode -/// -/// TypeBuilder cannot handle recursive types or types you only know at runtime. -/// If you try to give it a recursive type, it will deadlock, infinitely -/// recurse, or do something similarly undesirable. -template class TypeBuilder {}; - -// Types for use with cross-compilable TypeBuilders. These correspond -// exactly with an LLVM-native type. -namespace types { -/// i corresponds to the LLVM IntegerType with N bits. -template class i {}; - -// The following classes represent the LLVM floating types. -class ieee_float {}; -class ieee_double {}; -class x86_fp80 {}; -class fp128 {}; -class ppc_fp128 {}; -// X86 MMX. -class x86_mmx {}; -} // namespace types - -// LLVM doesn't have const or volatile types. -template class TypeBuilder - : public TypeBuilder {}; -template class TypeBuilder - : public TypeBuilder {}; -template class TypeBuilder - : public TypeBuilder {}; - -// Pointers -template class TypeBuilder { -public: - static PointerType *get(LLVMContext &Context) { - return PointerType::getUnqual(TypeBuilder::get(Context)); - } -}; - -/// There is no support for references -template class TypeBuilder {}; - -// Arrays -template class TypeBuilder { -public: - static ArrayType *get(LLVMContext &Context) { - return ArrayType::get(TypeBuilder::get(Context), N); - } -}; -/// LLVM uses an array of length 0 to represent an unknown-length array. -template class TypeBuilder { -public: - static ArrayType *get(LLVMContext &Context) { - return ArrayType::get(TypeBuilder::get(Context), 0); - } -}; - -// Define the C integral types only for TypeBuilder. -// -// C integral types do not have a defined size. It would be nice to use the -// stdint.h-defined typedefs that do have defined sizes, but we'd run into the -// following problem: -// -// On an ILP32 machine, stdint.h might define: -// -// typedef int int32_t; -// typedef long long int64_t; -// typedef long size_t; -// -// If we defined TypeBuilder and TypeBuilder, then any use of -// TypeBuilder would fail. We couldn't define TypeBuilder in -// addition to the defined-size types because we'd get duplicate definitions on -// platforms where stdint.h instead defines: -// -// typedef int int32_t; -// typedef long long int64_t; -// typedef int size_t; -// -// So we define all the primitive C types and nothing else. -#define DEFINE_INTEGRAL_TYPEBUILDER(T) \ -template<> class TypeBuilder { \ -public: \ - static IntegerType *get(LLVMContext &Context) { \ - return IntegerType::get(Context, sizeof(T) * CHAR_BIT); \ - } \ -}; \ -template<> class TypeBuilder { \ - /* We provide a definition here so users don't accidentally */ \ - /* define these types to work. */ \ -} -DEFINE_INTEGRAL_TYPEBUILDER(char); -DEFINE_INTEGRAL_TYPEBUILDER(signed char); -DEFINE_INTEGRAL_TYPEBUILDER(unsigned char); -DEFINE_INTEGRAL_TYPEBUILDER(short); -DEFINE_INTEGRAL_TYPEBUILDER(unsigned short); -DEFINE_INTEGRAL_TYPEBUILDER(int); -DEFINE_INTEGRAL_TYPEBUILDER(unsigned int); -DEFINE_INTEGRAL_TYPEBUILDER(long); -DEFINE_INTEGRAL_TYPEBUILDER(unsigned long); -#ifdef _MSC_VER -DEFINE_INTEGRAL_TYPEBUILDER(__int64); -DEFINE_INTEGRAL_TYPEBUILDER(unsigned __int64); -#else /* _MSC_VER */ -DEFINE_INTEGRAL_TYPEBUILDER(long long); -DEFINE_INTEGRAL_TYPEBUILDER(unsigned long long); -#endif /* _MSC_VER */ -#undef DEFINE_INTEGRAL_TYPEBUILDER - -template -class TypeBuilder, cross> { -public: - static IntegerType *get(LLVMContext &C) { - return IntegerType::get(C, num_bits); - } -}; - -template<> class TypeBuilder { -public: - static Type *get(LLVMContext& C) { - return Type::getFloatTy(C); - } -}; -template<> class TypeBuilder {}; - -template<> class TypeBuilder { -public: - static Type *get(LLVMContext& C) { - return Type::getDoubleTy(C); - } -}; -template<> class TypeBuilder {}; - -template class TypeBuilder { -public: - static Type *get(LLVMContext& C) { return Type::getFloatTy(C); } -}; -template class TypeBuilder { -public: - static Type *get(LLVMContext& C) { return Type::getDoubleTy(C); } -}; -template class TypeBuilder { -public: - static Type *get(LLVMContext& C) { return Type::getX86_FP80Ty(C); } -}; -template class TypeBuilder { -public: - static Type *get(LLVMContext& C) { return Type::getFP128Ty(C); } -}; -template class TypeBuilder { -public: - static Type *get(LLVMContext& C) { return Type::getPPC_FP128Ty(C); } -}; -template class TypeBuilder { -public: - static Type *get(LLVMContext& C) { return Type::getX86_MMXTy(C); } -}; - -template class TypeBuilder { -public: - static Type *get(LLVMContext &C) { - return Type::getVoidTy(C); - } -}; - -/// void* is disallowed in LLVM types, but it occurs often enough in C code that -/// we special case it. -template<> class TypeBuilder - : public TypeBuilder*, false> {}; -template<> class TypeBuilder - : public TypeBuilder*, false> {}; -template<> class TypeBuilder - : public TypeBuilder*, false> {}; -template<> class TypeBuilder - : public TypeBuilder*, false> {}; - -template class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - return FunctionType::get(TypeBuilder::get(Context), false); - } -}; -template class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; - -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; - -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, false); - } -}; - -template class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - return FunctionType::get(TypeBuilder::get(Context), true); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), params, true); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, true); - } -}; -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, true); - } -}; - -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, true); - } -}; - -template -class TypeBuilder { -public: - static FunctionType *get(LLVMContext &Context) { - Type *params[] = { - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - TypeBuilder::get(Context), - }; - return FunctionType::get(TypeBuilder::get(Context), - params, true); - } -}; - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/TypeFinder.h b/llvm/include/llvm/IR/TypeFinder.h deleted file mode 100644 index 046f85ca..00000000 --- a/llvm/include/llvm/IR/TypeFinder.h +++ /dev/null @@ -1,82 +0,0 @@ -//===-- llvm/IR/TypeFinder.h - Class to find used struct types --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the TypeFinder class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_TYPEFINDER_H -#define LLVM_IR_TYPEFINDER_H - -#include "llvm/ADT/DenseSet.h" -#include "llvm/IR/Metadata.h" -#include "llvm/IR/Type.h" -#include - -namespace llvm { - -class MDNode; -class Module; -class StructType; -class Value; - -/// TypeFinder - Walk over a module, identifying all of the types that are -/// used by the module. -class TypeFinder { - // To avoid walking constant expressions multiple times and other IR - // objects, we keep several helper maps. - DenseSet VisitedConstants; - DenseSet VisitedMetadata; - DenseSet VisitedTypes; - - std::vector StructTypes; - bool OnlyNamed; - -public: - TypeFinder() : OnlyNamed(false) {} - - void run(const Module &M, bool onlyNamed); - void clear(); - - typedef std::vector::iterator iterator; - typedef std::vector::const_iterator const_iterator; - - iterator begin() { return StructTypes.begin(); } - iterator end() { return StructTypes.end(); } - - const_iterator begin() const { return StructTypes.begin(); } - const_iterator end() const { return StructTypes.end(); } - - bool empty() const { return StructTypes.empty(); } - size_t size() const { return StructTypes.size(); } - iterator erase(iterator I, iterator E) { return StructTypes.erase(I, E); } - - StructType *&operator[](unsigned Idx) { return StructTypes[Idx]; } - - DenseSet &getVisitedMetadata() { return VisitedMetadata; } - -private: - /// incorporateType - This method adds the type to the list of used - /// structures if it's not in there already. - void incorporateType(Type *Ty); - - /// incorporateValue - This method is used to walk operand lists finding types - /// hiding in constant expressions and other operands that won't be walked in - /// other ways. GlobalValues, basic blocks, instructions, and inst operands - /// are all explicitly enumerated. - void incorporateValue(const Value *V); - - /// incorporateMDNode - This method is used to walk the operands of an MDNode - /// to find types hiding within. - void incorporateMDNode(const MDNode *V); -}; - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Use.h b/llvm/include/llvm/IR/Use.h deleted file mode 100644 index e62eab56..00000000 --- a/llvm/include/llvm/IR/Use.h +++ /dev/null @@ -1,164 +0,0 @@ -//===-- llvm/Use.h - Definition of the Use class ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// \file -/// -/// This defines the Use class. The Use class represents the operand of an -/// instruction or some other User instance which refers to a Value. The Use -/// class keeps the "use list" of the referenced value up to date. -/// -/// Pointer tagging is used to efficiently find the User corresponding to a Use -/// without having to store a User pointer in every Use. A User is preceded in -/// memory by all the Uses corresponding to its operands, and the low bits of -/// one of the fields (Prev) of the Use class are used to encode offsets to be -/// able to find that User given a pointer to any Use. For details, see: -/// -/// http://www.llvm.org/docs/ProgrammersManual.html#UserLayout -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_USE_H -#define LLVM_IR_USE_H - -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/Support/CBindingWrapping.h" -#include - -namespace llvm { - -class Value; -class User; -class Use; -template struct simplify_type; - -// Use** is only 4-byte aligned. -template <> class PointerLikeTypeTraits { -public: - static inline void *getAsVoidPointer(Use **P) { return P; } - static inline Use **getFromVoidPointer(void *P) { - return static_cast(P); - } - enum { NumLowBitsAvailable = 2 }; -}; - -/// \brief A Use represents the edge between a Value definition and its users. -/// -/// This is notionally a two-dimensional linked list. It supports traversing -/// all of the uses for a particular value definition. It also supports jumping -/// directly to the used value when we arrive from the User's operands, and -/// jumping directly to the User when we arrive from the Value's uses. -/// -/// The pointer to the used Value is explicit, and the pointer to the User is -/// implicit. The implicit pointer is found via a waymarking algorithm -/// described in the programmer's manual: -/// -/// http://www.llvm.org/docs/ProgrammersManual.html#the-waymarking-algorithm -/// -/// This is essentially the single most memory intensive object in LLVM because -/// of the number of uses in the system. At the same time, the constant time -/// operations it allows are essential to many optimizations having reasonable -/// time complexity. -class Use { -public: - /// \brief Provide a fast substitute to std::swap - /// that also works with less standard-compliant compilers - void swap(Use &RHS); - - // A type for the word following an array of hung-off Uses in memory, which is - // a pointer back to their User with the bottom bit set. - typedef PointerIntPair UserRef; - -private: - Use(const Use &U) = delete; - - /// Destructor - Only for zap() - ~Use() { - if (Val) - removeFromList(); - } - - enum PrevPtrTag { zeroDigitTag, oneDigitTag, stopTag, fullStopTag }; - - /// Constructor - Use(PrevPtrTag tag) : Val(nullptr) { Prev.setInt(tag); } - -public: - operator Value *() const { return Val; } - Value *get() const { return Val; } - - /// \brief Returns the User that contains this Use. - /// - /// For an instruction operand, for example, this will return the - /// instruction. - User *getUser() const; - - inline void set(Value *Val); - - inline Value *operator=(Value *RHS); - inline const Use &operator=(const Use &RHS); - - Value *operator->() { return Val; } - const Value *operator->() const { return Val; } - - Use *getNext() const { return Next; } - - /// \brief Return the operand # of this use in its User. - unsigned getOperandNo() const; - - /// \brief Initializes the waymarking tags on an array of Uses. - /// - /// This sets up the array of Uses such that getUser() can find the User from - /// any of those Uses. - static Use *initTags(Use *Start, Use *Stop); - - /// \brief Destroys Use operands when the number of operands of - /// a User changes. - static void zap(Use *Start, const Use *Stop, bool del = false); - -private: - const Use *getImpliedUser() const; - - Value *Val; - Use *Next; - PointerIntPair Prev; - - void setPrev(Use **NewPrev) { Prev.setPointer(NewPrev); } - void addToList(Use **List) { - Next = *List; - if (Next) - Next->setPrev(&Next); - setPrev(List); - *List = this; - } - void removeFromList() { - Use **StrippedPrev = Prev.getPointer(); - *StrippedPrev = Next; - if (Next) - Next->setPrev(StrippedPrev); - } - - friend class Value; -}; - -/// \brief Allow clients to treat uses just like values when using -/// casting operators. -template <> struct simplify_type { - typedef Value *SimpleType; - static SimpleType getSimplifiedValue(Use &Val) { return Val.get(); } -}; -template <> struct simplify_type { - typedef /*const*/ Value *SimpleType; - static SimpleType getSimplifiedValue(const Use &Val) { return Val.get(); } -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_SIMPLE_CONVERSION_FUNCTIONS(Use, LLVMUseRef) - -} - -#endif diff --git a/llvm/include/llvm/IR/UseListOrder.h b/llvm/include/llvm/IR/UseListOrder.h deleted file mode 100644 index b86425b6..00000000 --- a/llvm/include/llvm/IR/UseListOrder.h +++ /dev/null @@ -1,55 +0,0 @@ -//===- llvm/IR/UseListOrder.h - LLVM Use List Order -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file has structures and command-line options for preserving use-list -// order. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_USELISTORDER_H -#define LLVM_IR_USELISTORDER_H - -#include -#include - -namespace llvm { - -class Module; -class Function; -class Value; - -/// \brief Structure to hold a use-list order. -struct UseListOrder { - const Value *V; - const Function *F; - std::vector Shuffle; - - UseListOrder(const Value *V, const Function *F, size_t ShuffleSize) - : V(V), F(F), Shuffle(ShuffleSize) {} - - UseListOrder() : V(nullptr), F(nullptr) {} - UseListOrder(UseListOrder &&X) - : V(X.V), F(X.F), Shuffle(std::move(X.Shuffle)) {} - UseListOrder &operator=(UseListOrder &&X) { - V = X.V; - F = X.F; - Shuffle = std::move(X.Shuffle); - return *this; - } - -private: - UseListOrder(const UseListOrder &X) = delete; - UseListOrder &operator=(const UseListOrder &X) = delete; -}; - -typedef std::vector UseListOrderStack; - -} // end namespace llvm - -#endif // LLVM_IR_USELISTORDER_H diff --git a/llvm/include/llvm/IR/User.h b/llvm/include/llvm/IR/User.h deleted file mode 100644 index 4d6b30cd..00000000 --- a/llvm/include/llvm/IR/User.h +++ /dev/null @@ -1,273 +0,0 @@ -//===-- llvm/User.h - User class definition ---------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This class defines the interface that one who uses a Value must implement. -// Each instance of the Value class keeps track of what User's have handles -// to it. -// -// * Instructions are the largest class of Users. -// * Constants may be users of other constants (think arrays and stuff) -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_USER_H -#define LLVM_IR_USER_H - -#include "llvm/ADT/iterator.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/Value.h" -#include "llvm/Support/AlignOf.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { - -template class ArrayRef; -template class MutableArrayRef; - -/// \brief Compile-time customization of User operands. -/// -/// Customizes operand-related allocators and accessors. -template -struct OperandTraits; - -class User : public Value { - User(const User &) = delete; - template - friend struct HungoffOperandTraits; - virtual void anchor(); - - LLVM_ATTRIBUTE_ALWAYS_INLINE inline static void * - allocateFixedOperandUser(size_t, unsigned, unsigned); - -protected: - /// Allocate a User with an operand pointer co-allocated. - /// - /// This is used for subclasses which need to allocate a variable number - /// of operands, ie, 'hung off uses'. - void *operator new(size_t Size); - - /// Allocate a User with the operands co-allocated. - /// - /// This is used for subclasses which have a fixed number of operands. - void *operator new(size_t Size, unsigned Us); - - /// Allocate a User with the operands co-allocated. If DescBytes is non-zero - /// then allocate an additional DescBytes bytes before the operands. These - /// bytes can be accessed by calling getDescriptor. - /// - /// DescBytes needs to be divisible by sizeof(void *). The allocated - /// descriptor, if any, is aligned to sizeof(void *) bytes. - /// - /// This is used for subclasses which have a fixed number of operands. - void *operator new(size_t Size, unsigned Us, unsigned DescBytes); - - User(Type *ty, unsigned vty, Use *, unsigned NumOps) - : Value(ty, vty) { - assert(NumOps < (1u << NumUserOperandsBits) && "Too many operands"); - NumUserOperands = NumOps; - // If we have hung off uses, then the operand list should initially be - // null. - assert((!HasHungOffUses || !getOperandList()) && - "Error in initializing hung off uses for User"); - } - - /// \brief Allocate the array of Uses, followed by a pointer - /// (with bottom bit set) to the User. - /// \param IsPhi identifies callers which are phi nodes and which need - /// N BasicBlock* allocated along with N - void allocHungoffUses(unsigned N, bool IsPhi = false); - - /// \brief Grow the number of hung off uses. Note that allocHungoffUses - /// should be called if there are no uses. - void growHungoffUses(unsigned N, bool IsPhi = false); - -public: - ~User() override { - } - /// \brief Free memory allocated for User and Use objects. - void operator delete(void *Usr); - /// \brief Placement delete - required by std, but never called. - void operator delete(void*, unsigned) { - llvm_unreachable("Constructor throws?"); - } - /// \brief Placement delete - required by std, but never called. - void operator delete(void*, unsigned, bool) { - llvm_unreachable("Constructor throws?"); - } -protected: - template static Use &OpFrom(const U *that) { - return Idx < 0 - ? OperandTraits::op_end(const_cast(that))[Idx] - : OperandTraits::op_begin(const_cast(that))[Idx]; - } - template Use &Op() { - return OpFrom(this); - } - template const Use &Op() const { - return OpFrom(this); - } -private: - Use *&getHungOffOperands() { return *(reinterpret_cast(this) - 1); } - - Use *getIntrusiveOperands() { - return reinterpret_cast(this) - NumUserOperands; - } - - void setOperandList(Use *NewList) { - assert(HasHungOffUses && - "Setting operand list only required for hung off uses"); - getHungOffOperands() = NewList; - } -public: - Use *getOperandList() { - return HasHungOffUses ? getHungOffOperands() : getIntrusiveOperands(); - } - const Use *getOperandList() const { - return const_cast(this)->getOperandList(); - } - Value *getOperand(unsigned i) const { - assert(i < NumUserOperands && "getOperand() out of range!"); - return getOperandList()[i]; - } - void setOperand(unsigned i, Value *Val) { - assert(i < NumUserOperands && "setOperand() out of range!"); - assert((!isa((const Value*)this) || - isa((const Value*)this)) && - "Cannot mutate a constant with setOperand!"); - getOperandList()[i] = Val; - } - const Use &getOperandUse(unsigned i) const { - assert(i < NumUserOperands && "getOperandUse() out of range!"); - return getOperandList()[i]; - } - Use &getOperandUse(unsigned i) { - assert(i < NumUserOperands && "getOperandUse() out of range!"); - return getOperandList()[i]; - } - - unsigned getNumOperands() const { return NumUserOperands; } - - /// Returns the descriptor co-allocated with this User instance. - ArrayRef getDescriptor() const; - - /// Returns the descriptor co-allocated with this User instance. - MutableArrayRef getDescriptor(); - - /// Set the number of operands on a GlobalVariable. - /// - /// GlobalVariable always allocates space for a single operands, but - /// doesn't always use it. - /// - /// FIXME: As that the number of operands is used to find the start of - /// the allocated memory in operator delete, we need to always think we have - /// 1 operand before delete. - void setGlobalVariableNumOperands(unsigned NumOps) { - assert(NumOps <= 1 && "GlobalVariable can only have 0 or 1 operands"); - NumUserOperands = NumOps; - } - - /// \brief Subclasses with hung off uses need to manage the operand count - /// themselves. In these instances, the operand count isn't used to find the - /// OperandList, so there's no issue in having the operand count change. - void setNumHungOffUseOperands(unsigned NumOps) { - assert(HasHungOffUses && "Must have hung off uses to use this method"); - assert(NumOps < (1u << NumUserOperandsBits) && "Too many operands"); - NumUserOperands = NumOps; - } - - // --------------------------------------------------------------------------- - // Operand Iterator interface... - // - typedef Use* op_iterator; - typedef const Use* const_op_iterator; - typedef iterator_range op_range; - typedef iterator_range const_op_range; - - op_iterator op_begin() { return getOperandList(); } - const_op_iterator op_begin() const { return getOperandList(); } - op_iterator op_end() { - return getOperandList() + NumUserOperands; - } - const_op_iterator op_end() const { - return getOperandList() + NumUserOperands; - } - op_range operands() { - return op_range(op_begin(), op_end()); - } - const_op_range operands() const { - return const_op_range(op_begin(), op_end()); - } - - /// \brief Iterator for directly iterating over the operand Values. - struct value_op_iterator - : iterator_adaptor_base { - explicit value_op_iterator(Use *U = nullptr) : iterator_adaptor_base(U) {} - - Value *operator*() const { return *I; } - Value *operator->() const { return operator*(); } - }; - - value_op_iterator value_op_begin() { - return value_op_iterator(op_begin()); - } - value_op_iterator value_op_end() { - return value_op_iterator(op_end()); - } - iterator_range operand_values() { - return make_range(value_op_begin(), value_op_end()); - } - - /// \brief Drop all references to operands. - /// - /// This function is in charge of "letting go" of all objects that this User - /// refers to. This allows one to 'delete' a whole class at a time, even - /// though there may be circular references... First all references are - /// dropped, and all use counts go to zero. Then everything is deleted for - /// real. Note that no operations are valid on an object that has "dropped - /// all references", except operator delete. - void dropAllReferences() { - for (Use &U : operands()) - U.set(nullptr); - } - - /// \brief Replace uses of one Value with another. - /// - /// Replaces all references to the "From" definition with references to the - /// "To" definition. - void replaceUsesOfWith(Value *From, Value *To); - - // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const Value *V) { - return isa(V) || isa(V); - } -}; -// Either Use objects, or a Use pointer can be prepended to User. -static_assert(AlignOf::Alignment >= AlignOf::Alignment, - "Alignment is insufficient after objects prepended to User"); -static_assert(AlignOf::Alignment >= AlignOf::Alignment, - "Alignment is insufficient after objects prepended to User"); - -template<> struct simplify_type { - typedef Value* SimpleType; - static SimpleType getSimplifiedValue(User::op_iterator &Val) { - return Val->get(); - } -}; -template<> struct simplify_type { - typedef /*const*/ Value* SimpleType; - static SimpleType getSimplifiedValue(User::const_op_iterator &Val) { - return Val->get(); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Value.def b/llvm/include/llvm/IR/Value.def deleted file mode 100644 index 48842d7f..00000000 --- a/llvm/include/llvm/IR/Value.def +++ /dev/null @@ -1,103 +0,0 @@ -//===-------- llvm/IR/Value.def - File that describes Values ---v-*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains descriptions of the various LLVM values. This is -// used as a central place for enumerating the different values. -// -//===----------------------------------------------------------------------===// - -// NOTE: NO INCLUDE GUARD DESIRED! - -// Provide definitions of macros so that users of this file do not have to -// define everything to use it... -// -#if !(defined HANDLE_GLOBAL_VALUE || defined HANDLE_CONSTANT || \ - defined HANDLE_INSTRUCTION || defined HANDLE_INLINE_ASM_VALUE || \ - defined HANDLE_METADATA_VALUE || defined HANDLE_VALUE || \ - defined HANDLE_CONSTANT_MARKER) -#error "Missing macro definition of HANDLE_VALUE*" -#endif - -#ifndef HANDLE_GLOBAL_VALUE -#define HANDLE_GLOBAL_VALUE(ValueName) HANDLE_CONSTANT(ValueName) -#endif - -#ifndef HANDLE_CONSTANT -#define HANDLE_CONSTANT(ValueName) HANDLE_VALUE(ValueName) -#endif - -#ifndef HANDLE_INSTRUCTION -#define HANDLE_INSTRUCTION(ValueName) HANDLE_VALUE(ValueName) -#endif - -#ifndef HANDLE_INLINE_ASM_VALUE -#define HANDLE_INLINE_ASM_VALUE(ValueName) HANDLE_VALUE(ValueName) -#endif - -#ifndef HANDLE_METADATA_VALUE -#define HANDLE_METADATA_VALUE(ValueName) HANDLE_VALUE(ValueName) -#endif - -#ifndef HANDLE_VALUE -#define HANDLE_VALUE(ValueName) -#endif - -#ifndef HANDLE_CONSTANT_MARKER -#define HANDLE_CONSTANT_MARKER(MarkerName, ValueName) -#endif - -HANDLE_VALUE(Argument) -HANDLE_VALUE(BasicBlock) -HANDLE_VALUE(MemoryUse) -HANDLE_VALUE(MemoryDef) -HANDLE_VALUE(MemoryPhi) - -HANDLE_GLOBAL_VALUE(Function) -HANDLE_GLOBAL_VALUE(GlobalAlias) -HANDLE_GLOBAL_VALUE(GlobalIFunc) -HANDLE_GLOBAL_VALUE(GlobalVariable) -HANDLE_CONSTANT(BlockAddress) -HANDLE_CONSTANT(ConstantExpr) - -// ConstantAggregate. -HANDLE_CONSTANT(ConstantArray) -HANDLE_CONSTANT(ConstantStruct) -HANDLE_CONSTANT(ConstantVector) - -// ConstantData. -HANDLE_CONSTANT(UndefValue) -HANDLE_CONSTANT(ConstantAggregateZero) -HANDLE_CONSTANT(ConstantDataArray) -HANDLE_CONSTANT(ConstantDataVector) -HANDLE_CONSTANT(ConstantInt) -HANDLE_CONSTANT(ConstantFP) -HANDLE_CONSTANT(ConstantPointerNull) -HANDLE_CONSTANT(ConstantTokenNone) - -HANDLE_METADATA_VALUE(MetadataAsValue) -HANDLE_INLINE_ASM_VALUE(InlineAsm) - -HANDLE_INSTRUCTION(Instruction) -// Enum values starting at InstructionVal are used for Instructions; -// don't add new values here! - -HANDLE_CONSTANT_MARKER(ConstantFirstVal, Function) -HANDLE_CONSTANT_MARKER(ConstantLastVal, ConstantTokenNone) -HANDLE_CONSTANT_MARKER(ConstantDataFirstVal, UndefValue) -HANDLE_CONSTANT_MARKER(ConstantDataLastVal, ConstantTokenNone) -HANDLE_CONSTANT_MARKER(ConstantAggregateFirstVal, ConstantArray) -HANDLE_CONSTANT_MARKER(ConstantAggregateLastVal, ConstantVector) - -#undef HANDLE_GLOBAL_VALUE -#undef HANDLE_CONSTANT -#undef HANDLE_INSTRUCTION -#undef HANDLE_METADATA_VALUE -#undef HANDLE_INLINE_ASM_VALUE -#undef HANDLE_VALUE -#undef HANDLE_CONSTANT_MARKER diff --git a/llvm/include/llvm/IR/Value.h b/llvm/include/llvm/IR/Value.h deleted file mode 100644 index f3a342da..00000000 --- a/llvm/include/llvm/IR/Value.h +++ /dev/null @@ -1,822 +0,0 @@ -//===-- llvm/Value.h - Definition of the Value class ------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the Value class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_VALUE_H -#define LLVM_IR_VALUE_H - -#include "llvm/ADT/iterator_range.h" -#include "llvm/IR/Use.h" -#include "llvm/Support/CBindingWrapping.h" -#include "llvm/Support/Casting.h" - -namespace llvm { - -class APInt; -class Argument; -class AssemblyAnnotationWriter; -class BasicBlock; -class Constant; -class ConstantData; -class ConstantAggregate; -class DataLayout; -class Function; -class GlobalAlias; -class GlobalIFunc; -class GlobalIndirectSymbol; -class GlobalObject; -class GlobalValue; -class GlobalVariable; -class InlineAsm; -class Instruction; -class LLVMContext; -class Module; -class ModuleSlotTracker; -class StringRef; -class Twine; -class Type; -class ValueHandleBase; -class ValueSymbolTable; -class raw_ostream; - -template class StringMapEntry; -typedef StringMapEntry ValueName; - -//===----------------------------------------------------------------------===// -// Value Class -//===----------------------------------------------------------------------===// - -/// \brief LLVM Value Representation -/// -/// This is a very important LLVM class. It is the base class of all values -/// computed by a program that may be used as operands to other values. Value is -/// the super class of other important classes such as Instruction and Function. -/// All Values have a Type. Type is not a subclass of Value. Some values can -/// have a name and they belong to some Module. Setting the name on the Value -/// automatically updates the module's symbol table. -/// -/// Every value has a "use list" that keeps track of which other Values are -/// using this Value. A Value can also have an arbitrary number of ValueHandle -/// objects that watch it and listen to RAUW and Destroy events. See -/// llvm/IR/ValueHandle.h for details. -class Value { - Type *VTy; - Use *UseList; - - friend class ValueAsMetadata; // Allow access to IsUsedByMD. - friend class ValueHandleBase; - - const unsigned char SubclassID; // Subclass identifier (for isa/dyn_cast) - unsigned char HasValueHandle : 1; // Has a ValueHandle pointing to this? -protected: - /// \brief Hold subclass data that can be dropped. - /// - /// This member is similar to SubclassData, however it is for holding - /// information which may be used to aid optimization, but which may be - /// cleared to zero without affecting conservative interpretation. - unsigned char SubclassOptionalData : 7; - -private: - /// \brief Hold arbitrary subclass data. - /// - /// This member is defined by this class, but is not used for anything. - /// Subclasses can use it to hold whatever state they find useful. This - /// field is initialized to zero by the ctor. - unsigned short SubclassData; - -protected: - /// \brief The number of operands in the subclass. - /// - /// This member is defined by this class, but not used for anything. - /// Subclasses can use it to store their number of operands, if they have - /// any. - /// - /// This is stored here to save space in User on 64-bit hosts. Since most - /// instances of Value have operands, 32-bit hosts aren't significantly - /// affected. - /// - /// Note, this should *NOT* be used directly by any class other than User. - /// User uses this value to find the Use list. - enum : unsigned { NumUserOperandsBits = 28 }; - unsigned NumUserOperands : NumUserOperandsBits; - - // Use the same type as the bitfield above so that MSVC will pack them. - unsigned IsUsedByMD : 1; - unsigned HasName : 1; - unsigned HasHungOffUses : 1; - unsigned HasDescriptor : 1; - -private: - template // UseT == 'Use' or 'const Use' - class use_iterator_impl - : public std::iterator { - UseT *U; - explicit use_iterator_impl(UseT *u) : U(u) {} - friend class Value; - - public: - use_iterator_impl() : U() {} - - bool operator==(const use_iterator_impl &x) const { return U == x.U; } - bool operator!=(const use_iterator_impl &x) const { return !operator==(x); } - - use_iterator_impl &operator++() { // Preincrement - assert(U && "Cannot increment end iterator!"); - U = U->getNext(); - return *this; - } - use_iterator_impl operator++(int) { // Postincrement - auto tmp = *this; - ++*this; - return tmp; - } - - UseT &operator*() const { - assert(U && "Cannot dereference end iterator!"); - return *U; - } - - UseT *operator->() const { return &operator*(); } - - operator use_iterator_impl() const { - return use_iterator_impl(U); - } - }; - - template // UserTy == 'User' or 'const User' - class user_iterator_impl - : public std::iterator { - use_iterator_impl UI; - explicit user_iterator_impl(Use *U) : UI(U) {} - friend class Value; - - public: - user_iterator_impl() {} - - bool operator==(const user_iterator_impl &x) const { return UI == x.UI; } - bool operator!=(const user_iterator_impl &x) const { return !operator==(x); } - - /// \brief Returns true if this iterator is equal to user_end() on the value. - bool atEnd() const { return *this == user_iterator_impl(); } - - user_iterator_impl &operator++() { // Preincrement - ++UI; - return *this; - } - user_iterator_impl operator++(int) { // Postincrement - auto tmp = *this; - ++*this; - return tmp; - } - - // Retrieve a pointer to the current User. - UserTy *operator*() const { - return UI->getUser(); - } - - UserTy *operator->() const { return operator*(); } - - operator user_iterator_impl() const { - return user_iterator_impl(*UI); - } - - Use &getUse() const { return *UI; } - }; - - void operator=(const Value &) = delete; - Value(const Value &) = delete; - -protected: - Value(Type *Ty, unsigned scid); -public: - virtual ~Value(); - - /// \brief Support for debugging, callable in GDB: V->dump() - void dump() const; - - /// \brief Implement operator<< on Value. - /// @{ - void print(raw_ostream &O, bool IsForDebug = false) const; - void print(raw_ostream &O, ModuleSlotTracker &MST, - bool IsForDebug = false) const; - /// @} - - /// \brief Print the name of this Value out to the specified raw_ostream. - /// - /// This is useful when you just want to print 'int %reg126', not the - /// instruction that generated it. If you specify a Module for context, then - /// even constanst get pretty-printed; for example, the type of a null - /// pointer is printed symbolically. - /// @{ - void printAsOperand(raw_ostream &O, bool PrintType = true, - const Module *M = nullptr) const; - void printAsOperand(raw_ostream &O, bool PrintType, - ModuleSlotTracker &MST) const; - /// @} - - /// \brief All values are typed, get the type of this value. - Type *getType() const { return VTy; } - - /// \brief All values hold a context through their type. - LLVMContext &getContext() const; - - // \brief All values can potentially be named. - bool hasName() const { return HasName; } - ValueName *getValueName() const; - void setValueName(ValueName *VN); - -private: - void destroyValueName(); - void setNameImpl(const Twine &Name); - -public: - /// \brief Return a constant reference to the value's name. - /// - /// This is cheap and guaranteed to return the same reference as long as the - /// value is not modified. - StringRef getName() const; - - /// \brief Change the name of the value. - /// - /// Choose a new unique name if the provided name is taken. - /// - /// \param Name The new name; or "" if the value's name should be removed. - void setName(const Twine &Name); - - - /// \brief Transfer the name from V to this value. - /// - /// After taking V's name, sets V's name to empty. - /// - /// \note It is an error to call V->takeName(V). - void takeName(Value *V); - - /// \brief Change all uses of this to point to a new Value. - /// - /// Go through the uses list for this definition and make each use point to - /// "V" instead of "this". After this completes, 'this's use list is - /// guaranteed to be empty. - void replaceAllUsesWith(Value *V); - - /// replaceUsesOutsideBlock - Go through the uses list for this definition and - /// make each use point to "V" instead of "this" when the use is outside the - /// block. 'This's use list is expected to have at least one element. - /// Unlike replaceAllUsesWith this function does not support basic block - /// values or constant users. - void replaceUsesOutsideBlock(Value *V, BasicBlock *BB); - - //---------------------------------------------------------------------- - // Methods for handling the chain of uses of this Value. - // - // Materializing a function can introduce new uses, so these methods come in - // two variants: - // The methods that start with materialized_ check the uses that are - // currently known given which functions are materialized. Be very careful - // when using them since you might not get all uses. - // The methods that don't start with materialized_ assert that modules is - // fully materialized. - void assertModuleIsMaterialized() const; - - bool use_empty() const { - assertModuleIsMaterialized(); - return UseList == nullptr; - } - - typedef use_iterator_impl use_iterator; - typedef use_iterator_impl const_use_iterator; - use_iterator materialized_use_begin() { return use_iterator(UseList); } - const_use_iterator materialized_use_begin() const { - return const_use_iterator(UseList); - } - use_iterator use_begin() { - assertModuleIsMaterialized(); - return materialized_use_begin(); - } - const_use_iterator use_begin() const { - assertModuleIsMaterialized(); - return materialized_use_begin(); - } - use_iterator use_end() { return use_iterator(); } - const_use_iterator use_end() const { return const_use_iterator(); } - iterator_range materialized_uses() { - return make_range(materialized_use_begin(), use_end()); - } - iterator_range materialized_uses() const { - return make_range(materialized_use_begin(), use_end()); - } - iterator_range uses() { - assertModuleIsMaterialized(); - return materialized_uses(); - } - iterator_range uses() const { - assertModuleIsMaterialized(); - return materialized_uses(); - } - - bool user_empty() const { - assertModuleIsMaterialized(); - return UseList == nullptr; - } - - typedef user_iterator_impl user_iterator; - typedef user_iterator_impl const_user_iterator; - user_iterator materialized_user_begin() { return user_iterator(UseList); } - const_user_iterator materialized_user_begin() const { - return const_user_iterator(UseList); - } - user_iterator user_begin() { - assertModuleIsMaterialized(); - return materialized_user_begin(); - } - const_user_iterator user_begin() const { - assertModuleIsMaterialized(); - return materialized_user_begin(); - } - user_iterator user_end() { return user_iterator(); } - const_user_iterator user_end() const { return const_user_iterator(); } - User *user_back() { - assertModuleIsMaterialized(); - return *materialized_user_begin(); - } - const User *user_back() const { - assertModuleIsMaterialized(); - return *materialized_user_begin(); - } - iterator_range materialized_users() { - return make_range(materialized_user_begin(), user_end()); - } - iterator_range materialized_users() const { - return make_range(materialized_user_begin(), user_end()); - } - iterator_range users() { - assertModuleIsMaterialized(); - return materialized_users(); - } - iterator_range users() const { - assertModuleIsMaterialized(); - return materialized_users(); - } - - /// \brief Return true if there is exactly one user of this value. - /// - /// This is specialized because it is a common request and does not require - /// traversing the whole use list. - bool hasOneUse() const { - const_use_iterator I = use_begin(), E = use_end(); - if (I == E) return false; - return ++I == E; - } - - /// \brief Return true if this Value has exactly N users. - bool hasNUses(unsigned N) const; - - /// \brief Return true if this value has N users or more. - /// - /// This is logically equivalent to getNumUses() >= N. - bool hasNUsesOrMore(unsigned N) const; - - /// \brief Check if this value is used in the specified basic block. - bool isUsedInBasicBlock(const BasicBlock *BB) const; - - /// \brief This method computes the number of uses of this Value. - /// - /// This is a linear time operation. Use hasOneUse, hasNUses, or - /// hasNUsesOrMore to check for specific values. - unsigned getNumUses() const; - - /// \brief This method should only be used by the Use class. - void addUse(Use &U) { U.addToList(&UseList); } - - /// \brief Concrete subclass of this. - /// - /// An enumeration for keeping track of the concrete subclass of Value that - /// is actually instantiated. Values of this enumeration are kept in the - /// Value classes SubclassID field. They are used for concrete type - /// identification. - enum ValueTy { -#define HANDLE_VALUE(Name) Name##Val, -#include "llvm/IR/Value.def" - - // Markers: -#define HANDLE_CONSTANT_MARKER(Marker, Constant) Marker = Constant##Val, -#include "llvm/IR/Value.def" - }; - - /// \brief Return an ID for the concrete type of this object. - /// - /// This is used to implement the classof checks. This should not be used - /// for any other purpose, as the values may change as LLVM evolves. Also, - /// note that for instructions, the Instruction's opcode is added to - /// InstructionVal. So this means three things: - /// # there is no value with code InstructionVal (no opcode==0). - /// # there are more possible values for the value type than in ValueTy enum. - /// # the InstructionVal enumerator must be the highest valued enumerator in - /// the ValueTy enum. - unsigned getValueID() const { - return SubclassID; - } - - /// \brief Return the raw optional flags value contained in this value. - /// - /// This should only be used when testing two Values for equivalence. - unsigned getRawSubclassOptionalData() const { - return SubclassOptionalData; - } - - /// \brief Clear the optional flags contained in this value. - void clearSubclassOptionalData() { - SubclassOptionalData = 0; - } - - /// \brief Check the optional flags for equality. - bool hasSameSubclassOptionalData(const Value *V) const { - return SubclassOptionalData == V->SubclassOptionalData; - } - - /// \brief Clear any optional flags not set in the given Value. - void intersectOptionalDataWith(const Value *V) { - SubclassOptionalData &= V->SubclassOptionalData; - } - - /// \brief Return true if there is a value handle associated with this value. - bool hasValueHandle() const { return HasValueHandle; } - - /// \brief Return true if there is metadata referencing this value. - bool isUsedByMetadata() const { return IsUsedByMD; } - - /// \brief Strip off pointer casts, all-zero GEPs, and aliases. - /// - /// Returns the original uncasted value. If this is called on a non-pointer - /// value, it returns 'this'. - Value *stripPointerCasts(); - const Value *stripPointerCasts() const { - return const_cast(this)->stripPointerCasts(); - } - - /// \brief Strip off pointer casts and all-zero GEPs. - /// - /// Returns the original uncasted value. If this is called on a non-pointer - /// value, it returns 'this'. - Value *stripPointerCastsNoFollowAliases(); - const Value *stripPointerCastsNoFollowAliases() const { - return const_cast(this)->stripPointerCastsNoFollowAliases(); - } - - /// \brief Strip off pointer casts and all-constant inbounds GEPs. - /// - /// Returns the original pointer value. If this is called on a non-pointer - /// value, it returns 'this'. - Value *stripInBoundsConstantOffsets(); - const Value *stripInBoundsConstantOffsets() const { - return const_cast(this)->stripInBoundsConstantOffsets(); - } - - /// \brief Accumulate offsets from \a stripInBoundsConstantOffsets(). - /// - /// Stores the resulting constant offset stripped into the APInt provided. - /// The provided APInt will be extended or truncated as needed to be the - /// correct bitwidth for an offset of this pointer type. - /// - /// If this is called on a non-pointer value, it returns 'this'. - Value *stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL, - APInt &Offset); - const Value *stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL, - APInt &Offset) const { - return const_cast(this) - ->stripAndAccumulateInBoundsConstantOffsets(DL, Offset); - } - - /// \brief Strip off pointer casts and inbounds GEPs. - /// - /// Returns the original pointer value. If this is called on a non-pointer - /// value, it returns 'this'. - Value *stripInBoundsOffsets(); - const Value *stripInBoundsOffsets() const { - return const_cast(this)->stripInBoundsOffsets(); - } - - /// \brief Returns the number of bytes known to be dereferenceable for the - /// pointer value. - /// - /// If CanBeNull is set by this function the pointer can either be null or be - /// dereferenceable up to the returned number of bytes. - unsigned getPointerDereferenceableBytes(const DataLayout &DL, - bool &CanBeNull) const; - - /// \brief Returns an alignment of the pointer value. - /// - /// Returns an alignment which is either specified explicitly, e.g. via - /// align attribute of a function argument, or guaranteed by DataLayout. - unsigned getPointerAlignment(const DataLayout &DL) const; - - /// \brief Translate PHI node to its predecessor from the given basic block. - /// - /// If this value is a PHI node with CurBB as its parent, return the value in - /// the PHI node corresponding to PredBB. If not, return ourself. This is - /// useful if you want to know the value something has in a predecessor - /// block. - Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB); - - const Value *DoPHITranslation(const BasicBlock *CurBB, - const BasicBlock *PredBB) const{ - return const_cast(this)->DoPHITranslation(CurBB, PredBB); - } - - /// \brief The maximum alignment for instructions. - /// - /// This is the greatest alignment value supported by load, store, and alloca - /// instructions, and global values. - static const unsigned MaxAlignmentExponent = 29; - static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent; - - /// \brief Mutate the type of this Value to be of the specified type. - /// - /// Note that this is an extremely dangerous operation which can create - /// completely invalid IR very easily. It is strongly recommended that you - /// recreate IR objects with the right types instead of mutating them in - /// place. - void mutateType(Type *Ty) { - VTy = Ty; - } - - /// \brief Sort the use-list. - /// - /// Sorts the Value's use-list by Cmp using a stable mergesort. Cmp is - /// expected to compare two \a Use references. - template void sortUseList(Compare Cmp); - - /// \brief Reverse the use-list. - void reverseUseList(); - -private: - /// \brief Merge two lists together. - /// - /// Merges \c L and \c R using \c Cmp. To enable stable sorts, always pushes - /// "equal" items from L before items from R. - /// - /// \return the first element in the list. - /// - /// \note Completely ignores \a Use::Prev (doesn't read, doesn't update). - template - static Use *mergeUseLists(Use *L, Use *R, Compare Cmp) { - Use *Merged; - Use **Next = &Merged; - - for (;;) { - if (!L) { - *Next = R; - break; - } - if (!R) { - *Next = L; - break; - } - if (Cmp(*R, *L)) { - *Next = R; - Next = &R->Next; - R = R->Next; - } else { - *Next = L; - Next = &L->Next; - L = L->Next; - } - } - - return Merged; - } - - /// \brief Tail-recursive helper for \a mergeUseLists(). - /// - /// \param[out] Next the first element in the list. - template - static void mergeUseListsImpl(Use *L, Use *R, Use **Next, Compare Cmp); - -protected: - unsigned short getSubclassDataFromValue() const { return SubclassData; } - void setValueSubclassData(unsigned short D) { SubclassData = D; } -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) { - V.print(OS); - return OS; -} - -void Use::set(Value *V) { - if (Val) removeFromList(); - Val = V; - if (V) V->addUse(*this); -} - -Value *Use::operator=(Value *RHS) { - set(RHS); - return RHS; -} - -const Use &Use::operator=(const Use &RHS) { - set(RHS.Val); - return *this; -} - -template void Value::sortUseList(Compare Cmp) { - if (!UseList || !UseList->Next) - // No need to sort 0 or 1 uses. - return; - - // Note: this function completely ignores Prev pointers until the end when - // they're fixed en masse. - - // Create a binomial vector of sorted lists, visiting uses one at a time and - // merging lists as necessary. - const unsigned MaxSlots = 32; - Use *Slots[MaxSlots]; - - // Collect the first use, turning it into a single-item list. - Use *Next = UseList->Next; - UseList->Next = nullptr; - unsigned NumSlots = 1; - Slots[0] = UseList; - - // Collect all but the last use. - while (Next->Next) { - Use *Current = Next; - Next = Current->Next; - - // Turn Current into a single-item list. - Current->Next = nullptr; - - // Save Current in the first available slot, merging on collisions. - unsigned I; - for (I = 0; I < NumSlots; ++I) { - if (!Slots[I]) - break; - - // Merge two lists, doubling the size of Current and emptying slot I. - // - // Since the uses in Slots[I] originally preceded those in Current, send - // Slots[I] in as the left parameter to maintain a stable sort. - Current = mergeUseLists(Slots[I], Current, Cmp); - Slots[I] = nullptr; - } - // Check if this is a new slot. - if (I == NumSlots) { - ++NumSlots; - assert(NumSlots <= MaxSlots && "Use list bigger than 2^32"); - } - - // Found an open slot. - Slots[I] = Current; - } - - // Merge all the lists together. - assert(Next && "Expected one more Use"); - assert(!Next->Next && "Expected only one Use"); - UseList = Next; - for (unsigned I = 0; I < NumSlots; ++I) - if (Slots[I]) - // Since the uses in Slots[I] originally preceded those in UseList, send - // Slots[I] in as the left parameter to maintain a stable sort. - UseList = mergeUseLists(Slots[I], UseList, Cmp); - - // Fix the Prev pointers. - for (Use *I = UseList, **Prev = &UseList; I; I = I->Next) { - I->setPrev(Prev); - Prev = &I->Next; - } -} - -// isa - Provide some specializations of isa so that we don't have to include -// the subtype header files to test to see if the value is a subclass... -// -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() >= Value::ConstantFirstVal && - Val.getValueID() <= Value::ConstantLastVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() >= Value::ConstantDataFirstVal && - Val.getValueID() <= Value::ConstantDataLastVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() >= Value::ConstantAggregateFirstVal && - Val.getValueID() <= Value::ConstantAggregateLastVal; - } -}; - -template <> struct isa_impl { - static inline bool doit (const Value &Val) { - return Val.getValueID() == Value::ArgumentVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() == Value::InlineAsmVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() >= Value::InstructionVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() == Value::BasicBlockVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() == Value::FunctionVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() == Value::GlobalVariableVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() == Value::GlobalAliasVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return Val.getValueID() == Value::GlobalIFuncVal; - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return isa(Val) || isa(Val); - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return isa(Val) || isa(Val); - } -}; - -template <> struct isa_impl { - static inline bool doit(const Value &Val) { - return isa(Val) || isa(Val); - } -}; - -// Value* is only 4-byte aligned. -template<> -class PointerLikeTypeTraits { - typedef Value* PT; -public: - static inline void *getAsVoidPointer(PT P) { return P; } - static inline PT getFromVoidPointer(void *P) { - return static_cast(P); - } - enum { NumLowBitsAvailable = 2 }; -}; - -// Create wrappers for C Binding types (see CBindingWrapping.h). -DEFINE_ISA_CONVERSION_FUNCTIONS(Value, LLVMValueRef) - -// Specialized opaque value conversions. -inline Value **unwrap(LLVMValueRef *Vals) { - return reinterpret_cast(Vals); -} - -template -inline T **unwrap(LLVMValueRef *Vals, unsigned Length) { -#ifdef DEBUG - for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I) - cast(*I); -#endif - (void)Length; - return reinterpret_cast(Vals); -} - -inline LLVMValueRef *wrap(const Value **Vals) { - return reinterpret_cast(const_cast(Vals)); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/ValueHandle.h b/llvm/include/llvm/IR/ValueHandle.h deleted file mode 100644 index 3c280591..00000000 --- a/llvm/include/llvm/IR/ValueHandle.h +++ /dev/null @@ -1,386 +0,0 @@ -//===- ValueHandle.h - Value Smart Pointer classes --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the ValueHandle class and its sub-classes. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_VALUEHANDLE_H -#define LLVM_IR_VALUEHANDLE_H - -#include "llvm/ADT/DenseMapInfo.h" -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/IR/Value.h" - -namespace llvm { -class ValueHandleBase; -template struct simplify_type; - -// ValueHandleBase** is only 4-byte aligned. -template<> -class PointerLikeTypeTraits { -public: - static inline void *getAsVoidPointer(ValueHandleBase** P) { return P; } - static inline ValueHandleBase **getFromVoidPointer(void *P) { - return static_cast(P); - } - enum { NumLowBitsAvailable = 2 }; -}; - -/// \brief This is the common base class of value handles. -/// -/// ValueHandle's are smart pointers to Value's that have special behavior when -/// the value is deleted or ReplaceAllUsesWith'd. See the specific handles -/// below for details. -class ValueHandleBase { - friend class Value; -protected: - /// \brief This indicates what sub class the handle actually is. - /// - /// This is to avoid having a vtable for the light-weight handle pointers. The - /// fully general Callback version does have a vtable. - enum HandleBaseKind { - Assert, - Callback, - Tracking, - Weak - }; - - ValueHandleBase(const ValueHandleBase &RHS) - : ValueHandleBase(RHS.PrevPair.getInt(), RHS) {} - - ValueHandleBase(HandleBaseKind Kind, const ValueHandleBase &RHS) - : PrevPair(nullptr, Kind), Next(nullptr), V(RHS.V) { - if (isValid(V)) - AddToExistingUseList(RHS.getPrevPtr()); - } - -private: - PointerIntPair PrevPair; - ValueHandleBase *Next; - - Value* V; - -public: - explicit ValueHandleBase(HandleBaseKind Kind) - : PrevPair(nullptr, Kind), Next(nullptr), V(nullptr) {} - ValueHandleBase(HandleBaseKind Kind, Value *V) - : PrevPair(nullptr, Kind), Next(nullptr), V(V) { - if (isValid(V)) - AddToUseList(); - } - - ~ValueHandleBase() { - if (isValid(V)) - RemoveFromUseList(); - } - - Value *operator=(Value *RHS) { - if (V == RHS) return RHS; - if (isValid(V)) RemoveFromUseList(); - V = RHS; - if (isValid(V)) AddToUseList(); - return RHS; - } - - Value *operator=(const ValueHandleBase &RHS) { - if (V == RHS.V) return RHS.V; - if (isValid(V)) RemoveFromUseList(); - V = RHS.V; - if (isValid(V)) AddToExistingUseList(RHS.getPrevPtr()); - return V; - } - - Value *operator->() const { return V; } - Value &operator*() const { return *V; } - -protected: - Value *getValPtr() const { return V; } - - static bool isValid(Value *V) { - return V && - V != DenseMapInfo::getEmptyKey() && - V != DenseMapInfo::getTombstoneKey(); - } - -public: - // Callbacks made from Value. - static void ValueIsDeleted(Value *V); - static void ValueIsRAUWd(Value *Old, Value *New); - -private: - // Internal implementation details. - ValueHandleBase **getPrevPtr() const { return PrevPair.getPointer(); } - HandleBaseKind getKind() const { return PrevPair.getInt(); } - void setPrevPtr(ValueHandleBase **Ptr) { PrevPair.setPointer(Ptr); } - - /// \brief Add this ValueHandle to the use list for V. - /// - /// List is the address of either the head of the list or a Next node within - /// the existing use list. - void AddToExistingUseList(ValueHandleBase **List); - - /// \brief Add this ValueHandle to the use list after Node. - void AddToExistingUseListAfter(ValueHandleBase *Node); - - /// \brief Add this ValueHandle to the use list for V. - void AddToUseList(); - /// \brief Remove this ValueHandle from its current use list. - void RemoveFromUseList(); -}; - -/// \brief Value handle that is nullable, but tries to track the Value. -/// -/// This is a value handle that tries hard to point to a Value, even across -/// RAUW operations, but will null itself out if the value is destroyed. this -/// is useful for advisory sorts of information, but should not be used as the -/// key of a map (since the map would have to rearrange itself when the pointer -/// changes). -class WeakVH : public ValueHandleBase { -public: - WeakVH() : ValueHandleBase(Weak) {} - WeakVH(Value *P) : ValueHandleBase(Weak, P) {} - WeakVH(const WeakVH &RHS) - : ValueHandleBase(Weak, RHS) {} - - WeakVH &operator=(const WeakVH &RHS) = default; - - Value *operator=(Value *RHS) { - return ValueHandleBase::operator=(RHS); - } - Value *operator=(const ValueHandleBase &RHS) { - return ValueHandleBase::operator=(RHS); - } - - operator Value*() const { - return getValPtr(); - } -}; - -// Specialize simplify_type to allow WeakVH to participate in -// dyn_cast, isa, etc. -template <> struct simplify_type { - typedef Value *SimpleType; - static SimpleType getSimplifiedValue(WeakVH &WVH) { return WVH; } -}; -template <> struct simplify_type { - typedef Value *SimpleType; - static SimpleType getSimplifiedValue(const WeakVH &WVH) { return WVH; } -}; - -/// \brief Value handle that asserts if the Value is deleted. -/// -/// This is a Value Handle that points to a value and asserts out if the value -/// is destroyed while the handle is still live. This is very useful for -/// catching dangling pointer bugs and other things which can be non-obvious. -/// One particularly useful place to use this is as the Key of a map. Dangling -/// pointer bugs often lead to really subtle bugs that only occur if another -/// object happens to get allocated to the same address as the old one. Using -/// an AssertingVH ensures that an assert is triggered as soon as the bad -/// delete occurs. -/// -/// Note that an AssertingVH handle does *not* follow values across RAUW -/// operations. This means that RAUW's need to explicitly update the -/// AssertingVH's as it moves. This is required because in non-assert mode this -/// class turns into a trivial wrapper around a pointer. -template -class AssertingVH -#ifndef NDEBUG - : public ValueHandleBase -#endif - { - friend struct DenseMapInfo >; - -#ifndef NDEBUG - Value *getRawValPtr() const { return ValueHandleBase::getValPtr(); } - void setRawValPtr(Value *P) { ValueHandleBase::operator=(P); } -#else - Value *ThePtr; - Value *getRawValPtr() const { return ThePtr; } - void setRawValPtr(Value *P) { ThePtr = P; } -#endif - // Convert a ValueTy*, which may be const, to the raw Value*. - static Value *GetAsValue(Value *V) { return V; } - static Value *GetAsValue(const Value *V) { return const_cast(V); } - - ValueTy *getValPtr() const { return static_cast(getRawValPtr()); } - void setValPtr(ValueTy *P) { setRawValPtr(GetAsValue(P)); } - -public: -#ifndef NDEBUG - AssertingVH() : ValueHandleBase(Assert) {} - AssertingVH(ValueTy *P) : ValueHandleBase(Assert, GetAsValue(P)) {} - AssertingVH(const AssertingVH &RHS) : ValueHandleBase(Assert, RHS) {} -#else - AssertingVH() : ThePtr(nullptr) {} - AssertingVH(ValueTy *P) : ThePtr(GetAsValue(P)) {} -#endif - - operator ValueTy*() const { - return getValPtr(); - } - - ValueTy *operator=(ValueTy *RHS) { - setValPtr(RHS); - return getValPtr(); - } - ValueTy *operator=(const AssertingVH &RHS) { - setValPtr(RHS.getValPtr()); - return getValPtr(); - } - - ValueTy *operator->() const { return getValPtr(); } - ValueTy &operator*() const { return *getValPtr(); } -}; - -// Specialize DenseMapInfo to allow AssertingVH to participate in DenseMap. -template -struct DenseMapInfo > { - static inline AssertingVH getEmptyKey() { - AssertingVH Res; - Res.setRawValPtr(DenseMapInfo::getEmptyKey()); - return Res; - } - static inline AssertingVH getTombstoneKey() { - AssertingVH Res; - Res.setRawValPtr(DenseMapInfo::getTombstoneKey()); - return Res; - } - static unsigned getHashValue(const AssertingVH &Val) { - return DenseMapInfo::getHashValue(Val.getRawValPtr()); - } - static bool isEqual(const AssertingVH &LHS, const AssertingVH &RHS) { - return DenseMapInfo::isEqual(LHS.getRawValPtr(), - RHS.getRawValPtr()); - } -}; - -template -struct isPodLike > { -#ifdef NDEBUG - static const bool value = true; -#else - static const bool value = false; -#endif -}; - - -/// \brief Value handle that tracks a Value across RAUW. -/// -/// TrackingVH is designed for situations where a client needs to hold a handle -/// to a Value (or subclass) across some operations which may move that value, -/// but should never destroy it or replace it with some unacceptable type. -/// -/// It is an error to do anything with a TrackingVH whose value has been -/// destroyed, except to destruct it. -/// -/// It is an error to attempt to replace a value with one of a type which is -/// incompatible with any of its outstanding TrackingVHs. -template -class TrackingVH : public ValueHandleBase { - void CheckValidity() const { - Value *VP = ValueHandleBase::getValPtr(); - - // Null is always ok. - if (!VP) return; - - // Check that this value is valid (i.e., it hasn't been deleted). We - // explicitly delay this check until access to avoid requiring clients to be - // unnecessarily careful w.r.t. destruction. - assert(ValueHandleBase::isValid(VP) && "Tracked Value was deleted!"); - - // Check that the value is a member of the correct subclass. We would like - // to check this property on assignment for better debugging, but we don't - // want to require a virtual interface on this VH. Instead we allow RAUW to - // replace this value with a value of an invalid type, and check it here. - assert(isa(VP) && - "Tracked Value was replaced by one with an invalid type!"); - } - - ValueTy *getValPtr() const { - CheckValidity(); - return (ValueTy*)ValueHandleBase::getValPtr(); - } - void setValPtr(ValueTy *P) { - CheckValidity(); - ValueHandleBase::operator=(GetAsValue(P)); - } - - // Convert a ValueTy*, which may be const, to the type the base - // class expects. - static Value *GetAsValue(Value *V) { return V; } - static Value *GetAsValue(const Value *V) { return const_cast(V); } - -public: - TrackingVH() : ValueHandleBase(Tracking) {} - TrackingVH(ValueTy *P) : ValueHandleBase(Tracking, GetAsValue(P)) {} - - operator ValueTy*() const { - return getValPtr(); - } - - ValueTy *operator=(ValueTy *RHS) { - setValPtr(RHS); - return getValPtr(); - } - - ValueTy *operator->() const { return getValPtr(); } - ValueTy &operator*() const { return *getValPtr(); } -}; - -/// \brief Value handle with callbacks on RAUW and destruction. -/// -/// This is a value handle that allows subclasses to define callbacks that run -/// when the underlying Value has RAUW called on it or is destroyed. This -/// class can be used as the key of a map, as long as the user takes it out of -/// the map before calling setValPtr() (since the map has to rearrange itself -/// when the pointer changes). Unlike ValueHandleBase, this class has a vtable. -class CallbackVH : public ValueHandleBase { - virtual void anchor(); -protected: - ~CallbackVH() = default; - CallbackVH(const CallbackVH &) = default; - CallbackVH &operator=(const CallbackVH &) = default; - - void setValPtr(Value *P) { - ValueHandleBase::operator=(P); - } - -public: - CallbackVH() : ValueHandleBase(Callback) {} - CallbackVH(Value *P) : ValueHandleBase(Callback, P) {} - - operator Value*() const { - return getValPtr(); - } - - /// \brief Callback for Value destruction. - /// - /// Called when this->getValPtr() is destroyed, inside ~Value(), so you - /// may call any non-virtual Value method on getValPtr(), but no subclass - /// methods. If WeakVH were implemented as a CallbackVH, it would use this - /// method to call setValPtr(NULL). AssertingVH would use this method to - /// cause an assertion failure. - /// - /// All implementations must remove the reference from this object to the - /// Value that's being destroyed. - virtual void deleted() { setValPtr(nullptr); } - - /// \brief Callback for Value RAUW. - /// - /// Called when this->getValPtr()->replaceAllUsesWith(new_value) is called, - /// _before_ any of the uses have actually been replaced. If WeakVH were - /// implemented as a CallbackVH, it would use this method to call - /// setValPtr(new_value). AssertingVH would do nothing in this method. - virtual void allUsesReplacedWith(Value *) {} -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/ValueMap.h b/llvm/include/llvm/IR/ValueMap.h deleted file mode 100644 index 85379ad4..00000000 --- a/llvm/include/llvm/IR/ValueMap.h +++ /dev/null @@ -1,417 +0,0 @@ -//===- ValueMap.h - Safe map from Values to data ----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the ValueMap class. ValueMap maps Value* or any subclass -// to an arbitrary other type. It provides the DenseMap interface but updates -// itself to remain safe when keys are RAUWed or deleted. By default, when a -// key is RAUWed from V1 to V2, the old mapping V1->target is removed, and a new -// mapping V2->target is added. If V2 already existed, its old target is -// overwritten. When a key is deleted, its mapping is removed. -// -// You can override a ValueMap's Config parameter to control exactly what -// happens on RAUW and destruction and to get called back on each event. It's -// legal to call back into the ValueMap from a Config's callbacks. Config -// parameters should inherit from ValueMapConfig to get default -// implementations of all the methods ValueMap uses. See ValueMapConfig for -// documentation of the functions you can override. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_VALUEMAP_H -#define LLVM_IR_VALUEMAP_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/Optional.h" -#include "llvm/IR/TrackingMDRef.h" -#include "llvm/IR/ValueHandle.h" -#include "llvm/Support/Mutex.h" -#include "llvm/Support/UniqueLock.h" -#include "llvm/Support/type_traits.h" -#include -#include - -namespace llvm { - -template -class ValueMapCallbackVH; - -template -class ValueMapIterator; -template -class ValueMapConstIterator; - -/// This class defines the default behavior for configurable aspects of -/// ValueMap<>. User Configs should inherit from this class to be as compatible -/// as possible with future versions of ValueMap. -template -struct ValueMapConfig { - typedef MutexT mutex_type; - - /// If FollowRAUW is true, the ValueMap will update mappings on RAUW. If it's - /// false, the ValueMap will leave the original mapping in place. - enum { FollowRAUW = true }; - - // All methods will be called with a first argument of type ExtraData. The - // default implementations in this class take a templated first argument so - // that users' subclasses can use any type they want without having to - // override all the defaults. - struct ExtraData {}; - - template - static void onRAUW(const ExtraDataT & /*Data*/, KeyT /*Old*/, KeyT /*New*/) {} - template - static void onDelete(const ExtraDataT &/*Data*/, KeyT /*Old*/) {} - - /// Returns a mutex that should be acquired around any changes to the map. - /// This is only acquired from the CallbackVH (and held around calls to onRAUW - /// and onDelete) and not inside other ValueMap methods. NULL means that no - /// mutex is necessary. - template - static mutex_type *getMutex(const ExtraDataT &/*Data*/) { return nullptr; } -}; - -/// See the file comment. -template > -class ValueMap { - friend class ValueMapCallbackVH; - typedef ValueMapCallbackVH ValueMapCVH; - typedef DenseMap > MapT; - typedef DenseMap MDMapT; - typedef typename Config::ExtraData ExtraData; - MapT Map; - Optional MDMap; - ExtraData Data; - - bool MayMapMetadata = true; - - ValueMap(const ValueMap&) = delete; - ValueMap& operator=(const ValueMap&) = delete; -public: - typedef KeyT key_type; - typedef ValueT mapped_type; - typedef std::pair value_type; - typedef unsigned size_type; - - explicit ValueMap(unsigned NumInitBuckets = 64) - : Map(NumInitBuckets), Data() {} - explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64) - : Map(NumInitBuckets), Data(Data) {} - - bool hasMD() const { return bool(MDMap); } - MDMapT &MD() { - if (!MDMap) - MDMap.emplace(); - return *MDMap; - } - Optional &getMDMap() { return MDMap; } - - bool mayMapMetadata() const { return MayMapMetadata; } - void enableMapMetadata() { MayMapMetadata = true; } - void disableMapMetadata() { MayMapMetadata = false; } - - /// Get the mapped metadata, if it's in the map. - Optional getMappedMD(const Metadata *MD) const { - if (!MDMap) - return None; - auto Where = MDMap->find(MD); - if (Where == MDMap->end()) - return None; - return Where->second.get(); - } - - typedef ValueMapIterator iterator; - typedef ValueMapConstIterator const_iterator; - inline iterator begin() { return iterator(Map.begin()); } - inline iterator end() { return iterator(Map.end()); } - inline const_iterator begin() const { return const_iterator(Map.begin()); } - inline const_iterator end() const { return const_iterator(Map.end()); } - - bool empty() const { return Map.empty(); } - size_type size() const { return Map.size(); } - - /// Grow the map so that it has at least Size buckets. Does not shrink - void resize(size_t Size) { Map.resize(Size); } - - void clear() { - Map.clear(); - MDMap.reset(); - } - - /// Return 1 if the specified key is in the map, 0 otherwise. - size_type count(const KeyT &Val) const { - return Map.find_as(Val) == Map.end() ? 0 : 1; - } - - iterator find(const KeyT &Val) { - return iterator(Map.find_as(Val)); - } - const_iterator find(const KeyT &Val) const { - return const_iterator(Map.find_as(Val)); - } - - /// lookup - Return the entry for the specified key, or a default - /// constructed value if no such entry exists. - ValueT lookup(const KeyT &Val) const { - typename MapT::const_iterator I = Map.find_as(Val); - return I != Map.end() ? I->second : ValueT(); - } - - // Inserts key,value pair into the map if the key isn't already in the map. - // If the key is already in the map, it returns false and doesn't update the - // value. - std::pair insert(const std::pair &KV) { - auto MapResult = Map.insert(std::make_pair(Wrap(KV.first), KV.second)); - return std::make_pair(iterator(MapResult.first), MapResult.second); - } - - std::pair insert(std::pair &&KV) { - auto MapResult = - Map.insert(std::make_pair(Wrap(KV.first), std::move(KV.second))); - return std::make_pair(iterator(MapResult.first), MapResult.second); - } - - /// insert - Range insertion of pairs. - template - void insert(InputIt I, InputIt E) { - for (; I != E; ++I) - insert(*I); - } - - - bool erase(const KeyT &Val) { - typename MapT::iterator I = Map.find_as(Val); - if (I == Map.end()) - return false; - - Map.erase(I); - return true; - } - void erase(iterator I) { - return Map.erase(I.base()); - } - - value_type& FindAndConstruct(const KeyT &Key) { - return Map.FindAndConstruct(Wrap(Key)); - } - - ValueT &operator[](const KeyT &Key) { - return Map[Wrap(Key)]; - } - - /// isPointerIntoBucketsArray - Return true if the specified pointer points - /// somewhere into the ValueMap's array of buckets (i.e. either to a key or - /// value in the ValueMap). - bool isPointerIntoBucketsArray(const void *Ptr) const { - return Map.isPointerIntoBucketsArray(Ptr); - } - - /// getPointerIntoBucketsArray() - Return an opaque pointer into the buckets - /// array. In conjunction with the previous method, this can be used to - /// determine whether an insertion caused the ValueMap to reallocate. - const void *getPointerIntoBucketsArray() const { - return Map.getPointerIntoBucketsArray(); - } - -private: - // Takes a key being looked up in the map and wraps it into a - // ValueMapCallbackVH, the actual key type of the map. We use a helper - // function because ValueMapCVH is constructed with a second parameter. - ValueMapCVH Wrap(KeyT key) const { - // The only way the resulting CallbackVH could try to modify *this (making - // the const_cast incorrect) is if it gets inserted into the map. But then - // this function must have been called from a non-const method, making the - // const_cast ok. - return ValueMapCVH(key, const_cast(this)); - } -}; - -// This CallbackVH updates its ValueMap when the contained Value changes, -// according to the user's preferences expressed through the Config object. -template -class ValueMapCallbackVH final : public CallbackVH { - friend class ValueMap; - friend struct DenseMapInfo; - typedef ValueMap ValueMapT; - typedef typename std::remove_pointer::type KeySansPointerT; - - ValueMapT *Map; - - ValueMapCallbackVH(KeyT Key, ValueMapT *Map) - : CallbackVH(const_cast(static_cast(Key))), - Map(Map) {} - - // Private constructor used to create empty/tombstone DenseMap keys. - ValueMapCallbackVH(Value *V) : CallbackVH(V), Map(nullptr) {} - -public: - KeyT Unwrap() const { return cast_or_null(getValPtr()); } - - void deleted() override { - // Make a copy that won't get changed even when *this is destroyed. - ValueMapCallbackVH Copy(*this); - typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data); - unique_lock Guard; - if (M) - Guard = unique_lock(*M); - Config::onDelete(Copy.Map->Data, Copy.Unwrap()); // May destroy *this. - Copy.Map->Map.erase(Copy); // Definitely destroys *this. - } - void allUsesReplacedWith(Value *new_key) override { - assert(isa(new_key) && - "Invalid RAUW on key of ValueMap<>"); - // Make a copy that won't get changed even when *this is destroyed. - ValueMapCallbackVH Copy(*this); - typename Config::mutex_type *M = Config::getMutex(Copy.Map->Data); - unique_lock Guard; - if (M) - Guard = unique_lock(*M); - - KeyT typed_new_key = cast(new_key); - // Can destroy *this: - Config::onRAUW(Copy.Map->Data, Copy.Unwrap(), typed_new_key); - if (Config::FollowRAUW) { - typename ValueMapT::MapT::iterator I = Copy.Map->Map.find(Copy); - // I could == Copy.Map->Map.end() if the onRAUW callback already - // removed the old mapping. - if (I != Copy.Map->Map.end()) { - ValueT Target(std::move(I->second)); - Copy.Map->Map.erase(I); // Definitely destroys *this. - Copy.Map->insert(std::make_pair(typed_new_key, std::move(Target))); - } - } - } -}; - -template -struct DenseMapInfo > { - typedef ValueMapCallbackVH VH; - - static inline VH getEmptyKey() { - return VH(DenseMapInfo::getEmptyKey()); - } - static inline VH getTombstoneKey() { - return VH(DenseMapInfo::getTombstoneKey()); - } - static unsigned getHashValue(const VH &Val) { - return DenseMapInfo::getHashValue(Val.Unwrap()); - } - static unsigned getHashValue(const KeyT &Val) { - return DenseMapInfo::getHashValue(Val); - } - static bool isEqual(const VH &LHS, const VH &RHS) { - return LHS == RHS; - } - static bool isEqual(const KeyT &LHS, const VH &RHS) { - return LHS == RHS.getValPtr(); - } -}; - - -template -class ValueMapIterator : - public std::iterator, - ptrdiff_t> { - typedef typename DenseMapT::iterator BaseT; - typedef typename DenseMapT::mapped_type ValueT; - BaseT I; -public: - ValueMapIterator() : I() {} - - ValueMapIterator(BaseT I) : I(I) {} - - BaseT base() const { return I; } - - struct ValueTypeProxy { - const KeyT first; - ValueT& second; - ValueTypeProxy *operator->() { return this; } - operator std::pair() const { - return std::make_pair(first, second); - } - }; - - ValueTypeProxy operator*() const { - ValueTypeProxy Result = {I->first.Unwrap(), I->second}; - return Result; - } - - ValueTypeProxy operator->() const { - return operator*(); - } - - bool operator==(const ValueMapIterator &RHS) const { - return I == RHS.I; - } - bool operator!=(const ValueMapIterator &RHS) const { - return I != RHS.I; - } - - inline ValueMapIterator& operator++() { // Preincrement - ++I; - return *this; - } - ValueMapIterator operator++(int) { // Postincrement - ValueMapIterator tmp = *this; ++*this; return tmp; - } -}; - -template -class ValueMapConstIterator : - public std::iterator, - ptrdiff_t> { - typedef typename DenseMapT::const_iterator BaseT; - typedef typename DenseMapT::mapped_type ValueT; - BaseT I; -public: - ValueMapConstIterator() : I() {} - ValueMapConstIterator(BaseT I) : I(I) {} - ValueMapConstIterator(ValueMapIterator Other) - : I(Other.base()) {} - - BaseT base() const { return I; } - - struct ValueTypeProxy { - const KeyT first; - const ValueT& second; - ValueTypeProxy *operator->() { return this; } - operator std::pair() const { - return std::make_pair(first, second); - } - }; - - ValueTypeProxy operator*() const { - ValueTypeProxy Result = {I->first.Unwrap(), I->second}; - return Result; - } - - ValueTypeProxy operator->() const { - return operator*(); - } - - bool operator==(const ValueMapConstIterator &RHS) const { - return I == RHS.I; - } - bool operator!=(const ValueMapConstIterator &RHS) const { - return I != RHS.I; - } - - inline ValueMapConstIterator& operator++() { // Preincrement - ++I; - return *this; - } - ValueMapConstIterator operator++(int) { // Postincrement - ValueMapConstIterator tmp = *this; ++*this; return tmp; - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/IR/ValueSymbolTable.h b/llvm/include/llvm/IR/ValueSymbolTable.h deleted file mode 100644 index 61a12db4..00000000 --- a/llvm/include/llvm/IR/ValueSymbolTable.h +++ /dev/null @@ -1,134 +0,0 @@ -//===-- llvm/ValueSymbolTable.h - Implement a Value Symtab ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements the name/Value symbol table for LLVM. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_VALUESYMBOLTABLE_H -#define LLVM_IR_VALUESYMBOLTABLE_H - -#include "llvm/ADT/StringMap.h" -#include "llvm/IR/Value.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - template class SymbolTableListTraits; - template class SmallString; - class BasicBlock; - class Function; - class NamedMDNode; - class Module; - class StringRef; - -/// This class provides a symbol table of name/value pairs. It is essentially -/// a std::map but has a controlled interface provided by -/// LLVM as well as ensuring uniqueness of names. -/// -class ValueSymbolTable { - friend class Value; - friend class SymbolTableListTraits; - friend class SymbolTableListTraits; - friend class SymbolTableListTraits; - friend class SymbolTableListTraits; - friend class SymbolTableListTraits; - friend class SymbolTableListTraits; - friend class SymbolTableListTraits; -/// @name Types -/// @{ -public: - /// @brief A mapping of names to values. - typedef StringMap ValueMap; - - /// @brief An iterator over a ValueMap. - typedef ValueMap::iterator iterator; - - /// @brief A const_iterator over a ValueMap. - typedef ValueMap::const_iterator const_iterator; - -/// @} -/// @name Constructors -/// @{ -public: - ValueSymbolTable() : vmap(0), LastUnique(0) {} - ~ValueSymbolTable(); - -/// @} -/// @name Accessors -/// @{ -public: - /// This method finds the value with the given \p Name in the - /// the symbol table. - /// @returns the value associated with the \p Name - /// @brief Lookup a named Value. - Value *lookup(StringRef Name) const { return vmap.lookup(Name); } - - /// @returns true iff the symbol table is empty - /// @brief Determine if the symbol table is empty - inline bool empty() const { return vmap.empty(); } - - /// @brief The number of name/type pairs is returned. - inline unsigned size() const { return unsigned(vmap.size()); } - - /// This function can be used from the debugger to display the - /// content of the symbol table while debugging. - /// @brief Print out symbol table on stderr - void dump() const; - -/// @} -/// @name Iteration -/// @{ -public: - /// @brief Get an iterator that from the beginning of the symbol table. - inline iterator begin() { return vmap.begin(); } - - /// @brief Get a const_iterator that from the beginning of the symbol table. - inline const_iterator begin() const { return vmap.begin(); } - - /// @brief Get an iterator to the end of the symbol table. - inline iterator end() { return vmap.end(); } - - /// @brief Get a const_iterator to the end of the symbol table. - inline const_iterator end() const { return vmap.end(); } - - /// @} - /// @name Mutators - /// @{ -private: - ValueName *makeUniqueName(Value *V, SmallString<256> &UniqueName); - - /// This method adds the provided value \p N to the symbol table. The Value - /// must have a name which is used to place the value in the symbol table. - /// If the inserted name conflicts, this renames the value. - /// @brief Add a named value to the symbol table - void reinsertValue(Value *V); - - /// createValueName - This method attempts to create a value name and insert - /// it into the symbol table with the specified name. If it conflicts, it - /// auto-renames the name and returns that instead. - ValueName *createValueName(StringRef Name, Value *V); - - /// This method removes a value from the symbol table. It leaves the - /// ValueName attached to the value, but it is no longer inserted in the - /// symtab. - void removeValueName(ValueName *V); - - /// @} - /// @name Internal Data - /// @{ -private: - ValueMap vmap; ///< The map that holds the symbol table. - mutable uint32_t LastUnique; ///< Counter for tracking unique names - -/// @} -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IR/Verifier.h b/llvm/include/llvm/IR/Verifier.h deleted file mode 100644 index fdb6ce40..00000000 --- a/llvm/include/llvm/IR/Verifier.h +++ /dev/null @@ -1,100 +0,0 @@ -//===- Verifier.h - LLVM IR Verifier ----------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the function verifier interface, that can be used for some -// sanity checking of input to the system, and for checking that transformations -// haven't done something bad. -// -// Note that this does not provide full 'java style' security and verifications, -// instead it just tries to ensure that code is well formed. -// -// To see what specifically is checked, look at the top of Verifier.cpp -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IR_VERIFIER_H -#define LLVM_IR_VERIFIER_H - -#include "llvm/IR/PassManager.h" - -namespace llvm { - -class Function; -class FunctionPass; -class ModulePass; -class Module; -class raw_ostream; - -/// \brief Check a function for errors, useful for use when debugging a -/// pass. -/// -/// If there are no errors, the function returns false. If an error is found, -/// a message describing the error is written to OS (if non-null) and true is -/// returned. -bool verifyFunction(const Function &F, raw_ostream *OS = nullptr); - -/// \brief Check a module for errors. -/// -/// If there are no errors, the function returns false. If an error is -/// found, a message describing the error is written to OS (if -/// non-null) and true is returned. -/// -/// \return true if the module is broken. If BrokenDebugInfo is -/// supplied, DebugInfo verification failures won't be considered as -/// error and instead *BrokenDebugInfo will be set to true. Debug -/// info errors can be "recovered" from by stripping the debug info. -bool verifyModule(const Module &M, raw_ostream *OS = nullptr, - bool *BrokenDebugInfo = nullptr); - -FunctionPass *createVerifierPass(bool FatalErrors = true); - -/// Check a module for errors, and report separate error states for IR -/// and debug info errors. -class VerifierAnalysis : public AnalysisInfoMixin { - friend AnalysisInfoMixin; - static char PassID; - -public: - struct Result { - bool IRBroken, DebugInfoBroken; - }; - static void *ID() { return (void *)&PassID; } - Result run(Module &M, ModuleAnalysisManager &); - Result run(Function &F, FunctionAnalysisManager &); -}; - -/// Check a module for errors, but report debug info errors separately. -/// Otherwise behaves as the normal verifyModule. Debug info errors can be -/// "recovered" from by stripping the debug info. -bool verifyModule(bool &BrokenDebugInfo, const Module &M, raw_ostream *OS); - -/// \brief Create a verifier pass. -/// -/// Check a module or function for validity. This is essentially a pass wrapped -/// around the above verifyFunction and verifyModule routines and -/// functionality. When the pass detects a verification error it is always -/// printed to stderr, and by default they are fatal. You can override that by -/// passing \c false to \p FatalErrors. -/// -/// Note that this creates a pass suitable for the legacy pass manager. It has -/// nothing to do with \c VerifierPass. -class VerifierPass : public PassInfoMixin { - bool FatalErrors; - -public: - explicit VerifierPass(bool FatalErrors = true) : FatalErrors(FatalErrors) {} - - PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); - PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); -}; - - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/IRReader/IRReader.h b/llvm/include/llvm/IRReader/IRReader.h deleted file mode 100644 index 7b24ec11..00000000 --- a/llvm/include/llvm/IRReader/IRReader.h +++ /dev/null @@ -1,50 +0,0 @@ -//===---- llvm/IRReader/IRReader.h - Reader for LLVM IR files ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines functions for reading LLVM IR. They support both -// Bitcode and Assembly, automatically detecting the input format. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_IRREADER_IRREADER_H -#define LLVM_IRREADER_IRREADER_H - -#include - -namespace llvm { - -class StringRef; -class MemoryBufferRef; -class Module; -class SMDiagnostic; -class LLVMContext; - -/// If the given file holds a bitcode image, return a Module -/// for it which does lazy deserialization of function bodies. Otherwise, -/// attempt to parse it as LLVM Assembly and return a fully populated -/// Module. The ShouldLazyLoadMetadata flag is passed down to the bitcode -/// reader to optionally enable lazy metadata loading. -std::unique_ptr -getLazyIRFileModule(StringRef Filename, SMDiagnostic &Err, LLVMContext &Context, - bool ShouldLazyLoadMetadata = false); - -/// If the given MemoryBuffer holds a bitcode image, return a Module -/// for it. Otherwise, attempt to parse it as LLVM Assembly and return -/// a Module for it. -std::unique_ptr parseIR(MemoryBufferRef Buffer, SMDiagnostic &Err, - LLVMContext &Context); - -/// If the given file holds a bitcode image, return a Module for it. -/// Otherwise, attempt to parse it as LLVM Assembly and return a Module -/// for it. -std::unique_ptr parseIRFile(StringRef Filename, SMDiagnostic &Err, - LLVMContext &Context); -} - -#endif diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h deleted file mode 100644 index 90ff82fe..00000000 --- a/llvm/include/llvm/InitializePasses.h +++ /dev/null @@ -1,343 +0,0 @@ -//===- llvm/InitializePasses.h -------- Initialize All Passes ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declarations for the pass initialization routines -// for the entire LLVM project. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_INITIALIZEPASSES_H -#define LLVM_INITIALIZEPASSES_H - -namespace llvm { - -class PassRegistry; - -/// Initialize all passes linked into the TransformUtils library. -void initializeCore(PassRegistry&); - -/// Initialize all passes linked into the TransformUtils library. -void initializeTransformUtils(PassRegistry&); - -/// Initialize all passes linked into the ScalarOpts library. -void initializeScalarOpts(PassRegistry&); - -/// Initialize all passes linked into the ObjCARCOpts library. -void initializeObjCARCOpts(PassRegistry&); - -/// Initialize all passes linked into the Vectorize library. -void initializeVectorization(PassRegistry&); - -/// Initialize all passes linked into the InstCombine library. -void initializeInstCombine(PassRegistry&); - -/// Initialize all passes linked into the IPO library. -void initializeIPO(PassRegistry&); - -/// Initialize all passes linked into the Instrumentation library. -void initializeInstrumentation(PassRegistry&); - -/// Initialize all passes linked into the Analysis library. -void initializeAnalysis(PassRegistry&); - -/// Initialize all passes linked into the CodeGen library. -void initializeCodeGen(PassRegistry&); - -/// Initialize all passes linked into the GlobalISel library. -void initializeGlobalISel(PassRegistry &Registry); - -/// Initialize all passes linked into the CodeGen library. -void initializeTarget(PassRegistry&); - -void initializeAAEvalLegacyPassPass(PassRegistry&); -void initializeAAResultsWrapperPassPass(PassRegistry &); -void initializeADCELegacyPassPass(PassRegistry&); -void initializeAddDiscriminatorsLegacyPassPass(PassRegistry&); -void initializeAddressSanitizerModulePass(PassRegistry&); -void initializeAddressSanitizerPass(PassRegistry&); -void initializeAliasSetPrinterPass(PassRegistry&); -void initializeAlignmentFromAssumptionsPass(PassRegistry&); -void initializeAlwaysInlinerPass(PassRegistry&); -void initializeArgPromotionPass(PassRegistry&); -void initializeAssumptionCacheTrackerPass(PassRegistry &); -void initializeAtomicExpandPass(PassRegistry&); -void initializeBBVectorizePass(PassRegistry&); -void initializeBDCELegacyPassPass(PassRegistry &); -void initializeBarrierNoopPass(PassRegistry&); -void initializeBasicAAWrapperPassPass(PassRegistry&); -void initializeBlockExtractorPassPass(PassRegistry&); -void initializeBlockFrequencyInfoWrapperPassPass(PassRegistry&); -void initializeBoundsCheckingPass(PassRegistry&); -void initializeBranchFolderPassPass(PassRegistry&); -void initializeBranchProbabilityInfoWrapperPassPass(PassRegistry&); -void initializeBreakCriticalEdgesPass(PassRegistry&); -void initializeCFGOnlyPrinterPass(PassRegistry&); -void initializeCFGOnlyViewerPass(PassRegistry&); -void initializeCFGPrinterPass(PassRegistry&); -void initializeCFGSimplifyPassPass(PassRegistry&); -void initializeCFGViewerPass(PassRegistry&); -void initializeCFLAndersAAWrapperPassPass(PassRegistry&); -void initializeCFLSteensAAWrapperPassPass(PassRegistry&); -void initializeCallGraphDOTPrinterPass(PassRegistry&); -void initializeCallGraphPrinterLegacyPassPass(PassRegistry&); -void initializeCallGraphViewerPass(PassRegistry&); -void initializeCallGraphWrapperPassPass(PassRegistry &); -void initializeCodeGenPreparePass(PassRegistry&); -void initializeConstantHoistingLegacyPassPass(PassRegistry&); -void initializeConstantMergeLegacyPassPass(PassRegistry &); -void initializeConstantPropagationPass(PassRegistry&); -void initializeCorrelatedValuePropagationPass(PassRegistry&); -void initializeCostModelAnalysisPass(PassRegistry&); -void initializeCrossDSOCFIPass(PassRegistry&); -void initializeDAEPass(PassRegistry&); -void initializeDAHPass(PassRegistry&); -void initializeDCELegacyPassPass(PassRegistry&); -void initializeDSELegacyPassPass(PassRegistry&); -void initializeDataFlowSanitizerPass(PassRegistry&); -void initializeDeadInstEliminationPass(PassRegistry&); -void initializeDeadMachineInstructionElimPass(PassRegistry&); -void initializeDelinearizationPass(PassRegistry &); -void initializeDemandedBitsWrapperPassPass(PassRegistry&); -void initializeDependenceAnalysisPass(PassRegistry&); -void initializeDependenceAnalysisWrapperPassPass(PassRegistry&); -void initializeDetectDeadLanesPass(PassRegistry&); -void initializeDivergenceAnalysisPass(PassRegistry&); -void initializeDomOnlyPrinterPass(PassRegistry&); -void initializeDomOnlyViewerPass(PassRegistry&); -void initializeDomPrinterPass(PassRegistry&); -void initializeDomViewerPass(PassRegistry&); -void initializeDominanceFrontierWrapperPassPass(PassRegistry&); -void initializeDominatorTreeWrapperPassPass(PassRegistry&); -void initializeDwarfEHPreparePass(PassRegistry&); -void initializeEarlyCSELegacyPassPass(PassRegistry &); -void initializeEarlyIfConverterPass(PassRegistry&); -void initializeEdgeBundlesPass(PassRegistry&); -void initializeEfficiencySanitizerPass(PassRegistry&); -void initializeEliminateAvailableExternallyLegacyPassPass(PassRegistry &); -void initializeGVNHoistLegacyPassPass(PassRegistry &); -void initializeExpandISelPseudosPass(PassRegistry&); -void initializeExpandPostRAPass(PassRegistry&); -void initializeExternalAAWrapperPassPass(PassRegistry&); -void initializeFinalizeMachineBundlesPass(PassRegistry&); -void initializeFlattenCFGPassPass(PassRegistry&); -void initializeFloat2IntLegacyPassPass(PassRegistry&); -void initializeForceFunctionAttrsLegacyPassPass(PassRegistry&); -void initializeForwardControlFlowIntegrityPass(PassRegistry&); -void initializeFuncletLayoutPass(PassRegistry &); -void initializeFunctionImportPassPass(PassRegistry &); -void initializeGCMachineCodeAnalysisPass(PassRegistry&); -void initializeGCModuleInfoPass(PassRegistry&); -void initializeGCOVProfilerLegacyPassPass(PassRegistry&); -void initializeGVNLegacyPassPass(PassRegistry&); -void initializeGlobalDCELegacyPassPass(PassRegistry&); -void initializeGlobalMergePass(PassRegistry&); -void initializeGlobalOptLegacyPassPass(PassRegistry&); -void initializeGlobalsAAWrapperPassPass(PassRegistry&); -void initializeGuardWideningLegacyPassPass(PassRegistry&); -void initializeIPCPPass(PassRegistry&); -void initializeIPSCCPLegacyPassPass(PassRegistry &); -void initializeIRTranslatorPass(PassRegistry &); -void initializeIVUsersWrapperPassPass(PassRegistry&); -void initializeIfConverterPass(PassRegistry&); -void initializeImplicitNullChecksPass(PassRegistry&); -void initializeIndVarSimplifyLegacyPassPass(PassRegistry&); -void initializeInductiveRangeCheckEliminationPass(PassRegistry&); -void initializeInferFunctionAttrsLegacyPassPass(PassRegistry&); -void initializeInlineCostAnalysisPass(PassRegistry&); -void initializeInstCountPass(PassRegistry&); -void initializeInstNamerPass(PassRegistry&); -void initializeInstSimplifierPass(PassRegistry&); -void initializeInstrProfilingLegacyPassPass(PassRegistry &); -void initializeInstructionCombiningPassPass(PassRegistry&); -void initializeInterleavedAccessPass(PassRegistry &); -void initializeInternalizeLegacyPassPass(PassRegistry&); -void initializeIntervalPartitionPass(PassRegistry&); -void initializeJumpThreadingPass(PassRegistry&); -void initializeLCSSAWrapperPassPass(PassRegistry &); -void initializeLegacyLICMPassPass(PassRegistry&); -void initializeLazyBlockFrequencyInfoPassPass(PassRegistry&); -void initializeLazyValueInfoWrapperPassPass(PassRegistry&); -void initializeLintPass(PassRegistry&); -void initializeLiveDebugValuesPass(PassRegistry&); -void initializeLiveDebugVariablesPass(PassRegistry&); -void initializeLiveIntervalsPass(PassRegistry&); -void initializeLiveRegMatrixPass(PassRegistry&); -void initializeLiveStacksPass(PassRegistry&); -void initializeLiveVariablesPass(PassRegistry&); -void initializeLoadCombinePass(PassRegistry&); -void initializeLoaderPassPass(PassRegistry&); -void initializeLoadStoreVectorizerPass(PassRegistry&); -void initializeLocalStackSlotPassPass(PassRegistry&); -void initializeLoopAccessLegacyAnalysisPass(PassRegistry&); -void initializeLoopDataPrefetchPass(PassRegistry&); -void initializeLoopDeletionLegacyPassPass(PassRegistry&); -void initializeLoopDistributeLegacyPass(PassRegistry&); -void initializeLoopExtractorPass(PassRegistry&); -void initializeLoopIdiomRecognizeLegacyPassPass(PassRegistry&); -void initializeLoopInfoWrapperPassPass(PassRegistry&); -void initializeLoopInstSimplifyLegacyPassPass(PassRegistry&); -void initializeLoopInterchangePass(PassRegistry &); -void initializeLoopLoadEliminationPass(PassRegistry&); -void initializeLoopPassPass(PassRegistry&); -void initializeLoopRerollPass(PassRegistry&); -void initializeLoopRotateLegacyPassPass(PassRegistry&); -void initializeLoopSimplifyCFGLegacyPassPass(PassRegistry&); -void initializeLoopSimplifyPass(PassRegistry&); -void initializeLoopStrengthReducePass(PassRegistry&); -void initializeLoopUnrollPass(PassRegistry&); -void initializeLoopUnswitchPass(PassRegistry&); -void initializeLoopVectorizePass(PassRegistry&); -void initializeLoopVersioningLICMPass(PassRegistry&); -void initializeLoopVersioningPassPass(PassRegistry &); -void initializeLowerAtomicLegacyPassPass(PassRegistry &); -void initializeLowerEmuTLSPass(PassRegistry&); -void initializeLowerExpectIntrinsicPass(PassRegistry&); -void initializeLowerGuardIntrinsicPass(PassRegistry&); -void initializeLowerIntrinsicsPass(PassRegistry&); -void initializeLowerInvokePass(PassRegistry&); -void initializeLowerSwitchPass(PassRegistry&); -void initializeLowerTypeTestsPass(PassRegistry&); -void initializeMIRPrintingPassPass(PassRegistry&); -void initializeMachineBlockFrequencyInfoPass(PassRegistry&); -void initializeMachineBlockPlacementPass(PassRegistry&); -void initializeMachineBlockPlacementStatsPass(PassRegistry&); -void initializeMachineBranchProbabilityInfoPass(PassRegistry&); -void initializeMachineCSEPass(PassRegistry&); -void initializeMachineCombinerPass(PassRegistry &); -void initializeMachineCopyPropagationPass(PassRegistry&); -void initializeMachineDominanceFrontierPass(PassRegistry&); -void initializeMachineDominatorTreePass(PassRegistry&); -void initializeMachineFunctionPrinterPassPass(PassRegistry&); -void initializeMachineLICMPass(PassRegistry&); -void initializeMachineLoopInfoPass(PassRegistry&); -void initializeMachineModuleInfoPass(PassRegistry&); -void initializeMachinePostDominatorTreePass(PassRegistry&); -void initializeMachineRegionInfoPassPass(PassRegistry&); -void initializeMachineSchedulerPass(PassRegistry&); -void initializeMachineSinkingPass(PassRegistry&); -void initializeMachineTraceMetricsPass(PassRegistry&); -void initializeMachineVerifierPassPass(PassRegistry&); -void initializeMemCpyOptLegacyPassPass(PassRegistry&); -void initializeMemDepPrinterPass(PassRegistry&); -void initializeMemDerefPrinterPass(PassRegistry&); -void initializeMemoryDependenceWrapperPassPass(PassRegistry&); -void initializeMemorySSAWrapperPassPass(PassRegistry&); -void initializeMemorySSAPrinterLegacyPassPass(PassRegistry &); -void initializeMemorySanitizerPass(PassRegistry&); -void initializeMergeFunctionsPass(PassRegistry&); -void initializeMergedLoadStoreMotionLegacyPassPass(PassRegistry &); -void initializeMetaRenamerPass(PassRegistry&); -void initializeModuleDebugInfoPrinterPass(PassRegistry&); -void initializeModuleSummaryIndexWrapperPassPass(PassRegistry &); -void initializeNameAnonFunctionPass(PassRegistry &); -void initializeNaryReassociatePass(PassRegistry&); -void initializeNoAAPass(PassRegistry&); -void initializeObjCARCAAWrapperPassPass(PassRegistry&); -void initializeObjCARCAPElimPass(PassRegistry&); -void initializeObjCARCContractPass(PassRegistry&); -void initializeObjCARCExpandPass(PassRegistry&); -void initializeObjCARCOptPass(PassRegistry&); -void initializeOptimizationRemarkEmitterWrapperPassPass(PassRegistry&); -void initializeOptimizePHIsPass(PassRegistry&); -void initializePAEvalPass(PassRegistry &); -void initializePEIPass(PassRegistry&); -void initializePGOIndirectCallPromotionLegacyPassPass(PassRegistry&); -void initializePGOInstrumentationGenLegacyPassPass(PassRegistry&); -void initializePGOInstrumentationUseLegacyPassPass(PassRegistry&); -void initializePHIEliminationPass(PassRegistry&); -void initializePhysicalRegisterUsageInfoPass(PassRegistry &); -void initializePartialInlinerLegacyPassPass(PassRegistry &); -void initializePartiallyInlineLibCallsLegacyPassPass(PassRegistry &); -void initializePatchableFunctionPass(PassRegistry &); -void initializePeepholeOptimizerPass(PassRegistry&); -void initializePlaceBackedgeSafepointsImplPass(PassRegistry&); -void initializePlaceSafepointsPass(PassRegistry&); -void initializePostDomOnlyPrinterPass(PassRegistry&); -void initializePostDomOnlyViewerPass(PassRegistry&); -void initializePostDomPrinterPass(PassRegistry&); -void initializePostDomViewerPass(PassRegistry&); -void initializePostDominatorTreeWrapperPassPass(PassRegistry&); -void initializePostMachineSchedulerPass(PassRegistry&); -void initializePostOrderFunctionAttrsLegacyPassPass(PassRegistry&); -void initializePostRAHazardRecognizerPass(PassRegistry&); -void initializePostRASchedulerPass(PassRegistry&); -void initializePreISelIntrinsicLoweringLegacyPassPass(PassRegistry&); -void initializePrintBasicBlockPassPass(PassRegistry&); -void initializePrintFunctionPassWrapperPass(PassRegistry&); -void initializePrintModulePassWrapperPass(PassRegistry&); -void initializeProcessImplicitDefsPass(PassRegistry&); -void initializeProfileSummaryInfoWrapperPassPass(PassRegistry &); -void initializePromoteLegacyPassPass(PassRegistry &); -void initializePruneEHPass(PassRegistry&); -void initializeReassociateLegacyPassPass(PassRegistry&); -void initializeRegBankSelectPass(PassRegistry &); -void initializeRegToMemPass(PassRegistry&); -void initializeRegionInfoPassPass(PassRegistry&); -void initializeRegionOnlyPrinterPass(PassRegistry&); -void initializeRegionOnlyViewerPass(PassRegistry&); -void initializeRegionPrinterPass(PassRegistry&); -void initializeRegionViewerPass(PassRegistry&); -void initializeRegisterCoalescerPass(PassRegistry&); -void initializeRenameIndependentSubregsPass(PassRegistry&); -void initializeReversePostOrderFunctionAttrsLegacyPassPass(PassRegistry&); -void initializeRewriteStatepointsForGCPass(PassRegistry&); -void initializeRewriteSymbolsPass(PassRegistry&); -void initializeSCCPLegacyPassPass(PassRegistry &); -void initializeSCEVAAWrapperPassPass(PassRegistry&); -void initializeSLPVectorizerPass(PassRegistry&); -void initializeSROALegacyPassPass(PassRegistry&); -void initializeSafeStackPass(PassRegistry&); -void initializeSampleProfileLoaderLegacyPassPass(PassRegistry&); -void initializeSanitizerCoverageModulePass(PassRegistry&); -void initializeScalarEvolutionWrapperPassPass(PassRegistry&); -void initializeScalarizerPass(PassRegistry&); -void initializeScopedNoAliasAAWrapperPassPass(PassRegistry&); -void initializeSeparateConstOffsetFromGEPPass(PassRegistry &); -void initializeShadowStackGCLoweringPass(PassRegistry&); -void initializeShrinkWrapPass(PassRegistry &); -void initializeSimpleInlinerPass(PassRegistry&); -void initializeSingleLoopExtractorPass(PassRegistry&); -void initializeSinkingLegacyPassPass(PassRegistry&); -void initializeSjLjEHPreparePass(PassRegistry&); -void initializeSlotIndexesPass(PassRegistry&); -void initializeSpeculativeExecutionPass(PassRegistry&); -void initializeSpillPlacementPass(PassRegistry&); -void initializeStackColoringPass(PassRegistry&); -void initializeStackMapLivenessPass(PassRegistry&); -void initializeStackProtectorPass(PassRegistry&); -void initializeStackSlotColoringPass(PassRegistry&); -void initializeStraightLineStrengthReducePass(PassRegistry &); -void initializeStripDeadDebugInfoPass(PassRegistry&); -void initializeStripDeadPrototypesLegacyPassPass(PassRegistry&); -void initializeStripDebugDeclarePass(PassRegistry&); -void initializeStripNonDebugSymbolsPass(PassRegistry&); -void initializeStripSymbolsPass(PassRegistry&); -void initializeStructurizeCFGPass(PassRegistry&); -void initializeTailCallElimPass(PassRegistry&); -void initializeTailDuplicatePassPass(PassRegistry&); -void initializeTargetLibraryInfoWrapperPassPass(PassRegistry &); -void initializeTargetPassConfigPass(PassRegistry&); -void initializeTargetTransformInfoWrapperPassPass(PassRegistry &); -void initializeThreadSanitizerPass(PassRegistry&); -void initializeTwoAddressInstructionPassPass(PassRegistry&); -void initializeTypeBasedAAWrapperPassPass(PassRegistry&); -void initializeUnifyFunctionExitNodesPass(PassRegistry&); -void initializeUnpackMachineBundlesPass(PassRegistry&); -void initializeUnreachableBlockElimLegacyPassPass(PassRegistry&); -void initializeUnreachableMachineBlockElimPass(PassRegistry&); -void initializeVerifierLegacyPassPass(PassRegistry&); -void initializeVirtRegMapPass(PassRegistry&); -void initializeVirtRegRewriterPass(PassRegistry&); -void initializeWholeProgramDevirtPass(PassRegistry &); -void initializeWinEHPreparePass(PassRegistry&); -void initializeWriteBitcodePassPass(PassRegistry &); -void initializeXRayInstrumentationPass(PassRegistry &); -} - -#endif diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h deleted file mode 100644 index 5154c000..00000000 --- a/llvm/include/llvm/LTO/LTO.h +++ /dev/null @@ -1,74 +0,0 @@ -//===-LTO.h - LLVM Link Time Optimizer ------------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares functions and classes used to support LTO. It is intended -// to be used both by LTO classes as well as by clients (gold-plugin) that -// don't utilize the LTO code generator interfaces. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LTO_LTO_H -#define LLVM_LTO_LTO_H - -#include "llvm/ADT/StringMap.h" -#include "llvm/IR/ModuleSummaryIndex.h" - -namespace llvm { - -class LLVMContext; -class MemoryBufferRef; -class Module; - -/// Helper to load a module from bitcode. -std::unique_ptr loadModuleFromBuffer(const MemoryBufferRef &Buffer, - LLVMContext &Context, bool Lazy); - -/// Provide a "loader" for the FunctionImporter to access function from other -/// modules. -class ModuleLoader { - /// The context that will be used for importing. - LLVMContext &Context; - - /// Map from Module identifier to MemoryBuffer. Used by clients like the - /// FunctionImported to request loading a Module. - StringMap &ModuleMap; - -public: - ModuleLoader(LLVMContext &Context, StringMap &ModuleMap) - : Context(Context), ModuleMap(ModuleMap) {} - - /// Load a module on demand. - std::unique_ptr operator()(StringRef Identifier) { - return loadModuleFromBuffer(ModuleMap[Identifier], Context, /*Lazy*/ true); - } -}; - - -/// Resolve Weak and LinkOnce values in the \p Index. Linkage changes recorded -/// in the index and the ThinLTO backends must apply the changes to the Module -/// via thinLTOResolveWeakForLinkerModule. -/// -/// This is done for correctness (if value exported, ensure we always -/// emit a copy), and compile-time optimization (allow drop of duplicates). -void thinLTOResolveWeakForLinkerInIndex( - ModuleSummaryIndex &Index, - function_ref - isPrevailing, - function_ref - recordNewLinkage); - -/// Update the linkages in the given \p Index to mark exported values -/// as external and non-exported values as internal. The ThinLTO backends -/// must apply the changes to the Module via thinLTOInternalizeModule. -void thinLTOInternalizeAndPromoteInIndex( - ModuleSummaryIndex &Index, - function_ref isExported); -} - -#endif diff --git a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h deleted file mode 100644 index d083e37d..00000000 --- a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h +++ /dev/null @@ -1,236 +0,0 @@ -//===-LTOCodeGenerator.h - LLVM Link Time Optimizer -----------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the LTOCodeGenerator class. -// -// LTO compilation consists of three phases: Pre-IPO, IPO and Post-IPO. -// -// The Pre-IPO phase compiles source code into bitcode file. The resulting -// bitcode files, along with object files and libraries, will be fed to the -// linker to through the IPO and Post-IPO phases. By using obj-file extension, -// the resulting bitcode file disguises itself as an object file, and therefore -// obviates the need of writing a special set of the make-rules only for LTO -// compilation. -// -// The IPO phase perform inter-procedural analyses and optimizations, and -// the Post-IPO consists two sub-phases: intra-procedural scalar optimizations -// (SOPT), and intra-procedural target-dependent code generator (CG). -// -// As of this writing, we don't separate IPO and the Post-IPO SOPT. They -// are intermingled together, and are driven by a single pass manager (see -// PassManagerBuilder::populateLTOPassManager()). -// -// The "LTOCodeGenerator" is the driver for the IPO and Post-IPO stages. -// The "CodeGenerator" here is bit confusing. Don't confuse the "CodeGenerator" -// with the machine specific code generator. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LTO_LTOCODEGENERATOR_H -#define LLVM_LTO_LTOCODEGENERATOR_H - -#include "llvm-c/lto.h" -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/IR/GlobalValue.h" -#include "llvm/IR/Module.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetOptions.h" -#include -#include - -namespace llvm { -template class ArrayRef; - class LLVMContext; - class DiagnosticInfo; - class Linker; - class Mangler; - class MemoryBuffer; - class TargetLibraryInfo; - class TargetMachine; - class raw_ostream; - class raw_pwrite_stream; - -//===----------------------------------------------------------------------===// -/// C++ class which implements the opaque lto_code_gen_t type. -/// -struct LTOCodeGenerator { - static const char *getVersionString(); - - LTOCodeGenerator(LLVMContext &Context); - ~LTOCodeGenerator(); - - /// Merge given module. Return true on success. - /// - /// Resets \a HasVerifiedInput. - bool addModule(struct LTOModule *); - - /// Set the destination module. - /// - /// Resets \a HasVerifiedInput. - void setModule(std::unique_ptr M); - - void setTargetOptions(const TargetOptions &Options); - void setDebugInfo(lto_debug_model); - void setCodePICModel(Optional Model) { RelocModel = Model; } - - /// Set the file type to be emitted (assembly or object code). - /// The default is TargetMachine::CGFT_ObjectFile. - void setFileType(TargetMachine::CodeGenFileType FT) { FileType = FT; } - - void setCpu(const char *MCpu) { this->MCpu = MCpu; } - void setAttr(const char *MAttr) { this->MAttr = MAttr; } - void setOptLevel(unsigned OptLevel); - - void setShouldInternalize(bool Value) { ShouldInternalize = Value; } - void setShouldEmbedUselists(bool Value) { ShouldEmbedUselists = Value; } - - /// Restore linkage of globals - /// - /// When set, the linkage of globals will be restored prior to code - /// generation. That is, a global symbol that had external linkage prior to - /// LTO will be emitted with external linkage again; and a local will remain - /// local. Note that this option only affects the end result - globals may - /// still be internalized in the process of LTO and may be modified and/or - /// deleted where legal. - /// - /// The default behavior will internalize globals (unless on the preserve - /// list) and, if parallel code generation is enabled, will externalize - /// all locals. - void setShouldRestoreGlobalsLinkage(bool Value) { - ShouldRestoreGlobalsLinkage = Value; - } - - void addMustPreserveSymbol(StringRef Sym) { MustPreserveSymbols[Sym] = 1; } - - /// Pass options to the driver and optimization passes. - /// - /// These options are not necessarily for debugging purpose (the function - /// name is misleading). This function should be called before - /// LTOCodeGenerator::compilexxx(), and - /// LTOCodeGenerator::writeMergedModules(). - void setCodeGenDebugOptions(const char *Opts); - - /// Parse the options set in setCodeGenDebugOptions. - /// - /// Like \a setCodeGenDebugOptions(), this must be called before - /// LTOCodeGenerator::compilexxx() and - /// LTOCodeGenerator::writeMergedModules(). - void parseCodeGenDebugOptions(); - - /// Write the merged module to the file specified by the given path. Return - /// true on success. - /// - /// Calls \a verifyMergedModuleOnce(). - bool writeMergedModules(const char *Path); - - /// Compile the merged module into a *single* output file; the path to output - /// file is returned to the caller via argument "name". Return true on - /// success. - /// - /// \note It is up to the linker to remove the intermediate output file. Do - /// not try to remove the object file in LTOCodeGenerator's destructor as we - /// don't who (LTOCodeGenerator or the output file) will last longer. - bool compile_to_file(const char **Name, bool DisableVerify, - bool DisableInline, bool DisableGVNLoadPRE, - bool DisableVectorization); - - /// As with compile_to_file(), this function compiles the merged module into - /// single output file. Instead of returning the output file path to the - /// caller (linker), it brings the output to a buffer, and returns the buffer - /// to the caller. This function should delete the intermediate file once - /// its content is brought to memory. Return NULL if the compilation was not - /// successful. - std::unique_ptr compile(bool DisableVerify, bool DisableInline, - bool DisableGVNLoadPRE, - bool DisableVectorization); - - /// Optimizes the merged module. Returns true on success. - /// - /// Calls \a verifyMergedModuleOnce(). - bool optimize(bool DisableVerify, bool DisableInline, bool DisableGVNLoadPRE, - bool DisableVectorization); - - /// Compiles the merged optimized module into a single output file. It brings - /// the output to a buffer, and returns the buffer to the caller. Return NULL - /// if the compilation was not successful. - std::unique_ptr compileOptimized(); - - /// Compile the merged optimized module into out.size() output files each - /// representing a linkable partition of the module. If out contains more - /// than one element, code generation is done in parallel with out.size() - /// threads. Output files will be written to members of out. Returns true on - /// success. - /// - /// Calls \a verifyMergedModuleOnce(). - bool compileOptimized(ArrayRef Out); - - void setDiagnosticHandler(lto_diagnostic_handler_t, void *); - - LLVMContext &getContext() { return Context; } - - void resetMergedModule() { MergedModule.reset(); } - -private: - void initializeLTOPasses(); - - /// Verify the merged module on first call. - /// - /// Sets \a HasVerifiedInput on first call and doesn't run again on the same - /// input. - void verifyMergedModuleOnce(); - - bool compileOptimizedToFile(const char **Name); - void restoreLinkageForExternals(); - void applyScopeRestrictions(); - void preserveDiscardableGVs( - Module &TheModule, - llvm::function_ref mustPreserveGV); - - bool determineTarget(); - std::unique_ptr createTargetMachine(); - - static void DiagnosticHandler(const DiagnosticInfo &DI, void *Context); - - void DiagnosticHandler2(const DiagnosticInfo &DI); - - void emitError(const std::string &ErrMsg); - void emitWarning(const std::string &ErrMsg); - - LLVMContext &Context; - std::unique_ptr MergedModule; - std::unique_ptr TheLinker; - std::unique_ptr TargetMach; - bool EmitDwarfDebugInfo = false; - bool ScopeRestrictionsDone = false; - bool HasVerifiedInput = false; - Optional RelocModel; - StringSet<> MustPreserveSymbols; - StringSet<> AsmUndefinedRefs; - StringMap ExternalSymbols; - std::vector CodegenOptions; - std::string FeatureStr; - std::string MCpu; - std::string MAttr; - std::string NativeObjectPath; - TargetOptions Options; - CodeGenOpt::Level CGOptLevel = CodeGenOpt::Default; - const Target *MArch = nullptr; - std::string TripleStr; - unsigned OptLevel = 2; - lto_diagnostic_handler_t DiagHandler = nullptr; - void *DiagContext = nullptr; - bool ShouldInternalize = true; - bool ShouldEmbedUselists = false; - bool ShouldRestoreGlobalsLinkage = false; - TargetMachine::CodeGenFileType FileType = TargetMachine::CGFT_ObjectFile; -}; -} -#endif diff --git a/llvm/include/llvm/LTO/legacy/LTOModule.h b/llvm/include/llvm/LTO/legacy/LTOModule.h deleted file mode 100644 index 2e46219b..00000000 --- a/llvm/include/llvm/LTO/legacy/LTOModule.h +++ /dev/null @@ -1,212 +0,0 @@ -//===-LTOModule.h - LLVM Link Time Optimizer ------------------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the LTOModule class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LTO_LTOMODULE_H -#define LLVM_LTO_LTOMODULE_H - -#include "llvm-c/lto.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/IR/Module.h" -#include "llvm/Object/IRObjectFile.h" -#include "llvm/Target/TargetMachine.h" -#include -#include - -// Forward references to llvm classes. -namespace llvm { - class Function; - class GlobalValue; - class MemoryBuffer; - class TargetOptions; - class Value; - -//===----------------------------------------------------------------------===// -/// C++ class which implements the opaque lto_module_t type. -/// -struct LTOModule { -private: - struct NameAndAttributes { - const char *name; - uint32_t attributes; - bool isFunction; - const GlobalValue *symbol; - }; - - std::unique_ptr OwnedContext; - - std::string LinkerOpts; - - std::unique_ptr IRFile; - std::unique_ptr _target; - std::vector _symbols; - - // _defines and _undefines only needed to disambiguate tentative definitions - StringSet<> _defines; - StringMap _undefines; - std::vector _asm_undefines; - - LTOModule(std::unique_ptr Obj, TargetMachine *TM); - -public: - ~LTOModule(); - - /// Returns 'true' if the file or memory contents is LLVM bitcode. - static bool isBitcodeFile(const void *mem, size_t length); - static bool isBitcodeFile(const char *path); - - /// Returns 'true' if the Module is produced for ThinLTO. - bool isThinLTO(); - - /// Returns 'true' if the memory buffer is LLVM bitcode for the specified - /// triple. - static bool isBitcodeForTarget(MemoryBuffer *memBuffer, - StringRef triplePrefix); - - /// Returns a string representing the producer identification stored in the - /// bitcode, or "" if the bitcode does not contains any. - /// - static std::string getProducerString(MemoryBuffer *Buffer); - - /// Create a MemoryBuffer from a memory range with an optional name. - static std::unique_ptr - makeBuffer(const void *mem, size_t length, StringRef name = ""); - - /// Create an LTOModule. N.B. These methods take ownership of the buffer. The - /// caller must have initialized the Targets, the TargetMCs, the AsmPrinters, - /// and the AsmParsers by calling: - /// - /// InitializeAllTargets(); - /// InitializeAllTargetMCs(); - /// InitializeAllAsmPrinters(); - /// InitializeAllAsmParsers(); - static ErrorOr> - createFromFile(LLVMContext &Context, const char *path, - const TargetOptions &options); - static ErrorOr> - createFromOpenFile(LLVMContext &Context, int fd, const char *path, - size_t size, const TargetOptions &options); - static ErrorOr> - createFromOpenFileSlice(LLVMContext &Context, int fd, const char *path, - size_t map_size, off_t offset, - const TargetOptions &options); - static ErrorOr> - createFromBuffer(LLVMContext &Context, const void *mem, size_t length, - const TargetOptions &options, StringRef path = ""); - static ErrorOr> - createInLocalContext(std::unique_ptr Context, const void *mem, - size_t length, const TargetOptions &options, - StringRef path); - - const Module &getModule() const { - return const_cast(this)->getModule(); - } - Module &getModule() { - return IRFile->getModule(); - } - - std::unique_ptr takeModule() { return IRFile->takeModule(); } - - /// Return the Module's target triple. - const std::string &getTargetTriple() { - return getModule().getTargetTriple(); - } - - /// Set the Module's target triple. - void setTargetTriple(StringRef Triple) { - getModule().setTargetTriple(Triple); - } - - /// Get the number of symbols - uint32_t getSymbolCount() { - return _symbols.size(); - } - - /// Get the attributes for a symbol at the specified index. - lto_symbol_attributes getSymbolAttributes(uint32_t index) { - if (index < _symbols.size()) - return lto_symbol_attributes(_symbols[index].attributes); - return lto_symbol_attributes(0); - } - - /// Get the name of the symbol at the specified index. - const char *getSymbolName(uint32_t index) { - if (index < _symbols.size()) - return _symbols[index].name; - return nullptr; - } - - const GlobalValue *getSymbolGV(uint32_t index) { - if (index < _symbols.size()) - return _symbols[index].symbol; - return nullptr; - } - - const char *getLinkerOpts() { - return LinkerOpts.c_str(); - } - - const std::vector &getAsmUndefinedRefs() { - return _asm_undefines; - } - -private: - /// Parse metadata from the module - // FIXME: it only parses "Linker Options" metadata at the moment - void parseMetadata(); - - /// Parse the symbols from the module and model-level ASM and add them to - /// either the defined or undefined lists. - void parseSymbols(); - - /// Add a symbol which isn't defined just yet to a list to be resolved later. - void addPotentialUndefinedSymbol(const object::BasicSymbolRef &Sym, - bool isFunc); - - /// Add a defined symbol to the list. - void addDefinedSymbol(const char *Name, const GlobalValue *def, - bool isFunction); - - /// Add a data symbol as defined to the list. - void addDefinedDataSymbol(const object::BasicSymbolRef &Sym); - void addDefinedDataSymbol(const char*Name, const GlobalValue *v); - - /// Add a function symbol as defined to the list. - void addDefinedFunctionSymbol(const object::BasicSymbolRef &Sym); - void addDefinedFunctionSymbol(const char *Name, const Function *F); - - /// Add a global symbol from module-level ASM to the defined list. - void addAsmGlobalSymbol(const char *, lto_symbol_attributes scope); - - /// Add a global symbol from module-level ASM to the undefined list. - void addAsmGlobalSymbolUndef(const char *); - - /// Parse i386/ppc ObjC class data structure. - void addObjCClass(const GlobalVariable *clgv); - - /// Parse i386/ppc ObjC category data structure. - void addObjCCategory(const GlobalVariable *clgv); - - /// Parse i386/ppc ObjC class list data structure. - void addObjCClassRef(const GlobalVariable *clgv); - - /// Get string that the data pointer points to. - bool objcClassNameFromExpression(const Constant *c, std::string &name); - - /// Create an LTOModule (private version). - static ErrorOr> - makeLTOModule(MemoryBufferRef Buffer, const TargetOptions &options, - LLVMContext &Context, bool ShouldBeLazy); -}; -} -#endif diff --git a/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h deleted file mode 100644 index 539880e8..00000000 --- a/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h +++ /dev/null @@ -1,276 +0,0 @@ -//===-ThinLTOCodeGenerator.h - LLVM Link Time Optimizer -------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the ThinLTOCodeGenerator class, similar to the -// LTOCodeGenerator but for the ThinLTO scheme. It provides an interface for -// linker plugin. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LTO_THINLTOCODEGENERATOR_H -#define LLVM_LTO_THINLTOCODEGENERATOR_H - -#include "llvm-c/lto.h" -#include "llvm/ADT/StringSet.h" -#include "llvm/ADT/Triple.h" -#include "llvm/IR/ModuleSummaryIndex.h" -#include "llvm/Support/CodeGen.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/Target/TargetOptions.h" - -#include - -namespace llvm { -class StringRef; -class LLVMContext; -class TargetMachine; - -/// Helper to gather options relevant to the target machine creation -struct TargetMachineBuilder { - Triple TheTriple; - std::string MCpu; - std::string MAttr; - TargetOptions Options; - Optional RelocModel; - CodeGenOpt::Level CGOptLevel = CodeGenOpt::Default; - - std::unique_ptr create() const; -}; - -/// This class define an interface similar to the LTOCodeGenerator, but adapted -/// for ThinLTO processing. -/// The ThinLTOCodeGenerator is not intended to be reuse for multiple -/// compilation: the model is that the client adds modules to the generator and -/// ask to perform the ThinLTO optimizations / codegen, and finally destroys the -/// codegenerator. -class ThinLTOCodeGenerator { -public: - /// Add given module to the code generator. - void addModule(StringRef Identifier, StringRef Data); - - /** - * Adds to a list of all global symbols that must exist in the final generated - * code. If a symbol is not listed there, it will be optimized away if it is - * inlined into every usage. - */ - void preserveSymbol(StringRef Name); - - /** - * Adds to a list of all global symbols that are cross-referenced between - * ThinLTO files. If the ThinLTO CodeGenerator can ensure that every - * references from a ThinLTO module to this symbol is optimized away, then - * the symbol can be discarded. - */ - void crossReferenceSymbol(StringRef Name); - - /** - * Process all the modules that were added to the code generator in parallel. - * - * Client can access the resulting object files using getProducedBinaries() - */ - void run(); - - /** - * Return the "in memory" binaries produced by the code generator. - */ - std::vector> &getProducedBinaries() { - return ProducedBinaries; - } - - /** - * \defgroup Options setters - * @{ - */ - - /** - * \defgroup Cache controlling options - * - * These entry points control the ThinLTO cache. The cache is intended to - * support incremental build, and thus needs to be persistent accross build. - * The client enabled the cache by supplying a path to an existing directory. - * The code generator will use this to store objects files that may be reused - * during a subsequent build. - * To avoid filling the disk space, a few knobs are provided: - * - The pruning interval limit the frequency at which the garbage collector - * will try to scan the cache directory to prune it from expired entries. - * Setting to -1 disable the pruning (default). - * - The pruning expiration time indicates to the garbage collector how old - * an entry needs to be to be removed. - * - Finally, the garbage collector can be instructed to prune the cache till - * the occupied space goes below a threshold. - * @{ - */ - - struct CachingOptions { - std::string Path; // Path to the cache, empty to disable. - int PruningInterval = 1200; // seconds, -1 to disable pruning. - unsigned int Expiration = 7 * 24 * 3600; // seconds (1w default). - unsigned MaxPercentageOfAvailableSpace = 75; // percentage. - }; - - /// Provide a path to a directory where to store the cached files for - /// incremental build. - void setCacheDir(std::string Path) { CacheOptions.Path = std::move(Path); } - - /// Cache policy: interval (seconds) between two prune of the cache. Set to a - /// negative value (default) to disable pruning. A value of 0 will be ignored. - void setCachePruningInterval(int Interval) { - if (Interval) - CacheOptions.PruningInterval = Interval; - } - - /// Cache policy: expiration (in seconds) for an entry. - /// A value of 0 will be ignored. - void setCacheEntryExpiration(unsigned Expiration) { - if (Expiration) - CacheOptions.Expiration = Expiration; - } - - /** - * Sets the maximum cache size that can be persistent across build, in terms - * of percentage of the available space on the the disk. Set to 100 to - * indicate no limit, 50 to indicate that the cache size will not be left over - * half the available space. A value over 100 will be reduced to 100, and a - * value of 0 will be ignored. - * - * - * The formula looks like: - * AvailableSpace = FreeSpace + ExistingCacheSize - * NewCacheSize = AvailableSpace * P/100 - * - */ - void setMaxCacheSizeRelativeToAvailableSpace(unsigned Percentage) { - if (Percentage) - CacheOptions.MaxPercentageOfAvailableSpace = Percentage; - } - - /**@}*/ - - /// Set the path to a directory where to save temporaries at various stages of - /// the processing. - void setSaveTempsDir(std::string Path) { SaveTempsDir = std::move(Path); } - - /// CPU to use to initialize the TargetMachine - void setCpu(std::string Cpu) { TMBuilder.MCpu = std::move(Cpu); } - - /// Subtarget attributes - void setAttr(std::string MAttr) { TMBuilder.MAttr = std::move(MAttr); } - - /// TargetMachine options - void setTargetOptions(TargetOptions Options) { - TMBuilder.Options = std::move(Options); - } - - /// CodeModel - void setCodePICModel(Optional Model) { - TMBuilder.RelocModel = Model; - } - - /// CodeGen optimization level - void setCodeGenOptLevel(CodeGenOpt::Level CGOptLevel) { - TMBuilder.CGOptLevel = CGOptLevel; - } - - /// Disable CodeGen, only run the stages till codegen and stop. The output - /// will be bitcode. - void disableCodeGen(bool Disable) { DisableCodeGen = Disable; } - - /// Perform CodeGen only: disable all other stages. - void setCodeGenOnly(bool CGOnly) { CodeGenOnly = CGOnly; } - - /**@}*/ - - /** - * \defgroup Set of APIs to run individual stages in isolation. - * @{ - */ - - /** - * Produce the combined summary index from all the bitcode files: - * "thin-link". - */ - std::unique_ptr linkCombinedIndex(); - - /** - * Perform promotion and renaming of exported internal functions, - * and additionally resolve weak and linkonce symbols. - * Index is updated to reflect linkage changes from weak resolution. - */ - void promote(Module &Module, ModuleSummaryIndex &Index); - - /** - * Compute and emit the imported files for module at \p ModulePath. - */ - static void emitImports(StringRef ModulePath, StringRef OutputName, - ModuleSummaryIndex &Index); - - /** - * Perform cross-module importing for the module identified by - * ModuleIdentifier. - */ - void crossModuleImport(Module &Module, ModuleSummaryIndex &Index); - - /** - * Compute the list of summaries needed for importing into module. - */ - static void gatherImportedSummariesForModule( - StringRef ModulePath, ModuleSummaryIndex &Index, - std::map &ModuleToSummariesForIndex); - - /** - * Perform internalization. Index is updated to reflect linkage changes. - */ - void internalize(Module &Module, ModuleSummaryIndex &Index); - - /** - * Perform post-importing ThinLTO optimizations. - */ - void optimize(Module &Module); - - /** - * Perform ThinLTO CodeGen. - */ - std::unique_ptr codegen(Module &Module); - - /**@}*/ - -private: - /// Helper factory to build a TargetMachine - TargetMachineBuilder TMBuilder; - - /// Vector holding the in-memory buffer containing the produced binaries. - std::vector> ProducedBinaries; - - /// Vector holding the input buffers containing the bitcode modules to - /// process. - std::vector Modules; - - /// Set of symbols that need to be preserved outside of the set of bitcode - /// files. - StringSet<> PreservedSymbols; - - /// Set of symbols that are cross-referenced between bitcode files. - StringSet<> CrossReferencedSymbols; - - /// Control the caching behavior. - CachingOptions CacheOptions; - - /// Path to a directory to save the temporary bitcode files. - std::string SaveTempsDir; - - /// Flag to enable/disable CodeGen. When set to true, the process stops after - /// optimizations and a bitcode is produced. - bool DisableCodeGen = false; - - /// Flag to indicate that only the CodeGen will be performed, no cross-module - /// importing or optimization. - bool CodeGenOnly = false; -}; -} -#endif diff --git a/llvm/include/llvm/LTO/legacy/UpdateCompilerUsed.h b/llvm/include/llvm/LTO/legacy/UpdateCompilerUsed.h deleted file mode 100644 index 4be0027e..00000000 --- a/llvm/include/llvm/LTO/legacy/UpdateCompilerUsed.h +++ /dev/null @@ -1,32 +0,0 @@ -//==------ UpdateCompilerUsed.h - LLVM Link Time Optimizer Utility --------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares a helper class to update llvm.compiler_used metadata. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LTO_UPDATE_COMPILER_USED_H -#define LLVM_LTO_UPDATE_COMPILER_USED_H - -#include "llvm/ADT/StringSet.h" -#include "llvm/IR/GlobalValue.h" - -namespace llvm { -class Module; -class TargetMachine; - -/// Find all globals in \p TheModule that are referenced in -/// \p AsmUndefinedRefs, as well as the user-supplied functions definitions that -/// are also libcalls, and create or update the magic "llvm.compiler_used" -/// global in \p TheModule. -void updateCompilerUsed(Module &TheModule, const TargetMachine &TM, - const StringSet<> &AsmUndefinedRefs); -} - -#endif // LLVM_LTO_UPDATE_COMPILER_USED_H diff --git a/llvm/include/llvm/LibDriver/LibDriver.h b/llvm/include/llvm/LibDriver/LibDriver.h deleted file mode 100644 index 95feb60b..00000000 --- a/llvm/include/llvm/LibDriver/LibDriver.h +++ /dev/null @@ -1,24 +0,0 @@ -//===- llvm/LibDriver/LibDriver.h - lib.exe-compatible driver ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Defines an interface to a lib.exe-compatible driver that also understands -// bitcode files. Used by llvm-lib and lld-link /lib. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LIBDRIVER_LIBDRIVER_H -#define LLVM_LIBDRIVER_LIBDRIVER_H - -namespace llvm { -template class ArrayRef; - -int libDriverMain(ArrayRef ARgs); -} - -#endif diff --git a/llvm/include/llvm/LineEditor/LineEditor.h b/llvm/include/llvm/LineEditor/LineEditor.h deleted file mode 100644 index 68995d06..00000000 --- a/llvm/include/llvm/LineEditor/LineEditor.h +++ /dev/null @@ -1,154 +0,0 @@ -//===-- llvm/LineEditor/LineEditor.h - line editor --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LINEEDITOR_LINEEDITOR_H -#define LLVM_LINEEDITOR_LINEEDITOR_H - -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringRef.h" -#include -#include -#include -#include -#include - -namespace llvm { - -class LineEditor { -public: - /// Create a LineEditor object. - /// - /// \param ProgName The name of the current program. Used to form a default - /// prompt. - /// \param HistoryPath Path to the file in which to store history data, if - /// possible. - /// \param In The input stream used by the editor. - /// \param Out The output stream used by the editor. - /// \param Err The error stream used by the editor. - LineEditor(StringRef ProgName, StringRef HistoryPath = "", FILE *In = stdin, - FILE *Out = stdout, FILE *Err = stderr); - ~LineEditor(); - - /// Reads a line. - /// - /// \return The line, or llvm::Optional() on EOF. - llvm::Optional readLine() const; - - void saveHistory(); - void loadHistory(); - - static std::string getDefaultHistoryPath(StringRef ProgName); - - /// The action to perform upon a completion request. - struct CompletionAction { - enum ActionKind { - /// Insert Text at the cursor position. - AK_Insert, - /// Show Completions, or beep if the list is empty. - AK_ShowCompletions - }; - - ActionKind Kind; - - /// The text to insert. - std::string Text; - - /// The list of completions to show. - std::vector Completions; - }; - - /// A possible completion at a given cursor position. - struct Completion { - Completion() {} - Completion(const std::string &TypedText, const std::string &DisplayText) - : TypedText(TypedText), DisplayText(DisplayText) {} - - /// The text to insert. If the user has already input some of the - /// completion, this should only include the rest of the text. - std::string TypedText; - - /// A description of this completion. This may be the completion itself, or - /// maybe a summary of its type or arguments. - std::string DisplayText; - }; - - /// Set the completer for this LineEditor. A completer is a function object - /// which takes arguments of type StringRef (the string to complete) and - /// size_t (the zero-based cursor position in the StringRef) and returns a - /// CompletionAction. - template void setCompleter(T Comp) { - Completer.reset(new CompleterModel(Comp)); - } - - /// Set the completer for this LineEditor to the given list completer. - /// A list completer is a function object which takes arguments of type - /// StringRef (the string to complete) and size_t (the zero-based cursor - /// position in the StringRef) and returns a std::vector. - template void setListCompleter(T Comp) { - Completer.reset(new ListCompleterModel(Comp)); - } - - /// Use the current completer to produce a CompletionAction for the given - /// completion request. If the current completer is a list completer, this - /// will return an AK_Insert CompletionAction if each completion has a common - /// prefix, or an AK_ShowCompletions CompletionAction otherwise. - /// - /// \param Buffer The string to complete - /// \param Pos The zero-based cursor position in the StringRef - CompletionAction getCompletionAction(StringRef Buffer, size_t Pos) const; - - const std::string &getPrompt() const { return Prompt; } - void setPrompt(const std::string &P) { Prompt = P; } - - // Public so callbacks in LineEditor.cpp can use it. - struct InternalData; - -private: - std::string Prompt; - std::string HistoryPath; - std::unique_ptr Data; - - struct CompleterConcept { - virtual ~CompleterConcept(); - virtual CompletionAction complete(StringRef Buffer, size_t Pos) const = 0; - }; - - struct ListCompleterConcept : CompleterConcept { - ~ListCompleterConcept() override; - CompletionAction complete(StringRef Buffer, size_t Pos) const override; - static std::string getCommonPrefix(const std::vector &Comps); - virtual std::vector getCompletions(StringRef Buffer, - size_t Pos) const = 0; - }; - - template - struct CompleterModel : CompleterConcept { - CompleterModel(T Value) : Value(Value) {} - CompletionAction complete(StringRef Buffer, size_t Pos) const override { - return Value(Buffer, Pos); - } - T Value; - }; - - template - struct ListCompleterModel : ListCompleterConcept { - ListCompleterModel(T Value) : Value(std::move(Value)) {} - std::vector getCompletions(StringRef Buffer, - size_t Pos) const override { - return Value(Buffer, Pos); - } - T Value; - }; - - std::unique_ptr Completer; -}; - -} - -#endif diff --git a/llvm/include/llvm/LinkAllIR.h b/llvm/include/llvm/LinkAllIR.h deleted file mode 100644 index 77e19ce9..00000000 --- a/llvm/include/llvm/LinkAllIR.h +++ /dev/null @@ -1,54 +0,0 @@ -//===----- LinkAllIR.h - Reference All VMCore Code --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header file pulls in all the object modules of the VMCore library so -// that tools like llc, opt, and lli can ensure they are linked with all symbols -// from libVMCore.a It should only be used from a tool's main program. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LINKALLIR_H -#define LLVM_LINKALLIR_H - -#include "llvm/IR/InlineAsm.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/IntrinsicInst.h" -#include "llvm/IR/LLVMContext.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/Verifier.h" -#include "llvm/Support/Dwarf.h" -#include "llvm/Support/DynamicLibrary.h" -#include "llvm/Support/MathExtras.h" -#include "llvm/Support/Memory.h" -#include "llvm/Support/Mutex.h" -#include "llvm/Support/Path.h" -#include "llvm/Support/Process.h" -#include "llvm/Support/Program.h" -#include "llvm/Support/Signals.h" -#include "llvm/Support/TimeValue.h" -#include - -namespace { - struct ForceVMCoreLinking { - ForceVMCoreLinking() { - // We must reference VMCore in such a way that compilers will not - // delete it all as dead code, even with whole program optimization, - // yet is effectively a NO-OP. As the compiler isn't smart enough - // to know that getenv() never returns -1, this will do the job. - if (std::getenv("bar") != (char*) -1) - return; - llvm::LLVMContext Context; - (void)new llvm::Module("", Context); - (void)new llvm::UnreachableInst(Context); - (void) llvm::createVerifierPass(); - } - } ForceVMCoreLinking; -} - -#endif diff --git a/llvm/include/llvm/LinkAllPasses.h b/llvm/include/llvm/LinkAllPasses.h deleted file mode 100644 index b2721d0a..00000000 --- a/llvm/include/llvm/LinkAllPasses.h +++ /dev/null @@ -1,217 +0,0 @@ -//===- llvm/LinkAllPasses.h ------------ Reference All Passes ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This header file pulls in all transformation and analysis passes for tools -// like opt and bugpoint that need this functionality. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LINKALLPASSES_H -#define LLVM_LINKALLPASSES_H - -#include "llvm/ADT/Statistic.h" -#include "llvm/Analysis/AliasSetTracker.h" -#include "llvm/Analysis/AliasAnalysisEvaluator.h" -#include "llvm/Analysis/BasicAliasAnalysis.h" -#include "llvm/Analysis/CFLAndersAliasAnalysis.h" -#include "llvm/Analysis/CFLSteensAliasAnalysis.h" -#include "llvm/Analysis/CallPrinter.h" -#include "llvm/Analysis/DomPrinter.h" -#include "llvm/Analysis/GlobalsModRef.h" -#include "llvm/Analysis/IntervalPartition.h" -#include "llvm/Analysis/Lint.h" -#include "llvm/Analysis/Passes.h" -#include "llvm/Analysis/PostDominators.h" -#include "llvm/Analysis/RegionPass.h" -#include "llvm/Analysis/RegionPrinter.h" -#include "llvm/Analysis/ScalarEvolution.h" -#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" -#include "llvm/Analysis/ScopedNoAliasAA.h" -#include "llvm/Analysis/TargetLibraryInfo.h" -#include "llvm/Analysis/TypeBasedAliasAnalysis.h" -#include "llvm/CodeGen/Passes.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/IRPrintingPasses.h" -#include "llvm/Transforms/IPO.h" -#include "llvm/Transforms/IPO/FunctionAttrs.h" -#include "llvm/Transforms/Instrumentation.h" -#include "llvm/Transforms/ObjCARC.h" -#include "llvm/Transforms/Scalar.h" -#include "llvm/Transforms/Scalar/GVN.h" -#include "llvm/Transforms/Utils/SymbolRewriter.h" -#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" -#include "llvm/Transforms/Vectorize.h" -#include "llvm/Support/Valgrind.h" -#include - -namespace { - struct ForcePassLinking { - ForcePassLinking() { - // We must reference the passes in such a way that compilers will not - // delete it all as dead code, even with whole program optimization, - // yet is effectively a NO-OP. As the compiler isn't smart enough - // to know that getenv() never returns -1, this will do the job. - if (std::getenv("bar") != (char*) -1) - return; - - (void) llvm::createAAEvalPass(); - (void) llvm::createAggressiveDCEPass(); - (void) llvm::createBitTrackingDCEPass(); - (void) llvm::createArgumentPromotionPass(); - (void) llvm::createAlignmentFromAssumptionsPass(); - (void) llvm::createBasicAAWrapperPass(); - (void) llvm::createSCEVAAWrapperPass(); - (void) llvm::createTypeBasedAAWrapperPass(); - (void) llvm::createScopedNoAliasAAWrapperPass(); - (void) llvm::createBoundsCheckingPass(); - (void) llvm::createBreakCriticalEdgesPass(); - (void) llvm::createCallGraphDOTPrinterPass(); - (void) llvm::createCallGraphViewerPass(); - (void) llvm::createCFGSimplificationPass(); - (void) llvm::createCFLAndersAAWrapperPass(); - (void) llvm::createCFLSteensAAWrapperPass(); - (void) llvm::createStructurizeCFGPass(); - (void) llvm::createConstantMergePass(); - (void) llvm::createConstantPropagationPass(); - (void) llvm::createCostModelAnalysisPass(); - (void) llvm::createDeadArgEliminationPass(); - (void) llvm::createDeadCodeEliminationPass(); - (void) llvm::createDeadInstEliminationPass(); - (void) llvm::createDeadStoreEliminationPass(); - (void) llvm::createDependenceAnalysisWrapperPass(); - (void) llvm::createDivergenceAnalysisPass(); - (void) llvm::createDomOnlyPrinterPass(); - (void) llvm::createDomPrinterPass(); - (void) llvm::createDomOnlyViewerPass(); - (void) llvm::createDomViewerPass(); - (void) llvm::createGCOVProfilerPass(); - (void) llvm::createPGOInstrumentationGenLegacyPass(); - (void) llvm::createPGOInstrumentationUseLegacyPass(); - (void) llvm::createPGOIndirectCallPromotionLegacyPass(); - (void) llvm::createInstrProfilingLegacyPass(); - (void) llvm::createFunctionImportPass(); - (void) llvm::createFunctionInliningPass(); - (void) llvm::createAlwaysInlinerPass(); - (void) llvm::createGlobalDCEPass(); - (void) llvm::createGlobalOptimizerPass(); - (void) llvm::createGlobalsAAWrapperPass(); - (void) llvm::createGuardWideningPass(); - (void) llvm::createIPConstantPropagationPass(); - (void) llvm::createIPSCCPPass(); - (void) llvm::createInductiveRangeCheckEliminationPass(); - (void) llvm::createIndVarSimplifyPass(); - (void) llvm::createInstructionCombiningPass(); - (void) llvm::createInternalizePass(); - (void) llvm::createLCSSAPass(); - (void) llvm::createLICMPass(); - (void) llvm::createLazyValueInfoPass(); - (void) llvm::createLoopExtractorPass(); - (void) llvm::createLoopInterchangePass(); - (void) llvm::createLoopSimplifyPass(); - (void) llvm::createLoopSimplifyCFGPass(); - (void) llvm::createLoopStrengthReducePass(); - (void) llvm::createLoopRerollPass(); - (void) llvm::createLoopUnrollPass(); - (void) llvm::createLoopUnswitchPass(); - (void) llvm::createLoopVersioningLICMPass(); - (void) llvm::createLoopIdiomPass(); - (void) llvm::createLoopRotatePass(); - (void) llvm::createLowerExpectIntrinsicPass(); - (void) llvm::createLowerInvokePass(); - (void) llvm::createLowerSwitchPass(); - (void) llvm::createNaryReassociatePass(); - (void) llvm::createObjCARCAAWrapperPass(); - (void) llvm::createObjCARCAPElimPass(); - (void) llvm::createObjCARCExpandPass(); - (void) llvm::createObjCARCContractPass(); - (void) llvm::createObjCARCOptPass(); - (void) llvm::createPAEvalPass(); - (void) llvm::createPromoteMemoryToRegisterPass(); - (void) llvm::createDemoteRegisterToMemoryPass(); - (void) llvm::createPruneEHPass(); - (void) llvm::createPostDomOnlyPrinterPass(); - (void) llvm::createPostDomPrinterPass(); - (void) llvm::createPostDomOnlyViewerPass(); - (void) llvm::createPostDomViewerPass(); - (void) llvm::createReassociatePass(); - (void) llvm::createRegionInfoPass(); - (void) llvm::createRegionOnlyPrinterPass(); - (void) llvm::createRegionOnlyViewerPass(); - (void) llvm::createRegionPrinterPass(); - (void) llvm::createRegionViewerPass(); - (void) llvm::createSCCPPass(); - (void) llvm::createSafeStackPass(); - (void) llvm::createSROAPass(); - (void) llvm::createSingleLoopExtractorPass(); - (void) llvm::createStripSymbolsPass(); - (void) llvm::createStripNonDebugSymbolsPass(); - (void) llvm::createStripDeadDebugInfoPass(); - (void) llvm::createStripDeadPrototypesPass(); - (void) llvm::createTailCallEliminationPass(); - (void) llvm::createJumpThreadingPass(); - (void) llvm::createUnifyFunctionExitNodesPass(); - (void) llvm::createInstCountPass(); - (void) llvm::createConstantHoistingPass(); - (void) llvm::createCodeGenPreparePass(); - (void) llvm::createEarlyCSEPass(); - (void) llvm::createGVNHoistPass(); - (void) llvm::createMergedLoadStoreMotionPass(); - (void) llvm::createGVNPass(); - (void) llvm::createMemCpyOptPass(); - (void) llvm::createLoopDeletionPass(); - (void) llvm::createPostDomTree(); - (void) llvm::createInstructionNamerPass(); - (void) llvm::createMetaRenamerPass(); - (void) llvm::createPostOrderFunctionAttrsLegacyPass(); - (void) llvm::createReversePostOrderFunctionAttrsPass(); - (void) llvm::createMergeFunctionsPass(); - std::string buf; - llvm::raw_string_ostream os(buf); - (void) llvm::createPrintModulePass(os); - (void) llvm::createPrintFunctionPass(os); - (void) llvm::createPrintBasicBlockPass(os); - (void) llvm::createModuleDebugInfoPrinterPass(); - (void) llvm::createPartialInliningPass(); - (void) llvm::createLintPass(); - (void) llvm::createSinkingPass(); - (void) llvm::createLowerAtomicPass(); - (void) llvm::createCorrelatedValuePropagationPass(); - (void) llvm::createMemDepPrinter(); - (void) llvm::createInstructionSimplifierPass(); - (void) llvm::createLoopVectorizePass(); - (void) llvm::createSLPVectorizerPass(); - (void) llvm::createLoadStoreVectorizerPass(); - (void) llvm::createBBVectorizePass(); - (void) llvm::createPartiallyInlineLibCallsPass(); - (void) llvm::createScalarizerPass(); - (void) llvm::createSeparateConstOffsetFromGEPPass(); - (void) llvm::createSpeculativeExecutionPass(); - (void) llvm::createSpeculativeExecutionIfHasBranchDivergencePass(); - (void) llvm::createRewriteSymbolsPass(); - (void) llvm::createStraightLineStrengthReducePass(); - (void) llvm::createMemDerefPrinter(); - (void) llvm::createFloat2IntPass(); - (void) llvm::createEliminateAvailableExternallyPass(); - - (void)new llvm::IntervalPartition(); - (void)new llvm::ScalarEvolutionWrapperPass(); - llvm::Function::Create(nullptr, llvm::GlobalValue::ExternalLinkage)->viewCFGOnly(); - llvm::RGPassManager RGM; - llvm::TargetLibraryInfoImpl TLII; - llvm::TargetLibraryInfo TLI(TLII); - llvm::AliasAnalysis AA(TLI); - llvm::AliasSetTracker X(AA); - X.add(nullptr, 0, llvm::AAMDNodes()); // for -print-alias-sets - (void) llvm::AreStatisticsEnabled(); - (void) llvm::sys::RunningOnValgrind(); - } - } ForcePassLinking; // Force link by creating a global definition. -} - -#endif diff --git a/llvm/include/llvm/Linker/IRMover.h b/llvm/include/llvm/Linker/IRMover.h deleted file mode 100644 index 578940ed..00000000 --- a/llvm/include/llvm/Linker/IRMover.h +++ /dev/null @@ -1,86 +0,0 @@ -//===- IRMover.h ------------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LINKER_IRMOVER_H -#define LLVM_LINKER_IRMOVER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/DenseSet.h" -#include - -namespace llvm { -class Error; -class GlobalValue; -class Metadata; -class Module; -class StructType; -class TrackingMDRef; -class Type; - -class IRMover { - struct StructTypeKeyInfo { - struct KeyTy { - ArrayRef ETypes; - bool IsPacked; - KeyTy(ArrayRef E, bool P); - KeyTy(const StructType *ST); - bool operator==(const KeyTy &that) const; - bool operator!=(const KeyTy &that) const; - }; - static StructType *getEmptyKey(); - static StructType *getTombstoneKey(); - static unsigned getHashValue(const KeyTy &Key); - static unsigned getHashValue(const StructType *ST); - static bool isEqual(const KeyTy &LHS, const StructType *RHS); - static bool isEqual(const StructType *LHS, const StructType *RHS); - }; - - /// Type of the Metadata map in \a ValueToValueMapTy. - typedef DenseMap MDMapT; - -public: - class IdentifiedStructTypeSet { - // The set of opaque types is the composite module. - DenseSet OpaqueStructTypes; - - // The set of identified but non opaque structures in the composite module. - DenseSet NonOpaqueStructTypes; - - public: - void addNonOpaque(StructType *Ty); - void switchToNonOpaque(StructType *Ty); - void addOpaque(StructType *Ty); - StructType *findNonOpaque(ArrayRef ETypes, bool IsPacked); - bool hasType(StructType *Ty); - }; - - IRMover(Module &M); - - typedef std::function ValueAdder; - - /// Move in the provide values in \p ValuesToLink from \p Src. - /// - /// - \p AddLazyFor is a call back that the IRMover will call when a global - /// value is referenced by one of the ValuesToLink (transitively) but was - /// not present in ValuesToLink. The GlobalValue and a ValueAdder callback - /// are passed as an argument, and the callback is expected to be called - /// if the GlobalValue needs to be added to the \p ValuesToLink and linked. - Error move(std::unique_ptr Src, ArrayRef ValuesToLink, - std::function AddLazyFor); - Module &getModule() { return Composite; } - -private: - Module &Composite; - IdentifiedStructTypeSet IdentifiedStructTypes; - MDMapT SharedMDs; ///< A Metadata map to use for all calls to \a move(). -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/Linker/Linker.h b/llvm/include/llvm/Linker/Linker.h deleted file mode 100644 index b077c373..00000000 --- a/llvm/include/llvm/Linker/Linker.h +++ /dev/null @@ -1,58 +0,0 @@ -//===- Linker.h - Module Linker Interface -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_LINKER_LINKER_H -#define LLVM_LINKER_LINKER_H - -#include "llvm/Linker/IRMover.h" - -namespace llvm { -class Module; -class StructType; -class Type; - -/// This class provides the core functionality of linking in LLVM. It keeps a -/// pointer to the merged module so far. It doesn't take ownership of the -/// module since it is assumed that the user of this class will want to do -/// something with it after the linking. -class Linker { - IRMover Mover; - -public: - enum Flags { - None = 0, - OverrideFromSrc = (1 << 0), - LinkOnlyNeeded = (1 << 1), - InternalizeLinkedSymbols = (1 << 2), - /// Don't force link referenced linkonce definitions, import declaration. - DontForceLinkLinkonceODR = (1 << 3) - - }; - - Linker(Module &M); - - /// \brief Link \p Src into the composite. - /// - /// Passing OverrideSymbols as true will have symbols from Src - /// shadow those in the Dest. - /// For ThinLTO function importing/exporting the \p ModuleSummaryIndex - /// is passed. If \p GlobalsToImport is provided, only the globals that - /// are part of the set will be imported from the source module. - /// - /// Returns true on error. - bool linkInModule(std::unique_ptr Src, unsigned Flags = Flags::None, - DenseSet *GlobalsToImport = nullptr); - - static bool linkModules(Module &Dest, std::unique_ptr Src, - unsigned Flags = Flags::None); -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/ConstantPools.h b/llvm/include/llvm/MC/ConstantPools.h deleted file mode 100644 index 552e1443..00000000 --- a/llvm/include/llvm/MC/ConstantPools.h +++ /dev/null @@ -1,93 +0,0 @@ -//===- ConstantPool.h - Keep track of assembler-generated ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the ConstantPool and AssemblerConstantPools classes. -// -//===----------------------------------------------------------------------===// - - -#ifndef LLVM_MC_CONSTANTPOOLS_H -#define LLVM_MC_CONSTANTPOOLS_H - -#include "llvm/ADT/MapVector.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/SMLoc.h" - -namespace llvm { -class MCContext; -class MCExpr; -class MCSection; -class MCStreamer; -class MCSymbol; - -struct ConstantPoolEntry { - ConstantPoolEntry(MCSymbol *L, const MCExpr *Val, unsigned Sz, SMLoc Loc_) - : Label(L), Value(Val), Size(Sz), Loc(Loc_) {} - MCSymbol *Label; - const MCExpr *Value; - unsigned Size; - SMLoc Loc; -}; - -// A class to keep track of assembler-generated constant pools that are use to -// implement the ldr-pseudo. -class ConstantPool { - typedef SmallVector EntryVecTy; - EntryVecTy Entries; - -public: - // Initialize a new empty constant pool - ConstantPool() {} - - // Add a new entry to the constant pool in the next slot. - // \param Value is the new entry to put in the constant pool. - // \param Size is the size in bytes of the entry - // - // \returns a MCExpr that references the newly inserted value - const MCExpr *addEntry(const MCExpr *Value, MCContext &Context, - unsigned Size, SMLoc Loc); - - // Emit the contents of the constant pool using the provided streamer. - void emitEntries(MCStreamer &Streamer); - - // Return true if the constant pool is empty - bool empty(); -}; - -class AssemblerConstantPools { - // Map type used to keep track of per-Section constant pools used by the - // ldr-pseudo opcode. The map associates a section to its constant pool. The - // constant pool is a vector of (label, value) pairs. When the ldr - // pseudo is parsed we insert a new (label, value) pair into the constant pool - // for the current section and add MCSymbolRefExpr to the new label as - // an opcode to the ldr. After we have parsed all the user input we - // output the (label, value) pairs in each constant pool at the end of the - // section. - // - // We use the MapVector for the map type to ensure stable iteration of - // the sections at the end of the parse. We need to iterate over the - // sections in a stable order to ensure that we have print the - // constant pools in a deterministic order when printing an assembly - // file. - typedef MapVector ConstantPoolMapTy; - ConstantPoolMapTy ConstantPools; - -public: - void emitAll(MCStreamer &Streamer); - void emitForCurrentSection(MCStreamer &Streamer); - const MCExpr *addEntry(MCStreamer &Streamer, const MCExpr *Expr, - unsigned Size, SMLoc Loc); - -private: - ConstantPool *getConstantPool(MCSection *Section); - ConstantPool &getOrCreateConstantPool(MCSection *Section); -}; -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCAsmBackend.h b/llvm/include/llvm/MC/MCAsmBackend.h deleted file mode 100644 index ce17a2a0..00000000 --- a/llvm/include/llvm/MC/MCAsmBackend.h +++ /dev/null @@ -1,140 +0,0 @@ -//===-- llvm/MC/MCAsmBackend.h - MC Asm Backend -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCASMBACKEND_H -#define LLVM_MC_MCASMBACKEND_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/Optional.h" -#include "llvm/MC/MCDirectives.h" -#include "llvm/MC/MCDwarf.h" -#include "llvm/MC/MCFixup.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" - -namespace llvm { -class MCAsmLayout; -class MCAssembler; -class MCELFObjectTargetWriter; -struct MCFixupKindInfo; -class MCFragment; -class MCInst; -class MCRelaxableFragment; -class MCObjectWriter; -class MCSection; -class MCValue; -class raw_pwrite_stream; - -/// Generic interface to target specific assembler backends. -class MCAsmBackend { - MCAsmBackend(const MCAsmBackend &) = delete; - void operator=(const MCAsmBackend &) = delete; - -protected: // Can only create subclasses. - MCAsmBackend(); - -public: - virtual ~MCAsmBackend(); - - /// lifetime management - virtual void reset() {} - - /// Create a new MCObjectWriter instance for use by the assembler backend to - /// emit the final object file. - virtual MCObjectWriter *createObjectWriter(raw_pwrite_stream &OS) const = 0; - - /// \name Target Fixup Interfaces - /// @{ - - /// Get the number of target specific fixup kinds. - virtual unsigned getNumFixupKinds() const = 0; - - /// Map a relocation name used in .reloc to a fixup kind. - virtual Optional getFixupKind(StringRef Name) const; - - /// Get information on a fixup kind. - virtual const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const; - - /// Target hook to adjust the literal value of a fixup if necessary. - /// IsResolved signals whether the caller believes a relocation is needed; the - /// target can modify the value. The default does nothing. - virtual void processFixupValue(const MCAssembler &Asm, - const MCAsmLayout &Layout, - const MCFixup &Fixup, const MCFragment *DF, - const MCValue &Target, uint64_t &Value, - bool &IsResolved) {} - - /// Apply the \p Value for given \p Fixup into the provided data fragment, at - /// the offset specified by the fixup and following the fixup kind as - /// appropriate. - virtual void applyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize, - uint64_t Value, bool IsPCRel) const = 0; - - /// @} - - /// \name Target Relaxation Interfaces - /// @{ - - /// Check whether the given instruction may need relaxation. - /// - /// \param Inst - The instruction to test. - virtual bool mayNeedRelaxation(const MCInst &Inst) const = 0; - - /// Target specific predicate for whether a given fixup requires the - /// associated instruction to be relaxed. - virtual bool fixupNeedsRelaxationAdvanced(const MCFixup &Fixup, bool Resolved, - uint64_t Value, - const MCRelaxableFragment *DF, - const MCAsmLayout &Layout) const; - - /// Simple predicate for targets where !Resolved implies requiring relaxation - virtual bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, - const MCRelaxableFragment *DF, - const MCAsmLayout &Layout) const = 0; - - /// Relax the instruction in the given fragment to the next wider instruction. - /// - /// \param Inst The instruction to relax, which may be the same as the - /// output. - /// \param STI the subtarget information for the associated instruction. - /// \param [out] Res On return, the relaxed instruction. - virtual void relaxInstruction(const MCInst &Inst, const MCSubtargetInfo &STI, - MCInst &Res) const = 0; - - /// @} - - /// Returns the minimum size of a nop in bytes on this target. The assembler - /// will use this to emit excess padding in situations where the padding - /// required for simple alignment would be less than the minimum nop size. - /// - virtual unsigned getMinimumNopSize() const { return 1; } - - /// Write an (optimal) nop sequence of Count bytes to the given output. If the - /// target cannot generate such a sequence, it should return an error. - /// - /// \return - True on success. - virtual bool writeNopData(uint64_t Count, MCObjectWriter *OW) const = 0; - - /// Give backend an opportunity to finish layout after relaxation - virtual void finishLayout(MCAssembler const &Asm, - MCAsmLayout &Layout) const {} - - /// Handle any target-specific assembler flags. By default, do nothing. - virtual void handleAssemblerFlag(MCAssemblerFlag Flag) {} - - /// \brief Generate the compact unwind encoding for the CFI instructions. - virtual uint32_t - generateCompactUnwindEncoding(ArrayRef) const { - return 0; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCAsmInfo.h b/llvm/include/llvm/MC/MCAsmInfo.h deleted file mode 100644 index e6ed5688..00000000 --- a/llvm/include/llvm/MC/MCAsmInfo.h +++ /dev/null @@ -1,604 +0,0 @@ -//===-- llvm/MC/MCAsmInfo.h - Asm info --------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains a class to be used as the basis for target specific -// asm writers. This class primarily takes care of global printing constants, -// which are used in very similar ways across all targets. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCASMINFO_H -#define LLVM_MC_MCASMINFO_H - -#include "llvm/MC/MCDirectives.h" -#include "llvm/MC/MCDwarf.h" -#include -#include - -namespace llvm { -class MCExpr; -class MCSection; -class MCStreamer; -class MCSymbol; -class MCContext; - -namespace WinEH { -enum class EncodingType { - Invalid, /// Invalid - Alpha, /// Windows Alpha - Alpha64, /// Windows AXP64 - ARM, /// Windows NT (Windows on ARM) - CE, /// Windows CE ARM, PowerPC, SH3, SH4 - Itanium, /// Windows x64, Windows Itanium (IA-64) - X86, /// Windows x86, uses no CFI, just EH tables - MIPS = Alpha, -}; -} - -enum class ExceptionHandling { - None, /// No exception support - DwarfCFI, /// DWARF-like instruction based exceptions - SjLj, /// setjmp/longjmp based exceptions - ARM, /// ARM EHABI - WinEH, /// Windows Exception Handling -}; - -namespace LCOMM { -enum LCOMMType { NoAlignment, ByteAlignment, Log2Alignment }; -} - -enum class DebugCompressionType { - DCT_None, // no compression - DCT_Zlib, // zlib style complession - DCT_ZlibGnu // zlib-gnu style compression -}; - -/// This class is intended to be used as a base class for asm -/// properties and features specific to the target. -class MCAsmInfo { -protected: - //===------------------------------------------------------------------===// - // Properties to be set by the target writer, used to configure asm printer. - // - - /// Pointer size in bytes. Default is 4. - unsigned PointerSize; - - /// Size of the stack slot reserved for callee-saved registers, in bytes. - /// Default is same as pointer size. - unsigned CalleeSaveStackSlotSize; - - /// True if target is little endian. Default is true. - bool IsLittleEndian; - - /// True if target stack grow up. Default is false. - bool StackGrowsUp; - - /// True if this target has the MachO .subsections_via_symbols directive. - /// Default is false. - bool HasSubsectionsViaSymbols; - - /// True if this is a MachO target that supports the macho-specific .zerofill - /// directive for emitting BSS Symbols. Default is false. - bool HasMachoZeroFillDirective; - - /// True if this is a MachO target that supports the macho-specific .tbss - /// directive for emitting thread local BSS Symbols. Default is false. - bool HasMachoTBSSDirective; - - /// True if the compiler should emit a ".reference .constructors_used" or - /// ".reference .destructors_used" directive after the static ctor/dtor - /// list. This directive is only emitted in Static relocation model. Default - /// is false. - bool HasStaticCtorDtorReferenceInStaticMode; - - /// This is the maximum possible length of an instruction, which is needed to - /// compute the size of an inline asm. Defaults to 4. - unsigned MaxInstLength; - - /// Every possible instruction length is a multiple of this value. Factored - /// out in .debug_frame and .debug_line. Defaults to 1. - unsigned MinInstAlignment; - - /// The '$' token, when not referencing an identifier or constant, refers to - /// the current PC. Defaults to false. - bool DollarIsPC; - - /// This string, if specified, is used to separate instructions from each - /// other when on the same line. Defaults to ';' - const char *SeparatorString; - - /// This indicates the comment character used by the assembler. Defaults to - /// "#" - const char *CommentString; - - /// This is appended to emitted labels. Defaults to ":" - const char *LabelSuffix; - - // Print the EH begin symbol with an assignment. Defaults to false. - bool UseAssignmentForEHBegin; - - // Do we need to create a local symbol for .size? - bool NeedsLocalForSize; - - /// This prefix is used for globals like constant pool entries that are - /// completely private to the .s file and should not have names in the .o - /// file. Defaults to "L" - const char *PrivateGlobalPrefix; - - /// This prefix is used for labels for basic blocks. Defaults to the same as - /// PrivateGlobalPrefix. - const char *PrivateLabelPrefix; - - /// This prefix is used for symbols that should be passed through the - /// assembler but be removed by the linker. This is 'l' on Darwin, currently - /// used for some ObjC metadata. The default of "" meast that for this system - /// a plain private symbol should be used. Defaults to "". - const char *LinkerPrivateGlobalPrefix; - - /// If these are nonempty, they contain a directive to emit before and after - /// an inline assembly statement. Defaults to "#APP\n", "#NO_APP\n" - const char *InlineAsmStart; - const char *InlineAsmEnd; - - /// These are assembly directives that tells the assembler to interpret the - /// following instructions differently. Defaults to ".code16", ".code32", - /// ".code64". - const char *Code16Directive; - const char *Code32Directive; - const char *Code64Directive; - - /// Which dialect of an assembler variant to use. Defaults to 0 - unsigned AssemblerDialect; - - /// This is true if the assembler allows @ characters in symbol names. - /// Defaults to false. - bool AllowAtInName; - - /// If this is true, symbol names with invalid characters will be printed in - /// quotes. - bool SupportsQuotedNames; - - /// This is true if data region markers should be printed as - /// ".data_region/.end_data_region" directives. If false, use "$d/$a" labels - /// instead. - bool UseDataRegionDirectives; - - //===--- Data Emission Directives -------------------------------------===// - - /// This should be set to the directive used to get some number of zero bytes - /// emitted to the current section. Common cases are "\t.zero\t" and - /// "\t.space\t". If this is set to null, the Data*bitsDirective's will be - /// used to emit zero bytes. Defaults to "\t.zero\t" - const char *ZeroDirective; - - /// This directive allows emission of an ascii string with the standard C - /// escape characters embedded into it. Defaults to "\t.ascii\t" - const char *AsciiDirective; - - /// If not null, this allows for special handling of zero terminated strings - /// on this target. This is commonly supported as ".asciz". If a target - /// doesn't support this, it can be set to null. Defaults to "\t.asciz\t" - const char *AscizDirective; - - /// These directives are used to output some unit of integer data to the - /// current section. If a data directive is set to null, smaller data - /// directives will be used to emit the large sizes. Defaults to "\t.byte\t", - /// "\t.short\t", "\t.long\t", "\t.quad\t" - const char *Data8bitsDirective; - const char *Data16bitsDirective; - const char *Data32bitsDirective; - const char *Data64bitsDirective; - - /// If non-null, a directive that is used to emit a word which should be - /// relocated as a 64-bit GP-relative offset, e.g. .gpdword on Mips. Defaults - /// to NULL. - const char *GPRel64Directive; - - /// If non-null, a directive that is used to emit a word which should be - /// relocated as a 32-bit GP-relative offset, e.g. .gpword on Mips or .gprel32 - /// on Alpha. Defaults to NULL. - const char *GPRel32Directive; - - /// This is true if this target uses "Sun Style" syntax for section switching - /// ("#alloc,#write" etc) instead of the normal ELF syntax (,"a,w") in - /// .section directives. Defaults to false. - bool SunStyleELFSectionSwitchSyntax; - - /// This is true if this target uses ELF '.section' directive before the - /// '.bss' one. It's used for PPC/Linux which doesn't support the '.bss' - /// directive only. Defaults to false. - bool UsesELFSectionDirectiveForBSS; - - bool NeedsDwarfSectionOffsetDirective; - - //===--- Alignment Information ----------------------------------------===// - - /// If this is true (the default) then the asmprinter emits ".align N" - /// directives, where N is the number of bytes to align to. Otherwise, it - /// emits ".align log2(N)", e.g. 3 to align to an 8 byte boundary. Defaults - /// to true. - bool AlignmentIsInBytes; - - /// If non-zero, this is used to fill the executable space created as the - /// result of a alignment directive. Defaults to 0 - unsigned TextAlignFillValue; - - //===--- Global Variable Emission Directives --------------------------===// - - /// This is the directive used to declare a global entity. Defaults to - /// ".globl". - const char *GlobalDirective; - - /// True if the expression - /// .long f - g - /// uses a relocation but it can be suppressed by writing - /// a = f - g - /// .long a - bool SetDirectiveSuppressesReloc; - - /// False if the assembler requires that we use - /// \code - /// Lc = a - b - /// .long Lc - /// \endcode - // - /// instead of - // - /// \code - /// .long a - b - /// \endcode - /// - /// Defaults to true. - bool HasAggressiveSymbolFolding; - - /// True is .comm's and .lcomms optional alignment is to be specified in bytes - /// instead of log2(n). Defaults to true. - bool COMMDirectiveAlignmentIsInBytes; - - /// Describes if the .lcomm directive for the target supports an alignment - /// argument and how it is interpreted. Defaults to NoAlignment. - LCOMM::LCOMMType LCOMMDirectiveAlignmentType; - - // True if the target allows .align directives on functions. This is true for - // most targets, so defaults to true. - bool HasFunctionAlignment; - - /// True if the target has .type and .size directives, this is true for most - /// ELF targets. Defaults to true. - bool HasDotTypeDotSizeDirective; - - /// True if the target has a single parameter .file directive, this is true - /// for ELF targets. Defaults to true. - bool HasSingleParameterDotFile; - - /// True if the target has a .ident directive, this is true for ELF targets. - /// Defaults to false. - bool HasIdentDirective; - - /// True if this target supports the MachO .no_dead_strip directive. Defaults - /// to false. - bool HasNoDeadStrip; - - /// True if this target supports the MachO .alt_entry directive. Defaults to - /// false. - bool HasAltEntry; - - /// Used to declare a global as being a weak symbol. Defaults to ".weak". - const char *WeakDirective; - - /// This directive, if non-null, is used to declare a global as being a weak - /// undefined symbol. Defaults to NULL. - const char *WeakRefDirective; - - /// True if we have a directive to declare a global as being a weak defined - /// symbol. Defaults to false. - bool HasWeakDefDirective; - - /// True if we have a directive to declare a global as being a weak defined - /// symbol that can be hidden (unexported). Defaults to false. - bool HasWeakDefCanBeHiddenDirective; - - /// True if we have a .linkonce directive. This is used on cygwin/mingw. - /// Defaults to false. - bool HasLinkOnceDirective; - - /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having - /// hidden visibility. Defaults to MCSA_Hidden. - MCSymbolAttr HiddenVisibilityAttr; - - /// This attribute, if not MCSA_Invalid, is used to declare an undefined - /// symbol as having hidden visibility. Defaults to MCSA_Hidden. - MCSymbolAttr HiddenDeclarationVisibilityAttr; - - /// This attribute, if not MCSA_Invalid, is used to declare a symbol as having - /// protected visibility. Defaults to MCSA_Protected - MCSymbolAttr ProtectedVisibilityAttr; - - //===--- Dwarf Emission Directives -----------------------------------===// - - /// True if target supports emission of debugging information. Defaults to - /// false. - bool SupportsDebugInformation; - - /// Exception handling format for the target. Defaults to None. - ExceptionHandling ExceptionsType; - - /// Windows exception handling data (.pdata) encoding. Defaults to Invalid. - WinEH::EncodingType WinEHEncodingType; - - /// True if Dwarf2 output generally uses relocations for references to other - /// .debug_* sections. - bool DwarfUsesRelocationsAcrossSections; - - /// True if DWARF FDE symbol reference relocations should be replaced by an - /// absolute difference. - bool DwarfFDESymbolsUseAbsDiff; - - /// True if dwarf register numbers are printed instead of symbolic register - /// names in .cfi_* directives. Defaults to false. - bool DwarfRegNumForCFI; - - /// True if target uses parens to indicate the symbol variant instead of @. - /// For example, foo(plt) instead of foo@plt. Defaults to false. - bool UseParensForSymbolVariant; - - //===--- Prologue State ----------------------------------------------===// - - std::vector InitialFrameState; - - //===--- Integrated Assembler Information ----------------------------===// - - /// Should we use the integrated assembler? - /// The integrated assembler should be enabled by default (by the - /// constructors) when failing to parse a valid piece of assembly (inline - /// or otherwise) is considered a bug. It may then be overridden after - /// construction (see LLVMTargetMachine::initAsmInfo()). - bool UseIntegratedAssembler; - - /// Preserve Comments in assembly - bool PreserveAsmComments; - - /// Compress DWARF debug sections. Defaults to no compression. - DebugCompressionType CompressDebugSections; - - /// True if the integrated assembler should interpret 'a >> b' constant - /// expressions as logical rather than arithmetic. - bool UseLogicalShr; - - // If true, emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL, on - // X86_64 ELF. - bool RelaxELFRelocations = true; - -public: - explicit MCAsmInfo(); - virtual ~MCAsmInfo(); - - /// Get the pointer size in bytes. - unsigned getPointerSize() const { return PointerSize; } - - /// Get the callee-saved register stack slot - /// size in bytes. - unsigned getCalleeSaveStackSlotSize() const { - return CalleeSaveStackSlotSize; - } - - /// True if the target is little endian. - bool isLittleEndian() const { return IsLittleEndian; } - - /// True if target stack grow up. - bool isStackGrowthDirectionUp() const { return StackGrowsUp; } - - bool hasSubsectionsViaSymbols() const { return HasSubsectionsViaSymbols; } - - // Data directive accessors. - - const char *getData8bitsDirective() const { return Data8bitsDirective; } - const char *getData16bitsDirective() const { return Data16bitsDirective; } - const char *getData32bitsDirective() const { return Data32bitsDirective; } - const char *getData64bitsDirective() const { return Data64bitsDirective; } - const char *getGPRel64Directive() const { return GPRel64Directive; } - const char *getGPRel32Directive() const { return GPRel32Directive; } - - /// Targets can implement this method to specify a section to switch to if the - /// translation unit doesn't have any trampolines that require an executable - /// stack. - virtual MCSection *getNonexecutableStackSection(MCContext &Ctx) const { - return nullptr; - } - - /// \brief True if the section is atomized using the symbols in it. - /// This is false if the section is not atomized at all (most ELF sections) or - /// if it is atomized based on its contents (MachO' __TEXT,__cstring for - /// example). - virtual bool isSectionAtomizableBySymbols(const MCSection &Section) const; - - virtual const MCExpr *getExprForPersonalitySymbol(const MCSymbol *Sym, - unsigned Encoding, - MCStreamer &Streamer) const; - - virtual const MCExpr *getExprForFDESymbol(const MCSymbol *Sym, - unsigned Encoding, - MCStreamer &Streamer) const; - - /// Return true if the identifier \p Name does not need quotes to be - /// syntactically correct. - virtual bool isValidUnquotedName(StringRef Name) const; - - /// Return true if the .section directive should be omitted when - /// emitting \p SectionName. For example: - /// - /// shouldOmitSectionDirective(".text") - /// - /// returns false => .section .text,#alloc,#execinstr - /// returns true => .text - virtual bool shouldOmitSectionDirective(StringRef SectionName) const; - - bool usesSunStyleELFSectionSwitchSyntax() const { - return SunStyleELFSectionSwitchSyntax; - } - - bool usesELFSectionDirectiveForBSS() const { - return UsesELFSectionDirectiveForBSS; - } - - bool needsDwarfSectionOffsetDirective() const { - return NeedsDwarfSectionOffsetDirective; - } - - // Accessors. - - bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; } - bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; } - bool hasStaticCtorDtorReferenceInStaticMode() const { - return HasStaticCtorDtorReferenceInStaticMode; - } - unsigned getMaxInstLength() const { return MaxInstLength; } - unsigned getMinInstAlignment() const { return MinInstAlignment; } - bool getDollarIsPC() const { return DollarIsPC; } - const char *getSeparatorString() const { return SeparatorString; } - - /// This indicates the column (zero-based) at which asm comments should be - /// printed. - unsigned getCommentColumn() const { return 40; } - - const char *getCommentString() const { return CommentString; } - const char *getLabelSuffix() const { return LabelSuffix; } - - bool useAssignmentForEHBegin() const { return UseAssignmentForEHBegin; } - bool needsLocalForSize() const { return NeedsLocalForSize; } - const char *getPrivateGlobalPrefix() const { return PrivateGlobalPrefix; } - const char *getPrivateLabelPrefix() const { return PrivateLabelPrefix; } - bool hasLinkerPrivateGlobalPrefix() const { - return LinkerPrivateGlobalPrefix[0] != '\0'; - } - const char *getLinkerPrivateGlobalPrefix() const { - if (hasLinkerPrivateGlobalPrefix()) - return LinkerPrivateGlobalPrefix; - return getPrivateGlobalPrefix(); - } - const char *getInlineAsmStart() const { return InlineAsmStart; } - const char *getInlineAsmEnd() const { return InlineAsmEnd; } - const char *getCode16Directive() const { return Code16Directive; } - const char *getCode32Directive() const { return Code32Directive; } - const char *getCode64Directive() const { return Code64Directive; } - unsigned getAssemblerDialect() const { return AssemblerDialect; } - bool doesAllowAtInName() const { return AllowAtInName; } - bool supportsNameQuoting() const { return SupportsQuotedNames; } - bool doesSupportDataRegionDirectives() const { - return UseDataRegionDirectives; - } - const char *getZeroDirective() const { return ZeroDirective; } - const char *getAsciiDirective() const { return AsciiDirective; } - const char *getAscizDirective() const { return AscizDirective; } - bool getAlignmentIsInBytes() const { return AlignmentIsInBytes; } - unsigned getTextAlignFillValue() const { return TextAlignFillValue; } - const char *getGlobalDirective() const { return GlobalDirective; } - bool doesSetDirectiveSuppressReloc() const { - return SetDirectiveSuppressesReloc; - } - bool hasAggressiveSymbolFolding() const { return HasAggressiveSymbolFolding; } - bool getCOMMDirectiveAlignmentIsInBytes() const { - return COMMDirectiveAlignmentIsInBytes; - } - LCOMM::LCOMMType getLCOMMDirectiveAlignmentType() const { - return LCOMMDirectiveAlignmentType; - } - bool hasFunctionAlignment() const { return HasFunctionAlignment; } - bool hasDotTypeDotSizeDirective() const { return HasDotTypeDotSizeDirective; } - bool hasSingleParameterDotFile() const { return HasSingleParameterDotFile; } - bool hasIdentDirective() const { return HasIdentDirective; } - bool hasNoDeadStrip() const { return HasNoDeadStrip; } - bool hasAltEntry() const { return HasAltEntry; } - const char *getWeakDirective() const { return WeakDirective; } - const char *getWeakRefDirective() const { return WeakRefDirective; } - bool hasWeakDefDirective() const { return HasWeakDefDirective; } - bool hasWeakDefCanBeHiddenDirective() const { - return HasWeakDefCanBeHiddenDirective; - } - bool hasLinkOnceDirective() const { return HasLinkOnceDirective; } - - MCSymbolAttr getHiddenVisibilityAttr() const { return HiddenVisibilityAttr; } - MCSymbolAttr getHiddenDeclarationVisibilityAttr() const { - return HiddenDeclarationVisibilityAttr; - } - MCSymbolAttr getProtectedVisibilityAttr() const { - return ProtectedVisibilityAttr; - } - bool doesSupportDebugInformation() const { return SupportsDebugInformation; } - bool doesSupportExceptionHandling() const { - return ExceptionsType != ExceptionHandling::None; - } - ExceptionHandling getExceptionHandlingType() const { return ExceptionsType; } - WinEH::EncodingType getWinEHEncodingType() const { return WinEHEncodingType; } - - void setExceptionsType(ExceptionHandling EH) { - ExceptionsType = EH; - } - - /// Returns true if the exception handling method for the platform uses call - /// frame information to unwind. - bool usesCFIForEH() const { - return (ExceptionsType == ExceptionHandling::DwarfCFI || - ExceptionsType == ExceptionHandling::ARM || usesWindowsCFI()); - } - - bool usesWindowsCFI() const { - return ExceptionsType == ExceptionHandling::WinEH && - (WinEHEncodingType != WinEH::EncodingType::Invalid && - WinEHEncodingType != WinEH::EncodingType::X86); - } - - bool doesDwarfUseRelocationsAcrossSections() const { - return DwarfUsesRelocationsAcrossSections; - } - bool doDwarfFDESymbolsUseAbsDiff() const { return DwarfFDESymbolsUseAbsDiff; } - bool useDwarfRegNumForCFI() const { return DwarfRegNumForCFI; } - bool useParensForSymbolVariant() const { return UseParensForSymbolVariant; } - - void addInitialFrameState(const MCCFIInstruction &Inst) { - InitialFrameState.push_back(Inst); - } - - const std::vector &getInitialFrameState() const { - return InitialFrameState; - } - - /// Return true if assembly (inline or otherwise) should be parsed. - bool useIntegratedAssembler() const { return UseIntegratedAssembler; } - - /// Set whether assembly (inline or otherwise) should be parsed. - virtual void setUseIntegratedAssembler(bool Value) { - UseIntegratedAssembler = Value; - } - - /// Return true if assembly (inline or otherwise) should be parsed. - bool preserveAsmComments() const { return PreserveAsmComments; } - - /// Set whether assembly (inline or otherwise) should be parsed. - virtual void setPreserveAsmComments(bool Value) { - PreserveAsmComments = Value; - } - - DebugCompressionType compressDebugSections() const { - return CompressDebugSections; - } - - void setCompressDebugSections(DebugCompressionType CompressDebugSections) { - this->CompressDebugSections = CompressDebugSections; - } - - bool shouldUseLogicalShr() const { return UseLogicalShr; } - - bool canRelaxRelocations() const { return RelaxELFRelocations; } - void setRelaxELFRelocations(bool V) { RelaxELFRelocations = V; } -}; -} - -#endif diff --git a/llvm/include/llvm/MC/MCAsmInfoCOFF.h b/llvm/include/llvm/MC/MCAsmInfoCOFF.h deleted file mode 100644 index 56444f3c..00000000 --- a/llvm/include/llvm/MC/MCAsmInfoCOFF.h +++ /dev/null @@ -1,36 +0,0 @@ -//===-- MCAsmInfoCOFF.h - COFF asm properties -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCASMINFOCOFF_H -#define LLVM_MC_MCASMINFOCOFF_H - -#include "llvm/MC/MCAsmInfo.h" - -namespace llvm { - class MCAsmInfoCOFF : public MCAsmInfo { - virtual void anchor(); - protected: - explicit MCAsmInfoCOFF(); - }; - - class MCAsmInfoMicrosoft : public MCAsmInfoCOFF { - void anchor() override; - protected: - explicit MCAsmInfoMicrosoft(); - }; - - class MCAsmInfoGNUCOFF : public MCAsmInfoCOFF { - void anchor() override; - protected: - explicit MCAsmInfoGNUCOFF(); - }; -} - - -#endif // LLVM_MC_MCASMINFOCOFF_H diff --git a/llvm/include/llvm/MC/MCAsmInfoDarwin.h b/llvm/include/llvm/MC/MCAsmInfoDarwin.h deleted file mode 100644 index d587c3ce..00000000 --- a/llvm/include/llvm/MC/MCAsmInfoDarwin.h +++ /dev/null @@ -1,29 +0,0 @@ -//===---- MCAsmInfoDarwin.h - Darwin asm properties -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines target asm properties related what form asm statements -// should take in general on Darwin-based targets -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCASMINFODARWIN_H -#define LLVM_MC_MCASMINFODARWIN_H - -#include "llvm/MC/MCAsmInfo.h" - -namespace llvm { - class MCAsmInfoDarwin : public MCAsmInfo { - public: - explicit MCAsmInfoDarwin(); - bool isSectionAtomizableBySymbols(const MCSection &Section) const override; - }; -} - - -#endif // LLVM_MC_MCASMINFODARWIN_H diff --git a/llvm/include/llvm/MC/MCAsmInfoELF.h b/llvm/include/llvm/MC/MCAsmInfoELF.h deleted file mode 100644 index f8bb943a..00000000 --- a/llvm/include/llvm/MC/MCAsmInfoELF.h +++ /dev/null @@ -1,29 +0,0 @@ -//===-- llvm/MC/MCAsmInfoELF.h - ELF Asm info -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCASMINFOELF_H -#define LLVM_MC_MCASMINFOELF_H - -#include "llvm/MC/MCAsmInfo.h" - -namespace llvm { -class MCAsmInfoELF : public MCAsmInfo { - virtual void anchor(); - MCSection *getNonexecutableStackSection(MCContext &Ctx) const final; - -protected: - /// Targets which have non-executable stacks by default can set this to false - /// to disable the special section which requests a non-executable stack. - bool UsesNonexecutableStackSection; - - MCAsmInfoELF(); -}; -} - -#endif diff --git a/llvm/include/llvm/MC/MCAsmLayout.h b/llvm/include/llvm/MC/MCAsmLayout.h deleted file mode 100644 index 1b20d5b8..00000000 --- a/llvm/include/llvm/MC/MCAsmLayout.h +++ /dev/null @@ -1,107 +0,0 @@ -//===- MCAsmLayout.h - Assembly Layout Object -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCASMLAYOUT_H -#define LLVM_MC_MCASMLAYOUT_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" - -namespace llvm { -class MCAssembler; -class MCFragment; -class MCSection; -class MCSymbol; - -/// Encapsulates the layout of an assembly file at a particular point in time. -/// -/// Assembly may require computing multiple layouts for a particular assembly -/// file as part of the relaxation process. This class encapsulates the layout -/// at a single point in time in such a way that it is always possible to -/// efficiently compute the exact address of any symbol in the assembly file, -/// even during the relaxation process. -class MCAsmLayout { - MCAssembler &Assembler; - - /// List of sections in layout order. - llvm::SmallVector SectionOrder; - - /// The last fragment which was laid out, or 0 if nothing has been laid - /// out. Fragments are always laid out in order, so all fragments with a - /// lower ordinal will be valid. - mutable DenseMap LastValidFragment; - - /// \brief Make sure that the layout for the given fragment is valid, lazily - /// computing it if necessary. - void ensureValid(const MCFragment *F) const; - - /// \brief Is the layout for this fragment valid? - bool isFragmentValid(const MCFragment *F) const; - -public: - MCAsmLayout(MCAssembler &Assembler); - - /// Get the assembler object this is a layout for. - MCAssembler &getAssembler() const { return Assembler; } - - /// \brief Invalidate the fragments starting with F because it has been - /// resized. The fragment's size should have already been updated, but - /// its bundle padding will be recomputed. - void invalidateFragmentsFrom(MCFragment *F); - - /// \brief Perform layout for a single fragment, assuming that the previous - /// fragment has already been laid out correctly, and the parent section has - /// been initialized. - void layoutFragment(MCFragment *Fragment); - - /// \name Section Access (in layout order) - /// @{ - - llvm::SmallVectorImpl &getSectionOrder() { return SectionOrder; } - const llvm::SmallVectorImpl &getSectionOrder() const { - return SectionOrder; - } - - /// @} - /// \name Fragment Layout Data - /// @{ - - /// \brief Get the offset of the given fragment inside its containing section. - uint64_t getFragmentOffset(const MCFragment *F) const; - - /// @} - /// \name Utility Functions - /// @{ - - /// \brief Get the address space size of the given section, as it effects - /// layout. This may differ from the size reported by \see getSectionSize() by - /// not including section tail padding. - uint64_t getSectionAddressSize(const MCSection *Sec) const; - - /// \brief Get the data size of the given section, as emitted to the object - /// file. This may include additional padding, or be 0 for virtual sections. - uint64_t getSectionFileSize(const MCSection *Sec) const; - - /// \brief Get the offset of the given symbol, as computed in the current - /// layout. - /// \return True on success. - bool getSymbolOffset(const MCSymbol &S, uint64_t &Val) const; - - /// \brief Variant that reports a fatal error if the offset is not computable. - uint64_t getSymbolOffset(const MCSymbol &S) const; - - /// \brief If this symbol is equivalent to A + Constant, return A. - const MCSymbol *getBaseSymbol(const MCSymbol &Symbol) const; - - /// @} -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCAssembler.h b/llvm/include/llvm/MC/MCAssembler.h deleted file mode 100644 index aa3b4511..00000000 --- a/llvm/include/llvm/MC/MCAssembler.h +++ /dev/null @@ -1,428 +0,0 @@ -//===- MCAssembler.h - Object File Generation -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCASSEMBLER_H -#define LLVM_MC_MCASSEMBLER_H - -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/ADT/iterator.h" -#include "llvm/MC/MCDirectives.h" -#include "llvm/MC/MCDwarf.h" -#include "llvm/MC/MCFixup.h" -#include "llvm/MC/MCFragment.h" -#include "llvm/MC/MCInst.h" -#include "llvm/MC/MCLinkerOptimizationHint.h" -#include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/MC/MCSymbol.h" - -namespace llvm { -class raw_ostream; -class MCAsmLayout; -class MCAssembler; -class MCContext; -class MCCodeEmitter; -class MCExpr; -class MCFragment; -class MCObjectWriter; -class MCSection; -class MCSubtargetInfo; -class MCValue; -class MCAsmBackend; - -// FIXME: This really doesn't belong here. See comments below. -struct IndirectSymbolData { - MCSymbol *Symbol; - MCSection *Section; -}; - -// FIXME: Ditto this. Purely so the Streamer and the ObjectWriter can talk -// to one another. -struct DataRegionData { - // This enum should be kept in sync w/ the mach-o definition in - // llvm/Object/MachOFormat.h. - enum KindTy { Data = 1, JumpTable8, JumpTable16, JumpTable32 } Kind; - MCSymbol *Start; - MCSymbol *End; -}; - -class MCAssembler { - friend class MCAsmLayout; - -public: - typedef std::vector SectionListType; - typedef std::vector SymbolDataListType; - - typedef pointee_iterator const_iterator; - typedef pointee_iterator iterator; - - typedef pointee_iterator - const_symbol_iterator; - typedef pointee_iterator symbol_iterator; - - typedef iterator_range symbol_range; - typedef iterator_range const_symbol_range; - - typedef std::vector::const_iterator - const_indirect_symbol_iterator; - typedef std::vector::iterator indirect_symbol_iterator; - - typedef std::vector::const_iterator - const_data_region_iterator; - typedef std::vector::iterator data_region_iterator; - - /// MachO specific deployment target version info. - // A Major version of 0 indicates that no version information was supplied - // and so the corresponding load command should not be emitted. - typedef struct { - MCVersionMinType Kind; - unsigned Major; - unsigned Minor; - unsigned Update; - } VersionMinInfoType; - -private: - MCAssembler(const MCAssembler &) = delete; - void operator=(const MCAssembler &) = delete; - - MCContext &Context; - - MCAsmBackend &Backend; - - MCCodeEmitter &Emitter; - - MCObjectWriter &Writer; - - SectionListType Sections; - - SymbolDataListType Symbols; - - std::vector IndirectSymbols; - - std::vector DataRegions; - - /// The list of linker options to propagate into the object file. - std::vector> LinkerOptions; - - /// List of declared file names - std::vector FileNames; - - MCDwarfLineTableParams LTParams; - - /// The set of function symbols for which a .thumb_func directive has - /// been seen. - // - // FIXME: We really would like this in target specific code rather than - // here. Maybe when the relocation stuff moves to target specific, - // this can go with it? The streamer would need some target specific - // refactoring too. - mutable SmallPtrSet ThumbFuncs; - - /// \brief The bundle alignment size currently set in the assembler. - /// - /// By default it's 0, which means bundling is disabled. - unsigned BundleAlignSize; - - unsigned RelaxAll : 1; - unsigned SubsectionsViaSymbols : 1; - unsigned IncrementalLinkerCompatible : 1; - - /// ELF specific e_header flags - // It would be good if there were an MCELFAssembler class to hold this. - // ELF header flags are used both by the integrated and standalone assemblers. - // Access to the flags is necessary in cases where assembler directives affect - // which flags to be set. - unsigned ELFHeaderEFlags; - - /// Used to communicate Linker Optimization Hint information between - /// the Streamer and the .o writer - MCLOHContainer LOHContainer; - - VersionMinInfoType VersionMinInfo; - -private: - /// Evaluate a fixup to a relocatable expression and the value which should be - /// placed into the fixup. - /// - /// \param Layout The layout to use for evaluation. - /// \param Fixup The fixup to evaluate. - /// \param DF The fragment the fixup is inside. - /// \param Target [out] On return, the relocatable expression the fixup - /// evaluates to. - /// \param Value [out] On return, the value of the fixup as currently laid - /// out. - /// \return Whether the fixup value was fully resolved. This is true if the - /// \p Value result is fixed, otherwise the value may change due to - /// relocation. - bool evaluateFixup(const MCAsmLayout &Layout, const MCFixup &Fixup, - const MCFragment *DF, MCValue &Target, - uint64_t &Value) const; - - /// Check whether a fixup can be satisfied, or whether it needs to be relaxed - /// (increased in size, in order to hold its value correctly). - bool fixupNeedsRelaxation(const MCFixup &Fixup, const MCRelaxableFragment *DF, - const MCAsmLayout &Layout) const; - - /// Check whether the given fragment needs relaxation. - bool fragmentNeedsRelaxation(const MCRelaxableFragment *IF, - const MCAsmLayout &Layout) const; - - /// \brief Perform one layout iteration and return true if any offsets - /// were adjusted. - bool layoutOnce(MCAsmLayout &Layout); - - /// \brief Perform one layout iteration of the given section and return true - /// if any offsets were adjusted. - bool layoutSectionOnce(MCAsmLayout &Layout, MCSection &Sec); - - bool relaxInstruction(MCAsmLayout &Layout, MCRelaxableFragment &IF); - - bool relaxLEB(MCAsmLayout &Layout, MCLEBFragment &IF); - - bool relaxDwarfLineAddr(MCAsmLayout &Layout, MCDwarfLineAddrFragment &DF); - bool relaxDwarfCallFrameFragment(MCAsmLayout &Layout, - MCDwarfCallFrameFragment &DF); - bool relaxCVInlineLineTable(MCAsmLayout &Layout, - MCCVInlineLineTableFragment &DF); - bool relaxCVDefRange(MCAsmLayout &Layout, MCCVDefRangeFragment &DF); - - /// finishLayout - Finalize a layout, including fragment lowering. - void finishLayout(MCAsmLayout &Layout); - - std::pair handleFixup(const MCAsmLayout &Layout, - MCFragment &F, const MCFixup &Fixup); - -public: - /// Compute the effective fragment size assuming it is laid out at the given - /// \p SectionAddress and \p FragmentOffset. - uint64_t computeFragmentSize(const MCAsmLayout &Layout, - const MCFragment &F) const; - - /// Find the symbol which defines the atom containing the given symbol, or - /// null if there is no such symbol. - const MCSymbol *getAtom(const MCSymbol &S) const; - - /// Check whether a particular symbol is visible to the linker and is required - /// in the symbol table, or whether it can be discarded by the assembler. This - /// also effects whether the assembler treats the label as potentially - /// defining a separate atom. - bool isSymbolLinkerVisible(const MCSymbol &SD) const; - - /// Emit the section contents using the given object writer. - void writeSectionData(const MCSection *Section, - const MCAsmLayout &Layout) const; - - /// Check whether a given symbol has been flagged with .thumb_func. - bool isThumbFunc(const MCSymbol *Func) const; - - /// Flag a function symbol as the target of a .thumb_func directive. - void setIsThumbFunc(const MCSymbol *Func) { ThumbFuncs.insert(Func); } - - /// ELF e_header flags - unsigned getELFHeaderEFlags() const { return ELFHeaderEFlags; } - void setELFHeaderEFlags(unsigned Flags) { ELFHeaderEFlags = Flags; } - - /// MachO deployment target version information. - const VersionMinInfoType &getVersionMinInfo() const { return VersionMinInfo; } - void setVersionMinInfo(MCVersionMinType Kind, unsigned Major, unsigned Minor, - unsigned Update) { - VersionMinInfo.Kind = Kind; - VersionMinInfo.Major = Major; - VersionMinInfo.Minor = Minor; - VersionMinInfo.Update = Update; - } - -public: - /// Construct a new assembler instance. - // - // FIXME: How are we going to parameterize this? Two obvious options are stay - // concrete and require clients to pass in a target like object. The other - // option is to make this abstract, and have targets provide concrete - // implementations as we do with AsmParser. - MCAssembler(MCContext &Context, MCAsmBackend &Backend, - MCCodeEmitter &Emitter, MCObjectWriter &Writer); - ~MCAssembler(); - - /// Reuse an assembler instance - /// - void reset(); - - MCContext &getContext() const { return Context; } - - MCAsmBackend &getBackend() const { return Backend; } - - MCCodeEmitter &getEmitter() const { return Emitter; } - - MCObjectWriter &getWriter() const { return Writer; } - - MCDwarfLineTableParams getDWARFLinetableParams() const { return LTParams; } - void setDWARFLinetableParams(MCDwarfLineTableParams P) { LTParams = P; } - - /// Finish - Do final processing and write the object to the output stream. - /// \p Writer is used for custom object writer (as the MCJIT does), - /// if not specified it is automatically created from backend. - void Finish(); - - // Layout all section and prepare them for emission. - void layout(MCAsmLayout &Layout); - - // FIXME: This does not belong here. - bool getSubsectionsViaSymbols() const { return SubsectionsViaSymbols; } - void setSubsectionsViaSymbols(bool Value) { SubsectionsViaSymbols = Value; } - - bool isIncrementalLinkerCompatible() const { - return IncrementalLinkerCompatible; - } - void setIncrementalLinkerCompatible(bool Value) { - IncrementalLinkerCompatible = Value; - } - - bool getRelaxAll() const { return RelaxAll; } - void setRelaxAll(bool Value) { RelaxAll = Value; } - - bool isBundlingEnabled() const { return BundleAlignSize != 0; } - - unsigned getBundleAlignSize() const { return BundleAlignSize; } - - void setBundleAlignSize(unsigned Size) { - assert((Size == 0 || !(Size & (Size - 1))) && - "Expect a power-of-two bundle align size"); - BundleAlignSize = Size; - } - - /// \name Section List Access - /// @{ - - iterator begin() { return Sections.begin(); } - const_iterator begin() const { return Sections.begin(); } - - iterator end() { return Sections.end(); } - const_iterator end() const { return Sections.end(); } - - size_t size() const { return Sections.size(); } - - /// @} - /// \name Symbol List Access - /// @{ - symbol_iterator symbol_begin() { return Symbols.begin(); } - const_symbol_iterator symbol_begin() const { return Symbols.begin(); } - - symbol_iterator symbol_end() { return Symbols.end(); } - const_symbol_iterator symbol_end() const { return Symbols.end(); } - - symbol_range symbols() { return make_range(symbol_begin(), symbol_end()); } - const_symbol_range symbols() const { - return make_range(symbol_begin(), symbol_end()); - } - - size_t symbol_size() const { return Symbols.size(); } - - /// @} - /// \name Indirect Symbol List Access - /// @{ - - // FIXME: This is a total hack, this should not be here. Once things are - // factored so that the streamer has direct access to the .o writer, it can - // disappear. - std::vector &getIndirectSymbols() { - return IndirectSymbols; - } - - indirect_symbol_iterator indirect_symbol_begin() { - return IndirectSymbols.begin(); - } - const_indirect_symbol_iterator indirect_symbol_begin() const { - return IndirectSymbols.begin(); - } - - indirect_symbol_iterator indirect_symbol_end() { - return IndirectSymbols.end(); - } - const_indirect_symbol_iterator indirect_symbol_end() const { - return IndirectSymbols.end(); - } - - size_t indirect_symbol_size() const { return IndirectSymbols.size(); } - - /// @} - /// \name Linker Option List Access - /// @{ - - std::vector> &getLinkerOptions() { - return LinkerOptions; - } - - /// @} - /// \name Data Region List Access - /// @{ - - // FIXME: This is a total hack, this should not be here. Once things are - // factored so that the streamer has direct access to the .o writer, it can - // disappear. - std::vector &getDataRegions() { return DataRegions; } - - data_region_iterator data_region_begin() { return DataRegions.begin(); } - const_data_region_iterator data_region_begin() const { - return DataRegions.begin(); - } - - data_region_iterator data_region_end() { return DataRegions.end(); } - const_data_region_iterator data_region_end() const { - return DataRegions.end(); - } - - size_t data_region_size() const { return DataRegions.size(); } - - /// @} - /// \name Data Region List Access - /// @{ - - // FIXME: This is a total hack, this should not be here. Once things are - // factored so that the streamer has direct access to the .o writer, it can - // disappear. - MCLOHContainer &getLOHContainer() { return LOHContainer; } - const MCLOHContainer &getLOHContainer() const { - return const_cast(this)->getLOHContainer(); - } - /// @} - /// \name Backend Data Access - /// @{ - - bool registerSection(MCSection &Section); - - void registerSymbol(const MCSymbol &Symbol, bool *Created = nullptr); - - ArrayRef getFileNames() { return FileNames; } - - void addFileName(StringRef FileName) { - if (std::find(FileNames.begin(), FileNames.end(), FileName) == - FileNames.end()) - FileNames.push_back(FileName); - } - - /// \brief Write the necessary bundle padding to the given object writer. - /// Expects a fragment \p F containing instructions and its size \p FSize. - void writeFragmentPadding(const MCFragment &F, uint64_t FSize, - MCObjectWriter *OW) const; - - /// @} - - void dump(); -}; - -/// \brief Compute the amount of padding required before the fragment \p F to -/// obey bundling restrictions, where \p FOffset is the fragment's offset in -/// its section and \p FSize is the fragment's size. -uint64_t computeBundlePadding(const MCAssembler &Assembler, const MCFragment *F, - uint64_t FOffset, uint64_t FSize); - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCCodeEmitter.h b/llvm/include/llvm/MC/MCCodeEmitter.h deleted file mode 100644 index b6c19150..00000000 --- a/llvm/include/llvm/MC/MCCodeEmitter.h +++ /dev/null @@ -1,46 +0,0 @@ -//===-- llvm/MC/MCCodeEmitter.h - Instruction Encoding ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCCODEEMITTER_H -#define LLVM_MC_MCCODEEMITTER_H - -#include "llvm/Support/Compiler.h" - -namespace llvm { -class MCFixup; -class MCInst; -class MCSubtargetInfo; -class raw_ostream; -template class SmallVectorImpl; - -/// MCCodeEmitter - Generic instruction encoding interface. -class MCCodeEmitter { -private: - MCCodeEmitter(const MCCodeEmitter &) = delete; - void operator=(const MCCodeEmitter &) = delete; - -protected: // Can only create subclasses. - MCCodeEmitter(); - -public: - virtual ~MCCodeEmitter(); - - /// Lifetime management - virtual void reset() {} - - /// EncodeInstruction - Encode the given \p Inst to bytes on the output - /// stream \p OS. - virtual void encodeInstruction(const MCInst &Inst, raw_ostream &OS, - SmallVectorImpl &Fixups, - const MCSubtargetInfo &STI) const = 0; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCCodeView.h b/llvm/include/llvm/MC/MCCodeView.h deleted file mode 100644 index d999ff55..00000000 --- a/llvm/include/llvm/MC/MCCodeView.h +++ /dev/null @@ -1,210 +0,0 @@ -//===- MCCodeView.h - Machine Code CodeView support -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Holds state from .cv_file and .cv_loc directives for later emission. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCCODEVIEW_H -#define LLVM_MC_MCCODEVIEW_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/MC/MCObjectStreamer.h" -#include "llvm/MC/MCFragment.h" -#include -#include - -namespace llvm { -class MCContext; -class MCObjectStreamer; -class MCStreamer; - -/// \brief Instances of this class represent the information from a -/// .cv_loc directive. -class MCCVLoc { - uint32_t FunctionId; - uint32_t FileNum; - uint32_t Line; - uint16_t Column; - uint16_t PrologueEnd : 1; - uint16_t IsStmt : 1; - -private: // MCContext manages these - friend class MCContext; - MCCVLoc(unsigned functionid, unsigned fileNum, unsigned line, unsigned column, - bool prologueend, bool isstmt) - : FunctionId(functionid), FileNum(fileNum), Line(line), Column(column), - PrologueEnd(prologueend), IsStmt(isstmt) {} - - // Allow the default copy constructor and assignment operator to be used - // for an MCCVLoc object. - -public: - unsigned getFunctionId() const { return FunctionId; } - - /// \brief Get the FileNum of this MCCVLoc. - unsigned getFileNum() const { return FileNum; } - - /// \brief Get the Line of this MCCVLoc. - unsigned getLine() const { return Line; } - - /// \brief Get the Column of this MCCVLoc. - unsigned getColumn() const { return Column; } - - bool isPrologueEnd() const { return PrologueEnd; } - bool isStmt() const { return IsStmt; } - - void setFunctionId(unsigned FID) { FunctionId = FID; } - - /// \brief Set the FileNum of this MCCVLoc. - void setFileNum(unsigned fileNum) { FileNum = fileNum; } - - /// \brief Set the Line of this MCCVLoc. - void setLine(unsigned line) { Line = line; } - - /// \brief Set the Column of this MCCVLoc. - void setColumn(unsigned column) { - assert(column <= UINT16_MAX); - Column = column; - } - - void setPrologueEnd(bool PE) { PrologueEnd = PE; } - void setIsStmt(bool IS) { IsStmt = IS; } -}; - -/// \brief Instances of this class represent the line information for -/// the CodeView line table entries. Which is created after a machine -/// instruction is assembled and uses an address from a temporary label -/// created at the current address in the current section and the info from -/// the last .cv_loc directive seen as stored in the context. -class MCCVLineEntry : public MCCVLoc { - const MCSymbol *Label; - -private: - // Allow the default copy constructor and assignment operator to be used - // for an MCCVLineEntry object. - -public: - // Constructor to create an MCCVLineEntry given a symbol and the dwarf loc. - MCCVLineEntry(const MCSymbol *Label, const MCCVLoc loc) - : MCCVLoc(loc), Label(Label) {} - - const MCSymbol *getLabel() const { return Label; } - - // This is called when an instruction is assembled into the specified - // section and if there is information from the last .cv_loc directive that - // has yet to have a line entry made for it is made. - static void Make(MCObjectStreamer *MCOS); -}; - -/// Holds state from .cv_file and .cv_loc directives for later emission. -class CodeViewContext { -public: - CodeViewContext(); - ~CodeViewContext(); - - bool isValidFileNumber(unsigned FileNumber) const; - bool addFile(unsigned FileNumber, StringRef Filename); - ArrayRef getFilenames() { return Filenames; } - - /// \brief Add a line entry. - void addLineEntry(const MCCVLineEntry &LineEntry) { - size_t Offset = MCCVLines.size(); - auto I = MCCVLineStartStop.insert( - {LineEntry.getFunctionId(), {Offset, Offset + 1}}); - if (!I.second) - I.first->second.second = Offset + 1; - MCCVLines.push_back(LineEntry); - } - - std::vector getFunctionLineEntries(unsigned FuncId) { - std::vector FilteredLines; - - auto I = MCCVLineStartStop.find(FuncId); - if (I != MCCVLineStartStop.end()) - for (size_t Idx = I->second.first, End = I->second.second; Idx != End; - ++Idx) - if (MCCVLines[Idx].getFunctionId() == FuncId) - FilteredLines.push_back(MCCVLines[Idx]); - return FilteredLines; - } - - std::pair getLineExtent(unsigned FuncId) { - auto I = MCCVLineStartStop.find(FuncId); - // Return an empty extent if there are no cv_locs for this function id. - if (I == MCCVLineStartStop.end()) - return {~0ULL, 0}; - return I->second; - } - - ArrayRef getLinesForExtent(size_t L, size_t R) { - if (R <= L) - return None; - if (L >= MCCVLines.size()) - return None; - return makeArrayRef(&MCCVLines[L], R - L); - } - - /// Emits a line table substream. - void emitLineTableForFunction(MCObjectStreamer &OS, unsigned FuncId, - const MCSymbol *FuncBegin, - const MCSymbol *FuncEnd); - - void emitInlineLineTableForFunction( - MCObjectStreamer &OS, unsigned PrimaryFunctionId, unsigned SourceFileId, - unsigned SourceLineNum, const MCSymbol *FnStartSym, - const MCSymbol *FnEndSym, ArrayRef SecondaryFunctionIds); - - /// Encodes the binary annotations once we have a layout. - void encodeInlineLineTable(MCAsmLayout &Layout, - MCCVInlineLineTableFragment &F); - - void - emitDefRange(MCObjectStreamer &OS, - ArrayRef> Ranges, - StringRef FixedSizePortion); - - void encodeDefRange(MCAsmLayout &Layout, MCCVDefRangeFragment &F); - - /// Emits the string table substream. - void emitStringTable(MCObjectStreamer &OS); - - /// Emits the file checksum substream. - void emitFileChecksums(MCObjectStreamer &OS); - -private: - /// Map from string to string table offset. - StringMap StringTable; - - /// The fragment that ultimately holds our strings. - MCDataFragment *StrTabFragment = nullptr; - bool InsertedStrTabFragment = false; - - MCDataFragment *getStringTableFragment(); - - /// Add something to the string table. - StringRef addToStringTable(StringRef S); - - /// Get a string table offset. - unsigned getStringTableOffset(StringRef S); - - /// An array of absolute paths. Eventually this may include the file checksum. - SmallVector Filenames; - - /// The offset of the first and last .cv_loc directive for a given function - /// id. - std::map> MCCVLineStartStop; - - /// A collection of MCCVLineEntry for each section. - std::vector MCCVLines; -}; - -} // end namespace llvm -#endif diff --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h deleted file mode 100644 index fe1377e0..00000000 --- a/llvm/include/llvm/MC/MCContext.h +++ /dev/null @@ -1,663 +0,0 @@ -//===- MCContext.h - Machine Code Context -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCCONTEXT_H -#define LLVM_MC_MCCONTEXT_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SetVector.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/Twine.h" -#include "llvm/MC/MCCodeView.h" -#include "llvm/MC/MCDwarf.h" -#include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/MC/SectionKind.h" -#include "llvm/Support/Allocator.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/raw_ostream.h" -#include -#include -#include // FIXME: Shouldn't be needed. - -namespace llvm { - class MCAsmInfo; - class MCExpr; - class MCSection; - class MCSymbol; - class MCSymbolELF; - class MCLabel; - struct MCDwarfFile; - class MCDwarfLoc; - class MCObjectFileInfo; - class MCRegisterInfo; - class MCLineSection; - class SMLoc; - class MCSectionMachO; - class MCSectionELF; - class MCSectionCOFF; - class CodeViewContext; - - /// Context object for machine code objects. This class owns all of the - /// sections that it creates. - /// - class MCContext { - MCContext(const MCContext &) = delete; - MCContext &operator=(const MCContext &) = delete; - - public: - typedef StringMap SymbolTable; - - private: - /// The SourceMgr for this object, if any. - const SourceMgr *SrcMgr; - - /// The MCAsmInfo for this target. - const MCAsmInfo *MAI; - - /// The MCRegisterInfo for this target. - const MCRegisterInfo *MRI; - - /// The MCObjectFileInfo for this target. - const MCObjectFileInfo *MOFI; - - std::unique_ptr CVContext; - - /// Allocator object used for creating machine code objects. - /// - /// We use a bump pointer allocator to avoid the need to track all allocated - /// objects. - BumpPtrAllocator Allocator; - - SpecificBumpPtrAllocator COFFAllocator; - SpecificBumpPtrAllocator ELFAllocator; - SpecificBumpPtrAllocator MachOAllocator; - - /// Bindings of names to symbols. - SymbolTable Symbols; - - /// ELF sections can have a corresponding symbol. This maps one to the - /// other. - DenseMap SectionSymbols; - - /// A mapping from a local label number and an instance count to a symbol. - /// For example, in the assembly - /// 1: - /// 2: - /// 1: - /// We have three labels represented by the pairs (1, 0), (2, 0) and (1, 1) - DenseMap, MCSymbol *> LocalSymbols; - - /// Keeps tracks of names that were used both for used declared and - /// artificial symbols. The value is "true" if the name has been used for a - /// non-section symbol (there can be at most one of those, plus an unlimited - /// number of section symbols with the same name). - StringMap UsedNames; - - /// The next ID to dole out to an unnamed assembler temporary symbol with - /// a given prefix. - StringMap NextID; - - /// Instances of directional local labels. - DenseMap Instances; - /// NextInstance() creates the next instance of the directional local label - /// for the LocalLabelVal and adds it to the map if needed. - unsigned NextInstance(unsigned LocalLabelVal); - /// GetInstance() gets the current instance of the directional local label - /// for the LocalLabelVal and adds it to the map if needed. - unsigned GetInstance(unsigned LocalLabelVal); - - /// The file name of the log file from the environment variable - /// AS_SECURE_LOG_FILE. Which must be set before the .secure_log_unique - /// directive is used or it is an error. - char *SecureLogFile; - /// The stream that gets written to for the .secure_log_unique directive. - std::unique_ptr SecureLog; - /// Boolean toggled when .secure_log_unique / .secure_log_reset is seen to - /// catch errors if .secure_log_unique appears twice without - /// .secure_log_reset appearing between them. - bool SecureLogUsed; - - /// The compilation directory to use for DW_AT_comp_dir. - SmallString<128> CompilationDir; - - /// The main file name if passed in explicitly. - std::string MainFileName; - - /// The dwarf file and directory tables from the dwarf .file directive. - /// We now emit a line table for each compile unit. To reduce the prologue - /// size of each line table, the files and directories used by each compile - /// unit are separated. - std::map MCDwarfLineTablesCUMap; - - /// The current dwarf line information from the last dwarf .loc directive. - MCDwarfLoc CurrentDwarfLoc; - bool DwarfLocSeen; - - /// The current CodeView line information from the last .cv_loc directive. - MCCVLoc CurrentCVLoc = MCCVLoc(0, 0, 0, 0, false, true); - bool CVLocSeen = false; - - /// Generate dwarf debugging info for assembly source files. - bool GenDwarfForAssembly; - - /// The current dwarf file number when generate dwarf debugging info for - /// assembly source files. - unsigned GenDwarfFileNumber; - - /// Sections for generating the .debug_ranges and .debug_aranges sections. - SetVector SectionsForRanges; - - /// The information gathered from labels that will have dwarf label - /// entries when generating dwarf assembly source files. - std::vector MCGenDwarfLabelEntries; - - /// The string to embed in the debug information for the compile unit, if - /// non-empty. - StringRef DwarfDebugFlags; - - /// The string to embed in as the dwarf AT_producer for the compile unit, if - /// non-empty. - StringRef DwarfDebugProducer; - - /// The maximum version of dwarf that we should emit. - uint16_t DwarfVersion; - - /// Honor temporary labels, this is useful for debugging semantic - /// differences between temporary and non-temporary labels (primarily on - /// Darwin). - bool AllowTemporaryLabels; - bool UseNamesOnTempLabels = true; - - /// The Compile Unit ID that we are currently processing. - unsigned DwarfCompileUnitID; - - struct ELFSectionKey { - std::string SectionName; - StringRef GroupName; - unsigned UniqueID; - ELFSectionKey(StringRef SectionName, StringRef GroupName, - unsigned UniqueID) - : SectionName(SectionName), GroupName(GroupName), UniqueID(UniqueID) { - } - bool operator<(const ELFSectionKey &Other) const { - if (SectionName != Other.SectionName) - return SectionName < Other.SectionName; - if (GroupName != Other.GroupName) - return GroupName < Other.GroupName; - return UniqueID < Other.UniqueID; - } - }; - - struct COFFSectionKey { - std::string SectionName; - StringRef GroupName; - int SelectionKey; - unsigned UniqueID; - COFFSectionKey(StringRef SectionName, StringRef GroupName, - int SelectionKey, unsigned UniqueID) - : SectionName(SectionName), GroupName(GroupName), - SelectionKey(SelectionKey), UniqueID(UniqueID) {} - bool operator<(const COFFSectionKey &Other) const { - if (SectionName != Other.SectionName) - return SectionName < Other.SectionName; - if (GroupName != Other.GroupName) - return GroupName < Other.GroupName; - if (SelectionKey != Other.SelectionKey) - return SelectionKey < Other.SelectionKey; - return UniqueID < Other.UniqueID; - } - }; - - StringMap MachOUniquingMap; - std::map ELFUniquingMap; - std::map COFFUniquingMap; - StringMap ELFRelSecNames; - - SpecificBumpPtrAllocator MCSubtargetAllocator; - - /// Do automatic reset in destructor - bool AutoReset; - - bool HadError; - - MCSymbol *createSymbolImpl(const StringMapEntry *Name, - bool CanBeUnnamed); - MCSymbol *createSymbol(StringRef Name, bool AlwaysAddSuffix, - bool IsTemporary); - - MCSymbol *getOrCreateDirectionalLocalSymbol(unsigned LocalLabelVal, - unsigned Instance); - - public: - explicit MCContext(const MCAsmInfo *MAI, const MCRegisterInfo *MRI, - const MCObjectFileInfo *MOFI, - const SourceMgr *Mgr = nullptr, bool DoAutoReset = true); - ~MCContext(); - - const SourceMgr *getSourceManager() const { return SrcMgr; } - - const MCAsmInfo *getAsmInfo() const { return MAI; } - - const MCRegisterInfo *getRegisterInfo() const { return MRI; } - - const MCObjectFileInfo *getObjectFileInfo() const { return MOFI; } - - CodeViewContext &getCVContext(); - - void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; } - void setUseNamesOnTempLabels(bool Value) { UseNamesOnTempLabels = Value; } - - /// \name Module Lifetime Management - /// @{ - - /// reset - return object to right after construction state to prepare - /// to process a new module - void reset(); - - /// @} - - /// \name Symbol Management - /// @{ - - /// Create and return a new linker temporary symbol with a unique but - /// unspecified name. - MCSymbol *createLinkerPrivateTempSymbol(); - - /// Create and return a new assembler temporary symbol with a unique but - /// unspecified name. - MCSymbol *createTempSymbol(bool CanBeUnnamed = true); - - MCSymbol *createTempSymbol(const Twine &Name, bool AlwaysAddSuffix, - bool CanBeUnnamed = true); - - /// Create the definition of a directional local symbol for numbered label - /// (used for "1:" definitions). - MCSymbol *createDirectionalLocalSymbol(unsigned LocalLabelVal); - - /// Create and return a directional local symbol for numbered label (used - /// for "1b" or 1f" references). - MCSymbol *getDirectionalLocalSymbol(unsigned LocalLabelVal, bool Before); - - /// Lookup the symbol inside with the specified \p Name. If it exists, - /// return it. If not, create a forward reference and return it. - /// - /// \param Name - The symbol name, which must be unique across all symbols. - MCSymbol *getOrCreateSymbol(const Twine &Name); - - MCSymbolELF *getOrCreateSectionSymbol(const MCSectionELF &Section); - - /// Gets a symbol that will be defined to the final stack offset of a local - /// variable after codegen. - /// - /// \param Idx - The index of a local variable passed to @llvm.localescape. - MCSymbol *getOrCreateFrameAllocSymbol(StringRef FuncName, unsigned Idx); - - MCSymbol *getOrCreateParentFrameOffsetSymbol(StringRef FuncName); - - MCSymbol *getOrCreateLSDASymbol(StringRef FuncName); - - /// Get the symbol for \p Name, or null. - MCSymbol *lookupSymbol(const Twine &Name) const; - - /// getSymbols - Get a reference for the symbol table for clients that - /// want to, for example, iterate over all symbols. 'const' because we - /// still want any modifications to the table itself to use the MCContext - /// APIs. - const SymbolTable &getSymbols() const { return Symbols; } - - /// @} - - /// \name Section Management - /// @{ - - enum : unsigned { - /// Pass this value as the UniqueID during section creation to get the - /// generic section with the given name and characteristics. The usual - /// sections such as .text use this ID. - GenericSectionID = ~0U - }; - - /// Return the MCSection for the specified mach-o section. This requires - /// the operands to be valid. - MCSectionMachO *getMachOSection(StringRef Segment, StringRef Section, - unsigned TypeAndAttributes, - unsigned Reserved2, SectionKind K, - const char *BeginSymName = nullptr); - - MCSectionMachO *getMachOSection(StringRef Segment, StringRef Section, - unsigned TypeAndAttributes, SectionKind K, - const char *BeginSymName = nullptr) { - return getMachOSection(Segment, Section, TypeAndAttributes, 0, K, - BeginSymName); - } - - MCSectionELF *getELFSection(const Twine &Section, unsigned Type, - unsigned Flags) { - return getELFSection(Section, Type, Flags, nullptr); - } - - MCSectionELF *getELFSection(const Twine &Section, unsigned Type, - unsigned Flags, const char *BeginSymName) { - return getELFSection(Section, Type, Flags, 0, "", BeginSymName); - } - - MCSectionELF *getELFSection(const Twine &Section, unsigned Type, - unsigned Flags, unsigned EntrySize, - const Twine &Group) { - return getELFSection(Section, Type, Flags, EntrySize, Group, nullptr); - } - - MCSectionELF *getELFSection(const Twine &Section, unsigned Type, - unsigned Flags, unsigned EntrySize, - const Twine &Group, const char *BeginSymName) { - return getELFSection(Section, Type, Flags, EntrySize, Group, ~0, - BeginSymName); - } - - MCSectionELF *getELFSection(const Twine &Section, unsigned Type, - unsigned Flags, unsigned EntrySize, - const Twine &Group, unsigned UniqueID) { - return getELFSection(Section, Type, Flags, EntrySize, Group, UniqueID, - nullptr); - } - - MCSectionELF *getELFSection(const Twine &Section, unsigned Type, - unsigned Flags, unsigned EntrySize, - const Twine &Group, unsigned UniqueID, - const char *BeginSymName); - - MCSectionELF *getELFSection(const Twine &Section, unsigned Type, - unsigned Flags, unsigned EntrySize, - const MCSymbolELF *Group, unsigned UniqueID, - const char *BeginSymName, - const MCSectionELF *Associated); - - /// Get a section with the provided group identifier. This section is - /// named by concatenating \p Prefix with '.' then \p Suffix. The \p Type - /// describes the type of the section and \p Flags are used to further - /// configure this named section. - MCSectionELF *getELFNamedSection(const Twine &Prefix, const Twine &Suffix, - unsigned Type, unsigned Flags, - unsigned EntrySize = 0); - - MCSectionELF *createELFRelSection(const Twine &Name, unsigned Type, - unsigned Flags, unsigned EntrySize, - const MCSymbolELF *Group, - const MCSectionELF *Associated); - - void renameELFSection(MCSectionELF *Section, StringRef Name); - - MCSectionELF *createELFGroupSection(const MCSymbolELF *Group); - - MCSectionCOFF *getCOFFSection(StringRef Section, unsigned Characteristics, - SectionKind Kind, StringRef COMDATSymName, - int Selection, - unsigned UniqueID = GenericSectionID, - const char *BeginSymName = nullptr); - - MCSectionCOFF *getCOFFSection(StringRef Section, unsigned Characteristics, - SectionKind Kind, - const char *BeginSymName = nullptr); - - MCSectionCOFF *getCOFFSection(StringRef Section); - - /// Gets or creates a section equivalent to Sec that is associated with the - /// section containing KeySym. For example, to create a debug info section - /// associated with an inline function, pass the normal debug info section - /// as Sec and the function symbol as KeySym. - MCSectionCOFF * - getAssociativeCOFFSection(MCSectionCOFF *Sec, const MCSymbol *KeySym, - unsigned UniqueID = GenericSectionID); - - // Create and save a copy of STI and return a reference to the copy. - MCSubtargetInfo &getSubtargetCopy(const MCSubtargetInfo &STI); - - /// @} - - /// \name Dwarf Management - /// @{ - - /// \brief Get the compilation directory for DW_AT_comp_dir - /// The compilation directory should be set with \c setCompilationDir before - /// calling this function. If it is unset, an empty string will be returned. - StringRef getCompilationDir() const { return CompilationDir; } - - /// \brief Set the compilation directory for DW_AT_comp_dir - void setCompilationDir(StringRef S) { CompilationDir = S.str(); } - - /// \brief Get the main file name for use in error messages and debug - /// info. This can be set to ensure we've got the correct file name - /// after preprocessing or for -save-temps. - const std::string &getMainFileName() const { return MainFileName; } - - /// \brief Set the main file name and override the default. - void setMainFileName(StringRef S) { MainFileName = S; } - - /// Creates an entry in the dwarf file and directory tables. - unsigned getDwarfFile(StringRef Directory, StringRef FileName, - unsigned FileNumber, unsigned CUID); - - bool isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID = 0); - - const std::map &getMCDwarfLineTables() const { - return MCDwarfLineTablesCUMap; - } - - MCDwarfLineTable &getMCDwarfLineTable(unsigned CUID) { - return MCDwarfLineTablesCUMap[CUID]; - } - - const MCDwarfLineTable &getMCDwarfLineTable(unsigned CUID) const { - auto I = MCDwarfLineTablesCUMap.find(CUID); - assert(I != MCDwarfLineTablesCUMap.end()); - return I->second; - } - - const SmallVectorImpl &getMCDwarfFiles(unsigned CUID = 0) { - return getMCDwarfLineTable(CUID).getMCDwarfFiles(); - } - const SmallVectorImpl &getMCDwarfDirs(unsigned CUID = 0) { - return getMCDwarfLineTable(CUID).getMCDwarfDirs(); - } - - bool hasMCLineSections() const { - for (const auto &Table : MCDwarfLineTablesCUMap) - if (!Table.second.getMCDwarfFiles().empty() || Table.second.getLabel()) - return true; - return false; - } - unsigned getDwarfCompileUnitID() { return DwarfCompileUnitID; } - void setDwarfCompileUnitID(unsigned CUIndex) { - DwarfCompileUnitID = CUIndex; - } - void setMCLineTableCompilationDir(unsigned CUID, StringRef CompilationDir) { - getMCDwarfLineTable(CUID).setCompilationDir(CompilationDir); - } - - /// Saves the information from the currently parsed dwarf .loc directive - /// and sets DwarfLocSeen. When the next instruction is assembled an entry - /// in the line number table with this information and the address of the - /// instruction will be created. - void setCurrentDwarfLoc(unsigned FileNum, unsigned Line, unsigned Column, - unsigned Flags, unsigned Isa, - unsigned Discriminator) { - CurrentDwarfLoc.setFileNum(FileNum); - CurrentDwarfLoc.setLine(Line); - CurrentDwarfLoc.setColumn(Column); - CurrentDwarfLoc.setFlags(Flags); - CurrentDwarfLoc.setIsa(Isa); - CurrentDwarfLoc.setDiscriminator(Discriminator); - DwarfLocSeen = true; - } - void clearDwarfLocSeen() { DwarfLocSeen = false; } - - bool getDwarfLocSeen() { return DwarfLocSeen; } - const MCDwarfLoc &getCurrentDwarfLoc() { return CurrentDwarfLoc; } - - bool getGenDwarfForAssembly() { return GenDwarfForAssembly; } - void setGenDwarfForAssembly(bool Value) { GenDwarfForAssembly = Value; } - unsigned getGenDwarfFileNumber() { return GenDwarfFileNumber; } - void setGenDwarfFileNumber(unsigned FileNumber) { - GenDwarfFileNumber = FileNumber; - } - const SetVector &getGenDwarfSectionSyms() { - return SectionsForRanges; - } - bool addGenDwarfSection(MCSection *Sec) { - return SectionsForRanges.insert(Sec); - } - - void finalizeDwarfSections(MCStreamer &MCOS); - const std::vector &getMCGenDwarfLabelEntries() const { - return MCGenDwarfLabelEntries; - } - void addMCGenDwarfLabelEntry(const MCGenDwarfLabelEntry &E) { - MCGenDwarfLabelEntries.push_back(E); - } - - void setDwarfDebugFlags(StringRef S) { DwarfDebugFlags = S; } - StringRef getDwarfDebugFlags() { return DwarfDebugFlags; } - - void setDwarfDebugProducer(StringRef S) { DwarfDebugProducer = S; } - StringRef getDwarfDebugProducer() { return DwarfDebugProducer; } - - void setDwarfVersion(uint16_t v) { DwarfVersion = v; } - uint16_t getDwarfVersion() const { return DwarfVersion; } - - /// @} - - - /// \name CodeView Management - /// @{ - - /// Creates an entry in the cv file table. - unsigned getCVFile(StringRef FileName, unsigned FileNumber); - - /// Saves the information from the currently parsed .cv_loc directive - /// and sets CVLocSeen. When the next instruction is assembled an entry - /// in the line number table with this information and the address of the - /// instruction will be created. - void setCurrentCVLoc(unsigned FunctionId, unsigned FileNo, unsigned Line, - unsigned Column, bool PrologueEnd, bool IsStmt) { - CurrentCVLoc.setFunctionId(FunctionId); - CurrentCVLoc.setFileNum(FileNo); - CurrentCVLoc.setLine(Line); - CurrentCVLoc.setColumn(Column); - CurrentCVLoc.setPrologueEnd(PrologueEnd); - CurrentCVLoc.setIsStmt(IsStmt); - CVLocSeen = true; - } - void clearCVLocSeen() { CVLocSeen = false; } - - bool getCVLocSeen() { return CVLocSeen; } - const MCCVLoc &getCurrentCVLoc() { return CurrentCVLoc; } - - bool isValidCVFileNumber(unsigned FileNumber); - /// @} - - char *getSecureLogFile() { return SecureLogFile; } - raw_fd_ostream *getSecureLog() { return SecureLog.get(); } - bool getSecureLogUsed() { return SecureLogUsed; } - void setSecureLog(std::unique_ptr Value) { - SecureLog = std::move(Value); - } - void setSecureLogUsed(bool Value) { SecureLogUsed = Value; } - - void *allocate(unsigned Size, unsigned Align = 8) { - return Allocator.Allocate(Size, Align); - } - void deallocate(void *Ptr) {} - - bool hadError() { return HadError; } - void reportError(SMLoc L, const Twine &Msg); - // Unrecoverable error has occurred. Display the best diagnostic we can - // and bail via exit(1). For now, most MC backend errors are unrecoverable. - // FIXME: We should really do something about that. - LLVM_ATTRIBUTE_NORETURN void reportFatalError(SMLoc L, - const Twine &Msg); - }; - -} // end namespace llvm - -// operator new and delete aren't allowed inside namespaces. -// The throw specifications are mandated by the standard. -/// \brief Placement new for using the MCContext's allocator. -/// -/// This placement form of operator new uses the MCContext's allocator for -/// obtaining memory. It is a non-throwing new, which means that it returns -/// null on error. (If that is what the allocator does. The current does, so if -/// this ever changes, this operator will have to be changed, too.) -/// Usage looks like this (assuming there's an MCContext 'Context' in scope): -/// \code -/// // Default alignment (8) -/// IntegerLiteral *Ex = new (Context) IntegerLiteral(arguments); -/// // Specific alignment -/// IntegerLiteral *Ex2 = new (Context, 4) IntegerLiteral(arguments); -/// \endcode -/// Please note that you cannot use delete on the pointer; it must be -/// deallocated using an explicit destructor call followed by -/// \c Context.Deallocate(Ptr). -/// -/// \param Bytes The number of bytes to allocate. Calculated by the compiler. -/// \param C The MCContext that provides the allocator. -/// \param Alignment The alignment of the allocated memory (if the underlying -/// allocator supports it). -/// \return The allocated memory. Could be NULL. -inline void *operator new(size_t Bytes, llvm::MCContext &C, - size_t Alignment = 8) LLVM_NOEXCEPT { - return C.allocate(Bytes, Alignment); -} -/// \brief Placement delete companion to the new above. -/// -/// This operator is just a companion to the new above. There is no way of -/// invoking it directly; see the new operator for more details. This operator -/// is called implicitly by the compiler if a placement new expression using -/// the MCContext throws in the object constructor. -inline void operator delete(void *Ptr, llvm::MCContext &C, - size_t) LLVM_NOEXCEPT { - C.deallocate(Ptr); -} - -/// This placement form of operator new[] uses the MCContext's allocator for -/// obtaining memory. It is a non-throwing new[], which means that it returns -/// null on error. -/// Usage looks like this (assuming there's an MCContext 'Context' in scope): -/// \code -/// // Default alignment (8) -/// char *data = new (Context) char[10]; -/// // Specific alignment -/// char *data = new (Context, 4) char[10]; -/// \endcode -/// Please note that you cannot use delete on the pointer; it must be -/// deallocated using an explicit destructor call followed by -/// \c Context.Deallocate(Ptr). -/// -/// \param Bytes The number of bytes to allocate. Calculated by the compiler. -/// \param C The MCContext that provides the allocator. -/// \param Alignment The alignment of the allocated memory (if the underlying -/// allocator supports it). -/// \return The allocated memory. Could be NULL. -inline void *operator new[](size_t Bytes, llvm::MCContext &C, - size_t Alignment = 8) LLVM_NOEXCEPT { - return C.allocate(Bytes, Alignment); -} - -/// \brief Placement delete[] companion to the new[] above. -/// -/// This operator is just a companion to the new[] above. There is no way of -/// invoking it directly; see the new[] operator for more details. This operator -/// is called implicitly by the compiler if a placement new[] expression using -/// the MCContext throws in the object constructor. -inline void operator delete[](void *Ptr, llvm::MCContext &C) LLVM_NOEXCEPT { - C.deallocate(Ptr); -} - -#endif diff --git a/llvm/include/llvm/MC/MCDirectives.h b/llvm/include/llvm/MC/MCDirectives.h deleted file mode 100644 index 8c74b169..00000000 --- a/llvm/include/llvm/MC/MCDirectives.h +++ /dev/null @@ -1,73 +0,0 @@ -//===- MCDirectives.h - Enums for directives on various targets -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines various enums that represent target-specific directives. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCDIRECTIVES_H -#define LLVM_MC_MCDIRECTIVES_H - -namespace llvm { - -enum MCSymbolAttr { - MCSA_Invalid = 0, ///< Not a valid directive. - - // Various directives in alphabetical order. - MCSA_ELF_TypeFunction, ///< .type _foo, STT_FUNC # aka @function - MCSA_ELF_TypeIndFunction, ///< .type _foo, STT_GNU_IFUNC - MCSA_ELF_TypeObject, ///< .type _foo, STT_OBJECT # aka @object - MCSA_ELF_TypeTLS, ///< .type _foo, STT_TLS # aka @tls_object - MCSA_ELF_TypeCommon, ///< .type _foo, STT_COMMON # aka @common - MCSA_ELF_TypeNoType, ///< .type _foo, STT_NOTYPE # aka @notype - MCSA_ELF_TypeGnuUniqueObject, /// .type _foo, @gnu_unique_object - MCSA_Global, ///< .globl - MCSA_Hidden, ///< .hidden (ELF) - MCSA_IndirectSymbol, ///< .indirect_symbol (MachO) - MCSA_Internal, ///< .internal (ELF) - MCSA_LazyReference, ///< .lazy_reference (MachO) - MCSA_Local, ///< .local (ELF) - MCSA_NoDeadStrip, ///< .no_dead_strip (MachO) - MCSA_SymbolResolver, ///< .symbol_resolver (MachO) - MCSA_AltEntry, ///< .alt_entry (MachO) - MCSA_PrivateExtern, ///< .private_extern (MachO) - MCSA_Protected, ///< .protected (ELF) - MCSA_Reference, ///< .reference (MachO) - MCSA_Weak, ///< .weak - MCSA_WeakDefinition, ///< .weak_definition (MachO) - MCSA_WeakReference, ///< .weak_reference (MachO) - MCSA_WeakDefAutoPrivate ///< .weak_def_can_be_hidden (MachO) -}; - -enum MCAssemblerFlag { - MCAF_SyntaxUnified, ///< .syntax (ARM/ELF) - MCAF_SubsectionsViaSymbols, ///< .subsections_via_symbols (MachO) - MCAF_Code16, ///< .code16 (X86) / .code 16 (ARM) - MCAF_Code32, ///< .code32 (X86) / .code 32 (ARM) - MCAF_Code64 ///< .code64 (X86) -}; - -enum MCDataRegionType { - MCDR_DataRegion, ///< .data_region - MCDR_DataRegionJT8, ///< .data_region jt8 - MCDR_DataRegionJT16, ///< .data_region jt16 - MCDR_DataRegionJT32, ///< .data_region jt32 - MCDR_DataRegionEnd ///< .end_data_region -}; - -enum MCVersionMinType { - MCVM_IOSVersionMin, ///< .ios_version_min - MCVM_OSXVersionMin, ///< .macosx_version_min - MCVM_TvOSVersionMin, ///< .tvos_version_min - MCVM_WatchOSVersionMin, ///< .watchos_version_min -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h b/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h deleted file mode 100644 index 9006d87a..00000000 --- a/llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h +++ /dev/null @@ -1,113 +0,0 @@ -//===-- llvm/MC/MCDisassembler.h - Disassembler interface -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H -#define LLVM_MC_MCDISASSEMBLER_MCDISASSEMBLER_H - -#include "llvm-c/Disassembler.h" -#include "llvm/MC/MCDisassembler/MCSymbolizer.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - -template class ArrayRef; -class MCInst; -class MCSubtargetInfo; -class raw_ostream; -class MCContext; - -/// Superclass for all disassemblers. Consumes a memory region and provides an -/// array of assembly instructions. -class MCDisassembler { -public: - /// Ternary decode status. Most backends will just use Fail and - /// Success, however some have a concept of an instruction with - /// understandable semantics but which is architecturally - /// incorrect. An example of this is ARM UNPREDICTABLE instructions - /// which are disassemblable but cause undefined behaviour. - /// - /// Because it makes sense to disassemble these instructions, there - /// is a "soft fail" failure mode that indicates the MCInst& is - /// valid but architecturally incorrect. - /// - /// The enum numbers are deliberately chosen such that reduction - /// from Success->SoftFail ->Fail can be done with a simple - /// bitwise-AND: - /// - /// LEFT & TOP = | Success Unpredictable Fail - /// --------------+----------------------------------- - /// Success | Success Unpredictable Fail - /// Unpredictable | Unpredictable Unpredictable Fail - /// Fail | Fail Fail Fail - /// - /// An easy way of encoding this is as 0b11, 0b01, 0b00 for - /// Success, SoftFail, Fail respectively. - enum DecodeStatus { - Fail = 0, - SoftFail = 1, - Success = 3 - }; - - MCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) - : Ctx(Ctx), STI(STI), Symbolizer(), CommentStream(nullptr) {} - - virtual ~MCDisassembler(); - - /// Returns the disassembly of a single instruction. - /// - /// \param Instr - An MCInst to populate with the contents of the - /// instruction. - /// \param Size - A value to populate with the size of the instruction, or - /// the number of bytes consumed while attempting to decode - /// an invalid instruction. - /// \param Address - The address, in the memory space of region, of the first - /// byte of the instruction. - /// \param VStream - The stream to print warnings and diagnostic messages on. - /// \param CStream - The stream to print comments and annotations on. - /// \return - MCDisassembler::Success if the instruction is valid, - /// MCDisassembler::SoftFail if the instruction was - /// disassemblable but invalid, - /// MCDisassembler::Fail if the instruction was invalid. - virtual DecodeStatus getInstruction(MCInst &Instr, uint64_t &Size, - ArrayRef Bytes, uint64_t Address, - raw_ostream &VStream, - raw_ostream &CStream) const = 0; - -private: - MCContext &Ctx; - -protected: - // Subtarget information, for instruction decoding predicates if required. - const MCSubtargetInfo &STI; - std::unique_ptr Symbolizer; - -public: - // Helpers around MCSymbolizer - bool tryAddingSymbolicOperand(MCInst &Inst, - int64_t Value, - uint64_t Address, bool IsBranch, - uint64_t Offset, uint64_t InstSize) const; - - void tryAddingPcLoadReferenceComment(int64_t Value, uint64_t Address) const; - - /// Set \p Symzer as the current symbolizer. - /// This takes ownership of \p Symzer, and deletes the previously set one. - void setSymbolizer(std::unique_ptr Symzer); - - MCContext& getContext() const { return Ctx; } - - const MCSubtargetInfo& getSubtargetInfo() const { return STI; } - - // Marked mutable because we cache it inside the disassembler, rather than - // having to pass it around as an argument through all the autogenerated code. - mutable raw_ostream *CommentStream; -}; - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCDisassembler/MCExternalSymbolizer.h b/llvm/include/llvm/MC/MCDisassembler/MCExternalSymbolizer.h deleted file mode 100644 index bd3e5d46..00000000 --- a/llvm/include/llvm/MC/MCDisassembler/MCExternalSymbolizer.h +++ /dev/null @@ -1,58 +0,0 @@ -//===-- llvm/MC/MCExternalSymbolizer.h - ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MCExternalSymbolizer class, which -// enables library users to provide callbacks (through the C API) to do the -// symbolization externally. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCDISASSEMBLER_MCEXTERNALSYMBOLIZER_H -#define LLVM_MC_MCDISASSEMBLER_MCEXTERNALSYMBOLIZER_H - -#include "llvm-c/Disassembler.h" -#include "llvm/MC/MCDisassembler/MCSymbolizer.h" -#include - -namespace llvm { - -/// \brief Symbolize using user-provided, C API, callbacks. -/// -/// See llvm-c/Disassembler.h. -class MCExternalSymbolizer : public MCSymbolizer { -protected: - /// \name Hooks for symbolic disassembly via the public 'C' interface. - /// @{ - /// The function to get the symbolic information for operands. - LLVMOpInfoCallback GetOpInfo; - /// The function to lookup a symbol name. - LLVMSymbolLookupCallback SymbolLookUp; - /// The pointer to the block of symbolic information for above call back. - void *DisInfo; - /// @} - -public: - MCExternalSymbolizer(MCContext &Ctx, - std::unique_ptr RelInfo, - LLVMOpInfoCallback getOpInfo, - LLVMSymbolLookupCallback symbolLookUp, void *disInfo) - : MCSymbolizer(Ctx, std::move(RelInfo)), GetOpInfo(getOpInfo), - SymbolLookUp(symbolLookUp), DisInfo(disInfo) {} - - bool tryAddingSymbolicOperand(MCInst &MI, raw_ostream &CommentStream, - int64_t Value, uint64_t Address, bool IsBranch, - uint64_t Offset, uint64_t InstSize) override; - void tryAddingPcLoadReferenceComment(raw_ostream &CommentStream, - int64_t Value, - uint64_t Address) override; -}; - -} - -#endif diff --git a/llvm/include/llvm/MC/MCDisassembler/MCRelocationInfo.h b/llvm/include/llvm/MC/MCDisassembler/MCRelocationInfo.h deleted file mode 100644 index 25334f75..00000000 --- a/llvm/include/llvm/MC/MCDisassembler/MCRelocationInfo.h +++ /dev/null @@ -1,51 +0,0 @@ -//==-- llvm/MC/MCRelocationInfo.h --------------------------------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MCRelocationInfo class, which provides methods to -// create MCExprs from relocations, either found in an object::ObjectFile -// (object::RelocationRef), or provided through the C API. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H -#define LLVM_MC_MCDISASSEMBLER_MCRELOCATIONINFO_H - -#include "llvm/Support/Compiler.h" - -namespace llvm { - -namespace object { -class RelocationRef; -} -class MCExpr; -class MCContext; - -/// \brief Create MCExprs from relocations found in an object file. -class MCRelocationInfo { - MCRelocationInfo(const MCRelocationInfo &) = delete; - void operator=(const MCRelocationInfo &) = delete; - -protected: - MCContext &Ctx; - -public: - MCRelocationInfo(MCContext &Ctx); - virtual ~MCRelocationInfo(); - - /// \brief Create an MCExpr for the target-specific \p VariantKind. - /// The VariantKinds are defined in llvm-c/Disassembler.h. - /// Used by MCExternalSymbolizer. - /// \returns If possible, an MCExpr corresponding to VariantKind, else 0. - virtual const MCExpr *createExprForCAPIVariantKind(const MCExpr *SubExpr, - unsigned VariantKind); -}; - -} - -#endif diff --git a/llvm/include/llvm/MC/MCDisassembler/MCSymbolizer.h b/llvm/include/llvm/MC/MCDisassembler/MCSymbolizer.h deleted file mode 100644 index 713467c0..00000000 --- a/llvm/include/llvm/MC/MCDisassembler/MCSymbolizer.h +++ /dev/null @@ -1,85 +0,0 @@ -//===-- llvm/MC/MCSymbolizer.h - MCSymbolizer class -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MCSymbolizer class, which is used -// to symbolize instructions decoded from an object, that is, transform their -// immediate operands to MCExprs. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCDISASSEMBLER_MCSYMBOLIZER_H -#define LLVM_MC_MCDISASSEMBLER_MCSYMBOLIZER_H - -#include "llvm/MC/MCDisassembler/MCRelocationInfo.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/DataTypes.h" -#include -#include - -namespace llvm { - -class MCContext; -class MCInst; -class raw_ostream; - -/// \brief Symbolize and annotate disassembled instructions. -/// -/// For now this mimics the old symbolization logic (from both ARM and x86), that -/// relied on user-provided (C API) callbacks to do the actual symbol lookup in -/// the object file. This was moved to MCExternalSymbolizer. -/// A better API would not rely on actually calling the two methods here from -/// inside each disassembler, but would use the instr info to determine what -/// operands are actually symbolizable, and in what way. I don't think this -/// information exists right now. -class MCSymbolizer { - MCSymbolizer(const MCSymbolizer &) = delete; - void operator=(const MCSymbolizer &) = delete; - -protected: - MCContext &Ctx; - std::unique_ptr RelInfo; - -public: - /// \brief Construct an MCSymbolizer, taking ownership of \p RelInfo. - MCSymbolizer(MCContext &Ctx, std::unique_ptr RelInfo) - : Ctx(Ctx), RelInfo(std::move(RelInfo)) { - } - - virtual ~MCSymbolizer(); - - /// \brief Try to add a symbolic operand instead of \p Value to the MCInst. - /// - /// Instead of having a difficult to read immediate, a symbolic operand would - /// represent this immediate in a more understandable way, for instance as a - /// symbol or an offset from a symbol. Relocations can also be used to enrich - /// the symbolic expression. - /// \param Inst - The MCInst where to insert the symbolic operand. - /// \param cStream - Stream to print comments and annotations on. - /// \param Value - Operand value, pc-adjusted by the caller if necessary. - /// \param Address - Load address of the instruction. - /// \param IsBranch - Is the instruction a branch? - /// \param Offset - Byte offset of the operand inside the inst. - /// \param InstSize - Size of the instruction in bytes. - /// \return Whether a symbolic operand was added. - virtual bool tryAddingSymbolicOperand(MCInst &Inst, raw_ostream &cStream, - int64_t Value, uint64_t Address, - bool IsBranch, uint64_t Offset, - uint64_t InstSize) = 0; - - /// \brief Try to add a comment on the PC-relative load. - /// For instance, in Mach-O, this is used to add annotations to instructions - /// that use C string literals, as found in __cstring. - virtual void tryAddingPcLoadReferenceComment(raw_ostream &cStream, - int64_t Value, - uint64_t Address) = 0; -}; - -} - -#endif diff --git a/llvm/include/llvm/MC/MCDwarf.h b/llvm/include/llvm/MC/MCDwarf.h deleted file mode 100644 index 0c555d37..00000000 --- a/llvm/include/llvm/MC/MCDwarf.h +++ /dev/null @@ -1,521 +0,0 @@ -//===- MCDwarf.h - Machine Code Dwarf support -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MCDwarfFile to support the dwarf -// .file directive and the .loc directive. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCDWARF_H -#define LLVM_MC_MCDWARF_H - -#include "llvm/ADT/MapVector.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/MC/MCSection.h" -#include "llvm/Support/Dwarf.h" -#include -#include -#include - -namespace llvm { -template class ArrayRef; -class raw_ostream; -class MCAsmBackend; -class MCContext; -class MCObjectStreamer; -class MCStreamer; -class MCSymbol; -class SourceMgr; -class SMLoc; - -/// \brief Instances of this class represent the name of the dwarf -/// .file directive and its associated dwarf file number in the MC file, -/// and MCDwarfFile's are created and uniqued by the MCContext class where -/// the file number for each is its index into the vector of DwarfFiles (note -/// index 0 is not used and not a valid dwarf file number). -struct MCDwarfFile { - // \brief The base name of the file without its directory path. - // The StringRef references memory allocated in the MCContext. - std::string Name; - - // \brief The index into the list of directory names for this file name. - unsigned DirIndex; -}; - -/// \brief Instances of this class represent the information from a -/// dwarf .loc directive. -class MCDwarfLoc { - uint32_t FileNum; - uint32_t Line; - uint16_t Column; - // Flags (see #define's below) - uint8_t Flags; - uint8_t Isa; - uint32_t Discriminator; - -// Flag that indicates the initial value of the is_stmt_start flag. -#define DWARF2_LINE_DEFAULT_IS_STMT 1 - -#define DWARF2_FLAG_IS_STMT (1 << 0) -#define DWARF2_FLAG_BASIC_BLOCK (1 << 1) -#define DWARF2_FLAG_PROLOGUE_END (1 << 2) -#define DWARF2_FLAG_EPILOGUE_BEGIN (1 << 3) - -private: // MCContext manages these - friend class MCContext; - friend class MCDwarfLineEntry; - MCDwarfLoc(unsigned fileNum, unsigned line, unsigned column, unsigned flags, - unsigned isa, unsigned discriminator) - : FileNum(fileNum), Line(line), Column(column), Flags(flags), Isa(isa), - Discriminator(discriminator) {} - - // Allow the default copy constructor and assignment operator to be used - // for an MCDwarfLoc object. - -public: - /// \brief Get the FileNum of this MCDwarfLoc. - unsigned getFileNum() const { return FileNum; } - - /// \brief Get the Line of this MCDwarfLoc. - unsigned getLine() const { return Line; } - - /// \brief Get the Column of this MCDwarfLoc. - unsigned getColumn() const { return Column; } - - /// \brief Get the Flags of this MCDwarfLoc. - unsigned getFlags() const { return Flags; } - - /// \brief Get the Isa of this MCDwarfLoc. - unsigned getIsa() const { return Isa; } - - /// \brief Get the Discriminator of this MCDwarfLoc. - unsigned getDiscriminator() const { return Discriminator; } - - /// \brief Set the FileNum of this MCDwarfLoc. - void setFileNum(unsigned fileNum) { FileNum = fileNum; } - - /// \brief Set the Line of this MCDwarfLoc. - void setLine(unsigned line) { Line = line; } - - /// \brief Set the Column of this MCDwarfLoc. - void setColumn(unsigned column) { - assert(column <= UINT16_MAX); - Column = column; - } - - /// \brief Set the Flags of this MCDwarfLoc. - void setFlags(unsigned flags) { - assert(flags <= UINT8_MAX); - Flags = flags; - } - - /// \brief Set the Isa of this MCDwarfLoc. - void setIsa(unsigned isa) { - assert(isa <= UINT8_MAX); - Isa = isa; - } - - /// \brief Set the Discriminator of this MCDwarfLoc. - void setDiscriminator(unsigned discriminator) { - Discriminator = discriminator; - } -}; - -/// \brief Instances of this class represent the line information for -/// the dwarf line table entries. Which is created after a machine -/// instruction is assembled and uses an address from a temporary label -/// created at the current address in the current section and the info from -/// the last .loc directive seen as stored in the context. -class MCDwarfLineEntry : public MCDwarfLoc { - MCSymbol *Label; - -private: - // Allow the default copy constructor and assignment operator to be used - // for an MCDwarfLineEntry object. - -public: - // Constructor to create an MCDwarfLineEntry given a symbol and the dwarf loc. - MCDwarfLineEntry(MCSymbol *label, const MCDwarfLoc loc) - : MCDwarfLoc(loc), Label(label) {} - - MCSymbol *getLabel() const { return Label; } - - // This is called when an instruction is assembled into the specified - // section and if there is information from the last .loc directive that - // has yet to have a line entry made for it is made. - static void Make(MCObjectStreamer *MCOS, MCSection *Section); -}; - -/// \brief Instances of this class represent the line information for a compile -/// unit where machine instructions have been assembled after seeing .loc -/// directives. This is the information used to build the dwarf line -/// table for a section. -class MCLineSection { -public: - // \brief Add an entry to this MCLineSection's line entries. - void addLineEntry(const MCDwarfLineEntry &LineEntry, MCSection *Sec) { - MCLineDivisions[Sec].push_back(LineEntry); - } - - typedef std::vector MCDwarfLineEntryCollection; - typedef MCDwarfLineEntryCollection::iterator iterator; - typedef MCDwarfLineEntryCollection::const_iterator const_iterator; - typedef MapVector MCLineDivisionMap; - -private: - // A collection of MCDwarfLineEntry for each section. - MCLineDivisionMap MCLineDivisions; - -public: - // Returns the collection of MCDwarfLineEntry for a given Compile Unit ID. - const MCLineDivisionMap &getMCLineEntries() const { - return MCLineDivisions; - } -}; - -struct MCDwarfLineTableParams { - /// First special line opcode - leave room for the standard opcodes. - /// Note: If you want to change this, you'll have to update the - /// "StandardOpcodeLengths" table that is emitted in - /// \c Emit(). - uint8_t DWARF2LineOpcodeBase = 13; - /// Minimum line offset in a special line info. opcode. The value - /// -5 was chosen to give a reasonable range of values. - int8_t DWARF2LineBase = -5; - /// Range of line offsets in a special line info. opcode. - uint8_t DWARF2LineRange = 14; -}; - -struct MCDwarfLineTableHeader { - MCSymbol *Label; - SmallVector MCDwarfDirs; - SmallVector MCDwarfFiles; - StringMap SourceIdMap; - StringRef CompilationDir; - - MCDwarfLineTableHeader() : Label(nullptr) {} - unsigned getFile(StringRef &Directory, StringRef &FileName, - unsigned FileNumber = 0); - std::pair Emit(MCStreamer *MCOS, - MCDwarfLineTableParams Params) const; - std::pair - Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params, - ArrayRef SpecialOpcodeLengths) const; -}; - -class MCDwarfDwoLineTable { - MCDwarfLineTableHeader Header; -public: - void setCompilationDir(StringRef CompilationDir) { - Header.CompilationDir = CompilationDir; - } - unsigned getFile(StringRef Directory, StringRef FileName) { - return Header.getFile(Directory, FileName); - } - void Emit(MCStreamer &MCOS, MCDwarfLineTableParams Params) const; -}; - -class MCDwarfLineTable { - MCDwarfLineTableHeader Header; - MCLineSection MCLineSections; - -public: - // This emits the Dwarf file and the line tables for all Compile Units. - static void Emit(MCObjectStreamer *MCOS, MCDwarfLineTableParams Params); - - // This emits the Dwarf file and the line tables for a given Compile Unit. - void EmitCU(MCObjectStreamer *MCOS, MCDwarfLineTableParams Params) const; - - unsigned getFile(StringRef &Directory, StringRef &FileName, - unsigned FileNumber = 0); - - MCSymbol *getLabel() const { - return Header.Label; - } - - void setLabel(MCSymbol *Label) { - Header.Label = Label; - } - - void setCompilationDir(StringRef CompilationDir) { - Header.CompilationDir = CompilationDir; - } - - const SmallVectorImpl &getMCDwarfDirs() const { - return Header.MCDwarfDirs; - } - - SmallVectorImpl &getMCDwarfDirs() { - return Header.MCDwarfDirs; - } - - const SmallVectorImpl &getMCDwarfFiles() const { - return Header.MCDwarfFiles; - } - - SmallVectorImpl &getMCDwarfFiles() { - return Header.MCDwarfFiles; - } - - const MCLineSection &getMCLineSections() const { - return MCLineSections; - } - MCLineSection &getMCLineSections() { - return MCLineSections; - } -}; - -class MCDwarfLineAddr { -public: - /// Utility function to encode a Dwarf pair of LineDelta and AddrDeltas. - static void Encode(MCContext &Context, MCDwarfLineTableParams Params, - int64_t LineDelta, uint64_t AddrDelta, raw_ostream &OS); - - /// Utility function to emit the encoding to a streamer. - static void Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params, - int64_t LineDelta, uint64_t AddrDelta); -}; - -class MCGenDwarfInfo { -public: - // - // When generating dwarf for assembly source files this emits the Dwarf - // sections. - // - static void Emit(MCStreamer *MCOS); -}; - -// When generating dwarf for assembly source files this is the info that is -// needed to be gathered for each symbol that will have a dwarf label. -class MCGenDwarfLabelEntry { -private: - // Name of the symbol without a leading underbar, if any. - StringRef Name; - // The dwarf file number this symbol is in. - unsigned FileNumber; - // The line number this symbol is at. - unsigned LineNumber; - // The low_pc for the dwarf label is taken from this symbol. - MCSymbol *Label; - -public: - MCGenDwarfLabelEntry(StringRef name, unsigned fileNumber, unsigned lineNumber, - MCSymbol *label) - : Name(name), FileNumber(fileNumber), LineNumber(lineNumber), - Label(label) {} - - StringRef getName() const { return Name; } - unsigned getFileNumber() const { return FileNumber; } - unsigned getLineNumber() const { return LineNumber; } - MCSymbol *getLabel() const { return Label; } - - // This is called when label is created when we are generating dwarf for - // assembly source files. - static void Make(MCSymbol *Symbol, MCStreamer *MCOS, SourceMgr &SrcMgr, - SMLoc &Loc); -}; - -class MCCFIInstruction { -public: - enum OpType { - OpSameValue, - OpRememberState, - OpRestoreState, - OpOffset, - OpDefCfaRegister, - OpDefCfaOffset, - OpDefCfa, - OpRelOffset, - OpAdjustCfaOffset, - OpEscape, - OpRestore, - OpUndefined, - OpRegister, - OpWindowSave, - OpGnuArgsSize - }; - -private: - OpType Operation; - MCSymbol *Label; - unsigned Register; - union { - int Offset; - unsigned Register2; - }; - std::vector Values; - - MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R, int O, StringRef V) - : Operation(Op), Label(L), Register(R), Offset(O), - Values(V.begin(), V.end()) { - assert(Op != OpRegister); - } - - MCCFIInstruction(OpType Op, MCSymbol *L, unsigned R1, unsigned R2) - : Operation(Op), Label(L), Register(R1), Register2(R2) { - assert(Op == OpRegister); - } - -public: - /// \brief .cfi_def_cfa defines a rule for computing CFA as: take address from - /// Register and add Offset to it. - static MCCFIInstruction createDefCfa(MCSymbol *L, unsigned Register, - int Offset) { - return MCCFIInstruction(OpDefCfa, L, Register, -Offset, ""); - } - - /// \brief .cfi_def_cfa_register modifies a rule for computing CFA. From now - /// on Register will be used instead of the old one. Offset remains the same. - static MCCFIInstruction createDefCfaRegister(MCSymbol *L, unsigned Register) { - return MCCFIInstruction(OpDefCfaRegister, L, Register, 0, ""); - } - - /// \brief .cfi_def_cfa_offset modifies a rule for computing CFA. Register - /// remains the same, but offset is new. Note that it is the absolute offset - /// that will be added to a defined register to the compute CFA address. - static MCCFIInstruction createDefCfaOffset(MCSymbol *L, int Offset) { - return MCCFIInstruction(OpDefCfaOffset, L, 0, -Offset, ""); - } - - /// \brief .cfi_adjust_cfa_offset Same as .cfi_def_cfa_offset, but - /// Offset is a relative value that is added/subtracted from the previous - /// offset. - static MCCFIInstruction createAdjustCfaOffset(MCSymbol *L, int Adjustment) { - return MCCFIInstruction(OpAdjustCfaOffset, L, 0, Adjustment, ""); - } - - /// \brief .cfi_offset Previous value of Register is saved at offset Offset - /// from CFA. - static MCCFIInstruction createOffset(MCSymbol *L, unsigned Register, - int Offset) { - return MCCFIInstruction(OpOffset, L, Register, Offset, ""); - } - - /// \brief .cfi_rel_offset Previous value of Register is saved at offset - /// Offset from the current CFA register. This is transformed to .cfi_offset - /// using the known displacement of the CFA register from the CFA. - static MCCFIInstruction createRelOffset(MCSymbol *L, unsigned Register, - int Offset) { - return MCCFIInstruction(OpRelOffset, L, Register, Offset, ""); - } - - /// \brief .cfi_register Previous value of Register1 is saved in - /// register Register2. - static MCCFIInstruction createRegister(MCSymbol *L, unsigned Register1, - unsigned Register2) { - return MCCFIInstruction(OpRegister, L, Register1, Register2); - } - - /// \brief .cfi_window_save SPARC register window is saved. - static MCCFIInstruction createWindowSave(MCSymbol *L) { - return MCCFIInstruction(OpWindowSave, L, 0, 0, ""); - } - - /// \brief .cfi_restore says that the rule for Register is now the same as it - /// was at the beginning of the function, after all initial instructions added - /// by .cfi_startproc were executed. - static MCCFIInstruction createRestore(MCSymbol *L, unsigned Register) { - return MCCFIInstruction(OpRestore, L, Register, 0, ""); - } - - /// \brief .cfi_undefined From now on the previous value of Register can't be - /// restored anymore. - static MCCFIInstruction createUndefined(MCSymbol *L, unsigned Register) { - return MCCFIInstruction(OpUndefined, L, Register, 0, ""); - } - - /// \brief .cfi_same_value Current value of Register is the same as in the - /// previous frame. I.e., no restoration is needed. - static MCCFIInstruction createSameValue(MCSymbol *L, unsigned Register) { - return MCCFIInstruction(OpSameValue, L, Register, 0, ""); - } - - /// \brief .cfi_remember_state Save all current rules for all registers. - static MCCFIInstruction createRememberState(MCSymbol *L) { - return MCCFIInstruction(OpRememberState, L, 0, 0, ""); - } - - /// \brief .cfi_restore_state Restore the previously saved state. - static MCCFIInstruction createRestoreState(MCSymbol *L) { - return MCCFIInstruction(OpRestoreState, L, 0, 0, ""); - } - - /// \brief .cfi_escape Allows the user to add arbitrary bytes to the unwind - /// info. - static MCCFIInstruction createEscape(MCSymbol *L, StringRef Vals) { - return MCCFIInstruction(OpEscape, L, 0, 0, Vals); - } - - /// \brief A special wrapper for .cfi_escape that indicates GNU_ARGS_SIZE - static MCCFIInstruction createGnuArgsSize(MCSymbol *L, int Size) { - return MCCFIInstruction(OpGnuArgsSize, L, 0, Size, ""); - } - - OpType getOperation() const { return Operation; } - MCSymbol *getLabel() const { return Label; } - - unsigned getRegister() const { - assert(Operation == OpDefCfa || Operation == OpOffset || - Operation == OpRestore || Operation == OpUndefined || - Operation == OpSameValue || Operation == OpDefCfaRegister || - Operation == OpRelOffset || Operation == OpRegister); - return Register; - } - - unsigned getRegister2() const { - assert(Operation == OpRegister); - return Register2; - } - - int getOffset() const { - assert(Operation == OpDefCfa || Operation == OpOffset || - Operation == OpRelOffset || Operation == OpDefCfaOffset || - Operation == OpAdjustCfaOffset || Operation == OpGnuArgsSize); - return Offset; - } - - StringRef getValues() const { - assert(Operation == OpEscape); - return StringRef(&Values[0], Values.size()); - } -}; - -struct MCDwarfFrameInfo { - MCDwarfFrameInfo() - : Begin(nullptr), End(nullptr), Personality(nullptr), Lsda(nullptr), - Instructions(), CurrentCfaRegister(0), PersonalityEncoding(), - LsdaEncoding(0), CompactUnwindEncoding(0), IsSignalFrame(false), - IsSimple(false) {} - MCSymbol *Begin; - MCSymbol *End; - const MCSymbol *Personality; - const MCSymbol *Lsda; - std::vector Instructions; - unsigned CurrentCfaRegister; - unsigned PersonalityEncoding; - unsigned LsdaEncoding; - uint32_t CompactUnwindEncoding; - bool IsSignalFrame; - bool IsSimple; -}; - -class MCDwarfFrameEmitter { -public: - // - // This emits the frame info section. - // - static void Emit(MCObjectStreamer &streamer, MCAsmBackend *MAB, bool isEH); - static void EmitAdvanceLoc(MCObjectStreamer &Streamer, uint64_t AddrDelta); - static void EncodeAdvanceLoc(MCContext &Context, uint64_t AddrDelta, - raw_ostream &OS); -}; -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCELFObjectWriter.h b/llvm/include/llvm/MC/MCELFObjectWriter.h deleted file mode 100644 index 376e2182..00000000 --- a/llvm/include/llvm/MC/MCELFObjectWriter.h +++ /dev/null @@ -1,149 +0,0 @@ -//===-- llvm/MC/MCELFObjectWriter.h - ELF Object Writer ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCELFOBJECTWRITER_H -#define LLVM_MC_MCELFOBJECTWRITER_H - -#include "llvm/ADT/Triple.h" -#include "llvm/MC/MCValue.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ELF.h" -#include "llvm/Support/raw_ostream.h" -#include - -namespace llvm { -class MCAssembler; -class MCContext; -class MCFixup; -class MCFragment; -class MCObjectWriter; -class MCSymbol; -class MCSymbolELF; -class MCValue; -class raw_pwrite_stream; - -struct ELFRelocationEntry { - uint64_t Offset; // Where is the relocation. - const MCSymbolELF *Symbol; // The symbol to relocate with. - unsigned Type; // The type of the relocation. - uint64_t Addend; // The addend to use. - const MCSymbolELF *OriginalSymbol; // The original value of Symbol if we changed it. - uint64_t OriginalAddend; // The original value of addend. - - ELFRelocationEntry(uint64_t Offset, const MCSymbolELF *Symbol, unsigned Type, - uint64_t Addend, const MCSymbolELF *OriginalSymbol, - uint64_t OriginalAddend) - : Offset(Offset), Symbol(Symbol), Type(Type), Addend(Addend), - OriginalSymbol(OriginalSymbol), OriginalAddend(OriginalAddend) {} - - void print(raw_ostream &Out) const { - Out << "Off=" << Offset << ", Sym=" << Symbol << ", Type=" << Type - << ", Addend=" << Addend << ", OriginalSymbol=" << OriginalSymbol - << ", OriginalAddend=" << OriginalAddend; - } - void dump() const { print(errs()); } -}; - -class MCELFObjectTargetWriter { - const uint8_t OSABI; - const uint16_t EMachine; - const unsigned HasRelocationAddend : 1; - const unsigned Is64Bit : 1; - const unsigned IsN64 : 1; - -protected: - - MCELFObjectTargetWriter(bool Is64Bit_, uint8_t OSABI_, - uint16_t EMachine_, bool HasRelocationAddend, - bool IsN64=false); - -public: - static uint8_t getOSABI(Triple::OSType OSType) { - switch (OSType) { - case Triple::CloudABI: - return ELF::ELFOSABI_CLOUDABI; - case Triple::PS4: - case Triple::FreeBSD: - return ELF::ELFOSABI_FREEBSD; - default: - return ELF::ELFOSABI_NONE; - } - } - - virtual ~MCELFObjectTargetWriter() {} - - virtual unsigned getRelocType(MCContext &Ctx, const MCValue &Target, - const MCFixup &Fixup, bool IsPCRel) const = 0; - - virtual bool needsRelocateWithSymbol(const MCSymbol &Sym, - unsigned Type) const; - - virtual void sortRelocs(const MCAssembler &Asm, - std::vector &Relocs); - - /// \name Accessors - /// @{ - uint8_t getOSABI() const { return OSABI; } - uint16_t getEMachine() const { return EMachine; } - bool hasRelocationAddend() const { return HasRelocationAddend; } - bool is64Bit() const { return Is64Bit; } - bool isN64() const { return IsN64; } - /// @} - - // Instead of changing everyone's API we pack the N64 Type fields - // into the existing 32 bit data unsigned. -#define R_TYPE_SHIFT 0 -#define R_TYPE_MASK 0xffffff00 -#define R_TYPE2_SHIFT 8 -#define R_TYPE2_MASK 0xffff00ff -#define R_TYPE3_SHIFT 16 -#define R_TYPE3_MASK 0xff00ffff -#define R_SSYM_SHIFT 24 -#define R_SSYM_MASK 0x00ffffff - - // N64 relocation type accessors - uint8_t getRType(uint32_t Type) const { - return (unsigned)((Type >> R_TYPE_SHIFT) & 0xff); - } - uint8_t getRType2(uint32_t Type) const { - return (unsigned)((Type >> R_TYPE2_SHIFT) & 0xff); - } - uint8_t getRType3(uint32_t Type) const { - return (unsigned)((Type >> R_TYPE3_SHIFT) & 0xff); - } - uint8_t getRSsym(uint32_t Type) const { - return (unsigned)((Type >> R_SSYM_SHIFT) & 0xff); - } - - // N64 relocation type setting - unsigned setRType(unsigned Value, unsigned Type) const { - return ((Type & R_TYPE_MASK) | ((Value & 0xff) << R_TYPE_SHIFT)); - } - unsigned setRType2(unsigned Value, unsigned Type) const { - return (Type & R_TYPE2_MASK) | ((Value & 0xff) << R_TYPE2_SHIFT); - } - unsigned setRType3(unsigned Value, unsigned Type) const { - return (Type & R_TYPE3_MASK) | ((Value & 0xff) << R_TYPE3_SHIFT); - } - unsigned setRSsym(unsigned Value, unsigned Type) const { - return (Type & R_SSYM_MASK) | ((Value & 0xff) << R_SSYM_SHIFT); - } -}; - -/// \brief Construct a new ELF writer instance. -/// -/// \param MOTW - The target specific ELF writer subclass. -/// \param OS - The stream to write to. -/// \returns The constructed object writer. -MCObjectWriter *createELFObjectWriter(MCELFObjectTargetWriter *MOTW, - raw_pwrite_stream &OS, - bool IsLittleEndian); -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCELFStreamer.h b/llvm/include/llvm/MC/MCELFStreamer.h deleted file mode 100644 index b108f0df..00000000 --- a/llvm/include/llvm/MC/MCELFStreamer.h +++ /dev/null @@ -1,108 +0,0 @@ -//===- MCELFStreamer.h - MCStreamer ELF Object File Interface ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCELFSTREAMER_H -#define LLVM_MC_MCELFSTREAMER_H - -#include "llvm/ADT/SmallPtrSet.h" -#include "llvm/MC/MCDirectives.h" -#include "llvm/MC/MCObjectStreamer.h" -#include "llvm/MC/SectionKind.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { -class MCAsmBackend; -class MCAssembler; -class MCCodeEmitter; -class MCExpr; -class MCInst; -class raw_ostream; - -class MCELFStreamer : public MCObjectStreamer { -public: - MCELFStreamer(MCContext &Context, MCAsmBackend &TAB, raw_pwrite_stream &OS, - MCCodeEmitter *Emitter) - : MCObjectStreamer(Context, TAB, OS, Emitter), SeenIdent(false) {} - - ~MCELFStreamer() override; - - /// state management - void reset() override { - SeenIdent = false; - BundleGroups.clear(); - MCObjectStreamer::reset(); - } - - /// \name MCStreamer Interface - /// @{ - - void InitSections(bool NoExecStack) override; - void ChangeSection(MCSection *Section, const MCExpr *Subsection) override; - void EmitLabel(MCSymbol *Symbol) override; - void EmitAssemblerFlag(MCAssemblerFlag Flag) override; - void EmitThumbFunc(MCSymbol *Func) override; - void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override; - bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override; - void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override; - void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment) override; - void BeginCOFFSymbolDef(const MCSymbol *Symbol) override; - void EmitCOFFSymbolStorageClass(int StorageClass) override; - void EmitCOFFSymbolType(int Type) override; - void EndCOFFSymbolDef() override; - - void emitELFSize(MCSymbolELF *Symbol, const MCExpr *Value) override; - - void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment) override; - - void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr, - uint64_t Size = 0, unsigned ByteAlignment = 0) override; - void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment = 0) override; - void EmitValueImpl(const MCExpr *Value, unsigned Size, - SMLoc Loc = SMLoc()) override; - - void EmitFileDirective(StringRef Filename) override; - - void EmitIdent(StringRef IdentString) override; - - void EmitValueToAlignment(unsigned, int64_t, unsigned, unsigned) override; - - void FinishImpl() override; - - void EmitBundleAlignMode(unsigned AlignPow2) override; - void EmitBundleLock(bool AlignToEnd) override; - void EmitBundleUnlock() override; - -private: - bool isBundleLocked() const; - void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &) override; - void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override; - - void fixSymbolsInTLSFixups(const MCExpr *expr); - - /// \brief Merge the content of the fragment \p EF into the fragment \p DF. - void mergeFragment(MCDataFragment *, MCDataFragment *); - - bool SeenIdent; - - /// BundleGroups - The stack of fragments holding the bundle-locked - /// instructions. - llvm::SmallVector BundleGroups; -}; - -MCELFStreamer *createARMELFStreamer(MCContext &Context, MCAsmBackend &TAB, - raw_pwrite_stream &OS, - MCCodeEmitter *Emitter, bool RelaxAll, - bool IsThumb); - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCExpr.h b/llvm/include/llvm/MC/MCExpr.h deleted file mode 100644 index b0e47365..00000000 --- a/llvm/include/llvm/MC/MCExpr.h +++ /dev/null @@ -1,548 +0,0 @@ -//===- MCExpr.h - Assembly Level Expressions --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCEXPR_H -#define LLVM_MC_MCEXPR_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/Support/Casting.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { -class MCAsmInfo; -class MCAsmLayout; -class MCAssembler; -class MCContext; -class MCFixup; -class MCFragment; -class MCSection; -class MCStreamer; -class MCSymbol; -class MCValue; -class raw_ostream; -class StringRef; -typedef DenseMap SectionAddrMap; - -/// \brief Base class for the full range of assembler expressions which are -/// needed for parsing. -class MCExpr { -public: - enum ExprKind { - Binary, ///< Binary expressions. - Constant, ///< Constant expressions. - SymbolRef, ///< References to labels and assigned expressions. - Unary, ///< Unary expressions. - Target ///< Target specific expression. - }; - -private: - ExprKind Kind; - - MCExpr(const MCExpr&) = delete; - void operator=(const MCExpr&) = delete; - - bool evaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm, - const MCAsmLayout *Layout, - const SectionAddrMap *Addrs) const; - - bool evaluateAsAbsolute(int64_t &Res, const MCAssembler *Asm, - const MCAsmLayout *Layout, - const SectionAddrMap *Addrs, bool InSet) const; - -protected: - explicit MCExpr(ExprKind Kind) : Kind(Kind) {} - - bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm, - const MCAsmLayout *Layout, - const MCFixup *Fixup, - const SectionAddrMap *Addrs, bool InSet) const; - -public: - /// \name Accessors - /// @{ - - ExprKind getKind() const { return Kind; } - - /// @} - /// \name Utility Methods - /// @{ - - void print(raw_ostream &OS, const MCAsmInfo *MAI, - bool InParens = false) const; - void dump() const; - - /// @} - /// \name Expression Evaluation - /// @{ - - /// \brief Try to evaluate the expression to an absolute value. - /// - /// \param Res - The absolute value, if evaluation succeeds. - /// \param Layout - The assembler layout object to use for evaluating symbol - /// values. If not given, then only non-symbolic expressions will be - /// evaluated. - /// \return - True on success. - bool evaluateAsAbsolute(int64_t &Res, const MCAsmLayout &Layout, - const SectionAddrMap &Addrs) const; - bool evaluateAsAbsolute(int64_t &Res) const; - bool evaluateAsAbsolute(int64_t &Res, const MCAssembler &Asm) const; - bool evaluateAsAbsolute(int64_t &Res, const MCAsmLayout &Layout) const; - - bool evaluateKnownAbsolute(int64_t &Res, const MCAsmLayout &Layout) const; - - /// \brief Try to evaluate the expression to a relocatable value, i.e. an - /// expression of the fixed form (a - b + constant). - /// - /// \param Res - The relocatable value, if evaluation succeeds. - /// \param Layout - The assembler layout object to use for evaluating values. - /// \param Fixup - The Fixup object if available. - /// \return - True on success. - bool evaluateAsRelocatable(MCValue &Res, const MCAsmLayout *Layout, - const MCFixup *Fixup) const; - - /// \brief Try to evaluate the expression to the form (a - b + constant) where - /// neither a nor b are variables. - /// - /// This is a more aggressive variant of evaluateAsRelocatable. The intended - /// use is for when relocations are not available, like the .size directive. - bool evaluateAsValue(MCValue &Res, const MCAsmLayout &Layout) const; - - /// \brief Find the "associated section" for this expression, which is - /// currently defined as the absolute section for constants, or - /// otherwise the section associated with the first defined symbol in the - /// expression. - MCFragment *findAssociatedFragment() const; - - /// @} -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const MCExpr &E) { - E.print(OS, nullptr); - return OS; -} - -//// \brief Represent a constant integer expression. -class MCConstantExpr : public MCExpr { - int64_t Value; - - explicit MCConstantExpr(int64_t Value) - : MCExpr(MCExpr::Constant), Value(Value) {} - -public: - /// \name Construction - /// @{ - - static const MCConstantExpr *create(int64_t Value, MCContext &Ctx); - - /// @} - /// \name Accessors - /// @{ - - int64_t getValue() const { return Value; } - - /// @} - - static bool classof(const MCExpr *E) { - return E->getKind() == MCExpr::Constant; - } -}; - -/// \brief Represent a reference to a symbol from inside an expression. -/// -/// A symbol reference in an expression may be a use of a label, a use of an -/// assembler variable (defined constant), or constitute an implicit definition -/// of the symbol as external. -class MCSymbolRefExpr : public MCExpr { -public: - enum VariantKind : uint16_t { - VK_None, - VK_Invalid, - - VK_GOT, - VK_GOTOFF, - VK_GOTREL, - VK_GOTPCREL, - VK_GOTTPOFF, - VK_INDNTPOFF, - VK_NTPOFF, - VK_GOTNTPOFF, - VK_PLT, - VK_TLSGD, - VK_TLSLD, - VK_TLSLDM, - VK_TPOFF, - VK_DTPOFF, - VK_TLSCALL, // symbol(tlscall) - VK_TLSDESC, // symbol(tlsdesc) - VK_TLVP, // Mach-O thread local variable relocations - VK_TLVPPAGE, - VK_TLVPPAGEOFF, - VK_PAGE, - VK_PAGEOFF, - VK_GOTPAGE, - VK_GOTPAGEOFF, - VK_SECREL, - VK_SIZE, // symbol@SIZE - VK_WEAKREF, // The link between the symbols in .weakref foo, bar - - VK_ARM_NONE, - VK_ARM_GOT_PREL, - VK_ARM_TARGET1, - VK_ARM_TARGET2, - VK_ARM_PREL31, - VK_ARM_SBREL, // symbol(sbrel) - VK_ARM_TLSLDO, // symbol(tlsldo) - VK_ARM_TLSDESCSEQ, - - VK_PPC_LO, // symbol@l - VK_PPC_HI, // symbol@h - VK_PPC_HA, // symbol@ha - VK_PPC_HIGHER, // symbol@higher - VK_PPC_HIGHERA, // symbol@highera - VK_PPC_HIGHEST, // symbol@highest - VK_PPC_HIGHESTA, // symbol@highesta - VK_PPC_GOT_LO, // symbol@got@l - VK_PPC_GOT_HI, // symbol@got@h - VK_PPC_GOT_HA, // symbol@got@ha - VK_PPC_TOCBASE, // symbol@tocbase - VK_PPC_TOC, // symbol@toc - VK_PPC_TOC_LO, // symbol@toc@l - VK_PPC_TOC_HI, // symbol@toc@h - VK_PPC_TOC_HA, // symbol@toc@ha - VK_PPC_DTPMOD, // symbol@dtpmod - VK_PPC_TPREL_LO, // symbol@tprel@l - VK_PPC_TPREL_HI, // symbol@tprel@h - VK_PPC_TPREL_HA, // symbol@tprel@ha - VK_PPC_TPREL_HIGHER, // symbol@tprel@higher - VK_PPC_TPREL_HIGHERA, // symbol@tprel@highera - VK_PPC_TPREL_HIGHEST, // symbol@tprel@highest - VK_PPC_TPREL_HIGHESTA, // symbol@tprel@highesta - VK_PPC_DTPREL_LO, // symbol@dtprel@l - VK_PPC_DTPREL_HI, // symbol@dtprel@h - VK_PPC_DTPREL_HA, // symbol@dtprel@ha - VK_PPC_DTPREL_HIGHER, // symbol@dtprel@higher - VK_PPC_DTPREL_HIGHERA, // symbol@dtprel@highera - VK_PPC_DTPREL_HIGHEST, // symbol@dtprel@highest - VK_PPC_DTPREL_HIGHESTA,// symbol@dtprel@highesta - VK_PPC_GOT_TPREL, // symbol@got@tprel - VK_PPC_GOT_TPREL_LO, // symbol@got@tprel@l - VK_PPC_GOT_TPREL_HI, // symbol@got@tprel@h - VK_PPC_GOT_TPREL_HA, // symbol@got@tprel@ha - VK_PPC_GOT_DTPREL, // symbol@got@dtprel - VK_PPC_GOT_DTPREL_LO, // symbol@got@dtprel@l - VK_PPC_GOT_DTPREL_HI, // symbol@got@dtprel@h - VK_PPC_GOT_DTPREL_HA, // symbol@got@dtprel@ha - VK_PPC_TLS, // symbol@tls - VK_PPC_GOT_TLSGD, // symbol@got@tlsgd - VK_PPC_GOT_TLSGD_LO, // symbol@got@tlsgd@l - VK_PPC_GOT_TLSGD_HI, // symbol@got@tlsgd@h - VK_PPC_GOT_TLSGD_HA, // symbol@got@tlsgd@ha - VK_PPC_TLSGD, // symbol@tlsgd - VK_PPC_GOT_TLSLD, // symbol@got@tlsld - VK_PPC_GOT_TLSLD_LO, // symbol@got@tlsld@l - VK_PPC_GOT_TLSLD_HI, // symbol@got@tlsld@h - VK_PPC_GOT_TLSLD_HA, // symbol@got@tlsld@ha - VK_PPC_TLSLD, // symbol@tlsld - VK_PPC_LOCAL, // symbol@local - - VK_COFF_IMGREL32, // symbol@imgrel (image-relative) - - VK_Hexagon_PCREL, - VK_Hexagon_LO16, - VK_Hexagon_HI16, - VK_Hexagon_GPREL, - VK_Hexagon_GD_GOT, - VK_Hexagon_LD_GOT, - VK_Hexagon_GD_PLT, - VK_Hexagon_LD_PLT, - VK_Hexagon_IE, - VK_Hexagon_IE_GOT, - - VK_WebAssembly_FUNCTION, // Function table index, rather than virtual addr - - VK_TPREL, - VK_DTPREL - }; - -private: - /// The symbol reference modifier. - const VariantKind Kind; - - /// Specifies how the variant kind should be printed. - const unsigned UseParensForSymbolVariant : 1; - - // FIXME: Remove this bit. - const unsigned HasSubsectionsViaSymbols : 1; - - /// The symbol being referenced. - const MCSymbol *Symbol; - - explicit MCSymbolRefExpr(const MCSymbol *Symbol, VariantKind Kind, - const MCAsmInfo *MAI); - -public: - /// \name Construction - /// @{ - - static const MCSymbolRefExpr *create(const MCSymbol *Symbol, MCContext &Ctx) { - return MCSymbolRefExpr::create(Symbol, VK_None, Ctx); - } - - static const MCSymbolRefExpr *create(const MCSymbol *Symbol, VariantKind Kind, - MCContext &Ctx); - static const MCSymbolRefExpr *create(StringRef Name, VariantKind Kind, - MCContext &Ctx); - - /// @} - /// \name Accessors - /// @{ - - const MCSymbol &getSymbol() const { return *Symbol; } - - VariantKind getKind() const { return Kind; } - - void printVariantKind(raw_ostream &OS) const; - - bool hasSubsectionsViaSymbols() const { return HasSubsectionsViaSymbols; } - - /// @} - /// \name Static Utility Functions - /// @{ - - static StringRef getVariantKindName(VariantKind Kind); - - static VariantKind getVariantKindForName(StringRef Name); - - /// @} - - static bool classof(const MCExpr *E) { - return E->getKind() == MCExpr::SymbolRef; - } -}; - -/// \brief Unary assembler expressions. -class MCUnaryExpr : public MCExpr { -public: - enum Opcode { - LNot, ///< Logical negation. - Minus, ///< Unary minus. - Not, ///< Bitwise negation. - Plus ///< Unary plus. - }; - -private: - Opcode Op; - const MCExpr *Expr; - - MCUnaryExpr(Opcode Op, const MCExpr *Expr) - : MCExpr(MCExpr::Unary), Op(Op), Expr(Expr) {} - -public: - /// \name Construction - /// @{ - - static const MCUnaryExpr *create(Opcode Op, const MCExpr *Expr, - MCContext &Ctx); - static const MCUnaryExpr *createLNot(const MCExpr *Expr, MCContext &Ctx) { - return create(LNot, Expr, Ctx); - } - static const MCUnaryExpr *createMinus(const MCExpr *Expr, MCContext &Ctx) { - return create(Minus, Expr, Ctx); - } - static const MCUnaryExpr *createNot(const MCExpr *Expr, MCContext &Ctx) { - return create(Not, Expr, Ctx); - } - static const MCUnaryExpr *createPlus(const MCExpr *Expr, MCContext &Ctx) { - return create(Plus, Expr, Ctx); - } - - /// @} - /// \name Accessors - /// @{ - - /// \brief Get the kind of this unary expression. - Opcode getOpcode() const { return Op; } - - /// \brief Get the child of this unary expression. - const MCExpr *getSubExpr() const { return Expr; } - - /// @} - - static bool classof(const MCExpr *E) { - return E->getKind() == MCExpr::Unary; - } -}; - -/// \brief Binary assembler expressions. -class MCBinaryExpr : public MCExpr { -public: - enum Opcode { - Add, ///< Addition. - And, ///< Bitwise and. - Div, ///< Signed division. - EQ, ///< Equality comparison. - GT, ///< Signed greater than comparison (result is either 0 or some - ///< target-specific non-zero value) - GTE, ///< Signed greater than or equal comparison (result is either 0 or - ///< some target-specific non-zero value). - LAnd, ///< Logical and. - LOr, ///< Logical or. - LT, ///< Signed less than comparison (result is either 0 or - ///< some target-specific non-zero value). - LTE, ///< Signed less than or equal comparison (result is either 0 or - ///< some target-specific non-zero value). - Mod, ///< Signed remainder. - Mul, ///< Multiplication. - NE, ///< Inequality comparison. - Or, ///< Bitwise or. - Shl, ///< Shift left. - AShr, ///< Arithmetic shift right. - LShr, ///< Logical shift right. - Sub, ///< Subtraction. - Xor ///< Bitwise exclusive or. - }; - -private: - Opcode Op; - const MCExpr *LHS, *RHS; - - MCBinaryExpr(Opcode Op, const MCExpr *LHS, const MCExpr *RHS) - : MCExpr(MCExpr::Binary), Op(Op), LHS(LHS), RHS(RHS) {} - -public: - /// \name Construction - /// @{ - - static const MCBinaryExpr *create(Opcode Op, const MCExpr *LHS, - const MCExpr *RHS, MCContext &Ctx); - static const MCBinaryExpr *createAdd(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(Add, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createAnd(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(And, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createDiv(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(Div, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createEQ(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(EQ, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createGT(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(GT, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createGTE(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(GTE, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createLAnd(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(LAnd, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createLOr(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(LOr, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createLT(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(LT, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createLTE(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(LTE, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createMod(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(Mod, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createMul(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(Mul, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createNE(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(NE, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createOr(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(Or, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createShl(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(Shl, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createAShr(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(AShr, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createLShr(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(LShr, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createSub(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(Sub, LHS, RHS, Ctx); - } - static const MCBinaryExpr *createXor(const MCExpr *LHS, const MCExpr *RHS, - MCContext &Ctx) { - return create(Xor, LHS, RHS, Ctx); - } - - /// @} - /// \name Accessors - /// @{ - - /// \brief Get the kind of this binary expression. - Opcode getOpcode() const { return Op; } - - /// \brief Get the left-hand side expression of the binary operator. - const MCExpr *getLHS() const { return LHS; } - - /// \brief Get the right-hand side expression of the binary operator. - const MCExpr *getRHS() const { return RHS; } - - /// @} - - static bool classof(const MCExpr *E) { - return E->getKind() == MCExpr::Binary; - } -}; - -/// \brief This is an extension point for target-specific MCExpr subclasses to -/// implement. -/// -/// NOTE: All subclasses are required to have trivial destructors because -/// MCExprs are bump pointer allocated and not destructed. -class MCTargetExpr : public MCExpr { - virtual void anchor(); -protected: - MCTargetExpr() : MCExpr(Target) {} - virtual ~MCTargetExpr() {} -public: - virtual void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const = 0; - virtual bool evaluateAsRelocatableImpl(MCValue &Res, - const MCAsmLayout *Layout, - const MCFixup *Fixup) const = 0; - virtual void visitUsedExpr(MCStreamer& Streamer) const = 0; - virtual MCFragment *findAssociatedFragment() const = 0; - - virtual void fixELFSymbolsInTLSFixups(MCAssembler &) const = 0; - - static bool classof(const MCExpr *E) { - return E->getKind() == MCExpr::Target; - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCFixedLenDisassembler.h b/llvm/include/llvm/MC/MCFixedLenDisassembler.h deleted file mode 100644 index ad34d949..00000000 --- a/llvm/include/llvm/MC/MCFixedLenDisassembler.h +++ /dev/null @@ -1,34 +0,0 @@ -//===-- llvm/MC/MCFixedLenDisassembler.h - Decoder driver -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// Fixed length disassembler decoder state machine driver. -//===----------------------------------------------------------------------===// -#ifndef LLVM_MC_MCFIXEDLENDISASSEMBLER_H -#define LLVM_MC_MCFIXEDLENDISASSEMBLER_H - -namespace llvm { - -namespace MCD { -// Disassembler state machine opcodes. -enum DecoderOps { - OPC_ExtractField = 1, // OPC_ExtractField(uint8_t Start, uint8_t Len) - OPC_FilterValue, // OPC_FilterValue(uleb128 Val, uint16_t NumToSkip) - OPC_CheckField, // OPC_CheckField(uint8_t Start, uint8_t Len, - // uleb128 Val, uint16_t NumToSkip) - OPC_CheckPredicate, // OPC_CheckPredicate(uleb128 PIdx, uint16_t NumToSkip) - OPC_Decode, // OPC_Decode(uleb128 Opcode, uleb128 DIdx) - OPC_TryDecode, // OPC_TryDecode(uleb128 Opcode, uleb128 DIdx, - // uint16_t NumToSkip) - OPC_SoftFail, // OPC_SoftFail(uleb128 PMask, uleb128 NMask) - OPC_Fail // OPC_Fail() -}; - -} // namespace MCDecode -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCFixup.h b/llvm/include/llvm/MC/MCFixup.h deleted file mode 100644 index 8ab477c4..00000000 --- a/llvm/include/llvm/MC/MCFixup.h +++ /dev/null @@ -1,113 +0,0 @@ -//===-- llvm/MC/MCFixup.h - Instruction Relocation and Patching -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCFIXUP_H -#define LLVM_MC_MCFIXUP_H - -#include "llvm/MC/MCExpr.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/SMLoc.h" -#include - -namespace llvm { -class MCExpr; - -/// \brief Extensible enumeration to represent the type of a fixup. -enum MCFixupKind { - FK_Data_1 = 0, ///< A one-byte fixup. - FK_Data_2, ///< A two-byte fixup. - FK_Data_4, ///< A four-byte fixup. - FK_Data_8, ///< A eight-byte fixup. - FK_PCRel_1, ///< A one-byte pc relative fixup. - FK_PCRel_2, ///< A two-byte pc relative fixup. - FK_PCRel_4, ///< A four-byte pc relative fixup. - FK_PCRel_8, ///< A eight-byte pc relative fixup. - FK_GPRel_1, ///< A one-byte gp relative fixup. - FK_GPRel_2, ///< A two-byte gp relative fixup. - FK_GPRel_4, ///< A four-byte gp relative fixup. - FK_GPRel_8, ///< A eight-byte gp relative fixup. - FK_SecRel_1, ///< A one-byte section relative fixup. - FK_SecRel_2, ///< A two-byte section relative fixup. - FK_SecRel_4, ///< A four-byte section relative fixup. - FK_SecRel_8, ///< A eight-byte section relative fixup. - - FirstTargetFixupKind = 128, - - // Limit range of target fixups, in case we want to pack more efficiently - // later. - MaxTargetFixupKind = (1 << 8) -}; - -/// \brief Encode information on a single operation to perform on a byte -/// sequence (e.g., an encoded instruction) which requires assemble- or run- -/// time patching. -/// -/// Fixups are used any time the target instruction encoder needs to represent -/// some value in an instruction which is not yet concrete. The encoder will -/// encode the instruction assuming the value is 0, and emit a fixup which -/// communicates to the assembler backend how it should rewrite the encoded -/// value. -/// -/// During the process of relaxation, the assembler will apply fixups as -/// symbolic values become concrete. When relaxation is complete, any remaining -/// fixups become relocations in the object file (or errors, if the fixup cannot -/// be encoded on the target). -class MCFixup { - /// The value to put into the fixup location. The exact interpretation of the - /// expression is target dependent, usually it will be one of the operands to - /// an instruction or an assembler directive. - const MCExpr *Value; - - /// The byte index of start of the relocation inside the encoded instruction. - uint32_t Offset; - - /// The target dependent kind of fixup item this is. The kind is used to - /// determine how the operand value should be encoded into the instruction. - unsigned Kind; - - /// The source location which gave rise to the fixup, if any. - SMLoc Loc; -public: - static MCFixup create(uint32_t Offset, const MCExpr *Value, - MCFixupKind Kind, SMLoc Loc = SMLoc()) { - assert(unsigned(Kind) < MaxTargetFixupKind && "Kind out of range!"); - MCFixup FI; - FI.Value = Value; - FI.Offset = Offset; - FI.Kind = unsigned(Kind); - FI.Loc = Loc; - return FI; - } - - MCFixupKind getKind() const { return MCFixupKind(Kind); } - - uint32_t getOffset() const { return Offset; } - void setOffset(uint32_t Value) { Offset = Value; } - - const MCExpr *getValue() const { return Value; } - - /// \brief Return the generic fixup kind for a value with the given size. It - /// is an error to pass an unsupported size. - static MCFixupKind getKindForSize(unsigned Size, bool isPCRel) { - switch (Size) { - default: llvm_unreachable("Invalid generic fixup size!"); - case 1: return isPCRel ? FK_PCRel_1 : FK_Data_1; - case 2: return isPCRel ? FK_PCRel_2 : FK_Data_2; - case 4: return isPCRel ? FK_PCRel_4 : FK_Data_4; - case 8: return isPCRel ? FK_PCRel_8 : FK_Data_8; - } - } - - SMLoc getLoc() const { return Loc; } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCFixupKindInfo.h b/llvm/include/llvm/MC/MCFixupKindInfo.h deleted file mode 100644 index 58183bd7..00000000 --- a/llvm/include/llvm/MC/MCFixupKindInfo.h +++ /dev/null @@ -1,43 +0,0 @@ -//===-- llvm/MC/MCFixupKindInfo.h - Fixup Descriptors -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCFIXUPKINDINFO_H -#define LLVM_MC_MCFIXUPKINDINFO_H - -namespace llvm { - -/// \brief Target independent information on a fixup kind. -struct MCFixupKindInfo { - enum FixupKindFlags { - /// Is this fixup kind PCrelative? This is used by the assembler backend to - /// evaluate fixup values in a target independent manner when possible. - FKF_IsPCRel = (1 << 0), - - /// Should this fixup kind force a 4-byte aligned effective PC value? - FKF_IsAlignedDownTo32Bits = (1 << 1) - }; - - /// A target specific name for the fixup kind. The names will be unique for - /// distinct kinds on any given target. - const char *Name; - - /// The bit offset to write the relocation into. - unsigned TargetOffset; - - /// The number of bits written by this fixup. The bits are assumed to be - /// contiguous. - unsigned TargetSize; - - /// Flags describing additional information on this fixup kind. - unsigned Flags; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCFragment.h b/llvm/include/llvm/MC/MCFragment.h deleted file mode 100644 index e0a2bfc2..00000000 --- a/llvm/include/llvm/MC/MCFragment.h +++ /dev/null @@ -1,565 +0,0 @@ -//===- MCFragment.h - Fragment type hierarchy -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCFRAGMENT_H -#define LLVM_MC_MCFRAGMENT_H - -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/ADT/iterator.h" -#include "llvm/MC/MCFixup.h" -#include "llvm/MC/MCInst.h" - -namespace llvm { -class MCSection; -class MCSymbol; -class MCSubtargetInfo; - -class MCFragment : public ilist_node_with_parent { - friend class MCAsmLayout; - - MCFragment(const MCFragment &) = delete; - void operator=(const MCFragment &) = delete; - -public: - enum FragmentType : uint8_t { - FT_Align, - FT_Data, - FT_CompactEncodedInst, - FT_Fill, - FT_Relaxable, - FT_Org, - FT_Dwarf, - FT_DwarfFrame, - FT_LEB, - FT_SafeSEH, - FT_CVInlineLines, - FT_CVDefRange, - FT_Dummy - }; - -private: - FragmentType Kind; - -protected: - bool HasInstructions; - -private: - /// \brief Should this fragment be aligned to the end of a bundle? - bool AlignToBundleEnd; - - uint8_t BundlePadding; - - /// LayoutOrder - The layout order of this fragment. - unsigned LayoutOrder; - - /// The data for the section this fragment is in. - MCSection *Parent; - - /// Atom - The atom this fragment is in, as represented by it's defining - /// symbol. - const MCSymbol *Atom; - - /// \name Assembler Backend Data - /// @{ - // - // FIXME: This could all be kept private to the assembler implementation. - - /// Offset - The offset of this fragment in its section. This is ~0 until - /// initialized. - uint64_t Offset; - - /// @} - -protected: - MCFragment(FragmentType Kind, bool HasInstructions, - uint8_t BundlePadding, MCSection *Parent = nullptr); - - ~MCFragment(); -private: - - // This is a friend so that the sentinal can be created. - friend struct ilist_sentinel_traits; - MCFragment(); - -public: - /// Destroys the current fragment. - /// - /// This must be used instead of delete as MCFragment is non-virtual. - /// This method will dispatch to the appropriate subclass. - void destroy(); - - FragmentType getKind() const { return Kind; } - - MCSection *getParent() const { return Parent; } - void setParent(MCSection *Value) { Parent = Value; } - - const MCSymbol *getAtom() const { return Atom; } - void setAtom(const MCSymbol *Value) { Atom = Value; } - - unsigned getLayoutOrder() const { return LayoutOrder; } - void setLayoutOrder(unsigned Value) { LayoutOrder = Value; } - - /// \brief Does this fragment have instructions emitted into it? By default - /// this is false, but specific fragment types may set it to true. - bool hasInstructions() const { return HasInstructions; } - - /// \brief Should this fragment be placed at the end of an aligned bundle? - bool alignToBundleEnd() const { return AlignToBundleEnd; } - void setAlignToBundleEnd(bool V) { AlignToBundleEnd = V; } - - /// \brief Get the padding size that must be inserted before this fragment. - /// Used for bundling. By default, no padding is inserted. - /// Note that padding size is restricted to 8 bits. This is an optimization - /// to reduce the amount of space used for each fragment. In practice, larger - /// padding should never be required. - uint8_t getBundlePadding() const { return BundlePadding; } - - /// \brief Set the padding size for this fragment. By default it's a no-op, - /// and only some fragments have a meaningful implementation. - void setBundlePadding(uint8_t N) { BundlePadding = N; } - - /// \brief Return true if given frgment has FT_Dummy type. - bool isDummy() const { return Kind == FT_Dummy; } - - void dump(); -}; - -class MCDummyFragment : public MCFragment { -public: - explicit MCDummyFragment(MCSection *Sec) - : MCFragment(FT_Dummy, false, 0, Sec){}; - static bool classof(const MCFragment *F) { return F->getKind() == FT_Dummy; } -}; - -/// Interface implemented by fragments that contain encoded instructions and/or -/// data. -/// -class MCEncodedFragment : public MCFragment { -protected: - MCEncodedFragment(MCFragment::FragmentType FType, bool HasInstructions, - MCSection *Sec) - : MCFragment(FType, HasInstructions, 0, Sec) {} - -public: - static bool classof(const MCFragment *F) { - MCFragment::FragmentType Kind = F->getKind(); - switch (Kind) { - default: - return false; - case MCFragment::FT_Relaxable: - case MCFragment::FT_CompactEncodedInst: - case MCFragment::FT_Data: - return true; - } - } -}; - -/// Interface implemented by fragments that contain encoded instructions and/or -/// data. -/// -template -class MCEncodedFragmentWithContents : public MCEncodedFragment { - SmallVector Contents; - -protected: - MCEncodedFragmentWithContents(MCFragment::FragmentType FType, - bool HasInstructions, - MCSection *Sec) - : MCEncodedFragment(FType, HasInstructions, Sec) {} - -public: - SmallVectorImpl &getContents() { return Contents; } - const SmallVectorImpl &getContents() const { return Contents; } -}; - -/// Interface implemented by fragments that contain encoded instructions and/or -/// data and also have fixups registered. -/// -template -class MCEncodedFragmentWithFixups : - public MCEncodedFragmentWithContents { - - /// Fixups - The list of fixups in this fragment. - SmallVector Fixups; - -protected: - MCEncodedFragmentWithFixups(MCFragment::FragmentType FType, - bool HasInstructions, - MCSection *Sec) - : MCEncodedFragmentWithContents(FType, HasInstructions, - Sec) {} - -public: - typedef SmallVectorImpl::const_iterator const_fixup_iterator; - typedef SmallVectorImpl::iterator fixup_iterator; - - SmallVectorImpl &getFixups() { return Fixups; } - const SmallVectorImpl &getFixups() const { return Fixups; } - - fixup_iterator fixup_begin() { return Fixups.begin(); } - const_fixup_iterator fixup_begin() const { return Fixups.begin(); } - - fixup_iterator fixup_end() { return Fixups.end(); } - const_fixup_iterator fixup_end() const { return Fixups.end(); } - - static bool classof(const MCFragment *F) { - MCFragment::FragmentType Kind = F->getKind(); - return Kind == MCFragment::FT_Relaxable || Kind == MCFragment::FT_Data || - Kind == MCFragment::FT_CVDefRange; - } -}; - -/// Fragment for data and encoded instructions. -/// -class MCDataFragment : public MCEncodedFragmentWithFixups<32, 4> { -public: - MCDataFragment(MCSection *Sec = nullptr) - : MCEncodedFragmentWithFixups<32, 4>(FT_Data, false, Sec) {} - - void setHasInstructions(bool V) { HasInstructions = V; } - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_Data; - } -}; - -/// This is a compact (memory-size-wise) fragment for holding an encoded -/// instruction (non-relaxable) that has no fixups registered. When applicable, -/// it can be used instead of MCDataFragment and lead to lower memory -/// consumption. -/// -class MCCompactEncodedInstFragment : public MCEncodedFragmentWithContents<4> { -public: - MCCompactEncodedInstFragment(MCSection *Sec = nullptr) - : MCEncodedFragmentWithContents(FT_CompactEncodedInst, true, Sec) { - } - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_CompactEncodedInst; - } -}; - -/// A relaxable fragment holds on to its MCInst, since it may need to be -/// relaxed during the assembler layout and relaxation stage. -/// -class MCRelaxableFragment : public MCEncodedFragmentWithFixups<8, 1> { - - /// Inst - The instruction this is a fragment for. - MCInst Inst; - - /// STI - The MCSubtargetInfo in effect when the instruction was encoded. - const MCSubtargetInfo &STI; - -public: - MCRelaxableFragment(const MCInst &Inst, const MCSubtargetInfo &STI, - MCSection *Sec = nullptr) - : MCEncodedFragmentWithFixups(FT_Relaxable, true, Sec), - Inst(Inst), STI(STI) {} - - const MCInst &getInst() const { return Inst; } - void setInst(const MCInst &Value) { Inst = Value; } - - const MCSubtargetInfo &getSubtargetInfo() { return STI; } - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_Relaxable; - } -}; - -class MCAlignFragment : public MCFragment { - - /// Alignment - The alignment to ensure, in bytes. - unsigned Alignment; - - /// EmitNops - Flag to indicate that (optimal) NOPs should be emitted instead - /// of using the provided value. The exact interpretation of this flag is - /// target dependent. - bool EmitNops : 1; - - /// Value - Value to use for filling padding bytes. - int64_t Value; - - /// ValueSize - The size of the integer (in bytes) of \p Value. - unsigned ValueSize; - - /// MaxBytesToEmit - The maximum number of bytes to emit; if the alignment - /// cannot be satisfied in this width then this fragment is ignored. - unsigned MaxBytesToEmit; - -public: - MCAlignFragment(unsigned Alignment, int64_t Value, unsigned ValueSize, - unsigned MaxBytesToEmit, MCSection *Sec = nullptr) - : MCFragment(FT_Align, false, 0, Sec), Alignment(Alignment), - EmitNops(false), Value(Value), - ValueSize(ValueSize), MaxBytesToEmit(MaxBytesToEmit) {} - - /// \name Accessors - /// @{ - - unsigned getAlignment() const { return Alignment; } - - int64_t getValue() const { return Value; } - - unsigned getValueSize() const { return ValueSize; } - - unsigned getMaxBytesToEmit() const { return MaxBytesToEmit; } - - bool hasEmitNops() const { return EmitNops; } - void setEmitNops(bool Value) { EmitNops = Value; } - - /// @} - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_Align; - } -}; - -class MCFillFragment : public MCFragment { - - /// Value to use for filling bytes. - uint8_t Value; - - /// The number of bytes to insert. - uint64_t Size; - -public: - MCFillFragment(uint8_t Value, uint64_t Size, MCSection *Sec = nullptr) - : MCFragment(FT_Fill, false, 0, Sec), Value(Value), Size(Size) {} - - uint8_t getValue() const { return Value; } - uint64_t getSize() const { return Size; } - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_Fill; - } -}; - -class MCOrgFragment : public MCFragment { - - /// Offset - The offset this fragment should start at. - const MCExpr *Offset; - - /// Value - Value to use for filling bytes. - int8_t Value; - -public: - MCOrgFragment(const MCExpr &Offset, int8_t Value, MCSection *Sec = nullptr) - : MCFragment(FT_Org, false, 0, Sec), Offset(&Offset), Value(Value) {} - - /// \name Accessors - /// @{ - - const MCExpr &getOffset() const { return *Offset; } - - uint8_t getValue() const { return Value; } - - /// @} - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_Org; - } -}; - -class MCLEBFragment : public MCFragment { - - /// Value - The value this fragment should contain. - const MCExpr *Value; - - /// IsSigned - True if this is a sleb128, false if uleb128. - bool IsSigned; - - SmallString<8> Contents; - -public: - MCLEBFragment(const MCExpr &Value_, bool IsSigned_, MCSection *Sec = nullptr) - : MCFragment(FT_LEB, false, 0, Sec), Value(&Value_), IsSigned(IsSigned_) { - Contents.push_back(0); - } - - /// \name Accessors - /// @{ - - const MCExpr &getValue() const { return *Value; } - - bool isSigned() const { return IsSigned; } - - SmallString<8> &getContents() { return Contents; } - const SmallString<8> &getContents() const { return Contents; } - - /// @} - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_LEB; - } -}; - -class MCDwarfLineAddrFragment : public MCFragment { - - /// LineDelta - the value of the difference between the two line numbers - /// between two .loc dwarf directives. - int64_t LineDelta; - - /// AddrDelta - The expression for the difference of the two symbols that - /// make up the address delta between two .loc dwarf directives. - const MCExpr *AddrDelta; - - SmallString<8> Contents; - -public: - MCDwarfLineAddrFragment(int64_t LineDelta, const MCExpr &AddrDelta, - MCSection *Sec = nullptr) - : MCFragment(FT_Dwarf, false, 0, Sec), LineDelta(LineDelta), - AddrDelta(&AddrDelta) { - Contents.push_back(0); - } - - /// \name Accessors - /// @{ - - int64_t getLineDelta() const { return LineDelta; } - - const MCExpr &getAddrDelta() const { return *AddrDelta; } - - SmallString<8> &getContents() { return Contents; } - const SmallString<8> &getContents() const { return Contents; } - - /// @} - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_Dwarf; - } -}; - -class MCDwarfCallFrameFragment : public MCFragment { - - /// AddrDelta - The expression for the difference of the two symbols that - /// make up the address delta between two .cfi_* dwarf directives. - const MCExpr *AddrDelta; - - SmallString<8> Contents; - -public: - MCDwarfCallFrameFragment(const MCExpr &AddrDelta, MCSection *Sec = nullptr) - : MCFragment(FT_DwarfFrame, false, 0, Sec), AddrDelta(&AddrDelta) { - Contents.push_back(0); - } - - /// \name Accessors - /// @{ - - const MCExpr &getAddrDelta() const { return *AddrDelta; } - - SmallString<8> &getContents() { return Contents; } - const SmallString<8> &getContents() const { return Contents; } - - /// @} - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_DwarfFrame; - } -}; - -class MCSafeSEHFragment : public MCFragment { - const MCSymbol *Sym; - -public: - MCSafeSEHFragment(const MCSymbol *Sym, MCSection *Sec = nullptr) - : MCFragment(FT_SafeSEH, false, 0, Sec), Sym(Sym) {} - - /// \name Accessors - /// @{ - - const MCSymbol *getSymbol() { return Sym; } - const MCSymbol *getSymbol() const { return Sym; } - - /// @} - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_SafeSEH; - } -}; - -/// Fragment representing the binary annotations produced by the -/// .cv_inline_linetable directive. -class MCCVInlineLineTableFragment : public MCFragment { - unsigned SiteFuncId; - unsigned StartFileId; - unsigned StartLineNum; - const MCSymbol *FnStartSym; - const MCSymbol *FnEndSym; - SmallVector SecondaryFuncs; - SmallString<8> Contents; - - /// CodeViewContext has the real knowledge about this format, so let it access - /// our members. - friend class CodeViewContext; - -public: - MCCVInlineLineTableFragment(unsigned SiteFuncId, unsigned StartFileId, - unsigned StartLineNum, const MCSymbol *FnStartSym, - const MCSymbol *FnEndSym, - ArrayRef SecondaryFuncs, - MCSection *Sec = nullptr) - : MCFragment(FT_CVInlineLines, false, 0, Sec), SiteFuncId(SiteFuncId), - StartFileId(StartFileId), StartLineNum(StartLineNum), - FnStartSym(FnStartSym), FnEndSym(FnEndSym), - SecondaryFuncs(SecondaryFuncs.begin(), SecondaryFuncs.end()) {} - - /// \name Accessors - /// @{ - - const MCSymbol *getFnStartSym() const { return FnStartSym; } - const MCSymbol *getFnEndSym() const { return FnEndSym; } - - SmallString<8> &getContents() { return Contents; } - const SmallString<8> &getContents() const { return Contents; } - - /// @} - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_CVInlineLines; - } -}; - -/// Fragment representing the .cv_def_range directive. -class MCCVDefRangeFragment : public MCEncodedFragmentWithFixups<32, 4> { - SmallVector, 2> Ranges; - SmallString<32> FixedSizePortion; - - /// CodeViewContext has the real knowledge about this format, so let it access - /// our members. - friend class CodeViewContext; - -public: - MCCVDefRangeFragment( - ArrayRef> Ranges, - StringRef FixedSizePortion, MCSection *Sec = nullptr) - : MCEncodedFragmentWithFixups<32, 4>(FT_CVDefRange, false, Sec), - Ranges(Ranges.begin(), Ranges.end()), - FixedSizePortion(FixedSizePortion) {} - - /// \name Accessors - /// @{ - ArrayRef> getRanges() const { - return Ranges; - } - - StringRef getFixedSizePortion() const { return FixedSizePortion; } - /// @} - - static bool classof(const MCFragment *F) { - return F->getKind() == MCFragment::FT_CVDefRange; - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCInst.h b/llvm/include/llvm/MC/MCInst.h deleted file mode 100644 index 4688b5f2..00000000 --- a/llvm/include/llvm/MC/MCInst.h +++ /dev/null @@ -1,205 +0,0 @@ -//===-- llvm/MC/MCInst.h - MCInst class -------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MCInst and MCOperand classes, which -// is the basic representation used to represent low-level machine code -// instructions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCINST_H -#define LLVM_MC_MCINST_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/SMLoc.h" - -namespace llvm { -class raw_ostream; -class MCAsmInfo; -class MCInstPrinter; -class MCExpr; -class MCInst; - -/// \brief Instances of this class represent operands of the MCInst class. -/// This is a simple discriminated union. -class MCOperand { - enum MachineOperandType : unsigned char { - kInvalid, ///< Uninitialized. - kRegister, ///< Register operand. - kImmediate, ///< Immediate operand. - kFPImmediate, ///< Floating-point immediate operand. - kExpr, ///< Relocatable immediate operand. - kInst ///< Sub-instruction operand. - }; - MachineOperandType Kind; - - union { - unsigned RegVal; - int64_t ImmVal; - double FPImmVal; - const MCExpr *ExprVal; - const MCInst *InstVal; - }; - -public: - MCOperand() : Kind(kInvalid), FPImmVal(0.0) {} - - bool isValid() const { return Kind != kInvalid; } - bool isReg() const { return Kind == kRegister; } - bool isImm() const { return Kind == kImmediate; } - bool isFPImm() const { return Kind == kFPImmediate; } - bool isExpr() const { return Kind == kExpr; } - bool isInst() const { return Kind == kInst; } - - /// \brief Returns the register number. - unsigned getReg() const { - assert(isReg() && "This is not a register operand!"); - return RegVal; - } - - /// \brief Set the register number. - void setReg(unsigned Reg) { - assert(isReg() && "This is not a register operand!"); - RegVal = Reg; - } - - int64_t getImm() const { - assert(isImm() && "This is not an immediate"); - return ImmVal; - } - void setImm(int64_t Val) { - assert(isImm() && "This is not an immediate"); - ImmVal = Val; - } - - double getFPImm() const { - assert(isFPImm() && "This is not an FP immediate"); - return FPImmVal; - } - - void setFPImm(double Val) { - assert(isFPImm() && "This is not an FP immediate"); - FPImmVal = Val; - } - - const MCExpr *getExpr() const { - assert(isExpr() && "This is not an expression"); - return ExprVal; - } - void setExpr(const MCExpr *Val) { - assert(isExpr() && "This is not an expression"); - ExprVal = Val; - } - - const MCInst *getInst() const { - assert(isInst() && "This is not a sub-instruction"); - return InstVal; - } - void setInst(const MCInst *Val) { - assert(isInst() && "This is not a sub-instruction"); - InstVal = Val; - } - - static MCOperand createReg(unsigned Reg) { - MCOperand Op; - Op.Kind = kRegister; - Op.RegVal = Reg; - return Op; - } - static MCOperand createImm(int64_t Val) { - MCOperand Op; - Op.Kind = kImmediate; - Op.ImmVal = Val; - return Op; - } - static MCOperand createFPImm(double Val) { - MCOperand Op; - Op.Kind = kFPImmediate; - Op.FPImmVal = Val; - return Op; - } - static MCOperand createExpr(const MCExpr *Val) { - MCOperand Op; - Op.Kind = kExpr; - Op.ExprVal = Val; - return Op; - } - static MCOperand createInst(const MCInst *Val) { - MCOperand Op; - Op.Kind = kInst; - Op.InstVal = Val; - return Op; - } - - void print(raw_ostream &OS) const; - void dump() const; -}; - -template <> struct isPodLike { static const bool value = true; }; - -/// \brief Instances of this class represent a single low-level machine -/// instruction. -class MCInst { - unsigned Opcode; - SMLoc Loc; - SmallVector Operands; - -public: - MCInst() : Opcode(0) {} - - void setOpcode(unsigned Op) { Opcode = Op; } - unsigned getOpcode() const { return Opcode; } - - void setLoc(SMLoc loc) { Loc = loc; } - SMLoc getLoc() const { return Loc; } - - const MCOperand &getOperand(unsigned i) const { return Operands[i]; } - MCOperand &getOperand(unsigned i) { return Operands[i]; } - unsigned getNumOperands() const { return Operands.size(); } - - void addOperand(const MCOperand &Op) { Operands.push_back(Op); } - - typedef SmallVectorImpl::iterator iterator; - typedef SmallVectorImpl::const_iterator const_iterator; - void clear() { Operands.clear(); } - void erase(iterator I) { Operands.erase(I); } - size_t size() const { return Operands.size(); } - iterator begin() { return Operands.begin(); } - const_iterator begin() const { return Operands.begin(); } - iterator end() { return Operands.end(); } - const_iterator end() const { return Operands.end(); } - iterator insert(iterator I, const MCOperand &Op) { - return Operands.insert(I, Op); - } - - void print(raw_ostream &OS) const; - void dump() const; - - /// \brief Dump the MCInst as prettily as possible using the additional MC - /// structures, if given. Operators are separated by the \p Separator - /// string. - void dump_pretty(raw_ostream &OS, const MCInstPrinter *Printer = nullptr, - StringRef Separator = " ") const; -}; - -inline raw_ostream& operator<<(raw_ostream &OS, const MCOperand &MO) { - MO.print(OS); - return OS; -} - -inline raw_ostream& operator<<(raw_ostream &OS, const MCInst &MI) { - MI.print(OS); - return OS; -} - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCInstBuilder.h b/llvm/include/llvm/MC/MCInstBuilder.h deleted file mode 100644 index 30609bdb..00000000 --- a/llvm/include/llvm/MC/MCInstBuilder.h +++ /dev/null @@ -1,74 +0,0 @@ -//===-- llvm/MC/MCInstBuilder.h - Simplify creation of MCInsts --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the MCInstBuilder class for convenient creation of -// MCInsts. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCINSTBUILDER_H -#define LLVM_MC_MCINSTBUILDER_H - -#include "llvm/MC/MCInst.h" - -namespace llvm { - -class MCInstBuilder { - MCInst Inst; - -public: - /// \brief Create a new MCInstBuilder for an MCInst with a specific opcode. - MCInstBuilder(unsigned Opcode) { - Inst.setOpcode(Opcode); - } - - /// \brief Add a new register operand. - MCInstBuilder &addReg(unsigned Reg) { - Inst.addOperand(MCOperand::createReg(Reg)); - return *this; - } - - /// \brief Add a new integer immediate operand. - MCInstBuilder &addImm(int64_t Val) { - Inst.addOperand(MCOperand::createImm(Val)); - return *this; - } - - /// \brief Add a new floating point immediate operand. - MCInstBuilder &addFPImm(double Val) { - Inst.addOperand(MCOperand::createFPImm(Val)); - return *this; - } - - /// \brief Add a new MCExpr operand. - MCInstBuilder &addExpr(const MCExpr *Val) { - Inst.addOperand(MCOperand::createExpr(Val)); - return *this; - } - - /// \brief Add a new MCInst operand. - MCInstBuilder &addInst(const MCInst *Val) { - Inst.addOperand(MCOperand::createInst(Val)); - return *this; - } - - /// \brief Add an operand. - MCInstBuilder &addOperand(const MCOperand &Op) { - Inst.addOperand(Op); - return *this; - } - - operator MCInst&() { - return Inst; - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCInstPrinter.h b/llvm/include/llvm/MC/MCInstPrinter.h deleted file mode 100644 index 2119c5a6..00000000 --- a/llvm/include/llvm/MC/MCInstPrinter.h +++ /dev/null @@ -1,108 +0,0 @@ -//===- MCInstPrinter.h - MCInst to target assembly syntax -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCINSTPRINTER_H -#define LLVM_MC_MCINSTPRINTER_H - -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/Format.h" - -namespace llvm { -template class ArrayRef; -class MCInst; -class raw_ostream; -class MCAsmInfo; -class MCInstrInfo; -class MCRegisterInfo; -class MCSubtargetInfo; -class StringRef; - -/// Convert `Bytes' to a hex string and output to `OS' -void dumpBytes(ArrayRef Bytes, raw_ostream &OS); - -namespace HexStyle { -enum Style { - C, ///< 0xff - Asm ///< 0ffh -}; -} - -/// \brief This is an instance of a target assembly language printer that -/// converts an MCInst to valid target assembly syntax. -class MCInstPrinter { -protected: - /// \brief A stream that comments can be emitted to if desired. Each comment - /// must end with a newline. This will be null if verbose assembly emission - /// is disable. - raw_ostream *CommentStream; - const MCAsmInfo &MAI; - const MCInstrInfo &MII; - const MCRegisterInfo &MRI; - - /// True if we are printing marked up assembly. - bool UseMarkup; - - /// True if we are printing immediates as hex. - bool PrintImmHex; - - /// Which style to use for printing hexadecimal values. - HexStyle::Style PrintHexStyle; - - /// Utility function for printing annotations. - void printAnnotation(raw_ostream &OS, StringRef Annot); - -public: - MCInstPrinter(const MCAsmInfo &mai, const MCInstrInfo &mii, - const MCRegisterInfo &mri) - : CommentStream(nullptr), MAI(mai), MII(mii), MRI(mri), UseMarkup(0), - PrintImmHex(0), PrintHexStyle(HexStyle::C) {} - - virtual ~MCInstPrinter(); - - /// \brief Specify a stream to emit comments to. - void setCommentStream(raw_ostream &OS) { CommentStream = &OS; } - - /// \brief Print the specified MCInst to the specified raw_ostream. - virtual void printInst(const MCInst *MI, raw_ostream &OS, StringRef Annot, - const MCSubtargetInfo &STI) = 0; - - /// \brief Return the name of the specified opcode enum (e.g. "MOV32ri") or - /// empty if we can't resolve it. - StringRef getOpcodeName(unsigned Opcode) const; - - /// \brief Print the assembler register name. - virtual void printRegName(raw_ostream &OS, unsigned RegNo) const; - - bool getUseMarkup() const { return UseMarkup; } - void setUseMarkup(bool Value) { UseMarkup = Value; } - - /// Utility functions to make adding mark ups simpler. - StringRef markup(StringRef s) const; - StringRef markup(StringRef a, StringRef b) const; - - bool getPrintImmHex() const { return PrintImmHex; } - void setPrintImmHex(bool Value) { PrintImmHex = Value; } - - HexStyle::Style getPrintHexStyle() const { return PrintHexStyle; } - void setPrintHexStyle(HexStyle::Style Value) { PrintHexStyle = Value; } - - /// Utility function to print immediates in decimal or hex. - format_object formatImm(int64_t Value) const { - return PrintImmHex ? formatHex(Value) : formatDec(Value); - } - - /// Utility functions to print decimal/hexadecimal values. - format_object formatDec(int64_t Value) const; - format_object formatHex(int64_t Value) const; - format_object formatHex(uint64_t Value) const; -}; - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCInstrAnalysis.h b/llvm/include/llvm/MC/MCInstrAnalysis.h deleted file mode 100644 index 8f5159e9..00000000 --- a/llvm/include/llvm/MC/MCInstrAnalysis.h +++ /dev/null @@ -1,71 +0,0 @@ -//===-- llvm/MC/MCInstrAnalysis.h - InstrDesc target hooks ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MCInstrAnalysis class which the MCTargetDescs can -// derive from to give additional information to MC. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCINSTRANALYSIS_H -#define LLVM_MC_MCINSTRANALYSIS_H - -#include "llvm/MC/MCInst.h" -#include "llvm/MC/MCInstrDesc.h" -#include "llvm/MC/MCInstrInfo.h" - -namespace llvm { - -class MCInstrAnalysis { -protected: - friend class Target; - const MCInstrInfo *Info; - -public: - MCInstrAnalysis(const MCInstrInfo *Info) : Info(Info) {} - - virtual ~MCInstrAnalysis() {} - - virtual bool isBranch(const MCInst &Inst) const { - return Info->get(Inst.getOpcode()).isBranch(); - } - - virtual bool isConditionalBranch(const MCInst &Inst) const { - return Info->get(Inst.getOpcode()).isConditionalBranch(); - } - - virtual bool isUnconditionalBranch(const MCInst &Inst) const { - return Info->get(Inst.getOpcode()).isUnconditionalBranch(); - } - - virtual bool isIndirectBranch(const MCInst &Inst) const { - return Info->get(Inst.getOpcode()).isIndirectBranch(); - } - - virtual bool isCall(const MCInst &Inst) const { - return Info->get(Inst.getOpcode()).isCall(); - } - - virtual bool isReturn(const MCInst &Inst) const { - return Info->get(Inst.getOpcode()).isReturn(); - } - - virtual bool isTerminator(const MCInst &Inst) const { - return Info->get(Inst.getOpcode()).isTerminator(); - } - - /// \brief Given a branch instruction try to get the address the branch - /// targets. Return true on success, and the address in Target. - virtual bool - evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size, - uint64_t &Target) const; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCInstrDesc.h b/llvm/include/llvm/MC/MCInstrDesc.h deleted file mode 100644 index 88aab73d..00000000 --- a/llvm/include/llvm/MC/MCInstrDesc.h +++ /dev/null @@ -1,556 +0,0 @@ -//===-- llvm/MC/MCInstrDesc.h - Instruction Descriptors -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the MCOperandInfo and MCInstrDesc classes, which -// are used to describe target instructions and their operands. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCINSTRDESC_H -#define LLVM_MC_MCINSTRDESC_H - -#include "llvm/MC/MCRegisterInfo.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - class MCInst; - class MCSubtargetInfo; - class FeatureBitset; - -//===----------------------------------------------------------------------===// -// Machine Operand Flags and Description -//===----------------------------------------------------------------------===// - -namespace MCOI { -// Operand constraints -enum OperandConstraint { - TIED_TO = 0, // Must be allocated the same register as. - EARLY_CLOBBER // Operand is an early clobber register operand -}; - -/// \brief These are flags set on operands, but should be considered -/// private, all access should go through the MCOperandInfo accessors. -/// See the accessors for a description of what these are. -enum OperandFlags { LookupPtrRegClass = 0, Predicate, OptionalDef }; - -/// \brief Operands are tagged with one of the values of this enum. -enum OperandType { - OPERAND_UNKNOWN = 0, - OPERAND_IMMEDIATE = 1, - OPERAND_REGISTER = 2, - OPERAND_MEMORY = 3, - OPERAND_PCREL = 4, - OPERAND_FIRST_TARGET = 5 -}; -} - -/// \brief This holds information about one operand of a machine instruction, -/// indicating the register class for register operands, etc. -class MCOperandInfo { -public: - /// \brief This specifies the register class enumeration of the operand - /// if the operand is a register. If isLookupPtrRegClass is set, then this is - /// an index that is passed to TargetRegisterInfo::getPointerRegClass(x) to - /// get a dynamic register class. - int16_t RegClass; - - /// \brief These are flags from the MCOI::OperandFlags enum. - uint8_t Flags; - - /// \brief Information about the type of the operand. - uint8_t OperandType; - /// \brief The lower 16 bits are used to specify which constraints are set. - /// The higher 16 bits are used to specify the value of constraints (4 bits - /// each). - uint32_t Constraints; - - /// \brief Set if this operand is a pointer value and it requires a callback - /// to look up its register class. - bool isLookupPtrRegClass() const { - return Flags & (1 << MCOI::LookupPtrRegClass); - } - - /// \brief Set if this is one of the operands that made up of the predicate - /// operand that controls an isPredicable() instruction. - bool isPredicate() const { return Flags & (1 << MCOI::Predicate); } - - /// \brief Set if this operand is a optional def. - bool isOptionalDef() const { return Flags & (1 << MCOI::OptionalDef); } -}; - -//===----------------------------------------------------------------------===// -// Machine Instruction Flags and Description -//===----------------------------------------------------------------------===// - -namespace MCID { -/// \brief These should be considered private to the implementation of the -/// MCInstrDesc class. Clients should use the predicate methods on MCInstrDesc, -/// not use these directly. These all correspond to bitfields in the -/// MCInstrDesc::Flags field. -enum Flag { - Variadic = 0, - HasOptionalDef, - Pseudo, - Return, - Call, - Barrier, - Terminator, - Branch, - IndirectBranch, - Compare, - MoveImm, - Bitcast, - Select, - DelaySlot, - FoldableAsLoad, - MayLoad, - MayStore, - Predicable, - NotDuplicable, - UnmodeledSideEffects, - Commutable, - ConvertibleTo3Addr, - UsesCustomInserter, - HasPostISelHook, - Rematerializable, - CheapAsAMove, - ExtraSrcRegAllocReq, - ExtraDefRegAllocReq, - RegSequence, - ExtractSubreg, - InsertSubreg, - Convergent -}; -} - -/// \brief Describe properties that are true of each instruction in the target -/// description file. This captures information about side effects, register -/// use and many other things. There is one instance of this struct for each -/// target instruction class, and the MachineInstr class points to this struct -/// directly to describe itself. -class MCInstrDesc { -public: - unsigned short Opcode; // The opcode number - unsigned short NumOperands; // Num of args (may be more if variable_ops) - unsigned char NumDefs; // Num of args that are definitions - unsigned char Size; // Number of bytes in encoding. - unsigned short SchedClass; // enum identifying instr sched class - uint64_t Flags; // Flags identifying machine instr class - uint64_t TSFlags; // Target Specific Flag values - const MCPhysReg *ImplicitUses; // Registers implicitly read by this instr - const MCPhysReg *ImplicitDefs; // Registers implicitly defined by this instr - const MCOperandInfo *OpInfo; // 'NumOperands' entries about operands - // Subtarget feature that this is deprecated on, if any - // -1 implies this is not deprecated by any single feature. It may still be - // deprecated due to a "complex" reason, below. - int64_t DeprecatedFeature; - - // A complex method to determine is a certain is deprecated or not, and return - // the reason for deprecation. - bool (*ComplexDeprecationInfo)(MCInst &, const MCSubtargetInfo &, - std::string &); - - /// \brief Returns the value of the specific constraint if - /// it is set. Returns -1 if it is not set. - int getOperandConstraint(unsigned OpNum, - MCOI::OperandConstraint Constraint) const { - if (OpNum < NumOperands && - (OpInfo[OpNum].Constraints & (1 << Constraint))) { - unsigned Pos = 16 + Constraint * 4; - return (int)(OpInfo[OpNum].Constraints >> Pos) & 0xf; - } - return -1; - } - - /// \brief Returns true if a certain instruction is deprecated and if so - /// returns the reason in \p Info. - bool getDeprecatedInfo(MCInst &MI, const MCSubtargetInfo &STI, - std::string &Info) const; - - /// \brief Return the opcode number for this descriptor. - unsigned getOpcode() const { return Opcode; } - - /// \brief Return the number of declared MachineOperands for this - /// MachineInstruction. Note that variadic (isVariadic() returns true) - /// instructions may have additional operands at the end of the list, and note - /// that the machine instruction may include implicit register def/uses as - /// well. - unsigned getNumOperands() const { return NumOperands; } - - /// \brief Return the number of MachineOperands that are register - /// definitions. Register definitions always occur at the start of the - /// machine operand list. This is the number of "outs" in the .td file, - /// and does not include implicit defs. - unsigned getNumDefs() const { return NumDefs; } - - /// \brief Return flags of this instruction. - unsigned getFlags() const { return Flags; } - - /// \brief Return true if this instruction can have a variable number of - /// operands. In this case, the variable operands will be after the normal - /// operands but before the implicit definitions and uses (if any are - /// present). - bool isVariadic() const { return Flags & (1 << MCID::Variadic); } - - /// \brief Set if this instruction has an optional definition, e.g. - /// ARM instructions which can set condition code if 's' bit is set. - bool hasOptionalDef() const { return Flags & (1 << MCID::HasOptionalDef); } - - /// \brief Return true if this is a pseudo instruction that doesn't - /// correspond to a real machine instruction. - bool isPseudo() const { return Flags & (1 << MCID::Pseudo); } - - /// \brief Return true if the instruction is a return. - bool isReturn() const { return Flags & (1 << MCID::Return); } - - /// \brief Return true if the instruction is a call. - bool isCall() const { return Flags & (1 << MCID::Call); } - - /// \brief Returns true if the specified instruction stops control flow - /// from executing the instruction immediately following it. Examples include - /// unconditional branches and return instructions. - bool isBarrier() const { return Flags & (1 << MCID::Barrier); } - - /// \brief Returns true if this instruction part of the terminator for - /// a basic block. Typically this is things like return and branch - /// instructions. - /// - /// Various passes use this to insert code into the bottom of a basic block, - /// but before control flow occurs. - bool isTerminator() const { return Flags & (1 << MCID::Terminator); } - - /// \brief Returns true if this is a conditional, unconditional, or - /// indirect branch. Predicates below can be used to discriminate between - /// these cases, and the TargetInstrInfo::AnalyzeBranch method can be used to - /// get more information. - bool isBranch() const { return Flags & (1 << MCID::Branch); } - - /// \brief Return true if this is an indirect branch, such as a - /// branch through a register. - bool isIndirectBranch() const { return Flags & (1 << MCID::IndirectBranch); } - - /// \brief Return true if this is a branch which may fall - /// through to the next instruction or may transfer control flow to some other - /// block. The TargetInstrInfo::AnalyzeBranch method can be used to get more - /// information about this branch. - bool isConditionalBranch() const { - return isBranch() & !isBarrier() & !isIndirectBranch(); - } - - /// \brief Return true if this is a branch which always - /// transfers control flow to some other block. The - /// TargetInstrInfo::AnalyzeBranch method can be used to get more information - /// about this branch. - bool isUnconditionalBranch() const { - return isBranch() & isBarrier() & !isIndirectBranch(); - } - - /// \brief Return true if this is a branch or an instruction which directly - /// writes to the program counter. Considered 'may' affect rather than - /// 'does' affect as things like predication are not taken into account. - bool mayAffectControlFlow(const MCInst &MI, const MCRegisterInfo &RI) const; - - /// \brief Return true if this instruction has a predicate operand - /// that controls execution. It may be set to 'always', or may be set to other - /// values. There are various methods in TargetInstrInfo that can be used to - /// control and modify the predicate in this instruction. - bool isPredicable() const { return Flags & (1 << MCID::Predicable); } - - /// \brief Return true if this instruction is a comparison. - bool isCompare() const { return Flags & (1 << MCID::Compare); } - - /// \brief Return true if this instruction is a move immediate - /// (including conditional moves) instruction. - bool isMoveImmediate() const { return Flags & (1 << MCID::MoveImm); } - - /// \brief Return true if this instruction is a bitcast instruction. - bool isBitcast() const { return Flags & (1 << MCID::Bitcast); } - - /// \brief Return true if this is a select instruction. - bool isSelect() const { return Flags & (1 << MCID::Select); } - - /// \brief Return true if this instruction cannot be safely - /// duplicated. For example, if the instruction has a unique labels attached - /// to it, duplicating it would cause multiple definition errors. - bool isNotDuplicable() const { return Flags & (1 << MCID::NotDuplicable); } - - /// \brief Returns true if the specified instruction has a delay slot which - /// must be filled by the code generator. - bool hasDelaySlot() const { return Flags & (1 << MCID::DelaySlot); } - - /// \brief Return true for instructions that can be folded as memory operands - /// in other instructions. The most common use for this is instructions that - /// are simple loads from memory that don't modify the loaded value in any - /// way, but it can also be used for instructions that can be expressed as - /// constant-pool loads, such as V_SETALLONES on x86, to allow them to be - /// folded when it is beneficial. This should only be set on instructions - /// that return a value in their only virtual register definition. - bool canFoldAsLoad() const { return Flags & (1 << MCID::FoldableAsLoad); } - - /// \brief Return true if this instruction behaves - /// the same way as the generic REG_SEQUENCE instructions. - /// E.g., on ARM, - /// dX VMOVDRR rY, rZ - /// is equivalent to - /// dX = REG_SEQUENCE rY, ssub_0, rZ, ssub_1. - /// - /// Note that for the optimizers to be able to take advantage of - /// this property, TargetInstrInfo::getRegSequenceLikeInputs has to be - /// override accordingly. - bool isRegSequenceLike() const { return Flags & (1 << MCID::RegSequence); } - - /// \brief Return true if this instruction behaves - /// the same way as the generic EXTRACT_SUBREG instructions. - /// E.g., on ARM, - /// rX, rY VMOVRRD dZ - /// is equivalent to two EXTRACT_SUBREG: - /// rX = EXTRACT_SUBREG dZ, ssub_0 - /// rY = EXTRACT_SUBREG dZ, ssub_1 - /// - /// Note that for the optimizers to be able to take advantage of - /// this property, TargetInstrInfo::getExtractSubregLikeInputs has to be - /// override accordingly. - bool isExtractSubregLike() const { - return Flags & (1 << MCID::ExtractSubreg); - } - - /// \brief Return true if this instruction behaves - /// the same way as the generic INSERT_SUBREG instructions. - /// E.g., on ARM, - /// dX = VSETLNi32 dY, rZ, Imm - /// is equivalent to a INSERT_SUBREG: - /// dX = INSERT_SUBREG dY, rZ, translateImmToSubIdx(Imm) - /// - /// Note that for the optimizers to be able to take advantage of - /// this property, TargetInstrInfo::getInsertSubregLikeInputs has to be - /// override accordingly. - bool isInsertSubregLike() const { return Flags & (1 << MCID::InsertSubreg); } - - - /// \brief Return true if this instruction is convergent. - /// - /// Convergent instructions may not be made control-dependent on any - /// additional values. - bool isConvergent() const { return Flags & (1 << MCID::Convergent); } - - //===--------------------------------------------------------------------===// - // Side Effect Analysis - //===--------------------------------------------------------------------===// - - /// \brief Return true if this instruction could possibly read memory. - /// Instructions with this flag set are not necessarily simple load - /// instructions, they may load a value and modify it, for example. - bool mayLoad() const { return Flags & (1 << MCID::MayLoad); } - - /// \brief Return true if this instruction could possibly modify memory. - /// Instructions with this flag set are not necessarily simple store - /// instructions, they may store a modified value based on their operands, or - /// may not actually modify anything, for example. - bool mayStore() const { return Flags & (1 << MCID::MayStore); } - - /// \brief Return true if this instruction has side - /// effects that are not modeled by other flags. This does not return true - /// for instructions whose effects are captured by: - /// - /// 1. Their operand list and implicit definition/use list. Register use/def - /// info is explicit for instructions. - /// 2. Memory accesses. Use mayLoad/mayStore. - /// 3. Calling, branching, returning: use isCall/isReturn/isBranch. - /// - /// Examples of side effects would be modifying 'invisible' machine state like - /// a control register, flushing a cache, modifying a register invisible to - /// LLVM, etc. - bool hasUnmodeledSideEffects() const { - return Flags & (1 << MCID::UnmodeledSideEffects); - } - - //===--------------------------------------------------------------------===// - // Flags that indicate whether an instruction can be modified by a method. - //===--------------------------------------------------------------------===// - - /// \brief Return true if this may be a 2- or 3-address instruction (of the - /// form "X = op Y, Z, ..."), which produces the same result if Y and Z are - /// exchanged. If this flag is set, then the - /// TargetInstrInfo::commuteInstruction method may be used to hack on the - /// instruction. - /// - /// Note that this flag may be set on instructions that are only commutable - /// sometimes. In these cases, the call to commuteInstruction will fail. - /// Also note that some instructions require non-trivial modification to - /// commute them. - bool isCommutable() const { return Flags & (1 << MCID::Commutable); } - - /// \brief Return true if this is a 2-address instruction which can be changed - /// into a 3-address instruction if needed. Doing this transformation can be - /// profitable in the register allocator, because it means that the - /// instruction can use a 2-address form if possible, but degrade into a less - /// efficient form if the source and dest register cannot be assigned to the - /// same register. For example, this allows the x86 backend to turn a "shl - /// reg, 3" instruction into an LEA instruction, which is the same speed as - /// the shift but has bigger code size. - /// - /// If this returns true, then the target must implement the - /// TargetInstrInfo::convertToThreeAddress method for this instruction, which - /// is allowed to fail if the transformation isn't valid for this specific - /// instruction (e.g. shl reg, 4 on x86). - /// - bool isConvertibleTo3Addr() const { - return Flags & (1 << MCID::ConvertibleTo3Addr); - } - - /// \brief Return true if this instruction requires custom insertion support - /// when the DAG scheduler is inserting it into a machine basic block. If - /// this is true for the instruction, it basically means that it is a pseudo - /// instruction used at SelectionDAG time that is expanded out into magic code - /// by the target when MachineInstrs are formed. - /// - /// If this is true, the TargetLoweringInfo::InsertAtEndOfBasicBlock method - /// is used to insert this into the MachineBasicBlock. - bool usesCustomInsertionHook() const { - return Flags & (1 << MCID::UsesCustomInserter); - } - - /// \brief Return true if this instruction requires *adjustment* after - /// instruction selection by calling a target hook. For example, this can be - /// used to fill in ARM 's' optional operand depending on whether the - /// conditional flag register is used. - bool hasPostISelHook() const { return Flags & (1 << MCID::HasPostISelHook); } - - /// \brief Returns true if this instruction is a candidate for remat. This - /// flag is only used in TargetInstrInfo method isTriviallyRematerializable. - /// - /// If this flag is set, the isReallyTriviallyReMaterializable() - /// or isReallyTriviallyReMaterializableGeneric methods are called to verify - /// the instruction is really rematable. - bool isRematerializable() const { - return Flags & (1 << MCID::Rematerializable); - } - - /// \brief Returns true if this instruction has the same cost (or less) than a - /// move instruction. This is useful during certain types of optimizations - /// (e.g., remat during two-address conversion or machine licm) where we would - /// like to remat or hoist the instruction, but not if it costs more than - /// moving the instruction into the appropriate register. Note, we are not - /// marking copies from and to the same register class with this flag. - /// - /// This method could be called by interface TargetInstrInfo::isAsCheapAsAMove - /// for different subtargets. - bool isAsCheapAsAMove() const { return Flags & (1 << MCID::CheapAsAMove); } - - /// \brief Returns true if this instruction source operands have special - /// register allocation requirements that are not captured by the operand - /// register classes. e.g. ARM::STRD's two source registers must be an even / - /// odd pair, ARM::STM registers have to be in ascending order. Post-register - /// allocation passes should not attempt to change allocations for sources of - /// instructions with this flag. - bool hasExtraSrcRegAllocReq() const { - return Flags & (1 << MCID::ExtraSrcRegAllocReq); - } - - /// \brief Returns true if this instruction def operands have special register - /// allocation requirements that are not captured by the operand register - /// classes. e.g. ARM::LDRD's two def registers must be an even / odd pair, - /// ARM::LDM registers have to be in ascending order. Post-register - /// allocation passes should not attempt to change allocations for definitions - /// of instructions with this flag. - bool hasExtraDefRegAllocReq() const { - return Flags & (1 << MCID::ExtraDefRegAllocReq); - } - - /// \brief Return a list of registers that are potentially read by any - /// instance of this machine instruction. For example, on X86, the "adc" - /// instruction adds two register operands and adds the carry bit in from the - /// flags register. In this case, the instruction is marked as implicitly - /// reading the flags. Likewise, the variable shift instruction on X86 is - /// marked as implicitly reading the 'CL' register, which it always does. - /// - /// This method returns null if the instruction has no implicit uses. - const MCPhysReg *getImplicitUses() const { return ImplicitUses; } - - /// \brief Return the number of implicit uses this instruction has. - unsigned getNumImplicitUses() const { - if (!ImplicitUses) - return 0; - unsigned i = 0; - for (; ImplicitUses[i]; ++i) /*empty*/ - ; - return i; - } - - /// \brief Return a list of registers that are potentially written by any - /// instance of this machine instruction. For example, on X86, many - /// instructions implicitly set the flags register. In this case, they are - /// marked as setting the FLAGS. Likewise, many instructions always deposit - /// their result in a physical register. For example, the X86 divide - /// instruction always deposits the quotient and remainder in the EAX/EDX - /// registers. For that instruction, this will return a list containing the - /// EAX/EDX/EFLAGS registers. - /// - /// This method returns null if the instruction has no implicit defs. - const MCPhysReg *getImplicitDefs() const { return ImplicitDefs; } - - /// \brief Return the number of implicit defs this instruct has. - unsigned getNumImplicitDefs() const { - if (!ImplicitDefs) - return 0; - unsigned i = 0; - for (; ImplicitDefs[i]; ++i) /*empty*/ - ; - return i; - } - - /// \brief Return true if this instruction implicitly - /// uses the specified physical register. - bool hasImplicitUseOfPhysReg(unsigned Reg) const { - if (const MCPhysReg *ImpUses = ImplicitUses) - for (; *ImpUses; ++ImpUses) - if (*ImpUses == Reg) - return true; - return false; - } - - /// \brief Return true if this instruction implicitly - /// defines the specified physical register. - bool hasImplicitDefOfPhysReg(unsigned Reg, - const MCRegisterInfo *MRI = nullptr) const; - - /// \brief Return the scheduling class for this instruction. The - /// scheduling class is an index into the InstrItineraryData table. This - /// returns zero if there is no known scheduling information for the - /// instruction. - unsigned getSchedClass() const { return SchedClass; } - - /// \brief Return the number of bytes in the encoding of this instruction, - /// or zero if the encoding size cannot be known from the opcode. - unsigned getSize() const { return Size; } - - /// \brief Find the index of the first operand in the - /// operand list that is used to represent the predicate. It returns -1 if - /// none is found. - int findFirstPredOperandIdx() const { - if (isPredicable()) { - for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - if (OpInfo[i].isPredicate()) - return i; - } - return -1; - } - -private: - - /// \brief Return true if this instruction defines the specified physical - /// register, either explicitly or implicitly. - bool hasDefOfPhysReg(const MCInst &MI, unsigned Reg, - const MCRegisterInfo &RI) const; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCInstrInfo.h b/llvm/include/llvm/MC/MCInstrInfo.h deleted file mode 100644 index 70c86587..00000000 --- a/llvm/include/llvm/MC/MCInstrInfo.h +++ /dev/null @@ -1,59 +0,0 @@ -//===-- llvm/MC/MCInstrInfo.h - Target Instruction Info ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file describes the target machine instruction set. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCINSTRINFO_H -#define LLVM_MC_MCINSTRINFO_H - -#include "llvm/MC/MCInstrDesc.h" -#include - -namespace llvm { - -//--------------------------------------------------------------------------- -/// \brief Interface to description of machine instruction set. -class MCInstrInfo { - const MCInstrDesc *Desc; // Raw array to allow static init'n - const unsigned *InstrNameIndices; // Array for name indices in InstrNameData - const char *InstrNameData; // Instruction name string pool - unsigned NumOpcodes; // Number of entries in the desc array - -public: - /// \brief Initialize MCInstrInfo, called by TableGen auto-generated routines. - /// *DO NOT USE*. - void InitMCInstrInfo(const MCInstrDesc *D, const unsigned *NI, const char *ND, - unsigned NO) { - Desc = D; - InstrNameIndices = NI; - InstrNameData = ND; - NumOpcodes = NO; - } - - unsigned getNumOpcodes() const { return NumOpcodes; } - - /// \brief Return the machine instruction descriptor that corresponds to the - /// specified instruction opcode. - const MCInstrDesc &get(unsigned Opcode) const { - assert(Opcode < NumOpcodes && "Invalid opcode!"); - return Desc[Opcode]; - } - - /// \brief Returns the name for the instructions with the given opcode. - const char *getName(unsigned Opcode) const { - assert(Opcode < NumOpcodes && "Invalid opcode!"); - return &InstrNameData[InstrNameIndices[Opcode]]; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCInstrItineraries.h b/llvm/include/llvm/MC/MCInstrItineraries.h deleted file mode 100644 index b2871a98..00000000 --- a/llvm/include/llvm/MC/MCInstrItineraries.h +++ /dev/null @@ -1,239 +0,0 @@ -//===-- llvm/MC/MCInstrItineraries.h - Scheduling ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file describes the structures used for instruction -// itineraries, stages, and operand reads/writes. This is used by -// schedulers to determine instruction stages and latencies. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCINSTRITINERARIES_H -#define LLVM_MC_MCINSTRITINERARIES_H - -#include "llvm/MC/MCSchedule.h" -#include - -namespace llvm { - -//===----------------------------------------------------------------------===// -/// These values represent a non-pipelined step in -/// the execution of an instruction. Cycles represents the number of -/// discrete time slots needed to complete the stage. Units represent -/// the choice of functional units that can be used to complete the -/// stage. Eg. IntUnit1, IntUnit2. NextCycles indicates how many -/// cycles should elapse from the start of this stage to the start of -/// the next stage in the itinerary. A value of -1 indicates that the -/// next stage should start immediately after the current one. -/// For example: -/// -/// { 1, x, -1 } -/// indicates that the stage occupies FU x for 1 cycle and that -/// the next stage starts immediately after this one. -/// -/// { 2, x|y, 1 } -/// indicates that the stage occupies either FU x or FU y for 2 -/// consecutive cycles and that the next stage starts one cycle -/// after this stage starts. That is, the stage requirements -/// overlap in time. -/// -/// { 1, x, 0 } -/// indicates that the stage occupies FU x for 1 cycle and that -/// the next stage starts in this same cycle. This can be used to -/// indicate that the instruction requires multiple stages at the -/// same time. -/// -/// FU reservation can be of two different kinds: -/// - FUs which instruction actually requires -/// - FUs which instruction just reserves. Reserved unit is not available for -/// execution of other instruction. However, several instructions can reserve -/// the same unit several times. -/// Such two types of units reservation is used to model instruction domain -/// change stalls, FUs using the same resource (e.g. same register file), etc. - -struct InstrStage { - enum ReservationKinds { - Required = 0, - Reserved = 1 - }; - - unsigned Cycles_; ///< Length of stage in machine cycles - unsigned Units_; ///< Choice of functional units - int NextCycles_; ///< Number of machine cycles to next stage - ReservationKinds Kind_; ///< Kind of the FU reservation - - /// \brief Returns the number of cycles the stage is occupied. - unsigned getCycles() const { - return Cycles_; - } - - /// \brief Returns the choice of FUs. - unsigned getUnits() const { - return Units_; - } - - ReservationKinds getReservationKind() const { - return Kind_; - } - - /// \brief Returns the number of cycles from the start of this stage to the - /// start of the next stage in the itinerary - unsigned getNextCycles() const { - return (NextCycles_ >= 0) ? (unsigned)NextCycles_ : Cycles_; - } -}; - - -//===----------------------------------------------------------------------===// -/// An itinerary represents the scheduling information for an instruction. -/// This includes a set of stages occupied by the instruction and the pipeline -/// cycle in which operands are read and written. -/// -struct InstrItinerary { - int NumMicroOps; ///< # of micro-ops, -1 means it's variable - unsigned FirstStage; ///< Index of first stage in itinerary - unsigned LastStage; ///< Index of last + 1 stage in itinerary - unsigned FirstOperandCycle; ///< Index of first operand rd/wr - unsigned LastOperandCycle; ///< Index of last + 1 operand rd/wr -}; - - -//===----------------------------------------------------------------------===// -/// Itinerary data supplied by a subtarget to be used by a target. -/// -class InstrItineraryData { -public: - MCSchedModel SchedModel; ///< Basic machine properties. - const InstrStage *Stages; ///< Array of stages selected - const unsigned *OperandCycles; ///< Array of operand cycles selected - const unsigned *Forwardings; ///< Array of pipeline forwarding pathes - const InstrItinerary *Itineraries; ///< Array of itineraries selected - - /// Ctors. - InstrItineraryData() : SchedModel(MCSchedModel::GetDefaultSchedModel()), - Stages(nullptr), OperandCycles(nullptr), - Forwardings(nullptr), Itineraries(nullptr) {} - - InstrItineraryData(const MCSchedModel &SM, const InstrStage *S, - const unsigned *OS, const unsigned *F) - : SchedModel(SM), Stages(S), OperandCycles(OS), Forwardings(F), - Itineraries(SchedModel.InstrItineraries) {} - - /// \brief Returns true if there are no itineraries. - bool isEmpty() const { return Itineraries == nullptr; } - - /// \brief Returns true if the index is for the end marker itinerary. - bool isEndMarker(unsigned ItinClassIndx) const { - return ((Itineraries[ItinClassIndx].FirstStage == ~0U) && - (Itineraries[ItinClassIndx].LastStage == ~0U)); - } - - /// \brief Return the first stage of the itinerary. - const InstrStage *beginStage(unsigned ItinClassIndx) const { - unsigned StageIdx = Itineraries[ItinClassIndx].FirstStage; - return Stages + StageIdx; - } - - /// \brief Return the last+1 stage of the itinerary. - const InstrStage *endStage(unsigned ItinClassIndx) const { - unsigned StageIdx = Itineraries[ItinClassIndx].LastStage; - return Stages + StageIdx; - } - - /// \brief Return the total stage latency of the given class. The latency is - /// the maximum completion time for any stage in the itinerary. If no stages - /// exist, it defaults to one cycle. - unsigned getStageLatency(unsigned ItinClassIndx) const { - // If the target doesn't provide itinerary information, use a simple - // non-zero default value for all instructions. - if (isEmpty()) - return 1; - - // Calculate the maximum completion time for any stage. - unsigned Latency = 0, StartCycle = 0; - for (const InstrStage *IS = beginStage(ItinClassIndx), - *E = endStage(ItinClassIndx); IS != E; ++IS) { - Latency = std::max(Latency, StartCycle + IS->getCycles()); - StartCycle += IS->getNextCycles(); - } - return Latency; - } - - /// \brief Return the cycle for the given class and operand. Return -1 if no - /// cycle is specified for the operand. - int getOperandCycle(unsigned ItinClassIndx, unsigned OperandIdx) const { - if (isEmpty()) - return -1; - - unsigned FirstIdx = Itineraries[ItinClassIndx].FirstOperandCycle; - unsigned LastIdx = Itineraries[ItinClassIndx].LastOperandCycle; - if ((FirstIdx + OperandIdx) >= LastIdx) - return -1; - - return (int)OperandCycles[FirstIdx + OperandIdx]; - } - - /// \brief Return true if there is a pipeline forwarding between instructions - /// of itinerary classes DefClass and UseClasses so that value produced by an - /// instruction of itinerary class DefClass, operand index DefIdx can be - /// bypassed when it's read by an instruction of itinerary class UseClass, - /// operand index UseIdx. - bool hasPipelineForwarding(unsigned DefClass, unsigned DefIdx, - unsigned UseClass, unsigned UseIdx) const { - unsigned FirstDefIdx = Itineraries[DefClass].FirstOperandCycle; - unsigned LastDefIdx = Itineraries[DefClass].LastOperandCycle; - if ((FirstDefIdx + DefIdx) >= LastDefIdx) - return false; - if (Forwardings[FirstDefIdx + DefIdx] == 0) - return false; - - unsigned FirstUseIdx = Itineraries[UseClass].FirstOperandCycle; - unsigned LastUseIdx = Itineraries[UseClass].LastOperandCycle; - if ((FirstUseIdx + UseIdx) >= LastUseIdx) - return false; - - return Forwardings[FirstDefIdx + DefIdx] == - Forwardings[FirstUseIdx + UseIdx]; - } - - /// \brief Compute and return the use operand latency of a given itinerary - /// class and operand index if the value is produced by an instruction of the - /// specified itinerary class and def operand index. - int getOperandLatency(unsigned DefClass, unsigned DefIdx, - unsigned UseClass, unsigned UseIdx) const { - if (isEmpty()) - return -1; - - int DefCycle = getOperandCycle(DefClass, DefIdx); - if (DefCycle == -1) - return -1; - - int UseCycle = getOperandCycle(UseClass, UseIdx); - if (UseCycle == -1) - return -1; - - UseCycle = DefCycle - UseCycle + 1; - if (UseCycle > 0 && - hasPipelineForwarding(DefClass, DefIdx, UseClass, UseIdx)) - // FIXME: This assumes one cycle benefit for every pipeline forwarding. - --UseCycle; - return UseCycle; - } - - /// \brief Return the number of micro-ops that the given class decodes to. - /// Return -1 for classes that require dynamic lookup via TargetInstrInfo. - int getNumMicroOps(unsigned ItinClassIndx) const { - if (isEmpty()) - return 1; - return Itineraries[ItinClassIndx].NumMicroOps; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCLabel.h b/llvm/include/llvm/MC/MCLabel.h deleted file mode 100644 index a12473fd..00000000 --- a/llvm/include/llvm/MC/MCLabel.h +++ /dev/null @@ -1,57 +0,0 @@ -//===- MCLabel.h - Machine Code Directional Local Labels --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MCLabel class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCLABEL_H -#define LLVM_MC_MCLABEL_H - -#include "llvm/Support/Compiler.h" - -namespace llvm { -class MCContext; -class raw_ostream; - -/// \brief Instances of this class represent a label name in the MC file, -/// and MCLabel are created and uniqued by the MCContext class. MCLabel -/// should only be constructed for valid instances in the object file. -class MCLabel { - // \brief The instance number of this Directional Local Label. - unsigned Instance; - -private: // MCContext creates and uniques these. - friend class MCContext; - MCLabel(unsigned instance) : Instance(instance) {} - - MCLabel(const MCLabel &) = delete; - void operator=(const MCLabel &) = delete; - -public: - /// \brief Get the current instance of this Directional Local Label. - unsigned getInstance() const { return Instance; } - - /// \brief Increment the current instance of this Directional Local Label. - unsigned incInstance() { return ++Instance; } - - /// \brief Print the value to the stream \p OS. - void print(raw_ostream &OS) const; - - /// \brief Print the value to stderr. - void dump() const; -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const MCLabel &Label) { - Label.print(OS); - return OS; -} -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCLinkerOptimizationHint.h b/llvm/include/llvm/MC/MCLinkerOptimizationHint.h deleted file mode 100644 index 200bb93f..00000000 --- a/llvm/include/llvm/MC/MCLinkerOptimizationHint.h +++ /dev/null @@ -1,186 +0,0 @@ -//===- MCLinkerOptimizationHint.h - LOH interface ---------------*- C++ -*-===// -// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares some helpers classes to handle Linker Optimization Hint -// (LOH). -// -// FIXME: LOH interface supports only MachO format at the moment. -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCLINKEROPTIMIZATIONHINT_H -#define LLVM_MC_MCLINKEROPTIMIZATIONHINT_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringSwitch.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { - -// Forward declarations. -class MCAsmLayout; -class MCSymbol; -class MachObjectWriter; - -/// Linker Optimization Hint Type. -enum MCLOHType { - MCLOH_AdrpAdrp = 0x1u, ///< Adrp xY, _v1@PAGE -> Adrp xY, _v2@PAGE. - MCLOH_AdrpLdr = 0x2u, ///< Adrp _v@PAGE -> Ldr _v@PAGEOFF. - MCLOH_AdrpAddLdr = 0x3u, ///< Adrp _v@PAGE -> Add _v@PAGEOFF -> Ldr. - MCLOH_AdrpLdrGotLdr = 0x4u, ///< Adrp _v@GOTPAGE -> Ldr _v@GOTPAGEOFF -> Ldr. - MCLOH_AdrpAddStr = 0x5u, ///< Adrp _v@PAGE -> Add _v@PAGEOFF -> Str. - MCLOH_AdrpLdrGotStr = 0x6u, ///< Adrp _v@GOTPAGE -> Ldr _v@GOTPAGEOFF -> Str. - MCLOH_AdrpAdd = 0x7u, ///< Adrp _v@PAGE -> Add _v@PAGEOFF. - MCLOH_AdrpLdrGot = 0x8u ///< Adrp _v@GOTPAGE -> Ldr _v@GOTPAGEOFF. -}; - -static inline StringRef MCLOHDirectiveName() { - return StringRef(".loh"); -} - -static inline bool isValidMCLOHType(unsigned Kind) { - return Kind >= MCLOH_AdrpAdrp && Kind <= MCLOH_AdrpLdrGot; -} - -static inline int MCLOHNameToId(StringRef Name) { -#define MCLOHCaseNameToId(Name) .Case(#Name, MCLOH_ ## Name) - return StringSwitch(Name) - MCLOHCaseNameToId(AdrpAdrp) - MCLOHCaseNameToId(AdrpLdr) - MCLOHCaseNameToId(AdrpAddLdr) - MCLOHCaseNameToId(AdrpLdrGotLdr) - MCLOHCaseNameToId(AdrpAddStr) - MCLOHCaseNameToId(AdrpLdrGotStr) - MCLOHCaseNameToId(AdrpAdd) - MCLOHCaseNameToId(AdrpLdrGot) - .Default(-1); -} - -static inline StringRef MCLOHIdToName(MCLOHType Kind) { -#define MCLOHCaseIdToName(Name) case MCLOH_ ## Name: return StringRef(#Name); - switch (Kind) { - MCLOHCaseIdToName(AdrpAdrp); - MCLOHCaseIdToName(AdrpLdr); - MCLOHCaseIdToName(AdrpAddLdr); - MCLOHCaseIdToName(AdrpLdrGotLdr); - MCLOHCaseIdToName(AdrpAddStr); - MCLOHCaseIdToName(AdrpLdrGotStr); - MCLOHCaseIdToName(AdrpAdd); - MCLOHCaseIdToName(AdrpLdrGot); - } - return StringRef(); -} - -static inline int MCLOHIdToNbArgs(MCLOHType Kind) { - switch (Kind) { - // LOH with two arguments - case MCLOH_AdrpAdrp: - case MCLOH_AdrpLdr: - case MCLOH_AdrpAdd: - case MCLOH_AdrpLdrGot: - return 2; - // LOH with three arguments - case MCLOH_AdrpAddLdr: - case MCLOH_AdrpLdrGotLdr: - case MCLOH_AdrpAddStr: - case MCLOH_AdrpLdrGotStr: - return 3; - } - return -1; -} - -/// Store Linker Optimization Hint information (LOH). -class MCLOHDirective { - MCLOHType Kind; - - /// Arguments of this directive. Order matters. - SmallVector Args; - - /// Emit this directive in \p OutStream using the information available - /// in the given \p ObjWriter and \p Layout to get the address of the - /// arguments within the object file. - void emit_impl(raw_ostream &OutStream, const MachObjectWriter &ObjWriter, - const MCAsmLayout &Layout) const; - -public: - typedef SmallVectorImpl LOHArgs; - - MCLOHDirective(MCLOHType Kind, const LOHArgs &Args) - : Kind(Kind), Args(Args.begin(), Args.end()) { - assert(isValidMCLOHType(Kind) && "Invalid LOH directive type!"); - } - - MCLOHType getKind() const { return Kind; } - - const LOHArgs &getArgs() const { return Args; } - - /// Emit this directive as: - /// - void emit(MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const; - - /// Get the size in bytes of this directive if emitted in \p ObjWriter with - /// the given \p Layout. - uint64_t getEmitSize(const MachObjectWriter &ObjWriter, - const MCAsmLayout &Layout) const; -}; - -class MCLOHContainer { - /// Keep track of the emit size of all the LOHs. - mutable uint64_t EmitSize; - - /// Keep track of all LOH directives. - SmallVector Directives; - -public: - typedef SmallVectorImpl LOHDirectives; - - MCLOHContainer() : EmitSize(0) {} - - /// Const accessor to the directives. - const LOHDirectives &getDirectives() const { - return Directives; - } - - /// Add the directive of the given kind \p Kind with the given arguments - /// \p Args to the container. - void addDirective(MCLOHType Kind, const MCLOHDirective::LOHArgs &Args) { - Directives.push_back(MCLOHDirective(Kind, Args)); - } - - /// Get the size of the directives if emitted. - uint64_t getEmitSize(const MachObjectWriter &ObjWriter, - const MCAsmLayout &Layout) const { - if (!EmitSize) { - for (const MCLOHDirective &D : Directives) - EmitSize += D.getEmitSize(ObjWriter, Layout); - } - return EmitSize; - } - - /// Emit all Linker Optimization Hint in one big table. - /// Each line of the table is emitted by LOHDirective::emit. - void emit(MachObjectWriter &ObjWriter, const MCAsmLayout &Layout) const { - for (const MCLOHDirective &D : Directives) - D.emit(ObjWriter, Layout); - } - - void reset() { - Directives.clear(); - EmitSize = 0; - } -}; - -// Add types for specialized template using MCSymbol. -typedef MCLOHDirective::LOHArgs MCLOHArgs; -typedef MCLOHContainer::LOHDirectives MCLOHDirectives; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCMachObjectWriter.h b/llvm/include/llvm/MC/MCMachObjectWriter.h deleted file mode 100644 index 1a685dbd..00000000 --- a/llvm/include/llvm/MC/MCMachObjectWriter.h +++ /dev/null @@ -1,276 +0,0 @@ -//===-- llvm/MC/MCMachObjectWriter.h - Mach Object Writer -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCMACHOBJECTWRITER_H -#define LLVM_MC_MCMACHOBJECTWRITER_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCSection.h" -#include "llvm/MC/MCObjectWriter.h" -#include "llvm/MC/StringTableBuilder.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/MachO.h" -#include - -namespace llvm { - -class MachObjectWriter; - -class MCMachObjectTargetWriter { - const unsigned Is64Bit : 1; - const uint32_t CPUType; - const uint32_t CPUSubtype; - unsigned LocalDifference_RIT; - -protected: - MCMachObjectTargetWriter(bool Is64Bit_, uint32_t CPUType_, - uint32_t CPUSubtype_); - - void setLocalDifferenceRelocationType(unsigned Type) { - LocalDifference_RIT = Type; - } - -public: - virtual ~MCMachObjectTargetWriter(); - - /// \name Lifetime Management - /// @{ - - virtual void reset() {} - - /// @} - - /// \name Accessors - /// @{ - - bool is64Bit() const { return Is64Bit; } - uint32_t getCPUType() const { return CPUType; } - uint32_t getCPUSubtype() const { return CPUSubtype; } - unsigned getLocalDifferenceRelocationType() const { - return LocalDifference_RIT; - } - - /// @} - - /// \name API - /// @{ - - virtual void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm, - const MCAsmLayout &Layout, - const MCFragment *Fragment, - const MCFixup &Fixup, MCValue Target, - uint64_t &FixedValue) = 0; - - /// @} -}; - -class MachObjectWriter : public MCObjectWriter { - /// Helper struct for containing some precomputed information on symbols. - struct MachSymbolData { - const MCSymbol *Symbol; - uint64_t StringIndex; - uint8_t SectionIndex; - - // Support lexicographic sorting. - bool operator<(const MachSymbolData &RHS) const; - }; - - /// The target specific Mach-O writer instance. - std::unique_ptr TargetObjectWriter; - - /// \name Relocation Data - /// @{ - - struct RelAndSymbol { - const MCSymbol *Sym; - MachO::any_relocation_info MRE; - RelAndSymbol(const MCSymbol *Sym, const MachO::any_relocation_info &MRE) - : Sym(Sym), MRE(MRE) {} - }; - - llvm::DenseMap> Relocations; - llvm::DenseMap IndirectSymBase; - - SectionAddrMap SectionAddress; - - /// @} - /// \name Symbol Table Data - /// @{ - - StringTableBuilder StringTable{StringTableBuilder::MachO}; - std::vector LocalSymbolData; - std::vector ExternalSymbolData; - std::vector UndefinedSymbolData; - - /// @} - - MachSymbolData *findSymbolData(const MCSymbol &Sym); - -public: - MachObjectWriter(MCMachObjectTargetWriter *MOTW, raw_pwrite_stream &OS, - bool IsLittleEndian) - : MCObjectWriter(OS, IsLittleEndian), TargetObjectWriter(MOTW) {} - - const MCSymbol &findAliasedSymbol(const MCSymbol &Sym) const; - - /// \name Lifetime management Methods - /// @{ - - void reset() override; - - /// @} - - /// \name Utility Methods - /// @{ - - bool isFixupKindPCRel(const MCAssembler &Asm, unsigned Kind); - - SectionAddrMap &getSectionAddressMap() { return SectionAddress; } - - uint64_t getSectionAddress(const MCSection *Sec) const { - return SectionAddress.lookup(Sec); - } - uint64_t getSymbolAddress(const MCSymbol &S, const MCAsmLayout &Layout) const; - - uint64_t getFragmentAddress(const MCFragment *Fragment, - const MCAsmLayout &Layout) const; - - uint64_t getPaddingSize(const MCSection *SD, const MCAsmLayout &Layout) const; - - bool doesSymbolRequireExternRelocation(const MCSymbol &S); - - /// @} - - /// \name Target Writer Proxy Accessors - /// @{ - - bool is64Bit() const { return TargetObjectWriter->is64Bit(); } - bool isX86_64() const { - uint32_t CPUType = TargetObjectWriter->getCPUType(); - return CPUType == MachO::CPU_TYPE_X86_64; - } - - /// @} - - void writeHeader(MachO::HeaderFileType Type, unsigned NumLoadCommands, - unsigned LoadCommandsSize, bool SubsectionsViaSymbols); - - /// Write a segment load command. - /// - /// \param NumSections The number of sections in this segment. - /// \param SectionDataSize The total size of the sections. - void writeSegmentLoadCommand(StringRef Name, unsigned NumSections, - uint64_t VMAddr, uint64_t VMSize, - uint64_t SectionDataStartOffset, - uint64_t SectionDataSize, uint32_t MaxProt, - uint32_t InitProt); - - void writeSection(const MCAsmLayout &Layout, const MCSection &Sec, - uint64_t VMAddr, uint64_t FileOffset, unsigned Flags, - uint64_t RelocationsStart, unsigned NumRelocations); - - void writeSymtabLoadCommand(uint32_t SymbolOffset, uint32_t NumSymbols, - uint32_t StringTableOffset, - uint32_t StringTableSize); - - void writeDysymtabLoadCommand( - uint32_t FirstLocalSymbol, uint32_t NumLocalSymbols, - uint32_t FirstExternalSymbol, uint32_t NumExternalSymbols, - uint32_t FirstUndefinedSymbol, uint32_t NumUndefinedSymbols, - uint32_t IndirectSymbolOffset, uint32_t NumIndirectSymbols); - - void writeNlist(MachSymbolData &MSD, const MCAsmLayout &Layout); - - void writeLinkeditLoadCommand(uint32_t Type, uint32_t DataOffset, - uint32_t DataSize); - - void writeLinkerOptionsLoadCommand(const std::vector &Options); - - // FIXME: We really need to improve the relocation validation. Basically, we - // want to implement a separate computation which evaluates the relocation - // entry as the linker would, and verifies that the resultant fixup value is - // exactly what the encoder wanted. This will catch several classes of - // problems: - // - // - Relocation entry bugs, the two algorithms are unlikely to have the same - // exact bug. - // - // - Relaxation issues, where we forget to relax something. - // - // - Input errors, where something cannot be correctly encoded. 'as' allows - // these through in many cases. - - // Add a relocation to be output in the object file. At the time this is - // called, the symbol indexes are not know, so if the relocation refers - // to a symbol it should be passed as \p RelSymbol so that it can be updated - // afterwards. If the relocation doesn't refer to a symbol, nullptr should be - // used. - void addRelocation(const MCSymbol *RelSymbol, const MCSection *Sec, - MachO::any_relocation_info &MRE) { - RelAndSymbol P(RelSymbol, MRE); - Relocations[Sec].push_back(P); - } - - void recordScatteredRelocation(const MCAssembler &Asm, - const MCAsmLayout &Layout, - const MCFragment *Fragment, - const MCFixup &Fixup, MCValue Target, - unsigned Log2Size, uint64_t &FixedValue); - - void recordTLVPRelocation(const MCAssembler &Asm, const MCAsmLayout &Layout, - const MCFragment *Fragment, const MCFixup &Fixup, - MCValue Target, uint64_t &FixedValue); - - void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, - const MCFragment *Fragment, const MCFixup &Fixup, - MCValue Target, bool &IsPCRel, - uint64_t &FixedValue) override; - - void bindIndirectSymbols(MCAssembler &Asm); - - /// Compute the symbol table data. - void computeSymbolTable(MCAssembler &Asm, - std::vector &LocalSymbolData, - std::vector &ExternalSymbolData, - std::vector &UndefinedSymbolData); - - void computeSectionAddresses(const MCAssembler &Asm, - const MCAsmLayout &Layout); - - void executePostLayoutBinding(MCAssembler &Asm, - const MCAsmLayout &Layout) override; - - bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, - const MCSymbol &A, - const MCSymbol &B, - bool InSet) const override; - - bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, - const MCSymbol &SymA, - const MCFragment &FB, bool InSet, - bool IsPCRel) const override; - - void writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) override; -}; - -/// Construct a new Mach-O writer instance. -/// -/// This routine takes ownership of the target writer subclass. -/// -/// \param MOTW - The target specific Mach-O writer subclass. -/// \param OS - The stream to write to. -/// \returns The constructed object writer. -MCObjectWriter *createMachObjectWriter(MCMachObjectTargetWriter *MOTW, - raw_pwrite_stream &OS, - bool IsLittleEndian); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCObjectFileInfo.h b/llvm/include/llvm/MC/MCObjectFileInfo.h deleted file mode 100644 index cef4e5b3..00000000 --- a/llvm/include/llvm/MC/MCObjectFileInfo.h +++ /dev/null @@ -1,369 +0,0 @@ -//===-- llvm/MC/MCObjectFileInfo.h - Object File Info -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file describes common object file formats. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCOBJECTFILEINFO_H -#define LLVM_MC_MCOBJECTFILEINFO_H - -#include "llvm/ADT/Triple.h" -#include "llvm/Support/CodeGen.h" - -namespace llvm { -class MCContext; -class MCSection; - -class MCObjectFileInfo { -protected: - /// True if .comm supports alignment. This is a hack for as long as we - /// support 10.4 Tiger, whose assembler doesn't support alignment on comm. - bool CommDirectiveSupportsAlignment; - - /// True if target object file supports a weak_definition of constant 0 for an - /// omitted EH frame. - bool SupportsWeakOmittedEHFrame; - - /// True if the target object file supports emitting a compact unwind section - /// without an associated EH frame section. - bool SupportsCompactUnwindWithoutEHFrame; - - /// OmitDwarfIfHaveCompactUnwind - True if the target object file - /// supports having some functions with compact unwind and other with - /// dwarf unwind. - bool OmitDwarfIfHaveCompactUnwind; - - /// PersonalityEncoding, LSDAEncoding, TTypeEncoding - Some encoding values - /// for EH. - unsigned PersonalityEncoding; - unsigned LSDAEncoding; - unsigned FDECFIEncoding; - unsigned TTypeEncoding; - - /// Compact unwind encoding indicating that we should emit only an EH frame. - unsigned CompactUnwindDwarfEHFrameOnly; - - /// Section directive for standard text. - MCSection *TextSection; - - /// Section directive for standard data. - MCSection *DataSection; - - /// Section that is default initialized to zero. - MCSection *BSSSection; - - /// Section that is readonly and can contain arbitrary initialized data. - /// Targets are not required to have a readonly section. If they don't, - /// various bits of code will fall back to using the data section for - /// constants. - MCSection *ReadOnlySection; - - /// This section contains the static constructor pointer list. - MCSection *StaticCtorSection; - - /// This section contains the static destructor pointer list. - MCSection *StaticDtorSection; - - /// If exception handling is supported by the target, this is the section the - /// Language Specific Data Area information is emitted to. - MCSection *LSDASection; - - /// If exception handling is supported by the target and the target can - /// support a compact representation of the CIE and FDE, this is the section - /// to emit them into. - MCSection *CompactUnwindSection; - - // Dwarf sections for debug info. If a target supports debug info, these must - // be set. - MCSection *DwarfAbbrevSection; - MCSection *DwarfInfoSection; - MCSection *DwarfLineSection; - MCSection *DwarfFrameSection; - MCSection *DwarfPubTypesSection; - const MCSection *DwarfDebugInlineSection; - MCSection *DwarfStrSection; - MCSection *DwarfLocSection; - MCSection *DwarfARangesSection; - MCSection *DwarfRangesSection; - MCSection *DwarfMacinfoSection; - // The pubnames section is no longer generated by default. The generation - // can be enabled by a compiler flag. - MCSection *DwarfPubNamesSection; - - /// DWARF5 Experimental Debug Info Sections - /// DwarfAccelNamesSection, DwarfAccelObjCSection, - /// DwarfAccelNamespaceSection, DwarfAccelTypesSection - - /// If we use the DWARF accelerated hash tables then we want to emit these - /// sections. - MCSection *DwarfAccelNamesSection; - MCSection *DwarfAccelObjCSection; - MCSection *DwarfAccelNamespaceSection; - MCSection *DwarfAccelTypesSection; - - // These are used for the Fission separate debug information files. - MCSection *DwarfInfoDWOSection; - MCSection *DwarfTypesDWOSection; - MCSection *DwarfAbbrevDWOSection; - MCSection *DwarfStrDWOSection; - MCSection *DwarfLineDWOSection; - MCSection *DwarfLocDWOSection; - MCSection *DwarfStrOffDWOSection; - MCSection *DwarfAddrSection; - - // These are for Fission DWP files. - MCSection *DwarfCUIndexSection; - MCSection *DwarfTUIndexSection; - - /// Section for newer gnu pubnames. - MCSection *DwarfGnuPubNamesSection; - /// Section for newer gnu pubtypes. - MCSection *DwarfGnuPubTypesSection; - - MCSection *COFFDebugSymbolsSection; - MCSection *COFFDebugTypesSection; - - /// Extra TLS Variable Data section. - /// - /// If the target needs to put additional information for a TLS variable, - /// it'll go here. - MCSection *TLSExtraDataSection; - - /// Section directive for Thread Local data. ELF, MachO and COFF. - MCSection *TLSDataSection; // Defaults to ".tdata". - - /// Section directive for Thread Local uninitialized data. - /// - /// Null if this target doesn't support a BSS section. ELF and MachO only. - MCSection *TLSBSSSection; // Defaults to ".tbss". - - /// StackMap section. - MCSection *StackMapSection; - - /// FaultMap section. - MCSection *FaultMapSection; - - /// EH frame section. - /// - /// It is initialized on demand so it can be overwritten (with uniquing). - MCSection *EHFrameSection; - - // ELF specific sections. - MCSection *DataRelROSection; - MCSection *MergeableConst4Section; - MCSection *MergeableConst8Section; - MCSection *MergeableConst16Section; - MCSection *MergeableConst32Section; - - // MachO specific sections. - - /// Section for thread local structure information. - /// - /// Contains the source code name of the variable, visibility and a pointer to - /// the initial value (.tdata or .tbss). - MCSection *TLSTLVSection; // Defaults to ".tlv". - - /// Section for thread local data initialization functions. - const MCSection *TLSThreadInitSection; // Defaults to ".thread_init_func". - - MCSection *CStringSection; - MCSection *UStringSection; - MCSection *TextCoalSection; - MCSection *ConstTextCoalSection; - MCSection *ConstDataSection; - MCSection *DataCoalSection; - MCSection *DataCommonSection; - MCSection *DataBSSSection; - MCSection *FourByteConstantSection; - MCSection *EightByteConstantSection; - MCSection *SixteenByteConstantSection; - MCSection *LazySymbolPointerSection; - MCSection *NonLazySymbolPointerSection; - MCSection *ThreadLocalPointerSection; - - /// COFF specific sections. - MCSection *DrectveSection; - MCSection *PDataSection; - MCSection *XDataSection; - MCSection *SXDataSection; - -public: - void InitMCObjectFileInfo(const Triple &TT, bool PIC, CodeModel::Model CM, - MCContext &ctx); - - bool getSupportsWeakOmittedEHFrame() const { - return SupportsWeakOmittedEHFrame; - } - bool getSupportsCompactUnwindWithoutEHFrame() const { - return SupportsCompactUnwindWithoutEHFrame; - } - bool getOmitDwarfIfHaveCompactUnwind() const { - return OmitDwarfIfHaveCompactUnwind; - } - - bool getCommDirectiveSupportsAlignment() const { - return CommDirectiveSupportsAlignment; - } - - unsigned getPersonalityEncoding() const { return PersonalityEncoding; } - unsigned getLSDAEncoding() const { return LSDAEncoding; } - unsigned getFDEEncoding() const { return FDECFIEncoding; } - unsigned getTTypeEncoding() const { return TTypeEncoding; } - - unsigned getCompactUnwindDwarfEHFrameOnly() const { - return CompactUnwindDwarfEHFrameOnly; - } - - MCSection *getTextSection() const { return TextSection; } - MCSection *getDataSection() const { return DataSection; } - MCSection *getBSSSection() const { return BSSSection; } - MCSection *getReadOnlySection() const { return ReadOnlySection; } - MCSection *getLSDASection() const { return LSDASection; } - MCSection *getCompactUnwindSection() const { return CompactUnwindSection; } - MCSection *getDwarfAbbrevSection() const { return DwarfAbbrevSection; } - MCSection *getDwarfInfoSection() const { return DwarfInfoSection; } - MCSection *getDwarfLineSection() const { return DwarfLineSection; } - MCSection *getDwarfFrameSection() const { return DwarfFrameSection; } - MCSection *getDwarfPubNamesSection() const { return DwarfPubNamesSection; } - MCSection *getDwarfPubTypesSection() const { return DwarfPubTypesSection; } - MCSection *getDwarfGnuPubNamesSection() const { - return DwarfGnuPubNamesSection; - } - MCSection *getDwarfGnuPubTypesSection() const { - return DwarfGnuPubTypesSection; - } - const MCSection *getDwarfDebugInlineSection() const { - return DwarfDebugInlineSection; - } - MCSection *getDwarfStrSection() const { return DwarfStrSection; } - MCSection *getDwarfLocSection() const { return DwarfLocSection; } - MCSection *getDwarfARangesSection() const { return DwarfARangesSection; } - MCSection *getDwarfRangesSection() const { return DwarfRangesSection; } - MCSection *getDwarfMacinfoSection() const { return DwarfMacinfoSection; } - - // DWARF5 Experimental Debug Info Sections - MCSection *getDwarfAccelNamesSection() const { - return DwarfAccelNamesSection; - } - MCSection *getDwarfAccelObjCSection() const { return DwarfAccelObjCSection; } - MCSection *getDwarfAccelNamespaceSection() const { - return DwarfAccelNamespaceSection; - } - MCSection *getDwarfAccelTypesSection() const { - return DwarfAccelTypesSection; - } - MCSection *getDwarfInfoDWOSection() const { return DwarfInfoDWOSection; } - MCSection *getDwarfTypesSection(uint64_t Hash) const; - MCSection *getDwarfTypesDWOSection() const { return DwarfTypesDWOSection; } - MCSection *getDwarfAbbrevDWOSection() const { return DwarfAbbrevDWOSection; } - MCSection *getDwarfStrDWOSection() const { return DwarfStrDWOSection; } - MCSection *getDwarfLineDWOSection() const { return DwarfLineDWOSection; } - MCSection *getDwarfLocDWOSection() const { return DwarfLocDWOSection; } - MCSection *getDwarfStrOffDWOSection() const { return DwarfStrOffDWOSection; } - MCSection *getDwarfAddrSection() const { return DwarfAddrSection; } - MCSection *getDwarfCUIndexSection() const { return DwarfCUIndexSection; } - MCSection *getDwarfTUIndexSection() const { return DwarfTUIndexSection; } - - MCSection *getCOFFDebugSymbolsSection() const { - return COFFDebugSymbolsSection; - } - MCSection *getCOFFDebugTypesSection() const { - return COFFDebugTypesSection; - } - - - MCSection *getTLSExtraDataSection() const { return TLSExtraDataSection; } - const MCSection *getTLSDataSection() const { return TLSDataSection; } - MCSection *getTLSBSSSection() const { return TLSBSSSection; } - - MCSection *getStackMapSection() const { return StackMapSection; } - MCSection *getFaultMapSection() const { return FaultMapSection; } - - // ELF specific sections. - MCSection *getDataRelROSection() const { return DataRelROSection; } - const MCSection *getMergeableConst4Section() const { - return MergeableConst4Section; - } - const MCSection *getMergeableConst8Section() const { - return MergeableConst8Section; - } - const MCSection *getMergeableConst16Section() const { - return MergeableConst16Section; - } - const MCSection *getMergeableConst32Section() const { - return MergeableConst32Section; - } - - // MachO specific sections. - const MCSection *getTLSTLVSection() const { return TLSTLVSection; } - const MCSection *getTLSThreadInitSection() const { - return TLSThreadInitSection; - } - const MCSection *getCStringSection() const { return CStringSection; } - const MCSection *getUStringSection() const { return UStringSection; } - MCSection *getTextCoalSection() const { return TextCoalSection; } - const MCSection *getConstTextCoalSection() const { - return ConstTextCoalSection; - } - const MCSection *getConstDataSection() const { return ConstDataSection; } - const MCSection *getDataCoalSection() const { return DataCoalSection; } - const MCSection *getDataCommonSection() const { return DataCommonSection; } - MCSection *getDataBSSSection() const { return DataBSSSection; } - const MCSection *getFourByteConstantSection() const { - return FourByteConstantSection; - } - const MCSection *getEightByteConstantSection() const { - return EightByteConstantSection; - } - const MCSection *getSixteenByteConstantSection() const { - return SixteenByteConstantSection; - } - MCSection *getLazySymbolPointerSection() const { - return LazySymbolPointerSection; - } - MCSection *getNonLazySymbolPointerSection() const { - return NonLazySymbolPointerSection; - } - MCSection *getThreadLocalPointerSection() const { - return ThreadLocalPointerSection; - } - - // COFF specific sections. - MCSection *getDrectveSection() const { return DrectveSection; } - MCSection *getPDataSection() const { return PDataSection; } - MCSection *getXDataSection() const { return XDataSection; } - MCSection *getSXDataSection() const { return SXDataSection; } - - MCSection *getEHFrameSection() { - return EHFrameSection; - } - - enum Environment { IsMachO, IsELF, IsCOFF }; - Environment getObjectFileType() const { return Env; } - - bool isPositionIndependent() const { return PositionIndependent; } - -private: - Environment Env; - bool PositionIndependent; - CodeModel::Model CMModel; - MCContext *Ctx; - Triple TT; - - void initMachOMCObjectFileInfo(const Triple &T); - void initELFMCObjectFileInfo(const Triple &T); - void initCOFFMCObjectFileInfo(const Triple &T); - -public: - const Triple &getTargetTriple() const { return TT; } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCObjectStreamer.h b/llvm/include/llvm/MC/MCObjectStreamer.h deleted file mode 100644 index d7775f27..00000000 --- a/llvm/include/llvm/MC/MCObjectStreamer.h +++ /dev/null @@ -1,167 +0,0 @@ -//===- MCObjectStreamer.h - MCStreamer Object File Interface ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCOBJECTSTREAMER_H -#define LLVM_MC_MCOBJECTSTREAMER_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/MC/MCAssembler.h" -#include "llvm/MC/MCSection.h" -#include "llvm/MC/MCStreamer.h" - -namespace llvm { -class MCAssembler; -class MCCodeEmitter; -class MCSubtargetInfo; -class MCExpr; -class MCFragment; -class MCDataFragment; -class MCAsmBackend; -class raw_ostream; -class raw_pwrite_stream; - -/// \brief Streaming object file generation interface. -/// -/// This class provides an implementation of the MCStreamer interface which is -/// suitable for use with the assembler backend. Specific object file formats -/// are expected to subclass this interface to implement directives specific -/// to that file format or custom semantics expected by the object writer -/// implementation. -class MCObjectStreamer : public MCStreamer { - MCAssembler *Assembler; - MCSection::iterator CurInsertionPoint; - bool EmitEHFrame; - bool EmitDebugFrame; - SmallVector PendingLabels; - - virtual void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo&) = 0; - void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame) override; - void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) override; - -protected: - MCObjectStreamer(MCContext &Context, MCAsmBackend &TAB, raw_pwrite_stream &OS, - MCCodeEmitter *Emitter); - ~MCObjectStreamer() override; - -public: - /// state management - void reset() override; - - /// Object streamers require the integrated assembler. - bool isIntegratedAssemblerRequired() const override { return true; } - - void EmitFrames(MCAsmBackend *MAB); - void EmitCFISections(bool EH, bool Debug) override; - - MCFragment *getCurrentFragment() const; - - void insert(MCFragment *F) { - flushPendingLabels(F); - MCSection *CurSection = getCurrentSectionOnly(); - CurSection->getFragmentList().insert(CurInsertionPoint, F); - F->setParent(CurSection); - } - - /// Get a data fragment to write into, creating a new one if the current - /// fragment is not a data fragment. - MCDataFragment *getOrCreateDataFragment(); - -protected: - bool changeSectionImpl(MCSection *Section, const MCExpr *Subsection); - - /// If any labels have been emitted but not assigned fragments, ensure that - /// they get assigned, either to F if possible or to a new data fragment. - /// Optionally, it is also possible to provide an offset \p FOffset, which - /// will be used as a symbol offset within the fragment. - void flushPendingLabels(MCFragment *F, uint64_t FOffset = 0); - -public: - void visitUsedSymbol(const MCSymbol &Sym) override; - - MCAssembler &getAssembler() { return *Assembler; } - - /// \name MCStreamer Interface - /// @{ - - void EmitLabel(MCSymbol *Symbol) override; - void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) override; - void EmitValueImpl(const MCExpr *Value, unsigned Size, - SMLoc Loc = SMLoc()) override; - void EmitULEB128Value(const MCExpr *Value) override; - void EmitSLEB128Value(const MCExpr *Value) override; - void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override; - void ChangeSection(MCSection *Section, const MCExpr *Subsection) override; - void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo& STI) override; - - /// \brief Emit an instruction to a special fragment, because this instruction - /// can change its size during relaxation. - virtual void EmitInstToFragment(const MCInst &Inst, const MCSubtargetInfo &); - - void EmitBundleAlignMode(unsigned AlignPow2) override; - void EmitBundleLock(bool AlignToEnd) override; - void EmitBundleUnlock() override; - void EmitBytes(StringRef Data) override; - void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0, - unsigned ValueSize = 1, - unsigned MaxBytesToEmit = 0) override; - void EmitCodeAlignment(unsigned ByteAlignment, - unsigned MaxBytesToEmit = 0) override; - void emitValueToOffset(const MCExpr *Offset, unsigned char Value) override; - void EmitDwarfLocDirective(unsigned FileNo, unsigned Line, - unsigned Column, unsigned Flags, - unsigned Isa, unsigned Discriminator, - StringRef FileName) override; - void EmitDwarfAdvanceLineAddr(int64_t LineDelta, const MCSymbol *LastLabel, - const MCSymbol *Label, - unsigned PointerSize); - void EmitDwarfAdvanceFrameAddr(const MCSymbol *LastLabel, - const MCSymbol *Label); - void EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, unsigned Line, - unsigned Column, bool PrologueEnd, bool IsStmt, - StringRef FileName) override; - void EmitCVLinetableDirective(unsigned FunctionId, const MCSymbol *Begin, - const MCSymbol *End) override; - void EmitCVInlineLinetableDirective( - unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, - const MCSymbol *FnStartSym, const MCSymbol *FnEndSym, - ArrayRef SecondaryFunctionIds) override; - void EmitCVDefRangeDirective( - ArrayRef> Ranges, - StringRef FixedSizePortion) override; - void EmitCVStringTableDirective() override; - void EmitCVFileChecksumsDirective() override; - void EmitGPRel32Value(const MCExpr *Value) override; - void EmitGPRel64Value(const MCExpr *Value) override; - bool EmitRelocDirective(const MCExpr &Offset, StringRef Name, - const MCExpr *Expr, SMLoc Loc) override; - using MCStreamer::emitFill; - void emitFill(uint64_t NumBytes, uint8_t FillValue) override; - void emitFill(const MCExpr &NumBytes, uint64_t FillValue, - SMLoc Loc = SMLoc()) override; - void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr, - SMLoc Loc = SMLoc()) override; - - void FinishImpl() override; - - /// Emit the absolute difference between two symbols if possible. - /// - /// Emit the absolute difference between \c Hi and \c Lo, as long as we can - /// compute it. Currently, that requires that both symbols are in the same - /// data fragment. Otherwise, do nothing and return \c false. - /// - /// \pre Offset of \c Hi is greater than the offset \c Lo. - void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo, - unsigned Size) override; - - bool mayHaveInstructions(MCSection &Sec) const override; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCObjectWriter.h b/llvm/include/llvm/MC/MCObjectWriter.h deleted file mode 100644 index 0ecebe42..00000000 --- a/llvm/include/llvm/MC/MCObjectWriter.h +++ /dev/null @@ -1,204 +0,0 @@ -//===-- llvm/MC/MCObjectWriter.h - Object File Writer Interface -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCOBJECTWRITER_H -#define LLVM_MC_MCOBJECTWRITER_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/EndianStream.h" -#include "llvm/Support/raw_ostream.h" -#include - -namespace llvm { -class MCAsmLayout; -class MCAssembler; -class MCFixup; -class MCFragment; -class MCSymbol; -class MCSymbolRefExpr; -class MCValue; - -/// Defines the object file and target independent interfaces used by the -/// assembler backend to write native file format object files. -/// -/// The object writer contains a few callbacks used by the assembler to allow -/// the object writer to modify the assembler data structures at appropriate -/// points. Once assembly is complete, the object writer is given the -/// MCAssembler instance, which contains all the symbol and section data which -/// should be emitted as part of writeObject(). -/// -/// The object writer also contains a number of helper methods for writing -/// binary data to the output stream. -class MCObjectWriter { - MCObjectWriter(const MCObjectWriter &) = delete; - void operator=(const MCObjectWriter &) = delete; - - raw_pwrite_stream *OS; - -protected: - unsigned IsLittleEndian : 1; - -protected: // Can only create subclasses. - MCObjectWriter(raw_pwrite_stream &OS, bool IsLittleEndian) - : OS(&OS), IsLittleEndian(IsLittleEndian) {} - - unsigned getInitialOffset() { - return OS->tell(); - } - -public: - virtual ~MCObjectWriter(); - - /// lifetime management - virtual void reset() {} - - bool isLittleEndian() const { return IsLittleEndian; } - - raw_pwrite_stream &getStream() { return *OS; } - void setStream(raw_pwrite_stream &NewOS) { OS = &NewOS; } - - /// \name High-Level API - /// @{ - - /// Perform any late binding of symbols (for example, to assign symbol - /// indices for use when generating relocations). - /// - /// This routine is called by the assembler after layout and relaxation is - /// complete. - virtual void executePostLayoutBinding(MCAssembler &Asm, - const MCAsmLayout &Layout) = 0; - - /// Record a relocation entry. - /// - /// This routine is called by the assembler after layout and relaxation, and - /// post layout binding. The implementation is responsible for storing - /// information about the relocation so that it can be emitted during - /// writeObject(). - virtual void recordRelocation(MCAssembler &Asm, const MCAsmLayout &Layout, - const MCFragment *Fragment, - const MCFixup &Fixup, MCValue Target, - bool &IsPCRel, uint64_t &FixedValue) = 0; - - /// Check whether the difference (A - B) between two symbol references is - /// fully resolved. - /// - /// Clients are not required to answer precisely and may conservatively return - /// false, even when a difference is fully resolved. - bool isSymbolRefDifferenceFullyResolved(const MCAssembler &Asm, - const MCSymbolRefExpr *A, - const MCSymbolRefExpr *B, - bool InSet) const; - - virtual bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, - const MCSymbol &A, - const MCSymbol &B, - bool InSet) const; - - virtual bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, - const MCSymbol &SymA, - const MCFragment &FB, - bool InSet, - bool IsPCRel) const; - - /// True if this symbol (which is a variable) is weak. This is not - /// just STB_WEAK, but more generally whether or not we can evaluate - /// past it. - virtual bool isWeak(const MCSymbol &Sym) const; - - /// Write the object file. - /// - /// This routine is called by the assembler after layout and relaxation is - /// complete, fixups have been evaluated and applied, and relocations - /// generated. - virtual void writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) = 0; - - /// @} - /// \name Binary Output - /// @{ - - void write8(uint8_t Value) { *OS << char(Value); } - - void writeLE16(uint16_t Value) { - support::endian::Writer(*OS).write(Value); - } - - void writeLE32(uint32_t Value) { - support::endian::Writer(*OS).write(Value); - } - - void writeLE64(uint64_t Value) { - support::endian::Writer(*OS).write(Value); - } - - void writeBE16(uint16_t Value) { - support::endian::Writer(*OS).write(Value); - } - - void writeBE32(uint32_t Value) { - support::endian::Writer(*OS).write(Value); - } - - void writeBE64(uint64_t Value) { - support::endian::Writer(*OS).write(Value); - } - - void write16(uint16_t Value) { - if (IsLittleEndian) - writeLE16(Value); - else - writeBE16(Value); - } - - void write32(uint32_t Value) { - if (IsLittleEndian) - writeLE32(Value); - else - writeBE32(Value); - } - - void write64(uint64_t Value) { - if (IsLittleEndian) - writeLE64(Value); - else - writeBE64(Value); - } - - void WriteZeros(unsigned N) { - const char Zeros[16] = {0}; - - for (unsigned i = 0, e = N / 16; i != e; ++i) - *OS << StringRef(Zeros, 16); - - *OS << StringRef(Zeros, N % 16); - } - - void writeBytes(const SmallVectorImpl &ByteVec, - unsigned ZeroFillSize = 0) { - writeBytes(StringRef(ByteVec.data(), ByteVec.size()), ZeroFillSize); - } - - void writeBytes(StringRef Str, unsigned ZeroFillSize = 0) { - // TODO: this version may need to go away once all fragment contents are - // converted to SmallVector - assert( - (ZeroFillSize == 0 || Str.size() <= ZeroFillSize) && - "data size greater than fill size, unexpected large write will occur"); - *OS << Str; - if (ZeroFillSize) - WriteZeros(ZeroFillSize - Str.size()); - } - - /// @} -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCParser/AsmCond.h b/llvm/include/llvm/MC/MCParser/AsmCond.h deleted file mode 100644 index a918b560..00000000 --- a/llvm/include/llvm/MC/MCParser/AsmCond.h +++ /dev/null @@ -1,40 +0,0 @@ -//===- AsmCond.h - Assembly file conditional assembly ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCPARSER_ASMCOND_H -#define LLVM_MC_MCPARSER_ASMCOND_H - -namespace llvm { - -/// AsmCond - Class to support conditional assembly -/// -/// The conditional assembly feature (.if, .else, .elseif and .endif) is -/// implemented with AsmCond that tells us what we are in the middle of -/// processing. Ignore can be either true or false. When true we are ignoring -/// the block of code in the middle of a conditional. - -class AsmCond { -public: - enum ConditionalAssemblyType { - NoCond, // no conditional is being processed - IfCond, // inside if conditional - ElseIfCond, // inside elseif conditional - ElseCond // inside else conditional - }; - - ConditionalAssemblyType TheCond; - bool CondMet; - bool Ignore; - - AsmCond() : TheCond(NoCond), CondMet(false), Ignore(false) {} -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCParser/AsmLexer.h b/llvm/include/llvm/MC/MCParser/AsmLexer.h deleted file mode 100644 index c779121b..00000000 --- a/llvm/include/llvm/MC/MCParser/AsmLexer.h +++ /dev/null @@ -1,75 +0,0 @@ -//===- AsmLexer.h - Lexer for Assembly Files --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This class declares the lexer for assembly files. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCPARSER_ASMLEXER_H -#define LLVM_MC_MCPARSER_ASMLEXER_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/MC/MCParser/MCAsmLexer.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { -class MemoryBuffer; -class MCAsmInfo; - -/// AsmLexer - Lexer class for assembly files. -class AsmLexer : public MCAsmLexer { - const MCAsmInfo &MAI; - - const char *CurPtr; - StringRef CurBuf; - bool IsAtStartOfLine; - bool IsAtStartOfStatement; - - void operator=(const AsmLexer&) = delete; - AsmLexer(const AsmLexer&) = delete; - -protected: - /// LexToken - Read the next token and return its code. - AsmToken LexToken() override; - -public: - AsmLexer(const MCAsmInfo &MAI); - ~AsmLexer() override; - - void setBuffer(StringRef Buf, const char *ptr = nullptr); - - StringRef LexUntilEndOfStatement() override; - - size_t peekTokens(MutableArrayRef Buf, - bool ShouldSkipSpace = true) override; - - const MCAsmInfo &getMAI() const { return MAI; } - -private: - bool isAtStartOfComment(const char *Ptr); - bool isAtStatementSeparator(const char *Ptr); - int getNextChar(); - AsmToken ReturnError(const char *Loc, const std::string &Msg); - - AsmToken LexIdentifier(); - AsmToken LexSlash(); - AsmToken LexLineComment(); - AsmToken LexDigit(); - AsmToken LexSingleQuote(); - AsmToken LexQuote(); - AsmToken LexFloatLiteral(); - AsmToken LexHexFloatLiteral(bool NoIntDigits); - - StringRef LexUntilEndOfLine(); -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCParser/MCAsmLexer.h b/llvm/include/llvm/MC/MCParser/MCAsmLexer.h deleted file mode 100644 index 3dd22c93..00000000 --- a/llvm/include/llvm/MC/MCParser/MCAsmLexer.h +++ /dev/null @@ -1,227 +0,0 @@ -//===-- llvm/MC/MCAsmLexer.h - Abstract Asm Lexer Interface -----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCPARSER_MCASMLEXER_H -#define LLVM_MC_MCPARSER_MCASMLEXER_H - -#include "llvm/ADT/APInt.h" -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/SMLoc.h" -#include - -namespace llvm { - -/// Target independent representation for an assembler token. -class AsmToken { -public: - enum TokenKind { - // Markers - Eof, Error, - - // String values. - Identifier, - String, - - // Integer values. - Integer, - BigNum, // larger than 64 bits - - // Real values. - Real, - - // Comments - Comment, - HashDirective, - // No-value. - EndOfStatement, - Colon, - Space, - Plus, Minus, Tilde, - Slash, // '/' - BackSlash, // '\' - LParen, RParen, LBrac, RBrac, LCurly, RCurly, - Star, Dot, Comma, Dollar, Equal, EqualEqual, - - Pipe, PipePipe, Caret, - Amp, AmpAmp, Exclaim, ExclaimEqual, Percent, Hash, - Less, LessEqual, LessLess, LessGreater, - Greater, GreaterEqual, GreaterGreater, At - }; - -private: - TokenKind Kind; - - /// A reference to the entire token contents; this is always a pointer into - /// a memory buffer owned by the source manager. - StringRef Str; - - APInt IntVal; - -public: - AsmToken() {} - AsmToken(TokenKind Kind, StringRef Str, APInt IntVal) - : Kind(Kind), Str(Str), IntVal(std::move(IntVal)) {} - AsmToken(TokenKind Kind, StringRef Str, int64_t IntVal = 0) - : Kind(Kind), Str(Str), IntVal(64, IntVal, true) {} - - TokenKind getKind() const { return Kind; } - bool is(TokenKind K) const { return Kind == K; } - bool isNot(TokenKind K) const { return Kind != K; } - - SMLoc getLoc() const; - SMLoc getEndLoc() const; - SMRange getLocRange() const; - - /// Get the contents of a string token (without quotes). - StringRef getStringContents() const { - assert(Kind == String && "This token isn't a string!"); - return Str.slice(1, Str.size() - 1); - } - - /// Get the identifier string for the current token, which should be an - /// identifier or a string. This gets the portion of the string which should - /// be used as the identifier, e.g., it does not include the quotes on - /// strings. - StringRef getIdentifier() const { - if (Kind == Identifier) - return getString(); - return getStringContents(); - } - - /// Get the string for the current token, this includes all characters (for - /// example, the quotes on strings) in the token. - /// - /// The returned StringRef points into the source manager's memory buffer, and - /// is safe to store across calls to Lex(). - StringRef getString() const { return Str; } - - // FIXME: Don't compute this in advance, it makes every token larger, and is - // also not generally what we want (it is nicer for recovery etc. to lex 123br - // as a single token, then diagnose as an invalid number). - int64_t getIntVal() const { - assert(Kind == Integer && "This token isn't an integer!"); - return IntVal.getZExtValue(); - } - - APInt getAPIntVal() const { - assert((Kind == Integer || Kind == BigNum) && - "This token isn't an integer!"); - return IntVal; - } -}; - -/// Generic assembler lexer interface, for use by target specific assembly -/// lexers. -class MCAsmLexer { - /// The current token, stored in the base class for faster access. - SmallVector CurTok; - - /// The location and description of the current error - SMLoc ErrLoc; - std::string Err; - - MCAsmLexer(const MCAsmLexer &) = delete; - void operator=(const MCAsmLexer &) = delete; -protected: // Can only create subclasses. - const char *TokStart; - bool SkipSpace; - bool AllowAtInIdentifier; - - MCAsmLexer(); - - virtual AsmToken LexToken() = 0; - - void SetError(SMLoc errLoc, const std::string &err) { - ErrLoc = errLoc; - Err = err; - } - -public: - virtual ~MCAsmLexer(); - - /// Consume the next token from the input stream and return it. - /// - /// The lexer will continuosly return the end-of-file token once the end of - /// the main input file has been reached. - const AsmToken &Lex() { - assert(!CurTok.empty()); - CurTok.erase(CurTok.begin()); - // LexToken may generate multiple tokens via UnLex but will always return - // the first one. Place returned value at head of CurTok vector. - if (CurTok.empty()) { - AsmToken T = LexToken(); - CurTok.insert(CurTok.begin(), T); - } - return CurTok.front(); - } - - void UnLex(AsmToken const &Token) { - CurTok.insert(CurTok.begin(), Token); - } - - virtual StringRef LexUntilEndOfStatement() = 0; - - /// Get the current source location. - SMLoc getLoc() const; - - /// Get the current (last) lexed token. - const AsmToken &getTok() const { - return CurTok[0]; - } - - /// Look ahead at the next token to be lexed. - const AsmToken peekTok(bool ShouldSkipSpace = true) { - AsmToken Tok; - - MutableArrayRef Buf(Tok); - size_t ReadCount = peekTokens(Buf, ShouldSkipSpace); - - assert(ReadCount == 1); - (void)ReadCount; - - return Tok; - } - - /// Look ahead an arbitrary number of tokens. - virtual size_t peekTokens(MutableArrayRef Buf, - bool ShouldSkipSpace = true) = 0; - - /// Get the current error location - SMLoc getErrLoc() { - return ErrLoc; - } - - /// Get the current error string - const std::string &getErr() { - return Err; - } - - /// Get the kind of current token. - AsmToken::TokenKind getKind() const { return getTok().getKind(); } - - /// Check if the current token has kind \p K. - bool is(AsmToken::TokenKind K) const { return getTok().is(K); } - - /// Check if the current token has kind \p K. - bool isNot(AsmToken::TokenKind K) const { return getTok().isNot(K); } - - /// Set whether spaces should be ignored by the lexer - void setSkipSpace(bool val) { SkipSpace = val; } - - bool getAllowAtInIdentifier() { return AllowAtInIdentifier; } - void setAllowAtInIdentifier(bool v) { AllowAtInIdentifier = v; } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCParser/MCAsmParser.h b/llvm/include/llvm/MC/MCParser/MCAsmParser.h deleted file mode 100644 index ac8706d9..00000000 --- a/llvm/include/llvm/MC/MCParser/MCAsmParser.h +++ /dev/null @@ -1,219 +0,0 @@ -//===-- llvm/MC/MCAsmParser.h - Abstract Asm Parser Interface ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCPARSER_MCASMPARSER_H -#define LLVM_MC_MCPARSER_MCASMPARSER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/MC/MCParser/AsmLexer.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { -class MCAsmInfo; -class MCAsmLexer; -class MCAsmParserExtension; -class MCContext; -class MCExpr; -class MCInstPrinter; -class MCInstrInfo; -class MCStreamer; -class MCTargetAsmParser; -class SMLoc; -class SMRange; -class SourceMgr; -class Twine; - -class InlineAsmIdentifierInfo { -public: - void *OpDecl; - bool IsVarDecl; - unsigned Length, Size, Type; - - void clear() { - OpDecl = nullptr; - IsVarDecl = false; - Length = 1; - Size = 0; - Type = 0; - } -}; - -/// \brief Generic Sema callback for assembly parser. -class MCAsmParserSemaCallback { -public: - virtual ~MCAsmParserSemaCallback(); - virtual void *LookupInlineAsmIdentifier(StringRef &LineBuf, - InlineAsmIdentifierInfo &Info, - bool IsUnevaluatedContext) = 0; - virtual StringRef LookupInlineAsmLabel(StringRef Identifier, SourceMgr &SM, - SMLoc Location, bool Create) = 0; - - virtual bool LookupInlineAsmField(StringRef Base, StringRef Member, - unsigned &Offset) = 0; -}; - -/// \brief Generic assembler parser interface, for use by target specific -/// assembly parsers. -class MCAsmParser { -public: - typedef bool (*DirectiveHandler)(MCAsmParserExtension*, StringRef, SMLoc); - typedef std::pair - ExtensionDirectiveHandler; - -private: - MCAsmParser(const MCAsmParser &) = delete; - void operator=(const MCAsmParser &) = delete; - - MCTargetAsmParser *TargetParser; - - unsigned ShowParsedOperands : 1; - -protected: // Can only create subclasses. - MCAsmParser(); - -public: - virtual ~MCAsmParser(); - - virtual void addDirectiveHandler(StringRef Directive, - ExtensionDirectiveHandler Handler) = 0; - - virtual void addAliasForDirective(StringRef Directive, StringRef Alias) = 0; - - virtual SourceMgr &getSourceManager() = 0; - - virtual MCAsmLexer &getLexer() = 0; - const MCAsmLexer &getLexer() const { - return const_cast(this)->getLexer(); - } - - virtual MCContext &getContext() = 0; - - /// \brief Return the output streamer for the assembler. - virtual MCStreamer &getStreamer() = 0; - - MCTargetAsmParser &getTargetParser() const { return *TargetParser; } - void setTargetParser(MCTargetAsmParser &P); - - virtual unsigned getAssemblerDialect() { return 0;} - virtual void setAssemblerDialect(unsigned i) { } - - bool getShowParsedOperands() const { return ShowParsedOperands; } - void setShowParsedOperands(bool Value) { ShowParsedOperands = Value; } - - /// \brief Run the parser on the input source buffer. - virtual bool Run(bool NoInitialTextSection, bool NoFinalize = false) = 0; - - virtual void setParsingInlineAsm(bool V) = 0; - virtual bool isParsingInlineAsm() = 0; - - /// \brief Parse MS-style inline assembly. - virtual bool parseMSInlineAsm( - void *AsmLoc, std::string &AsmString, unsigned &NumOutputs, - unsigned &NumInputs, SmallVectorImpl> &OpDecls, - SmallVectorImpl &Constraints, - SmallVectorImpl &Clobbers, const MCInstrInfo *MII, - const MCInstPrinter *IP, MCAsmParserSemaCallback &SI) = 0; - - /// \brief Emit a note at the location \p L, with the message \p Msg. - virtual void Note(SMLoc L, const Twine &Msg, - ArrayRef Ranges = None) = 0; - - /// \brief Emit a warning at the location \p L, with the message \p Msg. - /// - /// \return The return value is true, if warnings are fatal. - virtual bool Warning(SMLoc L, const Twine &Msg, - ArrayRef Ranges = None) = 0; - - /// \brief Emit an error at the location \p L, with the message \p Msg. - /// - /// \return The return value is always true, as an idiomatic convenience to - /// clients. - virtual bool Error(SMLoc L, const Twine &Msg, - ArrayRef Ranges = None) = 0; - - /// \brief Get the next AsmToken in the stream, possibly handling file - /// inclusion first. - virtual const AsmToken &Lex() = 0; - - /// \brief Get the current AsmToken from the stream. - const AsmToken &getTok() const; - - /// \brief Report an error at the current lexer location. - bool TokError(const Twine &Msg, ArrayRef Ranges = None); - - /// \brief Parse an identifier or string (as a quoted identifier) and set \p - /// Res to the identifier contents. - virtual bool parseIdentifier(StringRef &Res) = 0; - - /// \brief Parse up to the end of statement and return the contents from the - /// current token until the end of the statement; the current token on exit - /// will be either the EndOfStatement or EOF. - virtual StringRef parseStringToEndOfStatement() = 0; - - /// \brief Parse the current token as a string which may include escaped - /// characters and return the string contents. - virtual bool parseEscapedString(std::string &Data) = 0; - - /// \brief Skip to the end of the current statement, for error recovery. - virtual void eatToEndOfStatement() = 0; - - /// \brief Parse an arbitrary expression. - /// - /// \param Res - The value of the expression. The result is undefined - /// on error. - /// \return - False on success. - virtual bool parseExpression(const MCExpr *&Res, SMLoc &EndLoc) = 0; - bool parseExpression(const MCExpr *&Res); - - /// \brief Parse a primary expression. - /// - /// \param Res - The value of the expression. The result is undefined - /// on error. - /// \return - False on success. - virtual bool parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) = 0; - - /// \brief Parse an arbitrary expression, assuming that an initial '(' has - /// already been consumed. - /// - /// \param Res - The value of the expression. The result is undefined - /// on error. - /// \return - False on success. - virtual bool parseParenExpression(const MCExpr *&Res, SMLoc &EndLoc) = 0; - - /// \brief Parse an expression which must evaluate to an absolute value. - /// - /// \param Res - The value of the absolute expression. The result is undefined - /// on error. - /// \return - False on success. - virtual bool parseAbsoluteExpression(int64_t &Res) = 0; - - /// \brief Ensure that we have a valid section set in the streamer. Otherwise, - /// report an error and switch to .text. - virtual void checkForValidSection() = 0; - - /// \brief Parse an arbitrary expression of a specified parenthesis depth, - /// assuming that the initial '(' characters have already been consumed. - /// - /// \param ParenDepth - Specifies how many trailing expressions outside the - /// current parentheses we have to parse. - /// \param Res - The value of the expression. The result is undefined - /// on error. - /// \return - False on success. - virtual bool parseParenExprOfDepth(unsigned ParenDepth, const MCExpr *&Res, - SMLoc &EndLoc) = 0; -}; - -/// \brief Create an MCAsmParser instance. -MCAsmParser *createMCAsmParser(SourceMgr &, MCContext &, MCStreamer &, - const MCAsmInfo &); - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h b/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h deleted file mode 100644 index 30b25dcf..00000000 --- a/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h +++ /dev/null @@ -1,92 +0,0 @@ -//===-- llvm/MC/MCAsmParserExtension.h - Asm Parser Hooks -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H -#define LLVM_MC_MCPARSER_MCASMPARSEREXTENSION_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/MC/MCParser/MCAsmParser.h" -#include "llvm/Support/SMLoc.h" - -namespace llvm { -class Twine; - -/// \brief Generic interface for extending the MCAsmParser, -/// which is implemented by target and object file assembly parser -/// implementations. -class MCAsmParserExtension { - MCAsmParserExtension(const MCAsmParserExtension &) = delete; - void operator=(const MCAsmParserExtension &) = delete; - - MCAsmParser *Parser; - -protected: - MCAsmParserExtension(); - - // Helper template for implementing static dispatch functions. - template - static bool HandleDirective(MCAsmParserExtension *Target, - StringRef Directive, - SMLoc DirectiveLoc) { - T *Obj = static_cast(Target); - return (Obj->*Handler)(Directive, DirectiveLoc); - } - - bool BracketExpressionsSupported; - -public: - virtual ~MCAsmParserExtension(); - - /// \brief Initialize the extension for parsing using the given \p Parser. - /// The extension should use the AsmParser interfaces to register its - /// parsing routines. - virtual void Initialize(MCAsmParser &Parser); - - /// \name MCAsmParser Proxy Interfaces - /// @{ - - MCContext &getContext() { return getParser().getContext(); } - - MCAsmLexer &getLexer() { return getParser().getLexer(); } - const MCAsmLexer &getLexer() const { - return const_cast(this)->getLexer(); - } - - MCAsmParser &getParser() { return *Parser; } - const MCAsmParser &getParser() const { - return const_cast(this)->getParser(); - } - - SourceMgr &getSourceManager() { return getParser().getSourceManager(); } - MCStreamer &getStreamer() { return getParser().getStreamer(); } - bool Warning(SMLoc L, const Twine &Msg) { - return getParser().Warning(L, Msg); - } - bool Error(SMLoc L, const Twine &Msg) { - return getParser().Error(L, Msg); - } - void Note(SMLoc L, const Twine &Msg) { - getParser().Note(L, Msg); - } - bool TokError(const Twine &Msg) { - return getParser().TokError(Msg); - } - - const AsmToken &Lex() { return getParser().Lex(); } - - const AsmToken &getTok() { return getParser().getTok(); } - - bool HasBracketExpressions() const { return BracketExpressionsSupported; } - - /// @} -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCParser/MCAsmParserUtils.h b/llvm/include/llvm/MC/MCParser/MCAsmParserUtils.h deleted file mode 100644 index 9834fe96..00000000 --- a/llvm/include/llvm/MC/MCParser/MCAsmParserUtils.h +++ /dev/null @@ -1,33 +0,0 @@ -//===------ llvm/MC/MCAsmParserUtils.h - Asm Parser Utilities ---*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCPARSER_MCASMPARSERUTILS_H -#define LLVM_MC_MCPARSER_MCASMPARSERUTILS_H - -namespace llvm { - -class MCAsmParser; -class MCExpr; -class MCSymbol; -class StringRef; - -namespace MCParserUtils { - -/// Parse a value expression and return whether it can be assigned to a symbol -/// with the given name. -/// -/// On success, returns false and sets the Symbol and Value output parameters. -bool parseAssignmentExpression(StringRef Name, bool allow_redef, - MCAsmParser &Parser, MCSymbol *&Symbol, - const MCExpr *&Value); - -} // namespace MCParserUtils -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCParser/MCParsedAsmOperand.h b/llvm/include/llvm/MC/MCParser/MCParsedAsmOperand.h deleted file mode 100644 index a90d280c..00000000 --- a/llvm/include/llvm/MC/MCParser/MCParsedAsmOperand.h +++ /dev/null @@ -1,98 +0,0 @@ -//===-- llvm/MC/MCParsedAsmOperand.h - Asm Parser Operand -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCPARSER_MCPARSEDASMOPERAND_H -#define LLVM_MC_MCPARSER_MCPARSEDASMOPERAND_H - -#include -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/SMLoc.h" - -namespace llvm { -class raw_ostream; - -/// MCParsedAsmOperand - This abstract class represents a source-level assembly -/// instruction operand. It should be subclassed by target-specific code. This -/// base class is used by target-independent clients and is the interface -/// between parsing an asm instruction and recognizing it. -class MCParsedAsmOperand { - /// MCOperandNum - The corresponding MCInst operand number. Only valid when - /// parsing MS-style inline assembly. - unsigned MCOperandNum; - - /// Constraint - The constraint on this operand. Only valid when parsing - /// MS-style inline assembly. - std::string Constraint; - -protected: - // This only seems to need to be movable (by ARMOperand) but ARMOperand has - // lots of members and MSVC doesn't support defaulted move ops, so to avoid - // that verbosity, just rely on defaulted copy ops. It's only the Constraint - // string member that would benefit from movement anyway. - MCParsedAsmOperand(const MCParsedAsmOperand &RHS) = default; - MCParsedAsmOperand &operator=(const MCParsedAsmOperand &) = default; - MCParsedAsmOperand() = default; - -public: - virtual ~MCParsedAsmOperand() {} - - void setConstraint(StringRef C) { Constraint = C.str(); } - StringRef getConstraint() { return Constraint; } - - void setMCOperandNum (unsigned OpNum) { MCOperandNum = OpNum; } - unsigned getMCOperandNum() { return MCOperandNum; } - - virtual StringRef getSymName() { return StringRef(); } - virtual void *getOpDecl() { return nullptr; } - - /// isToken - Is this a token operand? - virtual bool isToken() const = 0; - /// isImm - Is this an immediate operand? - virtual bool isImm() const = 0; - /// isReg - Is this a register operand? - virtual bool isReg() const = 0; - virtual unsigned getReg() const = 0; - - /// isMem - Is this a memory operand? - virtual bool isMem() const = 0; - - /// getStartLoc - Get the location of the first token of this operand. - virtual SMLoc getStartLoc() const = 0; - /// getEndLoc - Get the location of the last token of this operand. - virtual SMLoc getEndLoc() const = 0; - - /// needAddressOf - Do we need to emit code to get the address of the - /// variable/label? Only valid when parsing MS-style inline assembly. - virtual bool needAddressOf() const { return false; } - - /// isOffsetOf - Do we need to emit code to get the offset of the variable, - /// rather then the value of the variable? Only valid when parsing MS-style - /// inline assembly. - virtual bool isOffsetOf() const { return false; } - - /// getOffsetOfLoc - Get the location of the offset operator. - virtual SMLoc getOffsetOfLoc() const { return SMLoc(); } - - /// print - Print a debug representation of the operand to the given stream. - virtual void print(raw_ostream &OS) const = 0; - /// dump - Print to the debug stream. - virtual void dump() const; -}; - -//===----------------------------------------------------------------------===// -// Debugging Support - -inline raw_ostream& operator<<(raw_ostream &OS, const MCParsedAsmOperand &MO) { - MO.print(OS); - return OS; -} - -} // end namespace llvm. - -#endif diff --git a/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h b/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h deleted file mode 100644 index 28a7b966..00000000 --- a/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h +++ /dev/null @@ -1,224 +0,0 @@ -//===-- llvm/MC/MCTargetAsmParser.h - Target Assembly Parser ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCPARSER_MCTARGETASMPARSER_H -#define LLVM_MC_MCPARSER_MCTARGETASMPARSER_H - -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCParser/MCAsmParserExtension.h" -#include "llvm/MC/MCTargetOptions.h" -#include - -namespace llvm { -class AsmToken; -class MCInst; -class MCParsedAsmOperand; -class MCStreamer; -class MCSubtargetInfo; -class SMLoc; -class StringRef; -template class SmallVectorImpl; - -typedef SmallVectorImpl> OperandVector; - -enum AsmRewriteKind { - AOK_Delete = 0, // Rewrite should be ignored. - AOK_Align, // Rewrite align as .align. - AOK_EVEN, // Rewrite even as .even. - AOK_DotOperator, // Rewrite a dot operator expression as an immediate. - // E.g., [eax].foo.bar -> [eax].8 - AOK_Emit, // Rewrite _emit as .byte. - AOK_Imm, // Rewrite as $$N. - AOK_ImmPrefix, // Add $$ before a parsed Imm. - AOK_Input, // Rewrite in terms of $N. - AOK_Output, // Rewrite in terms of $N. - AOK_SizeDirective, // Add a sizing directive (e.g., dword ptr). - AOK_Label, // Rewrite local labels. - AOK_EndOfStatement, // Add EndOfStatement (e.g., "\n\t"). - AOK_Skip // Skip emission (e.g., offset/type operators). -}; - -const char AsmRewritePrecedence [] = { - 0, // AOK_Delete - 2, // AOK_Align - 2, // AOK_EVEN - 2, // AOK_DotOperator - 2, // AOK_Emit - 4, // AOK_Imm - 4, // AOK_ImmPrefix - 3, // AOK_Input - 3, // AOK_Output - 5, // AOK_SizeDirective - 1, // AOK_Label - 5, // AOK_EndOfStatement - 2 // AOK_Skip -}; - -struct AsmRewrite { - AsmRewriteKind Kind; - SMLoc Loc; - unsigned Len; - unsigned Val; - StringRef Label; -public: - AsmRewrite(AsmRewriteKind kind, SMLoc loc, unsigned len = 0, unsigned val = 0) - : Kind(kind), Loc(loc), Len(len), Val(val) {} - AsmRewrite(AsmRewriteKind kind, SMLoc loc, unsigned len, StringRef label) - : Kind(kind), Loc(loc), Len(len), Val(0), Label(label) {} -}; - -struct ParseInstructionInfo { - - SmallVectorImpl *AsmRewrites; - - ParseInstructionInfo() : AsmRewrites(nullptr) {} - ParseInstructionInfo(SmallVectorImpl *rewrites) - : AsmRewrites(rewrites) {} -}; - -/// MCTargetAsmParser - Generic interface to target specific assembly parsers. -class MCTargetAsmParser : public MCAsmParserExtension { -public: - enum MatchResultTy { - Match_InvalidOperand, - Match_MissingFeature, - Match_MnemonicFail, - Match_Success, - FIRST_TARGET_MATCH_RESULT_TY - }; - -private: - MCTargetAsmParser(const MCTargetAsmParser &) = delete; - void operator=(const MCTargetAsmParser &) = delete; -protected: // Can only create subclasses. - MCTargetAsmParser(MCTargetOptions const &, const MCSubtargetInfo &STI); - - /// Create a copy of STI and return a non-const reference to it. - MCSubtargetInfo ©STI(); - - /// AvailableFeatures - The current set of available features. - uint64_t AvailableFeatures; - - /// ParsingInlineAsm - Are we parsing ms-style inline assembly? - bool ParsingInlineAsm; - - /// SemaCallback - The Sema callback implementation. Must be set when parsing - /// ms-style inline assembly. - MCAsmParserSemaCallback *SemaCallback; - - /// Set of options which affects instrumentation of inline assembly. - MCTargetOptions MCOptions; - - /// Current STI. - const MCSubtargetInfo *STI; - -public: - ~MCTargetAsmParser() override; - - const MCSubtargetInfo &getSTI() const; - - uint64_t getAvailableFeatures() const { return AvailableFeatures; } - void setAvailableFeatures(uint64_t Value) { AvailableFeatures = Value; } - - bool isParsingInlineAsm () { return ParsingInlineAsm; } - void setParsingInlineAsm (bool Value) { ParsingInlineAsm = Value; } - - MCTargetOptions getTargetOptions() const { return MCOptions; } - - void setSemaCallback(MCAsmParserSemaCallback *Callback) { - SemaCallback = Callback; - } - - virtual bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, - SMLoc &EndLoc) = 0; - - /// Sets frame register corresponding to the current MachineFunction. - virtual void SetFrameRegister(unsigned RegNo) {} - - /// ParseInstruction - Parse one assembly instruction. - /// - /// The parser is positioned following the instruction name. The target - /// specific instruction parser should parse the entire instruction and - /// construct the appropriate MCInst, or emit an error. On success, the entire - /// line should be parsed up to and including the end-of-statement token. On - /// failure, the parser is not required to read to the end of the line. - // - /// \param Name - The instruction name. - /// \param NameLoc - The source location of the name. - /// \param Operands [out] - The list of parsed operands, this returns - /// ownership of them to the caller. - /// \return True on failure. - virtual bool ParseInstruction(ParseInstructionInfo &Info, StringRef Name, - SMLoc NameLoc, OperandVector &Operands) = 0; - virtual bool ParseInstruction(ParseInstructionInfo &Info, StringRef Name, - AsmToken Token, OperandVector &Operands) { - return ParseInstruction(Info, Name, Token.getLoc(), Operands); - } - - /// ParseDirective - Parse a target specific assembler directive - /// - /// The parser is positioned following the directive name. The target - /// specific directive parser should parse the entire directive doing or - /// recording any target specific work, or return true and do nothing if the - /// directive is not target specific. If the directive is specific for - /// the target, the entire line is parsed up to and including the - /// end-of-statement token and false is returned. - /// - /// \param DirectiveID - the identifier token of the directive. - virtual bool ParseDirective(AsmToken DirectiveID) = 0; - - /// MatchAndEmitInstruction - Recognize a series of operands of a parsed - /// instruction as an actual MCInst and emit it to the specified MCStreamer. - /// This returns false on success and returns true on failure to match. - /// - /// On failure, the target parser is responsible for emitting a diagnostic - /// explaining the match failure. - virtual bool MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, - OperandVector &Operands, MCStreamer &Out, - uint64_t &ErrorInfo, - bool MatchingInlineAsm) = 0; - - /// Allows targets to let registers opt out of clobber lists. - virtual bool OmitRegisterFromClobberLists(unsigned RegNo) { return false; } - - /// Allow a target to add special case operand matching for things that - /// tblgen doesn't/can't handle effectively. For example, literal - /// immediates on ARM. TableGen expects a token operand, but the parser - /// will recognize them as immediates. - virtual unsigned validateTargetOperandClass(MCParsedAsmOperand &Op, - unsigned Kind) { - return Match_InvalidOperand; - } - - /// checkTargetMatchPredicate - Validate the instruction match against - /// any complex target predicates not expressible via match classes. - virtual unsigned checkTargetMatchPredicate(MCInst &Inst) { - return Match_Success; - } - - virtual void convertToMapAndConstraints(unsigned Kind, - const OperandVector &Operands) = 0; - - // Return whether this parser uses assignment statements with equals tokens - virtual bool equalIsAsmAssignment() { return true; }; - // Return whether this start of statement identifier is a label - virtual bool isLabel(AsmToken &Token) { return true; }; - - virtual const MCExpr *applyModifierToExpr(const MCExpr *E, - MCSymbolRefExpr::VariantKind, - MCContext &Ctx) { - return nullptr; - } - - virtual void onLabelParsed(MCSymbol *Symbol) { } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCRegisterInfo.h b/llvm/include/llvm/MC/MCRegisterInfo.h deleted file mode 100644 index 54828061..00000000 --- a/llvm/include/llvm/MC/MCRegisterInfo.h +++ /dev/null @@ -1,703 +0,0 @@ -//=== MC/MCRegisterInfo.h - Target Register Description ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file describes an abstract interface used to get information about a -// target machines register file. This information is used for a variety of -// purposed, especially register allocation. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCREGISTERINFO_H -#define LLVM_MC_MCREGISTERINFO_H - -#include "llvm/ADT/DenseMap.h" -#include "llvm/Support/ErrorHandling.h" -#include - -namespace llvm { - -/// An unsigned integer type large enough to represent all physical registers, -/// but not necessarily virtual registers. -typedef uint16_t MCPhysReg; - -/// MCRegisterClass - Base class of TargetRegisterClass. -class MCRegisterClass { -public: - typedef const MCPhysReg* iterator; - typedef const MCPhysReg* const_iterator; - - const iterator RegsBegin; - const uint8_t *const RegSet; - const uint32_t NameIdx; - const uint16_t RegsSize; - const uint16_t RegSetSize; - const uint16_t ID; - const uint16_t RegSize, Alignment; // Size & Alignment of register in bytes - const int8_t CopyCost; - const bool Allocatable; - - /// getID() - Return the register class ID number. - /// - unsigned getID() const { return ID; } - - /// begin/end - Return all of the registers in this class. - /// - iterator begin() const { return RegsBegin; } - iterator end() const { return RegsBegin + RegsSize; } - - /// getNumRegs - Return the number of registers in this class. - /// - unsigned getNumRegs() const { return RegsSize; } - - /// getRegister - Return the specified register in the class. - /// - unsigned getRegister(unsigned i) const { - assert(i < getNumRegs() && "Register number out of range!"); - return RegsBegin[i]; - } - - /// contains - Return true if the specified register is included in this - /// register class. This does not include virtual registers. - bool contains(unsigned Reg) const { - unsigned InByte = Reg % 8; - unsigned Byte = Reg / 8; - if (Byte >= RegSetSize) - return false; - return (RegSet[Byte] & (1 << InByte)) != 0; - } - - /// contains - Return true if both registers are in this class. - bool contains(unsigned Reg1, unsigned Reg2) const { - return contains(Reg1) && contains(Reg2); - } - - /// getSize - Return the size of the register in bytes, which is also the size - /// of a stack slot allocated to hold a spilled copy of this register. - unsigned getSize() const { return RegSize; } - - /// getAlignment - Return the minimum required alignment for a register of - /// this class. - unsigned getAlignment() const { return Alignment; } - - /// getCopyCost - Return the cost of copying a value between two registers in - /// this class. A negative number means the register class is very expensive - /// to copy e.g. status flag register classes. - int getCopyCost() const { return CopyCost; } - - /// isAllocatable - Return true if this register class may be used to create - /// virtual registers. - bool isAllocatable() const { return Allocatable; } -}; - -/// MCRegisterDesc - This record contains information about a particular -/// register. The SubRegs field is a zero terminated array of registers that -/// are sub-registers of the specific register, e.g. AL, AH are sub-registers -/// of AX. The SuperRegs field is a zero terminated array of registers that are -/// super-registers of the specific register, e.g. RAX, EAX, are -/// super-registers of AX. -/// -struct MCRegisterDesc { - uint32_t Name; // Printable name for the reg (for debugging) - uint32_t SubRegs; // Sub-register set, described above - uint32_t SuperRegs; // Super-register set, described above - - // Offset into MCRI::SubRegIndices of a list of sub-register indices for each - // sub-register in SubRegs. - uint32_t SubRegIndices; - - // RegUnits - Points to the list of register units. The low 4 bits holds the - // Scale, the high bits hold an offset into DiffLists. See MCRegUnitIterator. - uint32_t RegUnits; - - /// Index into list with lane mask sequences. The sequence contains a lanemask - /// for every register unit. - uint16_t RegUnitLaneMasks; -}; - -/// MCRegisterInfo base class - We assume that the target defines a static -/// array of MCRegisterDesc objects that represent all of the machine -/// registers that the target has. As such, we simply have to track a pointer -/// to this array so that we can turn register number into a register -/// descriptor. -/// -/// Note this class is designed to be a base class of TargetRegisterInfo, which -/// is the interface used by codegen. However, specific targets *should never* -/// specialize this class. MCRegisterInfo should only contain getters to access -/// TableGen generated physical register data. It must not be extended with -/// virtual methods. -/// -class MCRegisterInfo { -public: - typedef const MCRegisterClass *regclass_iterator; - - /// DwarfLLVMRegPair - Emitted by tablegen so Dwarf<->LLVM reg mappings can be - /// performed with a binary search. - struct DwarfLLVMRegPair { - unsigned FromReg; - unsigned ToReg; - - bool operator<(DwarfLLVMRegPair RHS) const { return FromReg < RHS.FromReg; } - }; - - /// SubRegCoveredBits - Emitted by tablegen: bit range covered by a subreg - /// index, -1 in any being invalid. - struct SubRegCoveredBits { - uint16_t Offset; - uint16_t Size; - }; -private: - const MCRegisterDesc *Desc; // Pointer to the descriptor array - unsigned NumRegs; // Number of entries in the array - unsigned RAReg; // Return address register - unsigned PCReg; // Program counter register - const MCRegisterClass *Classes; // Pointer to the regclass array - unsigned NumClasses; // Number of entries in the array - unsigned NumRegUnits; // Number of regunits. - const MCPhysReg (*RegUnitRoots)[2]; // Pointer to regunit root table. - const MCPhysReg *DiffLists; // Pointer to the difflists array - const unsigned *RegUnitMaskSequences; // Pointer to lane mask sequences - // for register units. - const char *RegStrings; // Pointer to the string table. - const char *RegClassStrings; // Pointer to the class strings. - const uint16_t *SubRegIndices; // Pointer to the subreg lookup - // array. - const SubRegCoveredBits *SubRegIdxRanges; // Pointer to the subreg covered - // bit ranges array. - unsigned NumSubRegIndices; // Number of subreg indices. - const uint16_t *RegEncodingTable; // Pointer to array of register - // encodings. - - unsigned L2DwarfRegsSize; - unsigned EHL2DwarfRegsSize; - unsigned Dwarf2LRegsSize; - unsigned EHDwarf2LRegsSize; - const DwarfLLVMRegPair *L2DwarfRegs; // LLVM to Dwarf regs mapping - const DwarfLLVMRegPair *EHL2DwarfRegs; // LLVM to Dwarf regs mapping EH - const DwarfLLVMRegPair *Dwarf2LRegs; // Dwarf to LLVM regs mapping - const DwarfLLVMRegPair *EHDwarf2LRegs; // Dwarf to LLVM regs mapping EH - DenseMap L2SEHRegs; // LLVM to SEH regs mapping - DenseMap L2CVRegs; // LLVM to CV regs mapping - -public: - /// DiffListIterator - Base iterator class that can traverse the - /// differentially encoded register and regunit lists in DiffLists. - /// Don't use this class directly, use one of the specialized sub-classes - /// defined below. - class DiffListIterator { - uint16_t Val; - const MCPhysReg *List; - - protected: - /// Create an invalid iterator. Call init() to point to something useful. - DiffListIterator() : Val(0), List(nullptr) {} - - /// init - Point the iterator to InitVal, decoding subsequent values from - /// DiffList. The iterator will initially point to InitVal, sub-classes are - /// responsible for skipping the seed value if it is not part of the list. - void init(MCPhysReg InitVal, const MCPhysReg *DiffList) { - Val = InitVal; - List = DiffList; - } - - /// advance - Move to the next list position, return the applied - /// differential. This function does not detect the end of the list, that - /// is the caller's responsibility (by checking for a 0 return value). - unsigned advance() { - assert(isValid() && "Cannot move off the end of the list."); - MCPhysReg D = *List++; - Val += D; - return D; - } - - public: - - /// isValid - returns true if this iterator is not yet at the end. - bool isValid() const { return List; } - - /// Dereference the iterator to get the value at the current position. - unsigned operator*() const { return Val; } - - /// Pre-increment to move to the next position. - void operator++() { - // The end of the list is encoded as a 0 differential. - if (!advance()) - List = nullptr; - } - }; - - // These iterators are allowed to sub-class DiffListIterator and access - // internal list pointers. - friend class MCSubRegIterator; - friend class MCSubRegIndexIterator; - friend class MCSuperRegIterator; - friend class MCRegUnitIterator; - friend class MCRegUnitMaskIterator; - friend class MCRegUnitRootIterator; - - /// \brief Initialize MCRegisterInfo, called by TableGen - /// auto-generated routines. *DO NOT USE*. - void InitMCRegisterInfo(const MCRegisterDesc *D, unsigned NR, unsigned RA, - unsigned PC, - const MCRegisterClass *C, unsigned NC, - const MCPhysReg (*RURoots)[2], - unsigned NRU, - const MCPhysReg *DL, - const unsigned *RUMS, - const char *Strings, - const char *ClassStrings, - const uint16_t *SubIndices, - unsigned NumIndices, - const SubRegCoveredBits *SubIdxRanges, - const uint16_t *RET) { - Desc = D; - NumRegs = NR; - RAReg = RA; - PCReg = PC; - Classes = C; - DiffLists = DL; - RegUnitMaskSequences = RUMS; - RegStrings = Strings; - RegClassStrings = ClassStrings; - NumClasses = NC; - RegUnitRoots = RURoots; - NumRegUnits = NRU; - SubRegIndices = SubIndices; - NumSubRegIndices = NumIndices; - SubRegIdxRanges = SubIdxRanges; - RegEncodingTable = RET; - } - - /// \brief Used to initialize LLVM register to Dwarf - /// register number mapping. Called by TableGen auto-generated routines. - /// *DO NOT USE*. - void mapLLVMRegsToDwarfRegs(const DwarfLLVMRegPair *Map, unsigned Size, - bool isEH) { - if (isEH) { - EHL2DwarfRegs = Map; - EHL2DwarfRegsSize = Size; - } else { - L2DwarfRegs = Map; - L2DwarfRegsSize = Size; - } - } - - /// \brief Used to initialize Dwarf register to LLVM - /// register number mapping. Called by TableGen auto-generated routines. - /// *DO NOT USE*. - void mapDwarfRegsToLLVMRegs(const DwarfLLVMRegPair *Map, unsigned Size, - bool isEH) { - if (isEH) { - EHDwarf2LRegs = Map; - EHDwarf2LRegsSize = Size; - } else { - Dwarf2LRegs = Map; - Dwarf2LRegsSize = Size; - } - } - - /// mapLLVMRegToSEHReg - Used to initialize LLVM register to SEH register - /// number mapping. By default the SEH register number is just the same - /// as the LLVM register number. - /// FIXME: TableGen these numbers. Currently this requires target specific - /// initialization code. - void mapLLVMRegToSEHReg(unsigned LLVMReg, int SEHReg) { - L2SEHRegs[LLVMReg] = SEHReg; - } - - void mapLLVMRegToCVReg(unsigned LLVMReg, int CVReg) { - L2CVRegs[LLVMReg] = CVReg; - } - - /// \brief This method should return the register where the return - /// address can be found. - unsigned getRARegister() const { - return RAReg; - } - - /// Return the register which is the program counter. - unsigned getProgramCounter() const { - return PCReg; - } - - const MCRegisterDesc &operator[](unsigned RegNo) const { - assert(RegNo < NumRegs && - "Attempting to access record for invalid register number!"); - return Desc[RegNo]; - } - - /// \brief Provide a get method, equivalent to [], but more useful with a - /// pointer to this object. - const MCRegisterDesc &get(unsigned RegNo) const { - return operator[](RegNo); - } - - /// \brief Returns the physical register number of sub-register "Index" - /// for physical register RegNo. Return zero if the sub-register does not - /// exist. - unsigned getSubReg(unsigned Reg, unsigned Idx) const; - - /// \brief Return a super-register of the specified register - /// Reg so its sub-register of index SubIdx is Reg. - unsigned getMatchingSuperReg(unsigned Reg, unsigned SubIdx, - const MCRegisterClass *RC) const; - - /// \brief For a given register pair, return the sub-register index - /// if the second register is a sub-register of the first. Return zero - /// otherwise. - unsigned getSubRegIndex(unsigned RegNo, unsigned SubRegNo) const; - - /// \brief Get the size of the bit range covered by a sub-register index. - /// If the index isn't continuous, return the sum of the sizes of its parts. - /// If the index is used to access subregisters of different sizes, return -1. - unsigned getSubRegIdxSize(unsigned Idx) const; - - /// \brief Get the offset of the bit range covered by a sub-register index. - /// If an Offset doesn't make sense (the index isn't continuous, or is used to - /// access sub-registers at different offsets), return -1. - unsigned getSubRegIdxOffset(unsigned Idx) const; - - /// \brief Return the human-readable symbolic target-specific name for the - /// specified physical register. - const char *getName(unsigned RegNo) const { - return RegStrings + get(RegNo).Name; - } - - /// \brief Return the number of registers this target has (useful for - /// sizing arrays holding per register information) - unsigned getNumRegs() const { - return NumRegs; - } - - /// \brief Return the number of sub-register indices - /// understood by the target. Index 0 is reserved for the no-op sub-register, - /// while 1 to getNumSubRegIndices() - 1 represent real sub-registers. - unsigned getNumSubRegIndices() const { - return NumSubRegIndices; - } - - /// \brief Return the number of (native) register units in the - /// target. Register units are numbered from 0 to getNumRegUnits() - 1. They - /// can be accessed through MCRegUnitIterator defined below. - unsigned getNumRegUnits() const { - return NumRegUnits; - } - - /// \brief Map a target register to an equivalent dwarf register - /// number. Returns -1 if there is no equivalent value. The second - /// parameter allows targets to use different numberings for EH info and - /// debugging info. - int getDwarfRegNum(unsigned RegNum, bool isEH) const; - - /// \brief Map a dwarf register back to a target register. - int getLLVMRegNum(unsigned RegNum, bool isEH) const; - - /// \brief Map a target register to an equivalent SEH register - /// number. Returns LLVM register number if there is no equivalent value. - int getSEHRegNum(unsigned RegNum) const; - - /// \brief Map a target register to an equivalent CodeView register - /// number. - int getCodeViewRegNum(unsigned RegNum) const; - - regclass_iterator regclass_begin() const { return Classes; } - regclass_iterator regclass_end() const { return Classes+NumClasses; } - - unsigned getNumRegClasses() const { - return (unsigned)(regclass_end()-regclass_begin()); - } - - /// \brief Returns the register class associated with the enumeration - /// value. See class MCOperandInfo. - const MCRegisterClass& getRegClass(unsigned i) const { - assert(i < getNumRegClasses() && "Register Class ID out of range"); - return Classes[i]; - } - - const char *getRegClassName(const MCRegisterClass *Class) const { - return RegClassStrings + Class->NameIdx; - } - - /// \brief Returns the encoding for RegNo - uint16_t getEncodingValue(unsigned RegNo) const { - assert(RegNo < NumRegs && - "Attempting to get encoding for invalid register number!"); - return RegEncodingTable[RegNo]; - } - - /// \brief Returns true if RegB is a sub-register of RegA. - bool isSubRegister(unsigned RegA, unsigned RegB) const { - return isSuperRegister(RegB, RegA); - } - - /// \brief Returns true if RegB is a super-register of RegA. - bool isSuperRegister(unsigned RegA, unsigned RegB) const; - - /// \brief Returns true if RegB is a sub-register of RegA or if RegB == RegA. - bool isSubRegisterEq(unsigned RegA, unsigned RegB) const { - return isSuperRegisterEq(RegB, RegA); - } - - /// \brief Returns true if RegB is a super-register of RegA or if - /// RegB == RegA. - bool isSuperRegisterEq(unsigned RegA, unsigned RegB) const { - return RegA == RegB || isSuperRegister(RegA, RegB); - } - - /// \brief Returns true if RegB is a super-register or sub-register of RegA - /// or if RegB == RegA. - bool isSuperOrSubRegisterEq(unsigned RegA, unsigned RegB) const { - return isSubRegisterEq(RegA, RegB) || isSuperRegister(RegA, RegB); - } -}; - -//===----------------------------------------------------------------------===// -// Register List Iterators -//===----------------------------------------------------------------------===// - -// MCRegisterInfo provides lists of super-registers, sub-registers, and -// aliasing registers. Use these iterator classes to traverse the lists. - -/// MCSubRegIterator enumerates all sub-registers of Reg. -/// If IncludeSelf is set, Reg itself is included in the list. -class MCSubRegIterator : public MCRegisterInfo::DiffListIterator { -public: - MCSubRegIterator(unsigned Reg, const MCRegisterInfo *MCRI, - bool IncludeSelf = false) { - init(Reg, MCRI->DiffLists + MCRI->get(Reg).SubRegs); - // Initially, the iterator points to Reg itself. - if (!IncludeSelf) - ++*this; - } -}; - -/// Iterator that enumerates the sub-registers of a Reg and the associated -/// sub-register indices. -class MCSubRegIndexIterator { - MCSubRegIterator SRIter; - const uint16_t *SRIndex; -public: - /// Constructs an iterator that traverses subregisters and their - /// associated subregister indices. - MCSubRegIndexIterator(unsigned Reg, const MCRegisterInfo *MCRI) - : SRIter(Reg, MCRI) { - SRIndex = MCRI->SubRegIndices + MCRI->get(Reg).SubRegIndices; - } - - /// Returns current sub-register. - unsigned getSubReg() const { - return *SRIter; - } - /// Returns sub-register index of the current sub-register. - unsigned getSubRegIndex() const { - return *SRIndex; - } - - /// Returns true if this iterator is not yet at the end. - bool isValid() const { return SRIter.isValid(); } - - /// Moves to the next position. - void operator++() { - ++SRIter; - ++SRIndex; - } -}; - -/// MCSuperRegIterator enumerates all super-registers of Reg. -/// If IncludeSelf is set, Reg itself is included in the list. -class MCSuperRegIterator : public MCRegisterInfo::DiffListIterator { -public: - MCSuperRegIterator() {} - MCSuperRegIterator(unsigned Reg, const MCRegisterInfo *MCRI, - bool IncludeSelf = false) { - init(Reg, MCRI->DiffLists + MCRI->get(Reg).SuperRegs); - // Initially, the iterator points to Reg itself. - if (!IncludeSelf) - ++*this; - } -}; - -// Definition for isSuperRegister. Put it down here since it needs the -// iterator defined above in addition to the MCRegisterInfo class itself. -inline bool MCRegisterInfo::isSuperRegister(unsigned RegA, unsigned RegB) const{ - for (MCSuperRegIterator I(RegA, this); I.isValid(); ++I) - if (*I == RegB) - return true; - return false; -} - -//===----------------------------------------------------------------------===// -// Register Units -//===----------------------------------------------------------------------===// - -// Register units are used to compute register aliasing. Every register has at -// least one register unit, but it can have more. Two registers overlap if and -// only if they have a common register unit. -// -// A target with a complicated sub-register structure will typically have many -// fewer register units than actual registers. MCRI::getNumRegUnits() returns -// the number of register units in the target. - -// MCRegUnitIterator enumerates a list of register units for Reg. The list is -// in ascending numerical order. -class MCRegUnitIterator : public MCRegisterInfo::DiffListIterator { -public: - /// MCRegUnitIterator - Create an iterator that traverses the register units - /// in Reg. - MCRegUnitIterator() {} - MCRegUnitIterator(unsigned Reg, const MCRegisterInfo *MCRI) { - assert(Reg && "Null register has no regunits"); - // Decode the RegUnits MCRegisterDesc field. - unsigned RU = MCRI->get(Reg).RegUnits; - unsigned Scale = RU & 15; - unsigned Offset = RU >> 4; - - // Initialize the iterator to Reg * Scale, and the List pointer to - // DiffLists + Offset. - init(Reg * Scale, MCRI->DiffLists + Offset); - - // That may not be a valid unit, we need to advance by one to get the real - // unit number. The first differential can be 0 which would normally - // terminate the list, but since we know every register has at least one - // unit, we can allow a 0 differential here. - advance(); - } -}; - -/// MCRegUnitIterator enumerates a list of register units and their associated -/// lane masks for Reg. The register units are in ascending numerical order. -class MCRegUnitMaskIterator { - MCRegUnitIterator RUIter; - const unsigned *MaskListIter; -public: - MCRegUnitMaskIterator() {} - /// Constructs an iterator that traverses the register units and their - /// associated LaneMasks in Reg. - MCRegUnitMaskIterator(unsigned Reg, const MCRegisterInfo *MCRI) - : RUIter(Reg, MCRI) { - uint16_t Idx = MCRI->get(Reg).RegUnitLaneMasks; - MaskListIter = &MCRI->RegUnitMaskSequences[Idx]; - } - - /// Returns a (RegUnit, LaneMask) pair. - std::pair operator*() const { - return std::make_pair(*RUIter, *MaskListIter); - } - - /// Returns true if this iterator is not yet at the end. - bool isValid() const { return RUIter.isValid(); } - - /// Moves to the next position. - void operator++() { - ++MaskListIter; - ++RUIter; - } -}; - -// Each register unit has one or two root registers. The complete set of -// registers containing a register unit is the union of the roots and their -// super-registers. All registers aliasing Unit can be visited like this: -// -// for (MCRegUnitRootIterator RI(Unit, MCRI); RI.isValid(); ++RI) { -// for (MCSuperRegIterator SI(*RI, MCRI, true); SI.isValid(); ++SI) -// visit(*SI); -// } - -/// MCRegUnitRootIterator enumerates the root registers of a register unit. -class MCRegUnitRootIterator { - uint16_t Reg0; - uint16_t Reg1; -public: - MCRegUnitRootIterator() : Reg0(0), Reg1(0) {} - MCRegUnitRootIterator(unsigned RegUnit, const MCRegisterInfo *MCRI) { - assert(RegUnit < MCRI->getNumRegUnits() && "Invalid register unit"); - Reg0 = MCRI->RegUnitRoots[RegUnit][0]; - Reg1 = MCRI->RegUnitRoots[RegUnit][1]; - } - - /// \brief Dereference to get the current root register. - unsigned operator*() const { - return Reg0; - } - - /// \brief Check if the iterator is at the end of the list. - bool isValid() const { - return Reg0; - } - - /// \brief Preincrement to move to the next root register. - void operator++() { - assert(isValid() && "Cannot move off the end of the list."); - Reg0 = Reg1; - Reg1 = 0; - } -}; - -/// MCRegAliasIterator enumerates all registers aliasing Reg. If IncludeSelf is -/// set, Reg itself is included in the list. This iterator does not guarantee -/// any ordering or that entries are unique. -class MCRegAliasIterator { -private: - unsigned Reg; - const MCRegisterInfo *MCRI; - bool IncludeSelf; - - MCRegUnitIterator RI; - MCRegUnitRootIterator RRI; - MCSuperRegIterator SI; -public: - MCRegAliasIterator(unsigned Reg, const MCRegisterInfo *MCRI, - bool IncludeSelf) - : Reg(Reg), MCRI(MCRI), IncludeSelf(IncludeSelf) { - - // Initialize the iterators. - for (RI = MCRegUnitIterator(Reg, MCRI); RI.isValid(); ++RI) { - for (RRI = MCRegUnitRootIterator(*RI, MCRI); RRI.isValid(); ++RRI) { - for (SI = MCSuperRegIterator(*RRI, MCRI, true); SI.isValid(); ++SI) { - if (!(!IncludeSelf && Reg == *SI)) - return; - } - } - } - } - - bool isValid() const { return RI.isValid(); } - - unsigned operator*() const { - assert (SI.isValid() && "Cannot dereference an invalid iterator."); - return *SI; - } - - void advance() { - // Assuming SI is valid. - ++SI; - if (SI.isValid()) return; - - ++RRI; - if (RRI.isValid()) { - SI = MCSuperRegIterator(*RRI, MCRI, true); - return; - } - - ++RI; - if (RI.isValid()) { - RRI = MCRegUnitRootIterator(*RI, MCRI); - SI = MCSuperRegIterator(*RRI, MCRI, true); - } - } - - void operator++() { - assert(isValid() && "Cannot move off the end of the list."); - do advance(); - while (!IncludeSelf && isValid() && *SI == Reg); - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCSchedule.h b/llvm/include/llvm/MC/MCSchedule.h deleted file mode 100644 index 37728797..00000000 --- a/llvm/include/llvm/MC/MCSchedule.h +++ /dev/null @@ -1,233 +0,0 @@ -//===-- llvm/MC/MCSchedule.h - Scheduling -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the classes used to describe a subtarget's machine model -// for scheduling and other instruction cost heuristics. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCSCHEDULE_H -#define LLVM_MC_MCSCHEDULE_H - -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { - -struct InstrItinerary; - -/// Define a kind of processor resource that will be modeled by the scheduler. -struct MCProcResourceDesc { -#ifndef NDEBUG - const char *Name; -#endif - unsigned NumUnits; // Number of resource of this kind - unsigned SuperIdx; // Index of the resources kind that contains this kind. - - // Number of resources that may be buffered. - // - // Buffered resources (BufferSize != 0) may be consumed at some indeterminate - // cycle after dispatch. This should be used for out-of-order cpus when - // instructions that use this resource can be buffered in a reservaton - // station. - // - // Unbuffered resources (BufferSize == 0) always consume their resource some - // fixed number of cycles after dispatch. If a resource is unbuffered, then - // the scheduler will avoid scheduling instructions with conflicting resources - // in the same cycle. This is for in-order cpus, or the in-order portion of - // an out-of-order cpus. - int BufferSize; - - bool operator==(const MCProcResourceDesc &Other) const { - return NumUnits == Other.NumUnits && SuperIdx == Other.SuperIdx - && BufferSize == Other.BufferSize; - } -}; - -/// Identify one of the processor resource kinds consumed by a particular -/// scheduling class for the specified number of cycles. -struct MCWriteProcResEntry { - unsigned ProcResourceIdx; - unsigned Cycles; - - bool operator==(const MCWriteProcResEntry &Other) const { - return ProcResourceIdx == Other.ProcResourceIdx && Cycles == Other.Cycles; - } -}; - -/// Specify the latency in cpu cycles for a particular scheduling class and def -/// index. -1 indicates an invalid latency. Heuristics would typically consider -/// an instruction with invalid latency to have infinite latency. Also identify -/// the WriteResources of this def. When the operand expands to a sequence of -/// writes, this ID is the last write in the sequence. -struct MCWriteLatencyEntry { - int Cycles; - unsigned WriteResourceID; - - bool operator==(const MCWriteLatencyEntry &Other) const { - return Cycles == Other.Cycles && WriteResourceID == Other.WriteResourceID; - } -}; - -/// Specify the number of cycles allowed after instruction issue before a -/// particular use operand reads its registers. This effectively reduces the -/// write's latency. Here we allow negative cycles for corner cases where -/// latency increases. This rule only applies when the entry's WriteResource -/// matches the write's WriteResource. -/// -/// MCReadAdvanceEntries are sorted first by operand index (UseIdx), then by -/// WriteResourceIdx. -struct MCReadAdvanceEntry { - unsigned UseIdx; - unsigned WriteResourceID; - int Cycles; - - bool operator==(const MCReadAdvanceEntry &Other) const { - return UseIdx == Other.UseIdx && WriteResourceID == Other.WriteResourceID - && Cycles == Other.Cycles; - } -}; - -/// Summarize the scheduling resources required for an instruction of a -/// particular scheduling class. -/// -/// Defined as an aggregate struct for creating tables with initializer lists. -struct MCSchedClassDesc { - static const unsigned short InvalidNumMicroOps = UINT16_MAX; - static const unsigned short VariantNumMicroOps = UINT16_MAX - 1; - -#ifndef NDEBUG - const char* Name; -#endif - unsigned short NumMicroOps; - bool BeginGroup; - bool EndGroup; - unsigned WriteProcResIdx; // First index into WriteProcResTable. - unsigned NumWriteProcResEntries; - unsigned WriteLatencyIdx; // First index into WriteLatencyTable. - unsigned NumWriteLatencyEntries; - unsigned ReadAdvanceIdx; // First index into ReadAdvanceTable. - unsigned NumReadAdvanceEntries; - - bool isValid() const { - return NumMicroOps != InvalidNumMicroOps; - } - bool isVariant() const { - return NumMicroOps == VariantNumMicroOps; - } -}; - -/// Machine model for scheduling, bundling, and heuristics. -/// -/// The machine model directly provides basic information about the -/// microarchitecture to the scheduler in the form of properties. It also -/// optionally refers to scheduler resource tables and itinerary -/// tables. Scheduler resource tables model the latency and cost for each -/// instruction type. Itinerary tables are an independent mechanism that -/// provides a detailed reservation table describing each cycle of instruction -/// execution. Subtargets may define any or all of the above categories of data -/// depending on the type of CPU and selected scheduler. -struct MCSchedModel { - // IssueWidth is the maximum number of instructions that may be scheduled in - // the same per-cycle group. - unsigned IssueWidth; - static const unsigned DefaultIssueWidth = 1; - - // MicroOpBufferSize is the number of micro-ops that the processor may buffer - // for out-of-order execution. - // - // "0" means operations that are not ready in this cycle are not considered - // for scheduling (they go in the pending queue). Latency is paramount. This - // may be more efficient if many instructions are pending in a schedule. - // - // "1" means all instructions are considered for scheduling regardless of - // whether they are ready in this cycle. Latency still causes issue stalls, - // but we balance those stalls against other heuristics. - // - // "> 1" means the processor is out-of-order. This is a machine independent - // estimate of highly machine specific characteristics such as the register - // renaming pool and reorder buffer. - unsigned MicroOpBufferSize; - static const unsigned DefaultMicroOpBufferSize = 0; - - // LoopMicroOpBufferSize is the number of micro-ops that the processor may - // buffer for optimized loop execution. More generally, this represents the - // optimal number of micro-ops in a loop body. A loop may be partially - // unrolled to bring the count of micro-ops in the loop body closer to this - // number. - unsigned LoopMicroOpBufferSize; - static const unsigned DefaultLoopMicroOpBufferSize = 0; - - // LoadLatency is the expected latency of load instructions. - unsigned LoadLatency; - static const unsigned DefaultLoadLatency = 4; - - // HighLatency is the expected latency of "very high latency" operations. - // See TargetInstrInfo::isHighLatencyDef(). - // By default, this is set to an arbitrarily high number of cycles - // likely to have some impact on scheduling heuristics. - unsigned HighLatency; - static const unsigned DefaultHighLatency = 10; - - // MispredictPenalty is the typical number of extra cycles the processor - // takes to recover from a branch misprediction. - unsigned MispredictPenalty; - static const unsigned DefaultMispredictPenalty = 10; - - bool PostRAScheduler; // default value is false - - bool CompleteModel; - - unsigned ProcID; - const MCProcResourceDesc *ProcResourceTable; - const MCSchedClassDesc *SchedClassTable; - unsigned NumProcResourceKinds; - unsigned NumSchedClasses; - // Instruction itinerary tables used by InstrItineraryData. - friend class InstrItineraryData; - const InstrItinerary *InstrItineraries; - - unsigned getProcessorID() const { return ProcID; } - - /// Does this machine model include instruction-level scheduling. - bool hasInstrSchedModel() const { return SchedClassTable; } - - /// Return true if this machine model data for all instructions with a - /// scheduling class (itinerary class or SchedRW list). - bool isComplete() const { return CompleteModel; } - - /// Return true if machine supports out of order execution. - bool isOutOfOrder() const { return MicroOpBufferSize > 1; } - - unsigned getNumProcResourceKinds() const { - return NumProcResourceKinds; - } - - const MCProcResourceDesc *getProcResource(unsigned ProcResourceIdx) const { - assert(hasInstrSchedModel() && "No scheduling machine model"); - - assert(ProcResourceIdx < NumProcResourceKinds && "bad proc resource idx"); - return &ProcResourceTable[ProcResourceIdx]; - } - - const MCSchedClassDesc *getSchedClassDesc(unsigned SchedClassIdx) const { - assert(hasInstrSchedModel() && "No scheduling machine model"); - - assert(SchedClassIdx < NumSchedClasses && "bad scheduling class idx"); - return &SchedClassTable[SchedClassIdx]; - } - - /// Returns the default initialized model. - static const MCSchedModel &GetDefaultSchedModel() { return Default; } - static const MCSchedModel Default; -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCSection.h b/llvm/include/llvm/MC/MCSection.h deleted file mode 100644 index a8d7af9b..00000000 --- a/llvm/include/llvm/MC/MCSection.h +++ /dev/null @@ -1,202 +0,0 @@ -//===- MCSection.h - Machine Code Sections ----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MCSection class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCSECTION_H -#define LLVM_MC_MCSECTION_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" -#include "llvm/MC/MCFragment.h" -#include "llvm/MC/SectionKind.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { -class MCAsmInfo; -class MCAssembler; -class MCContext; -class MCExpr; -class MCFragment; -class MCSection; -class MCSymbol; -class raw_ostream; - -template<> -struct ilist_node_traits { - MCFragment *createNode(const MCFragment &V); - static void deleteNode(MCFragment *V); - - void addNodeToList(MCFragment *) {} - void removeNodeFromList(MCFragment *) {} - void transferNodesFromList(ilist_node_traits & /*SrcTraits*/, - ilist_iterator /*first*/, - ilist_iterator /*last*/) {} -}; - -/// Instances of this class represent a uniqued identifier for a section in the -/// current translation unit. The MCContext class uniques and creates these. -class MCSection { -public: - enum SectionVariant { SV_COFF = 0, SV_ELF, SV_MachO }; - - /// \brief Express the state of bundle locked groups while emitting code. - enum BundleLockStateType { - NotBundleLocked, - BundleLocked, - BundleLockedAlignToEnd - }; - - typedef iplist FragmentListType; - - typedef FragmentListType::const_iterator const_iterator; - typedef FragmentListType::iterator iterator; - - typedef FragmentListType::const_reverse_iterator const_reverse_iterator; - typedef FragmentListType::reverse_iterator reverse_iterator; - -private: - MCSection(const MCSection &) = delete; - void operator=(const MCSection &) = delete; - - MCSymbol *Begin; - MCSymbol *End = nullptr; - /// The alignment requirement of this section. - unsigned Alignment = 1; - /// The section index in the assemblers section list. - unsigned Ordinal = 0; - /// The index of this section in the layout order. - unsigned LayoutOrder; - - /// \brief Keeping track of bundle-locked state. - BundleLockStateType BundleLockState = NotBundleLocked; - - /// \brief Current nesting depth of bundle_lock directives. - unsigned BundleLockNestingDepth = 0; - - /// \brief We've seen a bundle_lock directive but not its first instruction - /// yet. - unsigned BundleGroupBeforeFirstInst : 1; - - /// Whether this section has had instructions emitted into it. - unsigned HasInstructions : 1; - - unsigned IsRegistered : 1; - - MCDummyFragment DummyFragment; - - FragmentListType Fragments; - - /// Mapping from subsection number to insertion point for subsection numbers - /// below that number. - SmallVector, 1> SubsectionFragmentMap; - -protected: - MCSection(SectionVariant V, SectionKind K, MCSymbol *Begin); - SectionVariant Variant; - SectionKind Kind; - ~MCSection(); - -public: - SectionKind getKind() const { return Kind; } - - SectionVariant getVariant() const { return Variant; } - - MCSymbol *getBeginSymbol() { return Begin; } - const MCSymbol *getBeginSymbol() const { - return const_cast(this)->getBeginSymbol(); - } - void setBeginSymbol(MCSymbol *Sym) { - assert(!Begin); - Begin = Sym; - } - MCSymbol *getEndSymbol(MCContext &Ctx); - bool hasEnded() const; - - unsigned getAlignment() const { return Alignment; } - void setAlignment(unsigned Value) { Alignment = Value; } - - unsigned getOrdinal() const { return Ordinal; } - void setOrdinal(unsigned Value) { Ordinal = Value; } - - unsigned getLayoutOrder() const { return LayoutOrder; } - void setLayoutOrder(unsigned Value) { LayoutOrder = Value; } - - BundleLockStateType getBundleLockState() const { return BundleLockState; } - void setBundleLockState(BundleLockStateType NewState); - bool isBundleLocked() const { return BundleLockState != NotBundleLocked; } - - bool isBundleGroupBeforeFirstInst() const { - return BundleGroupBeforeFirstInst; - } - void setBundleGroupBeforeFirstInst(bool IsFirst) { - BundleGroupBeforeFirstInst = IsFirst; - } - - bool hasInstructions() const { return HasInstructions; } - void setHasInstructions(bool Value) { HasInstructions = Value; } - - bool isRegistered() const { return IsRegistered; } - void setIsRegistered(bool Value) { IsRegistered = Value; } - - MCSection::FragmentListType &getFragmentList() { return Fragments; } - const MCSection::FragmentListType &getFragmentList() const { - return const_cast(this)->getFragmentList(); - } - - /// Support for MCFragment::getNextNode(). - static FragmentListType MCSection::*getSublistAccess(MCFragment *) { - return &MCSection::Fragments; - } - - const MCDummyFragment &getDummyFragment() const { return DummyFragment; } - MCDummyFragment &getDummyFragment() { return DummyFragment; } - - MCSection::iterator begin(); - MCSection::const_iterator begin() const { - return const_cast(this)->begin(); - } - - MCSection::iterator end(); - MCSection::const_iterator end() const { - return const_cast(this)->end(); - } - - MCSection::reverse_iterator rbegin(); - MCSection::const_reverse_iterator rbegin() const { - return const_cast(this)->rbegin(); - } - - MCSection::reverse_iterator rend(); - MCSection::const_reverse_iterator rend() const { - return const_cast(this)->rend(); - } - - MCSection::iterator getSubsectionInsertionPoint(unsigned Subsection); - - void dump(); - - virtual void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS, - const MCExpr *Subsection) const = 0; - - /// Return true if a .align directive should use "optimized nops" to fill - /// instead of 0s. - virtual bool UseCodeAlign() const = 0; - - /// Check whether this section is "virtual", that is has no actual object - /// file contents. - virtual bool isVirtualSection() const = 0; -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCSectionCOFF.h b/llvm/include/llvm/MC/MCSectionCOFF.h deleted file mode 100644 index c9fd8ea1..00000000 --- a/llvm/include/llvm/MC/MCSectionCOFF.h +++ /dev/null @@ -1,92 +0,0 @@ -//===- MCSectionCOFF.h - COFF Machine Code Sections -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MCSectionCOFF class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCSECTIONCOFF_H -#define LLVM_MC_MCSECTIONCOFF_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/MC/MCSection.h" - -namespace llvm { -class MCSymbol; - -/// This represents a section on Windows -class MCSectionCOFF final : public MCSection { - // The memory for this string is stored in the same MCContext as *this. - StringRef SectionName; - - // FIXME: The following fields should not be mutable, but are for now so the - // asm parser can honor the .linkonce directive. - - /// This is the Characteristics field of a section, drawn from the enums - /// below. - mutable unsigned Characteristics; - - /// The unique IDs used with the .pdata and .xdata sections created internally - /// by the assembler. This ID is used to ensure that for every .text section, - /// there is exactly one .pdata and one .xdata section, which is required by - /// the Microsoft incremental linker. This data is mutable because this ID is - /// not notionally part of the section. - mutable unsigned WinCFISectionID = ~0U; - - /// The COMDAT symbol of this section. Only valid if this is a COMDAT section. - /// Two COMDAT sections are merged if they have the same COMDAT symbol. - MCSymbol *COMDATSymbol; - - /// This is the Selection field for the section symbol, if it is a COMDAT - /// section (Characteristics & IMAGE_SCN_LNK_COMDAT) != 0 - mutable int Selection; - -private: - friend class MCContext; - MCSectionCOFF(StringRef Section, unsigned Characteristics, - MCSymbol *COMDATSymbol, int Selection, SectionKind K, - MCSymbol *Begin) - : MCSection(SV_COFF, K, Begin), SectionName(Section), - Characteristics(Characteristics), COMDATSymbol(COMDATSymbol), - Selection(Selection) { - assert((Characteristics & 0x00F00000) == 0 && - "alignment must not be set upon section creation"); - } - -public: - ~MCSectionCOFF(); - - /// Decides whether a '.section' directive should be printed before the - /// section name - bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const; - - StringRef getSectionName() const { return SectionName; } - unsigned getCharacteristics() const { return Characteristics; } - MCSymbol *getCOMDATSymbol() const { return COMDATSymbol; } - int getSelection() const { return Selection; } - - void setSelection(int Selection) const; - - void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS, - const MCExpr *Subsection) const override; - bool UseCodeAlign() const override; - bool isVirtualSection() const override; - - unsigned getOrAssignWinCFISectionID(unsigned *NextID) const { - if (WinCFISectionID == ~0U) - WinCFISectionID = (*NextID)++; - return WinCFISectionID; - } - - static bool classof(const MCSection *S) { return S->getVariant() == SV_COFF; } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCSectionELF.h b/llvm/include/llvm/MC/MCSectionELF.h deleted file mode 100644 index dabd787b..00000000 --- a/llvm/include/llvm/MC/MCSectionELF.h +++ /dev/null @@ -1,98 +0,0 @@ -//===- MCSectionELF.h - ELF Machine Code Sections ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MCSectionELF class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCSECTIONELF_H -#define LLVM_MC_MCSECTIONELF_H - -#include "llvm/ADT/Twine.h" -#include "llvm/MC/MCSection.h" -#include "llvm/MC/MCSymbolELF.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/ELF.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { - -class MCSymbol; - -/// This represents a section on linux, lots of unix variants and some bare -/// metal systems. -class MCSectionELF final : public MCSection { - /// This is the name of the section. The referenced memory is owned by - /// TargetLoweringObjectFileELF's ELFUniqueMap. - StringRef SectionName; - - /// This is the sh_type field of a section, drawn from the enums below. - unsigned Type; - - /// This is the sh_flags field of a section, drawn from the enums below. - unsigned Flags; - - unsigned UniqueID; - - /// The size of each entry in this section. This size only makes sense for - /// sections that contain fixed-sized entries. If a section does not contain - /// fixed-sized entries 'EntrySize' will be 0. - unsigned EntrySize; - - const MCSymbolELF *Group; - - /// Depending on the type of the section this is sh_link or sh_info. - const MCSectionELF *Associated; - -private: - friend class MCContext; - MCSectionELF(StringRef Section, unsigned type, unsigned flags, SectionKind K, - unsigned entrySize, const MCSymbolELF *group, unsigned UniqueID, - MCSymbol *Begin, const MCSectionELF *Associated) - : MCSection(SV_ELF, K, Begin), SectionName(Section), Type(type), - Flags(flags), UniqueID(UniqueID), EntrySize(entrySize), Group(group), - Associated(Associated) { - if (Group) - Group->setIsSignature(); - } - - void setSectionName(StringRef Name) { SectionName = Name; } - -public: - ~MCSectionELF(); - - /// Decides whether a '.section' directive should be printed before the - /// section name - bool ShouldOmitSectionDirective(StringRef Name, const MCAsmInfo &MAI) const; - - StringRef getSectionName() const { return SectionName; } - unsigned getType() const { return Type; } - unsigned getFlags() const { return Flags; } - unsigned getEntrySize() const { return EntrySize; } - void setFlags(unsigned F) { Flags = F; } - const MCSymbolELF *getGroup() const { return Group; } - - void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS, - const MCExpr *Subsection) const override; - bool UseCodeAlign() const override; - bool isVirtualSection() const override; - - bool isUnique() const { return UniqueID != ~0U; } - unsigned getUniqueID() const { return UniqueID; } - - const MCSectionELF *getAssociatedSection() const { return Associated; } - - static bool classof(const MCSection *S) { - return S->getVariant() == SV_ELF; - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCSectionMachO.h b/llvm/include/llvm/MC/MCSectionMachO.h deleted file mode 100644 index 658dfcda..00000000 --- a/llvm/include/llvm/MC/MCSectionMachO.h +++ /dev/null @@ -1,91 +0,0 @@ -//===- MCSectionMachO.h - MachO Machine Code Sections -----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MCSectionMachO class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCSECTIONMACHO_H -#define LLVM_MC_MCSECTIONMACHO_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/MC/MCSection.h" -#include "llvm/Support/MachO.h" - -namespace llvm { - -/// This represents a section on a Mach-O system (used by Mac OS X). On a Mac -/// system, these are also described in /usr/include/mach-o/loader.h. -class MCSectionMachO final : public MCSection { - char SegmentName[16]; // Not necessarily null terminated! - char SectionName[16]; // Not necessarily null terminated! - - /// This is the SECTION_TYPE and SECTION_ATTRIBUTES field of a section, drawn - /// from the enums below. - unsigned TypeAndAttributes; - - /// The 'reserved2' field of a section, used to represent the size of stubs, - /// for example. - unsigned Reserved2; - - MCSectionMachO(StringRef Segment, StringRef Section, unsigned TAA, - unsigned reserved2, SectionKind K, MCSymbol *Begin); - friend class MCContext; -public: - - StringRef getSegmentName() const { - // SegmentName is not necessarily null terminated! - if (SegmentName[15]) - return StringRef(SegmentName, 16); - return StringRef(SegmentName); - } - StringRef getSectionName() const { - // SectionName is not necessarily null terminated! - if (SectionName[15]) - return StringRef(SectionName, 16); - return StringRef(SectionName); - } - - unsigned getTypeAndAttributes() const { return TypeAndAttributes; } - unsigned getStubSize() const { return Reserved2; } - - MachO::SectionType getType() const { - return static_cast(TypeAndAttributes & - MachO::SECTION_TYPE); - } - bool hasAttribute(unsigned Value) const { - return (TypeAndAttributes & Value) != 0; - } - - /// Parse the section specifier indicated by "Spec". This is a string that can - /// appear after a .section directive in a mach-o flavored .s file. If - /// successful, this fills in the specified Out parameters and returns an - /// empty string. When an invalid section specifier is present, this returns - /// a string indicating the problem. If no TAA was parsed, TAA is not altered, - /// and TAAWasSet becomes false. - static std::string ParseSectionSpecifier(StringRef Spec, // In. - StringRef &Segment, // Out. - StringRef &Section, // Out. - unsigned &TAA, // Out. - bool &TAAParsed, // Out. - unsigned &StubSize); // Out. - - void PrintSwitchToSection(const MCAsmInfo &MAI, raw_ostream &OS, - const MCExpr *Subsection) const override; - bool UseCodeAlign() const override; - bool isVirtualSection() const override; - - static bool classof(const MCSection *S) { - return S->getVariant() == SV_MachO; - } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h deleted file mode 100644 index cd710ee4..00000000 --- a/llvm/include/llvm/MC/MCStreamer.h +++ /dev/null @@ -1,836 +0,0 @@ -//===- MCStreamer.h - High-level Streaming Machine Code Output --*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MCStreamer class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCSTREAMER_H -#define LLVM_MC_MCSTREAMER_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/MC/MCDirectives.h" -#include "llvm/MC/MCDwarf.h" -#include "llvm/MC/MCLinkerOptimizationHint.h" -#include "llvm/MC/MCSymbol.h" -#include "llvm/MC/MCWinEH.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/SMLoc.h" -#include - -namespace llvm { -class MCAsmBackend; -class MCCodeEmitter; -class MCContext; -class MCExpr; -class MCInst; -class MCInstPrinter; -class MCSection; -class MCStreamer; -class MCSymbolELF; -class MCSymbolRefExpr; -class MCSubtargetInfo; -class StringRef; -class Twine; -class raw_ostream; -class formatted_raw_ostream; -class AssemblerConstantPools; - -typedef std::pair MCSectionSubPair; - -/// Target specific streamer interface. This is used so that targets can -/// implement support for target specific assembly directives. -/// -/// If target foo wants to use this, it should implement 3 classes: -/// * FooTargetStreamer : public MCTargetStreamer -/// * FooTargetAsmStreamer : public FooTargetStreamer -/// * FooTargetELFStreamer : public FooTargetStreamer -/// -/// FooTargetStreamer should have a pure virtual method for each directive. For -/// example, for a ".bar symbol_name" directive, it should have -/// virtual emitBar(const MCSymbol &Symbol) = 0; -/// -/// The FooTargetAsmStreamer and FooTargetELFStreamer classes implement the -/// method. The assembly streamer just prints ".bar symbol_name". The object -/// streamer does whatever is needed to implement .bar in the object file. -/// -/// In the assembly printer and parser the target streamer can be used by -/// calling getTargetStreamer and casting it to FooTargetStreamer: -/// -/// MCTargetStreamer &TS = OutStreamer.getTargetStreamer(); -/// FooTargetStreamer &ATS = static_cast(TS); -/// -/// The base classes FooTargetAsmStreamer and FooTargetELFStreamer should -/// *never* be treated differently. Callers should always talk to a -/// FooTargetStreamer. -class MCTargetStreamer { -protected: - MCStreamer &Streamer; - -public: - MCTargetStreamer(MCStreamer &S); - virtual ~MCTargetStreamer(); - - MCStreamer &getStreamer() { return Streamer; } - - // Allow a target to add behavior to the EmitLabel of MCStreamer. - virtual void emitLabel(MCSymbol *Symbol); - // Allow a target to add behavior to the emitAssignment of MCStreamer. - virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value); - - virtual void prettyPrintAsm(MCInstPrinter &InstPrinter, raw_ostream &OS, - const MCInst &Inst, const MCSubtargetInfo &STI); - - virtual void finish(); -}; - -// FIXME: declared here because it is used from -// lib/CodeGen/AsmPrinter/ARMException.cpp. -class ARMTargetStreamer : public MCTargetStreamer { -public: - ARMTargetStreamer(MCStreamer &S); - ~ARMTargetStreamer() override; - - virtual void emitFnStart(); - virtual void emitFnEnd(); - virtual void emitCantUnwind(); - virtual void emitPersonality(const MCSymbol *Personality); - virtual void emitPersonalityIndex(unsigned Index); - virtual void emitHandlerData(); - virtual void emitSetFP(unsigned FpReg, unsigned SpReg, - int64_t Offset = 0); - virtual void emitMovSP(unsigned Reg, int64_t Offset = 0); - virtual void emitPad(int64_t Offset); - virtual void emitRegSave(const SmallVectorImpl &RegList, - bool isVector); - virtual void emitUnwindRaw(int64_t StackOffset, - const SmallVectorImpl &Opcodes); - - virtual void switchVendor(StringRef Vendor); - virtual void emitAttribute(unsigned Attribute, unsigned Value); - virtual void emitTextAttribute(unsigned Attribute, StringRef String); - virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, - StringRef StringValue = ""); - virtual void emitFPU(unsigned FPU); - virtual void emitArch(unsigned Arch); - virtual void emitArchExtension(unsigned ArchExt); - virtual void emitObjectArch(unsigned Arch); - virtual void finishAttributeSection(); - virtual void emitInst(uint32_t Inst, char Suffix = '\0'); - - virtual void AnnotateTLSDescriptorSequence(const MCSymbolRefExpr *SRE); - - virtual void emitThumbSet(MCSymbol *Symbol, const MCExpr *Value); - - void finish() override; - - /// Reset any state between object emissions, i.e. the equivalent of - /// MCStreamer's reset method. - virtual void reset(); - - /// Callback used to implement the ldr= pseudo. - /// Add a new entry to the constant pool for the current section and return an - /// MCExpr that can be used to refer to the constant pool location. - const MCExpr *addConstantPoolEntry(const MCExpr *, SMLoc Loc); - - /// Callback used to implemnt the .ltorg directive. - /// Emit contents of constant pool for the current section. - void emitCurrentConstantPool(); - -private: - std::unique_ptr ConstantPools; -}; - -/// \brief Streaming machine code generation interface. -/// -/// This interface is intended to provide a programatic interface that is very -/// similar to the level that an assembler .s file provides. It has callbacks -/// to emit bytes, handle directives, etc. The implementation of this interface -/// retains state to know what the current section is etc. -/// -/// There are multiple implementations of this interface: one for writing out -/// a .s file, and implementations that write out .o files of various formats. -/// -class MCStreamer { - MCContext &Context; - std::unique_ptr TargetStreamer; - - MCStreamer(const MCStreamer &) = delete; - MCStreamer &operator=(const MCStreamer &) = delete; - - std::vector DwarfFrameInfos; - MCDwarfFrameInfo *getCurrentDwarfFrameInfo(); - void EnsureValidDwarfFrame(); - - MCSymbol *EmitCFICommon(); - - std::vector WinFrameInfos; - WinEH::FrameInfo *CurrentWinFrameInfo; - void EnsureValidWinFrameInfo(); - - /// \brief Tracks an index to represent the order a symbol was emitted in. - /// Zero means we did not emit that symbol. - DenseMap SymbolOrdering; - - /// \brief This is stack of current and previous section values saved by - /// PushSection. - SmallVector, 4> SectionStack; - - /// The next unique ID to use when creating a WinCFI-related section (.pdata - /// or .xdata). This ID ensures that we have a one-to-one mapping from - /// code section to unwind info section, which MSVC's incremental linker - /// requires. - unsigned NextWinCFIID = 0; - -protected: - MCStreamer(MCContext &Ctx); - - virtual void EmitCFIStartProcImpl(MCDwarfFrameInfo &Frame); - virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &CurFrame); - - WinEH::FrameInfo *getCurrentWinFrameInfo() { - return CurrentWinFrameInfo; - } - - virtual void EmitWindowsUnwindTables(); - - virtual void EmitRawTextImpl(StringRef String); - -public: - virtual ~MCStreamer(); - - void visitUsedExpr(const MCExpr &Expr); - virtual void visitUsedSymbol(const MCSymbol &Sym); - - void setTargetStreamer(MCTargetStreamer *TS) { - TargetStreamer.reset(TS); - } - - /// State management - /// - virtual void reset(); - - MCContext &getContext() const { return Context; } - - MCTargetStreamer *getTargetStreamer() { - return TargetStreamer.get(); - } - - unsigned getNumFrameInfos() { return DwarfFrameInfos.size(); } - ArrayRef getDwarfFrameInfos() const { - return DwarfFrameInfos; - } - - bool hasUnfinishedDwarfFrameInfo(); - - unsigned getNumWinFrameInfos() { return WinFrameInfos.size(); } - ArrayRef getWinFrameInfos() const { - return WinFrameInfos; - } - - void generateCompactUnwindEncodings(MCAsmBackend *MAB); - - /// \name Assembly File Formatting. - /// @{ - - /// \brief Return true if this streamer supports verbose assembly and if it is - /// enabled. - virtual bool isVerboseAsm() const { return false; } - - /// \brief Return true if this asm streamer supports emitting unformatted text - /// to the .s file with EmitRawText. - virtual bool hasRawTextSupport() const { return false; } - - /// \brief Is the integrated assembler required for this streamer to function - /// correctly? - virtual bool isIntegratedAssemblerRequired() const { return false; } - - /// \brief Add a textual comment. - /// - /// Typically for comments that can be emitted to the generated .s - /// file if applicable as a QoI issue to make the output of the compiler - /// more readable. This only affects the MCAsmStreamer, and only when - /// verbose assembly output is enabled. - /// - /// If the comment includes embedded \n's, they will each get the comment - /// prefix as appropriate. The added comment should not end with a \n. - virtual void AddComment(const Twine &T) {} - - /// \brief Return a raw_ostream that comments can be written to. Unlike - /// AddComment, you are required to terminate comments with \n if you use this - /// method. - virtual raw_ostream &GetCommentOS(); - - /// \brief Print T and prefix it with the comment string (normally #) and - /// optionally a tab. This prints the comment immediately, not at the end of - /// the current line. It is basically a safe version of EmitRawText: since it - /// only prints comments, the object streamer ignores it instead of asserting. - virtual void emitRawComment(const Twine &T, bool TabPrefix = true); - - /// \brief Add explicit comment T. T is required to be a valid - /// comment in the output and does not need to be escaped. - virtual void addExplicitComment(const Twine &T); - /// \brief Emit added explicit comments. - virtual void emitExplicitComments(); - - /// AddBlankLine - Emit a blank line to a .s file to pretty it up. - virtual void AddBlankLine() {} - - /// @} - - /// \name Symbol & Section Management - /// @{ - - /// \brief Return the current section that the streamer is emitting code to. - MCSectionSubPair getCurrentSection() const { - if (!SectionStack.empty()) - return SectionStack.back().first; - return MCSectionSubPair(); - } - MCSection *getCurrentSectionOnly() const { return getCurrentSection().first; } - - /// \brief Return the previous section that the streamer is emitting code to. - MCSectionSubPair getPreviousSection() const { - if (!SectionStack.empty()) - return SectionStack.back().second; - return MCSectionSubPair(); - } - - /// \brief Returns an index to represent the order a symbol was emitted in. - /// (zero if we did not emit that symbol) - unsigned GetSymbolOrder(const MCSymbol *Sym) const { - return SymbolOrdering.lookup(Sym); - } - - /// \brief Update streamer for a new active section. - /// - /// This is called by PopSection and SwitchSection, if the current - /// section changes. - virtual void ChangeSection(MCSection *, const MCExpr *); - - /// \brief Save the current and previous section on the section stack. - void PushSection() { - SectionStack.push_back( - std::make_pair(getCurrentSection(), getPreviousSection())); - } - - /// \brief Restore the current and previous section from the section stack. - /// Calls ChangeSection as needed. - /// - /// Returns false if the stack was empty. - bool PopSection() { - if (SectionStack.size() <= 1) - return false; - auto I = SectionStack.end(); - --I; - MCSectionSubPair OldSection = I->first; - --I; - MCSectionSubPair NewSection = I->first; - - if (OldSection != NewSection) - ChangeSection(NewSection.first, NewSection.second); - SectionStack.pop_back(); - return true; - } - - bool SubSection(const MCExpr *Subsection) { - if (SectionStack.empty()) - return false; - - SwitchSection(SectionStack.back().first.first, Subsection); - return true; - } - - /// Set the current section where code is being emitted to \p Section. This - /// is required to update CurSection. - /// - /// This corresponds to assembler directives like .section, .text, etc. - virtual void SwitchSection(MCSection *Section, - const MCExpr *Subsection = nullptr); - - /// \brief Set the current section where code is being emitted to \p Section. - /// This is required to update CurSection. This version does not call - /// ChangeSection. - void SwitchSectionNoChange(MCSection *Section, - const MCExpr *Subsection = nullptr) { - assert(Section && "Cannot switch to a null section!"); - MCSectionSubPair curSection = SectionStack.back().first; - SectionStack.back().second = curSection; - if (MCSectionSubPair(Section, Subsection) != curSection) - SectionStack.back().first = MCSectionSubPair(Section, Subsection); - } - - /// \brief Create the default sections and set the initial one. - virtual void InitSections(bool NoExecStack); - - MCSymbol *endSection(MCSection *Section); - - /// \brief Sets the symbol's section. - /// - /// Each emitted symbol will be tracked in the ordering table, - /// so we can sort on them later. - void AssignFragment(MCSymbol *Symbol, MCFragment *Fragment); - - /// \brief Emit a label for \p Symbol into the current section. - /// - /// This corresponds to an assembler statement such as: - /// foo: - /// - /// \param Symbol - The symbol to emit. A given symbol should only be - /// emitted as a label once, and symbols emitted as a label should never be - /// used in an assignment. - // FIXME: These emission are non-const because we mutate the symbol to - // add the section we're emitting it to later. - virtual void EmitLabel(MCSymbol *Symbol); - - virtual void EmitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol); - - /// \brief Note in the output the specified \p Flag. - virtual void EmitAssemblerFlag(MCAssemblerFlag Flag); - - /// \brief Emit the given list \p Options of strings as linker - /// options into the output. - virtual void EmitLinkerOptions(ArrayRef Kind) {} - - /// \brief Note in the output the specified region \p Kind. - virtual void EmitDataRegion(MCDataRegionType Kind) {} - - /// \brief Specify the MachO minimum deployment target version. - virtual void EmitVersionMin(MCVersionMinType, unsigned Major, unsigned Minor, - unsigned Update) {} - - /// \brief Note in the output that the specified \p Func is a Thumb mode - /// function (ARM target only). - virtual void EmitThumbFunc(MCSymbol *Func); - - /// \brief Emit an assignment of \p Value to \p Symbol. - /// - /// This corresponds to an assembler statement such as: - /// symbol = value - /// - /// The assignment generates no code, but has the side effect of binding the - /// value in the current context. For the assembly streamer, this prints the - /// binding into the .s file. - /// - /// \param Symbol - The symbol being assigned to. - /// \param Value - The value for the symbol. - virtual void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value); - - /// \brief Emit an weak reference from \p Alias to \p Symbol. - /// - /// This corresponds to an assembler statement such as: - /// .weakref alias, symbol - /// - /// \param Alias - The alias that is being created. - /// \param Symbol - The symbol being aliased. - virtual void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol); - - /// \brief Add the given \p Attribute to \p Symbol. - virtual bool EmitSymbolAttribute(MCSymbol *Symbol, - MCSymbolAttr Attribute) = 0; - - /// \brief Set the \p DescValue for the \p Symbol. - /// - /// \param Symbol - The symbol to have its n_desc field set. - /// \param DescValue - The value to set into the n_desc field. - virtual void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue); - - /// \brief Start emitting COFF symbol definition - /// - /// \param Symbol - The symbol to have its External & Type fields set. - virtual void BeginCOFFSymbolDef(const MCSymbol *Symbol); - - /// \brief Emit the storage class of the symbol. - /// - /// \param StorageClass - The storage class the symbol should have. - virtual void EmitCOFFSymbolStorageClass(int StorageClass); - - /// \brief Emit the type of the symbol. - /// - /// \param Type - A COFF type identifier (see COFF::SymbolType in X86COFF.h) - virtual void EmitCOFFSymbolType(int Type); - - /// \brief Marks the end of the symbol definition. - virtual void EndCOFFSymbolDef(); - - virtual void EmitCOFFSafeSEH(MCSymbol const *Symbol); - - /// \brief Emits a COFF section index. - /// - /// \param Symbol - Symbol the section number relocation should point to. - virtual void EmitCOFFSectionIndex(MCSymbol const *Symbol); - - /// \brief Emits a COFF section relative relocation. - /// - /// \param Symbol - Symbol the section relative relocation should point to. - virtual void EmitCOFFSecRel32(MCSymbol const *Symbol); - - /// \brief Emit an ELF .size directive. - /// - /// This corresponds to an assembler statement such as: - /// .size symbol, expression - virtual void emitELFSize(MCSymbolELF *Symbol, const MCExpr *Value); - - /// \brief Emit a Linker Optimization Hint (LOH) directive. - /// \param Args - Arguments of the LOH. - virtual void EmitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args) {} - - /// \brief Emit a common symbol. - /// - /// \param Symbol - The common symbol to emit. - /// \param Size - The size of the common symbol. - /// \param ByteAlignment - The alignment of the symbol if - /// non-zero. This must be a power of 2. - virtual void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment) = 0; - - /// \brief Emit a local common (.lcomm) symbol. - /// - /// \param Symbol - The common symbol to emit. - /// \param Size - The size of the common symbol. - /// \param ByteAlignment - The alignment of the common symbol in bytes. - virtual void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment); - - /// \brief Emit the zerofill section and an optional symbol. - /// - /// \param Section - The zerofill section to create and or to put the symbol - /// \param Symbol - The zerofill symbol to emit, if non-NULL. - /// \param Size - The size of the zerofill symbol. - /// \param ByteAlignment - The alignment of the zerofill symbol if - /// non-zero. This must be a power of 2 on some targets. - virtual void EmitZerofill(MCSection *Section, MCSymbol *Symbol = nullptr, - uint64_t Size = 0, unsigned ByteAlignment = 0) = 0; - - /// \brief Emit a thread local bss (.tbss) symbol. - /// - /// \param Section - The thread local common section. - /// \param Symbol - The thread local common symbol to emit. - /// \param Size - The size of the symbol. - /// \param ByteAlignment - The alignment of the thread local common symbol - /// if non-zero. This must be a power of 2 on some targets. - virtual void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, - uint64_t Size, unsigned ByteAlignment = 0); - - /// @} - /// \name Generating Data - /// @{ - - /// \brief Emit the bytes in \p Data into the output. - /// - /// This is used to implement assembler directives such as .byte, .ascii, - /// etc. - virtual void EmitBytes(StringRef Data); - - /// Functionally identical to EmitBytes. When emitting textual assembly, this - /// method uses .byte directives instead of .ascii or .asciz for readability. - virtual void EmitBinaryData(StringRef Data); - - /// \brief Emit the expression \p Value into the output as a native - /// integer of the given \p Size bytes. - /// - /// This is used to implement assembler directives such as .word, .quad, - /// etc. - /// - /// \param Value - The value to emit. - /// \param Size - The size of the integer (in bytes) to emit. This must - /// match a native machine width. - /// \param Loc - The location of the expression for error reporting. - virtual void EmitValueImpl(const MCExpr *Value, unsigned Size, - SMLoc Loc = SMLoc()); - - void EmitValue(const MCExpr *Value, unsigned Size, SMLoc Loc = SMLoc()); - - /// \brief Special case of EmitValue that avoids the client having - /// to pass in a MCExpr for constant integers. - virtual void EmitIntValue(uint64_t Value, unsigned Size); - - virtual void EmitULEB128Value(const MCExpr *Value); - - virtual void EmitSLEB128Value(const MCExpr *Value); - - /// \brief Special case of EmitULEB128Value that avoids the client having to - /// pass in a MCExpr for constant integers. - void EmitULEB128IntValue(uint64_t Value, unsigned Padding = 0); - - /// \brief Special case of EmitSLEB128Value that avoids the client having to - /// pass in a MCExpr for constant integers. - void EmitSLEB128IntValue(int64_t Value); - - /// \brief Special case of EmitValue that avoids the client having to pass in - /// a MCExpr for MCSymbols. - void EmitSymbolValue(const MCSymbol *Sym, unsigned Size, - bool IsSectionRelative = false); - - /// \brief Emit the expression \p Value into the output as a gprel64 (64-bit - /// GP relative) value. - /// - /// This is used to implement assembler directives such as .gpdword on - /// targets that support them. - virtual void EmitGPRel64Value(const MCExpr *Value); - - /// \brief Emit the expression \p Value into the output as a gprel32 (32-bit - /// GP relative) value. - /// - /// This is used to implement assembler directives such as .gprel32 on - /// targets that support them. - virtual void EmitGPRel32Value(const MCExpr *Value); - - /// \brief Emit NumBytes bytes worth of the value specified by FillValue. - /// This implements directives such as '.space'. - virtual void emitFill(uint64_t NumBytes, uint8_t FillValue); - - /// \brief Emit \p Size bytes worth of the value specified by \p FillValue. - /// - /// This is used to implement assembler directives such as .space or .skip. - /// - /// \param NumBytes - The number of bytes to emit. - /// \param FillValue - The value to use when filling bytes. - /// \param Loc - The location of the expression for error reporting. - virtual void emitFill(const MCExpr &NumBytes, uint64_t FillValue, - SMLoc Loc = SMLoc()); - - /// \brief Emit \p NumValues copies of \p Size bytes. Each \p Size bytes is - /// taken from the lowest order 4 bytes of \p Expr expression. - /// - /// This is used to implement assembler directives such as .fill. - /// - /// \param NumValues - The number of copies of \p Size bytes to emit. - /// \param Size - The size (in bytes) of each repeated value. - /// \param Expr - The expression from which \p Size bytes are used. - virtual void emitFill(uint64_t NumValues, int64_t Size, int64_t Expr); - virtual void emitFill(const MCExpr &NumValues, int64_t Size, int64_t Expr, - SMLoc Loc = SMLoc()); - - /// \brief Emit NumBytes worth of zeros. - /// This function properly handles data in virtual sections. - void EmitZeros(uint64_t NumBytes); - - /// \brief Emit some number of copies of \p Value until the byte alignment \p - /// ByteAlignment is reached. - /// - /// If the number of bytes need to emit for the alignment is not a multiple - /// of \p ValueSize, then the contents of the emitted fill bytes is - /// undefined. - /// - /// This used to implement the .align assembler directive. - /// - /// \param ByteAlignment - The alignment to reach. This must be a power of - /// two on some targets. - /// \param Value - The value to use when filling bytes. - /// \param ValueSize - The size of the integer (in bytes) to emit for - /// \p Value. This must match a native machine width. - /// \param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If - /// the alignment cannot be reached in this many bytes, no bytes are - /// emitted. - virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value = 0, - unsigned ValueSize = 1, - unsigned MaxBytesToEmit = 0); - - /// \brief Emit nops until the byte alignment \p ByteAlignment is reached. - /// - /// This used to align code where the alignment bytes may be executed. This - /// can emit different bytes for different sizes to optimize execution. - /// - /// \param ByteAlignment - The alignment to reach. This must be a power of - /// two on some targets. - /// \param MaxBytesToEmit - The maximum numbers of bytes to emit, or 0. If - /// the alignment cannot be reached in this many bytes, no bytes are - /// emitted. - virtual void EmitCodeAlignment(unsigned ByteAlignment, - unsigned MaxBytesToEmit = 0); - - /// \brief Emit some number of copies of \p Value until the byte offset \p - /// Offset is reached. - /// - /// This is used to implement assembler directives such as .org. - /// - /// \param Offset - The offset to reach. This may be an expression, but the - /// expression must be associated with the current section. - /// \param Value - The value to use when filling bytes. - virtual void emitValueToOffset(const MCExpr *Offset, unsigned char Value = 0); - - /// @} - - /// \brief Switch to a new logical file. This is used to implement the '.file - /// "foo.c"' assembler directive. - virtual void EmitFileDirective(StringRef Filename); - - /// \brief Emit the "identifiers" directive. This implements the - /// '.ident "version foo"' assembler directive. - virtual void EmitIdent(StringRef IdentString) {} - - /// \brief Associate a filename with a specified logical file number. This - /// implements the DWARF2 '.file 4 "foo.c"' assembler directive. - virtual unsigned EmitDwarfFileDirective(unsigned FileNo, StringRef Directory, - StringRef Filename, - unsigned CUID = 0); - - /// \brief This implements the DWARF2 '.loc fileno lineno ...' assembler - /// directive. - virtual void EmitDwarfLocDirective(unsigned FileNo, unsigned Line, - unsigned Column, unsigned Flags, - unsigned Isa, unsigned Discriminator, - StringRef FileName); - - /// \brief Associate a filename with a specified logical file number. This - /// implements the '.cv_file 4 "foo.c"' assembler directive. - virtual unsigned EmitCVFileDirective(unsigned FileNo, StringRef Filename); - - /// \brief This implements the CodeView '.cv_loc' assembler directive. - virtual void EmitCVLocDirective(unsigned FunctionId, unsigned FileNo, - unsigned Line, unsigned Column, - bool PrologueEnd, bool IsStmt, - StringRef FileName); - - /// \brief This implements the CodeView '.cv_linetable' assembler directive. - virtual void EmitCVLinetableDirective(unsigned FunctionId, - const MCSymbol *FnStart, - const MCSymbol *FnEnd); - - /// \brief This implements the CodeView '.cv_inline_linetable' assembler - /// directive. - virtual void EmitCVInlineLinetableDirective( - unsigned PrimaryFunctionId, unsigned SourceFileId, unsigned SourceLineNum, - const MCSymbol *FnStartSym, const MCSymbol *FnEndSym, - ArrayRef SecondaryFunctionIds); - - /// \brief This implements the CodeView '.cv_def_range' assembler - /// directive. - virtual void EmitCVDefRangeDirective( - ArrayRef> Ranges, - StringRef FixedSizePortion); - - /// \brief This implements the CodeView '.cv_stringtable' assembler directive. - virtual void EmitCVStringTableDirective() {} - - /// \brief This implements the CodeView '.cv_filechecksums' assembler directive. - virtual void EmitCVFileChecksumsDirective() {} - - /// Emit the absolute difference between two symbols. - /// - /// \pre Offset of \c Hi is greater than the offset \c Lo. - virtual void emitAbsoluteSymbolDiff(const MCSymbol *Hi, const MCSymbol *Lo, - unsigned Size); - - virtual MCSymbol *getDwarfLineTableSymbol(unsigned CUID); - virtual void EmitCFISections(bool EH, bool Debug); - void EmitCFIStartProc(bool IsSimple); - void EmitCFIEndProc(); - virtual void EmitCFIDefCfa(int64_t Register, int64_t Offset); - virtual void EmitCFIDefCfaOffset(int64_t Offset); - virtual void EmitCFIDefCfaRegister(int64_t Register); - virtual void EmitCFIOffset(int64_t Register, int64_t Offset); - virtual void EmitCFIPersonality(const MCSymbol *Sym, unsigned Encoding); - virtual void EmitCFILsda(const MCSymbol *Sym, unsigned Encoding); - virtual void EmitCFIRememberState(); - virtual void EmitCFIRestoreState(); - virtual void EmitCFISameValue(int64_t Register); - virtual void EmitCFIRestore(int64_t Register); - virtual void EmitCFIRelOffset(int64_t Register, int64_t Offset); - virtual void EmitCFIAdjustCfaOffset(int64_t Adjustment); - virtual void EmitCFIEscape(StringRef Values); - virtual void EmitCFIGnuArgsSize(int64_t Size); - virtual void EmitCFISignalFrame(); - virtual void EmitCFIUndefined(int64_t Register); - virtual void EmitCFIRegister(int64_t Register1, int64_t Register2); - virtual void EmitCFIWindowSave(); - - virtual void EmitWinCFIStartProc(const MCSymbol *Symbol); - virtual void EmitWinCFIEndProc(); - virtual void EmitWinCFIStartChained(); - virtual void EmitWinCFIEndChained(); - virtual void EmitWinCFIPushReg(unsigned Register); - virtual void EmitWinCFISetFrame(unsigned Register, unsigned Offset); - virtual void EmitWinCFIAllocStack(unsigned Size); - virtual void EmitWinCFISaveReg(unsigned Register, unsigned Offset); - virtual void EmitWinCFISaveXMM(unsigned Register, unsigned Offset); - virtual void EmitWinCFIPushFrame(bool Code); - virtual void EmitWinCFIEndProlog(); - - virtual void EmitWinEHHandler(const MCSymbol *Sym, bool Unwind, bool Except); - virtual void EmitWinEHHandlerData(); - - /// Get the .pdata section used for the given section. Typically the given - /// section is either the main .text section or some other COMDAT .text - /// section, but it may be any section containing code. - MCSection *getAssociatedPDataSection(const MCSection *TextSec); - - /// Get the .xdata section used for the given section. - MCSection *getAssociatedXDataSection(const MCSection *TextSec); - - virtual void EmitSyntaxDirective(); - - /// \brief Emit a .reloc directive. - /// Returns true if the relocation could not be emitted because Name is not - /// known. - virtual bool EmitRelocDirective(const MCExpr &Offset, StringRef Name, - const MCExpr *Expr, SMLoc Loc) { - return true; - } - - /// \brief Emit the given \p Instruction into the current section. - virtual void EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI); - - /// \brief Set the bundle alignment mode from now on in the section. - /// The argument is the power of 2 to which the alignment is set. The - /// value 0 means turn the bundle alignment off. - virtual void EmitBundleAlignMode(unsigned AlignPow2); - - /// \brief The following instructions are a bundle-locked group. - /// - /// \param AlignToEnd - If true, the bundle-locked group will be aligned to - /// the end of a bundle. - virtual void EmitBundleLock(bool AlignToEnd); - - /// \brief Ends a bundle-locked group. - virtual void EmitBundleUnlock(); - - /// \brief If this file is backed by a assembly streamer, this dumps the - /// specified string in the output .s file. This capability is indicated by - /// the hasRawTextSupport() predicate. By default this aborts. - void EmitRawText(const Twine &String); - - /// \brief Streamer specific finalization. - virtual void FinishImpl(); - /// \brief Finish emission of machine code. - void Finish(); - - virtual bool mayHaveInstructions(MCSection &Sec) const { return true; } -}; - -/// Create a dummy machine code streamer, which does nothing. This is useful for -/// timing the assembler front end. -MCStreamer *createNullStreamer(MCContext &Ctx); - -/// Create a machine code streamer which will print out assembly for the native -/// target, suitable for compiling with a native assembler. -/// -/// \param InstPrint - If given, the instruction printer to use. If not given -/// the MCInst representation will be printed. This method takes ownership of -/// InstPrint. -/// -/// \param CE - If given, a code emitter to use to show the instruction -/// encoding inline with the assembly. This method takes ownership of \p CE. -/// -/// \param TAB - If given, a target asm backend to use to show the fixup -/// information in conjunction with encoding information. This method takes -/// ownership of \p TAB. -/// -/// \param ShowInst - Whether to show the MCInst representation inline with -/// the assembly. -MCStreamer *createAsmStreamer(MCContext &Ctx, - std::unique_ptr OS, - bool isVerboseAsm, bool useDwarfDirectory, - MCInstPrinter *InstPrint, MCCodeEmitter *CE, - MCAsmBackend *TAB, bool ShowInst); -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCSubtargetInfo.h b/llvm/include/llvm/MC/MCSubtargetInfo.h deleted file mode 100644 index 5ede043f..00000000 --- a/llvm/include/llvm/MC/MCSubtargetInfo.h +++ /dev/null @@ -1,171 +0,0 @@ -//==-- llvm/MC/MCSubtargetInfo.h - Subtarget Information ---------*- C++ -*-==// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file describes the subtarget options of a Target machine. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCSUBTARGETINFO_H -#define LLVM_MC_MCSUBTARGETINFO_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/MC/MCInstrItineraries.h" -#include "llvm/MC/SubtargetFeature.h" -#include - -namespace llvm { - -class StringRef; - -//===----------------------------------------------------------------------===// -/// -/// MCSubtargetInfo - Generic base class for all target subtargets. -/// -class MCSubtargetInfo { - Triple TargetTriple; // Target triple - std::string CPU; // CPU being targeted. - ArrayRef ProcFeatures; // Processor feature list - ArrayRef ProcDesc; // Processor descriptions - - // Scheduler machine model - const SubtargetInfoKV *ProcSchedModels; - const MCWriteProcResEntry *WriteProcResTable; - const MCWriteLatencyEntry *WriteLatencyTable; - const MCReadAdvanceEntry *ReadAdvanceTable; - const MCSchedModel *CPUSchedModel; - - const InstrStage *Stages; // Instruction itinerary stages - const unsigned *OperandCycles; // Itinerary operand cycles - const unsigned *ForwardingPaths; // Forwarding paths - FeatureBitset FeatureBits; // Feature bits for current CPU + FS - - MCSubtargetInfo() = delete; - MCSubtargetInfo &operator=(MCSubtargetInfo &&) = delete; - MCSubtargetInfo &operator=(const MCSubtargetInfo &) = delete; - -public: - MCSubtargetInfo(const MCSubtargetInfo &) = default; - MCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS, - ArrayRef PF, - ArrayRef PD, - const SubtargetInfoKV *ProcSched, - const MCWriteProcResEntry *WPR, const MCWriteLatencyEntry *WL, - const MCReadAdvanceEntry *RA, const InstrStage *IS, - const unsigned *OC, const unsigned *FP); - - /// getTargetTriple - Return the target triple string. - const Triple &getTargetTriple() const { return TargetTriple; } - - /// getCPU - Return the CPU string. - StringRef getCPU() const { - return CPU; - } - - /// getFeatureBits - Return the feature bits. - /// - const FeatureBitset& getFeatureBits() const { - return FeatureBits; - } - - /// setFeatureBits - Set the feature bits. - /// - void setFeatureBits(const FeatureBitset &FeatureBits_) { - FeatureBits = FeatureBits_; - } - -protected: - /// Initialize the scheduling model and feature bits. - /// - /// FIXME: Find a way to stick this in the constructor, since it should only - /// be called during initialization. - void InitMCProcessorInfo(StringRef CPU, StringRef FS); - -public: - /// Set the features to the default for the given CPU with an appended feature - /// string. - void setDefaultFeatures(StringRef CPU, StringRef FS); - - /// ToggleFeature - Toggle a feature and returns the re-computed feature - /// bits. This version does not change the implied bits. - FeatureBitset ToggleFeature(uint64_t FB); - - /// ToggleFeature - Toggle a feature and returns the re-computed feature - /// bits. This version does not change the implied bits. - FeatureBitset ToggleFeature(const FeatureBitset& FB); - - /// ToggleFeature - Toggle a set of features and returns the re-computed - /// feature bits. This version will also change all implied bits. - FeatureBitset ToggleFeature(StringRef FS); - - /// Apply a feature flag and return the re-computed feature bits, including - /// all feature bits implied by the flag. - FeatureBitset ApplyFeatureFlag(StringRef FS); - - /// getSchedModelForCPU - Get the machine model of a CPU. - /// - const MCSchedModel &getSchedModelForCPU(StringRef CPU) const; - - /// Get the machine model for this subtarget's CPU. - const MCSchedModel &getSchedModel() const { return *CPUSchedModel; } - - /// Return an iterator at the first process resource consumed by the given - /// scheduling class. - const MCWriteProcResEntry *getWriteProcResBegin( - const MCSchedClassDesc *SC) const { - return &WriteProcResTable[SC->WriteProcResIdx]; - } - const MCWriteProcResEntry *getWriteProcResEnd( - const MCSchedClassDesc *SC) const { - return getWriteProcResBegin(SC) + SC->NumWriteProcResEntries; - } - - const MCWriteLatencyEntry *getWriteLatencyEntry(const MCSchedClassDesc *SC, - unsigned DefIdx) const { - assert(DefIdx < SC->NumWriteLatencyEntries && - "MachineModel does not specify a WriteResource for DefIdx"); - - return &WriteLatencyTable[SC->WriteLatencyIdx + DefIdx]; - } - - int getReadAdvanceCycles(const MCSchedClassDesc *SC, unsigned UseIdx, - unsigned WriteResID) const { - // TODO: The number of read advance entries in a class can be significant - // (~50). Consider compressing the WriteID into a dense ID of those that are - // used by ReadAdvance and representing them as a bitset. - for (const MCReadAdvanceEntry *I = &ReadAdvanceTable[SC->ReadAdvanceIdx], - *E = I + SC->NumReadAdvanceEntries; I != E; ++I) { - if (I->UseIdx < UseIdx) - continue; - if (I->UseIdx > UseIdx) - break; - // Find the first WriteResIdx match, which has the highest cycle count. - if (!I->WriteResourceID || I->WriteResourceID == WriteResID) { - return I->Cycles; - } - } - return 0; - } - - /// getInstrItineraryForCPU - Get scheduling itinerary of a CPU. - /// - InstrItineraryData getInstrItineraryForCPU(StringRef CPU) const; - - /// Initialize an InstrItineraryData instance. - void initInstrItins(InstrItineraryData &InstrItins) const; - - /// Check whether the CPU string is valid. - bool isCPUStringValid(StringRef CPU) const { - auto Found = std::lower_bound(ProcDesc.begin(), ProcDesc.end(), CPU); - return Found != ProcDesc.end() && StringRef(Found->Key) == CPU; - } -}; - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCSymbol.h b/llvm/include/llvm/MC/MCSymbol.h deleted file mode 100644 index 23e34b78..00000000 --- a/llvm/include/llvm/MC/MCSymbol.h +++ /dev/null @@ -1,421 +0,0 @@ -//===- MCSymbol.h - Machine Code Symbols ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MCSymbol class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCSYMBOL_H -#define LLVM_MC_MCSYMBOL_H - -#include "llvm/ADT/PointerIntPair.h" -#include "llvm/ADT/PointerUnion.h" -#include "llvm/ADT/StringMap.h" -#include "llvm/MC/MCFragment.h" -#include "llvm/Support/Compiler.h" - -namespace llvm { -class MCAsmInfo; -class MCExpr; -class MCSymbol; -class MCFragment; -class MCSection; -class MCContext; -class raw_ostream; - -/// MCSymbol - Instances of this class represent a symbol name in the MC file, -/// and MCSymbols are created and uniqued by the MCContext class. MCSymbols -/// should only be constructed with valid names for the object file. -/// -/// If the symbol is defined/emitted into the current translation unit, the -/// Section member is set to indicate what section it lives in. Otherwise, if -/// it is a reference to an external entity, it has a null section. -class MCSymbol { -protected: - /// The kind of the symbol. If it is any value other than unset then this - /// class is actually one of the appropriate subclasses of MCSymbol. - enum SymbolKind { - SymbolKindUnset, - SymbolKindCOFF, - SymbolKindELF, - SymbolKindMachO, - }; - - /// A symbol can contain an Offset, or Value, or be Common, but never more - /// than one of these. - enum Contents : uint8_t { - SymContentsUnset, - SymContentsOffset, - SymContentsVariable, - SymContentsCommon, - }; - - // Special sentinal value for the absolute pseudo fragment. - static MCFragment *AbsolutePseudoFragment; - - /// If a symbol has a Fragment, the section is implied, so we only need - /// one pointer. - /// The special AbsolutePseudoFragment value is for absolute symbols. - /// If this is a variable symbol, this caches the variable value's fragment. - /// FIXME: We might be able to simplify this by having the asm streamer create - /// dummy fragments. - /// If this is a section, then it gives the symbol is defined in. This is null - /// for undefined symbols. - /// - /// If this is a fragment, then it gives the fragment this symbol's value is - /// relative to, if any. - /// - /// For the 'HasName' integer, this is true if this symbol is named. - /// A named symbol will have a pointer to the name allocated in the bytes - /// immediately prior to the MCSymbol. - mutable PointerIntPair FragmentAndHasName; - - /// IsTemporary - True if this is an assembler temporary label, which - /// typically does not survive in the .o file's symbol table. Usually - /// "Lfoo" or ".foo". - unsigned IsTemporary : 1; - - /// \brief True if this symbol can be redefined. - unsigned IsRedefinable : 1; - - /// IsUsed - True if this symbol has been used. - mutable unsigned IsUsed : 1; - - mutable unsigned IsRegistered : 1; - - /// This symbol is visible outside this translation unit. - mutable unsigned IsExternal : 1; - - /// This symbol is private extern. - mutable unsigned IsPrivateExtern : 1; - - /// LLVM RTTI discriminator. This is actually a SymbolKind enumerator, but is - /// unsigned to avoid sign extension and achieve better bitpacking with MSVC. - unsigned Kind : 2; - - /// True if we have created a relocation that uses this symbol. - mutable unsigned IsUsedInReloc : 1; - - /// This is actually a Contents enumerator, but is unsigned to avoid sign - /// extension and achieve better bitpacking with MSVC. - unsigned SymbolContents : 2; - - /// The alignment of the symbol, if it is 'common', or -1. - /// - /// The alignment is stored as log2(align) + 1. This allows all values from - /// 0 to 2^31 to be stored which is every power of 2 representable by an - /// unsigned. - enum : unsigned { NumCommonAlignmentBits = 5 }; - unsigned CommonAlignLog2 : NumCommonAlignmentBits; - - /// The Flags field is used by object file implementations to store - /// additional per symbol information which is not easily classified. - enum : unsigned { NumFlagsBits = 16 }; - mutable uint32_t Flags : NumFlagsBits; - - /// Index field, for use by the object file implementation. - mutable uint32_t Index = 0; - - union { - /// The offset to apply to the fragment address to form this symbol's value. - uint64_t Offset; - - /// The size of the symbol, if it is 'common'. - uint64_t CommonSize; - - /// If non-null, the value for a variable symbol. - const MCExpr *Value; - }; - -protected: // MCContext creates and uniques these. - friend class MCExpr; - friend class MCContext; - - /// \brief The name for a symbol. - /// MCSymbol contains a uint64_t so is probably aligned to 8. On a 32-bit - /// system, the name is a pointer so isn't going to satisfy the 8 byte - /// alignment of uint64_t. Account for that here. - typedef union { - const StringMapEntry *NameEntry; - uint64_t AlignmentPadding; - } NameEntryStorageTy; - - MCSymbol(SymbolKind Kind, const StringMapEntry *Name, bool isTemporary) - : IsTemporary(isTemporary), IsRedefinable(false), IsUsed(false), - IsRegistered(false), IsExternal(false), IsPrivateExtern(false), - Kind(Kind), IsUsedInReloc(false), SymbolContents(SymContentsUnset), - CommonAlignLog2(0), Flags(0) { - Offset = 0; - FragmentAndHasName.setInt(!!Name); - if (Name) - getNameEntryPtr() = Name; - } - - // Provide custom new/delete as we will only allocate space for a name - // if we need one. - void *operator new(size_t s, const StringMapEntry *Name, - MCContext &Ctx); - -private: - - void operator delete(void *); - /// \brief Placement delete - required by std, but never called. - void operator delete(void*, unsigned) { - llvm_unreachable("Constructor throws?"); - } - /// \brief Placement delete - required by std, but never called. - void operator delete(void*, unsigned, bool) { - llvm_unreachable("Constructor throws?"); - } - - MCSymbol(const MCSymbol &) = delete; - void operator=(const MCSymbol &) = delete; - MCSection *getSectionPtr(bool SetUsed = true) const { - if (MCFragment *F = getFragment(SetUsed)) { - assert(F != AbsolutePseudoFragment); - return F->getParent(); - } - return nullptr; - } - - /// \brief Get a reference to the name field. Requires that we have a name - const StringMapEntry *&getNameEntryPtr() { - assert(FragmentAndHasName.getInt() && "Name is required"); - NameEntryStorageTy *Name = reinterpret_cast(this); - return (*(Name - 1)).NameEntry; - } - const StringMapEntry *&getNameEntryPtr() const { - return const_cast(this)->getNameEntryPtr(); - } - -public: - /// getName - Get the symbol name. - StringRef getName() const { - if (!FragmentAndHasName.getInt()) - return StringRef(); - - return getNameEntryPtr()->first(); - } - - bool isRegistered() const { return IsRegistered; } - void setIsRegistered(bool Value) const { IsRegistered = Value; } - - void setUsedInReloc() const { IsUsedInReloc = true; } - bool isUsedInReloc() const { return IsUsedInReloc; } - - /// \name Accessors - /// @{ - - /// isTemporary - Check if this is an assembler temporary symbol. - bool isTemporary() const { return IsTemporary; } - - /// isUsed - Check if this is used. - bool isUsed() const { return IsUsed; } - void setUsed(bool Value) const { IsUsed |= Value; } - - /// \brief Check if this symbol is redefinable. - bool isRedefinable() const { return IsRedefinable; } - /// \brief Mark this symbol as redefinable. - void setRedefinable(bool Value) { IsRedefinable = Value; } - /// \brief Prepare this symbol to be redefined. - void redefineIfPossible() { - if (IsRedefinable) { - if (SymbolContents == SymContentsVariable) { - Value = nullptr; - SymbolContents = SymContentsUnset; - } - setUndefined(); - IsRedefinable = false; - } - } - - /// @} - /// \name Associated Sections - /// @{ - - /// isDefined - Check if this symbol is defined (i.e., it has an address). - /// - /// Defined symbols are either absolute or in some section. - bool isDefined(bool SetUsed = true) const { - return getFragment(SetUsed) != nullptr; - } - - /// isInSection - Check if this symbol is defined in some section (i.e., it - /// is defined but not absolute). - bool isInSection(bool SetUsed = true) const { - return isDefined(SetUsed) && !isAbsolute(SetUsed); - } - - /// isUndefined - Check if this symbol undefined (i.e., implicitly defined). - bool isUndefined(bool SetUsed = true) const { return !isDefined(SetUsed); } - - /// isAbsolute - Check if this is an absolute symbol. - bool isAbsolute(bool SetUsed = true) const { - return getFragment(SetUsed) == AbsolutePseudoFragment; - } - - /// Get the section associated with a defined, non-absolute symbol. - MCSection &getSection(bool SetUsed = true) const { - assert(isInSection(SetUsed) && "Invalid accessor!"); - return *getSectionPtr(SetUsed); - } - - /// Mark the symbol as defined in the fragment \p F. - void setFragment(MCFragment *F) const { - assert(!isVariable() && "Cannot set fragment of variable"); - FragmentAndHasName.setPointer(F); - } - - /// Mark the symbol as undefined. - void setUndefined() { FragmentAndHasName.setPointer(nullptr); } - - bool isELF() const { return Kind == SymbolKindELF; } - - bool isCOFF() const { return Kind == SymbolKindCOFF; } - - bool isMachO() const { return Kind == SymbolKindMachO; } - - /// @} - /// \name Variable Symbols - /// @{ - - /// isVariable - Check if this is a variable symbol. - bool isVariable() const { - return SymbolContents == SymContentsVariable; - } - - /// getVariableValue - Get the value for variable symbols. - const MCExpr *getVariableValue(bool SetUsed = true) const { - assert(isVariable() && "Invalid accessor!"); - IsUsed |= SetUsed; - return Value; - } - - void setVariableValue(const MCExpr *Value); - - /// @} - - /// Get the (implementation defined) index. - uint32_t getIndex() const { - return Index; - } - - /// Set the (implementation defined) index. - void setIndex(uint32_t Value) const { - Index = Value; - } - - uint64_t getOffset() const { - assert((SymbolContents == SymContentsUnset || - SymbolContents == SymContentsOffset) && - "Cannot get offset for a common/variable symbol"); - return Offset; - } - void setOffset(uint64_t Value) { - assert((SymbolContents == SymContentsUnset || - SymbolContents == SymContentsOffset) && - "Cannot set offset for a common/variable symbol"); - Offset = Value; - SymbolContents = SymContentsOffset; - } - - /// Return the size of a 'common' symbol. - uint64_t getCommonSize() const { - assert(isCommon() && "Not a 'common' symbol!"); - return CommonSize; - } - - /// Mark this symbol as being 'common'. - /// - /// \param Size - The size of the symbol. - /// \param Align - The alignment of the symbol. - void setCommon(uint64_t Size, unsigned Align) { - assert(getOffset() == 0); - CommonSize = Size; - SymbolContents = SymContentsCommon; - - assert((!Align || isPowerOf2_32(Align)) && - "Alignment must be a power of 2"); - unsigned Log2Align = Log2_32(Align) + 1; - assert(Log2Align < (1U << NumCommonAlignmentBits) && - "Out of range alignment"); - CommonAlignLog2 = Log2Align; - } - - /// Return the alignment of a 'common' symbol. - unsigned getCommonAlignment() const { - assert(isCommon() && "Not a 'common' symbol!"); - return CommonAlignLog2 ? (1U << (CommonAlignLog2 - 1)) : 0; - } - - /// Declare this symbol as being 'common'. - /// - /// \param Size - The size of the symbol. - /// \param Align - The alignment of the symbol. - /// \return True if symbol was already declared as a different type - bool declareCommon(uint64_t Size, unsigned Align) { - assert(isCommon() || getOffset() == 0); - if(isCommon()) { - if(CommonSize != Size || getCommonAlignment() != Align) - return true; - } else - setCommon(Size, Align); - return false; - } - - /// Is this a 'common' symbol. - bool isCommon() const { - return SymbolContents == SymContentsCommon; - } - - MCFragment *getFragment(bool SetUsed = true) const { - MCFragment *Fragment = FragmentAndHasName.getPointer(); - if (Fragment || !isVariable()) - return Fragment; - Fragment = getVariableValue(SetUsed)->findAssociatedFragment(); - FragmentAndHasName.setPointer(Fragment); - return Fragment; - } - - bool isExternal() const { return IsExternal; } - void setExternal(bool Value) const { IsExternal = Value; } - - bool isPrivateExtern() const { return IsPrivateExtern; } - void setPrivateExtern(bool Value) { IsPrivateExtern = Value; } - - /// print - Print the value to the stream \p OS. - void print(raw_ostream &OS, const MCAsmInfo *MAI) const; - - /// dump - Print the value to stderr. - void dump() const; - -protected: - /// Get the (implementation defined) symbol flags. - uint32_t getFlags() const { return Flags; } - - /// Set the (implementation defined) symbol flags. - void setFlags(uint32_t Value) const { - assert(Value < (1U << NumFlagsBits) && "Out of range flags"); - Flags = Value; - } - - /// Modify the flags via a mask - void modifyFlags(uint32_t Value, uint32_t Mask) const { - assert(Value < (1U << NumFlagsBits) && "Out of range flags"); - Flags = (Flags & ~Mask) | Value; - } -}; - -inline raw_ostream &operator<<(raw_ostream &OS, const MCSymbol &Sym) { - Sym.print(OS, nullptr); - return OS; -} -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCSymbolCOFF.h b/llvm/include/llvm/MC/MCSymbolCOFF.h deleted file mode 100644 index 2172c679..00000000 --- a/llvm/include/llvm/MC/MCSymbolCOFF.h +++ /dev/null @@ -1,64 +0,0 @@ -//===- MCSymbolCOFF.h - ----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_MC_MCSYMBOLCOFF_H -#define LLVM_MC_MCSYMBOLCOFF_H - -#include "llvm/MC/MCSymbol.h" - -namespace llvm { -class MCSymbolCOFF : public MCSymbol { - - /// This corresponds to the e_type field of the COFF symbol. - mutable uint16_t Type; - - enum SymbolFlags : uint16_t { - SF_ClassMask = 0x00FF, - SF_ClassShift = 0, - - SF_WeakExternal = 0x0100, - SF_SafeSEH = 0x0200, - }; - -public: - MCSymbolCOFF(const StringMapEntry *Name, bool isTemporary) - : MCSymbol(SymbolKindCOFF, Name, isTemporary), Type(0) {} - - uint16_t getType() const { - return Type; - } - void setType(uint16_t Ty) const { - Type = Ty; - } - - uint16_t getClass() const { - return (getFlags() & SF_ClassMask) >> SF_ClassShift; - } - void setClass(uint16_t StorageClass) const { - modifyFlags(StorageClass << SF_ClassShift, SF_ClassMask); - } - - bool isWeakExternal() const { - return getFlags() & SF_WeakExternal; - } - void setIsWeakExternal() const { - modifyFlags(SF_WeakExternal, SF_WeakExternal); - } - - bool isSafeSEH() const { - return getFlags() & SF_SafeSEH; - } - void setIsSafeSEH() const { - modifyFlags(SF_SafeSEH, SF_SafeSEH); - } - - static bool classof(const MCSymbol *S) { return S->isCOFF(); } -}; -} - -#endif diff --git a/llvm/include/llvm/MC/MCSymbolELF.h b/llvm/include/llvm/MC/MCSymbolELF.h deleted file mode 100644 index bbcd22e8..00000000 --- a/llvm/include/llvm/MC/MCSymbolELF.h +++ /dev/null @@ -1,54 +0,0 @@ -//===- MCSymbolELF.h - -----------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_MC_MCSYMBOLELF_H -#define LLVM_MC_MCSYMBOLELF_H - -#include "llvm/MC/MCSymbol.h" - -namespace llvm { -class MCSymbolELF : public MCSymbol { - /// An expression describing how to calculate the size of a symbol. If a - /// symbol has no size this field will be NULL. - const MCExpr *SymbolSize = nullptr; - -public: - MCSymbolELF(const StringMapEntry *Name, bool isTemporary) - : MCSymbol(SymbolKindELF, Name, isTemporary) {} - void setSize(const MCExpr *SS) { SymbolSize = SS; } - - const MCExpr *getSize() const { return SymbolSize; } - - void setVisibility(unsigned Visibility); - unsigned getVisibility() const; - - void setOther(unsigned Other); - unsigned getOther() const; - - void setType(unsigned Type) const; - unsigned getType() const; - - void setBinding(unsigned Binding) const; - unsigned getBinding() const; - - bool isBindingSet() const; - - void setIsWeakrefUsedInReloc() const; - bool isWeakrefUsedInReloc() const; - - void setIsSignature() const; - bool isSignature() const; - - static bool classof(const MCSymbol *S) { return S->isELF(); } - -private: - void setIsBindingSet() const; -}; -} - -#endif diff --git a/llvm/include/llvm/MC/MCSymbolMachO.h b/llvm/include/llvm/MC/MCSymbolMachO.h deleted file mode 100644 index 25220e4a..00000000 --- a/llvm/include/llvm/MC/MCSymbolMachO.h +++ /dev/null @@ -1,136 +0,0 @@ -//===- MCSymbolMachO.h - ---------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -#ifndef LLVM_MC_MCSYMBOLMACHO_H -#define LLVM_MC_MCSYMBOLMACHO_H - -#include "llvm/ADT/Twine.h" -#include "llvm/MC/MCSymbol.h" - -namespace llvm { -class MCSymbolMachO : public MCSymbol { - /// \brief We store the value for the 'desc' symbol field in the - /// lowest 16 bits of the implementation defined flags. - enum MachOSymbolFlags : uint16_t { // See . - SF_DescFlagsMask = 0xFFFF, - - // Reference type flags. - SF_ReferenceTypeMask = 0x0007, - SF_ReferenceTypeUndefinedNonLazy = 0x0000, - SF_ReferenceTypeUndefinedLazy = 0x0001, - SF_ReferenceTypeDefined = 0x0002, - SF_ReferenceTypePrivateDefined = 0x0003, - SF_ReferenceTypePrivateUndefinedNonLazy = 0x0004, - SF_ReferenceTypePrivateUndefinedLazy = 0x0005, - - // Other 'desc' flags. - SF_ThumbFunc = 0x0008, - SF_NoDeadStrip = 0x0020, - SF_WeakReference = 0x0040, - SF_WeakDefinition = 0x0080, - SF_SymbolResolver = 0x0100, - SF_AltEntry = 0x0200, - - // Common alignment - SF_CommonAlignmentMask = 0xF0FF, - SF_CommonAlignmentShift = 8 - }; - -public: - MCSymbolMachO(const StringMapEntry *Name, bool isTemporary) - : MCSymbol(SymbolKindMachO, Name, isTemporary) {} - - // Reference type methods. - - void clearReferenceType() const { - modifyFlags(0, SF_ReferenceTypeMask); - } - - void setReferenceTypeUndefinedLazy(bool Value) const { - modifyFlags(Value ? SF_ReferenceTypeUndefinedLazy : 0, - SF_ReferenceTypeUndefinedLazy); - } - - // Other 'desc' methods. - - void setThumbFunc() const { - modifyFlags(SF_ThumbFunc, SF_ThumbFunc); - } - - bool isNoDeadStrip() const { - return getFlags() & SF_NoDeadStrip; - } - void setNoDeadStrip() const { - modifyFlags(SF_NoDeadStrip, SF_NoDeadStrip); - } - - bool isWeakReference() const { - return getFlags() & SF_WeakReference; - } - void setWeakReference() const { - modifyFlags(SF_WeakReference, SF_WeakReference); - } - - bool isWeakDefinition() const { - return getFlags() & SF_WeakDefinition; - } - void setWeakDefinition() const { - modifyFlags(SF_WeakDefinition, SF_WeakDefinition); - } - - bool isSymbolResolver() const { - return getFlags() & SF_SymbolResolver; - } - void setSymbolResolver() const { - modifyFlags(SF_SymbolResolver, SF_SymbolResolver); - } - - void setAltEntry() const { - modifyFlags(SF_AltEntry, SF_AltEntry); - } - - bool isAltEntry() const { - return getFlags() & SF_AltEntry; - } - - void setDesc(unsigned Value) const { - assert(Value == (Value & SF_DescFlagsMask) && - "Invalid .desc value!"); - setFlags(Value & SF_DescFlagsMask); - } - - /// \brief Get the encoded value of the flags as they will be emitted in to - /// the MachO binary - uint16_t getEncodedFlags(bool EncodeAsAltEntry) const { - uint16_t Flags = getFlags(); - - // Common alignment is packed into the 'desc' bits. - if (isCommon()) { - if (unsigned Align = getCommonAlignment()) { - unsigned Log2Size = Log2_32(Align); - assert((1U << Log2Size) == Align && "Invalid 'common' alignment!"); - if (Log2Size > 15) - report_fatal_error("invalid 'common' alignment '" + - Twine(Align) + "' for '" + getName() + "'", - false); - Flags = (Flags & SF_CommonAlignmentMask) | - (Log2Size << SF_CommonAlignmentShift); - } - } - - if (EncodeAsAltEntry) - Flags |= SF_AltEntry; - - return Flags; - } - - static bool classof(const MCSymbol *S) { return S->isMachO(); } -}; -} - -#endif diff --git a/llvm/include/llvm/MC/MCTargetOptions.h b/llvm/include/llvm/MC/MCTargetOptions.h deleted file mode 100644 index 1d170b75..00000000 --- a/llvm/include/llvm/MC/MCTargetOptions.h +++ /dev/null @@ -1,76 +0,0 @@ -//===- MCTargetOptions.h - MC Target Options -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCTARGETOPTIONS_H -#define LLVM_MC_MCTARGETOPTIONS_H - -#include - -namespace llvm { - -class StringRef; - -class MCTargetOptions { -public: - enum AsmInstrumentation { - AsmInstrumentationNone, - AsmInstrumentationAddress - }; - - /// Enables AddressSanitizer instrumentation at machine level. - bool SanitizeAddress : 1; - - bool MCRelaxAll : 1; - bool MCNoExecStack : 1; - bool MCFatalWarnings : 1; - bool MCNoWarn : 1; - bool MCSaveTempLabels : 1; - bool MCUseDwarfDirectory : 1; - bool MCIncrementalLinkerCompatible : 1; - bool ShowMCEncoding : 1; - bool ShowMCInst : 1; - bool AsmVerbose : 1; - - /// Preserve Comments in Assembly. - bool PreserveAsmComments : 1; - - int DwarfVersion; - /// getABIName - If this returns a non-empty string this represents the - /// textual name of the ABI that we want the backend to use, e.g. o32, or - /// aapcs-linux. - StringRef getABIName() const; - std::string ABIName; - MCTargetOptions(); -}; - -inline bool operator==(const MCTargetOptions &LHS, const MCTargetOptions &RHS) { -#define ARE_EQUAL(X) LHS.X == RHS.X - return (ARE_EQUAL(SanitizeAddress) && - ARE_EQUAL(MCRelaxAll) && - ARE_EQUAL(MCNoExecStack) && - ARE_EQUAL(MCFatalWarnings) && - ARE_EQUAL(MCNoWarn) && - ARE_EQUAL(MCSaveTempLabels) && - ARE_EQUAL(MCUseDwarfDirectory) && - ARE_EQUAL(MCIncrementalLinkerCompatible) && - ARE_EQUAL(ShowMCEncoding) && - ARE_EQUAL(ShowMCInst) && - ARE_EQUAL(AsmVerbose) && - ARE_EQUAL(DwarfVersion) && - ARE_EQUAL(ABIName)); -#undef ARE_EQUAL -} - -inline bool operator!=(const MCTargetOptions &LHS, const MCTargetOptions &RHS) { - return !(LHS == RHS); -} - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h b/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h deleted file mode 100644 index 5180208d..00000000 --- a/llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h +++ /dev/null @@ -1,74 +0,0 @@ -//===-- MCTargetOptionsCommandFlags.h --------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains machine code-specific flags that are shared between -// different command line tools. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H -#define LLVM_MC_MCTARGETOPTIONSCOMMANDFLAGS_H - -#include "llvm/MC/MCTargetOptions.h" -#include "llvm/Support/CommandLine.h" -using namespace llvm; - -cl::opt AsmInstrumentation( - "asm-instrumentation", cl::desc("Instrumentation of inline assembly and " - "assembly source files"), - cl::init(MCTargetOptions::AsmInstrumentationNone), - cl::values(clEnumValN(MCTargetOptions::AsmInstrumentationNone, "none", - "no instrumentation at all"), - clEnumValN(MCTargetOptions::AsmInstrumentationAddress, "address", - "instrument instructions with memory arguments"), - clEnumValEnd)); - -cl::opt RelaxAll("mc-relax-all", - cl::desc("When used with filetype=obj, " - "relax all fixups in the emitted object file")); - -cl::opt IncrementalLinkerCompatible( - "incremental-linker-compatible", - cl::desc( - "When used with filetype=obj, " - "emit an object file which can be used with an incremental linker")); - -cl::opt DwarfVersion("dwarf-version", cl::desc("Dwarf version"), - cl::init(0)); - -cl::opt ShowMCInst("asm-show-inst", - cl::desc("Emit internal instruction representation to " - "assembly file")); - -cl::opt FatalWarnings("fatal-warnings", - cl::desc("Treat warnings as errors")); - -cl::opt NoWarn("no-warn", cl::desc("Suppress all warnings")); -cl::alias NoWarnW("W", cl::desc("Alias for --no-warn"), cl::aliasopt(NoWarn)); - -cl::opt -ABIName("target-abi", cl::Hidden, - cl::desc("The name of the ABI to be targeted from the backend."), - cl::init("")); - -static inline MCTargetOptions InitMCTargetOptionsFromFlags() { - MCTargetOptions Options; - Options.SanitizeAddress = - (AsmInstrumentation == MCTargetOptions::AsmInstrumentationAddress); - Options.MCRelaxAll = RelaxAll; - Options.MCIncrementalLinkerCompatible = IncrementalLinkerCompatible; - Options.DwarfVersion = DwarfVersion; - Options.ShowMCInst = ShowMCInst; - Options.ABIName = ABIName; - Options.MCFatalWarnings = FatalWarnings; - Options.MCNoWarn = NoWarn; - return Options; -} - -#endif diff --git a/llvm/include/llvm/MC/MCValue.h b/llvm/include/llvm/MC/MCValue.h deleted file mode 100644 index ead08fd9..00000000 --- a/llvm/include/llvm/MC/MCValue.h +++ /dev/null @@ -1,86 +0,0 @@ -//===-- llvm/MC/MCValue.h - MCValue class -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains the declaration of the MCValue class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCVALUE_H -#define LLVM_MC_MCVALUE_H - -#include "llvm/MC/MCExpr.h" -#include "llvm/MC/MCSymbol.h" -#include "llvm/Support/DataTypes.h" -#include - -namespace llvm { -class MCAsmInfo; -class raw_ostream; - -/// \brief This represents an "assembler immediate". -/// -/// In its most general form, this can hold ":Kind:(SymbolA - SymbolB + -/// imm64)". Not all targets supports relocations of this general form, but we -/// need to represent this anyway. -/// -/// In general both SymbolA and SymbolB will also have a modifier -/// analogous to the top-level Kind. Current targets are not expected -/// to make use of both though. The choice comes down to whether -/// relocation modifiers apply to the closest symbol or the whole -/// expression. -/// -/// Note that this class must remain a simple POD value class, because we need -/// it to live in unions etc. -class MCValue { - const MCSymbolRefExpr *SymA, *SymB; - int64_t Cst; - uint32_t RefKind; -public: - - int64_t getConstant() const { return Cst; } - const MCSymbolRefExpr *getSymA() const { return SymA; } - const MCSymbolRefExpr *getSymB() const { return SymB; } - uint32_t getRefKind() const { return RefKind; } - - /// \brief Is this an absolute (as opposed to relocatable) value. - bool isAbsolute() const { return !SymA && !SymB; } - - /// \brief Print the value to the stream \p OS. - void print(raw_ostream &OS) const; - - /// \brief Print the value to stderr. - void dump() const; - - MCSymbolRefExpr::VariantKind getAccessVariant() const; - - static MCValue get(const MCSymbolRefExpr *SymA, - const MCSymbolRefExpr *SymB = nullptr, - int64_t Val = 0, uint32_t RefKind = 0) { - MCValue R; - R.Cst = Val; - R.SymA = SymA; - R.SymB = SymB; - R.RefKind = RefKind; - return R; - } - - static MCValue get(int64_t Val) { - MCValue R; - R.Cst = Val; - R.SymA = nullptr; - R.SymB = nullptr; - R.RefKind = 0; - return R; - } - -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCWin64EH.h b/llvm/include/llvm/MC/MCWin64EH.h deleted file mode 100644 index 83ea738d..00000000 --- a/llvm/include/llvm/MC/MCWin64EH.h +++ /dev/null @@ -1,62 +0,0 @@ -//===- MCWin64EH.h - Machine Code Win64 EH support --------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file contains declarations to support the Win64 Exception Handling -// scheme in MC. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCWIN64EH_H -#define LLVM_MC_MCWIN64EH_H - -#include "llvm/MC/MCWinEH.h" -#include "llvm/Support/Win64EH.h" - -namespace llvm { -class MCStreamer; -class MCSymbol; - -namespace Win64EH { -struct Instruction { - static WinEH::Instruction PushNonVol(MCSymbol *L, unsigned Reg) { - return WinEH::Instruction(Win64EH::UOP_PushNonVol, L, Reg, -1); - } - static WinEH::Instruction Alloc(MCSymbol *L, unsigned Size) { - return WinEH::Instruction(Size > 128 ? UOP_AllocLarge : UOP_AllocSmall, L, - -1, Size); - } - static WinEH::Instruction PushMachFrame(MCSymbol *L, bool Code) { - return WinEH::Instruction(UOP_PushMachFrame, L, -1, Code ? 1 : 0); - } - static WinEH::Instruction SaveNonVol(MCSymbol *L, unsigned Reg, - unsigned Offset) { - return WinEH::Instruction(Offset > 512 * 1024 - 8 ? UOP_SaveNonVolBig - : UOP_SaveNonVol, - L, Reg, Offset); - } - static WinEH::Instruction SaveXMM(MCSymbol *L, unsigned Reg, - unsigned Offset) { - return WinEH::Instruction(Offset > 512 * 1024 - 8 ? UOP_SaveXMM128Big - : UOP_SaveXMM128, - L, Reg, Offset); - } - static WinEH::Instruction SetFPReg(MCSymbol *L, unsigned Reg, unsigned Off) { - return WinEH::Instruction(UOP_SetFPReg, L, Reg, Off); - } -}; - -class UnwindEmitter : public WinEH::UnwindEmitter { -public: - void Emit(MCStreamer &Streamer) const override; - void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI) const override; -}; -} -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h b/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h deleted file mode 100644 index e2e95c7d..00000000 --- a/llvm/include/llvm/MC/MCWinCOFFObjectWriter.h +++ /dev/null @@ -1,47 +0,0 @@ -//===-- llvm/MC/MCWinCOFFObjectWriter.h - Win COFF Object Writer *- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCWINCOFFOBJECTWRITER_H -#define LLVM_MC_MCWINCOFFOBJECTWRITER_H - -namespace llvm { -class MCAsmBackend; -class MCFixup; -class MCObjectWriter; -class MCValue; -class raw_ostream; -class raw_pwrite_stream; - - class MCWinCOFFObjectTargetWriter { - virtual void anchor(); - const unsigned Machine; - - protected: - MCWinCOFFObjectTargetWriter(unsigned Machine_); - - public: - virtual ~MCWinCOFFObjectTargetWriter() {} - - unsigned getMachine() const { return Machine; } - virtual unsigned getRelocType(const MCValue &Target, const MCFixup &Fixup, - bool IsCrossSection, - const MCAsmBackend &MAB) const = 0; - virtual bool recordRelocation(const MCFixup &) const { return true; } - }; - - /// \brief Construct a new Win COFF writer instance. - /// - /// \param MOTW - The target specific WinCOFF writer subclass. - /// \param OS - The stream to write to. - /// \returns The constructed object writer. - MCObjectWriter *createWinCOFFObjectWriter(MCWinCOFFObjectTargetWriter *MOTW, - raw_pwrite_stream &OS); -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/MCWinCOFFStreamer.h b/llvm/include/llvm/MC/MCWinCOFFStreamer.h deleted file mode 100644 index fe1ada9b..00000000 --- a/llvm/include/llvm/MC/MCWinCOFFStreamer.h +++ /dev/null @@ -1,81 +0,0 @@ -//===- MCWinCOFFStreamer.h - COFF Object File Interface ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCWINCOFFSTREAMER_H -#define LLVM_MC_MCWINCOFFSTREAMER_H - -#include "llvm/MC/MCDirectives.h" -#include "llvm/MC/MCObjectStreamer.h" - -namespace llvm { -class MCAsmBackend; -class MCContext; -class MCCodeEmitter; -class MCExpr; -class MCInst; -class MCSection; -class MCSubtargetInfo; -class MCSymbol; -class StringRef; -class raw_ostream; -class raw_pwrite_stream; - -class MCWinCOFFStreamer : public MCObjectStreamer { -public: - MCWinCOFFStreamer(MCContext &Context, MCAsmBackend &MAB, MCCodeEmitter &CE, - raw_pwrite_stream &OS); - - /// state management - void reset() override { - CurSymbol = nullptr; - MCObjectStreamer::reset(); - } - - /// \name MCStreamer interface - /// \{ - - void InitSections(bool NoExecStack) override; - void EmitLabel(MCSymbol *Symbol) override; - void EmitAssemblerFlag(MCAssemblerFlag Flag) override; - void EmitThumbFunc(MCSymbol *Func) override; - bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override; - void EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) override; - void BeginCOFFSymbolDef(MCSymbol const *Symbol) override; - void EmitCOFFSymbolStorageClass(int StorageClass) override; - void EmitCOFFSymbolType(int Type) override; - void EndCOFFSymbolDef() override; - void EmitCOFFSafeSEH(MCSymbol const *Symbol) override; - void EmitCOFFSectionIndex(MCSymbol const *Symbol) override; - void EmitCOFFSecRel32(MCSymbol const *Symbol) override; - void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment) override; - void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment) override; - void EmitZerofill(MCSection *Section, MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment) override; - void EmitTBSSSymbol(MCSection *Section, MCSymbol *Symbol, uint64_t Size, - unsigned ByteAlignment) override; - void EmitFileDirective(StringRef Filename) override; - void EmitIdent(StringRef IdentString) override; - void EmitWinEHHandlerData() override; - void FinishImpl() override; - - /// \} - -protected: - const MCSymbol *CurSymbol; - void EmitInstToData(const MCInst &Inst, const MCSubtargetInfo &STI) override; - -private: - void Error(const Twine &Msg) const; -}; -} - -#endif - diff --git a/llvm/include/llvm/MC/MCWinEH.h b/llvm/include/llvm/MC/MCWinEH.h deleted file mode 100644 index 4ca52a66..00000000 --- a/llvm/include/llvm/MC/MCWinEH.h +++ /dev/null @@ -1,67 +0,0 @@ -//===- MCWinEH.h - Windows Unwinding Support --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_MCWINEH_H -#define LLVM_MC_MCWINEH_H - -#include - -namespace llvm { -class MCSection; -class MCStreamer; -class MCSymbol; - -namespace WinEH { -struct Instruction { - const MCSymbol *Label; - const unsigned Offset; - const unsigned Register; - const unsigned Operation; - - Instruction(unsigned Op, MCSymbol *L, unsigned Reg, unsigned Off) - : Label(L), Offset(Off), Register(Reg), Operation(Op) {} -}; - -struct FrameInfo { - const MCSymbol *Begin = nullptr; - const MCSymbol *End = nullptr; - const MCSymbol *ExceptionHandler = nullptr; - const MCSymbol *Function = nullptr; - const MCSymbol *PrologEnd = nullptr; - const MCSymbol *Symbol = nullptr; - const MCSection *TextSection = nullptr; - - bool HandlesUnwind = false; - bool HandlesExceptions = false; - - int LastFrameInst = -1; - const FrameInfo *ChainedParent = nullptr; - std::vector Instructions; - - FrameInfo() = default; - FrameInfo(const MCSymbol *Function, const MCSymbol *BeginFuncEHLabel) - : Begin(BeginFuncEHLabel), Function(Function) {} - FrameInfo(const MCSymbol *Function, const MCSymbol *BeginFuncEHLabel, - const FrameInfo *ChainedParent) - : Begin(BeginFuncEHLabel), Function(Function), - ChainedParent(ChainedParent) {} -}; - -class UnwindEmitter { -public: - virtual ~UnwindEmitter(); - - /// This emits the unwind info sections (.pdata and .xdata in PE/COFF). - virtual void Emit(MCStreamer &Streamer) const = 0; - virtual void EmitUnwindInfo(MCStreamer &Streamer, FrameInfo *FI) const = 0; -}; -} -} - -#endif diff --git a/llvm/include/llvm/MC/MachineLocation.h b/llvm/include/llvm/MC/MachineLocation.h deleted file mode 100644 index 4b5cf435..00000000 --- a/llvm/include/llvm/MC/MachineLocation.h +++ /dev/null @@ -1,79 +0,0 @@ -//===-- llvm/MC/MachineLocation.h -------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// The MachineLocation class is used to represent a simple location in a machine -// frame. Locations will be one of two forms; a register or an address formed -// from a base address plus an offset. Register indirection can be specified by -// explicitly passing an offset to the constructor. -//===----------------------------------------------------------------------===// - - -#ifndef LLVM_MC_MACHINELOCATION_H -#define LLVM_MC_MACHINELOCATION_H - -#include "llvm/Support/Compiler.h" -#include "llvm/Support/DataTypes.h" - -namespace llvm { - class MCSymbol; - -class MachineLocation { -private: - bool IsRegister; // True if location is a register. - unsigned Register; // gcc/gdb register number. - int Offset; // Displacement if not register. -public: - enum : uint32_t { - // The target register number for an abstract frame pointer. The value is - // an arbitrary value that doesn't collide with any real target register. - VirtualFP = ~0U - }; - MachineLocation() - : IsRegister(false), Register(0), Offset(0) {} - /// Create a direct register location. - explicit MachineLocation(unsigned R) - : IsRegister(true), Register(R), Offset(0) {} - /// Create a register-indirect location with an offset. - MachineLocation(unsigned R, int O) - : IsRegister(false), Register(R), Offset(O) {} - - bool operator==(const MachineLocation &Other) const { - return IsRegister == Other.IsRegister && Register == Other.Register && - Offset == Other.Offset; - } - - // Accessors. - /// \return true iff this is a register-indirect location. - bool isIndirect() const { return !IsRegister; } - bool isReg() const { return IsRegister; } - unsigned getReg() const { return Register; } - int getOffset() const { return Offset; } - void setIsRegister(bool Is) { IsRegister = Is; } - void setRegister(unsigned R) { Register = R; } - void setOffset(int O) { Offset = O; } - /// Make this location a direct register location. - void set(unsigned R) { - IsRegister = true; - Register = R; - Offset = 0; - } - /// Make this location a register-indirect+offset location. - void set(unsigned R, int O) { - IsRegister = false; - Register = R; - Offset = O; - } -}; - -inline bool operator!=(const MachineLocation &LHS, const MachineLocation &RHS) { - return !(LHS == RHS); -} - -} // End llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/SectionKind.h b/llvm/include/llvm/MC/SectionKind.h deleted file mode 100644 index 02fb2262..00000000 --- a/llvm/include/llvm/MC/SectionKind.h +++ /dev/null @@ -1,201 +0,0 @@ -//===-- llvm/MC/SectionKind.h - Classification of sections ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_SECTIONKIND_H -#define LLVM_MC_SECTIONKIND_H - -namespace llvm { - -/// SectionKind - This is a simple POD value that classifies the properties of -/// a section. A section is classified into the deepest possible -/// classification, and then the target maps them onto their sections based on -/// what capabilities they have. -/// -/// The comments below describe these as if they were an inheritance hierarchy -/// in order to explain the predicates below. -/// -class SectionKind { - enum Kind { - /// Metadata - Debug info sections or other metadata. - Metadata, - - /// Text - Text section, used for functions and other executable code. - Text, - - /// ReadOnly - Data that is never written to at program runtime by the - /// program or the dynamic linker. Things in the top-level readonly - /// SectionKind are not mergeable. - ReadOnly, - - /// MergableCString - Any null-terminated string which allows merging. - /// These values are known to end in a nul value of the specified size, - /// not otherwise contain a nul value, and be mergable. This allows the - /// linker to unique the strings if it so desires. - - /// Mergeable1ByteCString - 1 byte mergable, null terminated, string. - Mergeable1ByteCString, - - /// Mergeable2ByteCString - 2 byte mergable, null terminated, string. - Mergeable2ByteCString, - - /// Mergeable4ByteCString - 4 byte mergable, null terminated, string. - Mergeable4ByteCString, - - /// MergeableConst - These are sections for merging fixed-length - /// constants together. For example, this can be used to unique - /// constant pool entries etc. - - /// MergeableConst4 - This is a section used by 4-byte constants, - /// for example, floats. - MergeableConst4, - - /// MergeableConst8 - This is a section used by 8-byte constants, - /// for example, doubles. - MergeableConst8, - - /// MergeableConst16 - This is a section used by 16-byte constants, - /// for example, vectors. - MergeableConst16, - - /// MergeableConst32 - This is a section used by 32-byte constants, - /// for example, vectors. - MergeableConst32, - - /// Writeable - This is the base of all segments that need to be written - /// to during program runtime. - - /// ThreadLocal - This is the base of all TLS segments. All TLS - /// objects must be writeable, otherwise there is no reason for them to - /// be thread local! - - /// ThreadBSS - Zero-initialized TLS data objects. - ThreadBSS, - - /// ThreadData - Initialized TLS data objects. - ThreadData, - - /// GlobalWriteableData - Writeable data that is global (not thread - /// local). - - /// BSS - Zero initialized writeable data. - BSS, - - /// BSSLocal - This is BSS (zero initialized and writable) data - /// which has local linkage. - BSSLocal, - - /// BSSExtern - This is BSS data with normal external linkage. - BSSExtern, - - /// Common - Data with common linkage. These represent tentative - /// definitions, which always have a zero initializer and are never - /// marked 'constant'. - Common, - - /// This is writeable data that has a non-zero initializer. - Data, - - /// ReadOnlyWithRel - These are global variables that are never - /// written to by the program, but that have relocations, so they - /// must be stuck in a writeable section so that the dynamic linker - /// can write to them. If it chooses to, the dynamic linker can - /// mark the pages these globals end up on as read-only after it is - /// done with its relocation phase. - ReadOnlyWithRel - } K : 8; -public: - - bool isMetadata() const { return K == Metadata; } - bool isText() const { return K == Text; } - - bool isReadOnly() const { - return K == ReadOnly || isMergeableCString() || - isMergeableConst(); - } - - bool isMergeableCString() const { - return K == Mergeable1ByteCString || K == Mergeable2ByteCString || - K == Mergeable4ByteCString; - } - bool isMergeable1ByteCString() const { return K == Mergeable1ByteCString; } - bool isMergeable2ByteCString() const { return K == Mergeable2ByteCString; } - bool isMergeable4ByteCString() const { return K == Mergeable4ByteCString; } - - bool isMergeableConst() const { - return K == MergeableConst4 || K == MergeableConst8 || - K == MergeableConst16 || K == MergeableConst32; - } - bool isMergeableConst4() const { return K == MergeableConst4; } - bool isMergeableConst8() const { return K == MergeableConst8; } - bool isMergeableConst16() const { return K == MergeableConst16; } - bool isMergeableConst32() const { return K == MergeableConst32; } - - bool isWriteable() const { - return isThreadLocal() || isGlobalWriteableData(); - } - - bool isThreadLocal() const { - return K == ThreadData || K == ThreadBSS; - } - - bool isThreadBSS() const { return K == ThreadBSS; } - bool isThreadData() const { return K == ThreadData; } - - bool isGlobalWriteableData() const { - return isBSS() || isCommon() || isData() || isReadOnlyWithRel(); - } - - bool isBSS() const { return K == BSS || K == BSSLocal || K == BSSExtern; } - bool isBSSLocal() const { return K == BSSLocal; } - bool isBSSExtern() const { return K == BSSExtern; } - - bool isCommon() const { return K == Common; } - - bool isData() const { return K == Data; } - - bool isReadOnlyWithRel() const { - return K == ReadOnlyWithRel; - } -private: - static SectionKind get(Kind K) { - SectionKind Res; - Res.K = K; - return Res; - } -public: - - static SectionKind getMetadata() { return get(Metadata); } - static SectionKind getText() { return get(Text); } - static SectionKind getReadOnly() { return get(ReadOnly); } - static SectionKind getMergeable1ByteCString() { - return get(Mergeable1ByteCString); - } - static SectionKind getMergeable2ByteCString() { - return get(Mergeable2ByteCString); - } - static SectionKind getMergeable4ByteCString() { - return get(Mergeable4ByteCString); - } - static SectionKind getMergeableConst4() { return get(MergeableConst4); } - static SectionKind getMergeableConst8() { return get(MergeableConst8); } - static SectionKind getMergeableConst16() { return get(MergeableConst16); } - static SectionKind getMergeableConst32() { return get(MergeableConst32); } - static SectionKind getThreadBSS() { return get(ThreadBSS); } - static SectionKind getThreadData() { return get(ThreadData); } - static SectionKind getBSS() { return get(BSS); } - static SectionKind getBSSLocal() { return get(BSSLocal); } - static SectionKind getBSSExtern() { return get(BSSExtern); } - static SectionKind getCommon() { return get(Common); } - static SectionKind getData() { return get(Data); } - static SectionKind getReadOnlyWithRel() { return get(ReadOnlyWithRel); } -}; - -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/MC/StringTableBuilder.h b/llvm/include/llvm/MC/StringTableBuilder.h deleted file mode 100644 index f2b8ecd2..00000000 --- a/llvm/include/llvm/MC/StringTableBuilder.h +++ /dev/null @@ -1,75 +0,0 @@ -//===-- StringTableBuilder.h - String table building utility ------*- C++ -*-=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_STRINGTABLEBUILDER_H -#define LLVM_MC_STRINGTABLEBUILDER_H - -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/DenseMap.h" -#include - -namespace llvm { - -/// \brief Utility for building string tables with deduplicated suffixes. -class StringTableBuilder { -public: - enum Kind { ELF, WinCOFF, MachO, RAW }; - -private: - SmallString<256> StringTable; - DenseMap, size_t> StringIndexMap; - size_t Size = 0; - Kind K; - unsigned Alignment; - - void finalizeStringTable(bool Optimize); - -public: - StringTableBuilder(Kind K, unsigned Alignment = 1); - - /// \brief Add a string to the builder. Returns the position of S in the - /// table. The position will be changed if finalize is used. - /// Can only be used before the table is finalized. - size_t add(StringRef S); - - /// \brief Analyze the strings and build the final table. No more strings can - /// be added after this point. - void finalize(); - - /// Finalize the string table without reording it. In this mode, offsets - /// returned by add will still be valid. - void finalizeInOrder(); - - /// \brief Retrieve the string table data. Can only be used after the table - /// is finalized. - StringRef data() const { - assert(isFinalized()); - return StringTable; - } - - /// \brief Get the offest of a string in the string table. Can only be used - /// after the table is finalized. - size_t getOffset(StringRef S) const; - - const DenseMap, size_t> &getMap() const { - return StringIndexMap; - } - - size_t getSize() const { return Size; } - void clear(); - -private: - bool isFinalized() const { - return !StringTable.empty(); - } -}; - -} // end llvm namespace - -#endif diff --git a/llvm/include/llvm/MC/SubtargetFeature.h b/llvm/include/llvm/MC/SubtargetFeature.h deleted file mode 100644 index ed4abd77..00000000 --- a/llvm/include/llvm/MC/SubtargetFeature.h +++ /dev/null @@ -1,132 +0,0 @@ -//===-- llvm/MC/SubtargetFeature.h - CPU characteristics --------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines and manages user or tool specified CPU characteristics. -// The intent is to be able to package specific features that should or should -// not be used on a specific target processor. A tool, such as llc, could, as -// as example, gather chip info from the command line, a long with features -// that should be used on that chip. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_MC_SUBTARGETFEATURE_H -#define LLVM_MC_SUBTARGETFEATURE_H - -#include "llvm/ADT/Triple.h" -#include "llvm/Support/DataTypes.h" -#include -#include - -namespace llvm { -template class ArrayRef; - class raw_ostream; - class StringRef; - -// A container class for subtarget features. -// This is convenient because std::bitset does not have a constructor -// with an initializer list of set bits. -const unsigned MAX_SUBTARGET_FEATURES = 128; -class FeatureBitset : public std::bitset { -public: - // Cannot inherit constructors because it's not supported by VC++.. - FeatureBitset() : bitset() {} - - FeatureBitset(const bitset& B) : bitset(B) {} - - FeatureBitset(std::initializer_list Init) : bitset() { - for (auto I : Init) - set(I); - } -}; - -//===----------------------------------------------------------------------===// -/// -/// SubtargetFeatureKV - Used to provide key value pairs for feature and -/// CPU bit flags. -// -struct SubtargetFeatureKV { - const char *Key; // K-V key string - const char *Desc; // Help descriptor - FeatureBitset Value; // K-V integer value - FeatureBitset Implies; // K-V bit mask - - // Compare routine for std::lower_bound - bool operator<(StringRef S) const { - return StringRef(Key) < S; - } - - // Compare routine for std::is_sorted. - bool operator<(const SubtargetFeatureKV &Other) const { - return StringRef(Key) < StringRef(Other.Key); - } -}; - -//===----------------------------------------------------------------------===// -/// -/// SubtargetInfoKV - Used to provide key value pairs for CPU and arbitrary -/// pointers. -// -struct SubtargetInfoKV { - const char *Key; // K-V key string - const void *Value; // K-V pointer value - - // Compare routine for std::lower_bound - bool operator<(StringRef S) const { - return StringRef(Key) < S; - } -}; - -//===----------------------------------------------------------------------===// -/// -/// SubtargetFeatures - Manages the enabling and disabling of subtarget -/// specific features. Features are encoded as a string of the form -/// "+attr1,+attr2,-attr3,...,+attrN" -/// A comma separates each feature from the next (all lowercase.) -/// Each of the remaining features is prefixed with + or - indicating whether -/// that feature should be enabled or disabled contrary to the cpu -/// specification. -/// - -class SubtargetFeatures { - std::vector Features; // Subtarget features as a vector -public: - explicit SubtargetFeatures(StringRef Initial = ""); - - /// Features string accessors. - std::string getString() const; - - /// Adding Features. - void AddFeature(StringRef String, bool Enable = true); - - /// ToggleFeature - Toggle a feature and update the feature bits. - static void ToggleFeature(FeatureBitset &Bits, StringRef String, - ArrayRef FeatureTable); - - /// Apply the feature flag and update the feature bits. - static void ApplyFeatureFlag(FeatureBitset &Bits, StringRef Feature, - ArrayRef FeatureTable); - - /// Get feature bits of a CPU. - FeatureBitset getFeatureBits(StringRef CPU, - ArrayRef CPUTable, - ArrayRef FeatureTable); - - /// Print feature string. - void print(raw_ostream &OS) const; - - // Dump feature info. - void dump() const; - - /// Adds the default features for the specified target triple. - void getDefaultSubtargetFeatures(const Triple& Triple); -}; - -} // End namespace llvm - -#endif diff --git a/llvm/include/llvm/Object/Archive.h b/llvm/include/llvm/Object/Archive.h deleted file mode 100644 index cfba2567..00000000 --- a/llvm/include/llvm/Object/Archive.h +++ /dev/null @@ -1,245 +0,0 @@ -//===- Archive.h - ar archive file format -----------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the ar archive file format class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_ARCHIVE_H -#define LLVM_OBJECT_ARCHIVE_H - -#include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/Object/Binary.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/ErrorOr.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/MemoryBuffer.h" - -namespace llvm { -namespace object { -struct ArchiveMemberHeader { - char Name[16]; - char LastModified[12]; - char UID[6]; - char GID[6]; - char AccessMode[8]; - char Size[10]; ///< Size of data, not including header or padding. - char Terminator[2]; - - /// Get the name without looking up long names. - llvm::StringRef getName() const; - - /// Members are not larger than 4GB. - ErrorOr getSize() const; - - sys::fs::perms getAccessMode() const; - sys::TimeValue getLastModified() const; - llvm::StringRef getRawLastModified() const { - return StringRef(LastModified, sizeof(LastModified)).rtrim(' '); - } - unsigned getUID() const; - unsigned getGID() const; -}; - -class Archive : public Binary { - virtual void anchor(); -public: - class Child { - friend Archive; - const Archive *Parent; - /// \brief Includes header but not padding byte. - StringRef Data; - /// \brief Offset from Data to the start of the file. - uint16_t StartOfFile; - - const ArchiveMemberHeader *getHeader() const { - return reinterpret_cast(Data.data()); - } - - bool isThinMember() const; - - public: - Child(const Archive *Parent, const char *Start, std::error_code *EC); - Child(const Archive *Parent, StringRef Data, uint16_t StartOfFile); - - bool operator ==(const Child &other) const { - assert(Parent == other.Parent); - return Data.begin() == other.Data.begin(); - } - - const Archive *getParent() const { return Parent; } - ErrorOr getNext() const; - - ErrorOr getName() const; - ErrorOr getFullName() const; - StringRef getRawName() const { return getHeader()->getName(); } - sys::TimeValue getLastModified() const { - return getHeader()->getLastModified(); - } - StringRef getRawLastModified() const { - return getHeader()->getRawLastModified(); - } - unsigned getUID() const { return getHeader()->getUID(); } - unsigned getGID() const { return getHeader()->getGID(); } - sys::fs::perms getAccessMode() const { - return getHeader()->getAccessMode(); - } - /// \return the size of the archive member without the header or padding. - ErrorOr getSize() const; - /// \return the size in the archive header for this member. - ErrorOr getRawSize() const; - - ErrorOr getBuffer() const; - uint64_t getChildOffset() const; - - ErrorOr getMemoryBufferRef() const; - - Expected> - getAsBinary(LLVMContext *Context = nullptr) const; - }; - - class child_iterator { - Child C; - Error *E; - - public: - child_iterator() : C(Child(nullptr, nullptr, nullptr)), E(nullptr) {} - child_iterator(const Child &C, Error *E) : C(C), E(E) {} - const Child *operator->() const { return &C; } - const Child &operator*() const { return C; } - - bool operator==(const child_iterator &other) const { - // Ignore errors here: If an error occurred during increment then getNext - // will have been set to child_end(), and the following comparison should - // do the right thing. - return C == other.C; - } - - bool operator!=(const child_iterator &other) const { - return !(*this == other); - } - - // Code in loops with child_iterators must check for errors on each loop - // iteration. And if there is an error break out of the loop. - child_iterator &operator++() { // Preincrement - assert(E && "Can't increment iterator with no Error attached"); - if (auto ChildOrErr = C.getNext()) - C = *ChildOrErr; - else { - ErrorAsOutParameter ErrAsOutParam(*E); - C = C.getParent()->child_end().C; - *E = errorCodeToError(ChildOrErr.getError()); - E = nullptr; - } - return *this; - } - }; - - class Symbol { - const Archive *Parent; - uint32_t SymbolIndex; - uint32_t StringIndex; // Extra index to the string. - - public: - bool operator ==(const Symbol &other) const { - return (Parent == other.Parent) && (SymbolIndex == other.SymbolIndex); - } - - Symbol(const Archive *p, uint32_t symi, uint32_t stri) - : Parent(p) - , SymbolIndex(symi) - , StringIndex(stri) {} - StringRef getName() const; - ErrorOr getMember() const; - Symbol getNext() const; - }; - - class symbol_iterator { - Symbol symbol; - public: - symbol_iterator(const Symbol &s) : symbol(s) {} - const Symbol *operator->() const { return &symbol; } - const Symbol &operator*() const { return symbol; } - - bool operator==(const symbol_iterator &other) const { - return symbol == other.symbol; - } - - bool operator!=(const symbol_iterator &other) const { - return !(*this == other); - } - - symbol_iterator& operator++() { // Preincrement - symbol = symbol.getNext(); - return *this; - } - }; - - Archive(MemoryBufferRef Source, Error &Err); - static Expected> create(MemoryBufferRef Source); - - enum Kind { - K_GNU, - K_MIPS64, - K_BSD, - K_DARWIN64, - K_COFF - }; - - Kind kind() const { return (Kind)Format; } - bool isThin() const { return IsThin; } - - child_iterator child_begin(Error &Err, bool SkipInternal = true) const; - child_iterator child_end() const; - iterator_range children(Error &Err, - bool SkipInternal = true) const { - return make_range(child_begin(Err, SkipInternal), child_end()); - } - - symbol_iterator symbol_begin() const; - symbol_iterator symbol_end() const; - iterator_range symbols() const { - return make_range(symbol_begin(), symbol_end()); - } - - // Cast methods. - static inline bool classof(Binary const *v) { - return v->isArchive(); - } - - // check if a symbol is in the archive - Expected> findSym(StringRef name) const; - - bool hasSymbolTable() const; - StringRef getSymbolTable() const { return SymbolTable; } - uint32_t getNumberOfSymbols() const; - - std::vector> takeThinBuffers() { - return std::move(ThinBuffers); - } - -private: - StringRef SymbolTable; - StringRef StringTable; - - StringRef FirstRegularData; - uint16_t FirstRegularStartOfFile = -1; - void setFirstRegular(const Child &C); - - unsigned Format : 3; - unsigned IsThin : 1; - mutable std::vector> ThinBuffers; -}; - -} -} - -#endif diff --git a/llvm/include/llvm/Object/ArchiveWriter.h b/llvm/include/llvm/Object/ArchiveWriter.h deleted file mode 100644 index 55b58fac..00000000 --- a/llvm/include/llvm/Object/ArchiveWriter.h +++ /dev/null @@ -1,55 +0,0 @@ -//===- ArchiveWriter.h - ar archive file format writer ----------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// Declares the writeArchive function for writing an archive file. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_ARCHIVEWRITER_H -#define LLVM_OBJECT_ARCHIVEWRITER_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/Object/Archive.h" -#include "llvm/Support/FileSystem.h" - -namespace llvm { - -struct NewArchiveMember { - std::unique_ptr Buf; - sys::TimeValue ModTime = sys::TimeValue::PosixZeroTime(); - unsigned UID = 0, GID = 0, Perms = 0644; - - NewArchiveMember() = default; - NewArchiveMember(NewArchiveMember &&Other) - : Buf(std::move(Other.Buf)), ModTime(Other.ModTime), UID(Other.UID), - GID(Other.GID), Perms(Other.Perms) {} - NewArchiveMember &operator=(NewArchiveMember &&Other) { - Buf = std::move(Other.Buf); - ModTime = Other.ModTime; - UID = Other.UID; - GID = Other.GID; - Perms = Other.Perms; - return *this; - } - NewArchiveMember(MemoryBufferRef BufRef); - - static Expected - getOldMember(const object::Archive::Child &OldMember, bool Deterministic); - - static Expected getFile(StringRef FileName, - bool Deterministic); -}; - -std::pair -writeArchive(StringRef ArcName, std::vector &NewMembers, - bool WriteSymtab, object::Archive::Kind Kind, bool Deterministic, - bool Thin, std::unique_ptr OldArchiveBuf = nullptr); -} - -#endif diff --git a/llvm/include/llvm/Object/Binary.h b/llvm/include/llvm/Object/Binary.h deleted file mode 100644 index 5dff5406..00000000 --- a/llvm/include/llvm/Object/Binary.h +++ /dev/null @@ -1,192 +0,0 @@ -//===- Binary.h - A generic binary file -------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the Binary class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_BINARY_H -#define LLVM_OBJECT_BINARY_H - -#include "llvm/Object/Error.h" -#include "llvm/Support/ErrorOr.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/MemoryBuffer.h" - -namespace llvm { - -class LLVMContext; -class StringRef; - -namespace object { - -class Binary { -private: - Binary() = delete; - Binary(const Binary &other) = delete; - - unsigned int TypeID; - -protected: - MemoryBufferRef Data; - - Binary(unsigned int Type, MemoryBufferRef Source); - - enum { - ID_Archive, - ID_MachOUniversalBinary, - ID_COFFImportFile, - ID_IR, // LLVM IR - ID_ModuleSummaryIndex, // Module summary index - - // Object and children. - ID_StartObjects, - ID_COFF, - - ID_ELF32L, // ELF 32-bit, little endian - ID_ELF32B, // ELF 32-bit, big endian - ID_ELF64L, // ELF 64-bit, little endian - ID_ELF64B, // ELF 64-bit, big endian - - ID_MachO32L, // MachO 32-bit, little endian - ID_MachO32B, // MachO 32-bit, big endian - ID_MachO64L, // MachO 64-bit, little endian - ID_MachO64B, // MachO 64-bit, big endian - - ID_EndObjects - }; - - static inline unsigned int getELFType(bool isLE, bool is64Bits) { - if (isLE) - return is64Bits ? ID_ELF64L : ID_ELF32L; - else - return is64Bits ? ID_ELF64B : ID_ELF32B; - } - - static unsigned int getMachOType(bool isLE, bool is64Bits) { - if (isLE) - return is64Bits ? ID_MachO64L : ID_MachO32L; - else - return is64Bits ? ID_MachO64B : ID_MachO32B; - } - -public: - virtual ~Binary(); - - StringRef getData() const; - StringRef getFileName() const; - MemoryBufferRef getMemoryBufferRef() const; - - // Cast methods. - unsigned int getType() const { return TypeID; } - - // Convenience methods - bool isObject() const { - return TypeID > ID_StartObjects && TypeID < ID_EndObjects; - } - - bool isSymbolic() const { - return isIR() || isObject(); - } - - bool isArchive() const { - return TypeID == ID_Archive; - } - - bool isMachOUniversalBinary() const { - return TypeID == ID_MachOUniversalBinary; - } - - bool isELF() const { - return TypeID >= ID_ELF32L && TypeID <= ID_ELF64B; - } - - bool isMachO() const { - return TypeID >= ID_MachO32L && TypeID <= ID_MachO64B; - } - - bool isCOFF() const { - return TypeID == ID_COFF; - } - - bool isCOFFImportFile() const { - return TypeID == ID_COFFImportFile; - } - - bool isIR() const { - return TypeID == ID_IR; - } - - bool isModuleSummaryIndex() const { return TypeID == ID_ModuleSummaryIndex; } - - bool isLittleEndian() const { - return !(TypeID == ID_ELF32B || TypeID == ID_ELF64B || - TypeID == ID_MachO32B || TypeID == ID_MachO64B); - } -}; - -/// @brief Create a Binary from Source, autodetecting the file type. -/// -/// @param Source The data to create the Binary from. -Expected> createBinary(MemoryBufferRef Source, - LLVMContext *Context = nullptr); - -template class OwningBinary { - std::unique_ptr Bin; - std::unique_ptr Buf; - -public: - OwningBinary(); - OwningBinary(std::unique_ptr Bin, std::unique_ptr Buf); - OwningBinary(OwningBinary&& Other); - OwningBinary &operator=(OwningBinary &&Other); - - std::pair, std::unique_ptr> takeBinary(); - - T* getBinary(); - const T* getBinary() const; -}; - -template -OwningBinary::OwningBinary(std::unique_ptr Bin, - std::unique_ptr Buf) - : Bin(std::move(Bin)), Buf(std::move(Buf)) {} - -template OwningBinary::OwningBinary() {} - -template -OwningBinary::OwningBinary(OwningBinary &&Other) - : Bin(std::move(Other.Bin)), Buf(std::move(Other.Buf)) {} - -template -OwningBinary &OwningBinary::operator=(OwningBinary &&Other) { - Bin = std::move(Other.Bin); - Buf = std::move(Other.Buf); - return *this; -} - -template -std::pair, std::unique_ptr> -OwningBinary::takeBinary() { - return std::make_pair(std::move(Bin), std::move(Buf)); -} - -template T* OwningBinary::getBinary() { - return Bin.get(); -} - -template const T* OwningBinary::getBinary() const { - return Bin.get(); -} - -Expected> createBinary(StringRef Path); -} -} - -#endif diff --git a/llvm/include/llvm/Object/COFF.h b/llvm/include/llvm/Object/COFF.h deleted file mode 100644 index dcc58b06..00000000 --- a/llvm/include/llvm/Object/COFF.h +++ /dev/null @@ -1,1041 +0,0 @@ -//===- COFF.h - COFF object file implementation -----------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the COFFObjectFile class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_COFF_H -#define LLVM_OBJECT_COFF_H - -#include "llvm/ADT/PointerUnion.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Support/COFF.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/ErrorOr.h" - -namespace llvm { -template class ArrayRef; - -namespace object { -class ImportDirectoryEntryRef; -class DelayImportDirectoryEntryRef; -class ExportDirectoryEntryRef; -class ImportedSymbolRef; -class BaseRelocRef; -typedef content_iterator import_directory_iterator; -typedef content_iterator - delay_import_directory_iterator; -typedef content_iterator export_directory_iterator; -typedef content_iterator imported_symbol_iterator; -typedef content_iterator base_reloc_iterator; - -/// The DOS compatible header at the front of all PE/COFF executables. -struct dos_header { - char Magic[2]; - support::ulittle16_t UsedBytesInTheLastPage; - support::ulittle16_t FileSizeInPages; - support::ulittle16_t NumberOfRelocationItems; - support::ulittle16_t HeaderSizeInParagraphs; - support::ulittle16_t MinimumExtraParagraphs; - support::ulittle16_t MaximumExtraParagraphs; - support::ulittle16_t InitialRelativeSS; - support::ulittle16_t InitialSP; - support::ulittle16_t Checksum; - support::ulittle16_t InitialIP; - support::ulittle16_t InitialRelativeCS; - support::ulittle16_t AddressOfRelocationTable; - support::ulittle16_t OverlayNumber; - support::ulittle16_t Reserved[4]; - support::ulittle16_t OEMid; - support::ulittle16_t OEMinfo; - support::ulittle16_t Reserved2[10]; - support::ulittle32_t AddressOfNewExeHeader; -}; - -struct coff_file_header { - support::ulittle16_t Machine; - support::ulittle16_t NumberOfSections; - support::ulittle32_t TimeDateStamp; - support::ulittle32_t PointerToSymbolTable; - support::ulittle32_t NumberOfSymbols; - support::ulittle16_t SizeOfOptionalHeader; - support::ulittle16_t Characteristics; - - bool isImportLibrary() const { return NumberOfSections == 0xffff; } -}; - -struct coff_bigobj_file_header { - support::ulittle16_t Sig1; - support::ulittle16_t Sig2; - support::ulittle16_t Version; - support::ulittle16_t Machine; - support::ulittle32_t TimeDateStamp; - uint8_t UUID[16]; - support::ulittle32_t unused1; - support::ulittle32_t unused2; - support::ulittle32_t unused3; - support::ulittle32_t unused4; - support::ulittle32_t NumberOfSections; - support::ulittle32_t PointerToSymbolTable; - support::ulittle32_t NumberOfSymbols; -}; - -/// The 32-bit PE header that follows the COFF header. -struct pe32_header { - support::ulittle16_t Magic; - uint8_t MajorLinkerVersion; - uint8_t MinorLinkerVersion; - support::ulittle32_t SizeOfCode; - support::ulittle32_t SizeOfInitializedData; - support::ulittle32_t SizeOfUninitializedData; - support::ulittle32_t AddressOfEntryPoint; - support::ulittle32_t BaseOfCode; - support::ulittle32_t BaseOfData; - support::ulittle32_t ImageBase; - support::ulittle32_t SectionAlignment; - support::ulittle32_t FileAlignment; - support::ulittle16_t MajorOperatingSystemVersion; - support::ulittle16_t MinorOperatingSystemVersion; - support::ulittle16_t MajorImageVersion; - support::ulittle16_t MinorImageVersion; - support::ulittle16_t MajorSubsystemVersion; - support::ulittle16_t MinorSubsystemVersion; - support::ulittle32_t Win32VersionValue; - support::ulittle32_t SizeOfImage; - support::ulittle32_t SizeOfHeaders; - support::ulittle32_t CheckSum; - support::ulittle16_t Subsystem; - // FIXME: This should be DllCharacteristics. - support::ulittle16_t DLLCharacteristics; - support::ulittle32_t SizeOfStackReserve; - support::ulittle32_t SizeOfStackCommit; - support::ulittle32_t SizeOfHeapReserve; - support::ulittle32_t SizeOfHeapCommit; - support::ulittle32_t LoaderFlags; - // FIXME: This should be NumberOfRvaAndSizes. - support::ulittle32_t NumberOfRvaAndSize; -}; - -/// The 64-bit PE header that follows the COFF header. -struct pe32plus_header { - support::ulittle16_t Magic; - uint8_t MajorLinkerVersion; - uint8_t MinorLinkerVersion; - support::ulittle32_t SizeOfCode; - support::ulittle32_t SizeOfInitializedData; - support::ulittle32_t SizeOfUninitializedData; - support::ulittle32_t AddressOfEntryPoint; - support::ulittle32_t BaseOfCode; - support::ulittle64_t ImageBase; - support::ulittle32_t SectionAlignment; - support::ulittle32_t FileAlignment; - support::ulittle16_t MajorOperatingSystemVersion; - support::ulittle16_t MinorOperatingSystemVersion; - support::ulittle16_t MajorImageVersion; - support::ulittle16_t MinorImageVersion; - support::ulittle16_t MajorSubsystemVersion; - support::ulittle16_t MinorSubsystemVersion; - support::ulittle32_t Win32VersionValue; - support::ulittle32_t SizeOfImage; - support::ulittle32_t SizeOfHeaders; - support::ulittle32_t CheckSum; - support::ulittle16_t Subsystem; - support::ulittle16_t DLLCharacteristics; - support::ulittle64_t SizeOfStackReserve; - support::ulittle64_t SizeOfStackCommit; - support::ulittle64_t SizeOfHeapReserve; - support::ulittle64_t SizeOfHeapCommit; - support::ulittle32_t LoaderFlags; - support::ulittle32_t NumberOfRvaAndSize; -}; - -struct data_directory { - support::ulittle32_t RelativeVirtualAddress; - support::ulittle32_t Size; -}; - -struct import_directory_table_entry { - support::ulittle32_t ImportLookupTableRVA; - support::ulittle32_t TimeDateStamp; - support::ulittle32_t ForwarderChain; - support::ulittle32_t NameRVA; - support::ulittle32_t ImportAddressTableRVA; -}; - -struct debug_directory { - support::ulittle32_t Characteristics; - support::ulittle32_t TimeDateStamp; - support::ulittle16_t MajorVersion; - support::ulittle16_t MinorVersion; - support::ulittle32_t Type; - support::ulittle32_t SizeOfData; - support::ulittle32_t AddressOfRawData; - support::ulittle32_t PointerToRawData; -}; - -/// Information that is resent in debug_directory::AddressOfRawData if Type is -/// IMAGE_DEBUG_TYPE_CODEVIEW. -struct debug_pdb_info { - support::ulittle32_t Signature; - uint8_t Guid[16]; - support::ulittle32_t Age; - // PDBFileName: The null-terminated PDB file name follows. -}; - -template -struct import_lookup_table_entry { - IntTy Data; - - bool isOrdinal() const { return Data < 0; } - - uint16_t getOrdinal() const { - assert(isOrdinal() && "ILT entry is not an ordinal!"); - return Data & 0xFFFF; - } - - uint32_t getHintNameRVA() const { - assert(!isOrdinal() && "ILT entry is not a Hint/Name RVA!"); - return Data & 0xFFFFFFFF; - } -}; - -typedef import_lookup_table_entry - import_lookup_table_entry32; -typedef import_lookup_table_entry - import_lookup_table_entry64; - -struct delay_import_directory_table_entry { - // dumpbin reports this field as "Characteristics" instead of "Attributes". - support::ulittle32_t Attributes; - support::ulittle32_t Name; - support::ulittle32_t ModuleHandle; - support::ulittle32_t DelayImportAddressTable; - support::ulittle32_t DelayImportNameTable; - support::ulittle32_t BoundDelayImportTable; - support::ulittle32_t UnloadDelayImportTable; - support::ulittle32_t TimeStamp; -}; - -struct export_directory_table_entry { - support::ulittle32_t ExportFlags; - support::ulittle32_t TimeDateStamp; - support::ulittle16_t MajorVersion; - support::ulittle16_t MinorVersion; - support::ulittle32_t NameRVA; - support::ulittle32_t OrdinalBase; - support::ulittle32_t AddressTableEntries; - support::ulittle32_t NumberOfNamePointers; - support::ulittle32_t ExportAddressTableRVA; - support::ulittle32_t NamePointerRVA; - support::ulittle32_t OrdinalTableRVA; -}; - -union export_address_table_entry { - support::ulittle32_t ExportRVA; - support::ulittle32_t ForwarderRVA; -}; - -typedef support::ulittle32_t export_name_pointer_table_entry; -typedef support::ulittle16_t export_ordinal_table_entry; - -struct StringTableOffset { - support::ulittle32_t Zeroes; - support::ulittle32_t Offset; -}; - -template -struct coff_symbol { - union { - char ShortName[COFF::NameSize]; - StringTableOffset Offset; - } Name; - - support::ulittle32_t Value; - SectionNumberType SectionNumber; - - support::ulittle16_t Type; - - uint8_t StorageClass; - uint8_t NumberOfAuxSymbols; -}; - -typedef coff_symbol coff_symbol16; -typedef coff_symbol coff_symbol32; - -// Contains only common parts of coff_symbol16 and coff_symbol32. -struct coff_symbol_generic { - union { - char ShortName[COFF::NameSize]; - StringTableOffset Offset; - } Name; - support::ulittle32_t Value; -}; - -class COFFSymbolRef { -public: - COFFSymbolRef(const coff_symbol16 *CS) : CS16(CS), CS32(nullptr) {} - COFFSymbolRef(const coff_symbol32 *CS) : CS16(nullptr), CS32(CS) {} - COFFSymbolRef() : CS16(nullptr), CS32(nullptr) {} - - const void *getRawPtr() const { - return CS16 ? static_cast(CS16) : CS32; - } - - const coff_symbol_generic *getGeneric() const { - if (CS16) - return reinterpret_cast(CS16); - return reinterpret_cast(CS32); - } - - friend bool operator<(COFFSymbolRef A, COFFSymbolRef B) { - return A.getRawPtr() < B.getRawPtr(); - } - - bool isBigObj() const { - if (CS16) - return false; - if (CS32) - return true; - llvm_unreachable("COFFSymbolRef points to nothing!"); - } - - const char *getShortName() const { - return CS16 ? CS16->Name.ShortName : CS32->Name.ShortName; - } - - const StringTableOffset &getStringTableOffset() const { - assert(isSet() && "COFFSymbolRef points to nothing!"); - return CS16 ? CS16->Name.Offset : CS32->Name.Offset; - } - - uint32_t getValue() const { return CS16 ? CS16->Value : CS32->Value; } - - int32_t getSectionNumber() const { - assert(isSet() && "COFFSymbolRef points to nothing!"); - if (CS16) { - // Reserved sections are returned as negative numbers. - if (CS16->SectionNumber <= COFF::MaxNumberOfSections16) - return CS16->SectionNumber; - return static_cast(CS16->SectionNumber); - } - return static_cast(CS32->SectionNumber); - } - - uint16_t getType() const { - assert(isSet() && "COFFSymbolRef points to nothing!"); - return CS16 ? CS16->Type : CS32->Type; - } - - uint8_t getStorageClass() const { - assert(isSet() && "COFFSymbolRef points to nothing!"); - return CS16 ? CS16->StorageClass : CS32->StorageClass; - } - - uint8_t getNumberOfAuxSymbols() const { - assert(isSet() && "COFFSymbolRef points to nothing!"); - return CS16 ? CS16->NumberOfAuxSymbols : CS32->NumberOfAuxSymbols; - } - - uint8_t getBaseType() const { return getType() & 0x0F; } - - uint8_t getComplexType() const { - return (getType() & 0xF0) >> COFF::SCT_COMPLEX_TYPE_SHIFT; - } - - bool isAbsolute() const { - return getSectionNumber() == -1; - } - - bool isExternal() const { - return getStorageClass() == COFF::IMAGE_SYM_CLASS_EXTERNAL; - } - - bool isCommon() const { - return isExternal() && getSectionNumber() == COFF::IMAGE_SYM_UNDEFINED && - getValue() != 0; - } - - bool isUndefined() const { - return isExternal() && getSectionNumber() == COFF::IMAGE_SYM_UNDEFINED && - getValue() == 0; - } - - bool isWeakExternal() const { - return getStorageClass() == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL; - } - - bool isFunctionDefinition() const { - return isExternal() && getBaseType() == COFF::IMAGE_SYM_TYPE_NULL && - getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION && - !COFF::isReservedSectionNumber(getSectionNumber()); - } - - bool isFunctionLineInfo() const { - return getStorageClass() == COFF::IMAGE_SYM_CLASS_FUNCTION; - } - - bool isAnyUndefined() const { - return isUndefined() || isWeakExternal(); - } - - bool isFileRecord() const { - return getStorageClass() == COFF::IMAGE_SYM_CLASS_FILE; - } - - bool isSection() const { - return getStorageClass() == COFF::IMAGE_SYM_CLASS_SECTION; - } - - bool isSectionDefinition() const { - // C++/CLI creates external ABS symbols for non-const appdomain globals. - // These are also followed by an auxiliary section definition. - bool isAppdomainGlobal = - getStorageClass() == COFF::IMAGE_SYM_CLASS_EXTERNAL && - getSectionNumber() == COFF::IMAGE_SYM_ABSOLUTE; - bool isOrdinarySection = getStorageClass() == COFF::IMAGE_SYM_CLASS_STATIC; - if (!getNumberOfAuxSymbols()) - return false; - return isAppdomainGlobal || isOrdinarySection; - } - - bool isCLRToken() const { - return getStorageClass() == COFF::IMAGE_SYM_CLASS_CLR_TOKEN; - } - -private: - bool isSet() const { return CS16 || CS32; } - - const coff_symbol16 *CS16; - const coff_symbol32 *CS32; -}; - -struct coff_section { - char Name[COFF::NameSize]; - support::ulittle32_t VirtualSize; - support::ulittle32_t VirtualAddress; - support::ulittle32_t SizeOfRawData; - support::ulittle32_t PointerToRawData; - support::ulittle32_t PointerToRelocations; - support::ulittle32_t PointerToLinenumbers; - support::ulittle16_t NumberOfRelocations; - support::ulittle16_t NumberOfLinenumbers; - support::ulittle32_t Characteristics; - - // Returns true if the actual number of relocations is stored in - // VirtualAddress field of the first relocation table entry. - bool hasExtendedRelocations() const { - return (Characteristics & COFF::IMAGE_SCN_LNK_NRELOC_OVFL) && - NumberOfRelocations == UINT16_MAX; - } - uint32_t getAlignment() const { - // The IMAGE_SCN_TYPE_NO_PAD bit is a legacy way of getting to - // IMAGE_SCN_ALIGN_1BYTES. - if (Characteristics & COFF::IMAGE_SCN_TYPE_NO_PAD) - return 1; - - // Bit [20:24] contains section alignment. Both 0 and 1 mean alignment 1. - uint32_t Shift = (Characteristics >> 20) & 0xF; - if (Shift > 0) - return 1U << (Shift - 1); - return 1; - } -}; - -struct coff_relocation { - support::ulittle32_t VirtualAddress; - support::ulittle32_t SymbolTableIndex; - support::ulittle16_t Type; -}; - -struct coff_aux_function_definition { - support::ulittle32_t TagIndex; - support::ulittle32_t TotalSize; - support::ulittle32_t PointerToLinenumber; - support::ulittle32_t PointerToNextFunction; - char Unused1[2]; -}; - -static_assert(sizeof(coff_aux_function_definition) == 18, - "auxiliary entry must be 18 bytes"); - -struct coff_aux_bf_and_ef_symbol { - char Unused1[4]; - support::ulittle16_t Linenumber; - char Unused2[6]; - support::ulittle32_t PointerToNextFunction; - char Unused3[2]; -}; - -static_assert(sizeof(coff_aux_bf_and_ef_symbol) == 18, - "auxiliary entry must be 18 bytes"); - -struct coff_aux_weak_external { - support::ulittle32_t TagIndex; - support::ulittle32_t Characteristics; - char Unused1[10]; -}; - -static_assert(sizeof(coff_aux_weak_external) == 18, - "auxiliary entry must be 18 bytes"); - -struct coff_aux_section_definition { - support::ulittle32_t Length; - support::ulittle16_t NumberOfRelocations; - support::ulittle16_t NumberOfLinenumbers; - support::ulittle32_t CheckSum; - support::ulittle16_t NumberLowPart; - uint8_t Selection; - uint8_t Unused; - support::ulittle16_t NumberHighPart; - int32_t getNumber(bool IsBigObj) const { - uint32_t Number = static_cast(NumberLowPart); - if (IsBigObj) - Number |= static_cast(NumberHighPart) << 16; - return static_cast(Number); - } -}; - -static_assert(sizeof(coff_aux_section_definition) == 18, - "auxiliary entry must be 18 bytes"); - -struct coff_aux_clr_token { - uint8_t AuxType; - uint8_t Reserved; - support::ulittle32_t SymbolTableIndex; - char MBZ[12]; -}; - -static_assert(sizeof(coff_aux_clr_token) == 18, - "auxiliary entry must be 18 bytes"); - -struct coff_import_header { - support::ulittle16_t Sig1; - support::ulittle16_t Sig2; - support::ulittle16_t Version; - support::ulittle16_t Machine; - support::ulittle32_t TimeDateStamp; - support::ulittle32_t SizeOfData; - support::ulittle16_t OrdinalHint; - support::ulittle16_t TypeInfo; - int getType() const { return TypeInfo & 0x3; } - int getNameType() const { return (TypeInfo >> 2) & 0x7; } -}; - -struct coff_import_directory_table_entry { - support::ulittle32_t ImportLookupTableRVA; - support::ulittle32_t TimeDateStamp; - support::ulittle32_t ForwarderChain; - support::ulittle32_t NameRVA; - support::ulittle32_t ImportAddressTableRVA; -}; - -template -struct coff_tls_directory { - IntTy StartAddressOfRawData; - IntTy EndAddressOfRawData; - IntTy AddressOfIndex; - IntTy AddressOfCallBacks; - support::ulittle32_t SizeOfZeroFill; - support::ulittle32_t Characteristics; - uint32_t getAlignment() const { - // Bit [20:24] contains section alignment. - uint32_t Shift = (Characteristics & 0x00F00000) >> 20; - if (Shift > 0) - return 1U << (Shift - 1); - return 0; - } -}; - -typedef coff_tls_directory coff_tls_directory32; -typedef coff_tls_directory coff_tls_directory64; - -struct coff_load_configuration32 { - support::ulittle32_t Characteristics; - support::ulittle32_t TimeDateStamp; - support::ulittle16_t MajorVersion; - support::ulittle16_t MinorVersion; - support::ulittle32_t GlobalFlagsClear; - support::ulittle32_t GlobalFlagsSet; - support::ulittle32_t CriticalSectionDefaultTimeout; - support::ulittle32_t DeCommitFreeBlockThreshold; - support::ulittle32_t DeCommitTotalFreeThreshold; - support::ulittle32_t LockPrefixTable; - support::ulittle32_t MaximumAllocationSize; - support::ulittle32_t VirtualMemoryThreshold; - support::ulittle32_t ProcessAffinityMask; - support::ulittle32_t ProcessHeapFlags; - support::ulittle16_t CSDVersion; - support::ulittle16_t Reserved; - support::ulittle32_t EditList; - support::ulittle32_t SecurityCookie; - support::ulittle32_t SEHandlerTable; - support::ulittle32_t SEHandlerCount; -}; - -struct coff_load_configuration64 { - support::ulittle32_t Characteristics; - support::ulittle32_t TimeDateStamp; - support::ulittle16_t MajorVersion; - support::ulittle16_t MinorVersion; - support::ulittle32_t GlobalFlagsClear; - support::ulittle32_t GlobalFlagsSet; - support::ulittle32_t CriticalSectionDefaultTimeout; - support::ulittle32_t DeCommitFreeBlockThreshold; - support::ulittle32_t DeCommitTotalFreeThreshold; - support::ulittle32_t LockPrefixTable; - support::ulittle32_t MaximumAllocationSize; - support::ulittle32_t VirtualMemoryThreshold; - support::ulittle32_t ProcessAffinityMask; - support::ulittle32_t ProcessHeapFlags; - support::ulittle16_t CSDVersion; - support::ulittle16_t Reserved; - support::ulittle32_t EditList; - support::ulittle64_t SecurityCookie; - support::ulittle64_t SEHandlerTable; - support::ulittle64_t SEHandlerCount; -}; - -struct coff_runtime_function_x64 { - support::ulittle32_t BeginAddress; - support::ulittle32_t EndAddress; - support::ulittle32_t UnwindInformation; -}; - -struct coff_base_reloc_block_header { - support::ulittle32_t PageRVA; - support::ulittle32_t BlockSize; -}; - -struct coff_base_reloc_block_entry { - support::ulittle16_t Data; - int getType() const { return Data >> 12; } - int getOffset() const { return Data & ((1 << 12) - 1); } -}; - -class COFFObjectFile : public ObjectFile { -private: - friend class ImportDirectoryEntryRef; - friend class ExportDirectoryEntryRef; - const coff_file_header *COFFHeader; - const coff_bigobj_file_header *COFFBigObjHeader; - const pe32_header *PE32Header; - const pe32plus_header *PE32PlusHeader; - const data_directory *DataDirectory; - const coff_section *SectionTable; - const coff_symbol16 *SymbolTable16; - const coff_symbol32 *SymbolTable32; - const char *StringTable; - uint32_t StringTableSize; - const import_directory_table_entry *ImportDirectory; - const delay_import_directory_table_entry *DelayImportDirectory; - uint32_t NumberOfDelayImportDirectory; - const export_directory_table_entry *ExportDirectory; - const coff_base_reloc_block_header *BaseRelocHeader; - const coff_base_reloc_block_header *BaseRelocEnd; - const debug_directory *DebugDirectoryBegin; - const debug_directory *DebugDirectoryEnd; - - std::error_code getString(uint32_t offset, StringRef &Res) const; - - template - const coff_symbol_type *toSymb(DataRefImpl Symb) const; - const coff_section *toSec(DataRefImpl Sec) const; - const coff_relocation *toRel(DataRefImpl Rel) const; - - std::error_code initSymbolTablePtr(); - std::error_code initImportTablePtr(); - std::error_code initDelayImportTablePtr(); - std::error_code initExportTablePtr(); - std::error_code initBaseRelocPtr(); - std::error_code initDebugDirectoryPtr(); - -public: - uintptr_t getSymbolTable() const { - if (SymbolTable16) - return reinterpret_cast(SymbolTable16); - if (SymbolTable32) - return reinterpret_cast(SymbolTable32); - return uintptr_t(0); - } - uint16_t getMachine() const { - if (COFFHeader) - return COFFHeader->Machine; - if (COFFBigObjHeader) - return COFFBigObjHeader->Machine; - llvm_unreachable("no COFF header!"); - } - uint16_t getSizeOfOptionalHeader() const { - if (COFFHeader) - return COFFHeader->isImportLibrary() ? 0 - : COFFHeader->SizeOfOptionalHeader; - // bigobj doesn't have this field. - if (COFFBigObjHeader) - return 0; - llvm_unreachable("no COFF header!"); - } - uint16_t getCharacteristics() const { - if (COFFHeader) - return COFFHeader->isImportLibrary() ? 0 : COFFHeader->Characteristics; - // bigobj doesn't have characteristics to speak of, - // editbin will silently lie to you if you attempt to set any. - if (COFFBigObjHeader) - return 0; - llvm_unreachable("no COFF header!"); - } - uint32_t getTimeDateStamp() const { - if (COFFHeader) - return COFFHeader->TimeDateStamp; - if (COFFBigObjHeader) - return COFFBigObjHeader->TimeDateStamp; - llvm_unreachable("no COFF header!"); - } - uint32_t getNumberOfSections() const { - if (COFFHeader) - return COFFHeader->isImportLibrary() ? 0 : COFFHeader->NumberOfSections; - if (COFFBigObjHeader) - return COFFBigObjHeader->NumberOfSections; - llvm_unreachable("no COFF header!"); - } - uint32_t getPointerToSymbolTable() const { - if (COFFHeader) - return COFFHeader->isImportLibrary() ? 0 - : COFFHeader->PointerToSymbolTable; - if (COFFBigObjHeader) - return COFFBigObjHeader->PointerToSymbolTable; - llvm_unreachable("no COFF header!"); - } - uint32_t getNumberOfSymbols() const { - if (COFFHeader) - return COFFHeader->isImportLibrary() ? 0 : COFFHeader->NumberOfSymbols; - if (COFFBigObjHeader) - return COFFBigObjHeader->NumberOfSymbols; - llvm_unreachable("no COFF header!"); - } -protected: - void moveSymbolNext(DataRefImpl &Symb) const override; - Expected getSymbolName(DataRefImpl Symb) const override; - Expected getSymbolAddress(DataRefImpl Symb) const override; - uint64_t getSymbolValueImpl(DataRefImpl Symb) const override; - uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override; - uint32_t getSymbolFlags(DataRefImpl Symb) const override; - Expected getSymbolType(DataRefImpl Symb) const override; - Expected getSymbolSection(DataRefImpl Symb) const override; - void moveSectionNext(DataRefImpl &Sec) const override; - std::error_code getSectionName(DataRefImpl Sec, - StringRef &Res) const override; - uint64_t getSectionAddress(DataRefImpl Sec) const override; - uint64_t getSectionSize(DataRefImpl Sec) const override; - std::error_code getSectionContents(DataRefImpl Sec, - StringRef &Res) const override; - uint64_t getSectionAlignment(DataRefImpl Sec) const override; - bool isSectionCompressed(DataRefImpl Sec) const override; - bool isSectionText(DataRefImpl Sec) const override; - bool isSectionData(DataRefImpl Sec) const override; - bool isSectionBSS(DataRefImpl Sec) const override; - bool isSectionVirtual(DataRefImpl Sec) const override; - relocation_iterator section_rel_begin(DataRefImpl Sec) const override; - relocation_iterator section_rel_end(DataRefImpl Sec) const override; - - void moveRelocationNext(DataRefImpl &Rel) const override; - uint64_t getRelocationOffset(DataRefImpl Rel) const override; - symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override; - uint64_t getRelocationType(DataRefImpl Rel) const override; - void getRelocationTypeName(DataRefImpl Rel, - SmallVectorImpl &Result) const override; - -public: - COFFObjectFile(MemoryBufferRef Object, std::error_code &EC); - basic_symbol_iterator symbol_begin_impl() const override; - basic_symbol_iterator symbol_end_impl() const override; - section_iterator section_begin() const override; - section_iterator section_end() const override; - - const coff_section *getCOFFSection(const SectionRef &Section) const; - COFFSymbolRef getCOFFSymbol(const DataRefImpl &Ref) const; - COFFSymbolRef getCOFFSymbol(const SymbolRef &Symbol) const; - const coff_relocation *getCOFFRelocation(const RelocationRef &Reloc) const; - unsigned getSectionID(SectionRef Sec) const; - unsigned getSymbolSectionID(SymbolRef Sym) const; - - uint8_t getBytesInAddress() const override; - StringRef getFileFormatName() const override; - unsigned getArch() const override; - SubtargetFeatures getFeatures() const override { return SubtargetFeatures(); } - - import_directory_iterator import_directory_begin() const; - import_directory_iterator import_directory_end() const; - delay_import_directory_iterator delay_import_directory_begin() const; - delay_import_directory_iterator delay_import_directory_end() const; - export_directory_iterator export_directory_begin() const; - export_directory_iterator export_directory_end() const; - base_reloc_iterator base_reloc_begin() const; - base_reloc_iterator base_reloc_end() const; - const debug_directory *debug_directory_begin() const { - return DebugDirectoryBegin; - } - const debug_directory *debug_directory_end() const { - return DebugDirectoryEnd; - } - - iterator_range import_directories() const; - iterator_range - delay_import_directories() const; - iterator_range export_directories() const; - iterator_range base_relocs() const; - iterator_range debug_directories() const { - return make_range(debug_directory_begin(), debug_directory_end()); - } - - const dos_header *getDOSHeader() const { - if (!PE32Header && !PE32PlusHeader) - return nullptr; - return reinterpret_cast(base()); - } - std::error_code getPE32Header(const pe32_header *&Res) const; - std::error_code getPE32PlusHeader(const pe32plus_header *&Res) const; - std::error_code getDataDirectory(uint32_t index, - const data_directory *&Res) const; - std::error_code getSection(int32_t index, const coff_section *&Res) const; - template - std::error_code getSymbol(uint32_t Index, - const coff_symbol_type *&Res) const { - if (Index >= getNumberOfSymbols()) - return object_error::parse_failed; - - Res = reinterpret_cast(getSymbolTable()) + Index; - return std::error_code(); - } - ErrorOr getSymbol(uint32_t index) const { - if (SymbolTable16) { - const coff_symbol16 *Symb = nullptr; - if (std::error_code EC = getSymbol(index, Symb)) - return EC; - return COFFSymbolRef(Symb); - } - if (SymbolTable32) { - const coff_symbol32 *Symb = nullptr; - if (std::error_code EC = getSymbol(index, Symb)) - return EC; - return COFFSymbolRef(Symb); - } - return object_error::parse_failed; - } - template - std::error_code getAuxSymbol(uint32_t index, const T *&Res) const { - ErrorOr s = getSymbol(index); - if (std::error_code EC = s.getError()) - return EC; - Res = reinterpret_cast(s->getRawPtr()); - return std::error_code(); - } - std::error_code getSymbolName(COFFSymbolRef Symbol, StringRef &Res) const; - std::error_code getSymbolName(const coff_symbol_generic *Symbol, - StringRef &Res) const; - - ArrayRef getSymbolAuxData(COFFSymbolRef Symbol) const; - - size_t getSymbolTableEntrySize() const { - if (COFFHeader) - return sizeof(coff_symbol16); - if (COFFBigObjHeader) - return sizeof(coff_symbol32); - llvm_unreachable("null symbol table pointer!"); - } - - iterator_range - getRelocations(const coff_section *Sec) const; - - std::error_code getSectionName(const coff_section *Sec, StringRef &Res) const; - uint64_t getSectionSize(const coff_section *Sec) const; - std::error_code getSectionContents(const coff_section *Sec, - ArrayRef &Res) const; - - uint64_t getImageBase() const; - std::error_code getVaPtr(uint64_t VA, uintptr_t &Res) const; - std::error_code getRvaPtr(uint32_t Rva, uintptr_t &Res) const; - - /// Given an RVA base and size, returns a valid array of bytes or an error - /// code if the RVA and size is not contained completely within a valid - /// section. - std::error_code getRvaAndSizeAsBytes(uint32_t RVA, uint32_t Size, - ArrayRef &Contents) const; - - std::error_code getHintName(uint32_t Rva, uint16_t &Hint, - StringRef &Name) const; - - /// Get PDB information out of a codeview debug directory entry. - std::error_code getDebugPDBInfo(const debug_directory *DebugDir, - const debug_pdb_info *&Info, - StringRef &PDBFileName) const; - - /// Get PDB information from an executable. If the information is not present, - /// Info will be set to nullptr and PDBFileName will be empty. An error is - /// returned only on corrupt object files. Convenience accessor that can be - /// used if the debug directory is not already handy. - std::error_code getDebugPDBInfo(const debug_pdb_info *&Info, - StringRef &PDBFileName) const; - - bool isRelocatableObject() const override; - bool is64() const { return PE32PlusHeader; } - - static inline bool classof(const Binary *v) { return v->isCOFF(); } -}; - -// The iterator for the import directory table. -class ImportDirectoryEntryRef { -public: - ImportDirectoryEntryRef() : OwningObject(nullptr) {} - ImportDirectoryEntryRef(const import_directory_table_entry *Table, uint32_t I, - const COFFObjectFile *Owner) - : ImportTable(Table), Index(I), OwningObject(Owner) {} - - bool operator==(const ImportDirectoryEntryRef &Other) const; - void moveNext(); - - imported_symbol_iterator imported_symbol_begin() const; - imported_symbol_iterator imported_symbol_end() const; - iterator_range imported_symbols() const; - - std::error_code getName(StringRef &Result) const; - std::error_code getImportLookupTableRVA(uint32_t &Result) const; - std::error_code getImportAddressTableRVA(uint32_t &Result) const; - - std::error_code - getImportTableEntry(const import_directory_table_entry *&Result) const; - -private: - const import_directory_table_entry *ImportTable; - uint32_t Index; - const COFFObjectFile *OwningObject; -}; - -class DelayImportDirectoryEntryRef { -public: - DelayImportDirectoryEntryRef() : OwningObject(nullptr) {} - DelayImportDirectoryEntryRef(const delay_import_directory_table_entry *T, - uint32_t I, const COFFObjectFile *Owner) - : Table(T), Index(I), OwningObject(Owner) {} - - bool operator==(const DelayImportDirectoryEntryRef &Other) const; - void moveNext(); - - imported_symbol_iterator imported_symbol_begin() const; - imported_symbol_iterator imported_symbol_end() const; - iterator_range imported_symbols() const; - - std::error_code getName(StringRef &Result) const; - std::error_code getDelayImportTable( - const delay_import_directory_table_entry *&Result) const; - std::error_code getImportAddress(int AddrIndex, uint64_t &Result) const; - -private: - const delay_import_directory_table_entry *Table; - uint32_t Index; - const COFFObjectFile *OwningObject; -}; - -// The iterator for the export directory table entry. -class ExportDirectoryEntryRef { -public: - ExportDirectoryEntryRef() : OwningObject(nullptr) {} - ExportDirectoryEntryRef(const export_directory_table_entry *Table, uint32_t I, - const COFFObjectFile *Owner) - : ExportTable(Table), Index(I), OwningObject(Owner) {} - - bool operator==(const ExportDirectoryEntryRef &Other) const; - void moveNext(); - - std::error_code getDllName(StringRef &Result) const; - std::error_code getOrdinalBase(uint32_t &Result) const; - std::error_code getOrdinal(uint32_t &Result) const; - std::error_code getExportRVA(uint32_t &Result) const; - std::error_code getSymbolName(StringRef &Result) const; - - std::error_code isForwarder(bool &Result) const; - std::error_code getForwardTo(StringRef &Result) const; - -private: - const export_directory_table_entry *ExportTable; - uint32_t Index; - const COFFObjectFile *OwningObject; -}; - -class ImportedSymbolRef { -public: - ImportedSymbolRef() : OwningObject(nullptr) {} - ImportedSymbolRef(const import_lookup_table_entry32 *Entry, uint32_t I, - const COFFObjectFile *Owner) - : Entry32(Entry), Entry64(nullptr), Index(I), OwningObject(Owner) {} - ImportedSymbolRef(const import_lookup_table_entry64 *Entry, uint32_t I, - const COFFObjectFile *Owner) - : Entry32(nullptr), Entry64(Entry), Index(I), OwningObject(Owner) {} - - bool operator==(const ImportedSymbolRef &Other) const; - void moveNext(); - - std::error_code getSymbolName(StringRef &Result) const; - std::error_code isOrdinal(bool &Result) const; - std::error_code getOrdinal(uint16_t &Result) const; - std::error_code getHintNameRVA(uint32_t &Result) const; - -private: - const import_lookup_table_entry32 *Entry32; - const import_lookup_table_entry64 *Entry64; - uint32_t Index; - const COFFObjectFile *OwningObject; -}; - -class BaseRelocRef { -public: - BaseRelocRef() : OwningObject(nullptr) {} - BaseRelocRef(const coff_base_reloc_block_header *Header, - const COFFObjectFile *Owner) - : Header(Header), Index(0), OwningObject(Owner) {} - - bool operator==(const BaseRelocRef &Other) const; - void moveNext(); - - std::error_code getType(uint8_t &Type) const; - std::error_code getRVA(uint32_t &Result) const; - -private: - const coff_base_reloc_block_header *Header; - uint32_t Index; - const COFFObjectFile *OwningObject; -}; - -// Corresponds to `_FPO_DATA` structure in the PE/COFF spec. -struct FpoData { - support::ulittle32_t Offset; // ulOffStart: Offset 1st byte of function code - support::ulittle32_t Size; // cbProcSize: # bytes in function - support::ulittle32_t NumLocals; // cdwLocals: # bytes in locals/4 - support::ulittle16_t NumParams; // cdwParams: # bytes in params/4 - support::ulittle16_t Attributes; - - // cbProlog: # bytes in prolog - int getPrologSize() const { return Attributes & 0xF; } - - // cbRegs: # regs saved - int getNumSavedRegs() const { return (Attributes >> 8) & 0x7; } - - // fHasSEH: true if seh is func - bool hasSEH() const { return (Attributes >> 9) & 1; } - - // fUseBP: true if EBP has been allocated - bool useBP() const { return (Attributes >> 10) & 1; } - - // cbFrame: frame pointer - int getFP() const { return Attributes >> 14; } -}; - -} // end namespace object -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Object/COFFImportFile.h b/llvm/include/llvm/Object/COFFImportFile.h deleted file mode 100644 index b04a44ea..00000000 --- a/llvm/include/llvm/Object/COFFImportFile.h +++ /dev/null @@ -1,74 +0,0 @@ -//===- COFFImportFile.h - COFF short import file implementation -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// COFF short import file is a special kind of file which contains -// only symbol names for DLL-exported symbols. This class implements -// SymbolicFile interface for the file. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_COFF_IMPORT_FILE_H -#define LLVM_OBJECT_COFF_IMPORT_FILE_H - -#include "llvm/Object/COFF.h" -#include "llvm/Object/IRObjectFile.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Object/SymbolicFile.h" -#include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { -namespace object { - -class COFFImportFile : public SymbolicFile { -public: - COFFImportFile(MemoryBufferRef Source) - : SymbolicFile(ID_COFFImportFile, Source) {} - - static inline bool classof(Binary const *V) { return V->isCOFFImportFile(); } - - void moveSymbolNext(DataRefImpl &Symb) const override { ++Symb.p; } - - std::error_code printSymbolName(raw_ostream &OS, - DataRefImpl Symb) const override { - if (Symb.p == 0) - OS << "__imp_"; - OS << StringRef(Data.getBufferStart() + sizeof(coff_import_header)); - return std::error_code(); - } - - uint32_t getSymbolFlags(DataRefImpl Symb) const override { - return SymbolRef::SF_Global; - } - - basic_symbol_iterator symbol_begin_impl() const override { - return BasicSymbolRef(DataRefImpl(), this); - } - - basic_symbol_iterator symbol_end_impl() const override { - DataRefImpl Symb; - Symb.p = isCode() ? 2 : 1; - return BasicSymbolRef(Symb, this); - } - - const coff_import_header *getCOFFImportHeader() const { - return reinterpret_cast( - Data.getBufferStart()); - } - -private: - bool isCode() const { - return getCOFFImportHeader()->getType() == COFF::IMPORT_CODE; - } -}; - -} // namespace object -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/Object/ELF.h b/llvm/include/llvm/Object/ELF.h deleted file mode 100644 index 80b8be03..00000000 --- a/llvm/include/llvm/Object/ELF.h +++ /dev/null @@ -1,512 +0,0 @@ -//===- ELF.h - ELF object file implementation -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the ELFFile template class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_ELF_H -#define LLVM_OBJECT_ELF_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/Object/ELFTypes.h" -#include "llvm/Support/MemoryBuffer.h" - -namespace llvm { -namespace object { - -StringRef getELFRelocationTypeName(uint32_t Machine, uint32_t Type); - -// Subclasses of ELFFile may need this for template instantiation -inline std::pair -getElfArchType(StringRef Object) { - if (Object.size() < ELF::EI_NIDENT) - return std::make_pair((uint8_t)ELF::ELFCLASSNONE, - (uint8_t)ELF::ELFDATANONE); - return std::make_pair((uint8_t)Object[ELF::EI_CLASS], - (uint8_t)Object[ELF::EI_DATA]); -} - -template -class ELFFile { -public: - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - typedef typename std::conditional::type uintX_t; - - typedef Elf_Ehdr_Impl Elf_Ehdr; - typedef Elf_Shdr_Impl Elf_Shdr; - typedef Elf_Sym_Impl Elf_Sym; - typedef Elf_Dyn_Impl Elf_Dyn; - typedef Elf_Phdr_Impl Elf_Phdr; - typedef Elf_Rel_Impl Elf_Rel; - typedef Elf_Rel_Impl Elf_Rela; - typedef Elf_Verdef_Impl Elf_Verdef; - typedef Elf_Verdaux_Impl Elf_Verdaux; - typedef Elf_Verneed_Impl Elf_Verneed; - typedef Elf_Vernaux_Impl Elf_Vernaux; - typedef Elf_Versym_Impl Elf_Versym; - typedef Elf_Hash_Impl Elf_Hash; - typedef Elf_GnuHash_Impl Elf_GnuHash; - typedef typename ELFT::DynRange Elf_Dyn_Range; - typedef typename ELFT::ShdrRange Elf_Shdr_Range; - typedef typename ELFT::SymRange Elf_Sym_Range; - typedef typename ELFT::RelRange Elf_Rel_Range; - typedef typename ELFT::RelaRange Elf_Rela_Range; - typedef typename ELFT::PhdrRange Elf_Phdr_Range; - - const uint8_t *base() const { - return reinterpret_cast(Buf.data()); - } - - size_t getBufSize() const { return Buf.size(); } - -private: - - StringRef Buf; - - const Elf_Ehdr *Header; - const Elf_Shdr *SectionHeaderTable = nullptr; - StringRef DotShstrtab; // Section header string table. - -public: - template - const T *getEntry(uint32_t Section, uint32_t Entry) const; - template - const T *getEntry(const Elf_Shdr *Section, uint32_t Entry) const; - - ErrorOr getStringTable(const Elf_Shdr *Section) const; - ErrorOr getStringTableForSymtab(const Elf_Shdr &Section) const; - - ErrorOr> getSHNDXTable(const Elf_Shdr &Section) const; - - void VerifyStrTab(const Elf_Shdr *sh) const; - - StringRef getRelocationTypeName(uint32_t Type) const; - void getRelocationTypeName(uint32_t Type, - SmallVectorImpl &Result) const; - - /// \brief Get the symbol for a given relocation. - const Elf_Sym *getRelocationSymbol(const Elf_Rel *Rel, - const Elf_Shdr *SymTab) const; - - ELFFile(StringRef Object, std::error_code &EC); - - bool isMipsELF64() const { - return Header->e_machine == ELF::EM_MIPS && - Header->getFileClass() == ELF::ELFCLASS64; - } - - bool isMips64EL() const { - return Header->e_machine == ELF::EM_MIPS && - Header->getFileClass() == ELF::ELFCLASS64 && - Header->getDataEncoding() == ELF::ELFDATA2LSB; - } - - const Elf_Shdr *section_begin() const; - const Elf_Shdr *section_end() const; - Elf_Shdr_Range sections() const { - return makeArrayRef(section_begin(), section_end()); - } - - const Elf_Sym *symbol_begin(const Elf_Shdr *Sec) const { - if (!Sec) - return nullptr; - if (Sec->sh_entsize != sizeof(Elf_Sym)) - report_fatal_error("Invalid symbol size"); - return reinterpret_cast(base() + Sec->sh_offset); - } - const Elf_Sym *symbol_end(const Elf_Shdr *Sec) const { - if (!Sec) - return nullptr; - uint64_t Size = Sec->sh_size; - if (Size % sizeof(Elf_Sym)) - report_fatal_error("Invalid symbol table size"); - return symbol_begin(Sec) + Size / sizeof(Elf_Sym); - } - Elf_Sym_Range symbols(const Elf_Shdr *Sec) const { - return makeArrayRef(symbol_begin(Sec), symbol_end(Sec)); - } - - const Elf_Rela *rela_begin(const Elf_Shdr *sec) const { - if (sec->sh_entsize != sizeof(Elf_Rela)) - report_fatal_error("Invalid relocation entry size"); - return reinterpret_cast(base() + sec->sh_offset); - } - - const Elf_Rela *rela_end(const Elf_Shdr *sec) const { - uint64_t Size = sec->sh_size; - if (Size % sizeof(Elf_Rela)) - report_fatal_error("Invalid relocation table size"); - return rela_begin(sec) + Size / sizeof(Elf_Rela); - } - - Elf_Rela_Range relas(const Elf_Shdr *Sec) const { - return makeArrayRef(rela_begin(Sec), rela_end(Sec)); - } - - const Elf_Rel *rel_begin(const Elf_Shdr *sec) const { - if (sec->sh_entsize != sizeof(Elf_Rel)) - report_fatal_error("Invalid relocation entry size"); - return reinterpret_cast(base() + sec->sh_offset); - } - - const Elf_Rel *rel_end(const Elf_Shdr *sec) const { - uint64_t Size = sec->sh_size; - if (Size % sizeof(Elf_Rel)) - report_fatal_error("Invalid relocation table size"); - return rel_begin(sec) + Size / sizeof(Elf_Rel); - } - - Elf_Rel_Range rels(const Elf_Shdr *Sec) const { - return makeArrayRef(rel_begin(Sec), rel_end(Sec)); - } - - /// \brief Iterate over program header table. - const Elf_Phdr *program_header_begin() const { - if (Header->e_phnum && Header->e_phentsize != sizeof(Elf_Phdr)) - report_fatal_error("Invalid program header size"); - return reinterpret_cast(base() + Header->e_phoff); - } - - const Elf_Phdr *program_header_end() const { - return program_header_begin() + Header->e_phnum; - } - - const Elf_Phdr_Range program_headers() const { - return makeArrayRef(program_header_begin(), program_header_end()); - } - - uint64_t getNumSections() const; - uintX_t getStringTableIndex() const; - uint32_t getExtendedSymbolTableIndex(const Elf_Sym *Sym, - const Elf_Shdr *SymTab, - ArrayRef ShndxTable) const; - uint32_t getExtendedSymbolTableIndex(const Elf_Sym *Sym, - const Elf_Sym *FirstSym, - ArrayRef ShndxTable) const; - const Elf_Ehdr *getHeader() const { return Header; } - ErrorOr getSection(const Elf_Sym *Sym, - const Elf_Shdr *SymTab, - ArrayRef ShndxTable) const; - ErrorOr getSection(uint32_t Index) const; - - const Elf_Sym *getSymbol(const Elf_Shdr *Sec, uint32_t Index) const { - return &*(symbol_begin(Sec) + Index); - } - - ErrorOr getSectionName(const Elf_Shdr *Section) const; - template - ErrorOr> getSectionContentsAsArray(const Elf_Shdr *Sec) const; - ErrorOr > getSectionContents(const Elf_Shdr *Sec) const; -}; - -typedef ELFFile> ELF32LEFile; -typedef ELFFile> ELF64LEFile; -typedef ELFFile> ELF32BEFile; -typedef ELFFile> ELF64BEFile; - -template -uint32_t ELFFile::getExtendedSymbolTableIndex( - const Elf_Sym *Sym, const Elf_Shdr *SymTab, - ArrayRef ShndxTable) const { - return getExtendedSymbolTableIndex(Sym, symbol_begin(SymTab), ShndxTable); -} - -template -uint32_t ELFFile::getExtendedSymbolTableIndex( - const Elf_Sym *Sym, const Elf_Sym *FirstSym, - ArrayRef ShndxTable) const { - assert(Sym->st_shndx == ELF::SHN_XINDEX); - unsigned Index = Sym - FirstSym; - - // The size of the table was checked in getSHNDXTable. - return ShndxTable[Index]; -} - -template -ErrorOr::Elf_Shdr *> -ELFFile::getSection(const Elf_Sym *Sym, const Elf_Shdr *SymTab, - ArrayRef ShndxTable) const { - uint32_t Index = Sym->st_shndx; - if (Index == ELF::SHN_XINDEX) - return getSection(getExtendedSymbolTableIndex(Sym, SymTab, ShndxTable)); - - if (Index == ELF::SHN_UNDEF || Index >= ELF::SHN_LORESERVE) - return nullptr; - return getSection(Sym->st_shndx); -} - -template -template -ErrorOr> -ELFFile::getSectionContentsAsArray(const Elf_Shdr *Sec) const { - uintX_t Offset = Sec->sh_offset; - uintX_t Size = Sec->sh_size; - - if (Size % sizeof(T)) - return object_error::parse_failed; - if (Offset + Size > Buf.size()) - return object_error::parse_failed; - - const T *Start = reinterpret_cast(base() + Offset); - return makeArrayRef(Start, Size / sizeof(T)); -} - -template -ErrorOr> -ELFFile::getSectionContents(const Elf_Shdr *Sec) const { - return getSectionContentsAsArray(Sec); -} - -template -StringRef ELFFile::getRelocationTypeName(uint32_t Type) const { - return getELFRelocationTypeName(Header->e_machine, Type); -} - -template -void ELFFile::getRelocationTypeName(uint32_t Type, - SmallVectorImpl &Result) const { - if (!isMipsELF64()) { - StringRef Name = getRelocationTypeName(Type); - Result.append(Name.begin(), Name.end()); - } else { - // The Mips N64 ABI allows up to three operations to be specified per - // relocation record. Unfortunately there's no easy way to test for the - // presence of N64 ELFs as they have no special flag that identifies them - // as being N64. We can safely assume at the moment that all Mips - // ELFCLASS64 ELFs are N64. New Mips64 ABIs should provide enough - // information to disambiguate between old vs new ABIs. - uint8_t Type1 = (Type >> 0) & 0xFF; - uint8_t Type2 = (Type >> 8) & 0xFF; - uint8_t Type3 = (Type >> 16) & 0xFF; - - // Concat all three relocation type names. - StringRef Name = getRelocationTypeName(Type1); - Result.append(Name.begin(), Name.end()); - - Name = getRelocationTypeName(Type2); - Result.append(1, '/'); - Result.append(Name.begin(), Name.end()); - - Name = getRelocationTypeName(Type3); - Result.append(1, '/'); - Result.append(Name.begin(), Name.end()); - } -} - -template -const typename ELFFile::Elf_Sym * -ELFFile::getRelocationSymbol(const Elf_Rel *Rel, - const Elf_Shdr *SymTab) const { - uint32_t Index = Rel->getSymbol(isMips64EL()); - if (Index == 0) - return nullptr; - return getEntry(SymTab, Index); -} - -template -uint64_t ELFFile::getNumSections() const { - assert(Header && "Header not initialized!"); - if (Header->e_shnum == ELF::SHN_UNDEF && Header->e_shoff > 0) { - assert(SectionHeaderTable && "SectionHeaderTable not initialized!"); - return SectionHeaderTable->sh_size; - } - return Header->e_shnum; -} - -template -typename ELFFile::uintX_t ELFFile::getStringTableIndex() const { - if (Header->e_shnum == ELF::SHN_UNDEF) { - if (Header->e_shstrndx == ELF::SHN_HIRESERVE) - return SectionHeaderTable->sh_link; - if (Header->e_shstrndx >= getNumSections()) - return 0; - } - return Header->e_shstrndx; -} - -template -ELFFile::ELFFile(StringRef Object, std::error_code &EC) - : Buf(Object) { - const uint64_t FileSize = Buf.size(); - - if (sizeof(Elf_Ehdr) > FileSize) { - // File too short! - EC = object_error::parse_failed; - return; - } - - Header = reinterpret_cast(base()); - - if (Header->e_shoff == 0) - return; - - const uint64_t SectionTableOffset = Header->e_shoff; - - if (SectionTableOffset + sizeof(Elf_Shdr) > FileSize) { - // Section header table goes past end of file! - EC = object_error::parse_failed; - return; - } - - // The getNumSections() call below depends on SectionHeaderTable being set. - SectionHeaderTable = - reinterpret_cast(base() + SectionTableOffset); - const uint64_t SectionTableSize = getNumSections() * Header->e_shentsize; - - if (SectionTableOffset + SectionTableSize > FileSize) { - // Section table goes past end of file! - EC = object_error::parse_failed; - return; - } - - // Get string table sections. - uintX_t StringTableIndex = getStringTableIndex(); - if (StringTableIndex) { - ErrorOr StrTabSecOrErr = getSection(StringTableIndex); - if ((EC = StrTabSecOrErr.getError())) - return; - - ErrorOr StringTableOrErr = getStringTable(*StrTabSecOrErr); - if ((EC = StringTableOrErr.getError())) - return; - DotShstrtab = *StringTableOrErr; - } - - EC = std::error_code(); -} - -template -static bool compareAddr(uint64_t VAddr, const Elf_Phdr_Impl *Phdr) { - return VAddr < Phdr->p_vaddr; -} - -template -const typename ELFFile::Elf_Shdr *ELFFile::section_begin() const { - if (Header->e_shentsize != sizeof(Elf_Shdr)) - report_fatal_error( - "Invalid section header entry size (e_shentsize) in ELF header"); - return reinterpret_cast(base() + Header->e_shoff); -} - -template -const typename ELFFile::Elf_Shdr *ELFFile::section_end() const { - return section_begin() + getNumSections(); -} - -template -template -const T *ELFFile::getEntry(uint32_t Section, uint32_t Entry) const { - ErrorOr Sec = getSection(Section); - if (std::error_code EC = Sec.getError()) - report_fatal_error(EC.message()); - return getEntry(*Sec, Entry); -} - -template -template -const T *ELFFile::getEntry(const Elf_Shdr *Section, - uint32_t Entry) const { - return reinterpret_cast(base() + Section->sh_offset + - (Entry * Section->sh_entsize)); -} - -template -ErrorOr::Elf_Shdr *> -ELFFile::getSection(uint32_t Index) const { - assert(SectionHeaderTable && "SectionHeaderTable not initialized!"); - if (Index >= getNumSections()) - return object_error::invalid_section_index; - - return reinterpret_cast( - reinterpret_cast(SectionHeaderTable) + - (Index * Header->e_shentsize)); -} - -template -ErrorOr -ELFFile::getStringTable(const Elf_Shdr *Section) const { - if (Section->sh_type != ELF::SHT_STRTAB) - return object_error::parse_failed; - uint64_t Offset = Section->sh_offset; - uint64_t Size = Section->sh_size; - if (Offset + Size > Buf.size()) - return object_error::parse_failed; - StringRef Data((const char *)base() + Section->sh_offset, Size); - if (Data[Size - 1] != '\0') - return object_error::string_table_non_null_end; - return Data; -} - -template -ErrorOr::Elf_Word>> -ELFFile::getSHNDXTable(const Elf_Shdr &Section) const { - assert(Section.sh_type == ELF::SHT_SYMTAB_SHNDX); - const Elf_Word *ShndxTableBegin = - reinterpret_cast(base() + Section.sh_offset); - uintX_t Size = Section.sh_size; - if (Size % sizeof(uint32_t)) - return object_error::parse_failed; - uintX_t NumSymbols = Size / sizeof(uint32_t); - const Elf_Word *ShndxTableEnd = ShndxTableBegin + NumSymbols; - if (reinterpret_cast(ShndxTableEnd) > Buf.end()) - return object_error::parse_failed; - ErrorOr SymTableOrErr = getSection(Section.sh_link); - if (std::error_code EC = SymTableOrErr.getError()) - return EC; - const Elf_Shdr &SymTable = **SymTableOrErr; - if (SymTable.sh_type != ELF::SHT_SYMTAB && - SymTable.sh_type != ELF::SHT_DYNSYM) - return object_error::parse_failed; - if (NumSymbols != (SymTable.sh_size / sizeof(Elf_Sym))) - return object_error::parse_failed; - return makeArrayRef(ShndxTableBegin, ShndxTableEnd); -} - -template -ErrorOr -ELFFile::getStringTableForSymtab(const Elf_Shdr &Sec) const { - if (Sec.sh_type != ELF::SHT_SYMTAB && Sec.sh_type != ELF::SHT_DYNSYM) - return object_error::parse_failed; - ErrorOr SectionOrErr = getSection(Sec.sh_link); - if (std::error_code EC = SectionOrErr.getError()) - return EC; - return getStringTable(*SectionOrErr); -} - -template -ErrorOr -ELFFile::getSectionName(const Elf_Shdr *Section) const { - uint32_t Offset = Section->sh_name; - if (Offset == 0) - return StringRef(); - if (Offset >= DotShstrtab.size()) - return object_error::parse_failed; - return StringRef(DotShstrtab.data() + Offset); -} - -/// This function returns the hash value for a symbol in the .dynsym section -/// Name of the API remains consistent as specified in the libelf -/// REF : http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash -static inline unsigned elf_hash(StringRef &symbolName) { - unsigned h = 0, g; - for (unsigned i = 0, j = symbolName.size(); i < j; i++) { - h = (h << 4) + symbolName[i]; - g = h & 0xf0000000L; - if (g != 0) - h ^= g >> 24; - h &= ~g; - } - return h; -} -} // end namespace object -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Object/ELFObjectFile.h b/llvm/include/llvm/Object/ELFObjectFile.h deleted file mode 100644 index 07c6364a..00000000 --- a/llvm/include/llvm/Object/ELFObjectFile.h +++ /dev/null @@ -1,974 +0,0 @@ -//===- ELFObjectFile.h - ELF object file implementation ---------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the ELFObjectFile template class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_ELFOBJECTFILE_H -#define LLVM_OBJECT_ELFOBJECTFILE_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Triple.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/MC/SubtargetFeature.h" -#include "llvm/Object/Binary.h" -#include "llvm/Object/ELF.h" -#include "llvm/Object/ELFTypes.h" -#include "llvm/Object/Error.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Object/SymbolicFile.h" -#include "llvm/Support/Casting.h" -#include "llvm/Support/ELF.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/Error.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/ErrorOr.h" -#include "llvm/Support/MemoryBuffer.h" -#include -#include -#include - -namespace llvm { -namespace object { - -class elf_symbol_iterator; -class ELFSymbolRef; -class ELFRelocationRef; - -class ELFObjectFileBase : public ObjectFile { - friend class ELFSymbolRef; - friend class ELFSectionRef; - friend class ELFRelocationRef; - -protected: - ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source); - - virtual uint16_t getEMachine() const = 0; - virtual uint64_t getSymbolSize(DataRefImpl Symb) const = 0; - virtual uint8_t getSymbolOther(DataRefImpl Symb) const = 0; - virtual uint8_t getSymbolELFType(DataRefImpl Symb) const = 0; - - virtual uint32_t getSectionType(DataRefImpl Sec) const = 0; - virtual uint64_t getSectionFlags(DataRefImpl Sec) const = 0; - - virtual ErrorOr getRelocationAddend(DataRefImpl Rel) const = 0; - -public: - typedef iterator_range elf_symbol_iterator_range; - virtual elf_symbol_iterator_range getDynamicSymbolIterators() const = 0; - - elf_symbol_iterator_range symbols() const; - - static inline bool classof(const Binary *v) { return v->isELF(); } - - SubtargetFeatures getFeatures() const override; -}; - -class ELFSectionRef : public SectionRef { -public: - ELFSectionRef(const SectionRef &B) : SectionRef(B) { - assert(isa(SectionRef::getObject())); - } - - const ELFObjectFileBase *getObject() const { - return cast(SectionRef::getObject()); - } - - uint32_t getType() const { - return getObject()->getSectionType(getRawDataRefImpl()); - } - - uint64_t getFlags() const { - return getObject()->getSectionFlags(getRawDataRefImpl()); - } -}; - -class elf_section_iterator : public section_iterator { -public: - elf_section_iterator(const section_iterator &B) : section_iterator(B) { - assert(isa(B->getObject())); - } - - const ELFSectionRef *operator->() const { - return static_cast(section_iterator::operator->()); - } - - const ELFSectionRef &operator*() const { - return static_cast(section_iterator::operator*()); - } -}; - -class ELFSymbolRef : public SymbolRef { -public: - ELFSymbolRef(const SymbolRef &B) : SymbolRef(B) { - assert(isa(SymbolRef::getObject())); - } - - const ELFObjectFileBase *getObject() const { - return cast(BasicSymbolRef::getObject()); - } - - uint64_t getSize() const { - return getObject()->getSymbolSize(getRawDataRefImpl()); - } - - uint8_t getOther() const { - return getObject()->getSymbolOther(getRawDataRefImpl()); - } - - uint8_t getELFType() const { - return getObject()->getSymbolELFType(getRawDataRefImpl()); - } -}; - -class elf_symbol_iterator : public symbol_iterator { -public: - elf_symbol_iterator(const basic_symbol_iterator &B) - : symbol_iterator(SymbolRef(B->getRawDataRefImpl(), - cast(B->getObject()))) {} - - const ELFSymbolRef *operator->() const { - return static_cast(symbol_iterator::operator->()); - } - - const ELFSymbolRef &operator*() const { - return static_cast(symbol_iterator::operator*()); - } -}; - -class ELFRelocationRef : public RelocationRef { -public: - ELFRelocationRef(const RelocationRef &B) : RelocationRef(B) { - assert(isa(RelocationRef::getObject())); - } - - const ELFObjectFileBase *getObject() const { - return cast(RelocationRef::getObject()); - } - - ErrorOr getAddend() const { - return getObject()->getRelocationAddend(getRawDataRefImpl()); - } -}; - -class elf_relocation_iterator : public relocation_iterator { -public: - elf_relocation_iterator(const relocation_iterator &B) - : relocation_iterator(RelocationRef( - B->getRawDataRefImpl(), cast(B->getObject()))) {} - - const ELFRelocationRef *operator->() const { - return static_cast( - relocation_iterator::operator->()); - } - - const ELFRelocationRef &operator*() const { - return static_cast( - relocation_iterator::operator*()); - } -}; - -inline ELFObjectFileBase::elf_symbol_iterator_range -ELFObjectFileBase::symbols() const { - return elf_symbol_iterator_range(symbol_begin(), symbol_end()); -} - -template class ELFObjectFile : public ELFObjectFileBase { - uint16_t getEMachine() const override; - uint64_t getSymbolSize(DataRefImpl Sym) const override; - -public: - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - - typedef typename ELFFile::uintX_t uintX_t; - - typedef typename ELFFile::Elf_Sym Elf_Sym; - typedef typename ELFFile::Elf_Shdr Elf_Shdr; - typedef typename ELFFile::Elf_Ehdr Elf_Ehdr; - typedef typename ELFFile::Elf_Rel Elf_Rel; - typedef typename ELFFile::Elf_Rela Elf_Rela; - typedef typename ELFFile::Elf_Dyn Elf_Dyn; - -protected: - ELFFile EF; - - const Elf_Shdr *DotDynSymSec = nullptr; // Dynamic symbol table section. - const Elf_Shdr *DotSymtabSec = nullptr; // Symbol table section. - ArrayRef ShndxTable; - - void moveSymbolNext(DataRefImpl &Symb) const override; - Expected getSymbolName(DataRefImpl Symb) const override; - Expected getSymbolAddress(DataRefImpl Symb) const override; - uint64_t getSymbolValueImpl(DataRefImpl Symb) const override; - uint32_t getSymbolAlignment(DataRefImpl Symb) const override; - uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override; - uint32_t getSymbolFlags(DataRefImpl Symb) const override; - uint8_t getSymbolOther(DataRefImpl Symb) const override; - uint8_t getSymbolELFType(DataRefImpl Symb) const override; - Expected getSymbolType(DataRefImpl Symb) const override; - Expected getSymbolSection(const Elf_Sym *Symb, - const Elf_Shdr *SymTab) const; - Expected getSymbolSection(DataRefImpl Symb) const override; - - void moveSectionNext(DataRefImpl &Sec) const override; - std::error_code getSectionName(DataRefImpl Sec, - StringRef &Res) const override; - uint64_t getSectionAddress(DataRefImpl Sec) const override; - uint64_t getSectionSize(DataRefImpl Sec) const override; - std::error_code getSectionContents(DataRefImpl Sec, - StringRef &Res) const override; - uint64_t getSectionAlignment(DataRefImpl Sec) const override; - bool isSectionCompressed(DataRefImpl Sec) const override; - bool isSectionText(DataRefImpl Sec) const override; - bool isSectionData(DataRefImpl Sec) const override; - bool isSectionBSS(DataRefImpl Sec) const override; - bool isSectionVirtual(DataRefImpl Sec) const override; - relocation_iterator section_rel_begin(DataRefImpl Sec) const override; - relocation_iterator section_rel_end(DataRefImpl Sec) const override; - section_iterator getRelocatedSection(DataRefImpl Sec) const override; - - void moveRelocationNext(DataRefImpl &Rel) const override; - uint64_t getRelocationOffset(DataRefImpl Rel) const override; - symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override; - uint64_t getRelocationType(DataRefImpl Rel) const override; - void getRelocationTypeName(DataRefImpl Rel, - SmallVectorImpl &Result) const override; - - uint32_t getSectionType(DataRefImpl Sec) const override; - uint64_t getSectionFlags(DataRefImpl Sec) const override; - StringRef getRelocationTypeName(uint32_t Type) const; - - /// \brief Get the relocation section that contains \a Rel. - const Elf_Shdr *getRelSection(DataRefImpl Rel) const { - return *EF.getSection(Rel.d.a); - } - - DataRefImpl toDRI(const Elf_Shdr *SymTable, unsigned SymbolNum) const { - DataRefImpl DRI; - if (!SymTable) { - DRI.d.a = 0; - DRI.d.b = 0; - return DRI; - } - assert(SymTable->sh_type == ELF::SHT_SYMTAB || - SymTable->sh_type == ELF::SHT_DYNSYM); - - uintptr_t SHT = reinterpret_cast(EF.section_begin()); - unsigned SymTableIndex = - (reinterpret_cast(SymTable) - SHT) / sizeof(Elf_Shdr); - - DRI.d.a = SymTableIndex; - DRI.d.b = SymbolNum; - return DRI; - } - - const Elf_Shdr *toELFShdrIter(DataRefImpl Sec) const { - return reinterpret_cast(Sec.p); - } - - DataRefImpl toDRI(const Elf_Shdr *Sec) const { - DataRefImpl DRI; - DRI.p = reinterpret_cast(Sec); - return DRI; - } - - DataRefImpl toDRI(const Elf_Dyn *Dyn) const { - DataRefImpl DRI; - DRI.p = reinterpret_cast(Dyn); - return DRI; - } - - bool isExportedToOtherDSO(const Elf_Sym *ESym) const { - unsigned char Binding = ESym->getBinding(); - unsigned char Visibility = ESym->getVisibility(); - - // A symbol is exported if its binding is either GLOBAL or WEAK, and its - // visibility is either DEFAULT or PROTECTED. All other symbols are not - // exported. - return ((Binding == ELF::STB_GLOBAL || Binding == ELF::STB_WEAK) && - (Visibility == ELF::STV_DEFAULT || - Visibility == ELF::STV_PROTECTED)); - } - - // This flag is used for classof, to distinguish ELFObjectFile from - // its subclass. If more subclasses will be created, this flag will - // have to become an enum. - bool isDyldELFObject; - -public: - ELFObjectFile(MemoryBufferRef Object, std::error_code &EC); - - const Elf_Rel *getRel(DataRefImpl Rel) const; - const Elf_Rela *getRela(DataRefImpl Rela) const; - - const Elf_Sym *getSymbol(DataRefImpl Sym) const { - return EF.template getEntry(Sym.d.a, Sym.d.b); - } - - const Elf_Shdr *getSection(DataRefImpl Sec) const { - return reinterpret_cast(Sec.p); - } - - basic_symbol_iterator symbol_begin_impl() const override; - basic_symbol_iterator symbol_end_impl() const override; - - elf_symbol_iterator dynamic_symbol_begin() const; - elf_symbol_iterator dynamic_symbol_end() const; - - section_iterator section_begin() const override; - section_iterator section_end() const override; - - ErrorOr getRelocationAddend(DataRefImpl Rel) const override; - - uint8_t getBytesInAddress() const override; - StringRef getFileFormatName() const override; - unsigned getArch() const override; - - std::error_code getPlatformFlags(unsigned &Result) const override { - Result = EF.getHeader()->e_flags; - return std::error_code(); - } - - const ELFFile *getELFFile() const { return &EF; } - - bool isDyldType() const { return isDyldELFObject; } - static inline bool classof(const Binary *v) { - return v->getType() == getELFType(ELFT::TargetEndianness == support::little, - ELFT::Is64Bits); - } - - elf_symbol_iterator_range getDynamicSymbolIterators() const override; - - bool isRelocatableObject() const override; -}; - -typedef ELFObjectFile> ELF32LEObjectFile; -typedef ELFObjectFile> ELF64LEObjectFile; -typedef ELFObjectFile> ELF32BEObjectFile; -typedef ELFObjectFile> ELF64BEObjectFile; - -template -void ELFObjectFile::moveSymbolNext(DataRefImpl &Sym) const { - ++Sym.d.b; -} - -template -Expected ELFObjectFile::getSymbolName(DataRefImpl Sym) const { - const Elf_Sym *ESym = getSymbol(Sym); - const Elf_Shdr *SymTableSec = *EF.getSection(Sym.d.a); - const Elf_Shdr *StringTableSec = *EF.getSection(SymTableSec->sh_link); - StringRef SymTable = *EF.getStringTable(StringTableSec); - return ESym->getName(SymTable); -} - -template -uint64_t ELFObjectFile::getSectionFlags(DataRefImpl Sec) const { - return getSection(Sec)->sh_flags; -} - -template -uint32_t ELFObjectFile::getSectionType(DataRefImpl Sec) const { - return getSection(Sec)->sh_type; -} - -template -uint64_t ELFObjectFile::getSymbolValueImpl(DataRefImpl Symb) const { - const Elf_Sym *ESym = getSymbol(Symb); - uint64_t Ret = ESym->st_value; - if (ESym->st_shndx == ELF::SHN_ABS) - return Ret; - - const Elf_Ehdr *Header = EF.getHeader(); - // Clear the ARM/Thumb or microMIPS indicator flag. - if ((Header->e_machine == ELF::EM_ARM || Header->e_machine == ELF::EM_MIPS) && - ESym->getType() == ELF::STT_FUNC) - Ret &= ~1; - - return Ret; -} - -template -Expected -ELFObjectFile::getSymbolAddress(DataRefImpl Symb) const { - uint64_t Result = getSymbolValue(Symb); - const Elf_Sym *ESym = getSymbol(Symb); - switch (ESym->st_shndx) { - case ELF::SHN_COMMON: - case ELF::SHN_UNDEF: - case ELF::SHN_ABS: - return Result; - } - - const Elf_Ehdr *Header = EF.getHeader(); - const Elf_Shdr *SymTab = *EF.getSection(Symb.d.a); - - if (Header->e_type == ELF::ET_REL) { - ErrorOr SectionOrErr = - EF.getSection(ESym, SymTab, ShndxTable); - if (std::error_code EC = SectionOrErr.getError()) - return errorCodeToError(EC); - const Elf_Shdr *Section = *SectionOrErr; - if (Section) - Result += Section->sh_addr; - } - - return Result; -} - -template -uint32_t ELFObjectFile::getSymbolAlignment(DataRefImpl Symb) const { - const Elf_Sym *Sym = getSymbol(Symb); - if (Sym->st_shndx == ELF::SHN_COMMON) - return Sym->st_value; - return 0; -} - -template -uint16_t ELFObjectFile::getEMachine() const { - return EF.getHeader()->e_machine; -} - -template -uint64_t ELFObjectFile::getSymbolSize(DataRefImpl Sym) const { - return getSymbol(Sym)->st_size; -} - -template -uint64_t ELFObjectFile::getCommonSymbolSizeImpl(DataRefImpl Symb) const { - return getSymbol(Symb)->st_size; -} - -template -uint8_t ELFObjectFile::getSymbolOther(DataRefImpl Symb) const { - return getSymbol(Symb)->st_other; -} - -template -uint8_t ELFObjectFile::getSymbolELFType(DataRefImpl Symb) const { - return getSymbol(Symb)->getType(); -} - -template -Expected -ELFObjectFile::getSymbolType(DataRefImpl Symb) const { - const Elf_Sym *ESym = getSymbol(Symb); - - switch (ESym->getType()) { - case ELF::STT_NOTYPE: - return SymbolRef::ST_Unknown; - case ELF::STT_SECTION: - return SymbolRef::ST_Debug; - case ELF::STT_FILE: - return SymbolRef::ST_File; - case ELF::STT_FUNC: - return SymbolRef::ST_Function; - case ELF::STT_OBJECT: - case ELF::STT_COMMON: - case ELF::STT_TLS: - return SymbolRef::ST_Data; - default: - return SymbolRef::ST_Other; - } -} - -template -uint32_t ELFObjectFile::getSymbolFlags(DataRefImpl Sym) const { - const Elf_Sym *ESym = getSymbol(Sym); - - uint32_t Result = SymbolRef::SF_None; - - if (ESym->getBinding() != ELF::STB_LOCAL) - Result |= SymbolRef::SF_Global; - - if (ESym->getBinding() == ELF::STB_WEAK) - Result |= SymbolRef::SF_Weak; - - if (ESym->st_shndx == ELF::SHN_ABS) - Result |= SymbolRef::SF_Absolute; - - if (ESym->getType() == ELF::STT_FILE || ESym->getType() == ELF::STT_SECTION || - ESym == EF.symbol_begin(DotSymtabSec) || - ESym == EF.symbol_begin(DotDynSymSec)) - Result |= SymbolRef::SF_FormatSpecific; - - if (EF.getHeader()->e_machine == ELF::EM_ARM) { - if (Expected NameOrErr = getSymbolName(Sym)) { - StringRef Name = *NameOrErr; - if (Name.startswith("$d") || Name.startswith("$t") || - Name.startswith("$a")) - Result |= SymbolRef::SF_FormatSpecific; - } else { - // TODO: Actually report errors helpfully. - consumeError(NameOrErr.takeError()); - } - if (ESym->getType() == ELF::STT_FUNC && (ESym->st_value & 1) == 1) - Result |= SymbolRef::SF_Thumb; - } - - if (ESym->st_shndx == ELF::SHN_UNDEF) - Result |= SymbolRef::SF_Undefined; - - if (ESym->getType() == ELF::STT_COMMON || ESym->st_shndx == ELF::SHN_COMMON) - Result |= SymbolRef::SF_Common; - - if (isExportedToOtherDSO(ESym)) - Result |= SymbolRef::SF_Exported; - - if (ESym->getVisibility() == ELF::STV_HIDDEN) - Result |= SymbolRef::SF_Hidden; - - return Result; -} - -template -Expected -ELFObjectFile::getSymbolSection(const Elf_Sym *ESym, - const Elf_Shdr *SymTab) const { - ErrorOr ESecOrErr = EF.getSection(ESym, SymTab, ShndxTable); - if (std::error_code EC = ESecOrErr.getError()) - return errorCodeToError(EC); - - const Elf_Shdr *ESec = *ESecOrErr; - if (!ESec) - return section_end(); - - DataRefImpl Sec; - Sec.p = reinterpret_cast(ESec); - return section_iterator(SectionRef(Sec, this)); -} - -template -Expected -ELFObjectFile::getSymbolSection(DataRefImpl Symb) const { - const Elf_Sym *Sym = getSymbol(Symb); - const Elf_Shdr *SymTab = *EF.getSection(Symb.d.a); - return getSymbolSection(Sym, SymTab); -} - -template -void ELFObjectFile::moveSectionNext(DataRefImpl &Sec) const { - const Elf_Shdr *ESec = getSection(Sec); - Sec = toDRI(++ESec); -} - -template -std::error_code ELFObjectFile::getSectionName(DataRefImpl Sec, - StringRef &Result) const { - ErrorOr Name = EF.getSectionName(&*getSection(Sec)); - if (!Name) - return Name.getError(); - Result = *Name; - return std::error_code(); -} - -template -uint64_t ELFObjectFile::getSectionAddress(DataRefImpl Sec) const { - return getSection(Sec)->sh_addr; -} - -template -uint64_t ELFObjectFile::getSectionSize(DataRefImpl Sec) const { - return getSection(Sec)->sh_size; -} - -template -std::error_code -ELFObjectFile::getSectionContents(DataRefImpl Sec, - StringRef &Result) const { - const Elf_Shdr *EShdr = getSection(Sec); - Result = StringRef((const char *)base() + EShdr->sh_offset, EShdr->sh_size); - return std::error_code(); -} - -template -uint64_t ELFObjectFile::getSectionAlignment(DataRefImpl Sec) const { - return getSection(Sec)->sh_addralign; -} - -template -bool ELFObjectFile::isSectionCompressed(DataRefImpl Sec) const { - return getSection(Sec)->sh_flags & ELF::SHF_COMPRESSED; -} - -template -bool ELFObjectFile::isSectionText(DataRefImpl Sec) const { - return getSection(Sec)->sh_flags & ELF::SHF_EXECINSTR; -} - -template -bool ELFObjectFile::isSectionData(DataRefImpl Sec) const { - const Elf_Shdr *EShdr = getSection(Sec); - return EShdr->sh_flags & (ELF::SHF_ALLOC | ELF::SHF_WRITE) && - EShdr->sh_type == ELF::SHT_PROGBITS; -} - -template -bool ELFObjectFile::isSectionBSS(DataRefImpl Sec) const { - const Elf_Shdr *EShdr = getSection(Sec); - return EShdr->sh_flags & (ELF::SHF_ALLOC | ELF::SHF_WRITE) && - EShdr->sh_type == ELF::SHT_NOBITS; -} - -template -bool ELFObjectFile::isSectionVirtual(DataRefImpl Sec) const { - return getSection(Sec)->sh_type == ELF::SHT_NOBITS; -} - -template -relocation_iterator -ELFObjectFile::section_rel_begin(DataRefImpl Sec) const { - DataRefImpl RelData; - uintptr_t SHT = reinterpret_cast(EF.section_begin()); - RelData.d.a = (Sec.p - SHT) / EF.getHeader()->e_shentsize; - RelData.d.b = 0; - return relocation_iterator(RelocationRef(RelData, this)); -} - -template -relocation_iterator -ELFObjectFile::section_rel_end(DataRefImpl Sec) const { - const Elf_Shdr *S = reinterpret_cast(Sec.p); - relocation_iterator Begin = section_rel_begin(Sec); - if (S->sh_type != ELF::SHT_RELA && S->sh_type != ELF::SHT_REL) - return Begin; - DataRefImpl RelData = Begin->getRawDataRefImpl(); - const Elf_Shdr *RelSec = getRelSection(RelData); - - // Error check sh_link here so that getRelocationSymbol can just use it. - ErrorOr SymSecOrErr = EF.getSection(RelSec->sh_link); - if (std::error_code EC = SymSecOrErr.getError()) - report_fatal_error(EC.message()); - - RelData.d.b += S->sh_size / S->sh_entsize; - return relocation_iterator(RelocationRef(RelData, this)); -} - -template -section_iterator -ELFObjectFile::getRelocatedSection(DataRefImpl Sec) const { - if (EF.getHeader()->e_type != ELF::ET_REL) - return section_end(); - - const Elf_Shdr *EShdr = getSection(Sec); - uintX_t Type = EShdr->sh_type; - if (Type != ELF::SHT_REL && Type != ELF::SHT_RELA) - return section_end(); - - ErrorOr R = EF.getSection(EShdr->sh_info); - if (std::error_code EC = R.getError()) - report_fatal_error(EC.message()); - return section_iterator(SectionRef(toDRI(*R), this)); -} - -// Relocations -template -void ELFObjectFile::moveRelocationNext(DataRefImpl &Rel) const { - ++Rel.d.b; -} - -template -symbol_iterator -ELFObjectFile::getRelocationSymbol(DataRefImpl Rel) const { - uint32_t symbolIdx; - const Elf_Shdr *sec = getRelSection(Rel); - if (sec->sh_type == ELF::SHT_REL) - symbolIdx = getRel(Rel)->getSymbol(EF.isMips64EL()); - else - symbolIdx = getRela(Rel)->getSymbol(EF.isMips64EL()); - if (!symbolIdx) - return symbol_end(); - - // FIXME: error check symbolIdx - DataRefImpl SymbolData; - SymbolData.d.a = sec->sh_link; - SymbolData.d.b = symbolIdx; - return symbol_iterator(SymbolRef(SymbolData, this)); -} - -template -uint64_t ELFObjectFile::getRelocationOffset(DataRefImpl Rel) const { - assert(EF.getHeader()->e_type == ELF::ET_REL && - "Only relocatable object files have relocation offsets"); - const Elf_Shdr *sec = getRelSection(Rel); - if (sec->sh_type == ELF::SHT_REL) - return getRel(Rel)->r_offset; - - return getRela(Rel)->r_offset; -} - -template -uint64_t ELFObjectFile::getRelocationType(DataRefImpl Rel) const { - const Elf_Shdr *sec = getRelSection(Rel); - if (sec->sh_type == ELF::SHT_REL) - return getRel(Rel)->getType(EF.isMips64EL()); - else - return getRela(Rel)->getType(EF.isMips64EL()); -} - -template -StringRef ELFObjectFile::getRelocationTypeName(uint32_t Type) const { - return getELFRelocationTypeName(EF.getHeader()->e_machine, Type); -} - -template -void ELFObjectFile::getRelocationTypeName( - DataRefImpl Rel, SmallVectorImpl &Result) const { - uint32_t type = getRelocationType(Rel); - EF.getRelocationTypeName(type, Result); -} - -template -ErrorOr -ELFObjectFile::getRelocationAddend(DataRefImpl Rel) const { - if (getRelSection(Rel)->sh_type != ELF::SHT_RELA) - return object_error::parse_failed; - return (int64_t)getRela(Rel)->r_addend; -} - -template -const typename ELFObjectFile::Elf_Rel * -ELFObjectFile::getRel(DataRefImpl Rel) const { - assert(getRelSection(Rel)->sh_type == ELF::SHT_REL); - return EF.template getEntry(Rel.d.a, Rel.d.b); -} - -template -const typename ELFObjectFile::Elf_Rela * -ELFObjectFile::getRela(DataRefImpl Rela) const { - assert(getRelSection(Rela)->sh_type == ELF::SHT_RELA); - return EF.template getEntry(Rela.d.a, Rela.d.b); -} - -template -ELFObjectFile::ELFObjectFile(MemoryBufferRef Object, std::error_code &EC) - : ELFObjectFileBase( - getELFType(ELFT::TargetEndianness == support::little, ELFT::Is64Bits), - Object), - EF(Data.getBuffer(), EC) { - if (EC) - return; - for (const Elf_Shdr &Sec : EF.sections()) { - switch (Sec.sh_type) { - case ELF::SHT_DYNSYM: { - if (DotDynSymSec) { - // More than one .dynsym! - EC = object_error::parse_failed; - return; - } - DotDynSymSec = &Sec; - break; - } - case ELF::SHT_SYMTAB: { - if (DotSymtabSec) { - // More than one .dynsym! - EC = object_error::parse_failed; - return; - } - DotSymtabSec = &Sec; - break; - } - case ELF::SHT_SYMTAB_SHNDX: { - ErrorOr> TableOrErr = EF.getSHNDXTable(Sec); - if ((EC = TableOrErr.getError())) - return; - ShndxTable = *TableOrErr; - break; - } - } - } -} - -template -basic_symbol_iterator ELFObjectFile::symbol_begin_impl() const { - DataRefImpl Sym = toDRI(DotSymtabSec, 0); - return basic_symbol_iterator(SymbolRef(Sym, this)); -} - -template -basic_symbol_iterator ELFObjectFile::symbol_end_impl() const { - const Elf_Shdr *SymTab = DotSymtabSec; - if (!SymTab) - return symbol_begin_impl(); - DataRefImpl Sym = toDRI(SymTab, SymTab->sh_size / sizeof(Elf_Sym)); - return basic_symbol_iterator(SymbolRef(Sym, this)); -} - -template -elf_symbol_iterator ELFObjectFile::dynamic_symbol_begin() const { - DataRefImpl Sym = toDRI(DotDynSymSec, 0); - return symbol_iterator(SymbolRef(Sym, this)); -} - -template -elf_symbol_iterator ELFObjectFile::dynamic_symbol_end() const { - const Elf_Shdr *SymTab = DotDynSymSec; - DataRefImpl Sym = toDRI(SymTab, SymTab->sh_size / sizeof(Elf_Sym)); - return basic_symbol_iterator(SymbolRef(Sym, this)); -} - -template -section_iterator ELFObjectFile::section_begin() const { - return section_iterator(SectionRef(toDRI(EF.section_begin()), this)); -} - -template -section_iterator ELFObjectFile::section_end() const { - return section_iterator(SectionRef(toDRI(EF.section_end()), this)); -} - -template -uint8_t ELFObjectFile::getBytesInAddress() const { - return ELFT::Is64Bits ? 8 : 4; -} - -template -StringRef ELFObjectFile::getFileFormatName() const { - bool IsLittleEndian = ELFT::TargetEndianness == support::little; - switch (EF.getHeader()->e_ident[ELF::EI_CLASS]) { - case ELF::ELFCLASS32: - switch (EF.getHeader()->e_machine) { - case ELF::EM_386: - return "ELF32-i386"; - case ELF::EM_IAMCU: - return "ELF32-iamcu"; - case ELF::EM_X86_64: - return "ELF32-x86-64"; - case ELF::EM_ARM: - return (IsLittleEndian ? "ELF32-arm-little" : "ELF32-arm-big"); - case ELF::EM_AVR: - return "ELF32-avr"; - case ELF::EM_HEXAGON: - return "ELF32-hexagon"; - case ELF::EM_LANAI: - return "ELF32-lanai"; - case ELF::EM_MIPS: - return "ELF32-mips"; - case ELF::EM_PPC: - return "ELF32-ppc"; - case ELF::EM_SPARC: - case ELF::EM_SPARC32PLUS: - return "ELF32-sparc"; - case ELF::EM_WEBASSEMBLY: - return "ELF32-wasm"; - case ELF::EM_AMDGPU: - return "ELF32-amdgpu"; - default: - return "ELF32-unknown"; - } - case ELF::ELFCLASS64: - switch (EF.getHeader()->e_machine) { - case ELF::EM_386: - return "ELF64-i386"; - case ELF::EM_X86_64: - return "ELF64-x86-64"; - case ELF::EM_AARCH64: - return (IsLittleEndian ? "ELF64-aarch64-little" : "ELF64-aarch64-big"); - case ELF::EM_PPC64: - return "ELF64-ppc64"; - case ELF::EM_S390: - return "ELF64-s390"; - case ELF::EM_SPARCV9: - return "ELF64-sparc"; - case ELF::EM_MIPS: - return "ELF64-mips"; - case ELF::EM_WEBASSEMBLY: - return "ELF64-wasm"; - case ELF::EM_AMDGPU: - return (EF.getHeader()->e_ident[ELF::EI_OSABI] == ELF::ELFOSABI_AMDGPU_HSA - && IsLittleEndian) ? - "ELF64-amdgpu-hsacobj" : "ELF64-amdgpu"; - case ELF::EM_BPF: - return "ELF64-BPF"; - default: - return "ELF64-unknown"; - } - default: - // FIXME: Proper error handling. - report_fatal_error("Invalid ELFCLASS!"); - } -} - -template -unsigned ELFObjectFile::getArch() const { - bool IsLittleEndian = ELFT::TargetEndianness == support::little; - switch (EF.getHeader()->e_machine) { - case ELF::EM_386: - case ELF::EM_IAMCU: - return Triple::x86; - case ELF::EM_X86_64: - return Triple::x86_64; - case ELF::EM_AARCH64: - return Triple::aarch64; - case ELF::EM_ARM: - return Triple::arm; - case ELF::EM_AVR: - return Triple::avr; - case ELF::EM_HEXAGON: - return Triple::hexagon; - case ELF::EM_LANAI: - return Triple::lanai; - case ELF::EM_MIPS: - switch (EF.getHeader()->e_ident[ELF::EI_CLASS]) { - case ELF::ELFCLASS32: - return IsLittleEndian ? Triple::mipsel : Triple::mips; - case ELF::ELFCLASS64: - return IsLittleEndian ? Triple::mips64el : Triple::mips64; - default: - report_fatal_error("Invalid ELFCLASS!"); - } - case ELF::EM_PPC: - return Triple::ppc; - case ELF::EM_PPC64: - return IsLittleEndian ? Triple::ppc64le : Triple::ppc64; - case ELF::EM_S390: - return Triple::systemz; - - case ELF::EM_SPARC: - case ELF::EM_SPARC32PLUS: - return IsLittleEndian ? Triple::sparcel : Triple::sparc; - case ELF::EM_SPARCV9: - return Triple::sparcv9; - case ELF::EM_WEBASSEMBLY: - switch (EF.getHeader()->e_ident[ELF::EI_CLASS]) { - case ELF::ELFCLASS32: return Triple::wasm32; - case ELF::ELFCLASS64: return Triple::wasm64; - default: return Triple::UnknownArch; - } - - case ELF::EM_AMDGPU: - return (EF.getHeader()->e_ident[ELF::EI_CLASS] == ELF::ELFCLASS64 - && EF.getHeader()->e_ident[ELF::EI_OSABI] == ELF::ELFOSABI_AMDGPU_HSA - && IsLittleEndian) ? - Triple::amdgcn : Triple::UnknownArch; - - case ELF::EM_BPF: - return IsLittleEndian ? Triple::bpfel : Triple::bpfeb; - - default: - return Triple::UnknownArch; - } -} - -template -ELFObjectFileBase::elf_symbol_iterator_range -ELFObjectFile::getDynamicSymbolIterators() const { - return make_range(dynamic_symbol_begin(), dynamic_symbol_end()); -} - -template bool ELFObjectFile::isRelocatableObject() const { - return EF.getHeader()->e_type == ELF::ET_REL; -} - -} // end namespace object -} // end namespace llvm - -#endif // LLVM_OBJECT_ELFOBJECTFILE_H diff --git a/llvm/include/llvm/Object/ELFTypes.h b/llvm/include/llvm/Object/ELFTypes.h deleted file mode 100644 index 55028f36..00000000 --- a/llvm/include/llvm/Object/ELFTypes.h +++ /dev/null @@ -1,638 +0,0 @@ -//===- ELFTypes.h - Endian specific types for ELF ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_ELFTYPES_H -#define LLVM_OBJECT_ELFTYPES_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/Object/Error.h" -#include "llvm/Support/ELF.h" -#include "llvm/Support/Endian.h" -#include "llvm/Support/ErrorOr.h" - -namespace llvm { -namespace object { - -using support::endianness; - -template struct Elf_Ehdr_Impl; -template struct Elf_Shdr_Impl; -template struct Elf_Sym_Impl; -template struct Elf_Dyn_Impl; -template struct Elf_Phdr_Impl; -template struct Elf_Rel_Impl; -template struct Elf_Verdef_Impl; -template struct Elf_Verdaux_Impl; -template struct Elf_Verneed_Impl; -template struct Elf_Vernaux_Impl; -template struct Elf_Versym_Impl; -template struct Elf_Hash_Impl; -template struct Elf_GnuHash_Impl; -template struct Elf_Chdr_Impl; - -template struct ELFType { -private: - template - using packed = support::detail::packed_endian_specific_integral; - -public: - static const endianness TargetEndianness = E; - static const bool Is64Bits = Is64; - - typedef typename std::conditional::type uint; - typedef Elf_Ehdr_Impl> Ehdr; - typedef Elf_Shdr_Impl> Shdr; - typedef Elf_Sym_Impl> Sym; - typedef Elf_Dyn_Impl> Dyn; - typedef Elf_Phdr_Impl> Phdr; - typedef Elf_Rel_Impl, false> Rel; - typedef Elf_Rel_Impl, true> Rela; - typedef Elf_Verdef_Impl> Verdef; - typedef Elf_Verdaux_Impl> Verdaux; - typedef Elf_Verneed_Impl> Verneed; - typedef Elf_Vernaux_Impl> Vernaux; - typedef Elf_Versym_Impl> Versym; - typedef Elf_Hash_Impl> Hash; - typedef Elf_GnuHash_Impl> GnuHash; - typedef Elf_Chdr_Impl> Chdr; - typedef ArrayRef DynRange; - typedef ArrayRef ShdrRange; - typedef ArrayRef SymRange; - typedef ArrayRef RelRange; - typedef ArrayRef RelaRange; - typedef ArrayRef PhdrRange; - - typedef packed Half; - typedef packed Word; - typedef packed Sword; - typedef packed Xword; - typedef packed Sxword; - typedef packed Addr; - typedef packed Off; -}; - -typedef ELFType ELF32LE; -typedef ELFType ELF32BE; -typedef ELFType ELF64LE; -typedef ELFType ELF64BE; - -// Use an alignment of 2 for the typedefs since that is the worst case for -// ELF files in archives. - -// Templates to choose Elf_Addr and Elf_Off depending on is64Bits. -template struct ELFDataTypeTypedefHelperCommon { - typedef support::detail::packed_endian_specific_integral< - uint16_t, target_endianness, 2> Elf_Half; - typedef support::detail::packed_endian_specific_integral< - uint32_t, target_endianness, 2> Elf_Word; - typedef support::detail::packed_endian_specific_integral< - int32_t, target_endianness, 2> Elf_Sword; - typedef support::detail::packed_endian_specific_integral< - uint64_t, target_endianness, 2> Elf_Xword; - typedef support::detail::packed_endian_specific_integral< - int64_t, target_endianness, 2> Elf_Sxword; -}; - -template struct ELFDataTypeTypedefHelper; - -/// ELF 32bit types. -template -struct ELFDataTypeTypedefHelper> - : ELFDataTypeTypedefHelperCommon { - typedef uint32_t value_type; - typedef support::detail::packed_endian_specific_integral< - value_type, TargetEndianness, 2> Elf_Addr; - typedef support::detail::packed_endian_specific_integral< - value_type, TargetEndianness, 2> Elf_Off; -}; - -/// ELF 64bit types. -template -struct ELFDataTypeTypedefHelper> - : ELFDataTypeTypedefHelperCommon { - typedef uint64_t value_type; - typedef support::detail::packed_endian_specific_integral< - value_type, TargetEndianness, 2> Elf_Addr; - typedef support::detail::packed_endian_specific_integral< - value_type, TargetEndianness, 2> Elf_Off; -}; - -// I really don't like doing this, but the alternative is copypasta. -#define LLVM_ELF_IMPORT_TYPES(E, W) \ - typedef typename ELFDataTypeTypedefHelper>::Elf_Addr Elf_Addr; \ - typedef typename ELFDataTypeTypedefHelper>::Elf_Off Elf_Off; \ - typedef typename ELFDataTypeTypedefHelper>::Elf_Half Elf_Half; \ - typedef typename ELFDataTypeTypedefHelper>::Elf_Word Elf_Word; \ - typedef \ - typename ELFDataTypeTypedefHelper>::Elf_Sword Elf_Sword; \ - typedef \ - typename ELFDataTypeTypedefHelper>::Elf_Xword Elf_Xword; \ - typedef \ - typename ELFDataTypeTypedefHelper>::Elf_Sxword Elf_Sxword; - -#define LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) \ - LLVM_ELF_IMPORT_TYPES(ELFT::TargetEndianness, ELFT::Is64Bits) - -// Section header. -template struct Elf_Shdr_Base; - -template -struct Elf_Shdr_Base> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, false) - Elf_Word sh_name; // Section name (index into string table) - Elf_Word sh_type; // Section type (SHT_*) - Elf_Word sh_flags; // Section flags (SHF_*) - Elf_Addr sh_addr; // Address where section is to be loaded - Elf_Off sh_offset; // File offset of section data, in bytes - Elf_Word sh_size; // Size of section, in bytes - Elf_Word sh_link; // Section type-specific header table index link - Elf_Word sh_info; // Section type-specific extra information - Elf_Word sh_addralign; // Section address alignment - Elf_Word sh_entsize; // Size of records contained within the section -}; - -template -struct Elf_Shdr_Base> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, true) - Elf_Word sh_name; // Section name (index into string table) - Elf_Word sh_type; // Section type (SHT_*) - Elf_Xword sh_flags; // Section flags (SHF_*) - Elf_Addr sh_addr; // Address where section is to be loaded - Elf_Off sh_offset; // File offset of section data, in bytes - Elf_Xword sh_size; // Size of section, in bytes - Elf_Word sh_link; // Section type-specific header table index link - Elf_Word sh_info; // Section type-specific extra information - Elf_Xword sh_addralign; // Section address alignment - Elf_Xword sh_entsize; // Size of records contained within the section -}; - -template -struct Elf_Shdr_Impl : Elf_Shdr_Base { - using Elf_Shdr_Base::sh_entsize; - using Elf_Shdr_Base::sh_size; - - /// @brief Get the number of entities this section contains if it has any. - unsigned getEntityCount() const { - if (sh_entsize == 0) - return 0; - return sh_size / sh_entsize; - } -}; - -template struct Elf_Sym_Base; - -template -struct Elf_Sym_Base> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, false) - Elf_Word st_name; // Symbol name (index into string table) - Elf_Addr st_value; // Value or address associated with the symbol - Elf_Word st_size; // Size of the symbol - unsigned char st_info; // Symbol's type and binding attributes - unsigned char st_other; // Must be zero; reserved - Elf_Half st_shndx; // Which section (header table index) it's defined in -}; - -template -struct Elf_Sym_Base> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, true) - Elf_Word st_name; // Symbol name (index into string table) - unsigned char st_info; // Symbol's type and binding attributes - unsigned char st_other; // Must be zero; reserved - Elf_Half st_shndx; // Which section (header table index) it's defined in - Elf_Addr st_value; // Value or address associated with the symbol - Elf_Xword st_size; // Size of the symbol -}; - -template -struct Elf_Sym_Impl : Elf_Sym_Base { - using Elf_Sym_Base::st_info; - using Elf_Sym_Base::st_shndx; - using Elf_Sym_Base::st_other; - using Elf_Sym_Base::st_value; - - // These accessors and mutators correspond to the ELF32_ST_BIND, - // ELF32_ST_TYPE, and ELF32_ST_INFO macros defined in the ELF specification: - unsigned char getBinding() const { return st_info >> 4; } - unsigned char getType() const { return st_info & 0x0f; } - uint64_t getValue() const { return st_value; } - void setBinding(unsigned char b) { setBindingAndType(b, getType()); } - void setType(unsigned char t) { setBindingAndType(getBinding(), t); } - void setBindingAndType(unsigned char b, unsigned char t) { - st_info = (b << 4) + (t & 0x0f); - } - - /// Access to the STV_xxx flag stored in the first two bits of st_other. - /// STV_DEFAULT: 0 - /// STV_INTERNAL: 1 - /// STV_HIDDEN: 2 - /// STV_PROTECTED: 3 - unsigned char getVisibility() const { return st_other & 0x3; } - void setVisibility(unsigned char v) { - assert(v < 4 && "Invalid value for visibility"); - st_other = (st_other & ~0x3) | v; - } - - bool isAbsolute() const { return st_shndx == ELF::SHN_ABS; } - bool isCommon() const { - return getType() == ELF::STT_COMMON || st_shndx == ELF::SHN_COMMON; - } - bool isDefined() const { return !isUndefined(); } - bool isProcessorSpecific() const { - return st_shndx >= ELF::SHN_LOPROC && st_shndx <= ELF::SHN_HIPROC; - } - bool isOSSpecific() const { - return st_shndx >= ELF::SHN_LOOS && st_shndx <= ELF::SHN_HIOS; - } - bool isReserved() const { - // ELF::SHN_HIRESERVE is 0xffff so st_shndx <= ELF::SHN_HIRESERVE is always - // true and some compilers warn about it. - return st_shndx >= ELF::SHN_LORESERVE; - } - bool isUndefined() const { return st_shndx == ELF::SHN_UNDEF; } - bool isExternal() const { - return getBinding() != ELF::STB_LOCAL; - } - - Expected getName(StringRef StrTab) const; -}; - -template -Expected Elf_Sym_Impl::getName(StringRef StrTab) const { - uint32_t Offset = this->st_name; - if (Offset >= StrTab.size()) - return errorCodeToError(object_error::parse_failed); - return StringRef(StrTab.data() + Offset); -} - -/// Elf_Versym: This is the structure of entries in the SHT_GNU_versym section -/// (.gnu.version). This structure is identical for ELF32 and ELF64. -template -struct Elf_Versym_Impl { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - Elf_Half vs_index; // Version index with flags (e.g. VERSYM_HIDDEN) -}; - -template struct Elf_Verdaux_Impl; - -/// Elf_Verdef: This is the structure of entries in the SHT_GNU_verdef section -/// (.gnu.version_d). This structure is identical for ELF32 and ELF64. -template -struct Elf_Verdef_Impl { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - typedef Elf_Verdaux_Impl Elf_Verdaux; - Elf_Half vd_version; // Version of this structure (e.g. VER_DEF_CURRENT) - Elf_Half vd_flags; // Bitwise flags (VER_DEF_*) - Elf_Half vd_ndx; // Version index, used in .gnu.version entries - Elf_Half vd_cnt; // Number of Verdaux entries - Elf_Word vd_hash; // Hash of name - Elf_Word vd_aux; // Offset to the first Verdaux entry (in bytes) - Elf_Word vd_next; // Offset to the next Verdef entry (in bytes) - - /// Get the first Verdaux entry for this Verdef. - const Elf_Verdaux *getAux() const { - return reinterpret_cast((const char *)this + vd_aux); - } -}; - -/// Elf_Verdaux: This is the structure of auxiliary data in the SHT_GNU_verdef -/// section (.gnu.version_d). This structure is identical for ELF32 and ELF64. -template -struct Elf_Verdaux_Impl { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - Elf_Word vda_name; // Version name (offset in string table) - Elf_Word vda_next; // Offset to next Verdaux entry (in bytes) -}; - -/// Elf_Verneed: This is the structure of entries in the SHT_GNU_verneed -/// section (.gnu.version_r). This structure is identical for ELF32 and ELF64. -template -struct Elf_Verneed_Impl { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - Elf_Half vn_version; // Version of this structure (e.g. VER_NEED_CURRENT) - Elf_Half vn_cnt; // Number of associated Vernaux entries - Elf_Word vn_file; // Library name (string table offset) - Elf_Word vn_aux; // Offset to first Vernaux entry (in bytes) - Elf_Word vn_next; // Offset to next Verneed entry (in bytes) -}; - -/// Elf_Vernaux: This is the structure of auxiliary data in SHT_GNU_verneed -/// section (.gnu.version_r). This structure is identical for ELF32 and ELF64. -template -struct Elf_Vernaux_Impl { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - Elf_Word vna_hash; // Hash of dependency name - Elf_Half vna_flags; // Bitwise Flags (VER_FLAG_*) - Elf_Half vna_other; // Version index, used in .gnu.version entries - Elf_Word vna_name; // Dependency name - Elf_Word vna_next; // Offset to next Vernaux entry (in bytes) -}; - -/// Elf_Dyn_Base: This structure matches the form of entries in the dynamic -/// table section (.dynamic) look like. -template struct Elf_Dyn_Base; - -template -struct Elf_Dyn_Base> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, false) - Elf_Sword d_tag; - union { - Elf_Word d_val; - Elf_Addr d_ptr; - } d_un; -}; - -template -struct Elf_Dyn_Base> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, true) - Elf_Sxword d_tag; - union { - Elf_Xword d_val; - Elf_Addr d_ptr; - } d_un; -}; - -/// Elf_Dyn_Impl: This inherits from Elf_Dyn_Base, adding getters. -template -struct Elf_Dyn_Impl : Elf_Dyn_Base { - using Elf_Dyn_Base::d_tag; - using Elf_Dyn_Base::d_un; - typedef typename std::conditional::type intX_t; - typedef typename std::conditional::type uintX_t; - intX_t getTag() const { return d_tag; } - uintX_t getVal() const { return d_un.d_val; } - uintX_t getPtr() const { return d_un.d_ptr; } -}; - -template -struct Elf_Rel_Impl, false> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, false) - static const bool IsRela = false; - Elf_Addr r_offset; // Location (file byte offset, or program virtual addr) - Elf_Word r_info; // Symbol table index and type of relocation to apply - - uint32_t getRInfo(bool isMips64EL) const { - assert(!isMips64EL); - return r_info; - } - void setRInfo(uint32_t R, bool IsMips64EL) { - assert(!IsMips64EL); - r_info = R; - } - - // These accessors and mutators correspond to the ELF32_R_SYM, ELF32_R_TYPE, - // and ELF32_R_INFO macros defined in the ELF specification: - uint32_t getSymbol(bool isMips64EL) const { - return this->getRInfo(isMips64EL) >> 8; - } - unsigned char getType(bool isMips64EL) const { - return (unsigned char)(this->getRInfo(isMips64EL) & 0x0ff); - } - void setSymbol(uint32_t s, bool IsMips64EL) { - setSymbolAndType(s, getType(), IsMips64EL); - } - void setType(unsigned char t, bool IsMips64EL) { - setSymbolAndType(getSymbol(), t, IsMips64EL); - } - void setSymbolAndType(uint32_t s, unsigned char t, bool IsMips64EL) { - this->setRInfo((s << 8) + t, IsMips64EL); - } -}; - -template -struct Elf_Rel_Impl, true> - : public Elf_Rel_Impl, false> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, false) - static const bool IsRela = true; - Elf_Sword r_addend; // Compute value for relocatable field by adding this -}; - -template -struct Elf_Rel_Impl, false> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, true) - static const bool IsRela = false; - Elf_Addr r_offset; // Location (file byte offset, or program virtual addr) - Elf_Xword r_info; // Symbol table index and type of relocation to apply - - uint64_t getRInfo(bool isMips64EL) const { - uint64_t t = r_info; - if (!isMips64EL) - return t; - // Mips64 little endian has a "special" encoding of r_info. Instead of one - // 64 bit little endian number, it is a little endian 32 bit number followed - // by a 32 bit big endian number. - return (t << 32) | ((t >> 8) & 0xff000000) | ((t >> 24) & 0x00ff0000) | - ((t >> 40) & 0x0000ff00) | ((t >> 56) & 0x000000ff); - } - void setRInfo(uint64_t R, bool IsMips64EL) { - if (IsMips64EL) - r_info = (R >> 32) | ((R & 0xff000000) << 8) | ((R & 0x00ff0000) << 24) | - ((R & 0x0000ff00) << 40) | ((R & 0x000000ff) << 56); - else - r_info = R; - } - - // These accessors and mutators correspond to the ELF64_R_SYM, ELF64_R_TYPE, - // and ELF64_R_INFO macros defined in the ELF specification: - uint32_t getSymbol(bool isMips64EL) const { - return (uint32_t)(this->getRInfo(isMips64EL) >> 32); - } - uint32_t getType(bool isMips64EL) const { - return (uint32_t)(this->getRInfo(isMips64EL) & 0xffffffffL); - } - void setSymbol(uint32_t s, bool IsMips64EL) { - setSymbolAndType(s, getType(), IsMips64EL); - } - void setType(uint32_t t, bool IsMips64EL) { - setSymbolAndType(getSymbol(), t, IsMips64EL); - } - void setSymbolAndType(uint32_t s, uint32_t t, bool IsMips64EL) { - this->setRInfo(((uint64_t)s << 32) + (t & 0xffffffffL), IsMips64EL); - } -}; - -template -struct Elf_Rel_Impl, true> - : public Elf_Rel_Impl, false> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, true) - static const bool IsRela = true; - Elf_Sxword r_addend; // Compute value for relocatable field by adding this. -}; - -template -struct Elf_Ehdr_Impl { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - unsigned char e_ident[ELF::EI_NIDENT]; // ELF Identification bytes - Elf_Half e_type; // Type of file (see ET_*) - Elf_Half e_machine; // Required architecture for this file (see EM_*) - Elf_Word e_version; // Must be equal to 1 - Elf_Addr e_entry; // Address to jump to in order to start program - Elf_Off e_phoff; // Program header table's file offset, in bytes - Elf_Off e_shoff; // Section header table's file offset, in bytes - Elf_Word e_flags; // Processor-specific flags - Elf_Half e_ehsize; // Size of ELF header, in bytes - Elf_Half e_phentsize; // Size of an entry in the program header table - Elf_Half e_phnum; // Number of entries in the program header table - Elf_Half e_shentsize; // Size of an entry in the section header table - Elf_Half e_shnum; // Number of entries in the section header table - Elf_Half e_shstrndx; // Section header table index of section name - // string table - bool checkMagic() const { - return (memcmp(e_ident, ELF::ElfMagic, strlen(ELF::ElfMagic))) == 0; - } - unsigned char getFileClass() const { return e_ident[ELF::EI_CLASS]; } - unsigned char getDataEncoding() const { return e_ident[ELF::EI_DATA]; } -}; - -template struct Elf_Phdr_Impl; - -template -struct Elf_Phdr_Impl> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, false) - Elf_Word p_type; // Type of segment - Elf_Off p_offset; // FileOffset where segment is located, in bytes - Elf_Addr p_vaddr; // Virtual Address of beginning of segment - Elf_Addr p_paddr; // Physical address of beginning of segment (OS-specific) - Elf_Word p_filesz; // Num. of bytes in file image of segment (may be zero) - Elf_Word p_memsz; // Num. of bytes in mem image of segment (may be zero) - Elf_Word p_flags; // Segment flags - Elf_Word p_align; // Segment alignment constraint -}; - -template -struct Elf_Phdr_Impl> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, true) - Elf_Word p_type; // Type of segment - Elf_Word p_flags; // Segment flags - Elf_Off p_offset; // FileOffset where segment is located, in bytes - Elf_Addr p_vaddr; // Virtual Address of beginning of segment - Elf_Addr p_paddr; // Physical address of beginning of segment (OS-specific) - Elf_Xword p_filesz; // Num. of bytes in file image of segment (may be zero) - Elf_Xword p_memsz; // Num. of bytes in mem image of segment (may be zero) - Elf_Xword p_align; // Segment alignment constraint -}; - -// ELFT needed for endianess. -template -struct Elf_Hash_Impl { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - Elf_Word nbucket; - Elf_Word nchain; - - ArrayRef buckets() const { - return ArrayRef(&nbucket + 2, &nbucket + 2 + nbucket); - } - - ArrayRef chains() const { - return ArrayRef(&nbucket + 2 + nbucket, - &nbucket + 2 + nbucket + nchain); - } -}; - -// .gnu.hash section -template -struct Elf_GnuHash_Impl { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - Elf_Word nbuckets; - Elf_Word symndx; - Elf_Word maskwords; - Elf_Word shift2; - - ArrayRef filter() const { - return ArrayRef(reinterpret_cast(&shift2 + 1), - maskwords); - } - - ArrayRef buckets() const { - return ArrayRef( - reinterpret_cast(filter().end()), nbuckets); - } - - ArrayRef values(unsigned DynamicSymCount) const { - return ArrayRef(buckets().end(), DynamicSymCount - symndx); - } -}; - -// Compressed section headers. -// http://www.sco.com/developers/gabi/latest/ch4.sheader.html#compression_header -template -struct Elf_Chdr_Impl> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, false) - Elf_Word ch_type; - Elf_Word ch_size; - Elf_Word ch_addralign; -}; - -template -struct Elf_Chdr_Impl> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, true) - Elf_Word ch_type; - Elf_Word ch_reserved; - Elf_Xword ch_size; - Elf_Xword ch_addralign; -}; - -// MIPS .reginfo section -template -struct Elf_Mips_RegInfo; - -template -struct Elf_Mips_RegInfo> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, false) - Elf_Word ri_gprmask; // bit-mask of used general registers - Elf_Word ri_cprmask[4]; // bit-mask of used co-processor registers - Elf_Addr ri_gp_value; // gp register value -}; - -template -struct Elf_Mips_RegInfo> { - LLVM_ELF_IMPORT_TYPES(TargetEndianness, true) - Elf_Word ri_gprmask; // bit-mask of used general registers - Elf_Word ri_pad; // unused padding field - Elf_Word ri_cprmask[4]; // bit-mask of used co-processor registers - Elf_Addr ri_gp_value; // gp register value -}; - -// .MIPS.options section -template struct Elf_Mips_Options { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - uint8_t kind; // Determines interpretation of variable part of descriptor - uint8_t size; // Byte size of descriptor, including this header - Elf_Half section; // Section header index of section affected, - // or 0 for global options - Elf_Word info; // Kind-specific information - - const Elf_Mips_RegInfo &getRegInfo() const { - assert(kind == llvm::ELF::ODK_REGINFO); - return *reinterpret_cast *>( - (const uint8_t *)this + sizeof(Elf_Mips_Options)); - } -}; - -// .MIPS.abiflags section content -template struct Elf_Mips_ABIFlags { - LLVM_ELF_IMPORT_TYPES_ELFT(ELFT) - Elf_Half version; // Version of the structure - uint8_t isa_level; // ISA level: 1-5, 32, and 64 - uint8_t isa_rev; // ISA revision (0 for MIPS I - MIPS V) - uint8_t gpr_size; // General purpose registers size - uint8_t cpr1_size; // Co-processor 1 registers size - uint8_t cpr2_size; // Co-processor 2 registers size - uint8_t fp_abi; // Floating-point ABI flag - Elf_Word isa_ext; // Processor-specific extension - Elf_Word ases; // ASEs flags - Elf_Word flags1; // General flags - Elf_Word flags2; // General flags -}; - -} // end namespace object. -} // end namespace llvm. - -#endif diff --git a/llvm/include/llvm/Object/Error.h b/llvm/include/llvm/Object/Error.h deleted file mode 100644 index cd55e5dc..00000000 --- a/llvm/include/llvm/Object/Error.h +++ /dev/null @@ -1,91 +0,0 @@ -//===- Error.h - system_error extensions for Object -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This declares a new error_category for the Object library. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_ERROR_H -#define LLVM_OBJECT_ERROR_H - -#include "llvm/ADT/Twine.h" -#include "llvm/Support/Error.h" -#include - -namespace llvm { -namespace object { - -class Binary; - -const std::error_category &object_category(); - -enum class object_error { - // Error code 0 is absent. Use std::error_code() instead. - arch_not_found = 1, - invalid_file_type, - parse_failed, - unexpected_eof, - string_table_non_null_end, - invalid_section_index, - bitcode_section_not_found, -}; - -inline std::error_code make_error_code(object_error e) { - return std::error_code(static_cast(e), object_category()); -} - -/// Base class for all errors indicating malformed binary files. -/// -/// Having a subclass for all malformed binary files allows archive-walking -/// code to skip malformed files without having to understand every possible -/// way that a binary file might be malformed. -/// -/// Currently inherits from ECError for easy interoperability with -/// std::error_code, but this will be removed in the future. -class BinaryError : public ErrorInfo { -public: - static char ID; - BinaryError() { - // Default to parse_failed, can be overridden with setErrorCode. - setErrorCode(make_error_code(object_error::parse_failed)); - } -}; - -/// Generic binary error. -/// -/// For errors that don't require their own specific sub-error (most errors) -/// this class can be used to describe the error via a string message. -class GenericBinaryError : public ErrorInfo { -public: - static char ID; - GenericBinaryError(Twine Msg); - GenericBinaryError(Twine Msg, object_error ECOverride); - const std::string &getMessage() const { return Msg; } - void log(raw_ostream &OS) const override; -private: - std::string Msg; -}; - -/// isNotObjectErrorInvalidFileType() is used when looping through the children -/// of an archive after calling getAsBinary() on the child and it returns an -/// llvm::Error. In the cases we want to loop through the children and ignore the -/// non-objects in the archive this is used to test the error to see if an -/// error() function needs to called on the llvm::Error. -Error isNotObjectErrorInvalidFileType(llvm::Error Err); - -} // end namespace object. - -} // end namespace llvm. - -namespace std { -template <> -struct is_error_code_enum : std::true_type {}; -} - -#endif diff --git a/llvm/include/llvm/Object/IRObjectFile.h b/llvm/include/llvm/Object/IRObjectFile.h deleted file mode 100644 index 9fe011e1..00000000 --- a/llvm/include/llvm/Object/IRObjectFile.h +++ /dev/null @@ -1,84 +0,0 @@ -//===- IRObjectFile.h - LLVM IR object file implementation ------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the IRObjectFile template class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_IROBJECTFILE_H -#define LLVM_OBJECT_IROBJECTFILE_H - -#include "llvm/Object/SymbolicFile.h" - -namespace llvm { -class Mangler; -class Module; -class GlobalValue; -class Triple; - -namespace object { -class ObjectFile; - -class IRObjectFile : public SymbolicFile { - std::unique_ptr M; - std::unique_ptr Mang; - std::vector> AsmSymbols; - -public: - IRObjectFile(MemoryBufferRef Object, std::unique_ptr M); - ~IRObjectFile() override; - void moveSymbolNext(DataRefImpl &Symb) const override; - std::error_code printSymbolName(raw_ostream &OS, - DataRefImpl Symb) const override; - uint32_t getSymbolFlags(DataRefImpl Symb) const override; - GlobalValue *getSymbolGV(DataRefImpl Symb); - const GlobalValue *getSymbolGV(DataRefImpl Symb) const { - return const_cast(this)->getSymbolGV(Symb); - } - basic_symbol_iterator symbol_begin_impl() const override; - basic_symbol_iterator symbol_end_impl() const override; - - const Module &getModule() const { - return const_cast(this)->getModule(); - } - Module &getModule() { - return *M; - } - std::unique_ptr takeModule(); - - static inline bool classof(const Binary *v) { - return v->isIR(); - } - - /// \brief Finds and returns bitcode embedded in the given object file, or an - /// error code if not found. - static ErrorOr findBitcodeInObject(const ObjectFile &Obj); - - /// Parse inline ASM and collect the symbols that are not defined in - /// the current module. - /// - /// For each found symbol, call \p AsmUndefinedRefs with the name of the - /// symbol found and the associated flags. - static void CollectAsmUndefinedRefs( - const Triple &TheTriple, StringRef InlineAsm, - function_ref AsmUndefinedRefs); - - /// \brief Finds and returns bitcode in the given memory buffer (which may - /// be either a bitcode file or a native object file with embedded bitcode), - /// or an error code if not found. - static ErrorOr - findBitcodeInMemBuffer(MemoryBufferRef Object); - - static ErrorOr> create(MemoryBufferRef Object, - LLVMContext &Context); -}; -} -} - -#endif diff --git a/llvm/include/llvm/Object/MachO.h b/llvm/include/llvm/Object/MachO.h deleted file mode 100644 index 7906db1e..00000000 --- a/llvm/include/llvm/Object/MachO.h +++ /dev/null @@ -1,527 +0,0 @@ -//===- MachO.h - MachO object file implementation ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the MachOObjectFile class, which implement the ObjectFile -// interface for MachO files. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_MACHO_H -#define LLVM_OBJECT_MACHO_H - -#include "llvm/ADT/ArrayRef.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/Triple.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Support/MachO.h" - -namespace llvm { -namespace object { - -/// DiceRef - This is a value type class that represents a single -/// data in code entry in the table in a Mach-O object file. -class DiceRef { - DataRefImpl DicePimpl; - const ObjectFile *OwningObject; - -public: - DiceRef() : OwningObject(nullptr) { } - - DiceRef(DataRefImpl DiceP, const ObjectFile *Owner); - - bool operator==(const DiceRef &Other) const; - bool operator<(const DiceRef &Other) const; - - void moveNext(); - - std::error_code getOffset(uint32_t &Result) const; - std::error_code getLength(uint16_t &Result) const; - std::error_code getKind(uint16_t &Result) const; - - DataRefImpl getRawDataRefImpl() const; - const ObjectFile *getObjectFile() const; -}; -typedef content_iterator dice_iterator; - -/// ExportEntry encapsulates the current-state-of-the-walk used when doing a -/// non-recursive walk of the trie data structure. This allows you to iterate -/// across all exported symbols using: -/// for (const llvm::object::ExportEntry &AnExport : Obj->exports()) { -/// } -class ExportEntry { -public: - ExportEntry(ArrayRef Trie); - - StringRef name() const; - uint64_t flags() const; - uint64_t address() const; - uint64_t other() const; - StringRef otherName() const; - uint32_t nodeOffset() const; - - bool operator==(const ExportEntry &) const; - - void moveNext(); - -private: - friend class MachOObjectFile; - void moveToFirst(); - void moveToEnd(); - uint64_t readULEB128(const uint8_t *&p); - void pushDownUntilBottom(); - void pushNode(uint64_t Offset); - - // Represents a node in the mach-o exports trie. - struct NodeState { - NodeState(const uint8_t *Ptr); - const uint8_t *Start; - const uint8_t *Current; - uint64_t Flags; - uint64_t Address; - uint64_t Other; - const char *ImportName; - unsigned ChildCount; - unsigned NextChildIndex; - unsigned ParentStringLength; - bool IsExportNode; - }; - - ArrayRef Trie; - SmallString<256> CumulativeString; - SmallVector Stack; - bool Malformed; - bool Done; -}; -typedef content_iterator export_iterator; - -/// MachORebaseEntry encapsulates the current state in the decompression of -/// rebasing opcodes. This allows you to iterate through the compressed table of -/// rebasing using: -/// for (const llvm::object::MachORebaseEntry &Entry : Obj->rebaseTable()) { -/// } -class MachORebaseEntry { -public: - MachORebaseEntry(ArrayRef opcodes, bool is64Bit); - - uint32_t segmentIndex() const; - uint64_t segmentOffset() const; - StringRef typeName() const; - - bool operator==(const MachORebaseEntry &) const; - - void moveNext(); - -private: - friend class MachOObjectFile; - void moveToFirst(); - void moveToEnd(); - uint64_t readULEB128(); - - ArrayRef Opcodes; - const uint8_t *Ptr; - uint64_t SegmentOffset; - uint32_t SegmentIndex; - uint64_t RemainingLoopCount; - uint64_t AdvanceAmount; - uint8_t RebaseType; - uint8_t PointerSize; - bool Malformed; - bool Done; -}; -typedef content_iterator rebase_iterator; - -/// MachOBindEntry encapsulates the current state in the decompression of -/// binding opcodes. This allows you to iterate through the compressed table of -/// bindings using: -/// for (const llvm::object::MachOBindEntry &Entry : Obj->bindTable()) { -/// } -class MachOBindEntry { -public: - enum class Kind { Regular, Lazy, Weak }; - - MachOBindEntry(ArrayRef Opcodes, bool is64Bit, MachOBindEntry::Kind); - - uint32_t segmentIndex() const; - uint64_t segmentOffset() const; - StringRef typeName() const; - StringRef symbolName() const; - uint32_t flags() const; - int64_t addend() const; - int ordinal() const; - - bool operator==(const MachOBindEntry &) const; - - void moveNext(); - -private: - friend class MachOObjectFile; - void moveToFirst(); - void moveToEnd(); - uint64_t readULEB128(); - int64_t readSLEB128(); - - ArrayRef Opcodes; - const uint8_t *Ptr; - uint64_t SegmentOffset; - uint32_t SegmentIndex; - StringRef SymbolName; - int Ordinal; - uint32_t Flags; - int64_t Addend; - uint64_t RemainingLoopCount; - uint64_t AdvanceAmount; - uint8_t BindType; - uint8_t PointerSize; - Kind TableKind; - bool Malformed; - bool Done; -}; -typedef content_iterator bind_iterator; - -class MachOObjectFile : public ObjectFile { -public: - struct LoadCommandInfo { - const char *Ptr; // Where in memory the load command is. - MachO::load_command C; // The command itself. - }; - typedef SmallVector LoadCommandList; - typedef LoadCommandList::const_iterator load_command_iterator; - - static Expected> - create(MemoryBufferRef Object, bool IsLittleEndian, bool Is64Bits); - - void moveSymbolNext(DataRefImpl &Symb) const override; - - uint64_t getNValue(DataRefImpl Sym) const; - Expected getSymbolName(DataRefImpl Symb) const override; - - // MachO specific. - std::error_code getIndirectName(DataRefImpl Symb, StringRef &Res) const; - unsigned getSectionType(SectionRef Sec) const; - - Expected getSymbolAddress(DataRefImpl Symb) const override; - uint32_t getSymbolAlignment(DataRefImpl Symb) const override; - uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override; - Expected getSymbolType(DataRefImpl Symb) const override; - uint32_t getSymbolFlags(DataRefImpl Symb) const override; - Expected getSymbolSection(DataRefImpl Symb) const override; - unsigned getSymbolSectionID(SymbolRef Symb) const; - unsigned getSectionID(SectionRef Sec) const; - - void moveSectionNext(DataRefImpl &Sec) const override; - std::error_code getSectionName(DataRefImpl Sec, - StringRef &Res) const override; - uint64_t getSectionAddress(DataRefImpl Sec) const override; - uint64_t getSectionSize(DataRefImpl Sec) const override; - std::error_code getSectionContents(DataRefImpl Sec, - StringRef &Res) const override; - uint64_t getSectionAlignment(DataRefImpl Sec) const override; - bool isSectionCompressed(DataRefImpl Sec) const override; - bool isSectionText(DataRefImpl Sec) const override; - bool isSectionData(DataRefImpl Sec) const override; - bool isSectionBSS(DataRefImpl Sec) const override; - bool isSectionVirtual(DataRefImpl Sec) const override; - bool isSectionBitcode(DataRefImpl Sec) const override; - relocation_iterator section_rel_begin(DataRefImpl Sec) const override; - relocation_iterator section_rel_end(DataRefImpl Sec) const override; - - void moveRelocationNext(DataRefImpl &Rel) const override; - uint64_t getRelocationOffset(DataRefImpl Rel) const override; - symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override; - section_iterator getRelocationSection(DataRefImpl Rel) const; - uint64_t getRelocationType(DataRefImpl Rel) const override; - void getRelocationTypeName(DataRefImpl Rel, - SmallVectorImpl &Result) const override; - uint8_t getRelocationLength(DataRefImpl Rel) const; - - // MachO specific. - std::error_code getLibraryShortNameByIndex(unsigned Index, StringRef &) const; - - section_iterator getRelocationRelocatedSection(relocation_iterator Rel) const; - - // TODO: Would be useful to have an iterator based version - // of the load command interface too. - - basic_symbol_iterator symbol_begin_impl() const override; - basic_symbol_iterator symbol_end_impl() const override; - - // MachO specific. - basic_symbol_iterator getSymbolByIndex(unsigned Index) const; - uint64_t getSymbolIndex(DataRefImpl Symb) const; - - section_iterator section_begin() const override; - section_iterator section_end() const override; - - uint8_t getBytesInAddress() const override; - - StringRef getFileFormatName() const override; - unsigned getArch() const override; - SubtargetFeatures getFeatures() const override { return SubtargetFeatures(); } - Triple getArchTriple(const char **McpuDefault = nullptr) const; - - relocation_iterator section_rel_begin(unsigned Index) const; - relocation_iterator section_rel_end(unsigned Index) const; - - dice_iterator begin_dices() const; - dice_iterator end_dices() const; - - load_command_iterator begin_load_commands() const; - load_command_iterator end_load_commands() const; - iterator_range load_commands() const; - - /// For use iterating over all exported symbols. - iterator_range exports() const; - - /// For use examining a trie not in a MachOObjectFile. - static iterator_range exports(ArrayRef Trie); - - /// For use iterating over all rebase table entries. - iterator_range rebaseTable() const; - - /// For use examining rebase opcodes not in a MachOObjectFile. - static iterator_range rebaseTable(ArrayRef Opcodes, - bool is64); - - /// For use iterating over all bind table entries. - iterator_range bindTable() const; - - /// For use iterating over all lazy bind table entries. - iterator_range lazyBindTable() const; - - /// For use iterating over all lazy bind table entries. - iterator_range weakBindTable() const; - - /// For use examining bind opcodes not in a MachOObjectFile. - static iterator_range bindTable(ArrayRef Opcodes, - bool is64, - MachOBindEntry::Kind); - - - // In a MachO file, sections have a segment name. This is used in the .o - // files. They have a single segment, but this field specifies which segment - // a section should be put in in the final object. - StringRef getSectionFinalSegmentName(DataRefImpl Sec) const; - - // Names are stored as 16 bytes. These returns the raw 16 bytes without - // interpreting them as a C string. - ArrayRef getSectionRawName(DataRefImpl Sec) const; - ArrayRef getSectionRawFinalSegmentName(DataRefImpl Sec) const; - - // MachO specific Info about relocations. - bool isRelocationScattered(const MachO::any_relocation_info &RE) const; - unsigned getPlainRelocationSymbolNum( - const MachO::any_relocation_info &RE) const; - bool getPlainRelocationExternal(const MachO::any_relocation_info &RE) const; - bool getScatteredRelocationScattered( - const MachO::any_relocation_info &RE) const; - uint32_t getScatteredRelocationValue( - const MachO::any_relocation_info &RE) const; - uint32_t getScatteredRelocationType( - const MachO::any_relocation_info &RE) const; - unsigned getAnyRelocationAddress(const MachO::any_relocation_info &RE) const; - unsigned getAnyRelocationPCRel(const MachO::any_relocation_info &RE) const; - unsigned getAnyRelocationLength(const MachO::any_relocation_info &RE) const; - unsigned getAnyRelocationType(const MachO::any_relocation_info &RE) const; - SectionRef getAnyRelocationSection(const MachO::any_relocation_info &RE) const; - - // MachO specific structures. - MachO::section getSection(DataRefImpl DRI) const; - MachO::section_64 getSection64(DataRefImpl DRI) const; - MachO::section getSection(const LoadCommandInfo &L, unsigned Index) const; - MachO::section_64 getSection64(const LoadCommandInfo &L,unsigned Index) const; - MachO::nlist getSymbolTableEntry(DataRefImpl DRI) const; - MachO::nlist_64 getSymbol64TableEntry(DataRefImpl DRI) const; - - MachO::linkedit_data_command - getLinkeditDataLoadCommand(const LoadCommandInfo &L) const; - MachO::segment_command - getSegmentLoadCommand(const LoadCommandInfo &L) const; - MachO::segment_command_64 - getSegment64LoadCommand(const LoadCommandInfo &L) const; - MachO::linker_option_command - getLinkerOptionLoadCommand(const LoadCommandInfo &L) const; - MachO::version_min_command - getVersionMinLoadCommand(const LoadCommandInfo &L) const; - MachO::dylib_command - getDylibIDLoadCommand(const LoadCommandInfo &L) const; - MachO::dyld_info_command - getDyldInfoLoadCommand(const LoadCommandInfo &L) const; - MachO::dylinker_command - getDylinkerCommand(const LoadCommandInfo &L) const; - MachO::uuid_command - getUuidCommand(const LoadCommandInfo &L) const; - MachO::rpath_command - getRpathCommand(const LoadCommandInfo &L) const; - MachO::source_version_command - getSourceVersionCommand(const LoadCommandInfo &L) const; - MachO::entry_point_command - getEntryPointCommand(const LoadCommandInfo &L) const; - MachO::encryption_info_command - getEncryptionInfoCommand(const LoadCommandInfo &L) const; - MachO::encryption_info_command_64 - getEncryptionInfoCommand64(const LoadCommandInfo &L) const; - MachO::sub_framework_command - getSubFrameworkCommand(const LoadCommandInfo &L) const; - MachO::sub_umbrella_command - getSubUmbrellaCommand(const LoadCommandInfo &L) const; - MachO::sub_library_command - getSubLibraryCommand(const LoadCommandInfo &L) const; - MachO::sub_client_command - getSubClientCommand(const LoadCommandInfo &L) const; - MachO::routines_command - getRoutinesCommand(const LoadCommandInfo &L) const; - MachO::routines_command_64 - getRoutinesCommand64(const LoadCommandInfo &L) const; - MachO::thread_command - getThreadCommand(const LoadCommandInfo &L) const; - - MachO::any_relocation_info getRelocation(DataRefImpl Rel) const; - MachO::data_in_code_entry getDice(DataRefImpl Rel) const; - const MachO::mach_header &getHeader() const; - const MachO::mach_header_64 &getHeader64() const; - uint32_t - getIndirectSymbolTableEntry(const MachO::dysymtab_command &DLC, - unsigned Index) const; - MachO::data_in_code_entry getDataInCodeTableEntry(uint32_t DataOffset, - unsigned Index) const; - MachO::symtab_command getSymtabLoadCommand() const; - MachO::dysymtab_command getDysymtabLoadCommand() const; - MachO::linkedit_data_command getDataInCodeLoadCommand() const; - MachO::linkedit_data_command getLinkOptHintsLoadCommand() const; - ArrayRef getDyldInfoRebaseOpcodes() const; - ArrayRef getDyldInfoBindOpcodes() const; - ArrayRef getDyldInfoWeakBindOpcodes() const; - ArrayRef getDyldInfoLazyBindOpcodes() const; - ArrayRef getDyldInfoExportsTrie() const; - ArrayRef getUuid() const; - - StringRef getStringTableData() const; - bool is64Bit() const; - void ReadULEB128s(uint64_t Index, SmallVectorImpl &Out) const; - - static StringRef guessLibraryShortName(StringRef Name, bool &isFramework, - StringRef &Suffix); - - static Triple::ArchType getArch(uint32_t CPUType); - static Triple getArchTriple(uint32_t CPUType, uint32_t CPUSubType, - const char **McpuDefault = nullptr); - static bool isValidArch(StringRef ArchFlag); - static Triple getHostArch(); - - bool isRelocatableObject() const override; - - bool hasPageZeroSegment() const { return HasPageZeroSegment; } - - static bool classof(const Binary *v) { - return v->isMachO(); - } - - static uint32_t - getVersionMinMajor(MachO::version_min_command &C, bool SDK) { - uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version; - return (VersionOrSDK >> 16) & 0xffff; - } - - static uint32_t - getVersionMinMinor(MachO::version_min_command &C, bool SDK) { - uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version; - return (VersionOrSDK >> 8) & 0xff; - } - - static uint32_t - getVersionMinUpdate(MachO::version_min_command &C, bool SDK) { - uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version; - return VersionOrSDK & 0xff; - } - -private: - - MachOObjectFile(MemoryBufferRef Object, bool IsLittleEndian, bool Is64Bits, - Error &Err); - - uint64_t getSymbolValueImpl(DataRefImpl Symb) const override; - - union { - MachO::mach_header_64 Header64; - MachO::mach_header Header; - }; - typedef SmallVector SectionList; - SectionList Sections; - typedef SmallVector LibraryList; - LibraryList Libraries; - LoadCommandList LoadCommands; - typedef SmallVector LibraryShortName; - mutable LibraryShortName LibrariesShortNames; - const char *SymtabLoadCmd; - const char *DysymtabLoadCmd; - const char *DataInCodeLoadCmd; - const char *LinkOptHintsLoadCmd; - const char *DyldInfoLoadCmd; - const char *UuidLoadCmd; - bool HasPageZeroSegment; -}; - -/// DiceRef -inline DiceRef::DiceRef(DataRefImpl DiceP, const ObjectFile *Owner) - : DicePimpl(DiceP) , OwningObject(Owner) {} - -inline bool DiceRef::operator==(const DiceRef &Other) const { - return DicePimpl == Other.DicePimpl; -} - -inline bool DiceRef::operator<(const DiceRef &Other) const { - return DicePimpl < Other.DicePimpl; -} - -inline void DiceRef::moveNext() { - const MachO::data_in_code_entry *P = - reinterpret_cast(DicePimpl.p); - DicePimpl.p = reinterpret_cast(P + 1); -} - -// Since a Mach-O data in code reference, a DiceRef, can only be created when -// the OwningObject ObjectFile is a MachOObjectFile a static_cast<> is used for -// the methods that get the values of the fields of the reference. - -inline std::error_code DiceRef::getOffset(uint32_t &Result) const { - const MachOObjectFile *MachOOF = - static_cast(OwningObject); - MachO::data_in_code_entry Dice = MachOOF->getDice(DicePimpl); - Result = Dice.offset; - return std::error_code(); -} - -inline std::error_code DiceRef::getLength(uint16_t &Result) const { - const MachOObjectFile *MachOOF = - static_cast(OwningObject); - MachO::data_in_code_entry Dice = MachOOF->getDice(DicePimpl); - Result = Dice.length; - return std::error_code(); -} - -inline std::error_code DiceRef::getKind(uint16_t &Result) const { - const MachOObjectFile *MachOOF = - static_cast(OwningObject); - MachO::data_in_code_entry Dice = MachOOF->getDice(DicePimpl); - Result = Dice.kind; - return std::error_code(); -} - -inline DataRefImpl DiceRef::getRawDataRefImpl() const { - return DicePimpl; -} - -inline const ObjectFile *DiceRef::getObjectFile() const { - return OwningObject; -} - -} -} - -#endif diff --git a/llvm/include/llvm/Object/MachOUniversal.h b/llvm/include/llvm/Object/MachOUniversal.h deleted file mode 100644 index 7eb2af94..00000000 --- a/llvm/include/llvm/Object/MachOUniversal.h +++ /dev/null @@ -1,160 +0,0 @@ -//===- MachOUniversal.h - Mach-O universal binaries -------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares Mach-O fat/universal binaries. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_MACHOUNIVERSAL_H -#define LLVM_OBJECT_MACHOUNIVERSAL_H - -#include "llvm/ADT/Triple.h" -#include "llvm/ADT/iterator_range.h" -#include "llvm/Object/Archive.h" -#include "llvm/Object/Binary.h" -#include "llvm/Object/MachO.h" -#include "llvm/Support/MachO.h" - -namespace llvm { -class StringRef; - -namespace object { - -class MachOUniversalBinary : public Binary { - virtual void anchor(); - - uint32_t Magic; - uint32_t NumberOfObjects; -public: - class ObjectForArch { - const MachOUniversalBinary *Parent; - /// \brief Index of object in the universal binary. - uint32_t Index; - /// \brief Descriptor of the object. - MachO::fat_arch Header; - MachO::fat_arch_64 Header64; - - public: - ObjectForArch(const MachOUniversalBinary *Parent, uint32_t Index); - - void clear() { - Parent = nullptr; - Index = 0; - } - - bool operator==(const ObjectForArch &Other) const { - return (Parent == Other.Parent) && (Index == Other.Index); - } - - ObjectForArch getNext() const { return ObjectForArch(Parent, Index + 1); } - uint32_t getCPUType() const { - if (Parent->getMagic() == MachO::FAT_MAGIC) - return Header.cputype; - else // Parent->getMagic() == MachO::FAT_MAGIC_64 - return Header64.cputype; - } - uint32_t getCPUSubType() const { - if (Parent->getMagic() == MachO::FAT_MAGIC) - return Header.cpusubtype; - else // Parent->getMagic() == MachO::FAT_MAGIC_64 - return Header64.cpusubtype; - } - uint32_t getOffset() const { - if (Parent->getMagic() == MachO::FAT_MAGIC) - return Header.offset; - else // Parent->getMagic() == MachO::FAT_MAGIC_64 - return Header64.offset; - } - uint32_t getSize() const { - if (Parent->getMagic() == MachO::FAT_MAGIC) - return Header.size; - else // Parent->getMagic() == MachO::FAT_MAGIC_64 - return Header64.size; - } - uint32_t getAlign() const { - if (Parent->getMagic() == MachO::FAT_MAGIC) - return Header.align; - else // Parent->getMagic() == MachO::FAT_MAGIC_64 - return Header64.align; - } - uint32_t getReserved() const { - if (Parent->getMagic() == MachO::FAT_MAGIC) - return 0; - else // Parent->getMagic() == MachO::FAT_MAGIC_64 - return Header64.reserved; - } - std::string getArchTypeName() const { - if (Parent->getMagic() == MachO::FAT_MAGIC) { - Triple T = - MachOObjectFile::getArchTriple(Header.cputype, Header.cpusubtype); - return T.getArchName(); - } else { // Parent->getMagic() == MachO::FAT_MAGIC_64 - Triple T = - MachOObjectFile::getArchTriple(Header64.cputype, - Header64.cpusubtype); - return T.getArchName(); - } - } - - Expected> getAsObjectFile() const; - - Expected> getAsArchive() const; - }; - - class object_iterator { - ObjectForArch Obj; - public: - object_iterator(const ObjectForArch &Obj) : Obj(Obj) {} - const ObjectForArch *operator->() const { return &Obj; } - const ObjectForArch &operator*() const { return Obj; } - - bool operator==(const object_iterator &Other) const { - return Obj == Other.Obj; - } - bool operator!=(const object_iterator &Other) const { - return !(*this == Other); - } - - object_iterator& operator++() { // Preincrement - Obj = Obj.getNext(); - return *this; - } - }; - - MachOUniversalBinary(MemoryBufferRef Souce, Error &Err); - static Expected> - create(MemoryBufferRef Source); - - object_iterator begin_objects() const { - return ObjectForArch(this, 0); - } - object_iterator end_objects() const { - return ObjectForArch(nullptr, 0); - } - - iterator_range objects() const { - return make_range(begin_objects(), end_objects()); - } - - uint32_t getMagic() const { return Magic; } - uint32_t getNumberOfObjects() const { return NumberOfObjects; } - - // Cast methods. - static inline bool classof(Binary const *V) { - return V->isMachOUniversalBinary(); - } - - Expected> - getObjectForArch(StringRef ArchName) const; -}; - -} -} - -#endif diff --git a/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h b/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h deleted file mode 100644 index d021fb29..00000000 --- a/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h +++ /dev/null @@ -1,103 +0,0 @@ -//===- ModuleSummaryIndexObjectFile.h - Summary index file implementation -=// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the ModuleSummaryIndexObjectFile template class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_MODULESUMMARYINDEXOBJECTFILE_H -#define LLVM_OBJECT_MODULESUMMARYINDEXOBJECTFILE_H - -#include "llvm/IR/DiagnosticInfo.h" -#include "llvm/Object/SymbolicFile.h" - -namespace llvm { -class ModuleSummaryIndex; -class Module; - -namespace object { -class ObjectFile; - -/// This class is used to read just the module summary index related -/// sections out of the given object (which may contain a single module's -/// bitcode or be a combined index bitcode file). It builds a ModuleSummaryIndex -/// object. -class ModuleSummaryIndexObjectFile : public SymbolicFile { - std::unique_ptr Index; - -public: - ModuleSummaryIndexObjectFile(MemoryBufferRef Object, - std::unique_ptr I); - ~ModuleSummaryIndexObjectFile() override; - - // TODO: Walk through GlobalValueMap entries for symbols. - // However, currently these interfaces are not used by any consumers. - void moveSymbolNext(DataRefImpl &Symb) const override { - llvm_unreachable("not implemented"); - } - std::error_code printSymbolName(raw_ostream &OS, - DataRefImpl Symb) const override { - llvm_unreachable("not implemented"); - return std::error_code(); - } - uint32_t getSymbolFlags(DataRefImpl Symb) const override { - llvm_unreachable("not implemented"); - return 0; - } - basic_symbol_iterator symbol_begin_impl() const override { - llvm_unreachable("not implemented"); - return basic_symbol_iterator(BasicSymbolRef()); - } - basic_symbol_iterator symbol_end_impl() const override { - llvm_unreachable("not implemented"); - return basic_symbol_iterator(BasicSymbolRef()); - } - - const ModuleSummaryIndex &getIndex() const { - return const_cast(this)->getIndex(); - } - ModuleSummaryIndex &getIndex() { return *Index; } - std::unique_ptr takeIndex(); - - static inline bool classof(const Binary *v) { - return v->isModuleSummaryIndex(); - } - - /// \brief Finds and returns bitcode embedded in the given object file, or an - /// error code if not found. - static ErrorOr findBitcodeInObject(const ObjectFile &Obj); - - /// \brief Finds and returns bitcode in the given memory buffer (which may - /// be either a bitcode file or a native object file with embedded bitcode), - /// or an error code if not found. - static ErrorOr - findBitcodeInMemBuffer(MemoryBufferRef Object); - - /// \brief Looks for summary sections in the given memory buffer, - /// returns true if found, else false. - static bool hasGlobalValueSummaryInMemBuffer( - MemoryBufferRef Object, - const DiagnosticHandlerFunction &DiagnosticHandler); - - /// \brief Parse module summary index in the given memory buffer. - /// Return new ModuleSummaryIndexObjectFile instance containing parsed module - /// summary/index. - static ErrorOr> - create(MemoryBufferRef Object, - const DiagnosticHandlerFunction &DiagnosticHandler); -}; -} - -/// Parse the module summary index out of an IR file and return the module -/// summary index object if found, or nullptr if not. -ErrorOr> getModuleSummaryIndexForFile( - StringRef Path, const DiagnosticHandlerFunction &DiagnosticHandler); -} - -#endif diff --git a/llvm/include/llvm/Object/ObjectFile.h b/llvm/include/llvm/Object/ObjectFile.h deleted file mode 100644 index 6272a5f0..00000000 --- a/llvm/include/llvm/Object/ObjectFile.h +++ /dev/null @@ -1,473 +0,0 @@ -//===- ObjectFile.h - File format independent object file -------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares a file format independent ObjectFile class. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_OBJECTFILE_H -#define LLVM_OBJECT_OBJECTFILE_H - -#include "llvm/ADT/StringRef.h" -#include "llvm/MC/SubtargetFeature.h" -#include "llvm/Object/SymbolicFile.h" -#include "llvm/Support/DataTypes.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/FileSystem.h" -#include "llvm/Support/MemoryBuffer.h" -#include - -namespace llvm { -namespace object { - -class ObjectFile; -class COFFObjectFile; -class MachOObjectFile; - -class SymbolRef; -class symbol_iterator; -class SectionRef; -typedef content_iterator section_iterator; - -/// This is a value type class that represents a single relocation in the list -/// of relocations in the object file. -class RelocationRef { - DataRefImpl RelocationPimpl; - const ObjectFile *OwningObject; - -public: - RelocationRef() : OwningObject(nullptr) { } - - RelocationRef(DataRefImpl RelocationP, const ObjectFile *Owner); - - bool operator==(const RelocationRef &Other) const; - - void moveNext(); - - uint64_t getOffset() const; - symbol_iterator getSymbol() const; - uint64_t getType() const; - - /// @brief Get a string that represents the type of this relocation. - /// - /// This is for display purposes only. - void getTypeName(SmallVectorImpl &Result) const; - - DataRefImpl getRawDataRefImpl() const; - const ObjectFile *getObject() const; -}; -typedef content_iterator relocation_iterator; - -/// This is a value type class that represents a single section in the list of -/// sections in the object file. -class SectionRef { - friend class SymbolRef; - DataRefImpl SectionPimpl; - const ObjectFile *OwningObject; - -public: - SectionRef() : OwningObject(nullptr) { } - - SectionRef(DataRefImpl SectionP, const ObjectFile *Owner); - - bool operator==(const SectionRef &Other) const; - bool operator!=(const SectionRef &Other) const; - bool operator<(const SectionRef &Other) const; - - void moveNext(); - - std::error_code getName(StringRef &Result) const; - uint64_t getAddress() const; - uint64_t getSize() const; - std::error_code getContents(StringRef &Result) const; - - /// @brief Get the alignment of this section as the actual value (not log 2). - uint64_t getAlignment() const; - - bool isCompressed() const; - bool isText() const; - bool isData() const; - bool isBSS() const; - bool isVirtual() const; - bool isBitcode() const; - - bool containsSymbol(SymbolRef S) const; - - relocation_iterator relocation_begin() const; - relocation_iterator relocation_end() const; - iterator_range relocations() const { - return make_range(relocation_begin(), relocation_end()); - } - section_iterator getRelocatedSection() const; - - DataRefImpl getRawDataRefImpl() const; - const ObjectFile *getObject() const; -}; - -/// This is a value type class that represents a single symbol in the list of -/// symbols in the object file. -class SymbolRef : public BasicSymbolRef { - friend class SectionRef; - -public: - SymbolRef() : BasicSymbolRef() {} - - enum Type { - ST_Unknown, // Type not specified - ST_Data, - ST_Debug, - ST_File, - ST_Function, - ST_Other - }; - - SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner); - SymbolRef(const BasicSymbolRef &B) : BasicSymbolRef(B) { - assert(isa(BasicSymbolRef::getObject())); - } - - Expected getName() const; - /// Returns the symbol virtual address (i.e. address at which it will be - /// mapped). - Expected getAddress() const; - - /// Return the value of the symbol depending on the object this can be an - /// offset or a virtual address. - uint64_t getValue() const; - - /// @brief Get the alignment of this symbol as the actual value (not log 2). - uint32_t getAlignment() const; - uint64_t getCommonSize() const; - Expected getType() const; - - /// @brief Get section this symbol is defined in reference to. Result is - /// end_sections() if it is undefined or is an absolute symbol. - Expected getSection() const; - - const ObjectFile *getObject() const; -}; - -class symbol_iterator : public basic_symbol_iterator { -public: - symbol_iterator(SymbolRef Sym) : basic_symbol_iterator(Sym) {} - symbol_iterator(const basic_symbol_iterator &B) - : basic_symbol_iterator(SymbolRef(B->getRawDataRefImpl(), - cast(B->getObject()))) {} - - const SymbolRef *operator->() const { - const BasicSymbolRef &P = basic_symbol_iterator::operator *(); - return static_cast(&P); - } - - const SymbolRef &operator*() const { - const BasicSymbolRef &P = basic_symbol_iterator::operator *(); - return static_cast(P); - } -}; - -/// This class is the base class for all object file types. Concrete instances -/// of this object are created by createObjectFile, which figures out which type -/// to create. -class ObjectFile : public SymbolicFile { - virtual void anchor(); - ObjectFile() = delete; - ObjectFile(const ObjectFile &other) = delete; - -protected: - ObjectFile(unsigned int Type, MemoryBufferRef Source); - - const uint8_t *base() const { - return reinterpret_cast(Data.getBufferStart()); - } - - // These functions are for SymbolRef to call internally. The main goal of - // this is to allow SymbolRef::SymbolPimpl to point directly to the symbol - // entry in the memory mapped object file. SymbolPimpl cannot contain any - // virtual functions because then it could not point into the memory mapped - // file. - // - // Implementations assume that the DataRefImpl is valid and has not been - // modified externally. It's UB otherwise. - friend class SymbolRef; - virtual Expected getSymbolName(DataRefImpl Symb) const = 0; - std::error_code printSymbolName(raw_ostream &OS, - DataRefImpl Symb) const override; - virtual Expected getSymbolAddress(DataRefImpl Symb) const = 0; - virtual uint64_t getSymbolValueImpl(DataRefImpl Symb) const = 0; - virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const; - virtual uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const = 0; - virtual Expected getSymbolType(DataRefImpl Symb) const = 0; - virtual Expected - getSymbolSection(DataRefImpl Symb) const = 0; - - // Same as above for SectionRef. - friend class SectionRef; - virtual void moveSectionNext(DataRefImpl &Sec) const = 0; - virtual std::error_code getSectionName(DataRefImpl Sec, - StringRef &Res) const = 0; - virtual uint64_t getSectionAddress(DataRefImpl Sec) const = 0; - virtual uint64_t getSectionSize(DataRefImpl Sec) const = 0; - virtual std::error_code getSectionContents(DataRefImpl Sec, - StringRef &Res) const = 0; - virtual uint64_t getSectionAlignment(DataRefImpl Sec) const = 0; - virtual bool isSectionCompressed(DataRefImpl Sec) const = 0; - virtual bool isSectionText(DataRefImpl Sec) const = 0; - virtual bool isSectionData(DataRefImpl Sec) const = 0; - virtual bool isSectionBSS(DataRefImpl Sec) const = 0; - // A section is 'virtual' if its contents aren't present in the object image. - virtual bool isSectionVirtual(DataRefImpl Sec) const = 0; - virtual bool isSectionBitcode(DataRefImpl Sec) const; - virtual relocation_iterator section_rel_begin(DataRefImpl Sec) const = 0; - virtual relocation_iterator section_rel_end(DataRefImpl Sec) const = 0; - virtual section_iterator getRelocatedSection(DataRefImpl Sec) const; - - // Same as above for RelocationRef. - friend class RelocationRef; - virtual void moveRelocationNext(DataRefImpl &Rel) const = 0; - virtual uint64_t getRelocationOffset(DataRefImpl Rel) const = 0; - virtual symbol_iterator getRelocationSymbol(DataRefImpl Rel) const = 0; - virtual uint64_t getRelocationType(DataRefImpl Rel) const = 0; - virtual void getRelocationTypeName(DataRefImpl Rel, - SmallVectorImpl &Result) const = 0; - - uint64_t getSymbolValue(DataRefImpl Symb) const; - -public: - uint64_t getCommonSymbolSize(DataRefImpl Symb) const { - assert(getSymbolFlags(Symb) & SymbolRef::SF_Common); - return getCommonSymbolSizeImpl(Symb); - } - - typedef iterator_range symbol_iterator_range; - symbol_iterator_range symbols() const { - return symbol_iterator_range(symbol_begin(), symbol_end()); - } - - virtual section_iterator section_begin() const = 0; - virtual section_iterator section_end() const = 0; - - typedef iterator_range section_iterator_range; - section_iterator_range sections() const { - return section_iterator_range(section_begin(), section_end()); - } - - /// @brief The number of bytes used to represent an address in this object - /// file format. - virtual uint8_t getBytesInAddress() const = 0; - - virtual StringRef getFileFormatName() const = 0; - virtual /* Triple::ArchType */ unsigned getArch() const = 0; - virtual SubtargetFeatures getFeatures() const = 0; - - /// Returns platform-specific object flags, if any. - virtual std::error_code getPlatformFlags(unsigned &Result) const { - Result = 0; - return object_error::invalid_file_type; - } - - /// True if this is a relocatable object (.o/.obj). - virtual bool isRelocatableObject() const = 0; - - /// @returns Pointer to ObjectFile subclass to handle this type of object. - /// @param ObjectPath The path to the object file. ObjectPath.isObject must - /// return true. - /// @brief Create ObjectFile from path. - static Expected> - createObjectFile(StringRef ObjectPath); - - static Expected> - createObjectFile(MemoryBufferRef Object, sys::fs::file_magic Type); - static Expected> - createObjectFile(MemoryBufferRef Object) { - return createObjectFile(Object, sys::fs::file_magic::unknown); - } - - - static inline bool classof(const Binary *v) { - return v->isObject(); - } - - static ErrorOr> - createCOFFObjectFile(MemoryBufferRef Object); - - static ErrorOr> - createELFObjectFile(MemoryBufferRef Object); - - static Expected> - createMachOObjectFile(MemoryBufferRef Object); - -}; - -// Inline function definitions. -inline SymbolRef::SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner) - : BasicSymbolRef(SymbolP, Owner) {} - -inline Expected SymbolRef::getName() const { - return getObject()->getSymbolName(getRawDataRefImpl()); -} - -inline Expected SymbolRef::getAddress() const { - return getObject()->getSymbolAddress(getRawDataRefImpl()); -} - -inline uint64_t SymbolRef::getValue() const { - return getObject()->getSymbolValue(getRawDataRefImpl()); -} - -inline uint32_t SymbolRef::getAlignment() const { - return getObject()->getSymbolAlignment(getRawDataRefImpl()); -} - -inline uint64_t SymbolRef::getCommonSize() const { - return getObject()->getCommonSymbolSize(getRawDataRefImpl()); -} - -inline Expected SymbolRef::getSection() const { - return getObject()->getSymbolSection(getRawDataRefImpl()); -} - -inline Expected SymbolRef::getType() const { - return getObject()->getSymbolType(getRawDataRefImpl()); -} - -inline const ObjectFile *SymbolRef::getObject() const { - const SymbolicFile *O = BasicSymbolRef::getObject(); - return cast(O); -} - - -/// SectionRef -inline SectionRef::SectionRef(DataRefImpl SectionP, - const ObjectFile *Owner) - : SectionPimpl(SectionP) - , OwningObject(Owner) {} - -inline bool SectionRef::operator==(const SectionRef &Other) const { - return SectionPimpl == Other.SectionPimpl; -} - -inline bool SectionRef::operator!=(const SectionRef &Other) const { - return SectionPimpl != Other.SectionPimpl; -} - -inline bool SectionRef::operator<(const SectionRef &Other) const { - return SectionPimpl < Other.SectionPimpl; -} - -inline void SectionRef::moveNext() { - return OwningObject->moveSectionNext(SectionPimpl); -} - -inline std::error_code SectionRef::getName(StringRef &Result) const { - return OwningObject->getSectionName(SectionPimpl, Result); -} - -inline uint64_t SectionRef::getAddress() const { - return OwningObject->getSectionAddress(SectionPimpl); -} - -inline uint64_t SectionRef::getSize() const { - return OwningObject->getSectionSize(SectionPimpl); -} - -inline std::error_code SectionRef::getContents(StringRef &Result) const { - return OwningObject->getSectionContents(SectionPimpl, Result); -} - -inline uint64_t SectionRef::getAlignment() const { - return OwningObject->getSectionAlignment(SectionPimpl); -} - -inline bool SectionRef::isCompressed() const { - return OwningObject->isSectionCompressed(SectionPimpl); -} - -inline bool SectionRef::isText() const { - return OwningObject->isSectionText(SectionPimpl); -} - -inline bool SectionRef::isData() const { - return OwningObject->isSectionData(SectionPimpl); -} - -inline bool SectionRef::isBSS() const { - return OwningObject->isSectionBSS(SectionPimpl); -} - -inline bool SectionRef::isVirtual() const { - return OwningObject->isSectionVirtual(SectionPimpl); -} - -inline bool SectionRef::isBitcode() const { - return OwningObject->isSectionBitcode(SectionPimpl); -} - -inline relocation_iterator SectionRef::relocation_begin() const { - return OwningObject->section_rel_begin(SectionPimpl); -} - -inline relocation_iterator SectionRef::relocation_end() const { - return OwningObject->section_rel_end(SectionPimpl); -} - -inline section_iterator SectionRef::getRelocatedSection() const { - return OwningObject->getRelocatedSection(SectionPimpl); -} - -inline DataRefImpl SectionRef::getRawDataRefImpl() const { - return SectionPimpl; -} - -inline const ObjectFile *SectionRef::getObject() const { - return OwningObject; -} - -/// RelocationRef -inline RelocationRef::RelocationRef(DataRefImpl RelocationP, - const ObjectFile *Owner) - : RelocationPimpl(RelocationP) - , OwningObject(Owner) {} - -inline bool RelocationRef::operator==(const RelocationRef &Other) const { - return RelocationPimpl == Other.RelocationPimpl; -} - -inline void RelocationRef::moveNext() { - return OwningObject->moveRelocationNext(RelocationPimpl); -} - -inline uint64_t RelocationRef::getOffset() const { - return OwningObject->getRelocationOffset(RelocationPimpl); -} - -inline symbol_iterator RelocationRef::getSymbol() const { - return OwningObject->getRelocationSymbol(RelocationPimpl); -} - -inline uint64_t RelocationRef::getType() const { - return OwningObject->getRelocationType(RelocationPimpl); -} - -inline void RelocationRef::getTypeName(SmallVectorImpl &Result) const { - return OwningObject->getRelocationTypeName(RelocationPimpl, Result); -} - -inline DataRefImpl RelocationRef::getRawDataRefImpl() const { - return RelocationPimpl; -} - -inline const ObjectFile *RelocationRef::getObject() const { - return OwningObject; -} - - -} // end namespace object -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Object/RelocVisitor.h b/llvm/include/llvm/Object/RelocVisitor.h deleted file mode 100644 index 5e0df98d..00000000 --- a/llvm/include/llvm/Object/RelocVisitor.h +++ /dev/null @@ -1,434 +0,0 @@ -//===-- RelocVisitor.h - Visitor for object file relocations -*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file provides a wrapper around all the different types of relocations -// in different file formats, such that a client can handle them in a unified -// manner by only implementing a minimal number of functions. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_RELOCVISITOR_H -#define LLVM_OBJECT_RELOCVISITOR_H - -#include "llvm/Object/COFF.h" -#include "llvm/Object/ELFObjectFile.h" -#include "llvm/Object/MachO.h" -#include "llvm/Object/ObjectFile.h" -#include "llvm/Support/Debug.h" -#include "llvm/Support/ELF.h" -#include "llvm/Support/MachO.h" -#include "llvm/Support/raw_ostream.h" - -namespace llvm { -namespace object { - -struct RelocToApply { - // The computed value after applying the relevant relocations. - int64_t Value; - - // The width of the value; how many bytes to touch when applying the - // relocation. - char Width; - RelocToApply(int64_t Value, char Width) : Value(Value), Width(Width) {} - RelocToApply() : Value(0), Width(0) {} -}; - -/// @brief Base class for object file relocation visitors. -class RelocVisitor { -public: - explicit RelocVisitor(const ObjectFile &Obj) - : ObjToVisit(Obj), HasError(false) {} - - // TODO: Should handle multiple applied relocations via either passing in the - // previously computed value or just count paired relocations as a single - // visit. - RelocToApply visit(uint32_t RelocType, RelocationRef R, uint64_t Value = 0) { - if (isa(ObjToVisit)) - return visitELF(RelocType, R, Value); - if (isa(ObjToVisit)) - return visitCOFF(RelocType, R, Value); - if (isa(ObjToVisit)) - return visitMachO(RelocType, R, Value); - - HasError = true; - return RelocToApply(); - } - - bool error() { return HasError; } - -private: - const ObjectFile &ObjToVisit; - bool HasError; - - RelocToApply visitELF(uint32_t RelocType, RelocationRef R, uint64_t Value) { - if (ObjToVisit.getBytesInAddress() == 8) { // 64-bit object file - switch (ObjToVisit.getArch()) { - case Triple::x86_64: - switch (RelocType) { - case llvm::ELF::R_X86_64_NONE: - return visitELF_X86_64_NONE(R); - case llvm::ELF::R_X86_64_64: - return visitELF_X86_64_64(R, Value); - case llvm::ELF::R_X86_64_PC32: - return visitELF_X86_64_PC32(R, Value); - case llvm::ELF::R_X86_64_32: - return visitELF_X86_64_32(R, Value); - case llvm::ELF::R_X86_64_32S: - return visitELF_X86_64_32S(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::aarch64: - switch (RelocType) { - case llvm::ELF::R_AARCH64_ABS32: - return visitELF_AARCH64_ABS32(R, Value); - case llvm::ELF::R_AARCH64_ABS64: - return visitELF_AARCH64_ABS64(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::mips64el: - case Triple::mips64: - switch (RelocType) { - case llvm::ELF::R_MIPS_32: - return visitELF_MIPS64_32(R, Value); - case llvm::ELF::R_MIPS_64: - return visitELF_MIPS64_64(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::ppc64le: - case Triple::ppc64: - switch (RelocType) { - case llvm::ELF::R_PPC64_ADDR32: - return visitELF_PPC64_ADDR32(R, Value); - case llvm::ELF::R_PPC64_ADDR64: - return visitELF_PPC64_ADDR64(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::systemz: - switch (RelocType) { - case llvm::ELF::R_390_32: - return visitELF_390_32(R, Value); - case llvm::ELF::R_390_64: - return visitELF_390_64(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::sparcv9: - switch (RelocType) { - case llvm::ELF::R_SPARC_32: - case llvm::ELF::R_SPARC_UA32: - return visitELF_SPARCV9_32(R, Value); - case llvm::ELF::R_SPARC_64: - case llvm::ELF::R_SPARC_UA64: - return visitELF_SPARCV9_64(R, Value); - default: - HasError = true; - return RelocToApply(); - } - default: - HasError = true; - return RelocToApply(); - } - } else if (ObjToVisit.getBytesInAddress() == 4) { // 32-bit object file - switch (ObjToVisit.getArch()) { - case Triple::x86: - switch (RelocType) { - case llvm::ELF::R_386_NONE: - return visitELF_386_NONE(R); - case llvm::ELF::R_386_32: - return visitELF_386_32(R, Value); - case llvm::ELF::R_386_PC32: - return visitELF_386_PC32(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::ppc: - switch (RelocType) { - case llvm::ELF::R_PPC_ADDR32: - return visitELF_PPC_ADDR32(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::arm: - case Triple::armeb: - switch (RelocType) { - default: - HasError = true; - return RelocToApply(); - case llvm::ELF::R_ARM_ABS32: - return visitELF_ARM_ABS32(R, Value); - } - case Triple::lanai: - switch (RelocType) { - case llvm::ELF::R_LANAI_32: - return visitELF_Lanai_32(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::mipsel: - case Triple::mips: - switch (RelocType) { - case llvm::ELF::R_MIPS_32: - return visitELF_MIPS_32(R, Value); - default: - HasError = true; - return RelocToApply(); - } - case Triple::sparc: - switch (RelocType) { - case llvm::ELF::R_SPARC_32: - case llvm::ELF::R_SPARC_UA32: - return visitELF_SPARC_32(R, Value); - default: - HasError = true; - return RelocToApply(); - } - default: - HasError = true; - return RelocToApply(); - } - } else { - report_fatal_error("Invalid word size in object file"); - } - } - - RelocToApply visitCOFF(uint32_t RelocType, RelocationRef R, uint64_t Value) { - switch (ObjToVisit.getArch()) { - case Triple::x86: - switch (RelocType) { - case COFF::IMAGE_REL_I386_SECREL: - return visitCOFF_I386_SECREL(R, Value); - case COFF::IMAGE_REL_I386_DIR32: - return visitCOFF_I386_DIR32(R, Value); - } - break; - case Triple::x86_64: - switch (RelocType) { - case COFF::IMAGE_REL_AMD64_SECREL: - return visitCOFF_AMD64_SECREL(R, Value); - case COFF::IMAGE_REL_AMD64_ADDR64: - return visitCOFF_AMD64_ADDR64(R, Value); - } - break; - } - HasError = true; - return RelocToApply(); - } - - RelocToApply visitMachO(uint32_t RelocType, RelocationRef R, uint64_t Value) { - switch (ObjToVisit.getArch()) { - default: break; - case Triple::x86_64: - switch (RelocType) { - default: break; - case MachO::X86_64_RELOC_UNSIGNED: - return visitMACHO_X86_64_UNSIGNED(R, Value); - } - } - HasError = true; - return RelocToApply(); - } - - int64_t getELFAddend(RelocationRef R) { - ErrorOr AddendOrErr = ELFRelocationRef(R).getAddend(); - if (std::error_code EC = AddendOrErr.getError()) - report_fatal_error(EC.message()); - return *AddendOrErr; - } - - uint8_t getLengthMachO64(RelocationRef R) { - const MachOObjectFile *Obj = cast(R.getObject()); - return Obj->getRelocationLength(R.getRawDataRefImpl()); - } - - /// Operations - - /// 386-ELF - RelocToApply visitELF_386_NONE(RelocationRef R) { - return RelocToApply(0, 0); - } - - // Ideally the Addend here will be the addend in the data for - // the relocation. It's not actually the case for Rel relocations. - RelocToApply visitELF_386_32(RelocationRef R, uint64_t Value) { - return RelocToApply(Value, 4); - } - - RelocToApply visitELF_386_PC32(RelocationRef R, uint64_t Value) { - uint64_t Address = R.getOffset(); - return RelocToApply(Value - Address, 4); - } - - /// X86-64 ELF - RelocToApply visitELF_X86_64_NONE(RelocationRef R) { - return RelocToApply(0, 0); - } - RelocToApply visitELF_X86_64_64(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - return RelocToApply(Value + Addend, 8); - } - RelocToApply visitELF_X86_64_PC32(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - uint64_t Address = R.getOffset(); - return RelocToApply(Value + Addend - Address, 4); - } - RelocToApply visitELF_X86_64_32(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - uint32_t Res = (Value + Addend) & 0xFFFFFFFF; - return RelocToApply(Res, 4); - } - RelocToApply visitELF_X86_64_32S(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - int32_t Res = (Value + Addend) & 0xFFFFFFFF; - return RelocToApply(Res, 4); - } - - /// PPC64 ELF - RelocToApply visitELF_PPC64_ADDR32(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - uint32_t Res = (Value + Addend) & 0xFFFFFFFF; - return RelocToApply(Res, 4); - } - RelocToApply visitELF_PPC64_ADDR64(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - return RelocToApply(Value + Addend, 8); - } - - /// PPC32 ELF - RelocToApply visitELF_PPC_ADDR32(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - uint32_t Res = (Value + Addend) & 0xFFFFFFFF; - return RelocToApply(Res, 4); - } - - /// Lanai ELF - RelocToApply visitELF_Lanai_32(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - uint32_t Res = (Value + Addend) & 0xFFFFFFFF; - return RelocToApply(Res, 4); - } - - /// MIPS ELF - RelocToApply visitELF_MIPS_32(RelocationRef R, uint64_t Value) { - uint32_t Res = Value & 0xFFFFFFFF; - return RelocToApply(Res, 4); - } - - /// MIPS64 ELF - RelocToApply visitELF_MIPS64_32(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - uint32_t Res = (Value + Addend) & 0xFFFFFFFF; - return RelocToApply(Res, 4); - } - - RelocToApply visitELF_MIPS64_64(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - uint64_t Res = (Value + Addend); - return RelocToApply(Res, 8); - } - - // AArch64 ELF - RelocToApply visitELF_AARCH64_ABS32(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - int64_t Res = Value + Addend; - - // Overflow check allows for both signed and unsigned interpretation. - if (Res < INT32_MIN || Res > UINT32_MAX) - HasError = true; - - return RelocToApply(static_cast(Res), 4); - } - - RelocToApply visitELF_AARCH64_ABS64(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - return RelocToApply(Value + Addend, 8); - } - - // SystemZ ELF - RelocToApply visitELF_390_32(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - int64_t Res = Value + Addend; - - // Overflow check allows for both signed and unsigned interpretation. - if (Res < INT32_MIN || Res > UINT32_MAX) - HasError = true; - - return RelocToApply(static_cast(Res), 4); - } - - RelocToApply visitELF_390_64(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - return RelocToApply(Value + Addend, 8); - } - - RelocToApply visitELF_SPARC_32(RelocationRef R, uint32_t Value) { - int32_t Addend = getELFAddend(R); - return RelocToApply(Value + Addend, 4); - } - - RelocToApply visitELF_SPARCV9_32(RelocationRef R, uint64_t Value) { - int32_t Addend = getELFAddend(R); - return RelocToApply(Value + Addend, 4); - } - - RelocToApply visitELF_SPARCV9_64(RelocationRef R, uint64_t Value) { - int64_t Addend = getELFAddend(R); - return RelocToApply(Value + Addend, 8); - } - - RelocToApply visitELF_ARM_ABS32(RelocationRef R, uint64_t Value) { - int64_t Res = Value; - - // Overflow check allows for both signed and unsigned interpretation. - if (Res < INT32_MIN || Res > UINT32_MAX) - HasError = true; - - return RelocToApply(static_cast(Res), 4); - } - - /// I386 COFF - RelocToApply visitCOFF_I386_SECREL(RelocationRef R, uint64_t Value) { - return RelocToApply(static_cast(Value), /*Width=*/4); - } - - RelocToApply visitCOFF_I386_DIR32(RelocationRef R, uint64_t Value) { - return RelocToApply(static_cast(Value), /*Width=*/4); - } - - /// AMD64 COFF - RelocToApply visitCOFF_AMD64_SECREL(RelocationRef R, uint64_t Value) { - return RelocToApply(static_cast(Value), /*Width=*/4); - } - - RelocToApply visitCOFF_AMD64_ADDR64(RelocationRef R, uint64_t Value) { - return RelocToApply(Value, /*Width=*/8); - } - - // X86_64 MachO - RelocToApply visitMACHO_X86_64_UNSIGNED(RelocationRef R, uint64_t Value) { - uint8_t Length = getLengthMachO64(R); - Length = 1< - -namespace llvm { - -template -class StackMapV1Parser { -public: - - template - class AccessorIterator { - public: - - AccessorIterator(AccessorT A) : A(A) {} - AccessorIterator& operator++() { A = A.next(); return *this; } - AccessorIterator operator++(int) { - auto tmp = *this; - ++*this; - return tmp; - } - - bool operator==(const AccessorIterator &Other) { - return A.P == Other.A.P; - } - - bool operator!=(const AccessorIterator &Other) { return !(*this == Other); } - - AccessorT& operator*() { return A; } - AccessorT* operator->() { return &A; } - - private: - AccessorT A; - }; - - /// Accessor for function records. - class FunctionAccessor { - friend class StackMapV1Parser; - public: - - /// Get the function address. - uint64_t getFunctionAddress() const { - return read(P); - } - - /// Get the function's stack size. - uint32_t getStackSize() const { - return read(P + sizeof(uint64_t)); - } - - private: - FunctionAccessor(const uint8_t *P) : P(P) {} - - const static int FunctionAccessorSize = 2 * sizeof(uint64_t); - - FunctionAccessor next() const { - return FunctionAccessor(P + FunctionAccessorSize); - } - - const uint8_t *P; - }; - - /// Accessor for constants. - class ConstantAccessor { - friend class StackMapV1Parser; - public: - - /// Return the value of this constant. - uint64_t getValue() const { return read(P); } - - private: - - ConstantAccessor(const uint8_t *P) : P(P) {} - - const static int ConstantAccessorSize = sizeof(uint64_t); - - ConstantAccessor next() const { - return ConstantAccessor(P + ConstantAccessorSize); - } - - const uint8_t *P; - }; - - // Forward-declare RecordAccessor so we can friend it below. - class RecordAccessor; - - enum class LocationKind : uint8_t { - Register = 1, Direct = 2, Indirect = 3, Constant = 4, ConstantIndex = 5 - }; - - - /// Accessor for location records. - class LocationAccessor { - friend class StackMapV1Parser; - friend class RecordAccessor; - public: - - /// Get the Kind for this location. - LocationKind getKind() const { - return LocationKind(P[KindOffset]); - } - - /// Get the Dwarf register number for this location. - uint16_t getDwarfRegNum() const { - return read(P + DwarfRegNumOffset); - } - - /// Get the small-constant for this location. (Kind must be Constant). - uint32_t getSmallConstant() const { - assert(getKind() == LocationKind::Constant && "Not a small constant."); - return read(P + SmallConstantOffset); - } - - /// Get the constant-index for this location. (Kind must be ConstantIndex). - uint32_t getConstantIndex() const { - assert(getKind() == LocationKind::ConstantIndex && - "Not a constant-index."); - return read(P + SmallConstantOffset); - } - - /// Get the offset for this location. (Kind must be Direct or Indirect). - int32_t getOffset() const { - assert((getKind() == LocationKind::Direct || - getKind() == LocationKind::Indirect) && - "Not direct or indirect."); - return read(P + SmallConstantOffset); - } - - private: - - LocationAccessor(const uint8_t *P) : P(P) {} - - LocationAccessor next() const { - return LocationAccessor(P + LocationAccessorSize); - } - - static const int KindOffset = 0; - static const int DwarfRegNumOffset = KindOffset + sizeof(uint16_t); - static const int SmallConstantOffset = DwarfRegNumOffset + sizeof(uint16_t); - static const int LocationAccessorSize = sizeof(uint64_t); - - const uint8_t *P; - }; - - /// Accessor for stackmap live-out fields. - class LiveOutAccessor { - friend class StackMapV1Parser; - friend class RecordAccessor; - public: - - /// Get the Dwarf register number for this live-out. - uint16_t getDwarfRegNum() const { - return read(P + DwarfRegNumOffset); - } - - /// Get the size in bytes of live [sub]register. - unsigned getSizeInBytes() const { - return read(P + SizeOffset); - } - - private: - - LiveOutAccessor(const uint8_t *P) : P(P) {} - - LiveOutAccessor next() const { - return LiveOutAccessor(P + LiveOutAccessorSize); - } - - static const int DwarfRegNumOffset = 0; - static const int SizeOffset = - DwarfRegNumOffset + sizeof(uint16_t) + sizeof(uint8_t); - static const int LiveOutAccessorSize = sizeof(uint32_t); - - const uint8_t *P; - }; - - /// Accessor for stackmap records. - class RecordAccessor { - friend class StackMapV1Parser; - public: - - typedef AccessorIterator location_iterator; - typedef AccessorIterator liveout_iterator; - - /// Get the patchpoint/stackmap ID for this record. - uint64_t getID() const { - return read(P + PatchpointIDOffset); - } - - /// Get the instruction offset (from the start of the containing function) - /// for this record. - uint32_t getInstructionOffset() const { - return read(P + InstructionOffsetOffset); - } - - /// Get the number of locations contained in this record. - uint16_t getNumLocations() const { - return read(P + NumLocationsOffset); - } - - /// Get the location with the given index. - LocationAccessor getLocation(unsigned LocationIndex) const { - unsigned LocationOffset = - LocationListOffset + LocationIndex * LocationSize; - return LocationAccessor(P + LocationOffset); - } - - /// Begin iterator for locations. - location_iterator location_begin() const { - return location_iterator(getLocation(0)); - } - - /// End iterator for locations. - location_iterator location_end() const { - return location_iterator(getLocation(getNumLocations())); - } - - /// Iterator range for locations. - iterator_range locations() const { - return make_range(location_begin(), location_end()); - } - - /// Get the number of liveouts contained in this record. - uint16_t getNumLiveOuts() const { - return read(P + getNumLiveOutsOffset()); - } - - /// Get the live-out with the given index. - LiveOutAccessor getLiveOut(unsigned LiveOutIndex) const { - unsigned LiveOutOffset = - getNumLiveOutsOffset() + sizeof(uint16_t) + LiveOutIndex * LiveOutSize; - return LiveOutAccessor(P + LiveOutOffset); - } - - /// Begin iterator for live-outs. - liveout_iterator liveouts_begin() const { - return liveout_iterator(getLiveOut(0)); - } - - - /// End iterator for live-outs. - liveout_iterator liveouts_end() const { - return liveout_iterator(getLiveOut(getNumLiveOuts())); - } - - /// Iterator range for live-outs. - iterator_range liveouts() const { - return make_range(liveouts_begin(), liveouts_end()); - } - - private: - - RecordAccessor(const uint8_t *P) : P(P) {} - - unsigned getNumLiveOutsOffset() const { - return LocationListOffset + LocationSize * getNumLocations() + - sizeof(uint16_t); - } - - unsigned getSizeInBytes() const { - unsigned RecordSize = - getNumLiveOutsOffset() + sizeof(uint16_t) + getNumLiveOuts() * LiveOutSize; - return (RecordSize + 7) & ~0x7; - } - - RecordAccessor next() const { - return RecordAccessor(P + getSizeInBytes()); - } - - static const unsigned PatchpointIDOffset = 0; - static const unsigned InstructionOffsetOffset = - PatchpointIDOffset + sizeof(uint64_t); - static const unsigned NumLocationsOffset = - InstructionOffsetOffset + sizeof(uint32_t) + sizeof(uint16_t); - static const unsigned LocationListOffset = - NumLocationsOffset + sizeof(uint16_t); - static const unsigned LocationSize = sizeof(uint64_t); - static const unsigned LiveOutSize = sizeof(uint32_t); - - const uint8_t *P; - }; - - /// Construct a parser for a version-1 stackmap. StackMap data will be read - /// from the given array. - StackMapV1Parser(ArrayRef StackMapSection) - : StackMapSection(StackMapSection) { - ConstantsListOffset = FunctionListOffset + getNumFunctions() * FunctionSize; - - assert(StackMapSection[0] == 1 && - "StackMapV1Parser can only parse version 1 stackmaps"); - - unsigned CurrentRecordOffset = - ConstantsListOffset + getNumConstants() * ConstantSize; - - for (unsigned I = 0, E = getNumRecords(); I != E; ++I) { - StackMapRecordOffsets.push_back(CurrentRecordOffset); - CurrentRecordOffset += - RecordAccessor(&StackMapSection[CurrentRecordOffset]).getSizeInBytes(); - } - } - - typedef AccessorIterator function_iterator; - typedef AccessorIterator constant_iterator; - typedef AccessorIterator record_iterator; - - /// Get the version number of this stackmap. (Always returns 1). - unsigned getVersion() const { return 1; } - - /// Get the number of functions in the stack map. - uint32_t getNumFunctions() const { - return read(&StackMapSection[NumFunctionsOffset]); - } - - /// Get the number of large constants in the stack map. - uint32_t getNumConstants() const { - return read(&StackMapSection[NumConstantsOffset]); - } - - /// Get the number of stackmap records in the stackmap. - uint32_t getNumRecords() const { - return read(&StackMapSection[NumRecordsOffset]); - } - - /// Return an FunctionAccessor for the given function index. - FunctionAccessor getFunction(unsigned FunctionIndex) const { - return FunctionAccessor(StackMapSection.data() + - getFunctionOffset(FunctionIndex)); - } - - /// Begin iterator for functions. - function_iterator functions_begin() const { - return function_iterator(getFunction(0)); - } - - /// End iterator for functions. - function_iterator functions_end() const { - return function_iterator( - FunctionAccessor(StackMapSection.data() + - getFunctionOffset(getNumFunctions()))); - } - - /// Iterator range for functions. - iterator_range functions() const { - return make_range(functions_begin(), functions_end()); - } - - /// Return the large constant at the given index. - ConstantAccessor getConstant(unsigned ConstantIndex) const { - return ConstantAccessor(StackMapSection.data() + - getConstantOffset(ConstantIndex)); - } - - /// Begin iterator for constants. - constant_iterator constants_begin() const { - return constant_iterator(getConstant(0)); - } - - /// End iterator for constants. - constant_iterator constants_end() const { - return constant_iterator( - ConstantAccessor(StackMapSection.data() + - getConstantOffset(getNumConstants()))); - } - - /// Iterator range for constants. - iterator_range constants() const { - return make_range(constants_begin(), constants_end()); - } - - /// Return a RecordAccessor for the given record index. - RecordAccessor getRecord(unsigned RecordIndex) const { - std::size_t RecordOffset = StackMapRecordOffsets[RecordIndex]; - return RecordAccessor(StackMapSection.data() + RecordOffset); - } - - /// Begin iterator for records. - record_iterator records_begin() const { - if (getNumRecords() == 0) - return record_iterator(RecordAccessor(nullptr)); - return record_iterator(getRecord(0)); - } - - /// End iterator for records. - record_iterator records_end() const { - // Records need to be handled specially, since we cache the start addresses - // for them: We can't just compute the 1-past-the-end address, we have to - // look at the last record and use the 'next' method. - if (getNumRecords() == 0) - return record_iterator(RecordAccessor(nullptr)); - return record_iterator(getRecord(getNumRecords() - 1).next()); - } - - /// Iterator range for records. - iterator_range records() const { - return make_range(records_begin(), records_end()); - } - -private: - - template - static T read(const uint8_t *P) { - return support::endian::read(P); - } - - static const unsigned HeaderOffset = 0; - static const unsigned NumFunctionsOffset = HeaderOffset + sizeof(uint32_t); - static const unsigned NumConstantsOffset = NumFunctionsOffset + sizeof(uint32_t); - static const unsigned NumRecordsOffset = NumConstantsOffset + sizeof(uint32_t); - static const unsigned FunctionListOffset = NumRecordsOffset + sizeof(uint32_t); - - static const unsigned FunctionSize = 2 * sizeof(uint64_t); - static const unsigned ConstantSize = sizeof(uint64_t); - - std::size_t getFunctionOffset(unsigned FunctionIndex) const { - return FunctionListOffset + FunctionIndex * FunctionSize; - } - - std::size_t getConstantOffset(unsigned ConstantIndex) const { - return ConstantsListOffset + ConstantIndex * ConstantSize; - } - - ArrayRef StackMapSection; - unsigned ConstantsListOffset; - std::vector StackMapRecordOffsets; -}; - -} - -#endif diff --git a/llvm/include/llvm/Object/SymbolSize.h b/llvm/include/llvm/Object/SymbolSize.h deleted file mode 100644 index f2ce70f4..00000000 --- a/llvm/include/llvm/Object/SymbolSize.h +++ /dev/null @@ -1,23 +0,0 @@ -//===- SymbolSize.h ---------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_SYMBOLSIZE_H -#define LLVM_OBJECT_SYMBOLSIZE_H - -#include "llvm/Object/ObjectFile.h" - -namespace llvm { -namespace object { -std::vector> -computeSymbolSizes(const ObjectFile &O); -} -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/Object/SymbolicFile.h b/llvm/include/llvm/Object/SymbolicFile.h deleted file mode 100644 index 894c2670..00000000 --- a/llvm/include/llvm/Object/SymbolicFile.h +++ /dev/null @@ -1,208 +0,0 @@ -//===- SymbolicFile.h - Interface that only provides symbols ----*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares the SymbolicFile interface. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECT_SYMBOLICFILE_H -#define LLVM_OBJECT_SYMBOLICFILE_H - -#include "llvm/Object/Binary.h" -#include "llvm/Support/Format.h" -#include - -namespace llvm { -namespace object { - -union DataRefImpl { - // This entire union should probably be a - // char[max(8, sizeof(uintptr_t))] and require the impl to cast. - struct { - uint32_t a, b; - } d; - uintptr_t p; - DataRefImpl() { std::memset(this, 0, sizeof(DataRefImpl)); } -}; - -template -OStream& operator<<(OStream &OS, const DataRefImpl &D) { - OS << "(" << format("0x%x8", D.p) << " (" << format("0x%x8", D.d.a) << ", " << format("0x%x8", D.d.b) << "))"; - return OS; -} - -inline bool operator==(const DataRefImpl &a, const DataRefImpl &b) { - // Check bitwise identical. This is the only legal way to compare a union w/o - // knowing which member is in use. - return std::memcmp(&a, &b, sizeof(DataRefImpl)) == 0; -} - -inline bool operator!=(const DataRefImpl &a, const DataRefImpl &b) { - return !operator==(a, b); -} - -inline bool operator<(const DataRefImpl &a, const DataRefImpl &b) { - // Check bitwise identical. This is the only legal way to compare a union w/o - // knowing which member is in use. - return std::memcmp(&a, &b, sizeof(DataRefImpl)) < 0; -} - -template -class content_iterator - : public std::iterator { - content_type Current; - -public: - content_iterator(content_type symb) : Current(std::move(symb)) {} - - const content_type *operator->() const { return &Current; } - - const content_type &operator*() const { return Current; } - - bool operator==(const content_iterator &other) const { - return Current == other.Current; - } - - bool operator!=(const content_iterator &other) const { - return !(*this == other); - } - - content_iterator &operator++() { // preincrement - Current.moveNext(); - return *this; - } -}; - -class SymbolicFile; - -/// This is a value type class that represents a single symbol in the list of -/// symbols in the object file. -class BasicSymbolRef { - DataRefImpl SymbolPimpl; - const SymbolicFile *OwningObject; - -public: - // FIXME: should we add a SF_Text? - enum Flags : unsigned { - SF_None = 0, - SF_Undefined = 1U << 0, // Symbol is defined in another object file - SF_Global = 1U << 1, // Global symbol - SF_Weak = 1U << 2, // Weak symbol - SF_Absolute = 1U << 3, // Absolute symbol - SF_Common = 1U << 4, // Symbol has common linkage - SF_Indirect = 1U << 5, // Symbol is an alias to another symbol - SF_Exported = 1U << 6, // Symbol is visible to other DSOs - SF_FormatSpecific = 1U << 7, // Specific to the object file format - // (e.g. section symbols) - SF_Thumb = 1U << 8, // Thumb symbol in a 32-bit ARM binary - SF_Hidden = 1U << 9, // Symbol has hidden visibility - SF_Const = 1U << 10, // Symbol value is constant - }; - - BasicSymbolRef() : OwningObject(nullptr) { } - BasicSymbolRef(DataRefImpl SymbolP, const SymbolicFile *Owner); - - bool operator==(const BasicSymbolRef &Other) const; - bool operator<(const BasicSymbolRef &Other) const; - - void moveNext(); - - std::error_code printName(raw_ostream &OS) const; - - /// Get symbol flags (bitwise OR of SymbolRef::Flags) - uint32_t getFlags() const; - - DataRefImpl getRawDataRefImpl() const; - const SymbolicFile *getObject() const; -}; - -typedef content_iterator basic_symbol_iterator; - -class SymbolicFile : public Binary { -public: - ~SymbolicFile() override; - SymbolicFile(unsigned int Type, MemoryBufferRef Source); - - // virtual interface. - virtual void moveSymbolNext(DataRefImpl &Symb) const = 0; - - virtual std::error_code printSymbolName(raw_ostream &OS, - DataRefImpl Symb) const = 0; - - virtual uint32_t getSymbolFlags(DataRefImpl Symb) const = 0; - - virtual basic_symbol_iterator symbol_begin_impl() const = 0; - - virtual basic_symbol_iterator symbol_end_impl() const = 0; - - // convenience wrappers. - basic_symbol_iterator symbol_begin() const { - return symbol_begin_impl(); - } - basic_symbol_iterator symbol_end() const { - return symbol_end_impl(); - } - typedef iterator_range basic_symbol_iterator_range; - basic_symbol_iterator_range symbols() const { - return basic_symbol_iterator_range(symbol_begin(), symbol_end()); - } - - // construction aux. - static Expected> - createSymbolicFile(MemoryBufferRef Object, sys::fs::file_magic Type, - LLVMContext *Context); - - static Expected> - createSymbolicFile(MemoryBufferRef Object) { - return createSymbolicFile(Object, sys::fs::file_magic::unknown, nullptr); - } - static Expected> - createSymbolicFile(StringRef ObjectPath); - - static inline bool classof(const Binary *v) { - return v->isSymbolic(); - } -}; - -inline BasicSymbolRef::BasicSymbolRef(DataRefImpl SymbolP, - const SymbolicFile *Owner) - : SymbolPimpl(SymbolP), OwningObject(Owner) {} - -inline bool BasicSymbolRef::operator==(const BasicSymbolRef &Other) const { - return SymbolPimpl == Other.SymbolPimpl; -} - -inline bool BasicSymbolRef::operator<(const BasicSymbolRef &Other) const { - return SymbolPimpl < Other.SymbolPimpl; -} - -inline void BasicSymbolRef::moveNext() { - return OwningObject->moveSymbolNext(SymbolPimpl); -} - -inline std::error_code BasicSymbolRef::printName(raw_ostream &OS) const { - return OwningObject->printSymbolName(OS, SymbolPimpl); -} - -inline uint32_t BasicSymbolRef::getFlags() const { - return OwningObject->getSymbolFlags(SymbolPimpl); -} - -inline DataRefImpl BasicSymbolRef::getRawDataRefImpl() const { - return SymbolPimpl; -} - -inline const SymbolicFile *BasicSymbolRef::getObject() const { - return OwningObject; -} - -} -} - -#endif diff --git a/llvm/include/llvm/ObjectYAML/COFFYAML.h b/llvm/include/llvm/ObjectYAML/COFFYAML.h deleted file mode 100644 index 65ad1dde..00000000 --- a/llvm/include/llvm/ObjectYAML/COFFYAML.h +++ /dev/null @@ -1,223 +0,0 @@ -//===- COFFYAML.h - COFF YAMLIO implementation ------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file declares classes for handling the YAML representation of COFF. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECTYAML_COFFYAML_H -#define LLVM_OBJECTYAML_COFFYAML_H - -#include "llvm/ADT/Optional.h" -#include "llvm/ObjectYAML/YAML.h" -#include "llvm/Support/COFF.h" - -namespace llvm { - -namespace COFF { -inline Characteristics operator|(Characteristics a, Characteristics b) { - uint32_t Ret = static_cast(a) | static_cast(b); - return static_cast(Ret); -} - -inline SectionCharacteristics operator|(SectionCharacteristics a, - SectionCharacteristics b) { - uint32_t Ret = static_cast(a) | static_cast(b); - return static_cast(Ret); -} - -inline DLLCharacteristics operator|(DLLCharacteristics a, - DLLCharacteristics b) { - uint16_t Ret = static_cast(a) | static_cast(b); - return static_cast(Ret); -} -} - -// The structure of the yaml files is not an exact 1:1 match to COFF. In order -// to use yaml::IO, we use these structures which are closer to the source. -namespace COFFYAML { - LLVM_YAML_STRONG_TYPEDEF(uint8_t, COMDATType) - LLVM_YAML_STRONG_TYPEDEF(uint32_t, WeakExternalCharacteristics) - LLVM_YAML_STRONG_TYPEDEF(uint8_t, AuxSymbolType) - - struct Relocation { - uint32_t VirtualAddress; - uint16_t Type; - StringRef SymbolName; - }; - - struct Section { - COFF::section Header; - unsigned Alignment = 0; - yaml::BinaryRef SectionData; - std::vector Relocations; - StringRef Name; - Section(); - }; - - struct Symbol { - COFF::symbol Header; - COFF::SymbolBaseType SimpleType = COFF::IMAGE_SYM_TYPE_NULL; - COFF::SymbolComplexType ComplexType = COFF::IMAGE_SYM_DTYPE_NULL; - Optional FunctionDefinition; - Optional bfAndefSymbol; - Optional WeakExternal; - StringRef File; - Optional SectionDefinition; - Optional CLRToken; - StringRef Name; - Symbol(); - }; - - struct PEHeader { - COFF::PE32Header Header; - Optional DataDirectories[COFF::NUM_DATA_DIRECTORIES]; - }; - - struct Object { - Optional OptionalHeader; - COFF::header Header; - std::vector
Sections; - std::vector Symbols; - Object(); - }; -} -} - -LLVM_YAML_IS_SEQUENCE_VECTOR(COFFYAML::Section) -LLVM_YAML_IS_SEQUENCE_VECTOR(COFFYAML::Symbol) -LLVM_YAML_IS_SEQUENCE_VECTOR(COFFYAML::Relocation) - -namespace llvm { -namespace yaml { - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFFYAML::WeakExternalCharacteristics &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFFYAML::AuxSymbolType &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFFYAML::COMDATType &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFF::MachineTypes &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFF::SymbolBaseType &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFF::SymbolStorageClass &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFF::SymbolComplexType &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFF::RelocationTypeI386 &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFF::RelocationTypeAMD64 &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, COFF::WindowsSubsystem &Value); -}; - -template <> -struct ScalarBitSetTraits { - static void bitset(IO &IO, COFF::Characteristics &Value); -}; - -template <> -struct ScalarBitSetTraits { - static void bitset(IO &IO, COFF::SectionCharacteristics &Value); -}; - -template <> -struct ScalarBitSetTraits { - static void bitset(IO &IO, COFF::DLLCharacteristics &Value); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, COFFYAML::Relocation &Rel); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, COFFYAML::PEHeader &PH); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, COFF::DataDirectory &DD); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, COFF::header &H); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, COFF::AuxiliaryFunctionDefinition &AFD); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, COFF::AuxiliarybfAndefSymbol &AAS); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, COFF::AuxiliaryWeakExternal &AWE); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, COFF::AuxiliarySectionDefinition &ASD); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, COFF::AuxiliaryCLRToken &ACT); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, COFFYAML::Symbol &S); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, COFFYAML::Section &Sec); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, COFFYAML::Object &Obj); -}; - -} // end namespace yaml -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ObjectYAML/ELFYAML.h b/llvm/include/llvm/ObjectYAML/ELFYAML.h deleted file mode 100644 index 81a4ec28..00000000 --- a/llvm/include/llvm/ObjectYAML/ELFYAML.h +++ /dev/null @@ -1,319 +0,0 @@ -//===- ELFYAML.h - ELF YAMLIO implementation --------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// \brief This file declares classes for handling the YAML representation -/// of ELF. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECTYAML_ELFYAML_H -#define LLVM_OBJECTYAML_ELFYAML_H - -#include "llvm/ObjectYAML/YAML.h" -#include "llvm/Support/ELF.h" - -namespace llvm { -namespace ELFYAML { - -// These types are invariant across 32/64-bit ELF, so for simplicity just -// directly give them their exact sizes. We don't need to worry about -// endianness because these are just the types in the YAMLIO structures, -// and are appropriately converted to the necessary endianness when -// reading/generating binary object files. -// The naming of these types is intended to be ELF_PREFIX, where PREFIX is -// the common prefix of the respective constants. E.g. ELF_EM corresponds -// to the `e_machine` constants, like `EM_X86_64`. -// In the future, these would probably be better suited by C++11 enum -// class's with appropriate fixed underlying type. -LLVM_YAML_STRONG_TYPEDEF(uint16_t, ELF_ET) -LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_EM) -LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFCLASS) -LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFDATA) -LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFOSABI) -// Just use 64, since it can hold 32-bit values too. -LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_EF) -LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_SHT) -LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_REL) -LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_RSS) -// Just use 64, since it can hold 32-bit values too. -LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_SHF) -LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STT) -LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STV) -LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STO) - -LLVM_YAML_STRONG_TYPEDEF(uint8_t, MIPS_AFL_REG) -LLVM_YAML_STRONG_TYPEDEF(uint8_t, MIPS_ABI_FP) -LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_AFL_EXT) -LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_AFL_ASE) -LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_AFL_FLAGS1) -LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_ISA) - -// For now, hardcode 64 bits everywhere that 32 or 64 would be needed -// since 64-bit can hold 32-bit values too. -struct FileHeader { - ELF_ELFCLASS Class; - ELF_ELFDATA Data; - ELF_ELFOSABI OSABI; - ELF_ET Type; - ELF_EM Machine; - ELF_EF Flags; - llvm::yaml::Hex64 Entry; -}; -struct Symbol { - StringRef Name; - ELF_STT Type; - StringRef Section; - llvm::yaml::Hex64 Value; - llvm::yaml::Hex64 Size; - uint8_t Other; -}; -struct LocalGlobalWeakSymbols { - std::vector Local; - std::vector Global; - std::vector Weak; -}; - -struct SectionOrType { - StringRef sectionNameOrType; -}; - -struct Section { - enum class SectionKind { - Group, - RawContent, - Relocation, - NoBits, - MipsABIFlags - }; - SectionKind Kind; - StringRef Name; - ELF_SHT Type; - ELF_SHF Flags; - llvm::yaml::Hex64 Address; - StringRef Link; - StringRef Info; - llvm::yaml::Hex64 AddressAlign; - Section(SectionKind Kind) : Kind(Kind) {} - virtual ~Section(); -}; -struct RawContentSection : Section { - yaml::BinaryRef Content; - llvm::yaml::Hex64 Size; - RawContentSection() : Section(SectionKind::RawContent) {} - static bool classof(const Section *S) { - return S->Kind == SectionKind::RawContent; - } -}; - -struct NoBitsSection : Section { - llvm::yaml::Hex64 Size; - NoBitsSection() : Section(SectionKind::NoBits) {} - static bool classof(const Section *S) { - return S->Kind == SectionKind::NoBits; - } -}; - -struct Group : Section { - // Members of a group contain a flag and a list of section indices - // that are part of the group. - std::vector Members; - Group() : Section(SectionKind::Group) {} - static bool classof(const Section *S) { - return S->Kind == SectionKind::Group; - } -}; - -struct Relocation { - llvm::yaml::Hex64 Offset; - int64_t Addend; - ELF_REL Type; - StringRef Symbol; -}; -struct RelocationSection : Section { - std::vector Relocations; - RelocationSection() : Section(SectionKind::Relocation) {} - static bool classof(const Section *S) { - return S->Kind == SectionKind::Relocation; - } -}; - -// Represents .MIPS.abiflags section -struct MipsABIFlags : Section { - llvm::yaml::Hex16 Version; - MIPS_ISA ISALevel; - llvm::yaml::Hex8 ISARevision; - MIPS_AFL_REG GPRSize; - MIPS_AFL_REG CPR1Size; - MIPS_AFL_REG CPR2Size; - MIPS_ABI_FP FpABI; - MIPS_AFL_EXT ISAExtension; - MIPS_AFL_ASE ASEs; - MIPS_AFL_FLAGS1 Flags1; - llvm::yaml::Hex32 Flags2; - MipsABIFlags() : Section(SectionKind::MipsABIFlags) {} - static bool classof(const Section *S) { - return S->Kind == SectionKind::MipsABIFlags; - } -}; - -struct Object { - FileHeader Header; - std::vector> Sections; - // Although in reality the symbols reside in a section, it is a lot - // cleaner and nicer if we read them from the YAML as a separate - // top-level key, which automatically ensures that invariants like there - // being a single SHT_SYMTAB section are upheld. - LocalGlobalWeakSymbols Symbols; -}; - -} // end namespace ELFYAML -} // end namespace llvm - -LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::Symbol) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::Relocation) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::ELFYAML::SectionOrType) - -namespace llvm { -namespace yaml { - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_ET &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_EM &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_ELFCLASS &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_ELFDATA &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_ELFOSABI &Value); -}; - -template <> -struct ScalarBitSetTraits { - static void bitset(IO &IO, ELFYAML::ELF_EF &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_SHT &Value); -}; - -template <> -struct ScalarBitSetTraits { - static void bitset(IO &IO, ELFYAML::ELF_SHF &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_STT &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_STV &Value); -}; - -template <> -struct ScalarBitSetTraits { - static void bitset(IO &IO, ELFYAML::ELF_STO &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_REL &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::ELF_RSS &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::MIPS_AFL_REG &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::MIPS_ABI_FP &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::MIPS_AFL_EXT &Value); -}; - -template <> -struct ScalarEnumerationTraits { - static void enumeration(IO &IO, ELFYAML::MIPS_ISA &Value); -}; - -template <> -struct ScalarBitSetTraits { - static void bitset(IO &IO, ELFYAML::MIPS_AFL_ASE &Value); -}; - -template <> -struct ScalarBitSetTraits { - static void bitset(IO &IO, ELFYAML::MIPS_AFL_FLAGS1 &Value); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, ELFYAML::FileHeader &FileHdr); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, ELFYAML::Symbol &Symbol); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, ELFYAML::LocalGlobalWeakSymbols &Symbols); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, ELFYAML::Relocation &Rel); -}; - -template <> -struct MappingTraits> { - static void mapping(IO &IO, std::unique_ptr &Section); - static StringRef validate(IO &io, std::unique_ptr &Section); -}; - -template <> -struct MappingTraits { - static void mapping(IO &IO, ELFYAML::Object &Object); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, ELFYAML::SectionOrType §ionOrType); -}; - -} // end namespace yaml -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/ObjectYAML/MachOYAML.h b/llvm/include/llvm/ObjectYAML/MachOYAML.h deleted file mode 100644 index bb15e647..00000000 --- a/llvm/include/llvm/ObjectYAML/MachOYAML.h +++ /dev/null @@ -1,296 +0,0 @@ -//===- MachOYAML.h - Mach-O YAMLIO implementation ---------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// \brief This file declares classes for handling the YAML representation -/// of Mach-O. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECTYAML_MACHOYAML_H -#define LLVM_OBJECTYAML_MACHOYAML_H - -#include "llvm/ObjectYAML/YAML.h" -#include "llvm/Support/MachO.h" - -namespace llvm { -namespace MachOYAML { - -struct Section { - char sectname[16]; - char segname[16]; - llvm::yaml::Hex64 addr; - uint64_t size; - llvm::yaml::Hex32 offset; - uint32_t align; - llvm::yaml::Hex32 reloff; - uint32_t nreloc; - llvm::yaml::Hex32 flags; - llvm::yaml::Hex32 reserved1; - llvm::yaml::Hex32 reserved2; - llvm::yaml::Hex32 reserved3; -}; - -struct FileHeader { - llvm::yaml::Hex32 magic; - llvm::yaml::Hex32 cputype; - llvm::yaml::Hex32 cpusubtype; - llvm::yaml::Hex32 filetype; - uint32_t ncmds; - uint32_t sizeofcmds; - llvm::yaml::Hex32 flags; - llvm::yaml::Hex32 reserved; -}; - -struct LoadCommand { - virtual ~LoadCommand(); - llvm::MachO::macho_load_command Data; - std::vector
Sections; - std::vector PayloadBytes; - std::string PayloadString; - uint64_t ZeroPadBytes; -}; - -struct NListEntry { - uint32_t n_strx; - uint8_t n_type; - uint8_t n_sect; - uint16_t n_desc; - uint64_t n_value; -}; -struct RebaseOpcode { - MachO::RebaseOpcode Opcode; - uint8_t Imm; - std::vector ExtraData; -}; - -struct BindOpcode { - MachO::BindOpcode Opcode; - uint8_t Imm; - std::vector ULEBExtraData; - std::vector SLEBExtraData; - StringRef Symbol; -}; - -struct ExportEntry { - ExportEntry() - : TerminalSize(0), NodeOffset(0), Name(), Flags(0), Address(0), Other(0), - ImportName(), Children() {} - uint64_t TerminalSize; - uint64_t NodeOffset; - std::string Name; - llvm::yaml::Hex64 Flags; - llvm::yaml::Hex64 Address; - llvm::yaml::Hex64 Other; - std::string ImportName; - std::vector Children; -}; - -struct LinkEditData { - std::vector RebaseOpcodes; - std::vector BindOpcodes; - std::vector WeakBindOpcodes; - std::vector LazyBindOpcodes; - MachOYAML::ExportEntry ExportTrie; - std::vector NameList; - std::vector StringTable; -}; - -struct Object { - FileHeader Header; - std::vector LoadCommands; - std::vector
Sections; - LinkEditData LinkEdit; -}; - -struct FatHeader { - llvm::yaml::Hex32 magic; - uint32_t nfat_arch; -}; - -struct FatArch { - llvm::yaml::Hex32 cputype; - llvm::yaml::Hex32 cpusubtype; - llvm::yaml::Hex64 offset; - uint64_t size; - uint32_t align; - llvm::yaml::Hex32 reserved; -}; - -struct UniversalBinary { - FatHeader Header; - std::vector FatArchs; - std::vector Slices; -}; - -} // namespace llvm::MachOYAML -} // namespace llvm - -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::LoadCommand) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::Section) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::Hex8) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::Hex64) -LLVM_YAML_IS_SEQUENCE_VECTOR(int64_t) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::RebaseOpcode) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::BindOpcode) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::ExportEntry) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::NListEntry) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::StringRef) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::Object) -LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::MachOYAML::FatArch) - -namespace llvm { -namespace yaml { - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::FileHeader &FileHeader); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::Object &Object); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::FatHeader &FatHeader); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::FatArch &FatArch); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::UniversalBinary &UniversalBinary); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::LoadCommand &LoadCommand); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::LinkEditData &LinkEditData); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::RebaseOpcode &RebaseOpcode); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::BindOpcode &BindOpcode); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::ExportEntry &ExportEntry); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::Section &Section); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachOYAML::NListEntry &NListEntry); -}; - -#define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) \ - io.enumCase(value, #LCName, MachO::LCName); - -template <> struct ScalarEnumerationTraits { - static void enumeration(IO &io, MachO::LoadCommandType &value) { -#include "llvm/Support/MachO.def" - io.enumFallback(value); - } -}; - -#define ENUM_CASE(Enum) io.enumCase(value, #Enum, MachO::Enum); - -template <> struct ScalarEnumerationTraits { - static void enumeration(IO &io, MachO::RebaseOpcode &value) { - ENUM_CASE(REBASE_OPCODE_DONE) - ENUM_CASE(REBASE_OPCODE_SET_TYPE_IMM) - ENUM_CASE(REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB) - ENUM_CASE(REBASE_OPCODE_ADD_ADDR_ULEB) - ENUM_CASE(REBASE_OPCODE_ADD_ADDR_IMM_SCALED) - ENUM_CASE(REBASE_OPCODE_DO_REBASE_IMM_TIMES) - ENUM_CASE(REBASE_OPCODE_DO_REBASE_ULEB_TIMES) - ENUM_CASE(REBASE_OPCODE_DO_REBASE_ADD_ADDR_ULEB) - ENUM_CASE(REBASE_OPCODE_DO_REBASE_ULEB_TIMES_SKIPPING_ULEB) - io.enumFallback(value); - } -}; - -template <> struct ScalarEnumerationTraits { - static void enumeration(IO &io, MachO::BindOpcode &value) { - ENUM_CASE(BIND_OPCODE_DONE) - ENUM_CASE(BIND_OPCODE_SET_DYLIB_ORDINAL_IMM) - ENUM_CASE(BIND_OPCODE_SET_DYLIB_ORDINAL_ULEB) - ENUM_CASE(BIND_OPCODE_SET_DYLIB_SPECIAL_IMM) - ENUM_CASE(BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM) - ENUM_CASE(BIND_OPCODE_SET_TYPE_IMM) - ENUM_CASE(BIND_OPCODE_SET_ADDEND_SLEB) - ENUM_CASE(BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB) - ENUM_CASE(BIND_OPCODE_ADD_ADDR_ULEB) - ENUM_CASE(BIND_OPCODE_DO_BIND) - ENUM_CASE(BIND_OPCODE_DO_BIND_ADD_ADDR_ULEB) - ENUM_CASE(BIND_OPCODE_DO_BIND_ADD_ADDR_IMM_SCALED) - ENUM_CASE(BIND_OPCODE_DO_BIND_ULEB_TIMES_SKIPPING_ULEB) - io.enumFallback(value); - } -}; - -// This trait is used for 16-byte chars in Mach structures used for strings -typedef char char_16[16]; - -template <> struct ScalarTraits { - static void output(const char_16 &Val, void *, llvm::raw_ostream &Out); - - static StringRef input(StringRef Scalar, void *, char_16 &Val); - static bool mustQuote(StringRef S); -}; - -// This trait is used for UUIDs. It reads and writes them matching otool's -// formatting style. -typedef uint8_t uuid_t[16]; - -template <> struct ScalarTraits { - static void output(const uuid_t &Val, void *, llvm::raw_ostream &Out); - - static StringRef input(StringRef Scalar, void *, uuid_t &Val); - static bool mustQuote(StringRef S); -}; - -// Load Command struct mapping traits - -#define LOAD_COMMAND_STRUCT(LCStruct) \ - template <> struct MappingTraits { \ - static void mapping(IO &IO, MachO::LCStruct &LoadCommand); \ - }; - -#include "llvm/Support/MachO.def" - -// Extra structures used by load commands -template <> struct MappingTraits { - static void mapping(IO &IO, MachO::dylib &LoadCommand); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachO::fvmlib &LoadCommand); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachO::section &LoadCommand); -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, MachO::section_64 &LoadCommand); -}; - -} // namespace llvm::yaml - -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/ObjectYAML/ObjectYAML.h b/llvm/include/llvm/ObjectYAML/ObjectYAML.h deleted file mode 100644 index 1d646234..00000000 --- a/llvm/include/llvm/ObjectYAML/ObjectYAML.h +++ /dev/null @@ -1,35 +0,0 @@ -//===- ObjectYAML.h ---------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECTYAML_OBJECTYAML_H -#define LLVM_OBJECTYAML_OBJECTYAML_H - -#include "llvm/Support/YAMLTraits.h" -#include "llvm/ObjectYAML/ELFYAML.h" -#include "llvm/ObjectYAML/COFFYAML.h" -#include "llvm/ObjectYAML/MachOYAML.h" - -namespace llvm { -namespace yaml { - -struct YamlObjectFile { - std::unique_ptr Elf; - std::unique_ptr Coff; - std::unique_ptr MachO; - std::unique_ptr FatMachO; -}; - -template <> struct MappingTraits { - static void mapping(IO &IO, YamlObjectFile &ObjectFile); -}; - -} // namespace yaml -} // namespace llvm - -#endif diff --git a/llvm/include/llvm/ObjectYAML/YAML.h b/llvm/include/llvm/ObjectYAML/YAML.h deleted file mode 100644 index 7f683680..00000000 --- a/llvm/include/llvm/ObjectYAML/YAML.h +++ /dev/null @@ -1,103 +0,0 @@ -//===- YAML.h ---------------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OBJECTYAML_YAML_H -#define LLVM_OBJECTYAML_YAML_H - -#include "llvm/Support/YAMLTraits.h" - -namespace llvm { -namespace yaml { -/// \brief Specialized YAMLIO scalar type for representing a binary blob. -/// -/// A typical use case would be to represent the content of a section in a -/// binary file. -/// This class has custom YAMLIO traits for convenient reading and writing. -/// It renders as a string of hex digits in a YAML file. -/// For example, it might render as `DEADBEEFCAFEBABE` (YAML does not -/// require the quotation marks, so for simplicity when outputting they are -/// omitted). -/// When reading, any string whose content is an even number of hex digits -/// will be accepted. -/// For example, all of the following are acceptable: -/// `DEADBEEF`, `"DeADbEeF"`, `"\x44EADBEEF"` (Note: '\x44' == 'D') -/// -/// A significant advantage of using this class is that it never allocates -/// temporary strings or buffers for any of its functionality. -/// -/// Example: -/// -/// The YAML mapping: -/// \code -/// Foo: DEADBEEFCAFEBABE -/// \endcode -/// -/// Could be modeled in YAMLIO by the struct: -/// \code -/// struct FooHolder { -/// BinaryRef Foo; -/// }; -/// namespace llvm { -/// namespace yaml { -/// template <> -/// struct MappingTraits { -/// static void mapping(IO &IO, FooHolder &FH) { -/// IO.mapRequired("Foo", FH.Foo); -/// } -/// }; -/// } // end namespace yaml -/// } // end namespace llvm -/// \endcode -class BinaryRef { - friend bool operator==(const BinaryRef &LHS, const BinaryRef &RHS); - /// \brief Either raw binary data, or a string of hex bytes (must always - /// be an even number of characters). - ArrayRef Data; - /// \brief Discriminator between the two states of the `Data` member. - bool DataIsHexString; - -public: - BinaryRef(ArrayRef Data) : Data(Data), DataIsHexString(false) {} - BinaryRef(StringRef Data) - : Data(reinterpret_cast(Data.data()), Data.size()), - DataIsHexString(true) {} - BinaryRef() : DataIsHexString(true) {} - /// \brief The number of bytes that are represented by this BinaryRef. - /// This is the number of bytes that writeAsBinary() will write. - ArrayRef::size_type binary_size() const { - if (DataIsHexString) - return Data.size() / 2; - return Data.size(); - } - /// \brief Write the contents (regardless of whether it is binary or a - /// hex string) as binary to the given raw_ostream. - void writeAsBinary(raw_ostream &OS) const; - /// \brief Write the contents (regardless of whether it is binary or a - /// hex string) as hex to the given raw_ostream. - /// - /// For example, a possible output could be `DEADBEEFCAFEBABE`. - void writeAsHex(raw_ostream &OS) const; -}; - -inline bool operator==(const BinaryRef &LHS, const BinaryRef &RHS) { - // Special case for default constructed BinaryRef. - if (LHS.Data.empty() && RHS.Data.empty()) - return true; - - return LHS.DataIsHexString == RHS.DataIsHexString && LHS.Data == RHS.Data; -} - -template <> struct ScalarTraits { - static void output(const BinaryRef &, void *, llvm::raw_ostream &); - static StringRef input(StringRef, void *, BinaryRef &); - static bool mustQuote(StringRef S) { return needsQuotes(S); } -}; -} -} -#endif diff --git a/llvm/include/llvm/Option/Arg.h b/llvm/include/llvm/Option/Arg.h deleted file mode 100644 index 99d32969..00000000 --- a/llvm/include/llvm/Option/Arg.h +++ /dev/null @@ -1,127 +0,0 @@ -//===--- Arg.h - Parsed Argument Classes ------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -/// -/// \file -/// \brief Defines the llvm::Arg class for parsed arguments. -/// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OPTION_ARG_H -#define LLVM_OPTION_ARG_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Option/Option.h" -#include - -namespace llvm { -namespace opt { -class ArgList; - -/// \brief A concrete instance of a particular driver option. -/// -/// The Arg class encodes just enough information to be able to -/// derive the argument values efficiently. -class Arg { - Arg(const Arg &) = delete; - void operator=(const Arg &) = delete; - -private: - /// \brief The option this argument is an instance of. - const Option Opt; - - /// \brief The argument this argument was derived from (during tool chain - /// argument translation), if any. - const Arg *BaseArg; - - /// \brief How this instance of the option was spelled. - StringRef Spelling; - - /// \brief The index at which this argument appears in the containing - /// ArgList. - unsigned Index; - - /// \brief Was this argument used to effect compilation? - /// - /// This is used for generating "argument unused" diagnostics. - mutable unsigned Claimed : 1; - - /// \brief Does this argument own its values? - mutable unsigned OwnsValues : 1; - - /// \brief The argument values, as C strings. - SmallVector Values; - -public: - Arg(const Option Opt, StringRef Spelling, unsigned Index, - const Arg *BaseArg = nullptr); - Arg(const Option Opt, StringRef Spelling, unsigned Index, - const char *Value0, const Arg *BaseArg = nullptr); - Arg(const Option Opt, StringRef Spelling, unsigned Index, - const char *Value0, const char *Value1, const Arg *BaseArg = nullptr); - ~Arg(); - - const Option &getOption() const { return Opt; } - StringRef getSpelling() const { return Spelling; } - unsigned getIndex() const { return Index; } - - /// \brief Return the base argument which generated this arg. - /// - /// This is either the argument itself or the argument it was - /// derived from during tool chain specific argument translation. - const Arg &getBaseArg() const { - return BaseArg ? *BaseArg : *this; - } - void setBaseArg(const Arg *BaseArg) { this->BaseArg = BaseArg; } - - bool getOwnsValues() const { return OwnsValues; } - void setOwnsValues(bool Value) const { OwnsValues = Value; } - - bool isClaimed() const { return getBaseArg().Claimed; } - - /// \brief Set the Arg claimed bit. - void claim() const { getBaseArg().Claimed = true; } - - unsigned getNumValues() const { return Values.size(); } - const char *getValue(unsigned N = 0) const { - return Values[N]; - } - - SmallVectorImpl &getValues() { return Values; } - const SmallVectorImpl &getValues() const { return Values; } - - bool containsValue(StringRef Value) const { - for (unsigned i = 0, e = getNumValues(); i != e; ++i) - if (Values[i] == Value) - return true; - return false; - } - - /// \brief Append the argument onto the given array as strings. - void render(const ArgList &Args, ArgStringList &Output) const; - - /// \brief Append the argument, render as an input, onto the given - /// array as strings. - /// - /// The distinction is that some options only render their values - /// when rendered as a input (e.g., Xlinker). - void renderAsInput(const ArgList &Args, ArgStringList &Output) const; - - void print(raw_ostream &O) const; - void dump() const; - - /// \brief Return a formatted version of the argument and - /// its values, for debugging and diagnostics. - std::string getAsString(const ArgList &Args) const; -}; - -} // end namespace opt -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Option/ArgList.h b/llvm/include/llvm/Option/ArgList.h deleted file mode 100644 index 89771b5c..00000000 --- a/llvm/include/llvm/Option/ArgList.h +++ /dev/null @@ -1,465 +0,0 @@ -//===--- ArgList.h - Argument List Management -------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_OPTION_ARGLIST_H -#define LLVM_OPTION_ARGLIST_H - -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/Twine.h" -#include "llvm/Option/Arg.h" -#include "llvm/Option/OptSpecifier.h" -#include "llvm/Option/Option.h" -#include -#include -#include -#include - -namespace llvm { -namespace opt { -class ArgList; -class Option; - -/// arg_iterator - Iterates through arguments stored inside an ArgList. -class arg_iterator { - /// The current argument. - SmallVectorImpl::const_iterator Current; - - /// The argument list we are iterating over. - const ArgList &Args; - - /// Optional filters on the arguments which will be match. Most clients - /// should never want to iterate over arguments without filters, so we won't - /// bother to factor this into two separate iterator implementations. - // - // FIXME: Make efficient; the idea is to provide efficient iteration over - // all arguments which match a particular id and then just provide an - // iterator combinator which takes multiple iterators which can be - // efficiently compared and returns them in order. - OptSpecifier Id0, Id1, Id2; - - void SkipToNextArg(); - -public: - typedef Arg * const * value_type; - typedef Arg * const & reference; - typedef Arg * const * pointer; - typedef std::forward_iterator_tag iterator_category; - typedef std::ptrdiff_t difference_type; - - arg_iterator(SmallVectorImpl::const_iterator it, const ArgList &Args, - OptSpecifier Id0 = 0U, OptSpecifier Id1 = 0U, - OptSpecifier Id2 = 0U) - : Current(it), Args(Args), Id0(Id0), Id1(Id1), Id2(Id2) { - SkipToNextArg(); - } - - operator const Arg*() { return *Current; } - reference operator*() const { return *Current; } - pointer operator->() const { return Current; } - - arg_iterator &operator++() { - ++Current; - SkipToNextArg(); - return *this; - } - - arg_iterator operator++(int) { - arg_iterator tmp(*this); - ++(*this); - return tmp; - } - - friend bool operator==(arg_iterator LHS, arg_iterator RHS) { - return LHS.Current == RHS.Current; - } - friend bool operator!=(arg_iterator LHS, arg_iterator RHS) { - return !(LHS == RHS); - } -}; - -/// ArgList - Ordered collection of driver arguments. -/// -/// The ArgList class manages a list of Arg instances as well as -/// auxiliary data and convenience methods to allow Tools to quickly -/// check for the presence of Arg instances for a particular Option -/// and to iterate over groups of arguments. -class ArgList { -public: - typedef SmallVector arglist_type; - typedef arglist_type::iterator iterator; - typedef arglist_type::const_iterator const_iterator; - typedef arglist_type::reverse_iterator reverse_iterator; - typedef arglist_type::const_reverse_iterator const_reverse_iterator; - -private: - /// The internal list of arguments. - arglist_type Args; - -protected: - // Make the default special members protected so they won't be used to slice - // derived objects, but can still be used by derived objects to implement - // their own special members. - ArgList() = default; - // Explicit move operations to ensure the container is cleared post-move - // otherwise it could lead to a double-delete in the case of moving of an - // InputArgList which deletes the contents of the container. If we could fix - // up the ownership here (delegate storage/ownership to the derived class so - // it can be a container of unique_ptr) this would be simpler. - ArgList(ArgList &&RHS) : Args(std::move(RHS.Args)) { RHS.Args.clear(); } - ArgList &operator=(ArgList &&RHS) { - Args = std::move(RHS.Args); - RHS.Args.clear(); - return *this; - } - // Protect the dtor to ensure this type is never destroyed polymorphically. - ~ArgList() = default; - -public: - - /// @name Arg Access - /// @{ - - /// append - Append \p A to the arg list. - void append(Arg *A); - - arglist_type &getArgs() { return Args; } - const arglist_type &getArgs() const { return Args; } - - unsigned size() const { return Args.size(); } - - /// @} - /// @name Arg Iteration - /// @{ - - iterator begin() { return Args.begin(); } - iterator end() { return Args.end(); } - - reverse_iterator rbegin() { return Args.rbegin(); } - reverse_iterator rend() { return Args.rend(); } - - const_iterator begin() const { return Args.begin(); } - const_iterator end() const { return Args.end(); } - - const_reverse_iterator rbegin() const { return Args.rbegin(); } - const_reverse_iterator rend() const { return Args.rend(); } - - arg_iterator filtered_begin(OptSpecifier Id0 = 0U, OptSpecifier Id1 = 0U, - OptSpecifier Id2 = 0U) const { - return arg_iterator(Args.begin(), *this, Id0, Id1, Id2); - } - arg_iterator filtered_end() const { - return arg_iterator(Args.end(), *this); - } - - iterator_range filtered(OptSpecifier Id0 = 0U, - OptSpecifier Id1 = 0U, - OptSpecifier Id2 = 0U) const { - return make_range(filtered_begin(Id0, Id1, Id2), filtered_end()); - } - - /// @} - /// @name Arg Removal - /// @{ - - /// eraseArg - Remove any option matching \p Id. - void eraseArg(OptSpecifier Id); - - /// @} - /// @name Arg Access - /// @{ - - /// hasArg - Does the arg list contain any option matching \p Id. - /// - /// \p Claim Whether the argument should be claimed, if it exists. - bool hasArgNoClaim(OptSpecifier Id) const { - return getLastArgNoClaim(Id) != nullptr; - } - bool hasArg(OptSpecifier Id) const { - return getLastArg(Id) != nullptr; - } - bool hasArg(OptSpecifier Id0, OptSpecifier Id1) const { - return getLastArg(Id0, Id1) != nullptr; - } - bool hasArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const { - return getLastArg(Id0, Id1, Id2) != nullptr; - } - - /// getLastArg - Return the last argument matching \p Id, or null. - /// - /// \p Claim Whether the argument should be claimed, if it exists. - Arg *getLastArgNoClaim(OptSpecifier Id) const; - Arg *getLastArgNoClaim(OptSpecifier Id0, OptSpecifier Id1) const; - Arg *getLastArgNoClaim(OptSpecifier Id0, OptSpecifier Id1, - OptSpecifier Id2) const; - Arg *getLastArgNoClaim(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, - OptSpecifier Id3) const; - Arg *getLastArg(OptSpecifier Id) const; - Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1) const; - Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2) const; - Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, - OptSpecifier Id3) const; - Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, - OptSpecifier Id3, OptSpecifier Id4) const; - Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, - OptSpecifier Id3, OptSpecifier Id4, OptSpecifier Id5) const; - Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, - OptSpecifier Id3, OptSpecifier Id4, OptSpecifier Id5, - OptSpecifier Id6) const; - Arg *getLastArg(OptSpecifier Id0, OptSpecifier Id1, OptSpecifier Id2, - OptSpecifier Id3, OptSpecifier Id4, OptSpecifier Id5, - OptSpecifier Id6, OptSpecifier Id7) const; - - /// getArgString - Return the input argument string at \p Index. - virtual const char *getArgString(unsigned Index) const = 0; - - /// getNumInputArgStrings - Return the number of original argument strings, - /// which are guaranteed to be the first strings in the argument string - /// list. - virtual unsigned getNumInputArgStrings() const = 0; - - /// @} - /// @name Argument Lookup Utilities - /// @{ - - /// getLastArgValue - Return the value of the last argument, or a default. - StringRef getLastArgValue(OptSpecifier Id, - StringRef Default = "") const; - - /// getAllArgValues - Get the values of all instances of the given argument - /// as strings. - std::vector getAllArgValues(OptSpecifier Id) const; - - /// @} - /// @name Translation Utilities - /// @{ - - /// hasFlag - Given an option \p Pos and its negative form \p Neg, return - /// true if the option is present, false if the negation is present, and - /// \p Default if neither option is given. If both the option and its - /// negation are present, the last one wins. - bool hasFlag(OptSpecifier Pos, OptSpecifier Neg, bool Default=true) const; - - /// hasFlag - Given an option \p Pos, an alias \p PosAlias and its negative - /// form \p Neg, return true if the option or its alias is present, false if - /// the negation is present, and \p Default if none of the options are - /// given. If multiple options are present, the last one wins. - bool hasFlag(OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg, - bool Default = true) const; - - /// AddLastArg - Render only the last argument match \p Id0, if present. - void AddLastArg(ArgStringList &Output, OptSpecifier Id0) const; - void AddLastArg(ArgStringList &Output, OptSpecifier Id0, - OptSpecifier Id1) const; - - /// AddAllArgs - Render all arguments matching any of the given ids. - void AddAllArgs(ArgStringList &Output, ArrayRef Ids) const; - - /// AddAllArgs - Render all arguments matching the given ids. - void AddAllArgs(ArgStringList &Output, OptSpecifier Id0, - OptSpecifier Id1 = 0U, OptSpecifier Id2 = 0U) const; - - /// AddAllArgValues - Render the argument values of all arguments - /// matching the given ids. - void AddAllArgValues(ArgStringList &Output, OptSpecifier Id0, - OptSpecifier Id1 = 0U, OptSpecifier Id2 = 0U) const; - - /// AddAllArgsTranslated - Render all the arguments matching the - /// given ids, but forced to separate args and using the provided - /// name instead of the first option value. - /// - /// \param Joined - If true, render the argument as joined with - /// the option specifier. - void AddAllArgsTranslated(ArgStringList &Output, OptSpecifier Id0, - const char *Translation, - bool Joined = false) const; - - /// ClaimAllArgs - Claim all arguments which match the given - /// option id. - void ClaimAllArgs(OptSpecifier Id0) const; - - /// ClaimAllArgs - Claim all arguments. - /// - void ClaimAllArgs() const; - - /// @} - /// @name Arg Synthesis - /// @{ - - /// Construct a constant string pointer whose - /// lifetime will match that of the ArgList. - virtual const char *MakeArgStringRef(StringRef Str) const = 0; - const char *MakeArgString(const Twine &Str) const { - SmallString<256> Buf; - return MakeArgStringRef(Str.toStringRef(Buf)); - } - - /// \brief Create an arg string for (\p LHS + \p RHS), reusing the - /// string at \p Index if possible. - const char *GetOrMakeJoinedArgString(unsigned Index, StringRef LHS, - StringRef RHS) const; - - void print(raw_ostream &O) const; - void dump() const; - - /// @} -}; - -class InputArgList final : public ArgList { -private: - /// List of argument strings used by the contained Args. - /// - /// This is mutable since we treat the ArgList as being the list - /// of Args, and allow routines to add new strings (to have a - /// convenient place to store the memory) via MakeIndex. - mutable ArgStringList ArgStrings; - - /// Strings for synthesized arguments. - /// - /// This is mutable since we treat the ArgList as being the list - /// of Args, and allow routines to add new strings (to have a - /// convenient place to store the memory) via MakeIndex. - mutable std::list SynthesizedStrings; - - /// The number of original input argument strings. - unsigned NumInputArgStrings; - - /// Release allocated arguments. - void releaseMemory(); - -public: - InputArgList(const char* const *ArgBegin, const char* const *ArgEnd); - InputArgList(InputArgList &&RHS) - : ArgList(std::move(RHS)), ArgStrings(std::move(RHS.ArgStrings)), - SynthesizedStrings(std::move(RHS.SynthesizedStrings)), - NumInputArgStrings(RHS.NumInputArgStrings) {} - InputArgList &operator=(InputArgList &&RHS) { - releaseMemory(); - ArgList::operator=(std::move(RHS)); - ArgStrings = std::move(RHS.ArgStrings); - SynthesizedStrings = std::move(RHS.SynthesizedStrings); - NumInputArgStrings = RHS.NumInputArgStrings; - return *this; - } - ~InputArgList() { releaseMemory(); } - - const char *getArgString(unsigned Index) const override { - return ArgStrings[Index]; - } - - unsigned getNumInputArgStrings() const override { - return NumInputArgStrings; - } - - /// @name Arg Synthesis - /// @{ - -public: - /// MakeIndex - Get an index for the given string(s). - unsigned MakeIndex(StringRef String0) const; - unsigned MakeIndex(StringRef String0, StringRef String1) const; - - using ArgList::MakeArgString; - const char *MakeArgStringRef(StringRef Str) const override; - - /// @} -}; - -/// DerivedArgList - An ordered collection of driver arguments, -/// whose storage may be in another argument list. -class DerivedArgList final : public ArgList { - const InputArgList &BaseArgs; - - /// The list of arguments we synthesized. - mutable SmallVector, 16> SynthesizedArgs; - -public: - /// Construct a new derived arg list from \p BaseArgs. - DerivedArgList(const InputArgList &BaseArgs); - - const char *getArgString(unsigned Index) const override { - return BaseArgs.getArgString(Index); - } - - unsigned getNumInputArgStrings() const override { - return BaseArgs.getNumInputArgStrings(); - } - - const InputArgList &getBaseArgs() const { - return BaseArgs; - } - - /// @name Arg Synthesis - /// @{ - - /// AddSynthesizedArg - Add a argument to the list of synthesized arguments - /// (to be freed). - void AddSynthesizedArg(Arg *A); - - using ArgList::MakeArgString; - const char *MakeArgStringRef(StringRef Str) const override; - - /// AddFlagArg - Construct a new FlagArg for the given option \p Id and - /// append it to the argument list. - void AddFlagArg(const Arg *BaseArg, const Option Opt) { - append(MakeFlagArg(BaseArg, Opt)); - } - - /// AddPositionalArg - Construct a new Positional arg for the given option - /// \p Id, with the provided \p Value and append it to the argument - /// list. - void AddPositionalArg(const Arg *BaseArg, const Option Opt, - StringRef Value) { - append(MakePositionalArg(BaseArg, Opt, Value)); - } - - - /// AddSeparateArg - Construct a new Positional arg for the given option - /// \p Id, with the provided \p Value and append it to the argument - /// list. - void AddSeparateArg(const Arg *BaseArg, const Option Opt, - StringRef Value) { - append(MakeSeparateArg(BaseArg, Opt, Value)); - } - - - /// AddJoinedArg - Construct a new Positional arg for the given option - /// \p Id, with the provided \p Value and append it to the argument list. - void AddJoinedArg(const Arg *BaseArg, const Option Opt, - StringRef Value) { - append(MakeJoinedArg(BaseArg, Opt, Value)); - } - - - /// MakeFlagArg - Construct a new FlagArg for the given option \p Id. - Arg *MakeFlagArg(const Arg *BaseArg, const Option Opt) const; - - /// MakePositionalArg - Construct a new Positional arg for the - /// given option \p Id, with the provided \p Value. - Arg *MakePositionalArg(const Arg *BaseArg, const Option Opt, - StringRef Value) const; - - /// MakeSeparateArg - Construct a new Positional arg for the - /// given option \p Id, with the provided \p Value. - Arg *MakeSeparateArg(const Arg *BaseArg, const Option Opt, - StringRef Value) const; - - /// MakeJoinedArg - Construct a new Positional arg for the - /// given option \p Id, with the provided \p Value. - Arg *MakeJoinedArg(const Arg *BaseArg, const Option Opt, - StringRef Value) const; - - /// @} -}; - -} // end namespace opt -} // end namespace llvm - -#endif diff --git a/llvm/include/llvm/Option/OptParser.td b/llvm/include/llvm/Option/OptParser.td deleted file mode 100644 index 4da86f09..00000000 --- a/llvm/include/llvm/Option/OptParser.td +++ /dev/null @@ -1,135 +0,0 @@ -//===--- OptParser.td - Common Option Parsing Interfaces ------------------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the common interfaces used by the option parsing TableGen -// backend. -// -//===----------------------------------------------------------------------===// - -// Define the kinds of options. - -class OptionKind { - string Name = name; - // The kind precedence, kinds with lower precedence are matched first. - int Precedence = precedence; - // Indicate a sentinel option. - bit Sentinel = sentinel; -} - -// An option group. -def KIND_GROUP : OptionKind<"Group">; -// The input option kind. -def KIND_INPUT : OptionKind<"Input", 1, 1>; -// The unknown option kind. -def KIND_UNKNOWN : OptionKind<"Unknown", 2, 1>; -// A flag with no values. -def KIND_FLAG : OptionKind<"Flag">; -// An option which prefixes its (single) value. -def KIND_JOINED : OptionKind<"Joined", 1>; -// An option which is followed by its value. -def KIND_SEPARATE : OptionKind<"Separate">; -// An option followed by its values, which are separated by commas. -def KIND_COMMAJOINED : OptionKind<"CommaJoined">; -// An option which is which takes multiple (separate) arguments. -def KIND_MULTIARG : OptionKind<"MultiArg">; -// An option which is either joined to its (non-empty) value, or followed by its -// value. -def KIND_JOINED_OR_SEPARATE : OptionKind<"JoinedOrSeparate">; -// An option which is both joined to its (first) value, and followed by its -// (second) value. -def KIND_JOINED_AND_SEPARATE : OptionKind<"JoinedAndSeparate">; -// An option which consumes all remaining arguments if there are any. -def KIND_REMAINING_ARGS : OptionKind<"RemainingArgs">; -// An option which consumes an optional joined argument and any other remaining -// arguments. -def KIND_REMAINING_ARGS_JOINED : OptionKind<"RemainingArgsJoined">; - -// Define the option flags. - -class OptionFlag {} - -// HelpHidden - The option should not be displayed in --help, even if it has -// help text. Clients *can* use this in conjunction with the OptTable::PrintHelp -// arguments to implement hidden help groups. -def HelpHidden : OptionFlag; - -// RenderAsInput - The option should not render the name when rendered as an -// input (i.e., the option is rendered as values). -def RenderAsInput : OptionFlag; - -// RenderJoined - The option should be rendered joined, even if separate (only -// sensible on single value separate options). -def RenderJoined : OptionFlag; - -// RenderSeparate - The option should be rendered separately, even if joined -// (only sensible on joined options). -def RenderSeparate : OptionFlag; - -// Define the option group class. - -class OptionGroup { - string EnumName = ?; // Uses the def name if undefined. - string Name = name; - string HelpText = ?; - OptionGroup Group = ?; - list Flags = []; -} - -// Define the option class. - -class Option prefixes, string name, OptionKind kind> { - string EnumName = ?; // Uses the def name if undefined. - list Prefixes = prefixes; - string Name = name; - OptionKind Kind = kind; - // Used by MultiArg option kind. - int NumArgs = 0; - string HelpText = ?; - string MetaVarName = ?; - list Flags = []; - OptionGroup Group = ?; - Option Alias = ?; - list AliasArgs = []; -} - -// Helpers for defining options. - -class Flag prefixes, string name> - : Option; -class Joined prefixes, string name> - : Option; -class Separate prefixes, string name> - : Option; -class CommaJoined prefixes, string name> - : Option; -class MultiArg prefixes, string name, int numargs> - : Option { - int NumArgs = numargs; -} -class JoinedOrSeparate prefixes, string name> - : Option; -class JoinedAndSeparate prefixes, string name> - : Option; - -// Mix-ins for adding optional attributes. - -class Alias